text
stringlengths
2.85k
2.55M
label
class label
11 classes
Miscomputation in software: Learning to live with errors Tomas Petriceka a The Alan Turing Institute, London, UK Abstract Computer programs do not always work as expected. In fact, ominous warnings about the desperate state of the software industry continue to be released with almost ritualistic regularity. In this paper, we look at the 60 years history of programming and at the different practical methods that software community developed to live with programming errors. We do so by observing a class of students discussing different approaches to programming errors. While learning about the different methods for dealing with errors, we uncover basic assumptions that proponents of different paradigms follow. We learn about the mathematical attempt to eliminate errors through formal methods, scientific method based on testing, a way of building reliable systems through engineering methods, as well as an artistic approach to live coding that accepts errors as a creative inspiration. This way, we can explore the differences and similarities among the different paradigms. By inviting proponents of different methods into a single discussion, we hope to open potential for new thinking about errors. When should we use which of the approaches? And what can software development learn from mathematics, science, engineering and art? When programming or studying programming, we are often enclosed in small communities and we take our basic assumptions for granted. Through the discussion in this paper, we attempt to map the large and rich space of programming ideas and provide reference points for exploring, perhaps foreign, ideas that can challenge some of our assumptions. ACM CCS 2012 General and reference → Surveys and overviews; Social and professional topics → History of computing; Keywords Miscomputation, errors, philosophy, paradigms The Art, Science, and Engineering of Programming Submitted December 2, 2016 Published April 1, 2017 doi 10.22152/programming-journal.org/2017/1/14 © Tomas Petricek This work is licensed under a “CC BY 4.0” license. In The Art, Science, and Engineering of Programming, vol. 1, no. 2, 2017, article 14; 24 pages. Learning to live with errors 1 The history and classification of errors If trials of three or four simple cases have been made, and are found to agree with the results given by the engine, it is scarcely possible that there can be any error among the cards [5]. The opening quote from Charles Babbage about the Analytical Engine suggests that Babbage did not see errors as a big problem. If that was the case, the software industry would save billions of dollars, but sadly, eradicating all software errors turned out to be harder than expected. In retrospect, it is curious to see how long it took early computer personnel to realise that coding errors are a problem. One of the first people to realize that “[he] was going to spend a good deal of [his] time finding mistakes that [he] had made in [his] programs” was Maurice Wilkes in late 1940s [17]. However, as Mark Priestley writes, a typical comment [circa 1949] was that of Miller, who wrote that such errors, along with hardware faults, could be “expected, in time, to become infrequent” [41]. While hardware faults did become relatively infrequent, the same cannot be said about coding errors. Over the next 20 years, computers developed from a research experiment into an ordinary scientific tool and industrial instrument. As noted by Nathan Ensmenger, by the end of 1960s many were talking of a computing crisis. For the next “several decades, managers, academics and governments would release warnings about the desperate state of the software industry with ritualistic regularity” [17]. In this essay, we trace the history of errors, or miscomputations [19], in software engineering. We look at different kinds of errors and discuss different strategies that programmers employ for dealing with errors, taking inspiration from mathematics, science, engineering and art. We conclude by speculating how can the industry escape from the seeming perpetual computing crisis. Lesson 1: Responding to the computing crisis Teacher: To open the discussion, do you think that software engineering is suffering from a crisis caused by coding errors? And if so, what do we need to eradicate them? Pupil Beta: I’m not sure we can really call our discipline software engineering. As a proper engineering discipline, we need to develop engineering standards that ensure minimum performance, safety requirements and make sure that developing software is a consistent and repeatable process. The black art of programming has to make a way for the science of software engineering.1 Pupil Alpha: This is an admirable goal, but building software is not repeatable in the same way as, say, building bridges. In software, requirements are always changing. We should see software as craftsmanship and emphasize skills of developers. 1 The quote is adapted from the calls for the professionalization of programmers that appeared around the time of the NATO Conference in 1968 [17] 14-2 Tomas Petricek The only way to make software better is to value individuals and interactions over processes and tools 2 ! Pupil Tau: Coding errors must be avoided at all costs. If a program contains an error, we should not even call it a program! But you are both going about it the wrong way – even with the best craftsmans and processes, there is always a chance of human error. We need to build on mathematical foundations and write provably correct software. Building on strong theoretical foundations, ideas like dependently typed programming are the way toward eradicating all errors. Striving for anything less is unethical! Pupil Alpha: This might work for the factorial function or Fibonacci numbers, but real software systems are not so simple. When you start building a real system, you do not even have a full specification, let alone a formal one. What really matters is how we discover the specification and this is where testdriven methodology can help [7]. You turn requirements into tests, discovering the specification and writing software that adheres to it at the same time. Pupil Epsilon: Oh, come on! You both really think you can eliminate all errors? Take any complex distributed system as an example. So many things can go wrong – one of your machines runs out of memory, your server receives an unexpected request. Even a cosmic ray may flip a bit in your memory if your data centre is large enough! The path to dependable software is to learn to live with errors. Pupil Tau: I would like to object; we can accommodate for all of these situations in our proofs, but I see there is only little time left and I’m curious if Omega can direct our discussion back into a more sensible direction. Pupil Omega: Yo, I tell you, errors are fun! Teacher: That is an interesting position Omega, but I think the class needs more explanation. What exactly do you mean? Pupil Omega: I was playing in a club yesterday. I accidentally put on a wrong sample and it turned out to be much better. If you make an error, you might be surprised. And if Tau thinks it is unethical, wouldn’t it be just as unethical as to limit our method of discovery? Penicillin was discovered by the kind of accident that Tau wants to ban! Teacher: It does seem that after more than 60 years, errors are still an important concern of the software industry and there is much disagreement about how to live with them. Perhaps it will be easier to expand on the different positions once we consider recent infamous examples of concrete coding errors. Lesson 2: From Y2K to the Knight Capital glitch Teacher: Let us now consider the different strategies for dealing with errors using a number of case studies. The first one is the infamous Y2K bug. This was caused by the 2 Alpha paraphrases the position of the craftsmanship movement [33], which has been linked with art and contrasted with the engineering attitude [43]. 14-3 Learning to live with errors fact that many old programs stored only the last two digits of a year in a date and so adding one day to 31/12/1999 produced a date that could be interpreted as 1/1/2000, but also as 1/1/1900.3 As a concrete instance, my bank statement on 1/1/2000 reported that $8617 disappeared from my savings! Fortunately, they returned my money on the next day... Omega: Ouch! Despite all the Y2K craze,4 I had the impression that the bug caused only relatively small number of problems. It is an interesting case where the potential issue was discovered before it actually occurred. Yet, it was surprisingly hard to fix. Beta: I can see how the bug in the banking system could have happened. I bet the specification was correct and stated how to calculate the compound interest for a given number of years, but due to a sloppy encoding of years, the system calculated the interest based not on +1 year, but based on -99 years. 5 Omega: This is a case where formal proofs are not going to help. You can prove that your calculations and algorithms are correct, but when it comes down to metal, years won’t be idealized natural numbers, but only two digits to save memory space! Tau: That would only be the case if you were using program proofs in an informal way, but if we talk about proving programs correct, we must not make any idealizing simplifications. We must prove properties of the actual implementation – the bug was an incompleteness in the specification. The specification must be detailed enough not to leave room for any ambiguity, such as how are the dates going to be represented. Alpha: I cannot easily think of a theorem to prove here. If the property we prove is that the system correctly calculates the return on investment using the compound interest formula for a given number of years, that still does not prevent us from accidentally calculating it for -99 years... Teacher: Finding properties to prove is an important question. We will return to it in Lesson 6. To find further interesting questions to discuss, let’s consider another well-known bug. In August 2012, the trading firm Knight Capital lost $440m in less than 45 minutes due to an erroneous deployment of their software. The company removed outdated code from the software and re-purposed a flag that was used to trigger it. It then deployed a new version of the software on all servers except for one – and turned on the flag. This executed the new routine on the updated servers, but it triggered the outdated code on the one server running the old version, causing the system to issue millions of erroneous trades [46]. Omega: I cannot believe it took Knight Capital 45 minutes to turn off the malfunctioning server! The lesson here is clear. You should design the system to make such errors immediately visible and you should be able to quickly manually intervene. You 3 Unlike a modern data scientist, our class is lucky enough that it does not need to consider different ways of writing days and months in a date! 4 How media reported on the Y2K bug has been well-documented by Davies [14] 5 Beta makes a correct guess, $8617 is what you lose when you assume 2% interest rate on initial investment $10000 over -99 years. 14-4 Tomas Petricek should be able to stop incorrect trading just like you can stop a dissonant chord that you accidentally play in live music performance. Epsilon: I can see how a manual coding intervention could correct the error promptly, but why not avoid it in the first place? The scenario sounds exactly like the situation for which Erlang and its “let it crash” [3] approach has been designed! Erlang has been used in telecommunications for systems that need to run for years without an outage and are updated on the fly. Rather than re-purposing a flag, you would simply add a new kind of message. If an old system was running on one of the servers, it would crash when it receives a message it cannot handle – and it would get restarted by a supervisor process while all the updated servers would continue working fine. Tau: If the system is programmed to automatically recover, then I do not think we are still talking about errors. But I must admit, I find it a very inelegant approach... Teacher: The case of Knight Capital revealed two more important questions that we should discuss in future lessons. First, I would like to return to the idea of live intervention in Lesson 5. Second, the Erlang approach of incorporating some degree of error tolerance is an interesting alternative and we’ll return to it in Lesson 10. Now, let’s discuss one more case study. In January 2016, Google Translate caused an embarrassing diplomatic incident. When translating from Ukrainian to Russian, it started translating Russia as “Mordor” and Sergey Lavrov (Russia’s foreign minister) as “sad little horse” [6]. The error was introduced automatically – it mirrored language used by some Ukrainians following Moscow’s annexation of Crimea in 2014. Tau: I object, this is not a real error! Lesson 3: Classifying kinds of miscomputation Teacher: We uncovered an interesting issue last time – is the unexpected behaviour of Google Translate actually an error? To answer this, perhaps we can start by trying to understand what kinds of errors or miscomptuations [19] are there. Beta: Let me try. First, there are simple slips where your idea was right and you tried to encode it in the right way, but you made a syntax error, a typo or, say, a copy-and-paste error. Then there are failures where you had the right idea but encoded (some part of) it poorly. Finally, mistakes are the kinds of errors where you made an error when thinking through the specification.6 Tau: Knight Capital glitch would then be a failure, while Y2K bug is a mistake because nobody expected software to still run in the year 2000. However, Google Translate simply followed the specification of its machine learning algorithms... Alpha: That might be the case if the specification said “run this deep neural network learning algorithm on data scraped from Ukrainian internet”, but I doubt that is 6 Beta is paraphrasing categorization of miscomputation by Primiero and Fresco [19, 42] 14-5 Learning to live with errors the case. We must see programs in the wider socio-technological perspective.7 You wouldn’t want an accident like that to cause a war... Omega: I bet that Tau will now claim that programs cannot miscompute,8 because they execute their program code and that is what they are supposed to do! The actual specification of Google Translate must have been “do a good and accurate translation”. Tau: I would be happy to say that programs cannot miscompute, but I accept that coding errors are a more general notion. Still, “do an accurate translation” is more of a marketing slogan than a specification. Teacher: Can we perhaps better understand the nature of the error if we consider what Google Translate team did in order to address it? Alpha: I can imagine two alternatives. If they had manual control over the training data, then they probably just removed the offending text from the dataset. If the training data is automatically collected, then they probably had to modify the behaviour of the scraping or training algorithm... Beta: Now I can see why Tau says this was not an error. If we treat the training data just as one of the program inputs and the error was caused by inappropriate training data, then the error was neither failure nor a mistake. However, if Google had to modify their algorithm, then I would characterize the error as a mistake. Epsilon: Are you suggesting that we can only decide whether the behaviour was a mistake if we know what Google did in order to address it? This is quite strange! Beta: If we want to treat training data as separate from the program, then we need to think about the specification for the data too – training data is just too important in machine learning. Translating Russia as Mordor is an amusing story, but there are more dangerous biases that poorly chosen training dataset can cause! Epsilon: I think that another useful lesson from the Google Translate case is that you never quite know when your specification is complete. As new unexpected situations arise, your specification has to evolve too. The fact that translating Russia as Mordor is not an “accurate translation” only becomes apparent once it happens. Interestingly, mathematicians went through exactly the same process when trying to define polyhedron! 9 Teacher: It seems that the situation with mistakes is quite subtle. Now, can we at least agree on slips and failures? Or is it equally hard to recognize an incorrect encoding of a correct specification? 7 As discussed by Northrop et al. [38], challenges of ultra-large-scale systems often need to be seen through this wider perspective. 8 A discussion along these lines followed in response to Primiero and Fresco [19]; Dewhurst [15] argues that design errors should not be seen as miscomputation and Floridi et al. [18] discusses whether software can be seen as artifacts that can malfunction. 9 Epsilon refers to the concept of concept stretching of Lakatos [31]. 14-6 Tomas Petricek Omega: I would probably agree on slips, but the idea of failures makes an incorrect assumption that software can always have perfect and clear specification. A perceived failure can equally be a sign that you found an interesting complex scenario that you did not properly consider in your specification. Alpha: In test-driven development, this would be the case where you add a new test case to clarify the specification. Strictly speaking, if you treat your tests as a specification, then you cannot have failures and all errors are either slips or mistakes. That is an interesting and for me quite unexpected consequence of the definition... Omega: Another issue with our definition is that many interesting kinds of software cannot even have a clear specification. This is the case in live coded music or generative art where errors may turn out to be your most interesting pieces of work.10 Outside of art, a data scientist or a data journalist trying to find an interesting story in a leaked data dump does not, at first, know what exactly she might be looking for! 2 Understanding programming paradigms through errors As we have seen, the definition and classification of errors varies across different communities. This is also the case when dealing with errors. Not only do different groups follow different approaches to address errors, but their criteria for what can be considered a solution differ too. In philosophy of science, such sets of incommensurable assumptions are known as research programmes or paradigms.11 Thinking about coding errors gives us a new way of thinking about different programming paradigms and about the basic assumptions they do not question. While our class can reconcile some of the views (e.g. types and tests), we find that errors draw a bigger dividing line when trying to understand what a program is. Lesson 4: Maintenance as part of the programming process Teacher: According to some studies, from 1960s on, software maintenance has represented between 50% to 70% of total expenditure on software [17]. This is in part due to fixing bugs, but perhaps more importantly also due to required modification in response to the changes in the business environment. The Y2K bug is a good example of a change in the environment – the year change that was perhaps unexpected when software was originally written suddenly became important at the end of 1990s. To open this lesson, is software maintenance something we have to do because we are unable to produce software without errors, or is it an inevitable part of the software development process? 10 Some of the work by Anders Hoff collects interesting pieces produced accidentally by a buggy generative algorithm [25] 11 This is an over-simplification, but for the purpose of this article, we use research programmes [30] and research paradigms [29] in a similar sense. 14-7 Learning to live with errors Alpha: The test-driven approach to software development supports both the initial development and maintenance. You write tests to specify the behaviour. With the Y2K bug, you would simply add a new test, fix possible failures and deploy a new version. Teacher: This is an interesting perspective on errors. Are you not only accepting that there are errors in the program, but even propose to incorporate them into the program development life-cycle? Tau: Excuse me, but I think we should not be confusing what a program is with how it is created. A program is just a linguistic entity that you can analyse for correctness and run. How it is written is not a concern of our present discussion! Once we learn how to construct correct programs, no maintenance will be needed. Teacher: Treating program as a linguistic entity is exactly the kind of assumption that defines a scientific research programme... Omega: And I think it is fundamentally flawed assumption! The fact that more than half of costs involve maintenance only supports this. The Y2K bug is an obvious issue in retrospect, but I can see how everyone missed it in 1980s. The environment in which software exists evolves and maintenance is more about adapting to the change than about fixing errors. In other words, programming is not a task of constructing a linguistic entity, but rather a process of working interactively with the programming environment, using text simply as one possible interface.12 Beta: This reminds me of a banking system in Smalltalk that I worked on in the 1990s. In Smalltalk, you create software by interacting directly with the environment. The program runs at the same time as you are creating it. This was useful for rapid feedback, but once the system was working, you did not continue to live code it, except sometimes when it went wrong and you needed to investigate and fix the error. Omega: But the decision when to watch the system and when to leave it alone was only yours! In live coded music, you want to interact with the system during the whole performance. In other applications, you interact more frequently in an early phase and less frequently in a later phase. But you still need to be able to interact! Lesson 5: Programming as human-computer interaction Teacher: Let us spend more time on the idea of seeing programming as an interaction with the programming environment. We already talked about it in the context of live coded performance and Smalltalk programming. Those are great examples, but can we find more examples of this approach to programming? Omega: Going back to the Y2K bug, live coding is actually what most companies did in response! Yes, they tried to fix possible bugs in advance, but in the end, they had a programmer on-site over the midnight to fix any problems as they happen. 12 Omega is paraphrasing the definitions of Algol and Smalltalk research programmes [41] 14-8 Tomas Petricek Similarly, when mitigating a hacking attempt, you should be able to connect to the system and live code a defense [11]. Sadly, most systems just did not have a very good live coding interface to make such interaction possible. Teacher: Is there anything that programming can learn from live coding then? Epsilon: I have no interest in live coded music, but I see one similarity. What Omega described sounds like working with a REPL environment in Python or Racket. There, you also type commands and run them immediately. If you get an error message, you can immediately correct yourself. REPL is no doubt “serious programming” but you still would not create a whole complex system just in REPL. Teacher: Should we then agree that Omega’s live coded music does not teach us much about professional software development, or are there other areas of software that are more similar to live coding? Epsilon: I have one more example, but again, it is not what I normally think of as programming. Doing data science using tools like Matlab or R also feels like live coding. You also issue commands, observe the results and correct errors. Error like typos are immediately obvious, but you can also live code experiments to test more complex machine learning algorithms such as the one translating Russia as Mordor. Tau: Following the same logic, you could claim that interactive theorem proving in Coq is also live coding with errors, because you do write code interactively until you satisfy your proof obligations. But unfinished proof is clearly not an error. Just a process of constructing a provably correct program. Alpha: I’m not sure about theorem proving, but test-driven development (TDD) can probably be seen as a form of live-coding too. A good test runner runs in the background and shows the failing tests immediately as you are writing your code to provide rapid feedback. Omega: This is exactly how live coding works! In TDD or data science, you are trying to make errors more visible so that you can quickly correct them. It is the same as live coded music where errors are immediately apparent. When you play a wrong note in a live coded performance, you will immediately hear that. I think there are two main lessons for software development. First, we need to abolish this artificial distinction between a phase when software is created and a phase when it is autonomously running. As the costs of maintenance showed, programming is almost never done. Second, we need to code in a way that make the errors visible. Just like you can immediately hear a wrong note, you should be able to hear or see an incorrect execution of a program, perhaps in some built-in monitoring tools. Tau: Well, now I see what you are trying to achieve, but it gives me a headache! If we wanted to guarantee correctness of such systems and account for all possible interactions, we would have to shift from proofs about static programs to proofs about interactions. I’m not saying it is impossible. It might even be an interesting research problem! But I would very much prefer to solve the easier task of proving correctness of static programs first. 14-9 Learning to live with errors Lesson 6: Achieving correctness through tests and proofs Teacher: Let us go back to the idea of programs as linguistic entities. Does this perspective help us eliminate coding errors? Tau: Absolutely! A program is essentially a formal language term and this lets us utilize the resources of logic in order to increase the confidence in correctness of programs.13 Instead of testing or debugging a program, one should prove that a program meets its specification. Then there will be no doubt that our software is correct and serves its purpose. Epsilon: I like reading papers about programming language theory and I do enjoy an elegant proof, but I do not see how you could write proofs about software system that has hundreds of thousands of lines of code. Tau: For reliable software engineering, we need to make proof an inherent part of the development process. Thanks to the Curry-Howard isomorphism, proofs are types. This means that all the amazing tools developed in logic are readily available in programming. Alpha: I can understand why people like types. They can be useful for avoiding basic kinds of errors. But the problem is that types do not capture the full complexity of software requirements. You still need to write your user stories and to make sure they keep working, you need some form of testing. And if you will have tests anyway, why restrict the expressive power of a language with types and not use tests as the way of ensuring program correctness? Tau: Substituting tests for proofs is never going to be enough. With tests, you are just showing the absence of certain errors, not proving your program correct.14 In modern dependently typed languages like Idris and Agda, you can express the full program specification just in terms of types. And then we will finally be able to write provably correct software! Teacher: I find it interesting that we are shifting the focus from program code to the properties that specify what the program does... Epsilon: At first, I thought all this talk about proofs is pointless, but now that you mention properties, I think there might be something useful here. Finding properties about your program is equally important if you are writing property-based tests with tools like QuickCheck [13], which then check that a property 13 Historically, this position first appeared with the Algol language. To quote Priestley [41]: One of the goals of the Algol research programme was to utilize the resources of logic to increase the confidence that it was possible to have in the correctness of a program. As McCarthy [35] had put it, “[i]nstead of debugging a program, one should prove that it meets its specifications, and this proof should be checked by a computer program”. 14 Tau is paraphrasing Dijkstra’s famous quote: “Program testing can be used to show the presence of bugs, but never to show their absence.” [16] 14-10 Tomas Petricek holds for partially randomly generated inputs. With random testing tools, you can focus more on finding as many useful properties as you can, rather than on writing a long-winded proof for every single one of them. This is a very efficient way for eradicating what we called failures in our earlier discussion. Lesson 7: Specifying program properties Teacher: Going back to the Y2K bug, the Knight Capital glitch and the Google Translate issue, can you think of properties that we can prove or check with random testing? Alpha: In case of banking system and Y2K, the test suite could include a check for a property that adding calculated interest to a savings account never decreases the total balance. The Y2K bug would be easily discovered and eliminated before it could happen! Tau: Excuse me, but this is no way of finding theorems about programs! You just picked one random property that you believe should hold, but this is not a methodology for constructing provably correct software. Instead, we need to start from small correct building blocks. We need to go back to the basics and define what a date is and what are the properties of functions operating on dates. Assuming n is a function that returns the next date and ≥ is the ordering on dates, we want to prove monotonicity stating that ∀d.n(d) ≥ d . Omega: I wonder how this accounts for leap seconds... I’m not saying it cannot be done, but if we get stuck discussing monotonicity of dates, how are we ever going to develop something as complex as banking system? And isn’t the specification going to become terribly complex? Tau: Today, most people who write software assume that the costs of formal program verification outweigh the benefits and that fixing bugs later is cheaper than investing into correctness from the very start.15 I agree we still have a long way to go, but many research projects show that this can be done. For example, CompCert [32] is a verified C compiler with a machinechecked proof that the generated executable code behaves exactly as prescribed by the semantics of the source program. Teacher: Is there something that we can learn from CompCert about finding properties to prove about large systems? Tau: Unlike the property about not decreasing total balance that Alpha suggested earlier, the property that is proved in CompCert is a complete specification. The types specify that the compilation preserves semantics of programs between the formally specified source language and formally specified machine code. 15 Tau is paraphrasing the introduction from a recent book on certified programming [12] 14-11 Learning to live with errors This means that you can infer the correct implementation from the type. 16 In Coq, this did not happen automatically, but with recent development in Idris [9], you will just need to write a sufficiently detailed specification using types and the implementation will be inferred for you. Epsilon: And the circle is closed! You are proposing to shift all the complexity of programming from writing a solution to writing a specification of the solution. I do not see how this is any safer. In today’s languages, we have to analyze the implementation and we invent new abstractions and constructs to make this easier. In your dependently typed future, we will have to analyze the equally complex specifications and we will presumably be inventing new abstractions and constructs to make this easier! Omega: I have to admit, we came to an interesting point here. Is it easier to write a correct concrete implementation or a correct abstract specification? I can see how writing the specification might be easier for C compiler. For a business application or any more creative use of computer, a specification in terms of properties will be harder to understand than a concrete implementation in a high-level language. 3 Mathematics, science, engineering and art Through the discussion in the previous section, we discovered several ways of thinking about programs. We have also seen that if you take one of them as granted, it is hard to understand what proponents of other perspectives are saying – the different assumptions forming the basis of a different paradigm make other approaches illogical. In this section, we try to relate the different ways of thinking about programs with different forms of human activity. It turns out that seeing programs as linguistic entities has much in common with mathematics and testing can learn from philosophy of science. Viewing a program as a long-running system is best seen as engineering and focusing on the interactions in programming can draw useful ideas from art. Lesson 8: Learning from philosophy of science and mathematics Teacher: Just like errors are an interesting topic for computing, so are experimental failures an interesting topic when discussing science. Can we learn something interesting about computing if we see errors as experimental failures? Tau: A theory is scientific if it can be falsified, 17 but we can never prove it true. I see an obvious parallel with the test-driven development methodology. Tests can falsify a program, but they can never prove that it is correct. Testing does not increase our 16 This is a common view in the dependently-typed community. There is no canonical reference making this exact point, but the work of McBride and McKinna [34] is close. 17 Tau follows the Popperian view of scientific theories [40], which has been largely influential, but can be challenged from many perspectives [10] 14-12 Tomas Petricek confidence about program correctness, just like a scientific experiment that does not fail is not showing that a scientific theory is correct. Teacher: So, is there really no information in the fact that a scientific theory keeps escaping refutation? Or that a software system passes a growingly comprehensive test suite? Epsilon: I think that even in science, not everybody agrees with the strict Popperian view. If a scientific theory passes a test and makes a correct prediction that could have disproved it, the probability that it is correct increases. Running the exact same test twice does not improve the probability, but I think that a new test does. Alpha: I get it now! It’s like in the Bayes’ theorem. There is a prior probability that the software is correct, possibly based on the team behind it. Testing the software then provides new evidence and the Bayes’ theorem prescribes how probabilities are to be changed in light of this new evidence.18 The fact that running the exact same test twice does not improve the probability of correctness, is already accounted for by the Bayes’ theorem. So what we need is a way of finding relevant tests that do increase the probability. Teacher: It seems that we can account for an increasing confidence in program correctness through testing by using the Bayesian approach to philosophy of science! Tau, do you agree? Tau: That might be right, but what it shows is the limits of relying on tests. Perhaps you can increase probability, but you will never be absolutely certain. However, programming is more like mathematics where proofs can give you exactly that – absolute certainty. Experimentation is good in areas where we cannot have deductive knowledge,19 but why settle for probability if you can have a proof? Epsilon: Let me quote Imre Lakatos, who once said that “when a powerful new method emerges, the problems it cannot talk about are ignored” [31]. This is one danger of focusing on proofs – suddenly it becomes impossible to talk about important problems that cannot be explained through proofs. For example, what is the most intuitive way of modelling a distributed system? Surely, using the right intuitive programming model is crucial for writing correct software! Teacher: Well, even if we see programming more as mathematics, is achieving correctness the only goal of proofs? Omega: Proofs aren’t there to convince you that something is true. They are there to show why it is true [4]. Even more interestingly, they sometimes play the same role as errors in live coding performance – they lead into unexplored territory of mathematics where we may even find different fundamental questions! [22] Teacher: Can proofs about programs play this role? 18 19 Bayesian epistemology of science [10] is based on similar reasoning As noted by Hacking [23], “we find prejudices in favour of theory as far back as there is institutionalized science.” 14-13 Learning to live with errors Epsilon: I had a look at some Coq programs and I am convinced that the proofs are true, but I doubt they fulfill the explanatory role. Reading a sequence of tactic invocations is definitely harder than reading an implementation of the same problem in a simple language. Tau: I agree that Coq proofs can be complex, but they do have explanatory role. After all, in CompCert, the proof proceeds by a sequence of steps that translate source code in C into source code in a number of intermediary languages. Each of these translations preserves the semantics. The proof essentially describes the architecture of the compiler! Omega: I can see how the CompCert proof reveals the problem decomposition, but I still doubt this approach can reveal truly new and unexplored ideas. Perhaps the problem is that constructive proofs like those about programs just have to follow more rigid structure. In mathematics, proof by contradiction can introduce unexpected creative twists that you can hardly get in proofs about programs. Lesson 9: Errors as a source of artistic creativity Teacher: Talking about sources of creative inspiration, Omega, you claimed earlier that errors are fun and can lead to new discoveries. Can you clarify what you mean? Omega: An error in the performance of classical music occurs when the performer plays a note that is not written on the page. In genres that are not notated so closely, there are no wrong notes – only notes that are more or less appropriate [8]. A musical live coding performance is also not closely notated. You issue commands. Some of them are more appropriate and some of them are less appropriate. Going back to our classification of errors, a slip such as syntax error rarely produces inspiring unexpected results. Failures and especially mistakes where you do not fully think through the consequences of your idea often lead to interesting creative moments. I imagine data scientists using REPL experience the same feelings when things do not go as expected! Teacher: This is talking about more interactive flavor of programming, but do errors also have a useful role in more traditional software development? Beta: I think so, but we need to consider the entire software development process, including clarification of the specification and maintenance. I believe that errors often show areas where we need to clarify specification. Epsilon: In Erlang, we say that an error is a situation in which the programmer does not know how the program should correctly react, which seems to agree with what Beta is saying! Of course, in Erlang, the answer is to kill the process and let the supervisor recover from the error [3]. That way, an error caused by a rare interplay of multiple systems becomes just a failure that the system can automatically recover from, without turning into a mistake that programmers would need to immediately address. 14-14 Tomas Petricek Omega: I did not think of that, but I think this perfectly explains why artistic inspiration is important for programming! Seeing software development as mathematics or science makes us want to carefully control the process and impose tight constraints to make it reproducible. In contrast, artistic process tolerates or even welcomes a variety of inputs and works to produce the best result given the situations encountered while executing the process [21]. Tau: I’m not sure I follow. How is reproducibility a bad thing? Omega: Of course, reproducibility is nice, but it is a chimera. There is much more variety in software engineering than in traditional engineering disciplines and requirements are always changing. An artistic process can adapt to very poorly stated requirements or even no requirements at all [21]. Beta: But Omega, do you not agree that the attempts to turn our discipline from what I earlier called “black art of programming” into an engineering discipline contributed to the quality of software that we build today? Omega: It very likely did, but we can’t say it’s helped the quality of design much [21] and this is why we keep making the same errors! In live coding you can very visibly improve through practice and the progress is clear to see. Perhaps we need to look at how artistic work makes such improvements possible? I suspect it might, in part, be thanks to the interaction with directly apparent errors and their unexpected consequences! Lesson 10: Engineering, or how did software get so reliable without proof? Teacher: The fact that we have this lecture series clearly shows that errors are still an important concern, but going back to what Beta said in the previous lecture, do you think that the quality of software that we build has been improving over, say, the last 60 years? Epsilon: Looking at the history, it is fascinating to see all the regular warnings about the desperate state of the software industry. There is an interesting dichotomy: on the one hand, software is one of the largest and fastest-growing sectors of the U.S. economy; on the other hand, its reputation continues to be marked by perceptions of crisis and failure [17]. Tau: I’m often surprised how did software get so reliable without proofs.20 Perhaps it is because solid engineering does help to limit the damage caused by broken software that we continue to produce. That said, software is either correct, or not correct. Just like in mathematics you either have a proof or you do not, in software there is no such thing as “only slightly 20 This very same question has been asked by a proponent of formal methods and the Algol research programme [24] 14-15 Learning to live with errors broken”.21 And so I agree with all of those who think that our industry has a serious problem to solve. Beta: I disagree. The binary distinction between correct and incorrect software may be nice theory, but it does not reflect the reality. In practice, software might not be perfect, but can still be acceptable [44]. I believe this is what Epsilon is arguing for with Erlang’s supervision model too, but the same ideas can matter when saving energy [39] or processing big data [37]. Epsilon: Absolutely! And even if we can make all the software components provably correct, we will still have the same problem – take large data centres or distributed systems in telecommunications as examples. At that scale, you need to account for unexpected hardware failures. There will always be errors and letting the program crash and then recover automatically through supervision is an effective way of addressing that. However, I do like some of Omega’s ideas about live coding and I think they can be used to make our monitoring and recovery tools better. Teacher: It seems that there must be some useful lessons from other engineering disciplines, say, civil engineering... Beta: The key idea in engineering is safety factor, which measures how much stronger a system is than it usually needs to be. A civil engineer will calculate the worst case load for a beam, but then make it ten times stronger. Such over-engineering is extremely effective and is even required by law for bridge building. The idea of safety factors is something I would like to see in software engineering too. Perhaps not required by law, but certainly required by the code of ethics of any reputable software engineering organization [2]. Epsilon: I never thought about it in such a formal sense, so I have to admit, I do not even know how to calculate such safety factor for supervisor-based distributed applications... Tau: Now you got me interested. The safety factor for a bridge can be calculated based on the expected load, but this assumes certain linearity. Increasing the strength of material twice provides a safety factor of 2. Software systems involve feedback loops or non-linearity where safety factor of 2 requires tenfold over-engineering. What we need is a theory of stability, or perhaps a type system that can guarantee that certain amount of supervision does, indeed, provide the required safety factor! Teacher: Judging by the way you are talking about the idea, Tau, it almost seems that Epsilon convinced you to accept errors! Or am I mistaken? Tau: But we are not talking about errors here at all! All the so called “invalid states” that Epsilon proposes to handle by supervision and recovery are now perfectly valid and expected! It is just a different way of expressing your program, but as all the ones we talked about earlier, it does eliminate all errors from the software system. 21 Tau is paraphrasing Erik Meijer’s article [36] 14-16 Tomas Petricek 4 What can software development learn through errors Programming is not just one of mathematics, science, engineering or art. We can see it through all these four perspectives and each of them provides different inspiration. We have seen that each of the different paradigms for thinking about errors is more inclined to take inspiration from a different kind of human activity. It might seem that these four approaches define incommensurable paradigms, but focusing our discussion around errors gives us a common central point that everyone can understand, even though in a different and somewhat incompatible way.22 In the last section, we will explore how thinking about errors gives us a new perspective on the world of software engineering. First, we consider how different programming styles align with different ways of thinking about errors. Second, we try to characterize computing problems based on what approach to errors is more appropriate. Lesson 11: The world according to errors Teacher: Now that we discussed errors from many different perspectives in the last 10 lessons, perhaps the best way to start the last lesson is by naively repeating our initial question. What are errors and what can we do to build better software? Beta: The simple answer is that correct software corresponds to its specification, but we have seen that there are many issues with this answer. A complete specification is hard to obtain, evolves during the life-cycle and for some systems, it may be very complex or even non-existent. Tau: I think our earlier classification of different kinds of errors is useful here. I believe that formal methods can help us eliminate all failures and slips. Dealing with mistakes will be harder. They happen when we have gaps in our specification and, even in mathematics, you have to rely on intuition to guarantee that you are proving the right theorem. Epsilon: I agree that dealing with failures is easier. Erlang programmers are used to living with failures and you could even say that we deliberately turn some mistakes into failures! As I mentioned, the mantra is “if you do not know what to do, let it crash!” This tells you to turn gaps in the specification, or mistakes, into failures, or crashes, that the supervisor process can deal with. Beta: It is curious to see that Erlang encourages turning mistakes into failures. I always thought that in a poorly designed system, mistakes caused by unclear specification will be exhibited as technical failures. 22 In sociology, the term boundary object [45] refers to objects that are understood by multiple communities and allow transfer of knowledge between them. 14-17 Learning to live with errors This also suggests we may need to be careful about over-engineering. It works well for failures caused by genuine errors in encoding correct specification, but failures that are indication of design mistakes can rarely be fixed by, say, restarting. Alpha: It is interesting that you both are willing to accept failures. As I mentioned before, if we see tests in test-driven development as a specification, then there are no failures in TDD. The whole point of the methodology is to help us discover the specification and avoid mistakes. Epsilon: I have seen way too many heated arguments between people arguing for types and people arguing for tests and now you are tell me that types and tests are about different kinds of errors? As Tau says, types help you eliminate failures and Alpha now says that tests are mainly about discovering specification and avoiding mistakes! Perhaps this explains why many people use tests and types happily together. Omega: I am not surprised. People are similarly confused about live coding and types. Live coded music or interactive data science can be perfectly well done in programming languages with types. Types help you avoid failures, but do not prevent you from making interesting mistakes that cause defamiliarization [20] which is a valuable source of creativity! Lesson 12: Learning to live with errors Teacher: There is yet another way to look at the problem of errors. Would it be reasonable to accept some degree of errors in business applications and try to build fully specified and provably correct software only for mission critical systems? Beta: This fits nicely with our earlier discussion about acceptability. A business application is acceptable even when you occasionally need to click some button twice, but acceptable medical software needs to work reliably. Epsilon: We talked about the difficulties with finding properties to prove though. In fact, the traditional division between “mission critical” systems that must be formally verified and “business applications” where some errors are acceptable is misleading! Instead, we should think about property-based systems whose behaviour is easier to describe as a property or a theorem and behaviour-based systems whose behaviour is better described as concrete code. For the first, we need to get the specification right and then we can use property-based testing or even dependently-typed languages that infers the implementation. For the latter, we need to build high-level languages that make the behavior they encode as easy to understand as possible. Tau: I accept that formally specifying complex systems might be hard, but in case of mission critical systems it would be unethical to give up. We should try to prove at least some aspects correct, if only to increase our own understanding and confidence. Alpha: I can see how you can understand the system better if you try to create a minimal mathematical model, but didn’t we agree that small models that ignore many details, like the representation of years, are never going to guarantee correctness? 14-18 Tomas Petricek Teacher: Could we perhaps draw the dividing line between what we formalize and what we omit in a different way? Tau: Good question. We could instead try to structure the system into multiple layers! A smaller low layer would then be formally verified. The higher layer could be built on top of the lower layer and so the properties guaranteed by the low layer would hold, even if the complexity of the higher layer made it hard to make any formal statements about that part. Omega: In general, I agree that a lower layer needs to be more correct than higher layer. But even with a proof, I think we cannot get it absolutely right 23 and we need other mechanisms to address potential errors. Sometimes, a supervision model like that advocated by Epsilon might be good enough, but ultimately, you will always need manual intervention in some cases. Tau: Are you suggesting that programmers need to be readily available and watch their program all the time? Surely, nobody can actually work in this way! Omega: Quite the opposite. The DevOps movement [26] is, in many ways, doing exactly that! It encourages close collaboration between development and operations teams to enable automation and frequent releases. You can see that as live coding the whole deployment environment, albeit with very poor tools! Rather than having programming environments that have been designed to support manual intervention like Smalltalk, DevOps teams rely on ad-hoc monitoring tools and have limited ways for direct interactions. We need to finally accept that software is a living system and build tools accordingly. I suppose this goes back to not treating programs as just linguistic entities... Tau: There is one thing I still do not understand about the idea of live intervention though. How can you react quickly enough? In the Knight Capital glitch, it took 45 minutes and perhaps you could live code a fix in minutes, but is that ever going to be fast enough? Using your favourite analogy with music – a manual intervention, like a guitarist lifting his finger from a discordant note [8] will have reaction time a fraction of a second. Significantly shorter than any live coder can ever hope... Omega: Yes, that is true, but live coding does not mean just typing code so that you fix an error. You can also live code your environment, to make quick reactions easier. A quick intervention then gives you enough time to think and decide on the best course of action. In case of live coded music, we do this using flexible interfaces like emacs and monome,24 but there is no reason why the same ideas would not work in other environments. Epsilon: Quite intriguing! This idea of fast and slow ways of reacting reminds me of Kahneman’s two modes of thought [27]. The fast system is automatic, instinctive and 23 A recent work [28] discovered errors in nine out of nine academic papers presenting a formal model, two of which were mechanized. 24 The idea is inspired by the performance of the Meta-eX group [1] 14-19 Learning to live with errors emotional while the slow system is more effortful, deliberative and logical. Through deliberate training and practice, you can train your fast system to react differently. So perhaps our new model is even getting close to how the human thought works! 5 Summary: Escaping the crisis narrative In this paper, we discussed a wide range of ideas about programming through the perspective of program errors or miscomputations. This point of view provides a new way of defining programming paradigms and thinking about software more generally. Because of the ubiquitous crisis narrative that is persistent in our industry, this point of view might be more revealing than when considering traditional programming paradigms such as functional or object-oriented programming. This work was supported by The Alan Turing Institute under the EPSRC grant EP/N510129/1. I would like to thank to fellow members of the Revolution & Beers Cambridge group, namely Dominic Orchard, Sam Aaron, Antranig Basman and Stephen Kell. The characters in this essay are not entirely fictitious and I would like to thank (and apologize) to colleagues who inspired them. Last but not least, I’m grateful to anonymous reviewers for thought provoking feedback that inspired many improvements in the essay. Any remaining errors are mine and I’m willing to live with them. Acknowledgements References [1] Sam Aaron and Jonathan Graham. Meta-eX: Live coding duo. Available online at http://meta-ex.com. 2015. [2] Ronald E Anderson, Deborah G Johnson, Donald Gotterbarn, and Judith Perrolle. “Using the new ACM code of ethics in decision making”. In: Communications of the ACM 36.2 (1993), pages 98–107. [3] Joe Armstrong. “Making reliable distributed systems in the presence of sodware errors”. PhD thesis. The Royal Institute of Technology Stockholm, 2003. [4] Joseph Auslander. “On the roles of proof in mathematics”. In: Proofs and other dilemmas: Mathematics and philosophy (2008), pages 61–77. [5] Charles Babbage. “On the mathematical powers of the calculating engine”. In: The origins of digital computers. Springer, 1982, pages 19–54. [6] Tom Balmforth. Google Translate Makes Russia ’Mordor,’ Lavrov ’Sad Little Horse’. Radio Free Europe/Radio Liberty, http://www.rferl.org/a/27468516.html. 2016. [7] Kent Beck. Test-driven development: by example. Addison-Wesley Professional, 2003. 14-20 Tomas Petricek [8] Alan Blackwell and Nick Collins. “The programming language as a musical instrument”. In: Proceedings of PPIG05 (Psychology of Programming Interest Group) 3 (2005), pages 284–289. [9] Edwin Brady. “Idris, a general-purpose dependently typed programming language: Design and implementation”. In: Journal of Functional Programming 23.05 (2013), pages 552–593. [10] Alan F Chalmers. What is this thing called science? Hackett Publishing, 2013. [11] Jeremie Chassaing. If you are not live coding, you’re dead coding. Talk at the NCrafts Conference, Online at: https://vimeo.com/131658147. 2015. [12] Adam Chlipala. Certified Programming with Dependent Types: A Pragmatic Introduction to the Coq Proof Assistant. MIT Press, 2013. [13] Koen Claessen and John Hughes. “QuickCheck: a lightweight tool for random testing of Haskell programs”. In: Acm sigplan notices 46.4 (2011), pages 53–64. [14] Nick Davies. Flat Earth News. Chatto & Windus, 2008. [15] Joe Dewhurst. “Mechanistic miscomputation: a reply to fresco and primiero”. In: Philosophy & Technology 27.3 (2014), pages 495–498. [16] Edsger Wybe Dijkstra. Notes on structured programming. EWD249, Section 3 (On The Reliability of Mechanisms). 1970. [17] Nathan L Ensmenger. The computer boys take over: Computers, programmers, and the politics of technical expertise. Mit Press, 2012. [18] Luciano Floridi, Nir Fresco, and Giuseppe Primiero. “On malfunctioning software”. In: Synthese 192.4 (2015), pages 1199–1220. [19] Nir Fresco and Giuseppe Primiero. “Miscomputation”. In: Philosophy and Technology. 2013, pages 253–272. [20] Richard P Gabriel et al. “Defamiliarization: Flarf, conceptual writing, and using flawed software tools as creative partners”. In: Knowledge Management & E-Learning: An International Journal (KM&EL) 4.2 (2012), pages 134–145. [21] Richard P Gabriel and Kevin J Sullivan. “Better science through art”. In: ACM Sigplan Notices. Volume 45. 10. ACM. 2010, pages 885–900. [22] Bonnie Gold and Roger A Simons. Proof and other dilemmas: mathematics and philosophy. MAA, 2008. [23] Ian Hacking. Representing and intervening: Introductory topics in the philosophy of natural science. Volume 5. 1. Cambridge Univ Press, 1983. [24] Charles Anthony Richard Hoare. “How did software get so reliable without proof?” In: International Symposium of Formal Methods Europe. Springer. 1996, pages 1–17. [25] Anders Hoff. Høstutstillingen 2017 submission. Facebook album, Online at: h ttps://www.facebook.com/inconvergent/media_set?set=a.985576514908994. 1073741833.100003699654323. 2016. 14-21 Learning to live with errors [26] Ramtin Jabbari, Nauman bin Ali, Kai Petersen, and Binish Tanveer. “What is DevOps? A Systematic Mapping Study on Definitions and Practices”. In: Proceedings of the Scientific Workshop Proceedings of XP2016. ACM. 2016, page 12. [27] Daniel Kahneman. Thinking, fast and slow. Macmillan, 2011. [28] Casey Klein, John Clements, Christos Dimoulas, Carl Eastlund, Matthias Felleisen, Matthew Flatt, Jay A McCarthy, Jon Rafkind, Sam Tobin-Hochstadt, and Robert Bruce Findler. “Run your research: on the effectiveness of lightweight mechanization”. In: ACM SIGPLAN Notices 47.1 (2012), pages 285–296. [29] Thomas S Kuhn. The structure of scientific revolutions. University of Chicago press, 2012. [30] Imre Lakatos. “Falsification and the methodology of scientific research programmes”. In: Can Theories be Refuted? Springer, 1976, pages 205–259. [31] Imre Lakatos. Proofs and refutations: The logic of mathematical discovery. Cambridge university press, 2015. [32] Xavier Leroy. “The CompCert C verified compiler”. In: Documentation and user’s manual. INRIA Paris-Rocquencourt (2012). [33] Pete McBreen. Software craftsmanship: The new imperative. Addison-Wesley Professional, 2002. [34] Conor McBride and James McKinna. “The View from the Left”. In: J. Funct. Program. 14.1 (Jan. 2004), pages 69–111. issn: 0956-7968. doi: 10 . 1017 / S 0956796803004829. [35] John McCarthy. “Towards a mathematical science of computation”. In: Program Verification. Springer, 1993, pages 35–56. [36] Erik Meijer. “The curse of the excluded middle”. In: Communications of the ACM 57.6 (2014), pages 50–55. [37] Ravi Nair. “Big Data Needs Approximate Computing: Technical Perspective”. In: Commun. ACM 58.1 (Dec. 2014), pages 104–104. issn: 0001-0782. doi: 10.1145/2688072. [38] Linda Northrop, Peter Feiler, Richard P Gabriel, John Goodenough, Rick Linger, Tom Longstaff, Rick Kazman, Mark Klein, Douglas Schmidt, Kevin Sullivan, et al. Ultra-Large-Scale Systems The Software Challenge of the Future. Software Engineering Institute Carnegie Mellon, 2006. [39] Krishna V. Palem. “Energy Aware Algorithm Design via Probabilistic Computing: From Algorithms and Models to Moore’s Law and Novel (Semiconductor) Devices”. In: Proceedings of the International Conference on Compilers, Architecture and Synthesis for Embedded Systems. CASES ’03. 2003, pages 113–116. isbn: 1-58113-676-5. doi: 10.1145/951710.951712. [40] Karl Popper. The logic of scientific discovery. Routledge, 2005. [41] Mark Priestley. A science of operations: machines, logic and the invention of programming. Springer Science & Business Media, 2011. 14-22 Tomas Petricek [42] Giuseppe Primiero. “A Taxonomy of Errors for Information Systems”. In: Minds Mach. 24.3 (Aug. 2014), pages 249–273. issn: 0924-6495. doi: 10.1007/s11023013-9307-5. [43] Bill Pyritz. “Craftsmanship versus engineering: Computer programming—An art or a science?” In: Bell Labs technical journal 8.3 (2003), pages 101–104. [44] Martin Rinard. “Acceptability-oriented Computing”. In: SIGPLAN Not. 38.12 (Dec. 2003), pages 57–75. issn: 0362-1340. doi: 10.1145/966051.966060. [45] Susan Leigh Star and James R Griesemer. “Institutional ecology,translations’ and boundary objects: Amateurs and professionals in Berkeley’s Museum of Vertebrate Zoology, 1907-39”. In: Social studies of science 19.3 (1989). [46] Securities United States of America and Exchange commission. Administrative proceedings in the matter of Knight Capital Americas LLC. File No. 3-15570. 2013. 14-23 Learning to live with errors About the author Tomas Petricek Tomas is a Visiting Researcher at the Alan Turing institute, working on tools for open data-driven storytelling (http://thegamma.net). His many other interests include programming language theory (his PhD thesis is on coeffects, a theory of context-aware programming languages), open-source and functional programming (he is an active contributor to the F# ecosystem), but also understanding programming through the perspective of philosophy of science. Contact him at [email protected]. 14-24
6cs.PL
INFERRING A THIRD SPATIAL DIMENSION FROM 2D HISTOLOGICAL IMAGES Maxime W. Lafarge Josien P.W. Pluim Koen A.J. Eppenhof Pim Moeskops Mitko Veta arXiv:1801.03431v1 [cs.CV] 10 Jan 2018 Medical Image Analysis Group, Department of Biomedical Engineering, Eindhoven University of Technology, The Netherlands ABSTRACT Histological images are obtained by transmitting light through a tissue specimen that has been stained in order to produce contrast. This process results in 2D images of the specimen that has a three-dimensional structure. In this paper, we propose a method to infer how the stains are distributed in the direction perpendicular to the surface of the slide for a given 2D image in order to obtain a 3D representation of the tissue. This inference is achieved by decomposition of the staining concentration maps under constraints that ensure realistic decomposition and reconstruction of the original 2D images. Our study shows that it is possible to generate realistic 3D images making this method a potential tool for data augmentation when training deep learning models. Index Terms— Histopathology Image Analysis, 3D Inference, Image Synthesis, Adversarial Training 1. INTRODUCTION In clinical context, pathological diagnosis and prognosis commonly results from the analysis of bright-field microscopy images of histological slides. These 2D images are obtained by transmitting light through the histological specimens, stained beforehand, in order to attenuate light and produce contrast. To quantify biomarkers of interest in 2D images, pathologists rely on their experience and knowledge of the 3D context of the objects they observe, when 3D microscopy techniques are not considered. Taking inspiration from the image formation process of bright-field microscopy, we propose a method to infer a realistic decomposition of hematoxylin and eosin (H&E) stained histological slides along the axis of their thickness (z-axis), resulting in 3D images. The decomposition of a given histological image is achieved by generating a volume of its underlying stain concentrations, such that new images obtained by simulating transmitted light along other directions are realistic according to a trained discriminative deep learning model. This study is motivated by the recent developments in deep generative models [1], in particular for generating biological microscopy images [2]. In [3] the authors showed that it is possible to train a generative adversarial network to infer 3D volumes from 2D training images only, without having to rely on 3D training data. Likewise, our method trains a discriminator from 2D training images only, but can generate 3D volumes that correspond to the decomposition of 2D images, and therefore does not require a generator drawing samples from a latent space. The proposed algorithm can be seen as generating realistic 3D scenarios for the 2D observed scenes. As an example of a possible application, the generated 3D volumes can be used for data augmentation as they allow to create new “views” of the same data. Generalization of deep learning models is a known problem in automated histopathology image analysis, and new augmentation methods can help improving generalization [4]. The 3D information inferred by our method can also be used for analysis by synthesis strategies [5], to improve histopathology image analysis models, as it is a way to include the prior that processed objects have a 3D structure. 2. METHOD Histological images can be modeled as a set of stain concentrations at every pixel location [6] as illustrated in Fig. 1. Thus, our method aims at solving the inverse problem of estimating the volume of stain concentrations that produced the original histological image, for a chosen model of light absorption. We hypothesize that decomposition in depth is possible since the thickness of the histological specimens is of the order of the image resolution. Such a volume is generated under two constraints: (C1) the reconstruction of the original image must be possible from the estimated volume, and (C2) new images produced from the volume must be realistic. 2.1. Model of Stain Concentration Volume The RGB pixel intensities can be modeled according to the Beer-Lambert law of light absorption [6], such that the image intensity at each pixel location (x, y) can be decomposed as Ic (x, y) = I0 exp (−Ac,∗ C(x, y)) with c = 1, 2, 3 the color-channel index, A ∈ [0, +∞]3×2 the matrix of absorption coefficients specific to the current image, and C(x, y) ∈ [0, +∞]2 the H&E stain concentrations. We used the method of [7] to achieve unsupervised staining unmixing of the images. Based on the same model, the stain concentrations can be discretized along the z-axis in N parts, such that C(x, y) = PN −1 z=0 C(x, y, z). (C1) I0 I0 (C2) (C2) c I(x,y) I0 y0+N-1 y0 z x0 x0+N-1 0 N x y N-1 I0 Fig. 1. Decomposition of the estimated stain concentration values of a digital slide along the z-axis at (x, y). The constraint (C1) can be enforced by reducing the problem to finding the vectors V(x, y, z) ∈ [0, 1]2 , with PN −1 C(x, y, z) = C(x, y) V(x, y, z) and z=0 V(x, y, z) = [1, 1]> describing how the concentrations C(x, y) are distributed along the z-axis (the operator is the element-wise multiplication). 2.2. Simulation of Transmitted Light For a given volume of concentrations, new images can be generated by simulating transmitted light from different directions, using the same model of light absorption. In parproj proj are genand Iy=y ticular, new projection images Ix=x 0 ,c 0 ,c erated by simulating light transmission along the x-axis and y-axis through the slices x ∈ [x0 , x0 + N − 1] and y ∈ [y0 , y0 + N − 1], as shown in Fig. 2. The pixel intensities of these images are expressed in equation (1) as the sum of stain concentrations in the direction of projection. ! x0 +N X−1 proj Ix=x (y, z) = I0 exp −Ac,∗ C(x, y, z) 0 ,c x=x0 proj Iy=y (x, z) = I0 exp −Ac,∗ 0 ,c y0 +N X−1 ! (1) Fig. 2. Illustration of an inferred concentration volume block of size N × N × N pixels. (C1) is respected by enforcing the z-projection to reconstruct the original image patch. (C2) requires the x/y-projections, obtained by simulated transmitted light (red arrows), to be realistic. lying unrealistic concentration volume and “real” images that are assumed to be the result of realistic volume of concentration distributions. For a given image patch, 3D volume inference starts from a 4D tensor V initialized with uniform concentration distributions. Then, the trained discriminative model (discriminator) can be used to update V by gradient descent, so that the generated projections of the updated volume appear slightly more realistic. The gradient of the loss of the discriminator with respect of the input is computed via back-propagation. This update process (Fig. 3) is iterated until convergence: when the discriminator classifies the generated projections as realistic with small error. This image generation approach via optimization of the loss function of a neural network is similar to the methods developed in [8, 9], and plays a role comparable to the generator of standard generative adversarial networks [1] in the way how generated images are used as input to a discriminator. C(x, y, z) y=y0 N is carefully chosen such that the pixel resolution in the xz-slices and yz-slices is the same as in the original xy-plane. 2.3. Realism Constraint A convolutional neural network can be trained to discriminate “fake” generated projection images that result from an under- 2.4. Discriminator Training The discriminator is trained using two sets: a set of random real image patches Sreal , and a set of adversarial examples Sadv that are generated during training, using the projections computed with (1), from previous states of the trained model. The training procedure alternates between two steps. First, the current state of the model is used to infer volumes Original Image Stain Concentration Maps Concentration Volume Realism Score Discriminator Stain Concentration Distributions Simulated Projections Iterative Gradient Descent Update Fig. 3. Iterative process of generating a volume of concentrations constrained by an original image. The stain concentration volume is updated by gradient descent in order to produce projection images that “fool” the fixed trained discriminator. from real images via gradient update using the process presented in Sect. 2.2, and x/y-axis projections produced from this volume are added to Sadv . Secondly, a batch of image patches balanced between samples of Sreal and Sadv is used to train the discriminator. Images in Sadv are sampled according to their misclassification probability such that the model learns from the “fake” generated images that are the most realistic and that are more challenging to classify. 3. EXPERIMENTS AND RESULTS 3.1. Dataset We used the high power field images of H&E stained slides of the public AMIDA13 dataset [10] for the experiments. 232 images of size 2000 × 2000 pixels from 8 different breast cancer cases were used for training and the remaining images were used to generate test examples. 3.2. Discriminator Architecture and Training Procedure We implemented the discriminator that can classify input patches as “fake” or realistic as a 6-layer convolutional neural network. The network takes 24 × 24 image patches transformed to H&E concentration maps as input. Kernels of size 3 × 3, batch normalization, average-pooling and leaky ReLU non-linearities were used throughout. The network was trained by minimizing the cross-entropy loss using the Adam optimizer. 3.3. Generative Process and Extension to Large Images We set the z-axis discretization to 24 pixels as we considered 6 micrometers as the maximum thickness of a tissue slice, in which case the z-axis pixel resolution of the inferred volumes can be the same as in the xy-plane (0.25 micrometers). The discriminator, as such, can only infer volumes from images of size 24 × 24. To overcome this limitation, volumes of larger images can be inferred by optimizing overlapping 24 × 24 × 24 sub-volumes in parallel. This solution was used to produce stain concentration volumes from 64 × 64 images. The generated projections presented in Fig. 4 indicate that the optimization process is able to distribute the stain concentrations of unseen images across the z-axis, and is able to create new tissue structures that are realistic for the trained discriminator. 4. DISCUSSION AND CONCLUSIONS We proposed a method for inferring the 3D structure of 2D histological images. The method showed good qualitative performance when applied to an image dataset of mitoses and non-mitosis objects extracted from breast cancer histology slides. Although the volumes generated by our method cannot be considered as representing the actual tissue structure, the generated projections can still be considered as a likely scenario and thus used as a data augmentation tool. In addition to being driven by the image formation process of bright-field microscopy, our method has the property that the generated images are directly produced from the available data, the same way transformation-based augmentation methods work. In contrast, generators drawing inputs from a latent space, such as generative adversarial networks, do not have this property. Directions of future work include, further research to assess the realism quality of the generated images, and application of the generated 3D representation for data augmentation. Original x y 0° Generated 45° 90° 135° Original x y 0° Generated 45° 90° 135° Fig. 4. Examples of projection images from generated volumes of stain concentration. The first row of each block shows the real image patches the volumes were inferred from. The other rows show the projections obtained by simulating light transmission in different oriented slices as indicated in the left column. The top block shows results on mitotic figures that were annotated by expert pathologists, and the bottom block includes non-mitotic figures only. 5. REFERENCES [1] I Goodfellow, J Pouget-Abadie, M Mirza, B Xu, D Warde-Farley, S Ozair, A Courville, and Y Bengio, “Generative adversarial nets,” in NIPS, 2014, pp. 2672– 2680. [2] A Osokin, A Chessel, RE Carazo Salas, and F Vaggi, “GANs for biological image synthesis,” in ICCV, 2017. [3] M Gadelha, S Maji, and R Wang, “3D shape induction from 2D views of multiple objects,” arXiv:1612.05872, 2016. [4] MW Lafarge, JPW Pluim, KAJ Eppenhof, P Moeskops, and M Veta, “Domain-adversarial neural networks to address the appearance variability of histopathology images,” in MICCAI-DLMIA, 2017, pp. 83–91. [5] M Hejrati and D Ramanan, “Analysis by synthesis: 3D object recognition by object reconstruction,” in IEEE CVPR, 2014, pp. 2449–2456. [6] AC Ruifrok, DA Johnston, et al., “Quantification of histochemical staining by color deconvolution,” Anal. Quant. Cytol., vol. 23, no. 4, pp. 291–299, 2001. [7] M Macenko, M Niethammer, JS Marron, D Borland, JT Woosley, X Guan, C Schmitt, and NE Thomas, “A method for normalizing histology slides for quantitative analysis,” in IEEE ISBI, 2009, pp. 1107–1110. [8] L Gatys, AS Ecker, and M Bethge, “Texture synthesis using convolutional neural networks,” in NIPS, 2015, pp. 262–270. [9] L Gatys, AS Ecker, and M Bethge, “Image style transfer using convolutional neural networks,” in IEEE CVPR, 2016, pp. 2414–2423. [10] M Veta, PJ van Diest, SM Willems, H Wang, A Madabhushi, A Cruz-Roa, F Gonzalez, ABL Larsen, JS Vestergaard, AB Dahl, et al., “Assessment of algorithms for mitosis detection in breast cancer histopathology images,” Med. Image Anal., vol. 20, no. 1, pp. 237–248, 2015.
1cs.CV
arXiv:1701.02108v2 [math.GR] 23 Jan 2017 RIGHT AMENABILITY AND GROWTH OF FINITELY RIGHT GENERATED LEFT GROUP SETS SIMON WACKER Abstract. We introduce right generating sets, Cayley graphs, growth functions, types and rates, and isoperimetric constants for left homogeneous spaces equipped with coordinate systems; characterise right amenable finitely right generated left homogeneous spaces with finite stabilisers as those whose isoperimetric constant is 0; and prove that finitely right generated left homogeneous spaces with finite stabilisers of sub-exponential growth are right amenable, in particular, quotient sets of groups of sub-exponential growth by finite subgroups are right amenable. The notion of amenability for groups was introduced by John von Neumann in 1929. It generalises the notion of finiteness. A group G is left or right amenable if there is a finitely additive probability measure on P(G) that is invariant under left and right multiplication respectively. Groups are left amenable if and only if they are right amenable. A group is amenable if it is left or right amenable. The definitions of left and right amenability generalise to left and right group sets respectively. A left group set (M, G, ⊲) is left amenable if there is a finitely additive probability measure on P(M) that is invariant under ⊲. There is in general no natural action on the right that is to a left group action what right multiplication is to left group multiplication. Therefore, for a left group set there is no natural notion of right amenability. A transitive left group action ⊲ of G on M induces, for each element m0 ∈ M and each family {gm0 ,m }m∈M of elements in G such that, for each point m ∈ M, we have gm0 ,m ⊲ m0 = m, a right quotient set semi-action P of G/G0 on M with defect G0 given by m P gG0 = −1 gm0 ,m ggm ⊲m, where G0 is the stabiliser of m0 under ⊲. Each of these 0 ,m Key words and phrases. group actions, generating sets, Cayley graphs, growth rates, isoperimetric constants, amenability. 1 2 SIMON WACKER right semi-actions is to the left group action what right multiplication is to left group multiplication. They occur in the definition of global transition functions of cellular automata over left homogeneous spaces as defined in [6]. A cell space is a left group set together with choices of m0 and {gm0 ,m }m∈M . A cell space is right amenable if there is a finitely additive probability measure on P(M) that is semi-invariant under P. For example cell spaces with finite sets of cells, abelian groups, and finitely right generated cell spaces with finite stabilisers of sub-exponential growth are right amenable, in particular, quotients of finitely generated groups of sub-exponential growth by finite subgroups acted on by left multiplication. A net of non-empty and finite subsets of M is a right Følner net if, broadly speaking, these subsets are asymptotically invariant under P. A finite subset E of G/G0 and two partitions {Ae }e∈E and {Be }e∈E of M constitute a right paradoxical decomposition if the map _ P e is injective on Ae and Be , and the family {(Ae P e) ∪· (Be P e)}e∈E is a partition of M. The Tarski-Følner theorem states that right amenability, the existence of right Følner nets, and the non-existence of right paradoxical decompositions are equivalent. We prove it in [7] for cell spaces with finite stabilisers. A cell space R is finitely right generated if there is a finite subset S of G/G0 such that, for each point m ∈ M, there is a family {si }i∈{1,2,...,k} of elements in S ∪ S −1 such that m = (((m0 P s1 ) P s2 ) P · · · ) P sk . The finite right generating set S induces the S-Cayley graph structure on M: For each point m ∈ M and each generator s ∈ S, there is an edge from m to m P s. The length of the shortest path between two points of M yields the S-metric. The ball of radius ρ ∈ N0 centred at m ∈ M, denoted by BS (m, ρ), is the set of all points whose distance to m is less than or equal to ρ. The S-growth function is the map γS : N0 → N0 , k 7→ |BS (m, k)|; the growth type of R, which does not depend on S, is the equivalence class [γS ]∼ , where two growth functions are equivalent if they dominate each other; and the S-growth rate is the limit point p of the sequence ( k γS (k))k∈K . RIGHT AMENABILITY AND GROWTH 3 A finitely right generated cell space R is said to have sub-exponential growth if its growth type is not [exp]∼ , which is the case if and only if its growth rates are 1. The S-isoperimetric constant is a real number between 0 and 1 that measures, broadly speaking, the invariance under P↾M ×S that a finite subset of M can have, where 0 means maximally and 1 minimally invariant. In the case that G0 is finite, this constant is 0 if and only if R is right amenable, and if R has sub-exponential growth, then it is right amenable, and if G has sub-exponential growth, then so has R. Cayley graphs were introduced by Arthur Cayley in his paper ‘Desiderata and suggestions: No. 2. The Theory of groups: graphical representation’[1]. The notion of growth was introduced by Vadim Arsenyevich Efremovich and Albert S. Švarc in their papers ‘The geometry of proximity’[3] and ‘A volume invariant of coverings’[5]. Mikhail Leonidovich Gromov was the first to study groups through their word metrics, see for example his paper ‘Infinite Groups as Geometric Objects’[4]. The present paper is greatly inspired by the monograph ‘Cellular Automata and Groups’[2] by Tullio Ceccherini-Silberstein and Michel Coornaert. In Section 1 we introduce right generating sets. In Section 2 we recapitulate directed multigraphs. In Section 3 we introduce Cayley graphs induced by right generating sets. In Section 4 we introduce metrics and lengths induced by Cayley graphs. In Section 5 we consider balls and spheres induced by metrics. In Section 6 we consider interiors, closures, and boundaries of any thickness of sets. In Section 7 we recapitulate growth functions and types. In Section 8 we introduce growth functions and types of cell spaces. In Section 9 we introduce growth rates of cell spaces. In Section 10 we prove that right amenability and having isoperimetric constant 0 are equivalent, and we characterise right Følner nets. And in Section 11 we prove that having sub-exponential growth implies right amenability. Preliminary Notions. A left group set is a triple (M, G, ⊲), where M is a set, G is a group, and ⊲ is a map from G × M to M, called left group action of G on M, such that G → Sym(M), g 7→ [g ⊲ _], is a group 4 SIMON WACKER homomorphism. The action ⊲ is transitive if M is non-empty and for each m ∈ M the map _ ⊲ m is surjective; and free if for each m ∈ M the map _ ⊲ m is injective. For each m ∈ M, the set G ⊲ m is the orbit of m, the set Gm = (_ ⊲ m)−1 (m) is the stabiliser of m, and, for each m′ ∈ M, the set Gm,m′ = (_ ⊲ m)−1 (m′ ) is the transporter of m to m′ . A left homogeneous space is a left group set M = (M, G, ⊲) such that ⊲ is transitive. A coordinate system for M is a tuple K = (m0 , {gm0 ,m }m∈M ), where m0 ∈ M and for each m ∈ M we have gm0 ,m ⊲m0 = m. The stabiliser Gm0 is denoted by G0 . The tuple R = (M, K) is a cell −1 space. The map P : M × G/G0 → M, (m, gG0 ) 7→ gm0 ,m ggm ⊲ m (= 0 ,m gm0 ,m g ⊲m0) is a right semi-action of G/G0 on M with defect G0 , which means that ∀ m ∈ M : m P G0 = m, ∀ m ∈ M ∀ g ∈ G ∃ g0 ∈ G0 : ∀ g′ ∈ G/G0 : m P g · g′ = (m P gG0) P g0 · g′ . It is transitive, which means that the set M is non-empty and for each m ∈ M the map m P _ is surjective; and free, which means that for each m ∈ M the map m P _ is injective; and semi-commutes with ⊲, which means that ∀ m ∈ M ∀ g ∈ G ∃ g0 ∈ G0 : ∀ g′ ∈ G/G0 : (g ⊲ m) P g′ = g ⊲ (m P g0 · g′ ). The maps ι : M → G/G0 , m 7→ Gm0 ,m , and m0 P _ are inverse to each other. Under the identification of M with G/G0 by either of these maps, we have P : (m, g) 7→ gm0 ,m ⊲ g. A left homogeneous space M is right amenable if there is a coordinate system K for M and there is a finitely additive probability measure µ on M such that  ∀ g ∈ G/G0 ∀ A ⊆ M : (_ P g)↾A injective =⇒ µ(A P g) = µ(A) , in which case the cell space R = (M, K) is called right amenable. When the stabiliser G0 is finite, that is the case if and only if there is a right Følner net in R indexed by (I, ≤), which is a net {Fi }i∈I in {F ⊆ M | F 6= ∅, F finite} such that ∀ g ∈ G/G0 : lim i∈I |Fi r (_ P g)−1 (Fi )| = 0. |Fi | RIGHT AMENABILITY AND GROWTH 5 1. Right Generating Sets In this section, let R = ((M, G, ⊲), (m0, {gm0 ,m }m∈M )) be a cell space. In Definition 1.1 we define right generating sets of R. And in Lemma 1.4 we show how generating sets of G induce right ones of R. Definition 1.1. Let S be a subset of G/G0 such that G0 · S ⊆ S. (1) The set {g −1G0 | s ∈ S, g ∈ s} is denoted by S −1 . (2) The set S is said to right generate R, called right generating set of R, and each element s ∈ S is called right generator if and only if, for each element m ∈ M, there is a non-negative integer k ∈ N0 and there is a family {si }i∈{1,2,...,k} of elements in S ∪ S −1 such that    (m0 P s1 ) P s2 P · · · P sk = m. (3) The set S is called symmetric if and only if S −1 ⊆ S. Definition 1.2. The cell space R is called finitely right generated if and only if there is a right generating set of R that is finite. Remark 1.3. If S is a right generating set of R, then S ∪ S −1 is a symmetric one; and, if S is also finite and G0 is finite, then S ∪ S −1 is finite. Lemma 1.4. Let T be a generating set of G. The set S = {g0 · tG0 | g0 ∈ G0 , t ∈ T } is a right generating set of R. And, if T is symmetric, then so is S. And, if T and G0 are finite, then so is S. Proof. Let m ∈ M. Then, because P is transitive, there is a g ∈ G such that m0 P gG0 = m. Moreover, there is a k ∈ N0 and there is a {ti }i∈{1,2,...,k} ⊆ T ∪ T −1 such that t1 t2 · · · tk = g. Furthermore, there is a {gi,0}i∈{2,3,...,k} ⊆ G0 such that    (m0 P t1 G0 ) P g2,0 t2 G0 P · · · P gk,0 tk G0 = m0 P t1 t2 · · · tk G0 = m. In conclusion, because t1 G0 ∈ S ∪ S −1 and {gi,0 ti G0 }i∈{2,3,...,k} ⊆ S ∪ S −1 , the set S is a right generating set of R. 6 SIMON WACKER Let T be symmetric. Furthermore, let s ∈ S and let g ∈ s. Then, there is a g0 ∈ G0 , there is a t ∈ T , and there is a g0′ ∈ G0 such that g0 · tG0 = s and g0 tg0′ = g. Hence, because (g0′ )−1 ∈ G0 and t−1 ∈ T , g −1 G0 = (g0′ )−1 t−1 g0−1 G0 = (g0′ )−1 · t−1 G0 ∈ S. In conclusion, S −1 ⊆ S. If T and G0 are finite, then so is S.  2. Directed Multigraphs Definition 2.1. Let V and E be two sets, and let σ and τ be two maps from E to V . The quadruple G = (V, E, σ, τ ) is called directed multigraph; each element v ∈ V is called vertex ; each element e ∈ E is called edge from σ(e) to τ (e); for each element e ∈ E, the vertex σ(e) is called source of e and the vertex τ (e) is called target of e. Definition 2.2. Let G = (V, E, σ, τ ) be a directed multigraph and let e be an edge of G. The edge e is called loop if and only if τ (e) = σ(e). Definition 2.3. Let G = (V, E, σ, τ ) be a directed multigraph and let v be a vertex of G. (1) The cardinal number deg+ (v) = |{e ∈ E | σ(e) = v}| is called out-degree of v. (2) The cardinal number deg− (v) = |{e ∈ E | τ (e) = v}| is called in-degree of v. (3) The cardinal number deg(v) = deg+ (v) + deg− (v) is called degree of v. Definition 2.4. Let G be a directed multigraph, and let v and v ′ be two vertices of G. The vertices v and v ′ are called adjacent if and only if there is an edge from v to v ′ or one from v ′ to v. RIGHT AMENABILITY AND GROWTH 7 Definition 2.5. Let G = (V, E, σ, τ ) be a directed multigraph and let p = (ei )i∈{1,2,...,k} be a finite sequence of edges of G. The sequence p is called path from σ(e1 ) to τ (ek ) if and only if, for each index i ∈ {1, 2, . . . , k − 1}, we have τ (ei ) = σ(ei+1 ). Definition 2.6. Let G be a directed multigraph and let p = (ei )i∈{1,2,...,k} be a path in G. The number |p| = k is called length of p. Definition 2.7. Let G = (V, E, σ, τ ) be a directed multigraph. It is called (1) symmetric if and only if, for each edge e ∈ E, there is an edge e′ ∈ E such that σ(e′ ) = τ (e) and τ (e′ ) = σ(e); (2) strongly connected if and only if, for each vertex v ∈ V and each vertex v ′ ∈ V , there is a path p from v to v ′ ; (3) regular if and only if all vertices of G have the same degree and, for each vertex v ∈ V , we have deg− (v) = deg+ (v). Definition 2.8. Let G = (V, E, σ, τ ) be a directed multigraph, let W be a subset of V , let F be the set {e ∈ E | σ(e), τ (e) ∈ W }, let ς be the map σ↾F →W , and let υ be the map τ ↾F →W . The subgraph G[W ] = (W, F, ς, υ) of G is called induced by W . Definition 2.9. Let G = (V, E, σ, τ ) be a symmetric and strongly connected directed multigraph. The map d : V × V → N0 , (v, v ′ ) 7→ min{|p| | p path from v to v ′ }, is a metric on V and called distance on G. Definition 2.10. Let (V, E, σ, τ ) be a directed multigraph, let Λ be a set, and let λ be a map from E to Λ. The quintuple G = (V, E, σ, τ, λ) is called Λ-edge-labelled directed multigraph. 3. Cayley Graphs In this section, let R = ((M, G, ⊲), (m0 , {gm0 ,m }m∈M )) be a cell space and let S be a right generating set of R. 8 SIMON WACKER Definition 3.1. Let E be the set {(m, s, m P s) | m ∈ M, s ∈ S}, and let σ : E → M, λ : E → S, and τ : E → M be the projections to the first, second, and third component respectively. The S-edge-labelled directed multigraph G = (M, E, σ, τ, λ) is called S-Cayley graph of R. Remark 3.2. Let G be the S-Cayley graph of R. (1) If S is symmetric, then G is symmetric and strongly connected. (2) The following statements are equivalent: (a) G0 ∈ S; (b) At least one vertex of G has a loop; (c) All vertices of G have a loop. (3) Because P is free, there are no multiple edges in G. Remark 3.3. Let G be the S-Cayley graph of R, and let m and m′ be two vertices of G. The vertices m and m′ are adjacent if and only if there is an element s ∈ S such that m P s = m′ . Remark 3.4. Let G be the S-Cayley graph of R and let m be a vertex of G. The map S → m P S, s 7→ m P s, is a bijection onto the out-neighbourhood of m. It is injective, because P is free, and it is surjective, by definition. Therefore, if S is symmetric, then the degree of m is 2|S| in cardinal arithmetic and the graph G is regular. 4. Metrics and Lengths In this section, let R = ((M, G, ⊲), (m0 , {gm0 ,m }m∈M )) be a cell space and let S be a symmetric right generating set of R. In Definitions 4.1 and 4.6 we define the S-metric dS and the S-length |_|S on R induced by the S-Cayley graph. And in Lemmas 4.3 and 4.4 we show how the S-metric relates to the left group action ⊲ and the right quotient set semi-action P. Definition 4.1. The distance on the S-Cayley graph of R is called S-metric on R and denoted by dS . RIGHT AMENABILITY AND GROWTH 9 Remark 4.2. The S-metric on R is d S : M × M → N0 , (m, m′ ) 7→ min{k ∈ N0 | ∃{si }i∈{1,2,...,k} ⊆ S : (((m P s1 ) P s2 ) P · · · ) P sk = m′ }. Lemma 4.3. Let m and m′ be two elements of M, and let s be an element of S. Then, dS (m, m′ P s) ≤ dS (m, m′ ) + 1. Proof. Let k = dS (m, m′ ). Then, there is a {si }i∈{1,2,...,k} ⊆ S such that (((m P s1 ) P s2 ) P · · · ) P sk = m′ . Hence, ((((m P s1 ) P s2 ) P · · · ) P sk ) P s = m′ P s. Therefore, dS (m, m′ P s) ≤ dS (m, m′ ) + 1.  Lemma 4.4. Let m and m′ be two elements of M, and let g be an element of G. Then, dS (g ⊲ m, g ⊲ m′ ) = dS (m, m′ ). Proof. Let k = dS (g ⊲ m, g ⊲ m′ ). Then, there is a {si }i∈{1,2,...,k} ⊆ S such that ((((g ⊲ m) P s1 ) P s2 ) P · · · ) P sk = g ⊲ m′ . Moreover, because ⊲ and P semi-commute, for each i ∈ {1, 2, . . . , k}, there is a gi,0 ∈ G0 , such that     (g ⊲ m) P s1 P s2 P · · · P sk     = g ⊲ (m P g1,0 · s1 ) P s2 P · · · P sk = ··· =g⊲  (m P g1,0 · s1 ) P g2,0 · s2   P · · · P gk,0 · sk .  Hence, (((m P g1,0 · s1 ) P g2,0 · s2 ) P · · · ) P gk,0 · sk = m′ . Therefore, dS (m, m′ ) ≤ k = dS (g ⊲ m, g ⊲ m′ ). Taking g ⊲ m for m, g ⊲ m′ for m′ , and g −1 for g yields dS (g ⊲ m, g ⊲ m′ ) ≤ dS (g −1 ⊲ (g ⊲ m), g −1 ⊲ (g ⊲ m′ )) = dS (m, m′ ). In conclusion, dS (g ⊲ m, g ⊲ m′ ) = dS (m, m′ ).  Lemma 4.5. Let m and m′ be two elements of M, let {si }i∈{1,2,...,dS (m,m′ )} be a family of elements in S such that m′ = (((m P s1 ) P s2 ) P · · · ) P sdS (m,m′ ) , let i be an element of {0, 1, 2, . . . , dS (m, m′ )}, and let mi = (((m P s1 ) P s2 ) P · · · ) P si Then, dS (m, mi ) = i. 10 SIMON WACKER Proof. By definition of mi , we have dS (m, mi ) ≤ i and dS (mi , m′ ) ≤ dS (m, m′ ) − i. Therefore, because dS (m, m′ ) ≤ dS (m, mi ) + dS (mi , m′ ), we have dS (m, mi ) ≥ dS (m, m′ )−dS (mi , m′ ) ≥ dS (m, m′ )−(dS (m, m′ )− i) = i. In conclusion, dS (m, mi ) = i.  Definition 4.6. The map |_|S : M → N0 , is called S-length on R. m 7→ dS (m0 , m), Remark 4.7. For each element m ∈ M, we have |m|S = 0 if and only if m = m0 . 5. Balls and Spheres In this section, let R = ((M, G, ⊲), (m0 , {gm0 ,m }m∈M )) be a cell space and let S be a symmetric right generating set of R. In Definition 5.1 we define balls BS and spheres SS in the S-metric on R. And in the lemmata and corollaries of this section we show how balls, spheres, the left group action ⊲, the right quotient set semi-action P, and the S-metric relate to each other. Definition 5.1. Let m be an element of M and let ρ be a non-negative integer. (1) The set BS (m, ρ) = {m′ ∈ M | dS (m, m′ ) ≤ ρ} is called ball of radius ρ centred at m. The ball of radius ρ centred at m0 is denoted by BS (ρ). (2) The set SS (m, ρ) = {m′ ∈ M | dS (m, m′ ) = ρ} is called sphere of radius ρ centred at m. The sphere of radius ρ centred at m0 is denoted by SS (ρ). Remark 5.2. For each element m ∈ M, we have SS (m, 0) = BS (m, 0), and, for each positive integer ρ ∈ N+ , we have SS (m, ρ) = BS (m, ρ) r BS (m, ρ − 1). RIGHT AMENABILITY AND GROWTH 11 Remark 5.3. For each non-negative integer ρ ∈ N0 , BS (ρ) = {m ∈ M | |m|S ≤ ρ} and SS (ρ) = {m ∈ M | |m|S = ρ}. Definition 5.4. Let (Ak )k∈N0 be a sequence of sets. (1) The set lim inf Ak = k→∞ [ \ Aj k∈N0 j∈N0 j≥k is called limit inferior of (Ak )k∈N0 . (2) The set \ [ Aj lim sup Ak = k→∞ k∈N0 j∈N0 j≥k is called limit superior of (Ak )k∈N0 . (3) Let A be a set. The sequence (Ak )k∈N0 is said to converge to A, the set A is called limit set of (Ak )k∈N0 , and A is denoted by limk→∞ Ak if and only if lim inf k→∞ Ak = lim supk→∞ Ak = A. (4) The sequence (Ak )k∈N0 is called convergent if and only if lim inf k→∞ Ak = lim supk→∞ Ak . Lemma 5.5. Let (Ak )k∈N0 be a non-decreasing or non-increasing seT S quence of sets. It converges to k∈N0 Ak or k∈N0 Ak respectively.  Remark 5.6. For each element m ∈ M, we have BS (m, 0) = {m}, and the sequence (BS (m, ρ))ρ∈N0 is non-decreasing with respect to inclusion and converges to M, and hence, for each non-negative integer ρ, [ BS (m, ρ′ ) = M. ρ′ ∈N0 ρ′ ≥ρ Remark 5.7. For each element m ∈ M and each non-negative integer ρ ∈ N0 , in cardinal arithmetic, because the map |BS (m, ρ)| ≤ (1 + |S|)ρ , ({G0 } ∪ S)ρ → BS (m, ρ), 12 SIMON WACKER (s1 , s2 , . . . , sρ ) 7→ (((m P s1 ) P s2 ) P · · · ) P sρ , is surjective and |{G0 } ∪ S|ρ ≤ (1 + |S|)ρ . Lemma 5.8. Let m be an element of M, let ρ be a non-negative integer, and let s be an element of S. Then, BS (m, ρ) P s ⊆ BS (m, ρ + 1). Proof. Let m′ ∈ BS (m, ρ) P s. Then, there is an m′′ ∈ BS (m, ρ) such that m′′ P s = m′ . Hence, according to Lemma 4.3, we have dS (m, m′ ) = dS (m, m′′ P s) ≤ dS (m, m′′ ) + 1 ≤ ρ + 1. Therefore, m′ ∈ BS (m, ρ + 1). In conclusion, BS (m, ρ) P s ⊆ BS (m, ρ + 1).  Lemma 5.9. Let m be an element of M, let ρ be a non-negative integer, and let g be an element of G. Then, g ⊲ BS (m, ρ) = BS (g ⊲ m, ρ). Proof. First, let m′ ∈ g ⊲ BS (m, ρ). Then, g −1 ⊲ m′ ∈ BS (m, ρ) and thus dS (m, g −1 ⊲ m′ ) ≤ ρ. Hence, according to Lemma 4.4, dS (g ⊲ m, m′ ) = dS (g −1 ⊲ (g ⊲ m), g −1 ⊲ m′ ) = dS (m, g −1 ⊲ m′ ) ≤ ρ. Therefore, m′ ∈ BS (g ⊲m, ρ). In conclusion, g ⊲BS (m, ρ) ⊆ BS (g ⊲m, ρ). Secondly, let m′ ∈ BS (g ⊲ m, ρ). Then, dS (g ⊲ m, m′ ) ≤ ρ. Thus, according to Lemma 4.4, dS (m, g −1 ⊲ m′ ) = dS (g ⊲ m, g ⊲ (g −1 ⊲ m′ )) = dS (g ⊲ m, m′ ) ≤ ρ. Hence, g −1 ⊲m′ ∈ BS (m, ρ). Therefore, m′ ∈ g⊲BS (m, ρ). In conclusion, BS (g ⊲ m, ρ) ⊆ g ⊲ BS (m, ρ).  Corollary 5.10. Let m be an element of M, let ρ be a non-negative integer, and let gm be an element of Gm . Then, gm ⊲BS (m, ρ) = BS (m, ρ). In particular, Gm ⊲ BS (m, ρ) = BS (m, ρ). Proof. Because gm ⊲ m = m, this is a direct consequence of Lemma 5.9.  RIGHT AMENABILITY AND GROWTH 13 Corollary 5.11. Let m and m′ be two elements of M, and let ρ be a non-negative integer. Then, |BS (m, ρ)| = |BS (m′ , ρ)|. Proof. Because there is a g ∈ G such that g ⊲ m = m′ , and g ⊲ _ is injective, this is a direct consequence of Lemma 5.9.  Lemma 5.12. Let m and m′ be two elements of M and identify M with G/G0 by [m 7→ Gm0 ,m ]. Then, m P m′ = gm0 ,m ⊲ m′ . Proof. Let g ∈ Gm0 ,m′ . Then, Gm0 ,m′ = gG0 . Hence, m P m′ = m P Gm0 ,m′ = m P gG0 = gm0 ,m g ⊲ m0 = gm0 ,m ⊲ (g ⊲ m0 ) = gm0 ,m ⊲ m′ .  Lemma 5.13. Let m, m′ , and m′′ be three elements of M and identify M with G/G0 by [m 7→ Gm0 ,m ]. Then, there is an element g0 ∈ G0 such that (m P m′ ) P m′′ = m P (m′ P (g0 ⊲ m′′ )). Proof. Because P is a right semi-action, there is an element g0 ∈ G0 such that m P gm0 ,m′ · g0 · Gm0 ,m′′ = (m P gm0 ,m′ G0 ) P Gm0 ,m′′ . And, under the identification of M with G/G0 , we have Gm0 ,m′′ = m′′ , gm0 ,m′ G0 = Gm0 ,m′ = m′ , and gm0 ,m′ · g0 · Gm0 ,m′′ = m′ P (g0 ⊲ m′′ ). Therefore, m P (m′ P (g0 ⊲ m′′ )) = (m P m′ ) P m′′ .  Corollary 5.14. Let m be an element of M, let ρ be a non-negative integer, and identify M with G/G0 by [m 7→ Gm0 ,m ]. Then, mPBS (ρ) = BS (m, ρ). Proof. According to Lemma 5.12 and Lemma 5.9, m P BS (ρ) = gm0 ,m ⊲ BS (ρ) = gm0 ,m ⊲ BS (m0 , ρ) = BS (gm0 ,m ⊲ m0 , ρ) = BS (m, ρ).  14 SIMON WACKER Corollary 5.15. Let m be an element of M, let ρ and ρ′ be two nonnegative integers, and identify M with G/G0 by [m 7→ Gm0 ,m ]. Then, BS (m, ρ) P BS (ρ′ ) = BS (m, ρ + ρ′ ). Proof. First, let m′ ∈ BS (m, ρ) P BS (ρ′ ). Then, there is an m′′ ∈ BS (m, ρ) such that m′ ∈ m′′ P BS (ρ′ ). Moreover, according to Corollary 5.14, we have m′′ P BS (ρ′ ) = BS (m′′ , ρ′ ). Hence, because dS is subadditive, dS (m, m′ ) ≤ dS (m, m′′ ) + dS (m′′ , m′ ) ≤ ρ + ρ′ . Therefore, m′ ∈ BS (m, ρ + ρ′ ). In conclusion, BS (m, ρ) P BS (ρ′ ) ⊆ BS (m, ρ + ρ′ ). Secondly, let m′ ∈ BS (m, ρ + ρ′ ). Case 1: m′ ∈ BS (m, ρ). Then, because m0 ∈ BS (ρ′ ), we have m′ = m′ P m0 ∈ BS (m, ρ) P BS (ρ′ ). Case 2: m′ ∈ / BS (m, ρ). Then, there is a j ∈ {ρ + 1, ρ + 2, . . . , ρ + ′ ρ } and there is a {si }i∈{1,2,...,j} ⊆ S such that (((m′′ P sρ+1 ) P sρ+2 ) P · · · ) P sρ+ρ′ = m′ , where m′′ = (((m P s1 ) P s2 ) P · · · ) P sρ ∈ BS (m, ρ). Hence, m′ ∈ BS (m′′ , ρ′ ) = m′′ P BS (ρ′ ) ⊆ BS (m, ρ) P BS (ρ′ ). In either case, m′ ∈ BS (m, ρ) P BS (ρ′ ). In conclusion, BS (m, ρ + ρ′ ) ⊆ BS (m, ρ) P BS (ρ′ ).  Definition 5.16. Let A and A′ be two subsets of M. The non-negative number or infinity dS (A, A′ ) = min{dS (a, a′ ) | a ∈ A, a′ ∈ A′ } is called distance of A and A′ , where we put min ∅ = ∞. In the case that A = {a}, we write dS (a, A′ ) in place of dS ({a}, A′ ); and in the case that A′ = {a′ }, we write dS (A, a′ ) in place of dS (A, {a′ }). Lemma 5.17. Let m and m′ be two elements of M, and let ρ be a nonnegative integer such that ρ ≤ dS (m, m′ ). Then, dS (SS (m, ρ), m′ ) = dS (m, m′ ) − ρ. Proof. Let ρ′ = dS (m, m′ ). Then, there is a {si }i∈{1,2,...,ρ′ } such that (((m P s1 ) P s2 ) P · · · ) P sρ′ = ′ m . Let m′′ = (((m P s1 ) P s2 ) P · · · ) P sρ . Then, (((m′′ P sρ+1 ) P sρ+2 ) P · · · ) P sρ′ = m′ . And, according to Lemma 4.5, we have m′′ ∈ SS (m, ρ). Thus, dS (SS (m, ρ), m′ ) ≤ dS (m′′ , m′ ) ≤ ρ′ − ρ. RIGHT AMENABILITY AND GROWTH 15 Suppose that dS (SS (m, ρ), m′ ) < ρ′ − ρ. Then, there is an m′′ ∈ SS (m, ρ) such that dS (m′′ , m′ ) < ρ′ −ρ. Hence, dS (m, m′ ) ≤ dS (m, m′′ )+ dS (m′′ , m′ ) < ρ+(ρ′ −ρ) = ρ′ , which contradicts dS (m, m′ ) = ρ′ . Therefore, dS (SS (m, ρ), m′ ) ≥ ρ′ − ρ. In conclusion, dS (SS (m, ρ), m′ ) = ρ′ − ρ = dS (m, m′ ) − ρ.  Corollary 5.18. Let m be an element of M, and let ρ and ρ′ be two non-negative integers such that the spheres SS (m, ρ) and SS (m, ρ′ ) are non-empty. Then, dS (SS (m, ρ), SS (m, ρ′ )) = |ρ − ρ′ |. Proof. Without loss of generality, let ρ ≤ ρ′ . Then, for each m′ ∈ SS (m, ρ′ ), according to Lemma 5.17, we have dS (SS (m, ρ), m′ ) = ρ′ − ρ. In conclusion, dS (SS (m, ρ), SS (m, ρ′ )) = ρ′ − ρ = |ρ − ρ′ |.  Corollary 5.19. Let m and m′ be two elements of M, and let ρ be a non-negative integer. Then, dS (SS (m, ρ), m′ ) ≥ |dS (m, m′ ) − ρ|. Proof. If SS (m, ρ) = ∅, then dS (SS (m, ρ), m′ ) = ∞ ≥ |dS (m, m′ ) − ρ|. Otherwise, let ρ′ = dS (m, m′ ). Then, SS (m, ρ′ ) 6= ∅. Hence, according to Corollary 5.18, we have dS (SS (m, ρ), m′ ) ≥ dS (SS (m, ρ), SS (m, ρ′ )) = |ρ − ρ′ | = |dS (m, m′ ) − ρ|.  Lemma 5.20. Let m and m′ be two elements of M, and let ρ and ρ′ be two non-negative integers such that ρ + ρ′ ≤ dS (m, m′ ). Then, dS (BS (m, ρ), BS (m′ , ρ′ )) = dS (m, m′ ) − (ρ + ρ′ ). Proof. For each mρ ∈ BS (m, ρ) and each m′ρ′ ∈ BS (m′ , ρ′ ), because dS is subadditive, dS (m, m′ ) ≤ dS (m, mρ ) + dS (mρ , m′ρ′ ) + dS (m′ρ′ , m′ ) ≤ ρ + dS (mρ , m′ρ′ ) + ρ′ , and hence dS (mρ , m′ρ′ ) ≥ dS (m, m′ )−(ρ+ρ′ ). Therefore, dS (BS (m, ρ), BS (m′ , ρ′ )) ≥ dS (m, m′ ) − (ρ + ρ′ ). Moreover, there is a {si }i∈{1,2,...,dS (m,m′ )} such that (((mPs1 )Ps2 ) · · · )P sdS (m,m′ ) = m′ . Let mρ = ((m P s1 ) P · · · ) P sρ and let m′ρ′ = ((mρ P sρ+1 ) P · · · ) P sdS (m,m′ )−ρ′ . Then, mρ ∈ BS (m, ρ) and, because (((m′ρ′ P sdS (m,m′ )−ρ′ +1 ) P sdS (m,m′ )−ρ′ +2 ) · · · ) P sdS (m,m′ ) = m′ , we have m′ρ′ ∈ 16 SIMON WACKER BS (m′ , ρ′ ). And, dS (mρ , m′ρ′ ) ≤ dS (m, m′ )−ρ′ −ρ. Therefore, dS (BS (m, ρ), BS (m′ , ρ′ )) ≤ dS (m, m′ ) − (ρ + ρ′ ). In conclusion, dS (BS (m, ρ), BS (m′ , ρ′ )) = dS (m, m′ ) − ρ − ρ′ .  6. Interiors, Closures, and Boundaries In this section, let R = ((M, G, ⊲), (m0 , {gm0 ,m }m∈M )) be a cell space and let S be a symmetric right generating set of R. In Definition 6.1 we define θ-interiors A−θ , θ-closures A+θ , and (internal/external) θ-boundaries ∂θ A, ∂θ− A, or ∂θ+ A. And in the lemmata and corollaries of this section we characterise them and show how they and the S-metric relate to each other. Definition 6.1. Let A be a subset of M, let θ be a non-negative integer, and identify M with G/G0 by [m 7→ Gm0 ,m ]. (1) The set A−θ = A−BS (θ) = {m ∈ M | m P BS (θ) ⊆ A} is called θ-interior of A. (2) The set A+θ = A+BS (θ)   = {m ∈ M | (m P BS (θ)) ∩ A 6= ∅} is called θ-closure of A. (3) The set ∂θ A = A+θ r A−θ  = A+BS (θ) r A−BS (θ) = ∂BS (θ) A is called θ-boundary of A. (4) The set ∂θ− A = A r A−θ is called internal θ-boundary of A. (5) The set ∂θ+ A = A+θ r A is called external θ-boundary of A. Lemma 6.2. Let A be a subset of M and identify M with G/G0 by [m 7→ Gm0 ,m ]. For each non-negative integer θ ∈ N0 , (1) A−θ = {m ∈ A | BS (m, θ) ⊆ A}; RIGHT AMENABILITY AND GROWTH (2) A+θ = [ 17 BS (m, θ) = A P BS (θ). m∈A Proof. Let θ ∈ N0 and let m ∈ M. (1) According to Corollary 5.14, A−θ = {m ∈ M | BS (m, θ) ⊆ A}. Therefore, because m ∈ BS (m, θ), A−θ = {m ∈ A | BS (m, θ) ⊆ A}. (2) According to Corollary 5.14, A+θ = {m ∈ M | (m P BS (θ)) ∩ A 6= ∅} = {m ∈ M | ∃ m′ ∈ A : m′ ∈ m P BS (θ)} = {m ∈ M | ∃ m′ ∈ A : m′ ∈ BS (m, θ)}. Moreover, because of the symmetry of dS , for each m′ ∈ A, m′ ∈ BS (m, θ) ⇐⇒ dS (m, m′ ) ≤ θ ⇐⇒ m ∈ BS (m′ , θ). Hence, according to Corollary 5.14, A+θ = {m ∈ M | ∃ m′ ∈ A : m ∈ BS (m′ , θ)} [ = BS (m′ , θ) m′ ∈A = [ m′ P BS (θ) m′ ∈A = A P BS (θ).  Corollary 6.3. Let m be an element of M, let ρ be a non-negative integer, and let θ be a non-negative integer. Then, (1) BS (m, ρ)−θ ⊇ BS (m, ρ − θ); (2) BS (m, ρ)+θ = BS (m, ρ + θ); (3) ∂θ BS (m, ρ) ⊆ BS (m, ρ + θ) r BS (m, ρ − θ). Proof. (1) According to Corollary 5.15, we have BS (m, ρ − θ) P BS (θ) ⊆ BS (m, ρ). Hence, according to Definition 6.1, we have BS (m, ρ − θ) ⊆ BS (m, ρ)−θ . 18 SIMON WACKER (2) According to Item 2 of Lemma 6.2 and Corollary 5.15, we have BS (m, ρ)+θ = BS (m, ρ) P BS (θ) = BS (m, ρ + θ). (3) This is a direct consequence of Items 1 and 2.  Lemma 6.4. Let A be a subset of M, and let θ and θ′ be two nonnegative integers. The following statements hold: (1) (2) (3) (4) (5) Proof. ′ ′ (A−θ )−θ = A−(θ+θ ) ; ′ ∂θ−′ A−θ = A−θ r A−(θ+θ ) ; ′ ′ (A+θ )+θ = A+(θ+θ ) ; ′ ∂θ+′ A+θ = A+(θ+θ ) r A+θ ; ′ ′ ′ ′ Let θ′ ≤ θ. Then, A+(θ−θ ) ⊆ (A+θ )−θ and (A−θ )+θ ⊆ A−(θ−θ ) . (1) For each m′ ∈ A, according to Corollary 5.14 and Lemma 6.2, we have m′ ∈ A−θ if and only if m′ P BS (θ) = BS (m′ , θ) ⊆ A. Hence, according to Corollary 5.15, ′ (A−θ )−θ = {m′ ∈ A | BS (m′ , θ′ ) ⊆ A−θ } = {m′ ∈ A | BS (m′ , θ′ ) P BS (θ) ⊆ A} = {m′ ∈ A | BS (m′ , θ + θ′ ) ⊆ A} ′ = A−(θ+θ ) . (2) According to Item 1, ∂θ−′ A−θ = A−θ r (A−θ )−θ ′ ′ = A−θ r A−(θ+θ ) . (3) According to Lemma 6.2 and Corollary 5.15, ′ (A+θ )+θ = A+θ P BS (θ′ ) = [ BS (m, θ) m∈A = [ ! P BS (θ ′ ) BS (m, θ) P BS (θ′ ) m∈A = [ BS (m, θ + θ′ ) m∈A ′ = A+(θ+θ ) . RIGHT AMENABILITY AND GROWTH 19 (4) According to Item 3, ′ ∂θ+′ A+θ = (A+θ )+θ r A+θ ′ = A+(θ+θ ) r A+θ . (5) According to Lemma 6.2 and Item 3, ′ ′ A+(θ−θ ) P BS (θ′ ) = (A+(θ−θ ) )+θ ′ ′ ′ = A+((θ−θ )+θ ) = A+θ . Thus, for each m ∈ A+(θ−θ ) , according to Corollary 5.15, we have BS (m, θ′ ) = m P BS (θ′ ) ⊆ A+θ and, in particular, m ∈ ′ A+θ . Therefore, according to Lemma 6.2, we have A+(θ−θ ) ⊆ ′ (A+θ )−θ . According to Lemma 6.2, Item 3, and Definition 6.1, ′ (A−θ )+θ ′ P BS (θ ′ ′ − θ′ ) = ((A−θ )+θ )+(θ−θ ) ′ ′ = (A−θ )+θ +(θ−θ ) = (A−θ )+θ = A−θ P BS (θ) ⊆ A. Therefore, according to Definition 6.1, we have (A−θ )+θ ⊆ ′ A−(θ−θ ) .  ′ Lemma 6.5. Let k be a non-negative integer, and let A and A′ be two subsets of M. Then, dS (A, A′ r A+k ) ≥ k + 1. Proof. If A or A′ r A+k is empty, then dS (A, A′ r A+k ) = ∞ ≥ k + 1. Otherwise, let m′ ∈ A′ r A+k . According to [8, Item 3 of Lemma 1], we have A′ r A+k = (A′ r A)−k . Hence, according to Lemma 6.2, we have BS (m′ , k) ⊆ A′ rA. Therefore, for each m ∈ A, we have m ∈ / BS (m′ , k) and hence dS (m, m′ ) ≥ k + 1. Thus, dS (A, m′ ) ≥ k + 1. In conclusion, dS (A, A′ r A+k ) ≥ k + 1.  Corollary 6.6. Let k be a non-negative integer, let k ′ be a positive integer, and let A be a subset of M. Then, dS (A, ∂k+′ A+k ) ≥ k + 1. 20 SIMON WACKER Proof. Because ∂k+′ A+k = (A+k )+k r A+k , this is a direct consequence of Lemma 6.5.  ′ Lemma 6.7. Let A be a finite subset of M and let S ′ be the set {G0 } ∪ S. There is a non-negative integer k ∈ N0 such that A ⊆ {m ∈ M | ∃{s′i }i∈{1,2,...,k} ⊆ S ′ : (((m0 P s′1 ) P s′2 ) P · · · ) P s′k }. Proof. If A is empty, then any k ∈ N0 works. Otherwise, let k = maxa∈A dS (m0 , a). Because A is finite, we have k ∈ N0 . By the choice of k, we have A ⊆ B(m0 , k). And, because G0 ∈ S ′ and _ P G0 = idM , we have B(m0 , k) = {m ∈ M | ∃{s′i }i∈{1,2,...,k} ⊆ S ′ : (((m0 P s′1 ) P s′2 ) P · · · ) P s′k }. In conclusion, the stated inclusion holds.  7. Growth Functions And Types In this section we recapitulate growth functions and types, more or less as presented in the monograph ‘Cellular Automata and Groups’[2]. Definition 7.1. Let γ be a map from N0 to R≥0 . It is called growth function if and only if it is non-decreasing, that is to say, that  ∀ k ∈ N0 ∀ k ′ ∈ N0 : k ≤ k ′ =⇒ γ(k) ≤ γ(k ′ ) . Definition 7.2. Let γ and γ ′ be two growth functions. The growth function γ is said to dominate γ ′ and we write γ < γ ′ if and only if ∃ α ∈ N+ : ∀ k ∈ N+ : α · γ(α · k) ≥ γ ′ (k). Definition 7.3. Let γ and γ ′ be two growth functions. They are called equivalent and we write γ ∼ γ ′ if and only if γ < γ ′ and γ ′ < γ. Lemma 7.4 ([2, Proposition 6.4.3]). (1) The relation < is reflexive and transitive. (2) The relation ∼ is an equivalence relation. (3) If γ1 ∼ γ2 and γ1′ ∼ γ2′ , then γ1 < γ1′ implies γ2 < γ2′ . Definition 7.5. Let γ be a growth function. The equivalence class of γ with respect to ∼ is denoted by [γ]∼ and called growth type. RIGHT AMENABILITY AND GROWTH 21 Definition 7.6. Let Γ and Γ′ be two growth types. The growth type Γ is said to dominate Γ′ and we write Γ < Γ′ if and only if ∃ γ ∈ Γ ∃ γ ′ ∈ Γ′ : γ < γ ′ . Example 7.7 ([2, Examples 6.4.4]). (1) The growth function [k 7→ k] dominates 1 but they are not equivalent. Proof. For each k ∈ N+ , we have k ≥ 1(k). But, for each α ∈ N+ , there is a k ∈ N+ , for example k = α + 1, such that α1(αk) = α < k.  (2) Let r and s be two non-negative real numbers. Then, [k 7→ k r ] < [k 7→ k s ] if and only if r ≥ s. And, [k 7→ k r ] ∼ [k 7→ k s ] if and only if r = s. (3) Let γ be a growth function such that it is a polynomial function of degree d ∈ N0 . Then, γ ∼ [k 7→ k d ]. (4) Let r and s be two elements of R>1 . Then, [k 7→ r k ] ∼ [k 7→ sk ]. In particular, [k 7→ r k ] ∼ exp. Proof. Without loss of generality, suppose that r ≤ s. Then, for each k ∈ N+ , we have r k ≤ sk . Hence, [k 7→ r k ] 4 [k 7→ sk ]. Moreover, let α = ⌈logr s⌉ ∈ N+ . Then, for each k ∈ N+ , sk = (r logr s )k = r (logr s)k ≤ r αk ≤ αr αk . Hence, [k 7→ r k ] < [k 7→ sk ]. In conclusion, [k 7→ r k ] ∼ [k 7→ sk ].  (5) Let d be a non-negative integer. Then, exp < [k 7→ k d ] and [k 7→ k d ] ≁ exp. Proof. See [2, Examples 6.4.4 (d)].  Lemma 7.8. Let γ be a growth function and let d be a non-negative integer such that [k 7→ k d ] < γ. Then, exp < γ and exp ≁ γ. Proof. According to Item 5 of Example 7.7, we have exp < [k 7→ k d ] and exp ≁ [k 7→ k d ]. Hence, because < is transitive and [k 7→ k d ] < γ, we have exp < γ and exp ≁ γ.  22 SIMON WACKER 8. Cell Spaces’ Growth Functions and Types In this section, let R = ((M, G, ⊲), (m0 , {gm0 ,m }m∈M )) be a cell space such that there is a finite and symmetric right generating set S of R. In Definition 8.1 we define the S-growth function γS of R. In Lemma 8.3 and its corollaries we show that γS is dominated by exp and that the ∼-equivalence class [γS ]∼ does not depend on S. In Definition 8.10 we define the growth type γ(R) of R as that equivalence class. In Lemma 8.13 and its corollary we relate the inclusion-behaviour of the sequence of balls to the cardinality of M. And in Definition 8.17 we define the terms ‘exponential growth’, ‘sub-exponential growth’, ‘polynomial growth’, and ‘intermediate growth of R’. Definition 8.1. The map γ S : N0 → N0 , k 7→ |BS (k)|, is called S-growth function of R. Remark 8.2. According to Remark 5.6, we have γS (0) = 1 and the sequence (γS (k))k∈N0 is non-decreasing with respect to the partial order ≤. Moreover, according to Remark 5.7, for each non-negative integer k ∈ N0 , we have γS (k) ≤ (1 + |S|)k . Lemma 8.3. Let S ′ be a finite and symmetric right generating set of R and let α be the non-negative integer min{k ∈ N0 | BS (1) ⊆ BS ′ (k)}. Then, ∀ m ∈ M ∀ m′ ∈ M : dS ′ (m, m′ ) ≤ α · dS (m, m′ ), in particular, ∀ m ∈ M : |m|S ′ ≤ α · |m|S . Proof. For each m ∈ M, let αm = min{k ∈ N0 | BS (m, 1) ⊆ BS ′ (m, k)}, in particular, αm0 = α. Proof of: ∀ m ∈ M : αm = α. Let m ∈ M, let k ∈ N0 , and let g ∈ Gm0 ,m . Then, because g ⊲ _ is bijective, BS (1) ⊆ BS ′ (k) if and only if g ⊲ BS (1) ⊆ g ⊲ BS ′ (k). Moreover, according to Lemma 5.9, we have g ⊲ BS (1) = BS (m, 1) and g ⊲ BS ′ (k) = BS ′ (m, k). Therefore, RIGHT AMENABILITY AND GROWTH 23 BS (1) ⊆ BS ′ (k) if and only if BS (m, 1) ⊆ BS ′ (m, k). In conclusion, αm = α. Proof by induction on the distance, that is, proof by induction on k of ∀ k ∈ N0 ∀ m ∈ M ∀ m′ ∈ M : (dS (m, m′ ) = k =⇒ dS ′ (m, m′ ) ≤ α · k). Base Case. Let k = 0. Furthermore, let m and m′ ∈ M such that dS (m, m′ ) = k. Then, m = m′ . Hence, dS ′ (m, m′ ) = 0. Therefore, dS ′ (m, m′ ) ≤ α · k. Inductive Step. Let k ∈ N0 such that ∀ m ∈ M ∀ m′ ∈ M : (dS (m, m′ ) = k =⇒ dS ′ (m, m′ ) ≤ α · k). Furthermore, let m and m′′ ∈ M such that dS (m, m′′ ) = k + 1. Then, there is a {si }i∈{1,2,...,k+1} ⊆ S such that m′ P sk+1 = m′′ , where m′ = (((m P s1 ) P s2 ) P · · · ) P sk . And, according to Lemma 4.5, we have dS (m, m′ ) = k. Therefore, according to the inductive hypothesis, dS ′ (m, m′ ) ≤ α · k. Moreover, by definition of αm′ , we have m′′ = m′ P sk+1 ∈ BS (m′ , 1) ⊆ BS ′ (m′ , αm′ ). Hence, because αm′ = α, we have dS ′ (m′ , m′′ ) ≤ αm′ = α. In conclusion, because dS ′ is subadditive, dS ′ (m, m′′ ) ≤ dS ′ (m, m′ ) + dS ′ (m′ , m′′ ) ≤ α · k + α = α · (k + 1).  Corollary 8.4. In the situation of Lemma 8.3, for each element m ∈ M and each non-negative integer k ∈ N0 , we have BS (m, k) ⊆ BS ′ (m, α· k). Proof. This is a direct consequence of Lemma 8.3, because for each element m ∈ M, each non-negative integer k ∈ N0 , and each element  m′ ∈ M, if dS (m, m′ ) ≤ k, then dS ′ (m, m′ ) ≤ α · k. Corollary 8.5. In the situation of Lemma 8.3, for each non-negative integer k ∈ N0 , we have γS (k) ≤ γS ′ (α · k). Proof. This is a direct consequence of Corollary 8.4.  Definition 8.6. Let X be a set, and let d and d′ be metrics on X. The metrics d and d′ are called Lipschitz equivalent if and only if there are positive real numbers κ and κ such that κ · d ≤ d′ ≤ κ · d. 24 SIMON WACKER Corollary 8.7. Let S ′ be a finite and symmetric right generating set of R. The metrics dS and dS ′ are Lipschitz equivalent. Proof. Let α = min{k ∈ N0 | BS (1) ⊆ BS ′ (k)} and let α′ = min{k ∈ N0 | BS ′ (1) ⊆ BS (k)}. If α = 0 or α′ = 0, then M = {m0 }, hence dS = 0 = dS ′ , and therefore dS ≤ dS ′ ≤ dS . Otherwise, according to  Lemma 8.3, we have α1 · dS ′ ≤ dS ≤ α′ · dS ′ . Corollary 8.8. Let S ′ be a finite and symmetric right generating set of R. The S-growth function γS of R and the S ′ -growth function γS ′ of R are equivalent. Proof. According to Corollary 8.5, there is a α ∈ N0 such that, for each k ∈ N0 , we have γS (k) ≤ γS ′ (α · k). Hence, according to Remark 8.2, for each k ∈ N0 , we have γS (k) ≤ (α + 1)γS ′ ((α + 1) · k). Therefore, γS is dominated by γS ′ . Switching roles of S and S ′ yields that γS ′ is  dominated by γS . In conclusion, γS and γS ′ are equivalent. Corollary 8.9. The S-growth function γS of R is dominated by exp. Proof. According to Remark 8.2, for each k ∈ N0 , we have γS (k) ≤ r k , where r = 1+|S|. Hence, γS 4 [k 7→ r k ]. Moreover, according to Item 4 of Example 7.7, we have [k 7→ r k ] ∼ exp. In conclusion, γS 4 exp.  Definition 8.10. The equivalence class γ(R) = [γS ]∼ is called growth type of R. Lemma 8.11 ([2, Proposition 6.4.6]). Let γ be a growth function such that γ(0) > 0. Then, γ is equivalent to 1 if and only if γ is bounded. Corollary 8.12. The set M is finite if and only if the growth types γ(R) and [1]∼ are equal. Proof. First, let M be finite. Then, for each k ∈ N0 , we have γS (k) ≤ |M| = |M| · 1(|M| · k). Secondly, let γ(R) = [1]∼ . Then, according to Lemma 8.11, γS is S bounded by some ξ ∈ R>0 . Therefore, because M = k∈N0 BS (k), (BS (k))k∈N0 is non-decreasing with respect to ⊆, and (γS (k))k∈N0 = (|BS (k)|)k∈N0 , we have |M| ≤ supk∈N0 γS (k) ≤ ξ. In conclusion, M is finite.  RIGHT AMENABILITY AND GROWTH 25 Lemma 8.13. Either the sequence (BS (k))k∈N0 is strictly increasing with respect to ⊆ or eventually constant, that is to say, that there is a non-negative integer k ∈ N0 such that, for each non-negative integer k ′ ∈ N0 with k ′ ≥ k, we have BS (k ′ ) = BS (k). Proof. According to Remark 5.6, the sequence (BS (k))k∈N0 is non-decreasing with respect to ⊆. If it is strictly increasing with respect to ⊆, it is not eventually constant. Otherwise, there is a k ∈ N0 such that BS (k) = BS (k + 1). We proof by induction on k ′ that, for each k ′ ∈ N0 with k ′ ≥ k, we have BS (k ′ ) = BS (k). Base Case. Let k ′ = k. Then, BS (k ′ ) = BS (k). Inductive Step. Let k ′ ∈ N0 with k ′ ≥ k such that BS (k ′ ) = BS (k). Furthermore, let m ∈ BS (k ′ + 1). Case 1: m ∈ BS (k ′ ). Then, according to the inductive hypothesis, m ∈ BS (k). Case 2: m ∈ / BS (k ′ ). Then, there is a {si }i∈{1,2,...,k′+1} ⊆ S such that m′ P sk′ +1 = m, where m′ = (((m0 P s1 ) P s2 ) P · · · ) P sk′ . Hence, m′ ∈ BS (k ′ ) and thus, according to the inductive hypothesis, m′ ∈ BS (k). Therefore, according to Lemma 5.8, we have m ∈ BS (k + 1). Thus, because BS (k + 1) = BS (k), we have m ∈ BS (k). In either case, m ∈ BS (k). Therefore, BS (k ′ + 1) ⊆ BS (k) ⊆ BS (k ′ ) ⊆ BS (k ′ + 1). In conclusion, BS (k ′ + 1) = BS (k). In conclusion, (BS (k))k∈N0 is eventually constant.  Corollary 8.14. The set M is infinite if and only if the sequence (BS (k))k∈N0 is strictly increasing with respect to ⊆. Proof. First, let M be infinite. Suppose that (BS (k))k∈N0 is eventually constant. Then, there is a k ∈ N0 such that, for each k ′ ∈ N0 with k ′ ≥ k, we have BS (k ′ ) = BS (k). Hence, according to Remark 5.6, we S have M = k′ ∈N0 ,k′≥k BS (k ′ ) = BS (k) and therefore, according to Remark 5.7, the set M is finite, which contradicts the precondition that M is infinite. Thus, (BS (k))k∈N0 is not eventually constant. In conclusion, according to Lemma 8.13, the sequence (BS (k))k∈N0 is strictly increasing with respect to ⊆. 26 SIMON WACKER Secondly, let (BS (k))k∈N0 be strictly increasing with respect to ⊆. S Then, because M = k∈N0 BS (k), the set M is infinite.  Corollary 8.15. The set M is infinite if and only if (1) ∀ ρ ∈ N0 : SS (ρ) 6= ∅. Proof. We have SS (0) = {m0 } = 6 ∅. And, according to Remark 5.2, for each ρ ∈ N+ , we have SS (ρ) = BS (ρ) r BS (ρ − 1). Hence, (BS (k))k∈N0 is strictly increasing with respect to ⊆ if and only if Eq. (1) holds. Therefore, according to Corollary 8.14, the set M is infinite if and only if Eq. (1) holds.  Lemma 8.16. The set M is infinite if and only if the growth type of R dominates [k 7→ k]∼ . Proof. First, let M be infinite. Then, according to Corollary 8.14, the sequence (BS (k))k∈N0 is strictly increasing with respect to ⊆. Hence, because BS (0) = {m0 }, for each k ∈ N0 , we have γS (k) = |BS (k)| ≥ k + 1. In conclusion, γS dominates [k 7→ k] and hence γ(R) dominates [k 7→ k]∼ . Secondly, let M be finite. Then, according to Corollary 8.12, we have R = [1]∼ . Hence, according to Item 1 of Example 7.7, the cell space R does not dominate [k 7→ k]∼ .  Definition 8.17. The cell space R is said to have (1) exponential growth if and only if its growth type γ(R) is equal to [exp]∼ ; (2) sub-exponential growth if and only if it does not have exponential growth; (3) polynomial growth if and only if there is a non-negative integer d ∈ N0 such that γS is dominated by [k 7→ k d ]. (4) intermediate growth if and only if it has sub-exponential growth but not polynomial growth. Lemma 8.18. Let R have polynomial growth. The cell space R has sub-exponential growth. Proof. There is a d ∈ N0 such that [k 7→ k d ] < γS . Hence, according to Lemma 7.8, γS ≁ exp. In conclusion, γ(R) 6= [exp]∼ .  RIGHT AMENABILITY AND GROWTH 27 9. Growth Rates In this section, let R = ((M, G, ⊲), (m0 , {gm0 ,m }m∈M )) be a cell space such that there is a finite and symmetric right generating set S of R. In Definition 9.2 we define the S-growth rate of R. And in Lemma 9.3 show how that growth rate and exponential growth relate to each other. p p Lemma 9.1. The sequence ( k γS (k))k∈N0 converges to inf k∈N0 k γS (k) ∈ R≥1 . Proof. According to Corollary 5.15, γS (k + k ′ ) = |BS (k + k ′ )| = |BS (k) P BS (k ′ )| ≤ |BS (k)| · |BS (k ′ )| = γS (k) · γS (k ′ ). p Hence, according to [2, Lemma 6.5.1], the sequence ( k γS (k))k∈N0 conp verges to inf k∈N0 k γS (k). Moreover, because, for each k ∈ N0 , we have γS (k) ≥ 1, that limit point must be in R≥1 .  p Definition 9.2. The limit point λS = limk→∞ k γS (k) is called Sgrowth rate of R. Lemma 9.3. The S-growth rate λS of R is greater than 1 if and only if the cell space R has exponential growth. Proof. First, let λS > 1. According to Lemma 9.1, for each k ∈ N0 , we p have k γS (k) ≥ λS and hence γS (k) ≥ λkS . Therefore, γS dominates (_) (_) λS and, because λS > 1, the growth function λS is equivalent to exp, and thus γS dominates exp. Moreover, according to Corollary 8.9, the growth function γS is dominated by exp. Altogether, γS is equivalent to exp. In conclusion, γ(R) = [γS ]∼ = [exp]∼ . Secondly, let γ(R) = [exp]∼ . Then, γS and exp are equivalent. In particular, γS dominates exp. Hence, there is a α ∈ N+ such that, for each k ∈ N+ , we have αγS (αk) ≥ exp(k). Therefore, for each k ∈ N+ , p p √ αk αk α γS (αk) = αk αγS (αk) p ≥ αk exp(k) 28 SIMON WACKER = √ α e. p √ Thus, because ( αk α)k∈N+ converges to 1 and ( αk γS (αk))k∈N+ , as subp √ sequence of ( k γS (k))k∈N0 , converges to λS , we conclude λS ≥ α e > 1.  Corollary 9.4. The S-growth rate λS of R is equal to 1 if and only if the cell space R has sub-exponential growth. Proof. This is a direct consequence of Lemma 9.3.  Corollary 9.5. Let S ′ be a finite and symmetric right generating set of R. The S-growth rate λS of R is equal to 1 or greater than 1 if and only if the S ′ -growth rate λS ′ of R is equal to 1 or greater than 1 respectively. Proof. This is a direct consequence of Corollary 9.4 and Lemma 9.3.  10. Amenability, Følner Conditions/Nets, and Isoperimetric Constants In this section, let R = ((M, G, ⊲), (m0, {gm0 ,m }m∈M )) be a finitely right generated cell space such that the stabiliser G0 is finite, and let S be a finite and symmetric right generating set of R. In Definition 10.3 we define the S-isoperimetric constant of R, which measures, broadly speaking, the invariance under P↾M ×S that a finite subset of M can have, where 0 means maximally and 1 minimally invariant. In Theorem 10.5 we show that R is right amenable if and only if a kind of Følner condition holds, which in turn holds if and only if the S-isoperimetric constant is 0. And in Theorem 10.6 we characterise right Følner nets using ρ-boundaries. Remark 10.1. Let g and g′ be two elements of G/G0 , and let A, B, and C be three sets. Then, (_ P g)−1 (A r B) = (_ P g)−1 (A) r (_ P g)−1 (B) and (_ P g) P g′ −1  (A) = (_ P g)−1 (_ P g′ )−1 (A) . RIGHT AMENABILITY AND GROWTH 29 Remark 10.2. Let A, B, and C be three finite sets. Then, |A r B| ≤ |A r C| + |C r B|. Definition 10.3. Let E be a subset of G/G0 and let F be the set {F ⊆ M | F is non-empty and finite}. The non-negative real number S | e∈E F r (_ P e)−1 (F )| ιE (R) = inf F ∈F |F | is called E-isoperimetric constant of R. Lemma 10.4. Let A be a subset of M, let g and g′ be two elements of G/G0 , and identify M with G/G0 by [m 7→ Gm0 ,m ]. Then, [ −1  (_ P g)−1 (A)r _ P (g P g′ ) (A) ⊆ (_ P g)−1 Ar(_ P g0 ·g′ )−1 (A) . g0 ∈G0 Proof. Let m ∈ (_ P g)−1 (A) r (_ P (g P g′ ))−1 (A). Then, according to Lemma 5.13, there is a g0 ∈ G0 such that (mPg)Pg0 ·g′ = mP(gPg′ ) ∈ / A. ′ −1 −1 Therefore, m ∈ / ((_ P g) P g0 · g ) (A) and hence m ∈ (_ P g) (A) r ((_ P g) P g0 · g′ )−1 (A). Moreover, according to Remark 10.1, we have ((_ P g) P g0 · g′ )−1 (A) = (_ P g)−1 ((_ P g0 · g′ )−1 (A)). Thus, according to Remark 10.1, we have (_ P g)−1 (A) r ((_ P g) P g0 · g′ )−1 (A) = S (_ P g)−1 (A r (_ P g0 · g′ )−1 (A)). Hence, m ∈ g0 ∈G0 (_ P g)−1 (A r (_ P g0 · g′ )−1 (A)).  Theorem 10.5. The following statements are equivalent: (1) The cell space R is right amenable; (2) For each positive real number ε ∈ R>0 , there is a non-empty and finite subset F of M such that |F r (_ P s)−1 (F )| (2) ∀s ∈ S : < ε; |F | (3) The isoperimetric constant ιS (R) is 0. Proof. 1 =⇒ 2. Let R be right amenable. Then, according to [7, Main Theorem 4], there is a right Følner net in R. Hence, according to [7, Lemma 9], for each ε ∈ R>0 , there is a non-empty and finite F ⊆ M such that Eq. (2) holds. 2 =⇒ 1. For each ε ∈ R>0 , let there be a non-empty and finite F ⊆ M such that Eq. (2) holds. Furthermore, let ε′ ∈ R>0 , let E ⊆ G/G0 be 30 SIMON WACKER finite, and identify M with G/G0 by [m 7→ Gm0 ,m ]. Then, according to Lemma 6.7, there is a k ∈ N0 such that E ⊆ {m ∈ M | ∃{s′i }i∈{1,2,...,k} ⊆ S ′ : (((m0 P s′1 ) P s′2 ) P · · · ) P s′k }, where S ′ = {G0 }∪S. Let ε = ε′ /(|G0 |2 ·k) and let F ⊆ M be non-empty and finite such that Eq. (2) holds. Furthermore, let e ∈ E. Then, there is a {s′i }i∈{1,2,...,k} ⊆ S ′ such that (((m0 P s′1 ) P s′2 ) P · · · ) P s′k = e. For each i ∈ {0, 1, . . . , k}, let mi = (((m0 P s′1 ) P s′2 ) P · · · ) P s′i and let Fi = (_ P mi )−1 (F ). Note that mk = e and that F0 = F . Then, according to Remark 10.2, |F r Fk | = |F0 r Fk | ≤ |F0 r F1 | + |F1 r Fk | ≤ |F0 r F1 | + |F1 r F2 | + |F2 r Fk | ≤ ... ≤ k X i=1 |Fi−1 r Fi |. Let i ∈ {1, 2, . . . , k}. Then, because mi = mi−1 P s′i , we have Fi−1 r Fi = (_ P mi−1 )−1 (F ) r (_ P (mi−1 P s′i ))−1 (F ). Hence, according to S Lemma 10.4, we have Fi−1 r Fi ⊆ g0 ∈G0 (_ P mi−1 )−1 (F r (_ P g0 · s′i )−1 (F )). Therefore, [ (_ P mi−1 )−1 (F r (_ P g0 · s′i )−1 (F ))| |Fi−1 r Fi | ≤ | g0 ∈G0 ≤ X g0 ∈G0 |(_ P mi−1 )−1 (F r (_ P g0 · s′i )−1 (F ))|. Thus, according to [8, Corollary 1], X |G0 | · |F r (_ P g0 · s′i )−1 (F )|. |Fi−1 r Fi | ≤ g0 ∈G0 Hence, because G0 · S ′ ⊆ S ′ , F r (_ P G0 )−1 (F ) = F r F = ∅, and Eq. (2) holds, X |G0 | · ε · |F | |Fi−1 r Fi | < g0 ∈G0 = |G0 |2 · ε · |F | RIGHT AMENABILITY AND GROWTH = |G0 |2 · = ε′ |F |. k 31 ε′ · |F | |G0 |2 · k Therefore, k X ε′ |F r Fk | ≤ |Fi−1 r Fi | < k |F | = ε′ |F |. k i=1 Thus, because Fk = (_ P e)−1 (F ), |F r (_ P e)−1 (F )| < ε′ . |F | Hence, according to [7, Lemma 3.9], there is a right Følner net in R. In conclusion, according to [7, Theorem 5.1], the cell space R is right amenable. 2 =⇒ 3. Let ε′ ∈ R>0 and let ε = ε′ /|S|. Then, there is a non-empty and finite F ⊆ M such that Eq. (2) holds. Therefore, S | s∈S F r (_ P s)−1 (F )| X |F r (_ P s)−1 (F )| ≤ < |S| · ε = ε′ . |F | |F | s∈S In conclusion, ιS (R) = 0. 3 =⇒ 2. Let ε ∈ R>0 . Then, because ιS (R) = 0, there is a non-empty and finite F ⊆ M such that S | s∈S F r (_ P s)−1 (F )| < ε. |F | S Hence, for each s ∈ S, because F r (_ P s)−1 (F ) ⊆ s′ ∈S F r (_ P s′ )−1 (F ), |F r (_ P s)−1 (F )| < ε. |F | In conclusion, Eq. (2) holds.  Theorem 10.6. Let {Fi }i∈I be a net in {F ⊆ M | F 6= ∅, F finite} indexed by (I, ≤). It is a right Følner net in R if and only if (3) ∀ ρ ∈ N0 : lim i∈I |∂ρ Fi | = 0. |Fi | 32 SIMON WACKER Proof. First, let {Fi }i∈I be a right Følner net. Furthermore, let ρ be a non-negative integer. Then, for each index i ∈ I, we have ∂ρ Fi = ∂B(ρ) Fi . And, according to Remark 5.7, the ball B(ρ) is finite. Hence, according to [8, Theorem 1], lim i∈I |∂B(ρ) Fi | = 0. |Fi | In conclusion, Eq. (3) holds. Secondly, let Eq. (3) hold. Furthermore, let N be a finite subset of G/G0 . Then, according to Remark 5.6, there is a non-negative integer ρ such that N ⊆ B(ρ). Hence, for each index i ∈ I, according to [8, Item 4 of Lemma 1], we have ∂N Fi ⊆ ∂B(ρ) Fi = ∂ρ Fi . Therefore, lim i∈I |∂N Fi | = 0. |Fi | In conclusion, according to [8, Theorem 1], the net {Fi }i∈I is a right Følner net.  11. Subexponential Growth and Amenability In this section, let R = ((M, G, ⊲), (m0, {gm0 ,m }m∈M )) be a finitely right generated cell space such that the stabiliser G0 is finite. In Main Theorem 11.1 we show that if R has sub-exponential growth, then it is right amenable. And in Theorem 11.3 we show that if G has sub-exponential growth, then so has R. Lemma 11.1 ([2, Lemma 6.11.1]). Let (rk )k∈N0 be a sequence of positive real numbers. Then, √ rk+1 lim inf ≤ lim inf k rk . k→∞ k→∞ rk Main Theorem 11.1. Let the cell space R have sub-exponential growth. It is right amenable. Proof. Let S be a finite and symmetric right generating set of R. According to Lemma 11.1 and Corollary 9.4, p γS (k + 1) 1 ≤ lim inf ≤ lim k γS (k) = λS = 1. k→∞ k→∞ γS (k) Therefore, lim inf k→∞ γS (k+1) γS (k) = 1. RIGHT AMENABILITY AND GROWTH 33 (k) < 1 + ε. Let ε ∈ R>0 . Then, there is a k ∈ N+ such that γSγS(k−1) Hence, γS (k) − γS (k − 1) < ε · γS (k − 1). Furthermore, let F = BS (k) and let s ∈ S. Then, according to Lemma 5.8, we have BS (k − 1) ⊆ (_ P s)−1 (F ). Therefore, because BS (k −1) ⊆ F and γS (k −1) ≤ γS (k), |F r (_ P s)−1 (F )| ≤ |F r BS (k − 1)| = |F | − |BS (k − 1)| = γS (k) − γS (k − 1) < ε · γS (k − 1) ≤ ε · γS (k) = ε · |F |. In conclusion, according to Theorem 10.5, the cell space R is right amenable.  Lemma 11.2. Let the group G be finitely generated. The growth rate of G dominates the one of R. Proof. There is a finite and symmetric generating set T of G such that G0 T ⊆ T . And, according to Lemma 1.4, the set S = {tG0 | t ∈ T } = {g0 · tG0 | g0 ∈ G0 , t ∈ T } is a finite and symmetric right generating set of R. Let k ∈ N0 be a non-negative integer. Furthermore, let m be an element of BR S (k). Then, there is a non-negative integer j ∈ {0, 1, 2, . . . , k} and a family {si }i∈{1,2,...,j} of elements in S such that    m = (m0 P s1 ) P s2 P · · · P sj . And, by the definition of S, there is a family {ti }i∈{1,2,...,j} of elements in T such that {ti G0 }i∈{1,2,...,j} = {si }i∈{1,2,...,j}. And, because P is a right semi-action, there is a family {gi,0}i∈{1,2,...,j} of elements in G0 such that m = (((m0 P s1 ) P s2 ) P · · · ) P sj = m0 P t1 g2,0 t2 g3,0 t3 · · · gj,0tj G0 = g1,0 t1 g2,0 t2 g3,0 t3 · · · gj,0tj ⊲ m0 , 34 SIMON WACKER where g1,0 = gm0 ,m0 . And, because G0 T ⊆ T , the family {gi,0 ti }i∈{1,2,...,j} G is one of elements in T . Hence, m ∈ BG T (j) ⊲ m0 ⊆ BT (k) ⊲ m0 . ThereG fore, BR S (k) ⊆ BT (k) ⊲ m0 and thus G G |BR S (k)| ≤ |BT (k) ⊲ m0 | ≤ |BT (k)|. Hence, γSR (k) ≤ γTG (k). In conclusion, γTG dominates γSR and thus γ(G) dominates γ(R).  Theorem 11.3. Let the group G be finitely generated and let it have sub-exponential growth. The cell space R has sub-exponential growth and is right amenable. Proof. According to Lemma 11.2, the cell space R has sub-exponential growth. Hence, according to Main Theorem 11.1, it is right amenable.  References [1] Cayley, Arthur (1878). Desiderata and suggestions: No. 2. The Theory of groups: graphical representation. American Journal of Mathematics 1 (2): 174–176. doi:10.2307/2369306. JSTOR 2369306. In his Collected Mathematical Papers 10: 403–405. [2] Ceccherini-Silberstein, Tullio and Coornaert, Michel. Cellular Automata and Groups. Springer Monographs in Mathematics. Springer-Verlag, 2010. [3] Efremovich, Vadim Arsenyevich: The geometry of proximity. I. Mat. Sbornik N. S. 31(73), 189–200 (1952) [4] Gromov, Mikhail Leonidovich: Infinite groups as geometric objects, Proc. Int. Congress Math. Warsaw 1983 1 (1984), 385-392 [5] Švarc, Albert S.: A volume invariant of coverings. Dokl. Akad. Nauk SSSR 105, 32–34 (1955) [6] Wacker, Simon. Cellular Automata on Group Sets and the Uniform CurtisHedlund-Lyndon Theorem. Cellular Automata and Discrete Complex Systems (2016), pages 185-198. arXiv:1603.07271 [math.GR]. [7] Wacker, Simon. Right Amenable Left Group Sets and the Tarski-Følner Theorem. Preprint (2016). arXiv:1603.06460 [math.GR]. [8] Wacker, Simon. The Garden of Eden Theorem for Cellular Automata on Group Sets. Cellular Automata (2016), pages 66-78. arXiv:1603.07272 [math.GR]. Simon Wacker, Department of Informatics, Karlsruhe Institute of Technology, Am Fasanengarten 5, 76131 Karlsruhe, Germany E-mail address: [email protected]
4math.GR
arXiv:1609.03136v1 [cs.DS] 11 Sep 2016 A Heuristic Method of Generating Diameter 3 Graphs for Order/Degree Problem Teruaki Kitasuka Masahiro Iida Graduate School of Science and Technology Kumamoto University Kumamoto 860-8555, Japan Email: [email protected] Graduate School of Science and Technology Kumamoto University Kumamoto 860-8555, Japan Email: [email protected] Abstract—We propose a heuristic method that generates a graph for order/degree problem. Target graphs of our heuristics have large order (> 4000) and diameter 3. We describe the observation of smaller graphs and basic structure of our heuristics. We also explain an evaluation function of each edge for efficient 2-opt local search. Using them, we found the best solutions for several graphs. Keywords—order/degree problem, graph generation, Petersen graph, average shortest path length, 2-opt I. I NTRODUCTION One of the famous problems in the field of combinatorics is the degree/diameter problem [1], [2], [3], [4]. The degree/diameter problem1 is the problem of finding the largest possible number n(d, k) of nodes in a graph of maximum degree d and diameter k. The maximum degree of a graph is the maximum degree of its nodes. The degree of a node is the number of edges incident to the node. The diameter k of a graph is the maximum distance between two nodes of the graph. On the other hand, the problem of the graph golf 2015 competition [5] is the order/degree problem. The order/degree problem is the problem of finding a graph that has smallest diameter k and average shortest path length (ASPL, l) for a given order and degree. Compared to the degree/diameter problem, order is given and diameter is not given in the order/degree problem. As the organizer of the competition mentioned, the order/degree problem has important role to design networks for high perfomance computing. Because, the number of nodes of the network is determined based on design constraints such as cost, space, budget, and applications. Solutions of the degree/diameter problem can be used to limited networks of particular number of nodes. Currently, there is no trivial way to increase or decrease the number of nodes from the optimal graph of the degree/diameter problem, while keeping its diameter close to the optimal graph. For example, Besta and Hoefler [6] have presented diameter-2 and -3 networks with particular number of routers, and each endpoint is connected 1 The Degree/Diameter Problem, CombinatoricsWiki, http: //combinatoricswiki.org/wiki/The Degree/Diameter Problem#Undirected graphs to a router. The number of endpoints can be changed in a range. Matsutani et al. [7] have reduced the communication latency of 3D NoCs, by adding randomized shortcut links. We try to solve some order/degree problems. There are two contributions in this paper. 1) Showing heuristic algorithm to create a graph for given order and degree (Sec. III). Using this algorithm, we have created two best-known graphs; one has order n = 4096 and degree d = 60, the other has n = 4096 and d = 64. After 2015 competition, we also have created other graph of order n = 10000 and degree d = 60. 2) Developing evaluation function of edges for 2-opt local search (Sec. IV). Local search starts with a graph that has the given number of nodes and satisfies degree constraints. Swapping two edges is accepted, if swapped graph G0 is better than the previous graph G in terms of diameter and/or ASPL. For example, if two edges a-b and c-d are selected for swapping from graph G, we try to swap two edges such that two edges a-b and c-d are removed from and two edges a-c and b-d are added to the graph G. If diameter and/or ASPL of swapped graph G0 is smaller than G, this swap is accepted. We call the evaluation function “edge importance”. Lower-importance edge pair is selected as the candidate of swapping earlier than other pairs. For the existence of local minimum graph, we need to temporarily accept worse graphs in searching graph of order n = 256 and degree d = 16. II. O BSERVATION OF S MALL O RDER G RAPHS The observation of small order graphs brings us the idea of the heuristic algorithm shown in Sec. III. At the beginning of the 2015 competition, we drew graphs with small order and degree. The first graph is order n = 16 and degree d = 3 as shown in Fig. 1. The second one is order n = 16 and degree d = 4 as shown in Fig. 2. The diameters of these two graphs are three (k = 3). Through drawing these two graphs, we found that these graphs contain many pentagons (5-node cycles), no or small number of squares (4-node cycles), and no triangle (3-node cycle). In Fig. 1, there is no triangle and no square. No triangle and four squares exist in Fig. 2. We think triangles and squares cause diameter ASPL (average shortest path length) to be larger for the case of k = 3. Through this observation, we define increasing the number of pentagons as our policy in Section 0 13 10 7 2 5 6 3 4 12 11 5 11 14 9 2 13 1 12 6 10 8 3 9 (a) ring layout 8 7 (a) ring layout 11 12 13 14 15 0 1 2 3 4 0 1 8 9 5 6 7 8 9 11 12 13 14 15 11 1 2 3 4 0 0 1 1 14 4 15 0 15 2 3 4 5 6 7 8 9 10 11 12 13 14 15 10 (b) pentagon (5-node cycle) layout 15 Fig. 1. The best known graph with order n = 16 and degree d = 4 III. In the degree/diameter problem, pentagons are appeared in the graphs of diameter k = 2, e.g., Petersen graph (shown in Fig. 3) and Hoffman-Singleton graph (n = 50 and d = 7). (b) pentagon (5-node cycle) layout 3 A. Policy and Outline of Heuristic Algorithm 2 Based on the observation of small order graphs described in Sec. II, we determine the outline of our heuristic algorithm as following two steps. 1) If target diameter is k, we connect small order graphs such that their diameter is k − 1. For example, if the target diameter k = 3 and order n = 10000, the 1000 Petersen graphs (Fig. 3, diameter k = 2) are connected. 2) We try to increase the number of (2k−1)-node cycles, when edges are added. For graphs of k = 3, we try to increase the number of pentagons (5-node cycles). Outline of our heuristic algorithm is shown in Algorithm 1. In the remaining of the paper, we discuss only k = 3 graphs. Our algorithm generates a graph which diameter is almost 3, for given order and degree. 8 Algorithm 1 Outline of graph generation algorithm 1: procedure G RAPH G ENERATER (order n, degree d) 2: Create a base graph G0 , such that order of G0 is n 3: Create a graph G, by greedily adding edges one by one to G0 4: Return the graph G 5: end procedure 4 0 III. H EURISTIC A LGORITHM 15 5 14 1 9 8 7 12 6 11 13 15 10 3 2 6 13 1 2 3 4 14 15 8 7 11 9 (c) square (4-node cycle) layout Fig. 2. The best known graph with order n = 10 and degree d = 3 B. Create a Base Graph G0 A base graph G0 = (V, E0 ) has n nodes, i.e. |V | = n. The graph G0 is a connected graph, but its degree is five. Most nodes have five edges. Other nodes, i.e., some border and anomalous nodes have four edges. Graph G0 contains multiple Petersen graphs. The Petersen graph GP , which is shown in Fig. 3, is one of well-known Moore graphs [3], and has ten nodes and degree d = 3. The diameter of Petersen graph is two. When the nodes are numbered in Fig. 3, fifteen edges of the Petersen graph are described as 0 0 5 4 1 8 7 6 7 9 10 1 9 8 2 3 5 6 4 3 Fig. 3. The Petersen graph (n = 10, d = 3) 2 Fig. 5. The 11-node graph (n = 11, d = 4) for base graphs k-th Petersen graph 9 8 7 6 5 0 1 2 3 4 9 8 7 6 5 0 1 2 3 4 (k+1)th Petersen graph Fig. 4. Connecting two adjacent Petersen graphs follows, for i ∈ {0, 1, 2, 3, 4} and j ∈ {5, 6, 7, 8, 9}. (i, i + 1 mod 5) (i, (2i mod 5) + 5) (j, (j + 1 mod 5) + 5) If a given order n is multiple of ten, we generate (n/10) Petersen graphs, GP k (k = 1, 2, 3, . . . , n/10). Adjacent Petersen graphs, GP k and GP (k+1) , are connected as shown in Fig. 4 by C ONNECT procedure in Algorithm 2. Fig. 4 shows only edges crossing two Petersen graphs. In the case of n = 10000, we generate 1000 Petersen graphs, and k-th graph are connected with (k − 1)-th and (k + 1)-th graph for 1 < k < 1000. Algorithm 2 Create a base graph G0 1: procedure C REATE BASE G RAPH (n) 2: for each k ∈ {1, . . . , (n/10)} do 3: Create k-th petersen graphs 4: end for 5: for each k ∈ {1, . . . , (n/10) − 1} do 6: C ONNECT(k) 7: end for 8: end procedure 9: procedure C ONNECT (k) 10: Connect k-th and (k + 1)-th Petersen graphs as shown in Fig. 4 11: end procedure When there is a remainder r > 0 divided by ten, i.e., n = 10 · bn/10c + r, we replace r Petersen graphs with r 11-node graphs. The 11-node graph is the subgraph of Fig. 2. We heuristically select eleven nodes, 5, 6, 7, . . . , 15 from the graph of Fig. 2. When we connect a 11-node graph with adjacent Petersen graphs, we ignore node 10 and other ten nodes are connected similar to Fig. 4. The eleven nodes graph is shown in Fig. 5, nodes are renumbered, except for node 10. Nodes 5, 6, 7, 8, 9, 11, 12, 13, 14, 15 in Fig. 2 are renumbered to 2, 3, 4, 0, 1, 6, 7, 8, 9, 5 in Fig. 5, respectively. The base graph G0 is generated by C REATE BASE G RAPH procedure in Algorithm 2. The base graph G0 has n nodes. Each node of G0 has five edges, except for nodes in the first and the last Petersen graphs and node 10 of 11-node graphs. These exceptional nodes have just four edges. C. Greedily Add Edges One by One to G0 In this step, we greedily add edges one by one to the base graph G0 . Our policies to add edges are the followings. 1) Increase the number of pentagons in the graph, to create a graph such that its diameter becomes three and its ASPL is close to two. 2) Add an edge, which has the smallest degree node on one side. 3) No track back, i.e., never remove edges from the graph. Under the policy 1), our heuristic searches two nodes such that distance of them is four, and adds an edge between these two nodes. By adding the edge, the number of pentagons is increased. Even if the small-degree graph of n = 16 and d = 4 in Fig. 2, there are many pentagons those include a particular edge. For example, an edge 1-2 is contained in eight pentagons; 1-2-3-4-0, 1-2-6-7-0, 1-2-15-14-0, 1-2-3-8-9, 1-2-3-13-12, 1-2-6-5-9, 1-2-6-7-12, and 1-2-6-10-9. The policy 2) is employed to uniformly increase the degree of nodes and save computation time. Our heuristic maintains the nodes that have the smallest degree, and selects a node from them as one side of a new edge. A node of the other side is selected based on the policy 1). Although we can select the new edge from all possible pair of nodes, to save computation time, our heuristic limits search space by fixing one side of new edge. The policy 3) also saves computation time. As another reason, we do not find any effective evaluation function to track back. Here, we explain this step in Algorithm 3. In each loop iteration of lines 3 to 17, two nodes i and j are selected and add an edge i-j to the graph. Node i is chosen from the nodes of the smallest degree in G at line 4, based on policy 2). d(i, j) denotes the distance between two nodes i and j. In the loop of lines 6 to 14, candidates of node j are evaluated, based on policy 1). After evaluation, node j that satisfies two following conditions (1) and (2) is selected in line 15, and an edges i-j is added to graph G in the next line. J 0 is the subset of J such that each node in J 0 satisfies condition (1). We have no particular tie-breaking rule. p1 (j) = p2 (j) = min p1 (j 0 ) (1) max p2 (j 0 ) (2) j 0 ∈J j 0 ∈J 0 The C OUNT PATHS function is used for the evaluation of j ∈ J. C OUNT PATHS(i, j) roughly counts the number of paths between two nodes i and j, those distance are three. Dm (i) is the set of nodes distant m from node i, i.e., for every node k ∈ Dm (i), k satisfies d(i, k) = m. For example, every node k ∈ D1 (i) ∩ D2 (j) satisfy d(i, k) = 1 and d(k, j) = 2. p in line 21 is close to the twice of the number of 4-node paths. Algorithm 3 Greedily add edges, one by one to G0 1: procedure A DD E DGES (n, d, G0 ) 2: G ← G0 3: while edge can be added do 4: Select a node i from the smallest degree nodes 5: Compute node set J such that d(i, j) > 2 6: for each node j ∈ J do 7: p1 (j) = C OUNT PATHS(i, j) 8: p2 (j) = 0 9: for each k ∈ j’s neighbors do 10: if C OUNT PATHS(i, k) > p2 (j) then 11: p2 (j) = C OUNT PATHS(i, k) 12: end if 13: end for 14: end for 15: Select j ∈ J that satisfies conditions (1) and (2) 16: Add an edge i-j to graph G 17: end while 18: If degree of several nodes are less than d, add several edges between them 19: end procedure 20: function C OUNT PATHS (i, j) 21: p = |D1 (i) ∩ D2 (j)| + |D2 (i) ∩ D1 (j)| . Roughly count the number of paths with distance 3 between node i and j, for graph G 22: end function D. Generated Graphs Diameter k and ASPL l of generated graphs are shown in Table I. Fortunately, two graphs of n = 4096 are the new records in the competition. The graph of n = 256 has the same diameter, but longer ASPL than the best record l = 2.09262 TABLE I G RAPHS GENERATED BY THE HEURISTIC ALGORITHM order n 256 4096 4096 10000 10000 diameter k 3 3 3 3 3 degree d 16 60 64 60 64 ASPL l 2.12757 2.295275 2.242228 2.648980 2.611310 note not submitted *1 *1 *2 *3 *1: None submits smaller graph in the competition. *2: A smaller-ASPL graph is created after competition. The winner’s graph of the competition has l = 2.650157. *3: The graph is created after competition. However, the winner’s graph of the competition (l = 2.609927) has smaller ASPL than this. a c a c b d b d Fig. 6. Swap two edges a-b and c-d into a-d and b-c. (We assume degree d = 9 and other nodes are not drawn. There is another swap into a-c and b-d for these edges) and two competitors’ records. For two graphs of n = 10000, our first implementation is too slow and can not finish before the deadline of the 2015 competition. After the competition, we reimplement the program and get the results as shown in Table I. IV. A T ECHNIQUE OF 2-O PT L OCAL S EARCH A. Edge Importance Function After a graph is created by heuristic algorithm described in Sec. III for a given order and degree, we start 2-opt local search. 2-opt is the basic and widely used local search heuristic [8]. It is used for traveling salesperson problem (TSP) and others. In this section, we explain edge importance which is used to prioritize edge combinations for 2-opt local search. 2-opt algorithm slightly modifies a given graph recursively. The modification of 2-opt is swapping two edges. An example of swapping two edges a-b and c-d into a-d and b-c is shown in Fig. 6. Diameter and ASPL of pre-swap graph G = (V, E) and post-swap graph G0 = (V, E 0 ) are compared with each other. If diameter and/or ASPL of G0 is smaller than G, this swap is accepted. 2-opt local search is time-consuming task. There are many ways to reduce computation time. Even if we search a graph of order n = 256 and degree d = 16, there are 2048 edges in the graph. The number of edge pairs is about 2 × 106 . Generally, (n−2)d 1 the number of edge pairs is about nd · 2 = O(n2 d2 ). 2 · 2 For each swapped graph, we need to calculate diameter and ASPL. We adopt two techniques to save computation time. One is edge importance, and the other is fast ASPL calculation for 2-opt. i distance from i = d j i k j distance from i = d + 1 importance for i i j’ k 0 1/2 (no importance) (2 = # of parents) j k 1 Fig. 7. Edge importance of an edge j-k for node i Our edge importance (or edge impact) is a value given to each edge of a graph. As an intuitive explanation, less important edges probably be removed from the graph with little increase of ASPL than other edges. Then, we give higher priority to less important edges, when we select an edge pair for swap. The edge importance of an edge e = j-k is defined by the following function. X f (e) = f (j-k) = f1 (i, j-k), there are two combinations2 of swapping, 1) a-c and b-d (G0 of line 7) and 2) a-d and b-c (G00 of line 9) . Diameter and ASPL of both G0 and G00 are calculated. The loop of lines 4 to 13 implies that edge importance is reused for swapped graphs. In our experience, after fifty swaps, ordering still valuable to find smaller ASPL graph. Algorithm 4 2-opt local search 1: procedure M ULTIPLE 2 OPT (G) 2: Calculate edge importance of all edges in G 3: Sort edges by edge importance 4: while timeout do 5: repeat 6: Select an edge pair (ei , ej ) in a particular order 7: Generate swapped graph G0 8: Calculate diameter and ASPL of G0 9: Generate another swapped graph G00 10: Calculate diameter and ASPL of G00 11: until G0 or G00 has smaller diameter or ASPL than G 12: Copy G0 or G00 to G 13: end while 14: end procedure i∈V where f1 (i, j-k) is the importance of edge j-k for node i. The examples of f1 (i, j-k) is shown in Fig. 7. We assume f1 (i, j-k) = f1 (i, k-j) (symmetricity) and divide two cases of f1 (i, j-k) as follows. • If two nodes j and k have the same distance from i, i.e., d(i, j) = d(i, k), then f1 (i, j-k) = 0. (left of Fig. 7) • If two nodes j and k have the different distance from i, i.e., d(i, j) + 1 = d(i, k), then 0 < f1 (i, j-k) ≤ 1. We define node set J, each of which has an edge to k and its distance from i is equal to d(i, j). J = {j 0 |j 0 ∈ V and d(i, j 0 ) = d(i, j) and d(j 0 , k) = 1} Using J, f1 (i, j-k) is defined as follows. f1 (i, j-k) = 1 |J| The center of Fig. 7 shows a subcase of |J| = 2, and the right of it shows the other subcase of |J| = 1. Note that, this case includes the case of i = j. If i = j, then |J| = 1 by the definition. B. Order of Edges Pairs for Local Search Two lower-importance edges are the candidate of swapping for 2-opt local search. All edges are sorted by edge importance and denoted by e0 , e1 , . . . , e|E|−1 . The edge e0 has the smallest importance. The 2-opt local search algorithm is shown in Algorithm 4 The loop of lines 5 to 11 is the main loop of local search. Line 6 is the important point using edge importance. We tries several orders to select a pair, which are described in the next paragraph. For pair ei (= a-b) and ej (= c-d) selected in line 6, We heuristically employ two searching orders of line 6 in Algorithm 4. Both orders satisfy (ei , ej ) < (ei , ek ) < (ej , ek ) for i < j < k. We think the order of the smallest first is better than it of triangle, empirically. • the smallest first: (ei , el ) < (ej , ek ) for i < j < k < l. (e0 , e1 ), (e0 , e1 ), (e0 , e2 ), . . . , (e0 , e|E|−1 ), (e1 , e2 ), (e1 , e3 ), (e1 , e4 ), . . . , (e1 , e|E|−1 ), (e2 , e3 ), (e2 , e4 ), (e2 , e5 ), . . . , (e2 , e|E|−1 ), ..., (ei , ei+1 ), (ei , ei+2 ), (ei , ei+3 ), . . . , (ei , e|E|−1 ), ... • triangle: (ei , el ) > (ej , ek ) for i < j < k < l. (e0 , e1 ), (e0 , e2 ), (e1 , e2 ), (e0 , e3 ), (e1 , e3 ), (e2 , e3 ), ..., (e0 , ei ), (e1 , ei ), (e2 , ei ), . . . , (ei−1 , ei ), ... Since ASPL calculation is time-consuming task, we additionally design ASPL recalculation method for 2-opt local search. The method stores the distance matrix of graph G and update the matrix for swapped graph G0 . We can elimiate recalculation of the distance between nodes which the swap does not affect. C. Graph Instances We run local search program during the competition and after competition. We show the smallest graph that we found in Table II. These graphs probably are the best-known graphs 2 If graph G already has one of edges a-c or b-d (a-d or b-c), we skip the swap since the degree of two nodes are decreased by one. diameter k 3 3 3 3 ASPL l 2.09069 2.295216 2.242170 2.648977 l of Table I 2.12757 2.295275 2.242228 2.648980 2.0926 Note: all graphs may be the best-known graphs. The winner’s graph of the competition has larger ASPL than these. V. C ONCLUSION In this paper, we explained the heuristic algorithm that creates a graph which has small average shortest path length (ASPL) for diameter 3 graphs. The algorithm intends to increase the number of pentagons (5-node cycles). Through the observation of small order graphs which has diameter 3, we focused on the number of pentagons. The heuristic algorithm can create two best-known graphs at the graph golf 2015 competition, and a best-known graph after the competition. These three graphs have order n = 4096 and degree d = 60, n = 4096 and d = 64, and n = 10000 and d = 60. We also explained the technique of 2-opt local search to reduce ASPL of a graph. The technique is based on the evaluation function called edge importance (or edge impact). Edges which have smaller importance compared to other edges are the good candidates for swap of 2-opt. We applied this technique to the graph of n = 256 and d = 16, and find a best-known graph after competition. As future work, we will try to find more elegant heuristic to create a small ASPL graph, for not only diameter 3 graphs but also larger diameter graphs. Data structures for fast ASPL computation also should be explored. 500 2.0924 400 2.0922 300 2.092 200 2.0918 100 2.0916 0 100 200 300 400 0 500 Sequence of swapped graphs (a) first half (ASPL: 2.09163 < l < 2.09277) 2.092 ASPL Importance order of higher flipped edge Importance order of lower flipped edge 2.0918 ASPL for these four combinations of order and degree. For graphs of order n = 4096 and n = 10000, Algorithm 4 is directly applied. For the graph of order n = 256 and degree d = 16, our graphs fall into local optimal many times. To find graphs of smaller ASPL, we accept worse post-graph G0 than preswap graph G in 2-opt local search. Fig. 8 shows the search history of the last 1000 graphs before reaching the best-known graph of l = 2.09069. Many branches from each graph is omitted. In this figure, we show ASPL of each graph and order of edges that we swapped. The order of swapped edges is distributed from 0 to 620, i.e., swapped edges are two of e0 , e1 , e2 , . . . , e620 in each graph. To reach the best-known graph, we need to run local search at least in the range of edge pair (ei , ej ) for 0 ≤ i ≤ 153 and 1 ≤ j ≤ 620). This range contains only 4 % of all edge pairs. So, the edge importance seems to be valuable function to prioritize edges for swapping. We briefly explain the distribution of order of swapped edges. Since two edges are selected for each swap in Fig. 8, the total number of selected edges are 2000 for 1000 swaps. The half of these edges have the order smaller than 8. The order smaller than 108 contains 90% of these edges. 600 700 600 2.0916 500 2.0914 400 2.0912 300 2.091 200 2.0908 100 2.0906 500 600 700 800 900 Importance order of edge degree d 16 60 64 60 ASPL order n 256 4096 4096 10000 ASPL Importance order of higher flipped edge Importance order of lower flipped edge Importance order of edge 2.0928 TABLE II G RAPHS BY LOCAL SEARCHING AFTER 2015 COMPETITION 0 1000 Sequence of swapped graphs (b) last half (ASPL: 2.09068 < l < 2.09186) Fig. 8. Local search history of 1000 graphs of order n = 256 and degree d = 16 ACKNOWLEDGMENT This work was partially supported by JSPS KAKENHI Grant Number 26330107. R EFERENCES [1] P. Erdös, S. Fajtlowicz, and A.J. Hoffman, “Maximum Degree in Graphs of Diameter 2,” Networks, vol. 10, pp. 87–90, John Wiley & Sons, 1980. [2] E. Loz and J. Širáň, “New Record Graphs in the Degree-Diameter Problem,” Australasian Journal of Combinatorics, vol. 41, pp. 63–80, 2008. [3] M. Miller and J. Širáň, “Moore Graphs and Beyond: A Survey of the Degree/Diameter Problem,” Electronic Journal of Combinatorics, vol. 20, no. 2, #DS14v2, 92 pages, 2013. [4] G. Exoo and R. Jajcay, “Dynamic Cage Survey,” Electronic Journal of Combinatorics, #DS16, 55 pages, 2013. [5] M. Koibuchi, I. Fujiwara, S. Fujita, K. Nakano, T. Uno, T. Inoue, and K. Kawarabayashi, “Graph Golf: THe Order/degree Problem Competition,” http://research.nii.ac.jp/graphgolf/ [6] M. Besta and T. Hoefler, “Slim Fly: A Cost Effective Low-Diameter Network Topology,” Proc. of International Conference on High Performance Computing, Networking, Storage and Analysis (SC ’14), pp. 348–359, Nov. 2014. [7] H. Matsutani, M. Koibuchi, I. Fujiwara, T. Kagami, Y. Take, T. Kuroda, P. Bogdan, R. Marculescu, and H. Amano, “Low-Latency Wireless 3D NoCs via Randomized Shortcut Chips,” Proc. of the conference on Design, Automation & Test (DATE ’14), Mar. 2014. [8] M. Englert, H. Röglin, and B. Vöcking, “Worst Case and Probabilistic Analysis of the 2-Opt Algorithm for the TSP,” Proc. of 18th annual ACMSIAM symposium on Discrete algorithms (SODA ’07), pp. 1295–1304, Jan. 2007.
8cs.DS
Consistency of the plug-in functional predictor of the Ornstein-Uhlenbeck process in Hilbert and Banach spaces Javier Álvarez-Liébana1 , Denis Bosq2 and M. Dolores Ruiz-Medina1 arXiv:1706.06354v1 [math.ST] 20 Jun 2017 21st June 2017 1 Department of Statistics and O. R., University of Granada, Spain. LSTA, Université Pierre et Marie Curie-Paris 6, Paris, France. E-mail: [email protected] 2 Summary New results on functional prediction of the Ornstein-Uhlenbeck process in an autoregressive Hilbert-valued and Banach-valued frameworks are derived. Specifically, consistency of the maximum likelihood estimator of the autocorrelation operator, and of the associated plug-in predictor is obtained in both frameworks. Key words: Autoregressive Hilbertian processes; Banach-valued autoregressive processes; consistency; maximum likelihood parameter estimator; Ornstein-Uhlenbeck process. 1 Introduction This paper derives new results in the context of linear processes in function spaces. An extensive literature has been developed in this context, in the last few decades (see, for example, Bosq (2000); Ferraty and Vieu (2006); Ramsay and Silverman (2005), among others). In particular, the problem of functional prediction of linear processes in Hilbert and Banach spaces has been widely addressed. We refer to the reader to the papers by: Bensmain and Mourid (2003); Bosq (1996); Bosq (2002); Bosq (2004); Bosq (2007); Dedecker and Merlevede (2003); Dehling and Sharipov (2005); Glendinning and Fleet (2007); Guillas (2000); Guillas (2001); Kargin and Onatski (2008); Labbas and Mourid (2003); Marion and Pumo (2004); Mas (2002); Mas (2004); Mas (2007); Mas and Menneteau (2003); Mas and Pumo (2007); Menneteau (2005); Mourid (2002); Mourid (2004); Mokhtari and Mourid (2002); Pumo (1998); Rachedi (2004); Rachedi (2005); Rachedi and Mourid (2003); Ruiz-Medina (2012); Turbillon, Marion and Pumo (2007); Turbillon et. al (2008), and the references therein. In the above-mentioned papers, different projection methodologies have been adopted in the derivation of the main asymptotic properties of the formulated functional parameter estimators and predictors. Particularly, Bosq (2000) and Bosq and Blanke (2007) apply Functional Principal Component Analysis; Antoniadis, Paparoditis and Sapatinas (2006) and Antoniadis and Sapatinas (2003) consider wavelet bases; Laukaitis, Vasilecas and Laukaitis (2009) propose wavelet estimation methods. 1 Applications of these functional estimation results can be found in the papers by: Antoniadis and Sapatinas (2003); Damon and Guillas (2002); Hormann and Kokoszka (2011); Laukaitis (2008); Ruiz-Medina and Salmern (2009), among others. We pay attention here to the problem of functional prediction of the Ornstein-Uhlenbeck (O.U.) process (see, for example, Uhlenbeck and Ornstein (1930), and Wang and Uhlenbeck (1945), for its introduction and properties). See also Doob (1942) for the classical definition of O.U. process from the Langevin (linear) stochastic differential equation. We can find in Kutoyants (2004) and Liptser and Shiraev (2001) an explicit expression of the maximum likelihood estimator (MLE) of the scale parameter θ, characterizing its covariance function. Its strong consistency is proved, for instance, in Kleptsyna and Le Breton (2002). We formulate here the O.U. process as an Autoregressive Hilbertian process of order one (ARH(1) process), and as an Autoregressive Banach -valued process of order one (ARB(1) process). Consistency of the MLE of θ is applied to prove consistency of the corresponding MLE of the autocorrelation operator of the O.U. process. We adopt the methodology applied in Bosq (1991), since our interest relies on forecasting the values of the O.U. process over an entire time interval. Specifically, considering the O.U. process {ξt }t∈R , on the basic probability space (Ω, A, P ), we can define 0 ≤ t ≤ h, n ∈ Z, Xn (t) = ξnh+t , (1) satisfying Xn (t) = ξnh+t = Z nh+t e−θ(nh+t−s) dWs = ρθ (Xn−1 ) (t) + εn (t) , −∞ n ∈ Z, (2) with ρθ (x) (t) = e −θt x (h) , ρθ (Xn−1 ) (t) = e −θt Z nh e −θ(nh−s) dWs , εn (t) = −∞ Z nh+t e−θ(nh+t−s) dWs , nh (3) for 0 ≤ t ≤ h. Thus, X = (Xn , n ∈ Z) satisfies the ARH(1) equation (2) (see also equation (5) below for  its general definition). The real separable Hilbert space H is given by H = L2 [0, h] , β[0,h] , λ + δ(h) , where β[0,h] is the Borel σ-algebra generated by the subintervals in [0, h] , λ is the Lebesgue measure, and δ(h) (s) = δ (s − h) is the Dirac measure at point h. The associated norm kf kH=L2 ([0,h],β[0,h] ,λ+δ(h) ) = s Z h f 2 (t)dt + f 2 (h) 0 establishes the equivalent classes of functions given by the relationship f ∼λ+δ(h) g if and only if 2  λ + δ(h) ({t : f (t) 6= g (t)}) = 0, with  λ + δ(h) ({t : f (t) 6= g (t)}) = 0 ⇔ λ ({t : f (t) 6= g (t)}) = 0 and f (h) = g (h) , (4) where, as before, δ(h) is the Dirac measure. We will prove, in Lemma 1 below, that X = (Xn , n ∈ Z), constructed in (1) from the O.U. process, satisfying equations (2)–(3), is the unique stationary solution  to equation (2), in the space H = L2 [0, h] , β[0,h] , λ + δ(h) , admitting a MAH(∞) representation. Similarly, in Lemma 4 below, we will prove that X = (Xn , n ∈ Z), constructed in (1) from the O.U. process, satisfying equations (2)–(3), is the unique stationary solution to equation (2), admitting a MAB(∞) representation, in the space B = C ([0, h]) , the Banach space of continuous functions, whose support is the interval [0, h] , with the supremum norm. The main results of this paper provide the almost surely convergence to ρθ of the MLE ρθb of ρθ , in the norm of L(H), the space of bounded linear operators in the Hilbert space H (respectively, in the norm of L(B), the space of bounded linear operators in the Banach space B). The convergence in probability of the associated plug-in ARH(1) and ARB(1) predictors, i.e., the convergence in probability of ρθb(Xn−1 ) to ρθ (Xn−1 ) in H and B, respectively, is proved as well. The outline of this paper is as follows. In Section 2, the main results of this paper are obtained. Specifically, Section 2.1 provides the definition of O.U. process as an ARH(1) process. Strong consistency in L(H) of the estimator of the autocorrelation operator is derived in Section 2.2. Consistency in H of the associated plug-in ARH(1) predictor is then established in Section 2.3. The corresponding results in Banach spaces are given in Section 2.4. For illustration purposes, a simulation study is undertaken in Section 3. Final comments can be found in Section 4. (The basic preliminary elements applied in the proof of the main results of this paper and the proof of Lemma 1 can be found in the supplementary material). 2 Prediction of O.U. process in Hilbert and Banach spaces In this section, we consider H to be a real separable Hilbert space. Recall that a zero-mean ARH(1) process X = (Xn , n ∈ Z), on the basic probability space (Ω, A, P ), satisfies (see Bosq (2000)) Xn = ρ (Xn−1 ) + εn , n ∈ Z, (5) where ρ denotes the autocorrelation operator of process X. Here, ε = (εn , n ∈ Z) is assumed to be a strong-white noise, i.e., ε is a Hilbert-valued zero-mean stationary process, with independent and identically distributed components in time, and with σ 2 = Ekεn k2H < ∞, for all n ∈ Z. 3 2.1 O.U. process as ARH(1) process As commented in the Introduction, equations (1)–(3) provide the definition of O.U. process as an ARH(1)   process, with H = L2 [0, h] , β[0,h] , λ + δ(h) . The norm in the space H = L2 [0, h] , β[0,h] , λ + δ(h) of ρθ (x), with ρθ introduced in (3) and x ∈ H, is given by kρθ (x)k2H = Z h  2 |ρθ (x) (t) | d λ + δ(h) (t) = 0 Z 0 h |ρθ (x) (t) |2 dt + |ρθ (x) (h) |2 , (6) for each h strictly positive. The following lemma provides, for each k ≥ 1, the exact value of the norm  of ρkθ , in the space of bounded linear operators on L2 [0, h] , β[0,h] , λ + δ(h) . As a direct consequence, the existence of k0 such that kρkθ kL(H) < 1, for k ≥ k0 , is also derived for θ > 0. Lemma 1 Let us consider, for n ∈ Z, Xn satisfying equations (1)–(3). For each k ≥ 1, the norm of ρkθ is given by kρkθ kL(H) Furthermore, for k ≥ k0 = = 1 θ r +1 e−2θ(k−1)h + 1 + e−2θh (2θ − 1) = e−θ(k−1)h kρθ kL(H) . 2θ (7) kρkθ kL(H) < 1, (8) , where [t]+ denotes the closest upper integer of t, for every t ∈ R+ . The proof of this lemma can be found in the supplementary material. Remark 1 From equation (8), applying Theorem 3.1. in Bosq (2000), p. 74, Lemma 1 implies that X = (Xn , n ∈ Z), constructed in (1) from O.U. process, defines the unique stationary solution to  equation (2) in the space H = L2 [0, h] , β[0,h] , λ + δ(h) , admitting the MAH(∞) representation Xn = +∞ X ρkθ (εn−k ) , n ∈ Z, ρθ ∈ L (H) . k=0 (9)  k Remark 2 Note that, for all x ∈ H, and k ≥ 2, kρkθ kL(H) ≤ kρθ kL(H) . 2.2 Functional parameter estimation and consistency We now prove strong consistency of the estimator ρθbn of operator ρθ in L(H), with, as before,  H = L2 [0, h] , β[0,h] , λ + δ(h) , and θbn denoting the MLE of θ, based on the observation of O.U. process on the interval [0, T ], with T = nh. Note that, from equation (3), for all x ∈ H, and for a given sample b size n, ρθbn (x) = e−θn t x (h) , where the MLE of θ is given, for T = nh, by ξ2 θbT = ξ2 1 + T0 − TT , R 2 T 2 ξ dt t T 0 4 T > 0, (10) with ξt , t ∈ [0, T ], being the observed values of the O.U. process over the interval [0, T ]. Thus, ρθbn is introduced in an abstract way, since it can only be explicitly computed, for each particular function x ∈ H considered. However, the norm kρθ − ρθbn kL(H) is explicitly computed in equation (13) below. The following results will be applied in the proof of Proposition 1. Lemma 2 If t ∈ [0, +∞), it holds that |e−ut − e−vt | ≤ |u − v|t, for any u, v ≥ 0. The proof of this lemma is given in the supplementary material. Theorem 1 (see Kleptsyna and Le Breton (2002), Proposition 2.2, p. 4, and Kutoyants (2004), p. 63 and p. 117). The MLE of θ defined in equation (10) is strongly consistent, i.e., lim θbT = θ T →∞ almost surely. (11) The proof follows from Ibragimov-Khasminskii’s Theorem.  Proposition 1 Let H be the space L2 [0, h] , β[0,h] , λ + δ(h) . Then, the estimator ρθbn of operator ρθ , based on the MLE θbn of θ, is strongly consistent in L (H) , i.e., kρθ − ρθbn kL(H) →a.s. 0. (12) Proof. The following straightforward almost surely identities are obtained: kρθ − ρθbn kL(H) = sup      k ρθ − ρθb (x) kH  n   kxkH v  uZ h     u      2   | ρ − ρ (x) (t) | d λ + δ (t) u θ  b (h) θn u 0 u = sup u Z h   x∈H  t    |x (t) |2 d λ + δ(h) (t)     0  v u Z h 2  2   u   b b    e−θt − e−θnt dt + e−θh − e−θn h   u u 0 u 2 = sup ux (h) Z h  x∈H  t     x2 (t) dt + x2 (h)     x∈H 0 = s Z 0 h 2 2   b b e−θt − e−θn t dt + e−θh − e−θnh , (13) where the last identity is obtained in a similar way to equation (7) in Lemma 1 (see also equations (26)–(30) in the supplementary material). 5 From Lemma 2 and equation (13), for n sufficiently large, we have kρθ − ρθbn kL(H) ≤ = s Z h t |θ − θbn | dt + h |θ − θbn | = |θ − θbn | 2 0 |θ − θbn |h 2 r 2 2 s Z h t2 dt + h2 0 h + 1 almost surely. 3 (14) The strong-consistency of ρθbn in L (H) directly follows from Theorem 1 and equation (14).  Remark 3 From Proposition 2.3(i) in Kleptsyna and Le Breton (2002), p. 5 (see also Theorem 2 below), the MLE θbT of θ satisfies E  θ − θbT 2  =O  2θ T  , T → ∞. (15) In addition, from equation (14), considering T = nh, h > 0,  i h i h h +1 . E kρθ − ρθbn k2L(H) ≤ E |θ − θbn |2 h2 3 (16) Equations (15) and (16) lead to with G(θ, θbn , h) = O consistent. 2θ n  i h E kρθ − ρθbn k2L(H) ≤ G(θ, θbn , h), , n → ∞. Therefore, the functional parameter estimator ρθbn of ρθ is √ n- 2.3 Consistency of the plug-in ARH(1) predictor bn , constructed from the MLE ρ b of ρθ in Proposition Let us consider the plug-in ARH(1) predictor X θn 1, given by bn (t) = ρ b (Xn−1 ) (t) = e−θbn t Xn−1 (h) , X θn 0 ≤ t ≤ h, n ∈ Z. (17) bn , given in equation (17), from Proposition 1 by Corollary 1 below provides the consistency of X applying the following lemma and theorem.  1 Lemma 3 Let {Zn }n∈Z be a sequence of random variables such that Zn ∼ N 0, 2θ , with θ > 0, p and let {Yn }n∈Z be another sequence of random variables such that ln (n)Yn →p 0, n → ∞. Then, Yn |Zn | →p 0, n → ∞, where, as usual, →p indicates convergence in probability. The proof of this lemma can be found in the supplementary material. 6 Theorem 2 Let θbT be the MLE of θ defined in equation (10), with θ > 0. Hence, E  θ − θbT 2  In particular, lim E T →∞ =O   2θ T θ − θbT  , 2  T → ∞. (18) = 0. (19) The proof of this result is given in in Proposition 2.3(i) in Kleptsyna and Le Breton (2002), p. 5.  Corollary 1 Let H = L2 [0, h] , β[0,h] , λ + δ(h) be the Hilbert space introduced above. Then, the plug-in ARH(1) predictor (17) of O.U. process is consistent in H, i.e.,   k ρθ − ρθbn (Xn−1 ) kH →p 0. (20) Proof. By definition,   k ρθ − ρθbn (Xn−1 ) kH = |Xn−1 (h) | s Z h 0  b e−θt − e−θn t 2 2  b dt + e−θh − e−θn h . (21) From equations (13)–(14) and (21), we then obtain, for n sufficiently large, r   h b + 1 a.s. k ρθ − ρθbn (Xn−1 ) kH ≤ |Xn−1 (h) ||θ − θn |h 3 (22)   q h b |θ − θn |h 3 + 1 Let us set {Yn }n∈Z = and {Zn }n∈Z = {Xn−1 (h)}n∈Z , with n∈Z  1 Xn−1 ∼ N 0, 2θ , for every n ∈ Z. From Theorem 1, Yn →a.s. 0, n → ∞. Hence, to apply Lemma 3, we need to prove that p ln (n)Yn →p 0, n → ∞. (23) From Chebyshev’s inequality and Theorem 2, we get, for all ε > 0, P p |θ − θbn | ln (n)h r h +1≥ε 3 ! h2 ≤ h 3 i h  + 1 ln (n) E |θ − θbn |2 ε2 →n→+∞ 0. (24)   Therefore, from Lemma 3, we obtain the convergence in probability of k ρθ − ρθbn (Xn−1 ) kH to zero.  2.4 Prediction of O.U. process in B = C ([0, h]) As before, let B be now the Banach space of continuous functions, whose support is the interval [0, h], with the supremum norm, denoted as C ([0, h]) . The following lemma states that kρkθ kL(B) ≤ 1, for 7 θ > 0, and for every k ≥ 1, with L (B) being the space of bounded linear operators on the Banach space B = C ([0, h]) , and ρθ being introduced in equation (3). Consequently, considering condition (c1 ) in Bosq (2000), p. 74, with a = 2, b = 1/2 and j = 1, from Lemma 3.1 and Theorem 3.1, in Bosq (2000), pp. 74–75, X = (Xn , n ∈ Z), constructed in (1) from O.U. process, defines the unique stationary solution to equation (2), in the Banach space B = C ([0, h]) , admitting a MAB(∞) representation. Lemma 4 Let ρθ introduced in (3), defined on B = C ([0, h]) . Then, for k ≥ 1, kρkθ kL(B) ≤ 1, with θ > 0. Proof. From ρkθ (x)(t) = e−θt e−θ(k−1)h x(h), for each k ≥ 1 and θ > 0, we have kρkθ kL(B) = sup x∈B = =  kρkθ (x) kB kxkB  = sup x∈B sup0≤t≤h | exp(−θt) exp(−θ(k − 1)h)x(h)| sup0≤t≤h |x(t)| |x(h)| exp(−θ(k − 1)h) sup0≤t≤h exp(−θt) |x(h)| sup0≤t≤h exp(−θt) sup ≤ sup sup0≤t≤h |x(t)| |x(h)| x∈B x∈B sup exp(−θt) = 1. (25) 0≤t≤h  We now check strong consistency of the MLE ρθbn of ρθ in L(B). From (25), b kρθ − ρθbn kL(B) ≤ sup |e−θt − e−θn t |, a.s. (26) 0≤t≤h From Lemma 2, for n sufficiently large, we then have kρθ − ρθbn kL(B) ≤ h|θ − θbn |, a.s. (27) Theorem 1 then leads to the desired result on strong consistency of the estimator ρθbn of ρθ in L(B). √ Furthermore, from Theorem 2 , in a similar way to Remark 3, n-consistency of ρθbn in L (B) also follows from equations (18) and (27). Similarly to Corollary 1, in the following result, the consistency, in the Banach space B = C([0, h]), of the plug-in predictor (17) is obtained. Corollary 2 The ARB(1) plug-in predictor (17) of a zero-mean O.U. process is consistent in B = 8 C([0, h]), i.e., as n → ∞,   k ρθ − ρθbn (Xn−1 ) kB →p 0. (28) Proof. From Lemma 2, for n sufficiently large, and for each h > 0,   k ρθ − ρθbn (Xn−1 ) kB = b sup |e−θt − e−θnt ||Xn−1 (h) | ≤ h|θ − θbn ||Xn−1 (h) |, a.s. (29) 0≤t≤h n o As derived in the proof of Corollary 1, from Theorem 2, the random sequence {Yn }n∈Z = h|θ − θbn | n∈Z q p p is such that ln (n)Yn ≤ h3 + 1 ln (n)Yn →p 0, n → ∞. Moreover, {Zn }n∈Z = {Xn−1 (h)}n∈Z is such  1 . Lemma 3 then leads, as n → ∞, to the desired convergence result from equathat Xn−1 (h) ∼ N 0, 2θ tion (29)   k ρθ − ρθbn (Xn−1 ) kB ≤ Yn |Zn | →p 0. (30)  3 Simulations In this section, a simulation study is undertaken to illustrate the asymptotic results presented in this paper about the MLE θbn of θ, and the consistency of the ML functional parameter estimators of the autocorrelation operator, and the associated plug-in predictors, in the ARH(1) and ARB(1) frameworks. 3.1 Estimation of scale parameter θ For simulation of the sample-paths of O.U. process, an extension of the Euler method, the EulerMurayama method (see Kloeden and Platen (1992)) is applied, from the Langevin stochastic differential equation satisfied by the O.U. process {ξt , t ∈ [0, T ]} dξt = −θξt + dWt , θ > 0, t ∈ [0, T ] , ξ0 = x0 . (31) Thus, let 0 = t0 < t1 < t2 < · · · < tn = T be a partition of real interval [0, T ] . Then, (31) can be discretized as ξbi+1 = ξbi − θξbi + ∆Wi , ξb0 = ξ0 = 0, where {∆Wi }i=0,...,n−1 are i.i.d. Wiener increments, i.e., ∆Wi ∼ N (0, ∆t) = (32) √ ∆tN (0, 1). In the following, we take ∆t = 0.02 as discretization step size, considering N = 1000 simulations of the O.U. process. In particular, Figure 1 shows some realizations of the discrete version of the solution to (31) generated from (32). 9 1 0.8 0.6 0.4 0.2 0 −0.2 −0.4 −0.6 Figure 1: Three sample paths of O.U. process {ξt }0≤t≤T generated with T = 5, ∆t = 0.02, θ = 5, ξb0 = 0 −0.8 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Let us first illustrate the asymptotic normal distribution of θbT , i.e., for T sufficiently large, we can  (see Theorem 1 in the supplementary material). consider θbT ∼ N θ, 2θ T Z T − ξt dξt From equation (10), we take θbT = Z 0T (see also equation (9) in the supplementary material), 2 ξt dt 0 to compute the following approximation of the MLE θbT of θ, for each one of the N = 1000 simulations performed of the O.U. process on [0, T ], and for each one of the six values of parameter θ considered: θbT ≃ − n−1 X i=0   ξbti ,s (θ) ξbti+1 ,s (θ) − ξbti ,s (θ) n−1 X i=0 , t0 = 0, tn = T, ∆t = 0.02, s = 1, . . . , N, (33) ξbt2i ,s (θ)∆t where ξbti ,s (θ) represents the s-th discrete generation of the O.U. process, evaluated at time ti , with covariance scale parameter θ, for θ = 0.1, 0.4, 0.7, 1, 2, 5. Table 1 displays the empirical probabilities q of the error θbT − θ to be within the band ±3 2θ T , from N = 1000 discrete simulations of the O.U. process, considering different sample sizes T = 12000 + 1000(l − 1), l = 1, . . . , 7, and the values θ = 0.1, 0.4, 0.7, 1, 2, 5. Figure 2 displays the cases θ = 0.1 (at the left-hand side) and θ = 5 (at the right-hand side). It can be observed that, for each one of the sample sizes considered, T = 12000 + 1000(l − 1), l = q 1, . . . , 7, approximately a 99% of the realizations of θbT − θ lie within the band ±3 2θ T , which supports the asymptotic Gaussian distribution. 10 Figure 2: The values of θbT − θ, based on N = 1000 simulations of the O.U. process over the interval [0, T ], forqT = 12000 + (l − 1)1000, l = 1, . . . , 7, are q represented against the confidence bands given by +3σ = 3 2θ T (upper dotted line) and −3σ = −3 side) and θ = 5 (at the right-hand side) 2θ T (lower dotted line), for θ = 0.1 (at the left-hand T \θ 0.1 0.4 0.7 1 2 5 12000 0.9983 1 0.9983 0.9983 1 0.9983 13000 0.9967 0.9983 0.9983 1 0.9950 1 14000 0.9983 0.9967 1 0.9967 1 0.9983 15000 0.9983 0.9967 0.9983 0.9983 1 0.9983 16000 0.9967 0.9950 0.9967 0.9983 1 1 17000 0.9933 0.9983 1 0.9967 0.9950 1 18000 0.9967 0.9967 0.9950 1 1 0.9983 Table 1: Empirical probabilities of the error of the MLE of θ to lie within the band ±3σ = ±3 different sample sizes T, and values of parameter θ q 2θ T , for Regarding asymptotic efficiency, stated in Theorem 2, from N = 1000 simulations of the O.U. process over the interval [0, T ], for T = 50 + 250(l − 1), l = 1, . . . , 25, the corresponding empirical mean square N  2 X 1 errors EM SEN,T (θ) = N θ − θbT (ωs ) , N = 1000, T = 50 + 250(l − 1), l = 1, . . . , 25 (abbreviated s=1 as EMSE), considering the cases θ = 0.1, 0.4, 0.7, 1, are displayed in Figure 3. Here, θbT (ωs ), ωs ∈ Ω, s = 1, . . . , N, represent the respective approximated values (33) of the MLE of θ, computed from ξti ,s , s = 1, . . . , N, ti ∈ [0, T ], i = 1, . . . , n. It can be observed, from the results displayed in Figure 3, that Theorem 2 holds for T sufficiently large. 11 −3 x 10 4 3.5 3 2.5 2 1.5 1 0.5 0 1000 1500 2000 2500 3000 3500 4000 4500 5000 5500 6000 Figure 3: Empirical functional mean quadratic errors, based on N = 1000 generations of O.U. process, for different sample sizes (see horizontal axis), and for the values θ = 0.1 (line with stars), θ = 0.4 (line with circles), θ = 0.7 (line with crosses), θ = 1 (line with inclined crosses) and θ = 2 (line with triangles) 3.2 Consistency of ρθbT = ρθbn in L(H) and L(B) The strong-consistency of ρθbn in L(H) is derived in Proposition 1 from the following almost surely upper bound kρθ − ρθbn k2L(H) ≤ |θ − θbn |h r h + 1. 3 (34) Here, from N = 1000 simulations of the O.U. process on the interval [0, T ], with T = nh = n = 200000 + (l − 1)200000 (h = 1), for l = 1, . . . , 5, the corresponding values of θbT − θ = θbn − θ are computed, considering the cases θ = 0.4, 0.7, 1. Table 2 shows the empirical probability of θbT − θ to lie q within the band ±3 2θ T , for each one of sample sizes T = 200000 + (l − 1)200000, l = 1, . . . , 5, and cases θ = 0.4, 0.7, 1, considered. It can be observed that for the sample sizes studied, in the case of θ = 1, the empirical probabilities are equal to one. Thus, the almost surely convergence to zero of the upper √ √ bound (34) holds, with approximated convergence rate T = n. Note that, for the other two cases, θ = 0.4 and θ = 0.7, the empirical probabilities are also very close to one (see also Table 1 for smaller sample sizes, where we can also observe the empirical probabilities very close to one for the same band). In particular, Figure 4 displays the cases θ = 0.4 (at the left-hand side) and θ = 1 (at the right-hand side). 12 T \θ 0.4 0.7 1 200000 1 1 1 400000 1 1 1 600000 0.9988 1 1 800000 0.9988 0.9988 1 1000000 0.9977 1 1 q Table 2: Empirical probability of θbT − θ to be within the band ±3σ = ±3 2θ T , from N = 1000 simulations of O.U. process over the interval [0, T ], with T = n = 200000 + (l − 1)200000, l = 1, . . . , 5, considering the cases θ = 0.4, 0.7, 1 Figure 4: The values of θbT − θ are represented, corresponding to N = 1000 simulations of O.U. process over the interval [0, T ], with T = n = 200000 + (l − 1)200000, l = 1, . . . , 5, considering q the cases θ = 0.4 (at the left-hand side), and θ = 1 (at right-hand side). The upper dotted line is +3 q dotted line is −3 2θ T 2θ T and the lower It can be observed from Table 2 that a better performance is obtained for the largest values of θ, which corresponds to the weakest dependent case. Furthermore, from the upper bound (27), the strong consistency of ρθbn in L(B), with, as before, B = C([0, h]), is also illustrated from the results displayed in Table 2 and Figure 4. 3.3 Consistency of the ARH(1) and ARB(1) plug-in predictors for the O.U. process Let us now consider the derived upper bounds (22) and (29) in Corollaries 1 and 2, for the ARH(1) and ARB(1) predictors, respectively. From the generation of N = 1000 discrete realizations of the O.U. process over the interval [0, T ], for T = n = 200000 + (l − 1)200000, l = 1, . . . , 5, the upper bounds (22) and (29) are evaluated, for the cases θ = 0.4, 0.7, 1. The following empirical probabilities for ε2 = 0.008, " # r h H b b b Pθ,N (T ) = 1 − P |Xn−1 (h) ||θ − θn |h +1>ε 3 N = 1000, T = n = 200000 + (l − 1)200000, l = 1, . . . , 5, θ = 0.4, 0.7, 1, h i B Pbθ,N (T ) = 1 − Pb |Xn−1 (h) ||θ − θbn |h > ε N = 1000, T = n = 200000 + (l − 1)200000, l = 1, . . . , 5, θ = 0.4, 0.7, 1, 13 (35) (36) q Figure 5: The values of |Xn−1 (h) ||θ − θbn |h h3 + 1 (top) and |Xn−1 (h) ||θ − θbn |h (bottom) are represented, based on N = 1000 generations of O.U. process over the interval [0, T ], for T = n = 200000 + (l − 1)200000, l = 1, . . . , 5, against ε = 0.008 (horizontal dotted line), considering θ = 0.4 (at the left-hand side) and θ = 1 (at the right-hand side) are reflected in Table 3, for the Hilbert-valued (see (22)) and Banach-valued (see (29)) frameworks (see also Figure 5). It can be observed that the empirical probabilities are equal to one in both frameworks for the largest sample sizes, in any of the cases considered. Hilbert-valued case Banach-valued case T \θ 0.4 0.7 1 0.4 0.7 1 200000 0.9800 0.9800 0.9800 0.9871 0.9906 0.9871 400000 0.9953 0.9953 0.9953 0.9965 0.9977 0.9977 600000 0.9988 0.9977 0.9988 0.9988 0.9988 1 800000 1 0.9988 0.9988 1 1 1 1000000 1 1 1 1 1 1 Table 3: Empirical probabilities (35) and (36), based on N = 1000 simulations of the O.U. process over the interval [0, T ], for T = n = 200000 + (l − 1)200000, l = 1, . . . , 5, considering the cases θ = 0.4, 0.7, 1, and ε2 = 0.008 The strong-consistency of the MLE of θ and of the autocorrelation operator of the O.U. process, in Banach and Hilbert spaces, has been first illustrated. The almost surely rate of convergence to zero is shown as well. The numerical results on the consistency of the associated ARH(1) and ARB(1) plug-in predictors then follow, from the computation of the corresponding empirical probabilities for the derived upper bounds. Note that the numerical results displayed in Section 3 are obtained under generation of sample sizes ranging from 12000 up to a million of time instants, considering 1000 repetitions for each one of such sample sizes. In all these simulations performed, the discretization step size considered has 14 been ∆t = 0.02. 4 Final comments The problem of functional prediction of the O.U. process could be of interest in several applied fields. For example, in finance, in the context of Vasicek model (see Vasicek (1977)) the results derived allow to predict the curve representing the interest rate over a temporal interval, in a consistent way. Note that, in this context, the ML estimate computed for parameter θ provides a consistent approximation of the speed reversion, which univocally determines the proposed functional predictor of the interest rate. Summarizing, this paper addresses the problem of functional prediction of the O.U. process from ARH(1) and ARB(1) perspectives. Specifically, considering the O.U. process as an ARH(1) and an ARB(1) process, new results on strong consistency (almost surely convergence to the true parameter value), in the spaces L(H) and L(B) of the MLE of its autocorrelation operator are derived. Consistency results (convergence in probability to the true value) of the associated plug-in predictors are obtained as well. The numerical results shown, in addition, the normality and the asymptotic efficiency of the MLE of the scale parameter θ of the covariance function of the O.U. process. Acknowledgements This work has been supported in part by projects MTM2012-32674 (co-funded by European Regional Development Funds), and MTM2015–71839–P of the DGI, MINECO. References [1] Antoniadis, A., Paparoditis, E. and Sapatinas, T. (2006). A functional wavelet-kernel approach for time series prediction, J. R. Stat. Soc. Ser. B Stat. Methodol. 68 837–857. [2] Antoniadis, A. and Sapatinas, T. (2003). Wavelet methods for continuous-time prediction using Hilbertvalued autoregressive processes, J. Multivariate Anal. 87 133–158. [3] Bensmain, N. and Mourid, T. (2001). Estimateur ”sieve” de l’opérateur d’un processus ARH(1). C. R. Acad. Sci. Paris Sér. I Math. 332 1015–1018. [4] Bosq, D. (1991). Modelization, nonparametric estimation and prediction for continuous time processes. Nonparametric functional estimation and related topics (Spetses, 1990) 335 NATO Adv. Sci. Inst. Ser. C Math. Phys. Sci. Kluwer Acad. Publ. Dordrecht 509–529. [5] Bosq, D. (1996). Limit theorems for Banach-valued autoregressive processes. Applications to real continuous time processes. Bull. Belg. Math. Soc. Simon Stevin 3 537–555. 15 [6] Bosq, D . (2000). Linear Processes in Function Spaces. Springer-Verlag, New York. [7] Bosq, D. (2002). Estimation of mean and covariance operator of autoregressive processes in Banach spaces. Stat. Inference Stoch. Process. 5 287–306. [8] Bosq, D. (2004). Standard Hilbert moving averages. Ann. I.S.U.P. 48 17–28. [9] Bosq, D. (2007). General linear processes in Hilbert spaces and prediction, J. Stat. Plann. Inference 137 879–894. [10] Bosq, D. and Blanke, D. (2007). Inference and Predictions in Large Dimensions. John Wiley, Chichester. [11] Damon, J. and Guillas, S. (2002). The inclusion of exogenous variables in functional autoregressive ozone forecasting. Environmetrics 13 759–774. [12] Dedecker, J. and Merlevede, F. The conditional central limit theorem in Hilbert spaces. Stochastic processes and their applications 108, 2003, pp. 229–262. [13] Dehling, H. and Sharipov, O. S. (2005). Estimation of mean and covariance operator for Banach space valued autoregressive processes with dependent innovations. Stat. Inference Stoch. Process. 8 137–149. [14] Doob, J. L. (1942). The Brownian movement and stochastic equations. Annals of Mathematics 43 319–337. [15] Ferraty, F. and Vieu, P. (2006). Nonparametric Functional Data Analysis. Springer Series in Statistics, Springer, New York. [16] Glendinning, R. and Fleet, S. (2007). Classifying functional time series. Signal Process. 87 79–100. [17] Guillas, S. (2000). Noncausality and functional discretization, limit theorems for an ARHX(1) process. C. R. Acad. Sci. Paris 331 Série I 91–94. [18] Guillas, S. (2001). Rates of convergence of autocorrelation estimates for autoregressive Hilbertian processes. Statist. Probab. Lett. 55 281–291. [19] Hormann, S. and Kokoszka, P. (2011). Consistency of the mean and the principal components of spatially distributed functional data. Recent advances in functional data analysis and related topics. Contrib. Statist. Physica-Verlag/Springer, Heidelberg, pp. 169–175. [20] Kargin, V. and Onatski, A. (2008). Curve forecasting by functional autoregression. J. Multivariate Anal. 99 2508–2526. [21] Kleptsyna, M.L. and Le Breton, A. (2002). Statistical analysis of the fractional Ornstein-Uhlenbeck type process. Statistical Inference for Stochastic Processes 5 229–248. [22] Kloeden, P. E. and Platen, E. (1992). Numerical Solution of Stochastic Differential Equations. Springer, Berlin 16 [23] Kutoyants, Y. (2004). Statistical Inference for Ergodic Diffusion Processes. Springer Series in Statistics, London. [24] Labbas, A. and Mourid, T. (2003). Estimation et prévision d’un processus autorégressif Banach. Ann. I.S.U.P. 47 19–38. [25] Laukaitis, A. (2008). Functional data analysis for cash flow and transactions intensity continuous-time prediction using Hilbert-valued autoregressive processes. Eur. J. Oper. Res. 185 1607–1614. [26] Laukaitis, A., Vasilecas, O. and Laukaitis R. (2009). Estimation of the autoregressive operator by wavelet packets. Statist. Probab. Lett. 79 38–43. [27] Liptser, R. S. and Shiraev, A. N. (2001). Statistics of Random Processes I, II. Springer, New York. [28] Marion, J.-M. and Pumo, B. (2004). Comparison of ARH(1) and ARHD(1) models on physiological data. Ann. I.S.U.P. 48 29–38. [29] Mas, A. (2002). Weak convergence for the covariance operators of a Hilbertian linear process. Stochastic Process. Appl. 99 117–135. [30] Mas, A. (2004). Consistance du prédicteur dans le modle ARH(1) : le cas compact. Ann. I.S.U.P. 48 39–48. [31] Mas, A. (2007). Weak convergence in the functional autoregressive model. J. Multivariate Anal. 98 1231– 1261. [32] Mas, A. and Menneteau, L. (2003). Large and moderate deviations for infinitedimensional autoregressive processes. J. Multivariate Anal. 87 241–260. [33] Mas, A. and Pumo, B. (2007). The ARHD model. J. Stat. Plann. Inference 137 538–553. [34] Menneteau, L. (2005). Some laws of the iterated logarithm in Hilbertian autoregressive models. J. Multivariate Anal. 92 405–425. [35] Mokhtari, F. and Mourid, T. (2002). Prédiction des processus á temps continu autorégressifs via les espaces á noyau reproduisant. C. R. Math. Acad. Sci. Paris 334 65–70. [36] Mourid, T. (2002). Estimation and prediction of functional autoregressive processes. Statistics 36 125–138. [37] Mourid, T. (2004). Processus autorégressifs hilbertiens á coefficients aléatoires. Ann. I.S.U.P. 48 79–85. [38] Pumo, B. (1998). Prediction of continuous time processes by C[0,1] -valued autoregressive process. Stat. Inference Stoch. Process. 1 297–309. [39] Rachedi, F. (2004). Vitesse de convergence de l’estimateur crible d’un ARB(1). Ann. I.S.U.P. 48 87–96. [40] Rachedi, F. (2005) Vitesse de convergence en norme p-intégrale et normalité asymptotique de l’estimateur crible de l’opérateur d’un ARB(1). C. R. Math. Acad. Sci. Paris 341 369–374. 17 [41] Rachedi, F. and Mourid, T. (2003). Estimateur crible de l’opérateur d’un processus ARB(1). C. R. Math. Acad. Sci. Paris 336 605–610. [42] Ramsay J.O. and Silverman, B.W. (2005). Functional Data Analysis. Springer Series in Statistics. Springer, New York. [43] Ruiz-Medina, M. D. (2012). Spatial functional prediction from spatial autorregresive Hilbertian processes. Environmetrics 23 119–128. [44] Ruiz-Medina, M. D. and Salmerón, R. (2009). Functional maximum-likelihood estimation of ARH(p) models. Stochastic Environ- mental Research and Risk Assessment 24 131–146. [45] Turbillon, C., Bosq, D., Marion, J. -M. and Pumo, B. (2008). Moving averages in Hilbert spaces, C. R., Math., Acad. Sci. Paris 346 347– 350. [46] Turbillon, C., Marion, J. -M. and Pumo, B. (2007). Estimation of the moving-average operator in a Hilbert space. In Recent advances in stochastic modeling and data analysis. World Sci. Publ., Hackensack, NJ, pp. 597–604. [47] Uhlenbeck, G. E. and Ornstein, L. S. (1930). On the theory of Brownian motion. Physical Review 36 823–841. [48] Vasicek, O. (1977). An equilibrium characterization of the term structure. J.Financial Economics 5 177– 188. [49] Wang, M. C. and G. E. Uhlenbeck (1945). On the theory of Brownian motion II. Reviews of Modern Physics 17 323–342. 18 Supplementary Material: Consistency of the plug-in functional predictor of the Ornstein-Uhlenbeck process in Hilbert and Banach spaces arXiv:1706.06354v1 [math.ST] 20 Jun 2017 Javier Álvarez-Liébana1 , Denis Bosq2 and M. Dolores Ruiz-Medina1 21st June 2017 1 Department of Statistics and O. R., University of Granada, Spain. LSTA, Université Pierre et Marie Curie-Paris 6, Paris, France. E-mail: [email protected] 2 Summary The definition and properties of O.U. process are given here, as well as the proof of Lemma 1. Key words: Autoregressive Hilbertian processes; Banach-valued autoregressive processes; consistency; maximum likelihood parameter estimator; Ornstein-Uhlenbeck process. 1 Ornstein-Uhlenbeck process Let ξ (ω) = {ξt (ω)}t∈R , ω ∈ Ω, be a real-valued sample-path continuous stochastic process defined on the basic probability space (Ω, Σ, P) , with index set the real line R. As demonstrated in Doob (1942), process ξ is an O.U. process if it provides the Gaussian solution to the following stochastic linear Langevin differential equation: dξt = θ (µ − ξt ) dt + σdWt , θ, σ > 0, t ∈ R, (1) (1) (2) where W = {Wt }t∈R is a standard bilateral Wiener process, i.e., Wt = Wt χR+ (t) + W−t χR− (t), with (1) Wt (2) and W−t being independent standard Wiener processes, and χR+ and χR− respectively denoting the indicator functions over the positive and negative real line. Applying, in equation (1), the method of separation of variables, considering f (ξt , t) = ξt eθt , we obtain ξt = µ+ Z t σe−θ(t−s) dWs , −∞ θ, σ > 0, t ∈ R, (2) where the integral is understood in the Itb o sense (see Ash and Gardner (1976) and Sobczyk (1991) for more details). Particularizing to ξ = {ξt }t∈R+ , the O.U. process is transformed into  ξt = ξ0 e−θt + µ 1 − e−θt + Z t σe−θ(t−s) dWs , 0 1 θ, σ > 0, t ∈ R+ . (3) It is well-known that the solution ξ = {ξt }t∈R to the stochastic differential equation dξt = µ (ξt , t) dt + p D (ξt , t)dWt , t ∈ R, (4) has marginal probability density function f (x, t) , satisfying the following Fokker-Planck scalar equation (see, for example, Kadanoff (2000)): ∂ −∂ 1 ∂2 [D (x, t) f (x, t)] , f (x, t) = [µ (x, t) f (x, t)] + ∂t ∂x 2 ∂x2 t ∈ R. (5) ∂ f (x, t) = 0), under f (x, x0 ) = δ (x − x0 ), In the case of O.U. process, the stationary solution ( ∂t adopts the form f (x, t) = r 2 θ −θ(x−µ) σ2 , e πσ 2 θ, σ > 0, t ∈ R, (6) which corresponds to the probability density function of a Gaussian distribution with mean µ and variance σ2 2θ , i.e., which corresponds to the probability density function of a random variable X such that   2 X ∼ N µ, σ2θ . From (2), the mean and covariance functions of O.U. process (see, for instance, Uhlenbeck and Ornstein (1930) and Doob (1942)) can be computed as follows: µξ (t) = E [ξt ] = µ + σE Z t −∞ Cξ (t, s)  e−θ(t−s) dWs = µ, t ∈ R, 2 −θ(t+s) = Cov [ξs , ξt ] = E [(ξs − µ) (ξt − µ)] = σ e = σ 2 e−θ(t+s) Z ∞ t θu e dWu −∞ e2θu χ[−∞,t] (u) χ[−∞,s] (u) du = σ 2 e−θ(t+s) −∞ = E Z σ 2 −θ|t−s| σ 2 −θ(t+s) 2θ min{s,t} e e = e , 2θ 2θ Z Z s −∞ min{s,t} θv e dWv  e2θu du −∞ t, s ∈ R, (7) where Cov [X, Y ] denotes the covariance between random variables X and Y . Additionally, from (3), we obtain the following identities: E [ξt ] = Cov [ξs , ξt |ξ0 = c] =  µe−θt + µ 1 − e−θt = µ, E [ξt |ξ0 = c] = µ + e−θt (c − µ) ,  σ 2 −θ|t−s| e + c2 − 2cµ + µ2 e−θ(s+t) , t, s ∈ R+ , 2θ where c is a constant. In the subsequent development, we will consider µ = 0 and σ = 1. 2 t ∈ R+ , (8) 2 Maximum likelihood estimation of the covariance scale parameter θ The MLE of θ in (7) is given by (see Graczyk and Jakubowski (2006), Kutoyants (2004), p. 63, and Liptser and Shiraev (2001), p. 265) Z T Z T Z T RT − ξt dξt θ ξt2 dt − ξt dWt ξt dWt 0 0 0 b θT = Z T = = θ − Z0 T , Z T 2 2 2 ξt dt ξt dt ξt dt 0 0 θ, T > 0. (9) 0 Thus, equation (9) becomes ξ2 θbT = ξ2 1 + T0 − TT , R 2 T 2 T 0 ξt dt T > 0. (10) We will assume that T is large enough such that θbT > 0 almost surely. It is well-known that the MLE θbT of θ is strongly consistent (see details in Kleptsyna and Le Breton (2002), Proposition 2.2, p. 4, and Kutoyants (2004), p. 63 and p. 117). Theorem 1 The following limit in distribution sense holds for the MLE θbT of θ, given in equation (10): √ RT  √  − T 0 ξt dWt b lim T θT − θ = lim = Z, Z T T →∞ T →∞ ξt2 dt with Z ∼ N (0, 2θ) . (11) 0 Theorem 1.1 and Corollary 1.1 in Jiang (2012), p. 2, lead to the following almost surely identities (see also Bosq (2000), Theorem 2.10, p. 54, and Ledoux and Talagrand (1991), pp. 196–203, in relation to the law of the iterated logarithm) lim sup q T →+∞ 4θ T − lim inf q θbT − θ = 1 a.s., θbT − θ = 1 a.s., log (log (T )) ! r 4θ log (log (T )) b |θ − θT | = O a.s. T T →+∞ 3 (12) log (log (T )) 4θ T (13) (14) Preliminary inequalities and results In this section we recall some inequalities and well-known convergence results on random variables, as well as basic deterministic inequalities, that have been applied in the derivation of the main results of 3 paper Consistency of the plug-in functional predictor of the Ornstein-Uhlenbeck process in Hilbert and Banach spaces  Lemma 1 Let X be a zero-mean normal distributed random variable, i.e., X ∼ N 0, σ 2 , with σ > 0. Then, x2 P (|X| ≥ x) ≤ e− 2σ2 , ∀x ≥ 0. (15) Proof. Let X ′ be such that X ′ ∼ N (0, 1) . Then, ′ P (|X | ≥ x) = 2FX ′ (−x) = r 2 π Z ∞ x t2 e− 2 dt, ∀x ≥ 0. (16) Let us set 2 − x2 − g (x) = e g ′ (x) = −xe− x2 2 r Z 2 ∞ − t2 e 2 dt, g (0) = 0, lim g (x) = 0, x→∞ π x ! r r x2 2 − x2 2 + e 2 = e− 2 −x . π π (17)  q   q 2 Function g is monotone increasing over 0, π2 , and g is monotone decreasing over π,∞ . From equations (16) and (17), P (|X ′ | ≥ x) ≤ e− Now, consider X ′ = X σ, x2 2 , ∀x ≥ 0.  with X ∼ N 0, σ 2 , then, x2 P (|X| ≥ x) ≤ e− 2σ2 , ∀x ≥ 0. (18)   1 , with θ > 0, Lemma 2 Let {Zn }n∈Z be a sequence of random variables such that Zn ∼ N 0, 2θ p and let {Yn }n∈Z be another sequence of random variables such that ln (n)Yn →p 0, n → ∞. Then, Yn |Zn | →p 0, n → ∞, where, as usual, →p indicates convergence in probability. Proof. Considering the indicator function χ(·) , it holds Yn |Zn | = Yn |Zn |χ{|Zn |<an } + Yn |Zn |χ{|Zn |≥an } ≤ Yn an + Yn |Zn |χ{|Zn |≥an } , (19)  where {an }n∈Z is a sequence of positive numbers such that the event Yn |Zn |χ{|Zn |≥an } is equivalent 4 to {|Zn | ≥ an }. From (19) and Lemma 1, if we take an > 2ε , for all n ∈ Z, we get   2 ε ε + P (|Zn | ≥ an ) ≤ P Yn an ≥ + e−θan , ∀ε > 0. P Yn an ≥ 2 2 P (Yn |Zn | ≥ ε) ≤ For an = c p ln (n) > 2ε , with X n∈Z √1 θ < c < +∞, P (|Zn | ≥ an ) ≤ X 2 e−θan = n∈Z X 1 < +∞, nθc2 (21) n∈Z which implies that limn→∞ P (|Zn | ≥ an ) = 0 in equation (20). On the other hand, since 0, for every ε > 0, 0 = lim P n→∞ (20) p ln (n)Yn →p  a p ε ε n ln (n)Yn ≥ = lim P Yn . ≥ n→∞ 2 c 2 (22) Thus, Yn |Zn | →p 0.  Lemma 3 If t ∈ [0, +∞), it holds that |e−xt − e−yt | ≤ |x − y|t, for any x, y ≥ 0. Proof. Let us first assume that x ≥ y > 0. From Mean Value Theorem applied over ez , there exists 0 < α < 1 such that ez+h −ez h |e−xt − e−yt | = = ez+αh . Taking z = −xt and z +h = −yt, we get the following inequalities: |x − y|te−xt+α(x−y)t = |x − y|text(α−1) e−yαt ≤ |x − y|te−yαt ≤ |x − y|t. (23) Similar inequalities are obtained for the case y ≥ x > 0, by applying Mean Value Theorem over interval [x, y] instead of [y, x].  4 Proof of Lemma 1 The proof of Lemma 1, appearing in Section 1.1 of the paper Consistency of the plug-in functional predictor of the Ornstein-Uhlenbeck process in Hilbert and Banach spaces, is now provided. Proof. Let us first consider the case k = 1, from ρθ (x) (t) = e−θt x (h) , ρθ (Xn−1 ) (t) = e−θt Z nh e−θ(nh−s) dWs , −∞ εn (t) = Z nh+t e−θ(nh+t−s) dWs , nh (24) and kρθ (x)k2H = Z 0 h  |ρθ (x) (t) |2 d λ + δ(h) (t) = 5 Z 0 h |ρθ (x) (t) |2 dt + |ρθ (x) (h) |2 , (25) we have kρθ kL(H) =  v ! u Z h   u   u −2θt −2θh 2 (h)    x e dt + e     u 0   kρθ (x) kH u . = sup u sup Z h t  kxkH x∈H  x∈H   2 2   x (t) dt + x (h)       (26) 0 Furthermore, trivially, kρθ kL(H) v ! u Z h u −2θt −2θh u x2 (h) sZ dt + e u 0 e h u e−2θt dt + e−2θh . = sup u ≤ Z h x∈H t 0 2 2 x (t) dt + x (h) (27) 0 Additionally, the function x0 : [0, h] −→ R, given by h ∈ M ⊂ [0, h], x0 (t) = χM (t), Z dt = 0, (28) M  with χM , denoting the indicator function of set M, belongs to H = L2 [0, h] , β[0,h] , λ + δ(h) , since Rh Rh x20 (h) = 1, 0 x20 (t)dt = 0, and kx0 k2H = 0 x20 (s)ds + x20 (h) = 1. Thus, by definition of kρθ kL(H) , kρθ (x0 )kH = kx0 kH s Z h e−2θt dt + e−2θh 0 ≤ kρθ kL(H) (29) Equations (26), (27) and (29) lead to kρθ kL(H) = s Z h e−2θt dt + e−2θh 0 = r 1 + e−2θh (2θ − 1) . 2θ (30) We are now going to compute kρkθ kL(H) , for k ≥ 2. Since, for all x ∈ H, ρkθ (x)(t) = e−θt e−θ(k−1)h x(h), we obtain kρkθ kL(H) vh i u u e−2θ(k−1)h R h e−2θt dt + e−2θkh x2 (h) u 0 = sup t . Rh x∈H x2 (t)dt + x2 (h) 0 (31) (32) Considering function x0 defined in equation (28), applying similar arguments to those given in the computation of kρθ kL(H) , we have kρkθ kL(H) = r e−2θ(k−1)h 1 + e−2θh (2θ − 1) = e−θ(k−1)h kρθ kL(H) . 2θ 6 (33) Now, from equation (30),  1 kρθ kL(H) < 1 ⇔ 1 − e−2θh < 2θ 1 − e−2θh ⇔ θ > . 2 (34) Furthermore, for θ ∈ (0, 1/2], kρθ kL(H) = since p √ α (θ) < 1 + h, (35) p α (θ) is a monotonically decreasing function on (0, 1/2] , with α (θ) = 1 if θ = 1 2 and α (θ) → 1+h, h > 0, (36) when θ → 0. Hence, if θ(k − 1) ≥ 1, kρkθ kL(H) =e −θ(k−1)h p p α (θ) ≤ e−h α (θ) < which implies that kρkθ 0 kL(H) < 1, when k0 ≥ 1 θ √ 1+h < 1, eh + 1.  References [1] Ash, R. B. and Gardner, M. F. (1976). Topics in stochastic processes, Bulletin of the American Mathematical Society 82 817–820. [2] Bosq, D. (2000). Linear Processes in Function Spaces. Springer-Verlag, New York. [3] Doob, J. L. (1942). The Brownian movement and stochastic equations. Annals of Mathematics 43 319–337. [4] Graczyk, P. and Jakubowski, T. (2006). Analysis of Ornstein-Uhlenbeck and Laguerre stochatic processes. Ecole CIMPA Familles orthogonales et semigroupes en analyse et probabilités http://math.univ-angers.fr/publications/prepub/fichiers/00229.pdf [5] Jiang, H. (2012). Berry-Essen bounds and the law of the iterated logarithm for estimators fo parameters in an Ornstein-Uhlenbeck process with linear drift, Journal of Applied Probability 49 978–989. [6] Kadanoff, L.P. (2000). Statistical Physics: Statics, Dynamics and Renormalization. World Scientific, Singapur. [7] Kleptsyna, M.L. and Le Breton, A. (2002). Statistical analysis of the fractional OrnsteinUhlenbeck type process. Statistical Inference for Stochastic Processes 5 229–248. [8] Kutoyants, Y. (2004). Statistical Inference for Ergodic Diffusion Processes. Springer Series in Statistics, London. 7 [9] Ledoux, M. and Talagrand, M. (1991). Probability in Banach spaces. Springer-Verlag, Berlin. [10] Liptser, R. S. and Shiraev, A. N. (2001). Statistics of Random Processes I, II. Springer, New York. [11] Sobczyk, K. (1991). Stochastic Differential Equations, with Applications to Physics and Engineering. Kluwer Academic Publishers, Dordrecht. [12] Uhlenbeck, G. E. and Ornstein, L. S. (1930). On the theory of Brownian motion. Physical Review 36 823–841. 8
10math.ST
Computer Simulation of 3-D Finite-Volume Liquid Transport in Fibrous Materials: a Physical Model for Ink Seepage into Paper arXiv:1307.2789v1 [cs.CE] 10 Jul 2013 Reza Farrahi Moghaddam and Fereydoun Farrahi Moghaddam and Mohamed Cheriet Synchromedia Laboratory for Multimedia Communication in Telepresence, École de technologie supérieure, Montreal, (QC), Canada H3C 1K3 Tel.: +1-514-396-8972 Fax: +1-514-396-8595 [email protected], [email protected], [email protected], [email protected] Abstract A physical model for the simulation ink/paper interaction at the mesoscopic scale is developed. It is based on the modified Ising model, and is generalized to consider the restriction of the finite-volume of ink and also its dynamic seepage. This allows the model to obtain the ink distribution within the paper volume. At the mesoscopic scale, the paper is modeled using a discretized fiber structure. The ink distribution is obtained by solving its equivalent optimization problem, which is solved using a modified genetic algorithm, along with a new boundary condition and the quasilinear technique. The model is able to simulate the finite-volume distribution of ink. Key words: Bleed-through phenomenon, Mesoscopic scale analysis, Porous medium, Fluid flow. 1 Introduction Historical documents and manuscripts are snapshots of the cultural past and the history of civilizations [2, 5]. They cannot be replaced by their modern counterparts, because marks or strokes on them that seem meaningless may reveal an important relationship to thought that would be unreachable in a transliteration. The task of preserving these cultural pearls is of great importance, therefore, as they are valuable resources that have survived threats to their existence many times over throughout the ages. However, they have become degraded by environmental factors, such as humidity and temperature, Preprint 10 July 2013 and by the aging process. Usually, the degree of the physical degradation is so great that other sources of degradation, such as that potentially caused by the imaging systems themselves, can be virtually ignored, especially since the camera-based imaging systems in use today in cultural archiving centers are of such high quality. Therefore, the main problem with old documents is physical degradation. At the same time, understanding historical manuscripts and extracting text and textual relationships from them is a challenging task [34, 36, 17]. Because of the degradation phenomenon, the ink may be faded or some parts of the text may be missed. Also, the background intensities could be very complex, and interfere with the analysis process. If a good understanding of the physical phenomena that control the interaction of paper and ink is not available, the tasks of preservation and understanding cannot be accomplished. A common phenomenon encountered in old documents is bleed-through [38, 13, 42, 22, 15, 14, 9, 37, 20, 18, 21, 19], which results in the appearance of interfering patterns and signatures on one side of the document originating from the ink strokes on the other side of it. The main problem with bleedthrough signatures is that they resemble text-like patterns because their origin is the text patterns on the other side of the paper. Not only does this reduce our ability to understand and process the document images, it also makes it difficult to enhance and restore these images. Therefore, features such as orientation, color, and regional and local features should be used to identify these patterns, which may also vary from one document image to another. It soon becomes clear that modeling this phenomenon, and, more accurately, modeling the ink-paper interaction, plays a central role in the processing of degraded document images. Understanding the ink seepage phenomenon is a challenging task, but it is an important requirement in document-related processing. This phenomenon can be considered as a fluid flow problem through a porous medium. The interaction of fluid with porous media is not limited to paper and ink, of course. From water transport in the soil to the oil industry [35, 39, 11, 41, 6], this interaction governs many critical and important physical problems. The application that is the most similar to the ink-paper problem is fabric printing. There is a big difference between these two applications, however. In fabric printing, the amount of ink involved is almost unlimited, and instead, gravity, time, and other parameters control the extent of ink seepage into the fabric structure. In contrast, in the ink-paper case, the amount of ink is the main constraint that determines the extent of ink propagation into the paper. Due to the limited amount of ink/water and other restrictions in the ink-paper problem, many of the approaches and methods that are based on stationary flow of the fluid, or reservoir-based transition flow, are not applicable. 2 (a) (b) (c) (d) Fig. 1. a) and b) X-ray images of paper structures (courtesy of [4]). c) X-ray images of a piece of wood (courtesy of [4]). d) A fiber structure, which resembles a real structure, generated as a domain for numerical simulation (courtesy of [40]). There are two main approaches to addressing the seepage phenomenon: physical experiments and numerical simulations. Although physical experiments seem to be more accurate, they are quite expensive, and the extraction of parameters of interest from the bulk of the physical material is difficult, in some cases introducing a large error. In contrast, thanks to remarkable developments in computational fluid dynamics, and also in computational hardware, numerical simulations now very nearly approach physical experiments in terms of accuracy. At the same time, the extraction of information from the output of numerical calculations is easy and straightforward. The porous nature of paper is the main cause of ink seepage, as paper is usually made up of a collection of cellulose fibers. Figures 1(a) and 1(b) show two close-up X-ray images of paper fiber structures. The image on left is an example of newsprint paper. For the sake of comparison, the fiber structure of wood is also provided, in Figure 1(c). As can be seen from the figure, a number of imperfections are introduced into the fiber structure in the process of paper-making. Many works have used numerically generated fiber structures to simulate the fluid and solid interaction [40]. A sample structure is shown 3 in Figure 1(d). The seepage phenomenon can be analyzed at different scales: macroscopic, mesoscopic, microscopic, and nanoscopic. The macroscopic scale is the most practical of these; however, it requires that the physics of the problem be known, in terms of some nonlinear diffusion coefficient. The microscopic scale can be used to analyze a single fiber, but the computational complexity of processing a fiber structure would be tremendously high. The nanoscopic scale enables a detailed study of the interactions within a single fiber. But, it is at the mesoscopic scale [16] that individual fibers and fiber structure can be observed at the same time. Analysis at this scale could be undertaken independently of the other scales, because, in addition to the possibility of observing the majority of the interactions, it offers the option of developing a model using many different approaches. An example of fluid saturation in a fiber structure, obtained in [4], is presented in Figure 2. A brief description of some of these approaches is provided in section A. In this work, a realistic model at the mesoscopic scale is developed. The new model is able to solve finite-volume fluid problems, which are critically important in the study of ink-paper interaction. To the best of our knowledge, no such model exists in the literature. The proposed model considers the individual fibers in the paper structure and follows the ink movement either within or between these fibers. In order to build this model, a new energy functional and a new boundary condition are introduced to model the finitevolume constraint. Also, a modified numerical optimization technique, based on the genetic algorithm (GA), is introduced to reduce computational cost. In this technique a quasi-linear approach is used to convert the nonlinear nature of the problem into a quasi-linear one which reduces that cost drastically. Fig. 2. Saturation profiles of the liquid in a fiber assembly (from [4]). The organization of the paper is as follows. In section A, a review of the various models used to study the propagation of fluid in the porous medium is presented. The problem statement is given in section 4. The process of 4 building the fiber structure at the mesoscopic scale is discussed in section 5. The formulation of the model, and especially the development of finite-volume behavior, is presented in section 6. Then, in section 7, two methods to solve the proposed model are provided, based on a global optimizer and a modified GA respectively. (We study various situations in this section.) Finally, our conclusion and some prospects for future research are presented in section 8. 2 Notation Here, following [24], a few of the notations used in the paper are introduced: • x and y: the coordinates that describe the paper surface. For 3D models, z represents the depth coordinate. • φ: the fiber field, which represents the fiber structure. If a point belongs to a fiber, φ is 1 at that point, otherwise φ is 0. • σ: the ink field, which is 1 at a point if ink exists at that point, and is 0 otherwise. Another variable related to the ink is σ̂. σ̂ is the same as σ, except that its values are 1 and −1 respectively. 3 The modified Ising Model The modified Ising models have been used in the study of solid-fluid interaction at mesoscopic scale [24, 27, 26, 31, 32, 25]. It assumes a lattice-based porous representation for the solid structure. Instead of modeling the interaction using complex transport coefficients of the macroscopic equations, it uses simple energy exchange mechanisms among the neighbors in the lattice. At this scale, the paper is almost equivalent to a fiber structure which consisting of a collection of fibers. Usually, the fiber structure is discretized into a collection of small cells. The material properties are assigned to the cells and to the mechanisms that control the interaction between neighboring cells. For example, a 3D model has been proposed in [27] to study the propagation of ink in the fabric to study the wetting process along a fiber bundle. The model is based on an energy functional: Et,0 = X (Eg,i + Ec,i + Ea,i ) (1) i where Et,0 is the total interaction energy of the ink/paper material, in which Eg,i , Ec,i , Ea,i are the gravitational, cohesive, and adhesive energy terms respectively: Eg,i = Gg σ̂i zi , Ec,i = −c1 σ̂i S1,i , 5 Ec,i = −A1 σ̂i F1,i where Gg is the gravity constant, σ̂i is the ink state of the cell i (also called the spin), and zi is the vertical position of that cell. σ̂i is 1 if the cell is filled with the fluid, and -1 if the cell in empty. S1,i is the ink state of the neighbors: X S1,i = σ̂j , j∈N1,i where N1,i is the set of cells that are the immediate neighbors of cell i: N1,i = {j|i and j share a wall}. A schematic diagram of N1 is shown in Figure 3(a). P The term i Ec,i stands for the cohesive energy between fluid particles. The last term in the total energy (1) is the adhesive term, and accounts for the adhesive interaction between the fluid and solid particles, in which X F1,i = φj , j∈N1,i where φj is the state of cell i with respect to the solid material. If the cell is a part of a fiber, then φj is 1, and if not, it is -1. As the fiber structure is stationary, the field φ is also stationary and fixed. The solution is an ink distribution σ̂ that minimizes Et . Because of the very local nature of the model, a thermodynamic approach for solving the minimization problem has been used [27], in which spin changes are applied in a Monte-Carlo way until the system converges to its minimum. In each round, two cells are selected randomly on the interface between the fluid and the air. A random number is generated, and, if it is less than the probability of spin exchange, given by the Boltzmann law, the spins of two cells will be exchanged [24]. (a) (b) Fig. 3. Schematics of neighbors around a typical cell in a 3D structure. a) First-layer neighbors. One side of the cells is colored. b) The second-layer neighbors referred to in section 6. In order to visualize the first-layer neighbors inside the structure, some of the sides are transparent. 6 The fluid propagation of this model is very local. Therefore, any marching or local evolution-based methods for finding the solution are slow, and local oscillations may dominate the evolution. This is the reason why thermodynamicsbased approaches, such as spin exchange, have been used in the literature [24, 27]. In this work, we follow the same modeling methodology to describe the paper structure at the mesoscopic scale. In order to be able to simulate the transient and finite-volume flows, we modify the energy term to enable us to control the fluid volume within the computational space, and we develop a new numerical method to solve the associated optimization problem. The latter method is based on a modified heuristic optimization process based on a genetic algorithm (GA) [28] and a newly introduced finite-volume boundary condition. In this way, the numerical solution can be obtained for the finite-volume case at a reasonable computational cost, despite the very local nature of the modified Ising models. Although our model could be calibrated to simulate transient flows, in this work we focus only on the steady-state solution. This is because the final ink distribution is more important than the transient flow in the seepage of ink through paper. Although the transient seepage of ink over long periods of time (hundreds of years) is also of great interest in modeling the degradation of historical documents, an approximation of the transient flow is enough, and can be produced using our model. Also, in the case of an infinite volume of fluid, we will use the graph cuts approach [7]. This global optimizer is very fast and outperforms all local/marching-based methods. It is worth noting that the porous medium has been modeled in another work as a set of containers of variable-size which are connected by pipes. The throughputs of the pipes are also variable, depending on the local parameters of the medium [23]. The model can be considered as a very local diffusion model which has been discretized at the size of pores. It is available as a part of the commercially available Pore-Cor Research Suite [23]. 4 Problem statement A paper document is available and a spatial distribution of the ink on the surface of that paper is given. The volume of ink is finite. The 3D distribution of the ink within the paper structure is required at mesoscopic scale. The paper is considered as a fiber structure. The construction of the fiber structure will be discussed in the next section, and the corresponding modified Ising model for representing this finite volume fluid problem will be given in section 6. The presence of ink in this discretized space is denoted by the field σ. 7 5 Fiber structure To obtain the φ field that determines where we have solid material and where we have empty space, we first need to have a fiber structure. In this work, the fiber structure is created by placing fibers one by one on an imaginary surface on random coordinates and random directions. Each individual fiber is constructed of a chain of rectangular blocks. The blocks can rotate in parallel to the surface, up to a maximum degree, which determines the stiffness of the fibers. As fibers pile up on the surface, some of them bend, also this maximum degree. The width and the height of each block, and total fiber length, are other parameters of a fiber. A sample fiber structure is shown in Figure 4. As seen in the figure, the paper is positioned face-down in order to better visualize the internal volume of the fiber structure. This means that the gravity force is upward in this case. The ink that would be placed on the paper surface will be seen below the fiber structure in our model, and will propagate upward because of cohesive and adhesive forces, as well as the gravity force. For the sake of computation, the fiber structure and the air space between the fibers are discretized into a collection of equivolume cells. The cells are referred to using a single index, such as i, and the total computational space is denoted by V . (a) (b) (c) Fig. 4. An example of a fiber structure. The red lines show the edges of the blocks that compose the fibers, and each blue line is the guide line of a fiber, and passes through the center of the bottom surface of the blocks of that. For better visualization, the fibers are extended in the vertical direction. a) A single fiber. b) A collection of a few fibers. c) A fiber structure consisting of 100 fibers. 8 (a) (b) (c) Fig. 5. A schematic diagram of the computational space used to simulate the ink seepage. a) A 2D view of the computational space before the finite volume boundary condition technique is applied. b) The same view after application of the finite volume boundary condition technique. Now, the computational space is independent of the ink volume. A refilling process ensures flow of the ink from an imaginary reservoir to the finite-volume boundary. c) A 3D view of the computational space. 6 Formulation We follow the modified Ising model paradigm, presented in subsection 3, to develop a model which is able to describe finite-volume fluid flow at mesoscopic scale. First, we need to define the energy of the fluid-solid system. Three major terms contribute to this energy: 1) the gravity term, 2) the term accounting for the cohesion between the fluid molecules, and 3) the term accounting for the adhesion between the fluid and the solid molecules. Although the energy function (1) accurately describes the fluid-solid interaction between the ink and the paper structure, its mesoscopic nature makes it very local. Therefore, we need to add additional constraints to complete the description of the problem and take into account the other restrictions. We represent these constraints as additional energy terms. The total energy in the modified Ising model can be described as follows: Et = Et,0 + EV = X (Eg,i + Ec,i + Ea,i ) + EV (2) i where Et,0 and EV are the interaction energy and volume energy respectively. The volume energy stands for the finite volume constraint and is discussed later. Because of the high computational performance of our model, and to obtain higher accuracy, we also use the second-layer neighbors [24]: 9 Eg,i = Gg σ̂i zi Ec,i = − (c1 σ̂i S1,i + c2 σ̂i S2,i ) Ea,i = − (A0 σ̂i φi + A1 σ̂i F1,i + A2 σ̂i F2,i ) where Eg is the fraction of energy corresponding to gravitational force; Gg is the gravity constant; σ̂i is the ink state of cell i, and zi is the vertical position of that cell. Ec is the cohesive part of the energy between neighboring cells, where c1 and c2 are the coefficients of the first- and second-layer neighbors, and S1,i and S2,i are the ink states of the first- and second-layer neighbors: S1,i = X σ̂j , S2,i = j∈N1,i X σ̂j j∈N2,i where N1,i and N2,i are the sets of cells that are the immediate neighbors and second-layer neighbors of cell i respectively: {j|i and j share a wall.} N1,i = N2,i = {j|i and j share a N1 neighbor.} Schematic diagrams of N1,i and N2,i are shown in Figure 3. Also, we use the notation N1 for the set of all pairs (i, j) such that j ∈ N1,i or i ∈ N1,j . Ea is the adhesive part of the energy between the fluid and the solid, where A1 and A2 are adhesive coefficients for the first- and second-layer neighbors. The state of the solid material at these layers is provided by F1,i and F2,i : F1,i = X φj , j∈N1,i F2,i = X φj j∈N2,i where the state of the solid material in each cell is represented by φi , the value of which is 0 or 1, depending on whether the cell is a free space or a part of a fiber. The self-adhesive coefficient is denoted by A0 . The second energy term (2), the volume energy part, is discussed in the following subsection. As can be seen from the definition of the energy, the energy is nonlinear in terms of the field σ. We discuss this point in more detail in section 7. 6.1 Volume energy: EV Total energy consists of both the interaction energy and the flow constraints. The most important constraint is the finite (and fixed) volume of ink (fluid). In other words, we need to force the incompressibility of the fluid via its fixed dimensionless volume: Vf luid = Vf luid,0 = constant 10 (3) where Vf luid,0 is the initial volume of ink and Vf luid is the actual dimensionless volume, which can be expressed in terms of the σ̂ field using Vf luid = P 1/2 i∈V (σ̂i + 1). This constraint can be added to the total energy in the form of another energy term, EV : Et = Et,0 + EV Et = Et,0 + λ X i∈V (σ̂i + 1) − 2Vf luid,0 !2 /(4V0 ) where λ is a positive Lagrangian coefficient, 4V0 is used for the sake of normalization, and V0 is the total volume of the computational space. The second term stands as an energy penalty term to enforce the volume constrain. Before looking for a numerical method to solve the problem, we first reformulate the energy terms in such a way that the interaction terms, and also the range of the interaction, become more explicit. We start with Et,0 : Et,0 = X (Eg,i + Ec,i + Ea,i ) i∈V = X Gg σ̂i zi i − − = + = X (c1 σ̂i S1,i + c2 σ̂i S2,i ) i X (A0 σ̂i φi + A1 σ̂i F1,i + A2 σ̂i F2,i ) i X i (Gg σ̂i zi − A0 σ̂i φi − A1 σ̂i F1,i − A2 σ̂i F2,i ) i (−c1 σ̂i S1,i − c2 σ̂i S2,i ) i (Gg zi − A0 φi − A1 F1,i − A2 F2,i ) σ̂i X X + X i  −c1 σ̂i X j∈N1,i  σ̂j  + X i  −c2 σ̂i X j∈N2,i  σ̂j  If we define σi = 1/2(σ̂i + 1), i.e. σ̂i = 2σi − 1, we have: Et,0 = X i∈V D1,i σi + X (−4c1 ) σi σj + X (i,j)∈N2 (i,j)∈N1 where 11 (−4c2 ) σi σj D̂1,i = 2(Gg zi − A0 φi − A1 F1,i − A2 F2,i + 2(26c1 + 98c2 )) σ is zero for empty cells, and 1 for cells containing fluid. The first term in Et,0 is linear with respect to σ. Now, the second term in the total energy can be reformulated: V0 EV /λ = X (σ̂i + 1) − 2Vf luid,0 X σi − Vf luid,0 X σi i∈V = i∈V = i∈V XX = i∈V j∈V = !2 X σi2 + X σi σj − 2Vf luid,0 i6=j σi + Vf2luid,0 i∈V σi σj − 2Vf luid,0 X i∈V /4 !2 − 2Vf luid,0 X !2 X σi i∈V σi σj − 2Vf luid,0 X σi i∈V But, σi2 = σi = X σi + i∈V i6=j X σi i∈V Therefore, V0 EV /λ = (1 − 2Vf luid,0 ) X i∈V σi + X σi σj i6=j The total energy will be Et = Et,0 + EV = X D̂1,i σi + i∈V + λ/V0 Et = X i X i6=j X X (−4c1 ) σi σj + σi σj + λ(1 − 2Vf luid,0 )/V0 D1,i σi + X (−4c2 ) σi σj (i,j)∈N2 (i,j)∈N1 V1,(i,j) σi σj + X σ̂i i∈V X (i,j)∈N2 (i,j)∈N1 V2,(i,j) σi σj + X V3,(i,j) σi σj i6=j (4) where 12 D1,i = D̂1,i + λ(1 − 2Vf luid,0 )/V0 = 2(Gg zi − A0 φi − A1 F1,i − A2 F2,i +λ(1 − 2Vf luid,0 )/(2V0 ) + 2(26c1 + 98c2 )) V1,(i,j) = −4c1 V2,(i,j) = −4c2 V3,(i,j) = λ/V0 7 Solution of the variational problem and the experimental results Before discussing the numerical method, we discuss the parameters. c1 is selected as the reference parameter: c1 = 1. To limit the influence of the second- and third-order terms, we assume that 98c2 << 26c1 ⇒ c2 = c1 /8 and Gg zmax << c1 26 ⇒ Gg = c1 /zmax . Please note that 26 and 98 are the numbers of first- layer and second-layer neighbors respectively. In the adhesive terms, A0 is the key parameter. We choose A0 = c1 /2, in order to have stronger cohesive that adhesive behavior. The other parameters are A1 = 2/3A0 and A2 = 1/2A1 [24]. The optimization problem (4) is a nonlinear combinatorial optimization problem, which should be solved in a very large variable space. Figure 5 visualizes the computational space of the problem. The initial state of the ink is also shown in the figure. The solution is very far from the initial solution. As has been discussed in the related work section, local optimizers are usually used to move toward the global solution. However, because of the discrete nature of the problem, local forces (which are available at the microscopic scale) are not available to derive the system. For example, in [24], thermodynamics-based approach is used. Although these approaches are very helpful in evolving the simulation, the computational cost can be very high. Global optimizers, such as graph cuts [7], could be helpful. However, because of the ink-volume restriction in our problem, the basic requirement of this optimizer, which is that the range of interactions be limited to neighbors, is not met. Therefore, we only use this optimizer for the case of an infinite-volume fluid. 7.1 Solution via Global Optimization As discussed above, the final ink distribution would be far from its initial distribution. Therefore, a global solver could result in a fast and economic solution. However, because of some restrictions in the problem, mainly the finite-volume restriction on the ink fluid and the mesoscopic scale of the energy function, the available global optimizers cannot be applied. The only exception is when 13 the finite-volume restriction is removed. Below, a fast solution is presented using one of the powerful global optimizers, graph cuts [7]. In [7, 8], 1 the global solution to any optimization problem has been found if the problem can be expressed in the form of two terms, the first one being linear with respect to the variables, and the second perhaps being nonlinear (second-degree term), just between the neighbors: E= X i∈V Di (σi ) + X V(i,j) (σi , σj ) (5) (i,j)∈N1 where Di is a data penalty function, and V(i,j) is an interaction potential. Comparing the general form of energy suitable for graph cuts methods (equation (5)) and our energy functional (4), we can see that the main terms that prevent us from applying the graph cuts method to this problem are the last two in (4) which count on N2 neighbors and on almost all the cells in the computational domain respectively. The restriction posed by the first term could be removed by adding N2 neighbors to the graph cuts formalism, which is what we did in our implementation here. However, the second term in (4) cannot be handled by this global optimizer, unless we set λ = 0 to drop this term, which means that there is no restriction on the fluid volume. In other words, we can solve the problem using the graph cuts method in the case of infinite fluid volume. 1 http://www.mathworks.com/matlabcentral/fileexchange/21310, http://www.cs.ucl.ac.uk/staff/V.Kolmogorov/software.html 14 (a) (b) (c) (d) Fig. 6. A typical example of the ink propagation in the fiber structure under infinite-volume condition: a) The fiber structure. b) The φ field, which represents the fiber material. c) The σ field, which represents the ink distribution. d) The ink and fiber together. Figure 6 shows a typical example of the case of infinite fluid volume case. The fiber structure and ink distribution are shown. Because of the infinite-volume nature of this example, the ink fills the structure completely. 7.2 Solution via a genetic algorithm A new method is developed in this subsection to solve (4) under the finitevolume condition (λ 6= 0). For this purpose, a modified genetic algorithm (GA) is introduced. The details of the method are given in Algorithm 1. It works, along with the finite volume boundary condition introduced in section 6, to reduce the computational cost. As can be seen from the algorithm, the method is quasi-linear, because it updates the nonlinear terms, S1,i and S2,i , only on certain time intervals (100 iterations, in our work here). In this way, the energy functional will be linear in each GA iteration. Also, we limit the scope of the GA domain to the regions around the ink-air interface. The σi variables in these regions are considered as genes, and then are composed as a chromosome of variable-size in each interaction. The binary nature of each σi makes them intrinsically compatible with the GA approach. The cost function, which is linear, is low computational cost. A sample convergence curve of the 15 energy is shown in Figure 7. The updating intervals of the nonlinear terms are shown with red lines. As can be seen in the figure, the convergence is smooth and stable. (a) (b) Fig. 7. The profile of the energy of the system, along with the computational time as a measure of convergence. a) The axis of the time is linear. b) The axis of the time is logarithmic. The red lines indicate the moments when the variables S1 and S2 are updated. The blue curve shows the spontaneous change in the energy along the computational time. As can be seen in the figure, the convergence is smooth and stable. 1 2 3 4 5 6 7 8 9 10 11 12 Algorithm 1: The modified genetic algorithm used to minimize the energy functional Set σi = 0 for all cells with z ≥ 0, σi = 1 for all cells with z1 < z < 0 where z1 is the depth of finite-volume boundary. If the volume of the finite-volume is bigger than the ink volume, Vf luid,0 , fill just a part of finite-volume boundary of the same volume of Vf luid,0 ; Initialize S1,i and S2,i ; repeat for k = 1 to 100 do Extract the cells that are on the interface of ink and air; Compose the genetic chromosome by aligning σi variables of the extracted interface cells; minimize Et with respect to the created chromosome using genetic algorithm; Apply the optimal values back to σi of the interface cells, and update the interface front; If the ink volume in the computational space is less than Vf luid,0 , refill the finite-volume boundary cells (z1 < z < 0); end Update S1,i and S2,i ; until The change in the energy is less than 0.1 percent; In the first example, shown in Figure 8, a small amount of ink flows into a 16 fiber structure. The finite volume of the ink is implemented by limiting the size of the finite-volume reservoir (see Figure 5(b)). The ink propagates into the fiber structure and settles around the fibers. We use the error in the ink volume (kVf luid − Vf luid,0 k) at the end of computations as a control parameter. This error is zero for the result of the method, and confirms the ability of our model to simulate finite-volume ink/paper interaction. (a) (b) (c) (d) Fig. 8. The ink propagation in the fiber structure when the ink volume is finite: a) The fiber structure. b) The φ field, which represents the fiber material. c) The σ field, which represents the ink distribution. d) The ink and fiber together. In the second example, Figure 9, we study the extreme case of infinite-volume ink. Similar to Figure 6 of the graph cuts method, the ink fills the computational volume. 17 (a) (b) (c) (d) Fig. 9. The ink propagation in the fiber structure with a high volume of ink: a) The fiber structure. b) The φ field, which represents the fiber material. c) The σ field, which represents the ink distribution. d) The ink and fiber together. In another extreme case (Figure 10), we consider a very thin paper structure. As can be seen in the figure, the ink is mostly confined to the fiber area, despite the large amount of ink. When we increase the ink volume drastically, again the ink fills the whole computational space (Figure 11). However, it should be noted that this is a very rare case. Also, it is worth noting that the error in the ink volume is zero in all the cases. This is mostly because of a high λ value (100 in this work), which enforces the finite-volume restriction. 18 (a) (b) (c) (d) Fig. 10. The ink propagation in the fiber structure when the fiber structure is very thin: a) The fiber structure. b) The φ field, which represents the fiber material. c) The σ field, which represents the ink distribution. d) The ink and fiber together. 19 (a) (b) (c) (d) Fig. 11. The ink propagation in the fiber structure with a high volume of ink in a thin fiber structure: a) The fiber structure. b) The φ field, which represents the fiber material. c) The σ field, which represents the ink distribution. d) The ink and fiber together. 8 Conclusion and future prospects A new Ising model for the simulation of fluid seepage into a porous medium under the finite-volume fluid condition is developed. The model can be used to study fluid/solid interaction at mesoscopic scale. The computational cost is reduced by introducing quasi-linear behavior and a new finite volume boundary condition. Also, a modified genetic algorithm is introduced to solve the associated time-dependent optimization problem. The model is used to produce ink distribution in the fiber structure under a finite-volume restriction. We used the difference in the ink volume before and after simulation as the error measure, in order to assess the accuracy of the model. The results satisfied the volume restriction, showing zero error values. In future work, we will use this model to obtain the diffusion coefficients of the macroscopic-scale models. This will help to avoid the need to perform largescale simulations at mesoscopic scale, while at the same time transferring the physical properties of the mesoscopic interactions to the macroscopic scale. 20 References [1] Urpo Aaltosalmi. Fluid flow in porous media with the lattice-Boltzmann method. PhD thesis, University of Jyväskylä, July 2005. [2] Abdelaziz Abid. ‘Memory of the world’: Preserving our documentary heritage. Museum International, 49(1):40–45, 1997. [3] M M H Megat Ahmed, D T Gethin, T C Claypole, and B J Roylance. A model for ink impression into a porous substrate. Journal of Physics D: Applied Physics, (16):2276, 1997. [4] Mikko Alava and Kaarlo Niskanen. The physics of paper. Reports on Progress in Physics, 69(3):669–723, 2006. [5] Mauro Barni, Jean-Angelo Beraldin, Christian Lahanier, , and Alessandro Piva. Recent advances in applications to visual cultural heritage. IEEE Signal Processing Magazine, 25(4):1–134, July 2008. Special issue. [6] D. A. Barry, C. T. Miller, P. J. Culligan, and K. Bajracharya. Analysis of split operator methods for nonlinear and multispecies groundwater chemical transport models. Mathematics and Computers in Simulation, 43(3-6):331–341, March 1997. [7] Y. Boykov and V. Kolmogorov. An experimental comparison of mincut/max- flow algorithms for energy minimization in vision. IEEE Transactions on Pattern Analysis and Machine Intelligence, 26(9):1124–1137, 2004. [8] Y.Y. Boykov and M.-P. Jolly. Interactive graph cuts for optimal boundary & region segmentation of objects in n-d images. In ICCV’01, volume 1, pages 105–112 vol.1, 2001. [9] Pedro Castro, R. Almeida, and J. Pinto. Restoration of Double-Sided Ancient Music Documents with Bleed-Through, volume 4756/2008, pages 940–949. Springer Berlin / Heidelberg, 2007. [10] Chih-Yuan Chang. Simulation of molten metal through a unidirectional fibrous preform during mmc processing. Journal of Materials Processing Technology, 209(9):4337–4342, May 2009. [11] L. Chen, J. Zhu, M. Young, and R. Susfalk. Modeling polyacrylamide transport in water delivery canals. In ASA-CSSA-SSSA International Annual Meetings, pages 294–6, Indianapolis, IN, Nov. 12–16 2006. [12] R E Collins. Flow of Fluids Through Porous Materials. Reinhold, New York, 1961. [13] Joo Marcelo Monte da Silva, Rafael Dueire Lins, Fernando Mrio Junqueira Martins, and Rosita Wachenchauzer. A new and efficient algorithm to binarize document images removing back-to-front interference. Journal of Universal Computer Science, 14(2):299–313, January 2008. [14] Fadoua Drira, Frank Le Bourgeois, and Hubert Emptoz. Restoring ink bleed-through degraded document images using a recursive unsupervised classification technique. Document Analysis Systems VII, pages 38–49, 2006. [15] E. Dubois and A. Pathak. Reduction of bleed-through in scanned 21 [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] manuscript documents. In Proc. IS&T Image Processing, Image Quality, Image Capture Systems Conference (PICS2001), pages 177–180, Montreal, Canada, April 2001. Damien Durville. Finite element simulation of textile materials at mesoscopic scale. In Finite element modelling of textiles and textile composites, pages 1–14, Saint-Petersbourg , Russia, September 26–28 2007. Reza Farrahi Moghaddam and Mohamed Cheriet. Application of multilevel classifiers and clustering for automatic word-spotting in historical document images. In ICDAR’09, pages 511–515, Barcelona, Spain, July 26–29 2009. Reza Farrahi Moghaddam and Mohamed Cheriet. Low quality document image modeling and enhancement. IJDAR, 11(4):183–201, 2009. Reza Farrahi Moghaddam and Mohamed Cheriet. A multi-scale framework for adaptive binarization of degraded document images. Pattern Recognition, 43(6):2186–2198, June 2010. Reza Farrahi Moghaddam and Mohamed Cheriet. A variational approach to degraded document enhancement. IEEE Transactions on Pattern Analysis and Machine Intelligence, 32(8):1347–1361, 2010. Reza Farrahi Moghaddam, David Rivest-Hénault, Itay Bar-Yosef, and Mohamed Cheriet. A unified framework based on the level set approach for segmentation of unconstrained double-sided document images suffering from bleed-through. In ICDAR’09, pages 441–445, Barcelona, Spain, July 26–29 2009. Yi Huang, Michael S. Brown, and Dong Xu. A framework for reducing ink-bleed in old documents. In CVPR2008, 2008. G.M. Laudone, G.P. Matthews, and P.A.C. Gane. Modelling diffusion from simulated porous structures. Chemical Engineering Science, 63(7):1987–1996, April 2008. D. Lukas, E. Glazyrina, and N. Pan. Computer simulation of liquid wetting dynamics in fiber structures using the Ising model. Journal of the Textile Institute, 88(2):149–161, 1997. D. Lukas, N. Pan, A. Sarkar, M. Weng, J. Chaloupek, E. Kostakova, L. Ocheretna, P. Mikes, M. Pociute, and E. Amler. Auto-model based computer simulation of plateaurayleigh instability of mixtures of immiscible liquids. Physica A: Statistical Mechanics and its Applications, 389(11):2164–2176, June 2010. D. Lukas, V. Soukupova, N. Pan, and D. V. Parikh. Computer simulation of 3-d liquid transport in fibrous materials. Simulation, 80(11):547–557, 2004. David Lukas and Ning Pan. Wetting of a fiber bundle in fibrous structures. Polymer Composites, 24(3):314–322, 2003. Melanie Mitchell. An Introduction to Genetic Algorithms. The MIT Press, 1998. Javier L. Mroginski, H.Ariel Di Rado, Pablo A. Beneyto, and Armando M. Awruch. A finite element approach for multiphase fluid flow in porous me22 [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] dia. Mathematics and Computers in Simulation, 81(1):76–91, September 2010. Britta Nestler, Ali Aksi, and Michael Selzer. Combined lattice boltzmann and phase-field simulations for incompressible fluid flow in porous media. Mathematics and Computers in Simulation, 80(7):1458–1468, March 2010. N. Pan and W. Zhong. Fluid transport phenomena in fibrous materials. Textile Progress, 38(2):1–93, 2006. A. Patnaik, R. S. Rengasamy, V. K. Kothari, and A. Ghosh. Wetting and wicking in fibrous materials. Textile Progress, 38(1):1–105, 2006. D. Qi and T. Uesaka. Numerical experiments on paper-fluid interaction - permeability of a three-dimensional anisotropic fibre network. Journal of Materials Science, 31(18):4865–4870, January 1996. Tony Rath and R. Manmatha. Word spotting for historical documents. IJDAR, 9(2):139–152, April 2007. K. Roth. Scaling of water flow through porous media and soils. European Journal of Soil Science, 59(1):125–130, 2008. Toufik Sari and Abderrahmane Kefali. A search engine for Arabic documents. In 10th CIFED, pages 97–102, Rouen, France, 2008. Chew Lim Tan, Ruini Cao, Peiyi Shen, Qian Wang, Julia Chee, and Josephine Chang. Removal of interfering strokes in double-sided document images. In Applications of Computer Vision, 2000, Fifth IEEE Workshop on., pages 16–21, Palm Springs, CA, 2000. Anna Tonazzini, Emanuele Salerno, and Luigi Bedini. Fast correction of bleed-through distortion in grayscale documents by a blind source separation technique. IJDAR, 10(1):17–25, June 2007. H. H. Vaziri, Y. Xiao, R. Islam, and A. Nouri. Numerical modeling of seepage-induced sand production in oil and gas reservoirs. Journal of Petroleum Science and Engineering, 36(1-2):71–86, October 2002. Voillot C Vincent R, Rueff M. 3-d simulation of handsheets made of different pulps. In Proceedings Model validation workshop, pages 71–78, Espoo, Finland, 6 October 2005. COST 36. Xiujin Wang and Jizhou Sun. The researching about water and ink motion model based on soil-water dynamics in simulating for the chinese painting. In Jizhou Sun, editor, Image and Graphics, 2007. ICIG 2007. Fourth International Conference on, pages 880–885, 2007. Christian Wolf. Document ink bleed-through removal with two hidden Markov random fields and a single observation field. IEEE Transactions on Pattern Analysis and Machine Intelligence, 32(3):431–447, 2009. 23 A Macroscopic-scale models Here, we review a few related macroscopic-scale models. These models work on continuum media, and therefore follow a different notation compared to the main text. A.1 2D Diffusion Model Analysis at the macroscopic scale using generic diffusion-based models has been carried out in [18] by introducing a simple model consisting of two layers representing the paper material. The model ignores the fiber structure of the paper, which controls the very local flow of the ink. In that work, a diffusionbased model was developed to replicate the bleed-through effect in doublesided documents. It assumes that there are two independent distributions of ink on the recto and verso sides of a document: srecto and sverso . The generic governing equation of that model is ∂u = DIFF (u, srecto , crecto ) + DIFF (u, sverso , cverso ) ∂t (A.1) where DIFF (u, s, c) represents a diffusion process between the source layer s and the target layer u with the diffusion coefficients c. The target field u is continuous and represents the 2D distribution of ink on the recto side of the document [18]. The diffusion coefficients define the physics converging the phenomena. For example, for the verso diffusion, we have: cverso = d 1 , 2 2 2 1 + s2 1 + (sverso − u) /σb verso /σink (A.2) where the parameter d is the ratio of the verso diffusion magnitude compared to that of the normal diffusion on the recto side. The parameter σb controls the degree of ink seepage through the paper, and σink is a general parameter that restricts diffusion for just the ink (which corresponds to near-zero values on s and u). The coefficient cverso has been designed in that work in such a way that it preserves the nonlinear nature of the ink seepage and also takes into account the spatial diffusion and dependency of the ink distribution within the paper material (for more details, see [18]). An example of the output of the model is presented in Figure A.1. The model is able to create bleed-through signatures in a realistic way. It is worth noting that the model is not directly inferred from the physical ink seepage phenomenon, but instead, the diffusion coefficient is selected as a closed form based on the empirical understanding of the phenomenon. However, the formula for the diffusion coefficients is the main concern, and it should be verified by the simulation models at lower-level scales. 24 Fig. A.1. An example of bleed-through effect generated using the diffusion-based model [18]. Left side: The recto and verso side ink distributions before the bleed-though effect. Right side: The final output of the diffusion model. It simulates the bleed-through interference. A.2 3D macroscopic models A better description of ink seepage could be obtained using 3D models. Under slow flow conditions, the flow in the porous substrate can be described by Darcy’s equation (derived from the Navier-Stokes equations in cylindrical coordinate system) [3, 12]: ! 1 ∂p ∂ 2p r + 2 =0 r ∂r ∂z (A.3) where p is the fluid pressure, and the velocity components are given by ur = −φ ∂p , µ ∂r uz = −φ ∂p µ ∂z Here, µ is the dynamic viscosity, and φ is the permeability. These equations are appropriate when the porous skeleton is saturated. However, in the case of printing onto a dry porous substrate, computation of the flow into the skeleton is also necessary. This may be achieved using an approach which computes the position of the metal front in a casting simulation [10]. Numerically, this is described by an additional equation, the hyperbolic transport equation: ∂ σ̂ ∂ σ̂ dσ̂ + ur + uz =0 dt ∂r ∂z (A.4) where σ̂ is a scalar quantity to be transported. For example, σ̂ = −1 may represent a dry position and σ̂ = 1 may represent a wet position. Usually, a numerical solution of the model is obtained using the finite element method [29]. The model is macroscopic, and does not consider individual fibers in the paper structure. The material properties are described using averaged 25 variables, such as µ. The model is able to follow the transit flow of ink/water through the substrate. A.3 Flow-based models The non-zero flow in a porous medium could be modeled as a flow of incompressible viscose fluid, as follows [1]: ∂ −1 u + (u · ∇) u = ∇p + ν∇2 u + g ∂t ρ (A.5) where u is the velocity vector, g is the gravity constant vector, ν = µ/ρ and µ is the dynamic viscosity. In the case of stationary flow with no friction, we have the Stokes equation: ∇p − ρGg = µ∇2 u (A.6) where Gg is the gravity constant, and the space changes of velocity are considered negligible ((u∇) u = 0). In the literature, this model has been solved using Lattice-Boltzmann hydrodynamics [1, 33, 30]. By definition, the model assumes a stationary flow. This means that transitional flow cannot be covered by this model, and also the amount of fluid should be infinite. Moreover, this assumption forces a periodic boundary condition. Therefore, the model is not suitable for the study of ink propagation through the paper. However, there are some models based on Navier-Stokes equations adapted to free-boundary fluid flows. 26
5cs.CE
arXiv:1701.05134v1 [math.GR] 18 Jan 2017 On Hσ -permutably embedded and Hσ -subnormaly embedded subgroups of finite groups ∗ Wenbin Guo, Chi Zhang Department of Mathematics, University of Science and Technology of China, Hefei 230026, P. R. China E-mail: [email protected] Alexander N. Skiba, Darya A. Sinitsa Department of Mathematics, Francisk Skorina Gomel State University, Gomel 246019, Belarus E-mail: [email protected] Abstract Let G be a finite group. Let σ = {σi |i ∈ I} be a partition of the set of all primes P and n an integer. We write σ(n) = {σi |σi ∩ π(n) 6= ∅}, σ(G) = σ(|G|). A set H of subgroups of G is said to be a complete Hall σ-set of G if every member of H \ {1} is a Hall σi -subgroup of G for some σi and H contains exact one Hall σi -subgroup of G for every σi ∈ σ(G). A subgroup A of G is called: (i) a σ-Hall subgroup of G if σ(|A|) ∩ σ(|G : A|) = ∅; (ii) σ-permutable in G if G possesses a complete Hall σ-set H such that AH x = H x A for all H ∈ H and all x ∈ G. We say that a subgroup A of G is Hσ -permutably embedded in G if A is a σ-Hall subgroup of some σ-permutable subgroup of G. We study finite groups G having an Hσ -permutably embedded subgroup of order |A| for each subgroup A of G. Some known results are generalized. 1 Introduction Throughout this paper, all groups are finite and G always denotes a finite group. Moreover, n is an integer, P is the set of all primes, and if π ⊆ P, then π ′ = P \ π. The symbol π(n) denotes the set of all primes dividing n; as usual, π(G) = π(|G|), the set of all primes dividing the order of G. We use nπ to denote the π-part of n, that is, the largest π-number dividing n; np denotes the largest degree of p dividing n. ∗ Research is supported by a NNSF grant of China (Grant # 11371335) and Wu Wen-Tsun Key Laboratory of Mathematics of Chinese Academy of Sciences 0 Keywords: finite group, σ-Hall subgroup, σ-subnormal subgroup, σ-nilpotent group, Hσ -permutably embedded subgroup. 0 Mathematics Subject Classification (2010): 20D10, 20D15, 20D30 1 In what follows, σ = {σi |i ∈ I} is some partition of P, that is, P = ∪i∈I σi and σi ∩ σj = ∅ for all i 6= j; Π is a subset of σ and Π′ = σ \ Π. Let σ(n) = {σi |σi ∩ π(n) 6= ∅} and σ(G) = σ(|G|). Then we say that G is σ-primary [1] if G is a σi -group for some σi ∈ σ. A set H of subgroups of G is said to be a complete Hall σ-set of G [2, 3] if every member of H \ {1} is a Hall σi -subgroup of G for some σi and H contains exact one Hall σi -subgroup of G for every σi ∈ σ(G). We say that G is σ-full if G possesses a complete Hall σ-set. Throughout this paper, G is always supposed to be a σ-full group. A subgroup A of G is called [1]: (i) a σ-Hall subgroup of G if σ(|A|) ∩ σ(|G : A|) = ∅; (ii) σ-subnormal in G if there is a subgroup chain A = A0 ≤ A1 ≤ · · · ≤ At = G such that either Ai−1 E Ai or Ai /(Ai−1 )Ai is σ-primary for all i = 1, . . . , t; (iii) σ-quasinormal or σ-permutable in G if G possesses a complete Hall σ-set H such that AH x = H x A for all H ∈ H and all x ∈ G. In particular, A is called S-quasinormal or S-permutable in G [4, 5] provided AP = P A for all Sylow subgroups P of G. Definition 1.1. We say that a subgroup A of G is Hσ -subnormally (respectively Hσ -permutably, Hσ -normally) embedded in G if A is a σ-Hall subgroup of some σ-subnormal (respectively σpermutable, normal) subgroup of G. In the special case, when σ = {{2}, {3}, . . .}, the definition of Hσ -normally embedded subgroups is equivalent to the concept of Hall normally embedded subgroups in [6], the definition of Hσ permutably embedded subgroups is equivalent to the concept of Hall S-quasinormally embedded subgroups in [7] and the definition of Hσ -subnormally embedded subgroups is equivalent to the concept of Hall subnormally embedded subgroups in [8]. Example 1.2. (i) For any σ, all σ-Hall subgroups and all σ-subnormal subgroups of any group S are Hσ -subnormally embedded in S. Now, let G = (C7 ⋊ C3 ) × A5 , where C7 ⋊ C3 is a non-abelian group of order 21 and A5 is the alternating group of degree 5, and let H = (C7 ⋊ C3 )A, where A is a Sylow 2-subgroup of A5 . Let σ = {σ1 , σ2 }, where σ1 = {7} and σ2 = {7}′ . Then H is σ-subnormal in G and C3 A5 is a σ-Hall subgroup of G. In view of Lemma 2.1(1)(5) below, the subgroup C3 A is neither σ-subnormal in G nor Hσ -normally embedded in G. (ii) For any σ, all σ-Hall subgroups and all σ-permutable subgroups of any group S are Hσ permutably embedded in S. Now, let p > q > r be primes, where r 2 divides q − 1. Let σ = {σ1 , σ2 }, where σ1 = {q, r} and σ2 = {q, r}′ . Let H = Q ⋊ R be a group of order qr 2 , where CH (Q) = Q. Let P be a simple Fp H-module which is faithful for H and G = P ⋊ H. Let R1 be a subgroup of R of order r. Then the subgroup V = P R1 is σ-permutable in G and R1 is a σ-Hall subgroup of V . Hence R1 is Hσ -permutably embedded in G. It is also clear that G has no an S-permutable subgroup W such that R1 is a Hall subgroup of W , so R1 is neither Hσ -normally embedded nor S-permutably 2 embedded in G. (iii) For any σ, all σ-Hall subgroups and all normal subgroups of any group S are Hσ -normally embedded in S. Now, let P be a simple F11 (C7 ⋊ C3 )-module which is faithful for C7 ⋊ C3 . Let G = (P ⋊ (C7 ⋊ C3 )) × A5 . Let σ = {σ1 , σ2 }, where σ1 = {5, 7, 11} and σ2 = {5, 7, 11}′ . Then the subgroup M = (P ⋊ C7 ) × A5 is normal in G and a subgroup B of A5 of order 12 is σ-Hall subgroup of M , so B is Hσ -normally embedded in G. Finally, if σ = {σ1 , σ2 }, where σ1 = {7} and σ2 = {7}′ , then B is not Hσ -normally embedded in G. Recall that G is σ-nilpotent [9] if G = H1 × · · · × Ht for some σ-primary groups H1 , . . . , Ht . The σ-nilpotent residual GNσ of G is the intersection of all normal subgroups N of G with σ-nilpotent quotient G/N , GN denotes the nilpotent residual of G. It is clear that every subgroup of a σ-nilpotent group G is σ-permutable and σ-subnormal in G. Theorem 1.3. Let H = {1, H1 , . . . Ht } be a complete Hall σ-set of G and D = GNσ . Then any two of the following conditions are equivalent: (i) G has an Hσ -permutably embedded subgroup of order |A| for each subgroup A of G. (ii) D is a complemented cyclic of square-free order subgroup of G and |σi ∩ π(G)| = 1 for all i such that σi ∩ π(D) 6= ∅. (iii) For each set {A1 , . . . , At }, where Ai is a subgroup (respectively normal subgroup) of Hi for all i = 1, . . . , t, G has an Hσ -permutably embedded (respectively Hσ -normally embedded) subgroup of order |A1 | · · · |At |. Let F be a class of groups. A subgroup H of G is said to be an F-covering subgroup of G [10, VI, Definition 7.8] if H ∈ F and for every subgroup E of G such that H ≤ E and E/N ∈ F it follows that E = N H. We say that a subgroup H of G is a σ-Carter subgroup of G if H is an Nσ -covering subgroup of G, where Nσ is the class of all σ-nilpotent groups. A group G is said to have a Sylow tower if G has a normal series 1 = G0 < G1 < · · · < Gt−1 < Gt = G, where |Gi /Gi−1 | is the order of some Sylow subgroup of G for each i ∈ {1, . . . , t}. A chief factor of G is said to be σ-central (in G) [1] if the semidirect product (H/K) ⋊ (G/CG (H/K)) is σ-primary. Otherwise, H/K is called σ-eccentric (in G). We say that G is a HσE-group if the following conditions are hold: (i) G = D ⋊ M , where D = GNσ is a σ-Hall subgroup of G and |σ(D)| = |π(D)|; (ii) D has a Sylow tower and every chief factor of G below D is σ-eccentric; (iii) M acts irreducibly on every M -invariant Sylow subgroup of D. We do not still know the structure of a group G having a Hσ -subnormally embedded subgroup of order |A| for each subgroup A of G. Nevertheless, the following fact is true. Theorem 1.4. Any two of the following conditions are equivalent: (i) Every subgroup of G is Hσ -subnormally embedded in G. 3 (ii) Every σ-subnormal subgroup H of G is an HσE-group of the form H = D ⋊ M , where D = H Nσ and M is a σ-Carter subgroup of H. (iii) Every σ-subnormal subgroup of G is an HσE-group. Now, let us consider some corollaries of Theorems 1.3 and 1.4. First note that since a nilpotent group G possesses a normal subgroup of order n for each integer n dividing |G|, in the case when σ = {{2}, {3}, . . .}, Theorem 1.3 covers Theorem 11 in [6], Theorem 2.7 in [8] and Theorems 3.1 and 3.2 in [7]. From Theorem 1.3 we also get the following result. Corollary 1.5. Suppose that G possesses a complete Hall σ-set H = {1, H1 , . . . , Ht } such that Hi is nilpotent for all i = 1, . . . , t. Then G has an Hσ -normally embedded subgroup of order |H| for each subgroup H of G if and only if the nilpotent residual D = GN of G is cyclic of square-free order and |σi ∩ π(G)| = 1 for all i such that σi ∩ π(D) 6= ∅. In the case when σ = {{2}, {3}, . . .} we get from Corollary 1.5 the following known result. Corollary 1.6 (Ballester-Bolinches, Qiao [11]). G has a Hall normally embedded subgroup of order |H| for each subgroup H of G if and only if the nilpotent residual GN of G is cyclic of square-free order. On the basis of Theorems 1.3 and 1.4 we prove also the next two theorems. Theorem 1.7. Any two of the following conditions are equivalent: (i) Every subgroup of G is Hσ -normally embedded in G. (ii) G = D ⋊ M is a HσE-group, where D is a cyclic group of square-free order and M is a Dedekind group. (iii) G = D ⋊ M , where D is a σ-Hall cyclic subgroup of G of square-free order with |σ(D)| = |π(D)| and M is a Dedekind group. In the case when σ = {{2}, {3}, . . .} we get from Theorem 1.7 the following known result. Corollary 1.8 (Li, Liu [8]). Every subgroup of G is a Hall normally embedded subgroup of G if and only if G = D ⋊ M , where D = GN is a cyclic Hall subgroup of G of square-free order and M is a Degekind group. Theorem 1.9. Any two of the following conditions are equivalent: (i) Every subgroup of G is Hσ -permutably embedded in G. (ii) G = D ⋊ M is a HσE-group, where D = GNσ is a cyclic group of square-free order. (iii) G = D ⋊ M , where D is a σ-Hall cyclic subgroup of G of square-free order with |σ(D)| = |π(D)| and M is σ-nilpotent Corollary 1.10. Every subgroup of G is a Hall S-quasinormally embedded subgroup of G if and only if G = D ⋊ M , where D = GN is a cyclic Hall subgroup of G of square-free order and M is a 4 Carter subgroup of G. In conclusion of this section, consider the following example. Example 1.11. Let 5 < p1 < p2 < · · · < pn be a set of primes and p a prime such that either p > pn or p divides pi −1 for all i = 1, . . . , n. Let A be a group of order p and Pi a simple Fpi A-module which is faithful for A. Let Li = Pi ⋊ A and B = (. . . ((L1  L2 )  L3 )  · · · )  Ln (see [10, p. 50]). We can assume without loss of generality that Li ≤ B for all i = 1, . . . , n. Let G = B × A5 , where A5 is the alternating group of degree 5, and let σ be a partition of P such that for some different indices i, j, i1 , . . . , in ∈ I we have p ∈ σi , {2, 3, 5} ⊆ σj and pk ∈ σik for all k = 1, . . . , n. Then D = P1 P2 · · · Pn = GNσ is a σ-Hall subgroup of G and G = D ⋊ (A × A5 ). We show that every subnormal subgroup H of G satisfies Condition (ii) in Theorem 1.4. If = 1, it is evident. Hence we can assume without loss of generality A ≤ H since every p′ subgroup of G is σ-nilpotent. But then H Nσ H = (H ∩ D) ⋊ (A × (H ∩ A5 )) by Lemma 2.1(4), where H ∩ D is a normal σ-Hall subgroup of H and M = A × (H ∩ A5 ) is a σnilpotent subgroup of H. Moreover, H ∩ A5 induces on every non-identity Sylow subgroup of H ∩ D a non-trivial irreducible group of automorphisms. Therefore H Nσ = H ∩ D and |σ(H Nσ )| = |π(H Nσ )|. It is also clear that M is a σ-Carter subgroup of H and every chief factor of H below H Nσ is σeccentric in H. Thus G satisfies Condition (ii) in Theorem 1.4, and so every subgroup H of G is Hσ -subnormally embedded in G. On the other hand, the subgroup DAC2 , where C2 is a subgroup of order 2 of G, is not Hall subnormally embedded in G since C2 is not a Sylow subgroup of any subnormal subgroup of G. Finally, if p divides pi − 1 for all i = 1, . . . , n, then |Pi | = pi for all i = 1, . . . , n, so G satisfies Condition (ii) in Theorem 1.9 and hence satisfies Condition (ii) in Theorem 1.3. 2 Basic lemmas An integer n is called a Π-number if σ(n) ⊆ Π. A subgroup H of G is called a Hall Π-subgroup of G [1] if |H| is a Π-number and |G : H| is a Π′ -number. Lemma 2.1 (See Lemma 2.6 in [1]). Let A, K and N be subgroups of G, where A is σ-subnormal in G and N is normal in G. (1) A ∩ K is σ-subnormal in K. 5 (2) If K is σ-subnormal in G, then A ∩ K and hA, Ki are σ-subnormal in G. (3) AN/N is σ-subnormal in G/N . (4) If H 6= 1 is a Hall Π-subgroup of G and A is not a Π′ -group, then A ∩ H 6= 1 is a Hall Π-subgroup of A. (5) If |G : A| is a σi -number, then O σi (A) = Oσi (G). (6) If V /N is a σ-subnormal subgroup of G/N , then V is σ-subnormal in G. (7) If K is a σ-subnormal subgroup of A, then K is σ-subnormal in G. A group G is said to be σ-soluble [1] if every chief factor of G is σ-primary. Lemma 2.2 (See Lemmas 2.8 and 3.2 and Theorems B and C in [1]). Let A, K and N be subgroups of G, where A is σ-permutable in G and N is normal in G. (1) AN/N is σ-permutable in G/N . (2) If G is σ-soluble, then A ∩ K is σ-permutable in K. (3) If N ≤ K, K/N is σ-permutable in G/N and G is σ-soluble, then K is σ-permutable in G. (4) A is σ-subnormal in G. (5) If G is σ-soluble and K is σ-permutable in G, then K ∩ A is σ-permutable in G. Lemma 2.3. Let H be a normal subgroup of G. If H/H ∩ Φ(G) is a Π-group, then H has a a Hall Π-subgroup, say E, and E is normal in G. Hence, if H/H ∩ Φ(G) is σ-nilpotent, then H is σ-nilpotent. Proof. Let D = OΠ′ (H). Then, since H ∩ Φ(G) is nilpotent, D is a Hall Π′ -subgroup of H. Hence by the Schur-Zassenhaus theorem, H has a Hall Π-subgroup, say E. It is clear that H is π ′ -soluble where π ′ = ∪σi ∈Π′ σi , so any two Hall Π-subgroups of H are conjugate. By the Frattini argument, G = HNG (E) = (E(H ∩ Φ(G)))NG (E) = NG (E). Therefore E is normal in G. The lemma is proved. Lemma 2.4. If every chief factor of G below D = GNσ is cyclic, then D is nilpotent. Proof. Assume that this is false and let G be a counterexample of minimal order. Let R be a minimal normal subgroup of G. Then from the G-isomorphism D/D ∩ R ≃ DR/R = (G/R)Nσ we know that every chief factor of G/R below DR/R is cyclic, so the choice of G implies that D/D ∩ R ≃ DR/R is nilpotent. Hence R ≤ D and R is the unique minimal normal subgroup of G. In view of Lemma 2.3, R  Φ(G) and so R = CR (R) by [13, A, 15.2]. But by hypothesis, |R| is a prime, hence G/R = G/CG (R) is cyclic, so G is supersoluble and so GNσ is nilpotent since GNσ ≤ GN . The lemma is proved. 6 The following lemma is evident. Lemma 2.5. The class of all σ-soluble groups is closed under taking direct products, homomorphic images and subgroups. Moreover, any extension of the σ-soluble group by a σ-soluble group is a σ-soluble group as well. Let A, B and R be subgroups of G. Then A is said to R-permute with B [12] if for some x ∈ R we have AB x = B x A. If G has a complete Hall σ-set H = {1, H1 , . . . , Ht } such that Hi Hj = Hj Hi for all i, j, then we say that {H1 , . . . , Ht } is a σ-basis of G. Lemma 2.6 (See Theorems A and B in [2]). Assume that G is σ-soluble. (i) G has a σ-basis {H1 , . . . , Ht } such that for each i 6= j every Sylow subgroup of Hi G-permutes with every Sylow subgroup of Hj . (ii) For any Π, the following hold: G has a Hall Π-subgroup E, every Π-subgroup of G is contained in some conjugate of E and E G-permutes with every Sylow subgroup of G. Lemma 2.7. Let H, E and R be subgroups of G. Suppose that H is Hσ -subnormally embedded in G and R is normal in G. (1) If H ≤ E, then H is Hσ -subnormally embedded in E. (2) HR/R is Hσ -subnormally embedded in G/R. (3) If S is a σ-subnormal subgroup of G, then H ∩ S is Hσ -subnormally embedded in G. (4) If |G : H| is σ-primary, then H is either a σ-Hall subgroup of G or σ-subnormal in G. Proof. Let V be a σ-subnormal subgroup of G such that H is a σ-Hall subgroup of V . (1) This assertion is a corollary of Lemma 2.1(1). (2) In view of Lemma 2.1(3), V R/R is σ-subnormal subgroup of G/R. It is also clear that HR/R is a σ-Hall subgroup of V R/R. Hence HR/R is Hσ -subnormally embedded in G/R. (3) By Lemma 2.1(1)(2), V ∩ S is σ-subnormal both in V and in G and so H ∩ (V ∩ S) = H ∩ S is a σ-Hall subgroup of V ∩ S by Lemma 2.1(4), as required. (4) Assume that H is not σ-subnormal in G. Then H < V . By hypothesis, |G : H| is σ-primary, say |G : H| is a σi -number. Then |V : H| is a σi -number. But H is a σ-Hall subgroup of V . Hence H is a σ-Hall subgroup of G. The lemma is proved. Lemma 2.8. Let H be a σ-subnormal subgroup of a σ-soluble group G. If |G : H| is a σi -number and B is a σi -complement of H, then G = HNG (B). Proof. Assume that this lemma is false and let G be a counterexample of minimal order. Then H < G, so G has a proper subgroup M such that H ≤ M , |G : MG | is a σi -number and H is σ-subnormal in M . The choice of G implies that M = HNM (B). On the other hand, clearly that B 7 is a σi -complement of MG . Since G is σ-soluble, Lemma 2.6 and the Frattini argument imply that G = MG NG (B) = M NG (B) = HNM (B)NG (B) = HNG (B). The lemma is proved. The following lemma is well-known (see for example [14, Lemma 3.29] or [15, 1.10.10]). Lemma 2.9. Let H/K be an abelian chief factor of G and V a maximal subgroup of G such that K ≤ V and HV = G. Then G/VG ≃ (H/K) ⋊ (G/CG (H/K)). 3 Proofs of the results Proof of Theorem 1.3. Without loss of generality we may assume that Hi is a σi -group for all i = 1, . . . , t. (i), (iii) ⇒ (ii) Assume that this is false. Then D 6= 1 and so t > 1. First we prove the following claim. (*) If p ∈ σi ∩ π(G), then G has a σ-permutable subgroup E with |E| = |G|σi′ p. We can assume without loss of generality that i = 1. In fact, to prove Claim (*), we consistently build the σ-permutable subgroups E2 , . . . , Et such that |H2 | · · · |Hj | divides |Ej | and |Ej |σ1 = p for all j = 2, . . . , t. By hypothesis, G has an Hσ -permutably embedded subgroup X of order p. Let V be a σpermutable subgroup of G such that X is a σ-Hall subgroup of V . Then |V |σ1 = p and G has a complete Hall σ-set {1, K1 , . . . , Kt }, where Ki is a σi -group for all i = 1, . . . , t, such that V Ki = Ki V for all i = 1, . . . , t. Let W = V K2 . Then |W |σ1 = p. Next we show that there is an Hσ -permutably embedded subgroup Y of G such that |Y | = |W |. It is enough to consider the case when Condition (iii) holds. Let A1 be a subgroup of H1 of order p, A2 = H2 and Ai = Hi ∩ V for all i > 2. Then |A2 | = |H2 | = |K2 |. On the other hand, V ∩ Ki and V ∩ Hi are Hall σi -subgroups of V by Lemmas 2.1(4) and 2.2(4) and so |V ∩ Ki | = |V ∩ Hi |. Also, for every i > 2 we have |W : V ∩ Ki | = |V K2 : V ∩ Ki | = |V ||K2 | : |V ∩ K2 ||V ∩ Ki | is a σi′ -number and hence V ∩ Ki = W ∩ Ki is a Hall σi -subgroup of W . Therefore, |W | = p|H2 ||V ∩ H3 | . . . |V ∩ Ht | 8 and so G has an Hσ -permutably embedded subgroup Y of order |W | = |A1 | · · · |At | by hypothesis. Let E2 be a σ-permutable subgroup of G such that Y is a σ-Hall subgroup of E2 . Then |H2 | = |K2 | divides |E2 | and |E2 |σ1 = p. Now, arguing by induction, assume that G has a σ-permutable subgroup Et−1 such that |H2 | · · · |Ht−1 | divides |Et−1 | and |Et−1 |σ1 = p. Then for some Hall σt -group L we have Et−1 L = LEt−1 , and if Et = Et−1 L, then |Et | = |G|σ1′ p and Et clearly is σ-permutable in G, as required. Now, let p ∈ σi ∩ π(D) and let P be a Sylow p-subgroup of D. Then, by Claim (*), G possesses a σ-permutable subgroup E such that |E| = |G|σi′ p. Lemma 2.2(4) implies that E is σ-subnormal in G. Let j 6= i. Then Hjx ∩ E is a Hall σj -subgroup of E by Lemma 2.1(4), so |E : Hjx ∩ E| is a σj ′ -number. But |Hjx | divides |E| and hence |Hjx | divides |Hj ∩ E|. Thererore Hjx ≤ E for all x ∈ G. Thus HjG ≤ E and so G/EG is a σi -group. Hence D ≤ EG ≤ E, so |P | = p. Therefore G is supersoluble by [10, IV, 2.9] and so every chief factor of G below D is cyclic. Hence D is nilpotent by Lemma 2.4, so D is cyclic of square-free order. Hence D is complemented in G by Theorem 11.8 in [17]. Finally, assume that |σi ∩ π(G)| > 1 and let q ∈ σi ∩ π(G) \ {p}. Then G possesses a σ-permutable subgroup F such that |F | = |G|σi′ q. Then D ≤ FG ≤ F. Therefore D ≤ E ∩ F and so p does not divide |D|. This contradiction completes the proof of the implications (i) ⇒ (ii) and (iii) ⇒ (ii). (ii) ⇒ (iii) First we show that for every i and for every subgroup (respectively normal subgroup) Ai of Hi , there is an Hσ -permutably embedded (respectively Hσ -normally embedded) subgroup Ei of G such that |Ei | = |Ai ||G|σi′ . Since G evidently is σ-soluble, it has a σi -complement E by Lemma 2.6. Therefore, it is enough to consider the case when Ai 6= 1 since every σ-Hall subgroup of G is an Hσ -normally embedded in G. First suppose that D ≤ E. Then E/D is normal in G since G/D is σ-nilpotent. Therefore (E/D) × (Ai D/D) = EAi /D is σ-permutable (respectively normal) in G/D = (E/D) × (Hi D/D). Hence Ei = EAi is σ-permutable (respectively normal) in G by Lemma 2.2(3) and |Ei | = |Ai ||G|σi′ . Now suppose that D  E. Then D ∩ Hi 6= 1, so Hi is a p-group for some prime p since for each σi ∈ σ(D) we have |σi ∩ π(G)| = 1 by hypothesis. Hence H2 has a normal subgroup A such that Dp ≤ A and |A| = |Ai |, where Dp is a Sylow p-subgroup of D. Then D ≤ AE. Moreover, AE/D = (DA/D) × (ED/D) 9 since ED/D is a Hall σi′ -subgroup of G/D. Therefore Ei = AE is σ-permutable (respectively normal) in G by Lemma 2.2(3) and |Ei | = |Ai ||G|σi′ . Let E = E1 ∩ · · · ∩ Et . Then |E| = |A1 | . . . |At | since (|G : Ei |, |G : Ej |) = 1 for all i 6= j. Note that Ei is either a σ-Hall subgroup of G or σ-permutable (respectively normal) in G. Indeed, let V be a σ-permutable (respectively normal) subgroup of G such that Ei is a σ-Hall subgroup of V . Assume that Ei is not σ-permutable (respectively not normal) in G. Then Ei < V . Since |G : Ei | is σi -number, |V : Ei | is a σi -number. But Ei is a σ-Hall subgroup of V . Hence Ei = V is a σ-Hall subgroup of G. Assume that E1 , . . . , Er are σ-permutable (respectively normal) in G and Ei is a σ-Hall subgroup of G for all i > r. Then E 0 = E1 ∩ · · · ∩ Er is σ-permutable (respectively normal) in G by Lemma 2.2(5) and E ∗ = Er+1 ∩ · · · ∩ Et is a σ-Hall subgroup of G. Now, E = E 0 ∩ E ∗ is a σ-Hall subgroup of E 0 by Lemmas 2.1(4) and 2.2(4), so E is Hσ -permutably (respectively Hσ -normally) embedded in G. Hence (ii) ⇒ (iii). (ii) ⇒ (i) Since G is σ-soluble, H is σ-soluble. Hence H has a σ-basis {L1 , . . . , Lr } such that Li ≤ Hi for all i = 1, . . . , r by Lemma 2.6. Therefore from the implication (ii) ⇒ (iii) we get that G has an Hσ -permutably embedded subgroup of order |L1 | · · · |Lr | = |H|. The theorem is proved. Proof of Theorem 1.4. (i) ⇒ (ii) Assume that this is false and let G be a counterexample of minimal order. Then some σ-subnormal subgroup V of G is not an HσE-group. Moreover, D = GNσ 6= 1, so |σ(G)| > 1. (1) Condition (ii) is true on every proper section H/K of G, that is, K 6= 1 or H 6= G. Hence V = G (This directly follows from Lemma 2.7(1)(2) and the choice of G). (2) G is σ-soluble. In view of Claim (1) and Lemma 2.5, it is enough to show that G is not simple. Assume that this is false. Then 1 is the only proper σ-subnormal subgroup of G since |σ(G)| > 1. Hence every subgroup of G is a σ-Hall subgroup of G. Therefore for a Sylow p-subgroup P of G, where p is the smallest prime divisor of |G|, we have |P | = p and so |G| = p by [10, IV, 2.8]. This contradiction shows that we have (2). (3) If |G : H| is a σi -number and H is not a σ-Hall subgroup of G, then H is σ-subnormal in G and a σi -complement E of H is normal in G (This follows from Lemmas 2.7(4) and 2.8). (4) D is a Hall subgroup of G. Hence D has a complement M in G. Suppose that this is false and let P be a Sylow p-subgroup of D such that 1 < P < Gp , where Gp ∈ Sylp (G). We can assume without loss of generality that Gp ≤ H1 . Let R be a minimal normal subgroup of G contained in D. 10 Since D is soluble by Claim (2), R is a q-group for some prime q. Moreover, D/R = (G/R)Nσ is a Hall subgroup of G/R by Claim (1) and Proposition 2.2.8 in [16]. Suppose that P R/R 6= 1. Then P R/R ∈ Sylp (G/R). If q 6= p, then P ∈ Sylp (G). This contradicts the fact that P < Gp . Hence q = p, so R ≤ P and therefiore P/R ∈ Sylp (G/R). It follows that P ∈ Sylp (G). This contradiction shows that P R/R = 1, which implies that R = P is a Sylow p-subgroup of D. Therefore R is a unique minimal normal subgroup of G contained in D. It is also clear that a p-complement of D is a Hall subgroup of G. Now we show that R  Φ(G). Indeed, assume that R ≤ Φ(G). Then D 6= R by Lemma 2.3 since D = GNσ . On the other hand, D/R is a p′ -group. Hence Op′ (D) 6= 1 by Lemma 2.3. But Op′ (D) is characteristic in D and so it is normal G. Therefore G has a minimal normal subgroup L such that L 6= R and L ≤ D. This contradiction shows that R  Φ(G). Let S be a maximal subgroup of G such that RS = G. Then |G : S| is a p-number. Hence, since R is not a Sylow p-subgroup of G, p divides |S|. Then S is not a Hall subgroup of G and so S is not a σ-Hall subgroup of G. Therefore S is σ-subnormal in G by Claim (3) and so G/SG is a σi -group, which implies that R ≤ D ≤ SG ≤ S and so G = RS = S. This contradiction completes the proof of (4). (5) If M ≤ E < G, then E is not σ-permutable in G and so E a σ-Hall subgroup of G. Assume that E is σ-permutable in G. Then E is σ-subnormal in G by Lemma 2.2(4). Then there is a subgroup chain E = E0 ≤ E1 ≤ · · · ≤ Er = G such that either Ei−1 is normal in Ei or Ei /(Ei−1 )Ei is σ-primary for all i = 1, . . . , r. Let V = Er−1 . We can assume without loss of generality that V 6= G. Therefore, since G is σ-soluble by Claim (2), for some σ-primary chief factor G/W of G we have E ≤ V ≤ W . Also we have D ≤ W and so G = DE ≤ W , a contradiction. Hence E is not σ-permutable in G. By hypothesis, G has a σ-permutable subgroup S such that E is a σ-Hall subgroup of S. But then S = G, by the above argument, so E is a σ-Hall subgroup of G. In particular, M is a σ-Hall subgroup of G and so D is a σ-Hall subgroup of G. (6) D is soluble, |σ(D)| = |π(D)| and M acts irreducibly on every M -invariant Sylow subgroup of D. Let p ∈ σi ∈ σ(D). Lemma 2.6 and Claims (2) and (4) imply that for some Sylow p-subgroup P of G we have P M = M P . Moreover, M P is a σ-Hall subgroup of G by Claim (5). Hence |σi ∩π(G)| = 1 for all i such that σi ∩ π(D) 6= ∅ and so |σ(D)| = |π(D)|. Therefore, since D is soluble by Claim (2), M acts irreducibly on every M -invariant Sylow subgroup of D by Claim (5). (7) M is a σ-Carter subgroup of G. Let R be a minimal normal subgroup of G contained in D and E a subgroup of G containing M . 11 We need to show that E = E Nσ M . Claim (1) implies that RM/R is a σ-Carter subgroup of G/R, so ER/R = (ER/R)Nσ (RM/R). Hence ER = E Nσ M R since (ER/R)Nσ = E Nσ R/R. Claim (6) implies that R is a p-group for some prime p. Claims (4), (5) and (6) imply that R, E and E Nσ M are σ-Hall subgroups of G. Therefore, if R  E, then E and E Nσ M are Hall p′ -subgroups of ER = E Nσ M R, so E = E Nσ M . Finally, assume that R ≤ E but R  E Nσ M . Then R ∩ E Nσ = 1. On the other hand, since DE/D ≃ E/D ∩ E is σ-nilpotent, E Nσ ≤ D and so M ∩ E Nσ = 1. Therefore E Nσ ∩ RM = (E Nσ ∩ R)(E Nσ ∩ M ) = 1. Then E/E Nσ = E Nσ M R/E Nσ ≃ M R is σ-nilpotent. Hence M ≤ CG (R). Suppose that CG (R) < G and let CG (R) ≤ W < G, where G/W is a chief factor of G. Claim (2) implies that G/W is σ-primary, so D ≤ W . But then G = DM ≤ W < G, a contradiction. Therefore CG (R) = G, that is, R ≤ Z(G). Let V be a complement to R in D. Then V is a Hall normal subgroup of D, so it is characteristic in D. Hence V is normal in G and G/V ≃ RM is σ-nilpotent, so D ≤ V < D. This contradiction completes the proof of (7). (8) D possesses a Sylow tower. Let R be a minimal normal subgroup of G contained in D. Then R is a p-group for some prime p by Claim (6). Moreover, the Frattini argument implies that for some Sylow p-subgroup P of D we have M ≤ NG (P ) and so R = P since M acts irreducible on P by Claim (6). On the other hand, by Claim (1), D/R possesses a Sylow tower. Hence we have (8). (9) Every chief factor of G below D is σ-eccentric. Let H/K be a chief factor of G below D. Then H/K is a p-group for some prime p since D is soluble by Claim (6). By the Fratiini argument, there exist a Sylow p-subgroup P and a p-complement E of D such that M ≤ NG (P ) and M ≤ NG (E). Then M ≤ NG (P ∩ K) and M ≤ NG (P ∩ H). Hence P ∩ K = 1 and P ∩ H = P by Claim (6), so H = K ⋊ P . Let V = EM . Then K ≤ V and HV = G, so V is a maximal subgroup of G. Hence G/VG ≃ (H/K) ⋊ (G/CG (H/K)) by Lemma 2.9. Therefore, if H/K is σ-central in G, then D ≤ VG , which is impossible since evidently p does not divide |V |. Thus we have (9). 12 From Claims (4)–(9) it follows that G is a HσE-group, contrary to our assumption on G = V . Hence (i) ⇒ (ii). (ii) ⇒ (iii) This implication is evident. (iii) ⇒ (i) By hypothesis, G = D⋊M , where D = GNσ is a σ-Hall subgroup of G, |σ(D)| = |π(D)| and M acts irreducibly on every M -invariant Sylow subgroup of D. (*) Every subgroup A of G containing M is a σ-Hall subgroup of G. Let D0 = D ∩ A. Then A = D0 ⋊ M and D0 6= 1. Let p ∈ π(D0 ). The Frattini argument and Lemma 2.6 imply that for some Sylow p-subgroup P0 of D0 and some Sylow p-subgroup P of D we have M ≤ NG (P0 ), M ≤ NG (P ) and P0 M ≤ P M . Hence, since M acts irreducibly on every M invariant Sylow subgroup of D, P0 = P . Therefore every Sylow subgroup of A is a Sylow subgroup of G. Hence A is a σ-Hall subgroup of G since |σ(D)| = |π(D)| and M is a σ-Hall subgroup of G. Now, let A be a subgroup of G. First assume that DA < G. By Lemma 2.1(6), DA is σsubnormal in G. Therefore every σ-subnormal subgroup of DA is also σ-subnormal in G. Hence Condition (iii) holds for DA, so A is Hσ -subnormally embedded in DA by induction. But then A is Hσ -subnormally embedded in G by Lemma 2.1(7). Finally, suppose that DA = G. Then, since G is σ-soluble, for some x we have M ≤ Ax by Lemma 2.6. Hence Ax is a σ-Hall subgroup of G by Claim (*), so Ax is an Hσ -subnormally embedded subgroup of G. But then A is an Hσ -subnormally embedded subgroup of G. Therefore the implication (iii) ⇒ (i) is true. The theorem is proved. Proof of Theorem 1.9. (i) ⇒ (ii) This follows from Lemma 2.2(4) and Theorems 1.3 and 1.4. (ii) ⇒ (iii) This implication is evident. (iii) ⇒ (i) Let A be any subgroup of G. Then DA is σ-permutable in G by Lemma 2.2(3) since G is σ-soluble. On the other hand, since |σ(D)| = |π(D)| and D is a cyclic σ-Hall subgroup of G of square-free order, A is a σ-Hall subgroup of DA. Hence A is Hσ -permutably embedded in G. Therefore the implication (iii) ⇒ (i) is true. The theorem is proved. Proof of Theorem 1.7. (i) ⇒ (ii) In view of Theorem 1.9, it is enough to show that if D ≤ L ≤ G and L is a σ-Hall subgroup of some normal subgroup V of G, then L is normal in G. But since G/D is σ-nilpotent, L/D is σ-subnormal in G/D, so L is σ-subnormal in G by Lemma 2.1(6). Hence L is σ-subnormal in V by Lemma 2.1(1). But then L is a normal in V by Lemma 2.1(4) and so L is a characteristic subgroup of V . It follows that L is normal in G. (ii) ⇒ (iii) This implication is evident. (iii) ⇒ (i) See the proof of the implication (iii) ⇒ (i) in Theorem 1.9. The theorem is proved. 13 References [1] A. N. Skiba, On σ-subnormal and σ-permutable subgroups of finite groups, J. Algebra, 436 (2015), 1–16. [2] A. N. Skiba, A generalization of a Hall theorem, J. Algebra and its Application, 436 (2015), 1–16. [3] A.N. Skiba, On some results in the theory of finite partially soluble groups, Commun. Math. Stat., 4(3) (2016), 281–309. [4] A. Ballester-Bolinches, R. Esteban-Romero, M. Asaad, Products of Finite Groups, Berlin-New York, Walter de Gruyter, 2010. [5] W. Guo, Structure Theory for Canonical Classes of Finite Groups, Springer, Heidelberg-New York-Dordrecht-London, 2015. [6] S. Li, J. He, G. Nong, L. Zhou, On Hall normally embedded subgroups of finite groups, Comm. Algebra, 37 (2009), 3360–3367. [7] J. Lio, S. Li, CLT −groups with Hall S-quasinormally embedded subgroups, Ukrain. Math. Journal, 66 (2014), 1281–1287. [8] S. Li, J. Liu, On Hall subnormally embedded and generalized nilpotent groups, J. Algebra, 388 (2013), 1–9. [9] W. Guo, A. N. Skiba, Finite groups with permutable complete Wielandt sets of subgroups, J. Group Theory, 18 (2015), 191–200. [10] B. Huppert, Endliche Gruppen I, Springer-Verlag, Berlin-Heidelberg-New York, 1967. [11] A. Ballester-Bolinches, Shou Homg Qiao, On a problem posed by S. Li and J. Liu, Arch. Math., 102 (2014), 109–111. [12] W. Guo, K. P. Shum, A. N. Skiba, X-semipermutable subgroups of finite groups, J. Algebra, 315 (2007), 31–41. [13] K. Doerk, T. Hawkes, Finite Soluble Groups, Walter de Gruyter, Berlin-New York, 1992. [14] L. A. Shemetkov, A. N. Skiba, Formations of Algebraic Systems, Nauka, Main Editorial Board for Physical and Mathematical Literature, Moscow, 1989. [15] W. Guo, The Theory of Classes of Groups, Science Press-Kluwer Academic Publishers, Beijing, New York, Dordrecht, Boston, London, 2000. [16] A. Ballester-Bolinches, L.M. Ezquerro, Classes of Finite groups, Springer, Dordrecht, 2006. 14 [17] L. A. Shemetkov, Formations of finite groupsNauka, Main Editorial Board for Physical and Mathematical Literature, Moscow, 1989. 15
4math.GR
Information-theoretic bounds and phase transitions in clustering, sparse PCA, and submatrix localization arXiv:1607.05222v2 [math.ST] 23 Jan 2017 Jess Banks Cristopher Moore Roman Vershynin Jiaming Xu ∗ Nicolas Verzelen January 24, 2017 Abstract We study the problem of detecting a structured, low-rank signal matrix corrupted with additive Gaussian noise. This includes clustering in a Gaussian mixture model, sparse PCA, and submatrix localization. Each of these problems is conjectured to exhibit a sharp information-theoretic threshold, below which the signal is too weak for any algorithm to detect. We derive upper and lower bounds on these thresholds by applying the first and second moment methods to the likelihood ratio between these “planted models” and null models where the signal matrix is zero. For sparse PCA and submatrix localization, we determine this threshold exactly in the limit where the number of blocks is√large or the signal matrix is very sparse; for the clustering problem, our bounds differ by a factor of 2 when the number of clusters is large. Moreover, our upper bounds show that for each of these problems there is a significant regime where reliable detection is information-theoretically possible but where known algorithms such as PCA fail completely, since the spectrum of the observed matrix is uninformative. This regime is analogous to the conjectured ‘hard but detectable’ regime for community detection in sparse graphs. Keywords: First and second moment methods, clustering, information-theoretic bounds, sparse PCA, submatrix localization 1 Introduction Many problems in machine learning, signal processing, and statistical inference have a common, unifying goal: reconstruct a low-rank signal matrix observed through a noisy channel. This framework can encompass a wide range of tasks as we vary the channel and low-rank signal, but we focus here on the case where the noise is additive and Gaussian, and the signal is relatively weak in comparison to the noise. To be precise, suppose we are given an m × n data matrix X =M +W snr with M = √ U V † , n (1) where snr is a fixed parameter characterizing the signal-to-noise ratio, U ∈ Rm×k and V ∈ Rn×k are generated from some known prior distribution independent of n, and W ∈ Rm×n is a noise matrix whose entries are independent Gaussians with unit variance. We will refer to this as the planted model : it consists of a noisy ∗ J. Banks is with the Department of Mathematics, University of California, Berkeley, Berkeley, CA, [email protected]. C. Moore is with the Santa Fe Institute, Santa Fe, NM, [email protected]. R. Vershynin is with the Department of Mathematics, University of Michigan, Ann Arbor, MI, [email protected]. N. Verzelen is with UMR 729 MISTEA, INRA, Montpellier. J. Xu is with the Krannert School of Management, Purdue University, West Lafayette, IN 47907, [email protected]. This work was in part presented at the 54th Annual Allerton Conference on Communication, Control, and Computing, September 27-30, 2016, Monticello, IL, USA. 1 observation X of a signal matrix M of rank k, and may possess additional structure through the priors on U and V . Given the observed matrix X, the problem of interest is to reconstruct M , or at least detect that it exists. For simplicity, we will work in the Bayes-optimal case where model parameters such as the true rank and signal-to-noise ratio are known to the estimators. In the low signal-to-noise ratio regime we consider, exact reconstruction of M is fundamentally impossible (see §2 for more details). Instead, we focus on the following two tasks: first, detecting that the signal M exists, i.e., telling with high probability whether X was indeed generated by the planted model as opposed to a null model where M = 0 and X consists only of noise; and second, reconstructing M to some accuracy better than chance. We define these tasks formally as follows. Definition 1 (Detection). Let P(X) be the distribution of X in the planted model (1), and denote by Q(X) the distribution of X in the null model where X = W . A test statistic T (X) with a threshold  achieves detection if limn→∞ [P(T (X) < ) + Q(T (X) ≥ τ )] = 0, so that the criterion T (X) ≥  determines with high probability whether X is drawn from P or Q. c=M c(X) achieves reconstruction if EX kM ck2 = O(n) and Definition 2 (Reconstruction). An estimator M F ci ≥ , where hA, Bi = Tr A† B denotes the there exists a constant  > 0 such that limn→∞ (1/n)EM,X hM, M matrix inner product and kAk2F = hA, Ai. For many natural problems in this class, it is believed that there is a phase transition, i.e., a threshold value of snr below which both tasks are information-theoretically impossible: no test statistic can distinguish the c = 0. This threshold is known as the null and planted models, and no estimator can beat the trivial one M information-theoretic threshold and it also depends on the structure of the problem, i.e., on the priors of U and V ; if this prior is more strongly structured, we expect the threshold to be lower. We focus on three cases of (1) which arise in many applications. In Sparse PCA, k = 1 and U = V = v for some vector v. We further assume that v is sparse, with a constant fraction of nonzero entries. This corresponds to the sparse, spiked Wigner model of [20, 38]. In Submatrix Localization (also known as submatrix detection and noisy clustering), U = V and M contains k ≥ 2 distinct blocks of elevated mean. This model arises in the analysis of social networks and gene expression, see e.g. [31, 15, 24]; it can also be thought of as a Gaussian version of the stochastic block model [19, 18]. Finally, in Gaussian Mixture Clustering, there are k ≥ 2 clusters, and each row of M is the center of the cluster to which the corresponding data point belongs. This model has been widely studied, see, e.g., [47, 46, 30, 29, 2]. For each of these three problems, our goal is to compute the information-theoretic threshold, and understand how it scales with the parameters of the problem: for instance, the sparsity of the underlying signal or the number of clusters. In particular, a simple upper bound on the information-theoretic threshold for each of these problems is the point at which spectral algorithms succeed, i.e., the point at which the likely spectrum of X becomes distinguishable from the spectrum of the random matrix W . The spectral thresholds for our problems are well known from the theory of Gaussian matrices with low-rank perturbations. However, based on compelling but non-rigorous arguments from statistical physics (e.g. [37, 36]), it has been conjectured that when the signal is sufficiently sparse, or its rank (the number of clusters or blocks) is sufficiently large, the information-theoretic threshold falls strictly below the spectral one. In this paper, we prove upper and lower bounds on information-theoretic thresholds of all three problems, determining the threshold within a multiplicative constant in interesting regimes. For sparse PCA, we determine the precise threshold in the limit where the signal matrix is very sparse; similarly, for the submatrix localization problem, we determine the threshold when the number of blocks is large. For the clustering √ problem, our bounds differ by a factor of 2 in the limit where the number of clusters is large. Moreover, our results verify the conjecture that the information-theoretic threshold dips below the spectral one when the signal is sufficiently sparse, or when the number of clusters or blocks is sufficiently large. This corresponds to recent results [1, 9, 17, 23] showing that, in the stochastic block model, the information-theoretic detectability threshold falls below the Kesten-Stigum bound above which efficient spectral and message-passing algorithms succeed [19, 18, 39, 33, 14]. We consider this evidence for the conjecture that these problems posses a ‘hard but detectable’ regime where detection and reconstruction are information-theoretically possible but take at least exponential time. Although our computations are specific to these models, our proof techniques are 2 quite general and may be applied with mild adjustment to a broad range of similar problems. We present our results in §2, an overview of our proof techniques in §3, and full proofs in in §4. Since the initial posting of this paper as an arXiv preprint, a number of interesting papers [44, 43, 35] have appeared, some extending or improving our results. Sharp lower bounds for sparse PCA were also obtained recently in [43] using a conditional second moment method similar to ours. Complete, but not explicit, characterizations of information-theoretic reconstruction thresholds were obtained in [34, 35] for sparse PCA and submatrix localization through the Guerra interpolation technique and cavity method. However, their characterization of reconstruction thresholds does not directly apply to detection. 2 Models and results 2.1 Sparse PCA Consider the following spiked Wigner model, where the underlying signal is a rank-one matrix: λ X = √ vv † + W , n (2) i.i.d. Here, v ∈ Rn , λ > 0 and W ∈ Rn×n is a Wigner random matrix with Wii ∼ N (0, 2) and Wij = i.i.d. Wij ∼ N (0, 1) for i < j. We assume v is drawn from the sparse Rademacher prior, although many alternatives may be imposed. Specifically, for some γ ∈ [0, 1] the support of v is drawn uniformly from all  n subsets S ⊂ [n] with |S| = γn (when n is finite, we assume that γn is an integer). Once the support is γn chosen, each nonzero component vi is drawn independently and uniformly from {±γ −1/2 }, so that kvk22 = n. When γ is small, the data matrix X is a sparse, rank-one matrix observed through Gaussian noise. One natural approach for this problem is PCA: that is, diagonalize X and use its leading eigenvector vb as an estimate of v. The threshold at which this algorithm succeeds can be computed using the theory of random matrices with rank-one perturbations [8, 42, 11]: √ (1) When λ > 1, the leading eigenvalue of X/ n converges almost surely to λ + λ−1 , and hv, vbi2 converges almost surely to 1 − λ−2 ; thus PCA succeeds √ in reconstructing better than chance; (2) When λ ≤ 1, the leading eigenvalue of X/ n converges almost surely to 2, and hv, vbi2 converges almost surely to 0; thus PCA fails to reconstruct better than chance. Because the leading eigenvalue of W is 2 w.h.p., detection is only possible when λ > 1. Intuitively, PCA only exploits the low-rank structure of the underlying signal, and not the sparsity of v; it is natural to ask whether one can succeed in detection or reconstruction for some λ < 1 by taking advantage of this additional structure. Through analysis of an approximate message-passing algorithm and the free energy, the following conjecture was made in statistical physics [38, 34]: Conjecture 1. Let the computational threshold be the minimum of λ so that reconstruction or detection can be attained in polynomial-time in n for a given γ. There exists γ ∗ ∈ (0, 1) such that (1) If γ ≥ γ ∗ , then both the information-theoretic and computational thresholds are given by λ = 1. (2) If γ < γ ∗ , then the computational threshold is given by λ = 1, but the information-theoretic threshold for λ is strictly smaller. We derive the following upper and lower bounds on the information-theoretic threshold in terms of λ and γ, and confirm that the threshold is λ = 1 when γ is relatively large and falls strictly below λ = 1 when γ is sufficiently small. Throughout, we use h(γ) = −γ log γ − (1 − γ) log(1 − γ) to denote the entropy function, and W(y) for the root x of xex = y. All our logarithms are natural. 3 Theorem 1. Let p λupper = 2 h(γ) + γ log 2  1  r      1√ 2γ W lower 2γ e λ = r    √    4γ − log γ − 2.1 −2 log γ − (3) γ ≥ 0.6 e−41 /81 ≤ γ < 0.6 3 2 log  3e 1−γ  (4) γ < e−41 /81 . Then detection and reconstruction are information-theoretically possible when λ > λupper and are impossible when λ < λlower . In our proof, we give tighter lower bounds, but these are analytically convenient. Note that λupper falls below the spectral threshold λ = 1 whenever γ ≤ 0.054, and λlower matches the spectral threshold whenever γ ≥ 0.6. Hence, Theorem 1 proves Conjecture 1 on information-theoretic threshold, albeit without pinning down γ ∗ exactly. In addition, in the limit γ → 0, both λupper and λlower give an information-theoretic threshold of p (5) λc = 2 (1 + oγ (1)) −γ log γ , determining the threshold fully in the limit where the low-rank matrix is very sparse. Independent of the present work, and building on our preprint [10], Perry et al. [43] obtained the same tight threshold √ in this limit with a smaller error term. Previous work [16] had determined that threshold scales as λ = Θ( −γ log γ) up to a constant factor. In passing, we note that there is a very interesting line of work on exact or approximate support reconstruction for sparse PCA, i.e., estimating correctly or consistently the positions of non-zeros in v, in a regime where the size of the support is sublinear in n (see e.g., [28, 5, 12, 32, 21] and references therein)1 . In an influential paper [28], it was shown that while the estimate via the classical PCA is inconsistent, a simple diagonal thresholding procedure consistently estimates v provided that v is sufficiently sparse. Assuming λ = Θ(1), it is later proved in [5] that diagonal thresholding exactly recovers the support of v with high probability if γ . 1/(n log n), and the information-theoretic threshold for exact support recovery is given by γ  1/ log n up to a constant factor. In contrast, we focus on the regime where the size of the support is linear in n, i.e., γ = Θ(1), and λ = Θ(1). In this regime it is impossible to correctly or consistently estimate the support of v, and hence we instead focus on detection and reconstruction better than chance. 2.2 Submatrix Localization In the submatrix localization problem, our task is to detect within a large Gaussian matrix a small block or blocks with atypical mean. Let σ : [n] → [k] be a balanced partition, i.e. one for which |σ −1 (t)| = n/k for all t ∈ [k], chosen uniformly from all such partitions. This terminology will recur throught the paper. Construct a n × n matrix Y such that Yi,j = 1σ(i)=σ(j) . In the planted model,   µ 1 X=√ (6) Y − J +W , k n where W is again a Wigner matrix and J is the all-ones matrix. In the null model, X = W . The subtraction of J/k model, √ centers the signal matrix so that EX = 0 in both the null and planted models. In the planted √ (µ/ n) (Y − J/k) is a rank-(k − 1) matrix with the largest (k − 1) eigenvalues all equal to µ n/k, making X a Wigner matrix with a rank-(k − 1) additive perturbation. Matrices of this type exhibit the following spectral phase transition: √ be precise, those references mostly study the spiked Wishart model: X = (λ/ n)uv > + W , where u ∈ Rm with i.i.d. N (0, 1) entries and W is a m × n Gaussian matrix with i.i.d. N (0, 1) entries; the results can be readily extended to the spiked Wigner model. 1 To 4 √ (1) When µ > k, the k leading eigenvalues of X/√n converge to µ/k + k/µ almost surely; (2) When µ ≤ k, the k leading eigenvalues of X/ n converge to 2 almost surely. Hence, it is possible to detect the presence of the additive perturbation from the spectrum of X alone when µ > k. We prove the following upper and lower bounds on the information-theoretic threshold: Theorem 2. Let r upper µ µlower log k = 2k k−1  2    q 2 log(k−1) = k k−1 q    2 k log k − 11k log3/4 (k) (7) k=2 3 ≤ k ≤ exp(224 ) (8) 4 k > exp(22 ) . Then detection and reconstruction are information-theoretically possible when µ > µupper and impossible when µ < µlower . Note that µupper dips below the spectral threshold µ = k when k ≥ 11, indicating a regime where standard spectral methods fail but detection is information-theoretically possible. Also, Theorem 2 proves √ the conjecture in [37] that as k → ∞, the information-theoretic threshold is given by µ = 2 k log k. Previous work in submatrix detection and localization, also known as noisy biclustering, mostly focuses on finding a single submatrix, see, e.g., [31, 15, 24] and the references therein. Notably, √ [17] considers a general setting where the number of blocks k could grow with n, and proves that if µ ≥ c k log n for some large constant c, then it is informationally possible to exactly reconstruct the support of the planted submatrices √ with high probability; if µ ≤ c0 k log n, then exact support reconstruction is informationally impossible. In our setting, µ = Θ(1) and k = Θ(1), so it is impossible to consistently estimate the support and we instead resort to detection and reconstruction better than the chance. 2.3 Gaussian Mixture Clustering Finally, we study a model of clustering with limited data in high dimension. P Let v1 , ..., vk be independently and identically distributed as N (0, k/(k − 1) In,n ) , and define v = (1/k) s vs to be their mean. The scaling of the expected norm of each vs with k ensures that Ekvs − vk22 = n for all 1 ≤ s ≤ k. For a fixed parameter α > 0, we then generate m = αn points xi ∈ Rn which are partitioned into k clusters of equal size by a balanced partition σ : [n] → [k], again chosen uniformly at random from all such partitions. For each data point i, let σi ∈ [k] p denote its cluster index, and generate xi independently according to Gaussian distribution with mean ρ/n (vσi − v) and identity covariance matrix, where ρ > 0 is a fixed parameter characterizing the cluster separation. We can put this in the form of model (1) by constructing an n × k matrix V = [v1 , ..., vk ], an m × k matrix S with Si,t = 1σi =t , and setting r   ρ 1 X= S − Jm,k V † + W, (9) n k i.i.d. where Wi,j ∼ N (0, 1). In the null model, there is no cluster structure and X = W . The subtraction of Jm,k /k once again centers the signal matrix so that EX = 0 in both models. The following spectral phase transition follows from the celebrated BBP phase transition [8, 41]: √ ρ (1) When ρ α > k − 1, then the largest eigenvalue of (1/m)X † X converges to (1 + k−1 )(1 + k−1 ρα ) almost surely; √ √ (2) When ρ α ≤ k − 1, then the largest eigenvalue of (1/m)X † X converges to (1 + 1/ α)2 almost surely. √ Thus spectral detection is possible if ρ α > (k − 1). We prove √ the following upper and lower bounds on the information-theoretic threshold, which differ by a factor of 2 when k is large. 5 Theorem 3. Let r ρ upper ρlower k log k =2 + 2 log k α (p 1/α k=2 = q 2(k−1) log(k−1) k ≥ 3. α (10) (11) Then detection and reconstruction are possible when ρ > ρupper and impossible when ρ < ρlower . p We conjecture that in the limit k → ∞, the information-theoretic threshold is ρ = 2 k log k/α, but we do not find a proof. Most previous work in Gaussian mixture clustering focuses exact or near-exact reconstruction, see e.g., [46, 30]. As in the §2.1, a popular approach is PCA, which identifies the clusters based on the first k principal components of the data matrix. It is shown in [47] that PCA allows identification of clusters with a cluster √ separation ρ = Ω(k 1/4 log n) and a sample of size m = Ω(d3 log d). This technique was extended√to non√ Gaussian distributions [29, 2], and for Gaussian, the cluster separation is improved to be ρ = Ω( k log n) and the sample complexity reduced to m = Ω(k 2 d) in [2]. In our setting, since ρ is a fixed constant, the cluster separation is not sufficient for exact reconstruction and we turn to detection and reconstruction better than chance. Somewhat surprisingly, we find that if the number of clusters is large, clustering is informationally possible even when below the spectral phase transition threshold, and we conjecture that in this regime it is computationally hard to identify the clusters. We note that a similar “hard-but-detectable” regime has been determined empirically in [46]. 3 Proof techniques This section gives a brief overview of our proof techniques; the full proof will be presented in the next section. 3.1 The likelihood ratio and hypothesis testing Detection is a classic hypothesis testing problem. Given a test statistic T (X), we consider its distribution under the planted and null models. If these two distributions are asymptotically disjoint, i.e., their total variation distance tends to 1 in the limit of large datasets, then it is information-theoretically possible to distinguish the two models with high probability by measuring T (X). A classic choice of statistic for binary hypothesis testing is the likelihood ratio, P P P(X|M ) P(M ) P(X) M P(X, M ) = = M . Q(X) Q(X) Q(X) This object will figure heavily in both our upper and lower bounds. By the Neyman-Pearson lemma [27], the likelihood ratio is the most powerful test statistic of a given significance level; that is, if we set the threshold  at the point such that Q(T (X) < ) = α for any fixed α, it maximizes P(T (X) ≥ ). Our upper bounds do not use the likelihood ratio directly, since it is hard to furnish lower bounds on the typical value of P(X)/Q(X) when X is drawn from P. Instead, we use the generalized likelihood ratio, max M P(X|M ) . Q(X) In the planted model where the true underlying signal matrix is M0 , this quantity is trivially bounded below by P(X|M0 )/Q(X). We will use simple first moment arguments to show that, with high probability in the null model Q, this lower bound is not achieved by any M . An easy extension of this argument shows c = argmaxM P(X|M ) has nonzero that, in the planted model, the maximum likelihood estimator (MLE) M correlation with M0 . Thus we can output a good estimate of M0 by exhaustive search. 6 The conditional likelihood ratio has a particularly elegant form when the noise is additive and Gaussian. It is first useful to write down the probability distribution of a Wigner random matrix in the space of symmetric matrices (also known as the Gaussian Orthogonal Ensemble) as Q(W ) = 1 − 1 kW k2F e 4 Zn (12) where Zn is a normalization constant depending only on n. Similarly, if W is a Gaussian random matrix whose entries are independently distribution as N (0, 1), then Q(W ) = 1 − 1 kW k2F e 2 . Zn0 (13) Thus, for Wigner noise the conditional likelihood ratio is 2 2 2 1 1 1 P(X|M ) Q(X − M ) = = e 4 (kXkF −kX−M kF ) = e 2 hX,M i− 4 kM kF Q(X) Q(X) (14) and identical for Gaussian noise except for a factor of two in the exponent. The conditional log likelihood is a weighted sum of the entries of X, and is therefore itself Gaussian. Our first moment bounds now proceed as follows. In the planted model, when X = M0 + W , the conditional log 2 likelihood of the planted signal M0 is 21 hW, M0 i + 41 kM0 kF . We can use standard Gaussian concentration 2 results to bound the typical deviation of this quantity around its mean of 41 kM0 kF . On the other hand, in 2 the null model where X = W , the conditional log likelihood of any M is 21 hW, M i − 14 kM kF , and we can combine Gaussian concentration bounds with a union bound over all possible M to compute when, with high probability in the null model, no M will beat the conditional log likelihood of the planted signal M0 . As above, this argument can be nominally modified to show that the MLE estimate is positively correlated with M0 . This technique must be altered slightly for the case of Gaussian Mixture Clustering, since M ∝ SV † and V is chosen from a continuous prior. We could take a union bound over V by suitably discretizing; instead we use the fact that for any S we can analytically maximize the conditional likelihood of SV † with respect to V by setting the ith cluster center to be the empirical center of the data points assigned to cluster i by S. This alters the distribution of the likelihood ratio, but we proceed analogously to above with the proper concentration results. 3.2 Second moment bounds and contiguity Intuitively, if the planted model P and the null model Q have asymptotically disjoint support, then the likelihood ratio P/Q is almost always either very large or very small. In particular, its variance in Q must diverge. This suggests that we can derive lower bounds on the threshold by bounding its second moment in Q, or equivalently its expectation in P. Suppose the second moment is bounded by some constant C, i.e., " 2 #   Z P(X) P(X) P(X)2 EX∼Q = EX∼P = dX ≤C. (15) Q(X) Q(X) Q(X) X This implies a bound on the Kullback-Leibler divergence between P and Q, since Jensen’s inequality gives DKL (PkQ) = EX∼P log P(X) P(X) ≤ log EX∼P ≤ log C = O(1) . Q(X) Q(X) (16) Moreover, it also implies that detection is impossible. To see this, consider the following definition: Definition 3. Let P = (Pn ), Q = (Qn ) be sequences of distributions defined on the same sequence of spaces Ωn . We write P E Q, and say that P is contiguous to Q, if for any sequence of events E = (En ) such that Q(E) → 0, we also have P(E) → 0. 7 If P E Q then detection is impossible, since no algorithm can return “yes” with high probability (or even positive probability) in the planted model, and “no” with high probability in the null model. The following simple argument shows that (15) implies P E Q and hence non-detectability. Let E be a sequence of events such that Q(E) → 0, and let 1E denote the indicator random variable for E. Then Cauchy-Schwarz gives s 2  p P(X) P(X) × EX∼Q 12E ≤ CQ(E) → 0 . 1E ≤ EX∼Q (17) P(E) = EX∼P 1E = EX∼Q Q(X) Q(X) We note that showing that Q E P often requires additional arguments such as the small subgraph conditioning method [40, 9]. The following lemma gives a general expression for the second moment of the likelihood ratio whenever the model consists of a symmetric signal matrix with Wigner noise or an asymmetric signal matrix with Gaussian noise. Lemma 1. Let P(X) and Q(X) be the planted and null models X = M + W and X = W respectively, where M is drawn from some prior over symmetric matrices and W is a Wigner matrix. Then  EX∼Q P(X) Q(X) 2 0 1 = EM,M 0 e 2 hM,M i , where M and M 0 are drawn independently from the prior. Similarly, if M is drawn from some prior over asymmetric matrices and W is a Gaussian random matrix,  EX∼Q P(X) Q(X) 2 0 = EM,M 0 ehM,M i . Thus the second moment method boils down to calculating an exponential moment of the correlation between two independent draws from the prior P(M ). Depending on P(M ), these draws can correlate in complicated ways, and the remainder of our second moment computations consist of combinatorially analyzing the various events in P(M ) that give rise to these correlations. 3.3 Conditional second moment method Sometimes, rare events can cause the second moment to explode even when two models are truly contiguous. We circumvent this by computing the second moment conditioned on a sequence of high-probability events F which rule out the catastrophic rare ones. In the planted model, these events can occur both in the prior distribution of the planted signal, and in the additive Gaussian noise of the channel. To address atypical events in the prior, we will condition on some high probability property of the signal M , choosing an appropriate event {M ∈ F } such that P(F ) = 1+o(1), and form the corresponding conditional distribution P0 (X) = EM [P(X|M )1F ] . P(F ) (18) The case where the problematic events occur in the noise distribution is similar; we define an event {X −M ∈ FM } such that P(FM |M ) = 1 + o(1) uniformly over M , and the corresponding conditional distribution P0 (X) = EM [P0 (X|M )], where P0 (X|M ) = P(X|M )1FM . P(FM |M ) (19) In both cases, it is straightforward to show that P E P0 , and therefore that if the conditional second moment 2 EX∼Q (P0 (X)/Q(X)) is bounded, then P E P0 E Q. 8 In the Gaussian mixture clustering problem, we use the first type of conditional second moment method by conditioning on the typical value of cluster centers kV k2 . In the sparse PCA problem and the submatrix localization problem, we instead use the second type of conditional second moment method to close the factor √ of 2 between the direct second moment lower bound and the first moment upper bound. A similar method was used in [43] to derive the sharp constant of the detection lower bound in the sparse PCA problem. Previous work [6, 49] used the conditional second moment method in deriving the sharp detection threshold in community detection problem. As a high-level motivation for this conditioning, let P(X) and Q(X) be the planted and null models X = M + W and X = W respectively, where M is drawn from some prior over symmetric matrices and W is a Wigner matrix. Using Fubini’s theorem,  EX∼Q P(X) Q(X) 2  P(X|M )P(X|M 0 ) Q2 (X) h 1 i 2 0 2 0 1 1 = EM,M 0 EX∼Q e− 4 kM kF − 4 kM kF + 2 hX,M +M i  = EM,M 0 1 = EM,M 0 e 2 hM,M 0 i where M and M 0 are drawn independently from the prior, and in the last line we have carried out the the integration with respect to X ∼ Q directly. The reader may refer to the proof of Lemma 1 for the intervening lines. However, it is possible to decrease the second moment by conditioning on the typical value of hX, M + M 0 i in the planted model.   Specifically, suppose that P hX, M i ≈ kM k2F | M = 1 + o(1) uniformly over M . Then, by letting FM = {hX, M i ≈ kM k2F }, we get that  EX∼Q P0 (X) Q(X) 2     1 1 1 2 0 2 0 ≈E EX∼Q exp − kM kF − kM kF + hX, M + M i 1{FM } 1{FM 0 } 4 4 2     1 1 1 ≈ EM,M 0 EX∼Q exp − kM k2F − kM 0 k2F + hX, M + M 0 i 1{hX,M +M 0 i≈kM k2 +kM 0 k2 } F F 4 4 2 !# "   2 kM + M 0 k2F kM k2F + kM 0 k2F 1 hM, M 0 i − 1− ≈ EM,M 0 exp 2 4 kM + M 0 k2F +    2 0 2 kM k + kM k 1 F F = EM,M 0 exp hM, M 0 i 2 kM + M 0 k2F    where we used the fact that for Y ∼ N (0, σ 2 ), E eY 1{Y ≤b} ≤ exp 12 σ 2 − 12 σ 2 (1 − σb2 )2+ and 12 hX, M + M 0 i ∼ N (0, kM + M 0 k2F /2). Comparing  this conditional second moment with the unconditional one, there is a correction term kM k2F + kM 0 k2F /kM + M 0 k2F , which is most effective if M = M 0 . It will turn out that in the sparse PCA problem, when the sparsity γ → 0 or in the submatrix localization problem, when the number of blocks k → ∞, the second moment is dominated by the event that M = M 0 . Hence, M,M 0  EX∼Q P0 (X) Q(X) 2   1 2 ≈ exp kM kF PM,M 0 [M = M 0 ] , 4  as opposed to exp 21 kM k2F PM,M 0 [M = M 0 ] in the absence of conditioning, a factor of two gain in the exponent. Notice that there is one slight difference between this informal description and our proofs. Instead of conditioning on the typical value of hX, M i ≈ kM k2F , we condition on the typical value of k(X − M )S k2 , where S = supp(M ) and XS denotes the matrix by setting entries of X outside of S to be zero. The reader may refer to Section 4.2.3 and Section 4.3.3 for details. 9 3.4 Non-reconstructibility Without further embellishment, contiguity is a statement about detection and not reconstruction. It is tempting to believe that whenever contiguity holds—that is, whenever we cannot tell whether a particular sample was generated from the null or planted model—we also cannot infer the planted signal M0 better than chance. This is not the case. Consider a strange situation in which the null and planted models are identical and noiseless: in P we observe X = M0 drawn from a prior P0 , and in Q we observe a random draw M from P0 . Detection is patently impossible because these models are contiguous, but if we know that X is drawn from the planted model, the reconstruction problem is trivial since we observe the ground truth M0 directly. However, in the model described by (1) where the noise is additive and Gaussian, we can show that a bounded KL divergence implies that reconstruction is impossible as well. If M is the planted signal, the c is EkM − M ck2 . The following theorem shows that whenever the mean squared error of an estimator M F c KL divergence DKL (PkQ) = o(n), the estimator M that minimizes the mean squared error tends to the c = 0. By (16) a bounded second moment (15) implies a bounded KL divergence; hence trivial estimator M a bounded second moment also implies non-reconstruction. Theorem 4. Let P(X) and Q(X) be the planted and null models X = M + W and X = W respectively, where M is drawn from some prior such that E[M ] = 0 and limn→∞ (1/n)E[kM k2F ] exists, and where W is a Gaussian or Wigner matrix. The MMSE estimator in the planted model is the mean of the posterior b distribution: E(X) = E[M |X]. If the KL divergence DKL (PkQ) = o(n), then lim inf n→∞ 1 2 b EX∼P kE(X)k F = 0. n (20) c=M c(X) such that EX kM ck2 = O(n), we have that It further follows that for any estimator M F lim inf n→∞ 1 ci = 0. EM,X hM, M n (21) √ When M = (snr/ n) U V † , where the rows of U and V are independently and identically distributed according to some priors, then the liminf in (20) and (21) can be replaced by lim. In cases where we use the conditional second moment method by conditioning on events F that depend only on the signal M , i.e., F = {M ∈ F }, the conditional distribution P0 given in (18) is still an additive Gaussian model. Hence, we can still apply Theorem 4 with P0 and Q, concluding that a bounded conditional 2 second moment EX∼Q (P0 (X)/Q(X)) implies non-reconstruction in P0 and hence non-reconstruction in P. When we need to condition on events FM that depend on both M and X, i.e., F = {X − M ∈ F }, the conditional distribution P0 given in (19) may no longer be an additive Gaussian model, and hence Theorem 4 cannot be directly invoked. Fortunately, we are able to prove that (1/n)DKL (P0 kQ) is an asymptotic upper bound to (1/n)DKL (PkQ). As a consequence, by (16) a bounded conditional second moment 2 EX∼Q (P0 (X)/Q(X)) implies DKL (PkQ) = o(n) and hence non-reconstruction in P by invoking Theorem 4. Let kM k∗ denote the nuclear norm of M , which equals to the sum of all the singular values of M . Theorem 5. Let P(X) and Q(X) be the planted and null √ models X = M + √W and X = W respectively, where M is drawn from some prior such that kM k2 = O( n) and kM k∗ = O( n) uniformly over all M , and where W is a Gaussian or Wigner matrix. Suppose P0 is given in (19) with P(FM |M ) = 1 + o(1) uniformly over all M . Then DKL (PkQ) ≤ DKL (P0 kQ) + o(n). √ √ Theorem 5 needs the technical assumptions that kM k2 = O( n) and kM k∗ = O( n). These assumptions are satisfied in the sparse PCA and submatrix localization problems, but not in the Gaussian mixture clustering problem, which has a prior distribution of unbounded support. This last fact does not impact our results, because the conditioning we emply for the clustering lower bound is on the signal M and not the noise, meaning that as above we can invoke Theorem 4. To deal with prior distribution of unbounded support, one could emply a truncation argument. 10 4 4.1 Proofs Notation and preliminary lemmas We begin by proving Lemma 1. The proof is discussed in [26, p.97]; we give the full proof here for completeness. Proof of Lemma 1. We focus on the Wigner noise case as the proof for Gaussian noise case is identical except for a factor of 2. As we noted in equation (14), the conditional likelihood ratio is 2 1 1 Q(X − M ) P(X|M ) = = e 2 hX,M i− 4 kM kF . Q(X) Q(X) (22) We have P(X) = EM P(X|M ). Reversing the order of the expectations and applying (14) gives EX∼Q P(X|M ) P(X|M 0 ) P(X)2 0 = E E X∼Q M,M Q(X)2 Q(X)2 P(X|M ) P(X|M 0 ) = EM,M 0 EX∼Q Q(X)2 1 2 0 2 kF ) 1 2 0 2 kF −kM +M 0 k2F ) = EM,M 0 e− 4 (kM kF +kM = EM,M 0 e− 4 (kM kF +kM 1 1 EX∼Q e 2 hX,M +M 0 i 0 = EM,M 0 e 2 hM,M i , 2 where in the second-to-last line we used the moment generating function EX∼Q ehX,Ai = ekAkF . This completes the proof. In the submatrix localization and Gaussian mixture clustering problems, the underlying low-rank signal matrix M arises from a balanced partition σ0 : [n] → [k]. In these cases we can equivalently frame results about reconstruction in terms of how well we can infer this original partition. Given σ0 and an estimated partition σ b, we define the overlap matrix as a k × k matrix ω(σ0 , σ b) which has s, t entry equal to the fraction of integers in [n] assigned by σ0 to group s and by σ b to group t, i.e. ω(σ0 , σ b)s,t = |σ0−1 (s) ∩ σ b−1 (t)| n/k and we drop the dependence on σ0 and σ b whenever clear. Our assumption that the partitions are balanced implies that ω is doubly stochastic. We can read off scalar measures of the correlation between two partitions σ and τ —i.e. of how well we have reconstructed the planted signal—directly from ω; two will be particularly useful. It is typical in the literature to work with what we will call the trace overlap between σ and τ , T (σ, τ ) := maxπ Tr πω(σ, τ ), where the maximum is taken over all permutation matrices. In our problems, however, it is analytically more 2 convenient to use L(σ, τ ) := kω(σ, τ )kF , which we call the L2 overlap. Both L(·) and T (·) range from 1, when the two partitions are uncorrelated and ω = J/k, to k, when they are identical up to a permutation of the group labels, and ω is the corresponding permutation matrix. The following lemma states that whenever the L2 overlap is bounded above 1, the trace overlap is as well. Lemma 2. For any doubly stochastic matrix ω, L(ω) ≤ T (ω). Proof. This lemma is an immediate consequence of Birkhoff’s theorem. We simply expand ω = a convex combination of permutation matrices π and observe that X L(ω) = Tr ω † ω = aπ Tr π † ω ≤ max Tr π † ω = T (ω), π π the final inequality following from P π aπ = 1. 11 P π aπ π as Thus, to show that an estimator σ b achieves trace overlap with the planted partition σ0 bounded above one, it is sufficient to show that L(b σ , σ0 ) > 1. Finally, in the submatrix localization and Gaussian mixture clustering problems, our second moment   calculations will reduce to the computation of Eσ,τ exp(ξ(kωk2F − 1))/2 where the expectation is over uniformly random pairs of balanced partitions σ and τ with overlap matrix ω, and ξ is a parameter corresponding to the signal-to-noise ratio. By [3, Lemma 6], it is straightforward to prove the following lemma giving a sufficient condition to guarantee that this expectation, and therefore the second moment as a whole, is bounded by a constant. We will state the lemma in notation consistent with [3] and discuss afterwords. Lemma 3. Assume that ϕ(ω) is an R-valued function of doubly-stochastic k×k matrices ω with the properties that ϕ(J/k) = 0 and for some δ > 0 and every k × k doubly stochastic matrices ω,  H(ω) + ϕ(ω) ≤ H(J/k) + ϕ(J/k) − δ kωk2F − 1 . Then there exists a constant C, dependent on k and δ, such that i h Eσ,τ enϕ(ω) ≤ C. Proof. Let Ω = (Ωst ) such that Ωs,t = |σ −1 (s) ∩ τ −1 (t)|. Then ω = kΩ/n. Denote by D the set of all k × k matrices Ω = (Ωst ) of nonnegative integers such that Q the sum of each row and each column is n/k. Notice that for a given Ω = (Ωst ), there are precisely n!/ s,t Ωs,t ! pairs of balanced partitions (σ, τ ) with overlap matrix given by Ω. Hence, h i (n/k)!2k X n! Q exp (nϕ(ω)) Eσ,τ enϕ(ω) = n!2 s,t Ωs,t ! ≤ k −2n Ω∈D 2k k−1 e n 2πk k X n! exp (ϕ(ω)) , s,t Ωs,t ! Q Ω∈D (23) √ √ where we have used Stirling’s approximation 2πn(n/e)n ≤ n! ≤ e n(n/e)n in the last step. In view of the assumption and [3, Lemma 6], there exists a constant C 0 > 0 dependent on δ and k such that n X C0  n! C0 Q enϕ(ω) ≤ k−1 k 2 eϕ(J/k) = k−1 k 2n . n n s,t Ωs,t ! Ω∈D Combing the last displayed equation with (23) yields that h i C 0 e2k := C, Eσ,τ enϕ(ω) ≤ 2πk k which completes the proof. Let us unpack  the conditions of the above lemma in the context of our problems. For us, ϕ(ω) = (ξ/2) kωk2F − 1 , and since H(J/k) = log k and kJ/kk2F = 1, it is in fact sufficient to study the function Φ(ω) = H(ω) − log k +  ξ kωk2F − 1 . 2 (24)  In particular, the hypotheses of Lemma 3 are satisfied provided that Φ(ω) ≤ −δ kωk2F − 1 for every doubly stochastic matrix ω and some δ > 0. This is the case whenever ξ is sufficiently small. On the other hand, in the limit ξ → ∞, Φ(ω) is maximized by any permutation matrix, the doubly stochastic matrices with maximal Frobenius norm and minimal entropy. It has been conjectured that, for general ξ, the maximizer is a convex combination of J/k and a permutation matrix, but this has not been proved. The precise value of ξ up to which Φ(ω) is maximized by ω = J/k is not known. Fortunately, Achlioptas and Naor, in their second moment lower bound on the k-colorability threshold for Erdős-Rényi graphs [3], proved an upper bound on Φ by relaxing to singly stochastic matrices. 12 Lemma 4. [3, Theorems 7,9] When ξ < 2 log(k − 1)/(k − 1), argmax Φ(ω) = J/k. One can obtain an even tighter bound in the special case k = 2. Recall that the 2×2 doubly stochastic matrices are a one-parameter family—since the upper left entry uniquely determines the matrix. Consequently we can rewrite Φ(ω) in (24) as ξ Φ(x) = h(x) + (4x2 − 4x + 1) − log 2 . 2 The second derivative of Φ(x) is 4ξ − 1/(x(1 − x)). Hence, if ξ < 1, then Φ(x) is strictly concave in x and arg maxx Φ(x) = 1/2. Lemma 5. When k = 2 and ξ < 1, arg maxω Φ(ω) = J/2. 4.2 Sparse PCA In this section we prove Theorem 1. First, we show that detection and reconstruction are possible if λ > λupper using a first moment argument as described in Section 3.1: specifically, if λ > λupper then with high probability in Q there are no v with likelihood as high as that of the ground truth v0 , and with high probability in P all such v are correlated with v0 . Then, we prove that the second moment of the likelihood ratio is bounded if λ < λlower ; as discussed in Section 3.2, this implies that detection and reconstruction are impossible if λ < λlower . 4.2.1 First moment upper bound for sparse PCA √ Recall that X = (λ/ n)v0 v0† +W , where v0 is drawn uniformly from V = {v ∈ {±γ −1/2 , 0} : |supp(v)| = γn} and W is a Wigner matrix. For any v ∈ V, using (14), the conditional log likelihood ratio is log P(X|v) 1 1 = hM, Xi − kM k2F Q(X) 2 4 1 λ2 1 λ kvk42 = √ hv, Xvi − 2 n 4 n 1 λ λ2 n = √ hv, Xvi − . 2 n 4 In the null model, X = W and hv, Xvi is distributed as N (0, 2n2 ), giving  2  P(X|v) λ n λ2 n log ∼N − , . Q(X) 4 2 (25) On the other hand, in the planted model λ λ hv, Xvi = hv, W vi + √ hv, v0 v0† vi = hv, W vi + √ hv, v0 i2 , n n so the conditional log likelihood has a distribution which depends on the inner product between v and the ground truth v0 . We write this inner product as hv, v0 i = θn, for θ ∈ [−1, 1] so that   (2θ2 − 1)λ2 n λ2 n P(X | v) ∼N , log Q(X) 4 2 Whenever θ = 0 so that v is uncorrelated with v0 , this distribution is identical to that in the null model. To show that detection is possible above (3), notice that in the planted model the maximum likelihood estimate vb = argmaxv∈V P(X|v) has conditional log likelihood at least as large as the ground truth v0 . By standard Gaussian tail bounds and setting θ = ±1 above,   p P(X|v0 ) λ2 n P log ≤ − O( n log n) ≤ n−Ω(1) . Q(X) 4 13 In the null model, Gaussian tail bounds give us    2  p p P(X|v) λ2 n λ n Q log ≥ − O( n log n) ≤ exp − + O( n log n) . Q(X) 4 4   n n Taking the union bound over all 2γn γn possible v and invoking Stirling’s formula γn ≤ enh(γ) , we have     √ 2 p P(X|v) λ2 n n − λ 4n +h(γ)+γ log 2 +O( n log n) Q max log . ≥ − O( n log n) ≤ exp v∈V Q(X) 4 (26) When this expression is e−Ω(n) , we can with high probability distinguish the null and planted models with the generalized likelihood test. This occurs when λ < λupper where λupper is defined in (3), i.e., λ2 > h(γ) + γ log 2 . 4 (27) Next, we prove that reconstruction is also possible above this bound. Suppose that X is generated from the planted model, and that hb v , v0 i = θn. We bound the probability that vb has conditional log likelihood as large as v0 with a union bound over vb correlated with v0 , but we bound the number of such vectors n generously as 2γn γn once again. Combining this with the Gaussian tail bound and invoking Stirling gives  p P(X|v) λ2 n > + O( n log n) Q(X) 4 v∈V:hv,v0 i≤θn     p (2θ2 − 1)λ2 ≤ exp n + h(γ) + γ log 2 + O( n log n) . 4  P max log Since the coefficient of n in the exponent is an analytic function of θ, whenever (27) holds, the RHS of the last displayed equation is exponentially small unless θ2 > ε for some constant ε > 0. Therefore, with high probability the MLE estimator has overlap (hb v , v0 i/n)2 = θ2 > ε > 0 with the ground truth. √ † 2 4 2 c, M i = c = (λ/ n)b ck = (λ /n)kb v k2 = λ2 n; moreover, with high probability hM Moreover, if M v vb , then kM F 2 2 2 c (λ /n)hb v , v0 i > ελ n. Hence, the estimator M reconstructs the signal matrix better than chance. 4.2.2 Second moment lower bound for sparse PCA In this subsection, we use the second moment method to prove a lower bound on the detectability transition for sparse PCA. We assume λ < 1 throughout√the proof; the boundary case λ = 1 is not addressed. In the planted model, the signal matrix is M = (λ/ n)vv † , and in the null model it is zero. In both cases, we have X = M + W where W is a Wigner noise matrix. Applying Lemma 1, the second moment (where X is drawn from the null model) is  EX∼Q P(X) Q(X) 2 λ2 2 = Ev,w e 2n hv,wi , (28) where v and w are drawn independently from the prior. Denote the overlap z = |supp(v) ∩ supp(w)| and let t be the difference between the number of indices in that intersection where v and w agree and the number of indices where they disagree. In that case, hv, wi = t . γ Then, z follows an hypergeometric distribution with parameter (n, γn, γn) and given z, t is distributed as a sum of z independent Rademacher random variables. If we write η = λ/γ , 14 (29) then  EX∼Q P(X) Q(X) 2  2 2 η t = Et e 2n . We know from [4, p.173] that z has the same distribution as the random variable E[z|Bn ] where z is a Binomial random variable with parameters (γn, γ) and Bn some suitable σ-algebra. Given z, let t be distributed as a sum of z independent Rademacher variables. Lemma 6. Let (i )i≥1 denote a sequence of independent Rademacher random variables. For anyPa > 0, let z g be the piecewise linear function on [1, ∞) such that, for any positive integer z, g(z) = E exp[a( i=1 i )2 ]. Then, the function g is convex. Proof. Since g is convex and continuously differentiable on each interval of the form (z, z + 1) where z is an integer, we only have to prove that its left derivative is less or equal its right derivative at z + 1. This is Pto z equivalent to showing that g(z + 2) + g(z) ≥ 2g(z + 1). Define u = i=1 i . Conditioning with respect to u, 2 2 we obtain g(z + 1) = Eu [eau +a cosh 2au] and g(z + 2) = Eu [eau [0.5e4a cosh 4au + 0.5]. Hence, it suffices to prove that, for any u, 1 3 ea cosh 2au ≤ e4a cosh 4au + . 4 4 √ For x ≥ 0, let h(x) = eax cosh(2au x). Since h is a product of two increasing convex functions, h is also convex. This implies the above inequality and concludes the proof. By Jensen’s inequality, it follows that  EX∼Q P(X) Q(X) 2  2 2 η t ≤ Et e 2n . (30) To simplify the notation, we simply write z and t instead of z and t in the sequel. Note that  22  X z η t η 2 u2 Et e 2n | z = e 2n (Pt [|t| ≥ u | z] − Pt [|t| ≥ u + 1 | z]) u=0 ≤1+ z X η 2 u η 2 u2 e 2n Pt [|t| ≥ u | z] n u=1 ≤1+2   z X η 2 u u22 ηn2 − z1 , e n u=1 where we applied Hoeffding’s inequality: Pt (|t| ≥ u | z) ≤ 2e−u We consider three subcases depending on the value of z. Case 1: If z ≤ (n/η 2 )λ,  22  η t Et e 2n | z ≤ ≤ where we used z ≤ nλ η2 2 /(2z) (31) (32) in the last line. Z ∞ 2 −u2  η2    z X η 2 u u22 ηn2 − z1 η u 2 z1 − n e ≤ 1 + O(1) e du n n 0 u=1     η2 1 ≤ O , O(1) 1 + n/z − η 2 1−λ 1+2 in the last inequality. 15 (33) Case 2: If (n/η 2 )λ < z ≤ n/η 2 , we have    22  η t 2n n n Ez Et e | z 1z∈( 2 λ, 2 ] η η " ! #   z X η 2 u u22 ηn2 − z1 ≤ Ez 1+2 1z∈( n2 λ, n2 ] e n η η u=1    η 2 (z + 1)2 ≤ Ez 1+ 1z∈( n2 λ, n2 ] n η η h i ≤ O(1 + nγ)Pz z ≥ ηn2 λ ,  where in the second inequality we bound exp u2 /2 η 2 /n − 1/z ≤ 1 and in the third inequality we use z ≤ n/η 2 and z ≤ nγ. Since λ/η 2 = γ 2 /λ > γ 2 and z ∼ Bin(γn, γ), Bernstein’s inequality implies that Pz z ≥ (n/η 2 )λ is exponentially small. Therefore,    22  η t (34) Ez Et e 2n |z 1z∈( n2 λ, n2 ] = o(1) . η η  Case 3: Finally, if n/η 2 < z ≤ γn, then exp u2 /2 η 2 /n − 1/z is exponentially large in u. Thus to show that the second moment is finite, we need to use the fact that Pz [z ≥ a] for a > n/η 2 is exponentially small. When z > n/η 2 , the bound in(32) implies that    22  2 2 z X η t z2 η2 z η2 u z η z Et e 2n | z ≤ 1 + 2e 2n − 2 ≤ O(n) exp − , n 2n 2 u=1 where we applied z ≤ γn and the second inequality holds due to λ < 1. For any 0 < p0 < p1 ≤ 1, define   1 − p1 p1 hp0 (p1 ) = p1 log( p0 ) + (1 − p1 ) log , (35) 1 − p0 the KL-divergence between Bernoulli random variables with parameters p0 and p1 respectively. Chernoff’s inequality implies that for any a ≥ γ 2 n,    a . Pz [z ≥ a] ≤ exp −γnhγ γn As a consequence,   22   η t Ez Et e 2n | z 1z∈( n2 ,γn] ≤ O(n) η γn X  exp z=n/η 2 " ≤ 2 O(n ) exp n z z2 η2 − − γnhγ 2n 2 # sup  z γn  ψ(ζ) , ζ∈[1/η 2 ,γ] where (η 2 ζ − 1)ζ (η 2 ζ − 1)ζ ψ(ζ) = − γhγ (ζ/γ) = − ζ log 2 2     ζ γ−ζ − (γ − ζ) log + γ log(γ) , γ 1−γ (36) Then, we need to show that ψ(ζ) < 0 for all 2 ζ ∈ [γ 2 /λ2 , γ] , (37) 2 Note that this property is trivial when γ/λ > 1 so that we may restrict our attention to γ/λ ≤ 1. Since λ < 1, it follows that ψ(γ 2 /λ2 ) = −γhγ (γ/λ2 ) < 0. For ζ = γ, ψ(ζ) = (λ2 − γ)/2 − γ log(1/γ) , which is negative for p λ < 2γ(− log γ + 1/2) . (38) 16 λ 1.0 0.8 0.6 0.4 0.2 0.05 0.10 0.15 0.20 0.25 0.30 γ Figure 1: Upper and lower bounds on the information-theoretic detectability threshold in sparse PCA. Our upper bound (dashed) shows that the detectability threshold is strictly below the spectral threshold λ = γη = 1 for γ < 0.054. The solid line shows the lower bound given by (37), and the dotted line shows the simpler lower bound given√by (40). Notice that the solid line is not touching the dashed line even in the limit γ → 0; there is a gap of 2. Moreover, the second derivative of ψ has at most two roots. It follows that ψ(ζ) can have at most three local minima or maxima occurring at the roots of   ζ(1 − γ) 1 0 2 . ψ = η ζ − − log 2 γ(γ − ζ) Figure 1 shows λ as a function of γ, illustrating in particular that it rapidly approaches the spectral transition λ = 1 as γ approaches 1. We now derive an analytic bound of ψ. For ζ ∈ (γ 2 /λ2 , γ],     η2 γ − 1 ζ 1−γ ψ(ζ) ≤ ζ − ζ log + γ(1 − ζ/γ) log 2 γ2 1 − ζ/γ   2 η γ−1 ζ ≤ζ − ζ log + ζ − γ2 2 γ2   2 λ /γ + 1 + 2 log λ , ≤ζ 2 2 2 2 where we used log(1 line and  + x) ≤2x2 in the  second   ζ ≥ γ /λ ≥ γ in the third line. Therefore, Ez Et exp η t /2n | z 1z∈(n/η2 ,γn] , and hence the second moment, are bounded as long as log λ2 + λ2 /γ + 1 < 0. 2 If, for any y > 0, we use W(y) to denote the root x of xex = y, (39) holds whenever s   1 λ < 2γW √ . 2 eγ As y → ∞, we have W(y) ∼ log y. Thus as γ → 0, this lower bound approaches s 1 lower λ ∼ 2γ log √ . 2 eγ 17 (39) (40) (41) Let us now turn to regime γ > 0.6, where we will show the second moment is bounded whenever λ < 1. In view of (33) and (34), it suffices to prove that     22 η t Ez Et e 2n | z 1z∈(γ 2 n,γn] = O(1) , whenever λ < 1. From (31), we have   22   η t 2n Ez Et e | z 1z∈(γ 2 n,γn] " # z X η 2 u η 2 u2 ≤ Ez 1 + e 2n Pt [|t| ≥ u | z] 1z∈(γ 2 n,γn n u=1   γn X z X (a) γn z η 2 u η2 u2 γ (1 − γ)γn−z ≤ 1+ e 2n Pt [|t| ≥ u | z] z n z=γ 2 n u=1  2     γn X z X (b) (1−λ2 )u2 η2 u u u 1 z − 2nγ 2 p ≤ 1 + O(1) e exp + zh + − z log(2) − γnhγ , 2 2nγ 2z 2 γn (z(1 − z/γn)) ∨ 1 2 u=1 n z=γ n where we used in (a) that z follows a Binomial distribution. In step (b), hγ is defined as in (35), and we have used the facts that      u+z u+z ≤ 2 exp −zh1/2 Pt [|t| ≥ u | z] = 2 Pr Bin(z, 1/2) ≥ 2 2z and   γn ≤ z !   z p ∧ 1 exp γnh γn 2πz(1 − z/(γn)) 1  for z ≤ γn. Expanding as Taylor series, we have 4 h(u) ≤ log(2) − 2(u − 1/2)2 − (u − 1/2)4 3 and hγ (u) ≥ (u − γ)2 . 2γ(1 − γ) This yields    22  η t Ez Et e 2n |z 1z∈(γ 2 n,γn] ≤ 1 + O(1) γn X z X z=γ 2 n u=1 η2 u n p (z(1 − z/γn)) ∨ 1 e − (1−λ2 )u2 2nγ 2    2 2 4 2 u u u (z/(γn) − γ)  expn − − − 2(γn)2 2zn 12z 3 n 2(1 − γ) | {z } = (I)  We focus on the term (I), which is maximized with respect to u by choosing   1 1 1 u2 = × 12z 3 n − . 2 2γ 2 n2 2zn 18 Hence,  2 1 γn (z/(γn) − γ)2 3 z3 − − 2 3 4γ n γ z 2(1 − γ)   2 3z 1 z ≤ − −γ 4γ 2 n 2(1 − γ) γn   2 3 1 z ≤ − −γ , 4γ 2(1 − γ) γn (I) ≤ since z ≤ γn. The above expression is negative as soon as γ > 0.6. For such a choice of γ, there exist two positive constants c1 and c2 such that   22   γn X z X (z−γ 2 n)2 η t u2 u 2n p e−c1 n e−c2 n Ez Et e |z 1z∈(γ 2 n,γn] ≤ 1 + O(1) = O(1) , n (z(1 − z/γn)) ∨ 1 z=γ 2 n u=1 where the last equality holds because γ > 0.6. Pz u=1 (u/n)e −c1 u2 /n = O(n). This completes the proof in the regime The conclusion for reconstruction follows by applying (16) and Theorem 4. Furthermore, for any estimator c = (λ/√n)b vb ∈ V of v, applying Theorem 4 to the estimator M v vb† gives 1 1 ci = o(1) . Ehv, vbi2 = EhM, M n2 nλ2 Thus we can neither reconstruct the signal matrix nor the sparse vector v. 4.2.3 Conditional second moment lower bound for sparse PCA Bounding the second moment is too rough to pinpoint the exact information-theoretical threshold for small √ γ. Indeed, there is asymptotically an 2 gap between the λlower and λupper . To recover the exact constant, we shall bound some conditional second moment. Throughout this proof, we consider λ such that s "      #   1 1 3e 3 1 2 λ < 4γ log − 2.1 2 log − log ≤ 4γ log . (42) γ γ 2 1−γ γ We shall restrict our attention to γ small enough that log(1/γ) > 41 + log(81), which is equivalent to s   1 √ . (43) 9 γ < 2γW √ 2 eγ For any set a ⊂ [n] and any square matrix X, let Xa refer to the matrix whose entries outside a × a have been set to zero. Given a vector v, we define the event Γv by   λ √ † Γv := k(X − √ vv )supp(v) k2 ≤ 2.1 nγ . (44) n Under P(·|v), the supp(v) × supp(v) submatrix of X − √λn vv † is distributed as a Wigner Matrix. By [7, √ Theorem 5.1], its spectral norm rescaled by γn converges almost surely to 2 when n → ∞, and so P(Γv |v) = 1 + o(1) uniformly with respect to v. The event Γv means that the noise added to the nonzero entries of vv † is not uncharacteristiaclly large. 19 Next, we condition on the high probability events Γv and define the conditional probability distribution   1Γv 0 . (45) P (X) = Ev P(X|v) P(Γv |v) The conditional second moment decomposes as  02     P (X) P(X|v)P(X|w) 1Γv 1Γw EX∼Q = E E v,w X∼Q Q2 (X) Q2 (X) P(Γv |v)P(Γw |w)     † † λ λ2 n √ <vv +ww ,X>− 2 ≤ (1 + o(1))Ev,w EX∼Q e 2 n 1Γv  , {z } | = (I) where we used that P(Γv |v) = 1 + o(1). Introduce the notation z = |supp(v) ∩ supp(w)|, t+ = |supp(v + w)|, t− = |supp(v − w)| and t = t+ − t− , so that that z = t+ + t− . Finally, we define the function  r λ t2+ + t2− n √ + 2.1 (t+ + t− ) . g(t+ , t− ) := γ γ2 n Under Γv , one has hvv † , Xsupp(v+w) + Xsupp(v−w) i ≤Sg(t+ , t− ). To bound (I), we first integrate with respect to entries of X outside supp(v + w) × supp(v + w) supp(v − w) × supp(v − w).     λ2 z 2 λ † (I) = EX∼Q exp √ hvv , Xsupp(v+w) + Xsupp(v−w) i − 2 1Γv 2γ n n     λ λ2 z 2 † ≤ EX∼Q exp √ hvv , Xsupp(v+w) + Xsupp(v−w) i − 2 1hvv† ,Xsupp(v+w) +Xsupp(v−w) i≤g(t+ ,t− ) 2γ n n   2  q 2 + t2 ) 2 2 2(t λ (a) + − λ t 1 g(t , t )γ  + −   √ ≤ exp 2 −  −q  2γ n 2 γ n 2 2 2(t+ + t− ) +  !2  √ 2 2 η t 1 η z 2 + t2 √  , √ ≤ exp − − 2.1 nγ 2n 2 2 n + where we used 2 EY ∼N (0,1) [eaY 1Y ≤b ] ≤ ea /2−(a−b)2+ /2 and the fact that hvv † , Xsupp(v+w) + Xsupp(v−w) i ∼ N (0, 2(t2+ + t2− )/γ 2 ) in (a) and η = λ/γ in the last line. When v and w are sampled independently according to the sparse PCA model, then z follows a hypergeometric distribution with parameters (n, γn, γn). Conditioned on z, t is distributed as a sum of z independent Rademacher random variables. Returning to the second moment, we arrive at   !2  √  02  2 2 2 + t2 P (X) η t 1 η z √  . √ EX∼Q ≤ (1 + o(1)) Ez,t exp − − 2.1 nγ (46) Q2 (X) 2n 2 2 n + 0 In comparison to the second moment √ √ bound√for the original distribution P(X), the bound for P (X) involves a correction factor λ z 2 + t2 /2γ n − 2.1 nγ + , which is most effective when z is large. If instead z ≤ n/(2η 2 ), we make use of the bound (33) proved for second moment bound:  22    η t η2 2n Et e |z ≤ O 1 + = O (1) . (47) n/z − η 2 20 For larger values of z, we rely on the fact that the hypergeometric distribution with parameters (n, γn, γn) is stochastically dominated by the Binomial distribution with parameters (γn, γ/(1 − γ)). It follows from Chernoff’s bound that  2 ηt Ez,t e 2n 1z∈(  n 2η 2 ,γn/3) γn/3 (a)  X ≤ exp z=n/(2η 2 ) γn/3 (b) X ≤ z=n/(2η 2 ) γn/3 (c) X ≤ z=n/(2η 2 ) γn/3 (d) X ≤ z=n/(2η 2 ) η2 z2 − γnhγ/(1−γ) 2n  z γn    2   η z z(1 − γ) exp z − log 2n eγ 2 n      2 1−γ 1 2eλ2 λ − log ∨ + log exp z 6γ 3eγ 4 1−γ      2 1−γ 8e5/4 γ log(1/γ) λ − log ∨ log exp z 6γ 3eγ 1−γ γn/3 X ≤ exp(−z) = o(1) , (48) z=n/(2η 2 ) where the last line holds for some constant  > 0 in view of (42) and of the condition γ < 1/(81e41 ). We used in (a) that t ≤ z, in (b) that hp0 (p1 ) ≥ p1 log(p1 /(ep0 )) in (c) that the function x 7→ η 2 x/(2n) − log(x) is decreasing on (0, 2n/η 2 ] and increasing on [2n/η 2 , ∞). and in (d) that λ2 ≤ −4γ log γ. Finally, we turn to the case z ∈ [γn/3, γn], for which we will rely on the correcting term in (46). Assume √ that λ ≥ 9 γ without loss of generality, because otherwise by (43), the second moment is bounded without any conditioning. For z larger than γn/3, √ λz √ √ ≥ 2.1 nγ, 2γ n and we can once again apply Chernoff’s bound to obtain    !2  √ 2 2 2 2 1 η z +t η t √  1z∈(γn/3,γn]  √ − − 2.1 nγ Ez,t exp 2n 2 2 n + " #  2 ! η2 z2 1 ηz √ √ − 2.1 nγ ≤ Ez,t exp − 1z∈(γn/3,γn] 2n 2 2n +  2 2   γn X η z 2.1 √ z ≤ exp + √ ηz γ − γnhγ/(1−γ) 4n γn 2 z=γn/3 (a) ≤ ≤ γn X   η2 z2 2.1 √ z(1 − γ) exp + √ ηz γ − z log 4n eγ 2 n 2 z=γn/3   2     √ γn X 2.1η γ η γ 1 3e exp z − log + √ + log 4 γ 1−γ 2  z=γn/3 ≤ γn X e−z = o(1) , z=γn/3 where we used t ≤ z and the fact that the whole exponent is monotone increasing in t2 in the first line. The last inequality holds for some constant  > 0, because of condition (42) on λ together with the inequality 21 p λ ≤ 2 γ log(1/γ). In h 02(a), iwe applied hp0 (p1 ) ≥ p1 log(p1 /(ep0 )). Together with (46), (47), and (48), we (X) = O(1). conclude that EX∼Q PQ2 (X) Conditional second moment bound for reconstruction In view of (16) and a bounded √ conditional second moment, we have DKL (P0 kQ) = O(1). Also, we have kM k∗ = kM k2 = √λn kvk22 = λ n. Therefore, the conclusion for reconstruction follows by applying Theorem 4 together with Theorem 5. 4.3 Submatrix Localization √ In this section we prove Theorem 2. Recall that X = (µ/ n) (Y − J/k) + W , where σ0 : [n] → [k] is a balanced partition, Yi,j = 1σ0 (i)=σ0 (j) , and W is Wigner. 4.3.1 First moment upper bound for submatrix localization It follows from (14) that the conditional log likelihood ratio reads log P(X|σ) µ µ2 = √ hY − J/k, Xi − kY − J/kk2F . Q(X) 4n 2 n Therefore, maximizing log P(X|σ)/Q(X) over σ is equivalent to computing X Xi,j (Yi,j − 1/k) . max T (σ) := max σ σ i<j In both the planted model and the null model, T (σ) is the sum of independent, Gaussian random variables and is therefore itself Gaussian. Under Q,   n2 (k − 1) T (σ) ∼ N 0, + O(n) . 2k 2 Under P, denoting by σ0 the planted partition,   X  µ X T (σ) = √ 1σ0 (i)=σ0 (j) − 1/k 1σ(i)=σ(j) − 1/k + Wi,j 1σ(i)=σ(j) − 1/k n i<j i<j X  µ X n2 =√ 1σ0 (i)=σ0 (j), σ(i)=σ(j) + Wi,j 1σ(i)=σ(j) − 1/k − 2 + O(n). 2k n i<j i<j Hence the distribution of T (σ) depends on the overlap matrix ω between σ and the planted partition σ0 . 2 For a given ω, among all n2 pairs i, j with i < j, there are kωkF n2 /2k 2 + O(n) paris such that σ0 (i) = σ0 (j) and σ(i) = σ(j). Therefore, ! 2 µn2 (kωkF − 1) n2 (k − 1) √ T (σ) ∼ N + O(n), + O(n) . 2k 2 2k 2 n To prove that detection is possible, notice that in the planted model, maxσ T (σ) ≥ T (σ0 ). Setting ω = I, Gaussian tail bounds tell us that   p n2 µ(k − 1) √ − O(n log n) ≤ n−Ω(1) . P T (σ0 ) > 2k 2 n In the null model, taking the union bound over the nk ways to choose σ, we can bound the probability that any partition is as good, according to T , as the planted one, by      p p n2 µ(k − 1) µ2 (k − 1) √ Q max T (σ) > + O( log n/n) − O(n log n) ≤ exp n log k − . σ 4k 2 2k 2 n 22 Thus the probability of this event is e−Ω(n) whenever µ2 > 4k 2 log k , k−1 meaning that above this threshold we can distinguish the null and planted models with generalized likelihood testing. To prove that reconstruction is possible, we compute in the planted model the probability that T (σ) > T (σ0 ) given that σ has L2 overlap z with the planted partition, and argue that this probability tends to zero whenever the overlap is small enough. Taking the union bound over every σ with L2 overlap at most z gives # "    p p µ2 (k − z)2 n2 µ(k − 1) √ . − O(n log n) ≤ exp n log k − 2 + O( log n/n) P max T (σ) ≥ k (k − 1) 2k 2 n kω(σ,σ0 )k2F ≤z By the assumption that µ2 > 4k 2 log k/(k − 1), it follows that there exists a fixed constant  > 0 such that µ2 (1 − )2 > 4k 2 log k/(k − 1). Hence, setting z = 1 + (k − 1) in the last displayed equation, it yields that with probability at least 1 − e−Ω(n) , max2 T (σ) < kω(σ,σ0 )kF ≤z p n2 µ(k − 1) √ − O(n log n), 2k 2 n and consequently kw(b σML , σ0 )k2F ≥ 1 + (k − 1). By Lemma 2, this further implies that the trace overlap satc so that M cij = (µ/√n)1σb (i)=bσ (j) . isfies T (b σML , σ0 ) ≥ 1+(k−1). Moreover, construct an n×n matrix M ML ML ck2 = O(n), and Then kM F 2  c, M i = nµ kw(b hM σML , σ0 )k2F − 1 + O(1), 2 k which is at least nµ2 (k − 1)/k 2 + O(1) with high probability. Thus, we can reconstruct the signal matrix M and the planted partition σ0 better than chance. 4.3.2 Second moment lower bound for submatrix localization We first prove that when 2 µ < ( k2 k=2 2k2 log(k−1) k−1 k ≥ 3, (49) then the second moment is bounded. Applying Lemma 1,  EX∼Q P(X) Q(X) 2  = Eσ,τ exp  µ2 hY − J/k, Y 0 − J/ki , 2n where Yij = 1σ(i)=σ(j) and Yij0 = 1τ (i)=τ (j) . Recall that ω denotes the overlap matrix between partitions σ and τ . Then hY, Y 0 i = n2 kωk2F /k 2 and hY, Ji = hY 0 , Ji = n2 /k. It follows from the last displayed equation that  2  2  P(X) µ n 2 EX∼Q = Eσ,τ exp (kωkF − 1) , (50) Q(X) 2k 2 Lemmata 3, 4 and 5 assure us that this expression is bounded by a constant so long as (49) holds. For reconstruction, in view of (16) and a bounded second moment, DKL (PkQ) = O(1). Apply Theorem 4 c c 2 ci] = o(n). Recall that σ0 is the planted so that for any estimator O(n), we have E[hM, M √ M with kM kF = √ partition and M = (µ/ n)(Y − J/k) = (µ/ n)U U † , where U ∈ Rn×k with Uis = 1σ0 (i)=s − 1/k. Then for 23 b such that U bis = 1σb(i)=s − 1/k and letting M c = (µ/√n)U bU b † , it follows any estimator σ b of σ0 , by defining U that 1 b k2F = 1 EhM, M ci = o(1). EkU † U n2 µ2 n Finally, notice that by letting ω = ω(b σ , σ0 ), b k2F = kU † U  n2 n2 X (ω`,s − 1/k)2 = 2 kωk2F − 1 ; 2 k k `,s thus Ekωk2F = 1 + o(1). Hence, we can neither reconstruct the signal matrix M nor the planted partition σ0 . 4.3.3 Conditional second moment lower bound for submatrix localization Notice that in the large k asymptotic, the right hand side of (49) converges to 2k log k, while the first moment upper bound gives 4k log k. To match the first moment upper bound in the larger k asymptotic, we apply a conditional second moment method. In the sequel we assume that µ2 ≤ 4k log k − 44k log3/4 (k). (51) If log k < 114 , then 4k log k − 44k log3/4 k is negative. Hence, we focus on the setting log k ≥ 114 . For any partition σ : [n] → k, let M = √µn (Yσ − J/k) and define the event Γσ by   p Γσ := sup [X − M ]σ−1 (`) ≤ 3 n/k , 2 1≤`≤k where [X − M ]σ−1 (`) denotes the σ −1 (`) × σ −1 (`) submatrix of X − M . In other words, on Γσ , the specp tral noms of submatrices [X − M ]σ−1 (`) for every 1 ≤ ` ≤ k are all upper bounded by 3 n/k. Since [X − M ]σ−1 (`) is distributed as a Wigner Matrix under P(.|σ), by Gaussian concentration theorem and Slepian’s inequality we have h i p 2 P [X − M ]σ−1 (`) ≥ 2 n/k + t | σ ≤ e−t /4 , ∀1 ≤ ` ≤ k. 2 Since k = o(n/ log(n)), we have P(Γσ |σ) = 1 + o(1) uniformly with respect to σ. Next, we condition on the high probability events Γσ by defining   1Γσ , P0 (X) = Eσ P(X|σ) P(Γσ |σ) It follows that the conditional second moment satisfies " 2 #    P0 (X) P(X|σ)P(X|τ ) 1Γσ 1Γτ EX∼Q = Eσ,τ EX∼Q Q(X) Q2 (X) P(Γσ |σ)P(Γτ |τ )     µ µ2 2 √ hX,Yσ +Yτ −2J/ki− 2n kYσ −J/kkF 1Γσ  , = (1 + o(1))Eσ,τ EX∼Q e 2 n | {z } = (I) where we used that P(Γv |v) = 1 + o(1). Given σ and τ , define A``0 = σ −1 (`) ∩ τ −1 (`0 ) and the event      X  p µ 1 Γ``0 = |A``0 |2 + 3|A``0 | n/k Xij ≤ √ 1−   k n i,j∈A``0 24 Obviously, Γ``0 ⊂ Γσ for all `, `0 ∈ [k]. Equipped with this notation, we bound (I) by the exponential moment of k 2 + 1 thresholded normal random variables:    Y  k 2 µ µ √ hX, Yσ + Yτ − 2J/ki − kYσ − J/kk2F 1Γ``0  (I) ≤ EX∼Q exp 2n 2 n `,`0 =1 r 2 !  2  Y    k n µ 1 |A``0 | 1 √ −3 ≤ exp hYσ − J/k, Yτ − J/ki exp − µ 1 − 2n 2 k 2k 2n + 0 `,` =1 where we used 2 EZ∼N (0,1) [eaZ 1Z≤b ] ≤ ea /2−(a−b)2+ /2 . Recall that ω denotes the overlap matrix between σ and τ . Then hYσ , Yτ i = nkωk2F /k 2 , hYσ , Ji = hYσ , Ji = n2 /k and |A``0 | = nω``0 /k. Define ak :=3 log1/4 (k) bk :=2/k + 6/ak . It follows from the last displayed equation that log(I) n ≤ ≤ √ !2 k 1 1− −3 k µω``0 `,` +   2 2 X µ µ 1 2 (1 + bk )(kωk2F − 1) + 2 ω`` 1ω 0 ≤√kak /µ , 0 − 2 `` 4k 2 4k k 0 µ2 µ2 X 2 2 (kωk − 1) − ω 0 F 2k 2 4k 2 0 `` (52) `,` where we used (1 − x)2+ ≥ max((1 − 2x), 0) and bk ≤ 1 since log k ≥ 114 in the second line. Unfortunately, the expression    X 1 2 exp  1ω 0 ≤√kak /µ  ω`` 0 − `` k2 0 `,` is not easy to integrate over ω. This is why we shall bound it by a combination of the entropy of ω and a second degree polynomial. Lemma 7. Let t ∈ (0, 1) be such that t ≤ 0.4 and t ≥ k3 ∨ ( ke )1/5 ∨ 2+5t ct := log5tk−1 − k[log k−1] > 0, we have for any x ∈ [0, 1], 1−1/k 2[log k−1] ∨ 2 log k 5(k−2 log k+1) .   1 1 log k )1 ≤ 5t(x − )(1 − x) + c x log(x) + . x<t t k2 k k h i Proof. Indeed, let g be defined by g(x) = 5t(x − k1 )(1 − x) + ct x log(x) + logk k − (x2 − Upon defining (x2 − 0 00 ct x (53) 1 k2 )1x<t . For any x 6= t, g (x) = 5t(−2x + 1 + 1/k) + ct log(xe) − 2x1x<t and g (x) = − 10t − 2 · 1x<t . Since ct ≤ 10t2 , g 0 is increasing on (0, ct /[2 + 10t]) and decreasing on (ct /[2 + 10t], t) and (t, 1]. Besides, ct /[2 + 10t] ≥ 1/k as this 2 log k 0 inequality reduces t ≥ 5(k−2 log k+1) . Since ct has been chosen in such a way that g (1/k) = 0, the minimum of g is either achieved at 1/k, t− , or 1. We have g(1/k) = 0 and g(1) = ct log k/k > 0, and g(t− ) ≥ 5t(t − 1/k)(1 − t) − ct t log(1/t) − t2 ≥ t2 − 5t2 log(1/t) ≥0, log k − 1 where we used (t − 1/k)(1 − t) ≥ 2t/5 and t ≥ (e/k)1/5 . We have proved (53). 25 √ √ √ Since µ ≤ 2 k log k, we have kak /µ ≥ 32 log−1/4 (k). Assuming that µ ≥ 2.5 kak and since log k ≥ 114 , √ the assumptions of (53) are satisfied for t = kak /µ. Writing ck for c√kak /µ , it follows from (52) and (53) that     5µak X log(I) µ2 1 µ2 ck X log k 2 0 − 0) + 0 log(ω``0 ) + (1 + b )(kωk − 1) + ≤ ω (1 − ω ω k `` `` `` F n 4k 2 k 4k 2 k 4k 3/2 0 0 `,` (a) ≤ ≤ ≤ 2 `,` 2 µ (1 + bk )(kωk2F − 1) − 4k 2 µ2 (1 + bk )(kωk2F − 1) − 4k 2 µ ck [H(ω) − log k] 4k 5µak √ [H(ω) − log k] 4 k(log k − 1) µ2 (1 + bk )(kωk2F − 1) − 4k 2 15 2 log−1/4 (k) [H(ω) − log k] , P where (a) follows because ω is doubly stochastic so that `,`0 (ω``0 − k1 )(1 − ω``0 ) = 1 − kωk2F ≤ 0; the √ √ last inequality holds due to µ ≤ 2 k log k. If µ ≤ 2.5 kak , we simply come back to (52) to ensure that 2 µ 2 log(I) ≤ n 2k 2 (kωkF − 1). We arrive at " 2 #   P0 (X) EX∼Q ≤ (1 + o(1))Eσ,τ exp n t1 (kωk2F − 1) − t2 (H(ω) − log k) (54) Q(X) √ √ −1/4 µ2 µ2 kak and t1 = 4k with t1 = 2k (k) when µ ≥ 2.5 kak . 2 and t2 = 0 when µ < 2.5 2 (1 + bk ) and t2 = 8 log Hence, to prove the conditional second moment is bounded, it reduces to verifying the right hand side of (54) is bounded. By assumption (51) and log k ≥ 114 , it holds that   4k 2 µ2 ≤ log(k − 1) − 8 log(k − 1) log−1/4 (k) − 1 . (k − 1)(1 + bk ) This further implies that t1 log(k − 1) − 1/(1 − t2 ) ≤ . 1 − t2 k−1 Therefore, by Lemma 4, we have that for all ω,  1 (H(ω) − log k) (1 − t2 ) + t1 kωk2F − 1 ≤ − (kωk2F − 1). k−1 Hence, assumptions in Lemma 3 are satisfied with ϕ(ω) = t1 (kωk2F − 1) − t2 [H(ω) − log k] and δ = 1/(k − 1), and it follows from Lemma 3 that the right hand side of (54) is bounded. Conditional second moment bound for reconstruction In view of (16) and a bounded conditional second moment, we have DKL (P0 kQ) = O(1). Also, we have that √ µ µ kM k2 = √ kY − J/kk2 ≤ √ (kY k2 + kJk2 /k) = 2µ n/k n n √ and since M is of rank k, kM k∗ ≤ kkM k2 ≤ 2µ n. Therefore, the conclusion for reconstruction follows by applying Theorem 4 together with Theorem 5. 4.4 Gaussian Mixture Clustering Finally, we turn to the Gaussian Mixture Clustering problem, where σ : [n] → [k] is a balanced partition i.i.d. chosen uniformly at random, v1 , . . . , vk ∼ N (0, k/(k − 1)In,n ), and we observe the matrix r   ρ 1 X= S − Jm,k V † + W, n k 26 (55) where W has independent standard normal entries, S is an m × k matrix with Si,t = 1σ(i)=t , and V = [v1 , . . . , vk ]. 4.4.1 First moment upper bound for Gaussian mixture clustering In this section, we derive an upper bound on the detection and reconstruction threshold via the first moment method. The testing procedure is again based on the generalized likelihood ratio supv,σ log P(X|v, σ)/Q(X), which from (14) we write as r ρ ρ P(X | v, σ) 2 (S − Jm,k /k)V † F = hX, (S − Jm,k /k)V † i − log Q(X) n 2n r k k ρX X ρm X = h xi , vs − vi − kv` − vk22 . n s=1 2nk s=1 i:σ(i)=s When σ is fixed, we can optimize in v by setting the sth cluster center to √ k n X xi , vs − v = √ m ρ i:σ(i)=s the rescaled center of the data points xi which have been assigned to cluster s according to σ. Up to multiplicative constants, then, the generalized likelihood ratio test is equivalent to the test based on the statistic 2 k X max T (σ) := max σ σ m s X xi . (56) σ(i)=s In the null model, for any fixed σ, T (σ) ∼ χ2nk , where χ2nk is the central chi-squared distribution with nk degrees of freedom. In the planted model, let v 0 and σ0 denote the planted vectors and partition respectively, and for an arbitrary partition σ, let ω once again be the overlap matrix between σ and σ0 . For any 1 ≤ ` ≤ k, ! √ X m ρX m √ ωs,t (vt0 − v 0 ), I . xi ∼ N k k n t σ(i)=s For y ∼ N (µ, Id ), let χ2d (kµk2 ) denote the distribution of kyk2 , which is known as non-central chi-square distribution with d degrees of freedom and non-centrality kµk2 . In this notation, T (σ) is distributed in P as a non-central chi-squared random variable with nk degrees of freedom and noncentrality k αρ X X ω`,s (vs0 − v 0 ) k s `=1 2 k αρ X X ω`,s ω`,t hvs0 − v 0 , vt0 − v 0 i k `=1 s,t  p nαρ  2 = kωkF − 1 + O( n log n). k−1 = (57) To obtain the last line, note that the v`0 are Gaussian √ with zero mean and variance k/(k − 1)√in each coordinate, making hvs0 − v 0 , vt0 − v 0 i = −n/(k − 1) + O( n log n) for s 6= t and kvs0 − v 0 k2 = n + O( n log n) with high probability. 27 We will need the following tail bounds for non-central chi-squared distributions [13, Lemma 8.1]: for t > 0, # " r    2 2 2 2 d + 2 kµk t < e−t (58) Pr χd kµk < d + kµk − 2 "  2 Pr χ2d kµk  2 > d + kµk + 2 r 2 d + 2 kµk  # t + 2t < e−t (59) 2 Notice that we can obtain central chi-square tail bounds by setting kµk = 0. To derive the first moment bound for detectability, notice that in the planted model, when σ = σ0 up to 2 a permutation of cluster indices, kωkF = k and   p T (σ0 ) ∼ χ2nk αnρ + O( n log n) . √ Setting t = log n in (58), we know that with high probability T (σ0 ) > nk + nαρ − O( n log n). In the null model, by the union bound and (59), letting t = (1+)m log k for an arbitrarily small constant  > 0, i h i h √ √ Q max T (σ) > nk + 2 nkt + 2t = k m Pr χ2nk > nk + 2 nkt + 2t = e−Ω(m) , σ Hence, with high probability, in the null model, p max T (σ) ≤ nk + 2 (1 + )mnk log k + 2(1 + )m log k. σ √ √ √ By the assumption that ρ > ρupper , i.e., ρ α > 2 k log k + 2 α log k, it follows that for sufficiently large n, p  p  nαρ − O n log n ≥ 2(1 + ) mnk log k + m log k , √ and consequently, √ with high probability, maxσ T (σ) > nk + nαρ − O( n log n) under P, and maxσ T (σ) < nk + nαρ − O( n log n) under Q. To show reconstruction is possible above this bound, let σ have overlap matrix ω with σ0 and set kωk2F = θ. We will show that, when θ is sufficiently small, there are with high probability no such partition with likelihood as high as the planted one. In the planted model,   p θ−1 T (σ) ∼ χ2nk nαρ + O( n log n) . k−1 Taking the union bound over all partitions σ which have L2 overlap at most 1 + (k − 1) with the planted one—of which there are no more than k m —and invoking (59) with t = (1 + )m log k, we know that with high probability, p max T (σ) ≤ nk + nαρ + 2 (1 + ) (nk + 2nαρ) m log k 2 σ:kω(σ,σ0 )kF ≤1+(k−1) p + 2(1 + )m log k + O( n log n), √ √ √ By the assumption that ρ α > 2 k log k + 2 α log k, it follows that for sufficiently large n, p  p  nαρ(1 − ) − O n log n ≥ 2(1 + ) (nk + 2nαρ)m log k + m log k , and consequently, with high probability, max σ:kω(σ,σ0 )k2F ≤1+(k−1) 28 T (σ) < T (σ0 ). Let σ bML = arg max T (σ) denote the maximum likelihood estimator of σ0 . Then with high probability, 2 kω(b σML , σ0 )kF ≥ 1 + (k − 1), which further implies that the trace overlap satisfies T (b σML , σ0 ) ≥ 1 + (k − 1) in view of Lemma 2. c of M such that Finally, we argue that above the first moment bound, one can construct an estimator M ck2 ] = O(n2 ) and E[hM, M ci] = Ω(n). Intuitively, if we can estimate the planted partition better than E[kM F chance, then we should be able to construct an estimator of the signal matrix which out-performs the trivial one. Our proof uses the sample splitting method. Thinking of the rows of X as noisy observations of the cluster centers contained in the rows of M , we will project each observation into two orthogonal subspaces, use the first of these projections to build an estimator σ b of the planted partition σ0 , and finally combine σ b with the second projection to estimate the cluster centers. This technique gains us a subtle and important independence property: the partition we estimate based on the first projection is independent of the noise in the second. Let us proceed. For δ ∈ (0, 1) to be optimized later, let n1 = (1−δ)n ∈ N and denote by X1 ∈ Rm×n1 and X2 ∈ Rm×(n−n1 ) the restrictions of the data matrix X to its first n1 and final n − n1 columns respectively; 0 define M1 and M2 analogously. We first reconstruct M1 from √ parameters √ ρ = (ρ/n)n1 = (1 − δ)ρ √ X1 with 0 and α = m/n1 = α/(1 − δ). Notice that ρ√ α > 2 k log k + 2 α log k means that we can √ our assumption √ choose δ sufficiently small to ensure ρ0 α0 > 2 k log k + 2 α0 log k. Let σ b denote the ML estimator of the 2 planted partition based only on the data X1 . We have already shown that kω(b σ , σ0 )kF ≥ 1 + (k − 1) with high probability. Now we use σ b to construct an estimator of M2 . Specifically, let Sb be the m × k indicator matrix for σ b, b c2 = (k/m)SbSb† X2 . Then Sis = 1σb(i)=s , and define M k k c2 i = k EhM2 , SbSb† (M2 + W2 )i (a) EhM2 , M = EhM2 , SbSb† M2 i = EkSb† M2 k2F , m m m where (a) follows because the noise W2 is independent of M2 and Sb and EW2 = 0. Furthermore, k k k m2 ρ X X EkSb† M2 k2F = ω`,s (u0s − ū0 ) m m k2 n s 2 , `=1 where u0s is the restriction of vs0 to the last δn coordinates, ū0 is the restriction of v̄ 0 to the last δn coordinates, c2 i = Ω(n). and ω`,s = ω(b σ , σ0 ). In view of (57), it follows from the last two displayed equations that EhM2 , M 2 2 c c c One can additionally verify that that EkM2 kF = O(n ). Finally letting M = [0m,n1 , M2 ] be the estimator, c2 on the left with n1 zero columns, we have shown that EkM ck2 = O(n2 ) and EhM, M ci = i.e., concatenating M F Ω(n). 4.4.2 Second moment lower bound for Gaussian mixture clustering We first show that if ρ < ρlower , i.e., αρ2 < 2(k − 1) log(k − 1), then the second moment is bounded. Recall that S is the m × k indicator matrix for a partition σ with Si,t = 1σ(i)=t , and V = [v1 , . . . , vk ]. Let τ be an independent copy of σ, with indicator matrix Ti,t = 1τ (i)=t and U = [u1 , . . . , uk ] be an independent copy of V . Applying Lemma 1,  EX∼Q P(X) Q(X) 2 ρ (S − Jm,k /k)V † , (T − Jm,k /k)U † n  αρ  = Eσ,τ Ev,u exp hU, V (ω − J/k)i , k = Eσ,τ Ev,u exp  where ω is the overlap matrix between σ and τ . The last equality follows from S † T = (m/k)ω and S † Jm,k = p e analogously, so that these two matrices now (m/k)Jk,k = J†m,k T . Let Ve = (k − 1)/k V and define U contain i.i.d standard Gaussian entries. Evaluating the moment generating function for the Gaussian random 29 e and invoking the standard linear algebra result that kABkF ≤ kAk2 kBkF , it follows that matrix U    αρ  αρ e e Ev,u exp hU, V (ω − J/k) = Ev,u exp hU , V (ω − J/k)i k k−1   2 α2 ρ2 e V (ω − J/k) = Ev exp 2(k − 1)2 F   α2 ρ2 2 2 e ≤ Ev exp kV k2 k(ω − J/k)kF . 2(k − 1)2 In view of [48, Corollary 5.35], Ve is a ‘tall’ Gaussian random matrix with spectral norm tightly concentrated: h i √ √ 2 Pr kVe k2 ≤ n + k +  ≤ e− /2 . p Since k is assumed to be fixed constant, with high probability kVe k2 ≤ (1 + )n for an arbitrarily small constant  > 0. Notice that if this event does not hold, the second moment becomes unbounded. We therefore will compute the second moment conditioned on the high probability event that kVe k is not abnormally large. As we discussed in §3.2, we define the event p F = {V : kVe k2 ≤ (1 + )n}, and conditional distributions P0 (v, σ) = P(v, σ)1F /P(F) and P0 (X) = Ev,σ∼P0 [P(X|v, σ)]. Notice that P {F} → 1. Then the conditional second moment satisfies 2  0  αρ  1 P (X) EX∼Q ≤ 2 Eσ,τ Ev,u exp hU, V (ω − J/k) 1U ∈F 1V ∈F Q(X) P (F) k  αρ  1 Eσ,τ Ev,u exp hU, V (ω − J/k) 1V ∈F ≤ 2 P (F) k   1 α2 ρ2 2 2 e Eσ,τ Ev exp kV k2 k(ω − J/k)kF 1V ∈F ≤ 2 P (F) 2(k − 1)2   α 2 ρ2 n 1 2 Eσ,τ exp (1 + ) kω − J/k)kF . ≤ 2 P (F) 2(k − 1)2 As in the submatrix localization problem, it remains to show that   α 2 ρ2 n 2 Eσ,τ exp (1 + ) kω − J/k)k F 2(k − 1)2 (60) is bounded by a constant for a sufficiently small . This is guaranteed if αρ2 < 1 for k = 2 and αρ2 < 2(k − 1) log(k − 1) for k > 2, in view of Lemmata 3, 4 and 5. For reconstruction, notice that the conditioned planted model P0 is still an additive Gaussian model. Let P (M |X) denote the posterior distribution of M given X under P0 , i.e., P0 (M |X) = P(X|M )P0 (M )/P0 (X). Let E 0 (X) = EM ∼P0 (M |X) [M ] denote the posterior mean under P0 . Applying Theorem 4 with P0 and Q, we obtain h i 1 1 1 2 2 2 EM ∼P kM kF 1F , lim EM,X∼P0 kM − E 0 (X)kF = lim EM ∼P0 kM kF = lim n→∞ n n→∞ nP(F) n→∞ n 0 where the last equality follows from the definition of P0 . Let E(X) = EM ∼P(M |X) [M ] denote the posterior mean under P. Then 2 2 EM,X∼P0 kM − E 0 (X)kF ≤ EM,X∼P0 kM − E(X)kF h i 1 2 = EM,X∼P kM − E(X)kF 1F P(F) 1 2 ≤ EM,X∼P kM − E(X)kF , P(F) 30 where the first inequality holds because E 0 (X) minimizes the mean squared error under P0 ; the second equality holds by the definition of P0 . Combining the last two displayed equations yields that h i 1 1 2 2 lim inf EM,X∼P kM − E(X)kF ≥ lim EM ∼P kM kF 1F . (61) n→∞ n n→∞ n Since ρ ρ kM kF = k(S − Jm,k /k)V kF ≤ kS − Jm,k kF kV kF = O(kV kF ), n n it follows that i h  4 EM ∼P kM kF = O EV [kV k4F ] = O(n2 ). Hence, h 2 EM ∼P kM kF i r 1F c ≤ ! r h i h i 4 4 c EM ∼P kM kF P(F ) = o EM ∼P kM kF = o(n). Combing the last displayed equation with (61) gives that lim inf n→∞ h i 1 1 2 2 EM,X∼P kM − E(X)kF ≥ lim EM ∼P kM kF . n→∞ n n 2 2 Since E(X) minimizes the mean squared error under P, EM,X∼P kM − E(X)kF ≤ EM ∼P kM kF , it follows that i h 1 1 2 2 lim EM,X∼P kM − E(X)kF = lim EM ∼P kM kF , n→∞ n n→∞ n 2 c and thus limn→∞ (1/n)EX∼P kE(X)kF = 0. By (21) in Theorem 4, we conclude that for any estimator M 2 c c with kM kF = O(n), E[hM, M i] = o(n). 4.5 Proof of Theorem 4 We give the proof for i.i.d. Gaussian noise, using a type of interpolation argument where we vary the signal √ to noise ratio; the proof for Wigner noise is identical. Assume that X(β) = βM + W in the planted model and X = W in the null model, where β ∈ [0, 1] is a signal-to-noise ratio parameter (analogous to an inverse i.i.d. temperature) and Wij ∼ N (0, 1) for all i, j. First recall that the Bayes-optimal estimator minimizing the mean squared error is the expectation of the posterior distribution, cMMSE (X) = E[M |X] , M so that the (rescaled) minimum mean squared error is given by MMSE(β) = 1 EkM − E[M |X] k2F . n (62) c = 0, We will start by proving that, for all β ∈ [0, 1], the MMSE tends to that of the trivial estimator M lim sup MMSE(β) = β lim n→∞ n→∞ 1 EkM k2F . n (63) Let us compute the mutual information I(β) between M and X: P(X|M ) P(X) Q(X) P(X|M ) = EX log + EM,X log P(X) Q(X)   p βkM k2F = −DKL (PkQ) + EM,X βhM, Xi − 2 β = −DKL (PkQ) + EM kM k2F . 2 I(β) = EM,X log 31 (64) By assumption, we have DKL (PkQ) = o(n). This holds for β = 1; by the data processing inequality for KL divergence [45, Theorem 2.2], this holds for all β < 1 as well. Thus (64) becomes lim n→∞ β 1 1 I(β) = lim E kM k2F . n 2 n→∞ n (65) Next we compute the MMSE. Recall the I-MMSE formula [22], dI(β) n = MMSE(β) , dβ 2 (66) which can also be viewed as a classic formula in thermodynamics. Note that the MMSE is by definition c = 0, so that for all β we have bounded above by the squared error of the trivial estimator M MMSE(β) ≤ 1 E kM k2F . n (67) Combining these we have  (a) 1  1 1 lim E kM k2F = lim I(1) n→∞ n 2 n→∞ n Z 1 (b) 1 lim MMSE(β) dβ = 2 n→∞ 0 Z 1 (c) 1 ≤ lim sup MMSE(β) dβ 2 0 n→∞ Z 1 (d) 1 1 E kM k2F dt ≤ lim 2 0 n→∞ n 1 1 = lim E kM k2F , 2 n→∞ n where (a) and (b) hold due to (65) and (66), (c) follows from the Fatou lemma, and (d) follows from (67). Since we began and ended with the same expression, these inequalities must all be equalities. In particular, since (c) holds with equality, we have lim sup MMSE(β) = lim n→∞ n→∞ 1 E kM k2F n (68) for almost all β ∈ [0, 1]. Since MMSE(β) is a non-increasing function of β, its limit lim supn→∞ MMSE(β) is also non-increasing in β. Therefore, (68) holds for all β ∈ [0, 1]. This completes the proof of our claim that the optimal estimator has the same asymptotic MMSE as the trivial one. To show that the optimal estimator actually converges to the trivial one, we expand the definition of MMSE(β) in (62) and subtract (68) from it. This gives lim sup n→∞  1  E −2hM, E[M |X]i + kE[M |X] k2F = 0 . n (69) Note that EhM, E[M |X]i is the expected inner product between the ground truth and a draw from the posterior. By the Nishimori identity [25] or the tower property of conditional expectation, this is equal to the expected inner product between two independent draws from the posterior. By linearity of the inner product, this gives E hM, E[M |X]i = E hE[M |X] , E[M |X]i = E kE[M |X] k2F , and combining this with (69) gives (where lim sup becomes lim inf because of a sign change) lim inf n→∞ 1 E kE[M |X] k2F = 0 . n 32 (70) c=M c(X) such that EX kM ck2 = O(n), Furthermore, for any estimator M F h i q c c c ck2 ] EM,X hM, M i = EX hE[M |X] , M i ≤ EX kE[M |X] kF kM kF ≤ EX [kE[M |X] k2F ] EX [kM F and thus the desired (21) holds. √ Finally, we note that if M is of the form (1/ n)U V † where the rows of U and V are independently and identically distributed according to some priors, then limn→∞ MMSE(β) exists by [20, Proposition III.2], cMMSE = E[M |X] tends and the liminf in (20) and (21) can be replaced by lim. Then the MMSE estimator M c = 0 as claimed. to the trivial estimator M 4.6 Proof of Theorem 5 We give the proof of i.i.d. Gaussian noise; the proof for Wigner noise is identical. Let Z(X) := h i 2 P(X) = EM ehM,Xi−kM kF /2 . Q(X) By the definition of KL divergence, DKL (P0 kQ) − DKL (PkQ)     P(X) P0 (X) 0 − EX∼P log = EX∼P log Q(X) Q(X)       0 P (X) P(X) P(X) 0 0 = EX∼P log + EX∼P log − EX∼P log P(X) Q(X) Q(X) ≥ EX∼P0 [log Z(X)] − EX∼P [log Z(X)] , where the last inequality follows because DKL (P0 kP) = EX∼P0 [log(P0 (X)/P(X))] ≥ 0. Furthermore, EX∼P0 [log Z(X)] − EX∼P [log Z(X)] 1 = EPM EP(X|M ) [(1FM − P(FM |M )) log Z(X)] P(FM |M ) q   1 ≥ −EPM P(FM |M ) (1 − P(FM |M )) EP(X|M ) log2 Z(X) P(FM |M ) q   = −o(1) × EPM EP(X|M ) log2 Z(X) , where we use the Cauchy-Schwarz inequality in the third line, and the assumption that P(FM |M ) = 1 + o(1) uniformly over M in the last line. √ √ By the assumptions that kM k2 = O( n) and kM k∗ = O( n) uniformly√over all M , and in view of hM, Xi ≤ kM k∗ kXk2 and kM k2F ≤ kM k∗ kM k2 , we have that | log Z(X)| ≤ O ( nkXk2 ) + O(n). Therefore,       EP(X|M ) log2 Z(X) = O(n2 ) + O(n) × EP(X|M ) kXk22 = O(n2 ) + O(n) × EW kM + W k22 = O(n2 ),       where the last inequality holds because EW kM + W k22 ≤ 2kM k22 + 2EW kW k22 and EW kW k22 = O(n). Combining the last three displayed equations together yields that DKL (P0 kQ) − DKL (PkQ) ≥ EX∼P0 [log Z(X)] − EX∼P [log Z(X)] ≥ −o(n). Acknowledgments We thank Yihong Wu, Lenka Zdeborová, Florent Krzakala, Thibault Lesieur, Caterina de Bacco, Alex Russell, Andrea Montanari, and Cosma Shalizi for helpful discussions. C. Moore and J. Banks are supported 33 by the John Templeton Foundation and the ARO under contract W911NF-12-R-0012. J. Xu is supported by Simons-Berkeley Research Fellowship. R. Vershynin is suppored by NSF Grant DMS 1265782 and U.S. Air Force Grant FA9550-14-1-0009. Much of this work was done while the authors were visiting the Simons Institute for the Theory of Computing. References [1] E. Abbe and C. Sandon. Detection in the stochastic block model with multiple clusters: proof of the achievability conjectures, acyclic bp, and the information-computation gap. arXiv 1512.09080, Dec 2015. [2] D. Achlioptas and F. McSherry. On spectral learning of mixtures of distributions. In Learning Theory, pages 458–469. Springer, 2005. [3] D. Achlioptas and A. Naor. The two possible values of the chromatic number of a random graph. Annals of Mathematics, 162:1335–1351, 2005. [4] D. J. Aldous. Exchangeability and related topics. In École d’été de probabilités de Saint-Flour, XIII— 1983, volume 1117 of Lecture Notes in Math., pages 1–198. Springer, Berlin, 1985. [5] A. A. Amini and M. J. Wainwright. High-dimensional analysis of semidefinite relaxations for sparse principal components. Ann. Statist., 37(5B):2877–2921, 10 2009. [6] E. Arias-Castro and N. Verzelen. Community detection in dense random networks. Ann. Statist., 42(3):940–969, 06 2014. [7] Z. Bai and J. W. Silverstein. Spectral analysis of large dimensional random matrices. Springer Series in Statistics. Springer, New York, second edition, 2010. [8] J. Baik, G. Ben Arous, and S. Péché. Phase transition of the largest eigenvalue for nonnull complex sample covariance matrices. Annals of Probability, pages 1643–1697, 2005. [9] J. Banks, C. Moore, J. Neeman, and P. Netrapalli. Information-theoretic thresholds for community detection in sparse networks. In Proceedings of the 29th Conference on Learning Theory, COLT 2016, New York, NY, June 23-26 2016, pages 383–416, 2016. [10] J. Banks, C. Moore, R. Vershynin, and J. Xu. Information-theoretic bounds and phase transitions in clustering, sparse PCA, and submatrix localization. arXiv:1607.05222, 2016. [11] F. Benaych-Georges and R. R. Nadakuditi. The eigenvalues and eigenvectors of finite, low rank perturbations of large random matrices. Advances in Mathematics, 227(1):494–521, 2011. [12] Q. Berthet, P. Rigollet, et al. Optimal detection of sparse principal components in high dimension. The Annals of Statistics, 41(4):1780–1815, 2013. [13] L. Birgé. An alternative point of view on Lepski’s method. State of the art in probability and statistics, pages 113–133, 2001. [14] C. Bordenave, M. Lelarge, and L. Massoulié. Non-backtracking spectrum of random graphs: Community detection and non-regular ramanujan graphs. In IEEE 56th Annual Symposium on Foundations of Computer Science, FOCS, pages 1347–1357, 2015. [15] C. Butucea and Y. I. Ingster. Detection of a sparse submatrix of a high-dimensional noisy matrix. Bernoulli, 19(5B):2652–2688, 11 2013. [16] T. Cai, Z. Ma, and Y. Wu. Optimal estimation and rank detection for sparse spiked covariance matrices. Probability Theory and Related Fields, 161(3):781–815, 2015. 34 [17] Y. Chen and J. Xu. Statistical-computational tradeoffs in planted problems and submatrix localization with a growing number of clusters and submatrices. In Proceedings of ICML 2014 (Also arXiv:1402.1267), Feb 2014. [18] A. Decelle, F. Krzakala, C. Moore, and L. Zdeborová. Asymptotic analysis of the stochastic block model for modular networks and its algorithmic applications. Physics Review E, 84:066106, 2011. [19] A. Decelle, F. Krzakala, C. Moore, and L. Zdeborová. Inference and phase transitions in the detection of modules in sparse networks. Physical Review Letters, 107(6):065701, 2011. [20] Y. Deshpande and A. Montanari. Information-theoretically optimal sparse PCA. In Information Theory (ISIT), 2014 IEEE International Symposium on, pages 2197–2201, June 2014. [21] Y. Deshpande and A. Montanari. Sparse PCA via covariance thresholding. In Advances in Neural Information Processing Systems, pages 334–342, 2014. [22] D. Guo, S. Shamai, and S. Verdú. Mutual information and minimum mean-square error in gaussian channels. IEEE Trans. on Information Theory, 51, 2005. [23] B. Hajek, Y. Wu, and J. Xu. Information limits for recovering a hidden community. arXiv 1509.07859, September 2015. [24] B. Hajek, Y. Wu, and J. Xu. Submatrix localization via message passing. arXiv 1510.09219, October 2015. [25] Y. Iba. The nishimori line and bayesian statistics. Journal of Physics A: Mathematical and General, 32(21):3875, 1999. [26] Y. I. Ingster and I. A. Suslina. Nonparametric goodness-of-fit testing under Gaussian models. Springer, New York, NY, 2003. [27] E. S. P. J. Neyman. On the problem of the most efficient tests of statistical hypotheses. Philosophical Transactions of the Royal Society of London. Series A, Containing Papers of a Mathematical or Physical Character, 231:289–337, 1933. [28] I. M. Johnstone and A. Y. Lu. On consistency and sparsity for principal components analysis in high dimensions. Journal of the American Statistical Association, 104(486):682–693, June 2009. [29] R. Kannan, H. Salmasian, and S. Vempala. The spectral method for general mixture models. SIAM Journal on Computing, 38(3):1141–1156, 2008. [30] R. Kannan and S. Vempala. Spectral algorithms. http://www.cc.gatech.edu/ vempala/spectralbook.pdf, 2009. [31] M. Kolar, S. Balakrishnan, A. Rinaldo, and A. Singh. Minimax localization of structural information in large noisy matrices. In Advances in Neural Information Processing Systems, 2011. [32] R. Krauthgamer, B. Nadler, and D. Vilenchik. Do semidefinite relaxations solve sparse PCA up to the information limit? The Annals of Statistics, 43(3):1300–1322, June 2015. [33] F. Krzakala, C. Moore, E. Mossel, J. Neeman, A. Sly, L. Zdeborová, and P. Zhang. Spectral redemption in clustering sparse networks. Proceedings of the National Academy of Sciences, 110(52):20935–20940, 2013. [34] F. Krzakala, J. Xu, and L. Zdeborová. Mutual information in rank-one matrix estimation. arXiv 1603.08447, March 2016. 35 [35] M. Lelarge and L. Miolane. arXiv:1611.03888, Nov. 2016. Fundamental limits of symmetric low-rank matrix estimation. [36] T. Lesieur, C. D. Bacco, J. Banks, F. Krzakala, C. Moore, and L. Zdeborová. Phase transitions and optimal algorithms in high-dimensional gaussian mixture clustering. Arxiv preprint arxiv:1610.02918, 2016. [37] T. Lesieur, F. Krzakala, and L. Zdeborová. MMSE of probabilistic low-rank matrix estimation: Universality with respect to the output channel. In 2015 53rd Annual Allerton Conference on Communication, Control, and Computing (Allerton), pages 680–687, Sept 2015. [38] T. Lesieur, F. Krzakala, and L. Zdeborová. Phase transitions in sparse PCA. In 2015 IEEE International Symposium on Information Theory (ISIT), pages 1635–1639. IEEE, 2015. [39] E. Mossel, J. Neeman, and A. Sly. Belief propagation, robust reconstruction and optimal recovery of block models. In Proceedings of The 27th Conference on Learning Theory, COLT 2014, Barcelona, Spain, June 13-15, 2014, pages 356–370, 2014. [40] E. Mossel, J. Neeman, and A. Sly. Reconstruction and estimation in the planted partition model. Probability Theory and Related Fields, 162(3-4):431–461, 2015. [41] D. Paul. Asymptotics of sample eigenstructure for a large dimensional spiked covariance model. Statistica Sinica, 17(4):1617–1642, 2007. [42] S. Péché. The largest eigenvalue of small rank perturbations of hermitian random matrices. Probability Theory and Related Fields, 134(1):127–173, 2006. [43] A. Perry, A. S. Wein, and A. S. Bandeira. Statistical limits of spiked tensor models. arXiv:1612.07728, Dec. 2016. [44] A. Perry, A. S. Wein, A. S. Bandeira, and A. Moitra. Optimality and sub-optimality of PCA for spiked random matrices and synchronization. arXiv:1609.05573, Sept. 2016. [45] Y. Polyanskiy and Y. Wu. Lecture Notes on Information Theory. Feb 2015. http://www.ifp.illinois. edu/∼yihongwu/teaching/itlectures.pdf. [46] N. Srebro, G. Shakhnarovich, and S. Roweis. An investigation of computational and informational limits in gaussian mixture clustering. In Proceedings of the 23rd International Conference on Machine Learning, ICML ’06, pages 865–872, New York, NY, USA, 2006. ACM. [47] S. Vempala and G. Wang. A spectral algorithm for learning mixture models. J. Comput. Syst. Sci., 68(4):841–860, June 2004. [48] R. Vershynin. Introduction to the non-asymptotic analysis of random matrices. arxiv:1011.3027, 2010. Arxiv preprint [49] N. Verzelen and E. Arias-Castro. Community detection in sparse random networks. arXiv preprint arXiv:1308.2955, 2013. 36
10math.ST
Targeted change detection in remote sensing images arXiv:1803.05482v1 [cs.CV] 14 Mar 2018 Vladimir Ignatiev1 , Alexey Trekin1 , Viktor Lobachev1 , Georgy Potapov1 , and Evgeny Burnaev1 Skolkovo institute of Science and technology, Moscow, Nobel st. 1, Russia, [email protected], WWW home page: http://crei.skoltech.ru/cdise/aeronet-lab/ Abstract. Recent developments in the remote sensing systems and image processing made it possible to propose a new method of the object classification and detection of the specific changes in the series of satellite Earth images (so called targeted change detection). In this paper we propose a formal problem statement that allows to use effectively the deep learning approach to analyze time-dependent series of remote sensing images. We also introduce a new framework for the development of deep learning models for targeted change detection and demonstrate some cases of business applications it can be used for. Key words: remote sensing, change detection, satellite imagery, computer vision, deep learning 1 Problem overview Earth observation systems have been developing during the last decades in terms of quality of the imagery and frequency of the imaging [27]. However, until now the daily basis imagery wasnt available for any location or area of interest. Each satellites and UAV systems have their own limitations - viz. number of satellites, weather and daylight for optical systems, vegetation for SAR systems, not to say the commercial ones. That lead the remote sensing industry to the situation where the amount of the data and the proclaimed frequency of the repeating imaging could have given us full daily coverage of the earth surface by the high-resolution imagery [23], but in the reality it turns out to be composed of the diverse, inconsistent and often incomplete data. And yet that business and technology trend raise the issues how all this daily imagery can be targeted to the specific needs and used in a various types of applications. The technical issues that can be raised following these business needs are: – data fusion of different types of remote sensing data coming from different sensors (optical, SAR, different resolution etc.) - to provide the maximum capacity of operational monitoring in any time or weather conditions [18, 19] – detection of changes in the time series of imagery and in a very short time spans to provide near real time valuable information related to the objects 2 Vladimir Ignatiev et al. of interest. As the traditional approaches fail to make this massive dataflow a reliable source of the useful answers we should propose the new machine learning approaches that can handle it and provide the automated analysis that can compete to the human one by accuracy The business needs lead to the concept of the targeted change detection (TCD) that is consolidated detection and classification of the changes in order to obtain only the interesting for the problem (target) changes rather than all the changes in general [25, 26]. Our motivation in this paper is to build a general description of change detection (CD) problem taking into account characteristics of input data - series of remote sensing (RS) images - and information about “targets” obtained from classification of specific business applications of the respective territories such as “transportation & logistic”, “residential areas”, “building & construction” etc. Having formalized problem statement it is possible to develop overall framework that will reduce costs and simplify stages of collecting data, model construction and integration in workflow of business solutions. 1.1 Business applications of CD Commercial services producing analytics based on series of multitemporal remote sensing images begin occupying significant share in such market areas as smart farming [2, 3, 4], monitoring of security zones of linear objects that have enormous transport network [9, 10, 7], monitoring of protected areas [5, 6, 8], assessment of damage caused by natural and man-made disasters [?, ?], analytical solutions for consulting agencies in geo-marketing [12, 13]. Our survey of the commercial solutions based on analysis of RS images reveals the following problems: – – – – only a number of applications have algorithmic solutions; most of solutions do not have enough accuracy; the plenty of problems do not have any reliable solutions; companies are in search of new frameworks that will anticipate their risks or will make precise and timely estimation of losses. It is obvious that each of use cases has its own demands and requirements to the changes that should be detected. For example, if one is going to monitor security zones of pipelines, he should find out the list of targets, changes of which will be detected. Each target means a specific type of objects that has the characteristic linear size and this value defines the spatial resolution of RS images to be used. Most of real business applications requires to process with RS images of high and very high spatial resolution from 5 cm/pixel to 10 m/pixel. 1.2 RS datasets available for CD algorithms The idea of making general framework providing development of robust algorithms for detecting changes for the specific applied problem requires building Targeted change detection 3 representative datasets. There are scarce datasets for change detection on RS images nowadays [14, 15, 16, 17]. Only few of existing datasets can be implemented within the framework of targeted change detection [14, 17]. Most of them have not enough coverage or time spread to learn and test algorithms using modern techniques of machine learning and deep learning. So the one of the challenges of our work is to collect and build a number of datasets dedicated to the task of targeted CD. 1.3 Current methods and algorithms Solutions proposed in the latest papers could be divided into several groups according to the used models and algorithms, to market domains and to RS images in use. Traditional methods of change detection by series of satellite images are typically limited in several aspects: – using just two images for justification with ground truth; – do not take into account usability of changes in specific use case; – only empirical approaches for selection of the appropriate RS images for real applications; – no automated end-to-end solutions for business cases. One of the first applied research in this area was conducted by W.Roper and S.Dutta [29]. They made an attempt to understand which kind of sensor system aerial or satellite is better in a sense of probability of detection unauthorized intrusion onto a pipeline right-of-way. The main conclusion of this work is that one should use aerial imagery when the imaging frequency is lower than once per month, but starting from once per day imaging frequency - probability of change detection with satellite imagery is higher. There were used standard algorithms of classification built-in such software packages as ENVI [28]. The future works were focused on improving change detection algorithms themselves, but the idea of targeted CD were pushed into the background. So, the best classical approaches are methods based on anomaly detection framework on time series of multispectral low-resolution satellite images and so called spectral indices [34], methods based on Markov Random Fields and global optimization on graphs [35, 36, 37], approaches using object-based segmentation with post-classification of changes [38, 39, 40] and methods based on Multivariate Alteration Detection [41, 30]. All the mentioned approaches shows quiet good results in quality, but either use multi framed series of low resolution satellite images or use high resolution images, but the same two pairs of images for both training and testing. Latest research achievements in computer vision made it possible to use deep neural networks for accurate semantic segmentation objects on daily images. The next step was to transfer this technology on remote sensing data. Actually, its ongoing research. This results are the basement for development new algorithms of CD. It can be emphasised the most successful studies in this direction. A.M. Amin et al. [42] proposed a method for binary classification of changes based on CNN with input two high resolution satellite images (0.65 - 2.62 m/pixel) gives 4 Vladimir Ignatiev et al. the accuracy by Kappa coefficient - 0.876. The second approach by Y. Chu et al. [43], based on clustering analysis of difference of two images (0.65 - 2.62 m/pixel) uses deep belief network model with restricted Boltzmann machine architecture shows the accuracy by Kappa coefficient from 0.905 to 0.987. The main advantage of this method that it allows to avoid radiometric correction of images, they outperform the standard approaches and could be adopted for targeted change detection in different use cases. Deep learning techniques need a lot of computational resources for training process and could be unstable for analysis of new images, but the last problem may be eliminated having a representative dataset for model training. Further researches described in [30, 37, 45, 32, 31] give promising results, but most of them share the same drawback: low amount of data used for the method validation. The of creation a large and reliable dataset is one of the keys to the development of robust and reliable algorithms for the targeted change detection. One of the important issues is that many real problems do not need any changes to be detected, but only the interesting, problem-specific ones. This implies a challenging task to develop a method that could extract only the specified classes of changes. The deep neural networks appear to be the most promising approach to the problem, but the current solutions are highly limited by the amount of the data available for the training of the models. 2 Remote sensing data for change detection In order to understand the capability of the modern space imagery we need to examine its characteristics. As stated in the previous section, according to the target sizes we need the images in high (1-10 meters) and very high (less than 1 meter) spatial resolution. A typical high resolution satellite in 2018 has 4 or more spectral bands and a panchromatic image of higher spatial resolution (see table 2). A completely new approach to the data acquisition is demonstrated by the PlanetScope satellite group, that consists of a large group of very small satellites (3-unit CubeSat), that can acquire far more imagery than traditional satellites of comparable mass and cost, however at the cost of less data quality: they have less spectral bands and the noise level is higher [20]. Visible channels Near infrared channels SW infrared channels Multispectral resolution, m Panchromatic resolution, m Daily coverage, millions sq.km/ day SPOT-6 PlanetScope Worldview-3 4 3 6 1 0/1 2 0 0 8 6.0 3.0 / 3.7 1.24 / 3.72 1.5 0.31 3 150 0.68 Table 1. Overview of the technical specifications of the modern RS satellites Targeted change detection 5 Let us call a set of images taken by one space or aerial instrument at one flight and covering the same territory a “multi-layer image”. We need this term do differentiate from the multispectral image where each layer represents a spectral band and the panchromatic layer is not included into the multispectral image. In our case we add it as well as any other information represented in a raster form as a layer to our image representation, as we want to collect all the information within a single instance of a multi-layer image. I = I1 , ..., IC is a multi-layer image with C bands (channels). Every band Ii is a single 2-dimensional matrix with the size (Xi , Yi ). Different bands can have different spatial resolution so, under the condition that all the bands must cover the same territory, the sizes of the channels are different, but proportional by an integer ratio. If we order the bands by the decrease of the size, their dimensions will be Xi /Xi + 1 = Yi /Yi+1 ∈ N For the task of change detection the images are organized in time series: S = I 1 , ...I T , where each image I t , t = 1...T covers the same area, but different images can be obtained by different instruments and have different characteristics. We intentionally put this restriction on the area, because we need not to describe all the data available, but to construct the datasets that can be used by the data analysis methods within the proposed framework. If the given data are not fully spatially consistent, we can crop the extents and, if needed, divide the time series into several separate ones of different spatial and temporal extent. 3 Proposed framework This section discusses details of proposed framework and shows the example of methods for targeted change detection in classical situation when two input satellite images are used for classification of one type of changes. 3.1 Problem statement Given the series of images S = I 1 , ...I T where each image I t is a multi-layer image taken at the moment of time t, a parameterized description of changes occurred in the series can be introduced as C = F (S). The exact definition of the operator F is done at the post-processing stage and is beyond the scope of this paper. It is assumed that the calculation of the vector C will use only the set of objects of pair-wise changes {rij }, so the problem goal can be reduced to the search of rij - the change between the images I i and I j . The pair change object definition includes: – Category of detected changes; – The set of polygonal domains (in physical coordinates) where the changes are detected. Evaluation of the detected change is done with one of the measures: – Intersection over Union; 6 Vladimir Ignatiev et al. – The pair Recall-Precision; – F1-measure. All three measures assume availability of the ground truth changes for the investigated pair of images. Each measure can be calculated either per unit area or per object; the latter is specified heuristically. 3.2 Description of the framework for TCD applications Our framework is restricted neither by the type of remote sensing data, nor methods, algorithms, but it does take into account information about the “targets” of the applied area. The question of determining the context of using the notion “change” is removed by establishing a one-to-one correspondence of the model or algorithm for detecting changes and the business case to be solved. Robustness of the created algorithms is guaranteed by creating reference sets of markup of changes for a series of different images and applying modern methods of in-depth training on data generated from reference sets. As one can see on the scheme depicted on the figure 1 there are three stages in proposed framework: preparing dataset, training a model and analyzing series of images for pair-wise targeted change detection. Dataset for specific business application should be constructed in accordance with the formal mathematical problem statement described above. It means that one should load series of images concerning the size of targets, the characteristic time period of occurrence of changes, type of images and so on. This data are combined with external markups of changes of objects (targets) under consumption. The model for pair-wise targeted change detection is chosen from the set of neural networks architectures prepared in advance and is trained and validated on the dataset built of the first stage. The process of analyzing new series of images starts from building map of changes for each pair of images inside the series. After that there is a post-processing and verification procedures that resulted in recommendation, forecasts or alerting reports with detected changes, that can be visualized in interactive mode. 3.3 Method of TCD based on deep learning techniques Our method is fundamentally different from all the methods listed in section 1.3 because it takes into account information about targets of the application under consumption, is based on deep neural network trained and validated on representative dataset, can be automatically adopted to a new territory. The approach we are developing is based on a specific architecture of the convolutional network which has had a great success in solving the semantic segmentation problems. In the mathematical problem statement, a general formal description of the detected changes is introduced for a pair of images; the description being applied to all datasets analyzed. The neural network architecture makes it possible to use the pre-trained parameters of the network and adapt it to new datasets with an additional training at a very little expense. Targeted change detection Fig. 1. Scheme of the proposed framework 7 8 Vladimir Ignatiev et al. The technique can be applied to all pairs of the images in the series; the post-processing is then used to build a more common object that describes the image evolution within the series. The post-processing can be specific for each business application and does not depend on the deep learning technique used at the early stages of analysis. 4 Conclusion In this paper we have summarized the knowledge about the business applications of change detection, known methods of the image processing and deep learning and the possibilities and limitations of the RS data to propose a generalized framework that can embed the solutions for different problems in the area of the targeted change detection in the remote sensing data. The proposed framework to be implemented in our future research will facilitate the integration of the current and future data sources and the advanced algorithms of the data processing. References 1. PlanetScope Flock, http://space.skyrocket.de/doc sdat/flock-1.htm 2. Gamaya, https://gamaya.com/ 3. DigitalGlobe Services, https://www.digitalglobe.com/industries/agriculture 4. Exact Farming, www.exactfarming.com 5. Sovzond, https://sovzond.ru/ 6. Unmanned Systems, http://unmanned.ru/en/ 7. Orbital Eye - PIMSyS, https://orbitaleye.nl 8. Zala Aero Group, http://zala.aero/ 9. I-Cubed, http://www.i3.com/ 10. Satellite Imaging Corporation, www.satimagingcorp.com 11. European Space Agency, http://www.esa.int/ESA 12. OOO Rilos, https://geomatrix-retail.com/ 13. Geomarketing & Location Intelligence, https://www.gim.be/en/productsservices/gim-expertise/geomarketing-location-intelligence 14. Bourdis, N., Marraud, D., & Sahbi, H. (2011, July). Constrained optical flow for aerial image change detection. In Geoscience and Remote Sensing Symposium (IGARSS), 2011 IEEE International (pp. 4176-4179). IEEE. 15. SAR Change Detection Dataset, http://fenggao.sinaapp.com/san dataset.html 16. Google Earth Engine, https://earthengine.google.com/datasets/ 17. CDnet, http://www.changedetection.net/ 18. Dong, J., Zhuang, D., Huang, Y., & Fu, J. (2009). Advances in multi-sensor data fusion: Algorithms and applications. Sensors, 9(10), 7771-7784. 19. Zhang, J. (2010). Multi-source remote sensing data fusion: status and trends. International Journal of Image and Data Fusion, 1(1), 5-24. 20. Santilli, G., Vendittozzi, C., Cappelletti, C., Battistini, S., & Gessini, P. (2018). CubeSat constellations for disaster management in remote areas. Acta Astronautica. Targeted change detection 9 21. https://www.intelligence-airbusds.com/files/pmedia/public/r2928 9 int 012 spot67 en low-2.pdf 22. http://worldview3.digitalglobe.com/ 23. https://www.planet.com/products/satelliteimagery/files/Planet Combined Imagery Product Specs December2017.pdf 24. https://qz.com/1126301/the-company-photographing-every-spot-of-land-onearth-every-single-day/ 25. Fernndez-Prieto, D., & Marconcini, M. (2011). A novel partially supervised approach to targeted change detection. IEEE Transactions on Geoscience and Remote Sensing, 49(12), 5016-5038. 26. Ye, S., Chen, D., & Yu, J. (2016). A targeted change-detection procedure by combining change vector analysis and post-classification approach. ISPRS Journal of Photogrammetry and Remote Sensing, 114, 115-124. 27. Toth, C., & Jkw, G. (2016). Remote sensing platforms and sensors: A survey. ISPRS Journal of Photogrammetry and Remote Sensing, 115, 22-36. 28. ENVI software, https://www.harris.com/solution/envi 29. Roper, W., & Dutta, S. (2005). Oil spill and pipeline condition assessment using remote sensing and data visualization management systems. In: 2005 ESRI User Conference Proceedings, San Diego, California, pp. 1-25. 30. Wang, B., Choi, J., Choi, S., Lee, S., Wu, P., & Gao, Y. (2017). Image Fusion-Based Land Cover Change Detection Using Multi-Temporal High-Resolution Satellite Images. Remote Sensing, 9(8), 804. 31. Huang, S., Ramirez, C., Kennedy, K., Mallory, J., Wang, J., & Chu, C. (2017). Updating land cover automatically based on change detection using satellite images: case study of national forests in Southern California. GIScience & Remote Sensing, 54(4), 495-514. 32. Mcdermid, G. J., Pape, A., Chubey, M. S., & Franklin, S. E. (2003, October). Object-oriented analysis for change detection. In Proceedings of the 25th Canadian symposium on remote sensing, Montral, Canada (pp. 14-17). 33. Almutairi, A., & Warner, T. A. (2010). Change detection accuracy and image properties: a study using simulated data. Remote Sensing, 2(6), 1508-1529. 34. Cai S., & Liu, D. (2015). Detecting Change Dates from Dense Satellite Time Series Using a Sub-Annual Change Detection Algorithm. Remote Sensing, 7, 8705-8727. doi:10.3390/rs70708705. 35. Vakalopoulou, M., Karantzalos, K., Komodakis, N., & Paragios, N. (2015). Simultaneous registration and change detection in multitemporal, very high resolution remote sensing data. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops (pp. 61-69). 36. Yu, H., Yang, W., Hua, G., Ru, H., & Huang, P. (2017). Change Detection Using High Resolution Remote Sensing Images Based on Active Learning and Markov Random Fields. Remote Sensing, 9(12), 1233. 37. Gu, W., Lv, Z., & Hao, M. (2017). Change detection method for remote sensing images based on an improved Markov random field. Multimedia Tools and Applications, 76(17), 17719-17734. 38. Jianya, G., Haigang, S., Guorui, M., & Qiming, Z. (2008). A review of multitemporal remote sensing data change detection algorithms. The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, 37(B7), 757-762. 39. Huang, L., Fang, Y., Zuo, X., & Yu, X. (2015). Automatic change detection method of multitemporal remote sensing images based on 2D-Otsu algorithm improved by firefly algorithm. Journal of Sensors, 2015. 10 Vladimir Ignatiev et al. 40. Vittek, M., Brink, A., Donnay, F., Simonetti, D., & Descle, B. Land cover change monitoring using Landsat MSS/TM satellite image data over west africa between 1975 and 1990. Remote Sensing 2014; 6 (1): 658-676. 41. Jabari, S., & Zhang, Y. (2016, April). Building change detection using multi-sensor and multi-view-angle imagery. In IOP Conference Series: Earth and Environmental Science (Vol. 34, No. 1, p. 12-18). IOP Publishing. 42. El Amin, A. M., Liu, Q., & Wang, Y. (2016, July). Convolutional neural network features based change detection in satellite images. In First International Workshop on Pattern Recognition (Vol. 10011, p. 100110W). International Society for Optics and Photonics. 43. Chu, Y., Cao, G., & Hayat, H. (2016). Change Detection of Remote Sensing Image Based on Deep Neural Networks. 44. Lyu, H., Lu, H., & Mou, L. (2016). Learning a transferable change rule from a recurrent neural network for land cover change detection. Remote Sensing, 8(6), 506. 45. Sakurada, K., Okatani, T., & Deguchi, K. (2013, June). Detecting changes in 3D structure of a scene from multi-view images captured by a vehicle-mounted camera. In Computer Vision and Pattern Recognition (CVPR), 2013 IEEE Conference on (pp. 137-144). IEEE.
5cs.CE
SCNN: An Accelerator for Compressed-sparse Convolutional Neural Networks Angshuman Parashar† Anurag Mukkara‡ Antonio Puglielli∗ Joel Emer†‡ arXiv:1708.04485v1 [cs.NE] 23 May 2017 NVIDIA† Minsoo Rhu† Rangharajan Venkatesan† Stephen W. Keckler† Massachusetts Institute of Technology‡ Abstract—Convolutional Neural Networks (CNNs) have emerged as a fundamental technology for machine learning. High performance and extreme energy efficiency are critical for deployments of CNNs in a wide range of situations, especially mobile platforms such as autonomous vehicles, cameras, and electronic personal assistants. This paper introduces the Sparse CNN (SCNN) accelerator architecture, which improves performance and energy efficiency by exploiting the zero-valued weights that stem from network pruning during training and zero-valued activations that arise from the common ReLU operator applied during inference. Specifically, SCNN employs a novel dataflow that enables maintaining the sparse weights and activations in a compressed encoding, which eliminates unnecessary data transfers and reduces storage requirements. Furthermore, the SCNN dataflow facilitates efficient delivery of those weights and activations to the multiplier array, where they are extensively reused. In addition, the accumulation of multiplication products are performed in a novel accumulator array. Our results show that on contemporary neural networks, SCNN can improve both performance and energy by a factor of 2.7× and 2.3×, respectively, over a comparably provisioned dense CNN accelerator. I. I NTRODUCTION Driven by the availability of massive data and the computational capability to process it, deep learning has recently emerged as a critical tool for solving complex problems across a wide range of domains, including image recognition [20], speech processing [12], [16], [2], natural language processing [8], language translation [10], and autonomous vehicles [21]. Convolutional neural networks (CNNs) have become the most popular algorithmic approach for deep learning for many of these domains. Employing CNNs can be decomposed into two tasks: (1) training — in which the parameters of a neural network are learned by observing massive numbers of training examples, and (2) inference — in which a trained neural network is deployed in the field and classifies the A version appears in the 44th IEEE/ACM International Symposium on Computer Architecture (ISCA-44), 2017. This research was, in part, funded by the U.S. Government, under the DARPA CRAFT program. The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of the U.S. Government. Brucek Khailany† William J. Dally† UC-Berkeley∗ Stanford University observed data. Today, training is often done on GPUs [24] or farms of GPUs, while inference depends on the application and can employ CPUs, GPUs, FPGA, or specially-built ASICs. During the training process, a deep learning expert will typically architect the network, establishing the number of layers, the operation performed by each layer, and the connectivity between layers. Many layers have parameters, typically filter weights, which determine their exact computation. The objective of the training process is to learn these weights, usually via a stochastic gradient descent-based excursion through the space of weights. This process typically employs a forward-propagation calculation for each training example, a measurement of the error between the computed and desired output, and then back-propagation through the network to update the weights. Inference has similarities, but only includes the forward-propagation calculation. Nonetheless, the computation requirements for inference can be prohibitively large, particularly with the emergence of deeper networks (hundreds of layers [17], [18], [26], [29]) and larger inputs sets, such as high-definition video. Furthermore, the energy efficiency of this computation is important, especially for mobile platforms, such as autonomous vehicles, cameras, and electronic personal assistants. Recent published works have shown that common networks have significant redundancy and can be pruned dramatically during training without substantively affecting accuracy [15]. Our experience shows that the number of weights that can be eliminated varies widely across the layers but typically ranges from 20% to 80% [15], [14]. Eliminating weights results in a network with a substantial number of zero values, which can potentially reduce the computational requirements of inference. The inference computation also offers a further optimization opportunity. In specific, many networks employ as their nonlinear operator the ReLU (rectified linear unit) function which clamps all negative activation values to zero. The activations are the output values of an individual layer that are passed as inputs to the next layer. Our experience shows that for typical data sets, 50–70% of the activations are clamped to zero. Since the multiplication of weights and activations is the key computation for inference, the combination of these two factors can reduce the amount of computation required by over an order of magnitude. Additional benefits can be achieved by a compressed encoding for zero weights and activations, thus allowing more to fit in on-chip RAM and eliminating energycostly DRAM accesses. In this paper, we introduce the Sparse CNN (SCNN) accelerator architecture, a new CNN inference architecture that exploits both weight and activation sparsity to improve both performance and power. Previous works have employed techniques for exploiting sparsity, including saving computation energy for zero-valued activations and compressing weights and activations stored in DRAM [7], [6]. Other works have used a compressed encoding of activations [1] or weights [30] in parts of their dataflow to reduce data transfer bandwidth and save time for computations of some multiplications with a zero operand. While these prior architectures have largely focused on eliminating computations and exploiting some data compression, SCNN couples an algorithmic dataflow that eliminates all multiplications with a zero operand while employing a compressed representation of both weights and activations through almost the entire computation. At the heart of the SCNN design is a processing element (PE) with a multiplier array that accepts a vector of weights and a vector of activations. Unlike previous convolutional dataflows [5], [11], [7], [25], the SCNN dataflow only delivers weights and activations to the multiplier array that can all be multiplied by one another in the manner of a Cartesian product. Furthermore, the activation vectors are reused in an input stationary [6] fashion against a number of weight vectors to reduce data accesses. Finally, only non-zero weights and activations are fetched from the input storage arrays and delivered to the multiplier array. As with any CNN accelerator, SCNN must accumulate the partial products generated by the multipliers. However, since the products generated by the multiplier array cannot be directly summed together, SCNN tracks the output coordinates associated with each multiplication and sends the coordinate and product to a scatter accumulator array for summing. To increase parallelism beyond a single PE, multiple PEs can be run in parallel with each working on a disjoint 3D tile of input activations. Because of the end-to-end compression of activations, SCNN can keep the both the input and output activations of each tile local to its PE, further reducing energyhungry data transmission. Overall, this results in a design with efficient compressed storage and delivery of input operands, high reuse of the input operands in the multiplier array, and that spends no time on multiplications with zero operands. To evaluate SCNN, we developed a cycle-level performance model and a validated analytical model that allows us to quickly explore the design space of different types of accelerators. We also implemented an SCNN PE in synthesizable System C and compiled the design into gates using a combination of commercial high-level synthesis (HLS) tools and a traditional verilog compiler. Our results show that 64 PE SCNN implementation with 16 multipliers per PE (1024 multipliers in total) can be implemented in approximately 7.9mm2 , which TABLE I N ETWORK CHARACTERISTICS . W EIGHTS AND ACTIVATIONS ASSUME A DATA - TYPE SIZE OF TWO BYTES . # Conv. Max. Layer Max. Layer Total # Network Layers Weights Activations Multiplies AlexNet [20] 5 1.73 MB 0.31 MB 0.69 B GoogLeNet [28] 54 1.32 MB 1.52 MB 1.1 B VGGNet [27] 13 4.49 MB 6.12 MB 15.3 B is somewhat larger than an equivalently provisioned dense accelerator architecture due to the overheads of managing the sparse dataflow. On a range of networks, SCNN provides a factor of 2.7× speedup and a 2.3× energy reduction relative to the dense architecture. II. M OTIVATION Convolutional Neural Network algorithms (CNNs) are essentially a cascaded set of pattern recognition filters trained with supervision [21]. A CNN consists of a series of layers, which include convolutional layers, non-linear scalar operator layers, and layers that downsample the intermediate data, for example by pooling. The convolutional layers represent the core of the CNN computation and are characterized by a set of filters that are usually 1×1 or 3×3, and occasionally 5×5 or larger. The values of these filters are the weights that are trained using a training set for the network. Some deep neural networks (DNNs) also include fully-connected layers, typically toward the end of the DNN. During inference, a new image (in the case of image recognition) is presented to the network, which classifies into the training categories by computing in succession each of the layers in the network. The intermediate data between the layers are called activations and the output activation of one layer becomes the input activation of the next layer. In this paper, we focus on accelerating the convolutional layers as they constitute the majority of the computation [9]. Table II lists the attributes of three commonly used networks in image processing: AlexNet [20], GoogLeNet [28], and VGGNet [27], whose specifications come from the Caffe BVLC Model Zoo [4]. The increasing layer depth across the networks represents the successively more accurate networks in the ImageNet [19] competition. The Maximum Weights and Activations columns indicate the size of the largest weight and activation matrices across the layer of the network. The last column lists the total number of multiplies required to compute a single inference pass through all of the convolutional layers of the network. These data and computational requirements are derived from the standard ImageNet inputs images of 224 × 224 pixels. Processing larger, higher resolution images will result in greater computational and data requirements. Sparsity in CNNs. Sparsity in a layer of a CNN is defined as the fraction of zeros in the layer’s weight and input activation matrices. The primary technique for creating weight sparsity is to prune the network during training. Han, et al. developed a pruning algorithm that operates in two 2 Density (IA) Density (W) Work (# of multiplies) Density (IA, W) 1 0.8 1 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0 Work (# of multiplies) phases [15]. First, any weight with an absolute value that is close to zero (e.g. below a defined threshold) is set to zero. This process has the effect of removing weights from the filters, and sometimes even forcing an output activation to always to be zero. Second, the remaining network is retrained, to regain the accuracy lost through naı̈ve pruning. The result is a smaller network with accuracy extremely close to the original network. The process can be iteratively repeated to reduce network size while maintaining accuracy. Activation sparsity occurs dynamically during inference and is highly dependent on the data being processed. Specifically, the rectified linear unit (ReLU) function that is commonly used as the non-linear operator in CNNs forces all negatively valued activations to be clamped to zero. After completing computation of a convolutional layer, a ReLU function is applied point-wise to each element in the output activation matrices before the data is passed to the next layer. To measure the weight and activation sparsity, we used the Caffe framework [3] to prune and train the three networks listed in Table II, using the pruning algorithm of [15]. We then instrumented the Caffe framework to inspect the activations between the convolutional layers. Figure 1 shows the weight and activation density (fraction of non-zeros or complement of sparsity) of the layers of the networks, referenced to the lefthand y-axes. As GoogLeNet has 54 convolutional layers, we only show a subset of representative layers. The data shows that weight density varies across both layers and networks, reaching a minimum of 30% for some of the GoogLeNet layers. Activation density also varies, with density typically being higher in early layers. Activation density can be as low as 30% as well. The triangles shows the ideal amount of work (measured in multiplies of non-zero values) that could be achieved through maximum exploitation of sparsity by taking the product of the weight and activation densities on a perlayer basis. Typical layers can reduce work by a factor of 4, and can reach as high as a factor of ten. Exploiting sparsity. Since multiplication by zero just results in a zero, it should require no work. In addition, that zero will contribute nothing to the partial sum it is part of, so the addition is unnecessary as well. Furthermore, data with many zeros can be represented in a compressed form. Together these characteristics provide a number of opportunities for optimization: • Compressing data: Encoding the sparse weights and/or activations provides an architecture an opportunity to reduce the amount of data that must be moved throughout the memory hierarchy. It also reduces the data footprint, which allows larger matrices to be held a given size storage structure. • Eliminating computation: For multiplications that have a zero weight and/or activation operand, the operation can be data gated or the operands might never be sent to the multiplier. This can save energy consumption or both time and energy consumption, respectively. Our SCNN architecture exploits both these opportunities. First, it employs a dense encoding of sparse weights and 0 conv1 conv2 conv3 conv4 conv5 (a) AlexNet Density (W) 0.8 Density (IA, W) 1 Density (IA) 0.8 Work (# of multiplies) 0.6 0.6 0.4 0.4 0.2 0.2 inception_3a 5x5 5x5_reduce 3x3 3x3_reduce 1x1 pool_proj 5x5 3x3 5x5_reduce 1x1 3x3_reduce 0 pool_proj 0 Work (# of multiplies) 1 inception_5b (b) GoogLeNet Density (IA, W) 0.8 1 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0 0 Work (# of multiplies) Density (IA) Density (W) Work (# of multiplies) 1 (c) VGGNet Fig. 1. Input activation and weight density and the reduction in the amount of work achievable by maximally exploiting sparsity. activations. Second, it uses a novel dataflow that delivers only those densely encoded weights and activations to the multipliers. III. SCNN DATAFLOW The core operation in a CNN convolutional layer is a 2dimensional sliding-window convolution of an R × S element filter over a W ×H element input activation plane to produce a W × H element output activation plane. There can be multiple (C) input activation planes, which are referred to as input channels. A distinct filter is applied to each input activation channel, and the filter output for each of the C channels are accumulated together element-wise into a single output activation plane. Multiple filters (K) can be applied to the same body of input activations to produce K output channels of activations. Finally, a batch of length N of groups of C channels of input activation planes can be applied to the same volume of filter weights. Figure 2 shows these parameters applied to the computation of a single CNN layer. The set of computations for the complete layer can be formulated as a loop nest over these 7 variables. Because 3 for n = 1 to N for k = 1 to K for c = 1 to C for w = 1 to W for h = 1 to H for r = 1 to R for s = 1 to S out[n][k][w][h] += in[n][c][w+r-1][h+s-1] * filter[k][c][r][s]; 7-dimensional network layer C Weights Inputs K Outputs S H K C H-S+1 R C W . . . N W-R+1 . . . N 1 Fig. 3. 7-dimensional CNN loop nest. Fig. 2. CNN computations and parameters. each of the the K output channels (a K × R × S subvolume). Thus each input activation will contribute to a volume of K × R × S output activations. This order maximizes the reuse of the input activations, while paying a cost to stream the weights to the computation units. Accommodating multiple input channels (C) adds an additional outer loop and results in the loop nest C → W → H → K → R → S. The PT-IS-CP-dense dataflow requires input buffers for weights and input activations, and a accumulator buffer to store the partial sums of the output activations. The accumulator buffer must perform a read-add-write operation for every access to a previously-written index. We call this accumulator buffer along with the attached adder an accumulation unit. Parameters of contemporary networks cause these buffers to be large and energy-expensive to access. The input-stationary temporal loop nest amortizes the energy cost of accessing the input buffer over multiple weight and accumulator buffer accesses. More precisely, the register in which the stationary input is held over K × R × S iterations serves as an inner buffer filtering accesses to the larger input buffer. Unfortunately, the stationarity of input activations comes at the cost of more streaming accesses to the weights and partial sums (in the accumulator buffer). Blocking the weights and partial sums in the output channel (K) dimension can increase reuse of these data structures and improve energy efficiency. We factor the output channel variable (K) into Kc (which we call a output-channel group) and K/Kc , and only store weights and outputs for a single output-channel group at a time inside the weight and accumulator buffers. Thus the subvolumes that are housed in buffers at the computation unit are: • Weights: C × Kc × R × S • Inputs: C ×W × H • Partial Sums: Kc ×W × H An outer loop over all the K/Kc output-channel chunks results in the complete loop nest K/Kc → C → W → H → Kc → R → S. Note that each iteration of this outer loop will require the weight buffer to be refilled and the accumulator buffer must be drained and cleared, while the contents of the input buffer will be fully reused because the same input activations are used across all output channels. Intra-PE parallelism. To exploit the parallelism of many multipliers within a PE, we fetch a vector of F filter-weights multiply-add operations are associative (modulo rounding errors, which we will ignore in this study), all permutations of these 7 loop variables are legal. Figure 3 shows an example loop nest based on one such permutation. We can concisely describe this nest as N → K → C → W → H → R → S. Each point in the 7-dimensional space formed from these variables represents a single multiply-accumulate operation. Note that for the remainder of this paper, we assume a batch size of 1, which is common for inferencing tasks. This simple loop nest can be transformed in numerous ways to capture different reuse patterns of the activations and weights and to map the computation to a hardware accelerator implementation. A CNN’s dataflow defines how the loops are ordered, partitioned, and parallelized [6]. Prior work[6] has shown that the choice of dataflow has a significant impact on the area and energy-efficiency of an architecture. In fact, the choice of dataflow is perhaps the single most significant differentiator between many prior works on CNN architectures. While the concept of dataflow has been studied for dense architectures, sparse architectures can also employ various alternative dataflows, each with its own set of trade-offs. While an exhaustive enumeration of sparse dataflows is beyond the scope of this paper, we present a specific dataflow called PlanarTiled-InputStationary-CartesianProduct-sparse (or PTIS-CP-sparse). After examining a range of different dataflows, we selected PT-IS-CP-sparse because it enables reuse patterns that exploit the characteristics of sparse weights and activations. This section first presents an equivalent dense dataflow (PT-IS-CP-dense) to explain the decomposition of the computations and then adds the specific features for PT-IS-CPsparse . A. The PT-IS-CP-dense Dataflow Single-multiplier temporal dataflow. To understand the temporal component of the PT-IS-CP-dense dataflow, consider the operation of a processing element (or PE) with a single multiply-accumulate unit. The dataflow employs an inputstationary computation order in which an input activation is held stationary at the computation units as it is multiplied by all the filter weights needed to make all its contributions to 4 from the weight buffer and a vector of I inputs from the input activation buffer. These values are delivered to an array of F×I multipliers to compute a full Cartesian product of output partial-sums. Each product yields a useful partial sum such that no extraneous fetches or computations are performed. PT-ISCP-sparse will exploit this same property to make computation efficient on compressed-sparse weights and input activations. (A) (B) (C) The multiplier outputs are sent to the accumulation unit, which updates the partial sums of the output activation. Each multiplier output is accumulated with a partial sum at the matching output coordinates in the output activation space. These coordinates are computed in parallel with the multiplications. The accumulation unit must employ at least F×I adders to match the throughput of the multipliers. Figure 4 shows pseudo-code for the PT-IS-CP-dense dataflow, including blocking in the K dimension (A,C), fetching vectors of input activations and weights (B,D), and computing the Cartesian product in parallel (E,F). The Kcoord(), Xcoord(), and Y coord() functions compute the k, x, and y coordinates of the uncompressed output volume using a de-linearization of the temporal loop indices a and w, the spatial loop indices i and f , and the known filter width and height. Note that this dataflow is simply a reordered, partitioned and parallelized version of Figure 3. (D) (E) (F) Fig. 4. PT-IS-CP-dense dataflow. B. PT-IS-CP-sparse Dataflow PT-IS-CP-sparse is a natural extension of PT-IS-CP-dense that exploits sparsity in the weights and input activations. The dataflow is specifically designed to operate on compressedsparse encodings of the weights and input activations and to produce a compressed-sparse encoding of the output activations. At a CNN layer boundary, the output activations of the previous layer become the input activations of the next layer. While prior work has proposed a number of compressedsparse representations [13], [1], [30], the specific format used is orthogonal to the sparse architecture itself. What is key is that decoding a sparse format ultimately yields a non-zero data value and an index indicating the coordinates of the value in the weight or input activation matrices. To facilitate easier decoding of the compressed-sparse blocks, weights are grouped into compressed-sparse blocks at the granularity of an output-channel group, with of Kc ×R×S weights encoded into one compressed block. Likewise, input activations are encoded at the granularity of input channels, with a block of Wt ×Ht encoded into one compressed block. At each access, the weight buffer delivers a vector of F nonzero filter weights along with each of their coordinates within the Kc ×R×S region. Similarly, the input buffer delivers a vector of F non-zero input activations along with each of their coordinates within the Wt ×Ht region. Similar to the dense dataflow, the multiplier array computes the full cross-product of F×I partial sum outputs, with no extraneous computations. Unlike a dense architecture, output coordinates are not derived from loop indices in a state machine but from the coordinates of non-zero values embedded in the compressed format. Even though calculating output coordinates is trivial, the multiplier outputs are not typically contiguous as they are in PT-IS-CP-dense. Thus the F×I multiplier outputs must be Inter-PE parallelism. To scale beyond the practical limits of multiplier count and buffer sizes within a PE, we employ a tiling strategy to spread the work across an array of PEs so that each PE can operate independently. PT-IS-CP-dense partitions the W ×H element activation plane into smaller Wt ×Ht element tiles that are distributed across the PEs. Each tile extends fully into the input-channel dimension C, resulting in an input-activation volume of C×Wt ×Ht assigned to each PE. Weights are broadcast to the PEs and each PE operates on its own subset of the input and output activation space. Unfortunately, strictly partitioning both input and output activations into Wt ×Ht tiles does not work because the slidingwindow nature of the convolution operation introduces crosstile dependencies at tile edges. These dependencies are called halos. Halos can be resolved in two ways: • • BUFFER wt_buf[C][Kc*R*S/F][F]; BUFFER in_buf[C][Wt*Ht/I][I]; BUFFER acc_buf[Kc][Wt+R-1][Ht+S-1]; BUFFER out_buf[K/Kc][Kc*Wt*Ht]; for k’ = 0 to K/Kc-1 { for c = 0 to C-1 for a = 0 to (Wt*Ht/I)-1 { in[0:I-1] = in_buf[c][a][0:I-1]; for w = 0 to (Kc*R*S/F)-1 { wt[0:F-1] = wt_buf[c][w][0:F-1]; parallel_for (i=0 to I-1) x (f=0 to F-1) { k = Kcoord(w,f); x = Xcoord(a,i,w,f); y = Ycoord(a,i,w,f); acc_buf[k][x][y] += in[i]*wt[f]; } } } out_buf[k’][0:Kc*Wt*Ht-1] = acc_buf[0:Kc-1][0:Wt-1][0:Ht-1]; } Input halos: The input buffers at each PE are sized to be slightly larger than C ×Wt ×Ht to accommodate the halos. These halo input values are replicated across adjacent PEs, but outputs are strictly private to each PE. Replicated input values can be multicast when they are being fetched into the buffers. Output halos: The output buffers at each PE are sized to be slightly larger than Kc ×Wt × Ht to accommodate the halos. The halos now contain incomplete partial sums that must be communicated to neighbor PEs for accumulation. This communication occurs at the end of computing each output-channel group. Our PT-IS-CP-dense dataflow uses output halos, though the efficiency difference between the two approaches is minimal. 5 scattered to discontiguous addresses within the Kc ×Wt ×Ht output range. Because any value in the output range can be non-zero, the accumulation buffer must be kept in a dense format. In fact, output activations will probabilistically have high density even with a very low density of weights and input activations, until they pass through a ReLU operation. To accommodate the needs of accumulation of sparse partial sums, we modify the monolithic Kc ×Wt ×Ht accumulation buffer from the PT-IS-CP-dense dataflow into a distributed array of smaller accumulation buffers accessed via a scatter network which can be implemented as a crossbar switch. The scatter network routes an array of F×I partial sums to an array of A accumulator banks based on the output index associated with each partial sum. Taken together, the complete accumulator array still maps the same Kc ×Wt ×Ht address range, though the address space is now split across a distributed set of banks. PT-IS-CP-sparse can be implemented via small adjustments of Figure 4. Instead of a dense vector fetches, (B) and (D) fetch the compressed sparse input activations and weights, respectively. In addition, the coordinates of the non-zero values in the compressed-sparse form of these data structures must be fetched from their respective buffers (not shown). After that the accumulator buffer (F) must be indexed with the computed output coordinates from the sparse weight and activations. Finally, when the computation for the output-channel group has been completed the accumulator buffer is drained and compressed into the next level of buffer. PE PE PE DRAM Weights PE PE Layer Sequencer IA PE PE OA PE PE Fig. 5. Complete SCNN architecture. Each PE’s state machine operates on the weight and input activations in the order defined by the PT-IS-CP-sparse dataflow to produce an output-channel group of Kc ×Wt × Ht partial sums inside the accumulation buffers. First, a vector F of compressed weights and a vector I of compressed input activations are fetched from their respective buffers. These vectors are distributed into the F×I multiplier array which computes a form of the cartesian product of the vectors. At the same time, the indices from the sparse-compressed weights and activations are processed to compute the coordinates in dense output activation. The F×I products are delivered to an array of A accumulator banks, indexed by the output coordinates. To reduce contention among products that hash to the same accumulator bank, A is set to be larger than F×I. Our results show that A = 2×F×I sufficiently reduces accumulator bank contention. Each accumulator bank includes adders and small set of entries for the output channels associated with the output-channel group being processed. The accumulation buffers are double-buffered so that one set of banks can be updated by incoming partial sums while the second set of banks are drained out by the PPU. When the output-channel group is complete, the PPU performs the following tasks: (1) exchange partial sums with neighbor PEs for the halo regions at the boundary of the PE’s output activations, (2) apply the non-linear activation (e.g. ReLU), pooling, and dropout functions, and (3) compress the output activations into the compressed-sparse form and write them into the OARAM. SCNN uses a simple compressed-sparse encoding approach based on run-length encoding scheme. The index vector encodes the number of zeros between each element in the compressed-sparse data vector. Determining the coordinates in the accumulator buffer for each multiplier output requires reading the index vectors for F and I and combining them with the coordinates of portion of the output activation space currently being processed. Four bits per index allows for up to 15 zeros to appear between any two non-zero elements. Non-zero elements that are further apart can have a zerovalue placeholder without incurring any noticable degradation in compression efficiency. While SCNN will operate most efficiently when the activa- IV. SCNN A RCHITECTURE A complete SCNN accelerator employing the PT-IS-CPsparse dataflow of Section III consists of multiple SCNN processing elements (PEs) connected via simple interconnections. Figure 5 shows an array of PEs, with each PE including channels for receiving weights and input activations, and channels delivering output activations. The PEs are connected to their nearest neighbors to exchange halo values during the processing of each CNN layer. The PE array is driven by a layer sequencer to orchestrate the movement of weights and activations and is connected to a DRAM controller that can broadcast weights to the PEs and stream activations to/from the PEs. Processing Element (PE) Architecture. Figure 6 shows the microarchitecture of an SCNN PE, including a weight buffer, input/output activation RAMs (IARAM and OARAM), a multiplier array, a scatter crossbar, a bank of accumulator buffers, and a post-processing unit (PPU). To process the first CNN layer, the layer sequencer streams a portion of the input image into the IARAM of each PE and broadcasts the compressed-sparse weights into the weight buffer of each PE. Upon completion of the layer, the sparse-compressed output activation is distributed across the OARAMs of the PEs. When possible, the activations are held in the IARAMs/OARAMs and are never swapped out to DRAM. If the output activation volume of a layer can serve as the input activation volume for the next layer, the IARAMs and OARAMs are logically swapped between the two layers’ computation sequences. 6 Weight FIFO (sparse) F … indices F*I I indices FxI multiplier array Buffer bank PPU: Halos ReLU Compress … … IARAM (sparse) F*I indices Coordinate Computation OARAM (sparse) I F*I—A arbitrated xbar F Buffer bank A accumulator buffers Neighbors 1 Fig. 6. SCNN PE employing the PT-IS-CP-sparse dataflow. TABLE II SCNN DESIGN PARAMETERS . PE Parameter Multiplier width Accumulator width IARAM/OARAM (each) Weight FIFO Multiply array (F×I) Accumulator banks Accumulator bank entries SCNN Parameter # PEs # Multipliers IARAM + OARAM data IARAM + OARAM indices TABLE III SCNN PE AREA BREAKDOWN . Value 16 bits 24 bits 10KB 50 entries (500 B) 4×4 32 32 Value 64 1024 1MB 0.2MB PE Component IARAM + OARAM Weight FIFO Multiplier array Scatter network Accumulator buffers Other Total Accelerator total Size 20 KB 0.5 KB 16 ALUs 16×32 crossbar 6 KB — — 64 PEs Area (mm2 ) 0.031 0.004 0.008 0.026 0.036 0.019 0.123 7.9 sparse format. In total, the SCNN design includes a total of 1,024 multipliers and 1MB of activation RAM. At the synthesized clock speed of the PE of slightly more than 1 GHz, this design achieves a peak throughput of 2 Tera-ops (16-bit multiplies plus 24-bit adds). Area Analysis. To prototype the SCNN architecture, we designed an SCNN PE in synthesizable SystemC and then used the Catapult high-level synthesis (HLS) tool [23], [22] to generate Verilog RTL. During this step, we used HLS design constraints to optimize the design by mapping different memory structures to synchronous RAMs and latch arrays and pipelining the design to achieve full throughput. We then used Synopsys Design Compiler to perform placement-aware logic synthesis and obtain post-synthesis area estimates in a TSMC 16nm FinFET technology. Table III summarizes the area of the major structures of the SCNN PE. A significant fraction of the PE area is contributed by memories (IARAM, OARAM, accumulator buffers), which consume 57% of the PE area, while the multiplier array only consumes 6%. IARAM and OARAM are large in size and consume 25% of the PE area. Accumulator buffers, though smaller in size compared to IARAM/OARAM, are heavily banked (32 banks), contributing to their large area. tions fit in the on-chip activation RAMs, Large networks, such as VGGNet, require activations to be saved to and restored from DRAM. CNN accelerator architectures such as SCNN can employ a tiling approach that operates on a 2D subset of the activation space at a time. Our analysis shows that for both dense and sparse architectures, the DRAM accesses for one tile can be hidden by pipelining them in tandem with the computation of another tile. While we do not present the details of the tiled approach here, we do account for the DRAM access energy overhead for tiling in Section VI. SCNN Architecture Configuration. While the SCNN architecture can be scaled across a number of dimensions, Table II lists the key parameters of the SCNN design we explore in this paper. The design employs an 8×8 array of PEs, each with a 4×4 multiplier array, and an accumulator buffer with 32 banks. We chose a design point of 1,024 multipliers to match the expected computation throughput required to process HD video in real-time at acceptable frame rates. The IARAM and OARAM are sized so that the sparse activations of AlexNet and GoogleNet can fit entirely within these RAMs so that activations need not spill to DRAM. The weight FIFO and the activation RAMs each carry a 10-bit overhead for each 16-bit value to encode the coordinates in the compressed- V. E XPERIMENTAL M ETHODOLOGY CNN performance and power measurements. To model 7 the performance of the SCNN architecture, we rely primarily on a custom-built cycle-level simulator. This simulator is parameterizable across dimensions including number of processing element (PE) tiles, RAM capacity, multiplier array dimensions (F and I), and accumulator buffers (A). The SCNN simulator is driven by the pruned weights and sparse input activation maps extracted from the Caffe Python interface (pycaffe) [3] and executes each layers of the network one at a time. As a result, the simulator captures the effects of the sparsity of the data and its effect on load balancing within the SCNN architecture. We also developed TimeLoop, a detailed analytical model for CNN accelerators to enable an exploration of the design space of dense and sparse architectures. TimeLoop can model a wide range of data flows, including PT-IS-CP-dense, PT-ISCP-sparse and others. Architecture parameters to TimeLoop include the memory hierarchy configuration (buffer size and location), ALU count and partitioning, and dense/sparse hardware support. TimeLoop analyzes the input data parameters, the architecture, and the dataflows, and computes the number of cycles to process the layer based on a bottleneck analysis and the counts of ALU operations and accesses to different buffers in the memory hierarchy. We apply an energy model to the time loop events derived from the synthesis modeling to compute the overall energy required to execute the layer. TimeLoop also computes the overall area of the accelerator based on the inputs from the synthesis modeling. For SCNN, the area model includes all of the elements from the synthesizable SystemC implementation. For dense architectures, area is computed using area of the major structures (RAMs, ALUs, and interconnect) derived from the SystemC modeling. Architecture configurations. Table IV summarizes the major accelerator configurations that we explore, including both dense and sparse accelerators. All of the accelerators employ the same number of multiply ALUs so that we can compare the performance of the accelerators with the same computational resources. The dense DCNN accelerator operates solely on dense weights and activations and employs a dataflow called PT-IS-DP-dense, which is a variant of the PT-IS-CP-dense data flow described in Section III that uses a dot-product as its inner core operation. The optimized DCNN-opt architecture has the same configuration as DCNN but employs two optimizations: (1) compression/decompression of activations as they are transferred out of/into DRAM, and (2) multiply ALU gating to save energy when a multiplier input is zero. The DCNN architecture is configured with 2MB of SRAM for holding inter-layer activations, and can hold all of them for AlexNet and GoogLeNet. The SCNN configuration matches the architecture described in Section IV, and includes a total of 1MB of IARAM + OARAM. Because the activations are compressed, this capacity enables all of the activation data for the two networks to be held on chip, without requiring DRAM transfers for activations. The larger VGGNet requires the activation data to be transferred in and out of DRAM. The area required for each accelerator is listed in the last column. While SCNN has smaller activation RAM capacity, TABLE IV CNN ACCELERATOR CONFIGURATIONS . DCNN DCNN-opt SCNN # PEs 64 64 64 # MULs 1024 1024 1024 SRAM 2MB 2MB 1MB Area (mm2 ) 5.9 5.9 7.9 its larger size is due to the accumulator buffers, as described in Section IV. Benchmarks. To explore the sensitivity of the architectures to sparsity parameters, we employ a synthetic network where we can adjust the degree of sparsity of both weights and activations. As described in Section II, we use AlexNet and GoogLeNet for the bulk of our experiments. With respect to GoogLeNet, we primarily focus on the convolutional layers that are within the inception modules [28]. VGGNet is known to be over-parameterized, which results in an extremely large amount of inter-layer activation data (6 MB or about 4×) the largest GoogLeNet layer. However, we use VGGNet as a proxy for large input data (such has high-resolution images) to explore the implications of tiling data on the SCNN architecture in Section VI-D. VI. E VALUATION This section first evaluates the sensitivity of SCNN to the sparseness of weights and activations using a synthetic CNN benchmark. We then discuss the performance and energyefficiency of SCNN versus a dense CNN accelerator, using real world CNN applications. For brevity, all the inception modules in GoogLeNet are denoted as IC_id in all of the figures discussed in this section. A. Sensitivity to CNN Sparsity To explore the efficacy of sparse versus dense architecture, we first measure performance and energy as a function of density of weights and activations. Using the TimeLoop analysis tool, we examine GoogLeNet as we artificially sweep the weight and activation densities together from 100% (fully dense) down to 10%. Figure 7 shows results on SCNN, DCNN, and DCNN-opt. On the x-axis, the total density is the product of the weight and activation density. For example, 0.5/0.5 represents the point where both weights and activations are 50% dense so the overall density is 25%. Figure 7a shows that at 100% density, SCNN achieves about 79% of the performance of DCNN because it suffers from multiplier underutilization (discussed shortly). SCNN starts to perform better than DCNN as density decreases to 85%, reaching a 24× improvement at 10% weight/activation density. This chart does not include DCNN-opt as the energy optimizations over DCNN do not affect performance. Figure 7b first shows that DCNN-opt’s energy optimizations of zero gating and DRAM traffic compression cause it to be better than DCNN at every level of density. These energy optimizations are surprisingly effective given that they have such a small effect on the design of the accelerator. At high density, SCNN is notably less energy efficient than 8 12 SCNN 10 1.2 8 Speedup Latency (cycles) DCNN/DCNN-opt 1.4 1 0.8 DCNN/DCNN-opt SCNN SCNN (oracle) 6 4 0.6 2 0.4 0 conv1 0.2 conv2 conv3 conv4 conv5 all Per-layer 0 0.1/0.1 0.2/0.2 0.3/0.3 0.4/0.4 0.5/0.5 0.6/0.6 0.7/0.7 0.8/0.8 0.9/0.9 Network (a) AlexNet 1.0/1.0 Weight / Activation Density (a) Performance DCNN-opt SCNN Speedup DCNN 1.4 1.2 Energy 1 0.8 DCNN/DCNN-opt 14 12 10 8 6 4 2 0 IC_3a 0.6 IC_3b IC_4a IC_4b IC_4c SCNN SCNN (oracle) IC_4d IC_4e IC_5a IC_5b Per-layer 0.4 all Network (b) GoogLeNet 0.2 0 0.1/0.1 0.2/0.2 0.3/0.3 0.4/0.4 0.5/0.5 0.6/0.6 0.7/0.7 0.8/0.8 0.9/0.9 15 1.0/1.0 Weight / Activation Density DCNN/DCNN-opt SCNN SCNN (oracle) 12 9 Speedup (b) Energy Fig. 7. GoogLeNet performance and energy as a function of density. 6 3 Per-layer all conv5_3 conv5_2 conv5_1 conv4_3 conv4_2 conv4_1 conv3_3 conv3_2 conv3_1 conv2_2 conv2_1 either DCNN architecture due to the overheads of storing and maintaining the sparse data structures. SCNN becomes more efficient than DCNN at about 83% weight/activation density and more efficient than DCNN-opt at 60% density. Given the density measurements of the networks in Figure 1, we expect SCNN to outperform the dense architectures on nearly all of the layers of the networks we examined and be largely comparable in energy efficiency vs. DCNN-opt across these layers. conv1_2 conv1_1 0 Network (c) VGGNet Fig. 8. Performance. number of non-zero activations and weights in the later layers to fully utilize the multiplier arrays. Figure 9 quantitatively demonstrates this intra-PE fragmentation of the multiplier array. For the last two inception modules of GoogLeNet, the fragmentation issue becomes noticeably severe, with less than an average 20% multiplier utilization. In this layer 3 out of the 6 convolutional layers within the inception module have a filter size of 1 × 1, only having up to 8 non-zero weights within an output-channel group with a Kc value of 8. Nonetheless, the last layers generally account for a small portion of the overall execution time and SCNN generally provides significant performance improvement across the network. The right y-axis of Figure 9 demonstrates the effect of load imbalance across the PEs by showing the fraction of cycles spent waiting at inter-PE barrier. Overall, although the inter-PE global barriers and intra-PE fragmentation prevents SCNN from reaching similar speedups offered by oracular SCNN(oracle), it still provides an average 2.7× performance over DCNN across the three stateof-the-art CNNs. Energy-efficiency. Figure 10 compares the energy of the three accelerator architectures across the layers of the three networks. DCNN-opt improves energy efficiency by 2.0× over DCNN, while SCNN increases average efficiency by 2.3×. The behavior across the layers varies widely depending on the density of the layer, ranging from 0.89× to 4.7× improvement over DCNN and 0.76× to 1.9× improvement over DCNN-opt. Input layers such as VGGNet conv1 1 and AlexNet conv1 B. SCNN Performance and Energy Performance. This subsection discusses the performance improvements offered by SCNN over the baseline dense DCNN accelerator. To demonstrate the upper-bound opportunity on performance, we also present the speedups offered by an oracular SCNN design (SCNN(oracle)). The performance of SCNN(oracle) is derived by dividing the number of multiplication operations required for Cartesian productbased convolution (Section III) with the number of multipliers available on-chip. Figure 8 summarizes the speedups offered by SCNN versus a dense CNN accelerator. Overall, SCNN consistently outperforms the DCNN design across all the layers of AlexNet, GoogLeNet, and VGGNet, achieving an average 2.37×, 2.19×, and 3.52× network-wide performance improvement, respectively. The performance gap between SCNN versus SCNN(oracle) widens in later layers of the network, from left to right in the x-axis of Figure 8. The key reason behind this gap is closely related to each layer’s average PE multiplier array utilization. In general, the working set allocated to each of the PEs in the later layers (e.g., IC_5b) are smaller than those in the earlier layers (e.g., IC_3a). As a result, it is more difficult to assign to a PE a sufficient 9 Multiplier util. PE idle cycles 1 0.6 0.6 0.4 0.4 0.2 0.2 0 DCNN 0 conv1 conv2 conv3 conv4 1 0.6 0.4 0.2 0 conv5 conv1 0.4 0.2 0.2 0 0 IC_4c IC_4d IC_4e IC_5a IC_5b (b) GoogLeNet SCNN 1 0.6 0.4 0.2 IC_3b IC_4a IC_4b IC_4c IC_4d IC_4e IC_5a IC_5b all Per-layer 1 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0 (b) GoogLeNet DCNN DCNN-opt SCNN 1.2 Energy (relative to DCNN) 0.8 Avg. PE idle cycles Avg. multiplier util. DCNN-opt 0.8 IC_3a 0 all 0 mul_util idle_cycles 1 conv5 1.2 Energy (relative to DCNN) 0.6 0.4 DCNN Avg. PE idle cycles Avg. multiplier util. 0.6 IC_4b conv4 (a) AlexNet 0.8 IC_4a conv3 1 0.8 IC_3b conv2 Per-layer mul_util idle_cycles IC_3a SCNN 0.8 (a) AlexNet 1 DCNN-opt 1.2 Energy (relative to DCNN) 0.8 Avg. PE idle cycles Avg. multiplier util. 1 0.8 (c) VGGNet 1 0.8 0.6 0.4 0.2 0 Fig. 9. Average multiplier array utilization (left-axis) and the average fraction of time PEs are stalled on a global barrier (right-axis), set at the boundaries of output channel groups. Per-layer (c) VGGNet Fig. 10. Energy-efficiency. usually present a challenge for sparse architectures because of their 100% input activation density. In such cases, the overheads of SCNN’s structures such as the crossbar and distributed accumulation RAMs overshadow any benefits from fewer arithmetic operations and data movement. inter-PE barriers for system-wide performance under our PTIS-CP-sparse dataflow. C. PE Granularity D. Larger Networks As outlined in Section VI-B, both cross-PE global barriers and intra-PE multiplier array fragmentation can contribute to degradation in the performance of SCNN. We quantify the effects of both of these factors on system performance by conducting the following sensitivity study. Assuming a fixed, chip-wide math throughput of 1,024 FLOPS, we sweep the total number of PEs on-chip from 64 (8×8 PEs, 16 multipliers per PE) down to 4 (2×2 PEs, 256 multipliers per PE). Clearly, an SCNN with 4 PEs can better sustain the effects of the global barriers than an SCNN with 64 PEs. However, the 4 PE configuration is also more likely to suffer from intra-PE fragmentation because each PE must now process a larger working set to fully utilize the math units. When evaluated on GoogLeNet, SCNN with 64 PEs achieves an 11% speedup than the one with 4 PEs as it does a better job utilizing the math arrays (average 59% math utilization versus 35%). We observed similar trends for AlexNet and VGGNet, concluding that addressing intra-PE fragmentation is more critical than SCNN is at its most efficient when it can capture all of the activations in its IARAM and OARAM. For a network with large layers like VGGNet, there are two choices. First, the designer could choose to provision SCNN with IARAM and OARAM large enough to hold the largest layer. While this approach would make processing the large layers more efficient by avoiding off-chip DRAM accesses, smaller layers would be penalized by incurring larger on-chip access overheads to RAMs that are larger than necessary. The second choice is to employ a tiling approach as described in Section IV. Our results show that this is only required for 9 of the 72 total evaluated layers, and for these 9 layers the overall energy penalty for shuttling the activation data to and from DRAM ranges from 5–62%, with a mean of 18%. While the tiling approach is attractive, we expect that there will be low power deployment scenarios that will motivate the designers of the neural networks to size them so that they fit in the on-chip SRAM capacity provided by the accelerator implementation. 10 VII. R ELATED W ORK (PT-IS-CP-sparse) dataflow. This approach enables SCNN to use a novel Cartesian product-based computation architecture that maximizes reuse of weights and activations within a set of distributed processing elements. In addition, it allows the use of a dense compressed representation for both weights and activations to be used through almost the entire processing flow. This approach reduces data movement and ondie storage capacity relative to alternative architectures. Our results show that the SCNN architecture starts to beat a dense architecture in performance and energy efficiency when the weights and activations are each less than 85% dense. On three contemporary networks (AlexNet, GoogLeNet, and VGGNet) SCCN achieves performance improvements over the dense architecture by a factor of 2.7× while still being energyefficient by a factor of 2.3×. Previous efforts to exploit sparsity in CNN accelerators have focused on reducing energy or saving time, which will invariably also save energy. Eliminating the multiplication when an input operand is zero is a natural way to save energy. Eyeriss [7] gates the multiplier when it sees an input activation of zero. For non-pruned networks the sparsity of weights is a less significant factor, and Eyeriss opted not to gate the multiplier on zero weights. This approach will save energy, but not save cycles. SCNN also saves energy by eliminating all the unnecessary multiplications, but doesn’t even prepare to do a multiplication when any input operand is zero, thus saving time as well. Another approach to reducing energy is to reduce data transfer costs when the data is sparse. Eyeriss uses a run length encoding scheme when transferring activations to and from DRAM. This saves energy (and time) by reducing the number of DRAM accesses. However, after the data is loaded into the on-chip buffer the data is stored in expanded form. Thus, there is no savings on data transfers from one internal buffer to another internal buffer or to the multipliers. SCNN also uses a compressed representation for all data coming from DRAM, but also maintains that compressed representation in the on-die buffers. Another CNN accelerator designed to exploit sparsity, Cnvlutin [1] compresses activation values. However, it does not compress weights. Cambricon-X [30], does not compress the data coming from DRAM. Nor does it keep activations in a compressed form in the internal buffers, except in the queues directly delivering activations to the multipliers. CambriconX does keep only non-zero weights in the internal buffers. In contrast, SCNN keeps both weights and activations in a compressed form in both DRAM and internal buffers. This saves data transfer time and energy on all data transfers and allows the chip hold larger models for a given amount of internal storage. Not delivering zero activation values or zero weights to the multipliers can save time by avoiding cycles when the multiplier has nothing to do. Cnvlutin selects only non-zero activation values for delivery as multiplier operands, but does occupy a multiplier with zero weights. Cambricon-X does not deliver either zero activations or weights to the multipliers. SCNN also does not deliver either zero activations or weights to the multipliers. Finally, the EIE CNN accelerator [13] uses a compressed representation of both activations and weights, and only delivers non-zero operands to the multipliers. However, EIE is designed for the fully connected layers of a CNN model, while SCNN is targeting the convolutional layers where the majority of the computations are [9]. R EFERENCES [1] J. Albericio, P. Judd, T. Hetherington, T. Aamodt, N. E. Jerger, and A. Moshovos. Cnvlutin: Ineffectual-Neuron-Free Deep Convolutional Neural Network Computing. In Proceedings of the International Symposium on Computer Architecture (ISCA), pages 1–13, June 2016. [2] D. Amodei, R. Anubhai, E. Battenberg, C. Case, J. Casper, B. Catanzaro, J. Chen, M. Chrzanowski, A. Coates, G. Diamos, E. Elsen, J. Engel, L. Fan, C. Fougner, T. Han, A. Hannun, B. Jun, P. LeGresley, L. Lin, S. Narang, A. Ng, S. Ozair, R. Prenger, J. Raiman, S. Satheesh, D. Seetapun, S. Sengupta, Y. Wang, Z. Wang, C. Wang, B. Xiao, D. Yogatama, J. Zhan, and Z. Zhu. Deep Speech 2: End-To-End Speech Recognition in English and Mandarin. https://arxiv.org/abs/1512.02595, 2015. [3] Caffe. http://caffe.berkeleyvision.org, 2016. [4] Caffe Model Zoo. https://github.com/BVLC/caffe/wiki/Model-Zoo, 2017. [5] T. Chen, Z. Du, N. Sun, J. Wang, C. Wu, Y. Chen, and O. Temam. DianNao: A Small-footprint High-throughput Accelerator for Ubiquitous Machine-learning. In Proceedings of the International Conference on Architectural Support for Programming Languages and Operation Systems (ASPLOS), pages 269–284, March 2014. [6] Y.-H. Chen, J. Emer, and V. Sze. Eyeriss: A Spatial Architecture for Energy-Efficient Dataflow for Convolutional Neural Networks. In Proceedings of the International Symposium on Computer Architecture (ISCA), pages 367–379, June 2016. [7] Y.-H. Chen, T. Krishna, J. Emer, and V. Sze. Eyeriss: An Energy-efficient Reconfigurable Accelerator for Deep Convolutional Neural Networks. In Proceedings of the International Solid State Circuits Conference (ISSCC), February 2016. [8] R. Collobert, J. Weston, L. Bottou, M. Karlen, K. Kavukcuoglu, and P. Kuksa. Natural Language Processing (Almost) From Scratch. https: //arxiv.org/abs/1103.0398, 2011. [9] J. Cong and B. Xiao. Minimizing Computation in Convolutional Neural Networks. In Proceedings of the International Conference on Artificial Neural Networks (ICANN), pages 281–290, September 2014. [10] G. Diamos, S. Sengupta, B. Catanzaro, M. Chrzanowski, A. Coates, E. Elsen, J. Engel, A. Hannun, and S. Satheesh. Persistent RNNs: Stashing Recurrent Weights On-Chip. In Proceedings of the International Conference on Machine Learning (ICML), June 2016. [11] Z. Du, R. Fasthuber, T. Chen, P. Ienne, L. Li, T. Luo, X. Feng, Y. Chen, and O. Temam. ShiDianNao: Shifting Vision Processing Closer to the Sensor. In Proceedings of the International Symposium on Computer Architecture (ISCA), pages 92–104, June 2015. [12] A. Graves and J. Schmidhuber. Framewise Phoneme Classification With Bidirectional LSTM and Other Neural Network Architectures. In Neural Networks, 2005. [13] S. Han, X. Liu, H. Mao, J. Pu, A. Pedram, M. Horowitz, and B. Dally. EIE: Efficient Inference Engine on Compressed Deep Neural Network. In Proceedings of the International Symposium on Computer Architecture (ISCA), pages 243–254, June 2016. [14] S. Han, H. Mao, and W. J. Dally. Deep Compression: Compressing Deep Neural Networks with Pruning, Trained Quantization and Huffman Coding. https://arxiv.org/abs/1510.00149, 2015. VIII. C ONCLUSION This paper presents the Sparse CNN (SCNN) accelerator architecture for inference in convolutional neural networks. SCNN exploits sparsity in both weights and activations using the PlanarTiled-InputStationary-CartesianProduct-sparse 11 [15] S. Han, J. Pool, J. Tran, and W. J. Dally. Learning Both Weights and Connections for Efficient Neural Networks. In Proceedings of the International Conference on Neural Information Processing Systems (NIPS), pages 1135–1143, December 2015. [16] A. Hannun, C. Case, J. Casper, B. Catanzaro, G. Diamos, E. Elsen, R. Prenger, S. Satheesh, S. Sengupta, A. Coates, and A. Y. Ng. Deep Speech: Scaling Up End-To-End Speech Recognition. https://arxiv.org/ abs/1412.5567, 2014. [17] K. He, X. Zhang, S. Ren, and J. Sun. Deep Residual Learning for Image Recognition. https://arxiv.org/abs/1512.03385, 2015. [18] G. Huang, Y. Sun, Z. Liu, D. Sedra, and K. Weinberger. Deep Networks with Stochastic Depth. https://arxiv.org/abs/1603.09382, 2016. [19] ImageNet. http://image-net.org, 2016. [20] A. Krizhevsky, I. Sutskever, and G. E. Hinton. ImageNet Classification with Deep Convolutional Neural Networks. In Proceedings of the International Conference on Neural Information Processing Systems (NIPS), December 2012. [21] Y. LeCun, Y. Bengio, and G. Hinton. Deep Learning. Nature, 521:436– 444, May 2015. [22] G. Martin and G. Smith. High-Level Synthesis: Past, Present, and Future. IEEE Design & Test of Computers, 26(4):18–25, July/August 2009. [23] Catapult High-Level Synthesis. https://www.mentor.com/hls-lp/catapulthigh-level-synthesis, 2017. [24] NVIDIA cuDNN. https://developer.nvidia.com/cudnn, 2016. [25] B. Reagen, P. Whatmough, R. Adolf, S. Rama, H. Lee, S. Lee, J. M. H. Lobato, G.-Y. Wei, and D. Brooks. Minerva: Enabling Low-Power, HighAccuracy Deep Neural Network Accelerators. In Proceedings of the International Symposium on Computer Architecture (ISCA), pages 267– 278, June 2016. [26] M. Rhu, N. Gimelshein, J. Clemons, A. Zulfiqar, and S. W. Keckler. vDNN: Virtualized Deep Neural Networks for Scalable, MemoryEfficient Neural Network Design. In Proceedings of the International Symposium on Microarchitecture (MICRO), October 2016. [27] K. Simonyan and A. Zisserman. Very Deep Convolutional Networks for Large-Scale Image Recognition. https://arxiv.org/abs/1409.1556, May 2015. [28] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going Deeper with Convolutions. In Proceedings of the Conference on Computer Vision and Pattern Recognition (CVPR), June 2015. [29] Wired. Microsoft Neural Net Shows Deep Learning Can Get Way Deeper, 2016. [30] S. Zhang, Z. Du, L. Zhang, H. Lan, S. Liu, L. Li, Q. Guo, T. Chen, and Y. Chen. Cambricon-X: An Accelerator for Sparse Neural Networks. In Proceedings of the International Symposium on Microarchitecture (MICRO), October 2016. 12
9cs.NE
arXiv:1508.07119v1 [math.AC] 28 Aug 2015 BI-COHEN-MACAULAY GRAPHS JÜRGEN HERZOG AND AHAD RAHIMI Abstract. In this paper we consider bi-Cohen-Macaulay graphs, and give a complete classification of such graphs in the case they are bipartite or chordal. General bi-Cohen-Macaulay graphs are classified up to separation. The inseparable bi-Cohen-Macaulay graphs are determined. We establish a bijection between the set of all trees and the set of inseparable bi-Cohen-Macaulay graphs. Introduction A simplicial complex ∆ is called bi-Cohen-Macaulay (bi-CM), if ∆ and its Alexander dual ∆∨ are Cohen-Macaulay. This concept was introduced by Fløystad and Vatne in [8]. In that paper the authors associated to each simplicial complex ∆ in a natural way a complex of coherent sheaves and showed that this complex reduces to a coherent sheaf if and only if ∆ is bi-CM. The present paper is an attempt to classify all bi-CM graphs. Given a field K and a simple graph on the vertex set [n] = {1, 2, . . . , n}, one associates with G the edge ideal IG of G, whose generators are the monomials xi xj with {i, j} an edge of G. We say that G is bi-CM if the simplicial complex whose Stanley-Reisner ideal coincides with IG is bi-CM. Actually, this simplicial complex is the so-called independence complex of G. Its faces are the independent sets of G, that is, subsets D of [n] with {i, j} 6⊂ D for all edges {i, j} of G. By its very definition, any bi-CM graph is also a Cohen-Macaulay graph (CM graph). A complete classification of all CM graphs is hopeless if not impossible. However, such a classification is given for bipartite graphs [10, Theorem 3.4] and for chordal graphs [11]. We refer the reader to the books [9] and [14] for a good survey on edge ideals and its algebraic and homological properties. Based on the classification of bipartite and chordal CM graphs, we provide in Section 2 a classification of bipartite and chordal bi-CM graphs, see Theorem 2.1 and Theorem 2.2. In Section 1 we first present various characterizations of bi-CM graphs. By using the Eagon-Reiner theorem [5], one notices that the graph G is bi-CM if and only if it is CM and IG has a linear resolution. Cohen-Macaulay ideals generated in degree 2 with linear resolution are of very special nature. They all arise as deformations of the square of the maximal ideal of a suitable polynomial 2010 Mathematics Subject Classification. 05E40, 13C14. Key words and phrases. Bi-Cohen–Macaulay, Bipartite and chordal graphs, Generic graphs, Inseparability. This paper was written during the visit of the second author at Universität Duisburg-Essen, Campus Essen. He is grateful for its hospitality. 1 ring. From this fact arise constraints on the number of edges of the graph and on the Betti numbers of IG . Though a complete classification of all bi-CM graphs seems to be again impossible, a classification of all bi-CM graphs up to separation can be given, and this is the subject of the remaining sections. A separation of the graph G with respect to the vertex i is a graph G′ whose vertex set is [n] ∪ {i′ } having the property that G is obtained from G′ by identifying i with i′ and such that xi − xi′ is a non-zerodivisor modulo IG′ . The algebraic condition on separation makes sure that the essential algebraic and homological invariants of IG and IG′ are the same. In particular, G is bi-CM if and only if G′ is bi-CM. A graph which does not allow any separation is called inseparable, and a inseparable graph which is obtained by a finite number of separation steps from G is called a separable model of G. Any graph admits separable models and the number of separable models of a graph is finite. Separable and inseparable graphs from the view point of deformation theory have been studied in [1]. In Section 4 we determine all inseparable bi-CM graphs on [n] vertices. Indeed, in Theorem 4.4 it is shown that for any tree T on the vertex set [n] there exists a unique inseparable bi-CM graph GT determined by T , and any inseparable bi-CM graph is of this form. Furthermore, if G is an arbitrary bi-CM graph and T is the relation graph of the Alexander dual of IG , then GT is a separable model of G. For a bi-CM graph G, the Alexander dual J = (IG )∨ of IG is a Cohen-Macaulay ideal of codimension 2 with linear resolution. As described in [3], one attaches to any relation matrix of J a relation tree T . Replacing the entries in this matrix by distinct variables with the same sign, one obtains the so-called generic relation matrix whose ideals of 2-minors JT and its Alexander has been computed in [13]. This theory is described in Section 3. The Alexander dual of JT is the edge ideal of graph, which actually is the graph GT mentioned before and which serves as a separable model of G. 1. Preliminaries and various characterizations of Bi-Cohen-Macaulay graphs In this section we recall some of the standard notions of graph theory which are relevant for this paper, introduce the bi-CM graphs and present various equivalent conditions of a graph to be bi-CM. The graphs considered here will all be finite, simple graphs, that is, they will have no double edges and no loops. Furthermore we assume that G has no isolated vertices. The vertex set of G will be denoted V (G) and will be the set [n] = {1, 2, . . . , n}, unless otherwise stated. The set of edges of G we denote by E(G). A subset F ⊂ [n] is called a clique of G, if {i, j} ∈ E(G) for all i, j ∈ F with i 6= j. The set of all cliques of G is a simplicial complex, denoted ∆(G). A subset C ⊂ [n] is called a vertex cover of G if C ∩ {i, j} = 6 ∅ for all edges {i, j} of G. The graph G is called unmixed if all minimal vertex covers of G have the same cardinality. This concept has an algebraic counterpart. We fix a field K and consider the ideal IG ⊂ S = K[x1 , . . . , xn ] which is generated by all monomials xi xj 2 with {i, j} ∈ E(G). The ideal IG is called the edge ideal of G. Let C ⊂ [n]. Then the monomial prime ideal PC = ({xi : i ∈ C}) is a minimal prime ideal of IG if and only if C is a minimal vertex cover of G. Thus G is unmixed if and only if IG is unmixed in the algebraic sense. A subset D ⊂ [n] is called an independent set of G if D contains no set {i, j} which is an edge of G. Note that D is an independent set of G if and only if [n] \ D is a vertex cover. Thus the minimal vertex covers of G correspond to the maximal independent sets of G. The cardinality of a maximal independent is called the independence number of G. It follows that the Krull dimension of S/IG is equal to c, where c is the independence number of G. The graph G is called bipartite if V (G) is the disjoint union of V1 and V2 such that V1 and V2 are independent sets, and G is called disconnected if V (G) is the disjoint union of W1 and W2 and there is no edge {i, j} of G with i ∈ W1 and j ∈ W2 . The graph G is called connected if it is not disconnected. A cycle C (of length r) in G is a sequence of edges {ik , jk } with k = 1, 2, . . . , r such that jk = ik+1 for k = 1, . . . , r − 1 and jr = i1 . A cord of C is an edge {i, j} of G with i, j ∈ {i1 , . . . , ir } and {i, j} is not an edge of C. The graph G is called chordal if each cycle of G of length ≥ 4 has a chord. A graph which has no cycle and which is connected is called a tree. Now we recall the main concept we are dealing with in this paper. Let I ⊂ S be T a squarefree monomial ideal. Then I = m j=1 Pj where each of the Pj is a monomial ∨ prime ideal of I. The ideal I which is minimally generated by the monomials Q uj = xi ∈Pj xi is called the Alexander dual of I. One has (I ∨ )∨ = I. In the case that I = IG , each Pj is generated by the variables corresponding to a minimal vertex cover of G. Therefore, (IG )∨ is also called the vertex cover ideal of G. According to [8] a squarefree monomial ideal I ⊂ S is called bi-Cohen-Macaulay (or simply bi-CM) if I as well as the Alexander dual I ∨ of I is a Cohen-Macaulay ideal. A graph G is called Cohen-Macaulay or bi-Cohen-Macaulay (over K) (CM or bi-CM for short), if IG is CM or bi-CM. One important result regarding the Alexander dual that will be used frequently in this paper is the Eagon-Reiner theorem which says that I is a Cohen-Macaulay ideal if and only if I ∨ has a linear resolution. Thus the Eagon-Reiner theorem implies that I is bi-CM if and only if I is a Cohen-Macaulay ideal with linear resolution. From this description it follows that a bi-CM graph is connected. Indeed, if this is not the case, then there are induced subgraphs G1 , G2 ⊂ G such that V (G) is the disjoint union of V (G1 ) and V (G2 ). It follows that IG = IG1 + IG2 , and the ideals IG1 and IG2 are ideals in a different set of variables. Therefore, the free resolution of S/IG is obtained as the tensor product of the resolutions of S/IG1 and S/IG2 . This implies that IG has relations of degree 4, so that IG does not have a linear resolution. From now on we will always assume that G is connected, without further mentioning it. Proposition 1.1. Let K be an infinite field and G a graph on the vertex set [n] with independence number c. The following conditions are equivalent: (a) G is a bi-CM graph over K; 3 (b) G is a CM graph over K, and S/IG modulo a maximal regular sequence of linear forms is isomorphic to T /m2T where T is the polynomial ring over K in n − c variables and mT is the graded maximal ideal of T . Proof. We only need to show that IG has a linear resolution if and only if condition (b) holds. Since K is infinite and since S/IG is Cohen-Macaulay of dimension c, there exists a regular sequence x of linear forms on S/IG of length c. Let T = S/(x). Then T is isomorphic to a polynomial ring in n − c variables. Let J be the image of IG in T . Then J is generated in degree 2 and has a linear resolution if and only if IG has linear resolution. Moreover, J is mT -primary. The only mT -primary ideals with linear resolution are the powers of mT . Thus, IG has a linear resolution if and only if J = m2T .  Corollary 1.2. Let G be a graph on the vertex set [n] with independence number c. The following conditions are equivalent: (a) G is a bi-CM graph over K;   (b) G is a CM graph over K and |E(G)| = n−c+1 ; 2 (c) G is a CM graph over K and the number of minimal vertex covers of G is equal to n − c +1;  (d) βi (IG ) = (i + 1) n−c+1 for i = 0, . . . , n − c − 1. i+2 Proof. For the proof of the equivalent conditions we may assume that K is infinite and hence we may use Proposition 1.1. 2 (a) ⇐⇒ (b): With the notation of Proposition  1.1 we have J = mT if and only n−c+1 if the number of generators of J is equal to . Since IG and J have the same 2 number of generators and since the number of generators of IG is equal to |E(G)|, the assertion follows. (b) ⇐⇒ (c): Since S/IG is Cohen-Macaulay, the multiplicity of S/IG is equal to the length ℓ(T /J) of T /J. On the other hand, the multiplicity is also the number of minimal prime ideals of IG which coincides with the number of minimal vertex covers of G. Thus the length of T /J is equal to the number of minimal vertex covers of G. Since J = m2T if and only if ℓ(T /J) = n − c + 1, the assertion follows. (a) ⇒ (d): Note that βi (IG ) = βi (J) for all i. Since J is isomorphic to the ideal of 2-minors of the matrix ! y1 y2 . . . yn−c 0 0 y1 . . . yn−c−1 yn−c in the variables y1 , . . . , yn−c , the Eagon-Northcott complex ([4], [6]) provides a free resolution of J and the desired result follows. (d) ⇒ (a): It follows from the description of the Betti numbers of IG that proj dim S/IG = n − c. Thus, depth S/IG = c. Since dimS/IG = c, it follows that IG is a Cohen-Macaulay ideal. Since |E(G)| = β0 (IG ) = n−c+1 , condition (b) 2 is satisfied, and hence G is bi-CM, as desired.  Finally we note that G is a bi-CM graph over K if and only if the vertex cover ideal of G is a codimension 2 Cohen-Macaulay ideal with linear relations. Indeed, let JG 4 be the vertex cover ideal of G. Since JG = (IG )∨ , it follows from the Eagon-Reiner theorem JG is bi-CM if and only if IG is bi-CM. 2. The classification of bipartite and chordal bi-CM graphs In this section we give a full classification of the bipartite and chordal bi-CM graphs. Theorem 2.1. Let G be a bipartite graph on the vertex set V with bipartition V = V1 ∪ V2 where V1 = {v1 , . . . , vn } and V2 = {w1 , . . . , wm }. Then the following conditions are equivalent: (a) G is a bi-CM graph; (b) n = m and E(G) = {{vi , wj } : 1 ≤ i ≤ j ≤ n}. Proof. (a) ⇒ (b): Since G is a bi-CM graph, it is in particular a CM-graph, and so n = m, and by [9, Theorem 9.1.13] there exists a poset P = {p1 , . . . , pn } such that G = G(P ). Here G(P ) is the bipartite graph on V = {v1 , . . . , vn , w1, . . . , wn } whose edges are those 2-element subset {vi , wj } of V such that pi ≤ pj . Thus IG = IG(P ) = HP∨ , where \ HP = (xi , yj ) pi ≤pj is an ideal of S = K[{xi , yi}pi ∈P ], the polynomial ring in 2n variables over K. Since G is bi-CM, it follows that HP is Cohen–Macaulay, and hence proj dim S/HP = 2n − depth S/HP = 2n − dim S/HP = height HP = 2. Thus proj dim HP = 1, and hence, by [10, Corollary 2.2], the Sperner number of P , i.e., the maximum of the cardinalities of antichains of P equals 1. This implies that P is a chain, and this yields (b). (b) ⇒ (a): The graph G described in (b) is of the form G = G(P ) where P is a chain. By what is said in (a) ⇒ (b), it follows that G is bi-CM.  The following picture shows a bi-CM bipartite graph for n = 4. x1 • x2 • x3 • x4 • • y1 • y2 • y3 • y4 Figure 1. A bi-CM bipartite graph. Theorem 2.2. Let G be a chordal graph on the vertex set [n]. The following conditions are equivalent: (a) G is a bi-CM graph; 5 (b) Let F1 , . . . , Fm be the facets of the clique complex of G. Then m = 1, or m > 1 and (i) V (G) = V (F1 ) ∪ V (F2 ) ∪ . . . ∪ V (Fm ), and this union is disjoint; (ii) each Fi has exactly one free vertex ji ; (iii) the restriction of G to [n] \ {j1 , . . . , jm } is a clique. Proof. Let In,d be the ideal generated by all squarefree monomials of degree d in ∨ S = K[x1 , . . . , xn ]. It is known (and easy to prove) that In,d = In,n−d+1 , and that all these ideals are Cohen-Macaulay, and hence all bi-CM. If m = 1, then IG = In,2 and the result follows. Now let m > 1. A bi-CM graph is a CM graph. The CM chordal graphs have been classified in [11]: they are the chordal graphs satisfying (b)(i). Thus for the proof of the theorem we may assume that (b)(i) holds and simply have to show that (b)(ii) and (b)(iii) are satisfied if and only if IG has a linear resolution. Let Pi be the monomial prime ideal generated by the variables xk with k ∈ V (Fi ) \ {ji }, and let G′ be subgraph of G whose edges do not belong to any Fi . It is shown in the proof of [11, Corollary 2.1] that there exists a regular sequence on S/IG such that after reduction modulo this sequence one obtains the ideal J ⊂ T where T is the polynomial ring on the variables xk with k 6= ji for i = 1, . . . , m and where (1) J = (P12 , . . . , Pm2 , IG′ ). By Proposition 1.1, it follows that IG has a linear resolution if and only if J = m2T , where mT denotes the graded maximal ideal of T . So, now suppose first that IG has a linear resolution, and hence J = m2T . Suppose that some Fi has more than one free vertex, say Fi has the vertex k with k 6= ji . Choose any Ft different from Fi and let l ∈ Fj with l 6= jt . Then xk and xl belong to T but xk xl 6∈ J as can be seen from (1). This is a contradiction. Thus (b)(ii) follows. Suppose next that the graph G′′ which is the restriction of G to [n] \ {j1 , . . . , jm } is not a clique. Then there exist i, j ∈ V (G′′ ) such that {i, j} 6∈ E(G′′ ). However, since all xk with k ∈ V (G′′ ) belong to T and since J = m2T , it follows xi xj ∈ J. Thus, by (1), xi xj ∈ Pk2 for some k or xi xj ∈ IG′ . Since (b)(ii) holds, this implies in both cases that {i, j} ∈ E(G′′ ), a contradiction. Thus (b)(iii) follows. Conversely, suppose (b)(ii) and (b)(iii) hold. We want to show that J = m2T . Let xi , xj ∈ T . We have to show that xi xj ∈ J. It follows from the description of J that x2k ∈ J for all xk ∈ T . Thus we may assume that i 6= j. If {i, j} is not an edge of any Fk , then by definition it is an edge of G′ , and hence xi xj ∈ IG′ ⊂ J. On the other hand, if {i, j} is an edge of Fk for some k, then i, j 6= ik , and hence xi xj ∈ Pk2 ⊂ J. Thus the desired conclusion follows.  Let G be a chordal bi-CM graph as in Theorem 2.2(b) with m > 1. We call the complete graph G′′ which is the restriction of G to [n] \ {j1 , . . . , jm } the center of G. The following picture shows, up to isomorphism, all bi-CM chordal graphs whose center is the complete graph K4 on 4 vertices: 6 • • • • • • • • • • • • • • • • • • • • • • • • • • • Figure 2. 3. Generic Bi-CM graphs As we have already seen in the first section, the Alexander dual J = IG∨ of the edge ideal of a bi-CM graph G is a Cohen–Macaulay ideal of codimension 2 with linear resolution. The ideal J may have several distinct relation matrices with respect to the unique minimal monomial set of generators of J. As shown in [3], one may attach to each of the relation matrices of J a tree as follows: let u1 , . . . , um be the unique minimal set of generators of J. Let A be one of the relation matrices of J. Because J has a linear resolution, the generating relations of J may be chosen all of the form xk ui − xl uj = 0. This implies that in each row of the (m − 1) × m-relation matrix A there are exactly two non-zero entries (which are variables with different signs). We call such relations, relations of binomial type. Example 3.1. Consider the bi-CM graph G on the vertex set [5] and edges {1, 2} {2, 3}, {3, 1}, {2, 4}, {3, 4}, {4, 5} as displayed in Figure 3. x2 • x1 • x4 • x5 • • x3 Figure 3. The ideal J = IG∨ is generated by u1 = x2 x3 x4 , u2 = x1 x3 x4 , u3 = x2 x3 x5 and u4 = x1 x2 x4 . The relation matrices with respect to u1 , u2, u3 and u4 are the matrices and     x1 −x2 0 0  0 −x4 0  A1 = x5 , x1 0 0 −x3 x1 −x2 0 0  0 −x4 0  A2 = x5 . 0 x2 0 −x3 7 Coming back to the general case, one assigns to the relation matrix A the following graph Γ: the vertex set of Γ is the set V (Γ) = {1, 2, . . . , m}, and {i, j} is said to be an edge of Γ if and only if some row of A has non-zero entries for the ith- and jth-component. It is remarked in [3] and easy to see that Γ is a tree. This tree is in general not uniquely determined by G. In our Example 3.1 the relation tree of A1 is x3 • • x4 • x1 • x2 Figure 4. while the relation tree of A2 is • x3 • x1 • x2 • x4 Figure 5. Now let J be any codimension 2 Cohen-Macaulay monomial ideal with linear resolution. Then, as observed in Section 1, J ∨ = IG where G is a bi-CM graph. Now we follow Naeem [13] and define for any given tree T on the vertex set [m] = {1, . . . , m} with edges e1 , . . . , em−1 the (m − 1) × m-matrix AT whose entries akl are defined as follows: we assign to the kth edge ek = {i, j} of T with i < j the kth row of AT by setting (2)    xij , akl = −xji ,   0, if l = i, if l = j, otherwise. The matrix AT is called the generic matrix attached to the tree T . By the Hilbert-Burch theorem [2], the matrix AT is the relation matrix of the ideal JT of maximal minors of AT , and JT is a Cohen-Macaulay ideal of codimension 2 with linear resolution. We let GT be the graph such that IGT = J ∨ , and call GT the generic bi-CM graph attached to T . Our discussion so far yields Proposition 3.2. For any tree T , the graph GT is bi-CM. 8 In order to describe the vertices and edges of GT , let i and j be any two vertices of the tree T . There exists a unique path P : i = i0 , i1 , . . . , ir = j from i to j. We set b(i, j) = i1 and call b(i, j) the begin of P , and set e(i, j) = ir−1 and call e(i, j) the end of P . It follows from [13, Proposition 1.4] that IGT is generated by the monomials xib(i,j) xje(i,j). Thus the vertex set of the graph GT is given as V (GT ) = {(i, j), (j, i) : {i, j} is an edge of T }. In particular, {(i, k), (j, l)} is an edge of GT if and only if there exists a path P from i to j such that k = b(i, j) and l = e(i, j). In Example 3.1, let T1 and T2 be the relation trees of A1 and A2 , respectively. Then the generic matrices corresponding to these trees are     x12 −x21 0 0   x 0 −x 0 B1 =  13 , 31 x14 0 0 −x41 and x12 −x21 0 0  0 −x31 0  B2 = x13 . 0 x24 0 −x42 The generic graphs corresponding to the trees T1 and T2 are displayed in Figure 6. • x12 x21 • • x21 x14 • • x31 • x13 • x41 x31 • x12 • • x13 • x42 GT2 GT1 Figure 6. It follows from this description  that  GT has 2(m − 1) vertices. Since GT is bi-CM, n−c+1 the number of edges of GT is , see Corollary 1.2. Here n − c is the degree of 2   the generators of IG∨ which is m − 1. Hence GT has m2 edges. Among the edges of GT are in particular the m − 1 edges {(i, j), (j, i)} where {i, j} is an edge of T . Proposition 3.3. Let A be the relation matrix of a codimension 2 Cohen-Macaulay monomial ideal J with linear resolution, and assume that all the variables appearing in A are pairwise distinct. Let T be the relation tree of A. Then J is isomorphic to JT and J admits the unique relation tree, namely T . 9 Proof. Since all variables appearing in A are pairwise distinct, we may rename the variables appearing in a binomial type relation and call them as in the generic matrix xij and xji . Then A becomes AT and this shows that J ∼ = JT . To prove the uniqueness of the relation tree, we first notice that the shifts in the multigraded free resolution of J are uniquely determined and independent of the particular choice of the relation matrix A. A possibly different relation matrix A′ can arise from A only be row operations with rows of the same multidegree. Let r1 , . . . , rl by rows of A with the same multidegree corresponding to binomial type relations, and fix a column j. Then the non-zero jth columns of each of the ri must be the same, up to a sign. Since we assume that the variables appearing in A are pairwise distinct, it follows that l = 1. In particular, there is, up to the order of the rows, only one relation matrix with rows corresponding to binomial type relations. This shows that T is uniquely determined.  4. Inseparable models of Bi-CM graphs In order to state the main result of this paper we recall the concept of inseparability introduced by Fløystad et al in [7], see also [12]. Let S = K[x1 , . . . , xn ] be the polynomial ring over the field K and I ⊂ S a squarefree monomial ideal minimally generated by the monomials u1 , . . . , um . Let y be an indeterminate over S. A monomial ideal J ⊂ S[y] is called a separation of I for the variable xi if the following holds: (i) the ideal I is the image of J under the K-algebra homomorphism S[y] → S with y 7→ xi and xj 7→ xj for all j; (ii) xi as well as y divide some minimal generator of J; (iii) y − xi is a non-zero divisor of S[y]/J. The ideal I is called separable if it admits a separation, otherwise inseparable. If J is an ideal which is obtained from I by a finite number of separation steps, then we say that J specializes to I. If moreover, J is inseparable, then J is called an inseparable model of I. Each monomial ideal admits an inseparable model, but in general not only one. For example, the separable models of the powers of the graded maximal ideal of S have been considered by Lohne [12]. Forming the Alexander dual behaves well with respect to specialization and separation. Proposition 4.1. Let I ⊂ S be a squarefree monomial ideal. Then the following holds: (a) If J specializes to I, then J ∨ specializes to I ∨ . (b) The ideal I is separable if and only I ∨ is separable. Proof. (a) It follows from [7, Proposition 7.2] that if L ⊂ S[y] is a monomial ideal such that y−xi is a regular element on S[y]/L with (S[y]/L)/(y−xi)(S[y]/L) ∼ = S/I, ∨ ∨ ∨ ∼ then y −xi is a regular element on S[y]/L and (S[y]/L )/(y −xi )(S[y]/L ) = S/I ∨ . Repeated applications of this fact yields the desired result. (b) We may assume that the ideal L as in (a) is a separation of I with respect to xi . Since (a) holds, it remains to show that y as well as xi divides some generator 10 of L∨ . By assumption this is the case for L. Suppose that y does not divide any generator of L∨ . Then it follows from the definition of the Alexander dual that y also does not divide any generator of (L∨ )∨ . This is a contradiction, since L = (L∨ )∨ . Similarly it follows that xi divides some generator of L∨ .  We now apply these concepts to edge ideals. Let G be a graph on the vertex set [n]. We call G separable if IG is separable, and otherwise inseparable. Let J be a separation of IG for the variable xi . Then by the definition of separation, J is again an edge ideal, say J = IG′ where G′ is a graph with one more vertex than G. The graph G is obtained from G′ by identifying this new vertex with the vertex i of G. Algebraically, this identification amounts to say that S/IG ∼ = (S ′ /IG′ )/(y−xi )(S ′ /IG′ ), where S ′ = S[y] and y−xi is a non-zerodivisor of S ′ /IG′ . In particular, it follows that IG and IG′ have the same graded Betti-numbers. In other words, all important homological invariants of IG and IG′ are the same. It is therefore of interest to classify all inseparable graphs. An attempt for this classification is given in [1]. Example 4.2. Let G be the triangle and G′ be the line graph displayed in Figure 7. x3 • • x1 x3 • • x2 • x1 • x4 • x2 Figure 7. A triangle and its inseparable model Then IG′ = (x1 x2 , x1 x3 , x2 x4 ). Since Ass(IG′ ) = {(x1 , x2 ), (x1 , x4 ), (x2 , x3 )}, it follows that x3 − x4 is a non-zero divisor on S ′ /IG′ where S ′ = K[x1 , x2 , x3 , x4 ]. Moreover, (S ′ /IG′ )/(x3 − x4 )(S ′ /IG′ ) ∼ = S/IG . Therefore, the triangle in Figure 7 is obtained as a specialization from the line graph in Figure 7 by identifying the vertices x3 and x4 . We denote by G(i) the complementary graph of the restriction GN (i) of G to N(i) where N(i) = {j : {j, i} ∈ E(G)} is the neighborhood of i. In other words, V (G(i) ) = N(i) and E(G(i) ) = {{j, k} : j, k ∈ N(i) and {j, k} 6∈ E(G)}. Note that G(i) is disconnected if and only if N(i) = A ∪ B, where A, B 6= ∅, A ∩ B = ∅ and all vertices of A are adjacent to those of B. Here we will need the following result of [1, Theorem 3.1]. Theorem 4.3. The following conditions are equivalent: (a) The graph G is inseparable; (b) G(i) is connected for all i. Now we are ready to state our main result. 11 Theorem 4.4. (a) Let T be a tree. Then GT is an inseparable bi-CM graph. (b) For any inseparable bi-CM graph G, there exists a unique tree T such that G∼ = GT . (c) Let G be any bi-CM graph. Then there exists a tree T such that GT is an inseparable model of G. Proof. (a) By Corollary 3.2, GT is a bi-CM graph. In order to see that GT is inseparable we apply the criterion given in Theorem 4.3, and thus we have to prove that for each vertex (i, j) of GT and for each disjoint union N((i, j)) = A ∪ B of the neighborhood of (i, j) for which A 6= ∅ = 6 B, not all vertices of A are adjacent to those of B. As follows from the discussion in Section 3, N((i, j)) = {(k, l) : there exists a path from i to l, and j = b(i, l) and k = e(i, l)}. In particular, (j, i) ∈ N((i, j)). Let N((i, j)) = A ∪ B, as above. We may assume that (j, i) ∈ A. Since T is a tree, then there is no path from j to any l with (k, l) ∈ N((i, j)), because otherwise we would have a loop in T . This shows that (j, i) is connected to no vertex in B, as desired. (b) Let A be a relation matrix of J = IG∨ and T the relation tree of A. The nonzero entries of A are variables with sign ±1. Say the kth row of A has the non-zero entries akik and akjk with ik < jk . We may assume that the variable representing akik has a positive sign while that akjk has a negative sign, and that this is so for each row. We claim that the variables appearing in the non-zero entries of A are pairwise distinct. By Proposition 3.3 this then implies that T is the only relation tree of J and that G ∼ = GT . In order to prove the claim, we consider the generic matrix AT corresponding to T . Let S ′ be the polynomial ring over S in the variables xij and xji with {i, j} ∈ E(T ). For each k we consider the linear forms ℓk1 = xik jk − akik and ℓk2 = xjk ik − akjk . For example, for the matrix A2 in Example 3.1 the linear forms are ℓ11 = x12 − x1 , ℓ12 = x21 − x2 , ℓ21 = x13 − x5 , ℓ22 = x31 − x4 , ℓ31 = x24 − x2 and ℓ32 = x42 − x3 . We let ℓ be the sequence of linear form ℓ11 , ℓ12 , . . . , ℓm−1,1 , ℓm−1,2 in S ′ . Then (S ′ /JT S ′ )/(ℓ)(S ′/JT S ′ ) ∼ = S/J. Since both ideals, J as well as JT , are CohenMacaulay ideals of codimension 2, it follows that ℓ is a regular sequence on S ′ /JT S ′ . Thus, assuming the variables appearing in the non-zero entries of A are not all pairwise distinct, we see that J is separable. Indeed, suppose that the variable xk appears at least twice in the matrix. Then we replace only one of the xk by the corresponding generic variable xij to obtain the matrix A′ . Let J ′ be the ideal of maximal minors of A′ . It follows from the above discussions that xij −xk is a regular element of S[xij ]/J ′ . In order to see that J ′ is a separation of J it remains to be shown that xij as well as xk appear as factors of generators of J ′ . Note that J ′ is a specialization of JT . The minors of AT which are the generators of JT are the Q monomials m+1 i=1 xib(i,j) for j = 1, . . . , m + 1, see [13, Proposition 1.2]. From this i6=j description of the generators of JT it follows that all entries of AT appear as factors of generators of JT . Since J ′ is a specialization of JT , the same holds true for J ′ , and since xij as well as xk are entries of A′ , the desired conclusion follows. 12 Now since we know that J is separable, Proposition 4.1(b) implies that G is separable as well. This is a contradiction. (c) Let A be a relation matrix of J = IG∨ and T the corresponding relation tree. As shown in the proof of part (b), JT specializes to J, and hence IGT specializes to IG , by Proposition 4.1(a). By part (a), the graph GT is inseparable. Thus we conclude that GT is an inseparable model of G, as desired.  References [1] K. Altmann, M. Bigdeli, J. Herzog, D. Lu, Algebraically rigid simplicial complexes and graphs, arXiv: 1503.08080[math.AC]. [2] W. Bruns and J. Herzog, "Cohen–Macaulay rings" (Revised edition), Cambridge Studies in Advanced Mathematics 39, Cambridge University Press, 1998. [3] W. Bruns and J. Herzog, On multigraded resolutions, Math. Proc. Camb. Phil. Soc. 118 (1995), 245–257. [4] W. Bruns and U. Vetter, Determinantal rings, Springer Verlag, Graduate texts in Mathematics 150 (1995). [5] J. A. Eagon, V. Reiner, Resolutions of Stanley-Reisner rings and Alexander duality, J. Pure Appl. Algebra 130 (1998), 265-275. [6] D. Eisenbud, Commutative Algebra with a view to Algebraic geometry, Springer Verlag, 1995. [7] G. Fløystad, B. M. Greve, J. Herzog, Letterplace and co-letterplace ideals of posets, arXiv:1501.04523[math.AC]. [8] G. Fløystad, J. E. Vatne, (Bi-)Cohen–Macaulay simplicial complexes and their associated coherent sheaves, Comm. Algebra 33 (2005), 3121–3136. [9] J. Herzog and T. Hibi, Monomial Ideals. GTM 260. Springer 2010. [10] J. Herzog and T. Hibi, Distributive lattices, Bipartite graphs and Alexander duality, J. Algebraic Combin., 22(2005), 289–302. [11] J. Herzog and T. Hibi, X. Zheng, Cohen–Macaulay chordal graphs, J. Combin. Theory Ser. A, 113(2006), 911–916. [12] H. Lohne, The many polarizations of powers of maximal ideals, arXiv:1303.5780 (2013). [13] M. Naeem, Cohen–Macaulay monomial ideals of codimension 2, Manuscripta math, 127(2008), 533–545. [14] R. H. Villarreal, Monomial Algebras, Second Edition, Monographs and Research Notes in Mathematics, CRC Press, 2015. Jürgen Herzog, Fachbereich Mathematik, Universität Duisburg-Essen, Fakultät für Mathematik, 45117 Essen, Germany E-mail address: [email protected] Ahad Rahimi, Department of Mathematics, Razi University, Kermanshah, Iran E-mail address: [email protected] 13
0math.AC
arXiv:1702.02997v3 [math.GR] 28 Mar 2018 The Noether numbers and the Davenport constants of the groups of order less than 32 Kálmán Cziszter ∗ 1 , Mátyás Domokos †1 and István Szöllősi ‡2,1 1 MTA Rényi Institute, 1053 Budapest, Reáltanoda utca 13-15, Hungary 2 Faculty of Mathematics and Computer Science, Babeş-Bolyai University, str. M. Kogălniceanu, nr. 1, 400084, Cluj-Napoca, Romania Abstract The computation of the Noether numbers of all groups of order less than thirty-two is completed. It turns out that for these groups in nonmodular characteristic the Noether number is attained on a multiplicity free representation, it is strictly monotone on subgroups and factor groups, and it does not depend on the characteristic. Algorithms are developed and used to determine the small and large Davenport constants of these groups. For each of these groups the Noether number is greater than the small Davenport constant, whereas the first example of a group whose Noether number exceeds the large Davenport constant is found, answering partially a question posed by Geroldinger and Grynkiewicz. 2010 MSC: 13A50 (Primary) 20D60 (Secondary) Keywords: polynomial invariant, product-one sequence, degree bound, Noether number, Davenport constant 1 1.1 Introduction The Noether number Fix a base field F and a finite group G. Given a G-module V (i.e. a finite dimensional F-vector space V together with an action of G via linear transformations) there is an induced action of G on the symmetric tensor algebra S(V ) by F-algebra automorphisms. More concretely, S(V ) can be identified with the polynomial algebra F[x1 , . . . , xn ] where x1 , . . . , xn is a basis of V , on ∗ Email: [email protected] Partially supported by National Research, Development and Innovation Office, NKFIH grants PD113138, ERC HU 15 118286 and K115799. † Email: [email protected] Supported by National Research, Development and Innovation Office, NKFIH K 119934. ‡ Email: [email protected] Supported by ERC-AdG 321104 and GTC-31816 (Babeş-Bolyai University grant). 1 which G acts via linear substitutions of the variables. Noether [27] proved that the algebra S(V )G = {f ∈ S(V ) : g · f = f for all g ∈ G} of polynomial invariants is generated by finitely many homogeneous elements. Denote by β(S(V )G ) the minimal non-negative integer d such that S(V )G is generated by its homogeneous components of degree at most d. Here we refer to the standard grading on S(V ), so the variables xi all have degree one. The Noether number of G is β F (G) = sup{β(S(V )G ) : V is a G-module}. The following general facts are well known: ( =∞ when char(F) | |G| F β (G) ≤ |G| when char(F) ∤ |G|; (1) (see [29] for the case char(F) | |G|, [26] for the case char(F) = 0 and [14], [15] for the case 0 < char(F) ∤ |G|). From now on we assume that F is a fixed base field with char(F) ∤ |G|, and write β(G) := β F (G) by suppressing from the notation the dependence of the Noether number on F. It is well known that the Noether number is unchanged when we extend the base field (see Subsection 4.3 for more information), so we may assume in proofs that F is algebraically closed. The exact value of the Noether number is known only for a very limited class of groups. First of all, we have β(G) = D(G) for abelian G (2) where D(G) is the Davenport constant (the maximal length of an irreducible zero-sum sequence over G); this observation was used first in [30]. The exact value of D(G) is known among others for abelian p-groups and for abelian groups of rank at most two. Considering non-abelian groups, the Noether number of the dihedral groups was determined in [30] (and in [32] for non-modular positive characteristic) along with the Noether numbers of the quaternion group of order 8 and the alternating group A4 . Recent works of the first two authors of the present paper (see [7], [8], [4], [5], [10]) added a few more (series) of groups to this short list. These results indicated that a complete table of the Noether numbers of “small” groups might be within reach. It turned out that indeed, the reduction lemmas from [7] and considerations similar to the methods used in the above mentioned papers are sufficient to determine the Noether numbers for all groups of order less than 32. Note that the number of non-abelian groups of order 32 is 44. This explains our choice of limiting the scope of this paper to the groups of order less than 32. 1.2 The Davenport constants Equality (2) inspired Geroldinger and Grynkiewicz [18] to look for an analogue in the case of non-abelian groups. By a sequence over the finite group G we mean a finite sequence of elements from G which is unordered and repetition of terms is allowed. A sequence is product-one if the product of its elements in an 2 appropriate order is 1G . A sequence is product-one free if it has no product-one subsequences. The small Davenport constant d(G) was defined in [28] as the maximal length of a product-one free sequence. A sequence is considered as an element of the free abelian monoid F (G) and product-one sequences form a submonoid B(G) of F (G). The large Davenport constant D(G) was defined in [18] as the maximal length of an atom (irreducible element) in B(G). We have the inequality d(G) + 1 ≤ D(G) with equaliy for abelian G. The question whether β(G) is always between d(G)+ 1 and D(G) was raised in [18] (the possible relation between the Noether number and Davenport constants is discussed further in [10]). Using the implementation of our algorithms presented in Section 6 we completed the determination of d(G) and D(G) for groups of order less than 32. It turned out that d(G)+1 ≤ β(G) ≤ D(G) holds for these groups with the only exception being the Heisenberg group H27 of order 27, for which we have β(H27 ) > D(H27 ). 1.3 Outline of the paper In Section 2 we give a table containing the values of the Noether number and the Davenport constants for each non-abelian group of order less than 32. In Section 3 we provide references and proofs to verify the Noether numbers in the table. We draw consequences from the obtained data and state some open questions in Section 4. In particular, in non-modular characteristic for each group of order less than 32 the Noether number is attained on a multiplicity free representation (see Theorem 4.2), the Noether number is strictly monotone with respect to taking subgroups or factor groups (see Theorem 4.5, which is generalized to arbitrary finite groups in the subsequent paper [9]) and the Noether number does not depend on the characteristic (see Theorem 4.7). In Section 5 we turn to the Davenport constants. Notation and known results are recalled in Sections 5.1 and 5.2. In Section 5.3 we present a theoretical proof for the fact that D(H27 ) = 8; this seems to be of special interest because so far this is the only known example of a group for which the Noether number is greater than the large Davenport constant. Section 6 contains the description of the algorithms we employed to compute the Davenport constants given in the table in Section 2. 2 Noether numbers and Davenport constants The classification of all groups of order less than 32 is given e.g. in [24, Chapter 22]. In the table below we present the Noether numbers and Davenport constants of all the non-abelian groups of order less than 32. In the first column we also give for reference the GAP (see [16]) identification numbers (m, n) using which these groups can be constructed in GAP by the function call SmallGroup(m,n). 3 GAP G (6, 1) S3 = Dih6 Dih8 (8, 3) (8, 4) Q8 = Dic8 (10, 1) Dih10 Dic12 = C3 ⋊ C4 (12, 1) (12, 3) A4 (12, 4) Dih12 Dih14 (14, 1) (16, 3) (C2 × C2 ) ⋊ C4 = (C4 × C2 ) ⋊ψ C2 C4 ⋊ C4 (16, 4) (16, 6) M16 (16, 7) Dih16 SD16 (16, 8) (16, 9) Dic16 (16, 11) Dih8 × C2 = (C4 × C2 ) ⋊−1 C2 Q8 × C2 (16, 12) (16, 13) (P auli) = (C4 × C2 ) ⋊φ C2 (18, 1) Dih18 (18, 3) S3 × C3 (18, 4) (C3 × C3 ) ⋊−1 C2 Dic20 (20, 1) (20, 3) C5 ⋊ C4 (20, 4) Dih20 C7 ⋊ C3 (21, 1) (22, 1) Dih22 C3 ⋊ C8 (24, 1) (24, 3) SL2 (F3 ) = Ã4 Dic24 = C3 ⋊ Q8 (24, 4) (24, 5) Dih6 × C4 (24, 6) Dih24 Dic12 × C2 (24, 7) (24, 8) C3 ⋊ Dih8 = (C6 × C2 ) ⋊γ C2 (24, 10) Dih8 × C3 Q8 × C3 (24, 11) (24, 12) S4 (24, 13) A4 × C2 (24, 14) Dih12 × C2 = (C6 × C2 ) ⋊−1 C2 (26, 1) Dih26 H27 = U T3 (F3 ) (27, 3) (27, 4) M27 = C9 ⋊ C3 (28, 1) Dic28 = C7 ⋊ C4 Dih28 (28, 3) (30, 1) Dih6 × C5 Dih10 × C3 (30, 2) (30, 3) Dih30 d 3 4 4 5 6 4 6 7 5 6 8 8 8 8 5 5 5 9 7 5 10 7 10 8 11 12 7 12 12 12 8 7 12 12 6 7 7 13 6 10 14 14 15 15 15 β 4 5 6 6 8 6 7 8 6 7 9 9 9 10 6 7 7 10 8 6 12 8 11 9 12 13 12 14 13 13 9 9 13 13 9 8 8 14 9 11 16 15 16 16 16 D reference for β 6 [8, Theorem 10.3] 6 [8, Theorem 10.3] 6 [8, Theorem 10.3] 10 [8, Theorem 10.3] 9 [8, Theorem 10.3] 7 [7, Theorem 3.4] 9 [8, Theorem 10.3] 14 [8, Theorem 10.3] 7 Proposition 3.10 8 Proposition 3.1 10 [8, Theorem 10.3] 12 [8, Theorem 10.3] 12 [8, Theorem 10.3] 12 [8, Theorem 10.3] 7 [8, Corollary 5.5] 7 Proposition 3.2 7 [10, Example 5.4] 18 [8, Theorem 10.3] 10 Proposition 3.3 10 [8, Corollary 5.5] 15 [8, Theorem 10.3] 10 [7, Proposition 3.2] 15 [8, Theorem 10.3] 14 [7, Proposition 2.24] 22 [8, Theorem 10.3] 15 [8, Theorem 10.3] 13 [7, Corollary 3.6] 18 [8, Theorem 10.3] 15 [8, Theorem 10.3] 18 [8, Theorem 10.3] 11 Proposition 3.4 14 Proposition 3.5 14 [8, Theorem 10.3] 14 [8, Theorem 10.3] 12 [10, Example 5.3] 10 Proposition 3.8 10 [8, Corollary 5.5] 26 [8, Theorem 10.3] 8 [5, Corollary 15] 12 [8, Remark 10.4] 21 [8, Theorem 10.3] 21 [8, Theorem 10.3] 18 [8, Theorem 10.3] 20 [8, Theorem 10.3] 30 [8, Theorem 10.3] In this table S3 and S4 are the symmetric groups of degree 3 and 4, Q8 is the quaternion group of order 8, A4 is the alternating group of degree 4 and Ã4 4 is the binary tetrahedral group, H27 is the Heisenberg group of order 27 (i.e. the group of unitriangular 3 × 3 matrices over the 3-element field). For m ≥ 2, Dih2m is the dihedral group of order 2m, Dic4m is the dicyclic group given by generators and relations Dic4m := ha, b | a2m = 1, b 2 = am , bab−1 = a−1 i. Using for the semidirect product of two cyclic groups the notation Cm ⋊d Cn = ha, b | am = 1, bn = 1, bab−1 = ad i where d ∈ N is coprime to m we have that SD2k is the semidihedral group d = 2k−2 − 1 (k ≥ 4), SD2k = C2k−1 ⋊d C2 , and for a prime p and k ≥ 3, Mpk = Cpk−1 ⋊d Cp , d = pk−2 + 1. Moreover, the symbol ⋊ always stands for a semidirect product that is not a direct product. 3 Noether numbers 3.1 Abelian groups It has been long known that for an abelian group G we have d(G) + 1 = β(G) = D(G), see [10] for a recent survey largely motivated by this fact. Therefore we can restate known results on the Davenport constants of abelian groups in terms of the Noether number: • if G is cyclic then β(G) = |G| (see for example [30]); • if G is of rank two, i.e. G = Cn ×Cm for some m | n then β(G) = n+m−1 (see for example [19, Theorem 5.8.3]); Pr • if G is a p-group, i.e. G = Cpn1 × . . .× Cpnr then β(G) = 1 + i=1 (pni − 1) (see for example [19, Theorem 5.5.9]); • if G = C2 × C2 × C2n then D(G) = 2n + 2 by [13]. All abelian groups of order less than 32 fall under one of the four cases above. We note that more recent progress on the Davenport constants of abelian groups can be found in [1], [17, Corollary 4.2.13], [31], [2]. 3.2 Groups with a cyclic subgroup of index two Let G be a non-cyclic group having a cyclic subgroup of index two. According to [8, Theorem 10.3] we have ( 2 if G = Dic4m , m > 1; 1 (3) β(G) = |G| + 2 1 otherwise. Formula (3) yields the Noether number for 27 groups out of the 45 groups from the table in Section 2. 5 3.3 The generalized dihedral groups The semi-direct product Dih(A) := A ⋊−1 C2 , where A is an abelian group on which C2 acts by inversion, is called the generalized dihedral group obtained from A. According to [8, Corollary 5.5] we have β(Dih(A)) = D(A) + 1. (4) Combining this with the known values of Davenport constants given in Section 3.1 we can compute the Noether number of the three generalized dihedral groups of order less than 32 which are not themselves dihedral groups (these are (C4 ×C2 )⋊−1 C2 = Dih8 ×C2 , (C3 ×C3 )⋊−1 C2 , (C6 ×C2 )⋊−1 C2 = Dih12 ×C2 ). 3.4 Cases when the reduction lemmas give exact results The kth Noether number βk (S(V )G ) (where k is a positive integer) was defined k+1 in [7, Section 1.2] as the top degree of the factor space S(V )G /(S(V )G , +) G where S(V )+ stands for the sum of the positive degree homogeneous components of S(V )G . The supremum of βk (S(V ))G as V ranges over all G-modules over F is denoted by βk (G) (for an abelian group G, βk (G) equals the kth Davenport constant Dk (G) introduced in [22]). In the special case k = 1 we have β1 (S(V )G ) = β(S(V )G ) and hence β1 (G) = β(G). Using the kth Noether number one can get upper bounds on β(G) by the following reduction lemma: β(G) ≤ ββ(G/N ) (N ) for N ⊳ G by [7, Lemma 1.4]. (5) Lower bounds on β(G) can be derived from the following inequality: β(G) ≥ β(G/N ) + β(N ) − 1 if G/N is abelian by [8, Theorem 4.3]. (6) These results already suffice to establish the precise value of the Noether number for several groups considered below when we combine them with the following formula for the kth Noether number: βk (Cn × Cm ) = nk + m − 1 for m | n by [22, Proposition 5]. (7) Proposition 3.1. β(C4 ⋊ C4 ) = 7. Proof. We have the lower bound β(C4 ⋊ C4 ) ≥ 2β(C4 ) − 1 = 7 by (6). On the other hand G = C4 ⋊ C4 contains a normal subgroup isomorphic to the Klein four-group K4 = C2 × C2 such that G/K4 ∼ = K4 . Hence by (5) and (7) we have β(G) ≤ ββ(K4 ) (K4 ) = 7. Proposition 3.2. β(Q8 × C2 ) = 7. Proof. We have the lower bound β(Q8 × C2 ) ≥ β(Q8 ) + β(C2 ) − 1 = 7 by (6) since β(Q8 ) = 6 by [30, Lemma 10.1]. On the other hand G has a normal subgroup K4 such that G/K4 ∼ = K4 . Hence again β(G) ≤ ββ(K4 ) (K4 ) = 7 by (5) and (7). Proposition 3.3. β(S3 × C3 ) = 8. Proof. We have β(S3 × C3 ) = β(C3 ⋊−1 C6 ) ≥ β(C3 ) + β(C6 ) − 1 = 8 by (6) and the upper bound β(S3 × C3 ) ≤ β2 (C3 × C3 ) = 8 by (5) and (7). 6 Proposition 3.4. β(Dic12 × C2 ) = 9. Proof. We have β(Dic12 ×C2 ) ≥ β(Dic12 )+β(C2 )−1 = 8+2−1 = 9 by (6) and (3). On the other hand the center of the group G = Dic12 × C2 is isomorphic to the Klein four-group K4 = C2 × C2 and we have G/K4 ∼ = Dih6 . So we get β(G) ≤ ββ(Dih6 ) (K4 ) = β4 (K4 ) = 2 · 4 + 1 = 9 by (3), (5) and (7). Proposition 3.5. β(C3 ⋊ Dih8 ) = 9. Proof. The group G has an index two subgroup N ∼ = C3 ⋊ C4 = Dic12 . By (3) we have β(N ) = 12 |N | + 2 = 8, implying by (6) that β(G) ≥ 8 + 2 − 1 = 9. For the reverse inequality observe that the kernel of the action of Dih8 on C3 is isomorphic to the Klein group K4 = C2 × C2 . So the subgroup K4 ≤ Dih8 is normal in G and as Dih8 /K4 ∼ = = C2 acts by inversion on C3 we have G/K4 ∼ Dih6 . Therefore β(G) ≤ ββ(Dih6 ) (K4 ) = β4 (K4 ) = 2 · 4 + 1 = 9 by (3), (5) and (7). Example 3.6. For later reference let us construct here a representation of G = C3 ⋊ Dih8 (where the kernel of the conjugation action of Dih8 on C3 is isomorphic to C2 × C2 ) on which the Noether number is attained. Consider the two-dimensional G-module U = F2 on which the representation is given by the matrices       0 1 −1 0 ζ 0 a= , b= , c= 1 0 0 1 0 ζ2 where ζ is a primitive third root of unity. Here ha, bi ∼ = Dih8 , ca = c−1 and cb = c, so these matrices are indeed generating the group in question. Since this group is generated also by the pseudo-reflections a, b, and ac, the G-module structure of S(U ) is well known by the Shephard-Todd-Chevalley theorem [3], [33]. In particular, S(U )G = F[x, y]G is a polynomial ring generated by (xy)2 , x6 + y 6 . The element x7 y − xy 7 is not contained in the ideal of S(U ) generated by the above two invariants. It spans a one-dimensional G-invariant subspace isomorphic to the one-dimensional G-module Fχ corresponding to the order two homomorphism χ : G → F× given by the determinant on GL(U ). It follows that in S(U ⊕ Fχ ) the element (x7 y − xy 7 )z is an indecomposable G-invariant, where z spans the summand Fχ . 3.5 Some groups with an abelian normal subgroup of index two or three In this section we shall discuss a group G with an abelian normal subgroup A of index 2 or 3. Let V be a G-module over an algebraically closed base field F. We shall fix the following notation: I := S(V )A , R := S(V )G . By Clifford theory we know that each irreducible G-module is 1-dimensional or is induced from a 1-dimensional A-module. Therefore it is possible to choose the variables in S(V ) to be A-eigenvectors that are permuted up to scalars by the action of G. We shall tacitly assume that the variables were chosen that way. It follows that I is spanned by A-invariant monomials, permuted by G up to scalars. It will be convenient to use the notation f g = g −1 · f for g ∈ G and f ∈ S(V ). For a non-zero scalar multiple x of a variable let b its weight (i.e. xa = (θ(x)(a))x ∈ Fx for all a ∈ A). us denote by θ(x) ∈ A b Here A is the character group of A, i.e. the abelian group consisting of the 7 b ∼ group homomorphisms A → F× . Note that A = A when F is algebraically closed. For a non-zero scalar multiple w of a monomial y1 . . . yd the multiset Φ(w) = {θ(y1 ), . . . , θ(yd )} is called the weight sequence of w. It is a sequence b (where the order of the elements in a sequence is over the abelian group A b form a monoid with disregarded and repetition is allowed). Sequences over A multiplication denoted by “·” (see Section 5 for more discussion of this monoid), such that for monomials w, w′ we have Φ(ww′ ) = Φ(w) · Φ(w′ ). The action of G b by θg (a) = θ(gag −1 ). For a variable on A by conjugation induces an action on A g x, g ∈ G and a ∈ A we have that x is a non-zero scalar multiple of a variable, −1 and (xg )a = (xgag )g = (θ(x)(gag −1 )x)g = θ(x)g (a)xg , showing the equality g g θ(x ) = θ(x) . Consequently, for a non-zero scalar multiple w of a monomial b is extended componentwise we have Φ(wg ) = Φ(w)g where the action of G on A G b to sequences over A. Denote by τ = τA : I → R the relative transfer map P f 7→ g∈G/A f g . It is a surjective R-module homomorphism, preserving the grading (inherited from the standard grading on the polynomial ring S(V )). The following lemma provides the common basis for the proofs of the upper bounds for Noether numbers below: b with |S| > d Lemma 3.7. Suppose that for any zero-sum sequence S over A which does not factor as the product of 1+[G : A] non-empty zero-sum sequences, we have a factorization S = S1 · S2 as the product of two zero-sum sequences satisfying the following: for each g ∈ G \ A, the sequence S1 · S2g factors as the product of 1 + [G : A] non-empty zero-sum sequences. Then we have the inequality β(G) ≤ d. Proof. By Proposition 1.5 in [7], in order to prove β(S(V )G ) ≤ d it is sufficient to show that I≥d+1 ⊆ I+ R+ where I≥d+1 stands for the sum of homogeneous components of I of degree at least d + 1. That is, we need to show that any Ainvariant monomial w with deg(w) > d belongs to I+ R+ . So take an arbitrary A-invariant monomial with deg(w) > d, and denote by S its weight sequence Φ(w). If S factors into a product of 1 + [G : A] zero-sum sequences, then w factors as the product of 1 + [G : A] non-trivial A-invariant monomials. Thus w ∈ (I+ )1+[G:A] . On the other hand by Proposition 1.6 in [7] we have (I+ )1+[G:A] ⊆ I+ R+ , implying in turn that w ∈ I+ R+ . Next, suppose that S does not factor as the product of 1 + [G : A] non-empty zero-sum sequences. Then by assumption we have a factorization S = S1 · S2 with the properties in the statement. The monomial w factorizes as w = w1 w2 with Φ(w1 ) = S1 , Φ(w2 ) = S2 . We have the equality X w = w1 τ (w2 ) − w1 w2g , where the summation above ranges over a set of representatives of the A-cosets in G which are different from A. For each such summand, Φ(w1 w2g ) = S1 · S2g factors as the product of 1 + [G : A] non-empty zero-sum sequences, so w1 w2g ∈ (I+ )1+[G:A] ⊆ I+ R+ . The first summand w1 τ (w2 ) above is also contained in I+ R+ since τ (w2 ) ∈ R+ , implying in turn that w ∈ I+ R+ . Thus we showed I≥d+1 ⊆ I+ R+ . Proposition 3.8. β(A4 × C2 ) = 8. Proof. First we show the inequality β(A4 ×C2 ) ≤ 8. We have A4 = K⋊hgi where K∼ = C2 ×C2 and hgi ∼ = C3 , so G := A4 ×C2 contains an abelian normal subgroup 8 A = K × C2 , where g centralizes the last summand C2 , and conjugation by g b additively, gives an order 3 automorphism of K. Write the character group A and denote its elements by {(0, ε), (a, ε), (b, ε), (c, ε) | ε = 0, 1}, where (0, 0) is the zero element, {(a, 0), (b, 0), (c, 0), (0, 0)} is a subgroup, and the action b given by (a, ε)g = (b, ε), (b, ε)g = (c, ε), of hgi on A induces the action on A g (c, ε) = (a, ε). We shall apply Lemma 3.7, so take a zero-sum sequence S over b with |S| ≥ 9, such that S does not factor as the product of four non-empty A b Since β2 (A) = 7 by Lemma 3.7 in [11], 0 does not zero-sum sequences over A. occur in S (otherwise S = {0} · T and |T | ≥ 8 > β2 (A) = 7 implies that T is the product of three non-empty zero-sum sequences, a contradiction). On b \ {(0, 0)}| implies that S contains an element the other hand, |S| > 7 = |A s with multiplicity at least 2, hence S = T0 · T , where T0 , T are zero-sum sequences, T0 = {s, s} has length 2, so |T | ≥ 7. Note that T does not contain a zero-sum subsequence of length 2 (since otherwise D(A) = 4 would imply that S is the product of four non-empty zero-sum sequences). It follows that b (each having multiplicity one), and so T consists of the non-zero elements in A T = T1 T2 where T1 = {(a, 1), (b, 0), (c, 0), (0, 1)}, T2 = {(a, 0), (b, 1), (c, 1)}. Set S1 := T0 ·T1 and S2 := T2 . The factorization S = S1 ·S2 fulfills the requirements of Lemma 3.7: indeed, (a, 1) = (c, 1)g occurs both in S1 and S2g , so S can be written as S = T0 · {(a, 1), (a, 1)} · U where U is a zero-sum sequence of length 5. Hence by D(A) = 4 we get that S1 · S2g factors as the product of four non2 2 empty zero-sum sequences. Similarly, (a, 1) = (b, 1)g occurs also in S2g , hence 2 S1 · S2g also factors as the product of four non-empty zero-sum sequences. By Lemma 3.7 we conclude that β(G) ≤ 8. The subgroup K is normal in G and G/K ∼ = C6 , hence by (6) we obtain the reverse inequality β(G) ≥ β(K) + β(C6 ) − 1 = 3 + 6 − 1 = 8. Example 3.9. For later use we present a concrete A4 ×C2 -module on which the Noether number is attained. We keep the notation used in the proof of Proposition 3.8. Let W be the 3-dimensional irreducible A4 -module (the non-trivial direct summand in the 4-dimensional standard permutation representation of A4 ) viewed as a G-module under the natural surjection G → A4 with kernel C2 . Let U be the non-trivial 1-dimensional C2 -module viewed as a G-module under the natural surjection G → C2 with kernel A4 . Set V := W ⊕(W ⊗U )⊕U . Then S(V ) = F[x1 , x2 , x3 , y1 , y2 , y3 , z] where x1 , x2 , x3 are A-eigenvectors with weight (a, 0), (b, 0), (c, 0) and they are permuted cyclically by g. Similarly y1 , y2 , y3 are A-eigenvectors with weight (a, 1), (b, 1), (c, 1) and they are permuted cyclically by g. The last variable z is fixed by g and is an A-eigenvector with weight (0, 1). 2 Denote by τ = τAG : I → R the relative transfer map f 7→ f + f g + f g . Then R is spanned as an F-vector space by τ (w) where w ranges over the A-invariant monomials. There is an N3 -grading on F[V ] given by deg3 (xa1 1 xa2 2 xa3 3 y1b1 y2b2 y3b3 z d ) := (a1 + a2 + a3 , b1 + b2 + b3 , d). This is preserved by the action of G, hence I and R are N3 -graded subalgebras. Moreover, τ preserves the N3 -grading. We claim that τ (x31 x32 y3 z) is indecomposable, that is, it is not contained in (R+ )2 . Suppose to the contrary that τ (x31 x32 y3 z) is a linear combination of elements of the form τ (w)τ (w′ ) where w and w′ are non-trivial A-invariant monomials and deg3 (w)+deg 3 (w′ ) = (6, 1, 1). 9 There is no A-invariant variable in F[V ], so both w and w′ above have total degree at least 2. The hgi-orbits of the A-invariant monomials w with deg3 (w) = (∗, ∗, 1), deg3 (w) 6= (6, 1, 1) and where deg3 (w) is dominated by (6, 1, 1) are x1 x2 y3 z, x31 x2 y3 z, x1 x32 y3 z, x1 x2 x23 y3 z. The G-invariants of degree 2 or 4 depending only on x1 , x2 , x3 are τ (x21 ) = x21 + x22 + x23 , τ (x21 x22 ) = x21 x22 + x21 x23 + x22 x23 , τ (x41 ) = x41 + x42 + x43 . It follows that τ (x31 x32 y3 z) = τ (x1 x2 y3 z)(λ1 τ (x41 ) + λ2 τ (x21 x22 )) + τ (x21 )(µ1 τ (x31 x2 y3 z) + µ2 τ (x1 x32 y3 z) + µ3 τ (x1 x2 x23 y3 z)) for some λ1 , λ2 , µ1 , µ2 , µ3 ∈ F. Comparing the coefficients of x51 x2 y3 z, x1 x52 y3 z, x1 x2 x43 y3 z, x1 x32 x23 y3 z we conclude 0 = λ1 + µ1 = λ1 + µ2 = λ1 + µ3 = λ2 + µ2 + µ3 . It follows that the coefficient λ2 + µ1 + µ2 of x31 x32 y3 z on the right hand side is 0, whereas on the left hand side it is 1. This contradiction implies that τ (x31 x32 y3 z) ∈ / (R+ )2 , hence β(S(V )G ) ≥ 8. Proposition 3.10. β((C2 × C2 ) ⋊ C4 ) = 6. Proof. We have G = (C2 × C2 ) ⋊ hgi where hgi ∼ = C4 . The group G contains the abelian normal subgroup A := C2 × C2 × hg 2 i. We use the same notation b as in the proof of Proposition 3.8. The action of hgi on A b for the elements of A is given by (a, ε)g = (b, ε), (b, ε)g = (a, ε), (c, ε)g = (c, ε), (0, ε)g = (0, ε) for ε = 0, 1. b with |S| ≥ 7 which is not the product of Take a zero-sum sequence S over A three non-empty zero-sum sequences. Since D(A) = 4 by Lemma 3.7 in [11], S has no zero-sum subsequence of length at most 2. It follows that S consists of the b (each element having multiplicity 1), hence S = S1 · S2 non-zero elements of A where S1 = {(b, 0), (b, 1), (0, 1)} and S2 = {(a, 0), (a, 1), (c, 0), (c, 1)}. We have that S1 · S2g = {(b, 0), (b, 0)} · {(b, 1), (b, 1)} · {(c, 0), (c, 1), (0, 1)} is the product of 3 = 1+[G : A] zero-sum sequences. By Lemma 3.7 we conclude the desired inequality β(G) ≤ 6. On the other hand β(G) ≥ β(C2 × C2 )+ β(C4 )− 1 = 3 + 4 − 1 = 6 by (6). Example 3.11. For later use we present a G-module on which the Noether number of the group G = (C2 × C2 ) ⋊ C4 is attained. Consider the G-module V = F4 on which the action is given by the matrices       0 1 0 0 −1 0 0 0 1 0 0 0 1 0 0 0  0 1 0 0 0 −1 0 0       a= 0 0 1 0  , b =  0 0 1 0  , c = 0 0 ω 0  0 0 0 ω 0 0 0 −1 0 0 0 −1 10 where ω is a primitive fourth root of unity. Then a, b generate a subgroup of GL(V ) isomorphic to C2 × C2 , c4 is the identity matrix, and conjugation by c interchanges a and b. So G can be identified with the subgroup of GL(F4 ) generated by a, b, c. Moreover, the 2 × 2 upper left blocks of a, b, c give the reflection representation of G = G/hc2 i ∼ = Dih8 on W = F2 ⊂ V . Denote by x, y, z, w the standard basis vectors in V = F4 , so W = SpanF {x, y}, S(V ) = F[x, y, z, w] and S(W ) = F[x, y]. We claim that the G-invariant xy(x2 − y 2 )zw b given by in F[x, y, z, w]G is indecomposable. Consider the characters χ, ψ ∈ G χ(a) = χ(b) = χ(c) = −1, ψ1 (a) = ψ1 (b) = 1, ψ1 (c) = ω, ψ2 (a) = ψ2 (b) = −1, ψ2 (c) = ω and Fχ , Fψ1 , Fψ2 the corresponding one-dimensional G-modules. Clearly we have the G-module isomorphisms Fz ∼ = F ψ1 , Fw ∼ = F ψ2 , Fxy(x2 − y 2 ) ∼ = Fχ . Since c restricts to an order two transformation of W , the modules Fψ1 , Fψ2 and their duals do not occur as a summand in S(W ), it follows that S(V )G contains no element that has degree 1 in z and degree 0 in w, and S(V )G contains no element that has degree 1 in w and degree 0 in z. The equalities ψ1 ψ2 = χ and χ2 = 1 show that the elements of S(V )G having degree 1 both in z and w are exactly the elements of the form zwh where h ∈ S(W ) and Fh ∼ = Fχ . The G-module structure of S(W ) and the structure of S(V )G ∩ S(W ) = S(W )G is well known from the Shephard-Todd-Chevalley Theorem [3], [33]. We infer that Fχ occurs with multiplicity one in the degree 4 component of S(W ), namely as the subspace spanned by xy(x2 − y 2 ), and does not occur in lower degrees. This clearly implies that xy(x2 − y 2 )zw is indecomposable in S(V )G . 4 4.1 Observations and open questions The Noether number and multiplicity free representations When char(F) = 0, it was shown in [30] that as a consequence of Weyl’s Theorem on polarizations, β(G) is attained on the regular representation of G, which contains each irreducible G-module with multiplicity equal to its dimension (see [25] for a variant of Weyl’s Theorem [35] valid in positive non-modular characteristic). However for the small groups studied here, the Noether number is usually attained on some G-modules of much smaller dimensions. Recall that a G-module V is multiplicity free if it is the direct sum of pairwise non-isomorphic irreducible G-modules. To deal with some particular cases below, we need first to state explicitly the following corollary of the proof of the inequality (6) given in [8]: Lemma 4.1. Let N be a normal subgroup of G with G/N abelian. For any N -module W there exists a multiplicity free G/N -module U such that G N β(S(U ⊕ IndG N W ) ) ≥ β(S(W ) ) + D(G/N ) − 1. 11 In particular, if β(S(W )N ) = β(N ), β(G) = β(N ) + D(G/N ) − 1, IndG N (W ) is multiplicity free and has no summand on which N acts trivially, then β(G) is attained on a multiplicity free G-module. Theorem 4.2. There exists a multiplicity free G-module V such that β(G) = β(S(V )G ) in each of the following cases: 1. G is abelian; 2. G has a cyclic subgroup of index two; 3. G has order less than 32. Proof. It is sufficient to prove our claim in the case when F is algebraically closed, so let us assume this. b the group of characters 1. The case when G is abelian is known. Denote by G × b (G → F homomorphisms) of G, and for χ ∈ G let Fχ be the 1-dimensional G-module on which G acts via χ. It is well known (see for example Proposition b of length 4.7 in [10]) that if there exists an irreducible zero-sum sequence over G b with components in {χ1 , . . . , χk } ⊆ G, b then β(G) = β(S(Lk Fχi )G ). D(G) i=1 2. For the dicyclic groups G = Dic4m (where m > 1) we gave an example in the proof of Proposition 9.1 in [8] of a 2-dimensional irreducible G-module V with β(S(V )Dic4m ) = 2m + 2. Let G be a non-abelian group with a cyclic subgroup N of index two, and let b . Then IndG Fχ is a 2-dimensional irreducible G-module, χ be a generator of N N and so the module U ⊕ IndG N Fχ from Lemma 4.1 is multiplicity free (being the direct sum of a 2-dimensional irreducible and the non-trivial 1-dimensional 1 G module). Moreover, we have β(S(U ⊕ IndG N Fχ ) ) ≥ β(N ) + 1 = 2 |G| + 1, and 1 2 |G| + 1 = β(G) unless G is dicyclic. 3. Similar argument works for C7 ⋊ C3 , C5 ⋊ C4 , and M27 : let N be a b. maximal cyclic normal subgroup of the given group, and χ a generator of N G Then IndN Fχ is an irreducible G-module of dimension |G/N |, and we are done by Lemma 4.1, taking into account the known value of β(G) from Section 2. Now suppose that G = A⋊−1 C2 is a generalized dihedral group with A being b such a non-trivial abelian group. Take a minimal subset Λ = {χ1 , . . . , χr } ⊂ A b contains an atom of length D(A), b all of whose components belong to that B(A) Λ. By minimality of Λ, it does not contain the trivial character, and if χ and χ−1 both belong to Λ, then χ = χ−1 . If χ 6= χ−1 , then IndG A Fχ is irreducible and as an A-module is isomorphic to Fχ ⊕ Fχ−1 , whereas if χ = χ−1 is non-trivial, then IndG A Fχ is the direct sum of two non-isomorphic 1-dimensional G-modules, which as A-modules are isomorphic to Fχ . It follows that for W = Fχ1 ⊕· · ·⊕Fχr the G-module IndG A W is multiplicity free and contains no summands on which A acts trivially. Thus we are done by Lemma 4.1. The groups Q8 × C2 , S3 × C3 , C4 ⋊ C4 , can also be settled by Lemma 4.1, taking into account the known value of β(G) from Section 2. Indeed, for the 2-dimensional irreducible Q8 -module W we have β(S(W ))Q8 = 6 (see [30]) 8 ×C2 and IndQ is the direct sum of the two non-isomorphic irreducible twoQ8 dimensional Q8 × C2 -modules. Essentially the same argument can be used for Dic12 × C2 : after inducing up to Dic12 × C2 the irreducible two-dimensional Dic12 -module on which the Noether number is attained we get a direct sum of two non-isomorphic irreducible Dic12 × C2 -modules. Note that S3 × C3 ∼ = 12 b3 we have that IndC3 ⋊C6 Fχ is the direct C3 ⋊−1 C6 and for a non-trivial χ ∈ C C3 sum of the three pairwise non-isomorphic irreducible 2-dimensional S3 × C3 b4 , we have that IndC4 ⋊C4 Fχ is the direct sum modules. For a generator χ ∈ C C4 of two non-isomorphic irreducible two-dimensional modules. The cases of the groups C3 ⋊ Dih8 , A4 × C2 and (C2 × C2 ) ⋊−1 C4 were settled in Example 3.6, Example 3.9 and Example 3.11. An irreducible module on which the Noether number is attained is given e4 in [7], for H27 in [5]. It was pointed out in already in the literature for A4 , A [10, Example 5.3 and 5.4] that the Noether number for S4 is attained on the product of the standard four-dimensional permutation representation and the sign representation, and for the Pauli group (C4 × C2 ) ⋊φ C2 on the direct sum of the two-dimensional pseudo-reflection representation and a one-dimensional representation (see also [6] for some details referred to in [10]). Problem 4.3. Does there exist a group G for which β(S(V )G ) < β(G) for all multiplicity free G-modules V ? Remark 4.4. (i) By a theorem of Draisma, Kemper and Wehlau [12] the universal degree bound for separating invariants is known to be attained on multiplicity free representations. (ii) We mention a conjecture of Hunziker [23, Conjecture 5.1] made for reflection groups that has a similar flavor as the topic of Section 4.1. 4.2 The strict monotonicity of the Noether number Since all G/N -modules can be viewed as G-modules, the inequality β(G/N ) ≤ β(G) holds for any normal subgroup N of any finite group G. It was proven by B. Schmid [30] that β(H) ≤ β(G) for any subgroup H of G. We shall refer as S and F for the following conditions on a finite group G: S: β(H) < β(G) for each proper subgroup H of G. F: β(G/N ) < β(G) for each non-trivial normal subgroup N of G. It is shown in a subsequent paper [9] that conditions S and F (by generalizing (6) for non-abelian N ) hold for all finite groups. We collect in Theorem 4.5 below facts on the properties S and F that can be read off from the results obtained or quoted in the present paper. Theorem 4.5. Condition S holds for any finite nilpotent group G. Moreover, both S and F hold when 1. G is abelian; 2. G has a cyclic subgroup of index two; 3. G ∼ = Cp ⋊ Cq for odd primes p, q where q | p − 1; 4. G has order less than 32. Proof. Suppose first that G is nilpotent, and let H be a proper subgroup of G. It is well known that H is contained as a prime index normal subgroup in a subgroup K of G, whence we have β(G) ≥ β(K) ≥ β(H) + [K : H] − 1 > β(H) by (6). So S holds for G. Note that if G is abelian, then any factor group 13 of G is isomorphic to a subgroup of G, hence F follows from S. If G has a cyclic subgroup of index two, then any subgroup or factor group of G has a subgroup of index at most two as well, whence (3) shows that both S and F hold. Any non-trivial subgroup or factor group of Cp ⋊ Cq has order p or q, and β(Cp ⋊ Cq ) ≥ p + q − 1 by (6). Assume finally that G is a non-abelian group of order less than 32 that contains no cyclic subgroup of index two. Theorem 1.1 in [7] asserts that β(H) < 1 2 |H| unless H has a cyclic subgroup of index at most two, or H is isomorphic to one of C2 × C2 × C2 , C3 × C3 , A4 , or Ã4 . Taking into account (3) and the values of the Noether numbers of C2 × C2 × C2 , C3 × C3 , A4 and Ã4 , this implies that β(H) ≤ 2 + 12 |H| for any non-cyclic H, with equality only if H ∼ = Dic4m is a dicyclic group. Since our G has no cyclic subgroups or factor groups of order at least 21 |G|, we conclude that for any proper subgroup or factor group H of G the inequality β(H) ≤ max{2 + 41 |G|, 31 |G|} holds, with strict inequality unless H ∼ = Dic4m is a dicyclic group of order 12 |G| or H is a 1 cyclic group of order 3 |G|. This immediately implies that S and F hold for G provided that β(G) > max{2 + 41 |G|, 31 |G|}. From now on assume in addition that β(G) ≤ max{2 + 14 |G|, 31 |G|}. So G is one of the following groups from the table in Section 2: the two groups of order 16 with Noether number 6, the group of order 18 with Noether number 6, the two groups of order 24 with Noether number 8, or the group of order 27 with Noether number 9. Now Dih8 × C2 has exactly four elements of order 4 and no element of order 8, consequently does not have Q8 = Dic8 as a subgroup or a factor group, hence S and F hold for this group. The group (C2 × C2 ) ⋊ C4 has C2 × C2 × C2 as a subgroup. Therefore any order 8 subgroup or factor group of this group contains C2 × C2 as a subgroup, and hence it is not dicyclic. The group (C3 × C3 ) ⋊−1 C2 has no element of order 6 and has no dicyclic subgroups or factor groups (as its order is not divisible by 4). The groups A4 × C2 and Dih12 × C2 have no element of order 8 and do not have a subgroup or factor group isomorphic to Dic12 (as these groups do not have an element of order 4). Finally, the Heisenberg group does not have an element of order 9. So S and F hold for all groups of order less than 32. 4.3 Dependence on the characteristic It is proved in [25, Corollary 4.2] that β F (G) may depend only on the characteristic of F, but not on F. Therefore we introduce the notation β char(F) (G) = β F (G). Moreover, by [25, Theorem 4.7] we have β p (G) ≥ β 0 (G) for all primes p, and β p (G) = β 0 (G) holds for all but finitely many primes p. Knop remarks in [25] that “Presently, no group G and prime p not dividing |G| with β p (G) > β 0 (G) seems to be known”. This observation inspires the following question: Problem 4.6. Does the equality β p (G) = β 0 (G) hold for all finite groups G and primes p not dividing |G|? The paper [34] reports as a folklore conjecture that for any permutation ZGmodule V (i.e. when V is a free Z-module with a basis preserved by the action of G) we have β(S(F ⊗Z V )G ) = β(S(Q ⊗Z V )G ) provided that char(F) does 14 not divide |G|. We note that if this conjecture is true, then Problem 4.6 has a positive answer. Indeed, it follows from [25, Theorem 6.1] and (1) that if p does not divide |G| then β p (G) = β(S(F ⊗Z V )G ) where F is a field of characteristic p and V is the direct sum of |G| copies of the regular G-module defined over Z (hence in particular V is a permutation ZG-module). In Theorem 4.7 below we collect the cases for which Problem 4.6 has a positive answer by the results obtained or quoted in the present paper. Theorem 4.7. The equality β p (G) = β(G) holds for all primes p not dividing the order of G in each of the following cases: 1. G is abelian; 2. G has a cyclic subgroup of index two; 3. G has order less than 32. Proof. It has been long known that if G is abelian then β p (G) = D(G) for all p ∤ |G|. Formula (3) for the Noether number of a group with a cyclic subgroup of index two is valid in all non-modular characteristic. Finally, the quantities in the table in Section 2 are independent of the characteristic of the base field (provided that it is non-modular), whence the statement holds also for the remaining groups of order less than 32. 4.4 Further observations Remark that the groups S3 × C3 and (C3 × C3 ) ⋊−1 C2 both have the structure (C3 × C3 ) ⋊α C2 , the only difference being in the automorphism α. However, their Noether numbers are different. The groups Dih8 × C2 , (C2 × C2 ) ⋊ C4 and the Pauli group all have the structural description (C4 × C2 )⋊α C2 , only the automorphism α being different in the three cases. The Noether numbers of the first two are equal, and differ from the Noether number of the third one. This shows that it would be interesting to understand how β(A ⋊α B) depends on α. 5 5.1 Davenport constants The monoid of product-one sequences In this section we introduce further notation related to the small and large Davenport constants of a not necessarily abelian finite group. We follow the presentation of [10]. Let G0 ⊆ G be a non-empty subset of a finite group G. A sequence over G0 means a finite sequence of terms from G0 which is unordered, and repetition of terms is allowed (in other words, a sequence over G0 is a multiset of elements from G0 ). A sequence will be considered as an element of the free abelian monoid F (G0 ) whose generators are identified with the elements of G0 . We use the symbol “·” for the multiplication in the monoid F (G0 ) – this agrees with the convention in the monographs [19, 21] – and we denote multiplication in G by juxtaposition of elements. For example, considering elements g1 , g2 ∈ G0 we 15 have that g1 · g2 ∈ F (G0 ) is a sequence of length 2, while g1 g2 is an element of G. Furthermore, we use brackets for the exponentiation in F (G0 ). So for g ∈ G0 , S ∈ F (G0 ), and k ∈ N0 , we have g [k] = g · . . . · g ∈ F (G) | {z } k Let and S [k] = |S · .{z . . · S} ∈ F (G) . k S = g1 · . . . · g|S| = Y g [vg (S)] g∈G0 be a sequence over G0 ; here vg (S) is the multiplicity of g in S and we call P |S| = g∈G vg (S) the length of S. If vg (S) > 0, i.e. S = g · R for a sequence R with |R| = |S| − 1, then we write S · g [−1] = R for the sequence obtained from S by removing one occurrence of g. More generally, we write R = S · T [−1] if we have S = R · T for some sequences R, S, T . The identity element 1F (G0 ) in F (G0 ) is called the trivial sequence, and has length |1F (G0 ) | = 0. We have the usual divisibility relation in the free abelian monoid F (G0 ) and write T | S if T divides S. A divisor T of S will also be called a subsequence of S. We call supp(S) = {g ∈ G0 | vg (S) > 0} ⊆ G0 the support of S. The set of products of S is π(S) = {gτ (1) . . . gτ (|S|) ∈ G | τ ∈ Sym{1, . . . , |S|}} ⊆ G (if |S| = 0, we use the convention that π(S) = {1G }). Clearly, π(S) is contained in a G′ -coset, where G′ = [G, G] = hg −1 h−1 gh | g, h ∈ Gi denotes the commutator subgroup of G. Set [ π(T ) ⊆ G. (8) Π(S) = T |S 1F(G0 ) 6=T The sequence S is called a • product-one sequence if 1G ∈ π(S), • product-one free sequence if 1G ∈ / Π(S). The set B(G0 ) = {S ∈ F (G0 ) : 1G ∈ π(S)} of all product-one sequences over G0 is obviously a submonoid of F (G0 ). We denote by A(G0 ) the set of atoms in the monoid B(G0 ). The length of an atom is clearly bounded by |G|. The large Davenport constant of G0 is D(G0 ) = max{|S| : S ∈ A(G0 )} ∈ N. Moreover, we denote by M(G0 ) the set of product-one free sequences over G0 and we define the small Davenport constant of G0 as d(G0 ) = max{|S| : S ∈ M(G0 )}. We have the inequality d(G0 ) + 1 ≤ D(G0 ) with equality when the elements in G0 commute with each other. 16 5.2 Some known results For a non-cyclic group G with a cyclic subgroup of index two Olson and White [28] proved that d(G) = 12 |G|. Morover, recently it was proven by Geroldinger and Grynkiewicz [18] that for these groups D(G) = d(G) + |G′ |. For the non-abelian semidirect product Cp ⋊ Cq where p, q are odd primes it was shown by Grynkiewicz [20, Corollary 5.7 and Theorem 5.1] that we have d(Cp ⋊ Cq ) = p + q − 2 and D(Cp ⋊ Cq ) = 2p. 5.3 The large Davenport constant for H27 Consider H27 , the Heisenberg group with 27 elements having the presentation ha, b, c | a3 = b3 = c3 = 1, c = [a, b] = a−1 b−1 abi. This is an extraspecial group, its commutator subgroup hci coincides with the center Z := Z(H27 ). As a result, the commutator identities (which hold for any group) take the following simpler form in this particular case: [x, yz] = [x, y][x, z] [xy, z] = [x, z][y, z] (9) for any x, y, z ∈ H27 . As [c, x] = 1 for any x ∈ H27 we see that the value of [x, y] depends only on the cosets xZ and yZ so that the commutator defines in fact a bilinear map on H27 /Z ∼ = C3 × C3 with values in C3 . Moreover as c commutes with every other element of the group it is immediate that every Zcoset has a representative of the form ai bj for some i, j ∈ Z/3Z and by repeated applications of (9) we get [ai bj , ak bl ] = cil−jk = c   det i j k l . (10) By (10) the elements x = ai bj and y = ak bl commute if and only if the vectors (i, j) and (k, l) are linearly dependent over Z/3Z. For the rest we denote by x̄ the image of any x ∈ H27 at the natural surjection H27 → C3 × C3 and we extend this notation to sequences in the obvious way, as well. We say that two sequences S and T over a group G are similar if α(S) = T for an automorphism α ∈ Aut(G) (the action of Aut(G) on G extends naturally to an action on F (G)). A sequence S over G is called degenerate if supp(S) is contained in a proper subgroup of G. Lemma 5.1. Let T = R · S be a product-one sequence such that |π(R)| = 3 and S is not product-one free. Then T is not an atom. Proof. By the assumption on S there is a non-empty product-one sequence U | S. Consider the sequence V = T ·U [−1] . Then V̄ is a zero-sum sequence over C3 × C3 , whence π(V ) ⊆ Z. But for R | V we have |π(R)| = 3 hence π(V ) = Z so that V is also a product-one sequence. Thus the equality T = U · V shows that T is not an atom. Lemma 5.2. Let T be a non-degenerate sequence over H27 \ Z of length at least 3. Then either |π(T )| = 3 or T̄ = ē · f¯ · (−ē−f¯) for a basis {ē, f¯} of H27 /Z Proof. Assume that π(T ) is not a full Z-coset. As T is non-degenerate there must be two elements e, f in T such that [e, f ] = c. Hence |π(T )| = 2. Let g be an arbitrary element in T · (e · f )[−1] . Then ḡ 6= ē because otherwise 17 π(g ·e·f ) ⊇ {gef, gf e, f ge} = gef Z. Also ḡ 6= −ē because otherwise π(g ·e·f ) ⊇ {gef, gf e, ef g} = gef Z. Similarly ḡ is different from f¯, −f¯. As a result in the Z/3Z-vector space H27 /Z ∼ = C3 × C3 we have a relation αē + β f¯ + γḡ = 0 where the coefficients α, β are non-zero. Moreover γ 6= 0 also holds by the linear independence of ē and f¯. Up to similarity and the choice of the basis e, f only two cases are possible: (i) ē+f¯ = ḡ, but then [e, f ] = [e, g] = c, hence π(e · f · g) = ef gZ, again a contradiction, or (ii) ē + f¯ + ḡ = 0; then [e, f ] = [g, e] = [f, g] = c hence ef g = cf eg = f ge = cgf e = gef = cegf , so that |π(e · f · g)| = 2. In the proof below we shall use the following ad hoc terminology: A subset of C3 × C3 of the form {e, f, −e − f } where e, f form a basis of C3 × C3 will be called an affine line, while a subset of the form {e, f, e + f } where e, f form a basis of C3 × C3 will be called an affine cap (the terminology is motivated by the literature on the so-called cap set problem). Note that a three-element subset of C3 × C3 in which any two elements are linearly independent over Z/3Z is either an affine line or an affine cap. Proposition 5.3. D(H27 ) ≤ 8. Proof. Assume indirectly that there is an atomic product-one sequence T of length at least 9. After ordering the elements of T = g1 · g2 · · · gn in such a way that g1 g2 · · · gn = 1 and replacing T with T ′ = g1 · · · g8 · (g9 g10 · · · gn ) we may assume that |T | = 9. A. If T is degenerate then it is in fact an irreducible zero-sum sequence over C3 × C3 , hence |T | ≤ D(C3 × C3 ) = 5, a contradiction. So for the rest we assume that T is non-degenerate so that T̄ contains a basis {e, f } of H27 /Z. B. T̄ contains an element g 6∈ hei ∪ hf i (i.e. T̄ has an affine line or an affine cap as a subsequence). Otherwise, if T̄ is contained in the set hei ∪ hf i then T = C · A1 · . . . · At where C̄ = 0[k] and Āi ∈ {e[3] , f [3] , −e · e, −f · f }. Choose ai ∈ π(Ai ) for i = 1, . . . , t. Then the sequence Q := C · a1 · . . . · at is a zero-sum sequence over Z ∼ = C3 , hence if k + t > 3 then Q factors into the product of two non-empty zero-sum sequences and T factors accordingly, a contradiction. If k > 0 then we get k + t ≥ k + (9 − k)/3 > 3, as |Ai | ≤ 3 for all i, again a contradiction. Hence k = 0, t = 3 and T̄ is similar to e[6] · f [3] . Then T contains a degenerate subsequence of length 6 > D(C3 × C3 ), which in turn must contain a proper zero-sum subsequence R such that R̄ = e[3] . Then the complement S = T · R[−1] has |S| = 6, hence π(S) = Z by Lemma 5.2, a contradiction by Lemma 5.1. C. T̄ cannot contain a subsequence R̄ | T̄ similar to one of the following sequences: e · f · (−e) · (−f ) (11) e · f · (e + f )[2] (12) Indeed, these sequences R̄ are such that for their preimages R we have that π(R) = Z by Lemma 5.2. So for any such R | T the complement S = T · R[−1] must be product-one free, as otherwise we would get a contradiction by Lemma 5.1. Hence S cannot be degenerate, as |S| = 5 = D(C3 × C3 ) and π(S) ⊆ Z \ {1}. Therefore by Lemma 5.2 it is necessary that S = x · y · L where 18 x̄ = ȳ = 0 and L̄ is an affine line. Moreover by our assumption we must have π(L) = Z \{1} and x, y ∈ Z \{1}, as well. But then 1 ∈ π(x·L), a contradiction. D. We claim that T̄ must contain an affine line and 0 6∈ supp(T̄ ). For assume that T̄ does not contain an affine line. Then T̄ still contains an affine cap by B, so we may assume that e ·f · (e + f ) | T . Then to avoid affine lines it is necessary that e − f, f − e, −e − f do not occur in T̄ . To avoid subsequences of type (11) we have either vT̄ (−e) = 0 or vT̄ (−f ) = 0. Assume now that vT̄ (−e) > 0 and vT̄ (−f ) = 0 (the case vT̄ (−e) = 0 and vT̄ (−f ) > 0 is analogous). Then to avoid subsequences of type (12) we must have vT̄ (f ) = vT̄ (e + f ) = 1. As a result the image of T̄ modulo hei is f [2] · 0[7] , but this is not a product-one sequence in C3 × C3 /hei ∼ = C3 , a contradiction. So it remains that T̄ = 0[k] · e[i] · f [j] · (e + f ). Since T̄ is a zero-sum sequence over C3 × C3 we must have i ≡ j ≡ 2 (mod 3). As |T̄ | = 9 either k + i = 6 or k + j = 6 and we get again a degenerate subsequence which must contain a zerosum subsequence R such that its complement S = T · R[−1] has π(S) = Z by Lemma 5.2, again a contradiction. Thus T̄ contains an affine line. An argument similar to the one in C shows also that 0 does not occur in T̄ . From now on we assume that T̄ contains the affine line L̄ = {e, f, g} as a subsequence. P E. Next we claim that x∈−L̄ vT̄ (x) ≤ 1. Indeed, T̄ cannot contain two different elements x, y belonging to −L̄ because that would yield a subsequence of type (11). Moreover, vT̄ (x) ≥ 2 for some x in −L would yield the type (12) subsequence x · x · L · (−x)[−1] of T̄ . F. We claim that vT̄ (e − f ) = 0 and vT̄ (f − e) = 0. For assume to the contrary that vT̄ (e − f ) > 0 (the case vT̄ (f − e) > 0 being analogous). Observe that for any x in L we must have vT̄ (x) = 1 to avoid subsequences of type (12). In view of E it follows that vT̄ (e − f ) + vT̄ (f − e) ≥ |T | − 4 = 5 = D(C3 × C3 ), so that T has again a degenerate subsequence containing a zero-sum subsequence R (with supp(R̄) ⊆ {0, e − f, f − e}) such that its complement S = T · R[−1] has π(S) = Z by Lemma 5.2, leading to a contradiction by Lemma 5.1. G. Now we prove that supp(T̄ ) = L. For otherwise it would follow from D, E, F that T̄ = (−x) · x · T̄0 where vL (x) > 0 and supp(T̄0 ) ⊆ L. But T̄0 must also be a zero-sum sequence, hence |T̄0 | is divisible by 3 because the only irreducible zero-sum sequences over C3 × C3 with support contained in L are e[3] , f [3] , (−e−f)[3] , e · f · (−e−f ). But then |T | ≡ 2 mod 3, contradicting the assumption that |T | = 9. H. So we have a factorization T = L · R such that L̄ = e · f · g with e + f + g = 0 ∈ C3 × C3 and supp(R̄) ⊆ {e, f, g}. For any such factorization L̄ and R̄ are zero-sum sequences, hence π(R) ⊆ Z, moreover |π(R)| = 3 by Lemma 5.2, so that 1 ∈ π(R) and consequently 1 6∈ π(L). Observe now that an element in supp(T̄ ), say e must have vT̄ (e) ≥ 3. Let Q = x1 · x2 · x3 | T be such that Q̄ = e[3] and x1 ∈ L. If xi 6= x1 for some i > 1 then consider the sequence [−1] L′ := L · x1 · xi . By assumption π(L) = Z \ {1} and x−1 1 xi ∈ Z \ {1} hence ′ ′ ′ π(L′ ) = π(L)x−1 1 xi ∋ 1. Thus L̄ = L̄ and T = L · R would be a factorization of T as a product of two product-one sequences. We conclude that x1 = x2 = x3 , so that Q is a product-one subsequence and T = Q · S where S̄ is a product-one sequence over C3 × C3 and hence S is a product-one sequence by Lemma 5.2. This contradicts the assumption that T is an atom. Remark 5.4. The idea of Lemma 5.1 appears in the proof of a result of 19 Grynkiewicz [20, Corollary 3.4] which yields for the Heisenberg group of order p3 the inequality D(G) ≤ d(G) + |G′ | = d(G) + p. (13) We established by our algorithm that d(H27 ) = 6 so in this case (13) gives D(G) ≤ 9 which in view of Proposition 5.3 is not sharp. On the other hand we show below that Proposition 5.3 is sharp. Proposition 5.5. D(H27 ) ≥ 8. Proof. Assume c ∈ π(a[i] · b[j] ) for some i, j ∈ N. Then i, j > 0 since c 6∈ hai and c 6∈ hbi. Moreover c̄ = 0 = āi b̄j holds, as well. But since ā and b̄ are independent in C3 × C3 it is necessary that i ≡ j ≡ 0 mod 3. It follows that i + j ≥ 6. On the other hand c = [a, b] = aabbab hence the minimal expression of c in terms of a and b has length 6. By a similar argument the same is true for c−1 , as well. Now ccbbaaba = 1 and we claim that the product-one sequence S = a[3] · [3] b · c[2] is an atom. Otherwise let S = T · R for some non-empty product-one sequences T, R and we may assume that vT (c) > 0. If vR (c) > 0 holds, too, then T · c[−1] contains only a, b and c−1 ∈ π(T · c[−1] ). Hence, by what has been said before, T · c[−1] = a[3] · b[3] . But then R = c, which is not a product-one sequence. From this contradiction it follows that vR (c) = 0 hence c[2] | T . But then supp(T · c[−2] ) ⊆ {a, b} and c ∈ π(T · c[−2] ), hence again T · c[−2] = a[3] · b[3] , so that R is empty, which is a contradiction. 5.4 Diameter of the Cayley digraph Next we state a general inequality that can be obtained by a similar argument as the proof of Proposition 5.5. This result is not used here, but seems worthwhile to mention, as it involves the diameter of Cayley digraphs, which (in contrast with the large Davenport constant for a non-abelian group) has a rather extensive literature: Proposition 5.6. Let X be a set of generators of a finite group G and Cay(G, X) the corresponding Cayley digraph. Then D(G) ≥ diam(Cay(G, X)) + 1. Proof. Let 1 = g0 , g1 , . . . , gd ∈ G be a sequence of vertices on a non-self-crossing path of maximal length in Cay(G, X), so that d = diam(Cay(G, X)). Now set −1 si = gi−1 gi for all i = 1, . . . , d and consider the sequence S = s1 · . . . · sd · gd−1 . By construction S is a product-one sequence and we claim that it is an atom in B(X ∪ {gd−1 }). For otherwise S = A · B for some product-one sequences A, B where gd−1 ∈ A, and then we can order the elements of A in such a way that we obtain an equality si1 · · · sir gd−1 = 1 where r < d. But since si ∈ X for all i, this means that we have in Cay(G, X) a path of length r from 1 to gd , a contradiction. Problem 5.7. Is there any relation between maxX⊆G {diam(Cay(G, X))} and d(G)? More concretely, based on a little computer experimentation we raise the following question: does the inequality d(G) ≥ diam(Cay(G, X)) hold in general? 20 6 Computing the Davenport constants We take over the following notations from Section 5.1: let F = F (G) be the monoid of all sequences of elements in G, let M ⊆ F be the set of product-one free sequences and A ⊆ F the set of atoms, i.e. all product-one sequences which cannot be written as the product of two non-empty product-one subsequences. For any k ≥ 1 let Fk ⊆ F denote the set of all sequences of length k and set Mk = M ∩ Fk , Ak = A ∩ Fk . Moreover, M0 = {1F } consists of the empty sequence. We propose two algorithms: one for enumerating all product-one free sequences and another one for computing all the atoms and thereby establishing the values of d(G) and D(G), respectively. We have implemented these algorithms in the GAP computer algebra system (see [16]) and used them to compute and/or verify the small and large Davenport constants given in Section 2. The algorithms construct the set M (respectively A) successively, as a union of the sets Mk (respectively Ak ). During the construction of the sets Mk or Ak we are not testing all elements of Fk for being product-one free or atomic (as this task would be practically unfeasible), but we limit the scope of our search to a much smaller subset defined in what follows. A sequence T is called a splitting of a sequence S if T = S · g [−1] · x · y for some g ∈ supp(S) and x, y ∈ G such that xy = g. We denote by S ≺ T the fact that T is a splitting of S. For any subset S ⊂ F (G) we set γ(S) := {T ∈ F (G) : S ≺ T for some S ∈ S}. Lemma 6.1. For any k ≥ 1 we have Mk+1 ⊆ γ(Mk ) and Ak+1 ⊆ γ(Ak ). Proof. If T = g · h · T ′ is a product-one free (respectively atomic) sequence of length k + 1 ≥ 2, then obviously the sequence S = (gh) · T ′ has length k and is product-one free (respectively atomic) too. Moreover, S ≺ T . Remark 6.2. Observe that by this lemma if Mk = ∅ for some k ≥ 1 then Ml = ∅ for every l > k. So the smallest k such that Mk = ∅ equals d(G) + 1. Similarly the smallest k such that Ak = ∅ is equal to D(G) + 1. Another idea used for reducing the complexity of our algorithms was to enumerate the elements of Mk and Ak only “up to similarity”. Recall from Section 5.3 that two sequences S and T are said to be similar if there is an automorphism α ∈ Aut(G) such that S = α(T ). Lemma 6.3. Let Rk be a set of Aut(G)-orbit representatives over Mk (respectively Ak ). Then there is a system of Aut(G)-orbit representatives Rk+1 over Mk+1 (respectively Ak+1 ) such that Rk+1 ⊆ γ(Rk ). Proof. Observe that the relation ≺ is compatible with the Aut(G)-action in the sense that S ≺ T holds if and only if α(S) ≺ α(T ) for some α ∈ Aut(G) if and only if α(S) ≺ α(T ) for each α ∈ Aut(G). Now we prove that for any sequence T ∈ Mk+1 its Aut(G)-orbit Orb(T ) has a non-empty intersection with γ(Rk ). Take an arbitrary sequence S ≺ T so that S ∈ Mk . As Rk ⊆ Mk is a complete set of representatives, there is some R ∈ Rk such that R = α(S) for some α ∈ Aut(G). Hence by the compatibility of ≺ it follows that R = α(S) ≺ α(T ). As a result α(T ) ∈ Orb(T ) ∩ γ(Rk ) and we are done. The proof is similar for the case of Ak . 21 6.1 Algorithm for computing the small Davenport constant Let us record the following obvious statement: Lemma 6.4. A sequence R of length k ≥ 1 is product-one free if and only if 1∈ / π(R) and for all g ∈ supp(R) we have that R · g [−1] ∈ Mk−1 . Given an arbitrary finite group G, Algorithm 1 computes the small Davenport constant. The set of all product-one free sequences of G may be obtained S as M = k Mk after the repeat-until loop has terminated (right after line 33). In lines 3–5 of the algorithm we have identified the sequences of length one with the respective group elements. Hence the set M1 of product-one free sequences having length one consists of all the group elements except the identity (line 3), from which we choose a set R1 of Aut(G)-orbit representatives (line 4). For every length-one sequence we store the set of products (line 5). These initial data having been established, the algorithm proceeds with computing the sets Mk and Rk for all increasing k > 1, until it finds the first value k for which Mk = ∅. The finiteness of the algorithm is guaranteed by Lemma 6.1 (together with Remark 6.2). Observe that inside the for-loops in line 14 the variable R will take successively all the values from the set γ(Rk−1 ), therefore it is guaranteed that for k > 1 all the possible candidate sequences will be tested for being product-one free and the set Rk (from Lemma 6.3) is built correctly. Before testing the sequence R for being product-one free (using Lemma 6.4), in line 15 it is checked first whether the sequence R is among the already computed product-one free sequences of length k (via the condition R ∈ / Mk ). Elimination of duplicates is essential for correctly building the set Rk of representatives (so that in line 18 we compute only the set Rk ⊆ γ(Rk−1 ) and not one of its supersets). If R is a new sequence (in the sense that it is not similar to any of the already found product-one free sequences), it gets tested using the conditions from Lemma 6.4 (the second condition from line 15 and the condition from line 17). π(R) is computed (in line 16) using the following observation: for any sequence R and fixed x ∈ R, we can write [ π(R) = π(R1 ) x π(R2 ). R1 ·R2 =R·x[−1] If R is found to be product-one free, it is also added as a new representative of the Aut(G)-orbits (line 18). The orbit itself is computed successively (and stored in the variable OR ) by evaluating all the automorphisms α on the sequence R. In line 27 the set OR will be the same as the set Orb(R) of Aut(G) orbits of R. For every new sequence R′ (new in the sense of not being in the already computed part of the orbit), we also have to compute and store the set π(R′ ) by acting with the proper automorphism α on the set π(R) (line 24). Hence the algorithm stores the product sets for all the enumerated product-one free sequences. This is essential for a relatively fast computation performed in line 16. The set Mk gets computed in line 27 as a union of Aut(G) orbits of the representatives. In the last step, the value k − 1 is returned: this is the small Davenport constant of G, as explained in Remark 6.2. 22 Algorithm 1: SmallDavenport(G) input : G output: d(G) 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 M0 ← {1FG }; π(1FG ) ← {1G }; M1 ← G \ {1G }; R1 ← {gα : α ∈ M1 / Aut(G)}; forall g ∈ M1 do π(g) ← {g}; k ← 1; repeat k ← k + 1; Mk ← ∅; Rk ← ∅; forall S ∈ Rk−1 do forall g ∈ supp(S) do forall x ∈ G \ {1G , g} do R ← S · g [−1] · x · (x−1 g); [−1] if R ∈ / Mk and ∈ Mk−1 then S ∀g ∈ supp(R) : R · g π(R) ← R1 ·R2 =R·x[−1] (π(R1 ) x π(R2 )); if 1G ∈ / π(R) then Rk ← Rk ∪ {R}; OR ← {R}; forall α ∈ Aut(G) do R′ ← α(R); if R′ ∈ / OR then OR ← OR ∪ {R′ }; π(R′ ) ← α (π(R)); end end Mk ← Mk ∪ OR ; end end end end end until Mk = ∅; return k − 1; 23 6.2 Algorithm for computing the large Davenport constant Given an arbitrary finite group G, Algorithm 2 computes the large Davenport S constant. The set of all atoms of G may be obtained as A = k Ak after the repeat-until loop has terminated (right after line 19). The algorithm begins with loading the sets A1 and R1 with the sequence consisting only of the identity element of the group. In line 11 the variable S ′ will take successively all the values from the set γ(Rk−1 ), therefore it is guaranteed that for k > 1 all the possible candidate sequences will be tested for being atoms and the set Ak (from Lemma 6.3) is built correctly. In line 10 the variable h is prevented from taking the values 1G or g, since this would bring in the identity element in the support of S ′ . The algorithm first checks whether a candidate sequence S ′ is among the already computed atoms of length k via the condition S ′ ∈ / Ak from line 12, ensuring that S ′ is a new atom (in the sense that it is not similar to any of the already found atoms of length k). Checking whether a sequence S ′ is an atom is performed by the second condition in line 12: by definition the product-one sequence S ′ is an atom if it cannot be written as a product of shorter atoms. The predicate D(S ′ , k) in line 12 is true if and only if the product-one sequence S ′ of length k is not an atom and may be given in the following way: ′ D(S , k) ⇐⇒ ∃A ∈ ′ k ⌊[ 2⌋ i=2 [−1] S ·A Ai with A | S ′ such that ∈ Ak−|A| or D(S ′ · A[−1] , k − |A|). It may be implemented using a recursive function, bailing out with a positive answer as soon as it finds a decomposition of S ′ into atoms. In line 13 the newly found atom S ′ gets added to the set Rk of representatives and the set Ak of atoms is completed with the Aut(G) orbit of S ′ , denoted by Orb(S ′ ) (in line 14). In the last step, the value k − 1 is returned as the large Davenport constant of G, as explained in Remark 6.2. Although the check is performed only for a system of representatives of the Aut(G) orbits of atoms (for all S ′ ∈ Rk−1 ), the “decomposability test” described by the predicate D(S ′ , k) uses the whole set of already computed Sk−1 atoms i=2 Ai , which is the main performance bottleneck of the algorithm. 24 Algorithm 2: LargeDavenport(G) input : G output: D(G) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 A1 ← {1G }; R1 ← {1G }; k ← 1; repeat k ← k + 1; Ak ← ∅; Rk ← ∅; forall S ∈ Rk−1 do forall g ∈ supp(S) do forall x ∈ G \ {1G , g} do S ′ ← S · g [−1] · x · (x−1 g); if S ′ ∈ / Ak and not D(S ′ , k) then Rk ← Rk ∪ {S ′ }; Ak ← Ak ∪ Orb(S ′ ); end end end end until Ak = ∅; return k − 1; Remark 6.5. We have used a GAP implementation of Algorithm 1 and 2 to compute the small and large Davenport constants from the table in Section 2 in case of those groups for which a formula for these constants in not readily available (see Subsection 5.2). Although parallelization is easily achievable in case of both algorithms, a “single-threaded” implementation was found to fit our present requirements, using a personal computer clocked at 2 GHz. The small Davenport constants from Section 2 have been obtained in under a minute worth of computation, with the single exception of the group M27 = C9 ⋊ C3 , for which d(M27 ) = 10 has been obtained in about 7 minutes. This group was found to have a number of 102212 product-one free sequences, grouped in 1987 equivalence classes. In contrast, the second most “difficult” group (among the non-abelian groups of order less than 32 that contain no cyclic subgroup of index two) was H27 = U T3 (F3 ) for which our implementation of Algorithm 1 yielded the following data in about 40 seconds: d(H27 ) = 6 with 69026 productone free sequences partitioned by the similarity relation into 187 equivalence classes. In case of the other groups the running times range from below one second up to half a minute. Computation of the large Davenport constant using Algorithm 2 is more demanding. The most time-consuming group from the list was SL2 (F3 ) = Ã4 , with the large Davenport constant being 13, housing 499695 atoms partitioned in 21033 equivalence classes. In the case of this group the computation took about 40 minutes. Excepting C3 ⋊Dih8 = (C6 ×C2 )⋊γ C2 and S4 (computation 25 taking about 24 minutes for each of them), the running times hardly reached one minute. For example in the interesting case of H27 , the large Davenport constant D(H27 ) = 8 was computed in 19 seconds. This group has 108827 atoms grouped in only 340 equivalence classes (this explaining the relative quick computation within this group). References [1] G. Bhowmik and J.-C. Schlage-Puchta, Davenport’s constant for groups of the form Z3 ⊕Z3 ⊕Z3d , Additive combinatorics, 307–326, CRM Proc. Lecture Notes, 43, Amer. Math. Soc., Providence, RI, 2007. [2] F. Chen and S. Savchev, Long minimal zero-sum sequences in the groups C2r−1 ⊕ C2k , Integers 14 (2014), Paper No. A 23, 29 pp. [3] C. Chevalley, Invariants of finite groups generated by reflections, Amer. J. Math. 77 (1955), 778-782. [4] K. Cziszter, The Noether number of the non-abelian group of order 3p, Periodica Math. Hungarica 68 (2014), 150-159. [5] K. Cziszter, On the Noether number of p-groups, arXiv:1604.01938 [6] K. Cziszter and M. Domokos, On the generalized Davenport constant and the Noether number, Central European Journal of Mathematics 11 (2013), 1605-1615. [7] K. Cziszter and M. Domokos, Groups with large Noether bound, Ann. Inst. Fourier (Grenoble) 64, no. 3 (2014), 909-944. [8] K. Cziszter and M. Domokos, The Noether number for the groups with a cyclic subgroup of index two, Journal of Algebra 399 (2014), 546-560. [9] K. Cziszter and M. Domokos, Lower bounds on the Noether number, Transform. Groups, 2018, DOI 10.1007/s00031-018-9479-4. [10] K. Cziszter, M. Domokos, and A. Geroldinger, The interplay of invariant theory with multiplicative ideal theory and with arithmetic combinatorics, in: Scott T. Chapman, M. Fontana, A. Geroldinger, B.Olberding (Eds.), Multiplicative Ideal Theory and Factorization Theory, SpringerVerlag, 2016, pp. 43-95. [11] Ch. Delorme, O. Ordaz, and D. Quiroz, Some remarks on Davenport constant, Discrete Mathematics 237 (2001),119-128. [12] J. Draisma, G. Kemper, and D.Wehlau, Polarization of separating invariants, Canad. J. Math. Soc. 60 (2008), 556-571. [13] P. van Emde Boas and D. Kruyswijk. A combinatorial problem on finite abelian groups. III. Math. Centrum Amsterdam Afd. Zuivere Wisk., 1969(ZW-008):32 pp., 1969. [14] P. Fleischmann, The Noether bound in invariant theory of finite groups, Adv. Math. 156 (2000), 23-32. 26 [15] J. Fogarty, On Noether’s bound for polynomial invariants of a finite group, Electron. Res. Announc. Amer. Math. Soc. 7 (2001), 5-7. [16] The GAP Group, GAP – Groups, Algorithms, and Programming, Version 4.8.6 ; 2016, (http://www.gap-system.org). [17] A. Geroldinger, Additive group theory and non-unique factorizations, Combinatorial number theory and additive group theory, 1-86, Adv. Courses Math. CRM Barcelona, Birkhäuser Verlag, Basel, 2009. [18] A. Geroldinger and D. J. Grynkiewicz, The large Davenport constant I: Groups with a cyclic index 2 subgroup, J. Pure Appl. Algebra 217 (2013), 863-885. [19] A. Geroldinger and F. Halter-Koch, Non-Unique Factorizations. Algebraic, Combinatorial and Analytic Theory, Pure and Applied Mathematics, vol. 278, Chapman & Hall/CRC, 2006. [20] D. J. Grynkiewicz, The large Davenport constant II: General upper bounds, J. Pure Appl. Algebra 217 (2013), 222-2246. [21] D. J. Grynkiewicz, Structural Additive Theory, Developments in Mathematics, Springer, 2013. [22] F. Halter-Koch, A generalization of Davenport’s constant and its arithmetical applications, Colloquium Mathematicum LXIII (1992), 203–210. [23] M. Hunziker, Classical invariant theory for finite reflection groups, Transformation groups 2 (1997), 145-161. [24] J.F. Humphreys, A course in group theory, Oxford University Press, 1996. [25] F. Knop, On Noether’s and Weyl’s bound in positive characteristic, in ”Invariant Theory in All Characteristics”, (Ed.: H. E. A. Eddy Campbell and D. L. Wehlau), CRM Proceedings and Lecture Notes 35, Amer. Math. Soc., Providence, Rhode Island, pp. 175-188, 2004. [26] E. Noether, Der Endlichkeitssatz der Invarianten endlicher Gruppen, Math. Ann. 77 (1916), 89-92. [27] E. Noether, Der Endlichkeitssatz der Invarianten endlicher linearer Gruppen der Charakteristik p, Nachr. Ges. Wiss. Göttingen (1926), 28-35. [28] J. E. Olson and E. T. White, Sums from a sequence of group elements, in: H. Zassenhaus (Ed.), Number Theory and Algebra, Academic Press, 1977, pp. 215-222. [29] D. R. Richman, Invariants of finite groups over fields of characteristic p, Adv. Math. 124 (1996), 25-48. [30] B. J. Schmid, Finite groups and invariant theory, in “Topics in invariant theory” (M.-P. Malliavin, ed.), Lecture notes in mathematics, no. 1478, Springer, 1989-90, pp. 35-66. 27 [31] W. A. Schmid, The inverse problem associated to the Davenport constant for C2 ⊕ C2 ⊕ C2n , and applications to the arithmetical characterization of class groups, Electron. J. Combin. 18 (2011), no. 1, Paper 33, 42 pp. [32] M. Sezer, Sharpening the generalized Noether bound in the invariant theory of finite groups, J. Algebra 254 (2002), 252-263. [33] G. C. Shephard and J. A. Todd, Finite unitary reflection groups, Canad. J. Math. 6 (1954), 274-304. [34] D. L. Wehlau, Some problems in invariant theory, in ”Invariant Theory in All Characteristics”, (Ed.: H. E. A. Eddy Campbell and D. L. Wehlau), CRM Proceedings and Lecture Notes 35, Amer. Math. Soc., Providence, Rhode Island, pp. 265-274, 2004. [35] H. Weyl, The classical groups, Second edition, Princeton University Press, Princeton, 1946. 28
4math.GR
A network model with structured nodes arXiv:1011.2336v1 [cs.SI] 10 Nov 2010 Pierluigi Frisco School of Math. and Comp. Sciences, Heriot-Watt University, EH14 4AS Edinburgh, UK, [email protected] Abstract We present a network model in which words over a specific alphabet, called structures, are associated to each node and undirected edges are added depending on some distance between different structures. It is shown that this model can generate, without the use of preferential attachment or any other heuristic, networks with topological features similar to biological networks: power law degree distribution, clustering coefficient independent from the network size, etc. Specific biological networks (C. Elegans neural network and E. Coli protein-protein interaction network) are replicated using this model. 1 Introduction In the last years mathematical and computer science (CS) concepts and methodologies and have been successfully used in Biology. This fascinating and fruitful combination of these disciplines has clear advantages for both of them. When biological phenomena are regarded as information processes, then they can be studied using mathematical and CS tools and concepts. This gives to Biology new ways to approach problems, solutions to them and this deepens the understanding of biological processes. At the same time CS enriches itself with new ways to define and study information process while Mathematics enriches itself with new concepts and theories. In the last decade several studies ([2, 13, 9, 12]) showed the importance of the topology of biological networks. These results proved that biological networks are composed of motifs, that biological networks with specific functions have an abundance of certain motifs instead of others, that the number of edges for the node in the network follows specific laws, etc. More than studying the features of empirical networks, it is also important to have algorithms able to generate networks with the same features of empirical ones. This kind of algorithms, called models, are an invaluable help in the generation of artificial networks and they provide insights on how certain features of complex empirical networks arise from the construction rules present in the model. Examples of such procedures are: the Erdös-Rényi model [5], the WattsStrogatz model [17] and the Barábasi-Albert model [3] and its variants [1, 14]. The E-R model allows to generate random networks able to reproduce the smallworld property (short path from any node to any other node in the network) but they fail to account for the local clustering characterising many empirical networks. Both these properties are captures by the W-S model, but unfortunately it does not capture the inhomogeneous degree distribution found in 1 many empirical networks. The B-A model can overcome these limitations and gives rise to the degree distribution. This degree distribution is obtained using preferential attachment: the probability for a node to receive an edge depends on the number of edges the node already has. The original B-A model does not capture the independence of the clustering coefficient from the size (number of nodes) of a network. This feature is captured by a variant [14] of this model in which heuristics (replication of networks) are used. The present study originates from the wish to create a network model able to reproduce biological networks without the use of heuristics. Despite the very many successful applications of the B-A model, it was not clear to us how preferential attachment could have been present in the evolution of, say, gene networks. Why a gene with many interactions is more likely to get even more interactions than a gene with few interactions? How can a new added gene “know” what are the genes with more interactions? In this respect, we believe that preferential attachment capture the overall effect of something more basic present in the evolution of biological networks. The network model introduced and studied in the present paper tries to capture some basic features present in the evolution of biological networks: network growth, node structure and distance between node structures. The node structure represents, for instance, the DNA sequence in genes, proteins’ secondary structure, the personality features in humans, etc. The distance between nodes represents, for instance, the fact that proteins will interact if their tertiary structure (which depends on their secondary structure) allows it, or that two humans will be friends if the treats of their personality are somehow close. In the following we present the model with structured nodes (Section 2), we analyse it (Section 3) and we use it to generate specific biological networks (Section 4). The paper ends with a discussion section (Section 5). Supplementary material (further technical details, generated networks, program implementing the proposed network model, etc.) is present at [11]. 2 Description of the model The network model with structured node (SN model) is such that each node in the network has a structure: a word over a specified alphabet. Given initial nodes have different structure. Nodes are added to the network one by one. Each new node has a structure given by the modification of a randomly chosen structure already present in the network. If the structure of the new node is already present in the network, then the new node is not added (that is, in the network all nodes have different structure). If the structure of the new node is not present in the network and the new node has no edge with the existing nodes, then the new node is not added (that is, isolated nodes are not allowed). Undirected edges are added to the network depending on a given distance between node structures. This process is repeated until the network 2 reaches a given number of nodes. A simple example follows. Let us assume that the alphabet is {A, B, C} and that the network contains only one initial node with structure ABCABC. Edges between nodes are added only if the Hamming distance [18] between the structures of the nodes is at most 1. A node can be added to the network by mutating one symbol in the structure of an existing node. For instance, the node ABBABC can be obtained mutating the third symbol of ABCABC. An edge is added between the two nodes (they only differ in one symbol). A third node can be added to the network by adding one symbol to the structure of a randomly selected existing node. For instance, the node ABBABBC can be obtained adding a B between B and C in node ABBABC. An edge is added between the new node and ABBABC (when computing the distance between two structures exceeding symbols in the longer structure are disregarded). No edge is added between the new node and ABCABC because there are 2 differences in their first 6 characters. The structure ABCBC can be obtained from ABCABC deleting the second B. The node with this new structure does not become part of the network as no edge has been added (the distance between ABCBC and the other structures present in the network is bigger than 1). The structure ABBBBABBC can be obtained from ABBABBC duplicating the second and third B. The node with this new structure does not become part of the network as no edge has been added. Input parameters define the probabilities to mutate, add, delete and duplicate node structures and their values has to sum up to 1. We also used a Hamming distance in which the comparison between symbols considers groups of consecutive symbols. The order of the symbols present in each such group is irrelevant to the distance. For instance, let us consider the two structures ABBABC and BABCAB. If the unit distance is 1 (i.e., symbols are compared one by one), then the distance between the two structures is 5 as the only matching symbol is the B in the third position. If the unit distance is 2 (i.e., pairs of symbols are compared), then the distance between the two structures is 2. This is because the first two pairs are considered equal (AB and BA differ only in the order of the symbols), and the other two pairs are different in the symbols they contain. If the unit distance is 3 (i.e., triplets of symbols are compared), then the distance between the two structures is 0. This is because the first triples are considered equal (ABB and BAB differ only in the order of symbols) as well as the second triple (ABC and CAB differ only in the order of symbols). An edge between two nodes is present only if their distance is smaller/equal than the value of the input parameter maximum distance. When unit distance is bigger than 1, then it is possible to have a file matches indicating how the different groups of symbols can be matched to eachother. In other words, a file matches behaves as the genetic code: it denotes which tuples of symbols have to be regarded as equal (in the same way different codons translate in the same amino acid). For instance, let unit distance be 2, the 3 alphabet be {A, B}, and the file matches be: AB = BA = AA = BB BB = AA With this file matches, the strings ABBB and ABAA have distance 0. This is because the first pair (AB) is the same in both strings, while the second pair (BB and AA) is defined by the file matches to be equal. Without the file matches, the two string have distance 1 (due to the second pair). We call instance a set of input parameters. The complete list of input parameters together with their description can be found in the user manual of the program implementing the SN model [11]. 3 Analysis of the model We assessed our network model over the following network topological features [10]. Given an undirected network G with N nodes and k edges we denote by hki the average degree, by L the average path length, by C the average clustering coefficient, by P (k) the degree distribution and by C(k) the clustering coefficient distribution. We also considered the: 3-node motifs distribution, that is the number (normalised to 1) of triples of nodes having no edge, only 1 edge, only 2 edges and 3 edges between themselves; path length distribution, denoted by P L(ℓ), relating the number (normalised to one) of paths having a certain length ℓ; heterogeneity index, denoted by ρ(G) (where G is the network), a new formulation of Randić index introduced in [7, 6]. In [7, 6] it is also shown that the Barabási-Albert model is not able to generate network with a heterogeneity index as high as the one found in biological networks. We compared the network generated by an instance our the SN model with the network generated by the Barabási-Albert model (our implementation of this model is based on the Fortran implementation present at [16]). For this purpose we run the Barabási-Albert model starting with a clique of 6 nodes and adding 6 edges for each new added node. We also run the following instance of our network model: initial node ABCDEFGHILMN, alphabet A, ..., T, probability to mutate 1 (which implies that the length of the node structures is equal to the one of the initial node), Hamming distance having unit distance 2 and maximum distance 2. We run these simulation for 3000 iterations storing the resulting intermediate networks every 500 iterations. These tests run 100 times for different random seeds. 4 Figure 1 shows how the average degree, average path length and average clustering coefficient change in the Barabási-Albert model and in the SN model. 19 5 18 A 17 16 B 4.5 SN BA SN BA 4 <k>15 L 3.5 14 13 3 12 11 500 1000 1500 2000 2500 2.5 500 3000 1000 1500 N 2000 2500 3000 N 100 C SN BA 10−1 C 10−2 10−3 500 1000 1500 2000 2500 3000 N Figure 1: (A) average degree, (B) average path length and (C) average clustering coefficient of a growing Barabási-Albert model network (BA) and a growing SN model network. The average path length follows the same curve in both models and the average degree slowly grows in the SN model while it remain constant in the Barabási-Albert model. The major difference is present in the clustering coefficient: in remains constant in the SN model while it decreases fast in the Barabási-Albert model. It is known that empirical networks have a clustering coefficient independent from their size and in [15] a variant of the BarabásiAlbert model generating networks with a power law degree distribution and a clustering coefficient independent from the size of the network was presented. The motif distribution was similar in both model (data not shown). It is well known that the Barabási-Albert model generates networks with a degree distribution following a power law P (k) ∼ k −γ . The same holds true for the considered instance of the SN model (this is not true for all instances of the SN model). In both models the exponent of the power law does not change during growth. Anyhow, in the considered instance, the degree distribution of the networks generated by the SN model is not following a power law in its initial phases. This is shown in Fig. 2A where it can be seen that only after k = 5 the degree distribution follows a power law. This difference with the Barabási-Albert model is mainly due to the fact that in the Barabási-Albert model each new added node 5 has a fixed number of edges (6 in the case considered by us), while this request for a minimum number of edges is not present in the SN model. We run another instance of the SN model for 55000 iterations and then we let all nodes having less than 5 edges to be removed from the generated networks together with their edges. The resulting networks, having around 3000 nodes, have a power law degree distribution Fig. 2B. 100 10−1 A B 10−1 10−2 P(k) P(k) 10−2 10−3 10−3 10−4 0 10 101 102 10−4 0 10 103 k 101 k 102 Figure 2: Degree distribution of two instances of the SN model: (A): keeping all nodes (final trend having slope γ = −1.72), (B) removing nodes with less than 5 edges together with their edges (trend having slope γ = −2.98). As already said, in the SN model new nodes are added to the network first selecting the structure of a node already in the network, then changing it and finally adding it to the network. In order to study if the selection criteria had an influence on the generated network we run a variant of the SN model. In this variant new nodes are added all at once and their structure is a modification of the structure of the nodes initially present. So, the difference is that only the initial structures are used as template for the new added structures. Network generated in this way showed a very low average clustering coefficient (around 0.002) and their degree distribution did not follow a power low (see supplementary material [11]). From this we conclude that, in the SN model, the incremental addition of new nodes to the network (as opposed to the addition of the nodes all at once) is a necessary element in order to have a power low degree distribution and a high average clustering coefficient. 4 Reproduced networks Different instances allow the SN model to generate networks with different topological features. In this section we describe how this model can generate networks having topological features similar to the ones of some empirical networks. We followed a trial-and-error approach in order to find the input parameters to ‘fit the networks’: manually testing different instances until a ‘sufficiently good’ result was found. We are confident that a different approach, either analytical 6 or based on heuristics (i.e., evolutionary algorithms [4]), could lead to better results. All the (input and output) files related to the reproduced network described in the following are available from [11]. We successfully generated networks having strong similarities with the MRSA gene network (data not shown). C. Elegans neural network. In [17] it is reported that the neural network of C. Elegans has 282 nodes (neurons), an average degree of 14, an average path length of 2.65 and an average clustering coefficient of 0.28. We were not able to retrieve a description of this network, so we only tried to match the just given network topological features. Using the described network model we run tests having: {A, T} as alphabet, ATATATATATAT as structure of the only initial node, probability to mutate equal to 1, unit distance equal to 2 and nodes have a common edge only if their Hamming distance is smaller than 1. The generated networks with 282 nodes have (average on 100 tests): 13.94 as average degree, 3.61 as average path length and 0.3 as average clustering coefficient. The 100 generated networks have a low variance on these values: 61% have at most 10% discrepancy from the average results (see supplementary material [11]). E. Coli protein-protein interaction network. In [8] the protein-protein interaction (PPI) network of E. Coli was published. The biggest connected component of this network consist of 230 nodes, it has an average degree of 6.04, an average path length of 3.78, an average clustering coefficient of 0.22 and a heterogeneity index of 0.24. Using the SN model we run tests having: {A, T, C} as alphabet, ATCATCTCATCACT as structure of the only initial node, probability to mutate equal to 0.4, probability to duplicate equal to 0.6, unit distance equal to 2, using the file matches considered to reproduce the MRSA gene network and nodes have a common edge only if their Hamming distance is smaller/equal than 1. The generated networks with 230 nodes have (average over 100 tests): 6.03 as average degree, 3.85 as average path length, 0.47 as average clustering coefficient and 0.26 as heterogeneity index. The variance of these networks is rather big: only 3% have at most 10% dicsrepancy from the average results while only 24% have at most 20% discrepancy from the average results (see supplementary material [11]). In general, we noticed that the probability to duplicate increases the heterogeneity index of a network but also increases the variance of the generated networks. The degree distribution of the given network follows a power low with trend γ = −1.06. The degree distribution of the networks generated by us also follow a power law but (average over 100 tests) with trend γ = 0.72. It is remarkable that the SN model is able to generate networks with a small number of nodes having a power law as degree distribution. The motif distribution of the generated networks having at most 20% discrepancy from the average results is equal to the one of the give network. The 7 clustering coefficient distribution of the given network has a trend γ = −0.52 while similar trend for the generated networks having at most 20% discrepancy from the average results is γ = −0.47. The path length distribution of the given network and of one of the generated networks having at most 20% discrepancy from the average results is depicted in Fig. 3. 0.35 0.3 0.25 SN E. Coli PPI 0.2 PL(ℓ) 0.15 0.1 0.05 0 0 2 4 6 8 10 ℓ Figure 3: Path length distribution of the given E. Coli PPI network and a typical outcome of the SN model (SN). 5 Final remarks In this section we give some thoughts about the SN model and we suggest possible directions for research on this model. It seems that the SN model shows that preferential attachment is not necessary to generate networks having a power law degree distribution. Can it be the preferential attachment is somehow ‘hidden’ in the SN model? We think that preferential attachment is ‘hidden’ in the combination of structured nodes and Hamming distance. Anyhow, it is surprising that these two simple concepts (Hamming distance is rather simple when compared to the reasons behind the interactions in gene and protein networks) can behave as preferential attachment and, in some cases, (as for the average clustering coefficient being independent from the network size or the high heterogeneity index) be better in reproducing empirical networks. The study on the SN model is still in its very early stages in order to allow us to say something new about biological networks. We do not think that the SN model can recreate all empirical networks or all features of some empirical network, anyhow, it is interesting to note that this model can recreate a broad range of topological features present in empirical networks of different nature. Of course, the big number of input parameters (and their domain) of the SN model allows to ‘tune’ some of the features of the generated networks more than what possible with other network models. As we said, we used a ‘trial-and-error’ approach in order to find the instances of the SN model generating the networks considered by us. For some of these networks we got pretty close results, for others less good results. We did not 8 aim to have an exact match for the empirical networks considered by us, we aimed to show the broad range of topological features that can be matched by the SN model. It is definitely interesting to study the classes of networks that can be generated by the SN model upon changes in its input parameters. Moreover, extensions to the model will allow it to generate directed networks, to evolve networks or to use the generated networks for other studies. For instance, one might need to have networks with a specific motif distribution in order to study their dynamics. Acknowledgements We gratefully acknowledge Ian Overton for providing the MRSA network. References [1] R. Albert and A.-L. Barabàsi. Statistical mechanics of complex networks. Reviews of Modern Physics, 74:47–97, 2002. [2] U. Alon. An introduction to Systems Biology. Chapman & Hall, 2006. [3] A.-L. Barabàsi and R. Albert. Emergence of scaling in random networks. Science, 286:509–512, 1999. [4] K. Deb. Multi-objective Optimization Using Evolutionary Algorithms. Wiley-Blackwell, 2008. [5] P. Erdös and A. Rényi. On random graphs. Publicationes Mathematicae, 6:290–297, 1959. [6] E. Estrada. Quantifying network heterogeneity. Technical Report 25, University of Strathclyde, 2010. Available from http://www.mathstat.strath.ac.uk/research/reports/2010. [7] E. Estrada. Randić index, irregularity and complex biomolecular networks. Acta Chimica Slovenica, 57:597–603, 2010. [8] G. Butland et al. Interaction network containing conserved and essential protein complexes in excherichia coli. Nature, 433:531–537, 2005. [9] H. Jeong, B. Tombor, R. Albert, Z. N. Oltvai, and A. L. Barabási. The large-scale organization of metabolic networks. Nature, 407:651–654, 2000. [10] B. H. Junker and F. Schreiber, editors. Analysis of Biological Networks. Wiley-Blackwell, 2008. [11] Supplementary material. http://www.macs.hw.ac.uk/∼pier/download.html. [12] R. Milo, S. Itzkovitz, N. Kashtan, R. Levitt, S. Shen-Orr, I. Ayzenshtat, M. Sheffer, and U. Alon. Superfamilies of evolved and designed networks. Science, 303:1538–1542, 2004. 9 [13] R. Milo, S. Shen-Orr, S. Itzkovitz, N. Kashtan, D. Chklovskii, and U. Alon. Network motifs: simple building blocks of complex networks. Science, 298(5594):824–827, 2002. [14] E. Ravasz, A. L. Somera, D. A. Mongru, Z. N. Oltvai, and A. L. Barabási. Hierarchical organization of modularity in metabolic networks. Science, 297:1551–1555, 2002. [15] E. Ravasz, A. L. Somera, D. A. Mongru, Z. N. Oltvai, and A.-L. Barabási. Hierarchical organization of modularity in metabolic networks. Science, 297:1551–1555, 2002. [16] NWB Team. Network Workbench Tool. Indiana University and Northeastern University, 2006. http://nwb.slis.indiana.edu. [17] D. J. Watts and S. H. Strogatz. Collective dynamics of ‘small-world’ networks. Nature, 393:440–442, 1998. [18] Wikipedia. http://www.wikipedia.org. 10
5cs.CE
Un résultat intrigant en commande sans modèle Discussing an intriguing result on model-free control Cédric Join1,5,6 , Emmanuel Delaleau2 , Michel Fliess3,5 , Claude H. Moog4 1 arXiv:1711.02877v1 [cs.SY] 8 Nov 2017 CRAN (CNRS, UMR 7039), Université de Lorraine, BP 239, 54506 Vandœuvre-lès-Nancy, France. [email protected] 2 Département de Mécatronique, École nationale d’ingénieurs de Brest, 29280 Plouzané, France. [email protected] 3 LIX (CNRS, UMR 7161), École polytechnique, 91128 Palaiseau, France. [email protected] 4 LS2N (CNRS, UMR 6004), 44321 Nantes 03, France. [email protected] 5 AL.I.E.N. (ALgèbre pour Identification & Estimation Numériques), 7 rue Maurice Barrès, 54330 Vézelise, France. {michel.fliess, cedric.join}@alien-sas.com 6 Projet Non-A, INRIA Lille – Nord-Europe, France RÉSUMÉ. Un exemple mathématique élémentaire prouve, grâce au critère de Routh-Hurwitz, un résultat à l’encontre de la pratique actuelle en commande sans modèle : il peut y avoir plus de difficultés à régler un correcteur proportionnel « intelligent » (iP) qu’un proportionnel-dérivé intelligent (iPD). Les simulations numériques de l’iPD et d’un PID classique tournent largement en faveur du premier. Introduction et conclusion analysent la commande sans modèle à la lumière des avancées actuelles. ABSTRACT. An elementary mathematical example proves, thanks to the Routh-Hurwitz criterion, a result that is intriguing with respect to today’s practical understanding of model-free control, i.e., an “intelligent” proportional controller (iP) may turn to be more difficult to tune than an intelligent proportional-derivative one (iPD). The vast superiority of iPDs when compared to classic PIDs is shown via computer simulations. The introduction as well as the conclusion analyse model-free control in the light of recent advances. MOTS-CLÉS. Commande sans modèle, correcteurs iP, correcteurs iPD, PID, critère de Routh-Hurwitz, réparation, apprentissage, intelligence artificielle. KEYWORDS. Model-free control, iP controllers, iPD controllers, PID, Routh-Hurwitz criterion, fault accommodation, machine learning, artificial intelligence. La première fois qu’Aurélien vit Bérénice, il la trouva franchement laide. Aragon (Aurélien. Paris : Gallimard, 1944) 1. Introduction 1.1. Généralités Les faits suivants sont connus de tout automaticien : — Écrire un « bon » modèle mathématique d’une machine réelle, c’est-à-dire non idéalisée, comme en physique fondamentale, est redoutable, voire impossible. Ainsi s’explique la popularité industrielle stupéfiante des correcteurs PID (voir, par exemple, [Åström & Hägglund (2006)], [Franklin et coll. (2015)], [Janert (2014)], [Lunze (1996)], [O’Dwyer (2009)], [Rotella & Zambettakis (2008)]). Une telle modélisation y est sans objet. — Le tribut est lourd : — performances médiocres, — défaut de robustesse, — réglage laborieux des gains. c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 1 La « commande sans modèle », ou model-free control, [Fliess & Join (2013)] et ses correcteurs « intelligents » ont été inventés pour combler ces lacunes. De nombreuses publications récentes, dans les domaines les plus divers, démontrent leur efficacité et simplicité, non seulement en France, mais aussi, et même davantage, à l’étranger : voir, par exemple, les références de [Fliess & Join (2013)], et [Abouaïssa et coll. (2017b)], [Abouaïssa et coll. (2017a)] et leurs références. La bibliographie de [Fliess & Join (2013)] atteste que la dénomination model-free control apparaît maintes fois dans la littérature, mais en des sens distincts du nôtre. L’importance croissante de l’intelligence artificielle et de l’apprentissage, au travers des réseaux de neurones notamment, s’est fort naturellement greffée au sans-modèle : voir, par exemple, [Cheon et coll. (2015)], [Lillicrap et coll. (2016)], [Luo et coll. (2016)], [Mnih et coll. (2015)], [Radac & Precup (2017)], [Radac et coll. (2017)]. Nos techniques, sans nul besoin de calculs lourds [Join et coll. (2013)], éludent cette tendance actuelle de l’informatique (voir [Gédouin et coll. (2011)], [Lafont et coll. (2015)], [Menhour et coll. (2017)] pour des illustrations concrètes). 1.2. Bref aperçu de la commande sans modèle 1 On remplace le modèle global inconnu par le modèle ultra-local : y (ν) = F + αu (1) — Les variables u et y désignent respectivement la commande et la sortie. — L’ordre de dérivation, choisi par l’ingénieur, ν ≥ 1 est 1, en général. Parfois, ν = 2. On n’a jamais rencontré ν ≥ 3 en pratique. — L’ingénieur décide du paramètre α ∈ R de sorte que les trois termes de (1) aient même magnitude. Une identification précise de α est, donc, sans objet. — On estime F grâce aux mesures de u et y. — F subsume non seulement la structure inconnue du système mais aussi les perturbations externes 2 . Si ν = 2, on ferme la boucle avec un régulateur intelligent proportionnel-intégral-dérivé, ou iPID, c’està-dire une généralisation des PID classiques, R Festim − ÿ ∗ − KP e − KI e − KD ė (2) u=− α — Festim est une estimée F . — y ∗ est la trajectoire de référence. — e = y ∗ − y est l’erreur de poursuite. — KP , KI , KD ∈ R sont les gains. Il vient, d’après (1) et (2), Z ë + KD ė + KP e + KI e = Festim − F (3) On obtient une « bonne » poursuite si l’estimée Festim est « bonne », c’est-à-dire F − Festim ' 0. Contrairement aux PID classiques, (3) prouve la facilité, ici, du choix des gains. 1. Pour plus de détails, voir [Fliess & Join (2013)]. 2. Cette distinction entre structure interne et perturbations externes se retrouve partout. Elle ne présente, à notre avis, aucune évidence a priori. Les confondre est une percée conceptuelle indubitable. Comparer avec « la commande par rejet actif de perturbations », ou Active Disturbance Rejection (ADRC) (voir, par exemple, [Sira-Ramírez et coll. (2017)]). c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 2 Si KD = 0 on a un régulateur intelligent proportionnel-intégral, ou iPI, R Festim − ÿ ∗ − KP e − KI e u=− α Si KI = 0 on a un régulateur intelligent proportionnel-dérivé, ou iPD, Festim − ÿ ∗ − KP e − KD ė u=− α (4) Le plus fréquemment, ν = 1. On obtient alors un régulateur intelligent proportionnel, ou iP, u=− Festim − ẏ ∗ − KP e α (5) Remarque. Voir [Delaleau (2014)] pour une autre approche de la stabilisation. Voici deux exceptions où un iPD est employé avec ν = 2 : [De Miras et coll. (2013)], [Menhour et coll. (2017)] 3 . 1.3. But Cet article exhibe un exemple linéaire, ÿ − ẏ = u, a priori élémentaire, où un iPD doit remplacer un iP, contrairement à ce que l’on aurait pu croire naïvement. L’explication repose sur le critère bien connu de Routh-Hurwitz (voir, par exemple, [Gantmacher (1966)]). Il démontre l’« étroitesse » de l’ensemble des paramètres stabilisants {α, KP } en (5). 1.4. Plan Le paragraphe 2. présente notre exemple et les excellents résultats obtenus avec un iPD. Au paragraphe suivant, les difficultés rencontrées avec un iP sont expliquées grâce au critère de Routh-Hurwitz. L’équivalence démontrée en [d’Andréa-Novel et coll. (2010)], [Fliess & Join (2013)] entre PID et iPD nous conduit à comparer leurs performances au paragraphe 4. : l’avantage des iPD y est manifeste. On en déduit en conclusion quelques pistes de réflexions sur les correcteurs intelligents associés au sansmodèle. 2. Notre exemple 2.1. Présentation Soit le système linéaire, stationnaire et instable, ÿ − ẏ = u (6) 3. La littérature sur les illustrations du sans-modèle contient plusieurs exemples avec emploi d’un iPID et ν = 2, mais sans justification aucune, comme l’absence de frottements [Fliess & Join (2013)]. Un iP avec ν = 1 aurait suffi peut-être. D’où une implantation encore plus simple. c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 3 Commande Sortie 15 1.2 1 10 0.8 5 0.6 0.4 0 0.2 -5 0 -10 -0.2 0 5 10 15 20 25 30 0 5 Time(s) 10 15 20 25 30 Time(s) (a) Commande (b) Sortie, trajectoire de référence (- -) Figure 1.: iPD D’après (1), il vient, si ν = 1, F = −αÿ + (1 + α)ẏ (7) L’iP déduit des calculs de [Fliess & Join (2013)] fonctionne mal. 2.2. iPD Avec un iPD (4), ν = 2 en (1), on remplace (7) par F = (1 − α)ÿ + αẏ Les simulations numériques de la figure 1, déduites des calculs de [Fliess & Join (2013)], sont excellentes. On choisit α = 0.5 et les gains KP and KD tels que (s + 0.5)2 est le polynôme caractéristique de la dynamique d’erreur. On introduit un bruit additif de sortie, blanc, centré et gaussien, d’écart type 0.01. La condition initiale est y(0) = −0.05. 3. Pourquoi l’implantation de l’iP échoue-t-elle ? Tentons de comprendre l’échec de l’implantation de l’iP. Il vient pour (3) : ė + KP e = Festim − F (8) où F provient de (7). Il est loisible d’écrire Festim dans le domaine opérationnel (voir, par exemple, [Erdélyi (1962)]) : Festim = −α s2 s y + (1 + α) y (T s + 1)2 (T s + 1) (9) — Festim et y sont les analogues opérationnels 4 de Festim et y, 4. La terminologie « transformées de Laplace » est beaucoup plus usuelle, comme chacun le sait. c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 4 (a) Pour tout T (b) T = 0.1s Figure 2.: Domaine de stabilité pour (KP , α, T ) s (T s+1) 2 s et (T s+1) 2 représentent des filtres dérivateurs d’ordres 1 et 2, où T > 0 est la constante de temps (voir, par exemple, [Leich & Boite (1980)]). Il est loisible de poser y ∗ ≡ 0 pour étudier la stabilité. Alors, e = −y. Grâce à (6)-(9), on obtient le polynôme caractéristique     KP 1 KP 1 2 KP 2 4 3 2 2 − 2T T s + s (2T − T ) + s −2T + T (1 + ) − T +s − α α α α α On utilise le critère de stabilité de Routh-Hurwitz (voir, par exemple, [Gantmacher (1966)], et [Franklin et coll. (2015)], [Lunze (1996)], [Rotella & Zambettakis (2008)]). La figure 2 montre, avec une discrétisation convenable, l’étroitesse de l’ensemble {α, KP } des paramètres stabilisants, y compris en tenant compte de la constante de temps T . La difficulté de trouver un iP satisfaisant pour (6) se trouve confirmée. Ajoutons que la valeur « évidente » α = −1 ne convient jamais 5 . — 4. Comparaison entre iPD et PID En [d’Andréa-Novel et coll. (2010)], [Fliess & Join (2013)] est démontrée une certaine équivalence entre iPD (4) et PID usuels : Z u = kP e + kI e + kD ė (kP , kI , kD ∈ R) 5. La valeur α = −1 est « évidente » car, alors, F = ÿ en (7). On retrouve (6). c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 5 Commande Sortie 3 1.2 1 2 0.8 1 0.6 0 0.4 -1 0.2 -2 0 -3 -0.2 0 5 10 15 20 25 30 0 5 10 Time(s) 15 20 25 30 Time(s) (a) Commande (b) Sortie, trajectoire de référence (- -) Figure 3.: PID Commande Sortie 4 1.2 3 1 2 0.8 1 0.6 0 0.4 -1 0.2 -2 0 -3 -0.2 0 5 10 15 20 25 30 0 5 Time(s) 10 15 20 25 30 Time(s) (a) Commande (b) Sortie, trajectoire de référence (- -) Figure 4.: PID avec δ = 0.8 On détermine kP , kI , kD de sorte que (s + 0.66)3 soit le polynôme caractéristique de la dynamique d’erreur. On assure ainsi un temps de réponse égal à celui du paragraphe 2.2., à ±5% près. Les résultats de la figure 3 sont satisfaisants 6 quoiqu’inférieurs à ceux de la figure 1 pour l’iPD 7 . Afin de tester la robustesse, modifions (6) : ÿ − ẏ = δu où δ, 0 ≤ δ ≤ 1, correspond à une perte de puissance de l’actionneur 8 . Avec δ = 0.8, figures 4 and 5 révèlent un meilleur comportement de l’iPD. Cette supériorité s’accentue si δ = 0.5 : voir figures 6 et 7. 6. Un réglage plus soigneux du PID les améliorerait peut-être. 7. Même bruit qu’au paragraphe 2.2. 8. Comparer avec la « réparation », ou fault accommodation, en [Fliess & Join (2013)]. Voir, aussi, [Lafont et coll. (2015)]. c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 6 Commande Sortie 15 1.2 1 10 0.8 5 0.6 0.4 0 0.2 -5 0 -10 -0.2 0 5 10 15 20 25 30 0 5 10 Time(s) 15 20 25 30 Time(s) (a) Commande (b) Sortie, trajectoire de référence (- -) Figure 5.: iPD avec δ = 0.8 Commande Sortie 4 1.2 3 1 2 0.8 1 0.6 0 0.4 -1 0.2 -2 0 -3 -0.2 0 5 10 15 20 25 30 0 5 10 Time(s) 15 20 25 30 Time(s) (a) Commande (b) Sortie, trajectoire de référence (- -) Figure 6.: PID avec δ = 0.5 Commande Sortie 15 1.2 1 10 0.8 5 0.6 0.4 0 0.2 -5 0 -10 -0.2 0 5 10 15 20 25 30 0 5 Time(s) 10 15 20 25 30 Time(s) (a) Commande (b) Sortie, trajectoire de référence (- -) Figure 7.: iPD avec δ = 0.5 c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 7 5. Conclusion Diverses questions découlent de cette étude : 1. L’iP et l’iPD sont les deux seuls correcteurs intelligents qui devraient importer. Les autres, comme iPI et iPID, ne joueront, sans doute, qu’un rôle marginal. 2. L’iPD s’impose ici grâce à l’examen d’une équation donnée. Exhiber d’autres équations de systèmes jouissant de cette propriété est un but intellectuel légitime. Mais que faire sans modèle ? Procéder par essais et erreurs ? Tenir compte des propriétés qualitatives de la machine ? Un mélange des deux ? Voilà encore une interrogation épistémologique nouvelle, due au surgissement de la commande sans modèle 9 . 3. La preuve repose sur le choix des filtres dérivateurs. Une analyse indépendante d’une telle approche reste à découvrir. Elle permettrait une meilleure compréhension du phénomène. Bibliographie ABOUAÏSSA H., ALHAJ HASAN O., JOIN C., FLIESS M., DEFER D., « Energy saving for building heating via a simple and efficient model-free control design : First steps with computer simulations ». 21st International Conference on System Theory, Control and Computing, Sinaia, 2017a. https://hal.archives-ouvertes.fr/hal-01568899/en/ ABOUAÏSSA H., FLIESS M., JOIN C., « On ramp metering : Towards a better understanding of ALINEA via model-free control ». International Journal of Control, 90 (2017b) : 1018-1026. d’ANDRÉA-NOVEL B., FLIESS M., JOIN C., MOUNIER H., STEUX B., « A mathematical explanation via “intelligent” PID controllers of the strange ubiquity of PIDs ». 18th Mediterranean Conference on Control & Automation, Marrakech, 2010. https://hal.archives-ouvertes.fr/inria-00480293/en/ ÅSTRÖM K.J., HÄGGLUND T., Advanced PID Control. Research Triangle Park, NJ : Instrument Society of America, 2006. CHEON K., KIM J., HAMADACHE M., LEE D., « On replacing PID controller with deep learning controller for DC motor system ». Journal of Automation and Control Engineering, 3 (2015) : 452-456. DELALEAU E., « A proof of stability of model-free control ». 2014 IEEE Conference on Norbert Wiener in the 21st Century (21CW), Boston, 2014. DE MIRAS J., JOIN C., FLIESS M., RIACHY S., BONNET S., « Active magnetic bearing : A new step for model-free control ». 52nd IEEE Conference on Decision and Control, Florence, 2013. https://hal.archives-ouvertes.fr/hal-00857649/en/ ERDÉLYI A., Operational Calculus and Generalized Functions. New York : Holt Rinehart and Winston, 1962. FLIESS M., JOIN C., « Model-free control ». International Journal of Control, 86 (2013) : 2228-2252. FRANKLIN G.F., POWELL J.D., EMAMI-NAEINI A., Feedback Control of Dynamic Systems (7th ed.). Harlow : Pearson, 2015. GANTMACHER F.R., Théorie des matrices, t. 2 (traduit du russe). Paris : Dunod, 1966. GÉDOUIN P.-A., DELALEAU E., BOURGEOT J.-M., JOIN C., ARBAB CHIRANI S., CALLOCH S., « Experimental comparison of classical PID and model-free control: Position control of a shape memory alloy active spring ». Control Engineering Practice, 19 (2011) : 433-441. JANERT P.K., Feedback Control for Computer Systems. Sebastopol, CA : O’Reilly Media, 2014. JOIN C., CHAXEL F., FLIESS M., « “Intelligent” controllers on cheap and small programmable devices ». 2nd International Conference on Control and Fault-Tolerant Systems, Nice, 2013. https://hal.archives-ouvertes.fr/hal-00845795/en/ LAFONT F., BALMAT J.-F., PESSEL N., FLIESS M., « A model-free control strategy for an experimental greenhouse with an application to fault accommodation ». Computers and Electronics in Agriculture, 110 (2015) : 139-149. 9. À ce sujet, voir aussi la conclusion de [Fliess & Join (2013)]. c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 8 LEICH H., BOITE J., Les filtres numériques : Analyse et synthèse des filtres unidimensionnels. Paris : Masson, 2013. LILLICRAP T.P., HUNT J.J., PRITZEL A., HEESS N., EREZ T., TASSA Y., SILVER D., WIERSTRA D., « Continuous control with deep reinforcement learning ». 6th International Conference on Learning Representations, Vancouver, 2016. LUNZE J., Regelungstheorie 1. Berlin : Springer, 1996. LUO B., LIU D., HUANG T., WANG D., « Model-free optimal tracking control via critic-only Q-learning ». IEEE Transactions on Neural Networks and Learning Systems, 27 (2016) : 2134-2144. MENHOUR L., D’ANDRÉA-NOVEL B., FLIESS M., GRUYER D., MOUNIER H., « An efficient model-free setting for longitudinal and lateral vehicle control. Validation through the interconnected pro-SiVIC/RTMaps prototyping platform ». IEEE Transactions on Intelligent Transportation Systems, (2017) : DOI: 10.1109/TITS.2017.2699283 MNIH V., KAVUKCUOGLU K., SILVER D., RUSU A.A., VENESS J., BELLEMARE M.G., GRAVES A., RIEDMILLER M., FIDJELAND A.K., OSTROVSKI G., PETERSEN S., BEATTIE C., SADIK A., ANTONOGLOU I., KING H., KUMARAN D., WIERSTRA D., LEGG S., HASSABIS D., « Human-level control through deep reinforcement learning ». Nature, 518 (2015) : 529-533. O’DWYER A., Handbook of PI and PID Controller Tuning Rules (3rd ed.). Londres : Imperial College Press, 2009. RADAC M.-B., PRECUP R.E., « Data-driven model-free slip control of anti-lock braking systems using reinforcement Q-learning ». Neurocomputing, (2017) : http://dx.doi.org/10.1016/j.neucom.2017.08.036 RADAC M.-B., PRECUP R.E., ROMAN R.C., « Model-free control performance improvement using virtual reference feedback tuning and reinforcement Q-learning ». International Journal of Control, 48 (2017) : 1071-1083. ROTELLA F., ZAMBETTAKIS I., Automatique élémentaire. Paris : Hermès-Lavoisier, 2008. S IRA -R AMÍREZ H., L UVIANO -J UÁREZ A., R AMÍREZ -N ERIA M., Z URITA -B USTAMANTE E.W., Active Disturbance Rejection Control of Dynamic Systems: A Flatness Based Approach. Oxford & Cambridge, MA : Elsevier, 2017. c 2017 ISTE OpenScience – Published by ISTE Ltd. London, UK – openscience.fr Page | 9
2cs.AI
TLP 12 (4–5): 421–426, July 2012. arXiv:1210.3937v1 [cs.PL] 15 Oct 2012 DOI: 10.1017/S1471068412000300 c 2012 Cambridge University Press 1 Printed in the United Kingdom Introduction to the 28th International Conference on Logic Programming Special Issue Agostino Dovier Dip. di Matematica e Informatica, Univ. di Udine, Italy (e-mail: [email protected]) Vı́tor Santos Costa CRACS INESC-TEC and Dep. de Ciência de Computadores, Univ. do Porto, Portugal (e-mail: [email protected]) submitted 1 January 2003; revised 1 January 2003; accepted 1 January 2003 We are proud to introduce this special issue of the Journal of Theory and Practice of Logic Programming (TPLP), dedicated to the full papers accepted for the 28th International Conference on Logic Programming (ICLP). The ICLP meetings started in Marseille in 1982 and since then constitute the main venue for presenting and discussing work in the area of logic programming. We contributed to ICLP for the first time in 1991. The first guest-editor had a paper on logic programming with sets, and the second had two papers on the parallel implementation of the Andorra model. Since then, we continued pursuing research in this exciting area and ICLP has always been the major venue for our work. Thus, when the ALP EC committee kindly invited us for chairing the 2012 edition we were delighted to accept. We particularly appreciate the honor and responsability of organising ICLP in Budapest. Hungary has had a central role both in implementation and in the application of logic programming. Indeed, the role of Hungary in general in Computer Science is widely recognized, and organizing this meeting in the town of John von Neumann, one of the “talent-scouts” of Turing, in the centenary of the birth of the latter, is just another reason for justifying the fact that the fascinating Budapest is the unique town to host ICLP twice. Publishing the ICLP full papers as a special issue is a joint initiative taken by the Association for Logic Programming and by Cambridge University Press. The goal is to achieve fast journal publication of the highest quality papers from the logic programming community, by selecting the best ICLP submissions before the meeting. This approach benefits the authors, by facilitating journal publication, and benefits the community, by allowing researchers to access high quality journal papers on the more recent and important results in the field. Quality is ensured by a two-step refereeing process, and by an active and very much participating program committee. The approach was first experimented in 2010, and has had favorable feedback since. 2 A. Dovier and V. Santos Costa This year, ICLP sought contributions in all areas of logic programming, including but not restricted to the following areas. Theory: Semantic Foundations, Formalisms, Non- monotonic Reasoning, Knowledge Representation; Implementation: Compilation, Memory Management, Virtual Machines, Parallelism; Environments: Program Analysis, Transformation, Validation, Verification, Debugging, Profiling, Testing; Language Issues: Concurrency, Objects, Coordination, Mobility, Higher Order, Types, Modes, Assertions, Programming Techniques; Related Paradigms: Abductive Logic Programming, Inductive Logic Programming, Constraint Logic Programming, Answer-Set Programming; Applications: Databases, Data Integration and Federation, Software Engineering, Natural Language Processing, Web and Semantic Web, Agents, Artificial Intelligence, Bioinformatics. In response to the call for papers we received 102 abstracts, 90 of which remained as complete submissions. Of these, 81 were submitted as full papers and 9 as technical communications. Each paper was reviewed by at least three anonymous program committee members, selected by the program chairs. Sub-reviewers were allowed. After discussion, involving the whole program committee, 10 submitted papers were considered as deserving of TPLP publication with minor changes. The authors of other 10 submitted paper were asked to address more serious concerns, mostly regarding presentation improvements or more complete experimental validation. 37 papers instead have been judged to deserve a slot for a short presentation at the Meeting and a “technical communication” publication in the Volume 17 of the Leibniz International Proceedings in Informatics (LIPIcs) series. The whole set of accepted papers includes 36 technical papers, 12 application papers, 5 system and tool papers, and 4 papers submitted directly as technical communications. The Conference program was honored to include contributions from three keynote speakers and from a tutorialist. Two invited speakers come from industry, namely Ferenc Darvas from ThalesNano (a Budapest company specialized in developing and providing microscale flow instruments for chemistry), and Mike Elston from SecuritEase (an Australian company developing stock brokering tools). Moreover, Jan Wielemaker, of the VU University Amsterdam, presented an history of the first 25 years of SWI Prolog, one of the major (and free) Prolog releases. Tutorialist Viviana Mascardi from University of Genova (Italy) introduced us to the hot topic of “Logic-based Agents and the Semantic Web”. The first ICLP Conference was organized 30 years to this year, in Marseille. During those 30 years, ICLP has been a major venue in Computer Science. In order to acknowledge some of the major contributions that have been fundamental to the success of LP as a field, the ALP executive committee decided that ICLP should recognize the most influential papers presented in the ICLP and ILPS conferences (ILPS was another major meeting in logic programming, organized until 1998), that, 10 and 20 years onwards, have been shown to be a major influence in the field. As program co-chairs of ICLP2012, we were the first to be charged with this delicate task. We included papers from ICLP 1992 and ILPS 1992 , 20 years onwards, and of ICLP 2002, 10 years onwards. Our procedure was to use biblio-metric information Introduction to the 28th ICLP Special Issue 3 in a first stage, and to use our own personal criteria in a second stage, if necessary. Given that this is the first time this award was given we also considered 1991, and 2001 papers. Although there are an impressive number of excellent papers in 1991 and 1992, one paper emerges with an outstanding record of roughly 600 citations. Further, the paper clearly has a very major influence in the field. The paper is • Michael Gelfond and Vladimir Lifschitz: Representing Actions in Extended Logic Programming. JICSLP 1992: 559-573 The 10 years onward analysis again produced a group of excellent papers (as expected, the number of citations was strictly less than for 20 years old papers). In this case choosing the winner in a very short list was more difficult. Ackowledging their influence over the very active field of Web Databases and Semantic Web, our selection went to: • François Bry and Sebastian Schaffert: Towards a Declarative Query and Transformation Language for XML and Semistructured Data: Simulation Unification. ICLP 2002: 255-270 We therefore invited these authors for an invited talk in a special session at the meeting. We would like to remark that in 2004 three papers were prized as “Most Influential Paper in 20 Years Award from the Association for Logic Programming”. The award went (again) to Gelfond-Lifschitz for their 1988 ICLP/SLP paper on stable model semantics, to Jaffar-Lassez for their POPL 1987 paper on Constraint Logic Programming, and to Saraswat, Rinard, and Panangaden for their POPL 1991 paper on Concurrent Constraint Programming. Together, the journal special issue and the LIPIcs volume of short technical communications constitute the proceedings of ICLP 2012. The list of the 20 accepted full papers appearing in this special issue follows: Disjunctive Datalog with Existential Quantifiers: Semantics, Decidability, and Complexity Issues Mario Alviano, Wolfgang Faber, Nicola Leone, and Marco Manna Towards Multi-Threaded Local Tabling Using a Common Table Space Miguel Areias and Ricardo Rocha Module Theorem for the General Theory of Stable Models Joseph Babb and Joohyung Lee Typed Answer Set Programming Lambda Calculus and Corresponding Inverse Lambda Algorithms Chitta Baral, Juraj Dzifcak, Marcos Gonzalez, and Aaron Gottesman D-FLAT: Declarative Problem Solving Using Tree Decompositions and Answer-Set Programming 4 A. Dovier and V. Santos Costa Bernhard Bliem, Michael Morak, and Stefan Woltran An Improved Proof-Theoretic Compilation of Logic Programs Iliano Cervesato Annotating Answer-Set Programs in LANA Marina De Vos, Doga Gizem Kisa, Johannes Oetsch, Jörg Pührer, and Hans Tompits SMCHR: Satisfiability Modulo Constraint Handling Rules Gregory Duck Conflict-driven ASP Solving with External Sources Thomas Eiter, Michael Fink, Thomas Krennwallner, and Christoph Redl Multi-threaded ASP Solving with clasp Martin Gebser, Benjamin Kaufmann, and Torsten Schaub Model Checking with Probabilistic Tabled Logic Programming Andrey Gorlin, C. R. Ramakrishnan, and Scott Smolka Diagrammatic confluence for Constraint Handling Rules Rémy Haemmerlé Inference in Probabilistic Logic Programs with Continuous Random Variables Muhammad Islam, C.R. Ramakrishnan, and I.V. Ramakrishnan Relational Theories with Null Values and Non-Herbrand Stable Models Vladimir Lifschitz, Karl Pichotta, and Fangkai Yang The Relative Expressiveness of Defeasible Logics Michael Maher Compiling Finite Domain Constraints to SAT with BEE Amit Metodi and Michael Codish Lightweight Compilation of (C)LP to JavaScript Jose F. Morales, Rémy Haemmerlé, Manuel Carro, and Manuel Hermenegildo ASP modulo CSP: The clingcon system Max Ostrowski and Torsten Schaub Annotation of Logic Programs for Independent AND-Parallelism by Partial Evalu- Introduction to the 28th ICLP Special Issue 5 ation German Vidal Efficient Tabling of Structured Data with Enhanced Hash-Consing Neng-Fa Zhou and Christian Theil Have The technical communications, a short paper, and the contributions to the doctoral consortium are published on-line through the Dagstuhl Research Online Publication Server (DROPS), as DOI 10.4230/LIPIcs.ICLP.2012.42. A listing of these papers is reported in the electronic appendix to this preface. We would like to take this opportunity to acknowledge and thank the other ICLP organisers. Without their work and support this event would not have been possible. We would like to start with the General chair Péter Szeredi (Budapest Univ. of Technology and Economics), and all the organizing chairs, namely the Workshop Chair Mats Carlsson (SICS, Sweden), the Doctoral Consortium Chairs Marco Gavanelli (Univ. of Ferrara) and Stefan Woltran (Vienna University of Technology), the Prolog Programming Contest Chair Tom Schrijvers (Universiteit Gent), the Publicity Chair Gergely Lukácsy (Cisco Systems Inc.), and the Web Manager: János Csorba (Budapest Univ. of Technology and Economics). Thanks also to Alessandro Dal Palù for allowing us to publish his pictures of Budapest on the website. We benefited from material and advice kindly given by last year’s program chairs Michael Gelfond and John Gallagher. Thank you very much! On behalf of the whole LP community, we would like to thank all authors who have submitted a paper, the 41 members of the program committee: Elvira Albert (U.C. Madrid), Sergio Antoy (Portland State Univ.), Marcello Balduccini (Kodak Research Laboratories), Manuel Carro (Technical University of Madrid (UPM)), Michael Codish (Ben Gurion Univ.), Veronica Dahl (Simon Fraser Univ.), Marina De Vos (Univ. of Bath), Alessandro Dal Palù (Universita degli Studi di Parma), Bart Demoen (K.U. Leuven), Thomas Eiter (T.U. Wien), Esra Erdem (Sabanci University), Thom Frühwirth (Univ. of Ulm), Andrea Formisano (Univ. of Perugia), Maria Garcia de la Banda (Monash Univ.), Marco Gavanelli (University of Ferrara), HaiFeng Guo (Univ. of Nebraska, Omaha), Gopal Gupta (Univ. of Texas, Dallas), Katsumi Inoue (National Inst. of Informatics, Japan), Angelika Kimmig (K.U. Leuven), Joohyung Lee (Arizona State University), Evelina Lamma (Univ. of Ferrara), Nicola Leone (University of Calabria), Yuliya Lierler (Univ. of Kentucky), Boon Thau Loo (Univ. of Pennsylvania), Michael Maher (R.R.I., Sydney), Alessandra Mileo (DERI Galway), Jose Morales (U.P. Madrid), Enrico Pontelli (New Mexico State Univ.), Gianfranco Rossi (Univ. of Parma), Beata Sarna-Starosta (Cambian, Vancouver), Torsten Schaub (Univ. of Potsdam), Tom Schrijvers (Universiteit Gent), Fernando Silva (Univ. of Porto), Tran Cao Son (New Mexico State University), Terrance Swift (Univ. Nova de Lisboa), Péter Szeredi (Budapest Univ. of Technology and Economics), Francesca Toni (Imperial College London), Mirek Truszczynski (University of Kentucky), Germán Vidal (U.P. of Valencia), Stefan Woltran (Vienna University of Technology), and Neng-Fa Zhou (CUNY, New York). 6 A. Dovier and V. Santos Costa A particular thanks goes to the 96 external referees, namely: Alicia Villanueva, Amira Zaki, Ana Paula Tomás, Andrea Bracciali, Antonis Bikakis, Antonis Kakas, Brian Devries, C. R. Ramakrishnan, Chiaki Sakama, Christoph Redl, Christopher Mears, Dale Miller, Daniel De Schreye, Daniela Inclezan, David Brown, Demis Ballis, Dimitar Shterionov, Dragan Ivanovic, Evgenia Ternovska, Fabio Fioravanti, Fabrizio Riguzzi, Fangkai Yang, Fausto Spoto, Feliks Kluźniak, Francesco Calimeri, Francesco Ricca, Fred Mesnard, Gianluigi Greco, Giovanni Grasso, Gregory Duck, Gregory Gelfond, Inês Dutra, Jesus M. Almendros-Jimenez, Joost Vennekens, Juan Manuel Crespo, Julio Mariño, Kyle Marple, Marco Alberti, Marco Maratea, Mario Alviano, Mário Florido, Marius Schneider, Martin Gebser, Masakazu Ishihata, Massimiliano Cattafi, Matthias Knorr, Maurice Bruynooghe, Max Ostrowski, Michael Bartholomew, Michael Hanus, Michael Morak, Minh Dao-Tran, Mutsunori Banbara, Naoki Nishida, Naoyuki Tamura, Neda Saeedloei, Nicola Capuano, Nicolas Schwind, Noson Yanofsky, Nysret Musliu, Orkunt Sabuncu, Pablo Chico De Guzmán Paolo Torroni, Paul Tarau, Peter James Stuckey, Peter Schüller, Philipp Obermeier, Puri Arenas-Sanchez, Rémy Haemmerlé, Rafael Del Vado Virsela, Ricardo Rocha, Richard Min, Robert Craven, Roland Kaminski, Samir Genaim, Sandeep Chintabathina, Santiago Escobar, Sara Girotto, Sean Policarpio, Simona Perri, Slim Abdennadher, Sofia Gomes, Stefania Costantini, Stefano Bistarelli, Thomas Krennwallner, Thomas Ströder, Tomoya Tanjo, Torben Mogensen, Umut Oztok, Valerio Senni, Victor Marek, Victor Pablos Ceruelo, Wolfgang Dvořák, Wolfgang Faber, Yana Todorova, and Yunsong Meng. Throughout this period, we could always rely on ALP. Our gratitude goes to the ALP president Gopal Gupta, to the Conference chair Manuel (Manolo) Carro, and to all the ALP Executive committe members. We already thanked the invited speakers and the tutorialist above, but we would like to stress here our thank to them. David Tranah (Cambridge) and Ilkka Niemelä (TPLP editor) deserve our thanks for their kindness and their precious support in all publication stages. Similarly, a thanks goes to Marc Herbstritt from Dagstuhl, Leibniz Center for Informatics, for the support in publication of the Technical Communication. Our thanks also go to the the sponsors of the meeting, namely the Association for Logic Programming (ALP), the Artificial Intelligence Section of the John von Neumann Computer Society, the Aquincum Institute of Technology (AIT) of Budapest, Alerant System Inc, and Google (female researchers grant). Finally, a well-deserved thank you goes to Easychair developers and managers. This amazing free software allowed us to save days of low level activities. Similarly, the joint work of the two co-chairs would have been extremely more difficult and expensive without the Dropbox and Skype services. September 2012 Agostino Dovier and Vı́tor Santos Costa Program Committee Chairs and Guest Editors Introduction to the 28th ICLP Special Issue 7 This electronic appendix reports the contents of the Volume 17, Issue 1 (DOI 10.4230/LIPIcs.ICLP.2012.42) of the Leibniz International Proceedings in Informatics (LIPIcs) series, published on-line through the Dagstuhl Research Online Publication Server (DROPS) publishing position papers, technical communications, and doctoral consortium contributed to the 28th International Conference on Logic Programming (ICLP 2012). Position Paper Simulation Unification: Beyond Querying Semistructured Data François Bry, Sebastian Schaffert Technical Communication A Logic Programming approach for Access Control over RDF Nuno Lopes, Sabrina Kirrane, Antoine Zimmermann, Axel Polleres and Alessandra Mileo Modeling Machine Learning and Data Mining Problems with FO(·) Hendrik Blockeel, Bart Bogaerts, Maurice Bruynooghe, Broes De Cat, Stef De Pooter, Marc Denecker, Anthony Labarre, Jan Ramon and Sicco Verwer. Paving the Way for Temporal Grounding Felicidad Aguado, Pedro Cabalar, Martı́n Diéguez, Gilberto Pérez and Concepcion Vidal. Preprocessing of Complex Non-Ground Rules in Answer Set Programming Michael Morak and Stefan Woltran. Two-Valued Logic Programs Vladimir Lifschitz. LOG-IDEAH: ASP for Architectonic Asset Preservation Marina De Vos, Julian Padget, Vivana Novelli and Dina D’Ayala. aspeed: ASP-based Solver Scheduling Holger Hoos, Roland Kaminski, Torsten Schaub and Marius Schneider. Static Type Inference for the Q language using Constraint Logic Programming Zsolt Zombori, János Csorba and Péter Szeredi. ASP at Work: An ASP Implementation of PhyloWS 8 A. Dovier and V. Santos Costa Enrico Pontelli, Tiep Le, Hieu Nguyen and Tran Cao Son. Improving Quality and Efficiency in Home Health Care: an application of Constraint Logic Programming for the Ferrara NHS unit Massimiliano Cattafi, Rosa Herrero, Marco Gavanelli, Maddalena Nonato and Juan José Ramos Gonzalez. An FLP-Style Answer-Set Semantics for Abstract-Constraint Programs with Disjunctions Johannes Oetsch, Jörg Pührer and Hans Tompits. A Tarskian Semantics for Answer Set Programming Marc Denecker, Yuliya Lierler, Mirek Truszczynski and Joost Vennekens. Lazy model expansion by incremental grounding Broes De Cat, Marc Denecker and Peter Stuckey. Logic + control: An example Wlodek Drabent. Tabling for infinite probability computation Taisuke Sato and Philipp Meyer. Improving Lazy Non-Deterministic Computations by Demand Analysis Michael Hanus. Surviving Solver Sensitivity: An ASP Practitioner’s Guide Bryan Silverthorn, Yuliya Lierler and Marius Schneider. On the Termination of Logic Programs with Function Symbols Sergio Greco, Francesca Spezzano and Irina Trubitsyna. Towards Testing Concurrent Objects in CLP Elvira Albert, Puri Arenas and Miguel Gomez-Zamalloa. Generating Event-Sequence Test Cases by Answer SetProgramming with the Incidence Matrix Mutsunori Banbara, Naoyuki Tamura and Katsumi Inoue. Answer Set Solving with Lazy Nogood Generation Christian Drescher and Toby Walsh. Reconciling Well-Founded Semantics of DL-Programs and AggregatePrograms Introduction to the 28th ICLP Special Issue 9 Jia-Huai You, John Morris and Yi Bi. Stable Models of Formulas with Generalized Quantifiers Joohyung Lee and Yunsong Meng. Extending C+ with Composite Actions for Robotic Task Planning Xiaoping Chen, Guoqiang Jin and Fangkai Yang. Deriving a Fast Inverse of the Generalized Cantor N-tupling Bijection Paul Tarau. Unsatisfiability-based optimization in clasp Benjamin Andres, Benjamin Kaufmann, Oliver Matheis and Torsten Schaub. Visualization of Constraint Handling Rules through Source-to-Source Transformation Slim Abdennadher and Nada Sharaf. Applying Machine Learning Techniques to ASP Solving Marco Maratea, Luca Pulina and Francesco Ricca. Flexible Solvers for Finite Arithmetic Circuits Nathaniel Filardo and Jason Eisner. The additional difficulties for the automatic synthesis of specifications posed by logic features in functional-logic languages Giovanni Bacci, Marco Comini, Marco A. Feliú and Alicia Villanueva. Answering Why and How questions with respect to a frame-based knowledge base: a preliminary report Shanshan Liang, Nguyen Ha Vo and Chitta Baral. Logic Programming in Tabular Allegories Emilio Jesús Gallego Arias and James B. Lipton. Possibilistic Nested Logic Programs Juan Carlos Nieves and Helena Lindgren. Using Answer Set Programming in the Development of Verified Software Florian Schanda and Martin Brain. An Answer Set Solver for non-Herbrand Programs: Progress Report 10 A. Dovier and V. Santos Costa Marcello Balduccini. CHR for Social Responsibility Veronica Dahl, Bradley Coleman, Emilio Miralles and Erez Maharshak. A Concurrent Operational Semantics for Constraint Functional Logic Programming Rafael Del Vado Vı́rseda, Fernando Pérez Morente and Marcos Miguel Garcı́a Toledo. Doctoral Consortium Contributions Software Model Checking by Program Specialization Emanuele De Angelis Temporal Answer Set Programming Martı́n Diéguez A Gradual Polymorphic Type System with Subtyping for Prolog Spyros Hadjichristodoulou ASP modulo CSP: The clingcon system Max Ostrowski An ASP Approach for the Optimal Placement of the Isolation Valves in a Water Distribution System Andrea Peano Answer Set Programming with External Sources Christoph Redl Together, Is Anything Possible? A Look at Collective Commitments for Agents Ben Wright
6cs.PL
Structural break detection method based on the Adaptive Regression Splines technique arXiv:1605.08667v1 [math.ST] 27 May 2016 Daniel Kucharczyk, Agnieszka Wyłomańska Hugo Steinhaus Center, Department of Mathematics, Wroclaw University of Technology Janiszewskiego 14a, 50-370 Wrocław, Poland [email protected] [email protected] Radosław Zimroz Diagnostics and Vibro-Acoustics Science Laboratory, Wroclaw University of Technology Na Grobli 15, 50-421 Wroclaw, Poland [email protected] Abstract For many real data, long term observation consists of different processes that coexist or occur one after the other. Those processes very often exhibit different statistical properties and thus before the further analysis the observed data should be segmented. This problem one can find in different applications and therefore new segmentation techniques have been appeared in the literature during last years. In this paper we propose a new method of time series segmentation, i.e. extraction from the analysed vector of observations homogeneous parts with similar behaviour. This method is based on the absolute deviation about the median of the signal and is an extension of the previously proposed techniques also based on the simple statistics. In this paper we introduce the method of structural break point detection which is based on the Adaptive Regression Splines technique, one of the form of regression analysis. Moreover we propose also the statistical test which allows testing hypothesis of behaviour related to different regimes. First, the methodology we apply to the simulated signals with different distributions in order to show the effectiveness of the new technique. Next, in the application part we analyse the real data set that represents the vibration signal from a heavy duty crusher used in a mineral processing plant. Keywords: segmentation, median, statistical test, structural break point detection 1. Introduction Physical variables observed/measured by advanced data acquisition systems in real world applications are often processed, modelled, and analysed in order to extract information about the process. In many cases, long term observation (long might mean very different period depends on application) in fact consists of different processes that coexist or occur one after the other. There are many examples that during single observation Process A reveals very different properties than Process B and they cannot be processed/analysed with the same tools (simple example is switching from stationary to non-stationary signal). Less radical case is that two segments might have the same type of model, but with different order and values of parameters. It leads to conclusion that very first step in experimental data analysis is signal segmentation, i.e. dividing the raw observation into smaller pieces (segments) with homogeneous properties. Note that Process A or Process B might be single process or mixture of processes. From signal processing perspective, one of the most fundamental reason for segmentation is finding locally stationary segments in non-stationary signals. In such a context the segmentation is a problem of identifying the time instants at which the statistics of the observed signal changes. Signal segmentation is also generalized and considered in the context of signal detection and localization by means of recognition and identification of the time of appearance of event that differs from "normal" signal, [1]. It could be generalized to a model proposed in [1] presented in Fig. 1. Preprint submitted to Elsevier May 30, 2016 Figure 1: The model of the signal that is a mixture of different segments related to different processes. Source: [1]. . The basis (criterion) for signal segmentation might be different in various domains, contexts and applications. Change of process from Process A to Process B might be related to appearance of seismic event, machine regime switching, fault in the system, financial crash on stock market, natural radiation, wind behavior, etc. A key issue is to find proper description of processes in order to highlight the difference between them. In some cases, the difference between processes is visually identifiable, but often advanced processing is required to find breakpoint. Signal segmentation might be done in different manners. Some of the methods are based on the statistical properties of raw time series [2, 3] or its modeling and analysis of model residuals [1, 4, 5]. The second group of segmentation methods takes under consideration not the raw signal but its transformation to other domain, like spectral [6], cepstral [7], time-frequency [8–10], etc. In the literature one can also find segmentation techniques based on the raw time series decomposition such as empirical mode or wavelets decomposition [11–13]. Signal segmentation has been applied in many areas. It is especially crucial in condition monitoring (to isolate shocks related to damage) [9, 13], machine performance analysis (to find when machine operates under overloading, idle mode etc) [14], experimental physics [2, 15, 16], biomedical signals (like ECG signals) [7, 17–22], speech analysis (automatic speech recognition and understanding) [23–25], econometrics [26, 27] and seismic signal segmentation [8, 28–31]. The other areas where the segmentation problem appears one can find in [32–34]. In this paper we propose a novel segmentation technique. This method is an extension of the algorithm proposed in [2], where the main statistics used to segmentation was based on the empirical second moment of raw data. An approach proposed here is a step forward in this field. The introduced method is based on the behaviour of the average absolute deviation about the empirical median of given time series. For the data where some statistical properties (expressed mostly by the scale parameter) change over time, the simple statistics applied here changes its behaviour which leads to structural break detection. The proposed method is much more sensitive for such cases where the change point is not visually identifiable in the contrast to the method presented in [2]. Moreover it can be used to different raw signals without assumption of their distributions which is the main advantage. On the one hand we analyse visually the mentioned statistics but on the other hand the strict method of change point detection is introduced. The method uses the Adaptive Regression Splines technique which is a form of regression analysis. It is a non-parametric regression technique and can be seen as an extension of linear systems that automatically models non-linearities and interactions between variables [35]. Additionally, we propose a statistical test which allows for testing if given data satisfy the behaviour presented in Fig. 1. Because in the analysis we consider the case where only one change point exists then the time series {Zi } which is tested here, similar as in [2], can be written in the following mathematical form   T for i ≤ l,    Xi =  (1)    Y for i > l where l is a structural break point and T and Y are independent random variables with cumulative distribution functions G(·) and H(·), respectively. 2 The motivation of our analysis is the time series presented in Fig. 2 where we observe very specific behavior, similar to this described above. Namely, the visual inspection of the data indicates the statistical properties of raw signal change and there appears problem of structural break point detection, i.e. how to recognize automatically the changing point. The data presented in Fig. 2 represent the vibration signal from a heavy duty crusher used in a mineral processing plant. In the signal we observe that some statistical properties change over time which may be related to the different modes of operation of the machine. It was proved in many publications related to condition monitoring of machines, that vibration response significantly depends on external load applied to the machine. In the case of crusher, load applied to machine means volume of material stream directed to crushing machine. Depends on the volume as well as structure of material stream (size of stones) statistical properties of vibration will be different. It is practically very hard to "quantify" properties of material stream. By vibration signal segmentation we can find segments with homogeneous content that corresponds to "stable" or "stationary" material stream. Let us emphasize, observing the signal presented in Fig. 2, panel a) it seems that the structural break points are easy detectable here. However if we analyse separately the subsignals corresponding to number of observations between 60000 and 80000 (see panel b)) and 1600000 and 1640000 (see panel c)) we can conclude that in order to solve the problem of structural break point detection we have to use advanced statistical methods. Figure 2: The empirical time series that represents the vibration signal from a heavy duty crusher used in a mineral processing plant (panel a)) and its subsignals corresponding to number of observations between 60000 and 80000 (panel b)) and 1600000 and 1640000 (panel c)). . The rest of the paper is organized as follows: In Section 2 we introduce the methodology related to the new segmentation technique and compare it to the method presented in [2]. We propose here the visual test based on the average absolute deviation about the empirical median of given time series as well as the new method of structural point detection based on the Adaptive Regression Splines technique. Next, we apply the proposed methodology to the various cases of simulated data with different distributions. We show the efficiency of the introduced method and their sensitivity for change point detection especially in case where it is not visually identifiable. We indicate the new technique can be also applied for data with heavy tailed distribution (like Lévy stable) because it is based only on the empirical median of raw signal which always has finite value. In Section 4 we analyze the real data set presented in Fig. 2 in the context of structural change point detection. At the end we recognize the distributions of segmented parts. Last section contains conclusions. 2. Methodology 2.1. Regime testing- a scale based approach In this part, we introduce a new method of estimating the critical point of scale parameter for time series satisfying property given in (1). The general idea of the estimation procedure is closely linked to the approach introduced in [2], briefly described in the next part of this article, namely in Section 2.2. In contrast to [2], our methodology is based on 3 the behavior of the absolute deviation about median defined as follows Vj = j X Xi − X̃ , j = 1, 2, . . . , n, (2) i=1 where X̃ is the median of time series X1 , X2 , . . . , Xn . Under the assumption that the underlying sample X1 , X2 , . . . , Xn satisfies relation (1), we calculate the critical change point l at which shift in the scale parameter occurs. It can be shown that in this case the estimated value of the statistics (2) takes the following form V j = β0 + β1 max (0, j − l) + β2 max (0, l − j). (3) In the above formulation of the problem the procedure of estimating the critical change point l is equivalent to the approach presented in [2]. One may easily proof by performing simple algebra that equation (3) can be written as ( ( a1 + b1 j for j ≤ l β0 − β1 l + β1 j for j ≤ l Vj = = , (4) a2 + b2 j for j > l β0 + β2 l − β2 j for j > l where a1 , b1 , a2 , b2 are the coefficients of the linear regressions fitted for two different segments of data separated by the point l at which shift of the scale parameters occurs. For the purpose of estimating parameters β0 , β1 , β2 defined in (3) we use a non-parametric regression technique, called Multivariate Adaptive Regression Splines. For the sake of clarity we drop the description of the Multivariate Adaptive Regression Splines technique and describe it in the subsequent section, namely Section 2.1.1. For the purpose of testing of the occurrence of change defined in terms of the scale parameters of random variables T and Y in relation (1), we consider test proposed by [36], where the authors test the hypothesis that G(u) ≡ H(u) against alternatives of the form G(u) ≡ F(θu) for θ , 1. Following the procedure described in [36], the two samples are ordered in a single joint array and ranks are assigned from each end of the joint array towards the middle. More formally, assuming that the two samples corresponding to random variables T and Y from relation (1) consisting of m and n independent observations are ranked in a combined array represented by Z = Z1 , Z2 , . . . , Zm+n . (5) If m + n then the vector of ranks R = {Ri }, i = 1, 2, . . . , m + n is as follows R = {1, 2, 3 . . . , (m + n)/2, (m + n)/2 . . . , 3, 2, 1}, i = 1, 2, . . . , m + n (6) and, if m + n is odd, the ranks are given in the following way R = {1, 2, 3 . . . , (m + n − 1)/2, (m + n + 1)/2, (m + n − 1)/2, . . . , 3, 2, 1}, i = 1, 2, . . . , m + n. (7) Finally, the test statistic W under consideration is defined as the sum of the ranks given in (6) or (7) associated with sample T . In the testing procedure we use the modified version of the statistics W, namely W ∗ defined as   W − n(n+m+2)   4   for n+m=2k r     nm(n + m + 2)(n + m − 2)       48(n + m − 1)     ∗ , k ∈ Z. (8) W =  n(n+m+1)2   W −   4(n+m)   for n+m=2k+1  s    2   nm(n + m + 1)(3 + (n + m) )      48(n + m)2 Under the null hypothesis, G(u) ≡ H(u) the limiting distribution (where m tends to ∞) of the statistics W ∗ is characterized by a standard normal distribution N(0, 1). Therefore the corresponding p-value of statistics (8) is calculated as Φ(W ∗ ), where Φ(x) is defined as a cumulative distributive function of a standard normal distribution. If the p-value is equal to or smaller than the predefined significance level α we reject the null hypothesis H0 , i.e. the time series under consideration does not satisfy the relation given in (1), in favor of the alternative hypothesis H1 stating that the observed time series has at least two regimes with different scale parameters. 4 2.1.1. Multivariate Adaptive Regression Splines Multivariate Adaptive Regression Splines (MARS) approach is a non-parametric, spline-based regression technique introduced in [35]. Let us consider a set of explanatory variables X = (x1 , x2 , . . . , xn ), a target variable y and N realizations of the process {yi , x1i , x2i , . . . xni }1N , whereas the true relationship between X and y is given in the form y = f (x1 , x2 , . . . , xn ) + ǫ, (9) where f is an unknown function, and the error term ǫ is a white noise. The general idea of the MARS is to use the expansions in piecewise linear basis functions of the form (x − t)+ and (t − x)+ , both called hockey stick basis functions with knot values set to j, where ( ( x − j, for x > j j − x, for x < j (x − j)+ = and ( j − x)+ = (10) 0, otherwise, 0, otherwise The general idea of the MARS is to form a set of pairs C consisting of basis functions given in (10) for each input variable x j with knots at each observed values x ji . Therefore, the set of basis functions is given as o n (11) C = (x j − t)+ , (t − x j )+ for t ∈ {x j1 , x j2 , . . . , x jN } and j = 1, . . . n Under Multivariate Adaptive Regression Splines approach the set of basis functions defined in (11) is used to construct the final model as follows M X f (X) = β0 + βm hm (X), (12) m=1 where each hm (X) is a function formed by taking single element from the initial set of basis functions C, or a product of two or more such elements (functions). The way of estimating the parameters of the MARS model (12) consists of two stages. At the first stage the MARS performs a forward stepwise regression procedure by considering at each stage a new basis pair from C including all possible interaction among explanatory variables and finally adding the pair of basis functions to the final model set M based on the residual squared error criterion. To make MARS approach computationally less expensive, the level of interactions among explanatory variables, as well as the maximum number of basis functions in model (12) while performing the forward stepwise procedure are specified by the user. The forward stepwise regression procedure always starts by considering the initial model set M consisting only of the constant function h0 (X) = 1. At the end of this procedure we have a large model of the form (12) that typically overfits the data. The problem of overfitting the data is resolved by applying a backward stepwise regression procedure in the second step. In this step, the terms whose removal causes the smallest increase in residual squared error is deleted from the model M at each stage, producing an estimated best model fˆλ , where λ denotes the number of terms defined in the considered model. The optimal value of λ is calculated on the basis of the generalized cross-validation criterion defined as GCV(λ) = N P (yi − fˆλ (X))2 i=1 (1 − M(λ)/N)2 , (13) where (1 − M(λ)/N)2 is a penalty factor accounting for the increase variance resulting from a complex model and M(λ) is the effective number of parameters, including both number of terms in the models and the number of parameters used for selecting the optimal location of the knots. 2.2. Regime variance testing - a quantile approach In this subsection we briefly recall the general idea of the regime variance testing presented in [2]. The procedure is based on the behaviour of the empirical second moment of a given one-dimensional sample X1 , X2 , . . . , Xn . Namely, the authors consider statistics given in the following form Cj = j X Xi2 , j = 1, 2, . . . , n i=1 5 (14) Under the assumption that the random variables T and Y defined in (1) have distributions with finite second moments σ2T and σ2Y , respectively, the statistics C j has the following property   jσ2T    E(C j ) =     jσ2 Y for j≤l for j > l. (15) If σ2T = σ2Y , then the mean of C j statistics is equal to jσ2T for all j = 1, 2, . . . , n, therefore for independent identically distributed (i.i.d.) sample, the expected value of the statistics is a linear function with the shift parameter equal to zero. Similar behaviour of E(C j ) is also observed under the milder assumption that the corresponding random variables T and Y given in (1) have distributions with infinite second moments. According to [2], the algorithm of estimating the critical point l for the sample that fulfills relation (1) starts with dividing for the fixed k = 1, 2, . . . , n the C j statistics into two disjoint sets {C j : j = 1, 2, . . . , k} and {C j : j = k + 1, k + 2, . . . , n}. Next, the algorithm fits the linear regression lines for the first and the second set, respectively by minimizing the sum of squared error. Subsequently, the estimator lˆ of the true change point l is defined as the number k that minimizes the following expression  k  n  X  2 X 2  1 2 lˆ = arg min  C j − y j (k) − C j − y j (k)  (16) 1≤k≤n j=1 j=k+1 where y1j (k) and y2j (k) are the values of the linear functions fitted to the data belonging to the appropriate set of points {C j : j = 1, 2, . . . , k} and {C j : j = k + 1, k + 2, . . . , n}. In the last step of the procedure, the underlying time series X1 , X2 , . . . , Xn is divided into two vectors W1 = [X12 , X22 , . . . , Xl2 ] 2 2 , . . . , Xn2 ], where quantiles (qα/2 and q1−α/2 ) from the distributions of the squared time series from , Xl+2 and W2 = [Xl+1 the vector W1 (for that the empirical standard deviation was smaller) are calculated according to the formula   i = 1, 2, . . . , l (17) P qα/2 6 Xi2 6 1 − qα/2 = 1 − α, where α is a given significance level. The above formula is used to construct the H0 hypothesis defined as previously: observed time series does not satisfy relation (1), whereas the alternative hypothesis H1 is formulated as: observed time series has at least two regimes of the data for which the appropriate quantiles of the squared time series are different. Under the H0 hypothesis, the appropriate quantiles can be determined on the basis of the empirical cumulative 2 2 , . . . , Xn2 are independent, the statistics B given as , Xl+2 distribution function. Due to the fact that Xl+1  (18) B = # qα/2 6 W2 6 1 − qα/2 has a binomial distribution with parameters n − l and p = 1 − α. 2.3. Methodology overview This section is supposed to describe the main differences between the methodologies described in the foregoing sections, see Sections 2.1 and 2.2. The main difference comes from the problem of detecting an appropriate change point at which the shift in the dispersion of a distribution has taken place is tackled by using two different measures of variability of the distribution. Namely, the average absolute deviations about median and the second moment of a given sample have been considered. The former is used as a direct measure of scale parameters of a distribution with cumulative distribution function F satisfying relation F(x; s, θ) = F(x/s; 1, θ), (19) where s is a scale parameter. The latter one is defined in a more systematic way by measuring the variability of distribution in terms of the empirical variance. As it appears that the graphs of diagnostic statistics presented in (2) and (14) reveal the same "hockey stick" pattern for time series satisfying relation (1). However the shape of the function derived based on (2) may contain points at which sudden jump (discontinuity) is observed, influencing the bias and variance of the true critical point estimator lˆ defined in (16). From the other hand, the resulting graph of 6 the statistics defined in (2) is smoother than in case of diagnostic statistics considered in (14). As a consequence the obtained results of estimating the true critical point are more reliable comparing to those results obtained based on the behavior of the empirical second moment taken into consideration in [2]. More details about the performance of the aforementioned statistics can be found in the successive part of this article, see Section 3. Moreover the behaviour of both considered statistics, namely V j and C j for exemplary distributions of random variables Z and Y in relation (1) is presented in Fig. 3. Figure 3: The C j (red line) and V j (blue line) statistics defined in (14) and (2) for time series driven by a combination of distributions with different set of parameters where the corresponding critical point l has been planned at middle of the length of sample. 3. Simulations In this section we describe the results of performed simulations for the methods presented in Section 2 and compare the robustness of detecting the critical point of the underlying sample satisfying relation (1). The comparison is made by simulating 1000 trajectories of length n = 1800 of stochastically independent random variables with the scale parameter change placed on 800th observation. For the purpose of simulations we consider two different set of scenarios of family of distributions as in [2]. For the first scenario, where the difference between distributions of random variables T and Y in equation (1) is relatively small, we consider the following cases • the pure Gaussian case with N(0, 4) and N(0, 4.55) distribution for the first 800 and last 1000 observations, respectively. • the pure Lévy-stable case with S(1.9, 0, 2, 0) and S(1.9, 0, 2.5, 0) distribution for the first 800 and last 1000 observations, respectively. • the pure Lévy-stable case with S(1.8, 0, 2, 0) and S(1.85, 0, 2.5, 0) distribution for the first 800 and last 1000 observations, respectively. • the pure Lévy-stable-Gaussian case with S(1.8, 0, 1.2, 0) and N(0, 2.45) distribution for the first 800 and last 1000 observations, respectively. In the second scenario, we consider following parameters of distributions • the pure Gaussian case with N(0, 2) and N(0, 4) distribution for the first 800 and last 1000 observations, respectively. 7 • the pure Lévy-stable case with S(1.9, 0, 2, 0) and S(1.9, 0, 4, 0) distribution for the first 800 and last 1000 observations, respectively. • the pure Lévy-stable case with S(1.85, 0, 2, 0) and S(1.95, 0, 4, 0) distribution for the first 800 and last 1000 observations, respectively. • the pure Gaussian-Lévy-stable case with N(0, 4) and S(1.9, 0, 1, 0) distribution for the first 800 and last 1000 observations, respectively. Comparing the set of scenarios taken into account in our simulation study with those considered in [2], two additional test cases have been added in order to test specific behaviour of time series extracted from the real data set presented in Section 4. Namely, the newly introduced test cases exhibit the behaviour where the shift in the stability parameter α in conjunction with the change of the scale parameter has taken place. Figure 4: Comparison of detection procedure for the critical scale change point for two estimators lˆC and lˆV . Panel a) N(0, 4), N(0, 4.55) ,panel b) S (1.9, 0, 2, 0), S (1.9, 0, 2.5, 0), panel c) S (1.8, 0, 2, 0), S (1.85, 0, 2.5, 0), panel d) S (1.8, 0, 1.2, 0), N(0, 2.45) In terms of the results for the first scenario under consideration, where all test cases are based on the assumption that the corresponding critical point is hardly visible are presented in Fig. 4. The obtained results for the aforementioned scenario show that the estimator lˆV of a true change point l defined in (12) outperforms the corresponding estimator lˆC (calculated based on (16)) for all considered test cases. The results for the second scenario are presented in Fig. 5, accordingly. Also in this case we can observe that lˆV estimates the true change point in a more stable way than lˆC . The superiority of lˆV is particularly pronounced in case of the pure Lévy-stable case with S(1.9, 0, 2, 0) and S(1.9, 0, 4, 0) distribution, where the dispersion of lˆV is much more smaller than dispersion of lˆC . Apart from comparing the detection Figure 5: Comparison of detection procedure for the critical scale change point for two estimators lˆ and lˆnew . Panel a) N(0, 2), N(0, 4), panel b) S (1.9, 0, 2, 0), S (1.9, 0, 4, 0), panel c) S (1.85, 0, 2, 0), S (1.95, 0, 4, 0), panel d) N(0, 4), S (1.9, 0, 1, 0) procedures for the critical scale change point given above, we also examine the performance of the proposed estimator 8 (2) in conjunction with test statistic by checking the type I error (rejection of H0 hypothesis in case it is true) for 1000 Monte Carlo trajectories of length of 1800 of stochastically independent random variables for the following cases • Gaussian case with N(0, 2) distribution, • Lévy-stable case with S(1.8, 0, 1.2, 0) distribution • Lévy-stable case with S(1.8, 0, 1, 0) and S(1.9, 0, 1, 0) distribution for each half of the sample, randomly permuted. The results of the conducted simulations are presented in Table 1. For the testing purposes, we apply the sample mean values of obtained estimators lˆC and lˆV presented in Sections 2.2 and 2.1, respectively. Furthermore we assume that the corresponding significance level α is set to 0.05. The test based on the C statistics we denote as GS W − C while the test proposed in this paper as KWZ − V. Distribution of sample N(0, 2) S(1.8, 0, 1.2, 0) permuted S(1.8, 0, 1, 0), S(1.9, 0, 1, 0) GSW-C 157 146 168 KWZ-V 45 49 51 Table 1: Numbers of the incorrect rejection of a true null hypothesis H0 (type I error) based on 1000 Monte Carlo trajectories and the significance level α = 0.05. For the three considered cases, we see that the approach proposed in [2] does not preserve the assumed type I error (α = 0.05), as the corresponding type I errors are equal to 0.157, 0.146 and 0.168. In contrast to [2], the resulting type I errors for the test statistics described in Section 2.1 are preserved, see KWZ − V column. Moreover, the p-values corresponding to the acceptance of H0 are much more higher than significance level α = 0.05, see Fig.6. The next Figure 6: The boxplots of p-values from selected test statistics obtained for different data sets, with the constant scale parameters. Panel a) N(0, 2), panel b) S (1.8, 0, 1.2, 0), panel c) permuted S(1.8, 0, 1, 0), S(1.9, 0, 1, 0). The corresponding significance level α = 0.05 is shown as red dashed line. goal of our simulations study is to exploit the statistical power of the examined test and compare it with the reference test proposed in [2]. As the power of a given test is strictly connected to type II error β of the test, we focus our attention only on the values of the corresponding type II errors, i.e. numbers of wrongly accepted a false null hypothesis H0 . For this reason, we consider the first set of scenarios of family of distributions described at the beginning of this section. 9 Distribution of sample N(0, 4), N(0, 4.55) S (1.9, 0, 2, 0), S (1.9, 0, 2.5, 0) S (1.8, 0, 2, 0), S (1.85, 0, 2.5, 0) S (1.8, 0, 1.2, 0), N(0, 2.45) GSW-C 257 219 540 297 KWZ-V 164 0 1 0 Table 2: Numbers of the incorrectly accepted a false null hypothesis H0 (type II error) based on 1000 Monte Carlo trajectories and the significance level α = 0.05. 0.30 1.0 ^ lC ^ lV 0.25 0.05 0.0 0.00 0.05 0.00 0.00 0.05 0.2 0.10 0.4 0.15 0.20 0.6 0.25 0.20 0.15 0.10 0.10 0.15 0.20 0.25 0.8 0.30 0.30 d) 0.35 c) 0.35 b) 0.35 a) ^ lC ^ lC ^ lV ^ lV ^ lC ^ lV Figure 7: The boxplots of p-values for different set of distributions, where initial change point is hardly visible. Panel a) N(0, 4), N(0, 4.55), panel b) S (1.9, 0, 2, 0), S (1.9, 0, 2.5, 0), panel c) S (1.8, 0, 2, 0), S (1.85, 0, 2.5, 0), panel d) S (1.8, 0, 1.2, 0), N(0, 2.45). The corresponding significance level α = 0.05 is depicted as red dashed line. 4. Real data analysis In this section we apply the discussed techniques to the real data set presented in Fig. 2. The data represent the vibration signal from a heavy duty crusher used in a mineral processing plant. The crusher is a kind of machine which use a metal surface to crumble materials into small fractional pieces. During this process, as well as during entering material stream into the crusher, a lot of impacts/shocks appear. They are present in vibration signal acquired from the bearings housing [37]. In the signal we observe that some statistical properties changes over time. The empirical analysis is built on top of two different data sets manually extracted from the original time series, see Fig. 2 panel b) 1 2 and panel c). We denote them X11 , X21 , . . . X20000 and X12 , X22 , . . . X40000 , respectively. For both cases, one may easily observe that change in the scale parameter of the driving distribution has taken place. Therefore we can suspect that the property given in (1) holds for each of the observed time series. At the first stage of our analysis, we discuss the results of estimation procedures for critical change points (lˆV and lˆC ) calculated based on V and C statistics formulated in (2) and (14), respectively. For ease of reading, the results are covered in Table 3. Moreover the obtained estimates of the critical points lˆC and lˆV along with reference statistics C and V are depicted in Fig. 8. For the time series consisting of 20000 observations the estimates of the critical change points lˆV and lˆC are 6282 and 7591. The corresponding p-values of the performed statistical tests given in (5) and (18) are 1.15 · 10−25 and 1 allowing us to reach conclusions, where the null hypothesis H0 is rejected in case of the estimate provided by V, whereas there is not enough evidence to reject the null hypothesis H0 in case of statistics C at the 0.05 significance level. The similar conclusions are made for the second time series that consists of 40000 observations as the obtained p-values for lˆV = 14389 and lˆC = 12565 estimates are 3.445 · 10−15 and 1, respectively. The complementary part of this section is to provide details about potential family of distributions for the sub samples 2 1 into two parts according and X12 , X22 , . . . X40000 obtained by splitting the original sets of observations X11 , X21 , . . . X20000 to the rule provided by the appropriate estimates of the critical change points lˆV given in Table 3. As a consequence 1 1 1 1 1 the first time series X11 , X21 , . . . X20000 has been divided into X11 , X21 , . . . X6282 and X6283 , X6284 , . . . X20000 , accordingly. 2 2 2 2 2 2 Furthermore two different samples consisting of X1 , X2 , . . . X14389 and X14390 , X14391 , . . . X40000 have been created based 2 . For the purposes of finding appropriate distribution that fits well to the on the second time series X12 , X22 , . . . X40000 10 1 Figure 8: Two empirical data sets satisfying relation given in (1). Panel a) The empirical time series X11 , X21 , . . . X20000 . Panel b) The empirical time 2 series X12 , X22 , . . . X40000 with the corresponding estimates of the critical changes points lˆV (red dashed line) and lˆC (olive dashed line) obtained by using approaches described in Sections 2.1 and 2.2 Observations lˆC lˆV Sample I 20 000 Sample II 40 000 7591 (≈ 1) 6282 (< 0.01) 12565 (≈ 1) 14389 (< 0.01) Table 3: Results of the performed analysis for estimating critical change points lˆC and lˆV . The corresponding p-values are given in parentheses. empirical data, we follow the procedure where Lévy-stable distribution S(α, β, σ, µ) and Gaussian distribution N(µ, σ) are considered. In order to fit the parameters of Lévy-stable distribution S(α, β, σ, µ) we apply method described in [38]. The results of the estimated parameters of Lévy-stable distribution S(α, β, σ, µ) and Gaussian distribution N(µ, σ) for all samples are presented in Table 4. Moreover Lévy-stable and Gaussian right tail fits on a double 1 2 logarithmic scale for samples X11 , X21 , . . . X20000 and X12 , X22 , . . . X40000 are presented in Fig. 9 and 10, respectively. Sample 1 X11 , . . . , X6282 1 1 X6283 , . . . , X20000 2 X12 , . . . , X14389 2 2 X14390 , . . . , X40000 Distribution fit S(α, β, σ, µ) N(µ, σ) S(α, β, σ, µ) N(µ, σ) S(α, β, σ, µ) N(µ, σ) S(α, β, σ, µ) N(µ, σ) α 1.8587 β −0.1110 1.9429 −0.1160 1.8190 −0.0592 1.8814 0.0610 µ 0.0769 0.0789 0.0769 0.0771 0.0577 0.0766 0.0281 0.0797 σ 0.1370 0.2165 0.0887 0.1314 0.0763 0.0951 0.0797 0.0443 KS 0.0097 (0.9274) 0.3448 (< 0.05) 0.0069 (0.8963) 0.4023 (< 0.05) 0.0085 (0.6774) 0.4296 (< 0.05) 0.0064 (0.6761) 0.4801 (< 0.05) AD 0.6889 (0.5097) 13.0953 (< 0.05) 0.6889 (0.5097) 7.7176 (< 0.05) 0.6889 (0.5097) ∞ (< 0.05) 0.6889 (0.5097) ∞ (< 0.05) 1 Table 4: Estimated parameters of Lévy-stable distribution S(α, β, σ, µ) and Gaussian distribution N(µ, σ) for X11 , X21 , . . . , X20000 and 2 2 2 X1 , X2 , . . . , X40000 samples as well as the KS and AD statistics for Lévy stable distribution and corresponding p-values (presented in brackets). 1 1 1 In terms of the fits to the first empirical data sets X11 , . . . , X6282 and X6283 , . . . , X20000 , we observe that the obtained estimates of Lévy-stable distribution S(α, β, σ, µ) provide better fits to the data than the corresponding Gaussian distribution N(µ, σ), see Fig. 9. The observed superiority of the Lévy-stable distribution is pronounced by the fact, that in both cases the calculated Anderson-Darling and Kolmogorov-Smirnov test statistics [15, 39], force us to reject the hypothesis that the data is normally distributed in favour of Lévy-stable distribution. 1 To be more precise, for the first vector of observations X11 , . . . , X6282 the values of the Anderson-Darling and Kolmogorov statistics produced by Lévy-stable distribution are 0.6889 and 0.0097, respectively. The corresponding 11 b) −2 −4 −6 log(1−ECDF(x)) −8 −2 −4 −6 −8 log(1−ECDF(x)) 0 a) Levy−stable Gaussian −5 −3 Levy−stable Gaussian −1 −5 log(x) −3 −1 log(x) 1 Figure 9: The right tail fit to the empirical cumulative distribution function for the corresponding sub samples extracted from X11 , X21 , . . . , X20000 1 1 1 given on a double logarithmic scale. Panel a) Empirical sample X11 , . . . , X6282 . Panel b) Empirical sample X6283 , . . . , X20000 . Both panels include Lévy-Stable (red) and Gaussian (blue) fits to the corresponding empirical cumulative distribution functions produced by the real data (black circles). p-values are 0.9274 and 0.5097 allowing us to accept the Lévy-stable law a model of the considered set of data. The values of the test statistics for the Gaussian fit model yield p-values of less than 0.05 forcing us to reject the assumption that the data is normally distributed at the 0.05 significance level. The similar conclusions are made for the second time 1 1 series X6283 , . . . , X20000 as the obtained values of the tests statistics satisfy the same relationship as in case of the afore1 mentioned sample X11 , . . . , X6282 , see Table 4. Subsequently, we apply the same technique to the second set of empirical 2 2 2 2 2 2 observations, i.e. X1 , X2 , . . . X14389 and X14390 , X14391 , . . . X40000 . It appears that Lévy-stable distributions fit very well to the both samples, yielding relative small values of the Anderson-Darling (0.6889 and 0.6889) and Kolmogorow2 2 2 2 Smirnov (0.0085 and 0.0064) test statistics for the samples, X12 , X22 , . . . X14389 and X14390 , X14391 , . . . X40000 , respectively. 2 2 2 The associated p-values for the first sample X1 , X2 , . . . X14389 are 0.5097 and 0.6774, whereas for the second sample 2 2 2 X14390 , X14391 , . . . X40000 are equal to 0.5097 and 0.6761, respectively, giving us an opportunity to accept the hypothesis that both samples are distributed according to the appropriate Lévy-stable law. b) −4 −2 0 −3 Levy−stable Gaussian −10 Levy−stable Gaussian −5 −6 log(1−ECDF(x)) −2 −4 −6 −8 log(1−ECDF(x)) 0 a) −1 0 −5 log(x) −3 −1 log(x) 2 Figure 10: The right tail fit to the empirical cumulative distribution function for the corresponding sub samples extracted from X12 , X22 , . . . , X40000 2 1 2 given on a double logarithmic scale. Panel a) Empirical sample X12 , . . . , X14389 . Panel b) Empirical sample X14390 , . . . , X40000 . Both panels include Lévy-Stable (red) and Gaussian (blue) fits to the corresponding empirical cumulative distribution functions produced by the real data (black circles). The results obtained by fitting the Gaussian model to the both samples force us to reject the hypothesis that the data is normally distributed as the observed Anderson-Darling and Kolmogorow-Smirnow test produces p-vales of less than 0.05 for all considered cases. The corresponding tail fits of the empirical cumulative distributive function empirical 2 2 2 2 for samples X12 , X22 , . . . X14389 and X14390 , X14391 , . . . X40000 are presented in Fig. 10. 5. Conclusions In this paper we have introduced a new technique of time series segmentation, i.e extraction from the originally signal such parts that have similar statistical properties. The proposed technique is based on the simple statistics (absolute deviation about the median) based on given time series. The structural break point detection method proposed here uses the Adaptive Regression Splines technique, which is an extension of the classical regression. Except the 12 introduction of the estimation procedure for the recognition of the critical point that divides the observed time series into two regimes, we have also developed the statistical test of testing two-regimes behavior. The universality of the presented methodology comes from the fact that it does not assume the distribution of the examined time series, therefore, it can be applied to a rich class of real data sets. The theoretical results we have illustrated using the simulated time series and analysis of real data set that represents the vibration signal from a heavy duty crusher used in a mineral processing plant. References [1] M. Lopatka, C. Laplanche, O. Adam, J.-F. Motsch, J. Zarzycki, Non-stationary time-series segmentation based on the Schur prediction error analysis, 13th Workshop on Statistical Signal Processing, 251- 256, DOI: 10.1109/SSP.2005.1628601, 2005. [2] J. Gajda, G. Sikora, A. Wylomanska, Acta Phys. Polon B 44(5), 1015, 2013. [3] R.S. Tsay, J. Forecasting 7, 1, 1988 [4] R. Makowski, R. Zimroz, Mechanical Systems and Signal Processing 38, 65, 2013. [5] R. Makowski, R. Zimroz, Applied Acoustics 77, 130, 2014. [6] C. Li, M. Liang, T. Wang, Criterion fusion for spectral segmentation and its application to optimal demodulation of bearing vibration signals, Mechanical Systems Signal Processing http://dx.doi.org/10.1016/j. ymssp.2015.04.004i, 2015. [7] C. Bhagavatula, A. Jaech, M. Savvides, V. Bhagavatula, R. Friedman, R. Blue, and M. O. Griofa, Automatic segmentation of cardiosynchronous waveforms using cepstral analysis and continuous wavelet transforms, in Proc. Int. Conf. Image Process., 2045, 2012. [8] Popescu T.D., Aiordachioaie D., Signal segmentation in time-frequency plane using Renyi entropy - application in seismic signal processing, Conference on Control and Fault-Tolerant Systems, 2013. [9] J. Obuchowski, A. Wylomanska, R. Zimroz, Mechanical Systems and Signal Processing 46, 389, 2014. [10] J. Urbanek, T. Barszcz, R. Zimroz, J. Antoni, Measurement 45, 1782, 2012. [11] M. Musaruddin, R. Zivanovic, Signal segmentation of fault records based on empirical mode decomposition, TENCON 2011 - 2011 IEEE Region 10 Conference, 2011. [12] H. Azami, S. Sanei, Automated signal segmentation based on singular spectrum analysis and imperialist competitive algorithm, 2012 2nd International e-Conference on Computer and Knowledge Engineering (ICCKE), 2012. [13] J. A. Crossman, H. Guo, Y. L. Murphey, J. Cardillo, IEEE Transactions on Vehicular Technology 52, 1063 2003. [14] A. Wylomanska, R. Zimroz, Diagnostyka 15(2), 33, 2014. [15] K. Burnecki, A. Wylomanska, A. Beletskii, V. Gonchar, A. Chechkin, Phys. Rev. E 85, 056711, 2012. [16] B. Toth, F. Lillo, and J.D. Farmer, Eur. Phys. J. B 78, 235 2010. [17] H. Azami, K. Mohammadi, Be. Bozorgtabar, Journal of Signal and Information Processing 3, 39, 2012. [18] J. Terrien, G. Germain, C. Marque, B. Karlsson, Med Eng Phys. 35(8), 1188, 2013. [19] R. V. Andreao, B. Dorizzi, J. Boudy, IEEE Trasactions of Biomedical Engineering 53, 8, 2006. [20] H.J.L.M. Vullings, M.H.G. Verhaegen, H.B. Verbruggen, Automated ECG segmentation with Dynamic Time Warping, Proceedings of the 20th Annual International Conference of the IEEE Engineering in Medicine and Biology Society 20, I998. [21] P. Mico, M. Mora, D. Cuesta-Frau, M. Aboy, Computer Methods and Programs in Biomedicine 98, 118, 2010. [22] Choi S., Jiang Z., Expert Systems with Applications 34, 1056, 2008. [23] B. Lovell, B. Boashash, Segmentation of non-stationary signals with applications, Acoustics, CASSP 88, International Conference on Acoustics, Speech, and Signal Processing (Cat. No.88CH2561-9), 1988. [24] V. Khanagha, K. Daoudi, O. Pont, H. Yahia, Phonetic segmentation of speech signal using local singularity analysis, Digital Signal Processing 08, DOI: 10.1016/j.dsp.2014.08.002, 2014. [25] R. Makowski, R. Hossa, International Journal on Applied Mathematics and Computer Science 24, 259, 2014. [26] J.Janczura, Mathematical Methods of Operations Research, DOI:10.1007/s00186-013-0451-8, 2013. [27] J.Janczura, R.Weron, AStA - Advances in Statistical Analysis 97, 239, 2013. [28] C. H. Chen, Geoexploration 23, 35, 1984. [29] E. Gaby, J., Anderson, R. Kenneth, Geoexploration, 23, 1 1984. [30] T. D. Popescu, Signal segmentation using changing regression models with application in seismic engineering, Digital Signal Processing 24, 14, 2014. [31] Pikoulis E-V., Psarakis E.Z., A new authomatic method for seismic signals segmentation, ICASSP 2012 [32] L. R. Padovese, N. Martin, F. Millioz, Journal of Aerospace Engineering 223, 577, 2009. [33] A. Wylomanska, R. Zimroz, Statistics and Their Applications Springer Proceedings in Mathematics and Statistics 122, 469, 2015. [34] L. A. Sanchez-Perez, L. P. Sanchez-Fernandez, S. Suarez-Guerra, J. J. Carbajal-Hernandez, Expert Systems with Applications 40, 5148, 2013. [35] H. H. Friedman, The Annals of Statistics 19, 1, 1991. [36] A. R. Ansari, R. A. Bradley, Ann. Math. Statist. 31, 1174, 1960. [37] J. Obuchowski, R. Zimroz, A. Wylomanska, Identification of cyclic components in presence of non-Gaussian noise - application to crusher bearings damage detection, accepted 2015. [38] I. A. Koutrouvelis, Journal of the American Statistical Association 75, 918, 1980. [39] P. Cizek, W. Haerdle, R. Weron, Statistical Tools for Finance and Insurance, Springer, 2005. 13
10math.ST
1 A Comparative Study of Reservoir Computing for Temporal Signal Processing arXiv:1401.2224v1 [cs.NE] 10 Jan 2014 Alireza Goudarzi1 , Peter Banda2 , Matthew R. Lakin1 , Christof Teuscher3 , and Darko Stefanovic1 Abstract—Reservoir computing (RC) is a novel approach to time series prediction using recurrent neural networks. In RC, an input signal perturbs the intrinsic dynamics of a medium called a reservoir. A readout layer is then trained to reconstruct a target output from the reservoir’s state. The multitude of RC architectures and evaluation metrics poses a challenge to both practitioners and theorists who study the task-solving performance and computational power of RC. In addition, in contrast to traditional computation models, the reservoir is a dynamical system in which computation and memory are inseparable, and therefore hard to analyze. Here, we compare echo state networks (ESN), a popular RC architecture, with tapped-delay lines (DL) and nonlinear autoregressive exogenous (NARX) networks, which we use to model systems with limited computation and limited memory respectively. We compare the performance of the three systems while computing three common benchmark time series: Hénon Map, NARMA10, and NARMA20. We find that the role of the reservoir in the reservoir computing paradigm goes beyond providing a memory of the past inputs. The DL and the NARX network have higher memorization capability, but fall short of the generalization power of the ESN. Index Terms—Reservoir computing, echo state networks, nonlinear autoregressive networks, time-delayed networks, time series computing I. I NTRODUCTION Reservoir computing is a recent development in recurrent neural network research with applications to temporal pattern recognition [1]. RC’s performance in time series processing tasks and its flexible implementation has made it an intriguing concept in machine learning and unconventional computing communities [2]–[12]. In this paper, we functionally compare the performance of reservoir computing with linear and nonlinear autoregressive methods for temporal signal processing to develop a baseline for understanding memory and information processing in reservoir computing. In reservoir computing, a high-dimensional dynamical core called a reservoir is perturbed with an external input. The reservoir states are then linearly combined to create the output. The readout parameters can be calculated by performing regression on the state of a teacher-driven reservoir and the expected teacher output. Figure 1 shows a sample RC architecture. Unlike other forms of neural computation, computation in RC takes place within the transient 1 Department of Computer Science, University of New Mexico, Albuquerque, NM 87131, USA e-mail: [email protected]. 2 Department of Computer Science, Portland State University, Portland, OR 97207, USA. 3 Department of Electrical and Computer Engineering, Portland State University, Portland, OR 97207, USA. dynamics of the reservoir. The computational power of the reservoir is attributed to a short-term memory created by the reservoir [13] and the ability to preserve the temporal information from distinct signals over time [14], [15]. Several studies attributed this property to the dynamical regime of the reservoir and showed it to be optimal when the system operates in the critical dynamical regime—a regime in which perturbations to the system’s trajectory in its phase space neither spread nor die out [15]–[19]. The reason for this observation remains unknown. Maass et al. [14] proved that given the two properties of separation and approximation, a reservoir system is capable of approximating any time series. The separation property ensures that the reservoir perturbations from distinct signals remain distinguishable whereas the approximation property ensures that the output layer can approximate any function of the reservoir states to an arbitrary degree of accuracy. Jaeger [20] proposed that an ideal reservoir needs to have the so-called echo state property (ESP), which means that the reservoir states asymptotically depend on the input and not the initial state of the reservoir. It has also been suggested that the reservoir dynamics acts like a spatiotemporal kernel, projecting the input signal onto a high-dimensional feature space [5], [21]. However, unlike in kernel methods, the reservoir explicitly computes the feature space. RC’s robustness to the underlying implementation as well as its efficient training algorithm makes it a suitable choice for time series analysis [22]. However, despite more than a decade of research in RC and many success stories, its wide-spread adoption is still forthcoming for three main reasons: first, the lack of theoretical understanding of RC’s working and its computational power, and second, the absence of a unifying implementation framework and performance analysis results, and thirdly, missing comparison with conventional methods. II. O BJECTIVES Our main objective is to compare time series computing in the RC paradigm, in which memory and computation are integrated, with two basic time series computing methods: first, a device with perfect memory and no computational power, ordinary linear regression on tapped-delay line (DL); and second, a device with limited memory and arbitrary computational power, a nonlinear autoregressive exogenous (NARX) neural network. This is a first step toward a systematic investigation of topology, memory, computation, and dynamics in RC. In this article we restrict ourselves to ESNs with a fully connected reservoir and input 2 input signal U(t) input weights output weights Win Wout actual output Y(t) E reservoir state X(t) b target output Y(t) update old weights Figure 1. Computation in a reservoir computer. The reservoir is made up of a dynamical neural network with randomly assigned weights. The state of the nodes are represented by X(t). The input signal U(t) is fed into every reservoir node i with a corresponding weight win i denoted with weight res = [wres ], where wres is the weight column vector Win = [win i ]. Reservoir nodes are themselves coupled with each other using the weight matrix W ij ij of the connection from node j to node i. layer. We study the performance of ESN and autoregressive model on solving three time series problems: computing the 10th order NARMA time series [23], the 20th order NARMA time series [24], and the Hénon Map [25]. We also provide performance results using several variations of the mean squared error (MSE) and symmetric mean absolute percentage (SAMP) error to make our results accessible to the broader neural network and time series analysis research communities. Our systematic comparison between the ESN and autoregressive model provides solid evidence that the reservoir in the ESN performs non-trivial computation and is not just a memory device. III. A B RIEF S URVEY OF P REVIOUS W ORK The first conception of the RC paradigm in the recurrent neural network (RNN) community was Jaeger’s echo state network (ESN) [26]. In this early ESN, the reservoir consisted of N fully interconnected sigmoidal nodes. The reservoir connectivity was represented by a weight matrix with elements sampled from a uniform distribution in the interval [−1, 1]. The weight matrix was then rescaled to have a spectral radius of λ < 1, a sufficient condition for ESP. The input signal was connected to all the reservoir nodes and their weights were randomly assigned from the set {−1, 1}. Later, Jaeger [20], [27] proposed that the sparsity of the connection weight matrix would improve performance and therefore only 20% of the connections were assigned weights from the set {−47, 47}.Verstraeten et al. [28] used a 50% sparse reservoir and a normal distribution for the connection weights, and scaled the weight matrix posteriori to ensure the ESP; also, only 10% of the nodes were connected to the input. This study indicated that, contrary to the earlier report by Jaeger [26], the performance of the reservoir was sensitive to the spectral radius and showed optimality for λ ≈ 1.1. Venayagamoorthy and Shishir [29] demonstrated experimentally that the spectral radius also affects training time, but, they did not study spectral radii larger than one. Gallicchio and Micheli [30] provided evidence that the sparsity of the reservoir has a negligible effect on ESN performance, but depending on the task, input weight heterogeneity can significantly improve performance. Büsing et al. [18] reported, from private communication with Jaeger, that different reservoir structures, such as the scale-free and the small-world topologies, do not have any significant effect on ESN performance. Song and Feng [31] demonstrated that in ESNs, with complex network reservoirs, high average path length and low clustering coefficient improved the performance. This finding is at odds with what has been observed in complex cortical circuits [32] and other studies of ESN [33]. Rodan and Tino [24] studied an ESN model with a very simple reservoir consisting of nodes that are interconnected in a cycle with homogeneous input weights and homogeneous reservoir weights, and showed that its performance can be made arbitrarily close to that of the classical ESN. This finding addressed for the first time concerns about the practical use of ESNs in embedded systems due to their complexity [2]. Massar and Massar [34] formulated a meanfield approximation to the ESN reservoir and demonstrated that the optimal standard deviation of a normally distributed weight matrix σw is an inverse power-law of the reservoir size N with exponent −0.5. However, this optimality is based on having critical dynamics and not task-solving performance. IV. M ODELS To understand reservoir computation, we compare its behavior with a system with perfect memory and no computational power and a system with limited memory and arbitrary computational power. We choose delay line systems, NARX neural networks, and echo state networks as described below. We use U(t), Y (t), and Yb (t) to denote the time-dependent input signals, the time dependent output signal, and the time-dependent target signal, respectively. A. Delay line A tapped-delay line (DL) is a simple system that allows us to access a delayed version of a signal. To compare the computation in a reservoir with the DL, we use a linear readout layer and connect it to read the states of 3 Wout Wout U(t) Y(t) b delay line state X(t) (a) U(t) Wout Win Y(t) b b NARX delay line state X(t) U(t) Y(t) b reservoir state X(t) (b) (c) Figure 2. Architecture of delay line with a linear readout, the NARX neural network, and the ESN. the DL. Figure 2(a) is a schematic for this architecture. Note that this architecture is different from the delay line used in [24] in that the input is only connected to a single unit in the delay line. The delay units do not perform any computation. The system is then fed with a teacher input and the weights are trained using an ordinary linear regression on the teacher output as follows: b Wout = (XT · X)−1 · XT · Y, (1) where each row of X represents the state of the DL at a b are the teacher output specific time X(t0 ) and the rows of Y at for the corresponding time Y (t0 ). Note that the DL states are augmented with a bias unit with a constant value b = 1. Initially, all the DL states are set to zero. wout l,k is the weight of the connection from reservoir node k to output node l. All the weights are samples of i.i.d. random variables from a normal distribution with mean µw = 0 and standard deviation σw . We represent the time-varying input signal by an Ith order column vector U(t) = [ui (t)], the reservoir state by an Nth order column vector X(t) = [x j (t)], and the generated output by an Oth order column vector Y(t) = [yl (t)]. We compute the time evolution of each reservoir node in discrete time as: in x j (t + 1) = tanh(Wres j · X(t) + W · U(t)), where tanh is the nonlinear transfer function of the reservoir nodes and Wres is the jth row of the reservoir weight j matrix. The reservoir output is then given by: Y(t) = Wout · X(t). B. NARX Network The NARX network is an autoregressive neural network architecture with a tapped delay input and one or more hidden layers. Both hidden layers and the output layer are provided with a bias input with constant value b = 1. We use tanh as the transfer function for the hidden layer and a linear transfer function for the output layer. The network is trained using the Marquardt algorithm [35]. This architecture performs a nonlinear regression on the teacher output using the previous values of the input accessible through the tapped delay line. A schematic of this architecture is given in Figure 2(b). Since we would like to study the effect of regression complexity on the performance, we fix the length of the tapped delay to 10 and vary the number of hidden nodes. C. Echo State Network In our ESN, the reservoir consists of a fully connected network of N nodes extended with a constant bias node b = 1. The input and the output nodes are connected to all the reservoir nodes. The input weight matrix is an I × N matrix Win = [win i, j ], where I is the number of input nodes and winj,i is the weight of the connection from input node i to reservoir node j. The connection weights inside the reservoir are represented by an N × N matrix Wres = [wres j,k ], where wres is the weight from node k to node j in the j,k reservoir. The output weight matrix is an (N +1(×O matrix Wout = [wout l,k ], where O is the number of output nodes and (2) (3) We train the output weights to minimize the squared output 2 given the target output Y(t). b b error E = ||Y(t) − Y(t)|| As with DL, the output weights are calculated using the ordinary linear regression given in Equation 1. V. E VALUATION M ETHODOLOGY The study of task-solving performance and analysis of computational power in RC is a major challenge because there are a variety of RC architectures, each with a unique set of parameters that potentially affect the performance. The optimal RC parameters are task-dependent and must be adjusted experimentally. Furthermore, not all studies use the same tasks and the same performance metrics to evaluate their results. In addition, in contrast to classical computation models in which a programmed automaton acts on a storage device, RC is a dynamical system in which memory and computing are inseparable parts of a single phenomenon. In other words, in RC the same dynamical process that performs computation also retains the memory of the previous results and inputs. Thus, it is not clear how much of the RC’s performance can be attributed to its memory capacity and how much to its computational power. As a way of approaching this issue, we attempt to create a functional comparison between the ESN, DL, and NARX networks. We choose three temporal tasks for our evaluation: the Hénon Map, the NARMA 10 time series, and the NARMA 20 time series. These tasks vary in increasing order in their 4 time lag dependencies and the number of terms involved and thus let us compare the performance of our systems based on the memory and computational requirements for task solving. We measure the performance using three variations of MSE and a SAMP error measure to allow easy comparison with related work. A. Tasks 1) Hénon Map Time Series: This time series is generated by the following system: 2 yt = 1 − 1.4yt−1 + 0.3yt−2 + zt , (4) where zt is a white noise term with standard deviation 0.001. This is an example of a task that requires limited computation and memory, and can therefore be used as a baseline to evaluate ESN performance. 2) NARMA 10 Time Series: Nonlinear autoregressive moving average (NARMA) is a discrete-time temporal task with 10th-order time lag. To simplify the notation we use yt to denote y(t). The NARMA 10 time series is given by: n yt = αyt−1 + β yt−1 ∑ yt−i + γut−n ut−1 + δ , (5) i=1 where n = 10, α = 0.3, β = 0.05, γ = 1.5, δ = 0.1. The input ut is drawn from a uniform distribution in the interval [0, 0.5]. This task presents a challenging problem to any computational system because of its nonlinearity and dependence on long time lags. Calculating the task is trivial if one has access to a device capable of algorithmic programming and perfect memory of both the input and the outputs of up to 10 previous time steps. This task is often used to evaluate the memory capacity and computational power of ESN and other recurrent neural networks. 3) NARMA 20 Time Series: NARMA 20 requires twice the memory and computation compared to NARMA 10 with an additional nonlinearity because of the saturation function tanh. This task is very unstable and the saturation function keeps its values bounded. NARMA 20 time series is given by: n yt = tanh(αyt−1 + β yt−1 ∑ yt−i + γut−n ut−1 + δ ), (6) i=1 where n = 20, and the rest of the constants are set as in NARMA 10. B. Error Calculation A challenge in comparing results across different studies is the way each study evaluates its results. In the case of time series analysis, each study may use a different error calculation to measure the performance of the presented methods. We present three different error calculations commonly used in the time series analysis literature. We use y to refer to the time-dependent output and yb to refer to the target output. The expectation operator h·i refers to the time average of its operand. 1) Root normalized mean squared error: The most commonly used measure is a root normalized mean squared error (RNMSE) calculated as follows: s h(y − yb)2 i . (7) RNMSE = σybw2 Here σyb2 is the standard deviation of the target output over time. In some studies this calculation is used without taking the square root, in which case it is simply called a normalized mean squared error (NMSE). 2) Normalized root mean squared error: A variant of the normalized error is the normalized root mean square error (NRMSE), also known as normalized root mean squared deviation (NRMSD). It is calculated as follows: p h(y − yb)2 i . (8) NRMSE = max(b y) − min(b y) In this variant, the error is normalized by the width of the range covered by the target signal. Both RNMSE and NRMSE attempt to normalize the error between 0 and 1. However, if the distance between the output and the target output is larger than the standard deviation of the target output or its range, they may produce an error value larger than 1. 3) Symmetric absolute mean percentage error: The symmetric absolute mean percentage (SAMP) error, on the other hand, is guaranteed to produce an error value between 0% and 100%. SAMP is given by:   |y − yb| SAMP = 100 × . (9) y + yb Throughout the rest of the paper, we use the RNMSE error to produce the plots and make our comparison between the three systems. We have tabulated the results using the other metrics in the Appendix B. C. Reservoir optimization Depending on the ESN architecture, its performance can be sensitive to some of the model’s parameters. These parameters are optimized using offline cross-validation [24], [36] or online adaptation [19], [37]. This is a preliminary stage before the functional comparison. We are interested in the scaling of these parameters, which we study systematically. Figures 3(a)-3(c) shows the resulting error surface by averaging the result of the 10 runs of each σw -N combination. We observe that, as the nonlinearity of the task and its required memory increase, ESN performance becomes more sensitive to changes in σw and favors a more heterogeneous weight assignment (larger σw ). We find the optimal standard deviation σw∗ as a function of N for each task: σw∗ (N) = arg min RNMSE(σw , N). (10) σw We found experimentally that σw∗ (N) is best fitted by a power-law curve. The bottom row of Figure 3 shows the result of this optimization and the power-law fit. The details of these fits are provided in Appendix A. For NARMA 10 5 900 700 0.6 700 600 0.5 600 500 0.4 400 0.3 300 0.6 0.5 400 0.4 300 0.3 200 0.2 200 100 0.1 100 0.2 0.8 700 0.7 500 0.9 800 0.8 800 N N 900 0.7 800 900 1000 0.8 N 1000 600 0.7 500 0.6 400 0.5 300 0.4 200 0.3 100 0.1 0.02 0.04 0.06 0.08 0.1 σw (a) Hénon Map error surface (b) NARMA 10 error surface (c) NARMA 20 error surface 0.14 0.14 0.14 0.12 0.12 0.12 0.1 0.1 0.08 σ w∗ 0.1 σ w∗ σ w∗ 0.2 0.02 0.04 0.06 0.08 0.1 σw 0.02 0.04 0.06 0.08 0.1 σw 0.08 0.06 0.06 0.06 0.04 0.04 0.04 0.02 0 0 0.08 200 400 600 800 1000 0.02 0 0.02 200 400 N (d) Hénon Map σw scaling 600 800 1000 N (e) NARMA 10 σw scaling 0 0 200 400 600 800 1000 N (f) NARMA 20 σw scaling Figure 3. Scaling and optimization in the ESN. Figures 3(a), 3(b), and 3(c) show the training error surface of the ESN on the Hénon Map, the NARMA 10, and the NARMA 20 tasks respectively. We create a scaling-law by finding the optimal standard deviation σw∗ (N) according to Equation 10 and fitting the power-law axb + c to it. Figures 3(d), 3(e), and 3(f) show the data points (blue markers) and the fit (solid line) for the σw∗ (N). and NARMA 20 the power law is well behaved, except for the Hénon Map which is not sensitive to σw . We use σw∗ = 0.02 for Hénon Map experiments. It is noteworthy that this power-law behavior is qualitatively consistent with what we expect from the theoretical result in [34], although the exact power-law coefficient is task-dependent. on the same task. For ESN, we have two parameters: the standard deviation of the normal distribution used to create the weight matrix σw and the number of nodes N in the reservoir. We chose the σw that optimizes the performance of ESN for each N as described in Section V-C. E. Experimental Setup D. Functional Comparison The division between memory and computation is not fully understood. Here, we attempt to compare the ESN size to the size of an equivalent device with only memory capacity and no computational power, and to a device with limited memory and theoretically arbitrary computational power. A DL of length n stores the perfect memory of the past n inputs and a NARX network with N hidden units can be a universal approximator of any time series. We would like to compare the performance of a linear readout with access to the reservoir state with a linear readout with access to the delay line states and also to the performance of the NARX network. It is clear that the ESN, the DL, and the NARX network are very different, i.e., the memory and computational power of ESN, DL, and NARX networks differ significantly even with identical N. Therefore, we perform a functional comparison in which we study the ESN, the DL, and the NARX network with equal RNMSE In this section we describe the parameters and data sets used for our simulations. The training and testing for delay line and NARX networks are done by generating 10 time series of 4,000 time steps. We used 20 time seres of the same length for ESNs. We used the first 2,000 time steps of each time series to train the model and the second 2,000 steps to test the model. The training and testing performance metrics are then averaged over the 10 runs. The model specific setting are as follows: 1) Delay line: A delay line is a fixed system with only one parameter N that defines the number of taps. For this study we limit ourselves to 1 ≤ N ≤ 2, 000. We have also experimented with 2, 000 ≤ N ≤ 3, 000, but the performance of the delay line does not change for N > 2, 000. We take N = 2, 000 as the largest delay line for this study. 2) NARX neural network: Since the training in the NARX network is sensitive to the random initial weights, we instantiate a new network for each time series. We fix 6 1 0.8 1 Delay line NARX NN ESN 0.9 0.8 0.8 0.7 0.6 0.6 0.6 0.4 RNMSE 0.7 0.5 0.5 0.4 0.5 0.4 0.3 0.3 0.3 0.2 0.2 0.2 0.1 0.1 0.1 0 0 500 1000 1500 Normalized size 0 0 2000 (a) Hénon Map training 5 5 5 RNMSE 0 0 10 −5 0 10 −5 500 1000 1500 Normalized size 2000 (d) Hénon Map generalization Delay line NARX NN ESN 10 RNMSE RNMSE 0 2000 10 10 Delay line NARX NN ESN 10 10 500 1000 1500 Normalized size (c) NARMA 20 training 10 10 Delay line NARX NN ESN 10 10 0 0 2000 (b) NARMA 10 training 10 10 500 1000 1500 Normalized size Delay line NARX NN ESN 0.9 0.7 RNMSE RNMSE 1 Delay line NARX NN ESN 0.9 10 0 −5 500 1000 1500 Normalized size (e) NARMA 10 generalization 2000 10 0 500 1000 1500 Normalized size 2000 (f) NARMA 20 generalization Figure 4. Training and generalization RNMSE of the DL, the NARX network, and the ESN for three different tasks. The DL can memorize the patterns, but not generalize for any of the tasks. The NARX network can generalize for the Hénon Map, but overfits for the NARMA 10 and the NARMA 20. The ESN can both memorize and generalize the temporal patterns for all the tasks. the number of input taps to 10 and the number of hidden layers to 1. We use the number of nodes in the hidden layer N as the control parameter, with 1 ≤ N ≤ 100. 3) Echo state network: A single instantiation of ESN contains randomly assigned weights and the reservoir initial states. To average the ESN properties over these variations we instantiate five ESN to train and test for every time series. The error is then averaged over the five instances and then over 20 time series. The variable parameters for ESN are the number of reservoir nodes N and the standard deviation of the normal distribution used to generate the reservoir and the input weights. However, for each N we only use the σw∗ as described in Section V-C. We study the ESN with the reservoir size 10 ≤ N ≤ 1, 000. VI. R ESULTS Figures 4(a)-4(c) show the training performance measured in RNMSE as a function of the normalized system size. In all three tasks, the delay line shows a sharp decrease in error as soon as the system acquires enough capacity to hold all the required information for the task. This is N = 2 for Hénon Map, N = 10 for NARMA 10 task, and N = 20 for NARMA 20 task. After this point, the error decreases slowly until N = 2, 000 where RNMSE ≈ 0.14 after a sharp drop. The decrease in error is due to the “dimensionality curse”: the fixed-length teacher time series are not representatives of the expanded state space of the delay line. This is expected to result in overfitting, which is reflected in the high testing errors on Figures 4(d)-4(f). Another expected behavior of overfitting to training data is that if the distribution of the data is wide, the error will be larger and for narrower distributions of data the error will be lower. This is why the delay line has the highest error for the simplest task, the Hénon Map, and the lowest error for the most difficult task, the NARMA 20 task. Note that to make the testing errors for all the system readable, we use logarithmic y-axes. The NARX network behaves differently on the Hénon Map and the two NARMA tasks. For the Hénon Map, it shows the best training and testing performance around N = 5 and begins to overfits for N > 5. For both NARMA 10 and NARMA 20, the training error decreases gradually as the number of hidden nodes increases, but the system only memorizes the patterns and cannot generalize, which is characterized by increasing test RNMSE. For the NARMA 10 task, the observed training RNMSE for NARX network is comparable to the error of 0.17 reported by Atiya and Parlos [23] for the same network size N = 40. However, they used only 200 data points, which explains the slightly lower error. Atiya and Parlos focused on the convergence 7 Next, we compared the performance of the DL, the NARX network, and the ESN as described in Section V-D. Because the testing error of the systems do not overlap, we have to use the training error to perform a direct functional comparison between the three systems. This allows us to compare their memorization capabilities. Figure 5(a) shows the DL size as a function of the ESN size of identical training error for all three tasks. For the Hénon Map and the NARMA 10 tasks, the ESN achieves the same RNMSE as the delay line with significantly fewer nodes. For instance for the Hénon Map and NARMA 10, to achieve a training RNMSE of an ESN with 400 nodes, a delay line would need 1, 990 and 1, 810 nodes respectively. For NARMA 20, the delay line only needs 90 nodes to achieve the same RNMSE as an ESN with 400 nodes. The narrow distribution of the NARMA 20 time series allow the linear delay line to exploit the average case strategy to achieve a lower RNMSE. On the other hand, the ESN readout layer learns the task itself as in contrast to just memorizing patterns. The delay line use the same strategy for the easier tasks as well (NARMA 10 and Hénon Map), but ESN can fit to the the training data much better than the delay line and therefore requires much less resources to achieve the same error level. Figure 5(b) shows the functional comparison result between NARX networks and ESNs. A NARX network would need 10 hidden nodes to achieve the same RNMSE as a 400-node ESN on the Hénon Map task. The short time dependency and the simple form of this task make it very easy for the network to learn the system, which results in low training and testing RNMSE. For the NARMA 10 and the NARMA 20 tasks, the network requires 60 and 50 hidden nodes to be equivalent of the 400-node ESN. The strategy here is similar to the delay line where during learning the network tries to fit the training data on average, as best as it can. As expected this strategy will have two consequences: (1) the NARMA 20 task will be easier because of its distribution; (2) the network overfits the training data and cannot generalize to testing data. The reservoir in an ESN is a dynamical system in which memory and computation are inseparable. To understand this type of information processing we compared the ESN performance with a memory-only device, the DL, and a limited-memory but computationally powerful device, the NARX network. Our results illustrate that the performance of ESN is not only due to its memory capacity; ESN readout does not create an autoregression of the input, such as in the DL or the NARX network. The information processing that takes place inside a reservoir is fundamentally different from other types of neural networks. The exact mechanism of this process remains to be investigated. Studying reservoir computing usually takes place by analyzing the systems performance for task solving with different com- 2000 1500 Delay line size For the ESN, the training error on all three tasks decreases rapidly as the size of the reservoir increases and reaches a plateau for N ≈ 1, 000. However, unlike the DL and the NARX network, the testing error also decreases sharply as the reservoir size increases. As expected, this decrease is sharper for easier tasks. The main different of the ESN performance is that the training error increases across all N as the difficulty of the task increases, which is a sign that the readout layer is not merely memorizing the training patterns. We have tabulated the error values for all three systems on all the tasks for a few system sizes, which can be found in the Appendix B. Our ESN testing results are similar to those reported by Rodan and Tino [24] for the same system size. VII. D ISCUSSION AND O PEN P ROBLEMS y=x Henon Map Narma 10 Narma 20 1000 500 0 200 400 600 800 1000 ESN reservoir size (a) DL vs. ESN 100 NARX NN hidden layer size times of different algorithms and did not publish their testing error. 80 60 40 20 0 y=x Henon Map Narma 10 Narma 20 200 400 600 800 ESN reservoir size 1000 (b) NARX NN vs. ESN Figure 5. Figure 5(a) shows how the complexity of the DL compares with the ESN of identical memorization performance. Except for the NARMA 20, which requires perfect memory of the 20 previous time steps, the ESN memorization capability far surpasses the DL. Figure 5(b) shows the same comparison between the NARX and the ESN. The NARX network out performs the ESN in all tasks. Due its complexity, the NARX network can memorize the patterns very well, but is not able to generalize to the new patterns (see Figure 4). 8 putational and memory requirements. To understand the details of information processing in a reservoir, we have to understand the effects of the reservoir’s architecture on its fundamental memory and computational capacity. We also have to be able to define the classes of tasks that can be parametrically varied in memory requirement and nonlinearity. Our study reveals that although ESN cannot memorize patterns as well as a memory device or a neural network, it greatly outperforms them in generalizing to novel inputs. Also, increasing reservoir size in ESN improves the performance of generalization, whereas in the DL or the NARX network this will result in increased overfitting leading to poorer generalization. One solution would be to extend the receiver operation characteristic (ROC) and receiver error characteristic (REC) curve methods to decide on the quality of generalization in ESN [38]–[40]. In the neural network community, methods based on pruning, regularization, cross-validation, and information criterion have been used to alleviate the overfitting problem [41]– [53]. Among these methods, regularization has been successfully used in ESNs [3]. However, these methods focus on increasing the neural network’s performance and are not suitable to quantify overfitting or to study task hardness. Another area that requires more research is the amount of training that the ESN requires to guarantee a certain performance, as is described in probably approximately correct methods [54]–[56]. To the best of our knowledge these problems have not been addressed in the case of highdimensional dynamical systems. A well developed theory of computation in reservoir computing needs to address all of these aspects. In future work, we will study some of these issues experimentally and based on our observations, we will attempt to develop theoretical understanding of computation in the reservoir computing paradigm. VIII. C ONCLUSION Reservoir computing is an approach to neural network training which has been successful in areas of machine learning, time series analysis, robot control, and sequence learning. There has been many studies aimed at understanding the working of RC and the factors that affect its performance. However, because of the complexity of the reservoir in RC, none of these studies have been completely satisfactory and have often resulted in contradictory conclusions. In this paper, we compared the performance of three approaches to time series analysis: the delay line, the NARX network, and the ESN. These methods vary in their memory capacity and computational power. The delay line retains a perfect memory of the past, but does not have any computational power. The NARX network only has limited memory of the past, but in principle can perform any computation. Finally, the ESN does not have an explicit access to past memory, but its reservoir carries out computation using the implicit memory of the past represented in its dynamics. Using a functional comparison we showed that for simple tasks with short time dependencies, the delay line requires more than four times as much resources that ESN requires to achieve the same error, while the NARX network requires 40 times less resources than ESN to achieve equivalent error. For tasks with long time dependencies and narrow distributions the delay line requires less than one fourth the resources of the ESN and the NARX network requires less then one fifth the same resources. However, neither a delay line nor a NARX network can achieve the generalization power of an ESN. Many theoretical aspects of reservoir computing, such as the memory-computation trade-off, and the relation between reservoir’s structure, its dynamics, and its performance remain as open problems. ACKNOWLEDGMENT The work was support by NSF grants #1028238 and #1028120. M.R.L. gratefully acknowledges support from the New Mexico Cancer Nanoscience and Microsystems Training Center. A PPENDIX A F ITTING σw Before we can fit σw∗ , we have to interpolate the data points on the error surface with a linear fit. This allows us to use all values of N and σw and create a smooth fit. Table I shows the goodness of fit statistics for the linear fit to the error surface. Low SSE and high R2 statistics on this fit shows the the surface accurately represent the data points. We then calculate the σw∗ corresponding to the task Hénon Map NARMA 10 NARMA 20 SSE 1.5486 × 10−31 2.989 × 10−31 7.3725 × 10−31 Table I R2 1 1 1 G OODNESS OF FIT STATISTICS FOR THE INTERPOLANT FIT TO THE ERROR SURFACE (F IGURE 3) AS A FUNCTION OF RESERVOIR σw AND FOR ALL THREE TASKS . N standard deviation of the weight matrix for each N that minimizes the error. We represent σw∗ as a function of N and fit the power-law axb + c to it. The result of the fit and the goodness of fit statistics are given in Table II. A PPENDIX B T HE P ERFORMANCE R ESULTS Tables III, IV, and V tabulate the average testing and training errors of optimal ESNs, delay lines, and NARX networks for the three different tasks using three different measures, i.e., RNMSE, NRMSE, and SAMP. R EFERENCES [1] B. Schrauwen, D. Verstraeten, and J. V. Campenhout, “An overview of reservoir computing: theory, applications and implementations,” in Proceedings of the 15th European Symposium on Artificial Neural Networks, 2007, pp. 471–482. [2] D. Prokhorov, “Echo state networks: appeal and challenges,” in Neural Networks, 2005. IJCNN ’05. Proceedings. 2005 IEEE International Joint Conference on, vol. 3, 2005, pp. 1463–1466 vol. 3. 9 task Hénon Map task NARMA 10 task NARMA 20 measure training RNMSE testing training NRMSE testing training SAMP testing N = 50, σw∗ = 0.02 0.2474 ± 0.0215 0.3805 ± 0.0738 0.0696 ± 0.0060 0.1071 ± 0.0208 16.2797 ± 1.1912 16.6023 ± 1.2046 N = 100, σw∗ = 0.02 0.0385 ± 0.0039 0.1053 ± 0.0225 0.0109 ± 0.0011 0.0296 ± 0.0063 3.0074 ± 0.3899 3.2470 ± 0.4199 N = 150, σw∗ = 0.02 0.0247 ± 0.0008 0.0448 ± 0.0061 0.0069 ± 0.0002 0.0126 ± 0.0017 1.2687 ± 0.1440 1.4182 ± 0.1577 N = 200, σw∗ = 0.02 0.0230 ± 0.0002 0.0359 ± 0.0048 0.0065 ± 0.0000 0.0101 ± 0.0014 0.8498 ± 0.0584 0.9797 ± 0.0672 N = 500, σw∗ = 0.02 0.0226 ± 0.0001 0.0264 ± 0.0026 0.0063 ± 0.0000 0.0074 ± 0.0007 0.6821 ± 0.0373 0.9441 ± 0.0527 measure training RNMSE testing training NRMSE testing training SAMP testing N = 50, σw∗ = 0.10 0.3896 ± 0.0073 0.4035 ± 0.0070 0.0635 ± 0.0012 0.0653 ± 0.0011 4.6137 ± 0.0819 4.7961 ± 0.0862 N = 100, σw∗ = 0.07 0.3036 ± 0.0104 0.3270 ± 0.0113 0.0495 ± 0.0017 0.0529 ± 0.0018 3.5742 ± 0.1343 3.8297 ± 0.1467 N = 150, σw∗ = 0.05 0.2300 ± 0.0058 0.2560 ± 0.0064 0.0374 ± 0.0010 0.0414 ± 0.0011 2.6224 ± 0.0742 2.8827 ± 0.0881 N = 200, σw∗ = 0.05 0.1904 ± 0.0051 0.2199 ± 0.0054 0.0309 ± 0.0008 0.0355 ± 0.0009 2.1247 ± 0.0642 2.4024 ± 0.0719 N = 500, σw∗ = 0.04 0.1248 ± 0.0056 0.1796 ± 0.0078 0.0202 ± 0.0009 0.0291 ± 0.0013 1.4310 ± 0.0654 1.9710 ± 0.0900 measure training RNMSE testing training NRMSE testing training SAMP testing N = 50, σw∗ = 0.10 0.7846 ± 0.0246 0.8003 ± 0.0257 0.0985 ± 0.0031 0.1012 ± 0.0032 2.9507 ± 0.0776 3.0570 ± 0.0830 N = 100, σw∗ = 0.09 0.5313 ± 0.0510 0.5746 ± 0.0499 0.0667 ± 0.0065 0.0728 ± 0.0062 2.1860 ± 0.1922 2.3736 ± 0.1874 N = 150, σw∗ = 0.08 0.4478 ± 0.0650 8.6177 ± 24.2443 0.0562 ± 0.0082 1.0662 ± 2.9647 1.9531 ± 0.2518 6.0811 ± 7.7539 N = 200, σw∗ = 0.07 0.4171 ± 0.0621 5.7683 ± 13.0557 0.0524 ± 0.0078 0.7260 ± 1.6434 1.8459 ± 0.2461 5.3690 ± 7.2349 N = 500, σw∗ = 0.04 0.2776 ± 0.0183 0.3873 ± 0.0222 0.0349 ± 0.0023 0.0491 ± 0.0028 1.3097 ± 0.0807 1.8134 ± 0.0965 Table III T RAINING AND TESTING ERRORS FOR THE OPTIMAL ESN ON THREE DIFFERENT TASKS MEASURED USING THREE DIFFERENT ERROR METRICS ∗ RNMSE, NRMSE, AND SAMP. T HE OPTIMAL σw IS MEASURED USING THE RNMSE ON THE TRAINING DATA . E ACH DATA POINT IS AVERAGED OVER 100 EXPERIMENTS . task measure training testing training NRMSE testing training SAMP testing N = 100 0.8726 ± 0.0044 0.9164 ± 0.0051 0.2452 ± 0.0011 0.2581 ± 0.0017 56.0839 ± 0.3592 57.8635 ± 0.3953 N = 200 0.8478 ± 0.0038 0.9378 ± 0.0037 0.2382 ± 0.0009 0.2636 ± 0.0017 54.1909 ± 0.3698 58.3511 ± 0.2825 N = 500 0.7848 ± 0.0049 1.0243 ± 0.0120 0.2208 ± 0.0018 0.2886 ± 0.0037 50.1493 ± 0.3639 59.4723 ± 0.5885 N = 1000 0.6764 ± 0.0060 1.2294 ± 0.0183 0.1901 ± 0.0011 0.3463 ± 0.0046 42.7874 ± 0.4785 60.9760 ± 0.5650 N = 2000 0.1426 ± 0.0066 13305472391.5757 ± 9380091076.0147 0.0402 ± 0.0018 3748747654.4792 ± 2646155454.1636 2.5302 ± 0.1497 95.2081 ± 0.4781 measure training testing training NRMSE testing training SAMP testing N = 100 0.3972 ± 0.0188 2.9150 ± 0.1827 0.0650 ± 0.0021 0.4642 ± 0.0360 4.6786 ± 0.1660 27.5133 ± 1.0130 N = 200 0.3884 ± 0.0193 2.9088 ± 0.1852 0.0635 ± 0.0020 0.4633 ± 0.0363 4.5824 ± 0.1747 27.4396 ± 1.0251 N = 500 0.3590 ± 0.0224 2.8797 ± 0.1919 0.0586 ± 0.0021 0.4586 ± 0.0370 4.2474 ± 0.1970 27.2029 ± 1.0782 N = 1000 0.3017 ± 0.0230 2.8063 ± 0.2152 0.0493 ± 0.0025 0.4468 ± 0.0401 3.5989 ± 0.2575 26.5114 ± 1.2347 N = 2000 0.0497 ± 0.0072 1007103272.9273 ± 482045875.2627 0.0082 ± 0.0013 164091125.1086 ± 83497086.3948 0.1873 ± 0.0222 100.0000 ± 0.0000 measure training RNMSE testing training NRMSE testing training SAMP testing N = 100 0.2620 ± 0.0093 13.5807 ± 0.7275 0.0333 ± 0.0020 1.7237 ± 0.0382 1.3211 ± 0.0855 43.8473 ± 0.5246 N = 200 0.2289 ± 0.0068 13.6650 ± 0.7321 0.0290 ± 0.0014 1.7346 ± 0.0402 1.1533 ± 0.0600 44.0038 ± 0.5579 N = 500 0.2132 ± 0.0066 13.7338 ± 0.7514 0.0271 ± 0.0014 1.7433 ± 0.0429 1.0761 ± 0.0615 44.1198 ± 0.5911 N = 1000 0.1804 ± 0.0091 13.9180 ± 0.7712 0.0229 ± 0.0017 1.7667 ± 0.0457 0.8980 ± 0.0743 44.4313 ± 0.6170 N = 2000 0.0450 ± 0.0061 1234560367.6547 ± 811645432.8192 0.0057 ± 0.0007 160391618.4866 ± 109709916.7516 0.1113 ± 0.0132 100.0000 ± 0.0000 RNMSE Hénon Map task RNMSE NARMA 10 task NARMA 20 Table IV T RAINING AND TESTING ERRORS FOR THE DELAY LINE RESERVOIR ON THREE DIFFERENT TASKS MEASURED USING THREE DIFFERENT ERROR METRICS RNMSE, NRMSE, AND SAMP. E ACH DATA POINT IS AVERAGED OVER 10 EXPERIMENTS . task measure training testing training NRMSE testing training SAMP testing N=5 0.0014 ± 0.0000 0.0014 ± 0.0000 0.0004 ± 0.0000 0.0004 ± 0.0000 0.1900 ± 0.0304 0.2091 ± 0.0293 N = 10 0.0013 ± 0.0000 0.0015 ± 0.0000 0.0004 ± 0.0000 0.0004 ± 0.0000 0.1692 ± 0.0292 0.1914 ± 0.0218 N = 30 0.0012 ± 0.0000 0.0016 ± 0.0000 0.0003 ± 0.0000 0.0005 ± 0.0000 0.1674 ± 0.0293 0.2110 ± 0.0294 N = 50 0.0011 ± 0.0000 0.0019 ± 0.0001 0.0003 ± 0.0000 0.0005 ± 0.0000 0.1455 ± 0.0140 0.2323 ± 0.0354 N = 100 0.0009 ± 0.0000 0.0037 ± 0.0008 0.0003 ± 0.0000 0.0010 ± 0.0002 0.1098 ± 0.0142 0.3263 ± 0.0335 training testing training testing training testing 0.9081 ± 0.0072 1.0894 ± 0.0074 0.2617 ± 0.0018 0.3156 ± 0.0030 26.2977 ± 0.3168 30.4646 ± 0.4856 0.8235 ± 0.0091 1.1627 ± 0.0121 0.2373 ± 0.0028 0.3368 ± 0.0048 24.2035 ± 0.3464 31.9513 ± 0.5791 0.5010 ± 0.0094 1.5363 ± 0.0233 0.1444 ± 0.0026 0.4451 ± 0.0080 17.0853 ± 0.2634 40.4312 ± 0.8923 0.2450 ± 0.0100 1.9322 ± 0.0330 0.0706 ± 0.0028 0.5598 ± 0.0110 10.3269 ± 0.4612 47.1503 ± 0.6935 0.0000 ± 0.0000 2.5015 ± 0.0755 0.0000 ± 0.0000 0.7246 ± 0.0227 0.0000 ± 0.0000 52.7679 ± 1.0017 training testing training testing training testing 0.9276 ± 0.0046 1.2201 ± 0.2734 0.2673 ± 0.0015 0.3538 ± 0.0806 26.6541 ± 0.2840 30.4213 ± 0.6264 0.8468 ± 0.0063 1.4458 ± 0.5060 0.2441 ± 0.0022 0.4189 ± 0.1466 24.7928 ± 0.2442 31.9725 ± 0.7206 0.5279 ± 0.0100 1.5594 ± 0.0238 0.1521 ± 0.0030 0.4517 ± 0.0077 17.6939 ± 0.2953 40.2941 ± 0.7937 0.2725 ± 0.0084 2.0689 ± 0.0580 0.0785 ± 0.0026 0.5994 ± 0.0186 11.0069 ± 0.4056 47.8871 ± 0.8487 0.0000 ± 0.0000 2.8666 ± 0.0921 0.0000 ± 0.0000 0.8307 ± 0.0310 0.0000 ± 0.0000 54.5926 ± 1.1815 RNMSE Hénon Map RNMSE NARMA 10 NRMSE SAMP RNMSE NARMA 20 NRMSE SAMP Table V T RAINING AND TESTING ERRORS FOR THE NARX NETWORK ON THREE DIFFERENT TASKS MEASURED USING THREE DIFFERENT ERROR METRICS RNMSE, NRMSE, AND SAMP. E ACH DATA POINT IS AVERAGED OVER 10 EXPERIMENTS . [3] F. Wyffels and B. Schrauwen, “A comparative study of reservoir computing strategies for monthly time series prediction,” Neurocomputing, vol. 73, no. 10–12, pp. 1958–1964, 2010. [4] H. Jaeger, “Adaptive nonlinear system identification with echo state networks,” in NIPS, 2002, pp. 593–600. [5] M. Lukoševičius and H. Jaeger, “Reservoir computing approaches to 10 Hénon Map 0.0011 0.5670 −5.733 × 10−8 ± 2.9430 × 10−7 1.795 ± 0.7450 0.02053 ± 0.0016 NARMA 10 SSE 2.9686 × 10−4 R2 0.9926 a 0.306 ± 0.0095 b −0.2609 ± 0.0249 c −0.02537 ± 0.0079 NARMA 20 SSE 5.8581 × 10−4 R2 0.9909 a −0.03441 ± 0.0143 b 0.2156 ± 0.0408 c 0.1766 ± 0.0210 Table II G OODNESS OF FIT STATISTICS FOR THE POWER - LAW FIT axb + c TO σw∗ (F IGURE 3) AS A FUNCTION OF RESERVOIR SIZE N FOR ALL THREE TASKS . SSE R2 a b c [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] recurrent neural network training,” Computer Science Review, vol. 3, no. 3, pp. 127–149, 2009. H. O. Sillin, R. Aguilera, H.-H. Shieh, A. V. Avizienis, M. Aono, A. Z. Stieg, and J. K. Gimzewski, “A theoretical and experimental study of neuromorphic atomic switch networks for reservoir computing,” Nanotechnology, vol. 24, no. 38, p. 384004, 2013. M. Fiers, B. Maes, and P. Bienstman, “Dynamics of coupled cavities for optical reservoir computing,” in Proceedings of the 2009 Annual Symposium of the IEEE Photonics Benelux Chapter, S. Beri, P. Tassin, G. Craggs, X. Leijtens, and J. Danckaert, Eds. VUB Press, 2009, pp. 129–132. G. Indiveri, B. Linares-Barranco, R. Legenstein, G. Deligeorgis, and T. Prodromakis, “Integration of nanoscale memristor synapses in neuromorphic computing architectures,” Nanotechnology, vol. 24, no. 38, p. 384010, 2013. O. Obst, A. Trinchi, S. G. Hardin, M. Chadwick, I. Cole, T. H. Muster, N. Hoschke, D. Ostry, D. Price, K. N. Pham, and T. Wark, “Nano-scale reservoir computing,” Nano Communication Networks, vol. 4, no. 4, pp. 189–196, 2013. Y. Paquot, F. Duport, A. Smerieri, J. Dambre, B. Schrauwen, M. Haelterman, and S. Massar, “Optoelectronic reservoir computing,” Scientific Reports, vol. 2, 02 2012. C. Fernando and S. Sojakka, “Pattern recognition in a bucket,” in Advances in Artificial Life, ser. Lecture Notes in Computer Science, W. Banzhaf, J. Ziegler, T. Christaller, P. Dittrich, and J. Kim, Eds. Springer Berlin Heidelberg, 2003, vol. 2801, pp. 588–597. A. Goudarzi, M. R. Lakin, and D. Stefanovic, “DNA reservoir computing: A novel molecular computing approach,” in DNA Computing and Molecular Programming, ser. Lecture Notes in Computer Science, D. Soloveichik and B. Yurke, Eds. Springer International Publishing, 2013, vol. 8141, pp. 76–89. H. Jaeger and H. Haas, “Harnessing nonlinearity: Predicting chaotic systems and saving energy in wireless communication,” Science, vol. 304, no. 5667, pp. 78–80, 2004. W. Maass, T. Natschläger, and H. Markram, “Real-time computing without stable states: a new framework for neural computation based on perturbations,” Neural Computation, vol. 14, no. 11, pp. 2531–60, 2002. T. Natschläger and W. Maass, “Information dynamics and emergent computation in recurrent circuits of spiking neurons,” in Proc. of NIPS 2003, Advances in Neural Information Processing Systems, S. Thrun, L. Saul, and B. Schoelkpf, Eds., vol. 16. Cambridge: MIT Press, 2004, pp. 1255–1262. N. Bertschinger and T. Natschläger, “Real-time computation at the edge of chaos in recurrent neural networks,” Neural Computation, vol. 16, no. 7, pp. 1413–1436, 2004. D. Snyder, A. Goudarzi, and C. Teuscher, “Computational capabilities of random automata networks for reservoir computing,” Phys. Rev. E, vol. 87, p. 042808, Apr 2013. [18] L. Büsing, B. Schrauwen, and R. Legenstein, “Connectivity, dynamics, and memory in reservoir computing with binary and analog neurons.” Neural Computation, vol. 22, no. 5, pp. 1272–1311, 2010. [19] J. Boedecker, O. Obst, N. M. Mayer, and M. Asada, “Initialization and self-organized optimization of recurrent neural network connectivity,” HFSP Journal, vol. 3, no. 5, pp. 340–349, 2009. [20] H. Jaeger, “Tutorial on training recurrent neural networks, covering BPPT, RTRL, EKF and the “ echo state network” approach,” German National Research Center for Information Technology, St. AugustinGermany, Tech. Rep. GMD Report 159, 2002. [21] M. Hermans and B. Schrauwen, “Recurrent kernel machines: Computing with infinite echo state networks,” Neural Computation, vol. 24, no. 1, pp. 104–133, 2013/11/22 2011. [22] M. Lukoševičius, H. Jaeger, and B. Schrauwen, “Reservoir computing trends,” KI - Künstliche Intelligenz, vol. 26, no. 4, pp. 365–371, 2012. [23] A. Atiya and A. Parlos, “New results on recurrent network training: unifying the algorithms and accelerating convergence,” Neural Networks, IEEE Transactions on, vol. 11, no. 3, pp. 697–709, 2000. [24] A. Rodan and P. Tino, “Minimum complexity echo state network,” Neural Networks, IEEE Transactions on, vol. 22, no. 1, pp. 131–144, 2011. [25] M. Hénon, “A two-dimensional mapping with a strange attractor,” Communications in Mathematical Physics, vol. 50, no. 1, pp. 69–77, 1976. [26] H. Jaeger, “The “echo state” approach to analysing and training recurrent neural networks,” St. Augustin: German National Research Center for Information Technology, Tech. Rep. GMD Rep. 148, 2001. [27] ——, “Short term memory in echo state networks,” GMDForschungszentrum Informationstechnik, Tech. Rep. GMD Report 152, 2002. [28] M. D. D. Verstraeten, B. Schrauwen and D. Stroobandt, “An experimental unification of reservoir computing methods,” Neural Networks, vol. 20, no. 3, pp. 391–403, 2007. [29] G. K. Venayagamoorthy and B. Shishir, “Effects of spectral radius and settling time in the performance of echo state networks,” Neural Networks, vol. 22, no. 7, pp. 861 – 863, 2009. [30] C. Gallicchio and A. Micheli, “Architectural and markovian factors of echo state networks,” Neural Networks, vol. 24, no. 5, pp. 440 – 456, 2011. [31] Q. Song and Z. Feng, “Effects of connectivity structure of complex echo state network on its prediction performance for nonlinear time series,” Neurocomputing, vol. 73, no. 10–12, pp. 2177 – 2185, 2010. [32] E. Bullmore and O. Sporns, “Complex brain networks: graph theoretical analysis of structural and functional systems,” Nat Rev Neurosci, vol. 10, no. 4, pp. 312–312, 04 2009. [33] S. Dasgupta, P. Manoonpong, and F. Woergoetter, “Small world topology of dynamic reservoir for effective solution of memory guided tasks,” Frontiers in Computational Neuroscience, no. 177. [34] M. Massar and S. Massar, “Mean-field theory of echo state networks,” Phys. Rev. E, vol. 87, p. 042809, Apr 2013. [35] M. Hagan and M.-B. Menhaj, “Training feedforward networks with the marquardt algorithm,” Neural Networks, IEEE Transactions on, vol. 5, no. 6, pp. 989–993, 1994. [36] H. Jaeger, M. Lukoševičius, D. Popovici, and U. Siewert, “Optimization and applications of echo state networks with leaky- integrator neurons,” Neural Networks, vol. 20, no. 3, pp. 335–352, 2007. [37] S. Dasgupta, F. Wrgtter, and P. Manoonpong, “Information theoretic self-organised adaptation in reservoirs for temporal memory tasks,” in Engineering Applications of Neural Networks, ser. Communications in Computer and Information Science, C. Jayne, S. Yue, and L. Iliadis, Eds. Springer Berlin Heidelberg, 2012, vol. 311, pp. 31–40. [38] J. Bi and K. P. Bennett, “Regression error characteristic curves.” in ICML, T. Fawcett and N. Mishra, Eds. AAAI Press, 2003, pp. 43–50. [39] W. Waegeman, B. De Baets, and L. Boullart, “A comparison of different ROC measures for ordinal regression,” in Proceedings of the 3rd International Workshop on ROC Analysis in Machine Learning., N. Lachiche, C. Ferri, and S. Macskassy, Eds., 2006, pp. 63–69. [40] ——, “ROC analysis in ordinal regression learning,” Pattern Recogn. Lett., vol. 29, no. 1, pp. 1–9, Jan. 2008. [41] J. Larsen, “A generalization error estimate for nonlinear systems,” 11 [42] [43] [44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54] [55] [56] in Neural Networks for Signal Processing, 1992. II., Proceedings of the 1992 IEEE Workshop on, 1992, pp. 29–38. J. Larsen, C. Svarer, L. Andersen, and L. Hansen, “Adaptive regularization in neural network modeling,” in Neural Networks: Tricks of the Trade, ser. Lecture Notes in Computer Science, G. Orr and K.-R. Mller, Eds. Springer Berlin Heidelberg, 1998, vol. 1524, pp. 113–132. J. Larsen, L. Hansen, C. Svarer, and M. Ohlsson, “Design and regularization of neural networks: the optimal use of a validation set,” in Neural Networks for Signal Processing, 1996. VI. Proceedings of the 1996 IEEE Workshop on, 1996, pp. 62–71. J. Larsen and L. Hansen, “Empirical generalization assessment of neural network models,” in Neural Networks for Signal Processing, 1995. V. Proceedings of the 1995 IEEE Workshop on, 1995, pp. 30–39. ——, “Generalization performance of regularized neural network models,” in Neural Networks for Signal Processing, 1994. IV. Proceedings of the 1994 IEEE Workshop on, 1994, pp. 42–51. S. Lawrence, C. L. Giles, and A. C. Tsoi, “Lessons in neural network training: Overfitting may be harder than expected,” in In Proceedings of the Fourteenth National Conference on Artificial Intelligence, AAAI-97. AAAI Press, 1997, pp. 540–545. N. Murata, S. Yoshizawa, and S.-I. Amari, “Network information criterion-determining the number of hidden units for an artificial neural network model,” Neural Networks, IEEE Transactions on, vol. 5, no. 6, pp. 865–872, 1994. J. Moody, “Prediction risk and architecture selection for neural networks,” in From Statistics to Neural Networks, ser. NATO ASI Series, V. Cherkassky, J. Friedman, and H. Wechsler, Eds. Springer Berlin Heidelberg, 1994, vol. 136, pp. 147–165. L. K. Hansen and C. E. Rasmussen, “Pruning from adaptive regularization,” Neural Computation, vol. 6, no. 6, pp. 1223–1232, 2013/12/11 1994. B. R. Stallard and J. G. Taylor, “Quantifying multivariate classification performance: the problem of overfitting,” pp. 426–436, 1999. D. M. Hawkins, “The problem of overfitting,” Journal of Chemical Information and Computer Sciences, vol. 44, no. 1, pp. 1–12, 2004. E. Baum and D. Haussler, “What size net gives valid generalization?” Neural Computation, vol. 1, no. 1, pp. 151–160, 1989. B. Amirikian and H. Nishimura, “What size network is good for generalization of a specific task of interest?” Neural Networks, vol. 7, no. 2, pp. 321–329, 1994. M. Kearns, Y. Mansour, D. Ron, R. Rubinfeld, R. E. Schapire, and L. Sellie, “On the learnability of discrete distributions,” in Proceedings of the Twenty-sixth Annual ACM Symposium on Theory of Computing, ser. STOC ’94. New York, NY, USA: ACM, 1994, pp. 273–282. R. Lange and R. Männer, “Quantifying a critical training set size for generalization and overfitting using teacher neural networks,” in ICANN ’94, M. Marinaro and P. G. Morasso, Eds. Springer London, 1994, pp. 497–500. L. Valiant, “A theory of the learnable,” Communications of the ACM, vol. 27, no. 11, pp. 1134–1142, 1984.
9cs.NE
Enhanced Linear-array Photoacoustic Beamforming using Modified Coherence Factor Moein Mozaffarzadeha,c , Yan Yand , Mohammad Mehrmohammadid , Bahador Makkiabadia,b,* arXiv:1710.00157v2 [physics.med-ph] 29 Jan 2018 a Research Center for Biomedical Technologies and Robotics (RCBTR), Institute for Advanced Medical Technologies (IAMT), Tehran, Iran. b Department of Medical Physics and Biomedical Engineering, School of Medicine, Tehran University of Medical Sciences, Tehran, Iran. c Department of Biomedical Engineering, Tarbiat Modares University, Tehran, Iran. d Department of Biomedical Engineering, Wayne State University, Detroit, MI, USA. Abstract. Photoacoustic imaging (PAI) is a promising medical imaging modality providing the spatial resolution of ultrasound (US) imaging and the contrast of optical imaging. For linear-array PAI, an image beamformer can be used as the reconstruction algorithm. Delay-and-sum (DAS) is the most prevalent beamforming algorithm in PAI. However, using DAS beamformer leads to low resolution images as well as high sidelobes due to non desired contribution of off-axis signals. Coherence factor (CF) is a weighting method in which each pixel of the reconstructed image is weighted, based on the spatial spectrum of the aperture, to mainly improve the contrast. In this paper, we demonstrate that the numerator of the formula of CF contains a DAS algebra, and it is proposed to use the delay-multiply-and-sum (DMAS) beamformer instead of the available DAS on the numerator. The proposed weighting technique, modified CF (MCF), has been evaluated numerically and experimentally compared to CF. It was shown that MCF leads to lower sidelobes and better detectable targets. The quantitative results of the experiment (using wire targets) show that MCF leads to for about 45% and 40% improvement, in comparison with CF, in the terms of signal-to-noise ratio and full-width-half-maximum, respectively. Keywords: Photoacoustic imaging, beamforming, linear-array imaging, noise suppression, contrast improvement.. *Bahador Makkiabadi, [email protected] 1 Introduction Photoacoustic imaging (PAI), also called optoacoustic imaging, is an emerging medical imaging technique which combines the properties of optical and ultrasound (US) imaging.1, 2 PAI is based on the photoacoustic (PA) effect, and combined US and PA properties provide structural, functional and potentially the molecular information of tissue.3, 4 In this imaging modality, acoustic waves are generated, as a result of an electromagnetic pulse illumination, based on thermoelastic effect.5 Then, the optical absorption distribution map of the tissue is reconstructed through a reconstruction algorithm.6 PAI is a scalable imaging modality used in different preclinical and clinical applications e.g., tumor detection,7, 8 ocular imaging,9 monitoring oxygenation in blood vessels,10 1 and functional imaging.5, 11 There are two types of PAI: photoacoustic tomography (PAT) and photoacoustic microscopy (PAM).12–14 In PAT, an array of US transducers in the form of linear, arc or circular shape is used for data acquisition, and mathematical reconstruction algorithms are used to obtain optical absorption distribution map of the tissue.15 Recently, low-cost PAT and PAM systems are extensively being investigated16–19 In linear-array PAI, image reconstruction is done with beamformers, as in US imaging. The problem of image reconstruction in linear-array imaging for PAI and US imaging can be addressed in almost a same way. There are some modifications which should be considered in image reconstruction for these two imaging modalities, and the modifications are directly concerned with the transmission part.20 In US imaging, US pulses are transmitted, but in PAI, the laser illumination plays the excitation role. There are many studies focused on using one beamforming technique for US and PA image formation to reduce the cost of the integrated US/PA system.21–23 Delayand-sum (DAS), as the most basic and commonly used beamformer in US and PAI due to its simple implementation, is a blind beamformer and results in low quality images.24 Development of a proper beamforming algorithm has been widely investigated in US imaging in different studies.25–28 Adaptive beamforming such as minimum variance (MV) can be a proper option to weight the signals and reduce the effect of the off-axis signals in the reconstructed images.29 MV combined with CF has been used for PAI.30 Short-lag spatial coherence (SLSC) beamformer was used in PAI for contract enhancement.31 Recently, to address the relatively poor appearance of interventional devices such as needles, guide wires, and catheters, in conventional US images, delay and standard deviation (DASD) beamforming algorithm was introduced.32 In 2015,33 Matrone et al. introduced a new beamforming algorithm namely delay-multiply-and-sum (DMAS). This algorithm was initially used as a reconstruction algorithm in confocal microwave imaging for breast 2 cancer detection.34 Although it leads to a higher resolution compared to DAS, the resolution is not well enough in comparison with the resolution gained by MV-based algorithms. MV beamformer has been combined with DMAS algorithm to improve the resolution of DMAS.35, 36 Double stage DMAS (DS-DMAS) was introduced for PAI.37, 38 In addition, it was shown that it outperforms DMAS in the terms of contrast and sidelobes for US imaging too.39 Eigenspace-Based Minimum Variance (EIBMV) and forward-backward (FB) MV beamformers also have been applied to medical US imaging to improve the image quality and robustness.40, 41 EIBMV was combined with DMAS to further improve the PA image quality.42, 43 In this paper, a novel version of coherence factor (CF) algorithms is introduced. We have demonstrated that the numerator in the formula of the CF weighting procedure is the output of DAS algorithm, and it is proposed to improve the image quality by including DMAS algebra in CF, instead of the existing DAS. The rest of the paper is organized as follows. Section 2 contains the theory of beamformers and the proposed method. Numerical simulation of the imaging system and the experimental design along with the results, and the performance evaluation are presented in section 3 and section 4, respectively. Discussion is presented in section 5, and finally the conclusion is presented in section 6. 2 Materials and Methods PA signals are generated and detected after the laser has illuminated the imaging target. The obtained signals can be used to reconstruct the PA images through a reconstruction algorithm such 3 as DAS which can be written as follows: yDAS (k) = M X i=1 xi (k − ∆i ), (1) where yDAS (k) is the output of beamformer, k is the time index, M is the number of array elements and xi (k) and ∆i are the detected signals and the corresponding time delay for detector i, respectively.44 To provide a more efficient beamformer and improve the quality of the reconstructed image, coherence factor (CF) can be used combined with DAS, which leads to sidelobe levels reduction and contrast enhancement.45 CF, as a weighting procedure, is presented by: PM 2 i=1 xid (k) , CF (k) = P 2 |x (k)| M M id i=1 (2) where xid is the delayed detected signal. The output of combined DAS and CF is given by: yDAS+CF (k) = CF (k) × yDAS (k). (3) Implementing the DAS beamformer is simple which is why is it the most common beamforming algorithm in US and PAI. However, this algorithm provides a low off-axis signal rejection and noise suppression. Consequently, DAS results in reconstructed images having high levels of sidelobe and a low resolution. To address the limitations of DAS, DMAS was suggested in.33 The same as DAS, DMAS calculates corresponding samples for each element of the array based on the delays, but samples go through a correlation process before adding them up. The DMAS formula is as follows: 4 yDM AS (k) = M −1 X M X i=1 j=i+1 xi (k − ∆i )xj (k − ∆j ). (4) To overcome the dimensionally squared problem of (4), following modifications are suggested in:33 x̂ij (k) = q sign[xi (k − ∆i )xj (k − ∆j )] |xi (k − ∆i )xj (k − ∆j )|, for (5) 1 6 i 6 j 6 M. yDM AS (k) = M −1 X M X x̂ij (k). (6) i=1 j=i+1 DMAS algorithm is a correlation process, and a non-linear beamforming algorithm in which the autocorrelation of the aperture is used. A product in time domain is equivalent to the convolution of the spectra of the signals in the frequency domain. Consequently, new components centered at the zero frequency and the harmonic frequency appear in the spectrum due to the similar ranges of frequency for xi (k − ∆i ) and xj (k − ∆j ). A band-pass filter is applied on the beamformed output signal to only pass the necessary frequency components, generated after the non-linear operations. Having a closer look at (2), the numerator of CF algorithm is the output of DAS beamformer, and the formula can be written as follows: 2 yDAS (k) CF (k) = . PM M i=1 |xid (k)|2 (7) Having CF combined with DAS, (3), leads to sidelobes reduction and contrast enhancement compared to (1). However, in this paper, it is proposed to use the output of DMAS algorithm instead 5 of the DAS algebra on the numerator of CF formula. The proposed weighting is called modified CF (MCF), and its algebra is as follows: 2 yDM AS (k) . M CF (k) = PM M i=1 |xid (k)|2 (8) MCF will be used the same as CF to weight the samples. The combination of DAS and MCF can be written as follows: yDAS+M CF (k) = M CF (k) × yDAS (k). (9) Since the DMAS outperforms DAS in the terms of resolution and sidelobes, it is expected that the proposed weighting method provides a higher image quality compared to (2). In what follows, it is shown that the proposed method outperforms the conventional CF weighting. 3 Numerical Results and Performance Assessment In this section, numerical results are presented to evaluate the performance of the proposed algorithm in comparison with DAS and combination of DAS and CF (DAS+CF). 3.1 Point Targets K-wave Matlab toolbox was used to simulate the numerical study.46 Eleven 0.1 mm spherical absorbers were positioned along the vertical axis every 5 mm as initial pressure. The first absorber was 25 mm away from the transducer surface. The imaging region was 20 mm in lateral axis and 80 mm in vertical axis. A linear array having M =128 elements operating at 7 M Hz central frequency and 77 % fractional bandwidth was used to detect the PA signals generated from defined initial pressures. The sampling frequency is 50 M Hz. Speed of sound was assumed to be 1540 6 Fig 1: Reconstructed images for simulated detected data using (a) DAS, (b) DAS+CF and (c) DAS+MCF. A linear array and point targets were used for numerical design. All images are shown with a dynamic range of 60 dB. Noise was added to the detected signals having a SNR of 50 dB . m/s during simulations. Envelope detection, performed by means of the Hilbert transform, has been used for all presented images, and the obtained lines are normalized and log-compressed to form the final images. The reconstructed images are shown in Fig. 1 where Gaussian noise was added to the detected signals having a SNR of 50 dB. As is demonstrated, DAS leads to high sidelobes and after the depth of 50 mm the targets are barely detectable as a point target. Using CF combined with DAS results in lower sidelobes and a higher image quality. Fig. 1(c) shows that the proposed method suppresses the artifacts and sidelobes more than the conventional CF. To compare the reconstructed images in detail, the lateral variations at two depths of imaging are shown in Fig. 2. As it is demonstrated, the MCF method causes lower sidelobes. Consider, for instance, the depth of 25 mm where the levels of sidelobes for DAS, DAS+CF and DAS+MCF are for about -36 dB, -99 dB and -124 dB, which indicates the superiority of the proposed method compared to the conventional CF in the 7 Fig 2: Lateral variations of the reconstructed images shown in Fig. 1 at the depths of (a) 25 mm and (b) 40 mm. Fig 3: Reconstructed images for simulated detected data using (a) DAS, (b) DAS+CF and (c) DAS+MCF. A linear array and point targets were used for numerical design. All images are shown with a dynamic range of 60 dB. Noise was added to the detected signals having a SNR of 0 dB . term of sidelobe reduction. To evaluate the proposed method at the presence of high level of noise of the imaging system, Gaussian noise was added to the detected signals having a SNR of 0 dB. The reconstructed images are shown in Fig. 3, and as can be seen, the formed image obtained by DAS is highly affected by noise. CF improves the image quality by suppressing the effects of noise. However, the sidelobes still degrade the image quality. The MCF reduces the sidelobes and improves the target 8 Fig 4: Lateral variations of the reconstructed images shown in Fig. 3 at the depths of (a) 25 mm and (b) 45 mm. detectability, resulting in a higher image quality in comparison with CF. It should be noticed that the absence of the tails attached to the targets (can be seen in Fig. 1) is due to the high level of noise. To put it more simply, the power of noise is more than the tails, and that is why they are not seen in Fig. 3. The lateral variations for the images shown in Fig. 3, are shown in Fig. 4, and as can be seen, the higher performance of MCF in the terms of sideloebs and noise suppression, compared to CF, is clear. 3.2 Quantitative Evaluation To quantitatively assess the performance of the proposed weighting method, the full-with-halfmaximum (FWHM) in -6 dB and signal-to-noise ratio (SNR) are calculated and presented in Table 1 and Table 2, respectively. SNR is calculated using the method explained in.37 As shown in Table 1, the FWHM gained by MCF, at the all depths, is lower than CF, showing the superiority of MCF. Consider, for instance, the depth of 40 mm where DAS, DAS+CF and DAS+MCF results in 2.2 mm, 1.3 mm and 0.9 mm, respectively. In other word, MCF improves the FWHM for about 0.4 mm compared to CF. As shown in Table 2, SNR gained by the proposed weighting method is higher compared to the CF which also indicates the superiority of MCF. Consider, for example, the depth of 50 mm where the SNR for DAS, DAS+CF and DAS+MCF is for about 36.9 dB, 65.0 9 Table 1: -6 dB FWHM (mm) values at the different depths. ``Beamformer DAS DAS+CF DAS+MCF ``` ``` Depth(mm) ` 25 1.1 0.6 0.4 1.3 0.8 0.6 30 35 1.6 0.9 0.7 1.9 1.1 0.8 40 45 2.2 1.3 0.9 50 2.6 1.6 1.1 3.0 1.8 1.3 55 60 3.5 2.1 1.5 3.7 2.2 1.6 65 70 4.2 2.5 1.8 75 4.8 2.9 2.0 ``` ``` Table 2: SNR (dB) values at the different depths. ``Beamformer DAS DAS+CF DAS+MCF ``` ``` Depth(mm) ` 25 47.2 76.3 119.6 30 44.7 73.0 116.9 43.0 72.9 117.8 35 40.7 69.5 116.5 40 45 38.9 68.0 113.3 36.9 65.0 110.4 50 35.3 63.4 109.0 55 60 34.2 61.8 107.3 65 33.5 60.1 105.3 32.2 58.6 103.2 70 75 31.4 56.2 101.6 ``` ``` dB and 110.4 dB, respectively. 3.3 MCF Applied to DMAS It should be noted that the proposed method in this paper is a weighting technique which can be applied to any beamformer to achieve a higher image quality. Here, the aim is to evaluate the MCF when is applied to other beamformers except DAS. The DMAS beamformer was selected. The results are presented in Fig. 5. As demonstrated, the proposed method leads to higher sidelobes reduction and artifacts removal when it is applied on the DMAS, compared to CF. In other words, 10 Fig 5: Reconstructed images for simulated detected data using (a) DAS, (b) DAS+CF, (c) DAS+MCF, (d) DMAS, (e) DMAS+CF and (e) DMAS+MCF. A linear array and point targets were used for numerical design. All images are shown with a dynamic range of 70 dB. Noise was added to the detected signals having a SNR of 20 dB . Fig 6: Lateral variations of the reconstructed images shown in Fig. 5 at the depths of 45 mm. even though the CF degrades the sidelobes (in DAS and DMAS), MCF outperforms the conventional CF with a higher artifacts suppression. For further evaluation, consider the lateral variations at the depth of 45 mm, shown in Fig. 6, where the MCF reduces the sidelobes for about 20 dB, compared to the conventional CF. 11 Fig 7: The schematic of the setup used for the experimental PAI. Table 3: FWHM (mm) values, in -6 dB, at the two depths of imaging using the experimental data. ``` ``` ``Beamformer DAS DAS+CF DAS+MCF ``` ``` Depth(mm) ` 22 0.68 0.59 0.30 24 0.66 0.47 0.28 4 Experimental Results To further evaluate the proposed weighting method and its effect on enhancing PA images, phantom experiments were performed in which a phantom consists of 2 light absorbing wires with diameter of 150 µm were placed 1 mm apart from each other in a water tank. The schematic of the experimental setup is shown in Fig. 7. In this experiment, we utilized a Nd:YAG pulsed laser, with the pulse repetition rate of 30 Hz at wavelengths of 532 nm. A programmable digital ultrasound scanner (Verasonics Vantage 128), equipped with a linear array transducer (L11-4v) operating at frequency range between 4 to 9 M Hz was utilized to acquire the PA RF data. A high speed FPGA was used to synchronize the light excitation and PA signal acquisition. The reconstructed images are shown in Fig. 8. As it is demonstrated, DAS results in high levels of noise in the images, degrading the image quality, and image is affected by sidelobes. Using CF improves the images quality, but the image is still affected by noise and sidelobes. Finally, the proposed weighting method enhances the image by providing higher noise suppression and lower 12 Fig 8: Reconstructed images for the experimental detected data using (a) DAS, (b) DAS+CF and (c) DAS+MCF. A linear array and wire target phantom were used for the experimental design. All images are shown with a dynamic range of 80 dB. levels of sidelobes compared to conventional CF. To evaluate in more detail, the lateral variations at two depths for targets shown in Fig. 8, are presented in Fig. 9. Considering Fig. 9(a), the proposed weighting method results in lower sidelobes and noise where DAS, DAS+CF and DAS+MCF leads to -40 dB, -84 dB and -134 dB, respectively. Thus, the proposed method outperforms conventional CF. FWHM in -6 dB has been calculated for the experimental results and shown in Table 3. It can be seen that the proposed weighting method results in narrower mainlobe in comparison with CF. Consider, for example, the target at the depth of 22 mm where DAS+MCF results in 0.38 mm 0.29 mm improvement compared to DAS and DAS+CF, respectively. Moreover, SNR has been calculated for the experimental data and the results are shown in Table 4 where the MCF causes higher SNR compared to conventional CF for both depths of imaging. 13 Fig 9: Lateral variations of the reconstructed images shown in Fig. 8 at the depths of (a) 22 mm and (b) 24 mm. Table 4: SNR (dB) values for the experimental images shown in Fig. 8. ``` ``` ``Beamformer DAS DAS+CF DAS+MCF ``` ``` Depth(mm) ` 22 48.5 60.7 90.4 24 47.2 59.6 88.2 4.1 Ex Vivo Imaging In this study, an ex vivo experimental tissue study have been designed to evaluate the performance of the proposed algorithm. A piece of a breast tissue (about 4 cm× 4 cm× 3 cm) is extracted from a new sacrificed chicken. Two pencil leads with a diameter of 0.5 mm are embedded inside the breast tissue, having an axial distance of about 5 mm. Fig 10 shows the photographs of the imaged tissue. The PA signals are collected with a combined linear US/PA imaging probe.47 As can be seen in Fig. 11(a), the artifacts and the background noise degrade the PA image quality obtained by DAS. As is expected based on the previous results, applying CF to the DAS algorithm would reduce the artifacts and sidelobes. The expectations are satisfied, as shown in Fig. 11(b), but the PA image can be further improved using MCF. As demonstrated in Fig. 11(c), the MCF leads to higher noise suppression and sidelobes degrading in comparison with the conventional CF. For further evaluation, the lateral variations of the reconstructed images shown in Fig. 11, are presented in Fig. 12 where the superiority of the proposed method in terms of lower sidelobes and 14 Fig 10: (a) The phantom used for the experiment. (b) The ex vivo imaging setup. Fig 11: Reconstructed ex vivo images using (a) DAS, (b) DAS+CF and (c) DAS+MCF. A lineararray and the phantom shown in Fig. 10 were used for the experimental design. All images are shown with a dynamic range of 80 dB. higher noise suppression is obvious. SNR is calculated for the ex vivo images (presented in Table 5). The quantitative evaluation indicates that MCF outperforms the conventional CF. In particular, it improves the SNR for about 14 dB, at the depth of 31.3 mm, compared to the CF. 5 Discussion The main enhancement gained by the proposed method is higher contrast and lower sidelobes. Considering the fact that DAS beamformer results in a low quality image, having it on the numerator of the formula of CF would degrade the performance of the CF weighting procedure. On 15 Fig 12: Lateral variations of the reconstructed images shown in Fig. 11 at the depths of (a) 29 mm and (b) 31.3 mm. Table 5: SNR (dB) values for the ex vivo images shown in Fig. 11. ``` ``` ``Beamformer DAS DAS+CF DAS+MCF ``` ``` Depth(mm) ` 29 41.34 52.81 68.99 40.35 50.78 64.84 31.3 the other hand, in,33 Matrone et al. proved that DMAS can be used instead of DAS for image reconstruction, and it was shown that the main improvement gained by DMAS was higher contrast. Thus, it can be perceived that using DMAS instead of the existing DAS on the numerator of CF algebra would results in contrast enhancement due to its auto-correlation process which is a nonlinear operation. As can be seen in Fig. 1, Fig. 3, Fig. 8 and Fig. 11, using the correlation process of DMAS inside the formula of CF results in higher noise suppression and artifact reduction, leading to the higher image quality compared to DAS and DAS+CF. In other word, the multiplication operation inside the DMAS procedure reduces the presence of noise and off-axis signals on the reconstructed images, and improves the image quality. The advantage of the proposed weighting method in the term of sidelobes reduction can be seen in the Fig. 2, Fig. 4, Fig. 9 and Fig. 12. As can be seen in the lateral variations, the width of mainlobe has decreased which is a merit of MCF. Since DMAS improves the resolution gained by DAS, shown in,37 the MCF leads to higher resolution in comparison with CF. To put it more simply, presence of DMAS inside the formula 16 of MCF is the reason of higher resolution achieved by MCF. Despite all the results, it was necessary to evaluate the proposed method quantitatively. Considering the numbers presented in the Tables of the last section, it can be seen that the proposed method outperforms CF in the terms of FWHM and SNR. The proposed method significantly outperforms CF when the targets are at the high depths of imaging. As shown in Fig. 1, for the targets located at the depths of 55 mm-75 mm, sidelobes and artifatcs are better reduced compared to the lower depths. This also can be perceived regarding the Table 2 where SNR improvement in high depths is more than lower depths (80 % and 56 % for 25 mm and 75 mm, respectively). It should be noticed that, as mentioned in the section 1, the beamforming and concerned weighting methods can be applied on both the US and PAI cases. CF or MCF would be proper options for US imaging. However, using multiple times of the CF or MCF ( MCF2 and MCF3 ) would remove the speckles in the US images. The speckle removal is not desired in applications in which the speckles provide helpful information for diagnosis. Therefore, the MCF2 and MCF3 would further increase the quality of the PA images, but it is not suggested to use them for the conventional US imaging. MCF The computational burden imposed by the proposed method is the same as DMAS, and the order of processing in O(M 2 ) while the order of processing for CF is the same as DAS which is O(M ). Therefore, it should be mentioned that the improvements are obtained at the expense of higher computational burden in comparison with CF. The proposed method can be implemented on a FPGA device, e.g. on an Altera FPGA of the Stratix IV family (Altera Corp., San Jose, CA, USA). The time consumption has been reported in33 for DMAS implementation, which indicates that the proposed method can be used in clinical PAI systems. In applications in which phased (or micro-convex) arrays are used, MCF can provide a further enhancement compared to CF. We have tested the proposed algorithm for ex vivo PAI, and the results were promising (shown in Fig. 11 and Fig. 12). In small-parts 17 and vascular US imaging, for instance in vivo imaging of the carotid artery, where the resolution and specially sidelobes are of importance, MCF can be used, providing higher contrast and noise suppression in comparison with CF. 6 Conclusion In this paper, a novel weighting procedure has been introduced by combining the conventional CF and the DMAS beamformer. It was shown that the numerator of the formula of CF can be treated as a DAS, and it was proposed to use DMAS instead of the existing DAS inside the formula of CF. The MCF has been evaluated numerically and experimentally, and all the results showed the higher performance of MCF compared to CF. For the experimental results obtained by the wire target phantom, MCF reduced the sidelobes for about 50 dB in comparison with CF, indicating the higher contrast, and the quantitative results showed that MCF improves the SNR and FWHM for about 45% and 40%, respectively. Acknowledgments This research received no specific grant from any funding agency in the public, commercial, or not-for-profit sectors, and the authors have no potential conflicts of interest to disclose. References 1 L. Li, L. Zhu, C. Ma, et al., “Single-impulse panoramic photoacoustic computed tomography of small-animal whole-body dynamics at high spatiotemporal resolution,” Nature Biomedical Engineering 1(5), Art–No (2017). 2 L. V. Wang and J. Yao, “A practical guide to photoacoustic tomography in the life sciences,” Nature methods 13(8), 627–638 (2016). 18 3 J. Xia and L. V. Wang, “Small-animal whole-body photoacoustic tomography: a review,” IEEE Transactions on Biomedical Engineering 61(5), 1380–1389 (2014). 4 M. Mehrmohammadi, S. Joon Yoon, D. Yeager, et al., “Photoacoustic imaging for cancer detection and staging,” Current molecular imaging 2(1), 89–105 (2013). 5 M. Nasiriavanaki, J. Xia, H. Wan, et al., “High-resolution photoacoustic tomography of resting-state functional connectivity in the mouse brain,” Proceedings of the National Academy of Sciences 111(1), 21–26 (2014). 6 M. Jeon and C. Kim, “Multimodal photoacoustic tomography,” IEEE Transactions on Multimedia 15(5), 975–982 (2013). 7 B. Guo, J. Li, H. Zmuda, et al., “Multifrequency microwave-induced thermal acoustic imaging for breast cancer detection,” IEEE Transactions on Biomedical Engineering 54(11), 2000–2010 (2007). 8 M. Heijblom, W. Steenbergen, and S. Manohar, “Clinical photoacoustic breast imaging: the twente experience.,” IEEE Pulse 6(3), 42–46 (2015). 9 A. de La Zerda, Y. M. Paulus, R. Teed, et al., “Photoacoustic ocular imaging,” Optics letters 35(3), 270–272 (2010). 10 R. O. Esenaliev, I. V. Larina, K. V. Larin, et al., “Optoacoustic technique for noninvasive monitoring of blood oxygenation: a feasibility study,” Applied Optics 41(22), 4722–4731 (2002). 11 J. Yao, J. Xia, K. I. Maslov, et al., “Noninvasive photoacoustic computed tomography of mouse brain metabolism in vivo,” Neuroimage 64, 257–266 (2013). 19 12 Y. Zhou, J. Yao, and L. V. Wang, “Tutorial on photoacoustic tomography,” Journal of Biomedical Optics 21(6), 061007–061007 (2016). 13 J. Yao and L. V. Wang, “Photoacoustic microscopy,” Laser & Photonics Reviews 7(5), 758– 778 (2013). 14 L. V. Wang and S. Hu, “Photoacoustic tomography: in vivo imaging from organelles to organs,” Science 335(6075), 1458–1462 (2012). 15 M. Xu and L. V. Wang, “Time-domain reconstruction for thermoacoustic tomography in a spherical geometry,” IEEE Transactions on Medical Imaging 21(7), 814–822 (2002). 16 A. Hariri, A. Fatima, N. Mohammadian, et al., “Development of low-cost photoacoustic imaging systems using very low-energy pulsed laser diodes,” Journal of biomedical optics 22(7), 075001 (2017). 17 P. K. Upputuri and M. Pramanik, “Dynamic in vivo imaging of small animal brain using pulsed laser diode-based photoacoustic tomography system,” Journal of biomedical optics 22(9), 090501 (2017). 18 A. Hariri, A. Fatima, N. Mohammadian, et al., “Towards low cost photoacoustic microscopy system for evaluation of skin health,” in Imaging Spectrometry XXI, 9976, 99760X, International Society for Optics and Photonics (2016). 19 P. K. Upputuri and M. Pramanik, “Performance characterization of low-cost, high-speed, portable pulsed laser diode photoacoustic tomography (pld-pat) system,” Biomedical optics express 6(10), 4118–4129 (2015). 20 C.-W. Wei, T.-M. Nguyen, J. Xia, et al., “Real-time integrated photoacoustic and ultrasound 20 (paus) imaging system to guide interventional procedures: ex vivo study,” IEEE transactions on ultrasonics, ferroelectrics, and frequency control 62(2), 319–328 (2015). 21 H. K. Zhang, M. A. L. Bell, X. Guo, et al., “Synthetic-aperture based photoacoustic rebeamforming (spare) approach using beamformed ultrasound data,” Biomedical optics express 7(8), 3056–3068 (2016). 22 E. Mercep, G. Jeng, S. Morscher, et al., “Hybrid optoacoustic tomography and pulse-echo ultrasonography using concave arrays,” IEEE Transactions on Ultrasonics, Ferroelectrics, and Frequency Control 62(9), 1651–1661 (2015). 23 T. Harrison and R. J. Zemp, “The applicability of ultrasound dynamic receive beamformers to photoacoustic imaging,” IEEE Transactions on Ultrasonics, Ferroelectrics, and Frequency Control 58(10), 2259–2263 (2011). 24 C. G. Hoelen and F. F. de Mul, “Image reconstruction for photoacoustic scanning of tissue structures,” Applied Optics 39(31), 5872–5883 (2000). 25 T. Szasz, A. Basarab, and D. Kouamé, “Beamforming through regularized inverse problems in ultrasound medical imaging,” IEEE Transactions on Ultrasonics, Ferroelectrics, and Frequency Control 63(12), 2031–2044 (2016). 26 N. Q. Nguyen and R. W. Prager, “High-resolution ultrasound imaging with unified pixelbased beamforming,” IEEE Transactions on Medical Imaging 35(1), 98–108 (2016). 27 C. Yoon, H. H. Kim, and K. K. Shung, “Development of a low-complexity, cost-effective digital beamformer architecture for high-frequency ultrasound imaging,” IEEE Transactions on Ultrasonics, Ferroelectrics, and Frequency Control 64(6), 1002–1008 (2017). 21 28 C. A. Samson, A. Bezanson, and J. A. Brown, “A sub-nyquist, variable sampling, highfrequency phased array beamformer,” IEEE transactions on ultrasonics, ferroelectrics, and frequency control 64(3), 568–576 (2017). 29 N. Nguyen and R. Prager, “Minimum variance approaches to ultrasound pixel-based beamforming,” IEEE Transactions on Medical Imaging (2016). 30 S. Park, A. B. Karpiouk, S. R. Aglyamov, et al., “Adaptive beamforming for photoacoustic imaging,” Optics letters 33(12), 1291–1293 (2008). 31 M. A. L. Bell, N. Kuo, D. Y. Song, et al., “Short-lag spatial coherence beamforming of photoacoustic images for enhanced visualization of prostate brachytherapy seeds,” Biomedical optics express 4(10), 1964–1977 (2013). 32 R. S. Bandaru, A. R. Sornes, J. Hermans, et al., “Delay and standard deviation beamforming to enhance specular reflections in ultrasound imaging,” IEEE Transactions on Ultrasonics, Ferroelectrics, and Frequency Control 63(12), 2057–2068 (2016). 33 G. Matrone, A. S. Savoia, G. Caliano, et al., “The delay multiply and sum beamforming algorithm in ultrasound b-mode medical imaging,” IEEE Transactions on Medical Imaging 34(4), 940–949 (2015). 34 H. B. Lim, N. T. T. Nhung, E.-P. Li, et al., “Confocal microwave imaging for breast cancer detection: Delay-multiply-and-sum image reconstruction algorithm,” IEEE Transactions on Biomedical Engineering 55(6), 1697–1704 (2008). 35 M. Mozaffarzadeh, A. Mahloojifar, and M. Orooji, “Medical photoacoustic beamforming using minimum variance-based delay multiply and sum,” in SPIE Digital Optical Technologies, 1033522–1033522, International Society for Optics and Photonics (2017). 22 36 M. Mozaffarzadeh, A. Mahloojifar, M. Orooji, et al., “Linear array photoacoustic imaging using minimum variance-based delay multiply and sum adaptive beamforming algorithm,” arXiv preprint arXiv:1709.07965 (2017). 37 M. Mozaffarzadeh, A. Mahloojifar, M. Orooji, et al., “Double-stage delay multiply and sum beamforming algorithm: Application to linear-array photoacoustic imaging,” IEEE Transactions on Biomedical Engineering 65(1), 31–42 (2018). 38 M. Mozaffarzadeh, A. Mahloojifar, and M. Orooji, “Image enhancement and noise reduction using modified delay-multiply-and-sum beamformer: Application to medical photoacoustic imaging,” in Electrical Engineering (ICEE), 2017 Iranian Conference on, 65–69, IEEE (2017). 39 M. Mozaffarzadeh, M. Sadeghi, A. Mahloojifar, et al., “Double stage delay multiply and sum beamforming algorithm applied to ultrasound medical imaging,” Ultrasound in Medicine and Biology PP(99), 1–1 (2017). 40 S. Mehdizadeh, A. Austeng, T. F. Johansen, et al., “Eigenspace based minimum variance beamforming applied to ultrasound imaging of acoustically hard tissues,” IEEE transactions on medical imaging 31(10), 1912–1921 (2012). 41 T. Zhou, Q.-l. Li, X. Chen, et al., “Forward-backward minimum variance beamforming combined with coherence weighting applied to ultrasound imaging,” in World Congress on Medical Physics and Biomedical Engineering May 26-31, 2012, Beijing, China, 1092–1096, Springer (2013). 42 M. Mozaffarzadeh, S. A. O. I. Avanji, A. Mahloojifar, et al., “Photoacoustic imaging using 23 combination of eigenspace-based minimum variance and delay-multiply-and-sum beamformers: Simulation study,” arXiv preprint arXiv:1709.06523 (2017). 43 M. Mozaffarzadeh, A. Mahloojifar, M. Nasiriavanaki, et al., “Eigenspace-based minimum variance adaptive beamformer combined with delay multiply and sum: Experimental study,” arXiv preprint arXiv:1710.01767 (2017). 44 M. Mozaffarzadeh, M. Mehrmohammadi, and B. Makkiabadi, “Image improvement in lineararray photoacoustic imaging using high resolution coherence factor weighting technique,” arXiv preprint arXiv:1710.02751 (2017). 45 K. W. Rigby, “Method and apparatus for coherence filtering of ultrasound images,” (1999). US Patent 5,910,115. 46 B. E. Treeby and B. T. Cox, “k-wave: Matlab toolbox for the simulation and reconstruction of photoacoustic wave fields,” Journal of Biomedical Optics 15(2), 021314–021314 (2010). 47 Y. Yan, M. Basij, E. Hemandez-Andrade, et al., “Endocavity ultrasound and photoacoustic imaging system to evaluate fetal brain perfusion and oxygenation: Preliminary ex vivo studies,” in Ultrasonics Symposium (IUS), 2017 IEEE International, 1–1, IEEE (2017). Moein Mozaffarzadeh was born in Sari, Iran, in 1993. He received the B.Sc. degree in Electrical Engineering from Babol Noshirvani University of Technology (Mazandaran, Iran), in 2015, and the M.Sc. degree in Biomedical Engineering from Tarbiat Modares University (Tehran, Iran), in 2017. He is currently a research assistant at research center for biomedical 24 technologies and robotics, institute for advanced medical technologies (Tehran, Iran). His current research interests include Photoacoustic Image Reconstruction, Ultrasound Beamforming and Biomedical Imaging. Yan Yan joined Wayne State University since 2015-May as a PhD student in functional and molecular ultrasound research laboratory (http://ultrasound.eng.wayne.edu/). His interesting areas are Medical Image, Object Detection and Data Mining. He had strong background in Computer Science pattern recognition and computer graphics. He holds two bachelors, Computer science and Post and Telecommunication. He also received a master in computer science from Wayne State university 2017. His current research interests include Endocavity Ultrasound and Photoacoustic for fetal and maternal care. Mohammad Mehrmohammadi received his B.Sc. degree in Electrical Engineering from Sharif University of Technology (Tehran, Iran), the M.Sc. in Electrical and Computer Engineering from Illinois Institute of Technology (Chicago, IL), and the Ph.D. in Biomedical Engineering from the University of Texas at Austin (Austin, TX). He did his postdoctoral fellowship at Mayo Clinic College of Medicine (Rochester, Minnesota). Currently, he is an assistant professor of Biomedical/Electrical and Computer Engineering at Wayne State University and scientific member at Karmanos Cancer Institute. 25 Bahador Makkiabadi received his B.Sc. degree in Electronics Engineering from Shiraz University (Shiraz, Iran), the M.Sc. in Biomedical Engineering from Amirkabir University of Technology (Tehran, Iran), and the Ph.D. in Biomedical Engineering from University of Surrey (Guildford, Surrey, UK). Currently, he is working at Research Center for Biomedical Technologies and Robotics (RCBTR), Institute for Advanced Medical Technologies (IAMT), Tehran University of Medical Sciences, Tehran, Iran. His research interests include Blind Source Separation, Advanced Array Signal Processing for Medical Applications and Biomedical Imaging. List of Figures 1 Reconstructed images for simulated detected data using (a) DAS, (b) DAS+CF and (c) DAS+MCF. A linear array and point targets were used for numerical design. All images are shown with a dynamic range of 60 dB. Noise was added to the detected signals having a SNR of 50 dB . 2 Lateral variations of the reconstructed images shown in Fig. 1 at the depths of (a) 25 mm and (b) 40 mm. 3 Reconstructed images for simulated detected data using (a) DAS, (b) DAS+CF and (c) DAS+MCF. A linear array and point targets were used for numerical design. All images are shown with a dynamic range of 60 dB. Noise was added to the detected signals having a SNR of 0 dB . 26 4 Lateral variations of the reconstructed images shown in Fig. 3 at the depths of (a) 25 mm and (b) 45 mm. 5 Reconstructed images for simulated detected data using (a) DAS, (b) DAS+CF, (c) DAS+MCF, (d) DMAS, (e) DMAS+CF and (e) DMAS+MCF. A linear array and point targets were used for numerical design. All images are shown with a dynamic range of 70 dB. Noise was added to the detected signals having a SNR of 20 dB . 6 Lateral variations of the reconstructed images shown in Fig. 5 at the depths of 45 mm. 7 The schematic of the setup used for the experimental PAI. 8 Reconstructed images for the experimental detected data using (a) DAS, (b) DAS+CF and (c) DAS+MCF. A linear array and wire target phantom were used for the experimental design. All images are shown with a dynamic range of 80 dB. 9 Lateral variations of the reconstructed images shown in Fig. 8 at the depths of (a) 22 mm and (b) 24 mm. 10 (a) The phantom used for the experiment. (b) The ex vivo imaging setup. 11 Reconstructed ex vivo images using (a) DAS, (b) DAS+CF and (c) DAS+MCF. A linear-array and the phantom shown in Fig. 10 were used for the experimental design. All images are shown with a dynamic range of 80 dB. 12 Lateral variations of the reconstructed images shown in Fig. 11 at the depths of (a) 29 mm and (b) 31.3 mm. List of Tables 1 -6 dB FWHM (mm) values at the different depths. 27 2 SNR (dB) values at the different depths. 3 FWHM (mm) values, in -6 dB, at the two depths of imaging using the experimental data. 4 SNR (dB) values for the experimental images shown in Fig. 8. 5 SNR (dB) values for the ex vivo images shown in Fig. 11. 28
7cs.IT
Sparse Phase Retrieval via Sparse PCA despite Model Misspecification: A Simplified and Extended Analysis arXiv:1712.04106v2 [cs.IT] 13 Dec 2017 Yan Shuo Tan ∗ December 14, 2017 Abstract We consider the problem of high-dimensional misspecified phase retrieval. This is where we have an s-sparse signal vector x∗ in Rn , which we wish to recover using sampling vectors a1 , . . . , am , and measurements y1 , . . . , ym , which are related by the equation f (hai , x∗ i) = yi . Here, f is an unknown link function satisfying a positive correlation with the quadratic function. This problem was recently analyzed in [24], which provided recovery guarantees for a two-stage algorithm with sample complexity m = O(s2 log n). In this paper, we show that the first stage of their algorithm suffices for signal recovery with the same sample complexity, and extend the analysis to non-Gaussian measurements. Furthermore, we show how the algorithm can be generalized to recover a signal vector x∗ efficiently given geometric prior information other than sparsity. 1 Introduction 1.1 Phase retrieval and sparse phase retrieval The phase retrieval problem is that of solving a system of quadratic equations |hai , xi2 | = yi , i = 1, 2, . . . , m (1.1) where ai ∈ Rn (or Cn ) are known sampling vectors, yi > 0 are observed measurements, and x ∈ Rn (or Cn ) is the decision variable. Over the last half a decade, there has been great interest in constructing and analyzing algorithms with provable guarantees, with much success in the case where the sampling vectors are independently drawn from either a real or complex standard Gaussian distribution. The notable approaches include lifting and convex relaxation (PhaseLift) [9], convex relaxation in the natural parameter space (PhaseMax ) [16, 3, 17], gradient descent [8, 10, 35, 32], stochastic gradient descent [29, 20], and prox-linear methods [14]. The best of these methods have been proved to accurately recover the true underlying signal x∗ so long as the number of measurements m is proportional to the signal dimension n. Naturally, researchers have tried to replicate this success in the high-dimensional regime. In this setting, it is assumed that the true signal x∗ is s-sparse, and one would like to estimate x∗ accurately with much fewer measurements than the ambient dimension, in analogy with what is possible for sparse linear regression. Work in this direction has mostly comprised straightforward adaptations of ∗ Department of Mathematics, University of Michigan, [email protected]. 1 algorithms for unconstrained phase retrieval: Both PhaseLift and PhaseMax have been be adapted by adding l1 regularizers to their respective objective functions [25, 18]. Meanwhile, the gradient descent schemes Truncated Wirtinger Flow and Truncated Amplitude Flow have been adapted to alternate gradient steps with either soft- or hard-thresholding [6, 33, 28]. These methods have been mostly shown to accurately recover x∗ with sample complexity m = O∗ (s2 ). 1.2 Single index models and model agnostic recovery Phase retrieval is an example of a single index model. In this more general setting, the measurements and the sampling vectors are related by the formula f (hai , x∗ i) = yi , i = 1, 2, . . . , m (1.2) where f is a (possibly random) link function. Such models have been studied for some time in the statistics community (see [21] and the references therein). Classically, it is assumed that the link function f is unknown to the observer, and it is of interest to estimate both x∗ (the index parameter) and f . Standard theoretical results in this body of work include asymptotic minimax rates of various estimators. In this paper, we take a slightly different approach to the problem. We continue to assume that f is unknown, but now treat x∗ as the only parameter of interest. On the other hand, we are interested in algorithms that are provably efficient from both a statistical as well as a computational point of view. Furthermore, we want our algorithms to be able to exploit a sparsity prior and thus work in the high-dimensional regime. The motivation for such an approach comes from the observation that real data almost never obeys a precise algebraic relationship. In other words, the neat relationships we postulate, such as (1.1), are often misspecified. Recently, Plan and Vershynin [27] made significant progress on this problem in the setting of misspecified linear regression. They showed that if Cov(g, f (g)) 6= 0, then the standard Lasso algorithm for sparse linear regression is able to estimate x∗ accurately up to scaling, and with a sample complexity of O(s log n), the same order as that in the case of no model misspecification. Here, g ∼ N(0, 1) is a standard Gaussian random variable. In the misspecified phase retrieval (MPR) setting, the first work was done by Neykov, Wang and Liu [24]. They proposed a two stage algorithm that works as follows. First, they form the reweighted sample covariance matrix m Σ̂ := 1 X yi (ai aTi − In ), m (1.3) i=1 and apply the standard SDP relaxation of Sparse PCA to this matrix. Next, they use the leading eigenvector of the solution to formulate a Lasso-type program. The solution to this program is their final estimate. The assumptions they make are that µ = µ(g, f ) := Cov(g2 , f (g)) > 0, kf (g)kψ1 ≤ C, (Af,g ) under which, they were able to prove that the algorithm recovers x∗ accurately when given m = O∗ (s2 ) independent standard Gaussian sampling vectors. Again, this is the same order as the guarantees for sparse phase retrieval in the case of no misspecification. 2 1.3 Contributions The contribution of this short paper is twofold. First, we prove that Sparse PCA, the first step of the algorithm proposed in [24], suffices to recover the signal vector x∗ accurately with the same sample complexity as the full two-step algorithm given in their paper. We provide a simplified and more flexible analysis that is adapted from [26]. This analysis has the further benefit of generalizing to the case where the prior assumption on x∗ is not that it is sparse, but that it lies in a geometric set K. Second, we provide a guarantee for Sparse PCA to recover x∗ accurately when the sampling vectors are not Gaussian, but are instead drawn from distributions with independent subgaussian entries. In particular, we show that the method works for Rademacher random variables. Although this is a realistic sampling model, to our knowledge, it has not been analyzed in any prior work on phase retrieval. This guarantee requires two conditions. Unsurprisingly, we require the link function f to satisfy a correlation condition similar to (Af,g ), but adapted to the given subgaussian distribution. Second, we require x∗ to have entries of equal magnitude over its support. This second condition is relatively stringent, but can probably be relaxed in future work. 1.4 Notation We shall use boldface letters to denote vectors and matrices. If A and B are real matrices of the same dimensions, we let hA, Bi := Tr(AT B) denote the standard inner product. kAk and kAkF will denote the operator and Frobenius norm of A respectively, while kAk1 and kAk∞ will denote the entrywise l1 and l∞ norms respectively. For a random variable X and α > 0, we let kXkψα denote its ψα norm.1 If a is a random vector, then ai refers to an i-th independent copy of a, while (a)i refers to the i-th coordinate of a. C and c are used to denote constants that may change from line to line. 2 Main results We shall work with the single index model (1.2). We assume that the sampling vectors a1 , . . . , am are independent copies of a random vector a satisfying the following distributional assumption: Assumption 2.1 (Sampling vector distribution). The coordinates of a are independent copies of a random variable Z that is centered, symmetric, of unit variance, and with subgaussian norm kZkψ2 bounded by an absolute constant C. For convenience, we shall hide the dependence on C in our results and in our analysis. We do not assume that we know the link function f . The algorithm we propose to estimate x∗ is the following. 1 This is a tail decay condition. For more information, see Appendix A. 3 Algorithm 1 Sparse PCA for MPR Input: Measurements y1 , . . . , ym , sampling vectors a1 , . . . , am , sparsity level s. Output: An estimate x̂ for x∗ . 1: Compute Σ̂ as defined in (1.3). 2: Let X̂ be the solution to max hX, Σ̂i subject to X0 3: Tr(X) = 1, kXk1 ≤ s. (2.1) Let x̂ be the leading eigenvector to X̂. This program is precisely the SDP relaxation of Sparse PCA proposed by d’Aspremont et al. [11] and later analyzed by Amini and Wainwright [1] and Berthet and Rigollet [5]. These two papers analyzed the performance of the algorithm as applied to sparse principal component detection in the spiked covariance model. Since the matrix Σ̂ does not follow this model a priori, one requires further analysis to show that the algorithm succeeds. In [24], the authors propose using the Lagrangian version of this program as the first step of their algorithm. Their analysis (see Lemma C.1. therein) shows that when the sampling vectors follow a Gaussian distribution, one can obtain a constant error approximation to x∗ using O(s2 log n) samples. Using our methods, we prove a stronger version of this guarantee. Theorem 2.2 (Sparse recovery for Gaussian measurements). Suppose a is a standard Gaussian in Rn , and suppose Assumption (Af,g ) holds. Then there is an absolute constant C such that for any s-sparse, unit norm signal x∗ and any ǫ, δ > 0, the output x̂ to Algorithm 1 satisfies kx̂ − x∗ k2 ≤ ǫ with probability at least 1 − δ so long as the sample size m satisfies ) (  s2 log(n/δ) + log4 (s/δ) s log(n/δ) . , , m ≥ C max µ(f, g)2 ǫ4 δ log2 m Although this result is not entirely novel, we prove it in a different way compared to [24]. This method is simple and amenable to generalization to the situation where the sampling vectorsP are not 1 Gaussian. In the non-Gaussian case, we first fix the the sparsity parameter s. Let Z̄s := s si=1 Zi and rs,Z := (Z1 − Z̄s , . . . , Zs − Z̄s ) denote the mean of s independent copies of Z and the vector of residuals respectively. With this notation, we make the assumption: √ √ (Af,Z,s ) µ(f, Z, s) := Cov(( sZ̄s )2 , f ( sZ̄s )) > 0, √ √ 2 σ(f, Z, s) := Cov(krs,Z k2 , f ( sZ̄s )) ≤ 0, kf ( sZ̄s )kψ1 ≤ C. Furthermore, we say that a unit norm signal vector x∗ is admissible if it has entries of equal magnitude across its support. In other words, there is a index set I ⊂ [n] of cardinality |I| ≤ s, such that  ± √1 j∈I |I| (x∗ )j = 0 otherwise. Using this definition, we have the following analogue of Theorem 2.2. 4 Theorem 2.3 (Sparse recovery for non-Gaussian measurements). There is an absolute constant C such that the following holds. Fix a sparsity parameter s, suppose x∗ is admissible and suppose Assumption (Af,Z,s ) holds. Then for any ǫ, δ > 0, the output x̂ to Algorithm 1 satisfies kx̂−x∗ k2 ≤ ǫ with probability at least 1 − δ so long as the sample size m satisfies  Cs2 log(n/δ) + log4 (s/δ) Cs C log(n/δ) . (2.2) + + m≥ 2 4 µ(f, Z, s) ǫ δ log2 m Note that when Z is standard Gaussian, Assumption (Af,Z,s ) reduces to Assumption (Af,g ). To √ see this, observe that for any s, sZ̄ is a standard Gaussian random variable, while σ(f, g, s) = 0 by the independence property of orthogonal Gaussian marginals. This fact points to the assumption being the right generalization of (Af,g ). Furthermore, it is intuitive that the second condition should hold whenever Z has a reasonable distribution and when µ(f, Z, s) > 0: if f is positively correlated with the magnitude of Z̄, then it should be negatively correlated with the norm of the residual vector. Indeed, this can be shown to be true whenever Z is a Rademacher random variable. We thus have a simpler result for Rademacher random variables: Corollary 2.4 (Sparse recovery for Rademacher measurements). There is an absolute constant C such that the following holds. Fix a sparsity parameter s, suppose x∗ is admissible, let Z denote √ a Rademacher random variable. Suppose µ(f, Z, s) > 0 and kf ( sZ̄s )kψ1 ≤ C. Then for any ǫ, δ > 0, the output x̂ to Algorithm 1 satisfies kx̂ − x∗ k2 ≤ ǫ with probability at least 1 − δ so long as the sample size m satisfies (2.2). In the Gaussian setting, the recovery guarantee continues to hold even if we relax our constraint √ on x∗ slightly and instead assume that kx∗ k1 ≤ s. This condition is geometric: it can equivalently √ expressed as x∗ ∈ K, where K = sB1n is the l1 norm ball. It is thus an interesting theoretical question to ask whether one can construct efficient algorithms for estimating x∗ that exploit prior knowledge that x∗ ∈ K for a general convex set K. There has been some work on proving statistical efficiency guarantees for various algorithms. In the misspecified linear regression setting, Plan and Vershynin showed that the K-Lasso succeeds whenever the number of measurements m is of the order w(K)2 , where w(K) denotes the Gaussian width of K [27]. In the phase retrieval setting, Soltanolkotabi showed that Projected Amplitude Flow also succeeds whenever m & w(K)2 . On the other hand, it is hard to remark on the computational efficiency of these methods, because this depends on the properties of the set K. The final main result of this paper is a guarantee of a similar spirit. Theorem 2.5 (Recovery using general geometric constraints). Suppose x∗ xT∗ ∈ K, where K is a convex subset of the space of unit trace PSD matrices in Rn×n . Suppose a is a standard Gaussian in Rn , and suppose Assumption Af,g holds. Then for any ǫ, δ > 0, the output x̂ to Algorithm 2 satisfies kx̂ − x∗ k2 ≤ ǫ with probability at least 1 − δ so long as the sample size m satisfies  C w(K)2 + log4 (1/δ) + log m(γ1 (K, k·k) + log(1/δ)) C (2.3) + . m≥ 2 4 µ(f, g) ǫ δ Here, w(K) and γ1 (K, k·k) respectively denote the Gaussian width of K and its γ1 -functional with respect to the operator norm, while C is a universal constant. 5 Organization of paper and outline of proof strategy We prove Theorem 2.2 and Theorem 2.3 in Section 3. The strategy we take comprises two steps. First, we compute the expected objective function used in Algorithm 1, and show that it has sufficient curvature on the feasible set around the ground truth matrix, x∗ xT∗ . This shows that feasible solutions having large expected objective value must also be close to x∗ xT∗ . This computation is done in Section 4. Next, we argue that the empirical objective function is uniformly close to the expected objective function with high probability, so that a solution to the SDP program actually has large expected objective value. This is proved in Section 5. Finally, we use the same strategy for Theorem 2.5, but replace the objective function concentration analysis with a more sophisticated chaining argument. Due to its more technical nature, we defer the details to Appendix B. 3 Proof of results for sparse recovery Proof of Theorem 2.2. Let X be the solution to Algorithm 1. Since x∗ xT∗ is also feasible for the program, we have by optimality that 0 ≤ hX − x∗ xT∗ , Σ̂i = hX − x∗ xT∗ , Σi + hX − x∗ xT∗ , Σ̂ − Σi. (3.1) Using Lemma 4.3, the first term satisfies the bound hX − x∗ xT∗ , Σi ≤ − µ(f, g) kx∗ xT∗ − Xk2F . 2 For the second term, we use Hölder’s inequality to write hX − x∗ xT∗ , Σ̂ − Σi ≤ X − x∗ xT∗ 1 kΣ̂ − Σk∞ . Next, we have by assumption that x∗ xT∗ 1 = m X |(x∗ )i (x∗ )j | = kx∗ k21 ≤ s. i,j=1 Meanwhile, by construction, we also know that kXk1 ≤ s. Rearranging (3.1), we therefore get µ(f, g) kx∗ xT∗ − Xk2F ≤ 2skΣ̂ − Σk∞ . 2 Using Proposition 5.1 to bound the right hand side, we get p  Cs log(n/δ) + log2 (s/δ) √ . kx∗ xT∗ − Xk2F ≤ µ(f, g) m If x̂ denotes the leading eigenvector of X, we use Davis-Kahan’s eigenvector perturbation theorem [12] to conclude that kx̂ − x∗ k22 satisfies the same bound. Finally, we plug in our assumption on m to show that this bound is less than ǫ2 . Proof of Theorem 2.3. Exactly the same as for the Theorem 2.2. 6 √ Proof of Corollary 2.4. Observe that krs,Z k22 + ( sZ̄s )2 = kak22 = s. We have √ σ(f, Z, s) = Cov(f ( sZ̄s ), krs,Z k22 ) √ √ = Cov(f ( sZ̄s ), s − ( sZ̄s )2 ) √ √ = −Cov(f ( sZ̄s ), ( sZ̄s )2 ) = µ(f, Z, s). The corollary now follows from Theorem 2.3. 4 Objective function in expectation In this section, we compute expressions for the expected reweighted covariance matrix Σ = EΣ̂. Note that we may also write Σ = Ey(aaT − In ). Lemma 4.1 (Expected covariance for Gaussian distribution). Suppose a ∼ N(0, In ). Then for any x∗ ∈ S n−1 , we have Σ = µ(f, g)x∗ xT∗ . Proof. Decompose a = ha, x∗ ix∗ +a⊥ , where a⊥ is the projection of a to the orthogonal complement of x∗ . Using this, we write E{yaaT } = E{f (ha, x∗ i)(ha, x∗ ix∗ + a⊥ )(ha, x∗ ix∗ + a⊥ )T } = E{f (ha, x∗ i)ha, x∗ i2 x∗ xT∗ } + E{f (ha, x∗ i)a⊥ (a⊥ )T } + E{f (ha, x∗ i)ha, x∗ ix∗ (a⊥ )T } + E{f (ha, x∗ i)ha, x∗ ia⊥ xT∗ }. Because a is a standard Gaussian, ha, x∗ i and a⊥ are independent. This means that the third and fourth terms in this sum are zero. Furthermore, the second term can be written as the product of two expectations E{f (ha, x∗ i)} and E{a⊥ (a⊥ )T }. We now use standard computations for Gaussians to continue writing E{y(aaT − In )} = E{f (g)g 2 }x∗ xT∗ + E{f (g)}(In − x∗ xT∗ ) + E{f (g)}In = µ(f, g)x∗ xT∗ . This completes the proof. Lemma 4.2 (Expected covariance for non-Gaussian distributions). Suppose a is a random vector in Rn that satisfies Assumption 2.1. Let 2 ≤ s ≤ n be an integer, and let x∗ be an admissible signal vector. We have σ(f, Z, s) (PI − x∗ xT∗ ). Σ = µ(f, Z, s)x∗ xT∗ − s−1 c Proof. Let PI and P⊥ I denote the orthogonal projections to the coordinates in I and I respectively. Then PI a and P⊥ I a are independent. Using a similar calculation as in the previous lemma, we see ⊥ ⊥ ⊥ that PI ΣP⊥ = P I I ΣPI = PI ΣPI = 0. We may hence assume WLOG that s = n and I = [n]. By the symmetry of the distribution of a, we may also assume that x∗ = √1n , where 1 is the all ones vector. 7 Next, notice that ha, x∗ i is invariant to permutation of the coordinate indices. Meanwhile, the distributions of a⊥ and a are both symmetric with respect to such transformations. Let Q be a permutation matrix. Then QΣQT = E{f (ha, x∗ i)Qa(Qa)T } = E{f (hQa, x∗ i)Qa(Qa)T } = E{f (ha, x∗ i)a(a)T }. In other words, we have QΣQT = Σ. (4.1) One can check that a matrix satisfying (4.1) for all permutation matrices Q must have the same value for all diagonal entries, and the same value for all off-diagonal entries. In other words, Σ must be of the form 1 α (4.2) Σ = 11T + β(In − 11T ) n n for some values of α and β. Let us now compute the values of α and β using the fact that x∗ = √1n . We have α = xT Σx∗ = µ(f, Z, n). Next, we apply traces to (4.2) to get α + (n − 1)β = Tr(Σ) = E{f (ha, x∗ i)Tr(aaT − In )}. Observe further that E{f (ha, x∗ i)Tr(aaT − In )} = E{f (ha, x∗ i)(kak22 − n)} = σ(f, Z, n) + µ(f, Z, n). As such, we have β = σ(f,Z,n) n−1 as we wanted. Lemma 4.3 (Curvature of objective function). Suppose the hypotheses of Lemma 4.1 (respectively Lemma 4.2) hold. For any X  0 such that Tr(X) = 1, we have hΣ, x∗ xT∗ − Xi ≥ µ kx∗ xT∗ − Xk2F , 2 (4.3) where µ = µ(f, g) (respectively µ = µ(f, Z, s)). Proof. We shall prove the case where the hypotheses of Lemma 4.2 hold. The other case is similar and even easier. First, observe that hΣ, x∗ xT∗ i = µ(f, Z, s)hx∗ xT∗ , x∗ xT∗ i = µ(f, Z, s)kx∗ k42 . We also have σ(f, Z, s) hPI − x∗ xT∗ , Xi s−1 σ(f, Z, s) = µ(f, Z, s)hx∗ xT∗ , Xi + Tr(X RI ∩x⊥ ) ∗ s−1 T ≤ µ(f, Z, s)hx∗ x∗ , Xi. hΣ, Xi = µ(f, Z, s)hx∗ xT∗ , Xi + 8 Here, the last inequality follows from the fact that X is positive semidefinite, which implies that any partial trace has to be non-negative. Now, the assumptions on X also imply that kXkF ≤ 1 = kx∗ k2 . We can thus combine our calculations to get hΣ, x∗ xT∗ − Xi ≥ µ(f, Z, s)kx∗ k42 − µ(f, Z, s)hx∗ xT∗ , Xi  µ(f, Z, s)  kx∗ xT∗ kF + kXk2F − 2hx∗ xT∗ , Xi ≥ 2 µ(f, Z, s) = kx∗ xT∗ − Xk2F . 2 This completes the proof. 5 Concentration of objective function The goal of this section is to prove the following concentration theorem for the reweighted sample covariance matrix Σ̂. Proposition 5.1 (Concentration of sample matrix). There is a universal constant C so that the following holds. Fix a sparsity parameter s, let a be defined using Assumption 2.1. Suppose Assumption (Af,Z,s ) holds, and let x∗ be a unit norm vector. If a is non-Gaussian, further assume that x∗ is admissible. Then for any δ > 0, we have p C( log(n/δ) + log2 (s/δ)) √ kΣ̂ − Σk∞ ≤ m with probability at least 1 − δ, provided m ≥ C max{s/δ, log(n/δ) log 2 m}. Proof. Without loss of generality, assume that the support of x∗ is contained in the first s coordinates. Let Ps denote the projection to the first s coordinates. We write o n ⊥ ⊥ (5.1) kΣ̂ − Σk∞ = max kPs (Σ̂ − Σ)Ps k∞ , kPs (Σ̂ − Σ)P⊥ k , kP ( Σ̂ − Σ)P k s ∞ s s ∞ , and bound each of the terms on the right separately. For the first term, we shall use the fact that each entry is the mean of m i.i.d. ψ1/2 random variables (see Appendix A). This tail decay gives us a relatively strong large deviation inequality, which we can use together with a union bound. In more detail, let 1 ≤ k, l ≤ s. Then (Σ̂ − Σ)kl = m i 1 Xh (ai )k (ai )l f (hai , x∗ i) − E{(ai )k (ai )l f (hai , x∗ i)} . m i=1 We now use Proposition A.6 followed by Proposition A.5 twice to get k(a)k (a)l f (ha, x∗ i) − E{(a)k (a)l f (ha, x∗ i)}kψα . k(a)k (a)l f (ha, x∗ i)kψ1/2 . k(a)k (a)l kψ1 kf (ha, x∗ i)kψ1 . k(a)k kψ2 k(a)l kψ2 kf (ha, x∗ i)kψ1 . 9 Each of the terms in the product on the right hand side is bounded by an absolute constant by assumption. As such, the quantity on the left is also bounded by an absolute constant. We may thus use Proposition A.9 to see that √ √ P{|(Σ̂ − Σ)kl | > t/ m} ≤ 2 exp(−c t) for t > 0 large enough. Pick t ∼ log2 (s/δ). Then we can take a union bound over all s2 choices of k and l to get log2 (s/δ) √ kPs (Σ̂ − Σ)Ps k∞ . m with probability at least 1 − δ/4. We next bound the other two quantities in (5.1) via a conditioning argument similar to that in [24]. The key idea is to condition on the probability 1 − δ/4 event over which the three statements in Lemma 5.3 hold, and to observe that this event is independent of the random variables (ai )k for 1 ≤ i ≤ m, s < k ≤ n. Hence, conditioning on the event does not alter the joint distribution of this set of random variables. We consider a typical entry in Ps (Σ̂ − Σ)P⊥ s , which is of the form m 1 X (ai )k (ai )l f (hai , x∗ i), m i=1 1 ≤ k ≤ s, s < l ≤ n. (5.2) Fixing all randomness apart from (ai )l for all indices 1 ≤ i ≤ m, s < l ≤ n, we can use Hoeffding’s inequality (Proposition A.2) to conclude that for each l, (5.2) is a subgaussian random variable P 2 2 with variance m12 m (a i=1 i )k f (hai , x∗ i) . By the second statement of Lemma 5.3, this is bounded by C/m, so that ) ( m t 1 X ≤ 2 exp(−ct2 ) (5.3) (ai )k (ai )l f (hai , x∗ i) > √ P m m i=1 p Choosing t ∼ log(n/δ) and taking a union bound over s < l ≤ n gives r log(n/δ) ⊥ kPs (Σ̂ − Σ)Ps k∞ . m with probability at least 1 − δ/4. ⊥ Finally, each entry of P⊥ s (Σ̂ − Σ)Ps is of the form m   1 X f (hai , x∗ i) (ai )k (ai )l − E{(ai )k (ai )l } , m i=1 s < k, l ≤ n. (5.4) We again fix all randomness apart from (ai )l for all indices 1 ≤ i ≤ m, s < l ≤ n. Observe that (ai )k (ai )l − E{(ai )k (ai )l }, s < k, l ≤ n, are centered subexponential random variables. We may thus use Bernstein’s inequality (Proposition A.3) together with the second and third statements of Lemma 5.3 to obtain the tail bound: ) (   √  m   t 1 X 2 t m f (hai , x∗ i) (ai )k (ai )l − E{(ai )k (ai )l } > √ ≤ 2 exp −c min t , (5.5) P m log m m i=1 10 Once again, choosing t ∼ p log(n/δ) and taking a union bound over s < k, l ≤ n gives r log(n/δ) ⊥ , kPs (Σ̂ − Σ)Ps k∞ . m with probability at least 1 − δ/4 provided that m & log(n/δ) log 2 m. Remark 5.2. When a is a standard Gaussian, [24] gave the bound p C log(n/δ) √ kΣ̂ − Σk∞ ≤ m with roughly the same tail probability. Hence, the only price to having more distributional generality is the additional log2 (s/δ) term in the numerator. Lemma 5.3. Let the hypotheses of Proposition 5.1 hold. There is an absolute constant C such that the following holds. Let I denote the support of x∗ . Then for any δ > 0, so long as m ≥ Cs/δ, the following three statements hold simultaneously with probability at least 1 − δ/4. 1. m X i=1 f (hai , x∗ i)2 ≤ Cm. 2. max k∈I m X (ai )2k f (hai , x∗ i)2 ≤ Cm. i=1 3. max f (hai , x∗ i) ≤ C log m. 1≤i≤m Proof. By Assumption (Af,Z,s ), we know that kf (hai , x∗ i)kψ1 is bounded by an absolute constant. As such, Proposition A.4 implies that both its second and fourth moments are also bounded. Furthermore, we have Var(f (hai , x∗ i)2 ) ≤ E{f (hai , x∗ i)4 } ≤ C, where C is an absolute constant. Using Chebyshev’s inequality together with the second moment bound, we thus get ) (m X C f (hai , x∗ i)2 ≥ m(C + t) ≤ P . (5.6) mt2 i=1 We can use the same argument together with a union bound over k ∈ I to get ) ( m X Cs (ai )2k f (hai , x∗ i)2 ≥ m(C + t) ≤ P max . k∈I mt2 (5.7) i=1 Finally, we again use the union bound and the subexponential tail bound to get   P max f (hai , x∗ i) ≥ t log m ≤ 2m exp(−ct log m) = 2m1−ct . 1≤i≤m (5.8) Choose t to be any fixed constant in (5.6) and (5.7), and choose t to be a constant larger than 2/c in (5). Then each of these probability bounds is of the order O(1/m), so that m & s/δ suffices for all three statements to hold with probability at least 1 − δ/4. 11 6 Conclusion and discussion In this paper, we have analyzed the problem of misspecified phase retrieval, and improved upon the work of Neykov et al. in [24]. In particular, we have shown that the first stage of their algorithm suffices for signal recovery with the same sample complexity, and extended the analysis to nonGaussian measurements. Furthermore, we showed how the algorithm can be generalized to recover a signal vector x∗ efficiently given geometric prior information other than sparsity. Experts in compressed sensing may have observed that while the sample complexity for algorithms for misspecified linear regression scales linearly with the sparsity parameter, our sample complexity bounds for misspecified phase retrieval scale instead with the square of the parameter. In [24], the authors showed numerical evidence that this discrepancy is due to the statistical inefficiency of the algorithm, and not merely a slackness in the mathematical analysis. This s2 scaling is also observed in all other efficient algorithms for sparse phase retrieval, and it is an open question whether there exist computationally efficient algorithms that can do better. The authors of [24] conjecture that the answer is in the negative. This is supported by results by Berthet and Rigollet, who show that computationally efficient algorithms for the related problem of detecting sparse principal components, using O(s2−ǫ ) samples for any ǫ > 0, will lead to computationally efficient algorithms for solving hard instances of the planted clique problem [5, 4]. This is widely conjectured to be impossible. It will also be interesting to investigate whether there is slackness in the sample complexity bound for signal recovery using general geometric constraints (Theorem 2.5). In particular, I do not know how to bound γ1 (K, k·k) where K is the set of unit trace PSD matrices X with kXk1 ≤ s. Hence, it is not yet clear whether Theorem 2.2 can be derived from Theorem 2.5. Finally, the literature on high-dimensional signal recovery from non-Gaussian measurements is still fairly limited. In this work, we have proved a recovery guarantee for admissible signal vectors in the case of misspecified phase retrieval. Hopefully, this guarantee can be extended to larger classes of signal vectors in the near future. Acknowledgements I would like to thank Roman Vershynin and Shahar Mendelson for helpful discussions. Part of this manuscript was written on a visit to UC Irvine supported by U.S. Air Force Grant FA9550-18-10031. References [1] Amini, A. A., and Wainwright, M. J. High-dimensional analysis of semidefinite relaxations for sparse principal components. Annals of Statistics 37, 5 B (2009), 2877–2921. [2] Bahmani, S., and Romberg, J. Anchored Regression: Solving Random Convex Equations via Convex Programming. Preprint, available at http://arxiv.org/abs/1702.05327. [3] Bahmani, S., and Romberg, J. Phase Retrieval Meets Statistical Learning Theory: A Flexible Convex Relaxation. Preprint, available at http://arxiv.org/abs/1610.04210. [4] Berthet, Q., and Rigollet, P. Complexity Theoretic Lower Bounds for Sparse Principal Component Detection. JMLR: Workshop and Conference Proceedings 30, 2012 (2013), 1–21. 12 [5] Berthet, Q., and Rigollet, P. Optimal detection of sparse principal components in high dimension. Annals of Statistics 41, 4 (2013), 1780–1815. [6] Cai, T., Li, X., and Ma, Z. Optimal rates of convergence for noisy sparse phase retrieval via thresholded wirtinger flow. Annals of Statistics 44, 5 (2016), 2221–2251. [7] Candès, E. J., Li, X., and Soltanolkotabi, M. Phase retrieval from coded diffraction patterns. Applied and Computational Harmonic Analysis 39, 2 (2015), 277–299. [8] Candès, E. J., Li, X., and Soltanolkotabi, M. Phase Retrieval via Wirtinger Flow: Theory and Algorithms. IEEE Transactions on Information Theory 61, 4 (2015), 1985–2007. [9] Candès, E. J., Strohmer, T., and Voroninski, V. PhaseLift: Exact and stable signal recovery from magnitude measurements via convex programming. Communications on Pure and Applied Mathematics 66, 8 (2013), 1241–1274. [10] Chen, Y., and Candes, E. Solving random quadratic systems of equations is nearly as easy as solving linear systems. In Advances in Neural Information Processing Systems 28. 2015, pp. 739–747. [11] D’Aspremont, A., Bach, F., and Ghaoui, L. E. Optimal Solutions for Sparse Principal Component Analysis. Solutions 9 (2007), 1269–1294. [12] Davis, C., and Kahan, W. M. The rotation of eigenvectors by a perturbation. III. SIAM Journal on Numerical Analysis 7, 1 (1970), 1–46. [13] Dirksen, S. Tail bounds via generic chaining. Electronic Journal of Probability 20 (2015), 1–29. [14] Duchi, J. C., and Ruan, F. Solving (most) of a set of quadratic equalities: Composite optimization for robust phase retrieval. Preprint, available at http://arxiv.org/abs/1705.02356. [15] Ganti, R., Rao, N., Willett, R. M., and Nowak, R. Learning Single Index Models in High Dimensions. Preprint, available at http://arxiv.org/abs/1506.08910. [16] Goldstein, T., and Studer, C. PhaseMax: Convex Phase Retrieval via Basis Pursuit. Preprint, available at http://arxiv.org/abs/1610.07531. [17] Hand, P., and Voroninski, V. An Elementary Proof of Convex Phase Retrieval in the Natural Parameter Space via the Linear Program PhaseMax. Preprint, available at http://arxiv.org/abs/1611.03935. [18] Hand, P., and Voroninski, V. Compressed Sensing from Phaseless Gaussian Measurements via Linear Programming in the Natural Parameter Space. Preprint, available at http://arxiv.org/abs/1611.05985. [19] Jaganathan, K., Oymak, S., and Hassibi, B. Sparse phase retrieval: Convex algorithms and limitations. IEEE International Symposium on Information Theory - Proceedings (2013), 1022–1026. 13 [20] Jeong, H., and Güntürk, C. S. Convergence of the randomized Kaczmarz method for phase retrieval. Preprint, available at http://arxiv.org/abs/1706.10291. [21] Kuchibhotla, A. K., and Patra, R. K. Efficient Estimation in Single Index Models through Smoothing splines. Preprint, available at https://arxiv.org/abs/1708.00145. [22] Ledoux, M., and Talagrand, M. Probability in Banach Spaces: Isoperimetry and Processes. Springer Science & Business Media, 1991. [23] Ma, T., and Wigderson, A. Sum-of-squares lower bounds for sparse PCA. In Advances in Neural Information Processing Systems 28. 2015, pp. 1612–1620. [24] Neykov, M., Wang, Z., and Liu, H. Agnostic estimation for misspecified phase retrieval models. In Advances in Neural Information Processing Systems 29. 2016, pp. 4089–4097. [25] Ohlsson, H., Yang, A., Dong, R., and Sastry, S. Cprl – an extension of compressive sensing to the phase retrieval problem. In Advances in Neural Information Processing Systems 25. 2012, pp. 1367–1375. [26] Plan, Y., and Vershynin, R. Robust 1-bit compressed sensing and sparse logistic regression: A convex programming approach. IEEE Transactions on Information Theory 59, 1 (2013), 482–494. [27] Plan, Y., and Vershynin, R. The generalized lasso with non-linear observations. IEEE Transactions on Information Theory 62, 3 (2016), 1528–1537. [28] Soltanolkotabi, M. Structured signal recovery from quadratic measurements: Breaking sample complexity barriers via nonconvex optimization. Preprint, available at http://arxiv.org/abs/1702.06175. [29] Tan, Y. S., and Vershynin, R. Phase Retrieval via Randomized Kaczmarz: Theoretical Guarantees. Preprint, available at http://arxiv.org/abs/1706.09993. [30] van der Vaart, A. W., and Wellner, J. A. Weak Convergence and Empirical Processes. Springer Series in Statistics. Springer New York, New York, NY, 1996. [31] Vershynin, R. High-Dimensional Probability. Book draft, https://www.math.uci.edu/~rvershyn/papers/HDP-book/HDP-book.html. available at [32] Wang, G., Giannakis, G. B., and Eldar, Y. C. Solving Systems of Random Quadratic Equations via Truncated Amplitude Flow. IEEE Transactions on Signal Processing 65, 8 (may 2016), 1961–1974. [33] Wang, G., Zhang, L., Giannakis, G. B., Akcakaya, M., and Chen, J. Sparse Phase Retrieval via Truncated Amplitude Flow. Preprint, available at http://arxiv.org/abs/1611.07641. [34] Wei, K. Solving systems of phaseless equations via Kaczmarz methods: a proof of concept study. Inverse Problems 31, 12 (Dec 2015), 125008. [35] Zhang, H., and Liang, Y. Reshaped wirtinger flow for solving quadratic system of equations. In Advances in Neural Information Processing Systems 29. 2016, pp. 2622–2630. 14 A Results on ψα random variables In this section, we collect some standard definitions and results on ψα random variables that help us give streamlined proofs for our main theorems. These are collated from [22], [30], [31], and [23]. Definition A.1 (Orlicz norms). Let ψ : R+ → R+ be a convex, increasing function with ψ(0) = 0. Define the Orlicz norm of a random variable X with respect to ψ as kXkα := inf{λ > 0 : E{ψ(|X|/λ)} ≤ 1}. Equipped with this norm, the space of random variables with finite norm forms a Banach space, called an Orlicz space. We are especially interested in the Orcliz spaces corresponding to ψα for α > 0. These are defined as follows. When α ≥ 1, we set ψα (x) := exp(xα ) − 1. When 0 < α ≤ 1, this function is no longer convex, so we convexify it by fiat, setting ψα (x) := exp(xα ) − 1 for x ≥ x(α) large enough, and taking ψα to be linear on [0, x(α)]. If some random variable X has a finite ψα norm kXkψα , we say that it is a ψα random variable. Readers will probably be familiar with ψ2 and ψ1 Orcliz spaces. These correspond to subgaussian and subexponential random variables respectively (see [31] for more details). For these two classes of random variables, we have the well-known Hoeffding’s and Bernstein’s inequalities. Proposition A.2 (Hoeffding’s inequality). Let X1 , . . . , Xm be independent, centered, subgaussian random variables. Then for every t ≥ 0, we have ! ) ( m X ct2 , Xi ≤ 2 exp − Pm P 2 i=1 kXi kψ2 i=1 where c > 0 is an absolute constant. Proposition A.3 (Bernstein’s inequality). Let X1 , . . . , Xm be independent, centered, subexponential random variables. Then for every t ≥ 0, we have )! ) ( ( m X t2 t , Xi ≤ 2 exp −c min Pm P 2 , max kX k i i ψ1 i=1 kXi kψ1 i=1 where c > 0 is an absolute constant. In this paper however, it will be useful for us to consider Orlicz spaces in full generality. This is because we will need to work with ψ1/2 random variables, for which many of the standard concentration inequalities do not hold. Nonetheless, we still have the following. Proposition A.4 (Characterization of ψ1/2 RVs). Let X be a real-valued random variable. Then the following properties are equivalent. The parameters Ci > 0 appearing in these properties differ from each other by at most an absolute contant factor. 1. The tails of X satisfy  p  P{|X| ≥ t} ≤ 2 exp − t/C1 . 15 2. The moments of X satisfy kXkp = (E|X|p )1/p ≤ C2 p2 . 3. The ψ1/2 norm of X satisfies kXkψ1/2 ≤ C3 . Proof. Same as in the case of ψ1 and ψ2 . See [31]. We have the following further properties. Proposition A.5 (Products, Lemma 8.5 in [23]). Let X and Y be ψα random variables for some α > 0. Then XY is a ψα/2 random variable with ψα/2 norm satisfying kXY kψα/2 ≤ Cα kXkψα kY kψα . Here, Cα is an absolute constant depending only on α. Proposition A.6 (Centering). Let X be a ψα random variable for some α > 0. Then kX − EXkψα ≤ 2kXkψα . Proof. We have kX − EXkψα ≤ kXkψα + kEXkψα . Now check the definition of the norm to verify that kEXkψα ≤ kXkψα . Proposition A.7 (Sums, Theorem 6.21 in [22]). Let 0 < α ≤ 1, and let X1 , . . . , Xm be a sequence of independent, centered ψα random variables. Then ! m m X X Xi + max |Xi | . ≤ Cα E Xi i=1 1≤i≤m i=1 ψα ψα Here, Cα is an absolute constant depending only on α. Proposition A.8 (Maxima, Lemma 2.2.2 in [30]). Let 0 < α ≤ 1, and let X1 , . . . , Xm be independent, centered ψα random variables. Then max |Xi | 1≤i≤m ψα ≤ Cα ψα−1 (m) max kXi kψα . 1≤i≤m Here, Cα is an absolute constant depending only on α. Proposition A.9 (Bernstein-type inequality for ψ1/2 RVs). Let X1 , . . . , Xm be an independent, P centered ψ1/2 random variables. There is an absolute contant C such that Sm := √1m m i=1 Xi is a ψ1/2 random variable with ψ1/2 norm satisfying kSm kψ1/2 ≤ C max kXi kψ1/2 . 1≤i≤m In particular, if max1≤i≤m kXi kψ1/2 is bounded above by a constant, for every t ≥ 0, we have P{|Sm | ≥ t} ≤ 2 exp(− 16 p t/C). Proof. This follows more or less immediately from the last two propositions. First, notice that   2 1/2 m m X X √ Xi  ≤ C m max kXi kψ1/2 Xi ≤ E E 1≤i≤m i=1 i=1 Here, the first inequality is an application of Jensen’s inequality, and the second uses the moment bound in Proposition A.4. Next, we compute ψα−1 (m) = (log(m + 1))2 , and use Proposition A.8, we get max |Xi | 1≤i≤m ψα ≤ C(log m)2 max kXi kψα . 1≤i≤m Finally, plug these two bounds into the inequality given by Proposition A.7, and note that √ log(m + 1)/ m ≤ 5. This completes the proof of the first statement. The tail bound follows from Proposition A.4. B Recovery using general geometric signal constraints The goal of this section is to prove Theorem 2.5, and to collate the necessary theoretical apparatus for doing so. First, we state the algorithm we propose for estimating x∗ given general geometric constraints. We call this algorithm K-PCA. Algorithm 2 K-PCA for MPR Input: Measurements y1 , . . . , ym , sampling vectors a1 , . . . , am . Output: An estimate x̂ for x∗ . 1: Compute Σ̂ as defined in (1.3). 2: Let X̂ be the solution to max hX, Σ̂i subject to X ∈ K. X0 3: (B.1) Let x̂ be the leading eigenvector to X̂. This can be seen as a tensorized version of the 1-bit sensing algorithm proposed in [26]. Our analysis will be also be similar to that in [26], but we will require a more general concentration result (Lemma B.3) that is derived via chaining. We introduce the requisite definitions as follows. Let (T , d) be a metric space. A sequence T = (Tk )k∈Z+ of subsets of T is called admissible if k |T0 | = 1, and |Tk | ≤ 22 for all k ≥ 1. For any 0 < α < ∞, we define the γα functional of (T , d) to be ∞ X γα (T , d) := inf sup 2k/α d(t, Tk ). (B.2) T t∈T k=0 When (T , d) is a subset of Rn with the Euclidean metric, Talagrand’s comparison theory tells us that γ2 (T , d) ≍ w(T ), where w(T ) is the Gaussian width of T (see [22, 31]). Also note that for any positive constant c > 0, we have γα (T, cd) = cγα (T , d). We shall use this fact later. Now, let d1 and d2 be two metrics on T . We say that a process (Yt ) has mixed tail increments with respect to (d1 , d2 ) if there are constants c and C such that for all s, t ∈ T , we have the bound √ (B.3) P(|Ys − Yt | ≥ c( ud2 (s, t) + ud1 (s, t))) ≤ Ce−u . 17 Lemma B.1 (Suprema of mixed tail processes, Theorem 5, [13]). If (Yt )t∈T has mixed tail increments, then there is a constant C such that for any u ≥ 1, with probability at least 1 − e−u , √ (B.4) sup|Yt − Yt0 | ≤ C(γ2 (T , d2 ) + γ1 (T , d1 ) + udiam(T , d2 ) + udiam(T , d1 )). t∈T Let us return to our situation, where we have a subset K of unit trace PSD matrices in Rn×n . Fix x∗ xT∗ , and real numbers z1 , . . . , zm . We define a process on the set K as follows. Let a1 , . . . , am be standard Gaussians. For each X ∈ K, we set P T T YX = h m i=1 zi (ai ai − In ), X − x∗ x∗ i. We claim the following. Lemma B.2 (Process increments). The process YX has mixed tail increments with respect to Pm 2 1/2 ′ (d1 , d2 ), where d2 (X, X ) = ( i=1 zi ) kX − X′ kF , and d1 (X, X′ ) = maxi |zi | · kX − X′ k. Proof. Fix X, X′ ∈ K, and for convenience, denote H = X − X′ . Then YX − YX′ = = m X i=1 m X i=1 =  zi aTi Hai − E{aTi Hai } zi n X j=1 n m X X i=1 j=1   λj hai , vj i2 − E{hai , vj i2 }   zi λj hai , vj i2 − 1 , P T where H = m i=1 λi vi vi is the eigendecomposition of H. Next, observe that by the independence of orthogonal Gaussian marginals, {(hai , vj i2 − 1) : 1 ≤ i ≤ m, 1 ≤ j ≤ n} are independent, centered subexponential random variables with bounded subexponential norm. We may thus apply Bernstein’s inequality to get ( )! t2 t P{|YX − YX′ | ≥ t} ≤ 2 exp −c min Pm Pn . 2 2, i=1 j=1 zi λj maxi,j |zi λj | P Finally, observe that nj=1 zj2 = kHk2F and max1≤j≤n |zj | = kHk. One can now check that (B.3) is satisfied with respect to our chosen d1 and d2 . Lemma B.3 (Uniform deviation bound). Let a1 , . . . , am be independent standard Gaussians, and suppose that Assumption (Af,g ) holds. Let K be a convex subset of the space of unit trace PSD matrices in Rn×n . For any ǫ, δ > 0, if m satisfies the lower bound (2.3), then with probability at least 1 − δ, we have sup hΣ̂ − Σ, X − x∗ xT∗ i ≤ ǫ2 , X∈K Proof. The proof of this concentration bound follows the same strategy as that in [27]. A priori, the process we are trying to control has heavy tails. To overcome this, we will use a decoupling argument together with conditioning. 18 denote projection For each X ∈ K, denote H = X − x∗ xT∗ for convenience. Let Px∗ and Px⊥ ∗ onto x∗ and its orthogonal complement respectively. We can then write , Hi (Σ̂ − Σ)Px⊥ (Σ̂ − Σ)Px∗ , Hi + hPx⊥ hΣ̂ − Σ, Hi = hPx∗ (Σ̂ − Σ)Px∗ , Hi + 2hPx⊥ ∗ ∗ ∗ = hPx∗ (Σ̂ − Σ)Px∗ , Hi + 2hPx⊥ Σ̂Px∗ , Hi + hPx⊥ Σ̂Px⊥ , Hi. ∗ ∗ ∗ (B.5) We shall bound the three terms on the right separately. Recalling that Px∗ = x∗ xT∗ , we see that the first term can be written as hPx∗ (Σ̂ − Σ)Px∗ , Hi = xT∗ (Σ̂ − Σ)x∗ xT∗ Hx∗ " # m 1 X 2 2 = yi (hai , x∗ i − 1) − E{y(hai , x∗ i − 1)} xT∗ Hx∗ . m i=1 xT∗ Hx∗ Notice that ≤ 1. Meanwhile, the term in the square brackets is the average of independent, centered, ψ1/2 random variables. Using Proposition A.9, we have a probability at least 1 − δ/4 event over which the following bound holds: sup hPx∗ (Σ̂ − Σ)Px∗ , Hi ≤ X∈K C log(1/δ)2 √ . m (B.6) For the third term in (B.5), we write m P x⊥ Σ̂Px⊥ = ∗ ∗  1 X  T a )(P a ) − P yi (Px⊥ ⊥ ⊥ i i x∗ x∗ . ∗ m i=1 ai are independent, we may decouple them. In other words, we replace each ai Since yi and Px⊥ ∗ with a fully independent copy ãi . We can therefore write D P  E  m 1 T −P , Hi = hPx⊥ Σ̂P ã ) ã )(P (P y ⊥ ⊥ ⊥ ⊥ i i i x∗ x∗ , H x∗ x∗ i=1 m ∗ E D P m 1 T − I ), P HP y ( ã ã = m ⊥ ⊥ i i i n x∗ x∗ i=1 Fix the randomness with respect to a1 , . . . , am , y1 , . . . , ym , conditioning on the probability 1 − δ/4 event that the three statements in Lemma B.4 hold. With respect to the ãi ’s, Lemma B.2 shows us that this process indexed over X ∈ K has mixed tails. Furthermore, since K is a subset of the nuclear norm ball, its diameter with respect to both the Frobenius and operator norms is bounded by 2. Lemma B.1 then gives us another probability 1 − δ/4 event over which m  p C X 2 1/2  ≤ , Hi Σ̂P γ (K, k·k ) + y ) sup hPx⊥ ( log(1/δ) + max |yi |(γ1 (K, k·k) + log(1/δ)) ⊥ 2 x∗ i 2 ∗ 1≤i≤m m X∈K i=1 ! p γ2 (K, k·k2 ) + log(1/δ) log m(γ1 (K, k·k) + log(1/δ)) √ . (B.7) + ≤C m m Finally, for the second term in (B.5), we again decouple, writing E D P m 1 T,H a ) y ha , x ix (P hPx⊥ Σ̂P , Hi = i ∗ ∗ x∗ x⊥ i=1 i i m ∗ ∗ D P E m 1 T,H = m ã ) y ha , x ix (P ⊥ ∗ ∗ x∗ i i=1 i i D P E m 1 = m Hx y ha , x iã , P ⊥ ∗ . ∗ i x∗ i=1 i i 19 (B.8) ! Again, fix the randomness with respect to a1 , . . . , am , y1 , . . . , ym , and remember that we have conditioned on the event that the three statements in Lemma B.4 hold. Then with respect to the ãi ’s, the quantity on the right in (B.8) is a centered Gaussian random variable with variance σ2 = m CkHk2 1 X 2 2 2 Hx k y ha , x i kP ≤ . ⊥ ∗ 2 i ∗ i x∗ m2 m i=1 Therefore (hPx⊥ Σ̂Px∗ , Hi)X is a process indexed by X which has subgaussian increments with ∗ respect to the operator norm. We use an analogue of Theorem B.1 (see Theorem 3.2 in [13]) to obtain a probability 1 − δ/4 event over which ! p γ2 (K, k·k2 ) + log(1/δ) √ Σ̂Px∗ , Hi ≤ C sup hPx⊥ . (B.9) ∗ m X∈K Combining the bounds (B.6), (B.9), and (B.7) gives us the statement we want. Lemma B.4. Let a1 , . . . , am be independent standard Gaussians, and suppose that Assumption (Af,g ) holds. Then for any δ > 0, so long as m ≥ C/δ, the following three statements hold simultaneously with probability at least 1 − δ/4. 1. m X f (hai , x∗ i)2 ≤ Cm. m X yi2 f (hai , x∗ i)2 ≤ Cm. i=1 2. i=1 3. max f (hai , x∗ i) ≤ C log m. 1≤i≤m Proof. Exactly the same as in Lemma 5.3. Proof of Theorem 2.5. We repeat the argument of Theorem 2.2, but replace the Hölder’s inequality bound of hΣ̂ − Σ, X− x∗ xT∗ i therein with the uniform deviation bound supplied by Lemma B.3. 20
7cs.IT
Recursive Binary Neural Network Learning Model with 2.28b/Weight Storage Requirement 1 Tianchan Guan 1,2, Xiaoyang Zeng2, Mingoo Seok 1 Electrical Engineering, Columbia University; 2Microelectrical Engineering, Fudan University {tg2569, ms4415}@columbia.edu; xyzeng@fudan edu Abstract This paper presents a storage-efficient learning model titled Recursive Binary Neural Networks for sensing devices having a limited amount of on-chip data storage such as < 100’s kilo-Bytes. The main idea of the proposed model is to recursively recycle data storage of synaptic weights (parameters) during training. This enables a device with a given storage constraint to train and instantiate a neural network classifier with a larger number of weights on a chip and with a less number of off-chip storage accesses. This enables higher classification accuracy, shorter training time, less energy dissipation, and less on-chip storage requirement. We verified the training model with deep neural network classifiers and the permutation-invariant MNIST benchmark. Our model uses only 2.28 bits/weight while for the same data storage constraint achieving ~1% lower classification error as compared to the conventional binary-weight learning model which yet has to use 8 to 16 bit storage per weight. To achieve the similar classification error, the conventional binary model requires ~4× more data storage for weights than the proposed model. 1. Introduction Deep Neural Networks (DNN) have demonstrated the state-of-the-art results in a wide range of cognitive workloads such as computer version and speech recognition, achieving better-than-human performance for the tasks often considered too complex for machines [1-5]. The success of DNN has indeed motivated scientists and engineers to implement a DNN in mobile and embedded devices, often dubbed as Internet of Smart Things [6-7]. The recent works in this area however, mostly consider off-device learning [8-10], i.e., the learning of DNN is performed in the cloud data centers consisting of many CPU and GPU nodes and the post-learning weights are downloaded to mobile and embedded devices. This is because those devices have insufficient computing and storage capacity to train a DNN having millions of synapses each represented in a 32-bit floating point number. On-chip learning, however, becomes increasingly important for the mobile and embedded devices for the following four reasons. First, such device often benefits to have the model that is custom-built for the device and its user and environment. This is because the model tends to be more accurate and effective if created with considering those factors. Second, if we cannot fit all the weights in on-chip storage we have to store them in off-chip storage such as FLASH and DRAM. Accessing off-chip storage, however, incurs 3 to 4 orders of magnitudes more energy and delay overhead than storage on a processor chip [15]. Uploading data onto cloud computers for training can consume even more power and substantially increase latency [11]. On-chip learning, therefore, is a very desirable approach for energy-efficiency and delay. Third, the training data from mobile and embedded sensing devices can contain security-sensitive information, e.g., personal health data from wearable medical devices. At the risk of being leaked, users typically do not want to upload such data onto cloud computers. Finally, in the era of Internet of Things (IoT), we anticipate a drastic increase in the number of deployed devices, which can proportionally increase the number of learning tasks to be done in the cloud. Coupled with the complexity of learning, even for powerful cloud computers, this can be computationally challenging tasks. On-chip learning however entails various challenges, in algorithms, data, and systems [12-13]. The most eminent challenges with regards to hardware systems are high computation and data storage overhead of DNN system which can hardly be met by limited on-chip resources. Recently, Binary Neural Network (BNN) is proposed to drastically reduce computation complexity by using binary information of weights [16], activations [17], inputs [18], and their combinations. Although these works substantially save computational requirement, all these works still must maintain high-precision weights during training since the weight update is performed in a fine-grained manner. This limits on-chip integration of weights. Scaling data storage requirement, however, is an urgent challenge to minimize off-chip storage and cloud computer access. For example, a wearable tracker such as FitBit, contains the ARM Cortex M3 processor. This processor has only 64 kilo-Byte (kB) on-chip data storage (data cache) [14]. Even if we use all of that storage only for weights, we can implement only 16,000 weights if each has to use 32 bits. Thus the device has to use the non-volatile FLASH memory chip with capacity up to tens of Mega-Byte (MB) to store synaptic weights. However, using it during learning would be prohibitive since it incurs 1,000-10,000X worse energy and delay to access them than the on-chip data storage of the processor [15]. Our goal is, therefore, to train a neural network by efficient using a li mited amount of data storage on a processor chip. Toward this goal, we propose a new learning model, Recursive Binary Neural Network (RBNN). This model is based on the process of training of a neural network, weight binarization, recycling storage of non-sign-bit portion of weights to add more weights to enlarge the neural network for performance improvement. We recursively perform this process until either accuracy stop improving or we use up all the storage on a chip. We verified the proposed RBNN model on a multi-layer perceptron (MLP)-like classifier and the MNIST benchmark. We considered typical storage constraints of embedded sensing devices in the order of hundreds of kB. The experiment confirms that the proposed model (i) demonstrates ~1% classification accuracy improvement over the conventional BNN learning model specifically following [16] for the same storage constraints or (ii) scale on-chip data storage requirement by 4X for the same classification test error (~2.5%), marking the storage requirement of 2.28 bits/weight. The conventional BNN model ([16] but also [17,18]) exhibits a significantly larger storage requirement of 8 to 16 bits/weight.. The remainder of the paper is as follow. In Sec. 2 we will introduce the existing works on . In Sec. 3 we will describe our proposed model. Sec. 4 will present the experimental results and comparisons to the conventional model. Finally, in Sec. 5, we will conclude the paper. 2. Related Work While DNN achieves the state-of-the-art classification accuracy in a range of cognitive tasks, DNN is also well-known for its high computational complexity and storage requirement. The high storage requirement of DNN has motivated active researches to mitigate it both in learning and inference processes. Particularly many of the researches focus on synaptic weights as the high storage requirement often lies in and around them conventionally represented in 32-bit floating-point numbers. 2.1. Synaptic weight compression Compressing weights is one of the approaches to reduce storage requirement in deployment . Several researches show that the eights of DNN contain a large amount of redundancy, which can be exploited by compression. Well-known compression algorithms such as hash function [19] and Huffman code [20] have been applied to compress weights in DNN, achieving a large amount of storage savings as high as 49× [20]. However, these approaches must compress weights only after finishing training, thus cannot scale storage requirement for learning. Furthermore, it requires a decompression process of weights before performing inference operation, incurring a considerable amount of additional computing complexity. 2.2. Synaptic weights precision reduction Another approach is to reduce the precision of synaptic weights. Several studies have demonstrated lowering the precision of weights (i.e., quantization) has a tolerable impact on the performance of DNN [21,22]. Some studies even showed that the noise introduced by the quantization process can help improving performance [22]. In Ref. [21], the authors trained a DNN having 16-bit fixed-point weights with the proposed stochastic rounding technique, and demonstrated little to no degradation in classification accuracy. In Ref. [22], the authors proposed the dynamic fixed-point representation (i.e., dynamically changing the position of decimal point over computation sequences) to further reduce the precision requirement down to 10 bits per synapse. These techniques help to reduce storage requirement and replace complex floating-point arithmetic with simple fixed-point one. 2.3. Binary Neural Network Recent works proposed to use binary information of weights [16], activations [17,18], and even inputs [18] for some parts of learning and post-learning operations of neural networks. This replaces a good number of real-number multiplications with sign-inversion, shift, and XNOR operations, largely reducing computational complexity. However, all of these BNN approaches must store high-precision weights and cannot scale storage requirement of weights during learning because it is needed to tune weights in a fine-grained manner. 3. RBNN Model 3.1. Key idea Intuitively, our RBNN model is inspired by the difference between precision requirement of weights for BNN training and inference. To shed light with this difference, Table I shows which parts of weights are used in each step of training. The conventional BNN works [16-18] can use only sign bits of weights during multiply-and-accumulate (MAC) in both forward and back propagations. However the weight update is done in high -precision. This requires to store all bits of weights during learning i.e., no scaling in storage savings. Table I Comparisons of weight information usage in BNNs and RBNN Steps MAC in forward prop. BNN [16-18] Sign bits of weights Proposed RBNN Sign bits of weights MAC in back prop. Sign bits of weights Sign bits of weights Weight update All bits of weights All bits of weights Recursive recycling N/A Keep sign bits and recycle storages of the other bits for more plastic weights However, it has been known that once trained we can use only sign bits of weights to perform inference at a reasonably small accuracy penalty [16-18]. This vast different requirement of weight precision between learning and post-learning inspires us to create our RBNN model. As shown in the third column in Table I, like BNN [16-18], we also use sign bits for MAC operations to reduce computational complexity. The main difference is that after keeping only the sign bits after learning (called binarization), we recycle storages that used to store non-sign bits of weights and add more weights to the neural network. We perform this process recursively, which makes the neural networks larger and more accurate but using the same amount of storage. Figure 1 depicts the process of our proposed RBNN learning model with an example fully-connected neural network. In the beginning the neural network has one input, two hidden, and one output neurons with four weights each of which has n bits. We first train this 1 × 2 × 1 network using the conventional back-propagation algorithm. After that, as conventional BNN training method does, we binarize all the weights, i.e., discarding all bits except the sign bit, resulting in a 1 × 2 × 1 trained network with binary weights (trained BNN). Then we continue the second iteration of training (the middle of Fig. 1): specifically, we recycle the storage that used to store the n-1 non-sign bits of synapses in previous network. Using this storage, we add four weights each of which is now (n-1) bits to the just trained network, expanding the network to 1 × 4 × 1. This network has four weights that are trained (non-plastic, marked as solid lines) and four weights that can be trained (plastic, marked as dash lines), and we train only those four plastic weights using back-propagation algorithm. W13 W11 W12 Wb13 Wb11 W14 Wb12 Wb14 W21 W23 Wk1 Wk3 W24 W22 Wk2 Wk4 W11 Wb11 W21 Wb11 Wb21 ... Wk1 W12 Wb12 W22 Wb12 Wb22 ... Wk2 W13 Wb13 W23 Wb13 Wb23 ... Wk3 W14 Wb14 W24 Wb14 Wb24 ... n-bit 1-bit (n-1)-bit 1-bit 1-bit Wk4 (n-k+1)bit Figure 1: RBNN learning model with an example neural network. The recursive operation increases the number of weights in the neural network (top) while using the same amount of storage for weights (bottom) We repeat the same process of binarization and recycling, and after the k-times iterations the network becomes 1 × 2 ∙ k × 1 with 4 ∙ k binary weights, k times more weights than the first network. However, the storage for weights we need to use did not grow over the iterations, scaling the storage requirement per weight to n/k (=4∙n/4∙k), again k times better than the first network. Thus the proposed RBNN either can achieve better classification accuracy - enabled by the more number of weights - or reduce weight storage requirement to achieve the same performance level. 3.2. Model details Figure 2 depicts the details of the RBNN model. The left part of Figure depicts the flow chart of RBNN model, while left part explains the function of each stage. In the beginning of the training procedure, conventional BNN training algorithm BNN_Training is used to train a BNN. After training, we got a trained BNN with binary synaptic weights. As a result, the synaptic bit-width is reduced by 1. And then we use the rest synaptic bits are used as weights of incremental BNN. After training the incremental BNN with algorithm Incremental_BNN_Training, the performance of the enlarged BNN is tested. If the performance doesn’t stop improving and there are still available synaptic bits after weight binarzation, the rest synaptic bits will be reused to further enlarge current trained BNN. The method Incremental_BNN_Training is designed to train the incremental BNN to improve performance of previously trained BNN. To meet this goal, the conventional BNN training method is adjusted as follows: Feedforward: The outputs of enlarged BNN computed through adding outputs of both trained BNN and incremental BNN. As shown in Figure1, there’re no connections between trained BNN and incremental BNN. So the outputs of each hidden layer in the two networks are calculated separately. Backpropagation & Parameter update: The output layer’s activation gradient only back-propagates to incremental BNN. And only synaptic weights in incremental BNN are updated. BNN_Training BNN_Training: Training initial conventional BNN training method. BNN using Bit_width_Reduction Bit-width_Reduction: Reduce bit-width of all synaptic weights by 1 Incremental_BNN_Training Incremental_BNN_Training: Training incremental BNN with previously Trained BNN Performance_evaluation: Test the performance of trained enlarged BNN Performance_evaluation Stop criteria met? TRUE END FALSE Stop criteria: When the performance stops improving or improves too slowly with synaptic bits reuse, the process should stop. Figure 2: Detail of Training Method for RBNN Model To sum up, the trained BNN is only used to calculate output of the enlarged network in feedforward stage. The parameters of trained BNN won’t change when training incremental BNN. This ensures convergence of training of the enlarged BNN. The weights in trained BNN are binary, so it can only capture small partition of the weight updates because most of them have very small amount. Therefore, if we update trained BNN, it is very likely that the algorithm will not converge to a minimum of the cost function. On the oth er hand, the weights of incremental BNN have relatively high precision during training and thus can capture most of the weights update. Only updating incremental BNN can reduce the cost function of the enlarged BNN is because there’s no connections between incremental BNN and trained BNN. Therefore, when calculating output of enlarged BNN, output of trained BNN can be considered as a constant added to output of incremental BNN. As such, during back-propagation, trained BNN outputs have no impact on gradient of incremental BNN because derivation of constant is zero. Similar to the conventional BNN training algorithm [16], binary weights are used in both feed forward and back propagation in Incremental_BNN_Training, to reduce computational overhead. Since weights in trained BNN are binary, the multiplication related to weights can all be simplified as shift. Algorithm 1 Incremental_BNN_Training. C is the cost function for mini-batch, the learning rate and L the number of layers. The function specifies how to binarize the weights. and are activation function of hidden layers and output layer, respectively. Require: a minibatch of inputs and targets ( , ), previous weights of incremental BNN , weights of trained BNN , Ensure: updated weights of incremental BNN {1. Forward Propagation} {1.1 Computing outputs of hidden layers in trained BNN and incremental BNN} for k = 1 to L-1 do ∙ ( ∙ ) end for {1.2 Computing outputs of enlarged BNN} ∙ ∙ {2. Back propagation} {Please note that only gradients of incremental BNN are computed.} Compute knowing and for k = L to 1 do ( ) ∙ ∙ 1 1 end for {3 Parameter Update} {Please note that only weights of incremental BNN are updated.} for k = L to 1 do ∙ end for 4. Experiment Setup 4.1. Permutation-invariant MNIST benchmark We used the permutation-invariant MNIST to test the performance of the proposed RBNN model. We use the original training set of 60,000 images and the original test set of 10,000 28-by-28 pixel gray-scale images. The training and testing data 𝑥 is normalized to 𝑥𝑛𝑜𝑟𝑚 as: 𝑥𝑛𝑜𝑟𝑚 𝑥 𝑚𝑒 𝑛 𝑥 255 ×2 (7) xnorm is in the interval [-1, 1] and exhibits zero mean. Following the typical practices, we use the last 10,000 images of the training set as a validation set for early stopping and model selection. As we use the permutation-invariant MINST, i.e., ignoring the 2-dimentonal image structure of the image, we did not consider convolutional computation. We also did not consider data augmentation, pre-processing, and unsupervised pre-training during our experiment. 4.2. Neural network configuration and data format We considered the storage constraints of mainly hundreds of kB based on the typical embedded system designs [23]. We considered a feed-forward fully-connected neural network with a single hidden layer. We considered several different numbers of neuron units in the hidden layer ranging from 200 to 800. The numbers of the input and output units are 784 and 10, respectively. We used the tanh_opt()for the activation function of the hidden layer and the softmax()for that of the output layer. We use the classical Stochastic Gradient Descent (SGD) algorithm for cross-entropy minimization without momentum. We use a small size of batch (1,000) and a single static learning rate of 0.25. We did not use other advanced techniques such as dropout, Maxout, ADAM, and etc. for both the proposed and the baseline learning models. We recorded the best training and test errors associated with the best validation error after up to 1,000 epochs. We used the fixed-point arithmetic for all the computation and data load and access. The synaptic weight data load and access was performed strictly at the precision of the plastic synaptic bit-width associated with the current recursive iteration BWp, e.g., N bits for the first iteration, N-1 bits for the second iteration, et al. The intermediate computation, such as gradient calculation, may use higher-precision fixed-point arithmetic to maintain sufficient precision. The translation from wide fixed-point number to narrow fixed-point and binary number is performed with simple decimation, i.e., removing less significant bits, without using advanced techniques such as stochastic rounding. We saturated values in the event of overflow in weight update, i.e., the value was set to the largest or smallest value which the currently-used fixed-point format can represent. Storage constraints: 155kB First recursive iteration 0.01 Test error (%) Training error (%) 0.1 Second 1E-3 Third 1E-4 4.0 First recursive iteration 3.5 Second 3.0 Third Fourth Fifth Fifth 1E-5 109 8 7 6 5 4 Storage constraints: 155kB Sixth Fourth 16 4.5 3 2 Sixth 2.5 1 Weight storage efficiency (bits/weight) 16 109 8 7 6 5 4 3 2 1 Weight storage efficiency (bits/weight) Figure 3: (left) Training error and (right) testing error across recursive iterations in the proposed RBNN model. The storage constraint is 155 kB. 5. Results and Discussion 5.1. Accuracy improvement Figure 3 depicts the classification errors of the proposed learning model across six recursive iterations. The initial bit-width of weights is 16 bits. In each series of data points in Figure 3, the leftmost point is the initial neural network, i.e., with 100 hidden units and 79,400 synapses (= 784·100+100·10). At this point, the synaptic bit efficiency, defined as the ratio of total storage bits to the number of synapses trained with the bits, is 16 bits/synapse. Note that this point is equivalent to the network trained with the conventional BNN model specifically following [16]. In the second leftmost data point in the series is the neural network after the first recursive iteration, i.e., the network with total 200 hidden units and 158,800 (=2·79,400) synapses, achieving significant reduction in error. The weight storage requirement also improves to ~8 bits/synapse. Finally, after six recursive iterations, the neural network implements total 700 hidden neurons and 555,800 synapses with only 155 kB data storage, marking the storage requirement of 2.28b/synapse and the test error of ~2.6%. 5.2. Storage savings We experimented our proposed and conventional BNN learning model [16] across different combinations of hidden neuron counts and bits per synapse. For the conventional model, we considered from 800 hidden neurons and 16-b synapses to 100 hidden neurons and 12-b synapses, which correspond to 1.2 MB to 116 KB data storage requirement for synaptic weights, respectively. For the proposed model, we considered from 200 initial hidden neurons and initially 16 bit synapses to 100 initial hidden neurons and initially 12 bit synapses, and performed recursive binarizations for each network. Our proposed model requires 116kB to 310 kB data storage for synapses. Figure 4 shows the results of this experiment: the proposed model can achieve ~1% lower test error than the conventional model using the similar amount of storage. In addition, the conventional mode requires 3× more data storage to achieve the similar test error with the proposed RBNN model. Storage requirement (MB) Table II shows the detail comparisons of the six neural networks, three from the proposed RBNN model (R1, R2,R3) and three from the conventional BNN model (B 1, B 2, B 3) [16]. R1 and B 1 achieve the similar test error, but R1 outperforms B 1 in the storage requirement by 3×. The downside of R 1 is the increase in computations during training: it requires more shift and add operations, but the same number of multiplications (which is much more complex than add and shift), as compared to the B1. The computation complexity for inference operations are the same. Similarly, R 3 requires 4× less storage than B 2. 1.4 Proposed RSBL Conventional BNN [800,16] 1.2 1.0 B1 [800,12] = [hidden units, weight bitwidth] 0.8 >3X 0.6 0.4 R1 [200, 16] 0.2 [400, 16] B2 [400, 12] [400, 8][200, 16] [100, 16] R2 [100, 12] 0.0 2.0 2.5 [400, 6] [200 8] >1% [100, 16] [100, 12] [200, 6] B3 3.0 3.5 4.0 4.5 Test error (%) 5.0 Figure 4: The storage requirement and test error trade-offs achieved by the proposed RBNN model and the conventional BNN model. The proposed model achieves >3× storage requirement savings for the same test error and >1% lower error for the same storage requirement. Table II. Detail comparisons of RBNNs and BNNs Initial hidden neurons R1 200 R2 100 R3 100 B1 800 B2 400 B3 200 Final hidden neurons 800 700 400 800 400 200 Final synapses 635,200 555,800 317,600 635,200 317,600 155,600 Initial weight bitwidth 16 16 12 12 12 6 Storage req (b/weight) 4 2.28 3 12 12 6 Test error (%) 2.56 2.65 2.76 2.61 2.80 3.60 Comp., learning Shift / Multiply / Add 2,699,600 635,200 2,699,600 3,970,000 555,800 3,970,000 1,349,800 317,600 1,349,800 1,270,400 635,200 1,270,400 635,200 317,600 635,200 317,600 158,800 317,600 Comp., inference Shift, Add Storage requirement 635,200 635,200 310kB 555,800 555,800 155kB 317,600 317,600 116kB 635,200 635,200 930kB 317,600 317,600 465kB 158,800 158,800 114kB 6. Conclusion and Future Work This paper presents a learning model regarding local on-device learning in sensing devices with limited data storage. The proposed RBNN model builds upon the recent binary neural network models and extends them by recycling data storage that would have been wasted, to add and train more synapses to a neural network classifier. We verified the proposed model with the neural network classifier and the permutation-invariant MNIST benchmark under the typical embedded system storage constraints. The results show that the proposed model achieves 2.28b/weight storage requirement while achieving ~1% better classification error as compared to the conventional binary-weight learning model for the same storage constraint. Our proposed model also achieves 3× less data storage than the conventional model for the same classification error. We expect the future work that extends the application of the learning model to other neural network topologies and datasets. We also expect to apply the RBNN model to the ensembles of neural networks [24-26], the mixture of experts [27-29], and the incremental learning [27,30]. This is because the proposed learning model virtually enables to create and train additional synapses from the just trained synapses via recursive binarizat ion and recycling. References [1] G. Hinton, L. Deng, D. Yu, G. E. Dahl, A. R. Mohamed, N. Jaitly, et al., (2012). Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal Processing Magazine, 29(6), 82-97. [2] A. Krizhevsky, I. Sutskever, and G. Hinton. ImageNet classification with deep convolutional neural networks. In NIPS’2012. 2012. [3] Jacob Devlin, Rabih Zbib, Zhongqiang Huang, Thomas Lamar, Richard Schwartz, and John Makhoul. Fast and robust neural network joint models for statistical machine translation. In Proc. ACL’2014, 2014. [4] A. Krizhevsky, I. Sutskever, G. E. Hinton, (2012). Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems (pp. 1097-1105). [5] R. Girshick, J. Donahue, T. Darrell, J. Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In: Proceedings of the IEEE conference on computer vision and pattern recognition. (2014) 580–587 [6] Smart Things. URL: https://en.wikipedia.org/wiki/SmartThings [7] G. Kortuem, F. Kawsar, V. Sundramoorthy, D. Fitton, (2010). Smart objects as building blocks for the internet of things. IEEE Internet Computing, 14(1), 44-51. [8] N. D. Lane, S. Bhattacharya, P. Georgiev, C. Forlivesi, L. Jiao, L. Qendro, F. Kawsar, (2016, April). Deepx: A software accelerator for low-power deep learning inference on mobile devices. In Information Processing in Sensor Networks (IPSN), 2016 15th ACM/IEEE Internationa l Conference on (pp. 1-12). IEEE. [9] D. Shin, J. Lee, J. Lee, H. J. Yoo, (2017, February). DNPU: An 8.1 TOPS/W reconfigurable CNN-RNN processor for general-purpose deep neural networks. In Solid-State Circuits Conference (ISSCC), 2017 IEEE International (pp. 240-241). IEEE. [10] S. Bang, J. Wang, Z. Li, C. Gao, Y. Kim, Q. Dong, et al., (2017, February). A 288µW programmable deep-learning processor with 270KB on-chip weight storage using non-uniform memory hierarchy for mobile intelligence. In Solid-State Circuits Conference (ISSCC), 2017 IEEE International (pp. 250-251). IEEE. [11] Z. Jiang, C. Bae, J. Kang, S. J. Kim, M. Seok, “Microwatt End-to-End Digital Neural Signal Processing Systems for Motor Intention Decoding,” IEEE Design, Automation, and Test in Europe (DATE), 2017 [12] J. Roschelle, (2003). Keynote paper: Unlocking the learning value of wireless mobile devices. Journal of computer assisted learning, 19(3), 260-272. [13] D. Vogel, D. Kennedy, R.C.W. Kwok, (2009). Does using mobile device applications lead to learning?. Journal of Interactive Learning Research, 20(4), 469. [14] J. Yiu, (2009). The definitive guide to the ARM Cortex-M3. Newnes. [15] W. A. Wulf, and S. A. McKee. "Hitting the memory wall: implications of the obvious." ACM SIGARCH computer architecture news 23, no. 1 (1995): 20-24. [16] M. Courbariaux, Y. Bengio, J. P. David, (2015). Binaryconnect: Training deep neural networks with binary weights during propagations. In Advances in Neural Information Processing Systems (pp. 3123-3131). [17] M. Courbariaux, I. Hubara, D. Soudry, R. El-Yaniv, Y. Bengio, (2016). Binarized neural networks: Training deep neural networks with weights and activations constrained to+ 1 or-1. arXiv preprint arXiv:1602.02830. [18] M. Rastegari, V. Ordonez, J. Redmon, A. Farhadi, (2016, October). Xnor-net: Imagenet classification using binary convolutional neural networks. In European Conference on Computer Vision (pp. 525-542). Springer International Publishing. [19] W. Chen, J. Wilson, S. Tyree, K. Weinberger, Y. Chen, (2015, June). Compressing neural networks with the hashing trick. In International Conference on Machine Learning (pp. 2285-2294). [20] S. Han, H. Mao, W. J. Dally, (2015). Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149. [21] S. Gupta, A. Agrawal, K. Gopalakrishnan, P. Narayanan, (2015, July). Deep Learning with Limited Numerical Precision. In ICML (pp. 1737-1746). [22] M. Courbariaux, Y. Bengio, J.P. David, (2014). Training deep neural networks with low precision multiplications. arXiv preprint arXiv:1412.7024. [23] W. T. Shiue, C. Chakrabarti, (1999, June). Memory exploration for low power, embedded systems. In Proceedings of the 36th annual ACM/IEEE Design Automation Conference (pp. 140-145). ACM. [24] Z. H. Zhou, J. Wu, W. Tang, (2002). Ensembling neural networks: many could be better than all. Artificial intelligence, 137(1-2), 239-263. [25] L. K. Hansen, P. Salamon, (1990). Neural network ensembles. IEEE transactions on pattern analysis and machine intelligence, 12(10), 993-1001. [26] G. Giacinto, F. Roli, (2001). Design of effective neural network ensembles for image classification purposes. Image and Vision Computing, 19(9), 699-707. [27] N. Shazeer, A. Mirhoseini, K. Maziarz, A. Davis, Q. Le, G. Hinton, J. Dean, (2017). Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. arXiv preprint arXiv:1701.06538. [28] D. J. Miller, H. S. Uyar, (1997). A mixture of experts classifier with learning based on both labelled and unlabelled data. Advances in neural information processing systems, 571-577. [29] M. Enzweiler, D. M. Gavrila, (2011). A multilevel mixture-of-experts framework for pedestrian classification. IEEE Transactions on Image Processing, 20(10), 2967-2979. [30] T. Xiao, J. Zhang, K. Yang, Y. Peng, Z. Zhang, (2014, November). Error-driven incremental learning in deep convolutional neural network for large-scale image classification. In Proceedings of the 22nd ACM international conference on Multimedia (pp. 177-186). ACM.
9cs.NE
Deep Hyperspherical Learning Weiyang Liu1 , Yan-Ming Zhang2 , Xingguo Li3,1 , Zhiding Yu4 , Bo Dai1 , Tuo Zhao1 , Le Song1 Georgia Institute of Technology 2 Institute of Automation, Chinese Academy of Sciences 3 University of Minnesota 4 Carnegie Mellon University {wyliu,tourzhao}@gatech.edu, [email protected], [email protected] arXiv:1711.03189v5 [cs.LG] 30 Jan 2018 1 Abstract Convolution as inner product has been the founding basis of convolutional neural networks (CNNs) and the key to end-to-end visual representation learning. Benefiting from deeper architectures, recent CNNs have demonstrated increasingly strong representation abilities. Despite such improvement, the increased depth and larger parameter space have also led to challenges in properly training a network. In light of such challenges, we propose hyperspherical convolution (SphereConv), a novel learning framework that gives angular representations on hyperspheres. We introduce SphereNet, deep hyperspherical convolution networks that are distinct from conventional inner product based convolutional networks. In particular, SphereNet adopts SphereConv as its basic convolution operator and is supervised by generalized angular softmax loss - a natural loss formulation under SphereConv. We show that SphereNet can effectively encode discriminative representation and alleviate training difficulty, leading to easier optimization, faster convergence and comparable (even better) classification accuracy over convolutional counterparts. We also provide some theoretical insights for the advantages of learning on hyperspheres. In addition, we introduce the learnable SphereConv, i.e., a natural improvement over prefixed SphereConv, and SphereNorm, i.e., hyperspherical learning as a normalization method. Experiments have verified our conclusions. 1 Introduction Recently, deep convolutional neural networks have led to significant breakthroughs on many vision problems such as image classification [9, 18, 19, 6], segmentation [3, 13, 1], object detection [3, 16], etc. While showing stronger representation power over many conventional hand-crafted features, CNNs often require a large amount of training data and face certain training difficulties such as overfitting, vanishing/exploding gradient, covariate shift, etc. The increasing depth of recently proposed CNN architectures have further aggravated the problems. To address the challenges, regularization techniques such as dropout [9] and orthogonality parameter constraints [21] have been proposed. Batch normalization [8] can also be viewed as an implicit regularization to the network, by normalizing each layer’s output distribution. Recently, deep residual learning [6] emerged as a promising way to overcome vanishing gradients in deep networks. However, [20] pointed out that residual networks (ResNets) are essentially an exponential ensembles of shallow networks where they avoid the vanishing/exploding gradient problem but do not provide direct solutions. As a result, training an ultra-deep network still remains an open problem. Besides vanishing/exploding gradient, network optimization is also very sensitive to initialization. Finding better initializations is thus widely studied [5, 14, 4]. In general, having a large parameter space is double-edged considering the benefit of representation power and the associated training difficulties. Therefore, proposing better learning frameworks to overcome such challenges remains important. In this paper, we introduce a novel convolutional learning framework that can effectively alleviate training difficulties, while giving better performance over dot product based convolution. Our idea 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. w θ(w,x) x g(θ(w,x) ) SphereConv SphereConv Operator Operator ... w3 ... x x ... SphereConv Operator x ... w1 x SphereConv Operator x ... ... x w2 Cross-entropy w4 Softmax x x x Hyperspherical Convolutions Generalized Angular Softmax Loss Figure 1: Deep hyperspherical convolutional network architecture. is to project parameter learning onto unit hyperspheres, where layer activations only depend on the geodesic distance between kernels and input signals1 instead of their inner products. To this end, we propose the SphereConv operator as the basic module for our network layers. We also propose softmax losses accordingly under such representation framework. Specifically, the proposed softmax losses supervise network learning by also taking the SphereConv activations from the last layer instead of inner products. Note that the geodesic distances on a unit hypersphere is the angles between inputs and kernels. Therefore, the learning objective is essentially a function of the input angles and we call it generalized angular softmax loss in this paper. The resulting architecture is the hyperspherical convolutional network (SphereNet), which is shown in Fig. 1. Our key motivation to propose SphereNet is that angular information matters in convolutional representation learning. We argue this motivation from several aspects: training stability, training efficiency, and generalization power. SphereNet can also be viewed as an implicit regularization to the network by normalizing the activation distributions. The weight norm is no longer important since the entire network operates only on angles. And as a result, the `2 weight decay is also no longer needed in SphereNet. SphereConv to some extent also alleviates the covariate shift problem [8]. The output of SphereConv operators are bounded from −1 to 1 (0 to 1 if considering ReLU), which makes the variance of each output also bounded. Our second intuition is that angles preserve the most abundant discriminative information in convolutional learning. We gain such intuition from 2D Fourier transform, where an image is decomposed by the combination of a set of templates with magnitude and phase information in 2D frequency domain. If one reconstructs an image with original magnitudes and random phases, the resulting images are generally not recognizable. However, if one reconstructs the image with random magnitudes and original phases. The resulting images are still recognizable. It shows that the most important structural information in an image for visual recognition is encoded by phases. This fact inspires us to project the network learning into angular space. In terms of low-level information, SphereConv is able to preserve the shape, edge, texture and relative color. SphereConv can learn to selectively drop the color depth but preserve the RGB ratio. Thus the semantic information of an image is preserved. SphereNet can also be viewed as a non-trivial generalization of [11, 12]. By proposing a loss that discriminatively supervises the network on a hypersphere, [12] achieves state-of-the-art performance on face recognition. However, the rest of the network remains a conventional convolution network. In contrast, SphereNet not only generalizes the hyperspherical constraint to every layer, but also to different nonlinearity functions of input angles. Specifically, we propose three instances of SphereConv operators: linear, cosine and sigmoid. The sigmoid SphereConv is the most flexible one with a parameter controlling the shape of the angular function. As a simple extension to the sigmoid SphereConv, we also present a learnable SphereConv operator. Moreover, the proposed generalized angular softmax (GA-Softmax) loss naturaly generalizes the angular supervision in [12] using the SphereConv operators. Additionally, the SphereConv can serve as a normalization method that is comparable to batch normalization, leading to an extension to spherical normalization (SphereNorm). SphereNet can be easily applied to other network architectures such as GoogLeNet [19], VGG [18] and ResNet [6]. One simply needs to replace the convolutional operators and the loss functions with the proposed SphereConv operators and hyperspherical loss functions. In summary, SphereConv can be viewed as an alternative to the original convolution operators, and serves as a new measure of correlation. SphereNet may open up an interesting direction to explore the neural networks. We ask the question whether inner product based convolution operator is an optimal correlation measure for all tasks? Our answer to this question is likely to be “no”. 1 Without loss of generality, we study CNNs here, but our method is generalizable to any other neural nets. 2 2 2.1 Hyperspherical Convolutional Operator Definition The convolutional operator in CNNs is simply a linear matrix multiplication, written as F(w, x) = w> x + bF where w is a convolutional filter, x denotes a local patch from the bottom feature map and bF is the bias. The matrix multiplication here essentially computes the similarity between the local patch and the filter. Thus the standard convolution layer can be viewed as patch-wise matrix multiplication. Different from the standard convolutional operator, the hyperspherical convolutional (SphereConv) operator computes the similarity on a hypersphere and is defined as: Fs (w, x) = g(θ(w,x) ) + bFs , (1) where θ(w,x) is the angle between the kernel parameter w and the local patch x. g(θ(w,x) ) indicates a function of θ(w,x) (usually a monotonically decreasing function), and bFs is the bias. To simplify analysis and discussion, the bias terms are usually left out. The angle θ(w,x) can be interpreted as the geodesic distance (arc length) between w and x on a unit hypersphere. In contrast to the convolutional operator that works in the entire space, SphereConv only focuses on the angles between local patches and the filters, and therefore operates on the hypersphere space. In this paper, we present three specific instances of the SphereConv Operator. To facilitate the computation, we constrain the output of SphereConv operators to [−1, 1] (although it is not a necessary requirement). Linear SphereConv. In linear SphereConv operator, g is a linear function of θ(w,x) , with the form: g(θ(w,x) ) = aθ(w,x) + b, (2) where a and b are parameters for the linear SphereConv operator. In order to constrain the output range to [0, 1] while θ(w,x) ∈ [0, π], we use a = − π2 and b = 1 (not necessarily optimal design). Cosine SphereConv. The cosine SphereConv operator is a nonlinear function of θ(w,x) , with its g being the form of 1 (3) 0.5 w x which can be reformulated as kwk . Therefore, it can be 2 kxk2 viewed as a doubly normalized convolutional operator, which bridges the SphereConv operator and convolutional operator. 0 g(θ(w,x) ) = cos(θ(w,x) ), T Sigmoid SphereConv. The Sigmoid SphereConv operator is derived from the Sigmoid function and its g can be written as g(θ(w,x) ) = 1+ 1− π exp(− 2k ) π exp(− 2k ) · 1 − exp 1 + exp θ(w,x) k θ(w,x) k Cosine Linear Sigmoid (k=0.1) Sigmoid (k=0.3) Sigmoid (k=0.7) -0.5 -1 0 0.5 1 1.5 2 2.5 3 Figure 2: SphereConv operators. − π 2k − π 2k  , (4) where k > 0 is the parameter that controls the curvature of the function. While k is close to 0, g(θ(w,x) ) will approximate the step function. While k becomes larger, g(θ(w,x) ) is more like a linear function, i.e., the linear SphereConv operator. Sigmoid SphereConv is one instance of the parametric SphereConv family. With more parameters being introduced, the parametric SphereConv can have richer representation power. To increase the flexibility of the parametric SphereConv, we will discuss the case where these parameters can be jointly learned via back-prop later in the paper. 2.2 Optimization The optimization of the SphereConv operators is nearly the same as the convolutional operator and also follows the standard back-propagation. Using the chain rule, we have the gradient of the SphereConv with respect to the weights and the feature input: ∂g(θ(w,x) ) ∂g(θ(w,x) ) ∂θ(w,x) = · , ∂w ∂θ(w,x) ∂w For different SphereConv operators, both lies in the ∂g(θ(w,x) ) ∂θ(w,x) part. For ∂θ(w,x) ∂w , ∂g(θ(w,x) ) ∂g(θ(w,x) ) ∂θ(w,x) = · . ∂x ∂θ(w,x) ∂x ∂θ(w,x) ∂w we have  wT x and ∂θ(w,x) ∂x (5) are the same, so the only difference T  w x ∂ arccos kwk ∂θ(w,x) 2 kxk2 = , ∂x ∂x ∂ arccos kwk2 kxk2 ∂θ(w,x) = , ∂w ∂w ∂g(θ (6) ) (w,x) which are straightforward to compute and therefore neglected here. Because ∂θ(w,x) for the linear SphereConv, the cosine SphereConv and the Sigmoid SphereConv are a, − sin(θ(w,x) ) and −2 exp(θ(w,x) /k−π/2k) k(1+exp(θ(w,x) /k−π/2k))2 respectively, all these partial gradients can be easily computed. 3 2.3 Theoretical Insights We provide a fundamental analysis for the cosine SphereConv operator in the case of linear neural network to justify that the SphereConv operator can improve the conditioning of the problem. In specific, we consider one layer of linear neural network, where the observation is F = U ∗ V ∗> (ignore the bias), U ∗ ∈ Rn×k is the weight, and V ∗ ∈ Rm×k is the input that embeds weights from previous layers. Without loss of generality, we assume the columns satisfying kUi,: k2 = kVj,: k2 = 1 for all i = 1, . . . , n and j = 1, . . . , m, and consider min U ∈Rn×k ,V ∈Rm×k G(U , V ) = 21 kF − U V > k2F . (7) This is closely related with the matrix factorization and (7) can be also viewed as the expected version for the matrix sensing problem [10]. The following lemma demonstrates a critical scaling issue of (7) for U and V that significantly deteriorate the conditioning without changing the objective of (7). Lemma 1. Consider a pair of global optimal points U , V satisfying F = U V > and Tr(V > V ⊗ e = cU and Ve = V /c, then we have In ) ≤ Tr(U > U ⊗ Im ). For any real c > 1, let U λ 2 2 2 max e , Ve )) = Ω(c κ(∇ G(U , V ))), where κ = κ(∇ G(U λmin is the restricted condition number with λmax being the largest eigenvalue and λmin being the smallest nonzero eigenvalue. Lemma 1 implies that the conditioning of the problem (7) at a unbalanced global optimum scaled by a constant c is Ω(c2 ) times larger than the conditioning of the problem at a balanced global optimum. Note that λmin = 0 may happen, thus we consider the restricted condition here. Similar results hold beyond global optima. This is an undesired geometric structure, which further leads to slow and unstable optimization procedures, e.g., using stochastic gradient descent (SGD). This motivates us to consider the SphereConv operator discussed above, which is equivalent to projecting data onto the hypersphere and leads to a better conditioned problem. Next, we consider our proposed cosine SphereConv operator for one-layer of the linear neural network. Based on our previous discussion on SphereConv, we consider an equivalent problem: min U ∈Rn×k ,V ∈Rm×k 1 1 GS (U , V ) = 21 kF − DU U V > DV k2F ,  n×n (8) 1 1  where DU = diag kU1,: k2 , . . . , kUn,: k2 ∈ R and DV = diag kV1,: k2 , . . . , kVm,: k2 ∈ m×m R are diagonal matrices. We provide an analogous result to Lemma 1 for (8) . e , Ve )) = e = cU and Ve = V /c, then we have λi (∇2 GS (U Lemma 2. For any real c > 1, let U 2 2 e λi (∇ GS (U , V )) for all i ∈ [(n + m)k] = {1, 2, . . . , (n + m)k} and κ(∇ G(U , Ve )) = κ(∇2 G(U , V )), where κ is defined as in Lemma 1. We have from Lemma 2 that the issue of increasing condition caused by the scaling is eliminated by the SphereConv operator in the entire parameter space. This enhances the geometric structure over (7), which further results in improved convergence of optimization procedures. If we extend the result from one layer to multiple layers, the scaling issue propagates. Roughly speaking, when we train N layers, in the worst case, the conditioning of the problem can be cN times worse with a scaling factor c > 1. The analysis is similar to the one layer case, but the computation of the Hessian matrix and associated eigenvalues are much more complicated. Though our analysis is elementary, we provide an important insight and a straightforward illustration of the advantage for using the SphereConv operator. The extension to more general cases, e..g, using nonlinear activation function (e.g., ReLU), requires much more sophisticated analysis to bound the eigenvalues of Hessian for objectives, which is deferred to future investigation. 2.4 Discussion Comparison to convolutional operators. Convolutional operators compute the inner product between the kernels and the local patches, while the SphereConv operators compute a function of the angle between the kernels and local patches. If we normalize the convolutional operator in terms of both w and x, then the normalized convolutional operator is equivalent to the cosine SphereConv operator. Essentially, they use different metric spaces. Interestingly, SphereConv operators can also be interpreted as a function of the Geodesic distance on a unit hypersphere. Extension to fully connected layers. Because the fully connected layers can be viewed as a special convolution layer with the kernel size equal to the input feature map, the SphereConv operators could be easily generalized to the fully connected layers. It also indicates that SphereConv operators could be used not only to deep CNNs, but also to linear models like logistic regression, SVM, etc. 4 Network Regularization. Because the norm of weights is no longer crucial, we stop using the `2 weight decay to regularize the network. SphereNets are learned on hyperspheres, so we regularize the network based on angles instead of norms. To avoid redundant kernels, we want the kernels uniformly spaced around the hypersphere, but it is difficult to formulate such constraints. As a tradeoff, we encourage the orthogonality. Given a set of kernels W where the i-th column Wi is the weights of the i-th kernel, the network will also minimize kW > W − Ik2F where I is an identity matrix. Determining the optimal SphereConv. In practice, we could treat different types of SphereConv as a hyperparameter and use the cross validation to determine which SphereConv is the most suitable one. For sigmoid SphereConv, we could also use the cross validation to determine its hyperparameter k. In general, we need to specify a SphereConv operator before using it, but prefixing a SphereConv may not be an optimal choice (even using cross validation). What if we treat the hyperparameter k in sigmoid SphereConv as a learnable parameter and use the back-prop to learn it? Following this idea, we further extend sigmoid SphereConv to a learnable SphereConv in the next subsection. SphereConv as normalization. Because SphereConv could partially address the covariate shift, it could also serve as a normalization method similar to batch normalization. Differently, SphereConv normalizes the network in terms of feature map and kernel weights, while batch normalization is for the mini-batches. Thus they do not contradict with each other and can be used simultaneously. 2.5 Extension: Learnable SphereConv and SphereNorm Learnable SphereConv. It is a natrual idea to replace the current prefixed SphereConv with a learnable one. There will be plenty of parametrization choices for the SphereConv to be learnable, and we present a very simple learnable SphereConv operator based on the sigmoid SphereConv. Because the sigmoid SphereConv has a hyperparameter k, we could treat it as a learnable parameter that can be updated by back-prop. In back-prop, k is updated using k t+1 = k t + η ∂L ∂k where t denotes ∂L the current iteration index and ∂k can be easily computed by the chain rule. Usually, we also require k to be positive. The learning of k is in fact similar to the parameter learning in PReLU [5]. SphereNorm: hyperspherical learning as a normalization method. Similar to batch normalization (BatchNorm), we note that the hyperspherical learning can also be viewed as a way of normalization, because SphereConv constrain the output value in [−1, 1] ([0, 1] after ReLU). Different from BatchNorm, SphereNorm normalizes the network based on spatial information and the weights, so it has nothing to do with the mini-batch statistic. Because SphereNorm normalize both the input and weights, it could avoid covariate shift due to large weights and large inputs while BatchNorm could only prevent covariate shift caused by the inputs. In such sense, it will work better than BatchNorm when the batch size is small. Besides, SphereConv is more flexible in terms of design choices (e.g. linear, cosine, and sigmoid) and each may lead to different advantages. Similar to BatchNorm, we could use a rescaling strategy for the SphereNorm. Specifically, we rescale the output of SphereConv via βFs (w, x) + γ where β and γ are learned by back-prop (similar to BatchNorm, the rescaling parameters can be either learned or prefixed). In fact, SphereNorm does not contradict with the BatchNorm at all and can be used simultaneously with BatchNorm. Interestingly, we find using both is empirically better than using either one alone. 3 Learning Objective on Hyperspheres For learning on hyperspheres, we can either use the conventional loss function such as softmax loss, or use some loss functions that are tailored for the SphereConv operators. We present some possible choices for these tailored loss functions. Weight-normalized Softmax Loss. The input feature and its label are denoted as xi and yi , respec P P fy tively. The original softmax loss can be written as L = N1 i Li = N1 i − log Pe eifj where N j is the number of training samples and fj is the score of the j-th class (j ∈ [1, K], K is the number of classes). The class score vector f is usually the output of a fully connected layer W , so we have fj = Wj> xi + bj and fyi = Wy>i xi + byi in which xi , Wj , and Wyi are the i-th training sample, the j-th and yi -th column of W respectively. We can rewrite Li as  Li = − log Wy> xi +byi e P j i e Wj> xi +bj   = − log ekWyi kkxi k cos(θyi ,i )+byi P kW kkx k cos(θ )+b j i j,i j je  , (9) where θj,i (0 ≤ θj,i ≤ π) is the angle between vector Wj and xi . The decision boundary of the original softmax loss is determined by the vector f . Specifically in the binary-class case, the 5 decision boundary of the softmax loss is W1> x + b1 = W2> x + b2 . Considering the intuition of the SphereConv operators, we want to make the decision boundary only depend on the angles. To this end, we normalize the weights (kWj k = 1) and zero out the biases (bj = 0), following the intuition in [12] (sometimes we could keep the biases while data is imbalanced). The decision boundary becomes kxk cos(θ1 ) = kxk cos(θ2 ). Similar to SphereConv, we could generalize the decision boundary to kxkg(θ1 ) = kxkg(θ2 ), so the weight-normalized softmax (W-Softmax) loss can be written as  Li = − log  ekxi kg(θyi ,i ) P kx kg(θ ) , i j,i je (10) where g(·) can take the form of linear SphereConv, cosine SphereConv, or sigmoid SphereConv. Thus we also term these three difference weight-normalized loss functions as linear W-Softmax loss, cosine W-Softmax loss, and sigmoid W-Softmax loss, respectively. Generalized Angular Softmax Loss. Inspired by [12], we use a multiplicative parameter m to impose margins on hyperspheres. We propose a generalized angular softmax (GA-Softmax) loss which extends the W-Softmax loss to a loss function that favors large angular margin feature distribution. In general, the GA-Softmax loss is formulated as  Li = − log  ekxi kg(mθyi ,i ) , P ekxi kg(mθyi ,i ) + j6=yi ekxi kg(θj,i ) (11) where g(·) could also have the linear, cosine and sigmoid form, similar to the W-Softmax loss. We can see A-Softmax loss [12] is exactly the cosine GA-Softmax loss and W-Softmax loss is the special case π ], because cos(θj,i ) is only (m = 1) of GA-Sofmtax loss. Note that we usually require θj,i ∈ [0, m monotonically decreasing in [0, π]. To address this, [11, 12] construct a monotonically decreasing π function recursively using the [0, m ] part of cos(mθj,i ). Although it indeed partially addressed the issue, it may introduce a number of saddle points (w.r.t. W ) in the loss surfaces. Originally, ∂g ∂θ will be close to 0 only when θ is close to 0 and π. However, in L-Softmax [11] or A-Softmax (cosine kθ GA-Softmax), it is not the case. ∂g ∂θ will be 0 when θ = m , k = 0, · · · , m. It will possibly cause instability in training. The sigmoid GA-Softmax loss also has similar issues. However, if we use the linear GA-Softmax loss, this problem will be automatically solved and the training will possibly become more stable in practice. There will also be a lot of choices of g(·) to design a specific GA-Sofmtax loss, and each one has different optimization dynamics. The optimal one may depend on the task itself (e.g. cosine GA-Softmax has been shown effective in deep face recognition [12]). Discussion of Sphere-normalized Softmax Loss. We have also considered the sphere-normalized softmax loss (S-Softmax), which simultaneously normalizes the weights (Wj ) and the feature x. It seems to be a more natural choice than W-Softmax for the proposed SphereConv and makes the entire framework more unified. In fact, we have tried this and the empirical results are not that good, because the optimization seems to become very difficult. If we use the S-Softmax loss to train a network from scratch, we can not get reasonable results without using extra tricks, which is the reason we do not use it in this paper. For completeness, we give some discussions here. Normally, it is very difficult to make the S-Softmax loss value to be small enough, because we normalize the features to unit hypersphere. To make this loss work, we need to either normalize the feature to a value much larger than 1 (hypersphere with large radius) and then tune the learning rate or first train the network with the softmax loss from scratch and then use the S-Softmax loss for finetuning. 4 4.1 Experiments and Results Experimental Settings We will first perform comprehensive ablation study and exploratory experiments for the proposed SphereNets, and then evaluate the SphereNets on image classification. For the image classification task, we perform experiments on CIFAR10 (only with random left-right flipping), CIFAR10+ (with full data augmentation), CIFAR100 and large-scale Imagenet 2012 datasets [17]. General Settings. For CIFAR10, CIFAR10+ and CIFAR100, we follow the same settings from [7, 11]. For Imagenet 2012 dataset, we mostly follow the settings in [9]. We attach more details in Appendix B. For fairness, batch normalization and ReLU are used in all methods if not specified. All the comparisons are made to be fair. Compared CNNs have the same architecture with SphereNets. Training. Appendix A gives the network details. For CIFAR-10 and CIFAR-100, we use the ADAM, starting with the learning rate 0.001. The batch size is 128 if not specified. The learning rate is divided by 10 at 34K, 54K iterations and the training stops at 64K. For both A-Softmax and GA-Softmax loss, 6 we use m = 4. For Imagenet-2012, we use the SGD with momentum 0.9. The learning rate starts with 0.1, and is divided by 10 at 200K and 375K iterations. The training stops at 550K iteration. 4.2 Ablation Study and Exploratory Experiments We perform comprehensive Ablation and exploratory study on the SphereNet and evaluate every component individually in order to analyze its advantages. We use the 9-layer CNN as default (if not specified) and perform the image classification on CIFAR-10 without any data augmentation. SphereConv Operator / Loss Original Softmax Sigmoid (0.1) W-Softmax Sigmoid (0.3) W-Softmax Sigmoid (0.7) W-Softmax Linear W-Softmax Cosine W-Softmax A-Softmax (m=4) GA-Softmax (m=4) Sigmoid (0.1) Sigmoid (0.3) Sigmoid (0.7) Linear Cosine Original Conv 90.97 91.08 91.05 91.10 90.89 90.58 90.91 91.44 91.16 90.93 90.88 90.58 90.89 91.37 91.47 91.42 91.08 90.73 90.88 91.21 91.07 90.96 91.22 90.78 91.07 91.34 90.99 90.95 91.17 91.08 91.13 91.28 91.18 91.24 90.99 90.68 91.87 92.13 92.22 92.21 91.94 91.78 91.99 92.38 92.36 92.32 92.19 91.80 Table 1: Classification accuracy (%) with different loss functions. Comparison of different loss functions. We first evaluate all the SphereConv operators with different loss functions. All the compared SphereConv operators use the 9-layer CNN architecture in the experiment. From the results in Table 1, one can observe that the SphereConv operators consistently outperforms the original convolutional operator. For the compared loss functions except A-Softmax and GA-Softmax, the effect on accuracy seems to less crucial than the SphereConv operators, but sigmoid W-Softmax is more flexible and thus works slightly better than the others. The sigmoid SphereConv operators with a suitably chosen parameter also works better than the others. Note that, W-Softmax loss is in fact comparable to the original softmax loss, because our SphereNet optimizes angles and the W-Softmax is derived from the original softmax loss. Therefore, it is fair to compare the SphereNet with W-Softmax and CNN with softmax loss. From Table 1, we can see SphereConv operators are consistently better than the covolutional operators. While we use a large-margin loss function like the A-Softmax [12] and the proposed GA-Softmax, the accuracy can be further boosted. One may notice that A-Softmax is actually cosine GA-Softmax. The superior performance of A-Softmax with SphereNet shows that our architecture is more suitable for the learning of angular loss. Moreover, our proposed large-margin loss (linear GA-Softmax) performs the best among all these compared loss functions. Comparison of different network architectures. We are also interested in how our SphereConv operators work in different architectures. We evaluate all the proposed SphereConv operators with the same architecture of different layers and a totally different architecture (ResNet). Our baseline CNN architecture follows the design of VGG network [18] only with different convolutional layers. For fair comparison, we use cosine W-Softmax for all SphereConv operators and original softmax for original convolution operators. From the results in Table 2, one can see that SphereNets greatly outperforms the CNN baselines, usually with more than 1% improvement. While applied to ResNet, our SphereConv operators also work better than the baseline. Note that, we use the similar ResNet architecture from the CIFAR-10 experiment in [6]. We do not use data augmentation for CIFAR-10 in this experiment, so the ResNet accuracy is much lower than the reported one in [6]. Our results on different network architectures show consistent and significant improvement over CNNs. SphereConv Operator CNN-3 CNN-9 CNN-18 CNN-45 CNN-60 ResNet-32 SphereConv Operator Acc. (%) Sigmoid (0.1) Sigmoid (0.3) Sigmoid (0.7) Linear Cosine Original Conv 82.08 81.92 82.4 82.31 82.23 81.19 91.13 91.28 91.18 91.15 90.99 90.68 91.43 91.55 91.69 91.24 91.23 90.62 89.34 89.73 89.85 90.15 90.05 88.23 87.67 87.85 88.42 89.91 89.28 88.15 90.94 91.7 91.19 91.25 91.38 90.40 Sigmoid (0.1) Sigmoid (0.3) Sigmoid (0.7) Linear Cosine CNN w/o ReLU 86.29 85.67 85.51 85.34 85.25 80.73 Table 2: Classification accuracy (%) with different network architectures. Table 3: Acc. w/o ReLU. Comparison of different width (number of filters). We evaluate the SphereNet with different number of filters. Fig. 3(c) shows the convergence of different width of SphereNets. 16/32/48 means conv1.x, conv2.x and conv3.x have 16, 32 and 48 filters, respectively. One could observe that while the number of filters are small, SphereNet performs similarly to CNNs (slightly worse). However, while we increase the number of filters, the final accuracy will surpass the CNN baseline even faster and more stable convergence performance. With large width, we find that SphereNets perform consistently better than CNN baselines, showing that SphereNets can make better use of the width. Learning without ReLU. We notice that SphereConv operators are no longer a matrix multiplication, so it is essentially a non-linear function. Because the SphereConv operators already introduce certain 7 1 0.9 0.6 0.5 0.4 0.3 ResNet baseline on CIFAR10 ResNet baseline on CIFAR10+ SphereResNet (Sigmoid 0.3) on CIFAR10 SphereResNet (Sigmoid 0.3) on CIFAR10+ 0.2 0.1 0 0 1 2 3 4 Iteration 5 6 (a) ResNet vs. SphereResNet on CIFAR-10/10+ 7 x104 0.7 Testing Accuracy 0.7 0.6 0.5 CNN Baseline SphereNet (cosine) w/o orth. SphereNet (cosine) w/ orth. SphereNet (linear) w/ orth. SphereNet (Sigmoid 0.3) w/ orth. 0.4 0.3 0.2 0.1 0 1 2 3 4 Iteration 5 6 (b) CNN vs. SphereNet (orth.) on CIFAR-10 0.915 0.7 0.91 0.9 0.5 5.5 6 CNN 16/32/48 SphereNet 16/32/48 CNN 64/96/128 SphereNet 64/96/128 CNN 128/192/256 SphereNet 128/192/256 CNN 256/384/512 SphereNet 256/384/512 0.4 0.3 0.1 0.7 0.905 0.6 0.2 7 x10 4 69-layer CNN 69-layer SphereNet 0.8 0.8 0.8 Testing Accuracy Testing Accuracy 0.8 0.9 0.9 0 1 2 3 Iteration 4 5 6.5 4 x10 Testing Accuracy 1 0.9 0.6 0.5 0.4 0.3 0.2 0.1 6 0 x10 4 (c) Different width of SphereNet on CIFAR-10 0 0.5 1 1.5 2 Iteration 2.5 3 3.5 (d) Deep CNN vs. SphereNet on CIFAR-10 4 x10 4 Figure 3: Testing accuracy over iterations. (a) ResNet vs. SphereResNet. (b) Plain CNN vs. plain SphereNet. (c) Different width of SphereNet. (d) Ultra-deep plain CNN vs. ultra-deep plain SphereNet. non-linearity to the network, we evaluate how much gain will such non-linearity bring. Therefore, we remove the ReLU activation and compare our SphereNet with the CNNs without ReLU. The results are given in Table 3. All the compared methods use 18-layer CNNs (with BatchNorm). Although removing ReLU greatly reduces the classification accuracy, our SphereNet still outperforms the CNN without ReLU by a significant margin, showing its rich non-linearity and representation power. Convergence. One of the most significant advantages of SphereNet is its training stability and convergence speed. We evaluate the convergence with two different architectures: CNN-9 and ResNet-32. For fair comparison, we use the original softmax loss for all compared methods (including SphereNets). ADAM is used for the stochastic optimization and the learning rate is the same for all networks. From Fig. 3(a), the SphereResNet converges significantly faster than the original ResNet baseline in both CIFAR-10 and CIFAR-10+ and the final accuracy are also higher than the baselines. In Fig. 3(b), we evaluate the SphereNet with and without orthogonality constraints on kernel weights. With the same network architecture, SphereNet also converges much faster and performs better than the baselines. The orthogonality constraints also can bring performance gains in some cases. Generally from Fig. 3, one could also observe that the SphereNet converges fast and very stably in every case while the CNN baseline fluctuates in a relative wide range. Optimizing ultra-deep networks. Partially because of the alleviation of the covariate shift problem and the improvement of conditioning, our SphereNet is able to optimize ultra-deep neural networks without using residual units or any form of shortcuts. For SphereNets, we use the cosine SphereConv operator with the cosine W-Softmax loss. We directly optimize a very deep plain network with 69 stacked convolutional layers. From Fig. 3(d), one can see that the convergence of SphereNet is much easier than the CNN baseline and the SphereNet is able to achieve nearly 90% final accuracy. Frequency 4.3 Preliminary Study towards Learnable SphereConv Although the learnable SphereConv is not a main theme of this paper, we still run some preliminary evaluations on it. For the 0.3 proposed learnable sigmoid SphereConv, we learn the parameter conv1.1 conv2.1 k independently for each filter. It is also trivial to learn it in a conv3.1 0.2 layer-shared or network-shared fashsion. With the same 9-layer architecture used in Section 4.2, the learnable SphereConv (with 0.1 cosine W-Softmax loss) achieves 91.64% on CIFAR-10 (without 0 full data augmentation), while the best sigmoid SphereConv (with 0 0.2 0.4 0.6 0.8 1 The value of k cosine W-Softmax loss) achieves 91.22%. In Fig. 4, we also plot the frequency histogram of k in Conv1.1 (64 filters), Conv2.1 (96 Figure 4: Frequency histogram of k. filters) and Conv3.1 (128 filters) of the final learned SphereNet. From Fig. 4, we observe that each layer learns different distribution of k. The first convolutional layer (Conv1.1) tends to uniformly distribute k into a large range of values from 0 to 1, potentially extracting information from all levels of angular similarity. The fourth convolutional layer (Conv2.1) tends to learn more concentrated distribution of k than Conv1.1, while the seventh convolutional layer (Conv3.1) learns highly concentrated distribution of k which is centered around 0.8. Note that, we initialize all k with a constant 0.5 and learn them with the back-prop. 4.4 Evaluation of SphereNorm From Section 4.2, we could clearly see the convergence advantage of SphereNets. In general, we can view the SphereConv as a normalization method (comparable to batch normalization) that can be applied to all kinds of networks. This section evaluates the challenging scenarios where the minibatch size is small (results under 128 batch size could be found in Section 4.2) and we use the same 8 0.8 0.7 BatchNorm SphereNorm Rescaled SphereNorm SphereNorm w/ Orth. SphereNorm+BatchNorm 0.4 BatchNorm SphereNorm SphereNorm+BatchNorm 0.3 0.2 0 1 2 3 Iteration 4 5 (a) Mini-Batch Size = 4 6 x10 4 0.3 0.2 0.1 0.8 0.7 0.7 0.6 0.5 0.4 0.9 0.8 Testing Accuracy Testing Accuracy 0.6 0.5 0.1 Testing Accuracy 0.7 0.6 0.9 Testing Accuracy 0.9 0.8 0 1 2 3 Iteration 4 5 (b) Mini-Batch Size = 8 0.6 0.5 0.4 0.3 0.2 0.1 6 x10 4 0.5 BatchNorm SphereNorm Rescaled SphereNorm SphereNorm w/ Orth. SphereNorm+BatchNorm 0 1 2 3 Iteration 4 5 (c) Mini-Batch Size = 16 BatchNorm SphereNorm Rescaled SphereNorm SphereNorm w/ Orth. SphereNorm+BatchNorm 0.4 0.3 0.2 0.1 6 x10 4 0 1 2 3 Iteration 4 5 (d) Mini-Batch Size = 32 6 x10 4 Figure 5: Convergence under different mini-batch size on CIFAR-10 dataset (Same setting as Section 4.2). 9-layer CNN as in Section 4.2. To be simple, we use the cosine SphereConv as SphereNorm. The softmax loss is used in both CNNs and SphereNets. From Fig. 5, we could observe that SphereNorm achieves the final accuracy similar to BatchNorm, but SphereNorm converges faster and more stably. SphereNorm plus the orthogonal constraint helps convergence a little bit and rescaled SphereNorm does not seem to work well. While BatchNorm and SphereNorm are used together, we obtain the fastest convergence and the highest final accuracy, showing excellent compatibility of SphereNorm. 4.5 Image Classification on CIFAR-10+ and CIFAR-100 We first evaluate the SphereNet in a classic image classification task. We use the CIFAR-10+ and CIMethod CIFAR-10+ CIFAR-100 ELU [2] 94.16 72.34 FAR100 datasets and perform random flip (both horiFitResNet (LSUV) [14] 93.45 65.72 zontal and vertical) and random crop as data augmentaResNet-1001 [7] 95.38 77.29 tion (CIFAR-10 with full data augmentation is denoted Baseline ResNet-32 (softmax) 93.26 72.85 SphereResNet-32 (S-SW) 94.47 76.02 as CIFAR-10+). We use the ResNet-32 as a baseline arSphereResNet-32 (L-LW) 94.33 75.62 SphereResNet-32 (C-CW) 94.64 74.92 chitecture. For the SphereNet of the same architecture, SphereResNet-32 (S-G) 95.01 76.39 we evaluate sigmoid SphereConv operator (k = 0.3) with sigmoid W-Softmax (k = 0.3) loss (S-SW), lin- Table 4: Acc. (%) on CIFAR-10+ & CIFAR-100. ear SphereConv operator with linear W-Softmax loss (L-LW), cosine SphereConv operator with cosine W-Softmax loss (C-CW) and sigmoid SphereConv operator (k = 0.3) with GA-Softmax loss (S-G). In Table 4, we could see the SphereNet outperforms a lot of current state-of-the-art methods and is even comparable to the ResNet-1001 which is far deeper than ours. This experiment further validates our idea that learning on a hyperspheres constrains the parameter space to a more semantic and label-related one. Top5 Error Rate Top1 Error Rate 4.6 Large-scale Image Classification on Imagenet-2012 We evaluate SphereNets on large-scale Imagenet0.9 0.7 2012 dataset. We only use the minimum data ResNet-18 ResNet-18 SphereResNet-18-v1 SphereResNet-18-v1 0.8 0.6 augmentation strategy in the experiment (details SphereResNet-18-v2 SphereResNet-18-v2 0.7 0.5 are in Appendix B). For the ResNet-18 baseline 0.6 0.4 and SphereResNet-18, we use the same filter numbers in each layer. We develop two types of 0.5 0.3 SphereResNet-18, termed as v1 and v2 respec0.4 0.2 tively. In SphereResNet-18-v2, we do not use 0.3 0.1 0 1 2 3 4 5 0 1 2 3 4 5 SphereConv in the 1 × 1 shortcut convolutions Iteration x10 Iteration x10 which are used to match the number of channels. Figure 6: Validation error (%) on ImageNet. In SphereResNet-18-v1, we use SphereConv in the 1 × 1 shortcut convolutions. Fig. 6 shows the single crop validation error over iterations. One could observe that both SphereResNets converge much faster than the ResNet baseline, while SphereResNet18-v1 converges the fastest but yields a slightly worse yet comparable accuracy. SphereResNet-18-v2 not only converges faster than ResNet-18, but it also shows slightly better accuracy. 5 5 5 Limitations and Future Work Our work still has some limitations: (1) SphereNets have large performance gain while the network is wide enough. If the network is not wide enough, SphereNets still converge much faster but yield slightly worse (still comparable) recognition accuracy. (2) The computation complexity of each neuron is slightly higher than the CNNs. (3) SphereConvs are still mostly prefixed. Possible future work includes designing/learning a better SphereConv, efficiently computing the angles to reduce computation complexity, applications to the tasks that require fast convergence (e.g. reinforcement learning and recurrent neural networks), better angular regularization to replace orthogonality, etc. 9 Acknowledgements We thank Zhen Liu (Georgia Tech) for helping with the experiments and providing suggestions. This project was supported in part by NSF IIS-1218749, NIH BIGDATA 1R01GM108341, NSF CAREER IIS-1350983, NSF IIS-1639792 EAGER, NSF CNS-1704701, ONR N00014-15-1-2340, Intel ISTC, NVIDIA and Amazon AWS. Xingguo Li is supported by doctoral dissertation fellowship from University of Minnesota. Yan-Ming Zhang is supported by the National Natural Science Foundation of China under Grant 61773376. References [1] L-C. Chen, G. Papandreou, I. Kokkinos, K. Murphy, and A. L. Yuille. Semantic image segmentation with deep convolutional nets and fully connected crfs. In ICLR, 2015. [2] Djork-Arné Clevert, Thomas Unterthiner, and Sepp Hochreiter. Fast and accurate deep network learning by exponential linear units (elus). arXiv:1511.07289, 2015. [3] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In CVPR, 2014. [4] Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Aistats, 2010. [5] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In ICCV, 2015. [6] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. [7] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. arXiv:1603.05027, 2016. [8] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015. [9] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. [10] Xingguo Li, Zhaoran Wang, Junwei Lu, Raman Arora, Jarvis Haupt, Han Liu, and Tuo Zhao. Symmetry, saddle points, and global geometry of nonconvex matrix factorization. arXiv:1612.09296, 2016. [11] Weiyang Liu, Yandong Wen, Zhiding Yu, and Meng Yang. Large-margin softmax loss for convolutional neural networks. In ICML, 2016. [12] Weiyang Liu, Yandong Wen, Zhiding Yu, Ming Li, Bhiksha Raj, and Le Song. Sphereface: Deep hypersphere embedding for face recognition. In CVPR, 2017. [13] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In CVPR, 2015. [14] Dmytro Mishkin and Jiri Matas. All you need is a good init. arXiv:1511.06422, 2015. [15] Yuji Nakatsukasa. Eigenvalue perturbation bounds for hermitian block tridiagonal matrices. Applied Numerical Mathematics, 62(1):67–78, 2012. [16] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in neural information processing systems, pages 91–99, 2015. [17] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. IJCV, pages 1–42, 2014. 10 [18] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv:1409.1556, 2014. [19] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In CVPR, 2015. [20] Andreas Veit, Michael J Wilber, and Serge Belongie. Residual networks behave like ensembles of relatively shallow networks. In NIPS, 2016. [21] Di Xie, Jiang Xiong, and Shiliang Pu. All you need is beyond a good init: Exploring better solution for training extremely deep convolutional neural networks with orthonormality and modulation. arXiv:1703.01827, 2017. 11 A Network Architectures Layer CNN-3 CNN-9 Conv1.x Pool1 Conv2.x Pool2 Conv3.x Pool3 Fully Connected [3×3, 64]×1 [3×3, 64]×3 [3×3, 96]×1 [3×3, 96]×3 [3×3, 128]×1 [3×3, 128]×3 256 256 CNN-18 CNN-45 [3×3, 64]×6 [3×3, 64]×15 2×2 Max Pooling, Stride 2 [3×3, 96]×6 [3×3, 96]×15 2×2 Max Pooling, Stride 2 [3×3, 128]×6 [3×3, 128]×15 2×2 Max Pooling, Stride 2 256 256 CNN-60 CNN-69 [3×3, 64]×20 [3×3, 64]×23 [3×3, 96]×20 [3×3, 96]×23 [3×3, 128]×20 [3×3, 128]×23 256 256 Table 5: Our plain CNN architectures with different convolutional layers. Conv1.x, Conv2.x and Conv3.x denote convolution units that may contain multiple convolution layers. E.g., [3×3, 64]×3 denotes 3 cascaded convolution layers with 64 filters of size 3×3. Layer ResNet-32 for Section 4.2 ResNet-32 for Section 4.3 Conv0.x N/A N/A " [3×3, 64]×1 # 3 × 3, 64 ×5 3 × 3, 64 " # 3 × 3, 96 ×5 3 × 3, 96 # " 3 × 3, 128 ×5 3 × 3, 128 " [3×3, 96]×1 # 3 × 3, 96 ×5 3 × 3, 96 " # 3 × 3, 192 ×5 3 × 3, 192 # " 3 × 3, 384 ×5 3 × 3, 384 Conv1.x Conv2.x Conv3.x Conv4.x N/A N/A ResNet-18 for Section 4.6 [7×7, 256], Stride 2 3×3, Max Pooling, Stride 2 " # 3 × 3, 256 ×2 3 × 3, 256 " # 3 × 3, 512 ×2 3 × 3, 512 # " 3 × 3, 768 ×2 3 × 3, 768 " # 3 × 3, 1024 ×2 3 × 3, 1024 Average Pooling Table 6: Our ResNet architectures with different convolutional layers. Conv0.x, Conv1.x, Conv2.x, Conv3.x and Conv4.x denote convolution units that may contain multiple convolutional layers, and residual units are shown in double-column brackets. Conv1.x, Conv2.x and Conv3.x usually operate on different size feature maps. These networks are essentially the same as [6], but some may have different number of filters in each layer. The downsampling is performed by convolutions with a stride of 2. E.g., [3×3, 64]×4 denotes 4 cascaded convolution layers with 64 filters of size 3×3, and S2 denotes stride 2. B Experimental Details for Imagenet-2012 For the input data of the Imagenet-2012 experiment, we only use the minimum data augmentation. Specifically, we first resize the images to 256 × 256 resolution and then randomly crop patches of size 224 × 224 from the resized images. Besides that, we also randomly flip the image horizontally. For SphereResNet-18-v1, we use the cosine SphereConv and the cosine W-Softmax loss. For SphereResNet-18-v2, we use the cosine SphereConv and the softmax loss. Generally, we find that the standard softmax loss and all kinds of W-Softmax loss usually have similar empirical performance. Note that, we could obtain better performance by using the other SphereConvs (sigmoid SphereConv with k = 0.3 is a good choice), but it requires more GPU memory. Due to the width of our architecture and the limitation of GPU memory, the mini-batch size is set to 40 for all methods in the Imagenet-2012 experiment. C More Discussions for Sphere-normalized Softmax Loss The sphere-normalized softmax (S-Softmax) loss is essentially applying the SphereConv to the fully connected layer in the softmax loss2 . However, simply applying the SphereConv can not make such loss work, because this loss function is difficult to converge in practice. To address this, we rescale the logit output of the S-Softmax loss with a scaling factor s. Therefore, the output range is changed from [−1, 1] to [−s, s]. Typically, setting s from 10 to 70 works pretty well in practice. We could also use the cross-validation strategy to set the hyperparameter s. 2 The softmax loss is defined as the combination of the last fully connected layer, the softmax function and the cross-entropy loss. 12 D D.1 Proofs of Lemmas Proof of Lemma 1 The gradient is  ∇G(U , V ) = ∇U G(U , V ) ∇V G(U , V )   = (U V > − F )V (V U > − F > )U  The Hessian matrix is   ∇2U G(U , V ) ∇2U ,V G(U , V ) 2 ∇ G(U , V ) = ∇2V ,U G(U , V ) ∇2V G(U , V )   V > V ⊗ In (U V > − F ) ⊗ Ik + U  V = , (V U > − F > ) ⊗ Ik + V  U U > U ⊗ Im (12) where In is an n × n identity matrix for any integer n, given matrices A ∈ Rn×r and B ∈ Rm×k with A:,i denoting the i-th column of A, A  B ∈ Rnk×mr is defined as   > > > A:,1 B:,1 A:,2 B:,1 · · · A:,r B:,1 > > >   A:,1 B:,2 A:,2 B:,2 · · · A:,r B:,2   AB = . .. .. .. ..   . . . . > A:,1 B:,k > A:,2 B:,k ··· > A:,r B:,k e = cU and At a global optimum, we have U V > = F . Then it is easy to see that for any real c, if U Ve = V /c, then we have  1 >  V ⊗ In U V 2V 2 e e c ∇ G(U , V ) = V U c2 U > U ⊗ Im We have that at a global optimal point, ∇2 G(U , V ) is a positive semidefinite matrix with the smallest eigenvalue equal to 0. Specifically, due to the existence of the invariance, i.e., U V > = U R(V R)> for any orthogonal matrix R ∈ Rr×r , there are r(r − 1)/2 number of eigenvectors of ∇2 G(U , V ) at U V > = F corresponding to 0 eigenvalue [10]. Then for any c > 1, we have e , Ve )) = 1 Tr(V > V ⊗ In ) + c2 Tr(U > U ⊗ Im ) Tr(∇2 G(U c2  c2 c2 ≥ Tr(V > V ⊗ In ) + Tr(U > U ⊗ Im ) = Tr(∇2 G(U , V )). 2 2 2 e , Ve ) is on the order of Θ(c2 ) times the largest This indicates that the largest eigenvalue of ∇ G(U 2 eigenvalue of ∇ G(U , V ) following the perturbation bound analysis [15] and U and V are balanced. e , Ve ) is no greater than the smallest Using a similar idea, the smallest nonzero eigenvalue of ∇2 G(U nonzero eigenvalue of ∇2 G(U , V ), which results in our claim on the restricted condition number. D.2 Proof of Lemma 2 The gradient of GS (U , V ) is   ∇U GS (U , V ) ∇GS (U , V ) = with ∇V GS (U , V ) 3 ∇U GS (U , V ) = DU (DU U V > DV − F )DV V − DU (DU U V > DV − F ) ~k (U V > DV ) > > ∇V GS (U , V ) = DV (DV V U DU − F )DU U − DV3 > > >  U,  V, (DV V U DU − F ) ~k (V U DU ) Note that after each iteration of SGD, we perform the entry-wise normalization for both U and V , which means DU = In and DV = Im . Then the gradient of GS (U , V ) is      (U V > − F )V − (U V > − F ) ~k (U V > )  U ∇U GS (U , V ) ∇GS (U , V ) = = , ∇V GS (U , V ) (V U > − F > )U − (V U > − F > ) ~k (V U > ) V 13 where given matrices A, B ∈ Rn×m with A:,i denoting the i-th column of A, A B ∈ Rn×m is the Hadamard (pointwise) product, and the operation A ~k B ∈ Rn×k is defined as   > A1,: B1,: >   A2,: B2,:   A ~k B =   11×k , ..   . > An,: Bn,: where 11×k is a 1 × k vector with all entries equal to 1. Consequently, the Hessian matrix is   ∇2U GS (U , V ) ∇2U ,V GS (U , V ) 2 ∇ GS (U , V ) = with ∇2V ,U GS (U , V ) ∇2V GS (U , V )  ∇2U GS (U , V ) = V > V ⊗ In − diag vec (U V > − F ) ~k (U V > )  diag U:,1 (2U V > − F )V:,1 .. .  diag U:,k (2U V > − F )V:,1  −  ··· .. . ··· diag U:,1 (2U V > − F )V:,k .. .   diag U:,k (2U V > − F )V:,k    ∇2U ,V GS (U , V ) = Ik ⊗ (U V > − F ) + U  V  − (2U V > − F )  (2U V > − F ) ((U:,1 .. . ((U:,k · · · (2U V > − F ) .. . U:1 )11×m ) · · · (2U V > − F ) U:1 )11×m ) ((U:,1 .. . U:k )11×m ) ((U:,k U:k )11×m )    > ∇2V ,U GS (U , V ) = ∇2U ,V GS (U , V )  ∇2V GS (U , V ) = U > U ⊗ In − diag vec (V U > − F > ) ~k (V U > )  diag V:,1 −  diag V:,k (2V U > − F > )U:,1 .. .  · · · diag V:,1 .. .  (2V U > − F > )U:,1 · · · diag V:,k (2V U > − F > )U:,k .. .   (2V U > − F > )U:,k    e , Ve )) = λi (∇2 GS (U , V )) for all i ∈ [(n+m)k] = {1, 2, . . . , (n+m)k} Then we have λi (∇2 GS (U Ui,j Vi,j by noticing that we normalize the data as kUi,: k2 for all i ∈ [n] and kVi,: k2 for all i ∈ [m]. This finishes the proof. 14
1cs.CV
The Meaning of Memory Safety Arthur Azevedo de Amorim1 arXiv:1705.07354v2 [cs.PL] 16 Aug 2017 1 Cătălin Hrit, cu2 University of Pennsylvania Abstract—We propose a rigorous characterization of what it means for a programming language to be memory safe, capturing the intuition that memory safety supports local reasoning about state. We formalize this principle in two different ways. First, we show how a small memory-safe imperative language validates a noninterference property: parts of the state that are not reachable from a given part of the program can neither affect nor be affected by its execution. Second, we show how to take advantage of memory safety to extend separation logic, a framework for reasoning about heap-manipulating programs, with a variant of its frame rule. Our new rule is stronger because it applies even when parts of the program are buggy or malicious, but also weaker because it requires a stricter form of separation between parts of the program state. We also consider a number of pragmatically motivated variations of memory safety and the reasoning principles they support. As an application of our characterization, we evaluate the security of a previously proposed dynamic monitor for memory safety of heap-allocated data. 1 Introduction Memory safety—and the plethora of catastrophic vulnerabilities that arise in its absence [46]—are common concerns among system designers. But what is memory safety, exactly? Intuitions abound, but translating them into satisfying formal definitions is surprisingly difficult [21]. In large part, this difficulty stems from the prominent role that informal, everyday intuition assigns, in discussions of memory safety, to a range of errors related to memory misuse—buffer overruns, double frees, etc. Characterizing memory safety in terms of the absence of these errors is tempting, but this falls short for two reasons. First, there is often disagreement on which behaviors qualify as errors. For example, many real-world C programs intentionally rely on unrestricted pointer arithmetic [30], although it may yield undefined behavior according to the language standard [22, §6.5.6]. Second, from the perspective of security, the critical issue is not the errors themselves, but rather the fact that, when such errors occur in unsafe languages like C, the program’s ensuing behavior is determined by obscure, lowlevel factors such as the compiler’s choice of run-time memory layout, often leading to exploitable vulnerabilities. By contrast, in memory-safe languages such as Java, programs can still attempt to access arrays out of bounds, but such mistakes lead to sensible, predictable outcomes. 2 Benjamin C. Pierce1 Inria Paris Thus, rather than attempting a definition in terms of a list of bad things that cannot happen, we aim to formalize memory safety in terms of reasoning principles that programmers can soundly apply when coding in a memorysafe setting—or, conversely, that programmers should not naively apply in non-memory-safe settings, because doing so can lead to serious bugs and vulnerabilities. Specifically, to give a formal account of memory safety, as opposed to more inclusive terms such as “type safety,” we focus on reasoning principles that are directly related to mutable state—i.e., those that are common to a wide range of stateful abstractions, such as records, tagged or untagged unions, local variables, closures, arrays, call stacks, objects, compartments, and address spaces. What sort of reasoning principles? One source of inspiration comes from separation logic [39], a formal system for proving properties of programs that manipulate heap data structures. Like Hoare logic and related systems, separation logic manipulates program specifications of the form {p} c {q}, which roughly read as follows: if program c is run on an initial heap that satisfies precondition p, and c terminates, then the final heap satisfies postcondition q . What makes separation logic special is local reasoning about state: its proofs guarantee that programs access only a limited region of the heap described by their pre- and postconditions, while everything else is left untouched. This discipline means that we can extend a program’s specification with arbitrary invariants about the rest of the heap, as captured by a proof principle known as the frame rule {p} c {q} , {p ∗ r} c {q ∗ r} where p ∗ r is the so-called separating conjunction of the assertions p and r. The rule can be read as follows: “Suppose c satisfies the specification {p} c {q}—that is, if it is started in a state where some part of the heap satisfies p, and c terminates, then this part of the heap satisfies q . Then, if c is started in an initial heap where some part satisfies p and a disjoint part of the heap satisfies an arbitrary assertion r, this second part will still satisfy r after c.” The locality discipline imposed by separation logic is closely related to typical guidelines for memory-safe programming such as avoiding out-of-bounds accesses, because both restrict the potential effects of each piece of code to a clearly delimited part of the heap. For example, if a jpeg decoding subroutine is free of memory-safety violations and we can see from the program text that it only has access to the input and output image buffers, we know that the decoder cannot tamper with other parts of the state. We can express such program constraints as specifications in separation logic. For example, a simple specification of the jpeg decoder might be {p} decoder {true}, where p is a separation-logic assertion saying that the variables in and out point to heap-allocated arrays of appropriate size. This specification is quite loose, in that it does not guarantee that the contents of the output buffer after running decoder bear any particular relation to the contents of in beforehand; however, it does imply that, whatever decoder does, it only affects the part of the heap described by p. This means that we can apply the frame rule to reason about the decoder’s potential effects on the rest of the heap. For example, if the next step after decoding is to render the contents of the output buffer into a window object, and if this window object is disjoint from the in and out buffers, then the frame rule tells us that running decoder will not affect the well-formedness of the window object. The frame rule thus embodies a fundamental reasoning principle associated with memory-safe programs. An inherent characteristic of standard separation logic is that safety is enforced manually: the program correctness proof must show that each memory operation accesses only the local state as described by its pre- and postconditions. This is what makes separation logic useful for modular reasoning in unsafe settings such as C: although any part of a C program could, in principle, access any part of the state, we can still reason locally about memory-safe programs. However, pervasive manual verification of the safety of every memory access seems prohibitively expensive for large code bases—especially in the presence of third-party libraries or plugins, over which we have little control. In a setting where memory safety is enforced automatically, we can do much better. Suppose that the jpeg decoder above is a library written in Java. Even though we may not know anything precise about its input-output behavior, we can still correctly reason that running it cannot have any effect on a window object that it cannot reference. A simple reachability check showing that the window object is inaccessible replaces the detailed reasoning about individual memory operations demanded by separation logic. Our aim in this paper is to formalize this kind of reasoning. complementary strengths and weaknesses: while the original rule applies to unsafe settings like C, but requires comprehensively verifying individual memory accesses, our variant does not require proving that every access is correct, but demands a stronger notion of separation between parts of the program state. These results have been verified with the Coq proof assistant; our machine checked proofs are available at: https://github.com/arthuraa/memory-safe-language Our second contribution (§4) is to evaluate pragmatically motivated relaxations of the ideal notion of memory safety discussed above. These models differ from the ideal one by exploring various trade-offs between safety, performance, flexibility, and backwards compatibility, or by taking physical aspects such as time into account. We argue that these variants can be broadly classified into two groups according to reasoning principles they support. The stronger group gives up on some secrecy guarantees provided by memory safety, but still ensures that pieces of code cannot modify the contents of parts of the heap they do not have permission to access with their pointers. The weaker group, on the other hand, leaves gaps that completely invalidate reachabilitybased reasoning. Our third contribution (§5) is to demonstrate how our characterization can apply to more realistic settings, by analyzing the security of a recently proposed dynamic monitor enforcing heap memory safety for low-level code [16], [6]. We prove that the abstract machine modeling the monitor satisfies a noninterference property similar to the one we show for the language of §2; then since the monitor is a valid implementation of the abstract machine, it inherits this noninterference property, modulo memory exhaustion issues discussed in §4. These proofs are also done in Coq and are available at: https://github.com/micro-policies/ micro-policies-coq/tree/master/memory safety We discuss related work on memory safety and stronger reasoning principles for similar enforcement mechanisms in §6, and conclude in §7. While memory safety has been formally investigated in the past (e.g. [33], [44]), our characterization is the first phrased in terms of reasoning principles that are valid when memory safety is enforced automatically. We thus hope that these reasoning principles can serve as good criteria for formally evaluating practical mechanisms for enforcing memory safety. Moreover, our definition is directly targeted at memory safety and does not rely on additional features such as full-blown capabilities, closures, objects, module systems, etc. Since these features tend to depend on some form of memory safety anyway, we could see our characterization as a common core of reasoning principles that underpin all of them. Our first contribution is to formalize local reasoning principles that are valid for an ideal notion of memory safety, using a concrete imperative language as the basis of our discussion (introduced in §2). We show three frame theorems (Theorems 3.1, 3.3 and 3.4) that explain how the execution of a piece of code is affected by extending the heap on which it starts running. We use these results to derive a noninterference property (Corollary 3.5), guaranteeing that code cannot affect or be affected by regions of memory that it does not have the capability to access through the pointers it possesses. In §3.4, we show how these results yield a variant of the original frame rule of separation logic (Theorem 3.7). The two variants have 2 An Idealized Memory-Safe Language Our discussion of memory safety begins with a concrete case study: a simple imperative language with manual memory management. It features several mechanisms for controlling the effects of memory misuse, ranging from the most conventional, such as bounds checking for spatial safety, to 2 Command x←e x ← [e] [e1 ] ← e2 x ← alloc(e) free(e) skip if e then c1 else c2 while e do c end c1 ; c2 nents: a local store, which maps program variables to values, and a heap, which maps pointers to values (Figure 2). Pointers are not bare integers, but rather pairs (i, n) of a block identifier i ∈ I and an offset n ∈ Z. The offset is relative to the corresponding block, and the identifier i need not bear any direct relation to the physical address that might be used in a concrete implementation of this language on a conventional flat-memory machine. (That is, we can equivalently think of the heap as a map associating each block identifier with a separate array of heap cells.) Similar structured memory models are widely used in the literature, as in the CompCert verified C compiler [28], for instance. We write JcK(s) to denote the outcome of running a program c in an initial state s; this outcome can be either a successful final state s0 or a fatal run-time error. Note that JcK is partial, to account for non-terminating computations. Similarly, JeK(s) denotes the value resulting from evaluating the expression e on the state s, where expression evaluation is total and has no side effects. The formal definition of these functions is left to the Appendix; we just single out here a few aspects that will have a crucial effect on the security properties discussed later. Description Assign to local variable Read from heap location Assign to heap location Allocate heap block of size e Free block starting at e Do nothing Conditional Loop Sequencing Figure 1. Syntax s∈S ,L×M l ∈ L , var *fin V (states) (local stores) m ∈ M , I × Z *fin V (heaps) v ∈ V , Z ] B ] {nil} ] I × Z O , S ] {error} (values) (outcomes) I , some countably infinite set Illegal Memory Accesses Lead to Errors The language controls the effect of various kinds of memory misuse by treating them as run-time errors that stop execution as soon as they occur. This contrasts with typical C implementations, where such errors lead to unpredictable undefined behavior in compiled code. The main errors are caused by reads, writes, and frees to the current memory m using invalid pointers—that is, pointers p such that m(p) is undefined. Such pointers typically arise either by offsetting an existing pointer outside its bounds or by freeing a structure on the heap (which turns all other pointers to that block in the program state into dangling ones). In common parlance, this discipline ensures both spatial and temporal memory safety. X *fin Y , partial functions X * Y with finite domain Figure 2. Program states and values. more uncommon ones, such as assigning unique identifiers to every allocated block for ensuring temporal safety. Choosing a language with manual memory management may appear odd, given that memory safety is often associated with garbage collection. We made this choice for two reasons. First, most of the discussion on memory safety is motivated by its absence from low-level languages like C that also rely on manual memory management. There is a vast body of research that tries to reconcile such languages with memory safety, and, as stated earlier, we hope that our account can help inform it. Second, we wanted to stress that our characterization does not depend fundamentally on the mechanisms used to enforce memory safety, especially because they might have complementary advantages and shortcomings. For example, manual memory management as done in C can lead to more memory leaks; running with a garbage collector might result in slow, unpredictable performance; and specialized type systems for managing memory [44], [40] are more complex. We begin by giving a brief overview of the language and its semantics. In §3, we will explore the reasoning principles enabled by its safety. 2.1 Block Identifiers are Capabilities Pointers can only be used to access memory corresponding to their block identifiers, which effectively act as capabilities. Block identifiers are set at allocation time, where they are chosen to be fresh with respect to the entire current state (i.e., the new block identifier is not associated with any pointers defined in the current memory, stored in local variables, or stored on the heap). Once assigned, identifiers are immutable, making it impossible to fabricate a pointer to an allocated block out of thin air. This can be seen, for instance, in the semantics of addition and subtraction, which allow pointer arithmetic but do not affect identifiers:   n1 + n2 if Jei K(s) = ni   (i, n + n ) if Je K(s) = (i, n ) 1 2 1 1 Je1 + e2 K(s) ,  and Je K(s) = n 2 2   nil otherwise Language Overview The syntax is summarized in Figure 1. Expressions e include variables x ∈ var, numbers n ∈ Z, Booleans b ∈ B, an invalid pointer nil, and various operations, both binary (arithmetic, logic, etc.) and unary (extracting the offset of a pointer). We write [e] for dereferencing the pointer e. Programs operate on states consisting of two compo- For simplicity, we stipulate that nonsensical combinations, such adding two pointers together, simply result in the nil value. A real implementation might represent block identifiers with hardware tags and use a monotonically increasing 3 We write blocks(s) for the set of block identifiers defined in the memory of s: counter to generate identifiers for new blocks (as done by Dhawan et al. [16]; see §5.1); if enough tags are available, we can assume that every identifier will be fresh. blocks(l, m) , {i ∈ I | ∃n, (i, n) ∈ dom(m)} Block Identifiers Cannot be Observed Because of the freshness condition above, block identifiers can reveal information about the entire program state. For example, if they are chosen according to a monotonic counter, knowing what identifier was assigned to a new block allows us to deduce how many allocations have been performed. A concrete implementation would encounter similar issues related to the choice of physical addresses where new blocks are allocated. (Such issues are commonplace in systems that combine dynamic allocation and information-flow control [13].) For this reason, our language keeps identifiers opaque and inaccessible to programs; they can only be used to reference values in memory, and nothing else. We discuss a more permissive approach and its consequences in §4.2. Note that hiding block identifiers doesn’t mean we have to hide everything associated with a pointer: besides using pointers to access memory, programs can also safely extract their offsets and test if two pointers are equal (which only happens if both their offsets and block identifiers are equal). Our Coq development shows that it is also sound to access the size of a memory block via a valid pointer. We write ids(s) for the set of block identifiers appearing somewhere in s: ids(l, m) , blocks(l, m) ∪ {i | ∃x, n, l(x) = (i, n)} ∪ {i | ∃p, n, m(p) = (i, n)} We write vars(s) for the set of local variables defined in the state s, vars(l, m) , dom(l), and vars(c) for the set of local variables that occur in the program c. A permutation (of block identifiers) is a function π : I → I that has a two-sided inverse π −1 ; that is, π ◦ π −1 = π −1 ◦ π = idI . Given a permutation π and a state s, we define a new state π · s that is like s except that all of its identifiers are renamed by π . The definition of this renaming operation is straightforward.1 Finally, we write X # Y to indicate that sets X and Y are disjoint: X ∩ Y = ∅. New Memory is Always Initialized Whenever a memory block is allocated, all of its contents are initialized to 0. (The exact value does not matter, as long it is some constant that is not a previously allocated pointer.) This is important for ensuring that allocation does not leak secrets present in previously freed blocks; we return to this point in §4.3. 3 3.2 The first frame theorem states that, if a program terminates successfully when run on some initial state, then we can extend that initial state without affecting execution. Theorem 3.1 (Frame OK). Suppose that JcK(s1 ) = s01 , that vars(c) ⊆ vars(s1 ), and that blocks(s1 ) # blocks(s2 ). Then there exists a permutation π such that Reasoning with Memory Safety With this language definition in hand, we now turn to the local reasoning principles that it supports. Intuitively, these principles allow us to analyze the effect of a piece of code by restricting our attention to a smaller portion of the program state. A first set of frame theorems (3.1, 3.3, and 3.4) describes how the execution of a piece of code is affected by extending the initial state on which it runs. These in turn imply a noninterference property, Corollary 3.5, guaranteeing that program execution is independent of inaccessible memory regions—that is, those that correspond to block identifiers that a piece of code does not possess. Finally, in §3.4, we discuss how the frame theorems can be recast in the language of separation logic, leading to a new variant of its frame rule (Theorem 3.7). 3.1 Basic Properties of Memory Safety JcK(s1 ∪ s2 ) = π · s01 ∪ s2 blocks(π · s01 ) # blocks(s2 ). The second premise, vars(c) ⊆ vars(s1 ), guarantees that all the variables needed to run c are already defined in s1 , implying that their values do not change once we extend that initial state with s2 . The third premise, blocks(s1 ) # blocks(s2 ), means that the memories of s1 and s2 store disjoint regions. Finally, the conclusion of the theorem states that (1) the execution of c does not affect the extra state s2 and (2) the rest of the result is almost the same as s01 , except for a permutation of block identifiers. Permutations are needed to avoid clashes between block identifiers in s2 and those assigned to regions allocated by c when running on s1 . For instance, suppose that the execution of c on s1 allocated a new block, and that this block was assigned some identifier i ∈ I. If the memory of s2 already had a block corresponding to i, c would have to choose a different identifier i0 for allocating that block when running on s1 ∪ s2 . This change requires replacing all occurrences of i by i0 in the result of the first execution, Preliminaries If s1 = (l1 , m1 ) and s2 = (l2 , m2 ) are program states, we define a new state s1 ∪ s2 by taking the pointwise union s1 ∪ s2 = (l1 , m1 ) ∪ (l2 , m2 ) , (l1 ∪ l2 , m1 ∪ m2 ), where the (left-biased) union of finite partial functions is ( f (x) if x ∈ dom(f ) (f ∪ g)(x) , g(x) otherwise; 1. It can be derived formally by viewing S as a nominal set over I [36], [37] obtained by combining products, disjoint unions, and partial functions. 4 which can be achieved with a permutation that swaps these two identifiers.2 The proof of Theorem 3.1 relies crucially on the facts that programs cannot inspect block identifiers, that memory can grow indefinitely (a common assumption in formal models of memory), and that memory operations only succeed on valid pointers. Because of the renaming of identifiers, we also need the following result, which shows that the exact choice of block identifiers does not matter. Formally, if we permute the initial state s of a command c with any permutation π , we obtain the same outcome, up to some additional permutation π 0 that again accounts for different choices of fresh identifiers. have no effect on its high-integrity outputs. In fact, both guarantees apply to unreachable memory in our language: the execution of a piece of code is independent of memory regions that were already allocated when it started executing but that it cannot access (because they are associated with block identifiers that it does not possess). By “independent,” we mean that the piece of code (1) cannot modify these inaccessible regions (preserving their integrity), and (2) cannot learn anything meaningful about these regions, not even their presence (preserving their secrecy). Corollary 3.5 (Noninterference). Let s1 , s21 , and s22 be states and c a program. Suppose that vars(c) ⊆ vars(s1 ), that ids(s1 ) # blocks(s21 ) and ids(s1 ) # blocks(s22 ). When running c on the extended states s1 ∪ s21 and s1 ∪ s22 , there is only one of the following three possibilities: • Both executions loop: JcK(s1 ∪ s21 )=JcK(s1 ∪ s22 )=⊥; • both executions terminate with an error: JcK(s1 ∪ s21 ) = JcK(s1 ∪ s22 ) = error; or • both executions successfully terminate without interfering with the inaccessible portions s21 and s22 . Formally, there exists a state s01 and permutations π1 and π2 such that JcK(s1 ∪ s2i ) = πi · s01 ∪ s2i and ids(πi · s01 ) # blocks(s2i ), for i = 1, 2. Theorem 3.2 (Renaming states). Let s be a state, c a command, and π a permutation. There exists π 0 such that:   if JcK(s) = error error JcK(π · s) = ⊥ if JcK(s) = ⊥  π 0 · π · s0 if JcK(s) = s0 A similar line of reasoning yields a second frame theorem, which says that we cannot make a non-terminating execution into a terminating one by extending its initial state. Theorem 3.3 (Frame Loop). Suppose JcK(s1 ) = ⊥, that vars(c) ⊆ vars(s1 ), and that blocks(s1 ) # blocks(s2 ). Then JcK(s1 ∪ s2 ) = ⊥. Proof. Consider the result of executing c on s1 . If JcK(s1 ) = ⊥, we apply Theorem 3.3 twice using s21 and s22 as the unreachable states (recall that ids(s1 ) # blocks(s2i ) implies blocks(s1 ) # blocks(s2i )). If JcK(s1 ) = error, it suffices to apply Theorem 3.4 twice. And finally, if JcK(s1 ) = s01 , we just apply Theorem 3.1 twice. The third frame theorem shows that extending the initial state also preserves erroneous executions. Its statement is similar to the previous ones, but with a subtle twist. In general by extending the state of a program with a new block, we might turn an erroneous execution into a successful one—if the error was caused by accessing a pointer whose identifier matches that new block. To avoid this, we need a different premise (ids(s1 ) # blocks(s2 )) preventing any pointers in the original state s1 from referencing the new blocks in s2 —which is only useful because our language prevents programs from forging pointers to existing regions. Since blocks(s) ⊆ ids(s), this premise is stronger than the analogous ones in the preceding results. Noninterference is often formulated in terms of an indistinguishability relation on program states, which expresses that one state can be obtained from the other by varying its secrets. We could have equivalently phrased the above result in a similar way. Recall that the hypothesis ids(s1 ) # blocks(s2 ) means that memory regions stored in s2 are unreachable via s1 . Then, we could call two states “indistinguishable” if the reachable portions are the same (except for a possible renaming of block identifiers). In §4, we will see that the connection with noninterference provides a good benchmark for comparing different flavors of memory safety. Theorem 3.4 (Frame Error). Suppose that JcK(s1 ) = error, vars(c) ⊆ vars(s1 ), and ids(s1 ) # blocks(s2 ). Then JcK(s1 ∪ s2 ) = error. 3.3 3.4 Memory Safety and Noninterference Memory Safety and Separation Logic We now explore the close connection between the principles identified above, especially with respect to integrity, and the local reasoning facilities of separation logic. In separation logic, we are interested in proving specifications of the form {p} c {q}, where p and q are predicates over program states (subsets of S ). For our language, the meaning of such a {p} c {q} specification could be roughly stated as The consequences of memory safety we have analyzed so far are intimately tied to the notion of noninterference [20] used in information-flow control. In its most widely understood sense, noninterference is a secrecy guarantee: varying the secret inputs of a computation has no effect on its public outputs. Sometimes, however, it is also used to describe integrity guarantees: low-integrity inputs to a computation ∀s ∈ p, vars(c) ⊆ vars(s) ⇒ JcK(s) ∈ q ∪ {⊥}. 2. It would have been possible to use arbitrary functions from identifiers to identifiers, instead of permutations; however, this would complicate some of the statements, since we would have to prevent different identifiers from aliasing after a renaming. Similar issues motivated the use of permutations in the theory of nominal sets [36]. That is, if we start c in a state satisfying p, then the program will either diverge or terminate in a final state that satisfies q , but it will not trigger a run-time error. Part of the motivation 5 becomes sound, since the true postcondition now means that any outcome whatsoever is acceptable. Unfortunately, there is a price to pay for allowing errors: they compromise the soundness of the frame rule. The reason, intuitively, is that preventing run-time errors has an additional purpose in separation logic: it forces programs to act locally—that is, to access only the parts of the heap that are described by their pre- and postconditions. To see why, consider the same program c as above, x ← [y]. This program clearly yields an error when run on an empty heap, implying that the triple for precluding errors is that in unsafe settings like C they yield undefined behavior, destroying all hope of verification. The power of separation logic for local reasoning and modular verification comes from the frame rule, a consequence of Theorems 3.1 and 3.3. The rule intuitively says that a verified program can only affect a well-defined portion of the state, with all other memory regions left untouched.3 Theorem 3.6. Let p, q , and r be predicates over states and c be a command. Suppose that ∀l1 l2 m, (∀x ∈ / modvars(c), l1 (x) = l2 (x)) ⇒ (l1 , m) ∈ r ⇒ (l2 , m) ∈ r, {emp} c {x = 0}e is valid, where the predicate emp holds of any state with an empty heap and x = 0 holds of states whose local store maps x to 0. Now consider what happens if we try to apply an analog of the frame rule to this triple using the frame predicate y 7→ 1, which holds in states where y contains a pointer to the unique defined location on the heap, which stores the value 1. After some simplification, we arrive at the specification where modvars(c) is the set of all variables that appear in c as the destination of some assignment. (In other words, suppose that r does not depend on the local variables modified by c.) Then, the following rule is sound {p} c {q} F RAME {p ∗ r} c {q ∗ r} where p ∗ r denotes the separating conjunction of p and r—the predicate over states defined as {y 7→ 1} c {x = 0 ∧ y 7→ 1}e , {(l, m1 ∪ m2 ) | (l, m1 ) ∈ p, (l, m2 ) ∈ r, blocks(l, m1 ) # blocks(l, m2 )}. which clearly does not hold, since executing c on a state satisfying the precondition leads to a successful final state mapping x to 1. To salvage the frame rule, we need to adapt it to take errors into account. Fortunately, the reachability properties of memory safety provide a solution: instead of enforcing locality by preventing errors, we can take advantage of the fact that memory operations in a memory-safe language are automatically local—in particular, local to the block identifiers that the program possesses. Separation-logic specifications require that executions terminate successfully (and satisfy the postcondition) or diverge—memory errors are completely ruled out by proof. However, this makes it difficult to use separation logic for partial verification: proving any property, no matter how simple, of a nontrivial program requires detailed reasoning about its internals. Even the following seemingly vacuous rule is unsound in separation logic: {p} c {true} Theorem 3.7. Under the same assumptions as Theorem 3.6, the following rule is sound TAUT {p} c {q}e S AFE F RAME {p . r} c {q . r}e For a counterexample, take p to be true and c to be some arbitrary memory read x ← [y]. If we run this program on an empty heap, which trivially satisfies the precondition, we obtain an error, contradicting the meaning of the triple. Fortunately, in our memory-safe language—in which errorshave a sensible, predictable semantics, as opposed to wild undefined behavior—we can formulate a variant of separation logic that allows looser specifications. We now consider specifications of the form {p} c {q}e , defined as where p . r denotes the isolating conjunction of p and r, defined as {(l, m1 ∪ m2 ) | (l, m1 ) ∈ p, (l, m2 ) ∈ r, ids(l, m1 ) # blocks(l, m2 )}. Intuitively, the isolating conjunction guarantees that the heap fragment satisfying r is unreachable from the rest of the program state. The proof is very similar to the one for the original frame rule, but it relies on Theorem 3.4 in addition to Theorems 3.1 and 3.3 (which is the reason why the separating conjunction is not enough). ∀s ∈ p, vars(c) ⊆ vars(s) ⇒ JcK(s) ∈ q ∪ {⊥, error}. These specifications are weaker than their conventional counterparts presented above, leading to a subsumption rule: {p} c {q} {p} c {q}e 3.5 Because errors are no longer prevented, the TAUT rule {p} c {true}e Discussion As hinted by their connection with the frame rule, the frame theorems of §3.2 can themselves be considered as a form of local reasoning: to reason about a command, it suffices to restrict attention to the parts of the state that it can reach. Furthermore, the only thing we have to do is to calculate what this reachable portion is; how the program uses it is not TAUT 3. Technically, the proof of the frame rule requires a slightly stronger notion of specification, accounting for permutations of allocated identifiers; our Coq development has a more precise statement. 6 important. In a more realistic language, reachability might be inferred automatically from additional information such as typing. But even here it can probably be accomplished by a simple check of the program text. For example, consider the hypothetical jpeg decoder from §1. As discussed there, we would like to guarantee that the decoder cannot tamper with an object that it cannot reference—a window object, a whitelist of trusted websites, etc. The frame theorems give us a means to do so, provided that we are able to show that the object is indeed unreachable. The noninterference result additionally implies that the jpeg decoder cannot directly extract any information from these unreachable objects, such as passwords or private keys. Many real-world attacks involve direct violations of the reasoning principles we have articulated. For example, consider the infamous Heartbleed attack on OpenSSL [17], which used out-of-bounds reads from a buffer to leak data from completely unrelated parts of the program state— potentially stealing sensitive information like private keys. Given that the code fragment that enabled that attack was just manipulating an innocuous array, a programmer could easily be fooled into believing (as probably many have) that that snippet could not possibly access sensitive information, allowing that vulnerability to remain unnoticed for years. Finally, our new frame rule only captures the fact that a command cannot influence the heap locations that it cannot reach, while our noninterference result (Corollary 3.5) captures not just this integrity aspect of memory safety, but also a secrecy aspect. We hope that future research will explore the connection between the secrecy aspect of memory safety and (relational) program logics. 4 reasoning principles and security guarantees of §3. Some relaxations, such as allowing pointers to be forged out of thin air, completely give up on the strong reachabilitybased reasoning we proposed above. Others, however, retain strong reasoning principles for integrity while giving up on some secrecy, allowing aspects of the global state of a program to be observed. For example, a system with finite memory (§4.5) may leak some information about its total memory consumption, and a system that allows pointer-to-integer casts (§4.2) may leak information about its memory layout. Naturally, the distinction between integrity and secrecy should be taken with a grain of salt, since the former depends on the latter in many practical situations; for example, if a system grants privileges to change the state of some component when accessed with the right password, a secrecy violation can be escalated to an integrity violation! 4.1 Forging Pointers Many real-world C programs rely on using integers as pointers. If this idiom is permitted without restrictions, then robust local reasoning is compromised, since every part of memory might be reachable by any part of the program. It is thus not surprising that systems that strive for memory safety either prevent this kind of pointer forging or else restrict it to well-delimited unsafe fragments. More insidiously, and perhaps surprisingly, similar dangers also lurk in the stateful abstractions even of some systems that are widely regarded as “memory safe.” In JavaScript, for example, it is possible for code to access arbitrary global variables by indexing an associative array with a string, a feature that enables many serious attacks [1], [19], [47], [31]. One might argue that global variables in JavaScript are “memory unsafe” because they fail to validate local reasoning: the fact that a particular part of a JavaScript program does not explicitly mention a given global variable does not imply that running this code cannot change this variable or the things it points to. Re-enabling local reasoning requires imposing very strong restrictions on the allowed programming style [10], [1], [19]. Relaxing Memory Safety So much for formalism. What about reality? Strictly speaking, the strong security properties we have formulated above do not hold in any real system. This is partly due to fundamental physical limitations—real systems run with finite memory, and they interact with their users in various ways that transcend inputs and outputs, notably through time. A more interesting reason is that real systems typically do not impose all the restrictions we have relied on for the proofs of these properties. Languages that aim to be memory safe generally offer relatively benign glimpses of their implementation details (such as being able to read the previous contents of uninitialized memory, compare pointers with ≤, or extract physical addresses from pointers) in return for significant performance or flexibility gains in some situations. In other systems, the concessions are more fundamental, to the extent that it is harder to clearly delimit what part of a program is unsafe: the SoftBound transformation [33], for example, adds spatial memory-safety checks for C programs, but does not provide protection against bugs caused by erroneous uses of free by itself; a related transformation, CETS [34], is required to enforce temporal memory safety. In this section, we enumerate some common relaxed models of memory safety and evaluate how they affect the 4.2 Observing Pointers The language of §2 maintains a complete separation between pointers and other kinds of values. In real systems, this separation is often only enforced in one direction. For example, some tools for enforcing memory safety of C programs [33], [14] allow pointer-to-integer casts [25], a feature required by many low-level C idioms [11], [30]. Additionally, languages considered as memory safe often include features that break this separation—e.g., the default implementation of hashCode() in Java. To model such features, we can extend the syntax of expressions with a cast operator e ::= · · · | cast(e) | · · · and assume that we have some function JcastK : I × Z → Z for converting a pointer to an integer, which we use to define 7 the semantics of cast: Jcast(e)K(s) = JcastK(JeK(s)) and block identifiers into account to test if two pointers are equal. For performance reasons, we could have chosen a different design that only compares pointers using their physical addresses at run time, completely discarding block identifiers. If attackers know the physical address of a pointer that they own—which could happen, for instance, if they know that pointer was the first to be allocated, and know enough about the implementation of the allocator to determine where that pointer will live—they can use pointer arithmetic (which is generally harmless and allowed in our language) to discover the address of other pointers. If x holds the pointer they control, they can run, for instance, if JeK(s) ∈ I × Z Note that the language we introduced originally included an offset operator for extracting the offset of a pointer. Their definitions are similar, but have crucially different consequences: while offset does not depend on the block identifier, allocation order, or other low-level details of the language implementation (such as the choice of physical addresses when allocating a block), all of these could be relevant when defining the semantics of cast. The three frame theorems (3.1, 3.3, and 3.4) are thus lost, because the state of unreachable parts of the heap may influence integers observed by the program. An important consequence is that the secrecy is weakened in this language: an attacker could exploit pointers as a side-channel to learn secrets about data it doesn’t have direct access to. Nevertheless, we can still guarantee the integrity of unreachable parts of the program state: if a program does not hold any pointers to an allocated block, the contents of that block will not change at the end of the execution. (This result was also proved in Coq.) y ← alloc(1); if x + 1729 = y then . . . else . . . , to learn the location of the new pointer assigned to y , and thus draw conclusions about the global state of the program. 4.3 Uninitialized Memory Traditionally, memory-safe languages require variables and objects to be initialized before they are used. But this can degrade performance for some applications, leading many systems to drop this feature—including not only standard implementations of C, but also implementations that provide some memory-safety guarantees [33], [14]. Even languages that emphasize safety allow access to uninitialized memory in some cases—e.g., OCaml’s Bytes.create primitive, Node.js’s Buffer.allocUnsafe. The problem with uninitialized memory is that it breaks the abstraction of the program state as consisting solely of the local variables and allocated objects: the entire memory becomes relevant to the execution of a program, and reasoning locally becomes much harder. By inspecting old values living in uninitialized memory, an attacker can learn about parts of the program state they shouldn’t have access to, a direct violation of secrecy. This issue would become even more severe in a hypothetical system that allowed old pointers or other capabilities to occur in reallocated memory in a way that the program can use, since they could yield access to restricted resources directly, leading to potential integrity violations as well. (The two examples given above—OCaml’s Bytes.create primitive and Node.js’s Buffer.allocUnsafe—do not suffer from this issue, because any preexisting pointers in re-allocated memory are treated as bare bytes that cannot be used to access memory.) Theorem 4.1 (Integrity-only Noninterference). Let s1 , s2 , and s0 be states and c a command such that vars(c) ⊆ vars(s1 ), ids(s1 ) # blocks(s2 ), and JcK(s1 ∪ s2 ) = s0 . Then we can find s01 ∈ S such that s0 = s01 ∪ s2 and ids(s01 ) # blocks(s2 ). The crucial difference between this and the stronger noninterference result of Corollary 3.5 is that, if pointerto-integer casts are prohibited, we know that changing the contents of the unreachable portion s2 has no effect on the reachable portion, s01 . If these casts are allowed, then changing s2 can influence s01 in arbitrary ways: not only can the contents of this final state change, but the execution can also loop forever or terminate in an error. To understand why this is the case, consider the jpeg decoder of §1. Suppose that the decoder is being used inside of a web browser, but that it does not have the required pointers to learn the address that the user is currently visiting. Suppose that there is some relation between the memory consumption of the program and that website, and that there is some correlation between the memory consumption and the identifier assigned to a new block. Then, by allocating a new block and converting it to a integer, the decoder might be able to infer useful information about the website that the user is visiting [23]. Thus, if s2 denoted the part of the browser’s state responsible for storing that location, changing its contents would have a nontrivial effect on s01 , the part of the state that the decoder does have access to. We could speculate that, in a reasonable system, this channel can only reveal information about the layout of unreachable regions, and not their contents. Indeed, we conjecture this for the variant of our language considered in this sub-section. Finally, it is worth mentioning that simply excluding the cast operation from the language might not be enough for preventing this sort of secrecy violations in practice. For instance, recall that our language takes both offsets 4.4 Dangling Pointers and Freshness Another crucial issue is the treatment of dangling pointers— those that reference objects that have already been freed. Dangling pointers are problematic because there is an inherent tension between giving them a sensible semantics (for instance, one that validates the properties of §3) and obtaining good performance and predictability. Languages with garbage collection avoid the issue by ensuring that dangling pointers never occur—heap storage is freed only when there are no pointers to it left. In the simple language from §2, besides giving a well-defined behavior to the use of dangling pointers (aborting execution with an error), we 8 imposed strong freshness requirements in the allocation rule, mandating not only that the identifier assigned to the new block not correspond to any existing block, but also that it not be present anywhere else in the program state. To see how the results of §3 are affected in a setting where freshness is not enforced, consider the program entire state of the program—not just its reachable portions. How problematic this is in practice, however, will depend on the particular system under consideration. A potential solution is to force programs that run out of memory to terminate immediately—for example, by making alloc in our language cause an execution error if an outOfMemory predicate holds of the current program state. Though this choice might be bad from an availability standpoint, it is probably the most benign in terms of secrecy. We should be able to prove an error-insensitive variant of Corollary 3.5, where the only significant interaction that unreachable memory can have with a piece of code is to turn a successful execution or infinite loop into an error, or vice versa. Similar issues arise for information-flow mechanisms that often cannot prevent secrets from influencing the termination behavior of programs, leading to terminationinsensitive notions of noninterference. Unfortunately, even an error-insensitive result might be too strong for real systems, which often make it possible for attackers to extract multiple bits of information about the global state of the program—something that had already been noted in the information-flow literature [5]. Java, for example, does not force termination when memory runs out, but triggers an exception that can be caught and handled by user code, which is then free to record the event and probe the allocator with a different test. And most languages do not operate in batch mode like ours does, merely producing a single answer at the end of execution; rather, their programs continuously interact with their environment through inputs and outputs, allowing them to communicate the exact amount of memory that caused an error. This discussion suggests that, if size vulnerabilities are a real concern for a system, they need to be treated with special care. One approach would be to use a mechanism to limit the amount of memory an untrusted component can allocate [50], so that exhausting the memory allotted to that component doesn’t reveal information about the state of the rest of the system (and so that also global denial-of-service attacks are prevented). A more speculative idea is to develop quantitative versions [42], [7] of the noninterference results discussed here, allowing us to analyze the behavior of a program on an extended state only if the total memory used by the program is below a certain limit. x ← alloc(1); z ← (y = x), and suppose we run it on a state where y holds a dangling pointer. Depending on the behavior of the allocator and the state of the memory, the pointer assigned to x could be equal to y . Since this outcome depends on the entire state of the system, not just the reachable memory, Theorems 3.1, 3.3 and 3.4 now fail. Furthermore, an attacker with detailed knowledge of the allocator implementation could potentially launder secret information by testing pointers for equality. Weakening freshness guarantees can also have implications for integrity, since it becomes much harder to guarantee that memory blocks are properly isolated. For instance, a newly allocated block might be reachable through a dangling pointer that is controlled by an attacker, allowing them to access that block even if they were not supposed to. Some practical solutions for memory safety use mechanisms similar to our language’s, where each memory location is tagged with an identifier describing the region it belongs to [12], [16]. Pointers are tagged similarly, and when a pointer is used to access memory, a violation is detected if its identifier does not match the location’s. However, for performance reasons, the number of possible identifiers might be limited to a relatively small number, such as 2 or 4 [12] or 16 [49]. In addition to the problems above, since multiple live regions can share the same identifier in such schemes, it might be possible for buffer overflows to lead to violations of secrecy and integrity as well. Although we framed our discussion in terms of block identifiers, the issue of freshness can manifest itself in other ways. For example, many systems for spatial memory safety work by enriching pointers with base and bounds information. In some of these [14], [33], dealing with dangling pointers is treated as an orthogonal issue, and it is possible for the allocator to return a new memory region that overlaps with the range of a dangling pointer, in which case the new region will not be properly isolated from the rest of the state. Finally, dangling pointers can have disastrous consequences for overall system security, independently of the freshness issues just described: freeing a pointer more than once can break allocator invariants, enabling attacks [46]. 4.5 4.6 Side-channel Attacks As often done in the information-flow control literature, our noninterference result assumes the code does not use sidechannels to learn information about unreachable memory regions. In practice, a malicious piece of code (e.g., a plugin) may infer secret information from the unreachable memory regions by for instance observing differences in its execution time caused by the contents of processor caches, which are normally shared by all the code. While the attacker model considered in this paper does not try to address such sidechannel attacks, one should be able to use the previous research on the subject to protect against them or limit the damage they can cause [42], [7], [52], [43]. Infinite Memory Our idealized language allows memory to grow indefinitely. But real languages run on finite-memory machines, and cannot allocate new memory when programs run out of space. Besides enabling denial-of-service attacks, finite memory has consequences for the secrecy properties studied earlier. Corollary 3.5 does not hold in a real programming language as is, because an increase in memory consumption can cause a previously successful allocation to fail. By noticing this difference, a piece of code could learn something about the 9 5 Case Study: A Memory-safety Monitor Nop, Const w rd , Mov rs rd , Binop⊕ r1 r2 rd , Load rp rd , Store rp rs , Jump r, Jal r, Bnz r w, Halt To demonstrate the applicability of our proposed characterization, we use it to evaluate the security guarantees of a tag-based dynamic monitor recently proposed by Dhawan et al. to enforce heap memory safety for low-level code [16]. Prior work by Azevedo de Amorim et al. [6] has shown formally that a model of the monitor running on a idealized tag-based architecture correctly implements a higher-level abstract machine with built-in checks for memory safety—a bit more formally, every behavior of the monitor is also a behavior of the abstract machine. Building upon this work, we prove that this abstract machine satisfies a noninterference property similar to Corollary 3.5. We were also able to prove that a similar result holds for a lower-level machine that runs a so-called “symbolic” representation of the monitor— although we had to slightly weaken the result to account for memory exhaustion (cf. §4.5), since the machine that runs the monitor has finite memory, while the abstract machine has infinite memory. If we had a verified machine-code implementation of this monitor, it would be possible to prove a similar result for it as well. 5.1 Figure 3. Instructions of the memory-safe abstract machine. Variables r range over registers, variables w range over constant words, and ⊕ ranges over a set of binary operators that includes basic arithmetic, logic, etc. pc ∈ V is the program counter. The execution of the machine is specified by a stepping relation: s → s0 means that running a single instruction on the machine at state s yields a new state s0 . If there is no s0 such that s → s0 , we say that s is stuck, which means that a fatal error occurred during execution. On every instruction, the machine checks if the current program counter is a pointer and, if so, tries to fetch the corresponding value in memory. The machine then ensures that this value is a word that correctly encodes an instruction and, if so, acts accordingly. The instructions of the machine, representative of typical RISC architectures, are summarized in Figure 3. Programs can perform binary operations (Binop), move values to and from memory (Load, Store), and branch (Jump, Jal, Bnz). The machine is in fact fairly similar to the language of §2. Some binary operations are overloaded to manipulate pointers; for example, adding a pointer to a word is allowed, and the result is obtained by adjusting the pointer’s offset accordingly. Accessing memory causes the machine to halt when the corresponding position is undefined. In addition to these basic instructions, the machine possesses a set of special monitor services that can be invoked by user code as regular functions, using registers to pass in arguments and return values. There are two services alloc and free for managing memory, and one service eq for testing whether two values are equal. The reason for using separate monitor services instead of special instructions is to keep its semantics closer to the more concrete machine that implements it. While the instruction set includes an equality test, this instruction cannot replace the eq service, since it only takes physical addresses into account. As argued in §4.2, such physical address comparisons can be turned into a side channel: comparing out-of-bounds pointers to different blocks reveals information about the global state of the allocator. To prevent this, testing two pointers for equality directly using the corresponding machine instruction results in an error if the pointers have different block identifiers. • Tag-based Monitor We content ourselves with a brief overview of Dhawan et al.’s monitor [16], [6], since the formal statement of noninterference for it is more complex than the one for the abstract machine from §5.2, on which we will focus. Following a proposal by Clause et al. [12], Dhawan et al.’s monitor enforces memory safety for heap-allocated data by checking and propagating metadata tags. Every memory location receives a tag that uniquely identifies the allocated region to which that location belongs (akin to block identifiers in §2), and pointers receive the tag of the region they are allowed to reference. The monitor assigns these tags to new regions by storing a monotonic counter in protected memory that is bumped on every call to malloc; with a large number of possible tags, it is possible to avoid the freshness pitfalls discussed in §4.4. When a memory access occurs, the monitor checks whether the tag on the pointer matches the tag on the location. If they do, the operation is allowed; otherwise, execution halts. The monitor instruments the allocator to make set up tags correctly. Its implementation achieves good performance using the PUMP, a hardware extension accelerating such micro-policies for metadata tagging [16]. 5.2 5.3 Abstract Machine Verifying Memory Safety The proof of memory safety for this abstract machine mimics the one carried for the language in §3. We use similar notations as before: π · s means renaming every identifier that appears in s according to the permutation π , and ids(s) is the finite set of all identifiers that appear in the state s. A simple case analysis on the possible instructions yields analogs of Theorems 3.1, 3.2 and 3.4 (we don’t include an analog of Theorem 3.3 because there isn’t a corresponding notion of looping for this machine). We show single-step versions for simplicity, but the results generalize easily to multiple steps. The abstract machine of Azevedo de Amorim et al. [6] operates on two kinds of values: machine words w, or pointers (i, w), which are pairs of an identifier i ∈ I and a machine word offset w. We use W to denote the set of machine words, and V to denote the set of values. Machine states are triples (m, rs, pc), where ∗ • m ∈ I *fin V is a memory, which maps identifiers to lists of values (frames); • rs ∈ R *fin V is a register bank, mapping registers (elements of a finite set R) to values; and 10 Theorem 5.1. Let π be a permutation, and s and s0 be two machine states such that s → s0 . There exists another permutation π 0 such that π · s → π 0 · s0 . state abstractions to the mechanism itself. Besides variables and call stacks, if the mechanism made code immutable and separate from data, a simple check would suffice to tell whether a code segment stored in memory references a given privileged register. If the register is the only means of reaching a memory region, we should be able to soundly infer that that code segment is independent of that region. On a last note, although the abstract machine we verified is fairly close to our original language, the dynamic monitor that implements it using tags is quite different (§5.1). In particular, the monitor works on a machine that has a flat memory model, and keeps track of free and allocated memory using a protected data structure that stores base and bounds information associated with every block. It was claimed that reasoning about this base and bounds information was the most challenging part of the proof that the monitor implements the abstract machine [6]. For this reason, we believe that this proof can be adapted to other enforcement mechanisms that rely solely on base and bounds information—for example, fat pointers [27], [14] or SoftBound [33]—while keeping a similar abstract machine as their specification, and thus satisfying a similar noninterference property. This gives us confidence that our memory safety characterization generalizes to other settings. Theorem 5.2. Let (m1 , rs, pc) be a state of the abstract machine, and m2 a memory. Suppose that ids(m1 , rs, pc) # dom(m2 ), and that (m1 , rs, pc) → (m0 , rs 0 , pc 0 ). Then, there exists a permutation π such that ids(π · m0 , π · rs, π · pc) # dom(m2 ) and (m2 ∪ m1 , rs, pc) → (m2 ∪ π · m0 , π · rs 0 , π · pc 0 ). Theorem 5.3. Let (m1 , rs, pc) be a state of the abstract machine, and m2 a memory. Suppose that ids(m1 , rs, pc) # dom(m2 ), and that (m1 , rs, pc) is stuck. Then (m2 ∪ m1 , rs, pc) is also stuck. Once again, by combining these properties, we obtain a proof of noninterference. Corollary 5.4 (Noninterference). Let s = (m1 , rs, pc) be a state, and m21 and m22 two memories. Suppose that ids(m1 , rs, pc) # dom(m2i ) for i = 1, 2. When trying to run s by adding the extra memories m2i , only the following two possibilities can arise. • Both (m21 ∪ m1 , rs, pc) and (m22 ∪ m1 , rs, pc) are stuck; or • both states successfully step without interfering with the inaccessible portions m21 and m22 . Formally, there exists a state s0 = (m0 , rs 0 , pc 0 ), and permutations π1 and π2 such that 6 (m2i ∪m1 , rs, pc) → (m21 ∪πi ·m0 , πi ·rs 0 , πi ·pc) and Characterizing Memory Safety Many formal characterizations of memory safety originated in attempts to reconcile its benefits with low-level languages and systems. Generally, these works claim that a mechanism enforces memory safety by showing that it prevents or catches typical temporal and spatial violations. Examples in the literature include: Cyclone [44], a language featuring a region-based type system for safe manual memory management; CCured [35], a program transformation that adds temporal memory safety to C by refining its pointer type to distinguish between various degrees of safety; Ivory [18] an embedding of a similar “safe-C type system” into Haskell; SoftBound [33], an instrumentation technique for C programs for enforcing spatial memory safety, including the detection of bounds violations within an object; CETS [34], a compile-time pass for preventing temporal memory-safety violations in C programs, including accessing dangling pointers into freed heap regions and stale stack frames; the tag-based memory-safety monitor for the PUMP [16], [6], which formed the basis of our case study in §5; and languages like Mezzo [38] and Rust [48], whose guarantees extend to preventing data races [8]. Similar models of memory errors appear in popular formalizations of C [28], [26], which need to rigorously characterize sources of undefined behavior in the language—in particular, instances of memory misuse. Either explicitly or implicitly, these works define memory errors as attempts to use a pointer to access a memory ids(πi · s0 ) # dom(m2i ), for i = 1, 2. 5.4 Related Work The present work lies at the intersection of two areas of previous research: one on formal characterizations of memory safety, the other on reasoning principles for programs. We review the most closely related work in these areas. Discussion This noninterference result for the memory-safety monitor has an important difference compared to the original one (Corollary 3.5). In the memory-safe language, the notion of memory reachability is relative to a program’s local variables. If we want to argue that part of the state is kept isolated from some code fragment, we just have to consider that fragment’s local variables—other parts of the program are still allowed to access the region. The memory-safety monitor, on the other hand, does not have an analogous notion: if a memory region becomes unreachable it becomes useless, since it will remain unreachable forever. It seems that, from the standpoint of noninterference, heap memory safety taken in isolation is much weaker than the guarantees it provides in the presence of other linguistic features, such as local variables. Nevertheless, the properties studied above suggest several possibilities that we could explore for strengthening the mechanism and making its guarantees more useful. The most obvious one would be to use the mechanism as the target of a compiler for a programming language that provides additional (safe) abstractions for managing state, such as variables and a stack for procedure calls. A more modest approach from the point of view of formal verification would be to add other 11 location that it was not meant to access—for example, a location that lies past its bounds, or one that has already been freed. This aspect was noted by Hicks [21], who, inspired by the work on SoftBound, proposed to define memory safety as an execution model that tracks to what part of memory each pointer has access. Our characterization is complementary to these accounts, in that it is extensional: its data isolation properties allow us to reason directly about program observable behavior. Furthermore, as demonstrated by our application to the monitor of §5 and the discussions on §4, it can be easily adapted to various enforcement mechanisms and variations of memory safety. component, one must argue explicitly that the invariants we care about are preserved by the privileged operations of that component; memory safety, on the other hand, guarantees that any invariants on unreachable parts of the memory are automatically preserved. Maybe closer related to our work, Maffeis et al. [29] show that languages that satisfy their notion of “authority safety” guarantee isolation, in the sense that a component’s actions cannot influence the actions of another component with disjoint authority. Their notion of authority behaves similarly to the set of block identifiers accessible by a program in our language; however, they do not attempt to connect their notion of isolation to the frame rule, noninterference, or traditional notions of memory safety. Morrisett et al. [32] state a correctness criterion for garbage collection based on program equivalence. Some of the properties they study are again similar to the frame rule, in that they describe the behavior of code running in an extended heap. However, they use this analysis to justify the validity of erasing unreachable state, rather than studying the possible interactions between the extra state and the program in terms of integrity and secrecy. Other works attempt to characterize protection schemes that are weaker than full memory safety. Juglaret et al. [24] propose a correctness criterion for compiling compartmentalized programs, which allows memory-safety violations to occur within each compartment, but bounds the effect of such violations on other compartments of the program. Their criterion is reminiscent of the traditional notion of full abstraction, which guarantees that contextually equivalent programs remain equivalent after compilation. Abadi and Plotkin [2] develop an address-space randomization scheme for a simple compiler, and prove a probabilistic full-abstraction result for it. While full abstraction and related properties guarantee that certain security properties of programs are preserved by compilation, these works do not consider whether these properties encompass the type of isolation guarantee analyzed here. Reasoning Principles Separation logic [39], [51] has been an important source of inspiration for our work. The logic’s frame rule enables its local reasoning capabilities and imposes restrictions that are similar to those mandated by memory-safe programming guidelines. As discussed in §3.4, our reasoning principles are reminiscent of the frame rule, but use pointer reachability to guarantee access locality in settings where memory safety is enforced automatically. In separation logic, by contrast, locality needs to be guaranteed for each program individually by comprehensive proofs. Several works have investigated similar reasoning principles for a variety of program analysis techniques, including static, dynamic, manual, or a mixture of those. Some of these are formulated as expressive logical relations associated with types, guaranteeing that programs are compatible with the framing of state invariants; representative works include: L3 [4], a linear calculus featuring strong updates and aliasing control; the work of Benton and Tabereau [9] on a compiler for a simple higher-order language; and the work of Devriese et al. [15] on object capabilities for a JavaScript-like language. Other developments are based on proof systems reminiscent of separation logic with rules that guarantee isolation; these include Yarra [41], an extension of C that allows programmers to protect the integrity of data structures marked as critical; the work of Agten et al. [3], which allows mixing unverified and verified components by instrumenting the program to check that required assertions hold at interfaces; and the logic of Swasey et al. [45] for reasoning about object-capability patterns. Unlike our work, these works do not propose to use reachability-based isolation to define memory safety in a general setting, nor do they attempt to analyze how the reasoning principles they identify are affected by common variants of memory safety. Furthermore, many of these other reasoning principles—especially the logical relations—rely on encapsulation mechanisms such as closures, objects, or modules that go beyond plain memory safety. Memory safety only allows us to fully isolate state components, while encapsulation provides finer control, allowing some interaction between components, while guaranteeing the preservation of certain invariants associated with them. In this sense, one can see memory-safety reasoning as a special case of encapsulation reasoning. Nevertheless, it is a practically relevant special case that is interesting on its own, since when code makes use of an encapsulated 7 Conclusions and Future Work We have explored the consequences of memory safety for reasoning about programs, formalizing intuitive principles that, we argue, capture the essential distinction between memory-safe systems and memory-unsafe ones. We showed how the reasoning principles we identified apply to a recent dynamic monitor for heap memory safety of low-level code. The systems studied in this paper have a simple storage model: the language of §2 has just global variables and flat, heap-allocated arrays, while the monitor of §5 doesn’t even have variables or immutable code. Realistic programming platforms, of course, offer much richer stateful abstractions, including, for example, procedures with stack-allocated local variables as well as structured objects with contiguously allocated sub-objects. In terms of memory safety, these systems have a richer vocabulary for describing resources that programs can access, and programmers could benefit from isolation-based local reasoning involving these resources. 12 For example, in a memory-safe language with procedures and stack variables, it should be possible to assert that the behavior of a procedure depends only on the arguments that it is given, the global variables it uses, and the portions of the state that are reachable from these values; if the caller of that procedure has a private object that is not passed as an argument, it should not affect or be affected by the call. Additionally, languages such as C allow for objects consisting of contiguously allocated sub-objects for improved performance. Some systems [33], [14] add spatial memory safety to C while allowing programmers to downgrade capabilities—that is, narrow the range of a pointer so that it can’t be used to access outside of a sub-object’s bounds. It would be interesting to refine our idealized model of memory safety to take into account the reasoning enabled by these features. In the case of the monitor of §5, such considerations could lead to improved monitor designs or to incorporating the monitor inside a secure compiler. Conversely, it would be interesting to derive finer security properties for relaxations of memory safety like the ones discussed in §4. Some inspiration could come from the information-flow literature, where quantitative noninterference results provide bounds on the probability that some secret is leaked, the rate at which it is leaked, how many bits are leaked, etc. [7], [42]. The main goal of this work was to understand, formally, the benefits of memory safety for informal and partial reasoning, and to evaluate a variety of weakened forms of memory safety in terms of which reasoning principles they preserve. However, our approach may also suggest ways in which formal verification using proof assistants might be improved. One promising idea is to leverage the guarantees of memory safety to obtain formal proofs of program correctness modulo unverified code that could have errors, in contexts where complete verification is too expensive or not possible (e.g., for programs with a plugin mechanism). ⊕ ::= + | × | − | = | ≤ | and | or (operators) e ::= x ∈ var | b ∈ B | n ∈ Z (expressions) | e1 ⊕ e2 | not e | offset e | nil c ::= skip | c1 ; c2 (commands) | if e then c1 else c2 | while e do c end | x ← e | x ← [e] | [e1 ] ← e2 | x ← alloc(e) | free(e) s∈S ,L×M l ∈ L , var *fin V (states) (local stores) m ∈ M , I × Z *fin V (heaps) v ∈ V , Z ] B ] {nil} ] I × Z O , S ] {error} (values) (outcomes) I , some countably infinite set X *fin Y , partial functions X * Y with finite domain Figure 4. Syntax and program states JxK(l, m) , ( l(x) nil if x ∈ dom(l) otherwise JbK(s) , b JnK(s) , n JnilK(s) , nil   n1 + n2 if Je1 K(s) = n1 and Je2 K(s) = n2   (i, n + n ) if Je K(s) = (i, n ) and Je K(s) = n 1 2 1 1 2 2 Je1 + e2 K(s) ,  or Je1 K(s) = n1 and Je2 K(s) = (i, n2 )   nil otherwise   if Je1 K(s) = n1 and Je2 K(s) = n2 n1 − n2 Je1 − e2 K(s) , (i, n1 − n2 ) if Je1 K(s) = (i, n1 ) and Je2 K(s) = n2  nil otherwise ( n1 × n2 if Je1 K(s) = n1 and Je2 K(s) = n2 Je1 × e2 K(s) , nil otherwise Acknowledgments We are grateful to Antal Spector-Zabusky, Greg Morrisett, Justin Hsu, Michael Hicks, Yannis Juglaret, and Andrew Tolmach for useful suggestions on earlier drafts. This work is supported by NSF grants Micro-Policies (1513854) and DeepSpec (1521523) and ERC Starting Grant SECOMP (715753). Je1 = e2 K(s) , (Je1 K(s) = Je2 K(s)) ( n1 ≤ n2 if Je1 K(s) = n1 and Je2 K(s) = n2 Je1 ≤ e2 K(s) , nil otherwise ( b1 ∧ b2 if Je1 K(s) = b1 and Je2 K(s) = b2 Je1 and e2 K(s) , nil otherwise ( b1 ∨ b2 if Je1 K(s) = b1 and Je2 K(s) = b2 Je1 or e2 K(s) , nil otherwise ( ¬b if JeK(s) = b Jnot eK(s) , nil otherwise ( n if JeK(s) = (i, n) Joffset eK(s) , nil otherwise Appendix This appendix defines the language of §2 more formally. Figure 4 summarizes the syntax of programs and repeats the definition of program states. The syntax is standard for a simple imperative language with pointers. Figure 5 defines expression evaluation, JeK : S → V . Variables are looked up in the local-variable part of the state (for simplicity, heap cells cannot be dereferenced in expressions; the command x ← [e] puts the value of a heap cell in a local variable). Constants (booleans, numbers, and the special value nil used to simplify error propagation) evaluate to themselves. Addition and subtraction can be Figure 5. Expression evaluation 13 up in the heap, yielding an error if e does not evaluate to a pointer or if it evaluates to a pointer that is invalid, either because its block id is not allocated or because its offset is out of bounds. Similarly, the heap mutation command, [e1 ] ← e2 , requires that e1 evaluate to a pointer that is valid in the current memory m (i.e., such that looking it up in m yields something other than ⊥). The allocation command x ← alloc(e) first evaluates e to an integer n, then calculates the next free block id for the current machine state (fresh(ids(l, m))); it yields a new machine state where x points to the first cell in the new block and where a new block of n cells is added the heap, all initialized to 0. Finally, free(e) evaluates e to a pointer and yields a new heap where every cell sharing the same block id as this pointer is undefined. bind(f, ⊥) , ⊥ bind(f, error) , error  0 0 0 0 0 0  (I ∪ I , l , m ) if f (l, m) = (I , l , m ) bind(f, (I, l, m)) , error if f (l, m) = error  ⊥ otherwise   if b = true x if(b, x, y) , y if b = false  error otherwise Figure 6. Auxiliary operators bind and if applied both to numbers and to combinations of numbers and pointers (for pointer arithmetic); multiplication only works on numbers. Equality is allowed both on pointers and on numbers. Pointer equality compares both the block identifier and its offset, and while this is harder to implement in practice than just comparing physical addresses, this is needed for not leaking information about pointers (see §4.2). The special expression offset extracts the offset component of a pointer; we introduce it to illustrate that for satisfying our memory characterization pointer offsets do not need to be hidden (as opposed to block identifiers). The less-thanor-equal operator only applies to numbers—in particular, pointers cannot be compared. However, since we can extract pointer offsets, we can compare those instead. The definition of command evaluation employs an auxiliary partial function that computes the result of evaluating a program along with the set of block identifiers that were allocated during evaluation. Formally, JcK+ : S * O+ , where O+ is an extended set of outcomes defined as Pfin (I) × S ] {error}. We then set  0 0 0 0  (l , m ) if JcK+ (l, m) = (I, l , m ) JcK(l, m) = error if JcK+ (l, m) = error  ⊥ if JcK+ (l, m) = ⊥ ( ids(l, m) \ I if JcK+ (l, m) = (I, l0 , m0 ) finalids(l, m) = ∅ otherwise References [1] Caja. attack vectors for privilege escalation, 2012. [2] M. Abadi and G. D. Plotkin. On protection by layout randomization. ACM TISSEC, 15(2):8, 2012. [3] P. Agten, B. Jacobs, and F. Piessens. Sound modular verification of C code executing in an unverified context. POPL. 2015. [4] A. Ahmed, M. Fluet, and G. Morrisett. L3 : A linear language with locations. Fundam. Inform., 77(4):397–449, 2007. [5] A. Askarov, S. Hunt, A. Sabelfeld, and D. Sands. Terminationinsensitive noninterference leaks more than just a bit. ESORICS. 2008. [6] A. Azevedo de Amorim, M. Dénès, N. Giannarakis, C. Hriţcu, B. C. Pierce, A. Spector-Zabusky, and A. Tolmach. Micro-policies: Formally verified, tag-based security monitors. Oakland S&P. 2015. [7] M. Backes, B. Köpf, and A. Rybalchenko. Automatic discovery and quantification of information leaks. Oakland S&P, 2009. [8] T. Balabonski, F. Pottier, and J. Protzenko. Type soundness and race freedom for Mezzo. FLOPS. 2014. [9] N. Benton and N. Tabareau. Compiling functional types to relational specifications for low level imperative code. In A. Kennedy and A. Ahmed, editors, TLDI. 2009. [10] K. Bhargavan, A. Delignat-Lavaud, and S. Maffeis. Defensive javascript - building and verifying secure web components. In A. Aldini, J. Lopez, and F. Martinelli, editors, Foundations of Security Analysis and Design VII - FOSAD 2012/2013 Tutorial Lectures. 2013. [11] D. Chisnall, C. Rothwell, R. N. M. Watson, J. Woodruff, M. Vadera, S. W. Moore, M. Roe, B. Davis, and P. G. Neumann. Beyond the PDP-11: Architectural support for a memory-safe C abstract machine. ASPLOS. 2015. To define JcK+ , we first endow the set S * O+ with the partial order of program approximation: f vg [12] J. A. Clause, I. Doudalis, A. Orso, and M. Prvulovic. Effective memory protection using dynamic tainting. ASE. 2007. , ∀s, f (s) 6= ⊥ ⇒ f (x) = g(x) This allows us to define the semantics of iteration (the rule for while e do c end) in a standard way using the Kleene fixed point operator fix. The definition of JcK+ appears in Figure 7, where several of the rules use a bind operator (Figure 6) to manage the “plumbing” of the sets of allocated block ids between the evaluation of one subcommand and the next. The rules for if and while also use an auxiliary operator if (also defined in Figure 6) that turns non-boolean guards into errors. The evaluation rules for skip, sequencing, conditionals, while, and assignment are standard. The rule for heap lookup, x ← [e], evaluates e to a pointer and then looks it [13] A. A. de Amorim, N. Collins, A. DeHon, D. Demange, C. Hritcu, D. Pichardie, B. C. Pierce, R. Pollack, and A. Tolmach. A verified information-flow architecture. Journal of Computer Security, 24(6):689–734, 2016. [14] J. Devietti, C. Blundell, M. M. K. Martin, and S. Zdancewic. HardBound: Architectural support for spatial safety of the C programming language. ASPLOS, 2008. [15] D. Devriese, F. Piessens, and L. Birkedal. Reasoning about object capabilities with logical relations and effect parametricity. EuroS&P, 2016. [16] U. Dhawan, C. Hriţcu, R. Rubin, N. Vasilakis, S. Chiricescu, J. M. Smith, T. F. Knight, Jr., B. C. Pierce, and A. DeHon. Architectural support for software-defined metadata processing. ASPLOS, 2015. 14 JskipK+ (l, m) , (∅, l, m) Jc1 ; c2 K+ (l, m) , bind(Jc2 K+ , Jc1 K+ (l, m)) Jif e then c1 else c2 K+ (l, m) , if(JeK(l, m), Jc1 K+ (l, m), Jc2 K+ (l, m)) Jwhile e do c endK+ , fix(λ f (l, m). if(JeK(l, m), bind(JcK+ , f (l, m)), (∅, l, m))) ( (∅, l[x 7→ v], m) if JeK(s) = (i, n) and m(i, n) = v Jx ← eK+ (l, m) , (∅, l[x 7→ JeK(l, m)], m) Jx ← [e]K+ (s) , error otherwise ( J[e1 ] ← e2 K+ (s) , (∅, l, m[(i, n) 7→ Je2 K(l, m)]) error ( Jx ← alloc(e)K+ (l, m) , ({i}, l[x 7→ (i, 0)], m[(i, k) 7→ 0 | 0 ≤ k < n]) error ( Jfree(e)K+ (l, m) , if Je1 K(s) = (i, n) and m(i, n) 6= ⊥ otherwise (∅, l, m[(i, k) 7→ ⊥ | k ∈ Z]) error if JeK(l, m) = n and i = fresh(ids(l, m)) otherwise if JeK(l, m) = (i, 0) and m(i, n) 6= ⊥ for some n otherwise Figure 7. Command evaluation with explicit allocation sets [17] Z. Durumeric, J. Kasten, D. Adrian, J. A. Halderman, M. Bailey, F. Li, N. Weaver, J. Amann, J. Beekman, M. Payer, and V. Paxson. The matter of heartbleed. IMC. 2014. [31] L. A. Meyerovich and V. B. Livshits. Conscript: Specifying and enforcing fine-grained security policies for javascript in the browser. Oakland S&P, 2010. [18] T. Elliott, L. Pike, S. Winwood, P. C. Hickey, J. Bielman, J. Sharp, E. L. Seidel, and J. Launchbury. Guilt free Ivory. Haskell. 2015. [32] G. Morrisett, M. Felleisen, and R. Harper. Abstract models of memory management. FPCA. 1995. [19] C. Fournet, N. Swamy, J. Chen, P.-É. Dagand, P.-Y. Strub, and B. Livshits. Fully abstract compilation to JavaScript. POPL. 2013. [33] S. Nagarakatte, J. Zhao, M. M. K. Martin, and S. Zdancewic. SoftBound: highly compatible and complete spatial memory safety for C. PLDI. 2009. [20] J. A. Goguen and J. Meseguer. Security policies and security models. In Symposium on Security and Privacy, 1982. [34] S. Nagarakatte, J. Zhao, M. M. K. Martin, and S. Zdancewic. CETS: compiler enforced temporal safety for C. ISMM. 2010. [21] M. Hicks. What is memory safety? http://www.pl-enthusiast.net/ 2014/07/21/memory-safety/, 2014. [35] G. C. Necula, J. Condit, M. Harren, S. McPeak, and W. Weimer. CCured: type-safe retrofitting of legacy software. ACM Trans. Program. Lang. Syst., 27(3):477–526, 2005. [22] ISO. ISO C standard 1999. Technical report, ISO, 1999. ISO/IEC 9899:1999 draft. [36] A. M. Pitts. Nominal logic, a first order theory of names and binding. Information and Computation, 186:2003, 2002. [23] S. Jana and V. Shmatikov. Memento: Learning secrets from process footprints. Oakland S&P. 2012. [37] A. M. Pitts. Nominal Sets: Names and Symmetry in Computer Science. Cambridge University Press, New York, NY, USA, 2013. [24] Y. Juglaret, C. Hritcu, A. Azevedo de Amorim, B. Eng, and B. C. Pierce. Beyond good and evil: Formalizing the security guarantees of compartmentalizing compilation. CSF, 2016. [38] F. Pottier and J. Protzenko. Programming with permissions in Mezzo. ICFP, 2013. [25] J. Kang, C. Hur, W. Mansky, D. Garbuzov, S. Zdancewic, and V. Vafeiadis. A formal C memory model supporting integer-pointer casts. PLDI. 2015. [39] J. C. Reynolds. Separation logic: A logic for shared mutable data structures. LICS. 2002. [40] The Rust programming language. http://www.rust-lang.org, 2017. [26] R. Krebbers. The C standard formalized in Coq. PhD thesis, Radboud University Nijmegen, 2015. [41] C. Schlesinger, K. Pattabiraman, N. Swamy, D. Walker, and B. G. Zorn. Modular protections against non-control data attacks. Journal of Computer Security, 22(5):699–742, 2014. [27] A. Kwon, U. Dhawan, J. M. Smith, T. F. Knight, Jr., and A. DeHon. Low-fat pointers: compact encoding and efficient gate-level implementation of fat pointers for spatial safety and capability-based security. CCS. 2013. [42] G. Smith. On the foundations of quantitative information flow. FoSSaCS. 2009. [28] X. Leroy and S. Blazy. Formal verification of a C-like memory model and its uses for verifying program transformations. JAR, 41(1):1–31, 2008. [43] D. Stefan, P. Buiras, E. Z. Yang, A. Levy, D. Terei, A. Russo, and D. Mazières. Eliminating cache-based timing attacks with instructionbased scheduling. ESORICS. 2013. [29] S. Maffeis, J. C. Mitchell, and A. Taly. Object capabilities and isolation of untrusted web applications. Oakland S&P, 2010. [44] N. Swamy, M. W. Hicks, G. Morrisett, D. Grossman, and T. Jim. Safe manual memory management in Cyclone. Science of Computer Programming, 62(2):122–144, 2006. [30] K. Memarian, J. Matthiesen, J. Lingard, K. Nienhuis, D. Chisnall, R. N. M. Watson, and P. Sewell. Into the depths of C: elaborating the de facto standards. PLDI. 2016. [45] D. Swasey, D. Garg, and D. Dreyer. Robust and compositional verification of object capability patterns. To appear at OOPSLA, 2017. 15 [46] L. Szekeres, M. Payer, T. Wei, and D. Song. SoK: Eternal war in memory. IEEE S&P. 2013. [47] A. Taly, Ú. Erlingsson, J. C. Mitchell, M. S. Miller, and J. Nagra. Automated analysis of security-critical javascript apis. Oakland S&P. 2011. [48] A. Turon. Rust: from POPL to practice (keynote). POPL. 2017. [49] C. Williams. Oracle’s Larry Ellison claims his Sparc M7 chip is hacker-proof – errr... The Register, 2015. [50] E. Z. Yang and D. Mazières. Dynamic space limits for Haskell. PLDI. 2014. [51] H. Yang and P. W. O’Hearn. A semantic basis for local reasoning. FoSSaCS. 2002. [52] D. Zhang, A. Askarov, and A. C. Myers. Language-based control and mitigation of timing channels. PLDI. 2012. 16
6cs.PL
On the Foundation of NOMA and its Application to 5G Cellular Networks Hikmet Sari1, 4 , Ali Maatouk2 , Ersoy Caliskan3 , Mohamad Assaad2 , Mutlu Koca3 , and Guan Gui1 1 NUPT, 66 Xinmofan Road, Gulou District, Nanjing, 210003 China CentraleSupélec, Plateau de Moulon, 91192 Gif sur Yvette, France 3 Bogazici University, Electrical & Electronics Eng. Dept., Bebek 34342 Istanbul, Turkey 4 Sequans Communications, 15 – 55 Boulevard Charles de Gaulle, 92700 Colombes, France arXiv:1710.03046v2 [cs.IT] 11 Oct 2017 2 Abstract—Non-Orthogonal Multiple Access (NOMA) is recognized today as a most promising technology for future 5G cellular networks and a large number of papers have been published on the subject over the past few years. Interestingly, none of these authors seems to be aware that the foundation of NOMA actually dates back to the year 2000, when a series of papers introduced and investigated multiple access schemes using two sets of orthogonal signal waveforms and iterative interference cancellation at the receiver. The purpose of this paper is to shed light on that early literature and to describe a practical scheme based on that concept, which is particularly attractive for Machine-Type Communications (MTC) in future 5G cellular networks. Using this approach, NOMA appears as a convenient extension of orthogonal multiple access rather than a strictly competing technology, and most important of all, the power imbalance between the transmitted user signals that is required to make the receiver work in other NOMA schemes is not required here. I. INTRODUCTION Non-Orthogonal Multiple Access (NOMA) is currently a hot research topic for the physical layer of future 5G cellular networks, and more particularly for Machine-Type Communications (MTC) in that context. The interest in this multiple access technique originated from a well-established result in multi-user information theory, which says that orthogonal multiple access is not optimal in general and that superposition coding coupled with successive interference cancellation (SIC) provides an optimal solution for multiple access [1], [2]. Historically, time-division multiple access (TDMA) and frequency-division multiple access (FDMA) have been known and used in various forms for quite a long time. Focusing on digital cellular networks, the two major standards in secondgeneration (2G) cellular networks were the Global Standard for Mobile Communications (GSM) and IS-95. The first one of these was based on TDMA, and the second was based on code-division multiple access (CDMA) [3]. For 3G networks, the winner was the CDMA technology, and the so-called Wideband CDMA (WCDMA) became the standard [4]. All of these networks were based on single-carrier transmission. Finally, 4G networks were based on the multicarrier transmission technology known as orthogonal frequency-division multiplexing (OFDM), previously used for terrestrial digital video broadcasting (DVB-T), WiFi, and WiMAX. In terms of multiple access, WiFi continued to use TDMA, but WiMAX used orthogonal frequency-division multiple access (OFDMA) which uses the frequency dimension of OFDM for resource allocation [5]. As for the 3GPP Long-Term Evolution (LTE) and LTE-Advanced standards [6] and [7], they used OFDMA on the downlink and single-carrier FDMA (SC-FDMA) on the uplink in order to reduce the peak-to-average power ratio (PAPR) of the transmitted signal. All of these multiple access techniques are orthogonal and ensure that no interference exists between users in ideal conditions. In TDMA only one user is active at a time, and in conventional FDMA only one user is active at a given frequency. In CDMA orthogonality is ensured by the properties of the Walsh-Hadamard (WH) sequences used for signal spreading. Finally, although individual user signals overlap in frequency in the case of OFDMA, orthogonality is achieved thanks to the carrier spacing of 1/T, where T is the symbol period. Of course, in all of these techniques, orthogonality on the uplink requires perfect synchronization between different user signals. Until the development of multi-user information theory, orthogonality of different user signals was always perceived as a most desirable property. But analysis of the channel capacity which indicated that orthogonal multiple access is not always optimal opened up new perspectives and research directions for future networks. Recently, a large number of papers have been published on non-orthogonal multiple access (NOMA), which is perceived as a most promising technology for 5G cellular networks (See, e.g., [8]–[11]). The analysis in these papers promise substantial gains compared to conventional orthogonal multiple access. The purpose of the present paper is to put into context the current work on NOMA, quantify its potential, and point out previous work on the subject [12]–[15], which seems to be unnoticed by current researchers. Using that approach, NOMA appears as a convenient extension of orthogonal multiple access rather than a strictly competing technology. The paper is organized as follows: In the next section, we recall the basic principle of NOMA and we quantify the gain that this technique can achieve with respect to orthogonal multiple access in different scenarios. In Section III, we review the earlier work on NOMA that is based on the joint use of two orthogonal multiple access schemes. Using this concept, we describe in Section IV a practical NOMA scheme which elegantly combines OFDMA and Multi-Carrier CDMA (MC-CDMA) and turns out to be particularly suitable for accommodating two user groups with different profiles in terms of data rate requirements. Finally, we give simulation results in Section V and our conclusions in Section VI. II. PRINCIPLE OF NOMA To describe the basic principle of NOMA, we will focus here on a two-user uplink channel in a cellular network. We will assume that user 1 has a strong signal power P1 and user 2 has a weaker signal power P2 . In these conditions, the receiver can detect the user-1 signal in the presence of interference from the user-2 signal, and then it can subtract the detected user-1 signal from the received signal to detect the weaker user-2 signal without interference. Assuming that the channel is an additive white Gaussian noise (AWGN) channel of normalized bandwidth W = 1 Hz, the user 1 capacity in bits per Hertz is given by P1  (1) R1 = log2 1 + P2 + N 0 where N0 is the noise spectral density (the noise power in the unit bandwidth W = 1 Hz). After detecting the signal transmitted by user 1, the receiver can subtract this from the received signal and detect the user 2 signal in the absence of interference. The user 2 capacity is given by P2  R2 = log2 1 + (2) N0 and consequently, the total capacity for the two users is expressed as P1  P2  R = R1 + R2 = log2 1 + + log2 1 + . (3) P2 + N0 N0 A simple manipulation of this equation shows that  P1 P2  P  R = log2 (1 + )(1 + ) = log2 1 + (4) P2 + N 0 N0 N0 where P = P1 + P2 is the total power. This indicates that the capacity of the multi-user channel is identical to that of a single-user channel with the same total power. The situation is actually not different for orthogonal waveform multiple access (OWMA). Without any loss of generality, consider an OFDMA scheme with 2 users. Again, P1 will designate here the power of the user-1 signal, P2 will designate the power of the user-2 signal, and P = P1 + P2 is the total power. We write P1 = αP and P2 = (1 − α)P , with 0 ≤ α ≤ 1. The signal power being uniformly distributed over the N carriers composing the OFDMA signal, the bandwidth allocation to the two users follows the same proportions as the signal power. In other words, we have W1 = αW and W2 = (1 − α)W , where bandwidth W1 is allocated to user 1 and W2 is allocated to user 2. The capacity equations for the two users are given by P  P1  = αlog2 1 + (5) R1 = αlog2 1 + W1 N0 N0 and R2 = (1 − α)log2 1 + P2  P  = (1 − α)log2 1 + (6) W 2 N0 N0 respectively. The total capacity R = R1 + R2 is therefore identical to the NOMA capacity given by equation (4). In summary, when the user signals do not have relative attenuations, both OWMA and NOMA achieve the single-user channel capacity, and the two multiple access technique do not have any difference in terms of capacity. The difference between the two multiple access techniques appears when one of the user signals is subject to a different attenuation than the other signal. Suppose that user 2 signal is attenuated by 6 dB while the user 1 signal has no attenuation. In that case, the OFDMA capacity becomes P/4  P  + (1 − α)log2 1 + (7) N0 N0 and the NOMA capacity will be   αP RN OM A = log2 1 + (1 − α)P/4 + N0 (8)   (1 + 3α)P  (1 − α)P/4  = log2 1 + . + log2 1 + N0 4N0 To compare these two capacities, assume now that α = 0.8 and P/N0 = 15 so that the single-user channel capacity is 4 bits per Hertz. In that case, (7) will read ROF DM A = 3.65 and (8) will read RN OM A = 3.78. Comparing these numbers, we can see that NOMA increases the two-user channel capacity by 3.5% in this particular case. Pursuing the comparison further, it turns out that the advantage of NOMA increases when the parameter α is reduced and when the attenuation of the user-2 signal is further increased. But the capacity increase offered by NOMA does not come completely for free. Since user signals interfere with each other, iterative detection with interference cancellation is needed. When one signal is significantly weaker than the other, the strong signal can be detected with a small penalty and then subtracted from the received signal to detect the weak signal. Next, the weak signal is subtracted from the received signal to make more reliable second iteration decisions on the symbols of the strong signal, and so forth, until performance gets close to that of interference-free transmission. This process works fine when there is a strong imbalance between the two user signals, but it will have convergence problems when the two signals have similar powers. ROF DM A = αlog2 1 + III. EARLY LITERATURE The interest in NOMA today is closely related to the emergence of research projects on 5G cellular networks. The main research topics for the definition of the physical layer of 5G networks have been Massive MIMO, Waveform Design, and Millimeter-Wave Technologies, and multiple access is a key component of waveform design. Most papers on NOMA have been published over the past few years, and interestingly, the authors seem to be completely unaware of a series of papers which laid the foundation of NOMA over 15 years ago. This early literature did not use the word NOMA, but the principle of NOMA and all of the ingredients which characterize this technique were disclosed back in the year 2000. Below is a short summary of this work whose basic principle is to use two sets of orthogonal signal waveforms. We describe it here focusing on the combination of TDMA and OCDMA as in [12], where the TDMA signal set is used in full and OCDMA signal set is used in part. Consider a simple TDMA system with N users in which each user gets one data symbol per frame of N symbols. The multiple access channel has a bandwidth of N W Hz, where W is the bandwidth which would be required to transmit the signal of the individual users if they transmitted alone. This scheme thus accommodates N users without any interference. To accommodate additional users (say M users, where M < N ), a second signal set is used. The second signal set too is an orthogonal set, but the two sets are not mutually orthogonal. Specifically, the second set used here is the OCDMA signal set formed of length-N Walsh-Hadamard (WH) sequences. In the resulting multiple access scheme with N + M users, the first N users do not interfere with each other, and the same applies to the second set of M users, but each user from the first set interferes with every user from the second set, and vice versa. That is, we have here a NOMA scheme with interference between two groups of users, and iterative detection with serial interference cancellation is needed to detect the transmitted symbols. The basic principle is schetched in Fig.1, which shows how M OCDMA symbols are stacked to a block of N TDMA symbols. On the abscissa of this figure, TC designates the OCDMA chip duration as well as the TDMA symbol duration, and T = N · TC is the OCDMA symbol duration, which is also the duration of the TDMA symbol block. The transmitted instantaneous power is P for each OCDMA symbol and N ·P for each TDMA symbol so that both TDMA and OCDMA symbols have an energy of E = N ·P ·TC = P ·T . The TDMA signal set here is used in full, while the OCDMA signal set is used only partially. This picture clearly shows that preliminary decisions can be made on the TDMA symbols as long as M remains small compared to N . Let us write down the equations describing the transmitted signal. The time index describing the symbol position in a TDMA block is denoted n. Symbol an with 1 ≤ n ≤ N is assigned to TDMA user #n. The symbols assigned to the OCDMA users are denoted bm with 1 ≤ m ≤ M . We also write the WH sequences used for signal spreading as Wm = (wm,1 , wm,2 , . . . .., wm,N ) for m = 1, 2, . . . ., M . Using this notation, the transmitted signal can be written as M 1 X wm,n bm (9) xn = an + √ N m=1 √ for n = 1, 2, . . . , N . The division by N in (9) is to preserve the symbol energy during the symbol spreading process. The received signal can be written as rn = xn + un with un being the additive noise for n = 1, 2, . . . , N . Provided that the Fig. 1: An illustration of the combined TDMA/OCDMA scheme, where the TDMA signal set is used in full and the OCDMA signal set is used partially. number of OCDMA users M is not too large, the interference term in (9) remains small compared to the TDMA symbol power, and the received signal sample rn can be sent to a threshold detector to make a decision on the transmitted an symbol. Once these first-iteration decisions are made on all an symbols, the estimated symbol values are subtracted from the received signal samples according to yn = rn − ân , where for each n, ân stands for the decision made on symbol an . Referring back to (9), we can write yn as M 1 X wm,n bm + un . yn = an − ân + √ N m=1 (10) Assuming ân = an , (10) simplifies to M 1 X yn = √ wm,n bm + un . N m=1 (11) The next operation in the receiver is to perform signal despreading and make decisions on the OCDMA symbols. Signal despreading consists of N 1 X zk = √ wk,n yn N n=1   N M 1 X 1 X =√ wk,n √ wm,n bm + un N n=1 N m=1 (12) N 1 X = bk + √ wk,n un . N n=1 The second term is a noise term with identical variance to that of the original noise. The first iteration decisions on the OCDMA symbols are made by passing the zk ’s to a threshold detector. Once the first-iteration decisions are also made for the {bm , m = 1, 2, . . . , M } symbols, their interference can be cancelled to make second-iteration decisions on the {an , n = 1, 2, . . . , N } symbols. The process is as follows: For each n, compute vn = rn − √1 N PM m=1 wm,n b̂m , where for each m, b̂m is the decision on bm . Assuming that b̂m = bm for all m and using (9), we get vn = an +un . This signal is next sent to a threshold detector to make a decision on an in the absence of interference. The second-iteration decisions are obviously more reliable than the first-iteration decisions, and the process continues as in the first iteration to make second-iteration decisions on the {bm , m = 1, 2, . . . , M } symbols. Additional iterations can further improve performance in some cases, but the results show that two iterations are sufficient when M is small. The concept described above is not just applicable to multiple access. It is equally applicable to single-user transmission, and therefore the terminology of “channel overloading” was used in [14] to describe it. The basic idea is that once the channel is fully loaded using an orthogonal signaling scheme (orthogonal transmission for a single-user channel or orthogonal multiple access for a multiuser channel), it is overloaded through the superposition of a second signal to the first one. Optimum joint detection being too complex to implement, the receiver in practice takes the form of an iterative receiver with interference cancellation. For multiple access, the recent NOMA literature focuses on the superposition of two user signals, but the concept reviewed in this section goes actually further and superposes the signals of two user groups. IV. NOMA FOR 5G Since OFDMA has been the basic multiple access scheme used in 4G cellular systems and it has also been adopted by the 3GPP for mobile broadband (eMBB) services in 5G [16], we will now describe a frequency-domain NOMA scheme, which consists of using OFDMA for the first group of users and Multi-Carrier CDMA (MC-CDMA) for the second group. The principle is exactly the same as the one described in the previous section, with the frequency dimension substituted for the time dimension as shown in Fig. 2. In this figure, 1/N T is the carrier spacing, the OFDMA symbols have a power spectrum density (PSD) of N · D Watt/Hz, and the MC-CDMA symbols that are superposed to them have a PSD of D Watt/Hz. To describe this NOMA technique further, consider an OFDMA system with N carriers and without any loss of generality assume that each carrier is assigned to a separate user. Such a system accommodates N users providing one QAM symbol to each of them during every OFDM symbol. Applying the concept described in Section III, we superpose to this OFDMA signal a set of MC-CDMA signals carrying information for a second group of users. The mathematical equations of Section III remain the same except that here, n with 1 ≤ n ≤ N designates the carrier index, and xn given by (9) designates the signal transmitted on the nth carrier. A simple block diagram of the transmitter is shown in Fig. 3. The output of the OFDMA Users block is an N-dimensional QAM symbol vector {an , n = 1, 2, . . . , N } and the MCCDMA Users block is an M-dimensional symbol vector {bm , m = 1, 2, . . . , M }. The Walsh-Hadamard Spreading box Fig. 2: An illustration of the combined OFDMA/MC-CDMA scheme, where the OFDMA signal set is used in full and the MC-CDMA signal set is used partially. Fig. 3: Transmitter block diagram of a NOMA scheme using OFDMA for the first set of users and MC-CDMA for the second set of users. spreads the MC-CDMA symbols over the N carriers and outputs an N-dimensional vector that is summed with the OFDMA symbols vector. The resulting signal block is passed to an N-point inverse DFT operator followed by the insertion of cyclic prefix (CP) between consecutive inverse DFT blocks. The corresponding receiver is sketched in Fig. 4. Fig. 4: Receiver block diagram for the NOMA scheme of Fig. 3. After CP removal in the time domain, the signal is converted to the frequency domain by means of an N-point DFT. The output of this operator {rn , n = 1, 2, . . . , N } is directly passed to a threshold detector to make first-iteration decisions on the OFDMA symbols. These are denoted {ân , n = 1, 2, . . . , N }. These decisions are subtracted from the DFT operator output to provide {yn = rn − ân , n = 1, 2, ..., N } and this signal is passed to a Walsh-Hadamard despreader. The despreader output is next sent to a threshold detector to make first-iteration decisions on the MC-CDMA symbols {bm , m = 1, 2, . . . , M }. These decisions, which are denoted {b̂m , m = 1, 2, . . . , M }, are Walsh-Hadamard spread, the spreader output block is subtracted from {rn , n = 1, 2, . . . , N }, and the resulting signal is passed to a threshold detector to make seconditeration decisions on {an , n = 1, 2, . . . , N }. Finally, these decisions are subtracted from the threshold detector inputs, the resulting signal is Walsh-Hadamard despread and passed to a threshold detector to make second-iteration decisions on {bm , m = 1, 2, . . . , M }. The process can continue to make further iterations as required, but two iterations are sufficient in practice for small values of M . At this point, it is important to discuss the number of MCCDMA user signals which can be superposed to the OFDMA user signals without a significant performance degradation. The WH sequences used for signal spreading are binary sequences with components ±1. Due to the multiplicative term √ each 1/ N used in signal spreading, the interference from √ MC-CDMA user on OFDMA users is of the form ±1/ N. √ When the number of MC-CDMA users reaches N , the peak interference amplitude reaches 1 and the eye diagram of the OFDMA signal becomes closed. In this case, errors occur in the first-iteration decisions of OFDMA symbols even in the absence of noise, which means that the corresponding bit error rate (BER) curve features an error floor. Correspondingly, we √ limit for the moment the number of MC-CDMA users to N , although this does not represent a strict bound. Indeed, an iterative receiver employing soft decisions instead of hard decisions as described in [15] will help accommodating a higher number of MC-CDMA users. that is close to 1 dB at BER values lower than 10−4 . At the second iteration, performance improves sharply and the BER curve virtually coincides with the theoretical BER curve of QPSK at BER values below 10−5 . These results indicate that in the case at hand no more than 2 iterations are needed in the iterative receiver to cancel the interference between OFDMA users and MC-CDMA users. Fig. 5: Bit error rate for OFDMA users for N = 64 and M = 4. V. SIMULATION RESULTS Performance of the NOMA scheme presented in the previous section was evaluated using computer simulations. The simulations were carried out over an additive white Gaussian noise (AWGN) channel using an OFDMA/MC-CDMA scheme with N = 64 carriers, 16-QAM modulation for the OFDMA users, and QPSK for the MC-CDMA users. In a first set of simulations, the number of MC-CDMA users was M = 4 and in a second set M was increased to 8 such that the superposition of the MC-CDMA signals to the OFDMA signal leads to a closed eye diagram. With M = 4, the performance results are given in Fig. 5 for OFDMA users and in Fig. 6 for MC-CDMA users. As can be seen in Fig. 5, the BER curve of OFDMA users at the first iteration has a large gap from the theoretical BER curve of 16-QAM, but the second iteration gives a remarkable result and leads essentially to the same performance as the theoretical curve for BER values below 10−3 . The gap at the first iteration can be explained by the level of interference from MC-CDMA users. Next, examining Fig. 6, we can see that performance of the MC-CDMA users has somewhat a different behavior. The performance curve at the first iteration has essentially the same shape as the theoretical BER curve of QPSK with a gap Fig. 6: Bit error rate for MC-CDMA users for N = 64 and M = 4. The results corresponding to M = 8 are given in Fig. 7 for OFDMA users and in Fig. 8 for OCDMA users. Three iterations were made in this case. Fig. 7 shows that at the first iteration, the BER curve decays only very slowly and reaches 5.10−3 at Eb /N0 of 14 dB. The second iteration reduces the bit error rate to some extent, but a BER floor slightly below 10−3 is clearly visible on that curve. A third iteration gave only a marginal improvement and did not change the value of the BER floor. Next, Fig. 8 shows that the BER curve is very flat at the first iteration and that the second iteration provides a very small improvement. The third iteration provided no improvement at all and the BER floor is slightly higher than 10−2 on this figure. This result confirms that when hard decisions are made in the iterative receiver, the number of √ MC-CDMA users must be kept below N in order to avoid the appearance of a BER floor. and OCDMA for the second set. Next, focusing on the context of 5G cellular systems, we described a practical NOMA scheme employing a combination of OFDMA and MCCDMA, which can form an attractive solution for machinetype communications in 5G. In that approach, NOMA can be viewed as an extension of OFDMA to perform channel overloading and accommodate a higher number of users when all resources of OFDMA are used. Alternatively, OFDMA and MC-CDMA can be used to accommodate two user sets with different profiles and data rate requirements. The power imbalance which is required to make reliable detection in NOMA appears very naturally in this approach, because for identical symbol energy, the power spectrum density of MCCDMA symbols is only (1/N )th of the OFDMA spectrum density. R EFERENCES Fig. 7: Bit error rate for OFDMA users for N = 64 and M = 8. Fig. 8: Bit error rate for MC-CDMA users for N = 64 and M = 8. VI. CONCLUSIONS In this paper, we have addressed NOMA, which is a strong candidate today for machine-type communications in future 5G cellular systems. After describing the basic principle of this technique, we pointed out that its foundation actually goes back to the year 2000, a fact that seems to be unnoticed by authors of recent papers. The concept appeared in a series of papers published in that period describing multiple access using two orthogonal signal sets and iterative detection with serial interference cancellation. We first gave a comprehensive review of this technique using TDMA for the first set of users [1] D. Tse and P. Viswanath, Fundamentals of Wireless Communication. Cambridge University Press, 2005. [2] A. Goldsmith, Wireless Communications. Cambridge University Press, 2005. [3] A. J. Viterbi, CDMA: Principles of Spread Spectrum Communication. Addison Wesley Longman Publishing Co., Inc., 1995. [4] H. Holma and A. Toskala, WCDMA for UMTS: HSPA Evolution and LTE. John Wiley & Sons, 2007. [5] “IEEE Standard for Local and Metropolitan Area Networks – Part 16: Air Interface for Fixed and Mobile Broadband Wireless Access Systems,” IEEE 802.16-2005, February 2006. [6] 3rd Generation Partnership Project Technical Specification Group Radio Access Network, “Evolved Universal Terrestrial Radio Access (EUTRA); User Equipment (UE) Radio Transmission and Reception,” 3GPP, Tech. Rep. (Release 8), TS 36.101 v8.7.0, September 2009. [7] H. Holma and A. Toskala, LTE for UMTS: Evolution to LTE-Advanced. John Wiley & Sons, 2011. [8] Y. Saito, Y. Kishiyama, A. Benjebbour, T. Nakamura, A. Li, and K. Higuchi, “Non-Orthogonal Multiple Access (NOMA) for Cellular Future Radio Access,” in 2013 IEEE 77th Vehicular Technology Conference (VTC Spring), June 2013, pp. 1–5. [9] Z. Ding, Z. Yang, P. Fan, and H. V. Poor, “On the Performance of NonOrthogonal Multiple Access in 5G Systems with Randomly Deployed Users,” IEEE Signal Processing Letters, vol. 21, no. 12, pp. 1501–1505, Dec 2014. [10] L. Dai, B. Wang, Y. Yuan, S. Han, C. l. I, and Z. Wang, “Non-Orthogonal Multiple Access for 5G: Solutions, Challenges, Opportunities, and Future Research Trends,” IEEE Communications Magazine, vol. 53, no. 9, pp. 74–81, September 2015. [11] Z. Ding, Y. Liu, J. Choi, Q. Sun, M. Elkashlan, C. L. I, and H. V. Poor, “Application of Non-Orthogonal Multiple Access in LTE and 5G Networks,” IEEE Communications Magazine, vol. 55, no. 2, pp. 185– 191, February 2017. [12] H. Sari, F. Vanhaverbeke, and M. Moeneclaey, “Multiple Access Using Two Sets of Orthogonal Signal Waveforms,” IEEE Communications Letters, vol. 4, no. 1, pp. 4–6, January 2000. [13] ——, “Extending the Capacity of Multiple Access Channels,” IEEE Communications Magazine, vol. 38, no. 1, pp. 74–82, January 2000. [14] ——, “Channel Overloading in Multiuser and Single-User Communications,” in 11th IEEE International Symposium on Personal Indoor and Mobile Radio Communications. PIMRC 2000. Proceedings (Cat. No.00TH8525), vol. 2, 2000, pp. 1106–1111 vol.2. [15] F. Vanhaverbeke, M. Moeneclaey, and H. Sari, “Turbo Multiple Access: Channel Overloading Using Two Sets of Orthogonal Signal Waveforms and Iterative Interference Cancellation.” in Proceedings 2nd International Symposium on Turbo Codes and Related Topics, Brest, Sept. 4-7 2000, September 2000, pp. 181–184. [16] 3rd Generation Partnership Project, “Study on New Radio Access Technology Physical Layer Aspects,” 3GPP, Tech. Rep. TR 38.802 v14.0.0, March 2017.
7cs.IT
arXiv: arXiv:0000.0000 Permutation p-value approximation via generalized Stolarsky invariance arXiv:1603.02757v2 [math.ST] 9 Aug 2017 Hera Y. He, Kinjal Basu, Qingyuan Zhao, Art B. Owen Department of Statistics Sequoia Hall Stanford University Stanford, CA 94305 e-mail: (yhe1, kinjal, qyzhao, owen)@stanford.edu Abstract: It is common for genomic data analysis to use p-values from a large number of permutation tests. The multiplicity of tests may require very tiny p-values in order to reject any null hypotheses and the common practice of using randomly sampled permutations then becomes very expensive. We propose an inexpensive approximation to p-values for two sample linear test statistics, derived from Stolarsky’s invariance principle. The method creates a geometrically derived set of approximate p-values for each hypothesis. The average of that set is used as a point estimate p̂ and our generalization of the invariance principle allows us to compute the variance of the p-values in that set. We find that in cases where the point estimate is small the variance is a modest multiple of the square of the point estimate, yielding a relative error property similar to that of saddlepoint approximations. On a Parkinson’s disease data set, the new approximation is faster and more accurate than the saddlepoint approximation. We also obtain a simple probabilistic explanation of Stolarsky’s invariance principle. 1. Introduction Permutation methods are commonly used to obtain p-values in genomic applications. They make only modest assumptions and they have a direct intuitive interpretation that appeals to biologists in collaborations. In even modestly large data sets, the exact permutation p-value becomes too expensive to compute. Then Monte Carlo sampling of random permutations becomes a standard approach. Genomic applications commonly require thousands or more of hypotheses to be tested, and then multiplicity adjustment requires that some small p-values be obtained if any null hypotheses are to be rejected. When p-values below  are required to reject H0 , then Knijnenburg et al. (2009) recommend doing at least 10/ random permutations. As a result, even Monte Carlo sampling for permutation tests can be prohibitively expensive, and hence it pays to search for fast approximations to the permutation p-value. In this paper we develop rapidly computable approximations to some permutation p-values. The p-values we consider are for a difference in group means. The approximations are based on ideas from spherical geometry and discrepancy, related to the Stolarsky invariance principle (Stolarsky, 1973). As described below, the resulting approximations prove to be very accurate for the tiny p-values where permutation methods are most difficult to use. 1 He, Basu, Zhao & Owen/Stolarsky invariance for permutations 2 We begin with some background on the genomic motivation of our work. Then we transition to spherical geometry. Genomic context The specific problem that motivated us is testing for sets of genes associated with Parkinson’s disease (Larson and Owen, 2015). More details about this work are given in the the first author’s dissertation (He, 2016). In these data sets, there are m0 subjects without Parkinson’s disease and m1 subjects with it. One can test whether Parkinson’s disease is associated with an individual gene by doing a t-test comparing gene expression levels in tissue samples from the two groups of subjects. Biological interest is often summarized more by gene sets rather than individual genes. Gene sets have two advantages: small but consistent associations of many genes with the test condition can raise power, and, the gene sets themselves often connect better to biological understanding than do individual genes. The null hypothesis is that the subject condition does not affect expression levels of any gene in the gene set. There is a very large literature on testing for significant associations between a condition and the genes in a gene set. See Ackermann and Strimmer (2009) for an overview of the main concepts and methods in that literature. They did an extensive comparison of 261 different gene set testing methods and identified two families of winning methods. Let tg be the ordinary two sample t statistic for comparing the average expression level of gene g between two conditions and let G be a set ofPgenes of interest. They P found that linear and quadratic test statistics LG = g∈G tg and QG = g∈G t2g had the best power, along with some simple approximations to those two statistics. These methods performed better than some subtantially more complicated proposals. The statistic LG was proposed by Jiang and Gentleman (2007). The statistic LG and similar ones did best when expression differences between the two conditions tend to have the same sign, for each g ∈ G. If large but oppositely signed treatment effects occur, then QG and approximations to it do best. The genes in a gene set are ordinarily correlated with each other, even if they are independent of the treatment condition. The correlations makes it difficult to find the null distributions of LG and QG , even with parametric model assumptions. In a permutation  analysis, like Ackermann and Strimmer (2009) use, we consider all N = mn1 different ways to select a subset π containing m1 of the n = m0 + m1 subjects. Let QπG be the test statistic recomputed as if those m1 subjects had been the affected group. Then the permutation p-value for QG is 1 X 1QπG >QG . p = pG = N π Note that the smallest possible value for p is 1/N . When N is too large for a permutation test to be computationally feasible, a standard practice is to estimate p via randomly sampled permutations of the treatment label as proposed by Barnard (1963). For ` = 1, . . . , M − 1 we let He, Basu, Zhao & Owen/Stolarsky invariance for permutations 3 π(`) be the affected group after a randomization of the treatment labels. We let π(0) be the original allocation. Then the Monte Carlo estimate p̂ = M −1 1 X 1Qπ(`) >QG G M `=0 is used as an estimate of p, for the quadratic statistic. In this Monte Carlo, the true permutation p-value p is the unknown parameter and p̂ is the sample estimate of p. Note that p̂ > 1/M because we have included the original allocation in the numerator. Failure to include the original allocation π(0) can lead to p̂ = 0 which is very undesirable. We call 1/M the granularity limit. When p is quite small, an enormous number M of simulations may be required to get an accurate estimate of it. For instance, in genome wide association studies (GWAS) the customary threshold for significance is  = 5 × 10−8 , making permutation methods prohibitively expensive, or even infeasible. For a recent discussion of p-value thresholds in GWAS, see Fadista et al. (2016). In this paper, we work with one of Ackermann and Strimmer’s (2009) approximations to LG . Let Xi = 1 if subject i is in condition 1 and Xi = 0 for condition 0. Let Yig be the expression level of gene g for subjectq i. Let ρ̂g be √ the sample correlation between Xi and Yig . Then tg = n − 2ρ̂g / 1 − ρ̂2g and . √ a first order Taylor approximation gives tg = n − 2(ρ̂g + ρ̂3g /2). When many small correlations ρ̂g contribute to the signal, then summing ρ̂g gives a test statistic that is almost equivalent to summing tg . Ackermann and Strimmer (2009) found that n X 1X Xi − X̄ Ygi − Ȳg n i=1 sX sg (1.1) g∈G was in the same winning set of methods as LG , where sX and sg are standard deviations of Xi and Ygi respectively. They also considered using pooled variance estimates in place of sg but found no advantage to doing so, perhaps because min(m0 , m1 ) was at least 10 in their simulations. Letting Yi = YGi ≡ P g∈G Ygi /sg , we may rewrite (1.1) as n X i=1 Yi − Ȳ Xi − X̄ kX − 1n X̄k kY − 1n Ȳ k (1.2) multiplied by a constant that only depends on n and hence does not affect p. Equation (1.2) describes a test statistic that is a plain Euclidean inner product of two unit vectors in Rn . Here x0 has i’th component (Xi − X̄)/kX − 1n X̄k and y 0 is similar.  There are N = mn1 distinct vectors found by permuting the entries in x. We label them x0 , x1 , . . . , xN −1 with x0 being the original one. Letting ρ̂ = xT 0 y0 we find that one and two-sided p-values for a linear statistic are N −1 1 X 1xTk y0 >ρ̂ N k=0 and N −1 1 X 1|xTk y0 |>|ρ̂| N k=0 He, Basu, Zhao & Owen/Stolarsky invariance for permutations 4 repectively. We prefer two-sided test statistics, but we will study one-sided ones first and then translate our results to two-sided ones. Spherical geometry We are now ready to make a geometric interpretation. Let Sd = {z ∈ Rd+1 | z T z = 1} be the d-dimensional unit sphere. Our data x0 , y 0 are in a subset of Sn−1 orthogonal to 1n . That subset is isomorphic to Sn−2 and so we work mostly with d = n − 2. Given a point y ∈ Sd , the points z that are closest to y comprise a spherical cap. The spherical cap of center y and height t ∈ [−1, 1] is C(y; t) = {z ∈ Sd | hy, zi > t}. By symmetry, z ∈ C(y; t) if and only if y ∈ C(z; t). The one-sided linear p-value is the fraction of xk for 0 6 k < N that belong to C(y 0 ; ρ̂). A natural, but crude approximation to p is then p̂1 (ρ̂), where p̂1 (t) ≡ vol(C(y 0 ; t)) . vol(Sd ) Stolarsky’s invariance principal gives a remarkable description of the accuracy of this approximation p̂1 . The squared L2 spherical cap discrepancy of points x0 , x1 , . . . , xN −1 ∈ Sd is Z 1Z 2 L2 (x0 , . . . , xN −1 ) = |p̂1 (t) − p(z, t)|2 dσd (z) dt −1 Sd PN −1 where p(z, t) = (1/N ) k=0 1xk ∈C(z,t) and σd is the uniform (Haar) measure on Sd . Stolarsky (1973) shows that dωd × L2 (·)2 = ωd+1 Z Z kx − yk dσd (x) dσd (y) − Sd Sd N −1 1 X kxk − xl k N2 (1.3) k,l=0 where ωd is the (surface) volume of Sd . Equation (1.3) relates the mean squared error of p̂1 to the mean absolute Euclidean distance among the N points. In our applications, the N points will be the distinct permuted values of x0 , but (1.3) holds for an arbitrary set of N points xk . The left side of (1.3) is, up to normalization, a mean squared discrepancy over spherical caps. This average of (p̂1 − p)2 includes p-values of all sizes between 0 and 1. It is not then a very good accuracy measure when p̂1 (ρ̂) turns out to be very small, such as 10−6 . It would be more useful to get such a mean squared error taken over caps of exactly the size p̂1 (ρ̂), and no others. Brauchart and Dick (2013) consider quasi-Monte Carlo (QMC) sampling in the sphere. They generalize Stolarsky’s discrepancy formula to include a weighting function on the height t. By specializing their formula, we get an expression for the mean of (p̂1 − p)2 over spherical caps of any fixed size. Discrepancy theory plays a prominent role in QMC (Niederreiter, 1992), which is about approximating an integral by a sample average. The present He, Basu, Zhao & Owen/Stolarsky invariance for permutations 5 setting is a reversal of QMC: the discrete average p over permutations is the exact value we seek, and the integral over a continuum is the approximation p̂. A second difference is that the QMC literature focusses on choosing N points to minimize a criterion such as (1.3), whereas here the N points are determined by the problem. As we will show below, the estimate p̂1 is the average of p over all spherical caps C(y; ρ̂) under a uniform distribution, i.e., y ∼ U(Sd ). Those caps have the same volume as C(y 0 ; ρ̂). In addition to specializing from caps C(y; t) with t = ρ̂ we can also specialize to caps whose centers y more closely resemble y 0 . Suppose that y 0 ∈ Y ⊂ Sd . Then we know that p(y 0 , ρ̂) 6 supy∈Y p(y, ρ̂), which is a conservative permutation p-value. We are generally unable to compute this quantity but in some instances we can form a reference distribution y ∼ U(Y) and compute both E(p(y, ρ̂) | y ∈ Y) and Var(p(y, ρ̂) | y ∈ Y), the mean and variance of p(y, ρ̂) under this distribution. The simplest reference distribution we use has Y1 = Sd . We have found that the set Y2 = {y ∈ Sd | y T x0 = y T 0 x0 } and some generalizations yield especially useful reference distributions. Generalizations of the Stolarsky formula allow us to compute Var(p(y, ρ̂) | y ∈ Y2 ). In some of our numerical results from Section 7, we find that Var(p(y, ρ̂) | y ∈ Y2 ) is so small that the true permutation p-value p(y 0 , ρ̂) must be of the same order of magnitude as the estimate p̂2 ≡ E(p(y, ρ̂) | y ∈ Y2 ) that we study at length. We obtain p̂2 and the mean square discrepancy over its reference distribution by further extending Brauchart and Dick’s generalization of Stolarsky’s invariance. More generally, we can replace the constraint hy, x0 i = hy 0 , x0 i by hy, xc i = hy 0 , xc i for any individual c ∈ {0, 1, . . . , N − 1}. Our estimate p̂3 takes xc to be whichever permuted point xk happens to be closest to y 0 . Smaller sets Y could be even better than Y2 . In the extreme, if we could work with Y that satisfies hy, xk i = hy 0 , xk i, for all 0 6 k < N then all y ∈ Y would have p(y, ρ̂) = p(y 0 , ρ̂) = p and the mean over y ∈ Y would have no error. Any smaller set is only useful if we can efficiently compute with it. Although we found these results via invariance, we can also obtain them via probabilistic arguments. As a consequence we have a probabilistic derivation of Stolarsky’s formula. Bilyk et al. (2016) have independently found this connection. Some of our results are for arbitrary x, but our best computational formulas are for the case where the variable x is binary, as it is for the Parkinson’s disease data sets. Outline The rest of the paper is organized as follows. Section 2 presents some context on permutation tests and gives some results from spherical geometry. In Section 3 we use Stolarsky’s invariance principle as generalized by Brauchart and He, Basu, Zhao & Owen/Stolarsky invariance for permutations 6 Dick (2013) to obtain the mean squared error between the true p-value and its continuous approximation p̂1 , averaging over all spherical caps of volume p̂1 . This section also has a probabilistic derivation of that mean squared error. In Section 4 we describe some finer approximations p̃ for the p-value. These use the set Y2 to condition on not just the volume of the spherical cap but also on its distance from the original data point x0 , or from some other point, such as the closest permutation of x0 to y 0 . By always including the original point we ensure that p̃ > 1/N . That is a desirable property because the true permutation p-value cannot be smaller than 1/N . In Section 5 we modify the proof in Brauchart and Dick (2013), to further generalize their invariance results to include the mean squared error of the finer approximations. Section 6 extends our estimates to two-sided testing. Section 7 illustrates our p-value approximations numerically. We see that an RMS error in the estimate p̂2 is of the same order of magnitude as p̂2 itself. That is, p̂2 has a relative error property like saddlepoint estimates do. Section 8 makes a numerical comparison to saddlepoint methods in simulated data. The saddlepoint estimates come out more accurate than p̂2 but are biased low in the simulated examples. Section 9 compares the accuracy of our approximations to each other and to the saddlepoint approximation for 6180 gene sets and some Parkinson’s disease data sets. In the data examples, the new approximations come out closer to some gold standard estimates (based on large Monte Carlo samples) than the saddlepoint estimates do, which once again are biased low. From Table 6.3 of He (2016), the saddlepoint computations take roughly 30 times longer than p̂2 does. Section 10 draws some conclusions and discusses the challenges in getting a computationally feasible p-value that accounts for both sampling uncertainty of (x, y) and the uncertainty in p̂ as an estimate of p. Most of the proofs are in the Appendix, Section 11. Software The proposed approximations are implemented in the R package pipeGS on CRAN. Given a binary input label and a gene expression measurement matrix, it computes our three p value approximations for the linear gene set statistics. Those statistics, p̂1 , p̂2 , p̂3 , are mentioned above and then presented in more detail in Section 4. We provide an implementation of the saddlepoint approximation in the package as well. 2. Background and notation The raw data contain points (Xi , Yi ) for i = 1, . . . , n, where Yi may be a composite quantity derived from all Ygi for g belonging to a gene set G, such as Yi = YGi just before (1.2). We center and scale vectors (X1 , X2 , . . . , Xn ) and (Y1 , Y2 , . . . , Yn ) yielding x0 , y 0 ∈ Sd for d = n − 1. Both points belong to {z ∈ Sn−1 | z T 1n = 0}. We can use an orthogonal matrix to rotate the points of this set onto Sn−2 × {0}. As a result, we may simply work with x0 , y 0 ∈ Sd where d = n − 2. He, Basu, Zhao & Owen/Stolarsky invariance for permutations 7 The sample correlation of these variables is ρ̂ = xT 0 y 0 = hx0 , y 0 i. We use hx0 , y 0 i when we find that geometrical thinking is appropriate and to conform with Brauchart and Dick (2013). We use xT 0 y 0 to emphasize computational or algebraic connotations. Here we develop approximations to the one-sided p-value as that simplifies notation. Section 6 shows how to obtain the corresponding two-sided p-values. We assume that ρ̂ > 0 for otherwise p̂1 is going to be too large to be interesting. For instance with m0 = m1 , ρ̂ 6 0 implies that p̂1 > 1/2. Our proposals are computationally most attractive in the case where Xi takes on just two values, such as 0 and 1. Then ρ̂ is a two-sample test statistic for a difference in means. When there are m0 observations with p Xi = 0 and m1 m1 /(nm0 ) and m1 with Xi = 1 then x0 contains m components equal to − 0 p components equal to + m0 /(nm1 ). Computational costs are often sensitive to the smaller sample size, m ≡ min(m0 , m1 ).  1 For this two-sample case there are only N = m0m+m distinct permuta0 tions of x0 . We have called these x0 , x1 , . . . , xN −1 and the true p value is PN −1 PN −1 p = (1/N ) k=0 1(xT k y 0 > ρ̂) = (1/N ) k=0 1(xk ∈ C(y 0 ; ρ̂)). Now suppose that there are exactly r indices for which xk is positive and x` is negative. There are then r indices with the reverse pattern too. We say that xk and x` are at ‘swap distance r’ because r zeros from xk swapped positions with ones to yield x` . In that case we easily find that u(r) ≡ hxk , x` i = 1 − r  1 1  + . m0 m1 (2.1) We need some geometric properties of the unit sphere and spherical caps. The surface volume of Sd is ωd = 2π (d+1)/2 /Γ((d + 1)/2). We use σd for the volume element in Sd normalized so that σd (Sd ) = 1. The spherical cap C(y; t) = {z ∈ Sd | z T y > t} has volume (  1 I1−t2 d2 , 21 , 06t61 2  σd (C(y; t)) = d 1 1 2 1 − 2 I1−t 2 , 2 , −1 6 t < 0 where It (a, b) is the incomplete beta function 1 It (a, b) = B(a, b) Z t xa−1 (1 − x)b−1 dx 0 R1 with B(a, b) = 0 xa−1 (1 − x)b−1 dx. Obviously, this volume is 0 if t < −1 and it is 1 if t > 1. This volume is independent of y so we may write σd (C(· , t)) for the volume. Our first approximation of the p-value is p̂1 (ρ̂) = σd (C(y; ρ̂)). We remarked earlier that this approximation equates a discrete fraction to a volume ratio. We show in Proposition 2 that p̂1 = E(p | hx0 , yi = ρ̂) for y ∼ U(Sd ) as y 0 would if the original Yi were IID Gaussian. In Theorem 4, we find Var(p̂1 ) under this assumption. He, Basu, Zhao & Owen/Stolarsky invariance for permutations 8 d d We frequently √ need to project y ∈ S onto a point x ∈ S . In this representation y = tx + 1 − t2 y ∗ where t = y T x ∈ [−1, 1] and y ∗ ∈ {z ∈ Sd | z T x = 0} which is isomorphic to Sd−1 . The coordinates t and y ∗ are unique. From equation (A.1) in Brauchart and Dick (2013) we get dσd (y) = ωd−1 (1 − t2 )d/2−1 dt dσd−1 (y ∗ ). ωd (2.2) In their case x was (0, 0, . . . , 1). The intersection of two spherical caps of common height t is C2 (x, y; t) ≡ C(x; t) ∩ C(y; t). We will need the volume of this intersection. Lee and Kim (2014) give a general solution for spherical cap intersections without requiring equal heights. They enumerate 25 cases, but our case does not correspond to any single case of theirs and so we obtain the formula we need directly, below. We suspect it must be known already, but we were unable to find it in the literature. Lemma 1. Let x, y ∈ Sd and −1 6 t 6 1 and put u = xT y. Let V2 (u; t, d) = σd (C2 (x, y; t)). If u = 1, then V2 (u; t, d) = σd (C(x; t)). If −1 < u < 1, then Z d ωd−1 1 (1 − s2 ) 2 −1 σd−1 (C(y ∗ ; ρ(s))) ds, V2 (u; t, d) = ωd t p where ρ(s) = (t − su)/ (1 − s2 )(1 − u2 ). Finally, for u = −1, ( 0, t>0 V2 (u; t, d) = ωd−1 R |t| −1 2 d (1 − s ) 2 ds, else. ωd −|t| (2.3) (2.4) Proof. Let z ∼ U(Sd ). Then V2 (u; t, d) = σd (C2 (x, y; t)) = Pr(z ∈ C2 (x, y; t)). If u = 1 then x = y and√so C2 (x, y; t) = C(x; t).√For u < 1, we project y and z onto x, via z = sx + 1 − s2 z ∗ and y = ux + 1 − u2 y ∗ . Now Z V2 (u; t, d) = 1(hx, zi > t)1(hy, zi > t) dσ(z) Sd 1 Z = d ωd−1 (1 − s2 ) 2 −1 ωd p p 1(su + 1 − s2 1 − u2 hy ∗ , z ∗ i > t) dσd−1 (z ∗ ) ds. 1(s > t) −1 Z × Sd−1 If u > −1 then this reduces to (2.3). For u = −1 we get V2 (u; t, d) = which reduces to (2.4). ωd−1 ωd Z 1 −1 d 1(s > t)1(−s > t)(1 − s2 ) 2 −1 ds. He, Basu, Zhao & Owen/Stolarsky invariance for permutations 9 When we give probabilistic arguments and interpretations we do so for a random center y of a spherical cap. That random center is taken from two reference distributions. Those are distributions 1 and 2 below. Reference distribution 1 is illustrated in Figure 1. Distribution 2 is illustrated in Figure 2 of Section 4 where we first use it. Reference distribution 1. The vector y ∼ U(Y1 ) where Y1 = Sd . Expectation under this distribution is denoted E1 (·). Reference distribution 2. The vector y ∼ U(Y2 ) where Y2 = {z ∈ Sd | z T xc = ρ̃}, p for some −1 6 ρ̃ 6 1, and c ∈ {0, 1, . . . , N − 1}. Then y = ρ̃xc + 1 − ρ̃2 y ∗ for y ∗ uniformly distributed on a subset of Sd isomorphic to Sd−1 . Expectation under this distribution is denoted E2 (·). Reference distribution 1 holds true if the Yi are IID Gaussian random variables (with positive variance). In that case, the estimate p̂1 is the same as we would get under a t-test. Reference distribution 2 is a significant narrowing of reference distribution 1 in the direction of the ultimate reference distribution: a point mass on y = y 0 . 3. Approximation via spherical cap volume Here we study the approximate p-value p̂1 (ρ̂) = σd (C(y; ρ̂)). First we find the mean squared error of this approximation over all spherical caps of the given volume via invariance. Next we give a probabilistic interpretation which includes the conditional unbiasedness result in Proposition 2 below. Then we give two computational simplifications, first taking advantage of the permutation structure of our points, and then second for permutations of a binary vector. We begin by restating the invariance principle. Theorem 1. Let x0 , . . . , xN −1 be any points in Sd . Then Z 1Z N −1 N −1 2 1 X 1 1 X kx − x k + σ (C(z; t)) − 1 (x ) dσd (z) dt k ` k d C(z;t) N2 Cd −1 Sd N k,`=0 k=0 Z Z = kx − yk dσd (x) dσd (y) Sd Sd where Cd = ωd−1 /(dωd ). Proof. Stolarsky (1973). Brauchart and Dick (2013) gave a simple proof of Theorem 1 using reproducing kernel Hilbert spaces. They also generalized Theorem 1 as follows. He, Basu, Zhao & Owen/Stolarsky invariance for permutations ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● Sd ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● y0 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● y1 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 10 ● Fig 1: Illustration for reference distribution 1. The point y is uniformly distributed over Sd . The small open circles represent permuted vectors xk . The point y 0 is the observed value of y. The circle around it goes through x0 and represents a spherical cap of height y T 0 x0 . A second spherical cap of equal volume is centered at y = y 1 . We study moments of p(y, ρ̂), the fraction of xk in the cap centered at random y. Theorem 2. Let x0 , . . . , xN −1 be any points in Sd . Let v : [−1, 1] → (0, ∞) be any function with an antiderivative. Then Z 1 Z N −1 2 1 X 1C(z;t) (xk ) dσd (z) dt v(t) σd (C(z; t)) − N −1 Sd k=0 (3.1) Z Z N −1 X 1 = 2 Kv (xk , x` ) − Kv (x, y) dσd (x) dσd (y) N Sd Sd k,l=0 where Kv (x, y) is a reproducing kernel function defined by Z 1 Z Kv (x, y) = v(t) 1C(z;t) (x)1C(z;t) (y) dσd (z) dt. −1 (3.2) Sd Proof. See Theorem 5.1 in Brauchart and Dick (2013) If we set v(t) = 1 and K(x, y) = 1 − Cd kx − yk, then we recover the original Stolarsky formula. Note that the statement of Theorem 5.1 in Brauchart and He, Basu, Zhao & Owen/Stolarsky invariance for permutations 11 Dick (2013) has a sign error in their counterpart to (3.1). The corrected statement (3.1) can be verified by comparing equations (5.3) and (5.4) of Brauchart and Dick (2013). We would like a version of (3.1) just for one value of t such as t = ρ̂ = xT 0 y0 . For ρ̂ ∈ [−1, 1) and  = (1 , 2 ) ∈ (0, 1)2 , let v (t) = 2 + 1 1(ρ̂ 6 t 6 ρ̂ + 1 ). 1 (3.3) Each v satisfies the conditions of Theorem 2 making (3.1) an identity in . We let 2 → 0 and then 1 → 0 on both sides of (3.1) for v = v yielding Theorem 3. Theorem 3. Let x0 , x1 , . . . , xN −1 ∈ Sd and t ∈ [−1, 1]. Then Z |p(y, t) − p̂1 (t)|2 dσd (y) = Sd N −1 N −1 1 X X σd (C2 (xk , x` ; t)) − p̂1 (t)2 . N2 (3.4) k=0 `=0 Proof. See Section 11.1 of the Appendix which uses the limit argument described above. We now give a proposition that holds for all distributions of y ∈ Sd including our reference distributions 1 and 2. Proposition 1. For a random point y ∈ Sd , E(p(y, t)) = N −1 1 X Pr(y ∈ C(xk ; t)), N and (3.5) N −1 1 X Pr(y ∈ C2 (xk , x` ; t)). E(p(y, t) ) = 2 N (3.6) k=0 2 k,`=0 Proposition 2. For any x0 , . . . , xN −1 ∈ Sd and t ∈ [−1, 1], p̂1 (t) = E1 (p(y, t)). h 1 NP i −1 Proof. E1 (p(y, t)) = E1 1C(y;t) (xk ) = σd (Cd (y; t)) = p̂1 (t). N k=0 Combining Propositions 1 and 2 with Theorem 3 we find that if y ∼ U(Sd ), as it would for IID Gaussian Yi , then p(y, ρ̂) is a random variable with mean p̂1 (ρ̂) and variance given by (3.4) with t = ρ̂. Here ρ̂ = xT 0 y 0 is fixed while y is random. The right hand side of (3.4) sums O(N 2 ) terms. In a permutation analysis 1 we might have N = n! or N = m0m+m for binary Xi , and so the computational 0 cost could be high. The symmetry in a permutation set allows us to use Z Sd |p(y, t) − p̂1 (t)|2 dσd (y) = N −1 1 X σd (C2 (x0 , xk ; t)) − p̂1 (t)2 N k=0 instead. This expression costs O(N ), the same as the full permutation analysis. The cost can be reduced for binary Xi . He, Basu, Zhao & Owen/Stolarsky invariance for permutations 12 When the Xi are binary, then for fixed t, σd (C2 (xk , x` ; t)) just depends on the swap distance r between xk and x` . Then Z |p(y, t) − p̂1 (t)|2 dσd (y) = Sd m 1 X Nr V2 (u(r); t, d) − p̂1 (t)2 N r=0 for V2 (u(r); t, d) given in Lemma 1, where Nr = pairs (xk , x` ) at swap distance r. PN −1 PN −1 k=0 `=0 (3.7) 1(rk,` = r) counts Theorem 4. Let x0 ∈ Sd be the centered and scaled vector from an experiment with binary Xi of which  m0 are negative and m1 are positive. Let x0 , dx1 , . . . , xN −1 1 be the N = m0m+m distinct permutations of x0 . If y ∼ U(S ), then for 0 t ∈ [−1, 1], and with u(r) defined in (2.1), E(p(y, t)) = σd (C(y 0 ; t)), and m    m1 1 X m0 V2 (u(r); t, d) − p̂1 (t)2 . Var(p(y, t)) = r N r=0 r Proof. There are m0 r  m1 r  permuted points xi at swap distance r from x0 . 4. A finer approximation to the p-value In the previous section, we studied the distribution of permutation p-values p(y, t) with spherical cap centers y ∼ U(Sd ) and heights t = ρ̂. In this section, we use reference distribution 2 to obtain a finer approximation to p(y 0 , ρ̂) by studying the distribution of the p-values with centers y satisfying the constraint hy, x0 i = hy 0 , x0 i = ρ̂. That is y has reference distribution 2, which is U(Y2 ). Our methods also let us impose the constraint hy, xc i = hy 0 , xc i ≡ ρ̃ for any c = 0, 1, 2, . . . , N − 1 that we like. Conditioning on hy, xc i = ρ̃ eliminates many irrelevant y from consideration. In addition to our estimate p̂2 obtained by xc = x0 , we consider a second choice. It is to choose xc to be the closest permutation of x0 to y 0 . That is c = arg maxk hy 0 , xk i. For an index c ∈ {0, 1, . . . , N − 1} conditioning as above leads to p̃c = E2 (p(y, ρ̂)) = E1 (p(y, ρ̂) | y T xc = y T 0 xc ), (4.1) and our two special cases are p̂2 ≡ p̃0 , and p̂3 ≡ p̃c , where c = arg max hy 0 , xk i. 06k<N (4.2) For an illustration of reference distribution 2 see Figure 2. Notice that p̂2 cannot go below 1/N because all of the points y that it includes have x0 ∈ C(y; ρ̂). In fact x0 is on the boundary of this spherical cap. Since the true value satisfies p > 1/N , having p̂2 > 1/N is a desirable property. Similarly, p̂3 > 1/N because then xc is in general an interior point of C(y, ρ̂). We expect He, Basu, Zhao & Owen/Stolarsky invariance for permutations ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● Sd ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● xc ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● y0 ● ● ● ● ● ● ● ● ● ● ● ● ● y2 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● y1 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 13 ● Fig 2: Illustration for reference distribution 2. The original response vector is y 0 with y T 0 x0 = ρ̂ and x0 marked xc. We consider alternative y uniformly distributed on the surface of C(x0 ; ρ̂) (dashed circle) with examples y 1 and y 2 . Around each such y j there is a spherical cap of height ρ̂ that just barely includes xc = x0 . The small open circles are permuted points xk . The fraction of those open circles that belong to the spherical cap C(y, ρ̂) is p(y, ρ̂). We use p̂2 = E2 (p(y, ρ̂)) and find an expression for E2 ((p̂2 − p(y, ρ̂))2 ). that p̂3 should be more conservative than p̂2 and we see this numerically in Section 7. From Proposition 1, we can get our estimate p̃c and its mean squared error by finding single and double inclusion probabilties for y. To compute p̃c we need to sum N values Pr(y ∈ C(xk ; t) | y T xc = ρ̃) and for p̃c to be useful we must compute it in o(N ) time. The computations are feasible in the binary case (Xi at two levels), which we now focus on. Let uj = xT j = 1, 2, and let u3 = xT 1 x2 . Let the projection of y j x0 forp ∗ 2 on xc be y = ρ̃xc + 1 − ρ̃ y . Then the single and double point inclusion probabilities under reference distribution 2 are Z P1 (u1 , ρ̃, ρ̂) = 1(hy, x1 i > ρ̂) dσd−1 (y ∗ ), and (4.3) Sd−1 Z P2 (u1 , u2 , u3 , ρ̃, ρ̂) = 1(hy, x1 i > ρ̂)1(hy, x2 i > ρ̂) dσd−1 (y ∗ ) (4.4) Sd−1 He, Basu, Zhao & Owen/Stolarsky invariance for permutations 14 where ρ̂ = hx0 , y 0 i. If two permutations of x0 are at swap distance r, then their −1 inner product is u(r) = 1 − r(m−1 0 + m1 ) from equation (2.1). p Lemma 2. Let the projection of x1 onto xc be x1 = u1 xc + 1 − u21 x∗1 . Then the single point inclusion probability from (4.3) is ( 1(ρ̃u1 > ρ̂), u1 = ±1 or ρ̃ = ±1 P1 (u1 , ρ̃, ρ̂) = (4.5) σd−1 (C(x∗1 , ρ∗ )), u1 ∈ (−1, 1), ρ̃ ∈ (−1, 1) where ρ∗ = (ρ̂ − ρ̃u1 )/ p (1 − ρ̃2 )(1 − u21 ). p Proof. The projection of y onto xc is y = ρ̃xc + 1 − ρ̃2 y ∗ . Now ( ρ̃u1 , u1 = ±1 or ρ̃ = ±1 p p hy, x1 i = ∗ ∗ 2 2 ρ̃u1 + 1 − ρ̃ 1 − u1 hy , x1 i , u1 ∈ (−1, 1), ρ̃ ∈ (−1, 1) and the result easily follows. We can now give a computable expression for p̃c and hence for p̂2 and p̂3 . Theorem 5. For −1 6 ρ̂ 6 1 and −1 6 ρ̃ 6 1, p̃c = E2 (p(y, ρ̂)) = m    1 X m0 m1 P1 (u(r), ρ̃, ρ̂) N r=0 r r (4.6) where u(r) is given in equation (2.1), P1 (u(r), ρ̃, ρ̂) is given in equation (4.5) and ρ̃ = xT c y0 .   Proof. There are mr0 mr1 permutations of x0 at swap distance r from xc . From (4.6) we see that p̃c can be computed in O(m) work. The mean squared error for p̃c is more complicated and will be more expensive. We need the double point inclusion probabilities and then we need to count the number of pairs xk , x` forming a given set of swap distances among xk , x` , xc . Lemma 3. For j = 1, 2, let rj be the swap distance of xj from xc and let r3 be the swap distance between x1 and x2 . Let u1 , u2 , u3 be the corresponding inner products given by (2.1). If there are equalities among x1 , x2 and xc , then the double point inclusion probability from (4.4) is  x1 = x2 = xc  1(ρ̃ > ρ̂),  1(ρ̃ > ρ̂)P (u , ρ̃, ρ̂), x = x 6= x 1 2 1 c 2 P2 (u1 , u2 , u3 , ρ̃, ρ̂) =  1(ρ̃ > ρ̂)P (u , ρ̃, ρ̂), x = x = 6 x 1 1 2 c 1    P1 (u2 , ρ̃, ρ̂), x1 = x2 6= xc . If x1 , x2 and xc are three distinct points with min(u1 , u2 ) = −1, then ( 1(−ρ̃ > ρ̂)P1 (u2 , ρ̃, ρ̂), u1 = −1 P2 (u1 , u2 , u3 , ρ̃, ρ̂) = 1(−ρ̃ > ρ̂)P1 (u1 , ρ̃, ρ̂), u2 = −1. He, Basu, Zhao & Owen/Stolarsky invariance for permutations 15 m m z }|1 { z }|0 { xc = ( +, +, +, +, +, · · · , +, +, +, +, −, −, −, −, · · · , −, −, −, −, − ) m m z }|1 { z }|0 { x1 = ( +, +, +, · · · , +, −, −, −, · · · , −, +, +, +, · · · , +, +, +, −, · · · , − ) {z } | {z } | r1 r1 m1 m z }| { z }|0 { x2 = ( +, · · · , +, −, −, · · · , −, +, · · · , +, −, · · · , −, +, +, · · ·, +, −, · · · , − ) | {z } | {z } δ1 | {z r2 δ2 } | {z } r2 Fig 3: Illustration of r1 , r2 , δ1 and δ2 . The points xc , x1 and x2 each have m0 negative and m1 positive components. For j = 1, 2 the swap distance between xj and xc is rj . There are δ1 positive components of xc where both x1 and x2 are negative, and δ2 negative components of xc where both xj are positive. Otherwise −1 < u1 , u2 < 1, and then P2 (u1 , u2 , u3 , ρ̃, ρ̂)   1(ρ̃u1 > ρ̂)1(ρ̃u2 > ρ̂),    R 1 ω d−1 d−2 (1 − t2 ) 2 −1 1(t > ρ1 )1(tu∗3 > ρ2 ) dt, = −1 ωd−1    R 1 ωd−2  2 d−1  2 −1 1(t > ρ )σ  −1 ω (1 − t ) C x∗∗ 1 d−2 2 , √ d−1 ρ̃ = ±1 ρ̃ 6= ±1, u∗3 = ±1 ρ2 −tu∗ 3 1−t2 √ 1−u∗2 3  dt, ρ̃ 6= ±1, |u∗3 | < 1 where u∗3 = p u3 − u1 u2 p 1 − u21 1 − u22 and ρ̂ − ρ̃uj q , j = 1, 2 ρj = p 1 − ρ̃2 1 − u2j (4.7) ∗ ∗ and x∗∗ 2 is the residual from the projection of x2 on x1 . Proof. See Section 11.2. Next we consider the swap configuration among x1 , x2 and xc . Let xj be at swap distance rj from xc , for j = 1, 2. We let δ1 be the number of positive components of xc that are negative in both x1 and x2 . Similarly, δ2 is the number of negative components of xc that are positive in both x1 and x2 . See Figure 3. The swap distance between x1 and x2 is then r3 = r1 + r2 − δ1 − δ2 . Let r = (r1 , r2 ), δ = (δ1 , δ2 ) and r = min(r1 , r2 ). We will study values of r1 , r2 , r3 , δ1 , δ2 ranging over the following sets: r1 , r2 ∈ R = {1, . . . , m} δ1 ∈ D1 (r) = {max(0, r1 + r2 − m0 ), . . . , r} δ2 ∈ D2 (r) = {max(0, r1 + r2 − m1 ), . . . , r}, and r3 ∈ R3 (r) = {max(1, r1 + r2 − 2r), . . . , min(r1 + r2 , m, m0 + m1 − r1 − r2 )}. He, Basu, Zhao & Owen/Stolarsky invariance for permutations 16 Whenever the lower bound for one of these sets exceeds the upper bound, we take the set to be empty, and a sum over it to be zero. Note that while r1 = 0 is possible, it corresponds to x1 = xc and we will handle that case specially, excluding it from R. The number of pairs (x` , xk ) with a fixed r and δ is        m0 m1 m0 − δ1 m1 − δ2 m0 − r1 m1 − r1 c(r, δ) = . (4.8) δ1 δ2 r1 − δ1 r1 − δ2 r2 − δ1 r2 − δ2 Then the number of configurations given r1 , r2 and r3 is X X c(r, δ)1(r3 = r1 + r2 − δ1 − δ2 ). c(r1 , r2 , r3 ) = (4.9) δ1 ∈D1 δ2 ∈D2 We can now get an expression for the expected mean squared error under reference distribution 2 which combined with Theorem 5 for the mean provides an expression for the mean squared error of p̃c . Theorem 6. For −1 6 ρ̂ 6 1 and −1 6 ρ̃ 6 1,  m    X m0 m1 1 P2 (1, u(r), u(r), ρ̃, ρ̂) 1(ρ̃ > ρ̂) + 2 r r N2 r=1 m    X m0 m1 (4.10) + P1 (u(r), ρ̃, ρ̂) r r r=1  X X X + c(r1 , r2 , r3 )P2 (u1 , u2 , u3 , ρ̃, ρ̂) E2 (p(y, ρ̂)2 ) = r1 ∈R r2 ∈R r3 ∈R3 (r) where P2 (·) is the double inclusion probability in (4.4) and c(r1 , r2 , r3 ) is the configuration count in (4.9). Proof. See Section 11.3 of the Appendix. In our experience, the cost of computing E2 (p(y, ρ̂)2 ) under reference distribution 2 is dominated by the cost of the O(m3 ) integrals required to get the P2 (·) values in (4.10). The cost also includes an O(m4 ) component because c(r1 , r2 , r3 ) is also a sum of O(m) terms, but it did not dominate the computation at the sample sizes we looked at (up to several hundred). 5. Generalized Stolarsky Invariance Here we obtain the results for reference distribution 2 in a different way, by extending the work by Brauchart and Dick (2013). They introduced a weight on the height t of the spherical cap in the average. We now apply a weight function to the inner product hz, xc i between the center z of the spherical cap and a special point xc . He, Basu, Zhao & Owen/Stolarsky invariance for permutations 17 Theorem 7. Let x0 , . . . , xN −1 be arbitrary points in Sd and v(·) and h(·) be positive functions in L2 ([−1, 1]). Then for any x0 ∈ Sd , the following equation holds, N −1 2 1 X v(t) 1C(z;t) (xk ) dσd (z) dt h(hz, x i) σd (C(z; t)) − N −1 Sd k=0 Z Z N −1 X 1 = 2 Kv,h,x0 (xk , x` ) + Kv,h,x0 (x, y) dσd (x) dσd (y) N Sd Sd Z 1 Z 0 (5.1) k,`=0 − N −1 Z 2 X Kv,h,x0 (x, xk ) dσd (x) N Sd k=0 where Kv,h,x0 : Sd × Sd → R is a reproducing kernel defined by Z 1 Z Kv,h,x0 (x, y) = v(t) h(hz, x0 i)1C(z;t) (x)1C(z;t) (y) dσd (z) dt. (5.2) Sd −1 Proof. See Section 11.4 of the Appendix. Remark. We will use this result for x0 = xc , where xc is one of the N given points. The theorem holds for general x0 ∈ Sd , but the result is computationally and statistically more attractive when x0 = xc . We now show that the second moment in Theorem 6 holds as a special limiting case of Theorem 7. In addition to v from Section 3 we introduce η = (η1 , η2 ) ∈ (0, 1)2 and hη (s) = η2 + η1 ( ωωd−1 (1 d 1 1(ρ̃ 6 s 6 ρ̃ + η1 ) − s2 )d/2−1 ) (5.3) Using these results we can now establish the following theorem, which provides the second moment of p(y, ρ̂) under reference distribution 2. Theorem 8. Let x0 ∈ Sd be the centered and scaled vector from an experiment with binary Xi of which  m0 are negative and m1 are positive. Let x0 , x1 , . . . , xN −1 1 be the N = m0m+m distinct permutations of x0 . Let xc be one of the xk and 0 define p̃c by (4.1). Then E2 (p̃c (y, ρ̂)2 ) = N −1 Z 1 X 1(hy, xk i > ρ̂)1(hy, x` i > ρ̂) dσd−1 (y ∗ ) N2 Sd−1 k,`=0 where y = ρ̃xc + p 1 − ρ̃2 y ∗ . Proof. The proof uses Theorem 7 with a sequence of h defined in (5.3) and v defined in (3.3). See Section 11.5 of the appendix. This result shows that we can use the invariance principle to derive the second moment of p(y, ρ̂) under reference distribution 2. The mean square in Theorem 8 is consistent with the second moment equation (3.6) in Proposition 1. He, Basu, Zhao & Owen/Stolarsky invariance for permutations 18 6. Two-sided p-values In statistical applications it is more usual to report two-sided p-values. A conservative approach is to use 2 min(p, 1 − p) where p is a one-sided p-value. A sharper choice is N −1 1 X p= 1(|xT k y 0 | > |ρ̂|). N k=0 This choice changes our estimate under reference distribution 2. It also changes the second moment of our estimate p̂1 . The two-sided version of the estimate p̂1 (ρ̂) is 2σd (C(y; |ρ̂|)), the same as if we had doubled a one-sided estimate. Also E1 (p) = p̂1 in the two-sided case. We now consider the mean square for the two-sided estimate under reference distribution 1. For x1 , x2 ∈ Sd with u = xT 1 x2 , the two-sided double inclusion probability under reference distribution 1 is Z Ṽ2 (u; t, d) = 1(|z T x1 | > |t|)1(|z T x2 | > |t|) dσd (z). Sd T Writing 1(|z xi | > |t|) = 1(z T xk > |t|) + 1(z T (−xk ) > |t|) for k = 1, 2 and expanding the product, we get Ṽ2 (u; t, d) = 2V2 (u; |t|, d) + 2V2 (−u; |t|, d). By replacing V2 (u, t, d) with Ṽ2 (u, t, d) and p̂1 (t) with 2σd (C(y; |t|)) in Theorem 4, we get the variance of two-sided p-values under reference distribution 1. To obtain corresponding formulas under reference distribution 2, we use the T usual notation. Let uj = xT j x0 for j = 1, 2, and let u3 = x1 x2 . Let the projection p of y on xc be y = ρ̃xc + 1 − ρ̃2 y ∗ . Now Z  P̃1 (u1 , ρ̃, ρ̂) = 1 |hy, x1 i| > |ρ̂| dσd−1 (y ∗ ), and, (6.1) d−1 ZS   P̃2 (u1 , u2 , u3 , ρ̃, ρ̂) = 1 |hy, x1 i| > |ρ̂| 1 |hy, x2 i| > |ρ̂| dσd−1 (y ∗ ) (6.2) Sd−1 are the appropriate single and double inclusion probabilities. After writing 1(|hy, xk i| > |ρ̂|) = 1(hy, xk i > |ρ̂|) + 1(hy, −xk i > |ρ̂|) for k = 1, 2 and expanding the product, we get P̃1 (u1 , ρ̃, ρ̂) = P1 (u1 , ρ̃, |ρ̂|) + P1 (−u1 , ρ̃, |ρ̂|), and P̃2 (u1 , u2 , u3 , ρ̃, ρ̂) = P2 (u1 , u2 , u3 , ρ̃, |ρ̂|) + P2 (−u1 , u2 , −u3 , ρ̃, |ρ̂|) + P2 (u1 , −u2 , −u3 , ρ̃, |ρ̂|) + P2 (−u1 , −u2 , u3 , ρ̃, |ρ̂|). Changing P1 (u1 , ρ̃, ρ̂) and P2 (u1 , u2 , u3 , ρ̃, ρ̂) to P̃1 (u1 , ρ̃, ρ̂) and P̃2 (u1 , u2 , u3 , ρ̃, ρ̂) respectively in Theorems 5 and 6, we get the first and second moments for twosided p-values under reference distribution 2. For a two-sided p-value, p̂3 is calculated with xc where c̃ = arg maxk |hy 0 , xk i|. For m0 = m1 , c̃ = c = arg maxk hy 0 , xk i, but the result may differ significantly for unequal sample sizes. He, Basu, Zhao & Owen/Stolarsky invariance for permutations 19 7. Numerical Results We consider two-sided p-values in this section. The main finding is that the root mean squared error (RMSE) of p̂2 under reference distribution 2 is usually just a small multiple of p̂2 itself. First we evaluate the accuracy of p̂1 , the simple spherical cap volume approximate p value. We considered m0 = m1 in a range of values from 5 to 200. The values p̂1 ranged from just below 1 to 2 × 10−30 . We judge the accuracy of this estimate by its RMSE. Under distribution 1 this is (E(p̂1 (ρ) − p(y, ρ))2 )1/2 for y ∼ U(Sd ). Figure 4a shows this RMSE decreasing towards 0 as p̂1 goes to 0 with ρ going to 1. The RMSE also decreases with increasing sample size, as we would expect from the central limit theorem. As seen in Figures 4a and 4b, the RMSE is not monotone in p̂1 . Right at p̂1 = 1 we know that RMSE = 0 and around 0.1 there is a dip. The practically interesting values of p̂1 are much smaller than 0.1, and the RMSE is monotone for them. A problem with p̂1 is that it can approach 0 even though p > 1/N must hold. The distribution 1 RMSE does not reflect this problem. By studying E2 ((p̂1 (ρ)− p(y, ρ))2 )1/2 , we get a different result. In Figure 4c, the RMSE of p̂1 under distribution 2 reaches a plateau as p̂1 goes to 0. The estimator p̂2 = p̃0 performs better than p̂1 because it makes more use of the data, and it is never below 1/N . As seen in Figure 4d, the RMSE of p̂2 very closely matches p̂2 itself as p̂2 decreases to zero. That is, the relative error |p̂2 − p|/p̂2 is well behaved for small p-values. In rare event estimation, that property is known as strong efficiency (Blanchet and Glynn, 2008) and can be very hard to achieve. Here as p̂2 decreases to the granularity limit 1/N , its RMSE actually decreases to 0. Eventually the distance from y 0 to x0 is below the minimum interpoint distance among the xk and then, for a one-sided test, p̂2 = p = 1/N . The estimators p̂1 and p̂2 , do not differ much for larger p-values as seen in Figure 5a. But in the limit as ρ̂ → 1 we see that p̂1 → 0, while p̂2 approaches the granularity limit 1/N instead. Figure 5b compares the RMSE of the two estimators under distribution 2. As expected, p̂2 is more accurate. It also shows that the biggest differences occur only when p̂1 goes below 1/N . To examine the behavior of p̂2 more closely, we plot its coefficient of variation in Figure 6. We see that the relative uncertainty in p̂2 is not extremely large. Even when the estimated p-values are as small as 10−30 the coefficient of variation is below 5. In Section 4, we mentioned another choice for xc . It was p̂3 = p̃c , where xc is the closest permutation of x0 to y 0 . Figure 2.7 in He (2016) compares p̂3 to p̂2 in some simulations. As expected, p̂3 tends to be larger (more conservative) than p̂2 , though it does sometimes come out smaller. Figure 2.8 of He (2016) compares the RMSE of p̂3 to p̂2 . The upward bias of p̂3 gave it a much larger RMSE. He, Basu, Zhao & Owen/Stolarsky invariance for permutations −20 −30 −30 −20 −10 ●●●●● ●●●●●●●●●● ●●●●●●● ●●●●●●● ●● ●●●●●●● ● ●●●●●● ● ●●●●● ●●●●● ● ●●●●● ●●●●● ● ●●●●●● ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●● ●●●●●●●●●●●●●●● ●●●●●●●●●● ● ●●●●●●●●●● ●●●●●●●●●●● ●●●●●●●●●●● ●●●●●●●●●● ●●●●●●●●● ●●●●●●●● ●●●●●●● ●●●●●●●●●●●●●●●●●●●● ●●● ●●●●● ●●●● ●● ● ● ● ●● ●●● ●● ●●● ●●● ● ●●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●●● ● ●● ●●●●● ●●● ●● ● ●●●●● ●● ●● ●●●● ●● ● ●●● ●● ●●●●●●●●●●●●●●●●●●●●●●●●●●●●● ●●● ●● ●● ●●●●●●●●●●●●●●●●● ●●●●●●● ●●● ●●●●●●●●●●●●●●●●●●●● ●● ●●●●●●●●●●● ●●●●● ● ● ●●● ●●●●●● ●●●●●●●●● ●●● ●●●● ●● ● ●● ●●●● ●●●●●●●● ●●●● ●● ●● ●● ●●●● ●● ● ● ●●●● ●● ●● ●●● ●● ●● ● ●●●● ●●● ●● ●●●●●●●●●●●● ● ● ●●● ●● ● ● ●●● ●● ●●●●●●●●●●●●● ● ● ●●●●●●●●●●●●●●●●●●●●●●●●●● ●● ●● ●●●●●●●●● ●●●● ●●●●●●●●●●●●●●●●●● ●●●●●●● ●● ● ●●●●● ●●●●●●●●●●● ●●●●● ●● ●●● ●●● ●●●● ●● ●●●●●●●●● ●●●● ●● ●● ●● ●●●● ●●● ●●● ●● ● ● ●●● ●● ●●● ● ●●● ●● ● ●● ●●●●●●●●●●●●●●●●●●●●●●●● ●●● ●● ● ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●● ●● ●●●●● ● ●●● ● ●●● ●●●●●●●●●●●●● ●●●●●● ●●● ●●●● ●● ● ● ● ● ● ● ● ●●●●●●●●●● ● ●●●● ● ●● ●● ● ●● ● ● ●● ●●●●●●●●●●●●●●● ●●● ●● ●●● ● ● ● ●● ●●●●●●●● ●●● ●●● ●● ● ●●● ●● ●● ●●●●● ●●● ●● ● ● ●●● ●●● ●●●● ●●● ●●● ●● ●● ●● ● ●● ● ●●●● ●●●● ●●● ●● ●● ● ● ●● ●●● ● ●● ●●●●●●●●●●●●●●●●●●●●●●●●●●●●● ●● ●● ●● ● ●●● ●● ● ●●●●●●●●●●●●●●●●● ●●●●●●● ●● ● ●●● ●●● ●●●●● ●●●●●●●●●●● ●●●●● ● ● ●● ● ● ● ●● ●●●● ●● ● ●● ●●● ●●●● ●●● ●● ● ●● ● ● ● ● ● ●● ● ● ● ● ●● ●●● ●● ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●● ●● ●●●●●●●●●●●● ●●●●● ●● ●● ●● ●●● ●● ●● ●●● ●●●●●●●●●●●●●●●● ●●●● ●● ●● ●●●●●●●● ●●● ● ● ● ●●● ● ●● ●●●●● ●●● ●● ●●● ● ●● ●● ●●●● ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●● ● ●● ●● ●●●●●●●●●●●● ●●●● ● ●●●●● ● ● ●● ● ●● ●● ●●● ● ●●●● ● ●● ●● ●● ●● ●●● ●●● ● ●● ●●● ●●● ● ● ●● ● ● ●● ●● ●●● ●●● ● ●● ●●● ●● ●● ● ●● ●● ● ●●● ●● ●● ●● ● ● ● ● ●● ●● ● ● ●●●●● ● ● ●● ●●●●●●●●●●●●●●●●●●●●●● ● ● ●●●● ●● ●● ●●● ●●●●●● ● ● ● ●● ●●●●● ●● ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●● ● ●● ● ●●●● ●● ●●●●●●●●●●●●● ●●●●●● ●● ●●● ●● ● ● ● ●●●● ●●● ●● ●● ● ● ●● ●●● ●●● ● ● ●●● ● ● ● ● ● ● ● ●●● ●●● ● ● ●● ● ● ● ●● ●● ● ● ● ●● ●● ● ●●● ●● ●● ● ●● ●● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●● ● ●●●●●● ●●●●●●●●●●●●●● ●● ● ● ●●● ● ●●●● ●●●● ●● ● ● ● ●●● ● ●● ● ●●● ● ●● ● ● ● ●● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ●●● ● ● ● ● −2 (m0, m1) ● ● ● ● ● ● ● ● ● 5,5 10,10 15,15 20,20 30,30 40,40 50,50 100,100 200,200 log10(RMSE1) log10(RMSE1) −10 ●●● ●● ●●●●● ●●● ●● ●●● ●● ●● ●●● ● ●● ●●● ●●● ●●●●●●●●●●● ●● ●●●● ●● ●●●●●● ● ●● ● ●● ●● ●●●●● ●●●●● ●● ●● ●● ●● ●●●●● ●●●●●●●●●●● ●●● ● ●● ●●●●●● ●●●●● ●● ●● ●●●●●● ●●●● ●● ●●●●● ●● ●●●● ●● ● ●● ●●●●●●●● ●●●● ● ●●●●● ●● ●●●●●● ●●●● ●●● ●● ●●●●● ● ● ● ● ● ● ● ● ● ●●● ●●● ●●●● ● ●●●●●●● ●● ●●●● ● ●● ● ● ●● ●●●●●● ●●●●● ●● ●●●● ● ●● ●●●●●●●● ●●● ●● ●●● ●●● ● ●● ●●●●●●●●●● ●●● ●●●●● ●● ● ● ● ●● ● ● ● ●●● ●● ●●●●● ●● ● ● ●● ●● ●● ●●●●●● ●● ●● ●●●●●● ●●● ●● ●● ●● ●● ●● ●● ●●●●●● ●● ●● ● ●● ●●● ●● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ●●● ●● ●● ● ●●●●●● ●● ●● ●●●●●●●●● ● ●●●●●● ●● ●● ●● ●● ●●●●●●●● ● ●●●●●●● ●● ●● ● ● ●●●●●●●● ●● ●● ●●●●●●●● ●● ●● ●●●●●● ● ●● ●● ● ●●●●●●● ●●●●●● ●● ●● ● ●● ●● ●● ●●●●●●●● ●● ●● ●● ●●●● ●● ●●●● ●● ●● ●● ●● ●●●●●●● ●● ●●●● ●● ●● ● ●● ●● ●●●●● ●● ●● ●● ●●● ●●●●●●● ●● ●● ●● ●●●● ●● ●● ●●●●●● ●● ●● ●● ●●●●● ●● ●● ●● ●●● ● ●● ●● ●● ●●●● ● ●● ●●●●● ●● ●● ●●●●●● ●● ●● ●● ●● ● ●● ●●●●●●● ●● ●● ●● ●● ●●●● ●● ●● ● ● ● ● ● ● ● ● ●●●●●●● ● ● ● ●● ● ●● ●● ●● ●● ● ●● ●● ●● ●●●●●● ●● ●● ●●●● ●● ●● ●● ●● ●● ●● ●●●● ●● ●●●● ●● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ●● ●●● ●● ●● ●● ●●●● ●● ●● ●● ●● ●● ● ●● ●● ●● ●● ●● ●●●●●● ●● ●●● ●● ●● ●● ●● ●● ●● ●● ●●●●● ●● ●● ●● ●● ●●●● ●● ●● ●● ●● ●● ●● ●● ●● ●●●●● ●● ●● ●● ●● ●●●● ●● ●● ●● ●● ●● ●● ●● ●● ●●●● ●● ●● ●● ●● ●● ●● ●●●●● ●●●● ●● ●● ●● ●● ●● ●● ●● ●●●●●●●●●● ●● ●● ●● ●● ●● ●● ●● ●●●●●●●●●● ●● ●● ●● ●● ●●● ●● ●● ●●●● ●● ●● ●● ●● ●● ●● ●● ●●●● ●● ●● ●● ●● ●● ● ● ●● ●● ●● ●● ●●●●● ●●●● ●● ●● ●● ●● ●● ●●●●●● ● ● ●● ●● ●● ●● ●● ●● ●● ●●●●●● ●●●● ●● ●● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ●●● ●●●● ●● ●● ●● ●● ●● ●● ●● ●● ●●●● ● ● ●● ●● ●● ●● ●● ●● ●●●● ●●●● ●● ●● ●● ●● ●● ●● ●● ●● ●● ●●●● ●● ●● ●● ●● ●● ●● ●●●● ● ● ●● ●● ●● ●● ●● ●● ●● ●● ●●●● ●●●● ●● ●● ●● ●● ●● ●●● ● ● ●● ●● ●● ●● ●● ●● ●● ●●● ●●●● ●● ●● ●● ●● ●●●● ● ● ●● ●● ●● ●● ●● ●● ●● ●●● ●●●● ●● ●● ●● ●● ●●● ● ● ●● ●● ●● ●● ●● ●● ●●● ●●●● ●● ●● ●● ●● ●● ●●●● ●●●● ●● ●● ●● ●● ●● ●● ●● ●● ●● ●●●●● ●●●● ●● ●● ● ●● ●● ●● ●● ●●●● ●●●● ●● ●● ●● ● ● ● ● ● ● ●● ● ●● ●● ●● ●● ●● ●● ●●●● ●● ● ●● ●● ●● ●● ●● ●● ● ● ●● ●● ●● ●● ●● ●●●● ●● ●● ●● ●● ●● ●● ● ●● ●● ●● ●● ●● ● ●● ●● ●● ●● ●● ●● ●●●● ●● ●● ●● ●● ●● ● ●● ●● ●● ●● ●● ● ● ●● ●● ●● ●● ●● ● ●● ●● ●● ●● ● ●● ●● ●● ●● ●●●● ●● ●● ●● ● ●● ● ●● ●● ●● ● ●● ●● ●● ●● ●● ● ●● ●● ●● ●● ●● ●● ●● ● ● ● ● ● ● ● ●● ●● ●● ●● ●● ●● ●● ●● ● ●● ●● ●● ●● ●● ●● ● ●● ● ●● ● ●● ●● ●● ●●● ●● ●●●● ●● ●● ●● ● ●● ● ●● ●● ●● ●●●● ●● ●● ●● ●● ●●●● ●● ●● ●●●● ●● ●● ●● ●● ● ●● ● ●● ●● ●● ●● ●●●● ●● ●● ●●●● ●● ●● ● ●● ● ● ●● ●● ●●●● ●● ●● ● ●● ●● ●● ●● ●● ●● ●● ●● ●● ●● ●● ●● ●● ●● ●● ●● ●● ●● ●● ●● ●● ●● ●● ●● ● ● ● ● −4 −6 ●●●●●●●● ● ● ● ● ● ● ● ● ● ● −8 −2.0 −1.5 −1.0 −0.5 0.0 log10(phat1) (b) RMSE1 (p̂1 ) zoomed. 0 (m0, m1) ● ● ● ● ● ● ● ● ● ● ● ● ● 5,5 10,10 15,15 20,20 30,30 40,40 50,50 70,70 100,100 log10(RMSE2) log10(RMSE1UNDER2) −40 ● 5,5 10,10 15,15 20,20 30,30 40,40 50,50 100,100 200,200 ● ● ● ● ● ● ● ● ● ● 0 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ●● ●● ●●● ●● ●● ●● ● ●●●●●●●●●● ●●● ● ●● ● ● ● ●● ● ● ●● ●● ● ●●●●●●●●● ● ●● ● ● ● ● ● ● ●● ● ●●●●●●●●● ● ● ● ● ● ● (a) RMSE1 (p̂1 ). −20 (m0, m1) ● log10(phat1) 0 20 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ●● ● ● ● ●● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ●● ● ● ●● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● −20 ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● −40 (m0, m1) ● ● ● 5,5 10,10 15,15 20,20 30,30 40,40 50,50 70,70 100,100 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● −60 −60 ● ● ● ● ● ● ● ● ● ● ● ● −120 −90 −60 −30 0 −60 −40 log10(phat1) (c) RMSE2 (p̂1 ). −20 0 log10(phat2) (d) RMSE2 (p̂2 ). Fig 4: RMSEs for p̂1 and p̂2 under reference distributions 1 and 2. The x-axis shows the estimate p̂ as ρ varies from 1 to 0. Here m0 = m1 . Plots with m0 6= m1 are similar. 8. Comparison to saddlepoint approximation The small relative error property of p̂2 is similar to the relative error property in saddlepoint approximations. Reid (1988) surveys saddlepoint approximations and Robinson (1982) develops them for permutation tests of the linear statistics we have considered here. When the true p-value is p, the saddlepoint approximation p̂s satisfies p̂s = p(1 + O(1/n)). Because we do not know the implied constant in O(1/n) or the n at which it takes effect, the saddlepoint approximation does not provide a computable upper bound for the true permutation p-value p. He, Basu, Zhao & Owen/Stolarsky invariance for permutations 1.00 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ●● ●● ●● ●● ●●●●●●●●●●● ●●● ● ●● ● ●● ● ● ● ●● ●● ●●●●●●●●●● ● ● ●● ● ● ● ● ● ● ● ● ●●●●●●●●●● −20 ● ● (m0, m1) ● ● ● ● ● ● ● ● −40 ●●●●●●●●● ● ● ● ● 5,5 10,10 15,15 20,20 30,30 40,40 50,50 70,70 100,100 ● ● ● ● ● ● RMSE2/RMSE1UNDER2 log10(phat2) 0 ● ● ● ● ● ● 0.75 ● ● ● ● ● ● ● ● ● ● ●● ●● ● ●●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ●● ● ● ●●● ● ● ● ●● ●● ●●●● ●● ●● ●● ● ● ● ●●●● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ●●● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ● ● ●● ●●● ● ●● ●● ● ● ● ●● ●● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● 0.50 ● ● ● ● ● ● ● 0.25 ● ● ● ● ● ● 0.00 ● ● −120 ● ● ● −90 log10(phat1) ● ● ● ● ● ● ● ● ● ● 5,5 10,10 15,15 20,20 30,30 40,40 50,50 70,70 100,100 ● ● 0 ● ● ● ● −30 ● ● ● −60 ● ● ● ● ● ● −90 ● ● ● ● −120 ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● −60 (m0, m1) ● ● ● ● ● ● 21 ● ●● ● ● ● ●● −60 ● ● ●● −30 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0 log10(phat1) (a) (b) Fig 5: Comparison of p̂1 and p̂2 . In (a), log10 (p̂2 ) is plotted against log10 (p̂1 ) for varying ρ’s. The black line is the 45 degree line. In (b), the ratio of RMSEs for p̂1 and p̂2 is plotted against log10 (p̂1 ). The x-axis is log10 (p̂1 ). ● ● ● ● ● ● RMSE2/phat2 10 (m0, m1) ● ● ● ● ● ● ● ● ● ●● ● ● ● 5 ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● 0 ● ● ● ● −60 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● −40 5,5 10,10 15,15 20,20 30,30 40,40 50,50 70,70 100,100 ● ●●● ● ● ● ● ● ● ● ● ●●●● ● ● ● ● ●● ● ● ● ●● ● ●● ● ●●● ● ● ●● ● ●● ● ● ● ●●● ●●● ● ● ● ● ● ●●●● ●● ● ● ● ● ●● ● ●● ●● ● ● ● ● ● ● ●●● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●●● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ●●●● ● ● ● ● ● ● ● ● ● −20 0 log10(phat2) Fig 6: The coefficient of variation for p̂2 with varying ρ’s. Figure 7 compares our estimates to each other and those of the saddlepoint approximation, equation (1) from Robinson (1982). The simulated data have the Exp(1) distribution under the control condition and the 2 + Exp(1) distribution under the affected condition. The sample sizes were m0 = m1 = 10 making it feasible to compute the exact permutation p-value for hundreds of examples. In each case we ran 500 independent simulations. Cases with perfect separation were excluded: the saddlepoint approximation is numerically unstable then, and He, Basu, Zhao & Owen/Stolarsky invariance for permutations phat1 phat2 phat3 saddle.point 22 60 40 20 count 0 60 40 20 0 0.1 10.0 0.1 10.0 phat/p.exact iid Fig 7: Simulation results p̂/p as described in the text, for Y0,i ∼ Exp(1), and iid Y1,i ∼ Exp(1) + 2. one can easily detect that the minimum Y value in one group is larger than the maximum in the other group, showing that p = 1/N . In every instance we compared two-sided p-values. Chapter 2 of He (2016) considers simulations from some other distributions. The control condition data are t(5) , N (0, 1) and U(0, 1) while the affected condition data are shifted versions of these distributions. In these simulations, the naive spherical cap estimator p̂1 , with no good relative error properties, is consistently least accurate and is often much smaller than the true p. The saddlepoint estimate is very accurate but tends to come out smaller than the true p. The estimators p̂2 and p̂3 are less likely to be below p than the saddlepoint estimate, and by construction, they are never below the granularity limit. Qualitatively similar results happened for all of the distributions. The accuracy of all of these p-value estimates tends to be better for ligher tailed Yi . We can also construct Z scores, Z2 = (p − p̂2 )/RMSE2 and a similar Z3 . If these take large values, then it means that p̂ is too small and, moreover, that our computed RMSE does not diagnose it. The largest Z scores we observed are . in Table 1. The largest Z values arose for exponential data with p = 0.89 and He, Basu, Zhao & Owen/Stolarsky invariance for permutations Dist’n Y0,i t(5) Exp(1) U(0, 1) N (0, 1) max Z2 max{Z2 | p̂2 < 0.1} max Z3 23 max{Z3 | p̂3 < 0.1} 26.7 7.55 3.49 3.07 1.91 31.5 3.87 7.55 7.76 7.76 2.45 5.87 2.61 2.78 3.07 2.78 Table 1 Maximal Z scores observed for p̂2 and p̂3 in 500 independent replications. First author m1 m0 N = m1 +m0  m1 11 18 3.5 × 107 29 14 7.9 × 1010 50 22 1.8 × 1018 Table 2 Sample sizes for three microarray studies. Zhang Moran Scherzer . . p̂2 = 0.78 = p̂3 . Such large p-values are not very important and so maximal Z scores are also shown among estimated p-values below 0.1. What we find is that the Z values are not very extreme. This suggests that it might be feasible to get a conservative p-value estimate by adding some multiple of the distribution 2 RMSE to p̂2 . 9. Data comparisons Three data sets on Parkinson’s disease were used by Larson and Owen (2015) and investigated in Chapter 6 of He (2016). They come from Scherzer et al. (2007), Moran et al. (2006) and Zhang et al. (2005). Table 2 shows their sample sizes. For this comparison, there were 6180 gene sets from v5.1 of mSigDB’s gene set collections. Curated gene sets and Gene Ontology gene sets were used. The gene sets ranged in size from 5 to 2131 genes with an average size of 93.08 genes. Slightly different versions of the gene sets were used in Larson and Owen (2015). Ground truth estimates of two-sided p values for linear test statistics were obtained using M = 106 permutations. When the estimate was below 10−4 , the number M was increased to 107 . The Zhang data set had the smallest sample size and had no gene sets significant at below 0.01 and so we do not compare estimates for this gene set. Table 3 gives correlations between log10 estimated and gold-standard p-values for these genes. From Table 3, we see that p̂1 , p̂2 and p̂3 have nearly the same correlations with the gold standard; indeed they correlate highly with each other. They correlate with the gold standard estimate much more closely than the saddlepoint estimator does. Figures in Chapter 6 of He (2016) give scatterplots. These show the saddlepoint estimator is biased low and p̂3 is biased slightly high. Statistics p̂1 and p̂2 are quite close, possibly because none of the gene sets has a very small p-value. While saddlepoint methods have a very desirable relative error property they do have some numerical issues. Table 4 shows some timing data. We also got in- He, Basu, Zhao & Owen/Stolarsky invariance for permutations Data Correlation p̂1 p̂2 p̂3 p̂saddle Moran Moran Pearson Kendall 0.9997 0.9856 0.9997 0.9856 0.9997 0.9866 0.9937 0.9395 Scherzer Scherzer Pearson Kendall 0.9997 0.9869 0.9997 0.9869 0.9997 0.9870 0.9837 0.8937 Moran Low Moran Low Pearson Kendall 0.9501 0.8283 0.9504 0.8283 0.9653 0.8578 0.7125 0.5411 Scherzer Low Scherzer Low Pearson Kendall 24 0.9940 0.9940 0.9947 0.8652 0.9429 0.9429 0.9429 0.7714 Table 3 The table gives both Pearson and Kendall correlations over 6180 gene sets, between estimated log10 (p)-values and gold standard log10 (p)-values for both the Moran and Scherzer data sets. The designation ‘Low’ refers to only the 190 gene sets with p-values in the interval (10−5 , 10−4 ) for Moran, or the 15 gene sets with p-values in the interval (10−5 , 10−3 ) for Scherzer. Data Set Saddle Zhang Moran Scherzer 0.0631 0.0894 0.1394 p̂1 p̂2 0.0024 0.0031 0.0029 0.0037 0.0034 0.0045 Table 4 Average, over 6180 gene sets of the running time in seconds p̂j , j = 1, 2, 3. Total time ranges from under 1/4 minute p̂3 0.0032 0.0038 0.0047 for saddlepoint p-values and to just over 14 minutes. finite values for 95 of the gene sets on the Zhang data. It might be a convergence issue or possibly a flaw in how we implemented saddlepoints. 10. Discussion We have constructed approximations to the permutation p-value using probability and geometry derived from discrepancy theory. A rigorous upper bound for p could be attained using L∞ spherical cap discrepancies instead of the L2 version, but computing such discrepancies is a major challenge. Narcowich et al. (2010) give upper bounds for the L∞ spherical cap discrepancy, in terms of averages of a great many harmonic functions at the points xi . For our application we need bounds for spherical caps of a fixed volume (under distribution 1) and of fixed volume and constrained location (under distribution 2) and those go beyond what is in Narcowich et al. (2010). Many other approximation methods have been proposed for permutation tests. For instance, Zhou et al. (2009) fit approximations by moments in the Pearson family. Larson and Owen (2015) fit Gaussian and beta approximations to linear statistics and gamma approximations to quadratic statistics for gene set testing problems. Knijnenburg et al. (2009) fit generalized extreme value distributions to the tails of sampled permutation values. None of these approximations come with an all inclusive p-value that accounts for both numerical uncertainty of the estimation and sampling uncer- He, Basu, Zhao & Owen/Stolarsky invariance for permutations 25 tainty behind the original data. IID sampling of permutations does come with such a p-value if we add one to numerator and denominator as Barnard (1963) suggests. Then the Monte Carlo p-value estimate p̂ is actually a conservative p-value in it’s own right: Pr(p̂ 6 u) 6 u for 0 6 u 6 1 under the null hypothesis. However, that method cannot attain very small p-values, and so a gap remains. We have employed reference distributions in an effort to address this gap. We select a set Y containing y 0 and find the first two moments of p(y, ρ̂) for y ∼ U(Y). If the data y 0 were actually sampled from our reference distribution, then we could get an all inclusive conservative p-value via the Chebychev inequality. To illustrate the Chebychev inequality, let µ = E(p(y, ρ̂)) and σ 2 = Var(p(y, ρ̂)) for the observed value ρ̂ = xT 0 y 0 and for random y ∼ U(Y) for some reference set Y. Then Pr(p > µ + λσ) 6 1/(1 + λ2 ) for any λ > 0. Under this model, p∗ = µ + λσ + 1/(1 + λ2 ) is a conservative p-value. Minimizing p∗ over λ reduces to solving 2λ = σ(1 + λ2 )2 . For small p we anticipate λ  1 and hence λ0 = (2/σ)1/3 will be almost as good as the optimal λ we could find numerically. That choice leads to p∗ 6 µ + (21/3 + 2−2/3 )σ 2/3 . For a numerical illustration, consider µ = 10−30 and σ = 3 × 10−30 , roughly describing the small p-value estimates from the case m0 = m1 = 70. Then p∗ 6 4 × 10−20 , much larger than µ and yet still very small, likely small enough to be significant after multiplicity adjustments. The reference distributions describe a set in which p(y 0 , ρ̂) is known to lie. Reference distribution 1 applies for Gaussian Yi and reference distribution 2 is for Gaussian Yi after conditioning on y T x0 = y T 0 x0 . Of course, the data will not ordinarily be exactly Gaussian. The numerical illustration uses a Chebychev . inequality at λ0 = 8.7 × 109 standard deviations. As mentioned above, an L∞ version of the Stolarsky inequality would eliminate the need for Chebychev inequalities though it might also be very conservative. We do not know whether p(y, ρ̂) has a heavy tailed distribution under reference distribution 2. Our permutation points fall into a lattice subset of Rd intersected with the unit sphere Sd . Our problem of counting the number of such points in a subset is one that is addressed under the term ‘Geometry of numbers’. According to a personal communication from Neil Sloane, the standard approach to such problems is via the volume ratio, which in our setting is p̂1 which does not do well for our problems. To have reasonable power to obtain a p-value below  by permutation sampling requires on the order of 1/ permutations each requiring O(n log(n)) computation to generate and O(n) computation to evaluate the inner product. The cost to compute the standard errors in our method is dominated by a cost proportional to m3 though there is a very small cost proportional to m4 . In the range where the first cost dominates, our proposal is advantageous when m3 = o(n/). Supposing that m0 and m1 are comparable, our advantage holds when m2 = o(1/). If only the estimate and not the standard error is required, then our p̂2 and p̂3 cost O(m) once the ρ̂ (cost O(n)) has been computed. Then the total cost is O(n) compared to the much larger cost O(n/) for sampling. He, Basu, Zhao & Owen/Stolarsky invariance for permutations 26 Acknowledgements This work was supported by the US National Science Foundation under grants DMS-1407397 and DMS-1521145. We thank John Robinson and Neil Sloane for helpful comments. References Ackermann, M. and Strimmer, K. (2009). A general modular framework for gene set enrichment analysis. BMC Bioinformatics, 10:1–20. Aronszajn, N. (1950). Theory of reproducing kernels. Transactions of the American Mathematical society, 68(3):337–404. Barnard, G. A. (1963). Discussion of the spectral analysis of point processes (by m. s. bartlett). Journal of the Royal Statistical Society, series B, 25:294. Bilyk, D., Dai, F., and Matzke, R. (2016). Stolarsky principle and energy optimization on the sphere. Technical report. Blanchet, J. and Glynn, P. (2008). Efficient rare-event simulation for the maximum of heavy-tailed random walks. The Annals of Applied Probability, pages 1351–1378. Brauchart, J. and Dick, J. (2013). A simple proof of Stolarsky’s invariance principle. Proceedings of the American Mathematical Society, 141(6):2085– 2096. Fadista, J., Manning, A. K., Florez, J. C., and Groop, L. (2016). The (in) famous GWAS p-value threshold revisited and updated for low-frequency variants. European Journal of Human Genetics, 24(8):1202–1205. He, H. (2016). Efficient Permutation-Based P-Value Estimation for Gene Set Tests. PhD thesis, Stanford University. Jiang, Z. and Gentleman, R. (2007). Extensions to gene set enrichment. Bioinformatics, 23(3):306–313. Knijnenburg, T. A., Wessels, L. F. A., Reinders, M. J. T., and Shmulevich, I. (2009). Fewer permutations, more accurate p-values. Bioinformatics, 25(12):i161–i168. Larson, J. L. and Owen, A. B. (2015). Moment based gene set tests. BMC Bioinformatics, 16(1):132. Lee, Y. and Kim, W. C. (2014). Concise formulas for the surface area of the intersection of two hyperspherical caps. Technical report, Korea advanced institute of science and technology. Moran, L. B., Duke, D. C., Deprez, M., Dexter, D. T., Pearce, R. K. B., and Graeber, M. B. (2006). Whole genome expression profiling of the medial and lateral substantia nigra in parkinsons disease. Neurogenetics, 7(1):1–11. Narcowich, F. J., Sun, X., Ward, J. D., and Wu, Z. (2010). Leveque type inequalities and discrepancy estimates for minimal energy configurations on spheres. Journal of Approximation Theory, 162(6):1256–1278. Niederreiter, H. (1992). Random Number Generation and Quasi-Monte Carlo Methods. SIAM, Philadelphia, PA. He, Basu, Zhao & Owen/Stolarsky invariance for permutations 27 Reid, N. (1988). Saddlepoint methods and statistical inference. Statistical Science, pages 213–227. Robinson, J. (1982). Saddlepoint approximations for permutation tests and confidence intervals. Journal of the Royal statistical society,Series B, pages 91–101. Scherzer, C. R., AC, A. C. E., Morse, L. J., Liao, Z., Locascio, J. J., Fefer, D., Schwarzschild, M. A., Schlossmacher, M. G., Hauser, M. A., Vance, J. M., Sudarsky, L. R., Standaert, D. G., Growdon, J. H., Jensen, R. V., and Gullans, S. R. (2007). Molecular markers of early Parkinson’s disease based on gene expression in blood. Proc Natl Acad Sci, 104(3):955–60. Stolarsky, K. B. (1973). Sums of distances between points on a sphere. II. Proceedings of the American Mathematical Society, 41(2):575–582. Zhang, Y., James, M., Middleton, F. A., and Davis, R. L. (2005). Transcriptional analysis of multiple brain regions in Parkinson’s disease supports the involvement of specific protein processing, energy metabolism, and signaling pathways, and suggests novel disease mechanisms. American J Med Genet B Neuropsychiatry Genet, 137B(1):5–16. Zhou, C., Wang, H. J., and Wang, Y. M. (2009). Efficient moments-based permutation tests. In Advances in neural information processing systems, pages 2277–2285. 11. Appendix Here we collect up some of the longer proofs. 11.1. Proof of Theorem 3 (Limiting invariance) Here we show that taking limits as  goes to zero in the formula of Brauchart and Dick (2013) proves Theorem 3. We use three lemmas, one for each term in Theorem 2. We use  → 0 as a shorthand for lim1 →0+ lim2 →0+ . Lemma 4. Let v be defined as in (3.3). Then for ρ̂ ∈ [−1, 1), Z 1 lim Z σd (C(z; t)) − v (t) →0 −1 Z = Sd Sd |p(z, ρ̂) − p̂(ρ̂)|2 dσd (z). N −1 2 1 X 1C(z;t) (xk ) dσd (z) dt N k=0 He, Basu, Zhao & Owen/Stolarsky invariance for permutations 28 Proof. Substituting v we get Z 1 Z 1 2 + 1(ρ̂ 6 t 6 ρ̂ + 1 ) (p̂(t) − p(z, t))2 dσd (z) dt  d 1 −1 S Z Z 1 ρ̂+1 (p̂(t) − p(z, t))2 dσd (z) dt, as 2 → 0+ → 1 ρ̂ Sd Z → (p̂(ρ̂) − p(z, ρ̂))2 dσd (z), as 1 → 0+ . Sd Lemma 5. Let v be as in (3.3) with ρ̂ ∈ [−1, 1), and let Kv be given by (3.2). Then for any x, x0 ∈ Sd , lim Kv (x, x0 ) = σd (C(x; ρ̂) ∩ C(x0 ; ρ̂)). →0 Proof. The argument is essentially the same as for Lemma 4. Lemma 6. Let v be as in (3.3) with ρ̂ ∈ [−1, 1), and let Kv be given by (3.2). Then Z Z lim Kv (x, y) dσd (x) dσd (y) = p̂1 (ρ̂)2 . (11.1) →0 Sd Sd Proof. For any x, y ∈ Sd , the kernel Kv (x, y) is nonnegative and upper bounded by a constant. Therefore we can take our limit operations inside the double inR tegral over x and y. Now lim→0 Kv (x, y) = Sd 1C(z;ρ̂) (x)1C(z;ρ̂) (y) dσd (z). Therefore the limit in (11.1) is Z Z Z 1C(z;ρ̂) (x)1C(z;ρ̂) (y) dσd (z) dσd (y) dσd (x) = p̂1 (ρ̂)2 Sd Sd Sd after changing the order of the integrals. Theorem 3 Let x0 , x1 , . . . , xN ∈ Sd and ρ̂ ∈ [−1, 1]. Then Z Sd |p(z, ρ̂) − p̂1 (ρ̂)|2 dσd (z) = N −1 N −1 1 X X σd (C(xk ; ρ̂) ∩ C(x` ; ρ̂)) − p̂1 (ρ̂)2 . N2 k=0 l=0 Proof. Theorem 2 gives us an identity and applying Lemmas 4, 5 and 6 to both sides of it establishes (3.4) for ρ ∈ [−1, 1). For ρ̂ = 1 we get the answer by replacing v by 2 + (1/1 )11−1 6t61 in the lemmas. Replacing z by y and ρ̂ by t above gives the version in the main body of the article. 11.2. Proof of Lemma 3 (Double inclusion for Model 2) Proof. We split the proof Rinto four cases and prove them individually. Recall that P2 (u1 , u2 , u3 , ρ̃, ρ̂) = Sd−1 1(hy, x1 i > ρ̂)1(hy, x2 i > ρ̂) dσd−1 (y ∗ ) where p y = ρ̃xc + 1 − ρ̃2 y ∗ . He, Basu, Zhao & Owen/Stolarsky invariance for permutations 29 Case 1. x1 = x2 = xc , i.e., r1 = r2 = r3 = 0. Z P2 (1, 1, 1, ρ̃, ρ̂) = 1(hy, xc i > ρ̂)1(hy, xc i > ρ̂) dσd−1 (y ∗ ) = 1(ρ̃ > ρ̂). Sd−1 Case 2. x1 = xc 6= x2 , i.e., r1 = 0, r2 > 0, r3 > 0. Z P2 (1, u2 , u2 , ρ̃, ρ̂) = 1(hy, xc i > ρ̂)1(hy, x2 i > ρ̂) dσd−1 (y ∗ ) d−1 S Z = 1(ρ̃ > ρ̂) 1(hy, x2 i > ρ̂) dσd−1 (y ∗ ) Sd−1 = 1(ρ̃ > ρ̂)P1 (u2 , ρ̃, ρ̂) where the last step uses Lemma 2. Case 3. x1 = x2 = 6 xc , i.e., r1 = r2 > 0 = r3 . Z P2 (u2 , u2 , 1, ρ̃, ρ̂) = 1(hy, x1 i > ρ̂)1(hy, x2 i > ρ̂) dσd−1 (y ∗ ) d−1 ZS = 1(hy, x2 i > ρ̂) dσd−1 (y ∗ ) Sd−1 = P1 (u2 , ρ̃, ρ̂). Case 4. x1 6= x2 6= xc 6= x1 , i.e., r1 , r2 , r3 > 0. We split this case into subcases. First we assume u2 = −1, so Z P2 (u1 , u2 , u3 , ρ̃, ρ̂) = 1(hy, x1 i > ρ̂)1(hy, −xc i > ρ̂) dσd−1 (y ∗ ) d−1 S Z = 1(−ρ̃ > ρ̂) 1(hy, x1 i > ρ̂) dσd−1 (y ∗ ) Sd−1 = 1(−ρ̃ > ρ̂)P1 (u1 , ρ̃, ρ̂). Similarly if u1 = −1, then P2 (u1 , u2 , u3 , ρ̃, ρ̂) = 1(−ρ̃ > ρ̂)P1 (u2 , ρ̃, ρ̂). Finally we assume u1 > −1 and u2q> −1, so now |u1 | < 1 and |u2 | < 1. Recall the projections xj = uj cc + 1 − u2j x∗j for j = 1, 2 and introduce √ further p projections of y ∗ and x∗2 onto x∗1 : y ∗ = tx∗1 + 1 − t2 y ∗∗ and x∗2 = ∗∗ d u∗3 x∗1 + 1 − u∗3 x∗∗ and x∗∗ 2 belong to a subset of S that is 2 . The residuals y He, Basu, Zhao & Owen/Stolarsky invariance for permutations 30 isomorphic to Sd−2 . Now we have P2 (u1 , u2 , u3 , ρ̃, ρ̂) Z = 1(hy, x1 i > ρ̂)1(hy, x2 i > ρ̂) dσd−1 (y ∗ ) Sd−1 1 Z = Z q   p d−1 ωd−2 1 ρ̃u1 + 1 − ρ̃2 1 − u21 t > ρ̂ (1 − t2 ) 2 −1 −1 ωd−1 Sd−2 q q   p p ∗∗ ∗∗ × 1 ρ̃u2 + 1 − ρ̃2 1 − u22 (tu∗3 + 1 − t2 1 − u∗2 hy , x i) > ρ̂ 2 3 × dσd−1 (y ∗∗ ) dt = 1   d−1 ωd−2 ρ̂ − ρ̃u1 p (1 − t2 ) 2 −1 1 t > p 1 − ρ̃2 1 − u21 −1 ωd−1 Z q q   p p ∗∗ ∗∗ × 1 ρ̃u2 + 1 − ρ̃2 1 − u22 (tu∗3 + 1 − t2 1 − u∗2 3 hy , x2 i) > ρ̂ Z Sd−2 × dσd−1 (y ∗∗ ) dt   1(ρ̃u > ρ̂)1(ρ̃u2 > ρ̂),  R 1 ω1 d−1 d−2 (1 − t2 ) 2 −1 1(t > ρ1 )1(tu∗3 > ρ2 ) dt, = −1 ωd−1 R  d−1 1 ωd−2   −1 (1 − t2 ) 2 −1 1(t > ρ1 )σd−2 (C(x∗∗ 2 , √ ω ρ̃ = ±1 ρ̃ 6= ±1, u∗3 = ±1 ρ2 −tu∗ 3 1−t2 d−1 √ 1−u∗2 3 )) dt, ρ̃ 6= ±1, |u∗3 | < 1 where u∗3 , ρ1 , ρ2 are defined in (4.7). Hence, the result follows. 11.3. Proof of Theorem 6 (Second moment under reference distribution 2) Proof. Without loss of generality we relabel the values xk so that c = 0. Any other choice for c is reflected in the number ρe. The second moment is E(p(y, ρ̂)2 ) = N −1 N −1 1 X X P2 (uk , u` , uk,` , ρ̃, ρ̂) N2 (11.2) k=0 l=0 where uk,` is obtained via (2.1) from the swap distance rk,` between points xk and x` . We will partition the sum in (11.2) into the same four cases as in the proof of Lemma 3. Case 1, xk = x` = xc , i.e., rk = r` = rk,` = 0. There is only one pair of (xk , x` ) for this condition. Hence, we get only one term corresponding to P2 (1, 1, 1, ρ̃, ρ̂) = 1(ρ̃ > ρ̂). Case 2, xk = xc 6= x` , i.e., rk = 0, r` = rk,` > 0. Consider all pairs of (xk , x` ) that satisfy this condition and let K2 denote their total contribution He, Basu, Zhao & Owen/Stolarsky invariance for permutations 31 to (11.2). Then K2 = 2 N −1 Z X l=1 =2 1(hy, xc i > ρ̂)1(hy, x` i > ρ̂) dσd−1 (y ∗ ) Sd−1 m    X m0 m1 r r=1 r P2 (1, u(r), u(r), ρ̃, ρ̂). Case 3, xk = x` 6= xc , i.e., rk = r` > 0 = rk,` . The contribution from terms of this form is K3 = N −1 Z X 1(hy, xk i > ρ̂) dσd−1 (y ∗ ) = Sd−1 k=1 m    X m0 m1 r r=1 r P1 (u(r), ρ̃, ρ̂). Case 4, xk 6= x` 6= xc , i.e., rk , r` , rk,` > 0. The contribution of these cases to the sum is K4 = N −1 N −1 X X Z Sd−1 k=1 `=1 = 1(hy, xi i > ρ̂)1(hy, xj i > ρ̂) dσd−1 (y ∗ ) 1(` 6= k) X X X c(rk , r` , rk,` )P2 (u1 , u2 , u3 , ρ̃, ρ̂). rk ∈R r` ∈R rk,` ∈R3 (r) Then the second moment is (1(ρ̃ > ρ̂) + K2 + K3 + K4 )/N 2 . 11.4. Proof of Theorem 7 (Location weighted invariance) Proof. We follow the technique in Brauchart and Dick (2013). We begin by showing that Kv,h,x0 as defined in (5.2) is a reproducing kernel. First, Kv,h,x0 is symmetric: Kv,h,x0 (x, y) = Kv,h,x0 (y, x). Next, choose a0 , . . . , aN −1 ∈ R and NP −1 x0 , . . . , xN −1 ∈ Sd . Then ak a` Kv,h,x0 (xk , x` ) equals k,`=0 Z 1 −1 Z 1 Z ak a` v(t)h(hz, x0 i)1C(z;t) (xk )1C(z;t) (x` ) dσd (z) dt Sd k,`=0 Z = −1 N −1 X Sd v(t)h(hz, x0 i) N −1 X 2 ak 1C(z,t) (xk ) dσd (z) dt k=0 which is nonnegative. Thus Kv,h,x0 is symmetric and positive definite, and so by Aronszajn (1950), Kv,h,x0 is a reproducing kernel. Aronszajn (1950) also shows that a reproducing kernel uniquely defines a Hilbert space of functions with a specific inner product. Let Hv,h,x0 = H(Kv,h,x0 , Sd ) denote the corresponding reproducing kernel Hilbert space of functions f : Sd → R with reproducing kernel Kv,h,x0 . He, Basu, Zhao & Owen/Stolarsky invariance for permutations 32 We now consider functions f1 , f2 : Sd → R which admit the representation Z 1Z gi (z; t)1C(z;t) (x) dσd (z) dt, i = 1, 2 (11.3) fi (x) = Sd −1 for functions gi ∈ L2 (Sd ×[−1, 1]). For any fixed y ∈ Sd the function Kv,h,x0 (·, y) has representation (11.3) via g(z; t) = v(t)h(hz, x0 i)1C(z,t) (y). For functions with representation (11.3), we define an inner product by Z hf1 , f2 iKv,h,x0 = 1 −1 1 v(t) Z Sd 1 g1 (z, t)g2 (z, t) dσd (z) dt. h(hz, x0 i) (11.4) For y ∈ Sd and f1 ∈ Hv,h,x0 , Z hf1 , Kv,h,x0 (·, y)iK v,h,x0 1 Z 1 g1 (z; t)v(t) = h(hz, x0 i)1C(z;t) (y) dσd (z) dt 0 −1 v(t) Sd h(hz, x i) Z 1Z = g1 (z, t)1C(z,t) (y) dσd (z) dt −1 Sd = f1 (y), showing that the inner product (11.4) has the reproducing property. By Aronszajn (1950), the inner product in Hv,h,x0 is unique. Functions fi satisfying (11.3) with hfi , fi iKv,h,x0 < ∞ are in Hv,h,x0 , and (11.4) is the unique inner product of Hv,h,x0 . We prove the theorem by equating two different forms of kR(Hv,h,x0 ; · )kKv,h,x0 where Z R(Hv,h,x0 ; · ) = Kv,h,x0 (· , y) dσd (y) − Sd N −1 1 X Kv,h,x0 (· , xk ). N k=0 Although R(Hv,h,x0 ; · ) depends on our specific points xi we omit that from the notation. The reproducing property of Kv,h,x0 yields hKv,h,x0 (· , xk ), Kv,h,x0 (· , x` )iK v,h,x0 from which it follows that Z Z 0 Kv,h,x (· , y) dσd (y), Sd Z K v,h,x0  (· , y ) dσd (y ) 0 Sd Z = 0 Sd 0 Kv,h,x0 0 Kv,h,x0 (y, y ) dσd (y) dσd (y ). Sd = Kv,h,x0 (xk , x` ) (11.5) He, Basu, Zhao & Owen/Stolarsky invariance for permutations 33 Using (11.5) and the linearity of the inner product, we have hR(Hv,h,x0 ; · ), R(Hv,h,x0 ; · )iK v,h,x0 Z Z N −1 Z 2 X 0 0 = Kv,h,x0 (y, y ) dσd (y) dσd (y ) − Kv,h,x0 (y, xk ) dσd (y) N Sd Sd Sd k=0 + 1 N2 N −1 X Kv,h,x0 (xk , x` ). k,`=0 (11.6) For our second form of kR(Hv,h,x0 ; · )kKv,h,x0 , we write R(Hv,h,x0 ; · ) Z N −1 1 X 0 Kv,h,x0 (· , xk ) = Kv,h,x (· , y) dσd (y) − N Sd k=0 Z  Z 1 Z N −1 1 X = v(t) 1C(z;t) (x)h(hz, xi) 1C(z,t) (y) dσd (y) dt − 1C(z,t) (xk ) dσd (z) dt N −1 Sd Sd k=0   Z 1 Z N −1 1 X = v(t) 1C(z,t) (x)h(hz, xi) σd (C(z, t)) − 1C(z,t) (xk ) dσd (z) dt. N −1 Sd k=0 Hence using the definition of the inner product h·, ·iKv,h,x0 , we have hR(Hv,h,x0 ; x), R(Hv,h,x0 ; x)iK v,h,x0 Z 1 Z N −1 2 (11.7) 1 X 1C(x;t) (xk ) dσd (x) dt. = v(t) h(hz, xi) σd (C(x, t)) − N −1 Sd k=0 Combining equations (11.6) and (11.7), we have the generalized location-weighted version of the Stolarsky invariance principle. 11.5. Proof of Theorem 8 (Spatially weighed invariance) As in Section 11.1, lim→0 means lim1 →0+ lim2 →0+ and similarly limη→0 denotes limη1 →0+ limη2 →0+ . We prove a series of lemmas first. Lemma 7. For v (·) and hη (·) defined by equations (3.3) and (5.3), N −1 2 1 X 1C(z;t) (xk ) dσd (z) dt lim lim v (t) hη (hz, xc i) σd (C(z, t)) − η→0 →0 −1 N Sd k=0 Z p ∗ 2 ∗ 2 = |p(ρ̃xc + 1 − ρ̃ y , ρ̂) − p̂1 (ρ̂)| dσd−1 (y ), Z 1 Z Sd−1 where p̂1 (ρ̂) = σd (C(y; ρ̂)). He, Basu, Zhao & Owen/Stolarsky invariance for permutations 34 Proof. This proof is similar to the others. First we take the limit  → 0 yielding Z hη (hz, xc i) σd (C(z, ρ̂)) − lim η→0 Sd N 2 1 X 1C(z;ρ̂) (xk ) dσd (z). N k=1 √ Making the projection z = sxc + 1 − s2 z ∗ gives Z 1Z ωd−1 lim (1 − s2 )d/2−1 hη (s) × η→0 −1 Sd−1 ωd σd (C(sxc + p 1 − s2 z ∗ , ρ̂)) − N 2 1 X 1C(sxc +√1−s2 z∗ ;ρ̂) (xk ) dσd−1 (z ∗ ) ds N k=1 Z p |p(ρ̂xc + 1 − ρ̂2 y ∗ , ρ̂) − p̂1 (ρ̂)|2 dσd−1 (y ∗ ). = Sd−1 Lemma 8. For v (·) and hη (·) defined by equations (3.3) and (5.3) , N −1 1 X Kv ,hη ,xc (xk , x` ) η→0 →0 N 2 lim lim k,`=0 = 1 N2 N −1 X Z k,`=0 1(hy, xk i > ρ̂)1(hy, x` i > ρ̂) dσd−1 (y ∗ ). Sd−1 Proof. First, limη→0 lim→0 N −2 NP −1 Kv ,hη ,xc (xk , x` ) equals k,`=0 Z N −1 1 X lim hη (hz, xc i)1C(z;ρ̂) (xk )1C(z;ρ̂) (x` ) dσd (z). η→0 Sd N2 k,`=0 Projecting z onto xc yields z = sxc + √ 1 − s2 y ∗ and then we have Z 1 Z N −1 1 X ωd−1 2 d/2−1 lim (1 − s ) h (s) 1C(z;ρ̂) (xk )1C(z;ρ̂) (x` ) dσd−1 (y ∗ ) η η→0 −1 ωd N2 d−1 S k,`=0 N −1 Z 1 X = 2 1(hy, xk i > ρ̂)1(hy, x` i > ρ̂) dσd−1 (y ∗ ). N Sd−1 k,`=0 Lemma 9. For v (·) and hη (·) defined by equations (3.3) and (5.3), Z Z lim lim Kv ,hη ,xc (x, y) dσd (x) dσd (y) = p̂1 (ρ̂)2 η→0 →0 Sd Sd Proof. Because Kv ,hη ,xc is nonnegative and uniformly bounded we may take the limit over  inside the integrals. Now Z lim Kv ,hη ,xc (x, y) = hη (hz, xc i)1C(z;ρ̂) (x)1C(z;ρ̂) (y) dσd (z), →0 Sd He, Basu, Zhao & Owen/Stolarsky invariance for permutations 35 and the limit becomes Z Z Z lim hη (hz, xc i)1C(z;ρ̂) (x)1C(z;ρ̂) (y) dσd (z) dσd (x) dσd (y). η→0 Sd Sd Sd Integrating over z last we get limη→0 R Sd hη (hz, xc i)p̂21 (ρ̂) dz = p̂21 (ρ̂). Lemma 10. Under reference distribution 2 N −1 Z 2 X lim lim Kv ,hη ,xc (x, xk ) dσd (x) = 2p̂1 (ρ̂)E(p(y, ρ̂)). η→0 →0 N Sd k=0 Proof. The argument here is similar to the one used for Lemma 9. Take the limit over  inside the integral and change the order of integration to yield Z lim 2p̂1 (ρ̂) η→0 Sd N −1 1 X hη (hz, xc i)1C(z,ρ̂) (xk ) dσd (z). N k=0 Substituting the projection z = txc + Z 1 lim 2p̂1 (ρ̂) η→0 −1 Z = 2p̂1 (ρ̂) Sd−1 √ ωd−1 (1 − t2 )d/2−1 hη (t) ωd 1 N N −1 X 1 − t2 z ∗ produces Z Sd−1 N −1 1 X 1C(txc +√1−t2 z∗ ,ρ̂) (xk ) dσd−1 (z ∗ ) dt N k=0 1C(ρ̃x +√1−ρ̃2 z∗ ,ρ̂) (xk ) dσd−1 (z ∗ ) c k=0 = 2p̂1 (ρ̂)E(p(y, ρ̂)) for y under Model 2. Proof of Theorem 8 Proof. The proof follows from using Lemmas 7 to 10 and Theorem 7.
10math.ST
Astronomy & Astrophysics manuscript no. aanda February 1, 2018 c ESO 2018 Enhancing SDO/HMI images using deep learning C. J. Díaz Baso1, 2 and A. Asensio Ramos1, 2 1 2 Instituto de Astrofísica de Canarias, C/Vía Láctea s/n, E-38205 La Laguna, Tenerife, Spain Departamento de Astrofísica, Universidad de La Laguna, E-38206 La Laguna, Tenerife, Spain ABSTRACT arXiv:1706.02933v2 [astro-ph.SR] 30 Jan 2018 Context. The Helioseismic and Magnetic Imager (HMI) provides continuum images and magnetograms with a cadence better than one every minute. It has been continuously observing the Sun 24 hours a day for the past 7 years. The trade-off between full disk observations and spatial resolution makes that HMI is not enough to analyze the smallest-scale events in the solar atmosphere. Aims. Our aim is developing a new method to enhance HMI data, simultaneously deconvolving and superresolving images and magnetograms. The resulting images will mimick observations with a diffraction-limited telescope twice the diameter of HMI. Methods. The method, that we term Enhance, is based on two deep fully convolutional neural networks that input patches of HMI observations and output deconvolved and superresolved data. The neural networks are trained on synthetic data obtained from simulations of the emergence of solar active regions. Results. We have obtained deconvolved and supperresolved HMI images. To solve this ill-defined problem with infinite solutions we have used a neural network approach to add prior information from the simulations. We test Enhance against Hinode data that has been degraded to a 28 cm diameter telescope showing very good consistency. The code is open sourced for the community. Key words. Techniques: image processing, Sun: magnetic fields, Methods: data analysis 1. Introduction Astronomical observations from Earth are always limited by the presence of the atmosphere, which strongly disturbs the images. An obvious (but expensive) solution to this problem is to place the telescopes in space, which produces observations without any (or limited) atmospheric aberrations. Although the observations obtained from space are not affected by atmospheric seeing, the optical properties of the instrument still limits the observations. In the case of near-diffraction limited observations, the point spread function (PSF) establishes the maximum allowed spatial resolution. The PSF typically contains two different contributions. The central core is usually dominated by the Airy diffraction pattern, a consequence of the finite and circular aperture of the telescope (plus other perturbations on the pupil of the telescope like the spiders used to keep the secondary mirror in place). The tails of the PSF are usually dominated by uncontrolled sources of dispersed light inside the instrument, the so-called stray light. It is known that the central core limits the spatial resolution of the observations (the smallest feature that one can see in the image), while the tails reduce the contrast of the image (Danilovic et al. 2010). Moreover, it is important to note that knowing the PSF of any instrument is a very complicated task (Yeo et al. 2014; Couvidat et al. 2016). If the PSF is known with some precision, it is possible to apply deconvolution techniques to partially remove the perturbing effect of the telescope. The deconvolution is usually carried out with the Richardson-Lucy algorithm (RL; Richardson 1972), an iterative procedure that returns a maximum-likelihood solution to the problem. Single image deconvolution is usually a very ill-defined problem, in which a potentially infinite number of solutions can be compatible with the observations. Consequently, some kind of regularization has to be imposed. Typically, an early-stopping strategy in the iterative process of the RL algorithm leads to a decent output, damping the high spatial frequencies that appear in any deconvolution process. However, a maximum a-posteriori approach in which some prior information about the image is introduced gives much better results. Fortunately, spectroscopic and spectropolarimetric observations provide multi-image observations of a field-of-view (FOV) and the deconvolution process is much better defined. This deconvolution process has been tried recently with great success by van Noort (2012), who also introduced a strong regularization by assuming that the Stokes profiles in every pixel have to be explained with the emerging Stokes profiles from a relatively simple model atmosphere assuming local thermodynamical equilibrium. Another solution was provided by Ruiz Cobo & Asensio Ramos (2013), who assumed that the matrix built with the Stokes profiles for all observed pixels has very low rank. In other words, it means that the Stokes profiles on the FOV can be linearly expanded with a reduced set of vectors. This method was later exploited by Quintero Noda et al. (2015) with good results. Another different approach was developed by Asensio Ramos & de la Cruz Rodríguez (2015) where they used the concept of sparsity (or compressibility), which means that one can linearly expand the unknown quantities in a basis set with only a few of the elements of the basis set being active. Under the assumption of sparsity, they exploited the presence of spatial correlation on the maps of physical parameters, carrying out successful inversions and deconvolution simultaneously. A great science case for the application of deconvolution and superresolution techniques is the Helioseismic and Magnetic Imager (HMI; Scherrer et al. 2012) onboard the Solar Dynamics Observatory (SDO; Pesnell et al. 2012). HMI is a space-borne observatory that deploys full-disk images (plus a magnetogram and dopplergram) of the Sun every 45 s (or every 720 s for a better signal-to-noise ratio). The spatial resolution of these images is ∼ 1.100 , with a sampling of ∼ 0.500 /pix. In spite of the enormous advantage of having such a synoptic spatial telescope without Article number, page 1 of 14 A&A proofs: manuscript no. aanda the problematic earth’s atmosphere, the spatial resolution is not enough to track many of the small-scale solar structures of interest. The main reason of that is the sacrifice that HMI does to cover the full disk of the Sun encapsulating that FOV on a feasible sensor. We think that, in the process of pushing for the science advance, one would desirably prefer images with a better spatial resolution and compensated for the telescope PSF. Under the assumption of the linear theory of image formation, and writing images in lexicographic order (so that they are assumed to be sampled at a given resolution), the observed image can be written as: I = D[P ∗ O] + N, (1) where O is the solar image at the entrance of the telescope, P is a convolution matrix that simulates the effect of the PSF on the image, D is a sub-sampling (non-square) matrix that reduces the resolution of the input image to the desired output spatial resolution and N represents noise (usually with Gaussian or Poisson statistics). The solution to the single-image deconvolution+superresolution problem (SR; Borman & Stevenson 1998) requires the recovery of O (a high-resolution image of 2N × 2N pixels) from a single measurement I (a low-resolution image of N × N pixels). This problem is extremely ill-posed, even worse than the usual deconvolution to correct from the effect of the PSF. A multiplicity (potentially an infinite number) of solutions exists. This problem is then typically solved by imposing strong priors on the image (e.g., Tipping & Bishop 2003). Despite the difficulty of the problem, we think there is great interest in enhancing the HMI images using post-facto techniques. A super-resolved image could help detect or characterize small features in the surface of the Sun, or improve the estimation of the total magnetic flux limited by the resolution in the case of magnetograms. This motivated us to develop an end-to-end fast method based on a deep fully convolutional neural network that simultaneously deconvolve and superresolve by a factor of 2 the HMI continuum images and magnetograms. We have preferred to be conservative and only do superresolution by a factor 2 because our tests with a larger factor did not produced satisfactory results. Deep learning single-image deconvolution and superresolution has been recently applied with great success in natural images (Xu et al. 2014; Dong et al. 2015, 2016; Shi et al. 2016; Ledig et al. 2016; Hayat 2017). Given the variability of all possible natural images, a training-based approach should give much better results in our case than in the case of natural images. In the following, we give details about the architecture and training of the neural network and provide examples of applications to HMI data. The output oi is then input in another neuron that does a similar work. An ANN can be understood as a pipeline where the information goes from the input to the output, where each neuron makes a transformation like the one described above (see left panel of Fig. 1). Given that neurons are usually grouped in layers, the term deep neural network comes from the large number of layers that are used to build the neural network. Some of the most successful and recent neural networks contain several millions of neurons organized in several tens or hundreds of layers (Simonyan & Zisserman 2014). As a consequence, deep neural networks can be considered to be a very complex composition of very simple nonlinear functions, which gives the capacity to do very complex transformations. The most used type of neural network from the 1980s to the 2000s is the fully connected network (FCN; see Schmidhuber 2014, for an overview), in which every input is connected to every neuron of the following layer. Likewise, the output transformation becomes the input of the following layer (see left panel of Fig. 1). This kind of architecture succeeded to solve problems that were considered to be not easily solvable as the recognition of handwritten characters (Bishop 1996). A selection of applications in Solar Physics include the inversion of Stokes profiles (e.g., Socas-Navarro 2005; Carroll & Kopf 2008), the acceleration of the solution of chemical equilibrium (Asensio Ramos & SocasNavarro 2005) and the automatic classification of sunspot groups (Colak & Qahwaji 2008). Neural networks are optimized iteratively by updating the weights and biases so that a loss function that measures the ability of the network to predict the output from the input is minimized1 . This optimization is widely known as learning or training process. In this process a training dataset is required. 2.2. Convolutional neural networks In spite of the relative success of neural networks, their application to high-dimensional objects like images or videos turned out to be an obstacle. The fundamental reason was that the number of weights in a fully connected network increases extremely fast with the complexity of the network (number of neurons) and the computation quickly becomes unfeasible. As each neuron has to be connected with the whole input, if we add a new neuron we will add the size of the input in number of weights. Then, a larger number of neurons implies a huge number of connections. This constituted an apparently unsurmountable handicap that was only solved with the appearance of convolution neural networks (CNN or ConvNets; LeCun & Bengio 1998). 2. Deep Convolutional Neural Network The most important ingredient in the CNN is the convolutional layer which is composed of several convolutional neurons. 2.1. Deep neural networks Each CNN-neuron carries out the convolution of the input with Artificial neural networks (ANN) are well-known computing a certain (typically small) kernel, providing as output what is systems based on connectionism that can be considered to be known as feature map. Similar to a FCN, the output of convovery powerful approximants to arbitrary functions (Bishop 1996). lutional neurons is often passed through a nonlinear activation They are constructed by putting together many basic fundamental function. The fundamental advantage of CNNs is that the same structures (called neurons) and connecting them massively. Each weights are shared across the whole input, drastically reducing neuron i is only able to carry out a very basic operation on the the number of unknowns. This also makes CNN shift invariant input vector: it multiplies all the input values x j by some weights (features can be detected in an image irrespectively of where they w j , adds some bias bi and finally returns the value of a certain are located). user-defined nonlinear activation function f (x). In mathematical notation, a neuron computes: oi = f (Σ j x j · w j + bi ). Article number, page 2 of 14 (2) 1 This is the case of supervised training. Unsupervised neural networks are also widespread but are of no concern in this paper. C. J. Díaz Baso and A. Asensio Ramos: Enhancing HMI images Previous layer (neurons or input) Fully-connected layer height width depth Fig. 1. Left panel: building block of a fully-connected neural network. Each input of the previous layer is connected to each neuron of the output. Each connection is represent by different lines where the width is associated to higher weights and the dashed lines to negative weights. Right panel: three-dimensional convolution carried out by a convolutional layer. The 3D-kernel traverses the whole input, producing a single scalar at each position. At the end, a 2D feature map will be created for each 3D kernel. When all feature maps are stacked, a feature map tensor will be created. In mathematical notation, for a two-dimensional input X of size N × N with C channels2 (really a cube or tensor of size N × N × C), each output feature map Oi (with size N × N × 1) of a convolutional layer is computed as: it, but it would require more training time (and data) to learn to approximate that mode of operation (Peyrard et al. 2015). Although a convolutional layer significantly decreases the number of free parameters as compared with a fully-connected layer, it introduces some hyperparameters (global characteristics Oi = Ki ∗ X + bi , (3) of the network) to be set in advance: the number of kernels to be used (number of feature maps to extract from the input), size where Ki is the K × K ×C kernel tensor associated with the output of each kernel with its corresponding padding (to deal with the feature map i, bi is a bias value (1 × 1 × 1) and the convolution borders of the image) and stride (step to be used during the is displayed with the symbol ∗. Once the convolution with M convolution operation) and the number of convolutional layers different kernels is carried out and stacked together, the output and specific architecture to use in the network. As a general rule, O will have size N × N × M. All convolutions are here indeed the deeper the CNN, the better the result, at the expense of a more intrinsically three dimensional, but one could see them as the difficult and computationally intensive training. CNNs have been total of M × C two dimensional convolutions plus the bias (see used recently in astrophysics for denoising images of galaxies right panel of Fig. 1). (Schawinski et al. 2017), for cosmic string detection in CMB CNNs are typically composed of several layers. This layer- temperature maps (Ciuca et al. 2017), or for the estimation of wise architecture exploits the property that many natural signals horizontal velocities in the solar surface (Asensio Ramos et al. are a generated by a hierarchical composition of patterns. For 2017) . instance, faces are composed of eyes, while eyes contain a similar internal structure. This way, one can devise specific kernels that extract this information from the input. As an example, Fig. 2 2.3. Activation layers shows the effect of a vertical border detection kernel on a real As said, the output of a convolutional layer is often passed solar image. The result at the right of the figure is the feature through a non-linear function that is termed the activation funcmap. CNNs work on the idea that each convolution layer extracts tion. Since the convolution operation is linear, this activation is information about certain patterns, which is done during the trainthe one that introduces the non-linear character of the CNNs. ing by iteratively adapting the set of convolutional kernels to the Although hyperbolic tangent, f (x) = tanh(x), or sigmoidal, specific features to locate. This obviously leads to a much more f (x) = [1 + exp(−x)]−1 , activation units were originally used optimal solution as compared with hand-crafted kernels. Despite in ANNs, nowadays a panoply of more convenient nonlinearities the exponentially smaller number of free parameters as compared are used. The main problem with any sigmoid-type activation with a fully-connected ANN, CNNs produce much better results. function is that its gradient vanishes for very large values, diffiIt is interesting to note that, since a convolutional layer just comculting the training of the network. Probably the most common putes sums and multiplications of the inputs, a multi-layer FCN activation function is the rectified linear unit (ReLU; Nair & Hin(also known as perceptron) is perfectly capable of reproducing ton 2010) or slight variations of it. The ReLU replaces all negative 2 values in the input by zero and keeps the rest untouched. This The term channels is inherited from the those of a color image (e.g., RGB channels). However, the term has a much more general scope and activation has the desirable property of producing non-vanishing can be used for arbitrary quantities (see Asensio Ramos et al. 2017, for gradients for positive arguments, which greatly accelerates the an application). training. Article number, page 3 of 14 A&A proofs: manuscript no. aanda * -1 0 1 -2 0 2 -1 0 1 = Fig. 2. An example of a convolution with a filter. In this example a vertical border-locating kernel is convolved with the input image of the Sun. A resulting feature map of size (N − 2) × (N − 2) is generated from the convolution. 2.4. General training process during the update of the weights but used after each iteration as validation. Desirably, the loss should decrease both in the training CNNs are trained by iteratively modifying the weights and bi- and validation sets simultaneously. If overfitting occurs, the loss ases of the convolutional layers (and any other possibly learnable in the validation set will increase. parameter in the activation layer). The aim is to optimize a userMoreover, several techniques have been described in the litdefined loss function from the output of the network and the erature to accelerate the training of CNNs and also to improve desired output of the training data. The optimization is routinely generalization. Batch normalization (Ioffe & Szegedy 2015) is a solved using simple first-order gradient descent algorithms (GD; very convenient and easy-to-use technique that consistently prosee Rumelhart et al. 1988), which modifies the weights along the duces large accelerations in the training. It works by normalizing negative gradient of the loss function with respect to the model every batch to have zero mean and unit variance. Mathematically, parameters to carry out the update. The gradient of the loss func- the input is normalized so that: tion with respect to the free parameters of the neural network is obtained through the backpropagation algorithm (LeCun et al. y = γ x̂i + β 1998). Given that neural networks are defined as a stack of mod- i ules (or layers), the gradient of the loss function can be calculated x̂i = √xi − µ , (5) using the chain rule as the product of the gradient of each module σ2 +  and, ultimately, of the last layer and the specific loss function. In practice, procedures based on the so-called stochastic gra- where µ and σ are the mean and standard deviation of the inputs −3 dient descent (SGD) are used, in which only a few examples on the batch and  = 10 is a small number to avoid underflow. The parameters γ and β are learnable parameters that are modified (termed batch) from the training set are used during each iteration to compute a noisy estimation of the gradient and adjust the during the training. weights accordingly. Although the calculated gradient is a noisy estimation of the one calculated with the whole training set, the 2.5. Our architecture training is faster as we have less to compute and more reliable. If the general loss function Q is the average of each loss Q j com- We describe in the following the specific architecture of the two puted on a batch of inputs and it can be written as Q = Σnj Q j /n, deep neural networks used to deconvolve and superresolve continthe weights wi are updated following the same recipe as the gradi- uum images and magnetograms. It could potentially be possible ent descend algorithm but calculating the gradient within a single to use a single network to deconvolve and superresolve both types of images. However as each type of data has different well debatch: fined properties (like the usual range of values, or the sign of the wi+1 = wi − η∇Q(wi ) = wi − η∇Σnj Q j (wi )/n ' wi − η∇Q j (wi ), (4) magnitude) we have decided to use two different neural networks, finding remarkable results. We refer to the set of two deep neural where η is the so-called learning rate. It can be kept fixed or it networks as Enhance. can be changed according to our requirements. This parameter The deep neural networks used in this work are inspired by has to be tuned to find a compromise between the accuracy of the DeepVel (Asensio Ramos et al. 2017), used to infer horizontal network and the speed of convergence. If η is too large, the steps velocity fields in the solar photosphere. Figure 3 represents a will be too large and the solution could potentially overshoot the schematic view of the architecture. It is made of the concatenation minimum. On the contrary, if it is too small it will take so many of N residual blocks (He et al. 2015). Each one is composed of iterations to reach the minimum. Adaptive methods like Adam several convolutional layers (two in our case) followed by batch (Kingma & Ba 2014) have been developed to automatically tune normalizations and a ReLU layer for the first convolutional layer. the learning rate. The internal structure of a residual block is displayed in the Because of the large number of free parameters in a deep blowup3 of Fig.3. CNNs, overfitting can be a problem. One would like the network to generalize well and avoid any type of "memorization" of the 3 We note that we use the non-standard implementation of a residual training set. To check for that, a part of the training set is not used block where the second ReLU activation is removed from the reference Article number, page 4 of 14 C. J. Díaz Baso and A. Asensio Ramos: Enhancing HMI images Conv ReLU Res i dual Bl oc k s ConvBat c h Up ConvReLU Conv I nput Out put ( 3x 3) ( 3x 3) ( 3x 3) ( 1x 1) Fig. 3. Upper panel: architecture of the fully convolutional neural network used in this work. Colors refer to different types of layers, which are indicated in the upper labels. The kernel size of convolutional layers are also indicated in the lower labels. Black layers are representing the input and output layers. Lower panel: the inner structure of a residual block. Following the typical scheme of a residual block, there is also a shortcut connection between the input and the output of the block (see more information in He et al. 2015; Asensio Ramos et al. 2017), so that the input is added to the output. Very deep networks usually saturate during training producing higher errors than shallow networks because of difficulties during training (also known as the degradation problem). The fundamental reason is that the gradient of the loss function with respect to parameters in early layers becomes exponentially small (also known as the vanishing gradient problem). Residual networks help avoid this problem obtaining state-of-the-art results without adding any extra parameter and with practically the same computational complexity. It is based on the idea that if y = F(x) represents the desired effect of the block on the input x, it is much simpler for a network to learn the deviations from the input (or residual mapping) that it can called R(x) = y − x than the full map F(x), so that y = F(x) = R(x) + x. In our case, all convolutions are carried out with kernels of size 3 × 3 and each convolutional layer uses 64 such kernels. Additionally, as displayed in Fig. 3, we also impose another shortcut connection between the input to the first residual block and the batch normalization layer after the last residual block. We have checked that this slightly increase the quality of the prediction. Noting that a convolution of an N × N image with a 3 × 3 kernel reduces the size of the output to (N − 2) × (N − 2), we augment the input image with 1 pixel in each side using a reflection padding to compensate for this and maintain the size of the input and output. Because Enhance carries out ×2 superresolution, we need to add an upsampling layer somewhere in the architecture (displayed in violet in Fig. 3). One can find in the literature two main options to do the upsampling. The first one involves upsampling the image just after the input and let the rest of convolutional layers do the work. The second involves doing the upsampling just before the output. Following Dong et al. (2016), we prefer the second option because it provides a much faster network, since the convolutions are applied to smaller images. Moreover, to avoid artifacts in the upsampling4 we have implemented a nearest-neighbor resize followed by convolution instead of a more standard transpose convolution. The last layer that carries out a 1 × 1 convolution is of extreme importance in our networks. Given that we use ReLU activation layers throughout the network, it is only in this very last layer where the output gets its sign using the weights associated to the layer. This is of no importance for intensity images, but turns out to be crucial for the signed magnetic field. The number of free parameters of our CNN can be easily obtained using the previous information. In the scheme of Fig. 3, the first convolution layer generates 64 channels by applying 64 different kernels of size 3 × 3 × 1 to the input (a single-channel image), using (3×3+1)×64 = 640 free parameters. The following convolutional layers have again 64 kernel filters, but this time each one of size (3 × 3 × 64 + 1), with a total of 36928 free parameters. Finally, the last layer contains one kernel of size 1 × 1 × 64, that computes a weighted average along all channels. architecture (He et al. 2015), which provides better results according to https://github.com/gcr/torch-residual-networks 4 The checkerboard artifacts are nicely explained https://distill.pub/2016/deconv-checkerboard/. in Article number, page 5 of 14 A&A proofs: manuscript no. aanda HMI - Observation 100 600 60 Y [pixel] Y [pixel] 80 40 400 200 20 0 Simulation - Original 800 0 20 40 60 X [pixel] 80 0 100 0 Simulation - Degraded 200 400 X [pixel] 800 Power Spectrum of the image HMI Original PSF New PSF 100 105 80 104 60 P( ) Y [pixel] 600 40 103 20 0 102 0 20 40 60 X [pixel] 80 100 0.0 0.1 0.2 0.3 [pix 1] 0.4 0.5 Fig. 4. Upper left: HMI observation. Upper right: snapshot from the simulation used for training. Lower left: degraded simulations, which can be compared with the HMI observations. Lower right: azimuthally averaged power spectrum of the HMI observations and the degraded simulations with the original PSF and the one modified and used in the training process. The physical dimension of the three maps is 5400 ×5400 . The total amount of free parameters in this layer is 65 (including the bias). between the solar structures in the simulation of Cheung et al. (2010) and the real Sun. The radiative MHD simulation was carried out with the MURaM code (Vögler et al. 2005). The box spans 92 Mm × 49 2.6. Our training data and process Mm in the two horizontal directions and 8.2 Mm in the vertical A crucial ingredient for the success of an CNN is the generation direction (with horizontal and vertical grid spacing of 48 and 32 of a suitable training set of high quality. Our network is trained km, respectively). After ∼20 h of solar time, an active region is using synthetic continuum images and synthetic magnetograms formed as a consequence of the buoyancy of an injected flux tube from the simulation of the formation of a solar active region de- in the convection zone. An umbra, umbral dots, light bridges, and scribed by Cheung et al. (2010). This simulation provides a large penumbral filaments are formed during the evolution. As comFOV with many solar-like structures (quiet Sun, plage, umbra, mented before, this constitutes a very nice dataset of simulated penumbra, etc.) that visually resemble those in the real Sun. We images that look very similar to those on the Sun. Synthetic gray note that if the network is trained properly and generalizes well, images are generated from the simulated snapshots (Cheung et al. the network does not memorize what is in the training set. On the 2010) and magnetograms are obtained by just using the vertical contrary, it applies what it learns to the new structures. Therefore, magnetic field component at optical depth unity at 5000 Å. A we are not specially concerned by the potential lack of similarity total of 250 time steps are used in the training (slightly less for Article number, page 6 of 14 C. J. Díaz Baso and A. Asensio Ramos: Enhancing HMI images Y [pixel] Y [pixel] Y [pixel] Synthetic - HMI Y [pixel] Y [pixel] Synthetic - Target 40 80 80 30 60 60 20 40 40 10 20 20 40 80 80 30 60 60 20 40 40 10 20 20 40 80 80 30 60 60 20 40 40 10 20 20 0 Y [pixel] Network 10 20 30 40 0 20 40 60 80 40 80 80 30 60 60 20 40 40 10 20 20 40 80 80 30 60 60 20 40 40 10 20 20 40 80 80 30 60 60 20 40 40 10 20 20 0 10 20 30 X [pixel] 40 0 20 40 60 X [pixel] 80 0 20 40 60 80 0 20 40 60 X [pixel] 80 Fig. 5. Results with the synthetic validation set. The upper three rows show results for the continuum images, while the lower three rows display results for the magnetograms. All horizontal and vertical axes are in pixels. Article number, page 7 of 14 A&A proofs: manuscript no. aanda the magnetograms when the active region has already emerged to the surface). We note that the magnetograms of HMI in the Fe i 6173 Å correspond to layers in the atmosphere around logτ = −1 (Bello González et al. 2009), while our magnetograms are extracted from logτ = 0, where τ is the optical depth at 5000 Å. In our opinion this will not affect the results because the concentration of the magnetic field is similar in terms of size and shape in both atmospheric heights. The synthetic images (and magnetograms) are then treated to simulate a real HMI observation. All 250 frames of 1920 × 1024 images are convolved with the HMI PSF (Wachter et al. 2012; Yeo et al. 2014; Couvidat et al. 2016) and resampled to 0.50400 /pixel. For simplicity, we have used the PSF described in Wachter et al. (2012). The PSF functional form is azimuthally symmetric and it is given by " "  2 #  r k #−1 r + 1+ , (6) PSF(r) = (1 − ) exp − ω W which is a linear combination of a Gaussian and a Lorentzian. Note that the radial distance is r = πDθ/λ, with D the telescope diameter, λ the observing wavelength and θ the distance in the focal plane in arcsec. The reference values for the parameters (Wachter et al. 2012) are  = 0.1, ω = 1.8, k = 3 and W = 3. Figure 4 demonstrates the similarity between an HMI image of the quiet Sun (upper left panel) and the simulations degraded and downsampled (lower left panel). The simulation at the original resolution is displayed in the upper right panel. For clarity, we display the horizontal and vertical axis in pixel units, instead of physical units. This reveals the difference in spatial resolution, both from the PSF convolution and the resampling. In this process we also realized that using the PSF of Wachter et al. (2012), the azimuthally averaged power spectrum of the degraded simulated quiet Sun turns out to have stronger tails than those of the observation. For this reason, we slightly modified it so that we finally used ω = 2 and W = 3.4. The curve with these modified values is displayed in orange as the new PSF in the Fig. 4 with the original PSF and the default values in blue. For consistency, we also applied this PSF to the magneto-convection simulations described by Stein & Nordlund (2012) and Stein (2012), finding a similar improvement in the comparison with observations. One could argue that using the more elaborate PSFs of Yeo et al. (2014) (obtained via observations of the Venus transit) or Couvidat et al. (2016) (obtained with ground data before the launch) is preferred. However, we point out that applying the PSF of Wachter et al. (2012) (with some modifications that are specified before) to the simulations produce images that compare excellently at a quantitative level with the observations. Anyway, given that our code is open sourced, anyone interested in using a different PSF can easily retrain the deep networks. Then, we randomly extract 50000 patches of 50 × 50 pixels both spatially and temporally, which will constitute the input patches of the training set. We also randomly extract a smaller subset of 5000 patches which will act as a validation set to avoid overfitting. These are used during the training to check that the CNN generalizes well and is not memorizing the training set. The targets of the training set are obtained similarly but convolving with the Airy function of a telescope twice the diameter of HMI (28 cm), which gives a diffraction limit of 0.55”/pixel, and then resampled to 0.25”/pixel. Therefore, the sizes of the output patches are 100 × 100 pixels. All inputs and outputs for the continuum images are normalized to the average intensity of the quiet Sun. This is very convenient when the network is deployed in Article number, page 8 of 14 production because this quantity I/Ic is almost always available. On the contrary, the magnetograms are divided by 103 , so they are treated in kG during the training. The training of the network is carried out by minimizing a loss function defined as the squared difference between the output of the network and the desired output defined on the training set. To this end, we use the Adam stochastic optimizer (Kingma & Ba 2014) with a learning rate of η = 10−4 . The training is done in a Titan X GPU for 20 epochs, taking ∼ 500 seconds per epoch. We augment the loss function with an `2 regularization for the elements of the kernels of all convolutional layers to avoid overfitting. Finally, we add Gaussian noise (with an amplitude of 10−3 in units of the continuum intensity for the continuum images and 10−2 for the magnetograms, following HMI standard specifications5 ) to stabilize the training and produce better quality predictions. This is important for regions of low contrast in the continuum images and regions of weak magnetic fields in the magnetograms. Apart from the size and number of kernels, there are a few additional hyperparameters that need to be defined in Enhance. The most important ones are the number of residual blocks, the learning rate of the Adam optimizer and the amount of regularization. We have found stable training behavior with a learning rate of 10−4 so we have kept this fixed. Additionally, we found that a regularization weight of 10−6 for the continuum images and 10−5 for the magnetograms provides nice and stable results. Finally, five residual blocks with ∼450k free parameters provide predictions that are almost identical to those of 10 and 15 residual blocks but much faster. We note that the number of residual blocks can be further decreased even down to one and still a good behavior is found (even if the number of kernels is decreased to 32). This version of Enhance is 6 times faster than the one presented here, reducing the number of parameters to ∼40k, with differences around 3%. Although Enhance is already very fast, this simplified version can be used for an in-browser online superresolution and deconvolution of HMI data. 3. Results 3.1. Validation with synthetic images Before proceeding to applying the networks to real data, we show in Fig. 5 the results with some of the patches from the validation set which are not used during the training. The upper three rows show results for the continuum images, while the lower three rows show results for the magnetograms. The leftmost column is the original synthetic image at the resolution of HMI. The rightmost column is the target that should be recovered by the network, which has doubled the number of pixels in each dimension. The middle column displays our single-image superresolution results. Even though the appearance of all small-scale details are not exactly similar to the target, we consider that Enhance is doing a very good job in deconvolving and superresolving the data in the first column. In the regions of increased activity, we find that we are able to greatly improve the fine structure, specially in the penumbra. Many details are barely visible in the synthetic HMI image but can be guessed. Of special relevance are the protrusions in the umbra in the third row, which are very well recovered by the neural network. The network also does a very good job in the quiet Sun, correctly recovering the expected shape of the granules from the blobby appearance in the HMI images. 5 http://hmi.stanford.edu/Description/HMI_Overview.pdf C. J. Díaz Baso and A. Asensio Ramos: Enhancing HMI images HMI - Original - c= 3.8% Y [pixel] 200 175 175 150 150 125 125 100 100 75 75 50 50 25 25 0 0 25 Y [pixel] 75 100 125 150 175 200 Output Network - c= 7.7% 400 0 350 300 300 250 250 200 200 150 150 100 100 50 50 0 50 100 150 200 250 300 350 400 Hinode - Degraded - c= 3.9% 400 0 350 300 300 250 250 200 200 150 150 100 100 50 50 0 50 100 150 200 250 X [pixel] 300 25 350 400 0 50 75 100 125 150 175 200 350 400 350 400 Output Network - c= 6.7% 0 50 100 150 200 250 300 Hinode - Degraded - c= 3.7% 400 350 0 0 400 350 0 Y [pixel] 50 HMI - Original - c= 3.7% 200 0 50 100 150 200 250 X [pixel] 300 Fig. 6. This figure shows the application of the neural network to real HMI images. From the upper to the lower part of each column: the original HMI images, the output of the neural network and the degraded Hinode image. All the axis are in pixel units. Article number, page 9 of 14 A&A proofs: manuscript no. aanda Y [pixel] Original Original 350 350 300 300 250 250 200 200 150 150 100 100 50 50 Enhanced 0 0 50 100 150 200 X [pixel] 250 300 350 Enhanced 0 0 50 100 150 200 X [pixel] 250 300 350 Fig. 7. This figure show a example our neural network applied to the intensity (left) and magnetogram (right) for the same region. The FOV is divided in two halfs. The upper half shows the HMI original image, without applying the neural network. The lower half shows enhanced image applying the neural network to the last image. The original image was resampled to have the same scale of the network output. The contrast σI /I, calculated as the standard deviation of the continuum intensity divided by the average intensity of the The trained networks are then applied to real HMI data. In order area, is quoted in the title of each panel and has been obtained to validate the output of our neural network we have selected in a small region of the image displaying only granulation. The observations of the Broadband Filter Instrument (BFI) from the granulation contrast increases from ∼ 3.7% to ∼7% (as Couvidat Solar Optical Telescope (SOT Ichimoto et al. 2008; Tsuneta et al. et al. 2016), almost a factor 2 larger than the one provided by 2008) onboard Hinode (Kosugi et al. 2007). The pixel size of degraded Hinode. Note that the contrast may be slightly off for the BFI is 0.109” and the selected observations were obtained in the right column because of the small quiet Sun area available. the red continuum filter at 6684 ± 2 Å, which is the one closer The granulation contrast measured in Hinode without degradation to the observing wavelength of HMI. To properly compare our is around 7%. After the resampling, it goes down to the values results with Hinode, we have convolved the BFI images with an quoted in the figure. We note that (Danilovic et al. 2008) analyzed Airy function of a telescope of 28 cm diameter and resampled to the Hinode granulation contrast at 630 nm and concluded that 0.25”/pixel to match those of the output of Enhance. The Hinode it is consistent with those predicted by the simulations (in the images have not been deconvolved from the influence of its PSF. range 14−15%) once the PSF is taken into account. Just from the We point out that the long tails of the PSF of the Hinode/SOT visual point of view, it is clear that Enhance produces small-scale instrument produces a slight decrease of the contrast (Danilovic structures that are almost absent in the HMI images but clearly et al. 2010) and this is the reason why our enhanced images have present in the Hinode images. Additionally, the deconvolved and a larger contrast. superresolved umbra intensity decreases between 3 and 7% when compared to the original HMI umbral intensity. Interesting cases are the large light bridge in the images of 3.2.1. Continuum images the right column, that increases in spatial complexity. Another Figure 6 displays this comparison for two different regions examples are the regions around the light bridge, that are plagued (columns) observed simultaneously with Hinode and HMI. These with small weak umbral dots that are evident in Hinode data but two active regions are: NOAA 11330 (N09, E04) observed on completely smeared out in HMI. For instance, the region conOctober 27, 2011 (first column) and NOAA 12192 (S14, E05) necting the light bridge at (125, 240) with the penumbra. Another observed on October 22, 2014 (second column). We have used similar instance of this enhancement occurs (375, 190), a pore HMI images with a cadence of 45 seconds, which is the worst with some umbral dots that are almost absent in the HMI images. scenario in terms of noise in the image. The upper rows show As a caveat, we warn the users that the predictions of the neuthe original HMI images. The lower rows display the degraded ral network in areas close to the limb is poorer than those at disk Hinode images, while the central row shows the output of our center. Given that Enhance was trained with images close to disk neural network. Given the fully convolutional character of the center, one could be tempted to think that a lack of generalization deep neural network used in this work, it can be applied seam- is the cause for the failure. However, we note that structures seen lessly to input images of arbitrary size. As an example, an image in the limb like elongated granules share some similarity to some of size 400 × 400 can be superresolved and deconvolved in ∼100 penumbral filaments, so these cases are already present in the ms using a Titan X GPU, or ∼1 s using a 3.4 GHz Intel Core i7. training set. The fundamental reason for the failure is that the 3.2. In the wild Article number, page 10 of 14 C. J. Díaz Baso and A. Asensio Ramos: Enhancing HMI images Power Spectrum of the image 108 Blos - Original Blos - Enhanced Blos - RL Noise = 12G Noise = 75G 107 1.5 106 1.0 P( ) Enhanced |Blos| [kG] 2.0 105 104 103 0.5 102 0.0 0.0 0.5 1.0 1.5 Original |Blos| [kG] 101 2.0 0.0 0.1 0.2 0.3 [pix 1] 0.4 0.5 Fig. 8. Left: scatter plot between the original magnetogram signal and the deconvolved magnetogram signal. Dotted lines indicate a change of a factor 2. Right: spatial Fourier power spectrum of all considered magnetograms: the original, the output of Enhance and the one deconvolved with RL. We also show the power spectrum of white noise at two different levels. spatial contrast in the limb is very small so the neural network does not know how to reconstruct the structures, thus creating artifacts. We speculate that these artifacts will not be significantly reduced even if limb synthetic observations are included in the training set. 3.2.2. A magnetogram example: AR 11158 As a final example, we show in Fig. 7 an example of the neural network applied to the intensity and the magnetogram for the same region: the NOAA 11158 (S21, W28), observed on February 15, 2011. The FOV is divided in two halfs. The upper parts show the HMI original image both for the continuum image (left panel) and the magnetogram (right panel). The lower parts display the enhanced images after applying the neural network. After the deconvolution of the magnetogram, we find: i) regions with very nearby opposite polarities suffer from an apparent cancellation in HMI data that can be restored with Enhance, giving rise to an increase in the absolute value of the longitudinal field; and ii) regions far from magnetized areas do get contaminated by the surroundings in HMI, which are also compensated for with Enhance, returning smaller longitudinal fields. The left panel of Fig. 8 shows the density plot of the input vs. output longitudinal magnetic field. Almost all the points lie in the 1:1 relation. However, points around 1 kG for HMI are promoted to larger values in absolute value, a factor ∼ 1.3 − 1.4 higher than the original image (Couvidat et al. 2016). Another interesting point to study is the range of spatial scales at which Enhance is adding information. The right panel of Fig. 8 displays the power spectrum of both magnetograms showed in the right part of Fig. 7. The main difference between both curves is situated in the range of spatial scales ν = 0.05 − 0.25 pix−1 with a peak at ν = 0.15 pix−1 . In other words, the neural network is operating mainly at scales between 4 and 20 pixels, where the smearing effect of the PSF is higher. The same effect can be seen when a standard Richardson– Lucy maximum-likelihood algorithm (RL) (including a bilinear interpolation to carry out the superresolution) is used (see Section 3.2.4 for more details). The power spectrum of the output of Enhance and the one deconvolved with RL are almost the same for frequencies below 0.15 pix−1 (equivalent to scales above ∼ 6 pix). For larger frequencies (smaller scales), the RL version adds noisy small scale structures at a level of ∼80 G, that is not case with Enhance. We note that the original image has a noise around ∼10 G. To quantify this last point, we have showed in Fig. 8 the flat spectrum of white noise artificial images with zero mean and standard deviations σ = 12G and σ = 75G. 3.2.3. Other general properties Depending on the type of structure analyzed, the effect of the deconvolution is different. In plage regions, where the magnetic areas are less clustered than in a sunspot, the impact of the stray light is higher. Then, Enhance produces a magnetic field that can increase up to a factor 2 (Yeo et al. 2014), with magnetic structures smaller in size, as signal smeared onto the surrounding quiet Sun is put back on its original location. According to the left panel of Fig 8, fields with smaller amplitudes suffer a larger relative change. As a guide to the eye, the two dotted lines indicate a change of a factor 2 in the same figure. To check these conclusions, we have used a Hinode-SOT Spectropolarimeter (SP) (Lites et al. 2013) Level 1D6 magnetogram. The region was observed in April 25, 2015 at 04:00h UT and its pixel size is around 0.30”/pix. Figure 9 shows the increase of the magnetic field after the deconvolution: magnetic fields of kG flux were diluted by the PSF and recovered with Enhance. It was impossible to find the Hinode map of exactly the same region at exactly the same moment, so that some differences are visible. However the general details are retrieved. In regions of strong concentrations, like the ones found in Fig. 7, almost each polarity is spatially concentrated and increased by a factor below 1.5. The magnetogram case is more complex than the intensity map. Many studies (Krivova & Solanki 2004; Pietarila et al. 2013; Bamba et al. 2014) have demonstrated the influence of the resolution to estimate a value of the magnetic flux and products of magnetogram as nonlinear force-free extrapolations (Tadesse et al. 2013; DeRosa et al. 2015), to compare with in–situ spacecraft measurements (Linker et al. 2017). 6 http://sot.lmsal.com/data/sot/level1d/ Article number, page 11 of 14 A&A proofs: manuscript no. aanda HMI - Original Y [pixel] 150 Output Network 300 125 250 250 100 200 200 75 150 150 50 100 100 25 50 50 0 0 25 50 75 100 X [pixel] 125 150 0 0 50 100 150 200 X [pixel] Hinode - Degraded 300 250 300 0 0 50 100 150 200 X [pixel] 250 300 Fig. 9. Left: original HMI magnetogram of a plage region observed on April 25, 2015. Middle: the result of applying Enhance to the HMI magnetogram. Right: the Hinode magnetogram at the same resolution of Enhance. The magnetic flux has been clipped from −1kG to 1kG. Contrary to deconvolving intensity images, deconvolving magnetograms is always a very delicate issue. The difficulty relies on the presence of cancellation produced during the smearing with a PSF if magnetic elements of opposite polarities are located nearby. This never happens for intensity images, which are always non-negative. Consequently, one can arbitrarily increase the value of nearby positive and negative polarities while maintaining a small quadratic approximation to the desired output. This effect is typically seen when a standard RL algorithm is used for deconvolution. Enhance avoids this effect by learning suitable spatial priors from the training dataset. It is true that the method will not be able to separate back two very nearby opposite polarities that have been fully canceled by the smearing of the PSF. Extensive tests show that the total absolute flux of each deconvolved image is almost the same as that in the original image, i.e., the magnetic field is mainly "reallocated". 3.2.4. Comparison with a standard RL deconvolution algorithm As a final step, we compare our results with those of a RL algorithm in a complicated case. Fig. 10 shows the same image deconvolved with both methods. The output of Enhance is similar to the output of the RL method. Some noisy artifacts are detected in areas with low magnetic field strength. A detailed analysis can reveal some differences, tough. In the light–bridge (LB), the magnetic field is lower in the RL version. Additionally, the polarity inversion line (PIL) appears more enhanced and splitted in the RL version than in the Enhance one. The magnetic flux in both areas (LB and PIL) are reduced by a factor 0.5, which might be an indication of too many iterations. The magnetic field strength of the umbra is between 50 G and 80 G higher in the RL version. As a final test, we have checked the difference between the original image and the output of Enhance convolved with the PSF. The average relative difference is around 4% (which is in the range 10-80 G depending on the flux of the pixel), which goes down to less than 1% in the RL case (this is a clear indication that Enhance is introducing prior information not present in the data). Additionally, our network is orders of magnitude faster than RL, it does not create noisy artifacts and the estimation of the magnetic field is as robust as a RL method. Article number, page 12 of 14 4. Conclusions and future work This paper presents the first successful deconvolution and superresolution applied on solar images using deep convolutional neural network. It represents, after Asensio Ramos et al. (2017), a new step toward the implementation of new machine learning techniques in the field of Solar Physics. Single-image superresolution and deconvolution, either for continuum images or for magnetograms, is an ill-defined problem. It requires the addition of extra knowledge for what to expect in the high-resolution images. The deep learning approach presented in this paper extracts this knowledge from the simulations and also applies a deconvolution. All this is done very fast, almost in real-time, and to images of arbitrary size. We hope that Enhance will allow researchers to study small-scale details in HMI images and magnetograms, something that cannot be currently done. Often, HMI is used not as the primary source of information but as a complement for ground-based observations, providing the context. For this reason, having enhanced images where you can analyze the context with increased resolution is interesting. We have preferred to be conservative and only do superresolution by a factor 2. We have carried out some tests with a larger factor, but the results were not satisfactory. It remains to test whether other techniques proposed in this explosively growing field can work better. Among others, techniques like a gradual up-sampling (Zhao et al. 2017), recursive convolutional layers (Kim et al. 2015), recursive residual blocks (Tai et al. 2017) or using adversarial networks as a more elaborate loss function (Ledig et al. 2016; Schawinski et al. 2017) can potentially produce better results. We open-source Enhance7 , providing the methods to apply the trained networks used in this work to HMI images or re-train them using new data. In the future, we plan to extend the technique to other telescopes/instruments to generate superresolved and deconvolved images. Acknowledgements. We would like to thank the anonymous referee for its comments and suggestions. We thank Mark Cheung for kindly sharing with us the simulation data, without which this study would not have been possible. Financial support by the Spanish Ministry of Economy and Competitiveness through project AYA2014-60476-P is gratefully acknowledged. CJDB acknowledges Fundación La Caixa for the financial support received in the form of a PhD contract. We also thank the NVIDIA Corporation for the donation of the Titan X GPU used in this research. This research has made use of NASA’s Astrophysics 7 https://github.com/cdiazbas/enhance C. J. Díaz Baso and A. Asensio Ramos: Enhancing HMI images Output Network 400 Data System Bibliographic Services. We acknowledge the community effort devoted to the development of the following open-source packages that were used in this work: numpy (numpy.org), matplotlib (matplotlib.org), Keras (keras.io), and Tensorflow tensorflow.org and SunPy sunpy.org. 350 300 References Y [pixel] 250 200 150 100 50 0 0 50 100 150 200 250 300 350 400 300 350 400 300 350 400 Richardson-Lucy 400 350 300 Y [pixel] 250 200 150 100 50 0 0 50 100 150 200 250 Difference: RL - NN 400 350 300 Y [pixel] 250 200 150 100 50 0 0 50 100 150 200 250 X [pixel] Fig. 10. Upper: the output of Enhance. Middle: output after applying a Richardson-Lucy method to deconvolve the image. Lower: the difference between the RL version and the Enhance output. The magnetic flux has been clipped to ±1.5kG and ±100G in the last image. Asensio Ramos, A. & de la Cruz Rodríguez, J. 2015, A&A, 577, A140 Asensio Ramos, A., Requerey, I. S., & Vitas, N. 2017, A&A, 604, A11 Asensio Ramos, A. & Socas-Navarro, H. 2005, A&A, 438, 1021 Bamba, Y., Kusano, K., Imada, S., & Iida, Y. 2014, PASJ, 66, S16 Bello González, N., Yelles Chaouche, L., Okunev, O., & Kneer, F. 2009, A&A, 494, 1091 Bishop, C. M. 1996, Neural networks for pattern recognition (Oxford University Press) Borman, S. & Stevenson, R. L. 1998, Midwest Symposium on Circuits and Systems, 374 Carroll, T. A. & Kopf, M. 2008, A&A, 481, L37 Cheung, M. C. M., Rempel, M., Title, A. M., & Schüssler, M. 2010, ApJ, 720, 233 Ciuca, R., Hernández, O. F., & Wolman, M. 2017, ArXiv e-prints [arXiv:1708.08878] Colak, T. & Qahwaji, R. 2008, Sol. Phys., 248, 277 Couvidat, S., Schou, J., Hoeksema, J. T., et al. 2016, Sol. Phys., 291, 1887 Danilovic, S., Gandorfer, A., Lagg, A., et al. 2008, A&A, 484, L17 Danilovic, S., Schüssler, M., & Solanki, S. K. 2010, A&A, 513, A1 DeRosa, M. L., Wheatland, M. S., Leka, K. D., et al. 2015, ApJ, 811, 107 Dong, C., Change Loy, C., He, K., & Tang, X. 2015, ArXiv e-prints [arXiv:1501.00092] Dong, C., Change Loy, C., & Tang, X. 2016, ArXiv e-prints [arXiv:1608.00367] Hayat, K. 2017, ArXiv e-prints [arXiv:1706.09077] He, K., Zhang, X., Ren, S., & Sun, J. 2015, ArXiv e-prints [arXiv:1512.03385] Ichimoto, K., Lites, B., Elmore, D., et al. 2008, Sol. Phys., 249, 233 Ioffe, S. & Szegedy, C. 2015, in Proceedings of the 32nd International Conference on Machine Learning (ICML-15), ed. D. Blei & F. Bach (JMLR Workshop and Conference Proceedings), 448–456 Kim, J., Lee, J. K., & Lee, K. M. 2015, ArXiv e-prints [arXiv:1511.04491] Kingma, D. P. & Ba, J. 2014, ArXiv e-prints [arXiv:1412.6980] Kosugi, T., Matsuzaki, K., Sakao, T., et al. 2007, Sol. Phys., 243, 3 Krivova, N. A. & Solanki, S. K. 2004, A&A, 417, 1125 LeCun, Y. & Bengio, Y. 1998, in The Handbook of Brain Theory and Neural Networks, ed. M. A. Arbib (Cambridge, MA, USA: MIT Press), 255–258 LeCun, Y., Bottou, L., Orr, G. B., & Müller, K.-R. 1998, in Neural Networks: Tricks of the Trade, This Book is an Outgrowth of a 1996 NIPS Workshop (London, UK, UK: Springer-Verlag), 9–50 Ledig, C., Theis, L., Huszar, F., et al. 2016, ArXiv e-prints [arXiv:1609.04802] Linker, J. A., Caplan, R. M., Downs, C., et al. 2017, ArXiv e-prints [arXiv:1708.02342] Lites, B. W., Akin, D. L., Card, G., et al. 2013, Sol. Phys., 283, 579 Nair, V. & Hinton, G. E. 2010, in Proceedings of the 27th International Conference on Machine Learning (ICML-10), June 21-24, 2010, Haifa, Israel, 807–814 Pesnell, W. D., Thompson, B. J., & Chamberlin, P. C. 2012, Sol. Phys., 275, 3 Peyrard, C., Mamalet, F., & Garcia, C. 2015, in VISAPP (1), ed. J. Braz, S. Battiato, & F. H. Imai (SciTePress), 84–91 Pietarila, A., Bertello, L., Harvey, J. W., & Pevtsov, A. A. 2013, Sol. Phys., 282, 91 Quintero Noda, C., Asensio Ramos, A., Orozco Suárez, D., & Ruiz Cobo, B. 2015, A&A, 579, A3 Richardson, W. H. 1972, Journal of the Optical Society of America (1917-1983), 62, 55 Ruiz Cobo, B. & Asensio Ramos, A. 2013, A&A, 549, L4 Rumelhart, D. E., Hinton, G. E., & Williams, R. J. 1988 (Cambridge, MA, USA: MIT Press), 696–699 Schawinski, K., Zhang, C., Zhang, H., Fowler, L., & Santhanam, G. K. 2017, MNRAS, 467, L110 Scherrer, P. H., Schou, J., Bush, R. I., et al. 2012, Solar Physics, 275, 207 Schmidhuber, J. 2014, ArXiv e-prints [arXiv:1404.7828] Shi, W., Caballero, J., Huszár, F., et al. 2016, ArXiv e-prints [arXiv:1609.05158] Simonyan, K. & Zisserman, A. 2014, ArXiv e-prints [arXiv:1409.1556] Socas-Navarro, H. 2005, ApJ, 621, 545 Stein, R. F. 2012, Living Reviews in Solar Physics, 9, 4 Stein, R. F. & Nordlund, Å. 2012, ApJ, 753, L13 Tadesse, T., Wiegelmann, T., Inhester, B., et al. 2013, A&A, 550, A14 Article number, page 13 of 14 A&A proofs: manuscript no. aanda Tai, Y., Yang, J., & Liu, X. 2017, in In Proceeding of IEEE Computer Vision and Pattern Recognition, Honolulu, HI Tipping, M. E. & Bishop, C. M. 2003, in Advances in Neural Information Processing Systems (MIT Press), 1303–1310 Tsuneta, S., Ichimoto, K., Katsukawa, Y., et al. 2008, Sol. Phys., 249, 167 van Noort, M. 2012, A&A, 548, A5 Vögler, A., Shelyag, S., Schüssler, M., et al. 2005, A&A, 429, 335 Wachter, R., Schou, J., Rabello-Soares, M. C., et al. 2012, Sol. Phys., 275, 261 Xu, L., Ren, J. S. J., Liu, C., & Jia, J. 2014, in Proceedings of the 27th International Conference on Neural Information Processing Systems, NIPS’14 (Cambridge, MA, USA: MIT Press), 1790–1798 Yeo, K. L., Feller, A., Solanki, S. K., et al. 2014, A&A, 561, A22 Zhao, Y., Wang, R., Dong, W., et al. 2017, ArXiv e-prints [arXiv:1703.04244] Article number, page 14 of 14
1cs.CV
Measurement uncertainty relations for position and momentum: Relative entropy formulation arXiv:1705.09949v1 [quant-ph] 28 May 2017 Alberto Barchielli1,2,3 , Matteo Gregoratti1,2, Alessandro Toigo1,3 1 Politecnico di Milano, Dipartimento di Matematica, Piazza Leonardo da Vinci 32, I-20133 Milano, Italy, 2 Istituto Nazionale di Alta Matematica (INDAM-GNAMPA), 3 Istituto Nazionale di Fisica Nucleare (INFN), Sezione di Milano 30th May 2017 Abstract Heisenberg’s uncertainty principle has recently led to general measurement uncertainty relations for quantum systems: incompatible observables can be measured jointly or in sequence only with some unavoidable approximation, which can be quantified in various ways. The relative entropy is the natural theoretical quantifier of the information loss when a ‘true’ probability distribution is replaced by an approximating one. In this paper, we provide a lower bound for the amount of information that is lost by replacing the distributions of the sharp position and momentum observables, as they could be obtained with two separate experiments, by the marginals of any smeared joint measurement. The bound is obtained by introducing an entropic error function, and optimizing it over a suitable class of covariant approximate joint measurements. We fully exploit two cases of target observables: (1) n-dimensional position and momentum vectors; (2) two components of position and momentum along different directions. In (1), we connect the quantum bound to the dimension n; in (2), going from parallel to orthogonal directions, we show the transition from highly incompatible observables to compatible ones. For simplicity, we develop the theory only for Gaussian states and measurements. 1 Introduction Uncertainty relations for position and momentum [40] have always been deeply related to the foundations of Quantum Mechanics. For several decades, their axiomatization has been of ‘preparation’ type: an inviolable lower bound for the widths of the position and momentum distributions, holding in any quantum state. Such kinds of uncertainty relations, which are now known as preparation uncertainty relations (PURs), have been later extended to arbitrary sets of n ≥ 2 observables [44–46,59]. All PURs trace back to the celebrated Robertson’s formulation [58] of Heisenberg’s uncertainty principle: for any two observables, represented by self-adjoint operators A and B, the product of the variances of A and B is bounded from below by the expectation value of their commutator; in formulae, Varρ (A) Varρ (B) ≥ 41 |Tr{ρ[A, B]}|2 , where Varρ is the variance of an observable measured in any system state ρ. In the case of position Q and 2 momentum P , this inequality gives Heisenberg’s relation Varρ (Q) Varρ (P ) ≥ ~4 . About 30 years after Heisenberg and Robertson’s formulation, Hirschman attempted a first statement of position and momentum uncertainties in terms of informational quantities. This led him to a formulation of PURs based on Shannon entropy [41]; his bound was later refined [12, 14], and extended to discrete observables [50]. Also other entropic quantities have been used [35]. We refer to [31, 63] for an extensive review on entropic PURs. However, Heisenberg’s original intent [40] was more focused on the unavoidable disturbance that a measurement of position produces on a subsequent measurement of momentum [21, 25, 26, 53–56, 65]. Trying to give a better understanding of his idea, more recently new formulations were introduced, based 1 PUR on a ‘measurement’ interpretation of uncertainty, rather than giving bounds on the probability distributions of the target observables. Indeed, with the modern development of the quantum theory of measurement and the introduction of positive operator valued measures and instruments [1, 20, 23, 34, 39, 44], it became possible to deal with approximate measurements of incompatible observables and to formulate measurement uncertainty relations (MURs) for position and momentum, as well as for more general observables. The MURs quantify the degree of approximation (or inaccuracy and disturbance) made by replacing the original incompatible observables with a joint approximate measurement of them. A very rich literature on this topic flourished in the last 20 years, and various kinds of MURs have been proposed, based on distances between probability distributions, noise quantifications, conditional entropy, etc. [19, 21, 22, 24–26, 31, 32, 38, 53–56, 65, 66]. In this paper, we develop a new information-theoretical formulation of MURs for position and momentum, using the notion of the relative entropy (or Kullback-Leibler divergence) of two probabilities. The relative entropy S(pkq) is an informational quantity which is precisely tailored to quantify the amount of information that is lost by using an approximating probability q in place of the target one p. Although classical and quantum relative entropies have already been used in the evaluation of the performances of quantum measurements [1, 6–11, 18, 19, 32, 51, 51], their first application to MURs is very recent [2]. In [2], only MURs for discrete observables were considered. The present work is a first attempt to extend that information-theoretical approach to the continuous setting. This extension is not trivial and reveals peculiar problems, that are not present in the discrete case. However, the nice properties of the relative entropy, such as its scale invariance, allow for a satisfactory formulation of the entropic MURs also for position and momentum. We deal with position and momentum in two possible scenarios. Firstly, we consider the case of ndimensional position and momentum, since it allows to treat either scalar particles, or vector ones, or even the case of multi-particle systems. This is the natural level of generality, and our treatment extends without difficulty to it. Then, we consider a couple made up of one position and one momentum component along two different directions of the n-space. In this case, we can see how our theory behaves when one moves with continuity from a highly incompatible case (parallel components) to a compatible case (orthogonal ones). The continuous case needs much care when dealing with arbitrary quantum states and approximating observables. Indeed, it is difficult to evaluate or even bound the relative entropy if some assumption is not made on probability distributions. In order to overcome these technicalities and focus on the quantum content of MURs, in this paper we consider only the case of Gaussian preparation states and Gaussian measurement apparatuses [16, 36, 45, 46, 49, 59, 62]. Moreover, we identify the class of the approximate joint measurements with the class of the joint POVMs satisfying the same symmetry properties of their target position and momentum observables [20, 44]. We are supported in this assumption by the fact that, in the discrete case [2], simmetry covariant measurements turn out to be the best approximations without any hypothesis (see also [24–26, 65, 66] for a similar appearance of covariance within MURs for different uncertainty measures). We now sketch the main results of the paper. In the vector case, we consider approximate joint measurements M of the position Q ≡ (Q1 , . . . , Qn ) and the momentum P ≡ (P1 , . . . , Pn ). We find the following entropic MUR (Theorem 21, Remark 14): for every choice of two positive thresholds ǫ1 , ǫ2 , with ǫ1 ǫ2 ≥ ~2 /4, there exists a Gaussian state ρ with position variance matrix Aρ ≥ ǫ1 1 and momentum variance matrix B ρ ≥ ǫ2 1 such that     ~ ~ S(Qρ kM1,ρ ) + S(Pρ kM2,ρ ) ≥ n (log e) ln 1 + √ − (1) √ 2 ǫ1 ǫ2 ~ + 2 ǫ1 ǫ2 for all Gaussian approximate joint measurements M of Q and P . Here Qρ and Pρ are the distributions of position and momentum in the state ρ, and Mρ is the distribution of M in the state ρ, with marginals M1,ρ and M2,ρ ; the two marginals turn out to be noisy versions of Qρ and Pρ . The lower bound is strictly positive and it grows linearly with the dimension n. The thresholds ǫ1 and ǫ2 are peculiar of the continuous case and they have a classical explanation: the relative entropy S(pkq) → +∞ if the variance of p vanishes faster than the variance of q, so that, given M, it is trivial to find a state ρ enjoying (1) if arbtrarily small variances are allowed. What is relevant in our result is that the total loss of information S(Qρ kM1,ρ ) + S(Pρ kM2,ρ ) exceeds the lower bound even if we forbid target distributions with small variances. 2 MUR The MUR (1) shows that there is no Gaussian joint measurement which can approximate arbitrarily well both Q and P . The lower bound (1) is a consequence of the incompatibility between Q and P and, indeed, it vanishes in the classical limit ~ → 0. Both the relative entropies and the lower bound in (1) are scale invariant. Moreover, for fixed ǫ1 and ǫ2 , we prove the existence and uniqueness of an optimal approximate joint measurement, and we fully characterize it. In the scalar case, we consider approximate joint measurements M of the position Qu = u · Q along the direction u and the momentum Pv = v · P along the direction v, where u · v = cos α. We find two different entropic MURs. The first entropic MUR in the scalar case is similar to the vector case (Theorem 17, Remark 11). The second one is (Theorem 15): S(Qu,ρ kM1,ρ ) + S(Pv,ρ kM2,ρ ) ≥ cρ (α), (2) ! ) ~| cos α| ~| cos α| p − , cρ (α) = (log e) ln 1 + p 2 Var (Qu,ρ ) Var (Pv,ρ ) ~| cos α| + 2 Var (Qu,ρ ) Var (Pv,ρ ) ( for all Gaussian states ρ and all Gaussian joint approximate measurements M of Qu and Pv . This lower bound holds for every Gaussian state ρ without constraints on the position and momentum variances Var (Qu,ρ ) and Var (Pv,ρ ), it is strictly positive unless u and v are orthogonal, but it is state dependent. Again, the relative entropies and the lower bound are scale invariant. The paper is organized as follows. In Section 2, we introduce our target position and momentum observables, we discuss their general properties and define some related quantities (spectral measures, mean vectors and variance matrices, PURs for second order quantum moments, Weyl operators, Gaussian states). Section 3 is devoted to the definitions and main properties of the relative and differential (Shannon) entropies. Section 4 is a review on the entropic PURs in the continuous case [12, 14, 41], with a particular focus on their lack of scale invariance. This is a flaw due to the very definition of differential entropy, and one of the reasons that lead us to introduce relative entropy based MURs. In Section 5 we construct the covariant observables which will be used as approximate joint measurements of the position and momentum target observables. Finally, in Section 6 the main results on MURs that we sketched above are presented in detail. Some conclusions are discussed in Section 7. 2 Target observables and states Let us start with the usual position and momentum operators, which satisfy the canonical commutation rules:   (3) Q ≡ (Q1 , . . . , Qn ), P ≡ (P1 , . . . , Pn ), Qi , Pj = i~δij . Each of the vector operators has n components; it could be the case of a single particle in one or more dimensions (n = 1, 2, 3), or several scalar or vector particles, or the quadratures of n modes of the electromagnetic field. We assume the Hilbert space H to be irreducible for the algebra generated by the canonical operators Q and P . An observable of the quantum system H is identified with a positive operator valued measure (POVM); in the paper, we shall consider observables with outcomes in Rk endowed with its Borel σ-algebra B(Rk ). The use of POVMs to represent observables in quantum theory is standard and the definition can be found in many textbooks [20, 23, 34, 37]; the alternative name “non-orthogonal resolutions of the identity” is also used [44–46]. Following [20, 23, 38, 46], a sharp observable is an observable represented by a projection valued measure (pvm); it is standard to identify a sharp observable on the outcome space Rk with the k self-adjoint operators corresponding to it by spectral theorem. Two observables are jointly measurable or compatible if there exists a POVM having them as marginals. Because of the non-vanishing commutators, each couple Qi , Pi , as well as the vectors Q, P , are not jointly measurable. We denote by T(H) the trace class operators on H, by S ⊂ T(H) the subset of the statistical operators (or states, preparations), and by L(H) the space of the linear bounded operators. 2.1 Position and momentum Our target observables will be either n-dimensional position and momentum (vector case) or position and momentum along two different directions of Rn (scalar case). The second case allows to give an example 3 H POVM B(Rk ) pvm S, T(H) L(H) ranging with continuity from maximally incompatible observables to compatible ones. 2.1.1 Vector observables As target observables we take Q and P as in (3) and we denote by Q(A), P(B), A, B ∈ B(Rn ), their pvm’s, that is Z Z pi P(dp). (4) xi Q(dx), Pi = Qi = Rn Rn Then, the distributions in the state ρ ∈ S of a sharp position and a sharp momentum measurements (denoted by Qρ and Pρ ) are absolutely continuous with respect to the Lebesgue measure; we denote by f (•|ρ) and g(•|ρ) their probability densities: ∀A, B ∈ B(Rn ), Z Z g(p|ρ)dp. (5) f (x|ρ)dx, Pρ (B) = Tr {ρP(B)} = Qρ (A) = Tr {ρQ(A)} = B A In the Dirac notation, if |xi and |pi are the improper position and momentum eigenvectors, these densities take the expressions f (x|ρ) = hx|ρ|xi and g(p|ρ) = hp|ρ|pi, respectively. The mean vectors and the variance matrices of these distributions will be given in (7) and (8). 2.1.2 Scalar observables As target observables we take the position along a given direction u and the momentum along another given direction v: Qu = u · Q, Pv = v · P , with u, v ∈ Rn , |u| = |v| = 1, u · v = cos α. (6) In this case we have [Qu , Pv ] = i~ cos α, so that Qu and Pv are not jointly measurable, unless the directions u and v are orthogonal. Their pvm’s are denoted by Qu and Pv , their distributions in a state ρ by Qu,ρ and Pv,ρ , and their corresponding probability densities by fu (•|ρ) and gv (•|ρ): ∀A, B ∈ B(R), Z Z Qu,ρ (A) = Tr{Qu (A)ρ} = fu (x|ρ) dx, Pv,ρ (B) = Tr{Pv (A)ρ} = gv (p|ρ) dp. A B Of course, the densities in the scalar case are marginals of the densities in the vector case. Means and variances will be given in (11). 2.2 Quantum moments. Let S2 be the set of states for which the second moments of position and momentum are finite:   Z Z 2 2 |p| g(p|ρ)dp < +∞ . |x| f (x|ρ)dx < +∞, S2 := ρ ∈ S : S2 Rn Rn Then, the mean vector and the variance matrix of the position Q in the state ρ ∈ S2 are Z ρ xi f (x|ρ)dx ≡ Tr {ρQi } , ai := Rn Z    (xi − aρi ) xj − aρj f (x|ρ)dx ≡ Tr ρ (Qi − aρi ) Qj − aρj , Aρij := (7) Rn while for the momentum P we have bρi := ρ Bij := Z Rn (pi − bρi ) Z Rn pj − pi g(p|ρ)dp ≡ Tr {ρPi } ,  bρj g(p|ρ)dp 4  ≡ Tr ρ (Pi − bρi ) Pj −  bρj (8) . For ρ ∈ S2 it is possible to introduce also the mixed ‘quantum covariances’ ) ( (Qi − aρi )(Pj − bρj ) + (Pj − bρj )(Qi − aρi ) ρ . Cij := Tr ρ 2 (9) ρ Since there is no joint measurement for the position Q and momentum P , the quantum covariances Cij are not covariances of a joint distribution, and thus they do not have a classical probabilistic interpretation. By means of the moments above, we construct the three real n × n matrices Aρ , B ρ , C ρ , the 2ndimensional vector µρ and the symmetric 2n × 2n matrix V ρ , with  ρ  ρ  a A Cρ ρ µρ := , V := . (10) bρ (C ρ )T B ρ We say V ρ is the quantum variance matrix of position and momentum in the state ρ. In [59] dimensionless canonical operators are considered, but apart from this, our matrix V ρ corresponds to their “noise matrix in real form”; the name “variance matrix” is also used [49, 60]. In a similar way, we can introduce all the moments related to the position Qu and momentum Pv introduced in (6). For ρ ∈ S2 , the means and variances are respectively u · aρ , Var(Qu,ρ ) = u · Aρ u, v · bρ , Var(Pv,ρ ) = v · B ρ v. (11) Similarly to (9), we have also the ‘quantum covariance’ u · C ρ v ≡ v · (C ρ )T u. Then, we collect the two means in a single vector and we introduce the variance matrix:     u · aρ u · Aρ u u · C ρ v ρ ρ µu,v := , Vu,v := . (12) v · bρ u · C ρv v · Bρv   A C Proposition 1. Let V = be a real symmetric 2n × 2n block matrix with the same dimensions CT B of a quantum variance matrix. Define     i 0 ~1 A C ± i ~2 1 ≡ V ± Ω, with Ω := . (13) V± := −~1 0 C T ∓ i ~2 1 B 2 Then V = V ρ for some state ρ ∈ S2 ⇐⇒ V+ ≥ 0 ⇐⇒ V− ≥ 0. (14) In this case we have: V ≥ 0, A > 0, B > 0, and ~2 ′ ′ 2 (v · u ) , ∀u′ ∈ Rn , ∀v ′ ∈ Rn . (15) 4 The inequalities (14) for V± tell us exactly when a (positive semi-definite) real matrix V is the quantum variance matrix of position and momentum in a state ρ. Moreover, they are the multidimensional version of the usual uncertainty principle expressed through the variances [44, 46, 59], hence they represent a form of PURs. The block matrix Ω in the definition of V± is useful to compress formulae involving position and momentum; moreover, it makes simpler to compare our equations with their frequent dimensionless versions (with ~ = 1) in the literature [36, 49]. 2 (u′ · Au′ )(v ′ · Bv ′ ) ≥ (v ′ · Cu′ ) + Proof. Equivalences (14) are well known, see e.g. [44, Sect. 1.1.5], [46, Eq. (2.20)], [59, Theor. 2]. Then V = 21 V+ + 12 V− ≥ 0.  ′ αu By using the real block vector , with arbitrary α, β ∈ R and given u′ , v ′ ∈ Rn , the semiβv ′ positivity (14) implies   u′ · Au′ u′ · Cv ′ ± i ~2 u′ · v ′ ≥ 0, ∀u′ ∈ Rn , ∀v ′ ∈ Rn , v ′ · C T u′ ∓ i ~2 v ′ · u′ v ′ · Bv ′ which in turn implies A ≥ 0, B ≥ 0 and (15). Then, by choosing u′ = v ′ = ui , where u1 , . . . , un are the eigenvectors of A (since A is a real symmetric matrix, ui ∈ Rn for all i), one gets the strict positivity of all the eigenvalues of A; analogously, one gets B > 0. 5 Inequality (15) for u′ = u and v ′ = v becomes the uncertainty rule à la Robertson [58] for the observables in (6) (a position component and a momentum component spanning an arbitrary angle α): 2 Var(Qu,ρ ) Var(Pv,ρ ) ≥ (v · C ρ u) + Inequality (16) is equivalent to ρ Vu,v ~2 2 (cos α) . 4   i~ 0 1 ± cos α ≥ 0. −1 0 2 (16) (17) Since V± are block matrices, their positive semi-definiteness can be studied by means of the Schur complements [27, 47, 57]. However, as V± are complex block matrices with a very peculiar structure, special results hold for them. Before summarizing the properties of V± in the next proposition, we need a simple auxiliary algebraic lemma. Lemma 2. Let A and B be complex self-adjoint matrices such that A ≥ B ≥ 0. Then det A ≥ det B ≥ 0, and the equality det A = det B holds iff A = B. Proof. Let λ↓i (A) and λ↓i (B) be the ordered decreasing sequences of the eigenvalues of A and B, respectively. Then, by Weyl’s inequality, A ≥ B ≥ 0 implies λ↓i (A) ≥ λ↓i (B) ≥ 0 for every i [13, Sect. III.2]. This gives the first statement. Moreover, if A ≥ B ≥ 0 and det A = det B, we get λ↓i (A) = λ↓i (B) for every i. Then A = B because A − B ≥ 0 and Tr{A − B} = 0.   A C Proposition 3. Let V = be a real symmetric 2n × 2n matrix with the same dimensions of a CT B quantum variance matrix. Then V+ ≥ 0 (or, equivalently, V− ≥ 0) if and only if A > 0 and      i~ ~2 −1 i~ −1 i~ −1 T C ± 1 ≡ C T A−1 C + (18) A C − C T A−1 . A ∓ B≥ C ∓ 1 A 2 2 4 2 In this case we have ~2 −1 ~2 −1 A ≥ A > 0. 4 4 Moreover, we have also the following properties for the various determinants: B ≥ C T A−1 C +  (det A)(det B) ≥ det V = (det A) det B − C T A−1 C ≥  2n ~ det V = 2 ⇔ B = C T A−1 C +  2n ~ (det A)(det B) = 2 ⇔ ~2 −1 A 4 B= ⇒ ~2 −1 A , 4 (19)  2n ~ , 2 (20) CA = AC T , (21) C = 0. (22) By interchanging A with B and C with C T in (18)-(22) equivalent results are obtained. Proof. Since we already know that V+ ≥ 0 implies the invertibility of A, the equivalence between (14) and (18) with A > 0 follows from [47, Theor. 1.12 p. 34] (see also [57, Theor. 11.6] or [27, Lemma 3.2]). In (19), the first inequality follows by summing up the two inequalities in (18). The last two ones are immediate by the positivity of A−1 . The equality in (20) is Schur’s formula for the determinant of block matrices [47, Theor. 1.1 p. 19]. Then, the first inequality is immediate by the lemma above and the trivial relation B ≥ B − C T A−1 C; the second one follows from (19):   2  (~/2)2n ~ −1 ~2 −1 = A ⇒ det B − C T A−1 C ≥ det A . B − C T A−1 C ≥ 4 4 det A 6   2 2n  The equality det V = ~2 is equivalent to det B − C T A−1 C = det ~4 A−1 ; since the latter two determinants are evaluated on ordered positive matrices by (19), they coincide if and only if the respective arguments are equal(Lemma 2); this shows the equivalence in (21). Then, by (18), the self-adjoint −1 C − C T A−1 is both positive semi-definite and negative semi-definite; hence it is null, that matrix i~ 2 A T is, CA = AC .   2 ~ 2n ~ 2n B) = Finally, B = ~4 A−1 gives (det A)(det trivially. Conversely, (det A)(det B) = 2 2  implies det B = det B − C T A−1 C by (20); since B ≥ B − C T A−1 C ≥ 0 by (19), Lemma 2 then implies C T A−1 C = 0 and so C = 0. By (18) and (19), every time three matrices A, B, C define the quantum variance matrix of a state ρ, e = 0. This fact can be used to characterize when two positive matrices A and the same holds for A, B, C B are the diagonal blocks of some quantum variance matrix, or two positive numbers cQ and cP are the position and momentum variances of a quantum state along the two directions u and v. Proposition 4. Two real matrices A > 0 and B > 0, having the dimension of the square of a length and momentum, respectively, are the diagonal blocks of a quantum variance matrix V ρ if and only if B≥ ~2 −1 A . 4 Two real numbers cQ > 0 and cP > 0, having the dimension of the square of a length and momentum, respectively, are such that cQ = Var(Qu,ρ ) and cP = Var(Pv,ρ ) for some state ρ if and only if cQ cP ≥  2 ~ cos α . 2 Proof. For A and  B, the necessity follows from (19). A 0 ρ V = . 0 B The sufficiency comes from (18) by choosing For cQ and cP , the necessity follows from (15). The sufficiency comes from (18) with V ρ = and for example the following choices of A and B:  A 0 0 B  - if cos α = ±1, we take A = cQ 1 and B = cP 1; - if cos α = 0, we let A = cQ uuT + ~2 vv T + A′ 4cP B= ~2 uuT + cP vv T + B ′ , 4cQ where A′ and B ′ are any two scalar multiples of the orthogonal projection onto {u, v}⊥ satisfying 2 B ′ ≥ ~4 A′ −1 when restricted to {u, v}⊥ ; - if cos α ∈ / {0, ±1}, we choose   1 2 T A = cQ uuT − (uv T + vuT ) + vv + A′ cos α (cos α)2   cP (sin α)2 + (cos α)4 1 T T T T B= + B′, uu − (uv + vu ) + vv (sin α)4 (cos α)2 cos α where A′ and B ′ are as in the previous item. In the last two cases, we chose A and B in such a way that B = span of {u, v}. 7 cQ cP −1 (cos α)2 A when restricted to the linear 2.3 Weyl operators and Gaussian states In the following, we shall introduce Gaussian states, Gaussian observables and covariant observables on the phase-space. In all these instances, the Weyl operators are involved; here we recall their definition and some properties (see e.g. [45, Sect. 5.2] or [46, Sect. 12.2], where, however, the definition differs from ours in that the Weyl operators are composed with the map Ω−1 of (13)). Definition 1. The Weyl operators are the unitary operators defined by W (x, p) := exp   Y n n  Y ixj pj  i i i i e ~ (pj Qj −xj Pj ) = (p · Q − x · P ) = e ~ pj Qj e− ~ xj Pj e− 2~ . (23) ~ j=1 j=1 The Weyl operators (23) satisfy the composition rule   i W (x1 , p1 )W (x2 , p2 ) = exp − (x1 · p2 − x2 · p1 ) W (x1 + x2 , p1 + p2 ); 2~ in particular, this implies the commutation relation  W (x1 , p1 )W (x2 , p2 ) = exp −i xT1 pT1  Ω −1   x2 W (x2 , p2 )W (x1 , p1 ). p2 (24) These commutation relations imply the translation property W (x, p)∗ Qi W (x, p) = Qi + xi , W (x, p)∗ Pi W (x, p) = Pi + pi , due to this property, the Weyl operators are also known as displacement operators. With a slight abuse of notation, we shall sometimes use the identification   x W (x, p) ≡ W , p i = 1, . . . , n; (25) (26)   x is a block column vector belonging to the phase-space Rn × Rn ≡ R2n ; here, the first block p x is a position and the second block p is a momentum. By means of the Weyl operators, it is possible to define the characteristic function of any trace-class operator. where Definition 2. For any operator ρ ∈ T(H), its characteristic function is the complex valued function ρb : R2n → C defined by   k ρb(w) := Tr {ρW (−Ωw)} , w≡ . (27) l Note that k is the inverse of a length and l is the inverse of a momentum, so that w is a block vector living in the space R2n ≡ Rn × Rn regarded as the dual of the phase-space. Instead of the characteristic function, sometimes the so called Weyl transform Tr {W (x, p)ρ} is introduced [45, 49]. By [45, Prop. 5.3.2, Theor. 5.3.3], we have ρb(w) ∈ L2 (R2n ) and the following trace formula holds: ∀ρ, σ ∈ T(H),  n Z ~ ∗ Tr{σ ρ} = σ b(w) ρb(w) dw. (28) 2π R2n As a corollary [45, Coroll. 5.3.4], we have that a state ρ ∈ S is pure if and only if  n Z ~ 2 |b ρ(w)| dw = 1. 2π 2n R 8 By [64, Lemma 3.1], [23, Prop. 8.5.(e)], the trace formula also implies Z 1 ∗ W (x, p)ρW (x, p) dxdp = Tr{ρ}1, (2π~)n R2n ∀ρ ∈ T(H) . (29) Moreover, the following inversion formula ensures that the characteristic function ρb completely characterizes the state ρ [45, Coroll. 5.3.5]:  n Z ~ ρ= W (Ωw) ρb(w)dw, ∀ρ ∈ T(H) . 2π R2n The last two integrals are defined in the weak operator topology. Finally, for ρ ∈ S2 , the moments (7)–(10) can be expressed as in [45, Sect. 5.4]: −i ∂ ρb(w) ∂wi 0 = µρi , − ∂ 2 ρb(w) ∂wi ∂wj 0 = Vijρ + µρi µρj . Definition 3 ( [44–46, 49, 59, 60]). A state ρ is Gaussian if   1 ρb(w) = exp iwT µρ − wT V ρ w 2   1 = exp i (k · aρ + l · bρ ) − (k · Aρ k + l · B ρ l) − k · C ρ l , 2 (30) (31) for a vector µρ ∈ R2n and a real 2n × 2n matrix V ρ such that V+ρ ≥ 0. The condition V+ρ ≥ 0 is necessary and sufficient in order that the function (31) defines the characteristic function of a quantum state [45, Theor. 5.5.1], [46, Theor. 12.17]. Therefore, Gaussian states are exactly the states whose characteristic function is the exponential of a second order polynomial [45, Eq. (5.5.49)], [46, Eq. (12.80)]. We shall denote by G the set of the Gaussian states; we have G ⊂ S2 ⊂ S. By (30), the vectors aρ , bρ and the matrices Aρ , B ρ , C ρ characterizing a Gaussian state ρ are just its first and second order quantum moments introduced in (7)–(9). By (31), the corresponding distributions of position and momentum are Gaussian, namely Qρ = N (aρ ; Aρ ), Qu,ρ = N (u · aρ ; u · Aρ u), Pρ = N (bρ ; B ρ ), Proposition 5 (Pure Gaussian states). For ρ ∈ G, we have det V ρ = Proof. The trace formula (28) and (31) give Tr{ρ2 } = n (~/2) √ , det V ρ Pv,ρ = N (v · bρ ; v · B ρ v). (32)  ~ 2n 2 if and only if ρ is pure. and this implies the statement. 2n Proposition 6 (Minimum uncertainty states). For ρ ∈ S2 , we have (det Aρ )(det B ρ ) = ~2 if and only if ρ is a pure Gaussian state and it factorizes into the product of minimum uncertainty states up to a rotation of Rn . 2n 2 Proof. If (det Aρ )(det B ρ ) = ~2 , then the equivalence (22) gives B ρ = ~4 (Aρ )−1 , so that the variance matrices Aρ and B ρ have a common eigenbasis u1 , . . . , un . Thus, all the corresponding couples of 2 position Qui and momentum Pui have minimum uncertainties: Var(Qui ) Var(Pui ) = ~4 . Therefore, if we consider the factorization of the Hilbert space H = H1 ⊗ · · · ⊗ Hn corresponding to the basis u1 , . . . , un , all the partial traces of the state ρ on each factor Hi are minimum uncertainty states. Since for n = 1 the minimum uncertainty states are pure and Gaussian, the state ρ is a pure product Gaussian state. The converse is immediate. 3 Relative and differential entropies In this paper, we will be concerned with entropic quantities of classical type [17, 33, 61]. We express them in ‘bits’, that is we use the base-2 logarithms: log a ≡ log2 a.  We deal only with probabilities on the measurable space Rn , B(Rn ) which admit densities with respect to the Lebesgue measure. So, we define the relative entropy and differential entropy only for such probabilities; moreover, we list only the general properties used in the following. 9 G 3.1 Relative entropy or Kullback-Leibler divergence The fundamental quantity is the relative entropy, also called information divergence, discrimination information, Kullback-Leibler divergence or information or distance or discrepancy. The relative entropy of a probability p with respect to a probability q is defined for any couple of probabilities p, q on the same probability space. Given two probabilities p and q on (Rn , B(Rn )) with densities f and g, respectively, the relative entropy of p with respect to q is Z f (x) dx. (33) S(pkq) = f (x) log g(x) n R The value +∞ is allowed for S(pkq); the usual convention 0 log(0/0) = 0 is understood. The relative entropy (33) is the amount of information that is lost when q is used to approximate p [17, p. 51]. Of course, if x is dimensioned, then the densities f and g have the same dimension (that is, the inverse of x), and the argument of the logarithm is dimensionless, as it must be. Proposition 7 ( [33], Theorem 8.6.1). The following properties hold. (i) S(pkq) ≥ 0. (ii) S(pkq) = 0 ⇐⇒ p=q ⇐⇒ f =g a.e.. (iii) S(pkq) is invariant under a change of the unit of measurement. (iv) If p = N (a; A) and q = N (b; B) with invertible variance matrices A and B, then ( )  −1 det B −1 2 S(pkq) = (log e) (a − b) · B (a − b) + Tr B A − 1 . + log det A (34) As S(pkq) is scale invariant, it quantifies a relative error for the use of q as an approximation of p, not an absolute one. Let us employ the relative entropy to evaluate the effect of an additive Gaussian noise ν ∼ N (b; β 2 ) on an independent Gaussian random variable X. If X ∼ N (a; α2 ), then X + ν ∼ N (a + b; α2 + β 2 ), and the relative entropy of the true distribution of X with respect to its disturbed version X + ν is S(XkX + ν) = 1 α2 + β 2 log e b2 − β 2 + log . 2 2 2 α +β 2 α2 This expression vanishes if the noise becomes negligible with respect to the true distribution, that is if β 2 /α2 → 0 and b2 /α2 → 0. On the other hand, S(XkX + ν) diverges if the noise becomes too strong with respect to the true distribution, or, in other words, if the true distribution becomes too peaked with respect to the noise, that is, β 2 /α2 → +∞ or b2 /α2 → +∞. 3.2 Differential entropy The differential entropy of an absolutely continuous random vector X with a probability density f is Z H(X) := − f (x) log f (x)dx. Rn This quantity is commonly used in the literature, even if it lacks many of the nice properties of the Shannon entropy for discrete random variables. For example, H(X) is not scale invariant, and it can be negative [33, p. 244]. Since the density f enters in the logarithm argument, the definition of H(X) is meaningful only when f is dimensionless, which is the same as X being dimensionless. Note that, if X is dimensioned and c > 0 f = cX a dimensionless random variable, then is a real parameter making X Z Z f (u/c) f (x) f (u/c) f =− H(X) f (x) log n dx . log du = − n n c c c Rn Rn In the following, we shall consider the differential entropy only for dimensionless random vectors X. 10 Proposition 8 ( [33], Section 8.6). The following properties hold. (i) If X is an absolutely continuous random vector with variance matrix A, then   n 1 1 H(X) ≤ log (2πe)n det A = log (2πe) + Tr log A. 2 2 2 The equality holds iff X is Gaussian with variance matrix A and arbitrary mean vector a. (ii) If X = (X1 , . . . , Xn ) is an absolutely continuous random vector, then H(X) ≤ n X H(Xi ). i=1 The equality holds iff the components X1 , . . . , Xn are independent. Remark 1. In property (i) we have used the following well-known matrix identity, which follows by diagonalization: log det A = Tr log A, ∀A > 0. Remark 2. Property (i) yields that the differential entropy of a Gaussian random variable X ∼ N (a; α2 ) is H(X) =  1 log 2πeα2 , 2 which is an increasing function of the variance α2 , and thus it is a measure of the uncertainty of X. Note that H(X) ≥ 0 iff α2 ≥ 1/(2πe). 4 Entropic PURs for position and momentum The idea of having an entropic formulation of the PURs for position and momentum goes back to [12, 14, 41]. However, we have just seen that, due to the presence of the logarithm, the Shannon differential entropy needs dimensionless probability densities. So, this leads us to introduce dimensionless versions of position and momentum. Let λ > 0 be a dimensionless parameter and κ a second parameter with the dimension of a mass times a frequency. Then, we introduce the dimensionless versions of position and momentum: r i h λ κ e e i , Pej = iλδij . Q, Pe = √ (35) P ⇒ Q Q := ~ ~κ We use a unique dimensional constant κ, in order to respect rotation symmetry and do not distinguish different particles. Anyway, there is no natural link between the parameter multiplying Q and the parameter multiplying P ; this is the reason for introducing λ. As we see from the commutation rules, the constant λ plays the role of a dimensionless version of ~; in the literature on PURs, often λ = 1 is used [12, 14, 31]. 4.1 Vector observables e and P e be the pvm’s of Q e ρ and P e ρ are their probability distributions in the state ρ. e and Pe ; then, Q Let Q e ρ )+H(P e ρ ). The total preparation uncertainty is quantified by the sum of the two differential entropies H(Q For ρ ∈ G, by Proposition 8 we get   n 1 4 ρ ρ e e H(Qρ ) + H(Pρ ) = n log (πeλ) + log (det A ) (det B ) . (36) 2 ~2 n In the case of product states of minimum uncertainty, we have (det Aρ ) (det B ρ ) = ~2 /4 ; then, by taking (20) into account, we get n o e ρ ) + H(P e ρ ) = n log (πeλ) . inf H(Q (37) ρ∈G 11 Thus, the bound (37) arises from quantum relations between Q and P ; indeed, there would be no lower bound for (36) if we could take both det Aρ and det B ρ arbitrarily small. By item (ii) of Proposition 8, the differential entropy for the distribution of a random vector is smaller than the sum of the entropies of its marginals; however, the final bound (37) is a tight bound for both e ρ ) + H(P e ρ ) and Pn H(Q e i,ρ ) + Pn H(P e i,ρ ). H(Q i=1 i=1 By the results of [12, 14], the same bound (37) is obtained even if the minimization is done over all the states, not only the Gaussian ones. The uncertainty result (37) depends on λ, this being a consequence of the lack of scale invariance of the differential entropy; note that the bound is positive if and only if λ > 1/(πe). Sometimes in the literature the parameter ~ appears in the argument of the logarithm [19, 32]; this fact has to be interpreted as the appearance of a parameter with the numerical value of ~, but without dimensions. In this sense the formulation (37) is consistent with both the cases with λ = 1 or λ = ~. Sometimes the smaller bound ln 2π appears in place of log πe [50]; this is connected to a state dependent formulation of the entropic PUR [31, Sect. V.B]. 4.2 Scalar observables The dimensionless versions of the scalar observables introduced in (6) are r i h λ e u , Pev = iλ cos α. e u = κ Qu , Pv ⇒ Q Q Pev = √ ~ ~κ (38) e u,ρ and P e v,ρ the associated distributions in the state ρ. For ρ ∈ S2 , the respective means We denote by Q and variances are r 2 λ κ e v,ρ ) = λ v · B ρ v, e u,ρ ) = κ u · Aρ u, √ u · aρ , Var(P v · bρ , Var(Q ~ ~ ~κ ~κ q e u,ρ ) Var(P e v,ρ ) ≥ λ |cos α| /2. with Var(Q As in the vector case, the total preparation uncertainty is quantified by the sum of the two differential e u,ρ ) + H(P e v,ρ ). For ρ ∈ G, Proposition 8 gives entropies H(Q   q e e e e (39) H(Qu,ρ ) + H(Pv,ρ ) = log 2πe Var(Qu,ρ ) Var(Pv,ρ ) . Then, we have the lower bound inf ρ∈G n o e u,ρ ) + H(P e v,ρ ) = log (πeλ |cos α|) = 1 + ln (π |λ cos α|) , H(Q ln 2 (40) which depends on λ, but not on κ. Of course, because of (39), for Gaussian states a lower bound for the e u,ρ ) + H(P e v,ρ ) is equivalent to a lower bound for the product Var(Q e u,ρ ) Var(P e v,ρ ). By a slight sum H(Q generalization of the results of [12,14], the bound (40) is obtained also when the minimization is done over all the states. Let us note that the bound in (40) is positive for |λ cos α| > 1/(πe), and it goes to −∞ for α → π/2, which is the case of compatible Qu,ρ and Pv,ρ . In the case α = 0, the bound (40) is the same as (37) for n = 1. 5 Approximate joint measurements of position and momentum In order to deal with MURs for position and momentum observables, we have to introduce the class of approximate joint measurements of position and momentum, whose marginals we will compare with the respective sharp observables. As done in [21,28,44,45], it is natural to characterize such a class by requiring suitable properties of covariance under the group of space translations and velocity boosts: namely, by 12 approximate joint measurement of position and momentum we will mean any POVM on the product space of the position and momentum outcomes sharing the same covariance properties of the two target sharp observables. As we have already discussed, two approximation problems will be of our concern: the approximation of the position and momentum vectors (vector case, with outcomes in the phase-space Rn × Rn ), and the approximation of one position and one momentum component along two arbitrary directions (scalar case, with oucomes in R × R). In order to treat the two cases altogether, we consider POVMs with outcomes in Rm × Rm ≡ R2m , which we call bi-observables; they correspond to a measurement of m position components and m momentum components. The specific covariance requirements will be given in the Definitions 5, 6, 7. In studying the properties of probability measures on Rk , a very useful notion is that of the characteristic function, that is, the Fourier cotransform of the measure at hand; the analogous quantity for POVMs turns out to have the same relevance. Different names have been used in the literature to refer to the characteristic function of POVMs, or, more generally, quantum instruments, such as characteristic operator or operator characteristic function [1, 3–6, 42–44, 49]. As a variant, also the symplectic Fourier transform quite often appears [46, Sect. 12.4.3]. The characteristic function has been used, for instance, to study the quantum analogues of the infinite-divisible distributions [3–6,43,44] and measurements of Gaussian type [42,46,49]. Here, we are interested only in the latter application, as our approximating bi-observables will typically be Gaussian. Since we deal with bi-observables, we limit our definition of the characteristic function only to POVMs on Rm × Rm , which have the same number of variables of position and momentum type. Being measures, POVMs can be used to construct integrals, whose theory is presented e.g. in [23, Sect. 4.8], [45, Sect. 2.9, Prop. 2.9.1]. Definition 4. Given a bi-observable M : B(R2m ) → L(H), the characteristic function of M is the operator b : R2m → L(H), with valued function M Z b ei(k·x+l·p) M(dxdp). (41) M(k, l) = R2m Here, the dimensions of the vector variables k and l are the inverses of a length and momentum, respectively, as o in the definition of the characteristic function of a state (27). This definition is given so that n b Tr M(k, l)ρ is the usual characteristic function of the probability distribution Mρ on R2m . 5.1 Covariant vector observables In terms of the pvm’s (4), the translation property (25) is equivalent to the symmetry properties W (x, p)Q(A)W (x, p)∗ = Q(A + x), W (x, p)P(B)W (x, p)∗ = P(B + p), ∀A, B ∈ B(Rn ), and they are taken as the transformation property defining the following class of POVMs on R2n [20, 23, 28, 49, 64]. Definition 5. A covariant phase-space observable is a bi-observable M : B(R2n ) → L(H) satisfying the covariance relation    x ∗ W (x, p)M(Z)W (x, p) = M Z + , ∀Z ∈ B(R2n ), ∀x, p ∈ Rn . p We denote by C the set of all the covariant phase-space observables. C The interpretation of covariant phase-space observables as approximate joint measurements of position and momentum is based on the fact that their marginal POVMs M1 (A) = M(A × Rn ), M2 (B) = M(Rn × B), A, B ∈ B(Rn ), have the same symmetry properties of Q and P, respectively. Although Q and P are not jointly measurable, the following well-known result says that there are plenty of covariant phase-space observables [30, 48], [45, Theor. 4.8.3]. In (43) below, we use the parity operator Π on H, which is such that Π W (x, p) Π = W (−x, −p) = W (x, p)∗ . 13 (42) Proposition 9. The covariant phase-space observables are in one-to-one correspondence with the states on H, so that we have the identification S ∼ C; such a correspondence σ ↔ Mσ is given by Z σ M σ (x, p) dxdp, ∀B ∈ B(R2n ), M (B) = B (43) 1 ∗ M σ (x, p) = W (x, p)ΠσΠW (x, p) . (2π~)n The characteristic function (41) of a measurement Mσ ∈ C has a very simple structure in terms of the characteristic function (27) of the corresponding state σ ∈ S. Proposition 10. The characteristic function of Mσ ∈ C is given by   k b σ (k, l) = W (−Ωw) σ M b(w), w≡ ∈ R2n , l (44) and the characteristic function of the probability Mσρ is n o b σ (k, l)ρ = ρb(w)b Tr M σ (w). (45) In (44) we have used the identification (26). The characteristic function of a state is introduced in (27). Proof. By the commutation relations (24), we have W (−~l, ~k)W (x, p)W (−~l, ~k)∗ = ei(k·x+l·p) W (x, p). Then, we get Z 1 ei(k·x+l·p) W (x, p)ΠσΠW (x, p)∗ dxdp (2π~)n R2n Z 1 W (−~l, ~k)W (x, p)W (−~l, ~k)∗ ΠσΠW (x, p)∗ dxdp = (2π~)n R2n ∗ = W (−~l, ~k) Tr{W (−~l, ~k) ΠσΠ}, b σ (k, l) = M where we have used formula (29). By (42) and definition (27), we get (44). Again by (27), we get (45). In terms of probability densities, measuring Mσ on the state ρ yields the density function hσ (x, p|ρ) = Tr{M σ (x, p)ρ}. Then, by (45), the densities of the marginals Mσ1,ρ and Mσ2 ρ are the convolutions hσ1 (•|ρ) = f (•|ρ) ∗ f (•|σ), hσ2 (•|ρ) = g(•|ρ) ∗ g(•|σ), (46) where f and g are the sharp densities introduced in (5). By the arbitrariness of the state ρ, the marginal POVMs of Mσ turn out to be the convolutions (or ‘smearings’) Z Z Z Z g(p − p′ |σ)P(dp′ ) dp f (x − x′ |σ)Q(dx′ ), Mσ2 (B) dx Mσ1 (A) A Rn B Rn (see e.g. [20, Sect. III, Eqs. (2.48), (2.49)]). Let us remark that the distribution of the approximate position observable Mσ1 in a state ρ is the distribution of the sum of two independent random vectors: the first one is distributed as the sharp position Q in the state ρ, the second one is distributed as the sharp position Q in the state σ. In this sense, the approximate position Mσ1 looks like a sharp position plus an independent noise given by σ. Of course, a similar fact holds for the momentum. However, this statement about the distributions can not be extended to a statement involving the observables. Indeed, since Q and P are incompatible, nobody can jointly observe Mσ , Q and P, so that the convolutions (46) do not correspond to sums of random vectors that actually exist when measuring Mσ . 14 5.2 Covariant scalar observables Now we focus on the class of approximate joint measurements of the observables Qu and Pv representing position and momentum along two possibly different directions u and v (see Section 2.1.2). As in the case of covariant phase-space observables, this class is defined in terms of the symmetries of its elements: we require them to transform as if they were joint measurements of Qu and Pv . Recall that Qu and Pv denote the spectral measures of Qu , Pv . Due to the commutation relation (24), the following covariance relations hold ∗ ∗ W (x, p)Qu (A)W (x, p) = Qu (A + u · x), W (x, p)Pv (B)W (x, p) = Pv (B + v · p), for all A, B ∈ B(R) and x, p ∈ Rn . We employ covariance to define our class of approximate joint measurements of Qu and Pv . Definition 6. A (u, v)-covariant bi-observable is a POVM M : B(R2 ) → L(H) such that    u·x ∗ W (x, p)M(Z)W (x, p) = M Z + , ∀Z ∈ B(R2 ), ∀x, p ∈ Rn . v·p We denote by Cu,v the class of such bi-observables. Cu,v So, our approximate joint measurements of Qu and Pv will be all the bi-observables in the class Cu,v . Example 1. The marginal of a covariant phase-space observable M σ along the directions u and v is a (u, v)-covariant bi-observable. Actually, it can be proved that, if cos α 6= 0, all (u, v)-covariant biobservables can be obtained in this way. It is useful to work with a little more generality, and merge Definitions 5 and 6 into a single notion of covariance. Definition 7. Suppose J is a k×2n real matrix. A POVM M : B(Rk ) → L(H) is a J-covariant observable on Rk if    x ∗ W (x, p)M(Z)W (x, p) = M Z + J , ∀Z ∈ B(Rk ), ∀x, p ∈ Rn . p Thus, approximate joint observables of Qu and Pv are just J-covariant observables on R2 for the choice of the 2 × 2n matrix  T  u 0T J= . (47) 0T v T On the other hand, covariant phase-space observables constitute the class of 12n -covariant observables on R2n , where 12n is the identity map of R2n . 5.3 Gaussian measurements When dealing with Gaussian states, the following class of bi-observables quite naturally arises. Definition 8. A POVM M : B(R2m ) → L(H) is a Gaussian bi-observable if        aM 1 T k M T T T b k l − exp i k M(k, l) = W −Ω(J ) l bM 2 l T  V M   k l (48) for two vectors aM , bM ∈ Rm , a real 2m × 2n matrix J M and a real symmetric 2m × 2m matrix V M satisfying the condition i (49) V M ± J M Ω(J M )T ≥ 0. 2  M a We set µM = . The triple (µM , V M , J M ) is the set of the parameters of the Gaussian observable M. bM 15 In this definition, the vector aM has the dimension of a length, and bM of a momentum; similarly, the matrices J M , V M decompose into blocks of different dimensions. The condition (49) is necessary and sufficient in order that the function (48) defines the characteristic function of a POVM. For unbiased Gaussian measurements, i.e., Gaussian bi-observables with aM = bM = 0, the previous definition coincides with the one of [46, Section 12.4.3]. It is also a particular case of the more general definition of Gaussian observables on arbitrary (not necessarily symplectic) linear spaces that is given in [36,49]. We refer to [46,49] for the proof that Eq. (48) is actually the characteristic function of a POVM. Measuring the Gaussian observable M on the Gaussian state ρ yields the probability distribution Mρ whose characteristic function is          aM  M k 1 T k T b k l − exp i kT lT Tr{M(k, l)ρ} = ρb (J M )T V bM l l 2    ρ   M      k  1 T a M M ρ M T M a T k l ; V + J V (J ) − + J = exp i kT lT l bρ bM 2 hence the output distribution is Gaussian,  Mρ = N J M µρ + µM ; J M V ρ (J M )T + V M . (50) 5.3.1 Covariant Gaussian observables For Gaussian bi-observables, J-covariance has a very easy characterization. Proposition 11. Suppose M is a Gaussian bi-observable on R2m with parameters (µM , V M , J M ). Let J be any 2m × 2n real matrix. Then, the POVM M is a J-covariant observable if and only if J M = J. Proof. For x, p ∈ Rn , we let M′ and M′′ be the two POVMs on R2m given by    x ∗ ′ ′′ M (Z) = W (x, p)M(Z)W (x, p) , M (Z) = M Z + J , p ∀Z ∈ B(R2m ). By the commutation relations (24) for the Weyl operators, we immediately get  b ′ (k, l) = W (x, p)M(k, b M l)W (x, p)∗ = exp −i xT we have also b ′′ (k, l) = M Z R2m  exp i kT lT      k b pT Ω−1 −Ω(J M )T M(k, l) l     x b = exp −i kT lT J M M(k, l); p  ′    x x − J M(dx′ dp′ ) p′ p  = exp −i kT    x b lT J M(k, l). p b Since M(k, l) 6= 0 for all k, l, by comparing the last two expressions we see that M′ = M′′ if and only if         M x x T T T T l J l J = exp −i k exp −i k , ∀x, p ∈ Rn , ∀k, l ∈ Rm , p p which in turn is equivalent to J M = J. Vector observables Let us point out the structure of the Gaussian approximate joint measurements of Q and P. 16 Proposition 12. A bi-observable Mσ ∈ C is Gaussian if and only if the state σ is Gaussian. In this case, the covariant bi-observable Mσ is Gaussian with parameters σ µM = µσ , J M = 12n . σ σ V M = V σ, Proof. By comparing (31), (44) and (48), and using the fact that W (x1 , p2 ) ∝ W (x2 , p2 ) if and only if x1 = x2 and p1 = p2 , we have the first statement. Then, for σ ∈ G, we see immediately that Mσ is a Gaussian observable with the above parameters. We call CG the class of the Gaussian covariant phase-space observables. By (50), observing Mσ on a Gaussian state ρ ∈ G yields the normal probability distribution Mσρ = N (µρ + µσ ; V ρ + V σ ), with marginals Mσ1,ρ = N (aρ + aσ ; Aρ + Aσ ), Mσ2,ρ = N (bρ + bσ ; B ρ + B σ ). (51) CG When aσ = 0 and bσ = 0, we have an unbiased measurement. Scalar observables We now study the Gaussian approximate joint measurements of the target observables Qu and Pu defined in (6). Proposition 13. A Gaussian bi-observable M with parameters (µM , V M , J M ) is in Cu,v if and only if J M = J, where J is given by (47). In this case, the condition (49) is equivalent to M V11 ≥ 0, M V22 ≥ 0, M M V11 V22 ≥ ~2 M 2 (cos α)2 + (V12 ) . 4 (52) Proof. The first statement follows from Proposition 11. Then, the matrix inequality (49) reads   i~ 0 cos α M ≥ 0, V ± 0 2 − cos α which is equivalent to (52). We write CG u,v for the class of the Gaussian (u, v)-covariant phase-space observables. An observM M M able M ∈ CG = J given by u,v is thus characterized by the couple (µ , V ). From (50) with J G (47), we get that measuring M ∈ Cu,v on a Gaussian state ρ yields the probability distribution Mρ =  ρ N µρu,v + µM ; Vu,v + V M . Its marginals with respect to the first and second entry are, respectively,  M , M1,ρ = N u · aρ + aM ; Var(Qu,ρ ) + V11  M . M2,ρ = N v · bρ + bM ; Var(Pv,ρ ) + V22 (53) Example 2. Let us construct an example of an approximate joint measurement of Qu and Pv , by using a noisy measurement of position along u followed by a sharp measurement of momentum along v. Let ∆ be a positive real number yielding the precision of the position measurement, and consider the POVM M on R2 given by     Z (x − Qu )2 1 (x − Qu )2 Pv (B) exp − dx, ∀A, B ∈ B(R). M(A × B) = √ exp − 4∆ 4∆ 2π∆ A 17 CG u,v The characteristic function of M is  Z     Z (x − Qu )2 (x − Qu )2 1 ilp ikx b dx e Pv (dp) exp − e exp − M(k, l) = √ 4∆ 4∆ 2π∆ R R     Z 1 (x − Qu )2 (x − Qu )2 =√ eilPv exp − dx exp ikx − 4∆ 4∆ 2π∆ R     Z (x − Qu )2 eilPv (x − Qu + ~lu · v)2 exp − dx =√ exp ikx − 4∆ 4∆ 2π∆ R Z    1 (~l cos α)2 (x − Qu + ~l cos α/2)2 =√ dx exp ilPv − exp ikx − 8∆ 2∆ 2π∆ R     ~l cos α ∆ (~ cos α)2 2 = exp ilPv + ik Qu + − k2 − l 2 2 8∆   ∆ 2 (~ cos α)2 2 = W (−~lv, ~ku) exp − k − l . 2 8∆ Therefore, M is a Gaussian bi-observable with parameters aM = 0, bM = 0 and J M = J, where J is given α)2 M M M G by (47) and V11 = ∆, V22 = (~ cos and V12 = 0. This implies M ∈ CG u,v ; in particular, the set Cu,v is 4∆ M M non-empty. Moreover, the lower bound V11 V22 = ~2 2 4 (cos α) is attained, cf. (52). Example 3. Let us consider the case α = ±π/2; now the target observables Qu and Pv are compatible and we can define a pvm M on R2 by setting M(A×B) = Qu (A)Pv (B) for all A, B ∈ B(R). Its characteristic function is Z Z ikx b e Qu (dx) eilp Pv (dp) = ei(kQu +lPv ) = W (−~lv, ~ku). M(k, l) = R R M M M Then, M ∈ CG = 0 and J M = J given by (47). Note that M can u,v with parameters a = 0, b = 0, V be regarded as the limit case of the observables of the previous example when cos α = 0 and ∆ ↓ 0. 6 Entropic MURs for position and momentum In the case of two discrete target observables, in [2] we found an entropic bound for the precision of their approximate joint measurements, which we named entropic incompatibility degree. Its definition followed a three steps procedure. Firstly, we introduced an error function: when the system is in a given state ρ, such a function quantifies the total amount of information that is lost by approximating the target observables by means of the marginals of a bi-observable; the error function is nothing else than the sum of the two relative entropies of the respective distributions. Then, we considered the worst possible case by maximizing the error function over ρ, thus obtaining an entropic divergence quantifying the approximation error in a state independent way. Finally, we got our index of the incompatibility of the two target observables by minimizing the entropic divergence over all bi-observables. In particular, when symmetries are present, we showed that the minimum is attained at some covariant bi-observables. So, the covariance followed as a byproduct of the optimization procedure, and was not a priori imposed upon the class of approximating bi-observables. As we shall see, the extension of the previous procedure to position and momentum target observables is not straightforward, and peculiar problems of the continuous case arise. In order to overcome them, in this paper we shall fully analyse only a case in which explicit computations can be done: Gaussian preparations, and Gaussian bi-observables, which we a priori assume to be covariant. We conjecture that the final result should be independent of these simplifications, as we shall discuss in Section 7. As we said in Section 5, by “approximate joint measurement” we mean “a bi-observable with the ‘right’ covariance properties”. 18 6.1 Scalar observables Given the directions u and v, the target observables are Qu and Pv in (6) with pvm’s Qu and Pv . For ρ ∈ G with parameters (µρ , V ρ ) given in (12), the target distributions Qu,ρ and Pv,ρ are normal with means and variances (11). An approximate joint measurements of Qu and Pv is given by a covariant bi-observable M ∈ Cu,v ; then, we denote its marginals with respect to the first and second entry by M1 and M2 , respectively. For a M M Gaussian covariant bi-observable M ∈ CG u,v with parameters (µ , V ), the distribution of M in a Gaussian state ρ is normal,  ρ Mρ = N µρ + µM ; Vu,v +VM , so that its marginal distributions M1,ρ and M2,ρ are normal with means u · aρ + aM and v · bρ + bM and variances M M Var (M1,ρ ) = Var (Qu,ρ ) + V11 , Var (M2,ρ ) = Var (Pv,ρ ) + V22 . (54) Let us recall that |u| = 1, |v| = 1, u · v = cos α, and that by (16) and (52), we have Var (Qu,ρ ) Var (Pv,ρ ) ≥ ~2 2 (cos α) , 4 M M V11 V22 ≥ ~2 2 (cos α) . 4 (55) 6.1.1 Error function The relative entropy is the amount of information that is lost when an approximating distribution is used in place of a target one. For this reason, we use it to give an informational quantification of the error made in approximating the distributions of sharp position and momentum by means of the marginals of a joint covariant observable. Definition 9. Given the preparation ρ ∈ S and the covariant bi-observable M ∈ Cu,v , the error function for the scalar case is the sum of the two relative entropies: S(ρ, M) := S(Qu,ρ kM1,ρ ) + S(Pv,ρ kM2,ρ ). (56) The relative entropy is invariant under a change of the unit of measurement, so that the error function is scale invariant, too; indeed, it quantifies a relative error, not an absolute one. In the Gaussian case the error function can be explicitly computed. Proposition 14 (Error function for the scalar Gaussian case). For ρ ∈ G and M ∈ CG u,v , the error function is log e S(ρ, M) = [s(x) + s(y) + ∆(ρ, M)] , (57) 2 where x := M V11 , Var (Qu,ρ ) y := M V22 , Var (Pv,ρ ) ∆(ρ, M) := (aM )2 (bM )2 + , Var (M1,ρ ) Var (M2,ρ ) and s : [0, +∞) → [0, +∞) is the following C ∞ strictly increasing function with s(0) = 0: s(x) := ln (1 + x) − x . 1+x (58) Proof. The statement follows by a straightforward combination of (32), (34), (53) and (56). M Note that the error function does not depend on the mixed covariances u · C ρ v and V12 . Note also that, if we select a possible approximation M, then the error function S(ρ, M) decreases for states ρ with increasing sharp variances Var (Qu,ρ ) and Var (Pv,ρ ): the loss of information decreases when the sharp distributions make the approximation error negligible. Finally, note that s(x) + s(y) = ln[(1 + x)(1 + y)] + (1 + x)−1 + (1 + y)−1 − 2, 19 1+x= Var (M1,ρ ) , Var (Qu,ρ ) 1+y = Var (M2,ρ ) . Var (Pv,ρ ) This means that, apart from the term ∆(ρ, M) due to the bias, our error function S(ρ, M) only depends on the two ratios “variance of the approximating distribution over variance of the target distribution”. Thus, in order to optimize the error function, one has to optimize these two ratios. We use formula (57) to firstly give a state dependent MUR, and then, following the scheme of [2], a state independent MUR. A lower bound for the error function can be found by minimizing it over all possible approximate joint measurements of Qu and Pv . First of all, let us remark that this minimization makes sense because we consider only (u, v)-covariant bi-observables: if we minimized over all possible bi-observables, then the minimum would be trivially zero for every given preparation ρ. Indeed, the trivial bi-observable M(A × B) = Qu,ρ (A)Pv,ρ (B) 1 yields S(ρ, M) = 0. When minimizing the error function over all (u, v)-covariant bi-observables, both the minimum and the best measurement attaining it are state dependent. When α = ±π/2, the two target observables are compatible, so that their joint measurement trivially exists (see Example 3) and we get inf M∈Cu,v S(ρ, M) = 0. In order to have explicit results for any angle α, we consider only the Gaussian case. Theorem 15 (State dependent MUR, scalar observables). For every ρ ∈ G and M ∈ CG u,v , S(Qu,ρ kM1,ρ ) + S(Pv,ρ kM2,ρ ) ≥ cρ (α), (59) where the lower bound is cρ (α) = s (zρ ) log e ( with ~| cos α| = (log e) ln 1 + p 2 Var (Qu,ρ ) Var (Pv,ρ ) ! ~| cos α| p − ~| cos α| + 2 Var (Qu,ρ ) Var (Pv,ρ ) ~ |cos α| zρ := p ∈ [0, 1]. 2 Var (Qu,ρ ) Var (Pv,ρ ) ) , (60) (61) The lower bound is tight and the optimal measurement is unique: cρ (α) = S(ρ, M∗ ), for a unique M∗ ∈ CG u,v ; such a Gaussian (u, v)-covariant bi-observable is characterized by µ M∗ = 0, M∗ V12 = 0, M∗ V11 ~ = 2 s Var (Qu,ρ ) |cos α| , Var (Pv,ρ ) M∗ V22 ~ = 2 s Var (Pv,ρ ) |cos α| . (62) Var (Qu,ρ ) Proof. As already discussed, the case cos α = 0 is trivial. If cos α 6= 0, we have to minimize the error function (57) over M. First of all we can eliminate the positive term ∆(ρ, M) by taking an unbiased measurement. Then, since s is an increasing function, by the second condition in (55) we can also take 2 2 M∗ M∗ M∗ = 0 by (52). In this case the error function (57) reduces to V11 V22 = ~4 (cos α) . This implies V12 S(ρ, M∗ ) =  log e s(x) + s(zρ2 /x) , 2 x= M∗ V11 , Var (Qu,ρ ) with zρ given by (61); by the first of (55), we have zρ ∈ (0, 1]. Now, we can minimize the error function with respect to x by studying its first derivative:    zρ4 x2 − zρ2 x2 + 2zρ2 x + zρ2 x d 2 s(x) + s(zρ /x) = − = . 2 2 dx (1 + x)2 x(zρ2 + x)2 x z 2 + x (1 + x) ρ Having x > 0, we immediately get that x = zρ gives the unique minimum. Thus S(ρ, M) ≥ S(ρ, M∗ ) = s(zρ ) log e = log(1 + zρ ) − 20 zρ log e, 1 + zρ and M∗ V11 ~ = zρ Var (Qu,ρ ) ≡ 2 s Var (Qu,ρ ) |cos α| , Var (Pv,ρ ) M∗ V22 ~ = zρ Var (Pv,ρ ) ≡ 2 s Var (Pv,ρ ) |cos α| , Var (Qu,ρ ) which conclude the proof. Remark 3. The minimum information loss cρ (α) depends on both the preparation ρ and the angle α. When α 6= ±π/2, that is when the target observables are not compatible, cρ (α) is strictly grater than zero. This is a peculiar quantum effect: given ρ, u and v, there is no Gaussian approximate joint measurement of Qu and Pv that can approximate them arbitrarily well. On the other side, in the limit α → ±π/2, the lower bound cρ (α) goes to zero; so, the case of commuting target observables is approached with continuity. Remark 4. The lower bound cρ (α) goes to zero also in the classical limit ~ → 0. This holds for every angle α and every Gaussian state ρ. Remark 5. Another case in which cρ (α) → 0 is the limit of large uncertainty states, that is, if we let the product Var (Qu,ρ ) Var (Pv,ρ ) → ∞: our entropic MUR disappears because, roughly speaking, the variance of (at least) one of the two target observables goes to infinity, its relative entropy vanishes by itself, and an optimal covariant bi-observable M∗ has to take care of (at most) only the other target observable. Remark 6. Actually, something similar to the previous remark happens also at the macroscopic limit, and does not require the measuring instrument to be an optimal one; indeed, unbiasedness is enough in this case. This happens because the error function S(ρ, M) quantifies a relative error; even if the measurement approximation M is fixed, such an error can be reduced by suitably changing the preparation ρ. Indeed, if we consider the position and momentum of a macroscopic particle, for instance the center of mass of many particles, it is natural that its state has much larger position and momentum uncertainties than the VM VM intrinsic uncertainties of the measuring instrument; that is, Var(Q11u,ρ ) ≪ 1 and Var(P22v,ρ ) ≪ 1, implying that the error function (57) is negligible. In practice, this is a classical case: the preparation has large position and momentum uncertainties and the measuring instrument is relatively good. In this situation we do not see the difference between the joint measurement of position and momentum and their separate sharp observations. Remark 7. The optimal approximating joint measurement M∗ ∈ CG u,v is unique; by (62) it depends on the preparation ρ one is considering, as well as on the directions u and v. A realization of M∗ is the measuring procedure of Example 2. Remark 8. The MUR (59) is scale invariant, as both the error function S(ρ, M) and the lower bound cρ (α) are such. Remark 9. For cos α 6= 0, we get inf M∈CG S(ρ, M) = s(zρ ) log e, where zρ is defined by (61). As zρ u,v i  log e , ranges in the interval (0, 1], the quantity inf M∈CG S(ρ, M) takes all the values in the interval 0, 1 − 2 u,v so that log e . (63) sup inf S(ρ, M) = 1 − 2 ρ∈G M∈CG u,v In order to get this result, we needed cos α 6= 0; however, the final result does not depend on α. Therefore, in the supρ inf M -approach of (63), the continuity from quantum to classical is lost. 6.1.2 Entropic divergence of Qu , Pv from M Now we want to find an entropic quantification of the error made in observing M ∈ Cu,v as an approximation of Qu and Pv in an arbitrary state ρ. The procedure of [2], already suggested in [25, Sect. VI.C] for a different error function, is to consider the worst case by maximizing the error function over all the states. However, in the continuous framework this is not possible for the error function (56); indeed, from (57) we get supρ∈G S(ρ, M) = +∞ even if we restrict to unbiased covariant bi-observables. Anyway, the reason for S(ρ, M) to diverge is classical: it depends only on the continuous nature of Qu and Pv , without any relation to their (quantum) incompatibility. Indeed, as we noted in Section 3.1, if an 21 instrument measuring a random variable X ∼ N (a; α2 ) adds an independent noise ν ∼ N (b; β 2 ), thus producing an output X + ν ∼ N (a + b; α2 + β 2 ), then the relative entropy S(XkX + ν) diverges for α2 → 0; this is what happens if we fix the noise and we allow for arbitrarily peaked preparations. Thus, the sum S(Qu,ρ kM1,ρ ) + S(Pv,ρ kM2,ρ ) diverges if, fixed M, we let Var(Qu,ρ ) or Var(Pv,ρ ) go to 0. The difference between the classical and quantum frameworks emerges if we bound from below the variances of the sharp position and momentum observables. Indeed, in the classical framework we have inf b,β 2 supα2 ≥ǫ S(XkX + ν) = 0 for every ǫ > 0; the same holds for the sum of two relative entropies if no relation exists between the two noises. On the contrary, in the quantum framework the entropic MURs appear due to the relation between the position and momentum errors occurring in any approximate joint measurement. In order to avoid that S(ρ, M) → +∞ due to merely classical effects, we thus introduce the following subset of the Gaussian states: Gu,v := {ρ ∈ G : Var (Qu,ρ ) ≥ ǫ1 , Var (Pv,ρ ) ≥ ǫ2 } , ǫ ǫi > 0, (64) and we evaluate the error made in approximating Qu and Pv with the marginals of a (u, v)-covariant bi-observable by maximizing the error function over all these states. Definition 10. The Gaussian ǫ-entropic divergence of Qu , Pv from M ∈ Cu,v is DǫG (Qu , Pv kM) := sup S(ρ, M). (65) ρ∈Gu,v ǫ For Gaussian M, depending on the choice of the thresholds ǫ1 and ǫ2 , the divergence DǫG (Qu , Pv kM) can be easily computed or at least bounded. Theorem 16. Let the bi-observable M ∈ CG u,v be fixed. (i) For ǫ1 ǫ2 ≥ ~2 2 (cos α) , the divergence DǫG (Qu , Pv kM) is given by 4 log e [s(xǫ ) + s(yǫ ) + ∆(ǫ; M)] , (66) 2   where ρǫ (u, v) is any Gaussian state with Var Qu,ρǫ (u,v) = ǫ1 and Var Pv,ρǫ (u,v) = ǫ2 , and DǫG (Qu , Pv kM) = S(ρǫ (u, v), M) = xǫ := (ii) For ǫ1 ǫ2 < M V11 , ǫ1 yǫ := M V22 , ǫ2 ∆(ǫ; σ) := (bM )2 (aM )2 + . M+ǫ M+ǫ V11 V22 1 2 ~2 2 (cos α) , the divergence DǫG (Qu , Pv kM) is bounded from below by 4 DǫG (Qu , Pv kM) ≥ S(ρǫ (u, v), M) = log e [s(xǫ ) + s(yǫ ) + ∆(ǫ; M)] , 2 (67)   ~2 2 where ρǫ (u, v) is any Gaussian state with Var Qu,ρǫ (u,v) = ǫ1 and Var Pv,ρǫ (u,v) = (cos α) , 4ǫ1 and xǫ := M V11 , ǫ1 yǫ := M 4ǫ1 V22 ~2 (cos α) 2, ∆(ǫ; σ) := (bM )2 (aM )2 + . M M + ~2 (cos α)2 V11 + ǫ1 V22 4ǫ1 The existence of the above states ρǫ (u, v) is guaranteed by Proposition 4. Proof. By Proposition 4, maximizing the error function over the states in Gu,v is the same as maximizing ǫ (57) with (54) over the parameters Var (Qu,ρ ) and Var (Pv,ρ ) satisfying (55) and (64). 22 Gu,v ǫ ~2 2 (cos α) , the thresholds themselves satisfy Heisenberg uncertainty relation, 4 and so equality (66) follows from the expression (57) and the fact the functions s(x), s(y), ∆(ρ, M) are decreasing in Var (Qu,ρ ) and Var (Pv,ρ ). ~2 2 (ii) In the case ǫ1 ǫ2 < (cos α) , we have to take into account the relation (55) for Var (Qu,ρ ) 4 2 2 and Var (Pv,ρ ): the supremum of S(ρ, M) is achieved when Var (Qu,ρ ) Var (Pv,ρ ) = ~4 (cos α) , with Var (Qu,ρ ) ≥ ǫ1 and Var (Pv,ρ ) ≥ ǫ2 . Then inequality (67) follows by chosing Var (Qu,ρ ) = ǫ1 and ~2 2 (cos α) . Var (Pv,ρ ) = 4ǫ1 (i) In the case ǫ1 ǫ2 ≥ Remark 10. The conditions on the states ρǫ (u, v) do not depend on M, but only on the parameters defining 2 ~2 Gu,v ǫ . Thus, in the case ǫ1 ǫ2 ≥ 4 (cos α) , any choice of ρǫ (u, v) yields a state which is the worst one for every Gaussian approximate joint measurement M. 6.1.3 Entropic incompatibility degree of Qu and Pv The last step is to optimize the state independent ǫ-entropic divergence (65) over all the approximate joint measurements of Qu and Pv . This is done in the next definition. Definition 11. The Gaussian ǫ-entropic incompatibility degree of Qu , Pv is cG inc (Qu , Pv ; ǫ) := inf M∈CG u,v DǫG (Qu , Pv kM) ≡ inf sup S(ρ, M). u,v M∈CG u,v ρ∈Gǫ (68) Again, depending on the choice of the thresholds ǫ1 and ǫ2 , the entropic incompatibility degree cG inc (Qu , Pv ; ǫ) can be easily computed or at least bounded. ~2 2 (cos α) , the incompatibility degree cG inc (Qu , Pv ; ǫ) is given by 4     ~ |cos α| ~ |cos α| G . cinc (Qu , Pv ; ǫ) = (log e) ln 1 + √ − √ 2 ǫ1 ǫ2 2 ǫ1 ǫ2 + ~ |cos α| (i) For ǫ1 ǫ2 ≥ Theorem 17. (69) The infimum in (68) is attained and the optimal measurement is unique, in the sense that G cG inc (Qu , Pv ; ǫ) = Dǫ (Qu , Pv kMǫ ) for a unique Mǫ ∈ CG u,v ; such a bi-observable is characterized by r r ~ ǫ1 ~ ǫ2 Mǫ Mǫ = aMǫ = 0, bMǫ = 0, V11 |cos α| , V22 |cos α| , = 2 ǫ2 2 ǫ1 (ii) For ǫ1 ǫ2 < (70) Mǫ V12 = 0. ~2 2 (cos α) , the incompatibility degree cG inc (Qu , Pv ; ǫ) is bounded from below by 4   1 cG (Q , P ; ǫ) ≥ (log e) ln (2) − . u v inc 2 (71) (72) The latter bound is     1 (log e) ln (2) − = S ρǫ (u, v), Mǫ = inf S ρǫ (u, v), M , G 2 M∈Cu,v (73) where the state ρǫ (u, v) is defined in item (ii) of Theorem 16 and Mǫ is the bi-observable in CG u,v such that aMǫ = 0, bMǫ = 0, Mǫ V11 = ǫ1 , 23 Mǫ V22 = ~2 2 (cos α) , 4ǫ1 Mǫ V12 = 0. (74) ~2 2 (cos α) , due to (66), the proof is the same as that of Theorem 15 with the 4 replacements Var (Qu,ρ ) 7→ ǫ1 and Var (Pv,ρ ) 7→ ǫ2 . ~2 (ii) In the case ǫ1 ǫ2 < (cos α)2 , starting from (67), the proof is the same as that of Theorem 15 with 4 2 ~2 (cos α) . the replacements Var (Qu,ρ ) 7→ ǫ1 and Var (Pv,ρ ) 7→ 4ǫ 1 Proof. (i) In the case ǫ1 ǫ2 ≥ Remark 11 (State independent MUR, scalar observables). By means of the above results, we can formulate a state independent entropic MUR for the position Qu and the momentum Pv in the following way. Chosen two positive thresholds ǫ1 and ǫ2 , there exists a preparation ρǫ (u, v) ∈ Gu,v (introduced in Theorem 16) ǫ such that, for all Gaussian approximate joint measurements M of Qu and Pv , we have S(Qu,ρǫ (u,v) kM1,ρǫ (u,v) ) + S(Pv,ρǫ (u,v) kM2,ρǫ (u,v) )      ~2 ~ |cos α| ~ |cos α|  2  , if ǫ1 ǫ2 ≥ − √ (cos α) , (log e) ln 1 + √ 2 ǫ ǫ 2 ǫ ǫ + ~ |cos α| 4 1 2   1 2 ≥ 1 ~2  2  (log e) ln (2) − , if ǫ1 ǫ2 < (cos α) . 2 4 (75) 2 The inequality follows by (66) and (69) in the case ǫ1 ǫ2 ≥ ~4 (cos α)2 , and (73) in the case ǫ1 ǫ2 < 2 ~2 4 (cos α) . What is relevant is that, for every approximate joint measurement M, the total information loss S(ρ, M) does exceed the lower bound (75) even if the set of states Gu,v forbids preparations ρ with too peaked target ǫ distributions. Indeed, without the thresholds ǫ1 , ǫ2 , it would be trivial to exceed the lower bound (75), as we noted in Section 6.1.2. We also remark that, chosen ǫ1 and ǫ2 , we found a single state ρǫ (u, v) in Gu,v that satisfies (75) for ǫ every M, so that ρǫ (u, v) is a ‘bad’ state for all Gaussian approximate joint measurements of position and momentum. 2 2 When ǫ1 ǫ2 ≥ ~4 (cos α) , the optimal approximate joint measurement Mǫ is unique in the class of Gaussian (u, v)-covariant bi-observables; it depends only on the class of preparations Gu,v ǫ : it is the best measurement for the worst choice of the preparation in the class Gu,v . ǫ Remark 12. The entropic incompatibility degree cG inc (Qu , Pv ; ǫ) is strictly positive for cos α 6= 0 (incompatible target observables) and it goes to zero in the limits α → ±π/2 (compatible observables), ~ → 0 (classical limit), and ǫ1 ǫ2 → ∞ (large uncertainty states). Remark 13. The scale invariance of the relative entropy extends to the error function S(ρ, M), hence to the divergence DǫG (Qu , Pv kM) and the entropic incompatibility degree cG inc (Qu , Pv ; ǫ), as well as the entropic MUR (75). 6.2 Vector observables Now the target observables are Q and P given in (3), with pvm’s Q and P; the approximating bi-observables are the covariant phase-space observables C of Definition 5. Each bi-observable M ∈ C is of the form M = Mσ for some σ ∈ S, where Mσ is given by (43). CG is the subset of the Gaussian bi-observables in C, and Mσ ∈ CG if and only if σ is a Gaussian state. We proceed to define the analogues of the scalar quantities introduced in Sections 6.1.1, 6.1.2, 6.1.3. In order to do it, in the next proposition we recall some known results on matrices. Proposition 18 ( [13, 27, 52, 57]). Let M1 and M2 be n × n complex matrices such that M1 > M2 > 0. Then, we have 0 < M1−1 < M2−1 . Moreover, if s : R+ → R is a strictly increasing continuous function, we have Tr{s(M1 )} > Tr{s(M2 )}. 6.2.1 Error function Definition 12. Given the preparation ρ ∈ S and the covariant phase-space observable Mσ , with σ ∈ S, the error function for the vector case is the sum of the two relative entropies: S(ρ, Mσ ) := S(Qρ kMσ1,ρ ) + S(Pρ kMσ2,ρ ). 24 (76) As in the scalar case, the error function is scale invariant, it quantifies a relative error, and we always have S(ρ, Mσ ) > 0 because position and momentum are incompatible. Indeed, since the marginals of a bi-observable Mσ ∈ C turn out to be convolutions of the respective sharp observables Q and P with some probability densities on Rn , Qρ 6= Mσ1,ρ and Pρ 6= Mσ2,ρ for all states ρ; this is an easy consequence, for instance, of [15, Problem 26.1, p. 362]. In the Gaussian case the error function can be explicitly computed. Proposition 19 (Error function for the vector Gaussian case). For ρ, σ ∈ G, the error function has the two equivalent expressions:  log e  Tr {s(Eρ,σ ) + s(Fρ,σ )} + aσ · (Aρ + Aσ )−1 aσ + bσ · (B ρ + B σ )−1 bσ 2   log e   −1 −1 = Tr s(Nρ,σ ) + s(Rρ,σ ) + aσ · (Aρ + Aσ )−1 aσ + bσ · (B ρ + B σ )−1 bσ , 2 S(ρ, Mσ ) = (77a) (77b) where the function s is defined in (58), and Eρ,σ := (Aρ )−1/2 Aσ (Aρ )−1/2 , Fρ,σ := (B ρ )−1/2 B σ (B ρ )−1/2 , (78a) Nρ,σ := (Aσ )−1/2 Aρ (Aσ )−1/2 , Rρ,σ := (B σ )−1/2 B ρ (B σ )−1/2 . (78b) Proof. First of all, recall that Qρ = N (aρ ; Aρ ), Pρ = N (bρ ; B ρ ), Mσ1,ρ = N (aρ + aσ ; Aρ + Aσ ) Mσ2,ρ = N (bρ + bσ ; B ρ + B σ ). A direct application of (34) yields S(Qρ kMσ1,ρ ) =  det(Aρ + Aσ ) log e   ρ 1 Tr (A + Aσ )−1 Aρ − 1 + aσ · (Aρ + Aσ )−1 aσ . + log ρ 2 det A 2 We can transform this equation by using i h det (Aσ + Aρ ) ρ −1/2 σ ρ ρ −1/2 = det (1 + Eρ,σ ) , = det (A ) (A + A ) (A ) det Aρ  Tr (Aρ + Aσ )−1 Aρ − 1 This gives ln det (1 + Eρ,σ ) = Tr {ln (1 + Eρ,σ )} , o n  = Tr (Aρ )1/2 (Aρ + Aσ )−1 (Aρ )1/2 − 1 = − Tr (1 + Eρ,σ )−1 Eρ,σ .  log e  Tr{s(Eρ,σ )} + aσ · (Aρ + Aσ )−1 aσ . 2 In the same way a similar expression is obtained for S(Pρ kMσ2,ρ ) and (77a) is proved. On the other hand, by using S(Qρ kMσ1,ρ ) =    det (1 + Nρ,σ ) det (Aσ + Aρ ) −1 −1 = Tr ln 1 + Nρ,σ , = ln = ln det 1 + Nρ,σ ρ det A det Nρ,σ o n n o   −1 −1 −1 −1 Tr (Aρ + Aσ )−1 Aρ − 1 = − Tr (Aρ + Aσ ) Aσ = − Tr 1 + Nρ,σ Nρ,σ , ln and the analogous expressions involving B ρ and Rρ,σ , one gets (77b). 25 State dependent lower bound In principle, a state dependent lower bound for the error function could be found by analogy with Theorem 15, by taking again the infimum over all joint covariant measurements, that is inf σ S(ρ, Mσ ). By considering only Gaussian states ρ and measurements Mσ , from (18), (77a), (78a) the infimum over σ ∈ G can be reduced to an infimum over the matrices Aσ :     2  ~ log e . infσ Tr s (Aρ )−1/2 Aσ (Aρ )−1/2 + s (B ρ )−1/2 (Aσ )−1 (B ρ )−1/2 inf S(ρ, Mσ ) = σ∈G 2 A 4 The above equality follows since the monotonicity of s (Proposition 18) implies that the trace term in (77a) 2 attains its minimum when B σ = ~4 (Aρ )−1 . However, it remains an open problem to explicitly compute the infimum over the matrices Aσ when the preparation ρ is arbitrary. Nevertheless, the computations can be done at least for a preparation ρ∗ of minimum uncertainty (Proposition 6). Indeed, by (22) we get inf S(ρ∗ , Mσ ) = σ∈G   log e −1 . infσ Tr s (Eρ,σ ) + s Eρ,σ 2 A Now we can diagonalize Eρ,σ and minimize over its eigenvalues; since s(x) + s(x−1 ) attains its minimum value at x = 1, this procedure gives Eρ,σ = 1. So, by denoting by σ∗ the state giving the minimum, we have ~2 ρ∗ −1 (79) (A ) , B σ∗ = B ρ∗ = Aσ∗ = Aρ∗ , 4 (80) inf S(ρ∗ , Mσ ) = S(ρ∗ , Mσ∗ ) = ns(1) log e. σ∈G For an arbitrary ρ ∈ G, we can use the last formula to deduce an upper bound for inf σ∈G S(ρ, Mσ ). 2 Indeed, if ρ∗ is a minimum uncertainty state with Aρ∗ = Aρ , then B ρ ≥ ~4 (Aρ )−1 = B ρ∗ by (19), and, using again the state σ∗ of (79), we find inf S(ρ, Mσ ) ≤ S(ρ, Mσ∗ ) ≤ S(ρ∗ , Mσ∗ ) = ns(1) log e. σ∈G The second inequality in the last formula follows from (77b), (78b) and the monotonicity of s (Prop. 18). 6.2.2 Entropic divergence of Q, P from Mσ In order to define a state independent measure of the error made in regarding the marginals of Mσ as approximations of Q and P, we can proceed along the lines of the scalar case in Section 6.1.2. To this end, we introduce the following vector analogue of the Gaussian states defined in (64): Gǫ := {ρ ∈ G : Aρ ≥ ǫ1 1, B ρ ≥ ǫ2 1} , ǫ ≡ (ǫ1 , ǫ2 ), ǫi > 0. (81) In the vector case, Definition 10 then reads as follows. Definition 13. The Gaussian ǫ-entropic divergence of Q, P from Mσ ∈ C is DǫG (Q, PkMσ ) := sup S(ρ, Mσ ). (82) ρ∈Gǫ As in the scalar case, when Mσ is Gaussian, depending on the choice of the product ǫ1 ǫ2 , we can compute the divergence DǫG (Q, PkMσ ) or at least bound it from below. Theorem 20. Let the bi-observable Mσ ∈ CG be fixed. ~2 , the divergence DǫG (Q, PkMσ ) is given by 4 log e h Tr {s (Aσ /ǫ1 ) + s (B σ /ǫ2 )} DǫG (Q, PkMσ ) = S(ρǫ , Mσ ) = 2 (i) For ǫ1 ǫ2 ≥ i + aσ · (Aσ + ǫ1 1)−1 aσ + bσ · (B σ + ǫ2 1)−1 bσ , (83) where ρǫ is any Gaussian state with Aρǫ = ǫ1 1 and B ρǫ = ǫ2 1. 26 Gǫ ~2 , the divergence DǫG (Q, PkMσ ) is bounded from below by 4 "   log e G σ σ Dǫ (Q, PkM ) ≥ S(ρǫ , M ) = Tr s (Aσ /ǫ1 ) + s 4ǫ1 B σ /~2 2 (ii) For ǫ1 ǫ2 < + a · (A + ǫ1 1) σ σ −1 σ where ρǫ is any Gaussian state with Aρǫ = ǫ1 1 and B ρǫ = σ a +b · !−1 ~2 B + 1 4ǫ1 σ σ b # , (84) ~2 1. 4ǫ1 ~2 , for ρ ∈ Gǫ we have Nρ,σ ≥ ǫ1 (Aσ )−1 and Rρ,σ ≥ ǫ2 (B σ )−1 ; by Proof. (i) In the case ǫ1 ǫ2 ≥ 4 Proposition 18 we get −1 Tr{s(Nρ,σ )} ≤ Tr {s (Aσ /ǫ1 )} , −1 Tr{s(Rρ,σ )} ≤ Tr {s (B σ /ǫ2 )} , (Aρ + Aσ )−1 ≤ (ǫ1 1 + Aσ )−1 , (B ρ + B σ )−1 ≤ (ǫ2 1 + B σ )−1 . By using these inequalities in the expression (77b), we get (83). ~2 (ii) In the case ǫ1 ǫ2 < , the lower bound (84) follows by evaluating S(ρ, Mσ ) at the state ρ = ρǫ ∈ 4 ~2 Gǫ with Aρǫ = ǫ1 1 and B ρǫ = 1. 4ǫ1 ~2 Note that ρǫ does not depend on σ, but only on the parameters defining Gǫ : again, in the case ǫ1 ǫ2 ≥ , 4 the error attains its maximum at a state which is independent of the approximate measurement. 6.2.3 Entropic incompatibility degree of Q and P By analogy with Section 6.1.3, we can optimize the ǫ-entropic divergence over all the approximate joint measurements of Q and P . Definition 14. The Gaussian ǫ-entropic incompatibility degree of Q and P is σ G σ cG inc (Q, P; ǫ) := inf Dǫ (Q, PkM ) ≡ inf sup S(ρ, M ). σ∈G σ∈G ρ∈Gǫ (85) Again, depending on the product ǫ1 ǫ2 , we can compute or at least bound cG inc (Q, P; ǫ) from below. Theorem 21. ~2 , the incompatibility degree cG inc (Q, P; ǫ) is given by 4     ~ ~ G . − √ cinc (Q, P; ǫ) = n (log e) ln 1 + √ 2 ǫ1 ǫ2 2 ǫ1 ǫ2 + ~ (i) For ǫ1 ǫ2 ≥ (86) The infimum in (85) is attained and the optimal measurement is unique, in the sense that G σǫ cG inc (Q, P; ǫ) = Dǫ (Q, PkM ) for a unique σǫ ∈ G; such a state is the minimal uncertainty state characterized by r r ~ ǫ1 ~ ǫ2 σǫ σǫ σǫ σǫ A = b = 0, a = 0, 1, B = 1, C σǫ = 0. 2 ǫ2 2 ǫ1 27 (87) (88) (ii) For ǫ1 ǫ2 < ~2 2 (cos α) , the incompatibility degree cG inc (Q, P; ǫ) is bounded from below by 4   1 G cinc (Q, P; ǫ) ≥ n(log e) ln (2) − . 2 (89) The latter bound is  1 n(log e) ln (2) − 2  = S(ρǫ , Mσǫ ) = inf S(ρǫ , Mσ ), (90) σ∈G where the preparation ρǫ is defined in item (ii) of Theorem 20 and σǫ is the state in G such that aσǫ = 0, bσǫ = 0, Aσǫ = ǫ1 1, B σǫ = ~2 1, 4ǫ1 C σǫ = 0. (91) ~2 , from the expression (83) we get immediately aσǫ = 0, bσǫ = 0 and by 4 2 2 (19) we have B σ ≥ ~4 (Aσ )−1 . So, by (83) and Propositions 4 and 18, we get B σ = ~4 (Aσ )−1 , and Proof. (i) In the case ǫ1 ǫ2 ≥    2 ~ log e σ −1 σ . (A ) inf Tr s (A /ǫ1 ) + s inf sup S(ρ, M ) = σ∈G ρ∈Gǫ 2 Aσ 4ǫ2 σ By minimizing over all the eigenvalues of Aσ , we get the minimum (86), which is attained if and only if Aσ is as in (88). Hence, Aσǫ and B σǫ are as in (87). This implies that any optimal state σǫ is a minimum uncertainty state; so, C σǫ = 0 and the state σǫ is unique. ~2 (ii) In the case ǫ1 ǫ2 < , by (19) and Proposition 18, inequality (84) implies 4 inf sup S(ρ, Mσ ) ≥ σ∈G ρ∈Gǫ   log e infσ Tr s (Aσ /ǫ1 ) + s ǫ1 (Aσ )−1 . 2 A By minimizing over all the eigenvalues of Aσ , we get (89). Then (89) holds for ρǫ as in item (ii) of Theorem 20 and σǫ in (91). Remark 14 (State independent MUR, vector observables). By means of the above results, we can formulate the following state independent entropic MUR for the position Q and momentum P . Chosen two positive thresholds ǫ1 and ǫ2 , there exists a preparation ρǫ ∈ Gǫ (introduced in Theorem 20) such that, for all Gaussian approximate joint measurements Mσ of Q and P, we have S(Qρǫ kMσ1,ρǫ ) + S(Pρǫ kMσ2,ρǫ )      ~ ~   , − n (log e) ln 1 + √ √  2 ǫ1 ǫ2 2 ǫ1 ǫ2 + ~  ≥ 1   n(log e) ln (2) − , 2 2 2 ~2 , 4 ~2 if ǫ1 ǫ2 < . 4 if ǫ1 ǫ2 ≥ (92) The inequality follows by (83) and (86) for ǫ1 ǫ2 ≥ ~4 , and (90) for ǫ1 ǫ2 < ~4 . Thus, also in the vector case, for every approximate joint measurement Mσ , the total information loss S(ρ, Mσ ) does exceed the lower bound (92) even if Gǫ forbids preparations ρ with too peaked target distributions. Moreover, chosen ǫ1 and ǫ2 , one can fix again a single ‘bad’ state ρǫ in Gǫ that satisfies (92) for all Gaussian approximate joint measurements Mσ of Q and P . 2 Whenever ǫ1 ǫ2 ≥ ~4 , the optimal approximating joint measurement Mσǫ is unique in the class of Gaussian covariant bi-observables; it corresponds to a minimum uncertainty state σǫ which depends only on the chosen class of preparations Gǫ , that is, on the thresholds ǫ1 and ǫ2 : Mσǫ is the best measurement for the worst choice of the preparation in that class. 28 Remark 15. For n = 1, the vector lower bound in (92) reduces to the scalar lower bound found in (75) for two parallel directions u and v; for n ≥ 1, the bound linearly grows with n. Remark 16. The entropic incompatibility degree cG inc (Qu , Pv ; ǫ) is strictly positive for cos α 6= 0 (incompatible target observables) and it goes to zero in the limit α → ±π/2 (compatible observables), ~ → 0 (classical limit), and ǫ1 ǫ2 → ∞ (large uncertainty states). Remark 17 (The macroscopic limit.). Similarly to Remark 6 for scalar target observables, also the MUR (92) is practically ineffective for macroscopic systems. Indeed, suppose we are concerned with position and momentum of a macroscopic particle, say the center of mass of a multi-particle system (in this case n = 3). The states ρ which can be practically prepared have macroscopic widths, say ρ ∈ Gǫ with ‘large’ thresholds ǫ and ǫ1 ǫ2 ≫ ~2 /4. Then, we consider a measuring instrument Mσ∗ having a high precision with respect to this class of states, but not necessarily reaching a precision near the quantum limits. For instance, let us take Mσ∗ ∈ CG with Aσ∗ = δ1 1, B σ∗ = δ2 1, and 0 < δ1 ≪ ǫ1 , 0 < δ2 ≪ ǫ2 ; we take it also unbiased: aσ∗ = 0, bσ∗ = 0. Obviously, δ1 δ2 ≥ ~2 /4 must hold. Then, ∀ρ ∈ Gǫ by (77a) and (78a) we have δ2 δ1 δ2 δ1 1, Fρ,σ∗ = ρ ≤ 1, Eρ,σ∗ = ρ ≤ A ǫ1 B ǫ2 0 < S(ρ, Mσ∗ ) = log e n log e Tr {s(Eρ,σ∗ ) + s(Fρ,σ∗ )} ≤ [s(δ1 /ǫ1 ) + s(δ2 /ǫ2 )] . 2 2 By (58) the function s is increasing and in a neighborhood of zero it behaves as s(x) ≃ x2 /2; in the present case δ1 /ǫ1 ≪ 1 and δ2 /ǫ2 ≪ 1 and, so, we have that the error function is negligible. This is practically a ‘classical’ case: the preparation has ‘large’ position and momentum uncertainties and the measuring instrument is ‘relatively good’. In this situation we do not see the difference between the joint measurement of position and momentum and their separate sharp distributions. Of course the bound (92) continues to hold, but it is also negligible since ǫ1 ǫ2 ≫ ~2 /4. Remark 18. The scale invariance of the relative entropy extends also in the vector case to the error function S(ρ, Mσ ), the divergence DǫG (Q, PkMσ ) and the entropic incompatibility degree cG inc (Q, P; ǫ), as well as the entropic MUR (92). Indeed, let us consider the dimensionless versions of position and momentum (35) e P e introduced in Section 4. Accordingly, we rescale the and their associated projection valued measures Q, R σ e σ (B) = fσ x, p)de e xdp, e joint measurement M of (43) in the same way, obtaining the POVM M B M (e fσ (e e = M x, p) 1 n exp (2πλ)      i  i e−x e−x e · Pe e · Pe pe · Q ΠσΠ exp − pe · Q . λ λ e and p, e as well as the components of the Borel set B, are dimensionless. Here, both the vector variables x By the scale invariance of the relative entropy, the error function takes the same value as in the dimensioned case: e ρ kM e σ ) + S(P e ρ kM e σ ) = S(Qρ kMσ ) + S(Pρ kMσ ). S(Q (93) 1,ρ 2,ρ 1,ρ 2,ρ Then, the scale invariance holds for the entropic divergence and incompatibility degree, too: where e ǫ1 := e Pk e M e σ ) = DG (Q, PkMσ ), DǫeG (Q, ǫ e e e) = cG (Q, P; ǫ), cG inc (Q, P; ǫ inc κǫ1 λ2 ǫ2 λ2 ~2 and e ǫ2 := . In particular e ǫ1 e ǫ2 ≥ ⇐⇒ ǫ1 ǫ2 ≥ and, in this case, we have ~ κ~ 4 4    λ  e e e) = cG (Q, P; ǫ) = n (log e) s √~ . = cG n (log e) s √ inc (Q, P; ǫ inc 2 ǫ1 ǫ2 2 e ǫ1 e ǫ2 7 Conclusions We have extended the relative entropy formulation of MURs given in [2] from the case of discrete incompatible observables to a particular instance of continuous target observables, namely the position and momentum vectors, or two components of them along two possibly non parallel directions. The entropic 29 MURs we found share the nice property of being scale invariant and well-behaved in the classical and macroscopic limits. Moreover, in the scalar case, when the angle spanned by the position and momentum components goes to ±π/2, the entropic bound correctly reflects their increasing compatibility by approaching zero with continuity. Although our results are limited to the case of Gaussian preparation states and covariant Gaussian approximate joint measurements, we conjecture that the bounds we found still hold for arbitrary states and general (not necessarily covariant or Gaussian) bi-observables. Let us see with some more detail how this should work in the case when the target observables are the vectors Q and P . The most general procedure should be to consider the error function S(Qρ kM1,ρ ) + S(Pρ kM2,ρ ) for an arbitrary POVM M on Rn × Rn and any state ρ ∈ S. First of all, we need states for which neither the position nor the momentum dispersion are too small; the obvious generalization of the test states (81) is Sǫ := {ρ ∈ S2 : Aρ ≥ ǫ1 1, B ρ ≥ ǫ2 1} , ǫi > 0. Then, the most general definitions of the entropic divergence and incompatibility degree are: Dǫ (Q, PkM) := sup [S(Qρ kM1,ρ ) + S(Pρ kM2,ρ )] , (94) cinc (Q, P; ǫ) := inf Dǫ (Q, PkM). (95) ρ∈Sǫ M It may happen that Qρ is not absolutely continuous with respect to M1,ρ , or Pρ with respect to M2,ρ ; in this case, the error function and the entropic divergence take the value +∞ by definition. So, we can restrict to bi-observables that are (weakly) absolutely continuous with respect to the Lebesgue measure. However, the true difficulty is that, even with this assumption, here we are not able to estimate (94), hence (95). It could be that the symmetrization techniques used in [25, 65] can be extended to the present setting, and one can reduce the evaluation of the entropic incompatibility index to optimizing over all covariant biobservables. Indeed, in the present paper we a priori selected only covariant approximating measurements; we would like to understand if, among all approximating measurements, the relative entropy approach selects covariant bi-observables by itself. However, even if M is covariant, there remains the problem that we do not know how to evaluate (94) if ρ and M are not Gaussian. It is reasonable to expect that some continuity and convexity arguments should apply, and the bounds in Theorem 21 could be extended to the general case by taking dense convex combinations. Also the techniques used for the PURs in [12, 14] could be of help in order to extend what we did with Gaussian states to arbitrary states. This leads us to conjecture: cinc (Q, P; ǫ) = cG (96) inc (Q, P; ǫ). Conjecture (96) is also supported since the uniqueness of the optimal approximating bi-observable in Theorem 21.(i) is reminiscent of what happens in the discrete case of two Fourier conjugated mutually unbiased bases (MUBs); indeed, in the latter case, the optimal bi-observable is actually unique among all the bi-observables, not only the covariant ones [2, Theor. 5]. Similar considerations obviously apply also to the case of scalar target observables. We leave a more deep investigation of equality (96) to future work. As a final consideration, one could be interested in finding error/disturbance bounds involving sequential measurements of position and momentum, rather than considering all their possible approximate joint measurements. As sequential measurements are a proper subset of the set of all the bi-observables, optimizing only over them should lead to bounds that are greater than cinc . This is the reason for which in [2] an error/disturbance entropic bound, denoted by ced and dinstinct from cinc , was introduced. However, it was also proved that the equality cinc = ced holds when one of the target observables is discrete and sharp. Now, in the present paper, only sharp target observables are involved; although the argument of [2] can not be extended to the continuous setting, the optimal approximating joint observables we found in Theorems 17.(i) and 21.(i) actually are sequential measurements. Indeed, the optimal bi-observable in Theorem 17.(i) is one of the POVMs described in Examples 2 and 3 (see (74)); all these bi-observables have a (trivial) sequential implementation in terms of an unsharp measurement of Qu followed by sharp Pv . On the other hand, in the vector case, it was shown in [29, Corollary 1] that all covariant phase-space observables can be obtained as a sequential measurement of an unsharp version of the position Q followed by the sharp measurement of the momentum P. Therefore, cinc = ced also for target position and momentum observables, in both the scalar and vector case. 30 References [1] Barchielli, A., Gregoratti, M.: Quantum Trajectories and Measurements in Continuous Time: The Diffusive Case, Lect. Notes Phys. 782, Springer, Berlin & Heidelberg, 2009. [2] Barchielli, A., Gregoratti, M., Toigo, A.: Measurement uncertainty relations for discrete observables: Relative entropy formulation, (2016) arXiv:1608.01986. [3] Barchielli, A., Lupieri, G.: Quantum stochastic calculus, operation valued stochastic processes and continual measurements in quantum mechanics, J. Math. Phys. 26 (1985) 2222–2230. [4] Barchielli, A., Holevo, A.S., Lupieri, G.: An analogue of Hunt’s representation theorem in quantum probability, J. Theor. Probab. 6 (1993) 231–265. [5] Barchielli, A., Lupieri, G.: A quantum analogue of Hunt’s representation theorem for the generator of convolution semigroups on Lie groups, Probab. Theory Rel. Fields 88 (1991) 167–194. [6] Barchielli, A., Lupieri, G.: Instrumental processes, entropies, information in quantum continual measurements, Quantum Information and Computation 4 (2004) 437–449. [7] Barchielli, A., Lupieri, G.: Instruments and channels in quantum information theory, Optics and Spectroscopy 99 (2005) 425–432. [8] Barchielli, A., Lupieri, G.: Quantum measurements and entropic bounds on information transmission, Quantum Information and Computation 6 (2006) 16–45. [9] Barchielli, A., Lupieri, G.: Instruments and mutual entropies in quantum information, Banach Center Publ. 73 (2006) 65–80. [10] Barchielli, A., Lupieri, G.: Entropic bounds and continual measurements. In Quantum Probability and Infinite Dimensional Analysis, QP-PQ: Quantum Probability and White Noise Analysis Vol. 20; Accardi L., Freudenberg W., Schürmann, M. (Eds.); World Scientific, Singapore, 2007; pp. 79–89. [11] Barchielli, A., Lupieri, G.: Information gain in quantum continual measurements. In Quantum Stochastic and Information; Belavkin, V.P., Guţǎ, M. (Eds.); World Scientific, Singapore, 2008; pp. 325–345. [12] Beckner, W.: Inequalities in Fourier analysis, Ann. Math. 102 (1975) 159–182. [13] Bhatia, R.: Matrix Analysis, Springer, New York, 1997. [14] Białynicki-Birula, I., Mycielski, J.: Uncertainty relations for information entropy in wave machanics, Commun. Math. Phys. 44 (1975) 129–132. [15] Billingsley, P.: Probability and Measure, second edition, Wiley, New York, 1986. [16] Braunstein, S.L., van Loock, P.: Quantum information with continuous variables, Rev. Mod. Phys. 77 (2005) 513–577. [17] Burnham, K.P., Anderson, D.R.: Model Selection and Multimodel Inference - A Practical Information-Theoretic Approach, Springer-Verlag, New York, 2002. [18] Buscemi, F., Das, S., Wilde, M.M.: Approximate reversibility in the context of entropy gain, information gain, and complete positivity, Phys Rev A 93 (2016) 062314. [19] Buscemi, F., Hall, M.J.W., Ozawa, M., Wilde, M.M.: Noise and disturbance in quantum measurements: an information-theoretic approach, Phys. Rev. Lett. 112 (2014) 050401. [20] Busch, P., Grabowski, M., Lahti, P.: Operational Quantum Physics, Springer, Berlin, 1997. 31 [21] Busch, P., Heinonen, T., Lahti, P.: Heisenberg’s Uncertainty Principle, Physics Reports 452 (2007) 155–176. [22] Busch, P., Heinosaari, T., Schultz, J., Stevens, N.: Comparing the degrees of incompatibility inherent in probabilistic physical theories, Europhys. Lett. 103 (2013) 10002. [23] Busch, P., Lahti, P., Pellonpää, J.-P., Ylinen, K.: Quantum Measurement, Springer, Berlin, 2016. [24] Busch, P., Lahti, P., Werner, R.: Proof of Heisenberg’s error-disturbance relation, Phys. Rev. Lett. 111 (2013) 160405. [25] Busch, P., Lahti, P., Werner, R.: Measurement uncertainty relations, J. Math. Phys. 55 (2014) 042111. [26] Busch, P., Lahti, P., Werner, R.: Quantum root-mean-square error and measurement uncertainty relations, Rev. Mod. Phys. 86 (2014) 1261–1281. [27] Carlen, E.: Trace Inequalities and Quantum Entropy: An Introductory Course, Contemporary Mathematics, 2010 [28] Carmeli, C., Heinonen, T., Toigo, A.: Position and momentum observables on R and on R3 , J. Math. Phys. 45 (2004) 2526–2539. [29] Carmeli, C., Heinonen, T., Toigo, A.: Sequential measurements of conjugate observables, J. Phys. A: Math. Theor. 44 (2011) 285304. [30] Cassinelli, G., De Vito, E., Toigo, A.: Positive operator valued measures covariant with respect to an irreducible representation, J. Math. Phys. 44 (2003) 4768–4775. [31] Coles, P.J., Berta, M., Tomamichel, M., Whener, S.: Entropic uncertainty relations and their applications, Rev. Mod. Phys. 89 (2017) 015002. [32] Coles, P.J., Furrer, F.: State-dependent approach to entropic measurement-disturbance relations, Phys. Lett. A 379 (2015) 105–112. [33] Cover, T.M., Thomas, J.A.: Elements of Information Theory, second edition, Wiley, Hoboken, New Jersey, 2006. [34] Davies, E.B.: Quantum Theory of Open Systems, Academic, London, 1976. [35] Gibilisco, P., Isola, T.: On a refinement of Heisenberg uncertainty relation by means of quantum Fisher information, J. Math. Anal. Appl. 375 (2011) 270–275. [36] Heinosaari, T., Kiukas, J., Schultz, J.: Breaking Gaussian incompatibility on continuous variable quantum systems, J. Math. Phys. 56 (2015) 082202. [37] Heinosaari, T., Miyadera, T., Ziman, M.: An invitation to quantum incompatibility, J. Phys. A: Math. Theor. 49 (2016) 123001. [38] Heinosaari, T., Schultz, J., Toigo, A., Ziman, M.: Maximally incompatible quantum observables, Phys. Lett. A 378 (2014) 1695–1699. [39] Heinosaari, T., Ziman, M.: The mathematical language of quantum theory: From uncertainty to entanglement, Cambridge University Press, Cambridge, 2012. [40] Heisenberg, W.: Über den anschaulichen Inhalt der quantentheoretischen Kinematik und Mechanik, Zeitschr. Phys. 43 (1927) 172–198. [41] Hirschman, I.I.: A note on entropy, Amer. J. Math. 79 (1957) 152–156. [42] Holevo, A.S.: Investigations in the General Theory of Statistical Decisions, Proceedings Of the Steklov Institute of Mathematics 3 (1978) 32 [43] Holevo, A.S.: Infinitely divisible measurements in quantum probability theory, Theory Probab. Appl. 31 1986 493–497. [44] Holevo, A.S.: Statistical Structure of Quantum Theory, Lecture Notes in Physics m 67; Springer, Berlin, 2001. [45] Holevo, A.S.: Probabilistic and Statistical Aspects of Quantum Theory, Quaderni della Normale; Edizioni della Normale, Pisa, 2011. [46] Holevo, A.S.: Quantum Systems, Channels, Information, de Gruiter, Berlin, 2012. [47] Horn, R.A., Zhang, F.: Basic Properties of the Schur Complement. In The Schur Complement and Its Applications, Zhang, F. (Ed.), Numerical Methods and Algorithms, 4, Springer, Berlin, 2005, pp. 17–46. [48] Kiukas, J., Lahti, P., Ylinen, K.: Normal covariant quantization maps, J. Math. Anal. Appl. 319 (2006) 783–801. [49] Kiukas, J., Schultz, J.: Informationally complete sets of Gaussian measurements, J. Phys. A: Math Theor. 46 (2013) 485303. [50] Maassen, H., Uffink, J.B.M.: Generalized entropic uncertainty relations, Phys. Rev. Lett. 60 (1988) 1103–1106. [51] Maccone, L.: Entropic information-disturbance tradeoff, EPL 77 (2007) 40002. [52] Ohya, M., Petz, D.: Quantum entropy and its use, Springer, Berlin, 1993. [53] Ozawa, M.: Position measuring interactions and the Heisenberg uncertainty principle, Phys. Lett. A 299 (2002) 1–7. [54] Ozawa, M.: Physical content of Heisenberg’s uncertainty relation: limitation and reformulation, Phys. Lett. A 318 (2003) 21–29. [55] Ozawa, M.: Universally valid reformulation of the Heisenberg uncertainty principle on noise and disturbance in measurement, Phys. Rev. A 67 (2003) 042105. [56] Ozawa, M.: Heisenberg’s original derivation of the uncertainty principle and its universally valid reformulations, Current Sci. 109 (2015) 2006–2016. [57] Petz, D.: Quantum Information Theory and Quantum Statistics, Springer, Berlin, 2008. [58] Robertson, H.: The uncertainty principle, Phys. Rev. 34 (1929) 163–164. [59] Simon, R., Mukunda, N., Dutta, B.: Quantum-noise matrix for multimode systems: U (n) invariance, squeezing, and normal forms, Phys. Rev. A 49 (1994) 1567–1583. [60] Simon, R., Sudarshan, E.C.G., Mukunda, N.: Gaussian-Wigner distributions in quantum mechanics and optics, Phys. Rev. A 36 (1987) 3868–3880. [61] Topsøe, F.: Basic concepts, identities and inequalities — the toolkit of Information Theory, Entropy 3 (2001) 162–190. [62] Weedbrook, C., Pirandola, S., Garcı́a-Patrón, R., Cerf, N.J., Ralph, T.C., Shapiro, J.H., Lloyd, S.: Gaussian quantum information, Rev. Mod. Phys. 84 (2012) 621–669. [63] Wehner, S., Winter, A.: Entropic uncertainty relations — a survey, New J. Phys. 12 (2010) 025009. [64] Werner, R.F.: Quantum harmonic analysis on phase spaces, J. Math. Phys. 25 (1983) 1404–1411. [65] Werner, R.F.: The uncertainty relation for joint measurement of position and momentum, Quantum Information and Computation 4 (2004) 546–562. [66] Werner, R.F.: Uncertainty relations for general phase spaces, Front. Phys. 11 (2016) 110305. 33
7cs.IT
arXiv:1404.1041v1 [math.AG] 3 Apr 2014 Blowups and Resolution Herwig Hauser To the memory of Sheeram Abhyankar, with great respect. This manuscript originates from a series of lectures the author1 gave at the Clay Summer School on Resolution of Singularities at Obergurgl in the Tyrolean Alps in June 2012. A hundred young and ambitious students gathered for four weeks to hear and learn about resolution of singularities. Their interest and dedication became essential for the success of the school. The reader of this article is ideally an algebraist or geometer having a rudimentary acquaintance with the main results and techniques in resolution of singularities. The purpose is to provide quick and concrete information about specific topics in the field. As such, the article is modelled like a dictionary and not particularly suited to be read from the beginning to the end (except for those who like to read dictionaries). To facilitate the understanding of selected portions of the text without reading the whole earlier material, a certain repetition of definitions and assertions has been accepted. Background information on the historic development and the motivation behind the various constructions can be found in the cited literature, especially in [Obe00, Hau03, Hau10a, FH10, Cut04, Kol07, Lip75]. Complete proofs of several more technical results appear in [EH02]. All statements are formulated for algebraic varieties and morphism between them. They are mostly also valid, with the appropriate modifications, for schemes. In certain cases, the respective statements for schemes are indicated separately. Each chapter concludes with a broad selection of examples, ranging from computational exercises to suggestions for additional material which could not be covered in the text. Some more challenging problems are marked with a superscript + . The examples should be especially useful for people planning to give a graduate course on the resolution of singularities. Occasionally the examples repeat or specialize statements which have appeared in the text and which are worth to be done personally before looking at the given proof. In the appendix, hints and answers to a selection of examples marked by a superscript . are given. Several results appear without proof, due to lack of time and energy of the author. Precise references are given whenever possible. The various survey articles contain complementary bibliography. 1 Supported in part by the Austrian Science Fund FWF within the projects P-21461 and P-25652. 1 2 HERWIG HAUSER The Clay Mathematics Institute chose resolution of singularities as the topic of the 2012 summer school. It has been a particular pleasure to cooperate in this endeavour with its research director David Ellwood, whose enthusiasm and interpretation of the school largely coincided with the approach of the organizers, thus creating a wonderful working atmosphere. His sensitiveness of how to plan and realize the event has been exceptional. The CMI director Jim Carlson and the CMI secretary Julie Feskoe supported very efficiently the preparation and realization of the school. Xudong Zheng provided a preliminary write-up of the lectures, Stefan Perlega and Eleonore Faber completed several missing details in preliminary drafts of the manuscript. Faber also produced the two visualizations. The discussion of the examples in the appendix was worked out by Perlega and Valerie Roitner. Anonymous referees helped substantially with their remarks and criticism to eliminate deficiencies of the exposition. Barbara Beeton from the AMS took care of the TeX-layout. All this was very helpful. Contents 1. Lecture I: A First Example of Resolution 2. Lecture II: Varieties and Schemes 3. Lecture III: Singularities 4. Lecture IV: Blowups 5. Lecture V: Properties of Blowup 6. Lecture VI: Transforms of Ideals and Varieties under Blowup 7. Lecture VII: Resolution Statements 8. Lecture VIII: Invariants of Singularities 9. Lecture IX: Hypersurfaces of Maximal Contact 10. Lecture X: Coefficient Ideals 11. Lecture XI: Resolution in Zero Characteristic 12. Lecture XII: Positive Characteristic Phenomena 13. Discussion of selected examples References 2 5 13 17 27 30 34 36 44 47 52 56 61 76 1. Lecture I: A First Example of Resolution Let X be the zeroset in affine three space A3 of the polynomial f = 27x2 y 3 z 2 + (x2 + y 3 − z 2 )3 over a field K of characteristic different from 2 and 3. This is an algebraic surface, called Camelia, with possibly singular points and curves, and certain symmetries. For instance, the origin 0 is singular on X, and X is symmetric with respect to the automorphisms of A3 given by replacing x by −x or z by −z, and also by replacing y by −y while interchanging x with z. Sending x, y and z to t3 x , t2 y and t3 z for t ∈ K also preserves X. See figure 1 for a plot of the real points of X. The intersections of X with the three coordinate hyperplanes of A3 are given as the zerosets of the equations BLOWUPS AND RESOLUTION 3 x = (y 3 − z 2 )3 = 0, y = (x2 − z 2 )3 = 0, z = (x2 + y 3 )3 = 0. These intersections are plane curves: two perpendicular cusps lying in the xy- and yz-plane, respectively the union of the two diagonals in the xz-plane. The singular locus Sing(X) of X is given as the zeroset of the partial derivatives of f inside X. This yields for Sing(X) the additional equations x · [9y 3 z 2 + (x2 + y 3 − z 2 )2 ] = 0, y 2 · [9x2 z 2 + (x2 + y 3 − z 2 )2 ] = 0, z · [9x2 y 3 − (x2 + y 3 − z 2 )2 ] = 0. Combining these equations with f = 0, it results that the singular locus of X has six irreducible components, defined respectively by x = y 3 − z 2 = 0, z = x2 + y 3 = 0, y = x + z = 0, y = x − z = 0, √ x − y 3 = x + −1 · z = 0, √ x2 − y 3 = x − −1 · z = 0. 2 The first four components of Sing(X) coincide with the four curves given by the three coordinate hyperplane sections of√X. The last two components are plane cusps in the hyperplanes given by x ± −1 · z = 0. At points a 6= 0 on the first two singular components of Sing(X), the intersections of X with a plane through a and transversal to the component are again cuspidal curves. Figure 1. The surface Camelia: 27x2 y 3 z 2 + (x2 + y 3 − z 2 )3 = 0. 4 HERWIG HAUSER Consider now the surface Y in A4 which is given as the cartesian product C ×C of the plane cusp C : x2 − y 3 = 0 in A2 with itself. It is defined by the equations x2 − y 3 = z 2 − w3 = 0. The singular locus Sing(Y ) is the union of the two cusps C1 = C × 0 and C2 = 0 × C defined by x2 − y 3 = z = w = 0, respectively x = y = z 2 − w3 = 0. The surface Y admits the parametrization γ : A2 → A4 , (s, t) 7→ (s3 , s2 , t3 , t2 ). The image of γ is Y . The composition of γ with the linear projection π : A4 → A3 , (x, y, z, w) 7→ (x, −y + w, z) yields the map δ = π ◦ γ : A2 → A3 , (s, t) 7→ (s3 , −s2 + t2 , t3 ). Replacing in the polynomial f of X the variables x, y, z by s3 , −s2 + t2 , t3 gives 0. This shows that the image of δ lies in X. As X is irreducible of dimension 2 and δ has rank 2 outside 0 the image of δ is dense in (and actually equal to) X. Therefore the image of Y under π is dense in X: This interprets X as a contraction of Y by means of the projection π from A4 to A3 . The two surfaces X and Y are not isomorphic because, for instance, their singular loci have a different number of components. The simple geometry of Y as a cartesian product of two plane curves is scrambled up when projecting it down to X. The point blowup of Y in the origin produces a surface Y1 whose singular locus has two components. They map to the two components C1 and C2 of Sing(Y ) and are regular and transversal to each other. The blowup X1 of X at 0 will still be the image of Y1 under a suitable projection. The four singular components of Sing(X) will become regular in X1 and will either meet pairwise transversally or not at all. The two regular components of Sing(X) will remain regular in X1 but will no longer meet each other, cf. figure 2. Figure 2. The surface X1 obtained from Camelia by a point blowup. The point blowup of Y1 in the intersection point of the two curves of Sing(Y1 ) separates the two curves and yields a surface Y2 whose singular locus consists of two disjoint regular curves. Blowing up these separately yields a regular surface Y3 and thus resolves the singularities of Y . The resolution of the singularities of X is more complicated, see the examples below. BLOWUPS AND RESOLUTION 5 Examples Example 1.1. . Show that the surface X defined in A3 by 27x2 y 3 z 2 + (x2 + y − z 2 )3 = 0 is the image of the cartesian product Y of the cusp C : x3 − y 2 = 0 with itself under the projection from A4 to A3 given by (x, y, z, w) 7→ (x, −y + w, z). 3 Example 1.2. . Find additional symmetries of X aside from those mentioned in the text. Example 1.3. . Produce a real visualization of the surface obtained from √ Camelia by replacing in the equation z by −1 · z. Determine the components of the singular locus. Example 1.4. . Consider at the point a = (0, 1, 1) of X the plane P : 2y +3z = 5 through a. It is transversal to the component of the singular locus of X passing through a (i.e., this component is regular at a and its tangent line at a does not lie in P ). Determine the singularity of X ∩ P at a. The normal vector (0, 2, 3) to P is the tangent vector at t = 1 of the parametrization (0, t2 , t3 ) of the component of Sing(X) defined by x = y 3 − z 2 . √ Example 1.5. The point a on X with coordinates (1, 1, −1) is a singular point of X, and a non-singular point of the curve of Sing(X) passing through it. A plane transversal to Sing(X) at a is given e.g. by √ P : 3x + 2y + 3 −1 · z = 9. √ Determine the singularity of X ∩ P at a. The normal vector (3, 2, 3 −1) to P is √ the tangent vector at s = 1 of the parametrization (s3 , s2 , −1 · s3 ) of the curve of √ 2 3 Sing(X) through a defined by x − y = x − −1 · z = 0. Example 1.6. . Blow up X and Y in the origin, describe exactly the geometry of the transforms X1 and Y1 and produce visualizations of X and X1 over R in all coordinate charts. For Y1 the equations are in the x-chart 1 − xy 3 = z 3 x − w2 = 0 and in the y-chart x2 − y = z 3 y − w2 = 0. Example 1.7. Blow up X1 and Y1 along their singular loci. Compute a resolution of X1 and compare it with the resolution of Y1 . 2. Lecture II: Varieties and Schemes The following summary of basic concepts of algebraic geometry shall clarify the terminology used in later sections. Detailed definitions are available in [Mum99, Sha94, Har77, EH00, Liu02, Kem11, GW10, Gro61, ZS75, Nag75, Mat89, AM69]. Varieties Definition 2.1. Write An = AnK for the affine n-space over some field K. The points of An are identified with n-tuples a = (a1 , . . . , an ) of elements ai of K. The space An is equipped with the Zariski topology: the closed sets are the algebraic subsets of An , i.e., the zerosets V (I) = {a ∈ An , f (a) = 0 for all f ∈ I} of ideals I of K[x1 , . . . , xn ]. To An one associates its coordinate ring, given as the polynomial ring K[An ] = K[x1 , . . . , xn ] in n variables over K. 6 HERWIG HAUSER Definition 2.2. A polynomial map f : An → Am between affine spaces is given by a vector f = (f1 , . . . , fm ) of polynomials fi = fi (x) ∈ K[x1 , . . . , xn ]. It induces a K-algebra homomorphism f ∗ : K[y1 , . . . , ym ] → K[x1 , . . . , xn ] sending yi to fi and a polynomial h = h(y) to h ◦ f = h(f (x)). A rational map f : An → Am is given by a vector f = (f1 , . . . , fm ) of elements fi ∈ K(x1 , . . . , xn ) = Quot(K[x1 , . . . , xn ]) in the quotient field of K[x1 , . . . , xn ]. Albeit the terminology, a rational map need not define a set-theoretic map on whole affine space An . It does this only on the open subset U which is the complement of the union of the zerosets of the denominators of the elements fi . The induced map f|U : U → Am is then called a regular map on U . Definition 2.3. An affine (algebraic) variety X is a subset of an affine space An which is defined as the zeroset V (I) of a radical ideal I of K[x1 , . . . , xn ] and equipped with the topology induced by the Zariski topology of An . It is thus a closed subset of An . In this text, the ideal I need not be prime, hence X is not required to be irreducible. The ideal IX of K[x1 , . . . , xn ] of all polynomials f vanishing on X is the largest ideal such that X = V (IX ). If the field K is algebraically closed and X = V (I) is defined by the radical ideal I, the ideal IX coincides with I by Hilbert’s Nullstellensatz. The (affine) coordinate ring of X is the factor ring K[X] = K[x1 , . . . , xn ]/IX . As IX is radical, K[X] is reduced, i.e., has no nilpotent elements. If X is irreducible, I is a prime ideal and K[X] is an integral domain. To each point a = (a1 , . . . , an ) of X one associates the maximal ideal mX,a of K[X] generated by the residue classes of the polynomials x1 − a1 , . . . , xn − an . If the field K is algebraically closed, this defines, by Hilbert’s Nullstellensatz, a bijection of the points of X and the maximal ideals of K[X]. The function field of an irreducible variety X is the quotient field K(X) = Quot(K[X]). The local ring of an affine variety X at a point a is the localization OX,a = K[X]mX,a of K[X] at the maximal ideal mX,a of K[X] associated to a in X. It is isomorphic to the factor ring OAn ,a /Ia of the local ring OAn ,a of An at a by the ideal Ia generated by the ideal I defining X in OAn ,a . If Z ⊂ X is an irreducible subvariety defined by the prime ideal pZ , the local ring OX,Z of OX along Z is defined as the localization K[X]pZ . The local ring OX,a gives rise to the germ (X, a) of X at a, see below. By abuse of notation, the (unique) maximal ideal mX,a · OX,a of OX,a is also denoted by mX,a . The factor ring κa = OX,a /mX,a is called the residue field of X at a. Definition 2.4. A principal open subset of an affine variety X is the complement in X of the zeroset V (g) of a single non-zero divisor g of K[X]. Principal open subsets are thus dense in X. They form a basis of the Zariski-topology. A quasi-affine variety is an open subset of an affine variety. A (closed) subvariety of an affine variety X is a subset Y of X which is defined as the zeroset Y = V (J) of an ideal J of K[X]. It is thus a closed subset of X. Definition 2.5. Write Pn = PnK for the projective n-space over some field K. The points of Pn are identified with equivalence classes of (n + 1)-tuples a = (a0 , . . . , an ) of elements ai of K, where a ∼ b if a = λ·b for some non-zero λ ∈ K. Points are given by their projective coordinates (a0 : . . . : an ), with ai ∈ K and not all zero. Projective space Pn is equipped with the Zariski topology whose closed sets BLOWUPS AND RESOLUTION 7 are the algebraic subsets of Pn , i.e., the zerosets V (I) = {a ∈ Pn , f (a0 , . . . , an ) = 0 for all f ∈ I} of homogeneous ideals I of K[x0 , . . . , xn ] different from the ideal generated by x0 , . . . , xn . As I is generated by homogeneous polynomials, the definition of V (I) does not depend on the choice of the affine representatives (a0 , . . . , an ) ∈ An+1 of the points a. Projective space is covered by the affine open subsets Ui ' An formed by the points whose i-th projective coordinate does not vanish (i = 0, . . . , n). The homogeneous coordinate ring of Pn is the graded polynomial ring K[Pn ] = K[x0 , . . . , xn ] in n + 1 variables over K, the grading being given by the degree. Definition 2.6. A projective algebraic variety X is a subset of projective space Pn defined as the zeroset V (I) of a homogeneous radical ideal I of K[x0 , . . . , xn ] and equipped with the topology induced by the Zariski topology of Pn . It is thus a closed algebraic subset of Pn . The ideal IX of K[x0 , . . . , xn ] of all homogeneous polynomials f which vanish at all (affine representatives of) points of X is the largest ideal such that X = V (IX ). If the field K is algebraically closed and X = V (I) is defined by the radical ideal I, the ideal IX coincides with I by Hilbert’s Nullstellensatz. The homogeneous coordinate ring of X is the graded factor ring K[X] = K[x0 , . . . , xn ]/IX equipped with the grading given by degree. Definition 2.7. A principal open subset of a projective variety X is the complement of the zeroset V (g) of a single homogeneous non-zero divisor g of K[X]. A quasi-projective variety is an open subset of a projective variety. A (closed) subvariety of a projective variety X is a subset Y of X which is defined as the zeroset Y = V (J) of a homogeneous ideal J of K[X]. It is thus a closed algebraic subset of X. Remark 2.8. Abstract algebraic varieties are obtained by gluing affine algebraic varieties along principal open subsets, cf. [Mum99] I, §3, §4, [Sha94] V, §3. This allows to develop the category of algebraic varieties with the usual constructions therein. All subsequent definitions could be formulated for abstract algebraic varieties, but will only be developed in the affine or quasi-affine case to keep things simple. Definition 2.9. Let X and Y be two affine or quasi-affine algebraic varieties X ⊂ An and Y ⊂ Am . A regular map or (regular) morphism from X to Y is a map f : X → Am sending X into Y with components rational functions fi ∈ K(x1 , . . . , xn ) whose denominators do not vanish on X. If X and Y are affine varieties, a morphism induces a K-algebra homomorphism f ∗ : K[Y ] → K[X] between the coordinate rings, which, in turn, determines f . Over algebraically closed fields, a morphism between affine varieties is the restriction to X of a polynomial map f : An → Am sending X into Y , i.e., such that f ∗ (IY ) ⊂ IX , [Har77], chap. I, Thm. 3.2, p. 17. Definition 2.10. A rational map f : X → Y between affine varieties is a morphism f : U → Y on some dense open subset U of X. One then says that f is defined on U . Albeit the terminology, it need not induce a set-theoretic map on whole X. For irreducible varieties, a rational map is given by a K-algebra homomorphism αf : K(Y ) → K(X) of the function fields. A birational map f : X → Y is a regular map f : U → Y on some dense open subset U of X such that V = f (U ) is open in Y and such that f|U : U → V is a regular isomorphism, i.e., 8 HERWIG HAUSER admits an inverse morphism. In this case U and V are called biregularly isomorphic, and X and Y are birationally isomorphic. For irreducible varieties, a birational map is given by an isomorphism αf : K(Y ) → K(X) of the function fields. A birational morphism f : X → Y is a birational map which is defined on whole X, i.e., a morphism f : X → Y which admits a rational inverse map defined on a dense open subset V of Y . Definition 2.11. A morphism f : X → Y between algebraic varieties is called separated if the diagonal ∆ ⊂ X ×Y X is closed in the fibre product X ×Y X = {(a, b) ∈ X × X, f (a) = f (b)}. A morphism f : X → Y between varieties is proper if it is separated and universally closed, i.e., if for any variety Z and morphism Z → Y the induced morphism g : X ×Y Z → Z is closed. Closed immersions and compositions of proper morphisms are proper. Definition 2.12. The germ of a variety X at a point a, denoted by (X, a), is the equivalence class of open neighbourhoods U of a in X where two neighbourhoods of a are said to be equivalent if they coincide on a (possibly smaller) neighbourhood of a. To a germ (X, a) one associates the local ring OX,a of X at a, i.e., the localization OX,a = K[X]mX,a of the coordinate ring K[X] of X at the maximal ideal mX,a of K[X] defining a in X. Definition 2.13. Let X and Y be two varieties, and let a and b be points of X and Y . The germ of a morphism f : (X, a) → (Y, b) at a is the equivalence class of a morphism fe : U → Y defined on an open neighbourhood U of a in X and sending a to b; here, two morphisms defined on neighbourhoods of a in X are said to be equivalent if they coincide on a (possibly smaller) neighbourhood of a. The morphism fe : U → Y is called a representative of f on U . Equivalently, the germ of a morphism is given by a local K-algebra homomorphism αf = f ∗ : OY,b → OX,a . Definition 2.14. The tangent space Ta X to a variety X at a point a is defined as the K-vector space 2 2 Ta X = (mX,a /mX,a )∗ = Hom(mX,a /mX,a , K) with mX,a ⊂ K[X] the maximal ideal of a. Equivalently, one may take the maximal ideal of the local ring OX,a . The tangent space of X at a thus only depends on the germ of X at a. The tangent map Ta f : Ta X → Tb Y of a morphism f : X → Y sending a point a ∈ X to b ∈ Y or of a germ f : (X, a) → (Y, b) is defined as the linear map induced naturally by f ∗ : OY,b → OX,a . Definition 2.15. The embedding dimension embdima X of a variety X at a point a is defined as the K-dimension of Ta X. Schemes Definition 2.16. An affine scheme X is a commutative ring R with 1, called the coordinate ring or ring of global sections of X. The set Spec(R), also denoted by X and called the spectrum of R, is defined as the set of prime ideals of R. Here, R does not count as a prime ideal, but 0 does if it is prime, i.e., if R is an integral domain. A point of X is an element of Spec(R). In this way, R is the underlying algebraic structure of an affine scheme, whereas X = Spec(R) is the associated geometric object. To be more precise, one would have to define X as the pair consisting of the coordinate ring R and the spectrum Spec(R). BLOWUPS AND RESOLUTION 9 The spectrum is equipped with the Zariski topology: the closed sets V (I) are formed by the prime ideals containing a given ideal I of R. It also comes with a sheaf of rings OX , the structure sheaf of X, whose stalks at points of X are the localizations of R at the respective prime ideals [Mum99, Har77, Sha94]. For affine schemes, the sheaf OX is completely determined by the ring R. In particular, to define affine schemes it is not mandatory to introduce sheaves or locally ringed spaces. An affine scheme is of finite type over some field K if its coordinate ring R is a finitely generated K-algebra, i.e., a factor ring K[x1 , . . . , xn ]/I of a polynomial ring by some ideal I. If I is radical, the scheme is called reduced. Over algebraically closed fields, affine varieties can be identified with reduced affine schemes of finite type over K [Har77], chap. II, Prop. 2.6, p. 78. Definition 2.17. As a scheme, affine n-space over some field K is defined as the scheme An = AnK given by the polynomial ring K[x1 , . . . , xn ] over K in n variables. Its underlying topological space An = Spec(K[x1 , . . . , xn ]) consists of the prime ideals of K[x1 , . . . , xn ]. The points of An when considered as a scheme therefore correspond to the irreducible subvarieties of An when considered as an affine variety. A point is closed if the respective prime ideal is a maximal ideal. Over algebraically closed fields, the closed points of An as a scheme correspond, by Hilbert’s Nullstellensatz, to the points of An as a variety. Definition 2.18. Let X be an affine scheme of coordinate ring R. A closed subscheme Y of X is a factor ring S = R/I of R by some ideal I of R, together with the canonical homomorphism R → R/I. The set Y = Spec(R/I) of prime ideals of R/I can be identified with the closed subset V (I) of X = Spec(R) of prime ideals of R containing I. The homomorphism R → R/I induces an injective continuous map Y → X between the underlying topological spaces. In this way, the Zariski topology of Y as a scheme coincides with the topology induced by the Zariski topology of X. A point a of X is a prime ideal I of R, considered as an element of Spec(R). To a point one may associate a closed subscheme of X via the spectrum of the factor ring R/I. The point a is called closed if I is a maximal ideal of R. A principal open subset of X is an affine scheme U defined by the ring of fractions Rg of R with respect to the multiplicatively closed set {1, g, g 2 , . . .} for some non-zero divisor g ∈ R. The natural ring homomorphism R → Rg sending h to h/1 interprets U = Spec(Rg ) as an open subset of X = Spec(R). Principal open subsets form a basis of the Zariski topology of X. Arbitary open subsets of X need not admit an interpretation as affine schemes. Remark 2.19. Abstract schemes are obtained by gluing affine schemes along principal open subsets [Mum99] II, §1, §2, [Har77] II.2, [Sha94] V, §3. Here, two principal open subsets will be identified or patched together if their respective coordinate rings are isomorphic. This works out properly because the passage from a ring R to its ring of fractions Rg satisfies two key algebraic properties: An element h of R is determined by its images in Rg , for all g, and, given elements hg in the rings Rg whose images in Rgg0 coincide for all g and g 0 , there exists an element h in R with image hg in Rg , for all g. This allows in particular to equip arbitrary open subsets of (affine) schemes X with a natural structure of a scheme, which will then be called open subscheme of X. 10 HERWIG HAUSER The gluing of affine schemes along principal open sets can also be formulated on the sheaf-theoretic level, even though, again, this is not mandatory. For local considerations, one can mostly restrict to the case of affine schemes. Definition 2.20. A morphism f : X → Y between affine schemes X = Spec(R) and Y = Spec(S) is a (unitary) ring homomorphism α = αf : S → R. It induces a continuous map Spec(R) → Spec(S) between the underlying topological spaces by sending a prime ideal I of R to the prime ideal α−1 (I) of S. Morphisms between arbitary schemes are defined by choosing coverings by affine schemes and defining the morphism locally subject to the obvious conditions on the overlaps of the patches. A rational map f : X → Y between schemes is a morphism f : U → Y defined on a dense open subscheme U of X. It need not be defined on whole X. A rational map is birational if the morphism f : U → Y admits on a dense open subscheme V of Y an inverse morphism V → U , i.e., if f|U : U → V is an isomorphism. A birational morphism f : X → Y is a morphism f : X → Y which is also a birational map, i.e., induces an isomorphism U → V of dense open subschemes. In contrast to birational maps, a birational morphism is defined on whole X, while its inverse map is only defined on a dense open subset of Y . L∞ Definition 2.21. Let R = i=0 Ri be a graded ring. The set X = Proj(R) of homogeneous prime ideals of R not containing the irrelevant ideal M = ⊕∞ i≥1 Ri is equipped with a topology, the Zariski topology, and with a sheaf of rings OX , the structure sheaf of X [Mum99, Har77, Sha94]. It thus becomes a scheme. Typically, R is generated as an R0 -algebra by the homogeneous elements g ∈ R1 of degree 1. An open covering of X is then given by the affine schemes Xg = Spec(Rg◦ ), where Rg◦ denotes, for any non-zero divisor g ∈ R1 , the subring of elements of degree 0 in the ring of fractions Rg . Remark 2.22. A graded ring homomorphism S → R induces a morphism of schemes Proj(R) → Proj(S). Definition 2.23. Equip the polynomial ring K[x0 , . . . , xn ] with the natural grading given by the degree. The scheme Proj(K[x0 , . . . , xn ]) is called n-dimensional projective space over K, denoted by Pn = PnK . It is is covered by the affine open subschemes Ui ' An which are defined through the principal open sets associated to the rings of fractions K[x0 , . . . , xn ]xi (i = 0, . . . , n). Definition 2.24. A morphism f : X → Y is called projective if it factors, for some k, into a closed embedding X ,→ Y ×Pk followed by the projection Y ×Pk → Y onto the first factor [Har77] II.4, p. 103. Formal germs Definition 2.25. Let R be a ring and I an ideal of R. The powers I k of I induce natural homomorphisms R/I k+1 → R/I k . The I-adic completion of R is b = lim R/I k , together with the canonical homomorphism R → R. b the inverse limit R ←− b If R is a local ring with maximal ideal m, the m-adic completion R is called the c of M completion of R. For an R-module M , one defines the I-adic completion M c = lim M/I k · M . as the inverse limit M ←− Lemma 2.26. Let R be a noetherian ring with prime ideal I and I-adic comb pletion R. BLOWUPS AND RESOLUTION 11 b then Jb = J · R b (1) If J is another ideal of R with (I ∩ J)-adic completion J, d ' R/ b J. b and R/J c1 · J c2 . (2) If J1 , J2 are two ideals of R and J = J1 · J2 , then Jb = J b is a noetherian (3) If R is a local ring with maximal ideal m, the completion R b local ring with maximal ideal m b = m · R, and m b ∩ R = m. T (4) If J is an arbitrary ideal of a local ring R, then Jb ∩ R = i≥0 (J + m i ). (5) Passing to the I-adic completion defines an exact functor on finitely generated R-modules. b is a faithfully flat R-algebra. (6) R c = M ⊗R R. b (7) If M a finitely generated R-module, then M Proof. (1) By [ZS75] VIII, Thm. 6, Cor. 2, p. 258, it suffices toTverify that J is closed in the (I ∩ J)-adic topology. The closure J of J equals J = i≥0 (J + (I ∩ J)i ) = J by [ZS75] VIII, Lemma 1, p. 253. b = J1 · R b · J2 · R b = Jb1 · Jb2 . (2) By definition, Jb = J1 · J2 · R b (3), (4) The ring R is noetherian and local by [AM69] Prop. 10.26, p. 113, and Prop. 10.16, p. 109. The ideal Ib∩R equals the closure I of I in the m-adic topology. T Thus, Ib ∩ R = i≥0 (I + m i ) and m b ∩ R = m. (5) – (7) [AM69] Prop. 10.12, p. 108, Prop. 10.14, p. 109, Prop. 10.14, p. 109, and [Mat89], Thm. 8.14, p. 62.  Definition 2.27. Let X be a variety and let a be a point of X. The local ring OX,a of X at a is equipped with the mX,a -adic topology whose basis of neighk bourhoods of 0 is given by the powers mX,a of the maximal ideal mX,a of OX,a . bX,a of OX,a is called the complete local ring of X at a The induced completion O bX,a is called the formal [Nag75] II, [ZS75] VIII, §1, §2. The scheme defined by O b a). If X = An is the affine neighbourhood or formal germ of X at a, denoted by (X, K bAn ,a is isomorphic as a local K-algebra to n-space over K, the complete local ring O the formal power series ring K[[x1 , . . . , xn ]] in n variables over K. The natural ring bX,a defines a morphism (X, b a) → (X, a) in the category homomorphism OX,a → O of schemes from the formal neighbourhood to the germ of X at a. A formal subvab a), also called a formal local subvariety of X at a, is (the scheme riety (Yb , a) of (X, bX,a /I for an ideal I of O bX,a . defined by) a factor ring O 2 2 b a) of the As mX,a /mX,a ' m b X,a /m b X,a , one defines the tangent space Ta (X, formal germ as the tangent space Ta (X) of the variety at a. b a) → (Yb , b) between two formal germs is defined as a local A map f : (X, bY,b → O bX,a . It is also called a formal map between algebra homomorphism αf : O X and Y at a. It induces in a natural way a linear map, the tangent map, Ta f : Ta X → Tb Y between the tangent spaces. Two varieties X and Y are formally isomorphic at points a ∈ X, respectively bX,a and O bY,b are isomorphic. If X ⊂ An and b ∈ Y , if the complete local rings O n Y ⊂ A are subvarieties of the same affine space An over K, and a = b = 0, this is equivalent to saying that there is a local algebra automorphism of OAn ,0 ' K[[x1 , . . . , xn ]] sending the completed ideals Ib and Jb of X and Y onto each other. Such an automorphism is also called a formal coordinate change of An at 0. It is given by a vector of n formal power series without constant term whose Jacobian matrix of partial derivatives is invertible when evaluated at 0. 12 HERWIG HAUSER Remark 2.28. The inverse function theorem does not hold for algebraic varieties and regular maps between them, but it holds in the category of formal germs b a) → (Yb , b) is an isomorphism if and only and formal maps: A formal map f : (X, if its tangent map Ta f : Ta X → Tb Y is a linear isomorphism. Definition 2.29. A morphism f : X → Y between varieties is called étale b a) → (Yb , f (a)) are if for all a ∈ X the induced maps of formal germs f : (X, isomorphisms, or, equivalently, if all tangent maps Ta f of f are isomorphisms, [Har77], chap. III, ex. 10.3 and 10.4, p. 275. Definition 2.30. A morphism f : X → Y between varieties is called smooth b a) → (Yb , f (a)) are if for all a ∈ X the induced maps of formal germs f : (X, submersions, i.e., if the tangent maps Ta f of f are surjective, [Har77], chap. III, Prop. 10.4, p. 270. Remark 2.31. The category of formal germs and formal maps admits the usual concepts and constructions as e.g. the decomposition of a variety in irreducible components, intersections of germs, inverse images, or fibre products. Similarly, when working of R, C or any complete valued field K, one can develop, based on rings of convergent power series, the category of analytic varieties and analytic spaces, respectively of their germs, and analytic maps between them [dJP00]. Examples Example 2.32. Compare the algebraic varieties X satisfying (X, a) ' (Ad , 0) for all points a ∈ X (where ' stands for biregularly isomorphic germs) with those b d , 0). Varieties with the first b a) ' (A where the isomorphism is just formal, (X, property are called plain, cf. def. 3.11. Example 2.33. It can be shown that any complex regular (def. 3.4) and rational surface (i.e., a surface which is birationally isomorphic to the affine plane A2 over C) is plain, [BHSV08] Prop. 3.2. Show directly that X defined in A3 by x−(x2 +z 2 )y = 0 is plain by exhibiting a local isomorphism (i.e., isomorphism of germs) of X at 0 with A2 at 0. Is there an algorithm to construct such a local isomorphism for any complex regular and rational surface? Example 2.34. . Let X be an algebraic variety and a ∈ X be a point. What is the difference between the concept of regular system of parameters (def. 3.2) in bX,a ? OX,a and O b n , a) of affine space An at a Example 2.35. The formal neighbourhood (A bAn ,a ' K[[x1 − point a = (a1 , . . . , an ) is given by the formal power series ring O n a1 , . . . , xn − an ]]. If X ⊂ A is an affine algebraic variety defined by the ideal b a) is given by the factor ring I of K[x1 , . . . , xn ], the formal neighbourhood (X, bX,a = O bAn ,a /Ib ' K[[x1 − a1 , . . . , xn − an ]]/I, b where Ib = I · O bAn ,a denotes the O b n extension of I to OA ,a . Example 2.36. The map f : A1 → A2 given by t 7→ (t2 , t3 ) is a regular morphism which induces a birational isomorphism onto the curve X in A2 defined by x3 = y 2 . The inverse (x, y) 7→ y/x is a rational map on X and regular on X \{0}. BLOWUPS AND RESOLUTION 13 Example 2.37. The map f : A1 → A2 given by t 7→ (t2 − 1, t(t2 − 1)) is a regular morphism which induces a birational isomorphism onto the curve X in A2 defined by x2 + x3 = y 2 . The inverse (x, y) 7→ y/x is a rational map on X and regular on X \ {0}. The germ (X, 0) of X at 0 is not isomorphic to the germ (Y, 0) of the union Y of the two diagonals in A2 defined by x2 √ = y 2 . The formal germs b b (X, 0) and (Y , 0) are isomorphic via the map (x, y) 7→ (x 1 + x, y). Example 2.38. . The map f : A2 → A2 given by (x, y) 7→ (xy, y) is a birational morphism with inverse the rational map (x, y) 7→ ( xy , y). The inverse defines a regular morphism outside the x-axis. Example 2.39. The maps ϕij : An+1 → An+1 given by x0 xi−1 xi+1 xn (x0 , . . . , xn ) 7→ ( , . . . , , 1, ,..., ). xj xj xj xj are birational maps for each i, j = 0, . . . , n. They are the transition maps between the affine charts Uj = Pn \ V (xj ) ' An of projective space Pn . Example 2.40. . The maps ϕij : An → An given by x xi−1 1 xi+1 xj−1 xj+1 xn  1 ,..., , , ,..., , xi xj , ,..., (x1 , . . . , xn ) 7→ xj xj xj xj xj xj xj are birational maps for i, j = 1, . . . , n. They are the transition maps between the e n ⊂ An × Pn−1 of An at the origin (cf. Lecture IV) . affine charts of the blowup A Example 2.41. . Assume that the characteristic of the ground field is different from 2. The elliptic curve X defined in A2 by y 2 = x3 − x is formally isomorphic at b 1 , 0), whereas the germs (X, a) are not biregularly isomorphic each point a of X to (A 1 to (A , 0). Example 2.42. . The projection (x, y) 7→ x from the hyperbola X defined in A2 by xy = 1 to the x-axis A1 = A1 × {0} ⊂ A2 has open image A1 \ {0}. In particular, it is not proper. Example 2.43. . The curves X and Y defined in A2 by x3 = y 2 , respectively x = y 2 are not formally isomorphic to each other at 0, whereas the curve Z defined in A2 by x3 + x5 = y 2 is formally isomorphic to X at 0. 5 3. Lecture III: Singularities Let X be an affine algebraic variety defined over a field K. Analog concepts to the ones given below can be defined for abstract varieties and schemes. Definition 3.1. A noetherian local ring R with maximal ideal m is called a regular ring if m can be generated by n elements, where n is the Krull dimension of R. The number n is then given as the vector space dimension of m/m 2 over the residue field R/m. A noetherian local ring R is regular if and only if its completion b is regular, [AM69] p. 123. R Definition 3.2. Let R be a noetherian regular local ring with maximal ideal m. A minimal set of generators x1 , . . . , xn of m is called a regular system of parameters or local coordinate system of R. Remark 3.3. A regular system of parameters of a local ring R is also a regular b but not conversely, cf. ex. 3.27. system of parameters of its completion R, 14 HERWIG HAUSER Definition 3.4. A point a of X is a regular or non-singular point of X if the local ring OX,a of X at a is a regular ring. Equivalently, the mX,a -adic complebX,a of OX,a is isomorphic to the completion O bAd ,0 ' K[[x1 , . . . , xd ]] of the tion O d local ring of some affine space A at 0. Otherwise a is called a singular point or a singularity of X. The set of singular points of X is denoted by Sing(X), its complement by Reg(X). The variety X is regular or non-singular if all its points are regular. Over perfect fields regular varieties are the same as smooth varieties, [Cut04, Liu02]. Proposition 3.5. A subvariety X of a regular variety W is regular at a if and only if there are local coordinates x1 , . . . , xn of W at a so that X can be defined locally at a by x1 = · · · = xk = 0 where k is the codimension of X in W at a. Proof. [dJP00] Cor. 4.3.20, p. 155.  Remark 3.6. Affine and projective space are regular at each of their points. The germ of a variety at a regular point need not be biregularly isomorphic to the germ of an affine space at 0. However, it is formally isomorphic, i.e., after passage to the formal germ, cf. ex. 3.28. Proposition 3.7. Assume that the field K is perfect. Let X be a hypersurface defined in a regular variety W by the square-free equation f = 0. The point a ∈ X is singular if and only if all partial derivatives ∂x1 f, . . . , ∂xn f of vanish at a. Proof. [Zar47] Thm. 7, [Har77] I.5, [dJP00] 4.3.  Definition 3.8. The characterization of singularities by the vanishing of the partial derivatives as in Prop. 3.7 is known as the Jacobian criterion for smoothness. Remark 3.9. A similar statement holds for irreducible varieties which are not hypersurfaces, using instead of the partial derivatives the k × k-minors of the Jacobian matrix of a system of equations of X in W , with k the codimension of X in W at a [dJP00], [Cut04] pp. 7-8, [Liu02] pp. 128 and 142. The choice of the system of defining polynomials of the variety is significant: The ideal generated by them has to be radical, otherwise the concept of singularity has to be developed scheme-theoretically, allowing non-reduced schemes. Over non-perfect fields, the criterion of the proposition does not hold [Zar47]. Corollary 3.10. The singular locus Sing(X) of X is closed in X. Definition 3.11. A point a of X is a plain point of X if the local ring OX,a is isomorphic to the local ring OAd ,0 ' K[x1 , . . . , xd ](x1 ,...,xd ) of some affine space Ad at 0 (with d the dimension of X at a). Equivalently, there exists an open neighbourhood U of a in X which is biregularly isomorphic to an open subset V of some affine space Ad . The variety X is plain if all its points are plain. Theorem 3.12. (Bodnár-Hauser-Schicho-Villamayor) The blowup of a plain variety defined over an infinite field along a regular center is again plain. Proof. [BHSV08] Thm. 4.3.  Definition 3.13. An irreducible variety X is rational if it has a dense open subset U which is biregularly isomorphic to a dense open subset V of some affine space Ad . Equivalently, the function field K(X) = Quot(K[X]) is isomorphic to the field of rational functions K(x1 , . . . , xd ) of Ad . BLOWUPS AND RESOLUTION 15 Remark 3.14. A plain complex variety is smooth and rational. The converse is true for curves and surfaces, and unknown in arbitrary dimension [BHSV08]. Definition 3.15. A point a is a normal crossings point of X if the formal b a) is isomorphic to the formal neighbourhood (Yb , 0) of a union neighbourhood (X, Y of coordinate subspaces of An at 0. The point a is a simple normal crossings point of X if it is a normal crossings point and all components of X passing through a are regular at a. The variety X has normal crossings, respectively simple normal crossings, if the property holds at all of its points. Remark 3.16. In the case of schemes, a normal crossings scheme may be non-reduced in which case the components of the scheme Y are equipped with multiplicities. Equivalently, Y is defined locally at 0 in An up to a formal isomorphism by a monomial ideal of K[x1 , . . . , xn ]. Proposition 3.17. A point a is a normal crossings point of a subvariety X of a regular ambient variety W if and only if there exists a regular system of parameters x1 , . . . , xn of OW,a so that the germ (X, a) is defined in (W, a) by a radical monomial ideal in x1 , . . . , xn . This is equivalent to saying that each component of (X, a) is defined by a subset of the coordinates. Remark 3.18. In the case of schemes, the monomial ideal need not be radical. Definition 3.19. Two subvarieties X and Y of a regular ambient variety W meet transversally at a point a of W if they are regular at a and if the union X ∪ Y has normal crossings at a. Remark 3.20. The definition differs from the corresponding notion in differential geometry, where it is required that the tangent spaces of the two varieties at intersection points sum up to the tangent space of the ambient variety at the respective point. In the present text, an inclusion Y ⊂ X of two regular varieties is considered as being transversal, and also any two coordinate subspaces in An meet transversally. In the case of schemes, the union X ∪ Y has to be defined by the product of the defining ideals, not their intersection. Definition 3.21. A variety X is a cartesian product, if there exist positive dimensional varieties Y and Z such that X is biregularly isomorphic to Y × Z. b a) (the cartesian Analogous definitions hold for germs (X, a) and formal germs (X, product of formal germs has to be taken in the category of complete local rings). Definition 3.22. A variety X is (formally) a cylinder over a subvariety Z ⊂ X b a) is isomorphic to a cartesian at a point a of Z if the formal neighborhood (X, b b product (Y , a) × (Z, a) for some (positive-dimensional) subvariety Y of X which is regular at a. One also says that X is trivial or a cylinder along Y at a with transversal section Z. Definition 3.23. Let X and F be varieties, and let 0 be a distinguished point b a) is isomorphic on F . The set S of points a of X where the formal neighborhood (X, to (Fb, 0) is called the triviality locus of X of singularity type (Fb, 0). Theorem 3.24. (Ephraim, Hauser-Müller) For any complex variety F and point 0 on F , the triviality locus S of X of singularity type (Fb, 0) is locally closed and regular in X, and X is a cylinder along S. Any subvariety Z of X such that b a) ' (S, b a) × (Z, b a) is unique up to formal isomorphism at a. (X, 16 HERWIG HAUSER Proof. [Eph78] Thm. 2.1, [HM89] Thm. 1.  Corollary 3.25. The singular locus Sing(X) and the non-normal crossings locus of a variety X are closed subvarieties. Proof. [Mum99] III.4, Prop. 3, p. 170, [Bod04].  Theorem 3.26. (Hauser-Müller) Let X, Y and Z be complex varieties with points a, b and c on them, respectively. The formal germs of X × Z at (a, c) and b a) and (Yb , b) are isomorphic. Y × Z at (b, c) are isomorphic if and only if (X, Proof. [HM90], Thm. 1.  Examples √ Example 3.27. . The element x 1 + x is a regular parameter of the completion K[[x]] of the local ring K[x](x) which does not stem from a regular parameter of K[x](x) . Example 3.28. . The elements y 2 − x3 − x and y form a regular parameter system of OA2 ,0 but the zeroset X of y 2 = x3 − x is not locally at 0 isomorphic to b 1 , 0). b 0) is formally isomorphic to (A A1 . However, (X, Example 3.29. The set of plain points of a variety X is Zariski open (cf. def. 3.11). Example 3.30. Let X be the plane cubic curve defined by x3 + x2 − y 2 = 0 in A2 . The origin 0 ∈ X is a normal crossings point, but X is not locally at 0 biregularly isomorphic to the union of the two diagonals of A2 defined by x = ±y. Example 3.31. . Let X be the complex surface in A3C defined by x2 − y 2 z = 0, the Whitney umbrella or pinch point singularity. The singular locus is the z-axis. The origin is not a normal crossings point of X. For a 6= 0 a point on the z-axis, a is a normal crossings point but not a simple normal crossings point of X. The formal neighbourhoods of X at points a 6= 0 on the z-axis are isomorphic to each other, since they are isomorphic to the formal neighbourhood at 0 of the union of two transversal planes in A3 . Example 3.32. Prove that the non-normal crossings locus of a variety is closed. Try to find equations for it [Bod04]. Example 3.33. + Find a local invariant that measures reasonably the distance of a point a of X from being a normal crossings point. Example 3.34. . Do the varieties defined by the following equations have normal crossings, respectively simple normal crossings, at the origin? Vary the ground field. (a) x2 + y 2 = 0, (b) x2 − y 2 = 0, (c) x2 + y 2 + z 2 = 0, (d) x2 + y 2 + z 2 + w2 = 0, (e) xy(x − y) = 0, (f) xy(x2 − y) = 0, (g) (x − y)z(z − x) = 0. BLOWUPS AND RESOLUTION 17 Example 3.35. . Visualize the zeroset of (x − y 2 )(x − z)z = 0 in A3R . Example 3.36. + Formulate and then prove the theorem of local analytic triviality in positive characteristic, cf. Thm. 1 of [HM89]. Example 3.37. Find a coordinate free description of normal crossings singularities. Find an algorithm that tests for normal crossings [Fab11, Fab12]. Example 3.38. . The singular locus of a cartesian product X × Y is the union of Sing(X) × Y and X × Sing(Y ). S Example 3.39. . Call a finite union X = Xi of regular varieties mikado if all possible intersections of the components Xi are (scheme-theoretically) regular. The intersections are defined by the sums of the ideals, not taking their radical. Find the simplest example of a variety which is not mikado but for which all pairwise intersections are non-singular. Example 3.40. Interpret the family given by taking the germs of a variety X at varying points a ∈ X as the germs of the fibers of a morphism of varieties, equipped with a section. 4. Lecture IV: Blowups Blowups, also known as monoidal transformations, can be introduced in several ways. The respective equivalences will be proven in the second half of this section. All varietes are reduced but not necessarily irreducible, and subvarieties are closed if not mentioned differently. Schemes will be noetherian but not necessarily of finite type over a field. To ease the exposition they are often assumed to be affine, i.e., of the form X = Spec(R) for some ring R. Points of varieties are closed, points of schemes can also be non-closed. The coordinate ring of an affine variety X is denoted by K[X] and the structure sheaf of a scheme X by OX , with local rings OX,a at points a ∈ X. References providing additional material on blowups are, among many others, [Hir64], chap. III, and [EH00], chap. IV.2. Definition 4.1. A subvariety Z of a variety X is called a hypersurface in X if the codimension of Z in X at any point a of Z is 1, dima Z = dima X − 1. Remark 4.2. In the case where X is non-singular and irreducible, a hypersurface is locally defined at any point a by a single non-trivial equation, i.e., an equation given by a non-zero and non-invertible element h of OX,a . This need not be the case for singular varieties, see ex. 4.21. Hypersurfaces are a particular case of effective Weil divisors [Har77] chap. II, Rmk. 6.17.1, p. 145. Definition 4.3. A subvariety Z of an irreducible variety X is called a Cartier divisor in X at a point a ∈ Z if Z can be defined locally at a by a single equation h = 0 for some non-zero element h ∈ OX,a . If X is not assumed to be irreducible, h is required to be a non-zero divisor of OX,a . This excludes the possibility that Z is a component or a union of components of X. The subvariety Z is called a Cartier divisor in X if it is a Cartier divisor at each of its points. The empty subvariety is considered as a Cartier divisor. A (non-empty) Cartier divisor is a hypersurface in X, but not conversely, and its complement X \ Z is dense in X. Cartier divisors 18 HERWIG HAUSER are, in a certain sense, the largest closed and properly contained subvarieties of X. If Z is Cartier in X, the ideal I defining Z in X is called locally principal [Har77] chap. II, Prop. 6.13, p. 144, [EH00] III.2.5, p. 117. Definition 4.4. (Blowup via universal property) Let Z be a (closed) subvariety e together with a morphism π : X e → X is called a blowup of a variety X. A variety X of X with center Z of X, or a blowup of X along Z, if the inverse image E = π −1 (Z) e and π is universal with respect to this property: For of Z is a Cartier divisor in X 0 any morphism τ : X → X such that τ −1 (Z) is a Cartier divisor in X 0 , there exists e so that τ factors through σ, say τ = π ◦ σ, a unique morphism σ : X 0 → X ∃1 σ e X 0 H_ _ _ _/ X HH HH τ HH HH π H#  X e is a Cartier The morphism π is also called the blowup map. The subvariety E of X divisor, in particular a hypersurface, and called the exceptional divisor or exceptional locus of the blowup. One says that π contracts E to Z. Remark 4.5. By the universal property, a blowup of X along Z, if it exists, is unique up to unique isomorphism. It is therefore called the blowup of X along e = X and π is the identity by the Z. If Z is already a Cartier divisor in X, then X universal property. In particular, this is the case when X is non-singular and Z is a hypersurface in X. Definition 4.6. The Rees algebra of an ideal I of a commutative ring R is the graded R-algebra ∞ ∞ M M Rees(I) = Ii = I i · ti ⊂ R[t], i=0 i=0 where I i denotes the i-fold power of I, with I 0 set equal to R. The variable t is e for Rees(I) given degree 1 so that the elements of I i · ti have degree i. Write R when I is clear from the context. The Rees algebra of I is generated by elements e by sending an element g of R to the of degree 1, and R embeds naturally into R degree 0 element g · t0 . If I is finitely generated by elements g1 , . . . , gk ∈ R, then e = R[g1 t, . . . , gk t]. The Rees algebras of the zero-ideal I = 0 and of the whole ring R I = R equal R, respectively R[t]. If I is a principal ideal generated by a non-zero e and Spec(R) are isomorphic. The Rees algebras divisor of R, the schemes Proj(R) of an ideal I and its k-th power I k are isomorphic as graded R-algebras, for any k ≥ 1. Definition 4.7. (Blowup via Rees algebra) Let X = Spec(R) be an affine scheme and let Z = Spec(R/I) be a closed subscheme of X defined by an ideal e = Rees(I) the Rees algebra of I over R, equipped with the I of R. Denote by R e = Proj(R) e together induced grading. The blowup of X along Z is the scheme X e → X given by the natural ring homomorphism R → R. e with the morphism π : X e is called the exceptional divisor of the blowup. The subscheme E = π −1 (Z) of X Definition 4.8. (Blowup via secants) Let W = An be affine space over K (taken as a variety) and let p be a fixed point of An . Equip An with a vector BLOWUPS AND RESOLUTION 19 space structure by identifying it with its tangent space Tp An . For a point a ∈ An different from p, denote by g(a) the secant line in An through p and a, considered as an element of projective space Pn−1 = P(Tp An ). The morphism γ : An \ {p} → Pn−1 , a 7→ g(a), e of the graph Γ of γ inside An × Pn−1 together is well defined. The Zariski closure X e with the restriction π : X → X of the projection map An × Pn−1 → An is the point blowup of An with center p. Definition 4.9. (Blowup via closure of graph) Let X be an affine variety with coordinate ring K[X] and let Z = V(I) be a subvariety of X defined by an ideal I of K[X] generated by elements g1 , . . . , gk . The morphism γ : X \ Z → Pk−1 , a 7→ (g1 (a) : · · · : gk (a)), e of the graph Γ of γ inside X × Pk−1 together is well defined. The Zariski closure X e → X of the projection map X × Pk−1 → X is the blowup with the restriction π : X of X along Z. It does not depend, up to isomorphism over X, on the choice of the generators gi of I. Definition 4.10. (Blowup via equations) Let X be an affine variety with coordinate ring K[X] and let Z = V(I) be a subvariety of X defined by an ideal I of K[X] generated by elements g1 , . . . , gk . Assume that g1 , . . . , gk form a regular sequence in K[X]. Let (u1 : . . . : uk ) be projective coordinates on Pk−1 . The e of X × Pk−1 defined by the equations subvariety X ui · gj − uj · gi = 0, i, j = 1, . . . , k, e → X of the projection map X × Pk−1 → X is together with the restriction π : X the blowup of X along Z. It does not depend, up to isomorphism over X, on the choice of the generators gi of I. Remark 4.11. This is a special case of the preceding definition of blowup as the closure of a graph. If g1 , . . . , gk do not form a regular sequence, the subvariety e of X × Pk−1 may require more equations, see ex. 4.43. X Definition 4.12. (Blowup via affine charts) Let W = An be affine space over K with chosen coordinates x1 , . . . , xn . Let Z ⊂ W be a coordinate subspace defined by equations xj = 0 for j in some subset J ⊂ {1, . . . n}. Set Uj = An for j ∈ J, and glue two affine charts Uj and U` via the transition maps xi 7→ xi /xj , if i ∈ J \ {j, `}, xj 7→ 1/x` , x` 7→ xj x` , xi 7→ xi , if i 6∈ J. f f This yields a variety W . Define a morphism π : W → W by the chart expressions πj : An → An for j ∈ J as follows, xi 7→ xi , if i 6∈ J \ {j}, xi 7→ xi xj , if i ∈ J \ {j}. f f → W is the blowup of W = An The variety W together with the morphism π : W n n along Z. The map πj : A → A is called the j-th affine chart of the blowup map, 20 HERWIG HAUSER or the xj -chart. The maps πj depend on the choice of coordinates in An , whereas f → W only depends on W and Z. the blowup map π : W Definition 4.13. (Blowup via ring extensions) Let I be a non-zero ideal in a noetherian integral domain R, generated by non-zero elements g1 , . . . , gk of R. The blowup of R in I is given by the ring extensions   g1 gk R ,→ Rj = R ,..., , j = 1, . . . , k, gj gj inside the rings Rgj = R[ g1j ], where the rings Rj are glued pairwise via the natural inclusions Rgj , Rg` ⊂ Rgj g` , for j, ` = 1, . . . , k. The blowup does not depend, up to isomorphism over X, on the choice of the generators gi of I. Remark 4.14. The seven concepts of blowup given in the preceding definitions are all essentially equivalent. It will be convenient to prove the equivalence in the language of schemes, though the substance of the proofs is inherent to varieties. Definition 4.15. (Local blowup via germs) Let π : X 0 → X be the blowup of X along Z, and let a0 be a point of X 0 mapping to the point a ∈ X. The local blowup of X along Z at a0 is the morphism of germs π : (X 0 , a0 ) → (X, a). It is given by the dual homomorphism of local rings π ∗ : OX,a → OX 0 ,a0 . This terminology is also used for the completions of the local rings giving rise to a morphism of formal b 0 , a0 ) → (X, b a) with dual homomorphism π ∗ : O bX,a → O bX 0 ,a0 . neighborhoods π : (X Definition 4.16. (Local blowup via localizations of rings) Let R = (R, m) be e = L∞ I i . Any non-zero a local ring and let I be an ideal of R with Rees algebra R i=0 e also denoted by g. element g of I defines a homogeneous element of degree 1 in R, eg inherits from R e the structure of a graded ring. The set of The ring of quotients R eg forms a ring, denoted by R[Ig −1 ], and consists of fractions degree 0 elements of R f /g ` with f ∈ I ` and ` ∈ N. The localization R[Ig −1 ]p of R[Ig −1 ] at any prime ideal p of R[Ig −1 ] containing the maximal ideal m of R together with the natural ring homomorphism α : R → R[Ig −1 ]p is called the local blowup of R with center I associated to g and p. Remark 4.17. The same definition can be made for non-local rings R, giving rise to a local blowup Rq → Rq [Ig −1 ]p with respect to the localization Rq of R at the prime ideal q = p ∩ R of R. Theorem 4.18. Let X = Spec(R) be an affine scheme and Z a closed sube → X of X along Z when scheme defined by an ideal I of R. The blowup π : X e e defined as Proj(R) of the Rees algebra R of I satisfies the universal property of blowups. Proof. (a) It suffices to prove the universal property on the affine charts of e since on overlaps the local patches will agree by their an open covering of Proj(R), uniqueness. This in turn reduces the proof to the local situation. (b) Let β : R → S be a homomorphism of local rings such that β(I) · S is a principal ideal of S generated by a non-zero divisor, for some ideal I of R. It suffices to show that there is a unique homomorphism of local rings γ : R0 → S such that R0 equals a localization R0 = R[Ig −1 ]p for some non-zero element g of I and a prime ideal p of R[Ig −1 ] containing the maximal ideal of R, and such that BLOWUPS AND RESOLUTION 21 the diagram / R0 } } } β }} } γ  ~}} S commutes, where α : R → R0 denotes the local blowup of R with center I specified by the choice of g and p. The proof of the local statement goes in two steps. (c) There exists an element f ∈ I such that β(f ) generates β(I) · S: Let h ∈ S Pn be a non-zero divisor generating β(I) · S. Write h = i=1 β(fi )si with elements f1 , . . . ,P fn ∈ I and ti ∈ S. Thus,  s1 , . . . , sn ∈ S. Write β(fi ) = ti h with elements Pn n h= i=1 si ti h. Since h is a non-zero divisor, the sum i=1 si ti equals 1. In particular, there is an index i for which ti does not belong to the maximal ideal of S. This implies that this ti is invertible in S, so that h = t−1 i β(fi ). In particular, for this i, the element β(fi ) generates β(I) · S. (d) Let f ∈ I be as in (c). By assumption, the image β(f ) is a non-zero divisor in S. For every ` ≥ 0 and every h` ∈ I ` , there is an element a` ∈ S such that β(h` ) = a` β(f )` . Since β(f ) P is a non-zero divisor, a` is unique with n ` −1 this property. For an arbitrary element ] with h` ∈ I ` set `=0 h` /g of R[Ig Pn P n ` δ( `=0 h` /g ) = `=0 a` . This defines a ring homomorphism δ : R[Ig −1 ] → S that restricts to β on R. By definition, δ is unique with this property. Let p ⊂ R[Ig −1 ] be the inverse image under δ of the maximal ideal of S. This is a prime ideal of R[Ig −1 ] which contains the maximal ideal of R. By the universal property of localization, δ induces a homomorphism of local rings γ : R[Ig −1 ]p → S that restricts to β on R, i.e., satisfies γ ◦ α = β. By construction, γ is unique.  R α Theorem 4.19. Let X = Spec(R) be an affine scheme and let Z be a closed e subscheme defined by an ideal I of R. The blowup of X along Z defined by Proj(R) can be covered by affine charts as described in def. 4.10. Proof. For g ∈ I denote by R[Ig −1 ] ⊂ Rg the subring of the ring of quotients Rg generated by homogeneous elements of degree 0 of the form h/g ` with eg . h ∈ I ` and ` ∈ N. This gives an injective ring homomorphism R[Ig −1 ] → R e Let now g1 , . . . , gk be generators of I. Then X = Proj(R) is covered by the principal open sets Spec(R[Igi−1 ]) = Spec(R[g1 /gi , . . . , gk /gi ]). The chart expression e → X follows now Spec(R[g1 /gi , . . . , gk /gi ]) → Spec(R) of the blowup map π : X by computation.  Theorem 4.20. Let X be an affine variety with coordinate ring R = K[X] and let Z be a closed subvariety defined by the ideal I of R with generators g1 , . . . , gk . e of the Rees algebra R e of R equals the The blowup of X along Z defined by Proj(R) k−1 closure of the graph Γ of γ : X \ Z → P , a 7→ (g1 (a) : · · · : gk (a)). If g1 , . . . , gk form a regular sequence, the closure is defined as a subvariety of X × Pk−1 by equations as indicated in def. 4.10. Proof. (a) Let Uj ⊂ Pk−1 be the affine chart given by uj 6= 0, with isomorphism Uj ' Ak−1 , (u1 : . . . : uk ) 7→ (u1 /uj , . . . , uk /uj ). The j-th chart expression of γ equals a 7→ (g1 (a)/gj (a), . . . , gk (a)/gj (a)) and is defined on the principal open set gj 6= 0 of X. The closure of the graph of γ in Uj is therefore given by Spec(R[g1 /gi , . . . , gk /gi ]). The preceding theorem then establishes the required equality. 22 HERWIG HAUSER (b) If g1 , . . . , gk form a regular sequence, their only linear relations over R are the trivial ones, so that R[Igi−1 ] = R[g1 /gi , . . . gk /gi ] ' R[t1 , . . . , tk ]/(gi tj − gj , j = 1, . . . , k). e → X is then given by the ring inclusion R → The i-th chart expression of π : X R[t1 , . . . , tk ]/(gi tj − gj , j = 1, . . . , k).  Examples Example 4.21. For the cone X in A3 of equation x2 + y 2 = z 2 , the line Y in A defined by x = y − z = 0 is a hypersurface of X at each point. It is a Cartier divisor at any point a ∈ Y \ {0} but it is not a Cartier divisor at 0. The double line Y 0 in A3 defined by x2 = y − z = 0 is a Cartier divisor of X since it can be defined in X by y − z = 0. The subvariety Y 00 in A3 consisting of the two lines defined by x = y 2 − z 2 = 0 is a Cartier divisor of X since it can be defined in X by x = 0. 3 Example 4.22. For the surface X : x2 y−z 2 = 0 in A3 , the subvariety Y defined by y 2 − xz = x3 − yz = 0 is the singular curve parametrized by t 7→ (t3 , t4 , t5 ). It is everywhere a Cartier divisor except at 0: there, the local ring of Y in X is K[x, y, z](x,y,z) /(x2 y − z 2 , y 2 − xz, x3 − yz), which defines a singular cubic. It is of codimension 1 in X but not a complete intersection (i.e., cannot be defined in A3 , as the codimension would suggest, by two but only by three equations). Thus it is not a Cartier divisor. At any other point a = (t3 , t4 , t5 ), t 6= 0 of Y , one has OY,a = S/(x2 y − z 2 , y 2 /x − z, x3 − yz) = S/(x2 y − z 2 , y 2 /x − z) with S = K[x, y, z](x−t3 ,y−t4 ,z−t5 ) the localization of K[x, y, z] at a. Hence Y is a Cartier divisor there. Example 4.23. Let Z be one of the axes of the cross X : xy = 0 in A2 , e.g. the x-axis. At any point a on the y-axis except the origin, Z is Cartier: one has OX,a = K[x, y](x,y−a) /(xy) = K[x, y](x,y−a) /(x) and the element h = y defining Z is a unit in this local ring. At the origin 0 of A2 the local ring of X is K[x, y](x,y) /(xy) and Z is locally defined by h = y which is a zero-divisor in OX,0 . Thus Z is not Cartier in X at 0. Example 4.24. Let Z be the origin of X = A2 . Then Z is not a hypersurface and hence not Cartier in X. Example 4.25. . The (reduced) origin Z = {0} in X = V (xy, x2 ) ⊂ A2 is not a Cartier divisor in X. Example 4.26. . Are Z = V (x2 ) in A1 and Z = V (x2 y) in X = A2 Cartier divisors? Example 4.27. . Let Z = V (x2 , y) be the origin of A2 with non-reduced structure given by the ideal (x2 , y). Then Z is not a Cartier divisor in X = V (xy, x2 ) ⊂ A2 . Example 4.28. Let X = A1 be the affine line with coordinate ring R = K[x] e = K[x, xt] ⊂ K[x, t] with respect and let Z be the origin of A1 . The Rees algebra R to the ideal defining Z is isomorphic, as a graded ring, to a polynomial ring K[u, v] e of in two variables with deg u = 0 and deg v = 1. Therefore, the point blowup X 1 0 1 e X is isomorphic to A × P = A , and π : X → X is the identity. BLOWUPS AND RESOLUTION 23 More generally, let X = An be n-dimensional affine space with coordinate ring R = K[x1 , . . . , xn ] and let Z ⊂ X be a hypersurface defined by some non-zero e = K[x1 , . . . , xn , gt] ⊂ K[x1 , . . . , xn , t] with g ∈ K[x1 , . . . , xn ]. The Rees algebra R respect the ideal defining Z is isomorphic, as a graded ring, to a polynomial ring K[u1 , . . . , un , v] in n + 1 variables with deg ui = 0 and deg v = 1. Therefore the e of X along Z is isomorphic to An × P0 = An , and π : X e → X is the blowup X identity. Example 4.29. Let X = Spec(R) be an affine scheme and Z ⊂ X be defined e = R[gt] ⊂ R[t] with respect by some non-zero-divisor g ⊂ R. The Rees algebra R to the ideal defining Z is isomorphic, as a graded ring, to R[v] with deg r = 0 for e of X along Z is isomorphic to r ∈ R and deg v = 1. Therefore the blowup X 0 e X × P = X, and π : X → X is the identity. Example 4.30. Take X = V (xy) ⊂ A2 with coordinate ring R = K[x, y]/(xy). Let Z be defined in X by y = 0. The Rees algebra of R with respect to the ideal e = R[yt] ∼ defining Z equals R = K[x, y, u]/(xy, xu) with deg x = deg y = 0 and deg u = 1. Example 4.31. Let X = Spec(R) be an affine scheme and let Z ⊂ X be defined by some zero-divisor g 6= 0 in R, say h · g = 0 for some non-zero h ∈ R. The e = R[gt] ⊂ R[t] with respect to the ideal defining Z is isomorphic, Rees algebra R as a graded ring, to R[v]/(h · v) with deg r = 0 for r ∈ R and deg v = 1. Therefore, e of X along Z equals the closed subvariety of X × P0 = X defined by the blowup X e → X is the inclusion map. h · v = 0, and π : X Example 4.32. Take in the situation of the preceding example X = V (xy) ⊂ e = R[yt] ' K[x, y, u]/(xy, xu) A2 and g = y, h = x. Then R = K[x, y]/(xy) and R with deg x = deg y = 0 and deg u = 1. Example 4.33. Let X = Spec(R) be an affine scheme and let Z ⊂ X be defined by some nilpotent element g 6= 0 in R, say g k = 0 for some k ≥ 1. The e = R[gt] ⊂ R[t] with respect to the ideal defining Z is isomorphic, Rees algebra R as a graded ring, to R[v]/(v k ) with deg r = 0 for r ∈ R and deg v = 1. The blowup e of X is the closed subvariety of X × P0 = X defined by v k = 0. X Example 4.34. Let X = A2 and let Z be defined in X by I = (x, y). The e = K[x, y, xt, yt] ⊂ K[x, y, t] of R = K[x, y] with respect to the ideal Rees algebra R defining Z is isomorphic, as a graded ring, to the factor ring K[x, y, u, v]/(xv − yu), e of X with deg x = deg y = 0 and deg v = deg u = 1. It follows that the blowup X 2 1 along Z embeds naturally as the closed and regular subvariety of A × P defined e → X being given by the restriction to X e of by xv − yu = 0, the morphism π : X 2 1 2 the first projection A × P → A . Example 4.35. Let X = A2 and let Z be defined in X by I = (x, y 2 ). The e = K[x, y, xt, y 2 t] ⊂ K[x, y, t] of R = K[x, y] with respect to the ideal Rees algebra R defining Z is isomorphic, as a graded ring, to the factor ring K[x, y, u, v]/(xv −y 2 u), e of X with deg x = deg y = 0 and deg u = deg v = 1. It follows that the blowup X 2 1 along Z embeds naturally as the closed and singular subvariety of A × P defined e → X being given by the restriction to X e of by xv − y 2 u = 0, the morphism π : X 2 1 2 the first projection A × P → A . 24 HERWIG HAUSER Example 4.36. Let X = A3 and let Z be defined in X by I = (xy, z). The e = K[x, y, z, xyt, zt] ⊂ K[x, y, z, t] of R = K[x, y, z] with respect to Rees algebra R the ideal defining Z is isomorphic, as a graded ring, to K[u, v, w, r, s]/(uvs − wr), with deg u = deg v = deg w = 0 and deg r = deg s = 1. It follows that the blowup e of X along Z embeds naturally as the closed and singular subvariety of A3 × P1 X e → X being given by the restriction defined by uvs − wr = 0, the morphism π : X 3 1 3 e to X of the first projection A × P → A . Example 4.37. Let X = A1Z be the affine line over the integers and let Z be e = Z[x, xt, pt] ⊂ defined in X by I = (x, p) for a prime p ∈ Z. The Rees algebra R Z[x, t] of R = Z[x] with respect to the ideal defining Z is isomorphic, as a graded ring, to Z[u, v, w]/(xw − pv), with deg u = 0 and deg v = deg w = 1. It follows that e of X along Z embeds naturally as the closed and regular subvariety the blowup X 1 1 e → X being given by the of AZ × PZ defined by xw − pv, the morphism π : X e of the first projection A1 × P1 → A1 . restriction to X Z Z Z Example 4.38. . Let X = A2Z20 be the affine plane over the ring Z20 = Z/20Z, e = Z20 [x, y, xt, 2yt] ⊂ and let Z be defined in X by I = (x, 2y). The Rees algebra R Z20 [x, y, t] of R = Z20 [x] with respect to I is isomorphic, as a graded ring, to Z20 [u, v, w, z]/(xz − 2vw), with deg u = deg v = 0 and deg w = deg z = 1. Example 4.39. Let R = Z6 with Z6 = Z/6Z, and let Z be defined in X by e = Z6 [2t] ⊂ Z6 [t] of R with respect to I is isomorphic, I = (2). The Rees algebra R as a graded ring, to Z6 ⊕ u · Z3 [u] with deg u = 1. Example 4.40. Let R = K[[x, y]] be a formal power series ring in two variables x and y, and let Z be defined in X by I be the ideal generated by ex − 1 and e of R with respect to I equals R[(ex − 1)t, ln(y + ln(y + 1). The Rees algebra R x 1)t] = K[[x, y]][(e − 1)t, ln(y + 1)t] ∼ = K[[x, y]][u, v]/(ln(y + 1)u − (ex − 1)v) with deg u = deg v = 1. e ⊂ X × Pn−1 of X at the Example 4.41. Let X = An . The point blowup X origin is defined by the ideal (ui xj −uj xi , i, j = 1, . . . , n) in K[x1 , . . . , xn , u1 , . . . , un ]. This is a graded ring, where deg xi = 0 and deg ui = 1 for all i = 1, . . . , n. The ring K[x1 , . . . , xn , u1 , . . . , un ]/(ui xj − uj xi , i, j = 1, . . . , n) e = K[x1 , . . . , xn , x1 t, . . . , xn t] ⊂ K[x1 , . . . , xn , t] is isomorphic, as a graded ring, to R e is the Rees-algebra of the ideal (x1 , . . . , xn ) with deg xi = 0, deg t = 1. The ring R  L d e of K[x1 , . . . , xn ]. Thus X is isomorphic to Proj d≥0 (x1 , . . . , xn ) . e n of Example 4.42. Let 1 ≤ k ≤ n. The i-th affine chart of the blowup A n A in the ideal I = (x1 , . . . , xk ) is isomorphic to A , for i = 1, . . . , k, via the ring isomorphism K[x1 , . . . , xn ] ' K[x1 , . . . , xn , t1 , . . . , b ti , . . . tk ]/(xi tj − xj , j = 1, . . . , k, j 6= i), n where xj 7→ tj for j = 1, . . . , k, j 6= i, respectively xj 7→ xj for j = k + 1, . . . , n and j = i. The inverse map is given by xj 7→ xi xj for j = 1, . . . , k, j 6= i, respectively xj 7→ xj for j = k + 1, . . . , n and j = i, respectively tj 7→ xj for j = 1, . . . , k, j 6= i. Example 4.43. Let X = A2 be the affine plane and let g1 = x2 , g2 = xy, g3 = y generate the ideal I ⊂ K[x, y]. The gi do not form a regular sequence. The 3 BLOWUPS AND RESOLUTION 25 subvariety of A2 × P2 defined by the equations gi uj − gj ui = 0 is singular, but the blowup of A2 in I is regular. Example 4.44. Compute the following blowups: (a) A2 in the center (x, y)(x, y 2 ), (b) A3 in the centers (x, yz) and (x, yz)(x, y)(x, z), (c) A3 in the center (x2 + y 2 − 1, z). (d) The plane curve x2 = y in the origin. Use affine charts and ring extensions to determine at which points the resulting varieties are regular or singular. Example 4.45. Blow up A3 in 0 and compute the inverse image of x2 +y 2 = z 2 . Example 4.46. . Blow up A2 in the point (0, 1). What is the inverse image of the lines x + y = 0 and x + y = 1? Example 4.47. . Compute the two chart transition maps for the blowup of A3 along the z-axis. Example 4.48. . Blow up the cone X defined by x2 + y 2 = z 2 in one of its lines. Example 4.49. . Blow up A3 in the circle x2 + (y + 2)2 − 1 = z = 0 and in the elliptic curve y 2 − x3 − x = z = 0. Example 4.50. Interpret the blowup of A2 in the ideal (x, y 2 )(x, y) as a composition of blowups in regular centers. Example 4.51. Show that the blowup of An along a coordinate subspace Z equals the cartesian product of the point-blowup in a transversal subspace V of An of complementary dimension (with respect to Z) with the identity map on Z. Example 4.52. . Show that the ideals (x1 , . . . , xn ) and (x1 , . . . , xn )m define the same blowup of An when taken as center. Example 4.53. Let E be a normal crossings subvariety of An and let Z be a subvariety of An such that E ∪ Z also has normal crossings (the union being defined by the product of ideals). Show that the inverse image of E under the blowup of An along Z has again normal crossings. Show by an example that the assumption on Z cannot be dropped in general. Example 4.54. Draw a real picture of the blowup of A2 at the origin. e n of An with center a point is nonExample 4.55. Show that the blowup A singular. Example 4.56. Describe the geometric construction via secants of the blowup e 3 of A3 with center 0. What is π −1 (0)? For a chosen affine chart W 0 of A e 3, A 0 consider all cylinders Y over a circle in W centered at the origin and parallel to a coordinate axis. What is the image of Y under π in A3 ? Example 4.57. . Compute the blowup of the Whitney umbrella X = V (x2 − y z) ⊂ A3 with center one of the three coordinate axes, respectively the origin 0. 2 Example 4.58. Determine the locus of points of the Whitney umbrella X = V (x2 −y 2 z) where the singularities are normal crossings, respectively simple normal crossings. Blow up the complements of these loci and compare with the preceding example [Kol07] ex. 3.6.1, p. 123, [BDMVP12] Thm. 3.4. 26 HERWIG HAUSER Example 4.59. Let Z be a regular center in An , with induced blowup π : e n mapping to a point a ∈ Z. Show that it is A → An , and let a0 be a point of A possible to choose local formal coordinates at a, i.e., a regular parameter system of bAn ,a , so that the center is a coordinate subspace, and so that a0 is the origin of O e n . Is this also possible with a regular parameter system one of the affine charts of A of the local ring OAn ,a ? en Example 4.60. Let X = V (f ) be a hypersurface in An , defined by f ∈ K[x1 , . . . , xn ], and let Z be a regular closed subvariety which is contained in the e n → An be locus S of points of X where f attains its maximal order. Let π : A the blowup along Z and let X s = V (f s ) be the strict transform of X, defined e n . Show that for points a ∈ Z and as the Zariski closure of π −1 (X \ Z) in A 0 −1 0 a ∈ E = π (Z) with π(a ) = a the inequality orda0 f 0 ≤ orda f holds. Do the same for subvarieties of An defined by arbitrary ideals. Example 4.61. Find an example of a variety X for which the dimension of the singular locus increases under the blowup of a closed regular center Z that is contained in the top locus of X [Hau98] ex. 9. e n , a0 ) → (An , a) be the local blowup of An with Example 4.62. Let π : (A center the point a, considered at a point a0 ∈ E. Let x1 , . . . , xn be given local coordinates at a. Determine the coordinate changes in (An , a) which make the chart expressions of π monomial (i.e., each component of a chart expression is a monomial in the coordinates). Example 4.63. Let x1 , . . . , xn be local coordinates at a so that the local blowup e n , a0 ) → (An , a) is monomial with respect to them. Determine the formal π : (A e n , a0 ) which commute with the local blowup. automorphisms of (A Example 4.64. . Compute the blowup of X = Spec(Z[x]) in the ideals (x, p) and (px, pq) where p and q are primes. Example 4.65. Let R = K[x, y, z] be the polynomial ring in three variables and let I be the ideal (x, yz) of R. The blowup of R along I corresponds to the ring extensions: h yz i ∼ R ,→ R = K[s, t, u, v]/(sv − tu), x x ∼ R ,→ R = K[s, t, u, v]/(s − tuv). yz The first ring extension defines a singular variety while the second one defines a non-singular one. Let W = A3 and Z = V (I) ⊂ W be the affine space and the subvariety defined by I. The blowup of R along I coincides with the blowup W 0 of W along Z. (a) Compute the chart expressions of the blowup maps. (b) Determine the exceptional divisor. (c) Apply one more blowup to W 0 to get a non-singular variety W 00 . (d) Express the composition of the two blowups as a single blowup in a properly chosen ideal. (e) Blow up A3 along the three coordinate axes. Show that the resulting variety is non-singular. (f) Show the same for the blowup of An along the n coordinate axes. BLOWUPS AND RESOLUTION 27 Example 4.66. The zeroset in A3 of the non-reduced ideal (x, yz)(x, y)(x, z) = (x , x2 y, x2 z, xyz, y 2 z) is the union of the y- and the z-axis. Taken as center, the resulting blowup of A3 equals the composition of two blowups: The first blowup has center the ideal (x, yz) in A3 , giving a three-fold W1 in a regular four-dimensional ambient variety with one singular point of local equation xy = zw. The second blowup is the point blowup of W1 with center this singular point [Hau00] Prop. 3.5, [FW11, Lev01]. 3 e n of An in a monomial ideal I of Example 4.67. + Consider the blowup A e n may be singular. What types of singularities will K[x, . . . , xn ]. Show that A I so that the blowup of An in I is occur? Find a natural saturation procedure I e n [FW11]. regular and equal to a (natural) resolution of the singularities of A Example 4.68. The Nash modification of a subvariety X of An is the closure of the graph of the map which associates to each non-singular point its tangent space, taken as an element of the Grassmanian of d-dimensional linear subspaces of Kn , where d = dim(X). For a hypersurface X defined in An by f = 0, the Nash modification coincides with the blowup of X in the Jacobian ideal of f generated by the partial derivatives of f . 5. Lecture V: Properties of Blowup e → X be the blowup of X along a subvariety Z, Proposition 5.1. Let π : X e ×X Y → Y and let ϕ : Y → X be a morphism, the base change. Denote by p : X the projection from the fibre product to the second factor. Let S = ϕ−1 (Z) ⊂ Y be the inverse image of Z under ϕ, and let Ye be the Zariski closure of p−1 (Y \ S) e ×X Y . The restriction τ : Ye → Y of p to Ye equals the blowup of Y along S. in X  e e ×X Y q / Ye   /X /X F A HH AA H HHτ AA HH p π AA HH A H   # ϕ  /Y /X S Proof. The assertion is best proven via the universal property of blowups. To show that F = τ −1 (S) is a Cartier divisor in Ye , consider the projection q : e ×X Y → X e onto the first factor. By the commutativity of the diagram, X F = p−1 (S) = p−1 ◦ ϕ−1 (Z) = q −1 ◦ π −1 (Z) = q −1 (E). e and q is a projection, F is locally defined by a As E is a Cartier divisor in X principal ideal. The associated primes of Ye are the associated primes of Y not e cannot pull containing the ideal of S. Thus, the local defining equation of E in X e back to a zero divisor on Y . This proves that F is a Cartier divisor. To show that τ : Ye → Y fulfills the universal property, let ψ : Y 0 → Y be a morphism such that ψ −1 (S) is a Cartier divisor in Y 0 . This results in the following diagram. 28 HERWIG HAUSER /X e w; >>> w >>π q ww w >> ww w > w σ 0 e / Y X ×X GY X ? GG GGp ϕ   GG  GG ψ G#  /Y −1 −1 −1 −1 Since ψ (S) = ψ (ϕ (Z)) = (ϕ ◦ ψ) (Z), there exists by the universal e → X a unique map ρ : Y 0 → X e such that ϕ ◦ ψ = property of the blowup π : X π ◦ ρ. By the universal property of fibre products, there exists a unique map e ×X Y such that q ◦ σ = ρ and p ◦ σ = ψ. σ :Y0 →X e ×X Y . Since ψ −1 (S) is a Cartier It remains to show that σ(Y 0 ) lies in Ye ⊂ X 0 0 −1 divisor in Y , its complement Y \ ψ (S) is dense in Y 0 . From ρ Y 0 \ ψ −1 (S) = ψ −1 (Y \ S) = (p ◦ σ)−1 (Y \ S) = σ −1 (p−1 (Y \ S)) follows that σ(Y 0 \ ψ −1 (S)) ⊂ p−1 (Y \ S). But Ye is the closure of p−1 (Y \ S) in e ×X Y , so that σ(Y 0 ) ⊂ Ye as required. X  Corollary 5.2. (a) Let π : X 0 → X be the blowup of X along a subvariety Z, and let Y be a closed subvariety of X. Denote by Y 0 the Zariski closure of π −1 (Y \Z) in X 0 , i.e., the strict transform of Y under π, cf. def. 6.2. The restriction τ : Y 0 → Y of π to Y 0 is the blowup of Y along Y ∩ Z. In particular, if Z ⊂ Y , then τ is the blowup Ye of Y along Z. (b) Let U ⊂ X be an open subvariety, and let Z ⊂ X be a closed subvariety, so that U ∩ Z is closed in U . Let π : X 0 → X be the blowup of X along Z. The blowup of U along U ∩ Z equals the restriction of π to U 0 = π −1 (U ). b a) for (c) Let a ∈ X be a point. Write (X, a) for the germ of X at a, and (X, the formal neighbourhood. There are natural maps b a) → X (X, a) → X and (X, corresponding to the localization and completion homomorphisms OX → OX,a → bX,a . Take a point a0 above a in the blowup X 0 of X along a subvariety Z containing O a. This gives local blowups of germs and formal neighborhoods b 0 , a0 ) → (X, b a). πa0 : (X 0 , a0 ) → (X, a), π ba0 : (X The blowup of a local ring is not local in general; to get a local blowup one needs to localize also on X 0 . (d) If X1 → X is an isomorphism between varieties sending a subvariety Z1 to Z, the blowup X10 of X1 along Z1 is canonically isomorphic to the blowup X 0 of X along Z. This also holds for local isomorphisms. (e) If X = Z × Y is a cartesian product of two varieties, and a is a given point of Y , the blowup π : X 0 → X of X along Z × {a} is isomorphic to the cartesian product IdZ × τ : Z × Y 0 → Z × Y of the identity on Z with the blowup τ : Y 0 → Y of Y in a. Proposition 5.3. Let π : X 0 → X be the blowup of X along a regular subvariety Z with exceptional divisor E. Let Y be a subvariety of X, and Y ∗ = π −1 (Y ) its preimage under π. Let Y 0 be the Zariski closure of π −1 (Y \ Z) in X 0 . If Y is transversal to Z, i.e., Y ∪ Z has normal crossings at all points of the intersection BLOWUPS AND RESOLUTION 29 Y ∩ Z, also Y ∗ has normal crossings at all points of Y ∗ ∩ E. In particular, if Y is regular and transversal to Z, also Y 0 is regular and transversal to E. Proof. Having normal crossings is defined locally at each point through the completions of local rings. The assertion is proven by a computation in local coordinates for which the blowup is monomial, cf. Prop. 5.4 below.  Proposition 5.4. Let W be a regular variety of dimension n with a regular subvariety Z of codimension k. Let π : W 0 → W denote the blowup of W along Z, with exceptional divisor E. Let V be a regular hypersurface in W containing Z, let D be a (not necessarily reduced) normal crossings divisor in W having normal crossings with V . Let a be a point of V ∩ Z and let a0 ∈ E be a point lying above a. There exist local coordinates x1 , . . . , xn of W at a such that (1) a has components a = (0, . . . , 0). (2) V is defined in W by xn−k+1 = 0. (3) Z is defined in W by xn−k+1 = . . . = xn = 0. (4) D ∩ V is defined in V locally at a by a monomial xq11 · · · xqnn , for some q = (q1 , . . . , qn ) ∈ Nn with qn−k+1 = 0. (5) The point a0 lies in the xn -chart of W 0 . The chart expression of π in the xn -chart is of the form xi 7→ xi for i ≤ n − k and i = n, xi 7→ xi xn for n − k + 1 ≤ i ≤ n − 1. (6) In the induced coordinates of the xn -chart, the point a0 has components a0 = (0, . . . , 0, a0n−k+2 , . . . , a0n−k+d , 0, . . . , 0) with non-zero entries a0j ∈ K for n − k + 2 ≤ j ≤ n − k + d, where d is the number of components of D whose strict transforms do not pass through a0 . (7) The strict transform (def. 6.2) V s of V in W 0 is given in the induced coordinates locally at a0 by xn−k+1 = 0. (8) The local coordinate change ϕ in W at a given by ϕ(xi ) = xi + a0i · xn makes the local blowup π : (W 0 , a0 ) → (W, a) monomial. It preserves the defining ideals of Z and V in W . (9) If condition (4) is not imposed, the coordinates x1 , . . . , xn at a can be chosen with (1) to (3) and so that a0 is the origin of the xn -chart. Proof. [Hau10b].  0 Theorem 5.5. Any projective birational morphism π : X → X is a blowup of X in an ideal I. Proof. [Har77], chap. II, Thm. 7.17.  Examples Example 5.6. Let X be a regular subvariety of An and Z a regular closed subvariety which is transversal to X. Show that the blowup X 0 of X along Z is again a regular variety (this is a special case of Prop. 5.3). Example 5.7. + Prove that plain varieties remain plain under blowup in regular centers [BHSV08] Thm. 4.3. Example 5.8. + Is any rational and regular variety plain? 30 HERWIG HAUSER Example 5.9. Consider the blowup π : W 0 → W of a regular variety W along a closed subvariety Z. Show that, for any chosen definition of blowup, the exceptional divisor E = π −1 (Z) is a hypersurface in W 0 . Example 5.10. The composition of two blowups W 00 → W 0 and W 0 → W is a blowup of W in a suitable center [Bod03]. Example 5.11. A fractional ideal I over an integral domain R is an R-submodule of Quot(R) such that rI ⊂ R for some non-zero element r ∈ R. Blowups can be defined via Proj also for centers which are fractional ideals [Gro61]. Let I and J be two (ordinary) non-zero ideals of R. The blowup of R along I is isomorphic to the blowup of R along J if and only if there exist positive integers k, ` and fractional ideals K, L over R such that JK = I k and IL = J ` [Moo01] Cor. 2. Example 5.12. . Determine the equations in X × P2 of the blowup of X = A3 along the image Z of the monomial curve (t3 , t4 , t5 ) of equations g1 = y 2 − xz, g2 = yz − x3 , g3 = z 2 − x2 y. Example 5.13. . The blowup of the cone X = V (x2 − yz) in A3 along the zaxis Z = V (x, y) is an isomorphism locally at all points outside 0, but not globally on X. Example 5.14. . Blow up the non-reduced point X = V (x2 ) in A2 in the (reduced) origin Z = 0. Example 5.15. . Blow up the subscheme X = V (x2 , xy) of A2 in the reduced origin. Example 5.16. Blow up the subvariety X = V (xz, yz) of A3 first in the origin, then in the x-axis, and determine the points where the resulting morphisms are local isomorphisms. Example 5.17. . The blowups of A3 along the union of the x- with the y-axis, respectively along the cusp, with ideals (xy, z) and (x3 − y 2 , z), are singular. 6. Lecture VI: Transforms of Ideals and Varieties under Blowup Throughout this section, π : W 0 → W denotes the blowup of a variety W along a closed subvariety Z, with exceptional divisor E = π −1 (Z) defined by the principal ideal IE of OW 0 . Let π ∗ : OW → OW 0 be the dual homomorphism of π. Let X ⊂ W be a closed subvariety, and let I be an ideal on W . Several of the subsequent definitions and results can be extended to the case of arbitrary birational morphisms, taking for Z the complement of the open subset of W where the inverse map of π is defined. Definition 6.1. The inverse image X ∗ = π −1 (X) of X and the extension I = π ∗ (I) = I · OW 0 of I are called the total transform of X and I under π. For f ∈ OW , denote by f ∗ its image π ∗ (f ) in OW 0 . The ideal I ∗ is generated by all transforms f ∗ for f varying in I. If I is the ideal defining X in W , the ideal I ∗ defines X ∗ in W 0 . In particular, the total transform of the center Z equals the exceptional divisor E, and W ∗ = W 0 . In the category of schemes, the total transform will in general be non-reduced when considered as a subscheme of W 0 . ∗ BLOWUPS AND RESOLUTION 31 Definition 6.2. The Zariski closure of π −1 (X \ Z) in W 0 is called the strict transform of X under π and denoted by X s , also known as the proper or birational transform. The strict transform is a closed subvariety of the total transform X ∗ . The difference X ∗ \ X s is contained in the exceptional locus E. If Z ⊂ X is e of X contained in X, the strict transform X s of X in W 0 equals the blowup X along Z, cf. Prop. 5.1 and its corollary. If the center Z coincides with X, the strict transform X s is empty. Let IU denote the restriction of an ideal I to the open set U = W \ Z. Set U 0 = π −1 (U ) ⊂ W 0 and let τ : U 0 → U be the restriction of π to U 0 . The strict transform I s of the ideal I is defined as τ ∗ (IU ) ∩ OW 0 . If the ideal I defines X in W , the ideal I s defines X s in W 0 . It equals the union of colon ideals [ i Is = (I ∗ : IE ). i≥0 Let h be an element of O at a0 , W 0 ,a0 defining E locally in W 0 at a point a0 . Then, locally I s = (f s , f ∈ I), where the strict transform f of f is defined at a0 and up to multiplication by invertible elements in OW 0 ,a0 through f ∗ = hk · f s with maximal exponent k. The value of k is the order of f ∗ along E, cf. def. 8.4. By abuse of notation this is written as f s = h−k · f ∗ = h−ordZ f · f ∗ . s Lemma 6.3. Let f : R → S be a ring homomorphism, I an ideal of R and s an element of R, with induced ring homomorphism fs : Rs → Sf (s) . Let I e = f (I) · S and (I · Rs )e = fs (I · Rs ) · Sf (s) denote the respective extensions of ideals. Then S e i e i≥0 (I : f (s) ) = (I · Rs ) ∩ S. S Proof. Let u ∈ S. Then u ∈ i≥0 (I e : f (s)i ) if and only if uf (s)i ∈ I e for P some i ≥ 0, say uf (s)i = j aj f (xj ) for elements xj ∈ I and aj ∈ S. Rewrite this P x  as u = j aj f ( sij ). This just means that u ∈ (I · Rs )e . Remark 6.4. If I is generated locally by elements f1 , . . . , fk of OW , then I s contains the ideal generated by the strict transforms f1s , . . . , fks of f1 , . . . , fk , but the inclusion can be strict, see the examples below. Definition 6.5. Let K[x] = K[x1 , . . . , xn ] be the polynomial ring over K, considered with the natural grading given by the degree. Denote by in(g) the homogeneous form of lowest degree of a non-zero polynomial g of K[x], called the initial form of g. Set in(0) = 0. For a non-zero ideal I, denote by in(I) the ideal generated by all initial forms in(g) of elements g of I, called the initial ideal of I. Elements g1 , . . . , gk of an ideal I of K[x] are a Macaulay basis of I if their initial forms in(g1 ), . . . , in(gk ) generate in(I). In [Hir64] III.1, def. 3, p. 208, such a basis was called a standard basis, which is now used for a slightly more specific concept, see Rem. 6.7 below. By noetherianity of K[x], any ideal possesses a Macaulay basis. Proposition 6.6. (Hironaka) The strict transform of an ideal under blowup in a regular center is generated by the strict transforms of the elements of a Macaulay basis of the ideal. Proof. ([Hir64], III.2, Lemma 6, p. 216, and III.6, Thm. 5, p. 238) If I ⊂ J are two ideals of K[[x]] such that in(I) = in(J) then they are equal, I = J. This holds at 32 HERWIG HAUSER least for degree compatible monomial orders, due to the Grauert-Hironaka-Galligo division theorem. Therefore it has to be shown that in(g1s ), . . . , in(gks ) generate in(I s ). But in(I s ) = (in(I))s , and the assertion follows.  Remark 6.7. The strict transform of a Macaulay basis at a point a0 of W 0 need no longer be a Macaulay basis. This is however the case if the Macaulay basis is reduced and the sequence of its orders has remained constant at a0 , cf. [Hir64] III.8, Lemma 20, p. 254. More generally, taking on K[x] instead of the grading by degree a grading so that all homogeneous pieces are one-dimensional and generated by monomials (i.e., a grading induced by a monomial order on Nn ), the initial form of a polynomial and the initial ideal are both monomial. In this case Macaulay bases are called standard bases. A standard basis g1 , . . . , gk is reduced if no monomial of the tails gi − in(gi ) belongs to in(I). If the monomial order is degree compatible, i.e., the induced grading a refinement of the natural grading of K[x] by degree, the strict transforms of the elements of a standard basis of I generate the strict transform of the ideal. Definition 6.8. Let I be an ideal on W and let c ≥ 0 be a natural number less than or equal to the order d of I along the center Z, cf. def. 8.4. Then I ∗ has c order ≥ c along E. There exists a unique ideal I ! of OW 0 such that I ∗ = IE · I !, called the controlled transform of I with respect to the control c. It is not defined for values of c > d. In case that c = d attains the maximal value, I ! is denoted by −ordZ I −d I g and called the weak transform of I. It is written as I g = IE · I ∗ = IE · I ∗. Remark 6.9. The inclusions I ∗ ⊂ I g ⊂ I ! ⊂ I s are obvious. The components of V (I g ) which are not contained in V (I s ) lie entirely in the exceptional divisor E, but can be strictly contained. For principal ideals, I g and I s coincide. When ∗ of the total the transforms are defined scheme-theoretically, the reduction Xred ∗ transform X of X consists of the union of E with the strict transform X s . Definition 6.10. A local flag F on W at a is a chain F0 = {a} ⊂ F1 ⊂ . . . ⊂ Fn = W of regular closed subvarieties, respectively subschemes, Fi of dimension i of an open neighbourhood U of a in W . Local coordinates x1 , . . . , xn on W at a are called subordinate to the flag F if Fi = V (xi+1 , . . . , xn ) locally at a. The flag F at a is transversal to a regular subvariety Z of W if each Fi is transversal to Z at a [Hau04, Pan06]. Proposition 6.11. Let π : W 0 → W be the blowup of W along a center Z transversal to a flag F at a ∈ Z. Let x1 , . . . , xn be local coordinates on W at a subordinate to F. At each point a0 of E above a there exists a unique local flag F 0 such that the coordinates x01 , . . . , x0n on W 0 at a0 induced by x1 , . . . , xn as in def. 4.12 are subordinate to F 0 [Hau04] Thm. 1. Definition 6.12. The flag F 0 is called the transform of F under π. Proof. It suffices to define Fi0 at a0 by x0i+1 , . . . , x0n . For point blowups in W , the transform of F is defined as follows. The point a0 ∈ E is determined by a line L in the tangent space Ta W of W at a. Let k ≤ n be the minimal index for which Ta Fk contains L. For i < k, choose a regular (i + 1)-dimensional subvariety Hi of W with tangent space L + Ta Fi at a. In particular, Ta Hk−1 = Ta Fk . Let His be the strict transform of Hi in W 0 . Then set Fi0 = E ∩ His for i < k, BLOWUPS AND RESOLUTION Fi0 = Fis to get the required flag F 0 at a0 . 33 for i ≥ k,  Examples Example 6.13. Blow up A2 in 0 and compute the inverse image of the zerosets of x + y 2 = 0, xy = 0 and x(x − y 2 ) = 0, as well as their strict transforms. 2 Example 6.14. . Compute the strict transform of X = V (x2 −y 3 , xy−z 3 ) ⊂ A3 under the blowup of the origin. Example 6.15. Determine the total, weak and strict transform of X = V (x2 − y , z 3 ) ⊂ A3 under the blowup of the origin. Clarify the algebraic and geometric differences between them. 3 Example 6.16. Blow up A3 along the curve y 2 − x3 + x = z = 0 and compute the strict transform of the lines x = z = 0 and y = z = 0. Example 6.17. Let I1 and I2 be ideals of K[x] of order c1 and c2 at 0. Take the blowup of An at zero. Show that the weak transform of I1c2 + I2c1 is the sum of the weak transforms of I1c2 and I2c1 . Example 6.18. . For W = A3 , a flag at a point a consists of a regular curve F1 through a and contained in a regular surface F2 . Blow up the point a in W , so that E ' P2 is the projective plane. The induced flag at a point a0 above a depends on the location of a on E: At the intersection point p1 of the strict transform C1 = F1s of F1 with E, the transformed flag F 0 is given by F1s ⊂ F2s . Along the intersection C2 of F2s with E, the flag F 0 is given at each point p2 different from p1 by C2 ⊂ F2s . At any point p3 not on C2 the flag F 0 is given by C3 ⊂ E, where C3 is the projective line in E through p1 and p3 . Example 6.19. . Blowing up a regular curve Z in W = A3 transversal to F there occur six possible configurations of Z with respect to F. Denoting by L the plane in the tangent space Ta W of W at a corresponding to the point a0 in E above a, these are: (1) Z = F1 and L = Ta F2 , (2) Z = F1 and L 6= Ta F2 , (3) Z 6= F1 , Z ⊂ F2 and L = Ta F2 , (4) Z 6= F1 , Z ⊂ F2 and L 6= Ta F2 , (5) Z 6⊂ F2 and Ta F1 ⊂ L, (6) Z 6⊂ F2 and Ta F1 6⊂ L. Determine in each case the flag F 0 . e n → An be the blowup of An in 0 and let a0 be the Example 6.20. Let A e origin of the xn -chart of An . Compute the total and strict transforms g ∗ and g s for Q d e d g = x1 + . . . + xn−1 + xn for e = d, 2d − 1, 2d, 2d + 1 and g = i6=j (xi − xj ). Example 6.21. Determine the total, weak and strict transform of X = V (x2 − y , z 3 ) ⊂ A3 under the blowup of A3 at the origin. Point out the geometric differences between the three types of transforms. 3 Example 6.22. . The inclusion I g ⊂ I s can be strict. Blow up A2 at 0, and e 2 the transforms of I = (x2 , y 3 ). Show that I g = (x2 , y), consider in the y-chart of A s 2 I = (x , 1) = K[x, y]. Example 6.23. . Let X = V (f ) be a hypersurface in An and Z a regular closed subvariety which is contained in the locus of points of X where f attains its e n → An be the blowup along Z and let X 0 = V (f 0 ) be maximal order. Let π : A the strict transform of X. Show that for points a ∈ Z and a0 ∈ E with π(a0 ) = a the inequality orda0 f 0 ≤ orda f holds. 34 HERWIG HAUSER 7. Lecture VII: Resolution Statements Definition 7.1. A non-embedded resolution of the singularities of a variety X e together with a proper birational morphism π : X e →X is a non-singular variety X e which induces a biregular isomorphism π : X \ E → X \ Sing(X) outside E = π −1 (Sing(X)). Remark 7.2. Requiring properness excludes trivial cases as e.g. taking for e the locus of regular points of X and for π the inclusion map. One may ask X for additional properties: (a) Any automorphism ϕ : X → X of X shall lift to an e →X e of X e which commutes with π, i.e., π◦ϕ automorphism ϕ e:X e = ϕ◦π. (b) If X is defined over K and K ⊂ L is a field extension, any resolution of XL = X ×K Spec(L) shall induce a resolution of X = XK . Definition 7.3. A local non-embedded resolution of a variety X at a point e a0 ) of a non-singular variety X e together with a local morphism a is the germ (X, 0 e e and X. π : (X, a ) → (X, a) inducing an isomorphism of the function fields of X Definition 7.4. Let X be an affine irreducible variety with coordinate ring R = K[X]. A (local, ring-theoretic) non-embedded resolution of X is a ring extene of R into a regular ring R e having the same quotient field as R. sion R ,→ R Definition 7.5. Let X be a subvariety of a regular ambient variety W . An f → W embedded resolution of X consists of a proper birational morphism π : W f from a regular variety W onto W which is an isomorphism over W \ Sing(X) such that the strict transform X s of X is regular and the total transform X ∗ = π −1 (X) of X has simple normal crossings. Definition 7.6. A strong resolution of a variety X is, for each closed embedf → W ding of X into a regular variety W , a birational proper morphism π : W satisfying the following five properties [EH02]: f and the strict transform X s of X are regular, Embeddedness. The variety W f has simple normal crossings. and the total transform X ∗ = π −1 (X) of X in W Equivariance. Let W 0 → W be a smooth morphism and let X 0 be the inverse f 0 → W 0 induced by π : X e → W by taking image of X in W 0 . The morphism π 0 : W 0 e fiber product of X and W over W is an embedded resolution of X 0 . e → X of π to X does not depend on the choice Excision. The restriction τ : X of the embedding of X in W . Explicitness. The morphism π is a composition of blowups along regular centers which are transversal to the exceptional loci created by the earlier blowups. Effectiveness. There exists, for all varieties X, a local upper semicontinuous invariant inva (X) in a well-ordered set Γ, depending only and up to isomorphism of the completed local rings of X at a, such that: (a) inva (X) attains its minimal value if and only if X is regular at a (or has normal crossings at a); (b) the top locus S of inva (X) is closed and regular in X; (c) blowing up X along S makes inva (X) drop at all points a0 above the points a of S. Remark 7.7. (a) Equivariance implies the economy of the resolution, i.e., that π : X s → X is an isomorphism outside Sing(X). It also implies that π commutes BLOWUPS AND RESOLUTION 35 with open immersions, localization, completion, automorphisms of W stabilizing X and taking cartesian products with regular varieties. (b) One may require in addition that the centers of a resolution are transversal to the inverse images of a given normal crossings divisor D in W , the boundary. Definition 7.8. Let I be an ideal on a regular ambient variety W . A logf → W from a regular variety resolution of I is a proper birational morphism π : W f W onto W which is an isomorphism over W \ Sing(I) such that I ∗ = π −1 (I) is a f. locally monomial ideal on W Examples Example 7.9. The blowup of the cusp X : x2 = y 3 in A2 at 0 produces a non-embedded resolution. Further blouwps give an embedded resolution. Example 7.10. . Determine the geometry at 0 of the hypersurfaces in A4 defined by the following equations: (a) x + x7 − 3yw + y 7 z 2 + 17yzw5 = 0, (b) x + x5 y 2 − 3yw + y 7 z 2 + 17yzw5 = 0, (c) x3 y 2 + x5 y 2 − 3yw + y 7 z 2 + 17yzw5 = 0. Example 7.11. Let X be the variety in A3C given by the equation (x2 − y 3 )2 = (z − y 2 )3 . Show that the map α : A3 → A3 : (x, y, z) → (u2 z 3 , uyz 2 , uz 2 ), with u(x, y) = x(y 2 − 1) + y, resolves the singularities of X. What is the inverse image α−1 (Z)? Produce instructive pictures of X over R. 2 Example 7.12. Consider the inverse images of the cusp X = V (y 2 − x3 ) in A2 under the maps πx , πy : A2 → A2 , πx (x, y) = (x, xy), πy (x, y) = (xy, y). Factor the maximal power of x, respectively y, from the equation of the inverse image of X and show that the resulting equation defines in both cases a regular variety. Apply the same process to the variety E8 = V (x2 + y 3 + z 5 ) ⊂ A3 repeatedly until all resulting equations define non-singular varieties. Example 7.13. Let R be the coordinate ring of an irreducible plane algebraic e of R in the field of fractions of R is a regular ring curve X. The integral closure R e is the normalization of X [Mum99] and thus resolves R. The resulting curve X III.8, [dJP00] 4.4. Example 7.14. . Consider a cartesian product X = Y × Z with Z a regular variety. Show that a resolution of X can be obtained from a resolution Y 0 of Y by taking the cartesian product Y 0 × Z of Y 0 with Z. Example 7.15. Let X and Y be two varieties (schemes, analytic spaces) with singular loci Sing(X) and Sing(Y ) respectively. Suppose that X 0 and Y 0 are regular varieties (schemes, analytic spaces, within the same category as X and Y ) together with proper birational morphisms π : X 0 → X and τ : Y 0 → Y which define resolutions of X and Y respectively, and which are isomorphisms outside Sing(X) and Sing(Y ). There is a naturally defined proper birational morphism f : X 0 ×Y 0 → X × Y giving rise to a resolution of X × Y . 36 HERWIG HAUSER 8. Lecture VIII: Invariants of Singularities Definition 8.1. A stratification of an algebraic variety X is a decomposition of X into finitely many disjoint locally closed subvarieties Xi , called the strata, [ ˙ X= Xi , i such that the boundaries X i \ Xi of strata are unions of strata. This last property is called the frontier condition. Two strata are called adjacent if one lies in the closure of the other. Definition 8.2. A local invariant on an algebraic variety X is a function inv(X) : X → Γ from X to a well-ordered set (Γ, ≤) which associates to each point a ∈ X an element inva (X) depending only on the formal isomorphism class of X at bX,a ' O bX,b , then inva (X) = a: If (X, a) and (X, b) are formally isomorphic, viz O invb (X). Usually, the ordering on Γ will also be total: for any c, d ∈ Γ either c ≤ d or d ≤ c holds. The invariant is upper semicontinuous along a subvariety S of X if for all c ∈ Γ, the sets topS (inv, c) = {a ∈ S, inva (X) ≥ c} are closed in S. If S = X, the map inv(X) is called upper semicontinuous. Remark 8.3. The upper semicontinuity signifies that the value of inva (X) can only go up or remain the same when a approaches a limit point. In the case of schemes, the value of inv(X) also has to be defined and taken into account at non-closed points of X. Definition 8.4. Let X be a subvariety of a not necessarily regular ambient variety W defined by an ideal I, and let Z be an irreducible subvariety of W defined by the prime ideal J. The order of X or I in W along Z or with respect to J is the maximal integer k = ordZ (X) = ordZ (I) such that IZ ⊂ JZk , where IZ = I · OW,Z and JZ = J · OW,Z denote the ideals generated by I and J in the localization OW,Z of W along Z. If Z = {a} is a point of W , the order of X and I at a is denoted by orda (X) = orda (I) or ordma (X) = ordma (I). Definition 8.5. Let R be a local ring with maximal ideal m. Let k ∈ N be an integer. The k-th symbolic power J (k) of a prime ideal J is defined as the ideal generated by all elements x ∈ R for which there is an element y ∈ R \ J such that y · xk ∈ J k . Equivalently, J (k) = J k · RJ ∩ R. Remark 8.6. The symbolic power is the smallest J-primary ideal containing J k . If J is a complete intersection, the ordinary power J k and the symbolic power J (k) coincide [ZS75] IV, [Hoc73], §12, [Pel88]. Proposition 8.7. Let X be a subvariety of a not necessarily regular ambient variety W defined by an ideal I, and let Z be an irreducible subvariety of W defined by the prime ideal J. The order of X along Z is the maximal integer k such that I ⊂ J (k) . Proof. This follows from the equality J k · RJ = (J · RJ )k .  Proposition 8.8. Let R be a noetherian local ring with maximal ideal m, and b denote its completion with maximal ideal m b Let I be an ideal of R, let R b = m · R. b Then ordm (I) = ordm b with completion Ib = I · R. ( I). b BLOWUPS AND RESOLUTION 37 b Proof. If I ⊂ m k , then also Ib ⊂ m b k , and hence ordm (I) ≤ ordm b (I). ConT i versely, m = m b ∩ R and i≥0 (I + m ) = Ib ∩ R by Lemma 2.26. Hence, if Ib ⊂ m b k, b then I ⊂ Ib ∩ R ⊂ m b k ∩ R = m k , so that ordm (I) ≥ ordm  b (I). Definition 8.9. Let X be a subvariety of a regular variety W , and let a be a point of W . The local top locus topa (X) of X at a with respect to the order is the stratum S of points of an open neighborhood U of a in W where the order of X equals the order of X at a. The top locus top(X) of X with respect to the order is the (global) stratum S of points of W where the order of X attains its maximal value. For c ∈ N, define topa (X, c) and top(X, c) as the local and global stratum of points of W where the order of X is at least c. Remark 8.10. The analogous definition holds for ideals on W and can be made for other local invariants. By the upper semicontinuity of the order, the local top locus of X at a is locally closed in W , and the top locus of X is closed in W . Proposition 8.11. The order of a variety X or an ideal I in a regular variety W at points of W defines an upper semicontinuous local invariant on W . Proof. In characteristic zero, the assertion follows from the next proposition. For the case of positive characteristic, see [Hir64] III.3, Cor. 1, p. 220.  Proposition 8.12. Over fields of zero characteristic, the local top locus topa (I) of an ideal I at a is defined by the vanishing of all partial derivatives of elements of I up to order o − 1, where o is the order of I at a. Proof. In zero characteristic, a polynomial has order o at a point a if and only if all its partial derivatives up to order o − 1 vanish at a.  Proposition 8.13. Let X be a subvariety of a regular ambient variety W . Let Z be a non-singular subvariety of W and a a point on Z such that locally at a the order of X is constant along Z, say equal to d = orda X = ordZ X. Consider the blowup π : W 0 → W of W along Z with exceptional divisor E = π −1 (Z). Let a0 be a point on E mapping under π to a. Denote by X ∗ , X g and X s the total, weak and strict transform of X respectively (def. 6.1 and 6.2). Then, locally at a0 , the order of X ∗ along E is d, and orda0 X s ≤ orda0 X g ≤ d. Proof. By Prop. 5.4 there exist local coordinates x1 , . . . , xn of W at a such that Z is defined locally at a by x1 = . . . = xk = 0 for some k ≤ n, and such that a0 is the origin of the x1 -chart of the blowup. Let I ⊂ OW,a be the local P ideal of X in W at a, and let f be an element of I. It has an expansion f = α∈Nn cα xα with respect to the coordinates x1 , . . . , xn , with coefficients cα ∈ K. Set α+ = (α1 , . . . , αk ). Since the order of X is constant along Z, the inequality |α+ | = α1 + . . . + αk ≥ d holds whenever cα 6= 0. There is an element f with an exponent α such that cα 6= 0 and such that |α| = |α+ | = d. The total transform X ∗ and the weak transform X g are given locally at a0 by the ideal generated by all X |α | αn 2 f∗ = cα x1 + xα 2 . . . xn , α∈Nn 38 HERWIG HAUSER respectively fg = X |α+ |−d α2 x2 cα x 1 n . . . xα n , α∈Nn for f varying in I. The exceptional divisor E is given locally at a0 by the equation x1 = 0. This implies that, locally at a0 , ordE f ∗ ≥ d for all f ∈ I and ordE f ∗ = d for the special f chosen above with |α| = |α+ | = d. Therefore ordE X ∗ = d locally at a0 . Since orda0 f g ≤ |α− | ≤ d for the chosen f , it follows that orda0 X g ≤ d. The ideal I s of the strict transform X s contains the ideal I g of the weak transform X g , thus also orda0 X s ≤ orda0 X g .  Corollary 8.14. If the order of X is globally constant along Z, the order of X ∗ along E is globally equal to d. Definition 8.15. Let X be a subvariety of a regular variety W , and let W 0 → W be a blowup with center Z. Denote by X 0 the strict or weak transform in W 0 . A point a0 ∈ W 0 above a ∈ Z is called infinitesimally near to a or equiconstant if orda0 X 0 = orda X. Definition 8.16. Let X be a variety defined over a field K, and let a be a point of W . The Hilbert-Samuel function HSa (X) : N → N of X at a is defined by k+1 k HSa (X)(k) = dimK (mX,a /mX,a ), where mX,a denotes the maximal ideal of the local ring OX,a of X at a. If X is a subvariety of a regular variety W defined by an ideal I, with local ring OX,a = OW,a /I, one also writes HSa (I) for HSa (X). Remark 8.17. The Hilbert-Samuel function does not depend on the embedding of X in W . There exists a univariate polynomial P (t) ∈ Q[t], called the HilbertSamuel polynomial of X at a, such that HSa (X)(k) = P (k) for all sufficiently large k [Ser00]. The Hilbert-Samuel polynomial provides local information on the singularity of X at a point as e.g. the multiplicity and the local dimension. Theorem 8.18. The Hilbert-Samuel function of a subvariety X of a regular variety W defines an upper semicontinuous local invariant on X with respect to the lexicographic ordering of integer sequences. Proof. [Ben70] Thm. 4, p. 82, cf. also [Hau04].  Theorem 8.19. Let π : W 0 −→ W be the blowup of W along a non-singular center Z. Let I be an ideal of OW . Assume that the Hilbert-Samuel function of I is constant along Z, and denote by I s the strict transform of I in W 0 . Let a0 ∈ E be a point in the exceptional divisor mapping under π to a. Then HSa0 (I s ) ≤ HSa (I) holds with respect to the lexicographic ordering of integer sequences. Proof. [Ben70] Thm. 0, [Hau04].  Theorem 8.20. (Zariski-Nagata, [Hir64] III.3, Thm. 1, p. 218) Let S ⊂ T be closed irreducible subvarieties of a closed subvariety X of a regular ambient variety W . The order of X in W along T is less than or equal to the order of X in W along S. BLOWUPS AND RESOLUTION 39 Remark 8.21. In the case of schemes, the assertion says that if X is embedded in a regular ambient scheme W , and a, b are points of X such that a lies in in the closure of b, then ordb X ≤ orda X. Proof. The proof goes in several steps and relies on the resolution of curves. Let R be a regular local ring, m its maximal ideal, p a prime ideal in R and I 6= 0 a non-zero ideal in R. Denote by νp (I) the maximal integer ν ≥ 0 such that I ⊂ pν . Recall that ordp (I) is the maximal integer n such that IRp ⊂ pn Rp or, equivalently, I ⊂ p(ν) , where p(ν) = pν Rp ∩ R denotes the ν-th symbolic power of p. Thus νp (I) ≤ ordp (I) and the inequality can be strict if p is not a complete intersection, in which case the usual and the symbolic powers of p may differ. Write ν(I) = νm (I) for the maximal ideal m so that νp (I) ≤ ν(I) and νp (I) ≤ ν(IRp ) = ordp (I). The assertion of the theorem is equivalent to the inequality ν(IRp ) ≤ ν(I), taking for R the local ring OW,S of W along S, for I the ideal of R defining X in W along S and for p the ideal defining T in W along S. If R/p is regular, then νp (I) = ν(IRp ) because pn Rp ∩ R = pn : The inclusion n p ⊆ pn Rp ∩ R is clear, so suppose that x ∈ pn Rp ∩ R. Choose y ∈ pn and s 6∈ p such that xs = y. Then n ≤ νp (y) = νp (xs) = νp (x) + νp (s) = νp (x), hence x ∈ pn . It follows that ν(IRp ) ≤ ν(I). It remains to prove the inequality in the case that R/p is not regular. Since R is regular, there is a chain of prime ideals p = p0 ⊂ . . . ⊂ pk = m in R with dim(Rpi /pi−1 Rpi ) = 1 for 1 ≤ i ≤ n. By induction on the dimension of R/p, it therefore suffices to prove the inequality in the case dim(R/p) = 1. Since the order remains constant under completion of a local ring by Prop. 8.8, it can be assumed that R is complete. By the resolution of curve singularities there exists a sequence of complete regular local rings R = R0 → R1 → . . . → Rk with prime ideals p0 = p and pi ⊂ Ri with the following properties: (1) Ri+1 is the blowup of Ri with center the maximal ideal mi of Ri . (2) (Ri+1 )pi+1 = (Ri )pi . (3) Rk /pk is regular. Set I0 = I and let Ii+1 be the weak transform of Ii under Ri → Ri+1 . Set R0 = Rk , I 0 = Ik and p0 = pk . The second condition on the blowups Ri of Ri−1 implies ν(IRp ) = ν(I 0 Rp0 0 ). By Prop. 8.13 one knows that ν(I 0 ) ≤ ν(I). Further, since R0 /p0 is regular, ν(I 0 Rp0 0 ) ≤ ν(I 0 ). Combining these inequalities yields ν(IRp ) ≤ ν(I).  Proposition 8.22. An upper semicontinuous local invariant inv(X) : X → Γ with values in a totally well ordered set Γ induces, up to refinement, a stratification of X with strata Xc = {a ∈ X, inva (X) = c}, for c ∈ Γ. Proof. For a given value c ∈ Γ, let S = {a ∈ X, inva (X) ≥ c} and T = {a ∈ X, inva (X) = c}. The set S is a closed subset of X. If c is a maximal value of the invariant on X, the set T equals S and is thus a closed stratum. If c is not maximal, let c0 > c be an element of Γ which is minimal with c0 > c. Such elements exist since Γ is well-ordered. As Γ is totally ordered, c0 is unique. Therefore S 0 = {a ∈ X, inva (X) ≥ c0 } = {a ∈ X, inva (X) > c} = S \ T is closed in X. Therefore T is open in S and hence locally closed in X. As S is closed in X and T ⊂ S, the closure T is contained in S. It follows that the 40 HERWIG HAUSER boundary T \ T is contained in S 0 and closed in X. Refine the strata by replacing S 0 by T \ T and S 0 \ T to get a stratification.  Examples Example 8.23. The singular locus S = Sing(X) of a variety is closed and properly contained in X. Let X1 = Reg(X) be the set of regular points of X. It is open and dense in X. Repeat the procedure with X \ X1 = Sing(X). By noetherianity, the process eventually stops, yielding a stratification of X in regular strata. The strata of locally minimal dimension are closed and non-singular. The frontier condition holds, since the regular points of a variety are dense in the variety, and hence X 1 = X = X1 ∪˙ Sing(X). Example 8.24. There exists a threefold X whose singular locus Sing(X) consists of two components, a non-singular surface and a singular curve meeting the surface at a singular point of the curve. The stratification by iterated singular loci as in the preceding example satisfies the frontier condition. Example 8.25. . Give an example of a variety whose stratification by the iterated singular loci has four different types of strata. Example 8.26. Find interesting stratifications for three three-folds. Example 8.27. The stratification of an upper semicontinuous invariant need not be finite. Take for Γ the set X underlying a variety X with the trivial (partial) ordering a ≤ b if and only if a = b. Example 8.28. Let X be the non-reduced scheme defined by xy 2 = 0 in A2 . The order of X at points of the y-axis outside 0 is 1, at points of the x-axis outside 0 it is 2, and at the origin it is 3. The local embedding dimension equals 1 at points of the y-axis outside 0, and 2 at all points of the x-axis. Example 8.29. Determine the stratification given by the order for the following varieties. If the smallest stratum is regular, blow it up and determine the stratification of the strict transform. Produce pictures and describe the geometric changes. (a) Cross: xyz = 0, (b) Whitney umbrella: x2 − yz 2 = 0, (c) Kolibri: x3 + x2 z 2 − y 2 = 0, (d) Xano: x4 + z 3 − yz 2 = 0, (e) Cusp & Plane: (y 2 − x3 )z = 0. Example 8.30. . Consider the order ordZ I of an ideal I in K[x1 , . . . , xn ] along a closed subvariety Z of An , defined as the order of I in the localization of K[x1 , . . . , xn ]J of K[x1 , . . . , xn ] at the ideal J defining Z in An . Express this in terms of the symbolic powers J (k) = J k · K[x1 , . . . , xn ]J ∩ K[x1 , . . . , xn ] of J. Give an example to show that ordZ I need not coincide with the maximal power k such that I ⊂ J k . If J defines a complete intersection, the ordinary powers J k and the symbolic powers J (k) coincide. This holds in particular when Z is a coordinate subspace of An [ZS75] IV, §12, [Hoc73],[Pel88]. Example 8.31. . 2 The ideal I = (y 2 − xz, yz − x3 , z 2 − x2 y) of K[x, y, z] has symbolic square I (2) which strictly contains I 2 . 2 This example is due to Macaulay and was kindly communicated by M. Hochster. BLOWUPS AND RESOLUTION 41 Example 8.32. . The variety defined by I = (y 2 − xz, yz − x3 , z 2 − x2 y) in A3 has parametrization t 7→ (t3 , t4 , t5 ). Let f = x5 + xy 3 + z 3 − 3x2 yz. For all maximal ideals m which contain I, f ∈ m 2 and thus, ordm f ≥ 2. But f 6∈ I 2 . Since xf ∈ I 2 and x does not belong to I, it follows that f ∈ I 2 RI and thus ordI f ≥ 2, in fact, ordI f = 2. Example 8.33. The order of an ideal depends on the embedding of X in W . If X is not minimally embedded locally at a, the order of X at a is 1 and not significant for measuring the complexity of the singularity of X at a. Example 8.34. Associate to a stratification of a variety the so called Hasse diagram, i.e., the directed graph whose nodes and edges correspond to strata, respectively to the adjacency of strata. Determine the Hasse diagram for the surface X given in A4 as the cartesian product of the cusp C : x2 = y 3 with the node D : x2 = y 2 +y 3 . Then project X to A3 by means of A4 → A3 , (x, y, z, w) 7→ (x, y+z, w) and compute the Hasse diagram of the image Y of X under this projection. Example 8.35. Show that the order of a hypersurface, the dimension and the Hilbert-Samuel function of a variety, the embedding-dimension of a variety and the local number of irreducible components are invariant under local formal isomorphisms, and determine whether they are upper or lower semicontinuous. How does each of these invariants behave under localization and completion? Example 8.36. Take inva (X) = dima (X), the dimension of X at a. It is constant on irreducible varieties, and upper semicontinuous on arbitrary ones, because at an intersection point of several components, dima (X) is defined as the maximum of the dimensions of the components. Example 8.37. Take inva (X) = the number of irreducible components of X passing through a. If the components carry multiplicities as e.g. a divisor, one may alternatively take the sum of the multiplicities of the components passing through a. Both options produce an upper semicontinuous local invariant. Example 8.38. Take inva (X) = embdima (X) = dim Ta X, the local embedding dimension of X at a. It is upper semicontinuous. At regular points, it equals the dimension of X at a, at singular points it exceeds this dimension. Example 8.39. . Consider for a given coordinate system x, y1 , . . . , yn on An+1 a polynomial of order c at 0 of the form g(x, y1 , . . . , yn ) = xc + c−1 X gi (y) · xi . i=0 Express the order and the top locus of g nearby 0 in terms of the orders of the coefficients gi . Example 8.40. Take inva (X) = HSa (X), the Hilbert-Samuel function of X at a. The lexicographic order on integer sequences defines a well-ordering on Γ = {γ : N → N}. Find two varieties X and Y with points a and b where HSa (X) and HSb (Y ) only differ from the fourth entry on. Example 8.41. Take inva (X) = νa∗ (X) the increasingly ordered sequence of the orders of a minimal Macaulay basis of the ideal I defining X in W at a [Hir64] III.1, def. 1 and Lemma 1, p. 205. It is upper semicontinuous but does not behave 42 HERWIG HAUSER well under specialization [Hir64] III.3, Thm. 2, p. 220 and the remark after Cor. 2, p. 220, see also [Hau98], ex. 12. Example 8.42. Let a monomial order <ε on Nn be given, i.e., a total ordering with minimal element 0 which is compatible with addition in Nn . The initial ideal in(I) of an ideal I of K[[x1 , . . . , xn ]] with respect to <ε is the ideal generated by all initial monomials of elements f of I, i.e., the monomials with minimal exponent with respect to <ε in the series expansion of f . The initial monomial of 0 is 0. The initial ideal is a monomial ideal in K[[x1 , . . . , xn ]] and depends on the choice of coordinates. If the monomial order <ε is compatible with degree, in(I) determines the Hilbert-Samuel function HSa (I) of I [Hau04]. Order monomial ideals totally by comparing their increasingly ordered unique minimal monomial generator system lexicographically, where any two monomial generators are compared with respect to <ε . If two monomial ideals have generator systems of different length, complete the sequences of their exponents by a symbol ∞ so as to be able to compare them. This defines a well-order on the set of monomial ideals. Take for inva (X) the minimum min(I) or the maximum max(I) of the initial ideal of the ideal I of X at a, the minimum and maximum being taken over all choices of local coordinates, say regular parameter systems of K[[x1 , . . . , xn ]]. Both exist and define local invariants which are upper semicontinuous with respect to localization [Hau04] Thms. 3 and 8. (a) The minimal initial ideal min(I) = minx {in(I)} over all choices of regular parameter systems of K[[x1 , . . . , xn ]] is achieved for almost all regular parameter systems. (b)+ Let I be an ideal in K[x1 , . . . , xn ]. For a point a = (a1 , . . . , an ) ∈ An denote by Ia the induced ideal in K[[x1 − an , . . . , xn − an ]]. The minimal initial ideal min(Ia ) is upper semicontinuous when the point a varies. (c) Compare the induced stratification of An with the stratification by the Hilbert-Samuel function of I. (d) Let Z be a regular center inside a stratum of the stratification induced by e n → An along Z. Let the initial ideal in(I), and consider the induced blowup A 0 0 a ∈ Z and a ∈ W be a point above a. Assume that the monomial order <ε is compatible with degree. Show that mina (I) and maxa (I) do not increase when passing to the strict transform of Ia at a0 [Hau04] Thm. 6. Example 8.43. . Let (W 0 , a0 ) → (W, a) be the composition of two monomial point blowups of W = A2 with respect to coordinates y, z, defined as follows. The first is the blowup of A2 with center 0 considered at the origin of the y-chart, the second has as center the origin of the y-chart and is considered at the origin of the z-chart. Show that the order of the strict transform g 0 (y, z) at a0 of any non zero polynomial g(y, z) in W is at most the half of the order of g(y, z) at a. Example 8.44. (B. Schober) Let K be a non perfect field of characteristic 3, let t ∈ K \ K2 be an element which is not a square. Stratify the hypersurface X : x2 + y(z 2 + tw2 ) = 0 in A4 according to its singularities. Show that this stratification does not provide suitable centers for a resolution. Example 8.45. Let I = (x2 + y 17 ) be the ideal defining an affine plane curve singularity X with singular locus the origin of W = A2 . The order of X at 0 is 2. The blowup π : W 0 → W of W at the origin with exceptional divisor E is covered BLOWUPS AND RESOLUTION 43 by two affine charts, the x- and the y-chart. The total and strict transform of I in the x-chart are as follows: I∗ = (x2 + x17 y 17 ), Is = (1 + x15 y 17 ). At the origin of this chart, the order of I s has dropped to zero, so the strict transform X s of X does not contain this point. Therefore it suffices to consider the complement of this point in E, which lies entirely in the y-chart. There, one obtains the following transforms: I∗ = (x2 y 2 + y 17 ), Is = (x2 + y 15 ). The origin a0 of the y-chart is the only singular point of X s . The order of X s at a0 has remained constant equal to 2. Find a local invariant of X which has improved at a0 . Make sure that it does not depend on any choices. Example 8.46. The ideal I = (x2 + y 16 ) has in the y-chart of the point blowup of A2 at 0 the strict transform I s = (x2 + y 14 ). If the ground field has characteristic 2, the y-exponents 16 and 14 are irrelevant to measure an improvement of the singularity because the coordinate change x 7→ x + y 8 transforms I into (x2 ). Example 8.47. The ideal I = (x2 + 2xy 7 + y 14 + y 17 ) has in the y-chart the strict transform I s = (x2 + 2xy 6 + y 12 + y 15 ). Here the drop of the y-exponent of the last monomial from 17 to 15 is significant, whereas the terms 2xy 7 + y 14 can be eliminated in any characteristic by the coordinate change x 7→ x + y 7 . Example 8.48. The ideal I = (x2 + xy 9 ) = (x)(x + y 9 ) defines the union of two non-singular curves in A2 which have a common tangent line at their intersection point 0. The strict transform is I s = (x2 + xy 8 ). The degree of tangency, viz the intersection multiplicity, has decreased. Example 8.49. Let X and Y be two non-singular curves in A2 , meeting at one point a. Show that there exists a sequence of point blowups which separates the two curves, i.e., so that the strict transforms of X and Y do not intersect. Example 8.50. Take I = (x2 + g(y)) where g is a polynomial in y with order at least 3 at 0. The strict transform under point blowup in the y-chart is I s = x2 + y −2 g(y), with order at 0 equal to 2 again. This suggests to take the order of g as a secondary invariant. In characteristic 2 it may depend on the choice of coordinates. Example 8.51. Take I = (x2 + xg(y) + h(y)) where g and h are polynomials in y of order at least 1, respectively 2, at 0. The order of I at 0 is 2. The strict transform equals I s = (x2 + xy −1 g(y) + y −2 h(y)) of order 2 at 0. Here it is less clear how to detect a secondary invariant which represents an improvement. Example 8.52. Take I = (x2 + y 3 z 3 ) in A3 , and apply the blowup of A3 in the origin. The strict transform of I in the y-chart equals I s = (x2 + y 4 z 3 ) and the singularity seems to have gotten worse. Example 8.53. . Let X be a surface in three-space, and S its top locus. Assume that S is singular at a, and let X 0 be the blowup of X in a. Determine the top locus of X 0 . 44 HERWIG HAUSER 9. Lecture IX: Hypersurfaces of Maximal Contact Proposition 9.1. (Zariski) Let X be a subvariety of a regular variety W , defined over a field of arbitrary characteristic. Let W 0 → W be the blowup of W along a regular center Z contained in the top locus of X, and let a be a point of Z. There exists, in a neighbourhood U of a, a regular closed hypersurface V of U whose strict transform V s in W 0 contains all points a0 of W 0 lying above a where the order of the strict transform X s of X in W 0 has remained constant equal to the order of X along Z. Proof. Choose local coordinates x1 , . . . , xn of W at a. The associated graded ring of OW,a can be identified with K[x1 , . . . , xn ]. Let in(I) ⊂ K[x1 , . . . , xn ] denote the ideal of initial forms of elements of I at a. Apply a linear coordinate change so that generators of in(I) are expressed with the minimal number of variables, say x1 , . . . , xk , for some k ≤ n. Choose any 1 ≤ i ≤ k and define V in W at a by xi = 0. It follows that the local top locus of X at a is contained in V . Hence Z ⊂ V , locally at a. Let a0 be a point of W 0 above a where the order of X has remained constant. By Prop. 5.4 the local blowup (W 0 , a0 ) → (W, a) can be made monomial by a suitable coordinate change. The assertion then follows by computation, cf. ex. 9.8 and [Zar44].  Definition 9.2. Let X be a subvariety of a regular variety W , and let a be a point of W . A hypersurface of maximal contact for X at a is a regular closed hypersurface V of an open neighborhood U of a in W such that (1) V contains the local top locus S of X at a, i.e., the points of U where the order of X equals the order of X at a. (2) The strict transform V s of V under any blowup of U along a regular center Z contained in S contains all points a0 above a where the order of X s has remained constant equal to the order of X at a. (3) Property (2) is preserved in any sequence of blowups with regular centers contained in the successive top loci of the strict transforms of X along which the order of X has remained constant. a0 ∈ E ∩ V s ⊂ U 0 ⊂ W 0 ↓ ↓ ↓π a∈ Z ⊂ V ⊂U ⊂W Definition 9.3. Assume that the characteristic of the ground field is zero. Let X be a subvariety of a regular variety W defined locally at a point a of W by the ideal I. Let o be the order of X at a. An osculating hypersurface for X at a is a regular closed hypersurface V of a neighbourhood U of a in W defined by a derivative of order o − 1 of an element f of order o of I [EH02]. Remark 9.4. The element f has necessarily order o at a, and its (o − 1)-st derivative has order 1 at a, so that it defines a regular hypersurface at a. The concept is due to Abhyankar and Zariski [AZ55]. Abhyankar called the local isomorphism constructing an osculating hypersurface V from a given regular hypersurface H of W Tschirnhaus transformation. If H is given by xn = 0 for some coordinates x1 , . . . , xn , this transformation eliminates from f all monomials whose xn -exponent BLOWUPS AND RESOLUTION 45 is o − 1. The existence of osculating hypersurfaces was exploited systematically by Hironaka in his proof of characteristic zero resolution [Hir64]. For each point a in X, osculating hypersurfaces contain locally at a the local top locus S = topa (X), and their strict transform contain the equiconstant points above a. Proposition 9.5. (Abhyankar, Hironaka) Let X be a subvariety of a regular variety W , and let a be a point of W . For ground fields of characteristic zero there exist, locally at a in W , hypersurfaces of maximal contact for X. Any osculating hypersurface V at a has maximal contact with X at a. Proof. [EH02].  Remark 9.6. The assertion of the proposition does not hold over fields of positive characteristic: R. Narasimhan, a student of Abhyankar, gave an example of a hypersurface X in A4 over a field of characteristic 2 whose top locus is not contained at 0 in any regular local hypersurface, and Kawanoue describes a whole family of such varieties [Nar83, Kaw14], [Hau98], ex. 8. See also ex. 12.1 below. In Narasimhan’s example, there is a sequence of point blowups for which there is no regular local hypersurface V of A4 at 0 whose strict transforms contain all points where the transforms of X have order 2 as at the beginning [Hau03] II.14, ex. 2, p. 388. Remark 9.7. The existence of hypersurfaces of maximal contact in zero characteristic suggests to associate to X locally at a point a a variety Y defined by an ideal J in the hypersurface V and to observe the behaviour of X under blowup by means of the behaviour of Y under the induced blowup: the transform of Y under the blowup of V along a center Z of W locally contained in V should equal the variety Y 0 which is associated in a similar manner as Y to X to the strict transform X s of X in V s at points a0 above a where the order of X s has remained constant. The variety Y or the ideal J and their transforms may then help to measure the improvement of X s at a0 by looking at their respective orders. This is precisely the way how the proof of resolution in zero characteristic proceeds. The reasoning is also known as descent in dimension. The main problem in this approach is to define properly the variety Y , respectively the ideal J, and to show that the local construction is independent of the choice of V and patches to give a global resolution algorithm. a0 ∈ E ⊂ W 0 V0 ⊃Y0 ↓ ↓ ↓ ↓π a∈ Z⊂W ↓ π|Y 0 V ⊃Y Examples Example 9.8. . Let π : (W 0 , a0 ) → (W, a) be a local blowup and let x1 , . . . , xn be local coordinates on W at a such that π is monomial. Assume that x1 appears in the initial form of an element f ∈ OW,a , and let V ⊂ W be the local hypersurface at a defined by x1 = 0. If the order of the strict transform f s of f at a0 has remained constant equal to the order of f at a, the point a0 belongs to the strict transform V s of V . 46 HERWIG HAUSER Example 9.9. Let the characteristic of the ground field be different from 3. ∂2 3 2 5 Apply the second order differential operator ∂ = ∂x so 2 to f = x + x yz + z that ∂f = 6x + 2yz. This defines a hypersurface of maximal contact for f at 0. Replacing in f the variable x by x − 13 yz gives 1 2 g = x3 − xy 2 z 2 + y 3 z 3 + z 5 . 3 27 The term of degree 2 in x has been eliminated, and x = 0 defines an osculating hypersurface for g at 0. Example 9.10. . Assume that the characteristic is 0. Let XP⊂ An be a d−1 hypersurface defined locally at the origin by a polynomial f = xdn + i=0 ai (y)xin where y = (x1 , . . . , xn−1 ) and ord0 ai (y) ≥ d − i. Make the change of coordinates xn 7→ xn − d1 ad−1 (y). Show that after this change, the hypersurface defined by xn = 0 has maximal contact with X at the origin. What prevents this technique from working in positive characteristic? Example 9.11. . Consider the hypersurface X ⊂ A3 given by the equation x y + xy 2 − x2 z + y 2 z − xz 2 − yz 2 = 0. Show that the hypersurface V given by x = 0 does not have maximal contact with X at 0. In particular, consider the blowup of A3 in the origin. Find a point a0 on the exceptional divisor that lies in the x-chart of the blowup such that the strict transform of X has order 3 at a0 . Then show that the strict transform of V does not contain this point. 2 Example 9.12. Hypersurfaces of maximal contact are only defined locally. They need not patch to give a globally defined hypersurface of maximal contact on W . Find an example for this. Example 9.13. Consider f = x4 + y 4 + z 6 , g = x4 + y 4 + z 10 and h = xy + z 10 under point blowup. Determine, according to the characteristic of the ground field, the points where the orders of f , g and h have remained constant. Example 9.14. . Let f = xc + g(y1 , . . . , ym ) ∈ K[[x, y1 , . . . , ym ]] be a formal power series with g a series of order ≥ c at 0. Show that there exists in any characteristic a formal coordinate change maximizing the order of g. Example 9.15. Let f = xc + g(y1 , . . . , ym ) ∈ K[x, y1 , . . . , ym ] be a polynomial with g a polynomial of order ≥ c at 0. Does there exist a local coordinate change in A1+m at 0 maximizing the order of g? Example 9.16. Let f be a polynomial or power series in n variables x1 , . . . , xn of order c at 0. Assume that the ground field is infinite. There exists a linear coordinate change after which f (0, . . . , 0, xn ) has order c at 0. Such polynomials and series, called xn -regular of order c at 0, appear in the Weierstrass preparation theorem, which was frequently used by Abhyankar in resolution arguments. Example 9.17. . Let (W 0 , a0 ) → (W, a) be a composition of local blowups in regular centers such that a0 lies in the intersection of n exceptional components where n is the dimension of W at a. Let f ∈ OW,a and assume that the characteristic is zero. Show that the order of f has dropped between a and a0 . Example 9.18. + Show the same in positive characteristic. BLOWUPS AND RESOLUTION 47 10. Lecture X: Coefficient Ideals Definition 10.1. Let I be an ideal in a regular variety W , let a be a point of W with open neighbourhood U , and let V be a regular closed hypersurface of U containing a. Let x1 , . . . , xn be coordinates on U such that V is defined in U by xn = 0. The restrictions of x1 , . . . , xn−1 toP V form coordinates on V and will be abbreviated by x0 . For f ∈ OU , denote by af,i (x0 ) · xin the expansion of f with respect to xn , with coefficients af,i = af,i (x0 ) ∈ OV . The coefficient ideal of I in V at a is the ideal JV (I) on V defined by JV (I) = o−1 X o! (af,i , f ∈ I) o−i , i=0 where o denotes the order of I at a. Remark 10.2. The coefficient ideal is defined on whole V . It depends on the choice of the coordinates x1 , . . . , xn on U , even so the notation only refers to V . Actually, JV (I) depends on the choice of a section OV,a → OU,a of the map OU,a → OV,a defined by restriction to V . The same definition applies to stalks of ideals in W at points a, giving rise to an ideal, also denoted by JV (I), in the local ring OV,a . o! The weights o−i in the exponents are chosen so as to obtain a systematic behavior of the coefficient ideal under blowup, cf. Prop. 10.6 below. The chosen algebraic definition of the coefficient ideal is modelled so as to commute with blowups [EH02], but is less conceptual than definitions through differential operators proposed and used by Encinas-Villamayor, Bierstone-Milman, Wlodarczyk, Kawanoue-Matsuki and Hironaka [EV00, EV98, BM97, Wlo05, KM10, Hir03]. Proposition 10.3. The passage to the coefficient ideal JV (I) of I in V commutes with taking germs along the local top locus S = topa (I) ∩ V of points of V where the order of I in W is equal to the order of I in W at a: Let x1 , . . . xn be coordinates of W at a, defined on an open neighborhood U of a, and let V be closed and regular in U , defined by xn = 0. The stalks of JV (I) at points b of S inside U coincide with the coefficient ideals of the stalks of I at b. Proof. Clear from the definition of coefficient ideals.  Corollary 10.4. In the above situation, for any fixed closed hypersurface V in U ⊂ W open, the order of JV (I) at points of S ∩ V is upper semicontinuous along S, locally at a. Remark 10.5. In general, V need not contain, locally at a, the top locus of I in W . This can, however, be achieved in zero characteristic by choosing for V an osculating hypersurface, cf. Prop. 10.9 below. In this case, the order of JV (I) at points of S = topa (I) does not depend on the choice of the hypersurface, cf. Prop. 10.13. In arbitrary characteristic, a local hypersurface V will be chosen separately at each point b ∈ S in order to maximize the order of JV (I) at b, cf. Prop. 10.11. In this case, the order of JV (I) at b does not depend on the choice of V , and its upper semicontinuity as b moves along S holds again, but is more difficult to prove [Hau04]. Proposition 10.6. The passage to the coefficient ideal JV (I) of I at a commutes with blowup: Let π : W 0 → W be the blowup of W along a regular center Z contained locally at a in S = topa (I). Let V be a local regular hypersurface of 48 HERWIG HAUSER W at a containing Z and such that V s contains all points a0 above a where the order of the weak transform I g has remained constant equal to the order of I at a. For any such point a0 , the coefficient ideal JV s (I g ) of I g equals the controlled −c transform JV (I)! = IE · JV (I)∗ of JV (I) with respect to the control c = o! with o = orda (I). Proof. Write V 0 for V s , and let h = 0 be a local equation of E ∩V 0 in V 0 . The weak transform I g of I is generated by the elements f g = h−o · f ∗ for f varying in I, where ∗ denotes the total transform. The coefficients af,i of the monomials xin of the expansion of an element f of I of order o at a in the coordinates x1 , . . . , xn satisfy af g ,i = hi−o · (af,i )∗ . Then X JV 0 (I g ) = JV 0 ( af g ,i · xin , f g ∈ I g ) i X = JV 0 ( ah−o ·f ∗ ,i · xin , f ∈ I) i X = JV 0 ( h−o · (af,i · xin )∗ , f ∈ I) i = X h−o! · (a∗f,i , f ∈ I)o!/(o−i) i<o −o! =h ·( X (af,i , f ∈ I)o!/(o−i) )∗ i<o = h−o! · (JV I)∗ = (JV I)! . This proves the claim.  Remark 10.7. The definitions of the coefficient ideal used in [EV00, EV98, BM97, Wlo05, KM10, Hir03] produce a weaker commutativity property with respect to blowups, typically only for the radicals of the coefficient ideals. Remark 10.8. The order of the coefficient ideal JV (I) of I is not directly suited as a secondary invariant when the order of I remains constant since, by the proposition, the coefficient ideal passes under blowup to its controlled transform, and thus its order may increase. In order to get a practicable secondary invariant it is appropriate to decompose JV (I) and (JV (I))! into products of two ideals: the first factor is a principal monomial ideal supported by the exceptional locus, the second, possibly singular factor, is an ideal called the residual factor, and supposed to pass under blowup in the factorization to its weak transform. Choosing suitably the exceptional monomial factor it can be shown that such factorizations always exist [EH02]. In this situation the order of the residual factor does not increase under blowup by Prop. 8.13 and can thus serve as a secondary invariant whenever the order of the ideal I remains constant under blowup. Proposition 10.9. Assume that the characteristic of the ground field is zero. Let I have order o at a point a ∈ W , and let V be a regular hypersurface for I at a, with coefficient ideal J = JV (I). The locus topa (J, o!) of points of V where J has order ≥ o! coincides with topa (I), topa (J, o!) = topa (I). BLOWUPS AND RESOLUTION 49 Proof. Choose local coordinates x1 , . . . , xn in W at a so that V is defined by xn = 0. Expand the elements f of I with respect to xn with coefficients af,i ∈ OV,a , and choose representatives of them on a suitable neighbourhood of a. Let b be a point in a sufficiently small neighborhood of a. Then, by the upper semicontinuity of P the order,i b belongs to topa (I) if and only if ordb I ≥ o, which is equivalent to i<o af,i · xn having order ≥ o at b for all f ∈ I. This, in turn, holds if and only if o! o−i af,i has order ≥ o − i at b, say af,i has order ≥ o! at b. Hence b ∈ topa (I) if and only if b ∈ topa (JV (I), o!).  Corollary 10.10. Assume that the characteristic of the ground field is zero. Let a be a point in W and set S = topa (I). Let U be a neighbourhood of a on which there exists a closed regular hypersurface V which is osculating for I at all points of S ∩ U . Let JV (I) be the coefficient ideal of I in V . (a) The top locus topa (JV (I)) of JV (I) on V is contained in topa (I). (b) The blowup of U along a regular locally closed subvariety Z of topa (JV (I)) Z commutes with the passage to the coefficient ideals of I and I g in V and V s . Proof. Assertion (a) is immediate from the proposition, and (b) follows from Prop. 10.6.  Proposition 10.11. (Encinas-Hauser) Assume that the characteristic of the ground field is zero. The order of the coefficient ideal JV (I) of I at a with respect to an osculating hypersurface V at a attains the maximal value of the orders of the coefficient ideals over all local regular hypersurfaces. In particular, it is independent of the choice of V . Proof. Choose local coordinates x1 , . . . , xn in W at a such that the appropriate derivative of the chosen element f ∈ I is given by xn . Let o be the order of f at a. The choice of coordinates implies that the expansion of f with respect to xn has a monomial xon with coefficient 1 and no monomial in xn of degree o − 1. Any other local regular hypersurface U is obtained from V by a local isomorphism ϕ of W at a. Assume that the order of JV (ϕ∗ (I)) is larger than the order of o! o−i is larger JV (I). Let g = ϕ∗ (f ). This signifies that the order of all coefficients ag,i ∗ than the order of JV (I). Therefore ϕ must eliminate from f the terms of af,i for o! o−i which af,i has order equal to the order of JV (I). But then ϕ∗ produces from xon a non-zero coefficient ag,o−1 such that ao! g,o−1 has order equal to the order of JV (I), contradiction.  Remark 10.12. This result suggests to consider in positive characteristic as a substitute for hypersurfaces of maximal contact local regular hypersurfaces which maximize the order of the associated coefficient ideal. Such hypersurfaces are used in recent approaches to resolution of singularities in positive characteristic [Hir12, Hau10a, HW14], relying on the work of Moh on the behaviour of the coefficient ideal in this situation [Moh87]. Proposition 10.13. Let the characteristic of the ground field be arbitrary. The supremum in N ∪ {∞} of the orders of the coefficient ideals JV (I) of I in local regular hypersurfaces V in W at a is realized by a formal local regular hypersurface eW,a ). If V in W at a (i.e., V is defined by an element of the complete local ring O 50 HERWIG HAUSER the supremum is finite, it can be realized by a local regular hypersurface V in W at a. Proof. If the supremum is finite, the existence of some V realizing this value is bW,a to construct obvious. If the supremum is infinite, one uses the completeness of O V , see [EH02, Hau04].  Definition 10.14. A formal local regular hypersurface V realizing the supremum of the order of the coefficient ideal JV (I) of I at a is called a hypersurface of weak maximal contact of I at a. If the supremum is finite, it will always be assumed to be a local hypersurface. Proposition 10.15. (Zariski) Let V be a formal local regular hypersurface in W at a of weak maximal contact with I at a. Let π : W 0 → W be the blowup of W along a closed regular center Z contained locally at a in S = topa (I). The points a0 ∈ W 0 above a for which the order of the weak transform I g of I at a0 has not decreased are contained in the strict transform V s of V . Proof. By definition of weak maximal contact, the variable xn defining V in W at a appears in the initial form of some element f of I of order o = topa (I) at a, cf. ex. 10.23 below. The argument then goes analogously to the proof of Prop. 9.1.  Remark 10.16. In characteristic zero and if V has been chosen osculating at a, the hypersurface V 0 is again osculating at points a0 above a where orda0 (I 0 ) = orda (I), hence it has again weak maximal contact with I 0 at such points a0 . In positive characteristic this is no longer true, cf. ex. 10.24. Examples e2 Example 10.17. Determine in all characteristics the points of the blowup A 2 4 2 2 4 7 8 9 of A at 0 where the strict transform of g = x + kx y + y + 3y + 5y + 7y under the blowup of A2 at 0 has order 4, for any k ∈ N. Example 10.18. Determine for all characteristics the maximal order of the coefficient ideal of I = (x3 + 5y 3 + 3(x2 y 2 + xy 4 ) + y 6 + 7y 7 + y 9 + y 10 ) in regular local hypersurfaces V at 0. Example 10.19. Same as before for I = (xy + y 4 + 3y 7 + 5y 8 + 7y 9 ). Example 10.20. . Compute the coefficient ideal of I = (x5 + x2 y 4 + y k ) in the hypersurfaces x = 0, respectively y = 0. According to the value of k and the characteristic, which hypersurface is osculating or has weak maximal contact? Example 10.21. . Consider f = x2 + y 3 z 3 + y 7 + z 7 . Show that V ⊂ A3 defined by x = 0 is a local hypersurface of weak maximal contact for f . Blow up A3 at the origin. How does the order of the coefficient ideal of f in V behave under these blowups at the points where the order of f has remained constant? Factorize suitably the controlled transform of the coefficient ideal with respect to the exceptional factor and observe the behaviour of the order of the residual factor. Example 10.22. . Assume that, for a given coordinate system x1 , . . . , xn in W at a, the hypersurface V defined by xn = 0 is osculating for a polynomial f and that the coefficient ideal of f in V is a principal monomial ideal. Show that there BLOWUPS AND RESOLUTION 51 is a sequence of blowups in coordinate subspaces of the induced affine charts which eventually makes the order of f drop. Example 10.23. The variable xn defining a hypersurface V in W at a of weak maximal contact with an ideal I appears in the initial form of some element f of I of order o = orda (I) at a. Example 10.24. In positive characteristic, a hypersurface of weak maximal contact for an ideal I need not have again weak maximal contact after blowup with the weak transform I g at points a0 where the order of I g has remained constant. Example 10.25. Compute in the following situations the coefficient ideal of I in W at a with respect to the given local coordinates x, y, z in A3 and the hypersurface V . Determine in each case whether the order of the coefficient ideal is maximal. If not, find a coordinate change which maximizes it. (a) a = 0 ∈ A1 , x, V : x = 0, I = (x) and I = (x + x2 ). (b) a = 0 ∈ A2 , x, y, V : x = 0, I = (x), I = (x + y 2 ), I = (y + x2 ), I = (xy). (c) a = (1, 0, 0) ∈ A3 , x, y, z, V : y + z = 0, I = (x2 ), I = (xy), I = (x3 + z 3 ). (d) a = 0 ∈ A3 , x, y, z, V : x = 0, I = (xyz), I = (x2 + y 3 + z 5 ). (e) a = 0 ∈ A2 , x, y, V : x = 0, I = (x2 + y 4 , y 4 + x2 ). Example 10.26. Blow up in each of the preceding examples the origin and determine the points of the exceptional divisor E where the order of the weak transform I g of I has remained constant. Check at these points whether commutativity holds for the descent to the coefficient ideal and its controlled transform. Example 10.27. . Show that the maximum of the order of the coefficient ideal bAn ,0 is attained (it might JV (I) of an ideal I over all regular parameter systems of O be ∞). Example 10.28. Show that the supremum of the order of the coefficient ideal of an ideal I in W at a point a can be realized, if the supremum is finite, by a regular system of parameters of the local ring OW,a without passing to the completion. Example 10.29. + Show that this maximum, when taken at any point of the top locus S of An where I has maximal order o, defines an upper semicontinuous function on S. Example 10.30. . Let V be the hypersurface xn = 0 of An and let V 0 → V be the blowup with regular center Z in V . Let I be an ideal of order o at a point a of Z, with weak transform I g . Assume that orda0 I g = orda I at the origin a0 of an xj -chart for a j < n. Compare the controlled transform of the coefficient ideal JV (I) of I with respect to the control c = o! with the coefficient ideal JV 0 (I g ) of I g. Example 10.31. Show that, in characteristic zero, the top locus of an ideal I of W , when taken locally at a point a, is contained in a local regular hypersurface V through a. Does this hypersurface maximize the order of the associated coefficient ideal? Example 10.32. Consider f = x3 + y 2 z in A3 and the point blowup of A3 at the origin. Find, according to the characteristic, at all points of the exceptional divisor a hypersurface of weak maximal contact for the strict transform of f . 52 HERWIG HAUSER Example 10.33. Consider surfaces defined by polynomials f = xo +y a z b ·g(y, z) where y a z b is considered as an exceptional monomial factor of the coefficient ideal in the hypersurface V defined by x = 0 (up to raising the coefficient ideal to the power c = o!). Assume that a + b + ord0 g ≥ o. Give three examples where the order of g at 0 is not maximal over all choices of local hypersurfaces at 0, and indicate the coordinate changes which make it maximal. Example 10.34. Consider surfaces defined by polynomials f = xo +y a z b ·g(y, z) where y a z b is considered again as an exceptional monomial factor of the coefficient ideal in the hypersurface V defined by x = 0. Assume that a + b + ord0 g ≥ o. 0 0 Compute the strict transform f 0 = xo + y a z b · g 0 (y, z) of f under point blowup at points where the order of f has remained equal to o. Find three examples where the order of g 0 is not maximal over all local coordinate choices. Example 10.35. For a flag of local regular subvarieties Vn−1 ⊃ . . . ⊃ V1 at a in W = An one gets from an ideal I = In in W a chain of coefficient ideals Jn−1 , . . . , J1 in Vn−1 , . . . , V1 respectively, defined recursively as follows. Assume that Jn−1 , . . . , Ji+1 have been constructed and that Ji+1 can be decomposed into Ji+1 = Mi+1 · Ii+1 with prescribed monomial factor Mi+1 and some residual factor Ii+1 . Then set Ji = JVi (Ii+1 ), the coefficient ideal of Ii+1 in Vi at a. Show that the lexicographic maximum of the vector of orders of the ideals Ji at a over all choices of flags at a admitting the above factorizations of the ideals Ji can be realized stepwise, choosing first a local hypersurface Vn−1 in W at a maximizing the order of Jn−1 at a, then a local hypersurface Vn−2 in Vn−1 at a maximizing the order of Jn−2 , and iterating this process. 11. Lecture XI: Resolution in Zero Characteristic The inductive proof of resolution of singularities in characteristic zero requires a more detailed statement about the nature of the resolution: Theorem 11.1. Let W be a regular ambient variety and let E ⊂ W be a (possibly empty) divisor with normal crossings. Assume that the characteristic of the ground field is 0. Let J be an ideal on W , together with a decomposition J = M · I into a principal monomial ideal M , the monomial factor of J, supported on a normal crossings divisor D transversal to E, and an ideal I, the residual factor of J. Let c+ ≥ 1 be a given number, the control of J. There exists a sequence of blowups of W along regular centers Z transversal to E and D and their total transforms, contained in the locus top(J, c+ ) of points where J and its controlled transforms with respect to c+ have order ≥ c+ , and satisfying the requirements equivariance and excision of a strong resolution so that the order of the controlled transform of J with respect to c+ drops eventually at all points below c+ . Definition 11.2. In the situation of the theorem, with prescribed divisor D and control c+ , the ideal J is called resolved with respect to D and c+ if the order of J at all points of W is < c+ . Remark 11.3. Once the order of the controlled transform of J has dropped below c+ , induction on the order can be applied to find an additional sequence of blowups which makes the order of the controlled transform of J drop everywhere BLOWUPS AND RESOLUTION 53 to 0. At that stage, the controlled transform of J has become the whole coordinate ring of W , and the total transform of J, which differs from the controlled transform by a monomial exceptional factor, has become a monomial ideal supported on a normal crossings divisor D transversal to E. This establishes the existence of a strong embedded resolution of J, respectively of the singular variety X defined by J in W . Proof. The technical details can be found in [EH02], and motivations are given in [Hau03]. The main argument is the following. The resolution process has two different stages: In the first, a sequence of blowups is chosen through a local analysis of the singularities of J and by induction on the ambient dimension. The order of the weak transforms of I will be forced to drop eventually below the maximum of the order of I at the points a of W . By induction on the order one can then apply additional blowups until the order of the weak transform of I has become equal to 0. At that moment, the weak transform of I equals the coordinate ring/structure sheaf of the ambient variety, and the controlled transform of J has become a principal monomial ideal supported on a suitable transform of D, which will again be a normal crossings divisor meeting the respective transform of E transversally. For simplicity, denote this controlled transform again by J. It is a principal monomial ideal supported by exceptional components. The second stage of the resolution process makes the order of J drop below c+ . The sequence of blowups is now chosen globally according to the multiplicities of the exceptional factors appearing in J. This is a completely combinatorial and quite simple procedure which can be found in many places in the literature [Hir64, EV00, EH02]. The first part of the resolution process is much more involved and will be described now. The centers of blowup are defined locally at the points where the order of I is maximal. Then it is shown that the definition does not depend on the local choices and thus defines a global, regular and closed center in W . Blowing up W along this center will improve the singularities of I, and finitely many further blowups will make the order of the weak transform of I drop. The local definition of the center goes as follows. Let S = top(I) be the stratum of points in W where I has maximal order. Let a be a point of S and denote by o the order of I at a. Choose an osculating hypersurface V for I at a in an open neighbourhood U of a in W . This is a closed regular hypersurface of U given by a suitable partial derivative of an element of I of order o − 1. The hypersurface V maximizes the order of the coefficient ideal Jn−1 = JV (I) over all choices of local regular hypersurfaces, cf. Prop. 10.11. Thus orda (Jn−1 ) does not depend on the choice of V . There exists a closed stratum T in S at a of points b ∈ S where the order of Jn−1 equals the order of Jn−1 at a. The ideal Jn−1 on V together with the new control c = o! can now be resolved by induction on the dimension of the ambient space, applying the respective statement of the theorem. The new normal crossings divisor En−1 in V is defined as V ∩ E. For this it is necessary that the hypersurface V can be chosen transversal to E. This is indeed possible, but will not be shown here. Also, it is used that Jn−1 admits again a decomposition Jn−1 = Mn−1 · In−1 with Mn−1 a principal monomial ideal supported on some normal crossings divisor Dn−1 on V , and In−1 an ideal, the residual factor of Jn−1 . 54 HERWIG HAUSER There thus exists a sequence of blowups of V along regular centers transversal to En−1 and Dn−1 and their total transforms, contained in the locus top(Jn−1 , c) of points where Jn−1 and its controlled transforms with respect to c have order ≥ c, and satisfying the requirements of a strong resolution so that the order of the weak transform of In−1 drops eventually at all points below the maximum of the order of In−1 at points a of V . All this is well defined on the open neighbourhood U of a in W , but depends a priori on the choice of the hypersurface V , since the centers are chosen locally in each V . It is not clear that the local choices patch to give a globally defined center. One can show that this is indeed the case, even though the local ideals Jn−1 do depend on V . The argument relies on the fact that the centers of blowup are constructed as the maximum locus of an invariant associated to Jn−1 . By induction on the ambient dimension, such an invariant exists for each Jn−1 : In dimension 1, it is just the order. In higher dimension, it is a vector of orders of suitably defined coefficient ideals. One then shows that the invariant of Jn−1 is independent of the choice of V and defines an upper semicontinuous function on the stratum S. Its maximum locus is therefore well defined and closed. Again by induction on the ambient dimension, it can be assumed that it is also regular and transversal to the divisors En−1 and Dn−1 . By the assertion of the theorem in dimension n − 1, the order of the weak transform of Jn−1 can be made everywhere smaller than c = o! by a suitable sequence of blowups. The sequence of blowups also transforms the original ideal J = M · I, producing controlled transforms of J and weak transforms of I. The order of I cannot increase in this sequence, if the centers are always chosen inside S. To achieve this inclusion a technical adjustment of the definition of coefficient ideals is required which will be omitted here. If the order of I drops, induction applies. So one is left to consider points where possible the order of the weak transform has remained constant. There, one will use the commutativity of blowups with the passage to coefficient ideals, Prop. 10.6: The coefficient ideal of the final transform of I will equal the controlled transform of the coefficient ideal Jn−1 of I. But the order of this controlled transform has dropped below c, hence, by Prop. 10.9, also the order of the weak transform of I must have dropped. This proves the existence of a resolution.  Examples Example 11.4. In the situation of the theorem, take W = A2 , E = ∅, and J = (x2 y 3 ) = 1 · I with control c+ = 1. The ideal J is monomial, but not resolved yet, since it is not supported on the exceptional divisor. It has order 5 at 0, order 3 along the x-axis, and order 2 along the y-axis. Blow up A2 in 0. The controlled transform in the x-chart is J ! = (x4 y 3 ) with exceptional factor IE = (x4 ) and residual factor I1 = (y 3 ), the strict transform of J. The controlled transform in the y-chart is J ! = (x2 y 4 ) with exceptional factor IE = (y 4 ) and residual factor I1 = (x2 ), the strict transform of J. One additional blowup resolves J. Example 11.5. In the situation of the preceding example, replace E = ∅ by E = V (x + y), respectively E = V (x + y 2 ), and resolve the ideal J. Example 11.6. Take W = A3 , E = V (x + z 2 ), and J = (x2 y 3 ) with control c+ = 1. The variety X defined by J is the union of the xz- and the yz-plane. The BLOWUPS AND RESOLUTION 55 top locus of J is the z-axis, which is tangent to E. Therefore it is not allowed to take it as the center of the first blowup. The only possible center is the origin. Applying this blowup, the top locus of the controlled transform of J and the total transform of E have normal crossings, so that the top locus can now be chosen as the center of the next blowup. Resolve the singularities of X. Remark 11.7. The non-transversality of the candidate center of blowup with already existing exceptional components is known as the transversality problem. The preceding example gives a first instance of the problem, see [EH02, Hau03] for more details. Example 11.8. Take W = A3 , E = D = ∅ and J = (x2 + yz). In characteristic different from 2, the origin of A3 is the unique isolated singular point of the cone X defined by J. The ideal J has order 2 at 0. After blowing up the origin, the singularity is resolved and the strict transform of J defines a regular surface. It is transversal to the exceptional divisor. Example 11.9. Take W = A3 , E = D = ∅, J = (x2 + y a z b ) with a, b ∈ N. According to the values of a and b, the top locus of J is either the origin, the yor z-axis, or the union of the y- and the z-axis. If a + b ≥ 2, the yz-plane is a hypersurface of maximal contact for J at 0. The coefficient ideal is J1 = (y a z b ) (up to raising it to the square). This is a monomial ideal, but not supported yet on exceptional components. Resolve J. Example 11.10. Take W = A4 , E = D = V (yz), J = (x2 + y 2 z 2 (y + w)). The order of J at 0 is 2. The yzw-hyperplane has maximal contact with J at 0, with coefficient ideal J1 = y 2 z 2 (y + w), in which the factor M1 = (y 2 z 2 ) is exceptional and I1 = (y + w) is residual. Resolve J. The top locus of I1 is the plane V (y + w) ⊂ A3 , hence not contained in the top locus of J. This technical complication is handled by introducing an intermediate ideal, the companion ideal [Vil07, EH02]. Example 11.11. Compute the first few steps of the resolution process for the three surfaces defined in A3 by the polynomials x2 + y 2 z, x2 + y 3 + z 5 and x3 + y 4 z 5 + z 11 . Example 11.12. Prove with all details the embedded resolution of plane curves in characteristic zero according to the above description. Example 11.13. Resolve the following items according to Thm. 11.1, taking into account different characteristics of the ground field. (a) W = A2 , E = ∅, J = I = (x2 y 3 ), with control c+ = 1. (b) W = A2 , E = V (x), J = (x2 y 3 ), c+ = 1. (c) W = A2 , E = V (xy), J = (x2 y 3 ), c+ = 1. (d) W = A3 , E = V (x + z 2 ), J = (x2 y 3 ), c+ = 1. (e) W = A3 , E = V (y + z), J = (x3 + (y + z)z 2 ), c+ = 3. (f) W = A3 , E = ∅, J = I = (x2 + yz), c+ = 2. (g) W = A3 , E = ∅, J = I = (x3 + y 2 z 2 ), c+ = 3. (h) W = A3 , E = ∅, J = I = (x2 + xy 2 + y 5 ), c+ = 2. (i) W = A3 , E = ∅, J = I = (x2 + xy 3 + y 5 ), c+ = 2. (j) W = A3 , E = V (x + y 2 ), J = (x3 + (x + y 2 )y 4 z 5 ), c+ = 3. (k) W = A3 , E = ∅, J = I = (x2 + y 2 z 2 (y + z)), c+ = 12. 56 HERWIG HAUSER (l) W = A3 , E = V (yz), J = (x2 + y 2 z 2 (y + z)), c+ = 2. (m) W = A4 , E = V (yz), J = (x2 + y 2 z 2 (y + w)), c+ = 2. Example 11.14. Consider J = I = (x2 + y 7 + yz 4 ) in A3 , with E = ∅ and c+ = 2. Consider the sequence of three point blowups with the following centers. First the origin of A3 , then the origin of the y-chart, then the origin of the z-chart. On the last blowup, consider the midpoint between the origin of the y- and the z-chart. Show that J is resolved at this point if the characteristic is zero or > 2. Example 11.15. . What happens in the preceding example if the characteristic is equal to 2? Describe in detail the behaviour of the first two components of the resolution invariant under the three local blowups. Example 11.16. . A combinatorial version of resolution is known as Hironaka’s polyhedral game: Let N be an integral convex polyhedron in Rn+ , i.e., the positive convex hull N = conv(S + Rn+ ) of a finite set S of points in Nn . Player A chooses a subset J of {1, . . . , n}, then player B chooses an element j ∈ J. After these P moves, S is replaced by the set S 0 of points α defined by αi0 = αi if i 6= j and αj0 = k∈J αk , giving rise to a new polyhedron N 0 . Player A has won if after finitely many rounds the polyhedron has become an orthant α + Rn+ . Player B can never win, but only prevent player A from winning. Show that player A has a winning strategy, first with and then without using induction on n [Spi83, Zei06]. 12. Lecture XII: Positive Characteristic Phenomena The existence of the resolution of varieties of arbitrary dimension over a field of positive characteristic is still an open problem. For curves, there exist various proofs [Kol07] chap. 1. For surfaces, the first proof of non-embedded resolution was given by Abhyankar in his thesis [Abh56]. Later, he proved embedded resolution for surfaces, but the proof is scattered over several papers which sum up to over 500 pages [Abh59, Abh64, Abh66b, Abh66a, Abh67, Abh98]. Cutkosky was able to shorten and simplify the argumens substantially [Cut11]. An invariant similar to the one used by Abhyankar was developed independently by Zeillinger and Wagner [Zei05, Wag09, HW14]. Lipman gave an elegent proof of non-embedded resolution for arbitrary two-dimensional schemes [Lip78, Art86]. Hironaka proposed an invariant based on the Newton polyhedron which allows to prove embedded resolution of surfaces which are hypersurfaces [Hir84, Cos81, Hau00]. Hironaka’s invariant seems to be restricted to work only for surfaces. The case of higher codimensional surfaces was settled by Cossart-Jannsen-Saito, extending Hironaka’s invariant [CJS09]. Different proofs were recently proposed by Benito-Villamayor and Kawanoue-Matsuki [BV12, KM12]. For three-folds, Abhyankar and Cossart gave partial results. Quite recently, Cossart-Piltant proved non-embedded resolution of three-folds by a long case-bycase study [CP08, CP09, CP12, CP13]. See also [Cut09]. Programs and techniques for resolution in arbitrary dimension and characteristic have been developed quite recently, among others, by Hironaka, Teissier, Kuhlmann, Kawanoue-Matsuki, Benito-Bravo-Villamayor, Hauser-Schicho, Cossart [Hir12, Tei03, Kuh00, Kaw14, KM10, BV12, BV14, BV10, BV11, Hau10b, HS12, Cos11]. Remark 12.1. Let K be an algebraically closed field of prime characteristic p > 0, and let X be an affine variety defined in An . The main problems already appear BLOWUPS AND RESOLUTION 57 in the hypersurface case. Let f = 0 be an equation for X in An . Various properties of singularities used in the characteristic zero proof fail in positive characteristic: (a) The top locus of f of points of maximal order need not be contained locally in a regular hypersurface. Take the variety in A4 defined by f = x2 +yz 3 +zw3 +y 7 w over a field of characteristic 2 [Nar83, Mul83, Kaw14, Hau98]. (b) There exist sequences of blowups for which the sequence of points above a given point a where the order of the strict transforms of f has remained constant are eventually not contained in the strict transforms of any regular local hypersurface passing through a. (c) Derivatives cannot be used to construct hypersurfaces of maximal contact. (d) The characteristic zero invariant is no longer upper semicontinuous when translated to positive characteristic. Example 12.2. A typical situation where the characteristic zero resolution invariant does not work in positive characteristic is as follows. Take the polynomial f = x2 + y 7 + yz 4 over a field of characteristic 2. There exists a sequence of blowups along which the order of the strict transforms of f remains constant equal to 2 but where eventually the order of the residual factor of the coefficient ideal of f with respect to a hypersurface of weak maximal contact increases. The hypersurface V of W = A3 defined by x = 0 produces – up to raising the ideal to the square – as coefficient ideal of f the ideal on A2 generated by y 7 + yz 4 . Its order at the origin is 5. Blow up A3 at the origin. In the y-chart W 0 of the blowup, the total transform of f is given by f ∗ = y 2 (x2 + y 5 + y 3 z 4 ), with f 0 = x2 + y 3 (y 2 + z 4 ) the strict transform of f . It has order 2 at the origin of W 0 . The generator of the coefficient ideal of f 0 in V 0 : x = 0 decomposes into a monomial factor y 3 and a residual factor y 2 + z 4 . The order of the residual factor at the origin of W 0 is 2. Blow up W 0 along the z-axis, and consider the y-chart W 00 , with strict transform f 00 = x2 + y(y 2 + z 4 ), of f . The residual factor of the coefficient ideal in V 00 : x = 0 equals again y 2 + z 4 . Blow up W 00 at the origin and consider the z-chart W 000 , with strict transform f 000 = x2 + yz(y 2 + z 2 ). The origin of W 000 is the intersection point of the two exceptional components y = 0 and z = 0. The residual factor of the coefficient ideal in V 000 : x = 0 equals y 2 + z 2 , of order 2 at the origin of W 000 . Blow up the origin of W 000 and consider the affine chart W (iv) given by the coordinate transformation x 7→ xz, y 7→ yz + z, and z 7→ z. The origin of this chart is the midpoint of the new exceptional component. The strict transform of f 000 equals f (iv) = x2 + (y + 1)z 2 y 2 , which, after the coordinate change x 7→ x + yz, becomes f (iv) = x2 + y 3 z 2 + y 2 z 2 . 58 HERWIG HAUSER The order of the strict transforms of f has remained constant equal to 2 along the sequence of local blowups. The order of the residual factor of the associated coefficient ideal has decreased from 5 to 2 in the first blowup, then remained constant until the last blowup, where it increased from 2 to 3. Remark 12.3. The preceding example shows that the order of the residual factor of the coefficient ideal of the defining ideal of a singularity with respect to a local hypersurface of weak maximal contact is not directly suited for an induction argument as in the case of zero characteristic. For surfaces, practicable modifications of this invariant are studied in [HW14]. Definition 12.4. A hypersurface singularity X at a point a of affine space W = AnK over a field K of characteristic p is called purely inseparable of order pe at a if there exist local coordinates x1 , . . . , xn on W at a such that a = 0 and such that the local equation f of X at a is of the form e f = xpn + F (x1 , . . . , xn−1 ) for some e ≥ 1 and a polynomial F ∈ K[x1 , . . . , xn−1 ] of order ≥ pe at a. Proposition 12.5. For a purely inseparable hypersurface singularity X at a, the polynomial F is unique up to multiplication by units in the local ring OW,a and the addition of pe -th powers in K[x1 , . . . , xn−1 ]. Proof. Multiplication by units does not change the local geometry of X at a. A coordinate change in xn of the form xn 7→ xn + a(x1 , . . . , xn−1 ) with a ∈ e e K[x1 , . . . , xn−1 ] transforms f into f = xpn + a(x1 , . . . , xn−1 )p + F (x1 , . . . , xn−1 ). This implies the assertion.  Definition 12.6. Let affine space W = An be equipped with an exceptional normal crossings divisor E produced by earlier blowups with multiplicities r1 , . . . , rn . Let x1 , . . . , xn be local coordinates at a point a of W such that E is defined at a e by xr11 · · · xrnn = 0. Let f = xpn + F (x1 , . . . , xn−1 ) define a purely inseparable e singularity X of order p at the origin a = 0 of An such that F factorizes into r n−1 F (x1 , . . . , xn−1 ) = xr11 · · · xn−1 · G(x1 , . . . , xn−1 ). The residual order of X at a with respect to E is the maximum of the orders of the polynomials G at a over all choices of local coordinates such that f has the above form [Hir12, Hau10b]. Remark 12.7. The residual order can be defined for arbitrary singularities [Hau10b]. In characteristic zero, the definition coincides with the second component of the local resolution invariant, defined by the choice of an osculating hypersurface or, more generally, of a hypersurface of weak maximal contact and the factorization of the associated coefficient ideal. Remark 12.8. In view of the preceding example, one is led to investigate the behaviour of the residual order under blowup at points where the order of the singularity remains constant. Moh showed that it can increase at most by pe−1 [Moh87]. Abhyankar seems to have observed already this bound in the case of surfaces. He defines a correction term ε taking values equal to 0 or pe−1 which is added to the residual order according to the situation in order to make up for the occasional increases of the residual order [Abh67, Cut11]. A similar construction has been proposed by Zeillinger and Hauser-Wagner [Zei05, Wag09, HW14]. This allows, at BLOWUPS AND RESOLUTION 59 least for surfaces, to define a secondary invariant after the order of the singularity, the modified residual order of the coefficient ideal, which does not increase under blowup. The problem then is to handle the case where the order of the singularity and the modified residual order remain constant. It is not clear how to define a third invariant which manifests the improvement of the singularity. Remark 12.9. Following ideas of Giraud, Cossart has studied the behaviour of the order of the Jacobian ideal of f , defined by certain partial derivatives of f . Again, it seems that hypersurfaces of maximal contact do not exist for this invariant [Gir75, Cos11]. There appeared promising recent approaches by Hironaka, using the machinery of differential operators in positive characteristic, by Villamayor and collaborators using instead of the restriction to hypersurfaces of maximal contact projections to regular hypersurfaces via elimination algebras, and by KawanoueMatsuki using their theory of idealistic filtrations and differential closures. None of these proposals has been able to produce an invariant or a resolution strategy which works in positive characteristic for all dimensions. Remark 12.10. Another approach consists in analyzing the singularities and blowups for which the residual order increases under blowup. This leads to the notion of kangaroo singularities: Definition 12.11. A hypersurface singularity X defined at a point a of affine space W = AnK over a field K of characteristic p by a polynomial equation f = 0 f , a0 ) → (W, a) is called a kangaroo singularity if there exists a local blowup π : (W of W along a regular center Z contained in the top locus of X and transversal to an already existing exceptional normal crossings divisor E such that the order of the strict transform of X remains constant at a0 but the residual order of the strict transform of f increases at a0 . The point a0 is then called kangaroo point of X above a. Remark 12.12. Kangaroo singularities can be defined for arbitrary singularities. They have been characterized in all dimensions by Hauser [Hau10a, Hau10b]. However, the knowledge of the algebraic structure of these singularities did not yet give any hint how to overcome the obstruction caused by the increase of the residual order. e e Proposition 12.13. If a polynomial f = xpn + F (x1 , . . . , xn−1 ) = xpn + rn−1 r1 x1 · · · xn−1 · G(x1 , . . . , xn−1 ) defines a kangaroo singularity of order pe at 0 the following conditions must hold: (a) the sum of the ri and of the order of G at 0 is divisible by pe ; (b) the sum of the residues of the exceptional multiplicities ri modulo pe is bounded by (m − 1) · pe with m the number of exceptional multiplicities not divisible by pe ; (c) the initial form of F equals a specific homogeneous polynomial which can be explicitly described. Any kangaroo point a0 of X above a lies outside the strict transform of the components of the exceptional divisor at a whose multiplicities are not a multiple of pe . Remark 12.14. A more detailed description of kangaroo singularities and a further discussion of typical characteristic p phenomena can be found in [Hau10a, Hau10b]. 60 HERWIG HAUSER Examples Example 12.15. Prove the resolution of plane curves in arbitary characteristic by using the order and the residual order as the resolution invariants. Example 12.16. Let K be an algebraically closed field of characteristic p > 0. Develop a significant notion of resolution for elements of the quotient of rings K[x, y]/K[xp , y p ]. Then prove that such a resolution always exists. Example 12.17. . Consider the polynomial f = x2 + yz 3 + zw3 + y 7 w on A4 over a ground field of characteristic 2. Its maximal order is 2, and the respective top locus is the image of the monomial curve (t32 , t7 , t19 , t15 ), t ∈ K. The image curve has embedding dimension 4 at 0 and cannot be embedded locally at 0 into a regular hypersurface of A4 . Hence there is no hypersurface of maximal contact with f locally at the origin. Example 12.18. . Find a surface X in positive characteristic and a sequence of point blowups starting at a ∈ X so that some of the points above a where the order of the weak transforms of X remains constant eventually leave the transforms of any local regular hypersurface passing through a. Example 12.19. . Show that f = x2 + yz 3 + zw3 + y 7 w has in characteristic 2 top locus top(f ) equal to the parametrized curve (t32 , t7 , t19 , t15 ) in A4 [Nar83, Mul83, Kaw14]. Example 12.20. . Show that f is not contained in the square of the ideal defining the parametrized curve (t32 , t7 , t19 , t15 ). Example 12.21. . Find the defining ideal for the image of the monomial curve (t , t7 , t19 , t15 ) in A4 . What is the local embedding dimension at 0? 32 Example 12.22. . Show that f = x2 + yz 3 + zw3 + y 7 w admits in characteristic 2 at the point 0 no local regular hypersurface of permanent maximal contact (i.e., whose successive strict transforms contain all points where the order of f has remained constant in any sequence of blowups with regular centers inside the top locus). Example 12.23. Consider f = x2 + y 7 + yz 4 in characteristic 2. Show that there exists a sequence of point blowups for which f admits at the point 0 no local regular hypersurface whose transforms have weak maximal contact with the transforms of f as long as the order of f remains equal to 2. Example 12.24. . Define the p-th order derivative of polynomials in K[x1 , . . . , xn ] for K a field of characteristic p. Example 12.25. . Construct a surface of order p5 in A3 over a field of characteristic p for which the residual order increases under blowup. Example 12.26. . Show that for the polynomial f = xp + y p z over a field of characteristic p and taking E = ∅ the residual order of f along the (closed) points of the z-axis is not equal to its value at the generic point. Example 12.27. . Let y1 , . . . , ym be fixed coordinates, and consider a homogeneous polynomial G(y) = y r · g(y) with r ∈ Nm and g(y) homogeneous of degree k. Let G+ (y) be the polynomial obtained from G by the linear coordinate change yi → yi + ym for i = 1, . . . , m − 1. Show that the order of G+ along the ym -axis is at most k. BLOWUPS AND RESOLUTION 61 Example 12.28. Express the assertion of the preceding example through the invertibility of a matrix of multinomial coefficients.  i Pk k−i Example 12.29. . Consider G(y, z) = y r z s i=0 k+r . Compute i+r y (tz − y) ∗ + for t ∈ K the polynomial G (y, z) = G(y + tz, z) and its order with respect to y modulo p-th power polynomials. Example 12.30. . Determine all homogeneous polynomials G(y, z) = y r z s g(y, z) so that G+ (y, z) has order k + 1 with respect to y modulo p-th power polynomials. Example 12.31. + Find a new systematic proof for the embedded resolution of surfaces in three-space in arbitrary characteristic. Example 12.32. Let G(x) be a polynomial in one variable over a field K of characteristic p, of degree d and order k at 0. Let t ∈ K, and consider the equivalence class G of G(x + t) in K[x]/K[xp ] (i.e., consider K(x + t) modulo p-th power polynomials). What is the maximal order of G at 0? Describe all examples where this maximum is achieved. 13. Discussion of selected examples The comments and hints below were compiled by Stefan Perlega and Valerie Roitner. Ex. 1.1. Let X be defined by 27x2 y 3 z 2 +(x2 +y 3 −z 2 )3 = 0 and let Y = C×C be the cartesian product of the cusp C defined by x3 − y 2 = 0 with itself. The surface Y can be parametrized by (s, t) → (s3 , s2 , t3 , t2 ). Composing this map with the projection (x, y, z, w) 7→ (x, −y + w, z) from A4 to A3 gives (s, t) 7→ (s3 , t2 − s2 , t3 ). Substitution into the equation of X gives 0, 27s6 t6 (t2 − s2 )3 + (s6 + (t2 − s2 )3 − t6 )3 = = 27(s6 t12 − 3s8 t10 + 3s10 t8 − s12 t6 ) + 27(s12 t6 − 3s10 t8 + 3s8 t10 − s6 t12 ) = 0. Therefore the image of Y under the projection lies inside X. It remains to show that every point in X is obtained in this way. The restriction Y → X of the projection A4 → A3 is a finite map (as can e.g. be checked by using a computer algebra program), hence the image of Y is closed in X. As it has dimension two and X is an irreducible surface, the image of Y is whole X. √ Ex. 1.2. √Asides from the symmetries in the text, replacing x with ± −1 · x and z with ± −1 · z gives a new symmetry. In characteristic 2 the defining polynomial of X equals f = x2 y 3 z 3 + (x2 + y 3 + 3 3 z ) and there appears an additional symmetry which is given by interchanging x with z. √ Ex. 1.3. Replacing z by −1 · z gives the equation g = −27x2 y 3 z 2 + (x2 + y 3 + z 2 )3 = 0, cf. Figure 3. Symmetries of this surface are e.g. given by replacing x by −x or z by −z or by interchanging x with z. Also sending (x, y, z) to (t3 x, t2 y, t3 z) with t ∈ K gives a symmetry. The partial derivatives of g give the equations for Sing(X), x · (−9y 3 z 2 + (x2 + y 3 + z 2 )3 ) = 0, y 2 · (−9x2 z 2 + (x2 + y 3 + z 2 )3 ) = 0, 62 HERWIG HAUSER z · (−9y 3 x2 + (x2 + y 3 + z 2 )3 ) = 0. Therefore the singular locus of X has six components, given by the equations x = y = z = 0, x = y 3 + z 2 = 0, z = x2 + y 3 = 0, y = x2 + z 2 = 0, z − x = y 3 − z 2 = 0, z + x = y 3 − z 2 = 0. Figure 3: The surface of equation 27x2 y 3 z 2 = (x2 + y 3 + z 2 )3 . Ex. 1.4. The point a = (0, 1, 1) lies in the component S of Sing(X) defined by g = x − y 3 + z 2 = 0. Since (∂x g(a), ∂y g(a), ∂z g(a)) = (1, 3, 2), the component S is regular at a. The curve given by the parametrization (0, t2 , t3 ) lies in S and passes through a for t = 1. Its tangent vector at t = 1 is (0, 2, 3), which is a normal vector to the plane P . Therefore P intersects S transversally at a. The intersection X ∩ P is given by the equations y = 21 (5 − 3z) and h(x, z) = f (x, 21 (5 − 3z), z) = 27x2 z 2 18 (5 − 3z)3 + (x2 + 81 (5 − 3z)3 − z 2 )3 = 0. Computing the points where ∂x h = 0 and ∂z h = 0 gives (among others) the solution x = 0, z = 1, whence y = 1. Therefore X ∩ P has a singularity at (0, 1, 1). The Taylor expansion of h at (x, z) = (0, 1) is given by     2197 3 135w − w + O(w4 ) + 27 − + 93w2 + O(w3 ) x2 + O(x4 ), 8 2 where w = z − 1. e of X in the origin of A3 is defined in X × P2 by the Ex. 1.6. The blowup X equations xu2 − yu1 = xu3 − zu1 = yu3 − zu2 = 0, e →X where (u1 : u2 : u3 ) are projective coordinates on P2 . The blowup map π : X 2 e is the restriction to X of the projection X × P → X. The equation of the x-chart of the blowup of X is obtained by replacing (x, y, z) with (x, xy, xz) in the equation defining X and by factoring the appropriate power of the polynomial x defining the exceptional divisor. This gives the equation Cx : 27x7 y 3 z 2 + (x2 + x3 y 3 − x2 z 2 ) = x6 · (27xy 3 z 2 + (1 + xy 3 − z 2 )3 ) = 0, BLOWUPS AND RESOLUTION 63 e in the x-chart is defined by 27xy 3 z 2 + (1 + xy 3 − z 2 )3 = 0 so that the patch of X 3 in A . See Figure 4. Similarly, the y- and the z-chart are obtained by replacing (x, y, z) with (xy, y, yz) and (xz, yz, z) respectively and give the equations Cy : y 6 · (27x2 yz 2 + (x2 + y − z 2 )3 ) = 0 and Cz : z 6 · (27x2 y 3 z + (x2 + y 3 z − 1)3 ) = 0. The blowup Ye of Y = C × C in the origin of A4 is defined in Y × P3 by xu2 − yu1 = xu3 − zu1 = xu4 − wu1 = yu3 − zu2 = yu4 − wu2 = zu4 − wu3 = 0. The x-chart of Ye is obtained by replacing (x, y, z, w) with (x, xy, xz, xw) in the equations defining Y and by then factoring the appropriate powers of x. It is hence given in A4 by the equations 1 − xy 3 = z 2 − xw3 = 0. The other charts are obtained similarly: in the y-chart, x2 − y = z 2 − yw3 = 0; in the z-chart, x2 − y 3 z = 1 − zw3 = 0; in the w-chart, x2 − y 3 w = z 2 − w = 0. Figure 4: Chart expressions of the blowup of the surface Camelia. bX,a and m bX,a every regular system of Ex. 2.34. Since OX,a ⊆ O b X,a = mX,a · O bX,a . But there parameters x1 , . . . , xn of OX,a is also a generator system of m b X,a in O exists a subset S of {x1 , . . . , xn } such that S is a regular system of parameters of bX,a . The converse does not hold, since in general a regular system of parameters O bX,a need not belong to OX,a . of O Ex. 2.38. The image of f : (x, y) 7→ (xy, y) is f (A2 ) = (A2 \ (A1 × {0})) ∪ {(0, 0)}. This is a constructible and dense subset of A2 . The inverse f −1 : (x, y) 7→ 64 HERWIG HAUSER ( xy , y) of f is defined on the complement of the x-axis. It cannot be extended to the origin 0 of A2 , since f contracts the x-axis of A2 onto 0. Ex. 2.40. It is easily checked that the inverse of ϕij is ϕji :  xk k 6= i, j,   xj · xj = xk , 1 k = i, [ϕji ◦ ϕij (x1 , . . . , xn )]k = xj · xi xj = xi ,   1 = x , k = j, j 1/xj where [−]k denotes the k-th component. Therefore ϕji ◦ ϕij is the identity. The domain Uij of ϕij is An \ V (xj ), a dense open subset of An . The image ϕij (Uij ) equals An \ V (xi ). It is open, too. Since all components of ϕij are rational and the denominators do not vanish on Uij , the maps ϕij induce biregular maps Uij → Uji . Ex. 2.41. Elliptic curves admit an additive group structure. It therefore suffices to restrict to the origin a = 0 ∈ A2 and to show that the curve is forb 1 , 0). But K[[x, y]]/(y 2 − x3 + x) ' K[[y]] since, by mally isomorphic at 0 to (A the implicit function theorem for formal power series, the residue class of x in K[[x, y]]/(y 2 − x3 + x) can be expressed as a series in y. To show that X is nowhere locally biregular to the affine line is much harder. Ex. 2.42. A morphism f : X → Y of algebraic varieties is proper if it is separated and universally closed, i.e., if for any variety Z and any morphism h : Z → Y the induced morphism g : X ×Y Z → Y, g(x, z) = f (x) = h(z) is closed. In the example, already the image π(X) = A1 \ {0} of X is not closed. b 0) and (Yb , 0) would send the Ex. 2.43. A formal isomorphism between (X, the jacobian ideals generated by the partial derivatives of x3 − y 2 and x5 − y 2 to each other. This √is impossible. On the other hand, the formal isomorphism defined b 0) onto (Z, b 0). It is an isomorphism by the by (x, y) 7→ (x 3 1 + x2 , y) sends (X, inverse function theorem for formal power series. √ Ex. 3.27. The maximal ideal of K[[x]] is generated by x. Since 1 + x is a  √ P unit in K[[x]] (its inverse is (1 + x)−1/2 = k≥0 −1/2 (−1)k xk ), also x · 1 + x k √ generates this ideal. Therefore x· 1 + x is a regular system of parameters in K[[x]]. √ It does not stem from a regular parameter system in K[x](x) since 1 + x cannot be written as a quotient of polynomials. Ex. 3.28. The maximal ideal of the local ring OA2 ,0 = K[x, y](x,y) is generated by x and y. As x2 + 1 is invertible in K[x, y](x,y) , also y 2 − x3 − x = y 2 − x(x2 + 1) and y generate this ideal. They hence form a regular system of parameters of OA2 ,0 . For the remaining assertions, see ex. 2.41. Ex. 3.31. Computing the derivatives of x2 − y 2 z with respect to x, y and z and setting them zero shows that the singular locus of X is the z-axis. Let bX,a = a = (0, 0, t) with t 6= 0 be a point√of the z-axis outside the origin. Then O 2 2 C[[x, y, z]]/(x − y (z − t)). Since z − t is for √ t 6= 0 a formal√power series in z the quotient can be rewritten as C[[x, y, z]]/(x − y z − t)(x + y z − t). The product BLOWUPS AND RESOLUTION 65 √ √ (x−y z − t)(x+y z − t) = 0 defines two smooth formal surfaces intersecting each other transversally. √ They are√formally isomorphic to the union of the two planes defined by (x − y −t)(x + y −t) = 0. Hence a is a normal crossings point of X. But it is not a simple normal crossings point since, globally, X consists of only one component which is moreover singular at a. bX,0 = K[[x, y, z]]/(x2 −y 2 z). Since x2 −y 2 z is The formal neighborhood of 0 is O irreducible in K[[x, y, z]] and X is singular at 0 the origin is not a normal crossings point of X. Ex. 3.34. Over C or any finite field Fq with q congruent to 1 modulo √ 4 there 2 2 −1y)(x − exists a square root of −1, hence the variety defined by x + y = (x + √ −1y) = 0 has normal crossings at the origin. Since both components are regular at 0 it also has simple normal crossings. The surface defined by x2 + y 2 + z 2 = 0 does not have normal crossings over R or C, but it has normal crossings over a field of characteristic 2, since x2 + y 2 + z 2 = (x + y + z)2 in characteristic 2 so that the variety is a double plane. The same holds for the variety defined by x2 + y 2 + z 2 + w2 = 0. The variety xy(x − y) = 0 has three components passing through 0, but as A2 has only two coordinate subspaces the variety does not have normal crossings at 0. The same argument works for xy(x2 − y) = 0. The variety defined by (x − y)z(z − x) = 0 has both normal and simple normal crossings at the origin over any field. Ex. 3.35. The visualization of the surface looks as follows, cf. figure 5. Figure 5: The zeroset of (x − y 2 )(x − z)z = 0 in A3 . Ex. 3.38. A point a is a regular point of a variety if the local ring is regular, i.e., if its maximal ideal can be generated by as many elements as the Krull dimension indicates. For a cartesian product X × Y , the local ring at a point (a, b) is the tensor product of the local rings of the two factors, OX×Y,(a,b) = K[X × Y ]m(a,b) ' K[X]ma ⊗ K[Y ]mb = OX,a ⊗ OY,b and the same holds for the respective maximal ideals, m(a,b) /m2(a,b) ' ma /m2a ⊗ mb /m2b . 66 HERWIG HAUSER Therefore (a, b) ∈ X × Y is regular if and only if a is regular in X and b is regular in Y . Consequently, Sing(X × Y ) = (Sing(X) × Y ) ∪ (X × Sing(Y )). Ex. 3.39. A rather simple example for such a variety is the surface Tülle defined by xz(x + z − y 2 ) = 0 in A3 . The pairwise intersections of its three components are the y-axis, respectively the two parabolas defined by x = z − y 2 = 0 and z = x − y 2 = 0, and are therefore regular. The parabolas are tangent to the y-axis at 0. Said differently, the intersection of all three components, which is settheoretically just the origin 0 ∈ A3 , is scheme-theoretically singular (i.e., the sum of the three ideals (x), (z) and (x + z − y 2 ) is not the ideal (x, y, z) defining the origin in A3 ). Because of this, the surface is not mikado at 0. Ex. 4.25. For X = V (xy, x2 ) and a the origin, the local ring is OX,a = K[x, y]/(xy, x2 )(x,y) ' K[x, y](x,y) /(xy, x2 ). As a scheme, X equals the y-axis together with an embedded point at 0, since (xy, x2 ) has the primary decomposition (xy, x2 ) = (x) ∩ (x2 , y). As Z = {0} cannot be defined in X by a single equation, it is not a Cartier divisor. Ex. 4.26. The local ring OX,a of X = A1 at the origin is OX,a = K[x](x) . The monomial x2 is not a zero-divisor in OX,a , hence Z = V (x2 ) is a Cartier divisor in A1 . Similarly, x2 y is not a zero divisor in OA2 ,a = K[x, y](x−a1 ,y−a2 ) for any a = (a1 , a2 ) ∈ A2 and Z = V (x2 y) is a Cartier divisor in A2 . Ex. 4.27. As Z = V (x2 , y) is defined in X = V (x2 , xy) by y = 0 where the residue class y of y in OX,0 = K[x, y](x,y) /(x2 , xy) is a zero divisor, it follows that Z is not a Cartier divisor in X. Ex. 4.38. The Rees algebra of the ideal I = (x, 2y) in Z20 [x, y] is given by M M e= R I k tk = (xt, 2yt)k = Z20 [x, y, xt, 2yt] k≥0 k≥0 with deg t = 1. It is isomorphic to Z20 [u, v, w, z]/(uz − 2vw) with deg u = deg v = 0 and deg w = deg z = 1. Ex. 4.46. The blowup of A2 in Z = {(0, 1)} is given by the closure Γ of the graph of γ : A2 \ {(0, 1)} → P1 , (a, b) 7→ (a : b − 1) in A2 × P1 together with the projection π : Γ → X, (a, b, (c : d)) 7→ (a, b). More explicitly, Γ = {(a, b, (a : b − 1)), (a, b) ∈ A2 } ∪ {(0, 1)} × P1 . The line L in A2 defined by x + y = 0 does not contain the point (0, 1), therefore its preimage in Γ is π −1 (L) = {((a, −a), (a : −a − 1)), a ∈ A1 }. The line L0 in A2 defined by x + y = 1 contains the point (0, 1), therefore its preimage in Γ is π −1 (L0 ) = {(a, 1 − a, (a : −a)), a ∈ A1 \ {0}} ∪ {(0, 1)} × P1 . Ex. 4.47. The chart expressions of the blowup map of A3 along the z-axis are given by π1 (x, y, z) = (x, xy, z) and π2 (x, y, z) = (xy, y, z). Their inverses are π1−1 (x, y, z) = (x, xy , z) and π2−1 (x, y, z) = ( xy , y, z). The chart transition maps are BLOWUPS AND RESOLUTION 67 given by the compositions π1−1  ◦ π2 (x, y, z) = 1 xy, , z x  and π2−1  ◦ π1 (x, y, z) =  1 , xy, z . y Ex. 4.48. Let the chosen line Z in the cone X be defined by x = y − z = 0. It requires two equations, therefore it is not a Cartier divisor. The polynomials x and y − z form a regular sequence in K[X] = K[x, y, z]/(x2 + y 2 − z 2 ). Therefore e of X along Z is given in X × P1 by the equation xv − (y − z)u = the blowup X where (u : v) are projective coordinates in P1 . An alternate way to compute the blowup is by applying first the linear coordinate change u = x, w = y + z and t = y − z. The equation x2 + y 2 = z 2 of X transforms into Y : u2 + 2wt = 0 and x = y − z = 0 becomes u = t = 0. The latter equations define the w-axis, which is now the center of blowup. The resulting chart expressions of the blowup map are given by π1 (u, w, t) = (ut, w, t) and π2 (u, w, t) = (u, w, wt). This gives the chart descriptions of the total transform Y ∗ of Y via Y1∗ = V (u2 t2 + 2wt) = V (t) ∪ V (u2 t + 2w), Y2∗ = V (u2 + 2uwt) = V (u) ∪ V (u + 2wt), respectively. Substituting backwards gives X1∗ = V (y − z) ∪ V (x2 (y − z) + 2(y + z)), X2∗ = V (x) ∪ V (x + 2(y 2 − z 2 )), where the second components denote the chart expressions of the strict transform e 3 of A3 along Z, i.e., of the blowup X e of X along Z, cf. X s of X in the blowup A def. 6.2 as well as Prop. 5.1 together with its corollary. Ex. 4.49. The polynomials z and x2 +(y +2)2 −1 defining the circle in A3 form a regular sequence. Hence, if (u : v) denote projective coordinates in P1 , the blowup e of X along the circle is given in X ×P1 by the equation uz−v(x2 +(y+2)2 −1) = 0 X e → X on the first factor. together with the projection π : X The polynomials z and y 2 − x3 − x defining the elliptic curve in A3 form a regular e of X along this curve is given in X × P1 by the sequence, too. The blowup X 2 3 e → X on the equation uz − v(y − x − x) = 0 together with the projection π : X first factor. Ex. 4.52. The ideals I = (x1 , . . . , xn ) and J = (x1 , . . . , xn )m = I m induce e = ⊕k≥0 I k and Se = ⊕k≥0 J k = ⊕k≥0 I mk , hence define isomorphic Rees algebras R n the same blowups of A . See [Moo01] for more details on the characterization of ideals producing the same blowup. 68 HERWIG HAUSER Ex. 4.57. Since the centers of the blowups are given by coordinate subspaces, the definition of blowup via affine charts can be used. For the blowup in the origin the three chart expressions of the blowup map are given by πx (x, y, z) = (x, xy, xz), πy (x, y, z) = (xy, y, yz) and πz (x, y, z) = (xz, yz, z). This gives for the total transforms of X the expressions Xx∗ = V (x2 − x3 y 2 z) = V (x2 ) ∪ V (1 − xy 2 z), Xy∗ = V (x2 y 2 − y 3 z) = V (y 2 ) ∪ V (x2 − yz), Xz∗ = V (x2 y 2 − y 2 z 3 ) = V (z 2 ) ∪ V (1 − xy 2 z). e of X is given by gluing the three charts V (1 − xy 2 z), V (x2 − yz), The blowup X and V (1 − xy 2 z) of the strict transform X s of X according to def. 4.12. Observe that the origin of the y-chart V (x2 − yz) has the same singularity as X at 0. The blowup of X along the x-axis yields for the blowup map the chart expressions πy (x, y, z) = (x, y, yz) and πz (x, y, z) = (x, yz, z). As the x-axis is not e of X contained in X, the total transform X ∗ and the strict transform X s = X e coincide, cf. def. 6.2. This gives for X the chart expressions ey = V (x2 − y 3 z), X ez = V (x2 − y 2 z 3 ). X For the blowup of X along the y-axis, the total transform has chart expressions Xx∗ = V (x) ∪ V (x − y 2 z), Xz∗ = V (z) ∪ V (x2 z − y 2 ), where the secondly listed components are the charts of the strict transform. Again, the chart V (x2 z − y 2 ) has, up to permutation of the variables, the same singularity as X at 0. The blowup of X along the z-axis gives accordingly Xx∗ = V (x2 ) ∪ V (1 − y 2 z), Xy∗ = V (y 2 ) ∪ V (x2 − z). Ex. 4.64. The blowup of X = Spec(Z[x]) along I = (x, p) is covered by two charts with coordinate rings Z[x, x/p] ' Z[x, u]/(x − pu) ' Z[u] and Z[x, p/x] ' Z[x, u]/(p − xu), respectively. Observe that the second chart is not equal to the affine line A1Z over Z, see also [EH00]. For the blowup of X along I = (px, pq) one cannot use the equations of def. 4.10 since px and pq do not form a regular sequence in Z[x]. Similarly as before, the affine charts have coordinate rings Z[x, x/q] ' Z[x, u]/(x − qu) ' Z[u] and Z[x, q/x] ' Z[x, u]/(q − xu), respectively. Ex. 5.12. The equations g1 = y 2 − xz, g2 = yz − x3 and g3 = z 2 − x2 y do not form a regular sequence, since they admit the non-trivial linear relations z · g1 − y · g2 + x · g3 = 0 and x2 · g1 − z · g2 + y · g3 = 0. Therefore one cannot use the equations of def. 4.10 to describe the blowup of A3 along the curve Z defined by g1 = g2 = g3 = 0. Ex. 5.13. Consider the map γ : X \ Z → P1 , (x, y, z) 7→ (x : y). For x = y = 0 and z 6= 0 there lies only one point in the closure Γ of the graph of γ in X × P1 , while for z = 0 the set of limit points forms a projective line P1 . The blowup is a local isomorphism outside 0 since Z is locally a Cartier divisor in X at these points BLOWUPS AND RESOLUTION 69 (being locally a regular curve in a regular surface). Above 0 ∈ X the blowup map e → X is not a local isomorphism, since π contracts all limit points to 0, or, π:X e is regular, while X is singular at 0. alternatively, because the blowup X e 2 → A2 with center the origin has the chart exEx. 5.14. The blowup map π : A pressions (x, y) 7→ (x, xy) and (x, y) 7→ (xy, y). The total transform X ∗ = π −1 (X) e 2 has therefore charts defined in A2 by x2 = 0, respectively of X = V (x2 ) in A 2 2 x y = 0, with exceptional divisors given by x = 0 and y = 0. Hence the strict e of X lies only in the y-chart and is defined there by x2 = 0. transform X s = X Ex. 5.15. The same computation as in the preceding example applies and e lies entirely in the y chart. It is defined there by the ideal (x2 , x) = shows that X (x), equals hence the y-axis of this chart. Ex. 5.17. The blowup of A3 along the union of two coordinate axes is discussed in ex. 4.36 and 4.66. e 3 of A3 along the cusp (x3 − y 2 , z) is defined in A3 × P1 by The blowup A 3 2 uz − v(x − y ) = 0, since x3 − y 2 and z form a regular sequence. It follows that e 3 is singular at 0. A Ex. 6.14. By Prop. 6.6, the defining ideal of the strict transform of X is generated by the strict transforms of the elements of a Macaulay basis of the ideal (x2 − y 3 , xy − z 3 ). Notice that the given generators are not a Macaulay basis since their initial forms are x2 and xy, which do not generate the initial form of y(x2 − y 3 ) − x(xy − z 3 ) = xz 3 − y 4 . By adding this element, the Macaulay basis x2 − y 3 , xy − z 3 , xz 3 − y 4 is obtained. The chart expressions of the strict transform of X can now be computed from this Macaulay basis, Xxs = V (1 − xy 3 , y − xz 3 , z 3 − y 4 ), Xys = V (x2 − y, x − yz 3 , xz 3 − 1), Xzs = V (x2 − y 3 z, xy − z, x − y 4 ). Ex. 6.18 and 6.19. The transformation of flags under blowups is explicitly described in [Hau04] p. 5–8. Ex. 6.22. In the y-chart, the total transform of I = (x2 , y 3 ) is given by the ideal I ∗ = (x2 y 2 , y 3 ). Factoring out the maximal power of the monomial defining the exceptional divisor, I ∗ = (y 2 )(x2 , y) is obtained. Thus, the weak transform of I is given by the ideal I g = (x2 , y). On the other hand, it is easy to see that x2 , y 3 is a Macaulay basis for I. Thus, by Prop. 6.6, the strict transform of I is generated by the strict transforms of these generators. Therefore, I s = (x2 , 1) = K[x, y]. Ex. 6.23. This result is proved in [Hau03], p. 345. Ex. 7.10. For the first two equations, the implicit function theorem shows that the zerosets are regular at 0. This gives a parametrization by formal power 70 HERWIG HAUSER series. The zeroset of the third equation is singular at 0 and one cannot use the implicit function theorem to describe it at 0. To give a parametrization requires to construct first a resolution, which, in the present case, is very tedious. Ex. 7.14. Consider the case that the resolution of Y is achieved by a sequence of blowups: πn−1 πn−2 π0 Y0 = Y. Y 0 = Yn −→ Yn−1 −→ · · · −→ Denote by Zi ⊆ Yi the center of the blowup πi : Yi+1 → Yi . Since Z is regular, the singular locus of Y × Z is Sing(Y ) × Z. By the base change property for blowups, Prop. 5.1, the blowup of Yi × Z along the center Zi × Z equals Yi+1 × Z. This gives a new sequence π en−1 π en−2 π e 0 Y0 × Z = Y × Z Y 0 × Z = Yn × Z −→ Yn−1 × Z −→ · · · −→ where π ei : Yi+1 × Z → Yi × Z is the blowup along the center Zi × Z ⊆ Yi × Z. It is checked that the morphism Y 0 × Z → Y × Z is a resolution of the singularities of Y × Z. Ex. 8.25. Consider the variety X = V ((x2 − y 3 )(z 2 − w3 )) ⊆ A4 over a field of characteristic zero. The stratification of X by the iterated singular loci is as follows. Sing(X) = V (x, y) ∪ V (z, w) ∪ V (x2 − y 3 , z 2 − w3 ), Sing2 (X) = V (x, y, z 2 − w3 ) ∪ V (z, w, x2 − y 3 ), Sing3 (X) = V (x, y, z, w). Ex. 8.30–8.32. Let J ⊆ R be an ideal and I ⊆ R a prime ideal. The order of J along I is defined as ordI J = max{k ∈ N, JRI ⊆ I k RI } where RI is the localization of R in I. If I (k) = I k RI ∩ R denotes the k-th symbolic power of I, the order can also be expressed as ordI J = max{k ∈ N, J ⊆ I (k) } without making explicit use of the localization [ZS75]. Now consider the example R = K[x, y, z], I = (y 2 − xz, yz − x3 , z 2 − x2 y). It can be checked that I is a prime ideal of R but not a complete intersection (i.e., not generated by a regular sequence, cf. ex. 5.12). Also consider the principal ideal J in R that is generated by f = x5 + xy 3 + z 3 − 3x2 yz. The order of J along I can be determined as follows. First notice that f ∈ / I 2 since f has order 3 at the origin, 2 but all elements in I have at least order 4 at the origin. On the other hand, xf = x6 + x2 y 3 + xz 3 − 3x3 yz = (x3 − yz)2 − (y 2 − xz)(z 2 − x2 y) ∈ I 2 . Since x ∈ / I, this implies that J · RI ⊆ I 2 RI , and in particular, ordI J ≥ 2. Thus, f is an example for an element in R that is contained in the symbolic power I (2) , but not in I 2 . It remains to show that ordI J = 2. By Thm. 8.20 it suffices to find a point a that lies on the curve V (I) for which orda f = 2. Such a point is for instance a = (1, 1, 1) ∈ V (I). Pc−1 Ex. 8.39. Consider the polynomial g = xc + i=0 gi (y) · xi at the origin a = 0 of A1+n . The order of g at a equals the minimum of c and all values BLOWUPS AND RESOLUTION 71 orda gi + i, for 0 ≤ i < c. Assume that ord0 g = c and also that gc−1 = 0. If the characteristic of the ground field is zero, this can be achieved by a change of coordinates x 7→ x + 1c · gc−1 (y), compare with rem. 9.4 and ex. 9.10. The defining i+|α| ∂ ideal I of the top locus of V (g) is generated by the derivatives ∂x i ∂y α g where i ∈ N, n α ∈ N and i + |α| < c. In particular, if the characteristic of the ground field is ∂ c−1 zero, ∂x c−1 g = c! · x ∈ I and thus x ∈ I. This allows to express I in the form:  ∂ |α| n I = x, α gi (y), for α ∈ N , i < c, |α| < c − i . ∂y P Ex. 8.43. Assume that ord g = d and g = i,j cij y i z j . The order will always be taken at the origin of the respective charts. Let g 0 be the strict transform of g under the first blowup. Then X g0 = cij y i+j−d z j .  i,j Set d0 = ord g 0 and notice that d0 = min{i + 2j − d, cij 6= 0}. Let g 00 be the strict transform of g 0 under the second blowup. Then X 0 g 00 = cij y i+j−d z i+2j−d−d . i,j Set d00 = ord g 00 and notice that d00 = min{2i + 3j − 2d − d0 , cij 6= 0}. It is clear that d00 ≤ d0 ≤ d. If d0 ≤ d2 , then d00 ≤ d2 follows. So assume that d0 > d2 . By assumption, there exists a pair (i, j) ∈ N2 such that i + j = d and cij 6= 0. Thus, d d d00 ≤ 2i + 3j −2d −d0 < j − ≤ . |{z} |{z} 2 | {z } 2 =2d+j <− d 2 ≤d Ex. 8.53. The situation is described in detail in [Hau00], Prop. 4.5, p. 354, and [Zar44], Thm. 1 and Lemma 3.2, p. 479. If the center is a smooth curve, see [Hau00], Prop. 4.6, p. 354, and [Zar44], Thm. 2, p. 484 and its corollary, p. 485. bW,a ' K[[x1 , . . . , xn ]]. Assume Ex. 9.8. Let a = 0 and pass to the completionP O that P orda f = c and that f has the expansion f = α∈Nn cα xα . The initial form of f is |α|=c cα xα . It is assumed that the blowup is monomial; thus, a0 is the origin of the xi -chart for some i ≤ n. If i > 1, then a0 is contained in the strict transform of V s . It remains to show that, if a0 is the origin of the x1 -chart, the order of the strict transform of f is smaller than c . For this, notice that the strict transform of f at the origin of the x1 -chart is P |α|−c−α1 α given by f 0 = α∈Nn cα x1 x where α1 is the first component of α. The monomials of this expansion are distinct, so there can be no cancellation between them. By assumption, x1 appears in the initial form of f ; thus, there is an exponent α0 ∈ Nn such that |α0 | = c, α10 > 0 and cα0 6= 0. This implies that the expansion of −α0 f 0 contains the non-zero monomial cα0 x1 1 xα . Therefore orda0 f 0 < c = orda f . 72 HERWIG HAUSER Ex. 9.10. Assume that the characteristic of the ground field is zero. The coordinate change xn 7→ xn − d1 · ad−1 (y) transforms f into  d X  i d−1 1 1 f 7→ xn − · ad−1 (y) + ai (y) xn − · ad−1 (y) . d d i=0 Notice thatthe coefficient of xdn in this new expansion is 1 and the coefficient of xd−1 is − d1 d1 ad−1 (y) + ad−1 (y) = 0. Thus, there are polynomials e ai (y) such that, n in the new coordinates, d−2 X f = xdn + e ai (y)xin . i=0 ∂ d−1 (f ) ∂xd−1 n = d! · xn . Thus, the variety defined by xn = 0 defines an Consequently, osculating hypersurface for X at the origin. By Prop. 9.5, every osculating hypersurface has maximal contact. Ex. 9.11. The defining equation for the strict transform of X in the x-chart is given by f 0 = y + y 2 − z + y 2 z − z 2 − yz 2 = ((y + 1) − (z + 1))(y + 1)(z + 1). The order of f 0 at the point a0 = (0, −1, −1) is 3. Since the exceptional divisor is given by the equation x = 0 in the x-chart, a0 lies on it. The strict transform V s of V coincides with the complement of the x-chart, so a0 cannot lie on V s . Ex. 9.14. The relevant case appearsPwhen c = p > 0 where p is the characteristic of the ground field. Let g(y) = α∈Nm gα y α be the expansion of g with respect to the coordinates y1 , . . . , ym . It decomposes into X X g(y) = gα y α + gα y α . α∈p·Nm | α∈Nm \p·Nm {z g1 (y) } {z | g2 (y) } If the ground field is assumed to be perfect, g1 (y) is a p-th power. Thus, there is a formal power series ge(y) with ord ge ≥ 1 such that gep = g1 . Apply the change of coordinates x 7→ x − ge. This transforms f into f = (x − ge)p + g1 + g2 = xp − gep + g1 + g2 = xp + g2 . Notice that ord g2 ≥ ord g. To show that this order is maximal, it suffices to consider an arbitrary change of coordinates z 7→ z + h(y) where h ∈ K[[y1 , . . . , ym ]] is any power series with ord h ≥ 1. This transforms the equation into f = xp + hp + g2 . Notice that there can be no cancellation between the terms in the expansions of hp and g2 . Thus, ord(hp + g2 ) ≤ ord g2 . Ex. 9.17. Denote the sequence of local blowups by πm−1 π 0 (W 0 , a0 ) = (Wm , am ) −→ · · · −→ (W0 , a0 ) = (W, a). Set f (0) = f and let f (i) be the strict transform of f after i blowups. Assume that the center of each local blowup πi : (Wi+1 , ai+1 ) → (Wi , ai ) is contained in the top BLOWUPS AND RESOLUTION 73 locus of f (i) and has normal crossings with the exceptional divisors produced by previous blowups. Let Z be a local hypersurface of maximal contact for f at a. Assume that ordai f (i) = orda f for i = 1, . . . , m. Then, by definition of maximal contact, ai ∈ Zi for i = 0, . . . , m, where Zi denotes the strict transform of Z after i blowups. Since all centers are contained in the top locus of f (i) , they are also contained in Zi . By repeatedly applying Prop. 5.3, the union of all exceptional divisors produced by the blowups πm−1 , . . . , π0 with Z 0 = Zm is a normal crossings divisor. Thus, a0 is contained in n + 1 hypersurfaces that form a normal crossings divisor. But this is impossible in an ambient space of dimension n. Ex. 10.20. Set f = x5 + x2 y 4 + y k . Denote by Vx and Vy the regular local hypersurfaces defined by x = 0, respectively y = 0. If k ≥ 5, then the order of f at the origin is 5 and the derivative ∂x4 f = 5! · x defines the hypersurface Vx . Thus, Vx is osculating. If k = 4, then the order of f at the origin is 4. The derivative ∂y3 f = 4! · y(1 + x2 ) defines a regular parameter. Since 1 + x2 is a unit in the local ring OA2 ,0 , the hypersurface Vy is osculating. If k < 4, taking the differential with respect to y shows again that Vy is an osculating hypersurface. If k ≥ 5, then JVx (I) = (y 160 , y 24k ) and JVy (I) = (x240 , x120 ) = (x120 ). Thus, both Vx and Vy have weak maximal contact if k = 5, while only Vx has k! weak maximal contact if k > 5. If 2 ≤ k ≤ 4, then JVx (I) = (y 4 k−2 , y k! ) and JVy (I) = (x5(k−1)! ). Since k! < 5(k − 1)!, only Vy has weak maximal contact in this case. Ex. 10.21. Assume that the characteristic of the ground field is not equal to 2. Then ∂x f = 2x and the hypersurface V has weak maximal contact with f by Prop. 10.11. The coefficient ideal JV (f ) of f with respect to V is generated by y 3 z 3 + y 7 + z 7 and has order 6 (up to raising the generator to the required power). Restrict to the case of the blowup of A2 at the origin and the study of f at the origin of the y-chart. The strict transform of f is given there by f 0 = x2 + y 4 (z 3 + y + yz 7 ). The points where the order of f 0 has remained constant are exactly the points of the z-axis. Let V 0 denote the strict transform of V . Then JV 0 (f 0 ) is generated by y 4 (z 3 + y + yz 7 ) where y 4 is the exceptional factor (again, up to taking powers). The order of the residual factor has dropped to 1 at the origin and to 0 at all other points of the z-axis. Ex. 10.22. Assume that a = 0, orda f = c and that JV (f ) = (y α ) where n−1 y = (x . Now let L ⊆ {1, . . . , n − 1} be a subset such P1 , . . . , xn−1 ) and αP∈ N that α ≥ c! but i∈L i i∈L\{j} αi < c! for all j ∈ L. This is possible since orda JV (f ) = |α| ≥ c! by the definition of coefficient ideals. Blow up An in the center given by xn = 0 and xi = 0 for all i ∈ L. Let a0 be a point over a at which the order of the strict transform of f has remained constant. Since V is osculating, a0 is not contained in the xn -chart. So let j ∈ L be such that a0 is contained in the xj -chart. The transform of the coefficient ideal in this chart is P αi −c! α JV 0 (f 0 ) = JV (f )! = (xj i∈L\{j} y ). P 0 0 0 But since i∈L\{j} αi − c! < 0 by assumption, it follows that orda JV (f ) < orda JV (f ). But the order of the coefficient ideal is at least c! as long as the order of the strict transform of f remains equal to c. Thus, by iterating this procedure, 74 HERWIG HAUSER after finitely many steps the order of the strict transform of f has to drop. Ex. 10.27. Assume that ord I = c. Let x1 , . . . , xn be a regular system of bAn ,0 = K[[x1 , . . . , xn ]]. Define a map π : Nn → N ∪ {∞} in the parameters for O following way: ( Pn−1 c! αi if αn < c, π(α1 , . . . , αn ) = c−αn i=1 ∞ if αn ≥ c. Let V be the regular local hypersurface defined by xn = 0. Elements f ∈ I have P expansions f = α∈Nn cf,α xα . Then, by the definition of coefficient ideals, ord(JV (I)) = min{π(α), α ∈ Nn : there is an f ∈ I such that cf,α 6= 0}. Now define a monomial order <ε on K[x1 , . . . , xn ] in the following way: Set xα <ε xβ if and only if π(α) < π(β) or π(α) = π(β) and α <lex β where <lex denotes the lexicographic order on Nn . By [Hau04], Thm. 3, p. 10, there exists a regular system of parameters x1 , . . . , xn bAn ,0 such that the initial ideal of I with respect to <ε is maximal (again, with for O bAn ,0 . In parrespect to <ε ) over all choices of regular systems of parameters for O ticular, let y1 , . . . , yn be another regular system of parameters and let each f ∈ I P 0 α have the expansion f = with respect to these parameters. Then α∈Nn cf,α y n there exist elements g ∈ I and α e ∈ N such that c0g,e α 6= 0 and π(e α) ≤ min{π(α), α ∈ Nn , there is an f ∈ I such that cf,α 6= 0}. Let V 0 be the regular local hypersurface defined by yn = 0. Then the last statement implies that ord(JV 0 (I)) ≤ ord(JV (I)). Thus, the regular system of parameters x1 , . . . , xn maximizes the order of the coefficient ideal. Ex. 10.30. Let I be an ideal with orda I = orda0 I g where a0 is the origin of the xj -chart for some j < P n and I g denotes the weak transform of I. Elements f ∈ I have expansions f = i≥0 fi (y)xin where y = (x1 , . . . , xn−1 ). Then o! JV (I) = (fio−i , i < o, f ∈ I). The weak transform of I is given by I g = (f g , f ∈ I) where X X −o ∗ ∗ i i i f g = x−o f = x f x x = (fi∗ xi−o i n j j j j ) xn . {z } | i≥0 i≥0 =:fi0 Here, f ∗ and fi∗ denote the total transforms. Thus, the coefficient ideal of I g with respect to the strict transform V 0 of V is 0 o! o! o! (i−o) o−i JV 0 (I g ) = (fi o−i : i < o, f ∈ I) = (fi∗ o−i xj ∗ x−o! j (fi o! o−i : i < o, f ∈ I) ∗ ! : i < o, f ∈ I) = x−o! j (JV (I)) = JV (I) where JV (I)! denotes the controlled transform with control o!. Ex. 11.14 and 11.15. These examples are discussed in detail in Lecture XII. Ex. 12.17–12.22. Let K be a field of characteristic 2. Consider the ring homomorphism φ : K[x, y, z, w] → K[t] given by φ(x) = t32 , φ(y) = t7 , φ(z) = t19 , BLOWUPS AND RESOLUTION 75 φ(w) = t15 . Let I ⊆ K[x, y, z, w] be its kernel. Its zeroset is an irreducible curve C in A4 . Now let f be the polynomial f = x2 + yz 3 + zw3 + y 7 w. The partial derivatives of f have the form: ∂ f = 0, ∂x ∂ f = z 3 + y 6 w, ∂y ∂ f = yz 2 + w3 , ∂z ∂ f = zw2 + y 7 . ∂w It is easy to check that f and all of its first derivatives are contained in I. Thus, by the Jacobian criterion, ordI f ≥ 2. Since the order of f in the origin is 2, it is possible to conclude that ordI f = 2. In other words, the top locus of f contains the curve C that is parametrized by t 7→ (t32 , t7 , t19 , t15 ). It can be checked, e.g. via any computer algebra system, that the top locus of f is itself an irreducible curve. Thus, it coincides with the curve C. Now suppose that there is a regular local hypersurface at the origin that contains the top locus of f and hence the curve C. This hypersurface has an equation h = 0 in which at least one variable must appear linearly. But since h ∈ I, this is only possible if one of the numbers 32, 7, 19, 15 can be written as an N-linear combination of the others. This is not the case so that there is no regular local hypersurface containing the top locus of f . Let V be any regular local hypersurface at the origin. Since it does not contain the curve C, there is a sequence of point blowups that separates the strict transforms of V and C. Since the variety X defined by f = 0 has order 2 along the curve C and the point blowups are isomorphisms over all but one point of C, the order of the strict transform of X under these blowups will again be 2 along the strict transform of C. So there eventually is a point a0 at which the strict transform of X has order 2, but which is not contained in the strict transform of V . Thus, V does not have maximal contact with X. Since V was chosen arbitrarily, there can be no hypersurface that has maximal contact with X. Ex. 12.24. Let α ∈ Nn . Define the differential operator ∂xα on K[x1 , . . . , xn ]  β−α β as the linear extension of ∂xα xβ = α x . In particular, consider the differential operator ∂xpi for i ∈ {1, . . . , n}. If n ∈ N  P has the p-adic expansion n = i≥0 ni pi with 0 ≤ ni < p, then ∂xpi xni = np xn−p = i k for any k ∈ N. n1 xn−p . Similarly, ∂xpk xni = nk xn−p i i i Notice that ∂xpi is not a derivation since it does not fulfill the Leibniz rule: ∂xpi (xpi ) = 1, but xi ∂xpi xip−1 +xip−1 ∂xpi xi = 0. | {z } | {z } 0 0 For more details on differential operators in positive characteristic, see [Kaw07] Chap. 1, pp. 838–851. 76 HERWIG HAUSER 5 4 4 4 4 Ex. 12.25. Consider f = z 3 + x4·3 y 3 (x3 + y 3 + x300 ) as a polynomial over a field of characteristic 3. Assume that the exceptional locus is given locally by V (xy). Then its residual order with respect to the local hypersurface defined by z = 0 is 34 . Now consider the blowup of A2 at the origin and let a0 be the point (0, 1, 0) in the x-chart. The strict transform of f has the equation 5 5 4 4 5 5 4 4 f 0 = z 3 + x3 (y 3 + 1)(y 3 − 1 + x219 ) = z 3 + x3 (y 2·3 − 1 + x219 (1 + y 3 )). By making the change of coordinates z 7→ z + x, this transforms into 5 5 4 4 f 0 = z 3 + x3 (y 2·3 + x219 (1 + y 3 )). The exceptional divisor is given locally by V (x). Thus, the residual order of f 0 with respect to the hypersurface defined by z = 0 is 2 · 34 > 34 . Ex. 12.26. The equation of f in local coordinates x, y, z at a point (0, 0, t) on the z-axis is obtained by making a translation z 7→ z + t. Thus, the equation xp + y p (z + t) = xp + y p z + y p t is obtained. Assume that the ground field is perfect and let λ be the p-th root of t. Then one can write xp + y p z + y p t = (x + λy)p + y p z. Thus, the residual order of f at every point of the z-axis is p + 1. Now consider the generic point P = (x, y) of the z-axis. The order of the coefficient ideal along P is p. Ex. 12.27. Observe that G+ (y) = m−1 Y rm + g (y). (yi + ym )ri ym i=1 Let I denote the ideal (y1 , . . . , ym−1 ). Notice that I defines a complete intersection. By [Hoc73] 2.1, p. 57, [Pel88], Prop. 1.8, p. 359, the order of a polynomial f along I can be expressed as the largest power of I that contains f . In particular, it fulfills that ordI (f · g) = ordI f + ordI g for polynomials f, g. Now compution yields ordI G+ (y) = m−1 X i=1 ri · ordI (yi + ym ) +rm · ordI ym +ordI g + (y) | {z } {z } | 0 0 + ≤ ord g (y) = ord g(y) = k. Ex. 12.29 and 12.30. This is explained in detail in [Hau10a]. References [Abh56] [Abh59] [Abh64] [Abh66a] [Abh66b] [Abh67] S. Abhyankar, Local uniformization on algebraic surfaces over ground fields of characteristic p 6= 0, Ann. of Math. (2) 63 (1956), 491–526. , Ramification theoretic methods in algebraic geometry, Annals of Mathematics Studies, no. 43, Princeton University Press, 1959. , Uniformization in p-cyclic extensions of algebraic surfaces over ground fields of characteristic p, Math. Ann. 153 (1964), 81–96. , An algorithm on polynomials in one indeterminate with coefficients in a two dimensional regular local domain, Ann. Mat. Pura Appl. (4) 71 (1966), 25–59. , Uniformization in a p-cyclic extension of a two dimensional regular local domain of residue field characteristic p, Festschr. Gedächtnisfeier K. Weierstrass, Westdeutscher Verlag, 1966, pp. 243–317. , Nonsplitting of valuations in extensions of two dimensional regular local domains, Math. Ann. 170 (1967), 87–144. BLOWUPS AND RESOLUTION [Abh88] [Abh98] 77 , Good points of a hypersurface, Adv. in Math. 68 (1988), no. 2, 87–256. , Resolution of singularities of embedded algebraic surfaces, second ed., Springer Monographs in Mathematics, Springer-Verlag, 1998. [AM69] M. Atiyah and I. MacDonald, Introduction to commutative algebra, Addison-Wesley Pub. Co, 1969. [AM73] S. Abhyankar and T.-T. Moh, Newton-Puiseux expansion and generalized Tschirnhausen transformation. I, II, J. Reine Angew. Math. 260 (1973), 47–83; ibid. 261 (1973), 29–54. [Art86] M. Artin, Lipman’s proof of resolution of singularities for surfaces, Arithmetic geometry (Storrs, Conn., 1984), Springer, 1986, pp. 267–287. [AZ55] S. Abhyankar and O. Zariski, Splitting of valuations in extensions of local domains, Proc. Nat. Acad. Sci. U. S. A. 41 (1955), 84–90. [BDMVP12] E. Bierstone, S. Da Silva, P. Milman, and F. Vera-Pacheco, Desingularization by blowings-up avoiding simple normal crossings, 2012, arXiv:1206.5316. [Ben70] B. Bennett, On the characteristic functions of a local ring, Ann. of Math. (2) 91 (1970), 25–87. [BHSV08] G. Bodnár, H. Hauser, J. Schicho, and O. Villamayor, Plain varieties, Bull. London Math. Soc. 40 (2008), 965–971. [BM97] E. Bierstone and P. Milman, Canonical desingularization in characteristic zero by blowing up the maximum strata of a local invariant, Invent. Math. 128 (1997), no. 2, 207–302. [BM06] , Desingularization of toric and binomial varieties, J. Algebraic Geom. 15 (2006), no. 3, 443–486. , Functoriality in resolution of singularities, Publ. Res. Inst. Math. Sci. 44 [BM08] (2008), no. 2, 609–639. [Bod03] G. Bodnár, Computation of blowing up centers, J. Pure Appl. Algebra 179 (2003), no. 3, 221–233. [Bod04] , Algorithmic tests for the normal crossing property, Automated deduction in geometry, Lecture Notes in Comput. Sci., vol. 2930, Springer, 2004, pp. 1–20. [BV10] A. Bravo and O. Villamayor, Singularities in positive characteristic, stratification and simplification of the singular locus, Adv. Math. 224 (2010), no. 4, 1349–1418. , Elimination algebras and inductive arguments in resolution of singularities, [BV11] Asian J. Math. 15 (2011), no. 3, 321–355. [BV12] A. Benito and O. Villamayor, Techniques for the study of singularities with applications to resolution of 2-dimensional schemes, Math. Ann. 353 (2012), no. 3, 1037–1068. , Monoidal transformations and invariants of singularities in positive char[BV14] acteristic, Comp. Math. (2014). [CJS09] V. Cossart, U. Jannsen, and S. Saito, Canonical embedded and non-embedded resolution of singularities for excellent two-dimensional schemes, 2009, arXiv:0905.2191. [Cos75] V. Cossart, Sur le polyèdre caractéristique d’une singularité, Bull. Soc. Math. France 103 (1975), no. 1, 13–19. , Desingularization of embedded excellent surfaces, Tôhoku Math. J. (2) 33 [Cos81] (1981), no. 1, 25–33. [Cos11] , Is there a notion of weak maximal contact in characteristic p > 0?, Asian J. Math. 15 (2011), no. 3, 357–369. [CP08] V. Cossart and O. Piltant, Resolution of singularities of threefolds in positive characteristic. I. Reduction to local uniformization on Artin-Schreier and purely inseparable coverings, J. Algebra 320 (2008), no. 3, 1051–1082. [CP09] , Resolution of singularities of threefolds in positive characteristic. II, J. Algebra 321 (2009), no. 7, 1836–1976. [CP12] , Resolution of singularities of threefolds in mixed characteristic: case of small multiplicity, 2012, hal-00735929. [CP13] , Resolution of singularities of arithmetical threefolds I, 2013, hal-00873967. [Cut04] S. D. Cutkosky, Resolution of singularities, American Mathematical Society, 2004. [Cut09] , Resolution of singularities for 3-folds in positive characteristic, Amer. J. Math. 131 (2009), no. 1, 59–127. 78 [Cut11] [dJP00] [EH00] [EH02] [Eph78] [EV98] [EV00] [Fab11] [Fab12] [FH10] [FW11] [GH78] [Gir75] [Gro61] [GW10] [Har77] [Hau98] [Hau00] [Hau03] [Hau04] [Hau10a] [Hau10b] [Hir64] [Hir84] [Hir03] [Hir12] [HM89] [HM90] HERWIG HAUSER , A skeleton key to Abhyankar’s proof of embedded resolution of characteristic p surfaces, Asian. J. Math. 15 (2011), no. 3, 369–416. T. de Jong and G. Pfister, Local analytic geometry: basic theory and applications, Vieweg, 2000. D. Eisenbud and J. Harris, The geometry of schemes, Graduate Texts in Mathematics, vol. 197, Springer-Verlag, 2000. S. Encinas and H. Hauser, Strong resolution of singularities in characteristic zero, Comment. Math. Helv. 77 (2002), no. 4, 821–845. R. Ephraim, Isosingular loci and the Cartesian product structure of complex analytic singularities, Trans. Amer. Math. Soc. 241 (1978), 357–371. S. Encinas and O. Villamayor, Good points and constructive resolution of singularities, Acta Math. 181 (1998), no. 1, 109–158. , A course on constructive desingularization and equivariance, Resolution of singularities (Obergurgl, 1997), Progr. Math., vol. 181, Birkhäuser, 2000, pp. 147– 227. E. Faber, Normal crossings in local analytic geometry, Ph.D. thesis, Universität Wien, 2011. , Characterizing normal crossing hypersurfaces, 2012, arXiv:1206.5316. E. Faber and H. Hauser, Today’s menu: geometry and resolution of singular algebraic surfaces, Bull. Amer. Math. Soc. 47 (2010), 373–417. E. Faber and D. Westra, Blowups in tame monomial ideals, J. Pure Appl. Algebra 215 (2011), no. 8, 1805–1821. P. Griffiths and J. Harris, Principles of algebraic geometry, Wiley, 1978. J. Giraud, Contact maximal en caractéristique positive, Ann. Sci. École Norm. Sup. (4) 8 (1975), no. 2, 201–234. A. Grothendieck, Éléments de géométrie algébrique. II. Étude globale élémentaire de quelques classes de morphismes, Inst. Hautes Études Sci. Publ. Math. (1961), no. 8, 222. U. Görtz and T. Wedhorn, Algebraic geometry I, Advanced Lectures in Mathematics, Vieweg + Teubner, Wiesbaden, 2010. R. Hartshorne, Algebraic geometry, Springer-Verlag, 1977. H. Hauser, Seventeen obstacles for resolution of singularities, Singularities (Oberwolfach, 1996), Progr. Math., vol. 162, Birkhäuser, 1998, pp. 289–313. , Excellent surfaces and their taut resolution, Resolution of singularities (Obergurgl, 1997), Progr. Math., vol. 181, Birkhäuser, 2000, pp. 341–373. , The Hironaka theorem on resolution of singularities (or: A proof we always wanted to understand), Bull. Amer. Math. Soc. (N.S.) 40 (2003), no. 3, 323–403. , Three power series techniques, Proc. London Math. Soc. (3) 89 (2004), no. 1, 1–24. , On the problem of resolution of singularities in positive characteristic (or: a proof we are still waiting for), Bull. Amer. Math. Soc. (N.S.) 47 (2010), no. 1, 1–30. , Wild Singularities and Kangaroo Points for the Resolution in Positive Characteristic, 2010, Manuscript. H. Hironaka, Resolution of singularities of an algebraic variety over a field of characteristic zero. I, II, Ann. of Math. (2) 79 (1964), 109–203; ibid. (2) 79 (1964), 205–326. , Desingularization of excellent surfaces, Bowdoin 1967, Resolution of surface singularities, V. Cossart, J. Giraud, and U. Orbanz, Lecture Notes in Mathematics, vol. 1101, Springer-Verlag, 1984. , Theory of infinitely near singular points, J. Korean Math. Soc. 40 (2003), no. 5, 901–920. , Resolution of singularities, Manuscript distributed at the CMI Summer School 2012, 138 pp. H. Hauser and G. Müller, The trivial locus of an analytic map germ, Ann. Inst. Fourier 39 (1989), no. 4, 831–844. , The cancellation property for direct products of analytic space germs, Math. Ann. 286 (1990), no. 1-3, 209–223. BLOWUPS AND RESOLUTION [Hoc73] [HS12] [HW14] [Kaw07] [Kaw14] [Kem11] [KM10] [KM12] [Kol07] [Kuh00] [Lev01] [Lip75] [Lip78] [Liu02] [Mat89] [Moh87] [Moo01] [Mul83] [Mum99] [Nag75] [Nar83] [Obe00] [Pan06] [Pel88] [Ser00] [Sha94] [Spi83] [Sza94] [Tei03] [Tem08] 79 M. Hochster, Criteria for equality of ordinary and symbolic powers of primes, Math. Z. 133 (1973), 53–65. H. Hauser and J. Schicho, A game for the resolution of singularities, Proc. Lond. Math. Soc. (3) 105 (2012), no. 6, 1149–1182. H. Hauser and D. Wagner, Two alternative invariants for the embedded resolution of surface singularities in positive characteristic, Enseign. Math. (2014). H. Kawanoue, Toward resolution of singularities over a field of positive characteristic. I. Foundation; the language of the idealistic filtration, Publ. Res. Inst. Math. Sci. 43 (2007), no. 3, 819–909. , Idealistic filtration program with the radical saturation, this volume (2014). G. Kemper, A course in commutative algebra, Springer, 2011. H. Kawanoue and K. Matsuki, Toward resolution of singularities over a field of positive characteristic (the idealistic filtration program) Part II. Basic invariants associated to the idealistic filtration and their properties, Publ. Res. Inst. Math. Sci. 46 (2010), no. 2, 359–422. , Resolution of singularities of an idealistic filtration in dimension 3 after Benito-Villamayor, 2012, arXiv:1205.4556. J. Kollár, Lectures on resolution of singularities, Princeton University Press, 2007. F.-V. Kuhlmann, Valuation theoretic and model theoretic aspects of local uniformization, Resolution of singularities (Obergurgl, 1997), Progr. Math., vol. 181, Birkhäuser, 2000, pp. 381–456. M. Levine, Blowing up monomial ideals, J. Pure Appl. Algebra 160 (2001), no. 1, 67–103. J. Lipman, Introduction to resolution of singularities, Algebraic geometry, Arcata 1974. Proc. Sympos. Pure Math., Vol. 29, Amer. Math. Soc., 1975, pp. 187–230. , Desingularization of two-dimensional schemes, Ann. Math. (2) 107 (1978), no. 1, 151–207. Q. Liu, Algebraic geometry and arithmetic curves, Oxford University Press, 2002. H. Matsumura, Commutative ring theory, Cambridge University Press, 1989. T.-T. Moh, On a stability theorem for local uniformization in characteristic p, Publ. Res. Inst. Math. Sci. 23 (1987), no. 6, 965–973. J. Moody, Divisibility of ideals and blowing up, Illinois J. Math. 45 (2001), no. 1, 163–165. S. B. Mulay, Equimultiplicity and hyperplanarity, Proc. Amer. Math. Soc. 89 (1983), no. 3, 407–413. D. Mumford, The red book of varieties and schemes, Springer, 1999. M. Nagata, Local rings, R.E. Krieger Pub. Co, 1975. R. Narasimhan, Hyperplanarity of the equimultiple locus, Proc. Amer. Math. Soc. 87 (1983), no. 3, 403–408. Resolution of singularities. A research textbook in tribute to Oscar Zariski (Obergurgl 1997), Progress in Mathematics, vol. 181, Birkhäuser Verlag, 2000, Edited by H. Hauser, J. Lipman, F. Oort and A. Quirós. D. Panazzolo, Resolution of singularities of real-analytic vector fields in dimension three, Acta Math. 197 (2006), no. 2, 167–289. R. Pellikaan, Finite determinacy of functions with nonisolated singularities, Proc. London Math. Soc. (3) 57 (1988), no. 2, 357–382. J.-P. Serre, Local algebra, Springer Monographs in Mathematics, Springer-Verlag, 2000. I. Shafarevich, Basic algebraic geometry, Springer-Verlag, 1994. M. Spivakovsky, A solution to Hironaka’s polyhedra game, Arithmetic and geometry, Vol. II, Progr. Math., vol. 36, Birkhäuser Boston, 1983, pp. 419–432. E. Szabó, Divisorial log terminal singularities, J. Math. Sci. Univ. Tokyo 1 (1994), no. 3, 631–639. B. Teissier, Valuations, deformations, and toric geometry, Valuation theory and its applications, Vol. II (Saskatoon, SK, 1999), Fields Inst. Commun., vol. 33, Amer. Math. Soc., 2003, pp. 361–459. M. Temkin, Desingularization of quasi-excellent schemes in characteristic zero, Adv. Math. 219 (2008), no. 2, 488–522. 80 [Vil89] [Vil07] [Wag09] [Wlo05] [Zar40] [Zar44] [Zar47] [Zei05] [Zei06] [ZS75] HERWIG HAUSER O. Villamayor, Constructiveness of Hironaka’s resolution, Ann. Sci. École Norm. Sup. (4) 22 (1989), no. 1, 1–32. , Hypersurface singularities in positive characteristic, Adv. Math. 213 (2007), no. 2, 687–733. D. Wagner, Studies in resolution of singularities in positive characteristic, Ph.D. thesis, Universität Wien, 2009. J. Wlodarczyk, Simple Hironaka resolution in characteristic zero, J. Amer. Math. Soc. 18 (2005), no. 4, 779–822. O. Zariski, Local uniformization on algebraic varieties, Ann. of Math. (2) 41 (1940), 852–896. , Reduction of the singularities of algebraic three dimensional varieties, Ann. of Math. (2) 45 (1944), 472–542. , The concept of a simple point of an abstract algebraic variety, Trans. Amer. Math. Soc. 62 (1947), 1–52. D. Zeillinger, Polyederspiele und Auflösen von Singularitäten, Ph.D. thesis, Universität Innsbruck, 2005. , A short solution to Hironaka’s polyhedra game, Enseign. Math. (2) 52 (2006), no. 1-2, 143–158. O. Zariski and P. Samuel, Commutative algebra, Springer-Verlag, 1975. Fakultät für Mathematik, University of Vienna, and Institut für Mathematik, University of Innsbruck, Austria [email protected]
0math.AC
A Family of Iterative Gauss-Newton Shooting Methods for Nonlinear Optimal Control arXiv:1711.11006v2 [cs.SY] 11 Dec 2017 Markus Giftthaler1 , Michael Neunert1 , Markus Stäuble1 , Jonas Buchli1 and Moritz Diehl2 Abstract— This paper introduces a family of iterative algorithms for unconstrained nonlinear optimal control. We generalize the well-known iLQR algorithm to different multipleshooting variants, combining advantages like straight-forward initialization and a closed-loop forward integration. All algorithms have similar computational complexity, i.e. linear complexity in the time horizon, and can be derived in the same computational framework. We compare the full-step variants of our algorithms and present several simulation examples, including a high-dimensional underactuated robot subject to contact switches. Simulation results show that our multipleshooting algorithms can achieve faster convergence, better local contraction rates and much shorter runtimes than classical iLQR, which makes them a superior choice for nonlinear model predictive control applications. Index Terms— Numerical Optimal Control, Trajectory Optimization, Multiple Shooting, Quadrupedal Robots, Nonlinear Model Predictive Control, Differential Dynamic Programming I. I NTRODUCTION A. Overview and Motivation In this paper, we discuss a family of iterative Gauss-Newton shooting methods for numerically solving unconstrained optimal control problems, and illustrate the effectiveness of our algorithms with various robotics examples. We outline the connection between a number of ‘direct’ optimal control methods and Gauss-Newton methods from the class of Differential Dynamic Programming (DDP) [1] algorithms. Additionally, we present a natural extension arising from this connection and introduce a family of hybrid Gauss-Newton Multiple Shooting methods. In direct approaches to optimal control, infinite-dimensional optimal control problems are transcribed into finite dimensional Nonlinear Programs (NLPs). Two prominent ways of transcription by ‘shooting’ are direct single shooting (SS) and direct multiple shooting (MS) [2], which differ in the choice of decision variables. In single shooting, solely the control inputs are the decision variables. Generally speaking, the control trajectory is discretized in a piece-wise polynomial fashion (for simplicity, we focus on piece-wise constant controls in this paper, c.f. Fig. 1a). A corresponding state trajectory is obtained by means of numerical forward integration of the system dynamics, starting at a given initial state. SS is often called a ‘sequential’ approach. In multiple shooting, the same discretization scheme is employed for the control inputs, but additionally, intermediate states are added to the 1 Agile & Dexterous Robotics Lab, ETH Zürich, Switzerland. {mgiftthaler, neunertm, markusta, buchlij}@ethz.ch 2 Systems Control and Optimization Laboratory, Department of Microsystems Engineering (IMTEK), University of Freiburg, Germany. [email protected] decision variables. This provides several advantages [3], but requires the introduction of additional matching constraints to ensure continuity of the state trajectory. The technique of introducing these additional degrees of freedom into the original problem, combined with adding matching constraints, is called lifting [4], and results in a ‘simultaneous’ method. The formulation of both SS and MS as standard NLPs is straightforward and any state-of-the-art NLP solvers can be used to solve them. It is important to note that under the assumption of having a piece-wise polynomial control parameterization, the intrinsic sparsity structure of the underlying optimal control problem of both SS and MS allow them to achieve linear time complexity by performing a Riccati recursion [5]. Classical single shooting often does not perform well for unstable systems due to the pure open-loop forward integration of the system dynamics. In DDP, this is handled by doing a closed-loop forward integration, using a feedforward plus a time-varying state-feedback control law. The Riccati backward sweep designs time-varying feedback gains on the fly without additional computational cost. DDP is an exact-Hessian method, requiring the computation of second derivatives of the dynamics. While this gives the algorithm quadratic convergence, this can be impractical for use in systems with complex dynamics. For that reason, Hessianapproximating variants of DDP have become quite popular in the robotics community [6]–[10]. An important Hessian-approximating variant of DDP is the iterative Linear-Quadratic Regulator (iLQR) [11], which is also known as Sequential Linear Quadratic Optimal Control [12]. This method can be classified as closed-loop single shooting using a Gauss-Newton Hessian approximation and a Riccati backward sweep to solve linear-quadratic (LQ) subproblems. The Gauss-Newton Hessian approximation is based on the assumption that the objective function can be locally approximated as a sum of quadratic terms, and requires only first-order derivatives of the system dynamics. This comes at the cost of giving only linear convergence, however. The Gauss-Newton approach can be lifted, too, which has for example been shown in [13]. While it initially appears to be a drawback to increase the number of decision variables, it is important to emphasize that the lifted problem can be solved at approximately the same computational cost as the original non-lifted problem, and can lead to a significant increase of convergence speed [4]. Therefore, the fundamental motivation for this paper is to combine the benefits of iLQR with a multiple-shooting approach. u x xn xn+1 (a) Control Inputs F(xn, un) dn (c) Rollouts of GNMS un ,xn x x Consider the following discrete-time, finite-horizon, nonlinear optimal control problem ( ) N −1 X min Φ(xN ) + Ln (xn , un , n) (1) n=0 xn+1 − fn (xn , un , n) = 0, s.t. n n+1 (b) Rollout Single Shooting n n+1 (d) Rollouts of GNMS(M) Fig. 1. Intuition about different shooting variants. (a) A zero-order hold control parameterization, with a constant control input at each stage. (b) Single shooting, where the state trajectory is obtained through a single forward integration over the whole problem horizon. (c) In GNMS, intermediate states at every time-index n are introduced as additional decision variables. (d) In hybrid versions of GNMS, the multiple-shooting intervals span several control intervals. The intermediate states at the beginning of the multiple-shooting intervals are decision variables, and the states in between are obtained by forward integration. B. Contribution In this work, we derive a lifted equivalent of iLQR, called Gauss-Newton Multiple Shooting (GNMS), which introduces the intermediate states as additional decision variables. Next, we extend this relationship to form an entire family of open-loop multiple-shooting algorithms, denoted GNMS(M ), and closed-loop multiple shooting algorithms, denoted as iLQR-GNMS(M ). The latter is shown to be a generalization of iLQR and can be considered multiple-shooting iLQR. We outline the relationship between these algorithms and existing methods. We give simulation examples including a complex underactuated robot and compare the performance of the full-step algorithms using data gained from hardware experiments. Furthermore, we show the benefits of iLQRGNMS(M ) methods for nonlinear model predictive control. C. Outline This paper is structured as follows. In Section II, we derive GNMS, and present the basic update routine for state and control trajectories. Using these update equations, we generalize iLQR and GNMS to a family of algorithms in Section III. Section IV showcases several simulation results, based on data gained from hardware experiments. A discussion and outlook concludes the paper in Section V. II. G AUSS -N EWTON M ULTIPLE S HOOTING In the following, a brief derivation of the unconstrained Gauss-Newton Multiple Shooting method is presented. We show the derivation using an intuitive value-function approach in the style of [11] in order to highlight the close relationship between GNMS and iLQR. However, from the beginning, we lift the optimization problem and introduce intermediate states as additional decision variables besides the controls. In that sense, having each control decision variable accompanied with a state-decision variable, GNMS is closely related to the original multiple-shooting algorithm [2]. x0 = xinit (2) with state-vector xn ∈ Rm and control input vector un ∈ Rp . Let Ln be the intermediate cost at time-step n and Φ(xN ) the terminal cost at the time horizon N . A. Forming LQ subproblems The optimal control law is computed in an iterative way. In each iteration k = 0, 1, 2, . . ., we construct a LQ optimal control problem around the state trajectory [k] [k] [k] [k] X[k] = {x0 , x1 , . . . , xN }, with x0 = xinit and the [k] [k] [k] [k] control trajectory U = {u0 , u1 , . . . , uN −1 }. In the first iteration, k = 0, the LQ problem is hence constructed around the initial guesses for X[0] , U[0] . Possible initialization strategies are summarized in Section III-D. At each iteration, we numerically forward integrate all multiple shooting intervals using the respective control inputs [k] [k] un , starting at every state xn ∀n = 0, 1, . . . , N − 1. Fig. 1c shows a sketch of the multiple-shooting intervals in GNMS, where the resulting state at the end of each interval is denoted [k] [k] F[k] (xn , un ). Accordingly, we define the ‘defect’ between the integrated trajectory segment and the next intermediate [k] state xn+1 as [k] [k] [k] [k] d[k] n = F (xn , un ) − xn+1 . [k] (3) [k] Defining state and control increments δxn and δun for every single time-stage n, we can write the nonlinear system dynamics constraint (2) in terms of the simulated interval as [k] [k] [k] [k] xn+1 + δxn+1 − F[k] (xn[k] + δx[k] n , un + δun ) = 0 (4) which can also be considered a matching condition which ensures the continuity of the state trajectory w.r.t. state and control increments. Performing a first-order Taylor expansion [k] [k] of Equation (4) w.r.t. δxn and δun , denoting the sensitivities w.r.t state and control An and Bn and taking into account the defects as defined by Equation (3), results in the following affine system dynamics constraint [k] [k] [k] [k] [k] δxn+1 − A[k] n δxn − Bn δun − dn = 0 . (5) Analogously performing a second-order Taylor expansion of the nonlinear cost function (1) gives rise to the following LQ optimal control problem  > 1 min qN + δx> N qN + 2 δxN QN δxN δun ,δxn + N −1 X > > 1 qn + δx> n qn + δun rn + 2 δxn Qn δxn n=0 + s.t. > 1 2 δun Rn δun + δu> n Pn δxn  (6) δxn+1 = An δxn + Bn δun + dn (7) x0 = xinit (8) where we assume Qn , QN ≥ 0 and Rn > 0. Here, and in the following subsection, we drop the superscript indices [k] for better readability. Considering the LQ subproblem (6)-(8), the optimal control and state updates can be computed using a value-function approach. Assume a quadratic value function of the form (9) with weighting matrices Sn ∈ Rm×m , sn ∈ Rm×1 and sn ∈ R. The optimal control update can be derived by minimizing the value function Vn as a function of δxn . As Equation (9) is quadratic in δxn+1 at time n + 1, it remains quadratic during back-propagation in time, given the affine system dynamics and the linear-quadratic cost in Equations (6)-(8). Due to Bellman’s Principle of Optimality, the optimal control δu∗n at time n can be computed from  ∗ Vn (δxn ) = min qn + δx> (qn + 12 Qn δxn ) + δu> n Pn δxn δun  > ∗ 1 + δun (rn + 2 Rn δun ) + Vn+1 (An δxn + Bn δun + dn ) Inserting Equation (9) and the affine system dynamics (7) and minimizing the overall expression w.r.t. δun leads to an optimal control update of the form −1 δu∗n = −H−1 n hn − Hn Gn δxn (10) where we have defined hn = rn + B> n (sn+1 + Sn+1 dn ) Gn = Pn + B> n Sn+1 An Hn = Rn + B> n Sn+1 Bn and B> n Sn+1 Bn + Rn > 0. After equating coefficients with a quadratic value function ansatz (9) for δxn , we define −1 ln = −H−1 n hn and Ln = −Hn Gn and obtain the following recursive Riccati difference equations for Sn , sn and sn > Sn = Qn + A> n Sn+1 An − Ln Hn Ln sn = sn = q n + A> n (sn+1 + Sn+1 dn ) > + Gn ln + L> n (hn + Hn ln ) 1 > qn + sn+1 + d> n sn+1 + 2 dn Sn+1 dn 1 + l> n (hn + 2 Hn ln ) [k] [k] [k+1] u[k+1] = u[k] − x[k] n n + ln + Ln (xn n ) [k+1] xn+1 B. Computing the Optimal Control by Riccati Recursion > 1 Vn (δxn ) = sn + δx> n sn + 2 δxn Sn δxn equations for a forward sweep resulting in a full-step update for the control and state decision variables X[k+1] , U[k+1] (11) (12) (13) for n ∈ 0, . . . , N − 1. For the final time-step N we obtain the terminal conditions SN = QN , sN = qN and sN = qN , and the recursion is subsequently swept backwards. Note that Equation (13) does not contribute to the control update and can therefore be omitted in practice. C. Updating State and Control Trajectories Finally, using Equations (7) and (10), and readopting the superscript indices [k] for the iteration count, we obtain [k] [k] [k] [k+1] = xn+1 + (A[k] n + Bn Ln )(xn [k] [k] + B[k] n ln + dn (14) − x[k] n ) (15) [k+1] with initial condition x0 = xinit . The updated decision variables are dynamically consistent w.r.t. the LQ subproblem dynamics. The nonlinear optimal control problem is solved iteratively, starting from Section II-A and solving LQ subproblems at each iteration, until convergence. III. A FAMILY OF I LQR-GNMS A LGORITHMS Equations (14) and (15) present the GNMS update rule where all states and controls (except for xinit ) are decision variables. For every time-step, both states and controls are updated using a linear forward sweep. Considering Equations (14) and (15), we can now draw connections between GNMS and other existing algorithms and extend them to a bigger family of ‘hybrid’ variants. A. Connection to iLQR and Single Shooting Interestingly, full-step iLQR employs the very same control update rule as in Equation (14). In fact, GNMS can be transcribed into iLQR by substituting the state update equation (15) with a numeric forward integration of the nonlinear system (2) using the time-varying state-feedback control law provided by Equation (14). In this case, the forward integration naturally results in a dynamically consistent state trajectory, all defects dn become zero and the formulation from section II-B drops back to the well-known iLQR Riccati recursion. Moreover, standard unconstrained single shooting can be recovered by additionally ignoring the state feedback gains and running the forward-integration purely open-loop. B. Hybrid Algorithms Consider a case where the overall time horizon N is split into an integer number of multiple shooting intervals M with length l and 1 < M < N , while the control input discretization is kept at its original resolution. Without loss of generality, let us assume that the MS integration intervals start at time indices i ∈ I, with I = {0, l, 2l, . . .}. Fig. 1d sketches an example of such a hybrid case with l = 3. Every interval is simulated using the nonlinear system dynamics (2) [k] [k] [k] and the initial states and controls xi and ui . All xj with j∈ / I are overwritten by the integration. For an open-loop forward integration, U[k] remains as is, but for a closed-loop [k] forward integration, we additionally overwrite all uj with j∈ / I using the given feedback control law. Note that in this case, the defect equation (3) remains valid, but is zero along the multiple-shooting intervals. The only non-zero defects [k] occur at di+l−1 , i ∈ I. In this setting, the LQ approximation, Riccati recursion and state- and control updates (14)-(15) can be performed as described before. This gives rise to two ‘hybrid’ GNMS variants: TABLE I A N OVERVIEW OF DIFFERENT GNMS- TYPE METHODS . SS iLQR GNMS GNMS(M ) iLQR-GNMS(M ) closed-loop No. intervals overwrite states by integration need stable initial policy ( – 1 1 – N – M M depends depends – – = true, – = false) • • GNMS(M), using solely the feedforward control and thus performing an open-loop forward integration on each of the M multiple shooting intervals, which themselves are multiples of the control interval. Herewith, standard single shooting is the limit case GNMS(1). iLQR-GNMS(M), using the full state feedback controller (14) and a closed-loop forward integration of each multiple-shooting interval. In other words, this is equivalent to a multiple-shooting variant of iLQR. The standard iLQR algorithm is the limit case of iLQRGNMS(1), with only one multiple-shooting interval. Note that both GNMS(N ) and iLQR-GNMS(N ), with the number of multiple shooting-intervals being equal to the number of stages, revert to the standard GNMS formulation as introduced in Section II. Table I provides a compact overview of the algorithmic variants and compares their features. C. Main Iteration and Implementation We emphasize that all algorithmic variants feature linear complexity in the time horizon, O(N ). All algorithms execute almost identical linear algebra operations during one major iteration and therefore have very similar computational effort. Since the discussed family of GNMS algorithms only differs in a few features, it can be summarized in one framework, given in Algorithm 1. From a softwareengineering perspective, the algorithmic variants are easy to implement and can all be treated at once, given a proper design of classes and interfaces. We provide an open-source C++ implementation of all discussed algorithms in [14]. D. Initialization The GNMS variants listed in Table I differ in their requirements for initialization. For iLQR and SS, the nominal state (and control) input trajectories are first updated through a forward integration. This implies that for unstable systems, an initialization with a stabilizing initial control policy, which keeps the first rollout in the vicinity of the expected optimum, is essential. For iLQR, the initially provided state trajectory X[0] serves as state reference trajectory for the feedback controller. For SS, it is irrelevant, except for the initial state. Common choices for SS and iLQR initial guesses are policies that stabilize the given initial state or draw the system towards the goal state, for example simple LQR or PD controllers. Generally, the increased efforts for initial guess design for SS and iLQR can be a significant disadvantage. In the worst Algorithm 1 Generalized iLQR-GNMS(M ) Algorithm Given - Nonlinear dynamics, cost function and initial state xinit as given in (1)-(2) - Initial state trajectory X[0] - Initial feedforward trajectory U[0] - (Initial feedback law, if applicable) - maximum total constraint violation dmax rel - minimum relative cost change Jmin Prepare - set iteration count k = 0 - split time horizon N into M MS integration intervals of length l, each starting at an index i ∈ I, I = {0, l, 2l, . . .} - Initial multiple-shooting rollouts - simulate M intervals using the nonlinear system dynamics (2) and initial [0] [0] [0] [0] /I states and controls xi and ui , overwrite all xj and uj for j ∈ - compute defects d[0] according to Equation (3). n Repeat (main iteration) LQ approximation - Linearize the dynamics along the trajectories, obtain the affine constraint (5) - Quadratize cost function along the trajectories to obtain (6) Riccati backward sweep - Backwards solve the Riccati-like difference equations (11)-(12) with boundary conditions SN = QN and sN = qN Linear forward sweep - compute state and control solution candidates X[k+1] and U[k+1] by forward sweeping Equations (14) and (15). Rollout multiple-shooting intervals IF(open loop shooting) - set feedback gain in Equation (14) to zero. ENDIF - simulate M shooting intervals using nonlin. dynamics (2), controller (14) [k+1] [k+1] and initial states and controls xi and ui ∈ I, [k+1] [k+1] overwrite all xj and uj for j ∈ /I - compute defects d[k+1] according to Equation (3) n - compute cost J [k+1] by evaluating Equation (1) - increment iteration count k P [k] rel until |J [k] − J [k−1] |/J [k] < Jmin and |dn | < dmax case, a poor initial guess can lead to a local minimum with a solution far from desired behavior. Multiple-shooting algorithms, by contrast, offer greater flexibility and simplicity at initial guess design, and are often more robust w.r.t. bad initial policies. It is a well known fact that the convergence of multiple-shooting methods can be accelerated through an ‘educated’ initial guess, such as direct interpolation between initial and desired final state. For the hybrid algorithms iLQR-GNMS(M ) and GNMS(M ) it often depends on the system characteristics if a stabilizing control policy is required, or if the multiple-shooting intervals are short enough to prevent significant divergence during integration. In the video attachment [15], we show two simulation examples where initialization with a bad statefeedback controller significantly extends the runtime of iLQR compared to GNMS, or even causes iLQR to fail. Note that, when all possible GNMS variants are initialized with a dynamically consistent state trajectory and corresponding control trajectory, the defects for the first iteration are zero and the feedforward control updates are identical. IV. R ESULTS AND C OMPARISON A. An Illustrative, One-Dimensional System As an illustrative example, we present a simple onedimensional system, which is slightly nonlinear, unstable and constructed to help the reader build an intuition about the methods. The system dynamics are ẋ = (1 + x)x + u, x(0) = 1.5 and discretized with ∆t = 0.01 s, N = 300. The cost function is defined as quadratic cost of form (6) with x(t) (iteration 1) u(t) (iteration 1) 0 1.5 1 -2 0.5 -4 0 1 2 3 0 1 t [s] jd(t)j (iteration 1) 10 0 2 t [s] total cost 10 1 10 -3 10 0 10 -6 10 -1 0 1 2 0 t[s] 4 6 iteration control update L2 norm 10 2 Legend 2 initial guess converged solution iLQR GNMS iLQR-GNMS(5) GNMS(5) 10 0 1 2 3 4 5 6 iteration Fig. 2. Results for a one-dimensional illustrative system, main text for detailed description. desired terminal state xdes N = 0, QN = 10 and Rn = 0.01. Fig. 2 shows results for iLQR, GNMS and the hybrid variants with five multiple-shooting intervals, GNMS(5) and iLQRGNMS(5). We plot the state, control and defect trajectories for the first iteration of the algorithms, along with the initial guess and the converged solution. The state and control trajectories illustrate the relationship between the algorithms: the multiple-shooting intervals of GNMS(5) and iLQR-GNMS(5) start with states and controls lying on the respective GNMS trajectories. For GNMS(5), the system is simulated open-loop, the controls are identical to GNMS, and the state trajectories on the multiple-shooting intervals start to diverge. By contrast, for iLQR-GNMS(5), in every multiple-shooting interval both state and control trajectories converge asymptotically towards the simulated iLQR state and control trajectories. For the hybrid variants, a defect occurs every 0.6s, for GNMS, the defect is evenly distributed across all time intervals. Due to the long shootingintervals, GNMS(5) requires one iteration more to catch up with the other algorithms in terms of overall cost. Importantly, the control update plot shows that the asymptotic contraction rates, which are defined as C = lim k→∞ |U[k+1] −U∗ |2/|U[k] −U∗ |2 (16) are not the same. In this example, GNMS and GNMS(5) show better contraction than iLQR. Asymptotic contraction rates are investigated in more detail in Section IV-C. B. Quadruped Trot Optimization Example The quadrupedal robot ‘HyQ’ [16] is an 18 DoF, floatingbase underactuated robot subject to contacts with the environment, c.f. Fig. 3. In this paper, the contacts are not incorporated as constraints, but added to the system dynamics using an explicit contact model. We employ a static, plain environment and a ‘soft’ contact model, consisting of a nonlinear spring in surface-normal direction and a nonlinear Fig. 3. The quadruped HyQ damping term. The contact model is detailed in [17]. Using this formulation, the contact force is a function of the current robot state only. It is clear that such a soft contact model presents only a rough approximation of the complicated physics of contact, and also introduces a number of potential disadvantages such as increased stiffness and nonlinearity of the combined system dynamics. However, the contact model allows a straight-forward computation of derivatives [17], which creates an ideal test-bed for comparing our shooting algorithms. We obtain exact discrete sensitivities An and Bn through evaluating a sensitivity differential equation on the multiple-shooting intervals [18]. The example task considered is the optimization of a periodic trotting gait. To achieve the trotting gait, we impose a time-varying quadratic penalty on the leg joint positions. Furthermore, we penalize the intermediate and final position of the robot’s trunk and the intermediate and final velocities of the leg joints. For an in-depth description of the cost modelling to achieve different gait patterns the reader is referred to [8]. In the following, the trotting gait optimization is used to compare the algorithms developed in this paper. For a meaningful comparison, we initialize all algorithms with identical state trajectories and control policies. The initial guess corresponds to standing still in a steady state. We optimize over 36 states, 12 control inputs and a total time horizon of 2.5 seconds with N = 2500. Fig. 4 compares iLQR, GNMS, and iLQR-GNMS(M ) with three different numbers of multiple-shooting intervals in terms of cost descent, control update norms and total defects. Note that SS and GNMS(M ) are unstable due to the strong instability of the system. All remaining algorithms converge to the same minimum within 20 iterations. iLQR and iLQR-GNMS(25) show short phases of increasing cost, which we accept in this simulation example. Since the provided initial guess is dynamically consistent, the initial defects are zero. GNMS, having the largest number of multiple-shooting intervals (2500), also shows the largest total defect sum after the first iteration. The multiple-shooting iLQR methods, all having significantly fewer continuity constraints to enforce, feature a lower total defect. As expected for a Gauss-Newton method, all approaches show linear convergence. Considering the control update norms, we see that GNMS and iLQR feature a similar contraction rate for this example. In fact, the contraction rate of GNMS is slightly better, which is visually hard to distinguish here, but is detailed in following example. For the hybrid multiple-shooting iLQR variants, we observe a significantly better contraction rate than for both iLQR and #10 7 total cost control update L2-norm Normalized difference to Optimal Control 10 0 1.6 iLQR GNMS GNMS(50) iLQR-GNMS(50) | /u| 2 1.2 | "u| 2 1.4 10 4 10 -2 1 10 2 0.8 1 0 5 10 0 iteration 5 10 15 iteration total defect L2-norm Legend iLQR GNMS iLQR-GNMS(25) iLQR-GNMS(50) iLQR-GNMS(100) 10 0 10 -5 0 5 10 15 2 20 3 4 iteration 20 Fig. 5. A statistical comparison of local contraction rates for four different algorithms. This plot shows the normalized difference between solutions to perturbed optimal control problems and a fully converged reference solution. The normalization is w.r.t. the iLQR control trajectory. The data is averaged from 1000 samples, the corresponding standard deviations are plotted as error-bars. Estimates for the contraction rates are indicated by straight lines. GNMS outperforms iLQR in terms of local contraction rate, and gets closer to the true optimal solution in fewer iterations. In contrast to the example in Section IV-B, GNMS(50) is stable and shows a contraction rate similar to GNMS. iLQR-GNMS(50) clearly outperforms all other algorithms with significantly better local contraction rate. After 4 iterations, it is on average 0.1% away from the fully converged reference solution, while iLQR is on average 14% away. iteration Fig. 4. Comparing different algorithms from the family of Gauss-Newton shooting methods w.r.t. cost descent, total defects and control update norm, illustrated with the example of a quadruped trot optimization problem. Asymptotic contraction rates 0.5 0.4 0.3 GNMS. When applying an identical termination criterion based on the relative change of the cost function and a defect threshold to all algorithms, all lifted methods converge in fewer iterations than iLQR. Furthermore, all displayed iLQRGNMS(M ) variants converge notably faster than GNMS. Screen recordings of the optimized trotting motions are provided in the video attachment [15]. C. Local Contraction Rates for Quadruped Trot Tracking While Section IV-B gives an optimization example for a single motion, starting with an initial guess far from the optimal solution, we now show a comparison based on statistical data from 1000 runs: the trotting gait from Section IV-B is now considered in a tracking MPC problem. All algorithms are initialized with an optimal, dynamically consistent solution, but the initial state is locally perturbed. The state perturbations are sampled from the hardware-experiments detailed in [19]. For every perturbation, we let different algorithms iterate until convergence. Fig. 5 compares average asymptotic contraction rates for four different algorithms. It shows the normalized difference between a fully converged optimal feedforward trajectory and trajectories obtained at previous iterations. Furthermore it shows first-order regressions approximating the local contraction rates, in terms of the slopes of the difference norms in the semi-logarithmic plot. It can be seen that GNMS outperforms iLQR in terms of local contraction rate. GNMS(50) shows a contraction rate similar to GNMS. The example indicates better local convergence for iLQRGNMS(50) than for classical iLQR, GNMS and GNMS(50). Fig. 6 generalizes the result from Fig. 5 for a range of multiple-shooting intervals M , showing numerically approximated asymptotic contraction rates, Equation (16), as a 0.2 10 0 iLQR-GNMS(M) GNMS(M) 10 1 10 2 10 3 No. multiple shooting intervals M Fig. 6. Comparing asymptotic contraction rates as a function of the number of multiple-shooting intervals M . For GNMS(M ), the integration on the multiple-shooting intervals is only stable for M ≥ 20. For this range of ‘stable’ multiple-shooting intervals, the contraction rates are almost constant and similar to the limiting case GNMS. The iLQR multiple-shooting methods are stable for all M . Here, the contraction rates for intermediate numbers of multiple-shooting intervals are distinctively better than for the limit cases iLQR and GNMS. function of M . Again, GNMS(M ) is unstable for overly long multiple-shooting intervals, similar to the limiting case openloop single shooting. For closed-loop shooting, the asymptotic contraction rates for all multiple-shooting variants are better than for iLQR, and the contraction rates for the hybrid variants outperform the limiting case GNMS. In this example, the relative improvement over iLQR is up to a factor two. Note that the resulting iLQR-GNMS(M ) contraction rates differ slightly from the ones in Fig. 4 for M = 25, 50, 100, which is due to the different problem setting. However, both experiments exhibit the same trend. D. Nonlinear MPC on HyQ The suitability of iLQR for nonlinear model-predictive control (NMPC) in robotics applications has been shown many times before, in [6], [20], [21]. In this section, we show that GNMS and its hybrid variants are even more promising for NMPC applications. First, they converge faster to the optimal solution, c.f. Section IV-C. A second advantage of the multiple-shooting variants of the presented algorithms is that the forward integrations can be parallelized. Therefore, the Algorithm 2 iLQR-GNMS(M )-NMPC Algorithm Given - cost function (1) and system dynamics (2). - receding MPC time horizon N - number of multiple-shooting intervals M with length l - initial state and control trajectories X = {x0 , x1 , . . . , xN } U = {u0 , u1 , . . . , uN −1 }, state-feedback controller un (x) of form (10) Repeat Online: Feedback phase - get state measurement xmeas . - forward integrate system dynamics (2) with x0 = xmeas on the first multiple-shooting interval, compute A0,...,l−1 , B0,...,l−1 , defect dl−1 - quadratize cost function (1) around X and U for control stages 1, . . . , l − 1. - solve LQ optimal control problem using a Riccati backward sweep + + - retrieve updated control policy u+ n (x) and updated trajectories U , X . + - send policy u+ (x) and X to the control system n Preparation phase + + - update: un (x) ← u+ n (x), X ← X , U ← U - forward integrate system dynamics (2) for the multiple-shooting intervals 1 to M , obtain sensitivities Al , . . . AN −1 , Bl , . . . , BN −1 and defects dl,...,N −1 - quadratize cost function (2) around X, U for multiple-shooting intervals l to N . achievable MPC cycle time decreases approximately linearly with the number of available CPU cores. By combining faster update rates with better contraction rate, our multiple-shooting algorithms outperform classical iLQR-NMPC. In the following simulation example, we compare the NMPC performance of our Gauss-Newton shooting algorithms against iLQR-NMPC in a HyQ simulation environment. In each NMPC cycle, we run an adapted version of the main iteration in Algorithm 1 and ‘warm-start’ it with the previous solution. In such a setting, we can separate an NMPC iteration into a ‘preparation’ and a ‘feedback’ phase [22], thus minimizing the latency between receiving a state-measurement and sending an updated policy to the control system. Our NMPC loop is described in Algorithm 2. In this experiment, we run a trotting gait on HyQ, in closedloop MPC in a simulation environment [23]. For the NMPC optimal control problem, we choose a time-step size of 4 ms and N = 125. We parallelize the integration of all multipleshooting intervals and the sensitivity computation on four cores, and run both simulator and MPC controller on the same notebook equipped with an Intel Core i7 (2.8 GHz) processor. For four different algorithmic combinations, we record the executed trot under identical conditions for 18 seconds and compute the resulting accumulated intermediate cost. A summary of the achieved average cost and NMPC frequencies is given in Fig. 7. In these experiments, iLQR results in the highest accumulated cost. The multiple-shooting variants outperform iLQR, with relative cost differences up to 5%. At the same time, due to shorter runtimes, the multiple-shooting variants achieve up to 40% higher MPC frequencies, with a maximum of 103 Hz. In our simulation, all four algorithm variants run in a stable and robust fashion. The relatively small cost difference is an indicator of better convergence, but the main reason why the multiple-shooting variants should be preferred over iLQR in real-world applications, is the superior control bandwidth. The algorithms in this paper have been validated in hardware experiments on two different quadruped platforms, where a norm. accumulated MPC cost 1 MPC frequency [Hz] 100 0.8 80 0.6 60 0.4 40 0.2 20 0 0 R iLQ ) ) MS 25 (25 S( GN MS NM GN G RiLQ R iLQ ) ) MS 25 (25 S( MS NM GN G RiLQ GN Fig. 7. Comparing four different solvers for HyQ-MPC. The left plot compares costs accumulated over 18.0 seconds of trotting-MPC execution. iLQR shows the highest accumulated cost. The multiple-shooting variants outperform iLQR, but the relative cost difference is small. GNMS runs at 96.3% of the iLQR cost, GNMS(25) at 95.9% and iLQR-GNMS(25) at 95.0%. Regarding the achieved average MPC frequencies, shown on the right, we find up to 40% higher frequencies for the multiple-shooting variants. The maximum average MPC frequency, 103 Hz, is achieved using GNMS. variety of motions and gaits was implemented. However, a in-depth description of the experimental setups, the optimized computational framework and practical tuning considerations are beyond the scope of this paper. The interested reader is therefore referred to [19], where we apply the GNMSalgorithm for full-body NMPC on the quadrupeds HyQ and ANYmal [24], explain the robotic setup in detail and present a variety of hardware experiments. As outlook, a video sequence of GNMS-NMPC running on hardware is provided in the attachment [15]. V. C ONCLUSION AND O UTLOOK In this paper, we have shown how the well-known iLQR algorithm can be lifted and transformed into Gauss-Newton Multiple Shooting, GNMS. We have generalized the concept to form a family of Gauss-Newton shooting algorithms, which can be distinguished into sequential and simultaneous algorithms and closed and open-loop algorithms. Some algorithms partially overwrite decision variables by means of a numeric forward integration. All presented variants have approximately the same computational cost and feature linear time-complexity. Furthermore, all discussed algorithms share a large number of computational routines, and it is not difficult to implement all of the presented variants in a single software framework. We have compared the performance of the algorithms in different simulation experiments, which indicate that the lifted algorithms can outperform classical iLQR. While not included in this paper for reasons of compactness, similar results were obtained for other rigid-body dynamic systems including a 6 DoF fixed-base arm model. A more fundamental investigation for formalizing the conditions that result in improved convergence rates for GNMS(M ) and iLQR-GNMS(M ) is subject to ongoing work. In the application examples, we limited the comparison to full-step variants of all considered algorithms. However, for even more nonlinear dynamics or cost functions, where the LQ optimal control problem is a bad approximation to the nonlinear problem, a globalization strategy may be required. For single-shooting methods, a straight-forward solution is to employ a line-search scheme. This is simple to implement, as it is sufficient to search over the cost for different control update step-sizes. For multiple-shooting approaches, however, there are additional continuity constraints, and we need to line-search over a merit-function which trades off the costs and defects. It is typically required to introduce additional tuning variables or to implement a complex filter-scheme [25]. Our open-source reference implementation [14] provides a line-search scheme using a simple merit function. For complex robot trajectory optimization problems, we do not recommend to generally prioritize one of the presented algorithms over another. While the multiple-shooting algorithms allow for advanced initialization strategies and are more robust w.r.t. bad initial guesses, they may require slightly more tuning efforts when the full-step algorithm is not sufficient. By contrast, in NMPC applications with welldefined cost functions and using warm-starting, additional globalization steps are rarely required at all. Here, our multiple-shooting algorithms offer significant advantages, better local contraction rates and much shorter runtimes. The focus of this paper is on unconstrained optimal control problems without general (in)equality path constraints. It is obvious that the lifting approach naturally transfers to equalityconstrained variants of iLQR, such as [26]. The inclusion of general (in)equality path constraints is part of ongoing work. One option to include them in the existing framework is to replace the standard Riccati backward sweep with a dedicated solver for constrained LQ optimal control problems [27]. In this way, general (in)equality path constraints can be included while keeping linear time-complexity. While this work treats algorithms using a Gauss-Newton Hessian approximation, it similarly transfers to exact-Hessian approaches, resulting in a multiple-shooting DDP algorithm combining the advantages of simultaneous methods, quadratic convergence and closed-loop integration. ACKNOWLEDGEMENTS The authors would like to thank Dimitris Kouzoupis, Gianluca Frison, Mario Zanon and Timothy Sandy for fruitful discussions. This research was supported by the Swiss National Science Foundation through the NCCR Digital Fabrication, the NCCR Robotics and a Professorship Award to Jonas Buchli. Further, this research was supported by the EU via FP7-ITN-TEMPO (607 957) and H2020ITN-AWESCO (642 682), by the Federal Ministry for Economic Affairs and Energy (BMWi) via eco4wind and DyConPV, and by DFG via Research Unit FOR 2401. R EFERENCES [1] D. Mayne, “A second-order gradient method for determining optimal trajectories of non-linear discrete-time systems,” International Journal of Control, vol. 3, no. 1, pp. 85–95, 1966. [2] H. G. Bock and K.-J. Plitt, “A multiple shooting algorithm for direct solution of optimal control problems,” in Proceedings of the IFAC World Congress, 1984. [3] M. Diehl, H. G. Bock, H. Diedam, and P.-B. Wieber, “Fast direct multiple shooting algorithms for optimal robot control,” in Fast motions in biomechanics and robotics, pp. 65–93, Springer, 2006. [4] J. Albersmeyer and M. Diehl, “The Lifted Newton Method and its Application in Optimization,” SIAM Journal on Optimization, vol. 20, no. 3, pp. 1655–1684, 2010. [5] C. V. Rao, S. J. Wright, and J. B. Rawlings, “Application of interiorpoint methods to model predictive control,” Journal of Optimization Theory and Applications, vol. 99, pp. 723–757, Dec 1998. [6] J. Koenemann, A. Del Prete, Y. Tassa, E. Todorov, O. Stasse, M. Bennewitz, and N. Mansard, “Whole-body model-predictive control applied to the HRP-2 humanoid,” in 2015 IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 3346–3351, 2015. [7] Y. Tassa, T. Erez, and E. Todorov, “Synthesis and stabilization of complex behaviors through online trajectory optimization,” in 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 4906–4913, Oct 2012. [8] M. Neunert, F. Farshidian, A. W. Winkler, and J. Buchli, “Trajectory optimization through contacts and automatic gait discovery for quadrupeds,” IEEE Robotics and Automation Letters (RA-L), 2017. [9] B. Ponton, S. Schaal, and L. Righetti, “Risk sensitive nonlinear optimal control with measurement uncertainty,” CoRR, 2016. [10] F. Farshidian, M. Neunert, A. W. Winkler, G. Rey, and J. Buchli, “An efficient optimal planning and control framework for quadrupedal locomotion,” in IEEE International Conference on Robotics and Automation (ICRA), 2017. [11] E. Todorov and W. Li, “A generalized iterative LQG method for locally-optimal feedback control of constrained nonlinear stochastic systems,” in American Control Conference, 2005. Proceedings of the 2005, pp. 300–306, IEEE, 2005. [12] A. Sideris and J. E. Bobrow, “An efficient sequential linear quadratic algorithm for solving nonlinear optimal control problems,” Transactions on Automatic Control, vol. 50, no. 12, pp. 2043–2047, 2005. [13] A. Schäfer, Efficient Reduced Newton-Type Methods for Solution of Large-Scale Structured Optimization Problems with Application to Biological and Chemical Processes. PhD thesis, University of Heidelberg, 2005. [14] “The ‘Control Toolbox’ – An Open Source Library for Robotics and Optimal Control.” https://adrlab.bitbucket.io/ct, 2017. [Online; accessed 25-November-2017]. [15] https://youtu.be/423BTKn_cjQ. [16] C. Semini, N. G. Tsagarakis, E. Guglielmino, M. Focchi, F. Cannella, and D. G. Caldwell, “Design of HyQ–a hydraulically and electrically actuated quadruped robot,” Institution of Mechanical Engineers, Journal of Systems and Control Engineering, vol. 225, pp. 831–849, 2011. [17] M. Giftthaler, M. Neunert, M. Stäuble, M. Frigerio, C. Semini, and J. Buchli, “Automatic Differentiation of Rigid Body Dynamics for Optimal Control and Estimation.” Advanced Robotics, November 2017. [18] R. P. Dickinson and R. J. Gelinas, “Sensitivity analysis of ordinary differential equation systemsa direct method,” Journal of Computational Physics, vol. 21, no. 2, pp. 123 – 143, 1976. [19] M. Neunert, M. Stäuble, M. Giftthaler, C. D. Bellicoso, J. Carius, C. Gehring, M. Hutter, and J. Buchli, “Whole-Body Nonlinear Model Predictive Control Through Contacts for Quadrupeds,” 2017. arXiv:1712.02889 [cs.RO]. [20] M. Neunert, C. de Crousaz, F. Furrer, M. Kamel, F. Farshidian, R. Siegwart, and J. Buchli, “Fast nonlinear model predictive control for unified trajectory optimization and tracking,” in IEEE International Conference on Robotics and Automation (ICRA), 2016. [21] M. Giftthaler, F. Farshidian, T. Sandy, L. Stadelmann, and J. Buchli, “Efficient Kinematic Planning for Mobile Manipulators with Nonholonomic Constraints Using Optimal Control,” in IEEE International Conference on Robotics and Automation (ICRA), 2017. [22] M. Diehl, H. Bock, J. P. Schlöder, R. Findeisen, Z. Nagy, and F. Allgöwer, “Real-time optimization and nonlinear model predictive control of processes governed by differential-algebraic equations,” Journal of Process Control, vol. 12, no. 4, pp. 577 – 585, 2002. [23] S. Schaal, “The SL simulation and real-time control software package,” tech. rep., Los Angeles, CA, 2009. [24] M. Hutter, C. Gehring, D. Jud, A. Lauber, C. D. Bellicoso, V. Tsounis, J. Hwangbo, K. Bodie, P. Fankhauser, M. Bloesch, R. Diethelm, S. Bachmann, A. Melzer, and M. Hoepflinger, “Anymal - a highly mobile and dynamic quadrupedal robot,” in 2016 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pp. 38–44, Oct 2016. [25] J. Nocedal and S. J. Wright, Numerical Optimization. Springer, 1999. [26] A. Sideris and L. A. Rodriguez, “A Riccati approach for constrained linear quadratic optimal control,” International Journal of Control, vol. 84, no. 2, pp. 370–380, 2011. [27] G. Frison, Algorithms and Methods for Fast Model Predictive Control. PhD thesis, Technical University of Denmark, 2015.
3cs.SY
How Are Programs Found? Speculating About Language Ergonomics With Curry-Howard Johannes Emerich arXiv:1612.00670v1 [cs.PL] 2 Dec 2016 [email protected] Abstract Functional languages with strong static type systems have beneficial properties to help ensure program correctness and reliability. Surprisingly, their practical significance in applications is low relative to other languages lacking in those dimensions. In this paper, the programs-as-proofs analogy is taken seriously to gain speculative insights by analysis of creation habits in the proof-centric discipline of mathematics. Viewed in light of this analogy, a sampling of mathematicians’ attitudes towards formal proof suggests that the crucial role of intuition and experimentation in programming tasks may be under appreciated, hinting at a possible explanation of the challenges rigorously disciplined languages face in practical applications. Categories and Subject Descriptors D.3 [Programming Languages]; K.2 [History of Computing]: Software Keywords language ergonomics, type systems, programming systems, programs as proofs, propositions as types 1. Introduction The thoughts in this paper grew over the course of a year, out of the opening remarks of my thesis defense in logic, as well as a series of informal discussions I have had since starting an industry job as a software developer. While I am in no way sure that what I am saying is authoritative or true, it has been my impression that my line of thought has been thought-provoking for those on the receiving end, and it is in this spirit that I decided to elaborate my thoughts into a form that might potentially reach a wider audience. Being a student of logic with a professional and practical interest in computer programming, I was looking to write my thesis in an area that would gainfully combine both topics (Emerich 2015). The topic of type systems for programming languages was an obvious fit, but I soon faced with a puzzle: As a student of logic, everything about sound static type systems seemed obviously right, beautiful and true, and the research papers and languages I worked through made perfect sense. On the other hand, from my professional work in software development, I knew how little attention industry paid to the rightness, beauty and truth of this approach to programming. My puzzlement is certainly shared in large parts of the programming language theory community: If “types are the leaven of computer programming; they make it digestible” (Milner), they are light-weight formal methods that automatically prove “the absence of certain program behaviors” (Pierce) (both Pierce 2002), and we all want to write correct programs, why would anyone not use them? And especially, why would big, for-profit companies opt to not use them, or use such perversions of type systems as to render any guarantees worthless? Industry practitioners seldom explain their motives but simply vote with their feet, or if they do explain, they explain in terms incomprehensible to PL researchers. It is not surprising then that the disregard for advanced type systems is often explained away by stupidity, carelessness, or lack of proper education. Without even wanting to dispute these labels, I started to wonder whom programming languages are created for. If a technological artifact is inadequate for its intended target audience and therefore its intended use case, it is unacceptable to blame the recipients of the artifact. To illustrate, let us look at another discipline where technological artifacts are designed for a large audience, and which is often invoked in certain parts of the software engineering community: architecture. In the wake of World War II, war-time destruction and the rapid growth of metropolitan areas necessitated the rapid provision of affordable housing. In countries all around the world, a solution was seen in modernist living machines. High-rise buildings for a new kind of communal living were built with great enthusiasm, and abandoned with great disappointment as many of the projects became attractors of poverty and living conditions rapidly deteriorated. New concepts for urban development with dense housing have incorporated feedback from this failing to create less fragile living environments for human beings. Another example of well- intended but ultimately failed architecture is Haus Wittgenstein in Vienna, a modernist building designed in part by philosopher Ludwig Wittgenstein. Few of his family members succeeded to live in this house for long, even while remarking on its beauty and elegance. Would we find it convincing if the architects of modernist high-rise projects or Haus Wittgenstein blamed their dwellers for their inability to dwell in them? If they declared them too uneducated to live properly? I think not. Why then should we let programming language researchers off the hook, if their artifacts fail to meet the needs of the programming community? What is to be done to learn about the needs of humans when constructing programs? Ultimately, this is an empirical question, requiring research and approximation by trial and error. To guide both processes, it is prudent to start with some judicious guessing. This speculative text is an attempt to judiciously guess plausible hypotheses from an analysis of 20th century mathematics. Section 2 introduces a formal connection between mathematics and computer programming, and questions the implied role of formal proof in mathematical practice. Section 3 stops at several points of historical significance in the past hundred or so years in mathematics, summarizing discussions about the interplay of intuition, formalism and rigor. Section 4 looks back at recurring themes found in said discussions, takes the programs-as-proofs analogy seriously, and defines some criteria to evaluate programming systems by. In section 5 these criteria are applied to a small number of recent proposals for programming languages and systems. Section 6 concludes. 2. Programming in the Image of Mathematics Modern day research in type systems for programming languages occurs in fruitful collaboration with research in type theory and mathematical logic. Languages like Haskell and OCaml are part of the lineage of ML, a language grown out of a system for theorem proving. GHC, the Glasgow Haskell Compiler, supports a variety of extensions to Haskell’s type system, that bring it closer to the powerful dependent type systems found in proof assistants like Coq and Agda. The connection between programming languages and mathematical logic is described succinctly in Per Martin-Löf’s influential Constructive Mathematics and Computer Programming (Martin-Löf 1985): Parallel to the development from low to high level programming languages, there has been a change in one’s understanding of the programming activity itself. It used to be looked (down) upon as the rather messy job of instructing this or that physically existing machine, by cunning tricks, to perform computational tasks widely surpassing our own physical powers, something that might appeal to people with a lik- ing for crossword puzzles or chess problems. But it has grown into the discipline of designing programs for various computational tasks, programs that have to be written in a formally precise notation so as to admit of automatic execution. [. . . ] It has made programming an activity akin in rigour and beauty to that of proving mathematical theorems. (This analogy is actually exact in a sense which will become clear below.) The way in which the analogy is “actually exact” is by means of a Curry-Howard-style correspondence between a fictitious programming language (borrowing from ALGOL, PASCAL and LISP) and Martin-Löf’s theory of types. What this correspondence really shows exactly is that in an adequate language, the activity of writing programs is equivalent to the activity of writing a formal proof1 . It is of course the unfamiliarity of the computer scientist or logician with actual mathematical practice that allows them to conclude that this is, without qualification, a good thing. If, however, we look at the history of mathematics in the last hundred or so years, we see that even in mathematics the role of formal proof is contested or at least much more complicated than commonly assumed. The monograph The Mathematical Experience stems from 1981, close to Martin-Löf’s 1985 paper. Therein, Hersh and Davis describe “the most mathematician-like mathematician”2 to display “the discrepancy between the actual work and activity” and even “his own perception of his work and activity” (Davis and Hersh 1981, p. 34ff.). I will quote selectively, though at some length, to illustrate: He rests his faith on rigorous proof; he believes that the difference between a correct proof and an incorrect one is an unmistakable and decisive difference. [. . . ] Yet he is able to give no coherent explanation of what is meant by rigor, or what is required to make a proof rigorous. In his own work, the line between complete and incomplete proof is always somewhat fuzzy, and often controversial. [. . . ] To his fellow experts, he communicates [his] results in a casual shorthand. “If you apply a tangential mollifier to the left quasi-martingale, you can get an estimate better than quadratic, so the convergence in the Bergstein theorem turns out to be of the same order as the degree of approximation in the Steinberg theorem.” This breezy style is not to be found in his published writings. There he piles up formalism on top of formalism. Three pages of definitions are followed by seven lemmas, and, finally, a theorem whose hypothe1 For a modern introduction and brief history, see (Wadler 2015). was customary at the time, this most mathematician-like mathematician is styled as “he”. 2 As ses take half a page to state, while its proof reduces essentially to “Apply Lemmas 1–7 to definitions A–H.” We begin our analysis, abruptly, early in the 20th century, with the foundational crisis in mathematics in full swing. In response to misunderstandings and embarrassing failures in the face of an ever more significant mathematics, mathematicians, logicians and philosophers tried to establish foundations that would confirm and guarantee their understanding of mathematics as the house of certainty. To restore the endangered reputation of mathematics as a prototype of the most rigid science, the goal had to be not only to axiomatize all of mathematics, but also to show that in the chosen axiomatization contradictions are in general impossible (Hilbert 1917, p. 411). Even Russell’s generous endeavor of axiomatizing all of logic was not sufficient according to Hilbert, as it was still necessary to establish that every mathematical problem has a solution (no ignorabimus), that every solution can be verified, and to find a measure for the simplicity of a proof. To put this plan into action, mathematical concepts and practices such as propositions and proofs had to be reified into mathematical objects that could be studied with mathematical methods. The famous rigor of mathematics was to be applied to mathematics itself. The successes and failures of Hilbert’s program are famous, but its reception was mixed from the onset. believed it was the “very nature of their mind which makes them logicians or intuitionalists”, and while “[the] first are incapable of ‘seeing in space’, the others are quickly tired of long calculations and become perplexed”. But both are “equally necessary for the progress of science”, both “have achieved great things that others could not have done”. Poincaré however was not blind to the progressive shift towards formality and rigor, even among the “intuitionalists”, as “their readers have required of them greater concessions”. The reason for this shift is the recognition that intuition “cannot give us rigour, nor even certainty”. This is why formalism and logical analysis are necessary to further progress, a kind of cleaning up and clarifying that prevents illicit jumping to conclusions. But “intuition must retain its role as complement, [...] or as antidote to logic”, not just for the student but also the creative scientist. To see the unity in a mathematical problem, we need “a faculty which makes us see the end from afar, and intuition is this faculty” (p. 1018). Poincaré uses the example of the concept of a continuous function, which from the image of a continuous mark of chalk gradually turned into a construction “irreproachable in the eyes of the logician”. But even the logician relies on some sort of intuition, only, as in the case of Hermite, “the most abstract entities were for him like living beings”, allowing them to “perceive at a glance the general plan of a logical edifice”. “In rejecting the aid of the imagination, which, as we have seen, is not always infallible, they can advance without fear of deceiving themselves. Happy, therefore, are those who can do without this aid! We must admire them; but how rare they are!” Poincaré, it seems, was not among them. His thesis adviser characterized him as follows: “It must be said, if one wants to give an accurate idea of how Poincaré worked, that many points of [his thesis] needed correction or explication. Poincaré was an intuitif ” (cited after Mclarty 1997). Mclarty states that many of Poincaré’s publications offered crucial new insights, laying the foundations to whole fields, all while employing hasty (or no) proofs, and getting substantial details wrong that were later to be worked out by others. Poincaré’s question, “Who would venture to say whether he preferred that Weierstrass had never written or that there had never been a Riemann?”, should be restated for the reader: “Who would wish that there had never been a Poincaré?” 3.1 3.2 When asked for a definition of proof, he gives one as “cleared up by the logician Tarski [. . . ] and some others, maybe Russell or Peano”, but also says that “of course no one ever really does it. It would take forever!” The less one knows about formal languages and formal logic, the better, as “[that] stuff is all abstract nonsense anyway”. Now, would our ideal mathematician be happy to do his work in Martin-Löf’s formal theory of types? One should think not. Then why are we surprised if the average programmer does not seem to take to an equivalent programming system? We will, in the following, undertake a brief historical tour of mathematics to find some clues as to why mathematical practice does not conform to the ideal of formal proof. 3. Intuition and Formal Proof in Mathematics Poincaré on Intuition and Logic Of interest for our analysis is the stance of Henri Poincaré, who was at once appreciative of the quest for certainty and skeptical of the emphasis on formalism. In a 1900 essay, Poincaré identifies “two entirely different kinds of minds” among great mathematicians, “one sort are above all preoccupied with logic”, advancing “step by step, after the manner of a Vauban who pushes on his trenches against the place besieged, leaving nothing to chance”, and the other are “guided by intuition and at the first stroke make quick but sometimes precarious conquests” (Poincaré 2005, p. 1012). Poincare New Math: Real Mathematics Comes to Schools The foundational crisis in the past, and its shocking revelations absorbed or ignored, parts of the formalists’ results and spirit found their way into research mathematics. Probably the prototypical example of 20th -century formalist mathematics is the highly influential work of Nicolas Bourbaki, a group of predominantly French mathematicians. According to a member, Bourbaki was set up almost in opposition to the intuitif Poincaré, against the older generation that “had learned mathematics in the old-fashioned way”, “it was not the fashion to value Poincaré at all” (Senechal 1998). In the 1960s, this spirit of renewal found its way into primary education in mathematics. Today still known (and often ridiculed) under the moniker “new math”, various educational reform programs in the United States and Europe put set theory, Boolean algebra and further abstract nonsense on schools’ curricula. A cautionary tale of educational reform implemented in haste and abandoned without much analysis or care, new math disappeared as quickly as it had been put on the agenda, as teachers felt unable to teach and parents unable to understand the new materials. The history of the new math is complex and frequently misconstrued (Phillips 2015, p. 145), but the reactions of contemporary mathematicians to its introduction provide interesting insight into their attitudes. Especially in the United States, the reform efforts led to controversies among professional mathematicians and scientists, triggered not by the new emphasis on and interest in mathematics education, but by the image of mathematics thought to be underlying the reform proposals (Phillips 2014). Physicist Richard Feynman in a commentary on new math stresses the importance of freedom, experimentation and intuition in learning and practicing mathematics (Feynman 1965). While this spirit “does not appear in [a mathematician’s] final proofs, which are simply demonstrations or complete logical arguments which prove that a certain conclusion is correct”, it is present in the way that he works in “in order to obtain a guess as to what it is he is going to prove before he proves it”. To give authority to his claim, he quotes a pure mathematician, J.B. Roberts: The scheme in mathematical thinking is to divine and demonstrate. There are no set patterns of procedure. We try this and that. We guess. We try to generalize the result in order to make the proof easier. We try special cases to see if any insight can be gained in this way. Finally – who knows how? – a proof is obtained. Mathematician and educator Morris Kline spent considerable effort arguing against the new curriculum, publishing both an essay, Logic Versus Pedagogy (Kline 1970), and a book, Why Johnny Can’t Add (Kline 1974). His protest against the reform was motivated by a strong belief in the importance of intuition and gradual development in mathematical training and practice. The arguments in both texts make much use of historical developments and anecdotes, illustrating the imperfections and intuitive leaps present in the work of accomplished mathematicians. Kline presents as an example the development of calculus from the basic concept of “instantaneous rate of change of a function” (Kline 1970, p. 267) to the modern formally precise expression. He documents the vague and faulty conceptualization evident in the writings of Newton and Leibniz, and Newton’s defense of his work against “overprecise critics” posing a threat to the “fruits of invention”. The same aspect is highlighted in Cauchy’s use of differentiability where he had only assumed continuity, making, on the whole, substantial progress. Like Feynman, Kline sees mathematics as “primarily a creative activity, and this calls for imagination, geometric intuition, experimentation, judicious guessing, trial and error, the use of analogies of the vaguest sort, blundering and fumbling” (p. 271). To counter the response that intuition plays this important role only in those new to a subject matter, Kline recounts the anecdote of “the professor who was presenting a logical proof to his class, got stuck in the course of the proof, went over to the corner of the blackboard where he drew some pictures, erased the pictures, and then continued the proof” (p. 280). In the end Kline concedes, quoting Weyl, that “logic is the hygiene which the mathematician practices to keep his ideas healthy and strong”. 3.3 The Threat of Speculative Mathematics Our third episode is set in 1993–1994, a discussion held in the Bulletin of the American Mathematical Society and triggered by a call for action by Arthur Jaffe and Frank Quinn (Jaffe and Quinn 1993). The authors worried about a perceived trend of an increase in speculative mathematics, due in part to a cultural clash between mathematics and physics. A nearly categorical statement opens the paper: “Modern mathematics is nearly characterized by the use of rigorous proofs”. This is qualified to say that “information about mathematical structures is achieved in two stages”, in the first stage “intuitive insights are developed, conjectures are made, and speculative outlines of justifications are suggested”, in the second “the conjectures and speculations are corrected; they are made reliable by proving them”. The two-stage process is compared to physics, divided in theoretical and experimental physics. For Jaffe and Quinn, theoretical physics is analogous to the speculative, intuitive stage in mathematical discovery, while experimental physics is analogous to verification and proof of speculation. Where in physics there has been productive division of labor along those lines, Jaffe and Quinn decry what they see as an onslaught of speculative mathematics (which they call theoretical mathematics), arguing that the culture of mathematics is unprepared. A list of cautionary tales of speculative mathematics gone wrong is followed by a problem characterization: Speculative work easily goes astray for lack of corrections from rigorous proof, it hinders further work by causing confusion about which parts are reliable, it gives glory to the theorizers while leaving ungrateful cleanup work for others, and finally confuses newcomers. They end with a short list of prescriptions to amend the situation, mostly calling for explicit labeling of speculative work, and thus shifting culture to reserve some glory for the task of rigorous validation. This call was answered in a later issue of the bulletin (Atiyah et al. 1994), in good numbers by some of the speculative perpetrators Jaffe and Quinn had reprimanded. I can only recommend reading the responses, as they provide a fascinating insight into the varieties of approaches and selfimages among researchers in mathematics. The reader following this advice will notice that my quotations in the following are highly selective, which should not be reason for concern, considering that my claim is not that every mathematician looks at intuition and formal proof in the way suggested, but only that at least some amount of accomplished mathematicians do. We find the first commentator, Michael Atiyah, “agreeing with much of the detail”, but rebelling “against their general tone and attitude”, presenting “a sanitized view of mathematics which condemns the subject to an arthritic old age” (p. 178). “But if mathematics is to rejuvenate itself and break exciting new ground it will have to allow for the exploration of new ideas and techniques which, in their creative phase, are likely to be as dubious as in some of the great eras of the past. Perhaps we now have high standards of proof to aim at but, in the early stages of new developments, we must be prepared to act in more buccaneering style”. Providing an example, “Hodge’s own proof was essentially faulty because his understanding of the necessary analysis was inadequate. Correct proofs were subsequently provided by better analysts, but this did not detract from Hodge’s glory”. In a scathing comment, Armand Borel refers to the periodic waves of innovation and rigorization/systematization that have been a permanent feature of mathematics, accompanied constantly by fears that one might overpower the other. “Of course, [...] no part of mathematics can flourish in a lasting way without solid foundations and proofs”. Benoit Mandelbrot finds “most of it appalling”. For him, Jaffe and Quinn’s proposal is reminiscent of the shunning of great intuitive mathematicians such as Lévy and Poincaré by the mathematical establishment. He even goes so far as to ask why there had been so few great intuitive researchers of recent, and speaks of a “flow of young people” who were “acknowledged as brilliant and highly promising; but they could not stomach the Bourbaki credo” and left mathematics. Saunders Mac Lane responds with an anecdote about a discussion between Atiyah and himself, “about how mathematical research is done”. For Mac Lane it meant getting and understanding the needed definitions, working with them to see what could be calculated and what might be true, to finally come up with new “structure” theorems. For Atiyah, it meant thinking hard about a somewhat vague and uncertain situation, trying to guess what might be found out, and only then finally reaching definitions and the definitive theorems and proofs. This story indicates that the ways of doing mathematics can vary sharply, as in this case between the fields of algebra and geometry, while at the end there was full agreement on the final goal: theorems with proofs. Thus differently ori- ented mathematicians have sharply different ways of thought, but also common standards as to the result. If only the same could be said about differently oriented programmers! (Mac Lane goes on to say: “The sequence of the understanding of mathematics may be: intuition, trial, error, speculation, conjecture, proof. The mixture and the sequence of these events differ widely in different domains, but there is general agreement that the end product is rigorous proof— which we know and can recognize, without the formal advice of the logicians.”) We see a wide spectrum of opinions on the role of rigorous proof in professional mathematics. On one end, Mac Lane voices a clear stance against ungrounded speculation and a demand for proof as the golden standard, but paired with a laissez-faire attitude towards the creative habits of individuals. On the other, Mandelbrot finds it sufficient to put forward his discoveries as conjectures, arguing against a unified narrow conception of what is acceptable mathematics. What we find in common among all cited here, however, is insistence on the value and necessity of a multitude of intuitive approaches to mathematical creation. 3.4 Interactive Theorem Proving We shall finally look at some contemporary trends in mathematics. A current issue that has been in the making for much of the twentieth century but only recently has found increased attention is the use of computer-aided proof environments to develop and verify completely rigorous formal proofs. With this, we loop back to Martin-Löf’s theory of types discussed in the very beginning. Our source is the recently published Type Theory and Formal Proof (Geuvers and Nederpelt 2014). The book builds up a formal system λD somewhat similar to Martin-Löf type theory, extending the Calculus of Constructions with constructs first introduced in the Automath system of N.G. de Bruijn. After having built up the system to a substantial degree, the real work begins, by formalizing a real mathematical theorem (Bézout’s lemma) and its proof in the system, illustrating that it is adequate for capturing serious mathematical content. It may be noted that this shows the adequacy for formalizing an existing and known proof. Chapter 16, Further perspectives uses observations from the proof of Bézout’s lemma along with general considerations to reflect on the system λD and type-theory-based proof assistants more generally. We collect here some quotes and discuss the implied context under which proof assistants may be used. “The type theory λD provides a system in which mathematical definitions, statements and proofs can be completely spelled out in a very structured way that is still close to ordinary mathematical practice. This enables and facilitates the formalization of mathematics and the checking of its correctness. [. . . ] The high level of precision of type theory greatly improves the level of correctness of the formalized mathematics: incomplete proofs, or proofs using il- legal logical steps, are not accepted” (p. 379). The diagram on page 381 is relevant, because it uses as inputs informal proof p and informal statement A, thus assumes that both have been formed at this point. If however we have not yet fully formed p and A, the fact that the “precision of λD guides the proof development” (p. 380) may come back to bite us. It is no doubt a good thing that at some point a precise guide will point to flaws in the details of the development, but doing so early may lead the user astray trying to verify a nonsensical side-show statement that could easily be falsified by a quick series of trial and error. The author has made this experience first-hand working with the Coq proof assistant. Their chapter closes with a prognosis: “Proof assistants have not yet developed into a standard tool for mathematicians, but we strongly believe they will in the future” (p. 387). In the world of mathematics, there is a culture delineating the phases of discovery and rigorization that suggests methods for the discovery process and may indeed enable publications to spell out results for proof checkers in ways similar to how results are elaborated into semi-formal proofs today. We have seen that there is by no means agreement on this, but at least mathematicians don’t generally assume they have to start with the formal process. In programming however, I am not aware of a general agreement that problems have first to be solved in pen and paper before their “formalization” as a program is to be started. What is more, programming tasks frequently are embedded in real-world interactions that require experiments instead of just pen-and-paper simulations. 4. Learning by Analogy We can summarize as follows: The 20th century has seen increased interest in the foundations of mathematics and a better understanding of the notion of proof. While rigorous proof can be seen as emblematic of modern mathematics, completely formal proof has been a polite fiction or idealization in research mathematics. A vocal community of mathematicians insists on the continued importance of intuition for the further development of mathematical content and objects to a prescriptive straitjacket that they fear would stand in the way of creative discovery. Just how does this affect the practice of computer programming? Like mathematical argumentation, program construction has undergone a series of rigorizations to prevent the final product from going wrong. The parallel is so pronounced that there is an exact formal correspondence between various formal logics and programming languages, and there is an important sense in which program construction is equivalent to proof construction. More precisely, it is equivalent to the construction of completely formal proof. We have seen that in the mathematical community the activity of formal derivation is not generally seen as adequate for the creation of new mathematical content. This begs the question: How do programmers working in rigorous languages find programs? Mathematicians, in my layman’s eyes, have highly idiosyncratic methods of discovery, and there is no reason for programmers to be any more constrained. Indeed, when exempt from corporate restrictions, programmers are free to employ whichever methods they find helpful in discovery: whiteboard sketches, pen and paper traces, contemplation of denotational semantics, Node.js prototypes, etc. And no doubt, in the era before time-sharing and personal computers, offline algorithm design was the norm, and one can still find industry veterans today who claim to spend weeks developing programs without compiling. Today’s generation of programmers however grew up on REPLs and the editrefresh-run loop of browser development. The expectation is that the computer is an interactive device providing instantaneous feedback. The computer acts as a laboratory for the discovery of programs. It would certainly be easy to dismiss this approach as dilettantism, the mark of the amateur, and it is certainly true that experienced practitioners develop higher level reasoning for familiar problems. But it should be recalled that in order to understand a problem, mathematicians employ “experimentation, judicious guessing, trial and error, the use of analogies of the vaguest sort, blundering and fumbling” (Kline) and run through special cases (Roberts) in their blackboard or pen and paper labs. With a powerful computing machine on their desks, why would programmers not want to make use of it for exploring the problem space by means of experiment? Quickly observing the behavior of a few specific instances can give a feeling for the active forces in a process. Being able to push a value through my program and see the resulting crash can be illuminating with an immediacy not found in a lifeless compile-time error. For a quick sanity check I can run a partial implementation early, even though I have not announced all my assumptions (invariants) to the compiler, because I know which precise input I will use. If these activities are useful and we deprive the programmer of such means of discovery, she will opt for a system in which the balance between discovery and comprehensibility is more to her (present) advantage. 4.1 A Bad Proposal: Prototype in Lisp, Implement in Haskell One might think that we already have all the ingredients: Permissive dynamic languages and safe statically typed languages. So it is fine to fumble and blunder in Python or Lisp, but the real work needs to happen in a disciplined language. This does not seem to lead very far, however. The current trend in software development is towards agile and away from waterfall methods. Programs are not discovered in one creative act to then be reconstructed cleanly and rigorously. Software is often long-lived, undergoing constant evolution. A possibly stable and rigorous core needs to be seamlessly integrated with a more provisional, in-flux surface area. It is often an additional requirement to be able to interact with existing software libraries, such that a separate prototyping environment becomes unwieldy. When asked about the motivation to replace the Structure and Interpretation of Computer Programs course with a Python-based course in the MIT undergraduate curriculum, Gerald Sussman responded that the type of engineering required to write software had changed in the 1990s. Instead of the analysis and synthesis view taught in SICP, what was now needed was a more experimental, science-like approach in which “you grab this piece of library, and you poke at it [. . . ] see what it does” (Sussman 2016). Sussman readily admitted that the previous curriculum was more coherent, but engineering had changed, and it was necessary to find a new way to do and teach it, even if they were still in search of the right approach. Not just first-in-class teaching curricula, but also first-in-class programming systems need to adapt to the real contextual usage requirements. 4.2 Gradual Rigor If rigorous methods in practical software construction are to succeed, they can not be hermetically sealed off from environments that allow for creative discovery and preliminary approximations. An ideal programming system would allow for a wide spectrum of program construction, granting freedom for the act of discovery and means for the hygiene of rigorization as an approach crystallizes. As in mathematics, our goal should be enough rigor to keep our programs healthy and strong, but enough flexibility to enable us to fumble and blunder when still figuring things out. And like in mathematics, we should be able to move fluently, competently, and with confidence between both ends of the spectrum. Realism about the work of the practitioner In a 1979 paper DeMillo, Lipton and Perlis (DeMillo et al. 1979) challenged the software verification community to move from a standard of perfection to a standard of reliability, arguing that even in mathematics “absolute rigor” had, in fact, not been attained, and even less so in applied engineering disciplines. They pointed to the supposed infeasibility of full verification by social processes such as the judging of proof by an expert audience. Type systems can be seen as a partial response to this problem, where verification is done automatically by machines instead of a human community. The promise of dependent type systems is to far extend the reach of possible correctness guarantees embedded in proofcarrying code (Asperti et al. 2009). This line of research seems to provide very apt responses to the problem of verification described by DeMillo et al., by replacing the manual social verification step by machine verification, based on a codification of the accepted intersubjective standard. But this does not absolve of the question of how the design of languages with an eye towards easy automatic verification affects the resulting languages and its users as individuals for the purpose of initial creation. In this context, it will not do to give some principled theoretical account of possibility, but details of language ergonomics will have to be considered. A notorious polemic declares that untyped languages are unityped, and thus a mere special case of statically typed languages (Harper 2011, elaborated in Harper 2012). This clarification is highly interesting, but in no way accounts for the actual usage affordances of static and dynamic languages, respectively. Harper makes great points about the potential power of dynamicity safely integrated into a statically disciplined language, while at the same time giving nothing but condescending explanations for the popularity of dynamic languages. In mathematics, we saw a folklore belief (or pretense?) that rigorous formal proof is at the center of the mathematician’s practice, but considerable evidence that this is not the full story, and even found vocal individuals insisting on the importance and legitimacy of non-formal methods. Maybe the work of mathematicians is in principle equivalent to formal proof, but in the reality of the details, it is not. Maybe also, in the reality of the details, programmers find it easier to discover solutions to their tasks in the degenerate unityped languages they choose over languages with strong advanced type systems. 4.3 The Landscape Today In today’s mainstream programming language landscape, programmers have few options other than making a choice between languages with a simple and comprehensible mathematical foundation but with a tightly controlled execution model that disallows or disincentivizes direct experimentation, and languages which will allow for fumbling and blundering but do not offer a clear path towards a rigorous formulation with strong static correctness guarantees. On one end of the spectrum, Haskell and OCaml are popular statically typed functional languages. Their semantics are relatively simple and amenable to mathematical reasoning, and they possess powerful static type systems that are still growing in expressivity. These are the languages that most seem to correspond to the vision of programming conjured up by Martin-Löf. On the other end of the spectrum, scripting languages like Ruby, Python or JavaScript are conceptually less predictable and do not lend themselves to mathematical reasoning. The lack of compile-time type checking makes it easy to experiment and write programs by incremental approximation, but also prevents compile-time guarantees about program correctness, and disadvantages the language with respect to tools support. Languages like Java, C# or C++ provide static type systems that give them compile-time checks, superior tooling, and often superior run-time performance. On the other hand, they are not constructed around principles that allow for straight-forward application of modes of mathematical reasoning. They possess type systems that still leave ample room for fumbling and blundering, but provide little help in eventually leaving that stage. Especially in the web programming sphere, there have been recent attempts to retrofit dynamic languages such as PHP, JavaScript and Python with static type systems, which often leads to idiosyncratic design choices. Dart and TypeScript sacrifice soundness of the type system to use “optimistic” type compatibility rules, in the interest of making static types easier to use. Runtime errors are trapped by the underlying dynamic language (Brandt 2011). Similarly flawed type systems have appeared before, if with less pride, for example in Java. If we want to take the programs as proofs metaphor seriously, not just as a theoretical construct, but as something that can actually serve as a practical model for programming, we need to think about ways of combining the best properties of the various systems, or come up with altogether new ways of supporting the modern development process. 4.4 A Speculative Evaluation Framework For programming systems that support development all the way from initial creation to eventual rigorous codification, we expect supporting capabilities in two phases: discovery and codification. 4.4.1 Discovery The responses to Jaffe and Quinn hinted at the high diversity of cognitive styles and approaches among mathematicians. While ultimately mathematicians have a rigorous common standard of communication, there is a lot of freedom for individuals to work with their preferred methods and amount of guesswork. The degrees of freedom a technological system can provide may always need to be augmented with activities external to the system, yet programming languages could optimize for the level of flexibility possible when already rigorously formulated parts of a software system interact with experimental parts. We define three criteria that are likely to be useful in exploring a problem space and discovering possible solutions by enabling fumbling and blundering. Special cases Testing a procedure by applying it to only some special cases is irresponsible, but trying a basic idea first on regular, then on edge cases is a time-tested heuristic for developing the first draft of a general procedure. Considering special cases allows local and concrete reasoning in place of contemplation of abstract generalities. A programming environment can allow programmers to run and observe partial implementations on hand-selected inputs, even if the implementation has obvious holes that have yet to be addressed. Flow trumps flaw An uninterrupted flow of ideas and associations is more important than the premature attention to flawed details. I need not work out the details of an approach I discard after five minutes of exploration. Today’s incarnations of rigorous languages are not very close to absolute rigor. In most programs, there are many properties that are not captured by the type system (list length, effects, co-effects), and I don’t have to battle the type checker on those dimensions. Nevertheless, there is a variety of cases where the type checker insists on guarantees for certain properties. The more the type system conforms to the ideal of preventing programs from going wrong, the more details will have to be explicitly stated and treated. While the details need to be taken care of as the overall picture clears up, it is important to develop a high-level understanding and see an idea through enough to evaluate its overall value, before investing the time to care about all the details. Partial execution Especially when making changes to an existing codebase, the programmer may want to test the changes to one part of the program, while ignoring – consciously or unconsciously – that global invariants have been broken. The environment can allow the execution of partially functional programs, even if there is no global coherence. 4.4.2 Codification Discovery and experimentation are important, but so is hardening and gradual refinement towards a shared and practically verifiable standard of correctness. Not only does this provide better means for creating reliable artifacts, but it also is the basis for a common language to communicate ideas and judge implementations. Crystallization As understanding of the programming task and software system crystallizes, the programmer should have a clear standard of correctness to work towards, and should constantly be supported to make the assumptions and invariants explicit and subject to verification. 5. Tools for Discovery The goals and criteria described in the preceding section set up desiderata but do not prescribe any particular solution. A basic question that is left open, is whether we need to think of this as strictly a programming language problem, or whether it can be framed more broadly as a programming system problem. The idol of mathematics presents a pattern where the final form of rigorous proof is fixed (under adequate idealization), but any path that produces this form is considered legal. In program construction, the tools for experimentation, discovery and crystallization can either be built into the language, or be available in a programming environment that allows to eventually produce a program in a final rigorous form, even if the language itself has no concept of imprecision. Both approaches have been explored in prior work, and it makes sense to discuss examples viewed through the lens of this distinction. 5.1 As Programming Language Problem A programming language that is to support the development process from experimentation to refinement into a well-understood, rigid form, needs to possess a powerful type system that can capture the relevant behavioral properties, but also allows to encode and tolerate a level of indeterminacy to support the phases where the programmer is unwilling or yet unable to formally explain their intention in detail. Without reference to a particular implementation strategy, this general idea of viewing the static-to-dynamic continuum as a language-internal problem has already been called for in (Meijer and Drayton 2004). Gradual Typing Gradual typing is an attempt to combine the benefits of static and dynamic type checking, yielding control of which parts of the program are statically checked to the programmer. At the core, gradual type systems extend static type systems with a special dynamic type that is similar to a global supertype (Object in Java) that also acts as a global subtype. To prevent the type hierarchy from collapsing under the subtyping relation, however, a new nontransitive consistency relation is introduced that allows any type to be implicitly converted to and from dynamic. The dynamic type can be associated with an expression either explicitly or through omission of type information, in which case the expression can act as any type at compile time, with dynamic checks for each operation performed at run-time. By supporting both approaches in the same language, gradual typing enables programmers to evolve programs from an implementation with only dynamically checked types to a more predictable codebase with compile-time correctness guarantees. As the program evolves, fragments without static type checks can enter and be annotated repeatedly, or even remain part of the code base indefinitely. The use of special cases is facilitated by the generous type conversions possible in the system, but may require manual effort on the side of the programmer. The ability to use dynamically typed fragments is supportive of programmer flow. Partial execution is possible, but limited to the dynamically typed fragments of a program. The presence of a clearly defined and enforced type discipline provides a framework for crystallization but relies on the programmer’s discipline to make use of it. The term gradual typing was introduced in (Siek and Taha 2006). Recent research has been focused on improving performance and communication of type errors (Garcia et al. 2016; Takikawa et al. 2015). Established languages that support some version of gradual typing are C#, or more recently Dart and TypeScript. Dependent Types The question of how much type information to extract from the programmer becomes more relevant as the expressiveness of type systems grows. In Why Dependent Types Matter, Altenkirch et al. present a series of refinements of merge-sort written in Epigram, a functional language with dependent types. In their words: “It is the programmer’s choice to what degree he wants to exploit the expressiveness of such a powerful type discipline. While the price for formally certified software may be high, it is good to know that we can pay it in installments and that we are free to decide how far we want to go” (Altenkirch et al. 2005). Because of the expressive type system it is possible to encode not just structural information about function input and output, but more complex required and guaranteed properties for input and output – pre- and post-conditions. As an example, a vector concatenation function may carry the information that the length of the output vector is the sum of the input vectors. If the compiler is unable to infer this fact from the function definition, the programmer may have a proof obligation on her hands! In this case, as an alternative to providing a proof of this simple fact, Epigram allows to use a more imprecise type that will merely express that the output vector has some length. The ability to choose the level of detail of typings grants programmers the power to move more or less quickly and revisit parts of the code deserving of greater precision over time. This helps prevent disruptions of flow, and allows for straight-forward crystallization. It is possible to observe execution instances for selected special cases as long as they are permitted under the current level of type precision. Execution of any part of the program is only possible if the whole program compiles. 5.2 As Programming System Problem Statically-Aided Discovery Instead of manually running experiments on code with lacking type information, programmers can provide type information and receive automatic and direct feedback from the programming environment that may help revise and refine types and implementation. (Dybjer et al. 2003) presents an extension to the proof assistant Agda, that combines static and run-time analysis by means of property-based testing to quickly identify deadends in formal proofs with high probability. In this manner, the system user can gain confidence in the validity of her current attempt, before potentially wasting time and energy trying to prove some ineffable, false property. This approach supports crystallization by reducing the time to feedback. Flow is somewhat disrupted by switching from implementation to verification, but examples for testing are even automatically generated. Partial execution is limited to the fragment under consideration. A similar system is described in Dynamic Witnesses for Static Type Errors (Seidel et al. 2016), which aims to complement the abstract error messages provided by OCaml’s type checker with problematic example inputs and an accompanying trace that illustrate the source of the error. Special cases, that is example inputs and executions, are provided only for negative cases that produce a type error. Be- cause the tool is external to the target language and compiler, execution of partially erroneous programs and testing with arbitrary examples is otherwise not possible. Flow is disrupted in just the same way as with a regular compiler, but the duration of the disruption may be decreased. There is no added support for gradual crystallization, even while there is a clear and enforced standard of correctness. There is a tradition of type-directed tools for interactive proof construction in proof assistants like Agda, Coq and Isabelle. A graphical user interface can present the available hypotheses and open proof obligations and allow to select standard routines (tactics) to automatically proceed with parts of the proof construction (see also Asperti et al. 2009; Geuvers and Nederpelt 2014). The same idea can be applied to aided program construction as suggested in (Altenkirch et al. 2005): The environment lists the current programming goals based on the available type information and the programmer either implements them manually or by means of a meta-programming rule available as library code. Instead of supporting experimental discovery, the programming environment provides support in reasoning at the static level, gradually working towards a pre-defined and checked type-level description of each part of the program. The language Idris, designed for general purpose programming, has a compiler with explicit support for this style of interactive type-directed development (Brady 2016). Pluggable Type Systems Type disciplines can be seen as entirely external to the programming language, in which case there may be not one, but many static type systems designed for a language, allowing the programmer to pick the most appropriate one or ones. Such optional, pluggable type systems that have no effect on language semantics were argued for in (Bracha 2004). Because pluggable type systems are essentially analysis tools for dynamic languages, all discovery-phase benefits for flow, special cases and partial execution transfer unimpinged. On the other hand, type systems become more of a tool for individual developers and there is no longer any notion of crystallization towards a common standard of rigor. Flexible Execution Models for Typed Languages This category of approaches is closest to gradual typing in that a designated type system or standard of rigor is assumed and combined with the desire to emulate the development experience of dynamic languages. Unlike in gradual typing, however, the type system is not enriched to allow the distinction between static and dynamic fragments of a program. Instead, the programming environment is altered to (optionally) defer certain type checks to run-time, allowing the execution even of provably type-incorrect programs. Execution may fail with a trapped error if the execution path leads to an error, or continue without failure as long as no problematic part of the program is reached. Always-Available Static and Dynamic Feedback (Bayne et al. 2011) notes that “[most] statically-typed languages embody the philosophy that an ill-typed program is of zero value” and henceforth reject such programs. Instead, Bayne et al. see such programs as valuable for experimentation and want to provide feedback from both static analysis and dynamic execution at any time. Progress types (Politz et al. 2012), instead of giving the programmer control over which parts of the program are disciplined by a static type system, grants control over which type errors are to be compile-time errors, such that irrelevant errors can be ignored until they occur at run-time. The authors seem to see this approach as compatible with the idea of pluggable types, however the presented system is focused on the existing run-time type system of the base language. Liberating the Programmer with Prorogued Programming (Afshari et al. 2012) aims at creating a new programming paradigm, based around a more interactive program creation workflow. Their approach is based around three principles: allowing the programmer to defer implementation partially to focus on an ongoing concern; allowing the programmer to supply appropriate values during execution; and allowing the programmer to execute partial implementations at any time. In all three cases, disruptions to flow are minimal, special cases can be hand-picked, and execution can happen at will. With the possible exception of progress types, crystallization towards a statically-checked type discipline is an explicit goal and can be pursued gradually. An early version of the basic idea is described in (Cartwright and Fagan 1991). Recent versions of the Glasgow Haskell Compiler support the deferral of type checks to run-time (Vytiniotis et al. 2015). 6. Conclusion There is much work left to be done, both in working out the details of even these speculative arguments, and if they convince, in empirical investigation of their implications. When reading the writings of researchers, one finds references to the popularity of so-called dynamic languages, but this often appears as a curious, brute fact, something not available to or worthy of analysis. Even publications presenting technologies in support of the dynamic habits of programmers seem to confine themselves to appealing to only that brute fact, putting the blame on programmers instead of justifying the benefits independently. To give just one example: “The ethos of gradual typing takes for granted that programmers choose dynamic languages for creating software” (Takikawa et al. 2015). My hope is to convince the reader that there is something to learn from looking at programs as proofs, and then looking at how proofs really come about, without falling prey to idolizing mathematics. Looking at the two examples drawn from architecture and urban planning we can make a distinction that may help address a possible objection. On one side, Wittgenstein’s work raises doubts about whether his design was guided by the ambition to provide housing3 . On the other side, it seems plausible (if not necessary) to believe that the architects of modernist housing projects were in fact motivated by the desire to provide housing. Unfortunately, this does not mean that the results are altogether different in practice. Similarly, my claim need not be that language designers are aiming for a formalist paradise devoid of practical motivation. But even if for the best intentions their design takes inspiration from mathematics in a too simplistic manner, it may miss important aspects and lead to similarly formalistic outcomes. If we focus too much on making “programming an activity akin in rigour and beauty to that of proving mathematical theorems”, while losing track of the “rather messy job of instructing this or that physically existing machine, by cunning tricks, to perform computational tasks”, and not even paying attention to how mathematicians really do prove mathematical theorems, we run the risk of erecting, like Wittgenstein, a dwelling for the gods. The reality of the practitioner is not as clean-cut and elegant as its idealization, but makes use of a variety of mindsets, cognitive modes, and good old fudging. Coming up with an account of how the rigorous formal systems we have conceived of can integrate with less rigid components will be challenging, but worthwhile. Acknowledgments The seed of doubt was planted during my graduate studies at the ILLC and further shaped by my work at Prezi. Andras Slemmer’s interest prompted me to produce an elaborated written version. Jan Martin Raasch, Ignas Vyšniauskas and Christoph Gietl helped by discussing the written version at various stages. The reviewers caught some of my sloppier thinking and suggested further material and distinctions. References M. Afshari, E.T. Barr, and Z. Su. Liberating the programmer with prorogued programming. In Proceedings of the ACM international symposium on New ideas, new paradigms, and reflections on programming and software (Onward! 2012), ACM, New York, USA, 2012. T. Altenkirch, C. McBride, and J. McKinna. Why dependent types matter. 2005. http://www.cs.nott.ac.uk/~psztxa/publ/ ydtm.pdf. A. Asperti, H. Geuvers, and R. Natarajan. Social processes, program verification and all that. In Mathematical Structures in Computer Science, volume 19, number 5, October 2009. M. Atiyah et al. Responses to: A. Jaffe and F. Quinn, “Theoretical mathematics”: Toward a cultural synthesis of mathematics and theoretical physics. In Bulletin of the American Mathematical Society, volume 30, number 2, April 1994. 3 It brings to mind his metaphorical invocation of architecture: “I am not interested in erecting a building but in having the foundations of possible buildings transparently before me”. M. Bayne, R. Cook, M.D. Ernst. Always-available static and dynamic feedback. In Proceedings of the 33rd International Conference on Software Engineering, ACM, 2011. G. Bracha. Pluggable type systems. In OOPSLA Workshop on Revival of Dynamic Languages, 2004. E. Brady. Type-driven development with Idris. Manning, 2016. E. Brandt. Why Dart types are optional and unsound. 2011. https://www.dartlang.org/articles/ design-decisions/why-dart-types. R. Cartwright, and M. Fagan. Soft typing. In Proceedings of the ACM SIGPLAN 1991 conference on Programming language design and implementation, June 24–28, 1991, Toronto, Canada. J. Davis, and R. Hersh. The mathematical experience. Birkhäuser, Boston, 1981. R.A. DeMillo, R.J. Lipton, and A.J. Perlis. Social processes and proofs of theorems and programs. In Commun. ACM, volume 22, number 5, May 1979. P. Dybjer et al. Combining Testing and Proving in Dependent Type Theory. In D. Basin, B. Wolff editors, Theorem Proving in Higher Order Logics: 16th International Conference, TPHOLs 2003, Rome, Italy, September 8-12, 2003. Proceedings. Springer, Berlin, 2003. J. Emerich. Applying types as abstract interpretation to a language with dynamic dispatch. Master’s thesis. University of Amsterdam, The Netherlands, 2015. R.P. Feynman. New textbooks for the “new” mathematics. In Engineering and science, volume 28, number 6, March 1965. R. Garcia, A.M. Clark, and E. Tanter. Abstracting gradual typing. In Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2016). ACM, New York. H. Geuvers, and R. Nederpelt. Type theory and formal proof. Cambridge University Press, Cambridge, 2014. R. Harper. Dynamic Languages are Static Languages. Blog post. March 19, 2011. https: //existentialtype.wordpress.com/2011/03/19/ dynamic-languages-are-static-languages/ R. Harper. Practical foundations for programming languages. Cambridge University Press, 2012. D. Hilbert. Axiomatisches Denken. In Mathematische Annalen, volume 78, number 1, December 1917. A. Jaffe, and F. Quinn. “Theoretical mathematics”: Toward a cultural synthesis of mathematics and theoretical physics. In Bulletin of the American Mathematical Society, volume 29, number 1, July 1993. M. Kline. Logic versus pedagogy. In The American Mathematical Monthly, volume 77, number 3, March 1970. Mathematical Association of America, 1970. M. Kline. Why Johnny can’t add: The failure of the new math. Vintage Books, 1974. P. Martin-Löf. Constructive mathematics and computer programming. In C A.R. Hoare and J. C. Shepherdson editors, Proc. of a discussion meeting of the Royal Society of London on Mathematical logic and programming languages. Prentice-Hall, Inc., Upper Saddle River, NJ, USA, 1985. C. Mclarty. Poincaré: Mathematics & logic & intuition. In Philosophia Mathematica, volume 5, number 2. Oxford University Press, 1997. E.L. Seidel, R. Jhala, and W. Weimer. Dynamic witnesses for static type errors. Electronically published on June 24, 2016: http://arxiv.org/abs/1606.07557 (to appear in print). E. Meijer, and P. Drayton. Static typing where possible, dynamic typing when needed. In OOPSLA Workshop on Revival of Dynamic Languages, 2004. M. Senechal. The continuing silence of Bourbaki: An interview with Pierre Cartier. In M. Senechal editor, The mathematical intelligencer, volume 20, number 1, 1998. C.J. Phillips. In accordance with a “more majestic order”: the new math and the nature of mathematics at midcentury. In Isis, volume 105, number 3, September 2014. University of Chicago Press, 2014. J. Siek, and W. Taha. Gradual typing for functional languages. In TR-2006-06: Scheme and functional programming workshop, University of Chicago, 2006. C.J. Phillips. The new math: a political history. University of Chicago Press, 2015. B. Pierce. Types and programming languages. MIT Press, 2002. J.H. Poincaré. Intuition and logic in mathematics. In W.B. Ewald editor, From Kant to Hilbert, volume 2. Oxford University Press, 2005. J.G. Politz, H. Quay-de la Vallee, S. Krishnamurthi. Progressive types. In Proceedings of the ACM international symposium on new ideas, new paradigms, and reflections on programming and software (Onward! 2012), ACM, New York, USA, 2012. G. Sussman. Video recording. Electronically published on January 11, 2016: https://vimeo.com/151465912#t=59m36s. A. Takikawa et al. Towards practical gradual typing. In John Tang Boyland editor, 29th European Conference on Object-Oriented Programming (ECOOP 2015), volume 37. Schloss Dagstuhl, 2015. D. Vytiniotis, S.P. Jones, and J.P. Magalhães. Equality proofs and deferred type errors: a compiler pearl. In Proceedings of the 17th ACM SIGPLAN international conference on Functional programming (ICFP 12), ACM, New York, USA. P. Wadler. Propositions as types. In Communications of the ACM, volume 58, number 12, December 2015.
6cs.PL
Real-time Hand Tracking under Occlusion from an Egocentric RGB-D Sensor Franziska Mueller1 Srinath Sridhar1 arXiv:1704.02201v2 [cs.CV] 5 Oct 2017 1 Dushyant Mehta1 Dan Casas2 Max-Planck-Institute for Informatics, Germany 2 Oleksandr Sotnychenko1 Christian Theobalt1 Universidad Rey Juan Carlos, Spain Abstract We present an approach for real-time, robust and accurate hand pose estimation from moving egocentric RGB-D cameras in cluttered real environments. Existing methods typically fail for hand-object interactions in cluttered scenes imaged from egocentric viewpoints—common for virtual or augmented reality applications. Our approach uses two subsequently applied Convolutional Neural Networks (CNNs) to localize the hand and regress 3D joint locations. Hand localization is achieved by using a CNN to estimate the 2D position of the hand center in the input, even in the presence of clutter and occlusions. The localized hand position, together with the corresponding input depth value, is used to generate a normalized cropped image that is fed into a second CNN to regress relative 3D hand joint locations in real time. For added accuracy, robustness and temporal stability, we refine the pose estimates using a kinematic pose tracking energy. To train the CNNs, we introduce a new photorealistic dataset that uses a merged reality approach to capture and synthesize large amounts of annotated data of natural hand interaction in cluttered scenes. Through quantitative and qualitative evaluation, we show that our method is robust to self-occlusion and occlusions by objects, particularly in moving egocentric perspectives. Figure 1: We present an approach to track the full 3D pose of the hand from egocentric viewpoints (left), a challenging problem due to additional self-occlusions, occlusions from objects and background clutter. Our method can reliably track the hand in 3D even under such conditions using only RGB-D input. Here we show tracking results overlaid with color and depth map (center), and visualized from virtual viewpoints (right). tion with model-based hand tracking, have been shown to work well for static, third-person viewpoints in uncluttered scenes [39, 29, 18], i.e., mostly for free hand motion in midair, a setting that is uncommon in natural hand interaction. However, real-time hand pose estimation from moving, first-person camera viewpoints in cluttered real-world scenes where the hand is often occluded as it naturally interacts with objects, remains an unsolved problem. We define first-person or egocentric viewpoints as those that would typically be imaged by cameras mounted on the head (for VR/AR applications), shoulder, or chest (see Figure 1). Occlusions, cluttered backgrounds, manipulated objects, and field-of-view limitations make this scenario particularly challenging. CNNs are a promising method to tackle this problem but typically require large amounts of annotated data which is hard to obtain since markerless hand tracking (even with multiple views), and manual annotation on a large scale is infeasible in egocentric settings due to (self-)occlusions, cost, and time. Even semiautomatic annotation approaches [17] would fail if large parts of the hand are occluded. Photorealistic synthetic data, 1. Introduction Estimating the full articulated 3D pose of hands is becoming increasingly important due to the central role that hands play in everyday human activities. Applications in activity recognition [26], motion control [47], human– computer interaction [30], and virtual/augmented reality (VR/AR) require real-time and accurate hand pose estimation under challenging conditions. Spurred by recent developments in commodity depth sensing, several methods that use a single RGB-D camera have been proposed [38, 31, 35, 22, 4, 42]. In particular, methods that use Convolutional Neural Networks (CNNs), possibly in combina1 on the other hand, is inexpensive, easier to obtain, removes the need for manual annotation, and can produce accurate ground truth even under occlusion. In this paper, we present, to our knowledge, the first method that supports real-time egocentric hand pose estimation in real scenes with cluttered backgrounds, occlusions, and complex hand-object interactions using a single commodity RGB-D camera. We divide the task of perframe hand pose estimation into: (1) hand localization, and (2) 3D joint location regression. Hand localization, an important task in the presence of scene clutter, is achieved by a CNN that estimates the 2D image location of the center of the hand. Further processing results in an image-level bounding box around the hand and the 3D location of the hand center (or of the occluding object directly in front of the center). This output is fed into a second CNN that regresses the relative 3D locations of the 21 hand joints. Both CNNs are trained with large amounts of fully annotated data which we obtain by combining hand-object interactions with real cluttered backgrounds using a new merged reality approach. This increases the realism of the training data since users can perform motions to mimic manipulating a virtual object using live feedback of their hand pose. These motions are rendered from novel egocentric views using a framework that photorealistically models RGB-D data of hands in natural interaction with objects and clutter. The 3D joint location predictions obtained from the CNN are accurate but suffer from kinematic inconsistencies and temporal jitter expected in single frame pose estimation methods. To overcome this, we refine the estimated 3D joint locations using a fast inverse kinematics pose tracking energy that uses 3D and 2D joint location constraints to estimate the joint angles of a temporally smooth skeleton. Together, this results in the first real-time approach for smooth and accurate hand tracking even in cluttered scenes and from moving egocentric viewpoints. We show the accuracy, robustness, and generality of our approach on a new benchmark dataset with moving egocentric cameras in real cluttered environments. In sum, our contributions are: • A novel method that localizes the hand and estimates, in real time, the 3D joint locations from egocentric viewpoints, in clutter, and under strong occlusions using two CNNs. A kinematic pose tracking energy further refines the pose by estimating joint angles of a temporally smooth tracking. • A photorealistic data generation framework for synthesizing large amounts of annotated RGB-D training data of hands in natural interaction with objects and clutter. • Extensive evaluation on our new annotated real benchmark dataset EgoDexter featuring egocentric cluttered scenes and interaction with objects. 2. Related work Hand pose estimation has a rich history due to its applications in human–computer interaction, motion control and activity recognition. However, most previous work estimates hand pose in mid-air and in uncluttered scenes with third-person viewpoints, making occlusions less of an issue. We first review the prior art for this simpler setting (free hand tracking) followed by a discussion of work in the harder hand-object and egocentric settings. Free Hand Tracking: Many approaches for free hand tracking resort to multiple RGB cameras to overcome selfocclusions and achieve high accuracy [33, 1, 44]. However, single depth or RGB-D cameras are preferred since multiple cameras are cumbersome to setup and use. Methods that use generative pose tracking have been successful for free hand tracking with only an RGB-D stream [19, 22, 35, 37]. However, these approaches fail under typical fast motions, and occlusions due to objects and clutter. To overcome this, most recent approaches rely solely on learning-based methods or combine them with generative pose tracking. Random forests are a popular choice [12, 36, 34, 45, 43] due to their capacity but still result in kinematically inconsistent and jittery pose estimates. Many methods overcome this limitation through combination with a generative pose tracking strategy [31, 22, 38]. All of the above approaches fail to work under occlusions arising from objects and scene clutter. Recent deep learning methods promise large learning capacities for hand pose estimation [39, 4, 29, 48, 46, 18]. However, generating enough examples for supervised training remains a challenge. Commercial systems that claim to work for egocentric viewpoints [14] fail under large occlusions, see Section 6. Hand Tracking under Challenging Conditions: Hand pose estimation under challenging scene, background, and camera conditions different from third-person mid-air tracking remains an unsolved problem. Some methods can track hands even when they interact with objects [6, 27], but they are limited to slow motions and limited articulation. A method for real-time joint tracking of hands and objects from third-person viewpoints was recently proposed [32], but is limited to known objects and small occlusions. Methods for capturing complex hand-object interactions and object scanning were proposed [20, 1, 13, 41, 40, 21]. However, these are offline methods and their performance in egocentric cluttered scenarios is unknown. Using egocentric cameras for human performance capture has gained attention due to ready availability of consumer wearable cameras [23]. Sridhar et al. [31] showed a working example of real-time egocentric tracking in uncluttered scenes. Rogez et al. [24, 25] presented one of the first methods to achieve this in cluttered scenes with natural hand-object interactions pioneering the use of synthetic images for training a machine learning approach for diffi- Figure 2: Overview: Starting from an RGB-D frame, we initially regress the 2D hand position heatmap using our CNN HALNet and compute a cropped frame. A second CNN, JORNet, is used to predict root-relative 3D joint positions as well as 2D joint heatmaps. Both CNNs are trainned with our new SynthHands dataset. Finally, we use a pose tracking step to obtain the joint angles of a kinematic skeleton. cult egocentric views. However, this work was not meant for real-time tracking. We introduce an approach to leverage large amounts of synthetic training data to achieve realtime, temporally consistent hand tracking, even under challenging occlusion conditions. 3. Overview Our goal is to estimate the full 3D articulated pose of the hand imaged with a single commodity RGB-D sensor. We use the RGB and depth channels from the Intel RealSense SR300 [8], both with a resolution of 640×480 pixels and captured at 30 Hz. We formulate hand pose estimation as an energy minimization problem that incorporates per-frame pose estimates into a temporal tracking framework. The goal is to find the joint angles of a kinematic hand skeleton (Section 3.1) that best represent the input observation. Similar strategies have been shown to be successful in state-of-the-art methods [38, 31, 32, 22] that use per-frame pose estimation to initialize a tracker that refines and regularizes the joint angles of a kinematic skeleton for free hand tracking. However, the per-frame pose estimation components of these methods struggle under strong occlusions, hand-object interactions, scene clutter, and moving egocentric cameras. We overcome this limitation by combining a CNN-based 3D pose regression framework, that is tailored for this challenging setting, with a kinematic skeleton tracking strategy for temporally stable results. We divide the task of hand pose estimation into several subtasks (Figure 2). First, hand localization (Section 4.1) is achieved by a CNN that estimates an image-level heatmap (that encodes position probabilities) of the root — a point which is either the hand center (knuckle of the middle finger, shown with a star shape in Figure 3a) or a point on an object that occludes the hand center. The 2D and 3D root positions are used to extract a normalized cropped im- age of the hand. Second, 3D joint regression (Section 4.2) achieved with a CNN that regresses root-relative 3D joint locations from the cropped hand image. Both CNNs are trained with large amounts of annotated data which were generated with a novel framework to automatically generate 3D hand joint motion with natural hand interaction (Section 4.4). Finally, the regressed 3D joint positions are used in a kinematic pose tracking framework (Section 5) to obtain temporally smooth tracking of the hand motion. 3.1. Hand Model To ensure a consistent representation for both joint locations (predicted by the CNNs) and joint angles (optimized during tracking), we use a kinematic skeleton. As shown in Figure 3, we model the hand using a hierarchy of bones (gray lines) and joints (circles). The 3D joint locations are used as constraints in a kinematic pose tracking step that estimates temporally smooth joint angles of a kinematic skeleton. In our implementation, we use a kinematic skeleton with 26 degrees of freedom (DOF), which includes 6 for global translation and rotation, and 20 joint angles, stored in a vector Θ, as shown in Figure 3b. To fit users with different hand shapes and sizes, we perform a quick calibration step to fix the length of the bones for different users. 4. Single Frame 3D Pose Regression The goal of 3D pose regression is to estimate the 3D joint locations of the hand at each frame of the RGB-D input. To achieve this, we first create a colored depth map D, from the raw input produced by commodity RGB-D cameras (e.g., Intel RealSense SR300). We define D as D = colormap(R, G, B, Z), (1) where colormap(·) is a function, that depends on the camera calibration parameters, to map each pixel in the color (a) Global 3D positions (b) Kinematic skeleton Figure 3: We use two different, but consistent, representations to model the hands. Our 3D joint regression step outputs J = 21 global 3D joint locations, shown in (a) in green, which are later used to estimate the joint angles of a kinematic skeleton hand model, shown in (b). The orange star depicts the joint used as a hand root. image plane onto the depth map Z. Computing D allows us to ignore camera-specific variations in extrinsic parameters. We also downsample D to a resolution of 320×240 to aid real-time performance. We next describe our pose regression approach that is robust even in challenging cluttered scenes with notable (self-)occlusions of the hand. As we show in the evaluation (Section 6), using a two step approach to first localize the hand in full-frame input and subsequently estimate 3D pose outperforms using a single CNN for both tasks. 4.1. Hand Localization The goal of the first part of pose regression is to localize the hand in challenging cluttered input frames resulting in a bounding box around the hand and 3D root location. Given a colored depth map D, we compute e = imcrop(D, HR ), D (2) where HR is a heatmap encoding the position probability of the 2D hand root and imcrop(·) is a function that crops the hand area of the input frame. In particular, we estimate HR using a CNN which we call HALNet (HAnd Localization Net). The imcrop(·) function picks the imagelevel heatmap maximum location φ(HR ) = (u, v) and uses the associated depth z in D to compute a depth-dependent crop, the side length of which is inversely proportional to the depth and contains the hand. Additionally, imcrop(·) also normalizes the depth component of the cropped image by subtracting z from all pixels. HALNet uses an architecture derived from ResNet50 [7] which has been shown to have a good balance between accuracy and computational cost [2]. We reduced the number of residual blocks to 10 to achieve real-time framerate while maintaining high accuracy. We train this network using SynthHands, a new photorealistic dataset with ample variance across many dimensions such as hand pose, skin color, objects, hand-object interaction and shading details. See Sections 4.3 and 4.4, and the supplementary document for training and architecture details. Post Processing: To make the root maximum location robust over time, we add an additional step to prevent outliers from affecting 3D joint location estimates. We maintain a history of maxima locations and label them as confident or uncertain based on the following criterion. If the likelihood value of the heatmap maximum at a frame t is < 0.1 and it occurs at > 30 pixels from the previous maximum then it is marked as uncertain. If a maximum location is uncertain, we update it as φt = φt−1 + δ k φc−1 − φc−2 , ||φc−1 − φc−2 || (3) where φt = φ(HRt ) is the updated 2D maximum location at the frame t, φc−1 is the last confident maximum location, k is the number of frames elapsed since the last confident maximum, and δ is a decay factor to progressively downweight uncertain maxima. We empirically set δ = 0.98 and use this value in all our results. 4.2. 3D Joint Regression e that Starting from a cropped and normalized input D contains a hand, potentially partially occluded, our goal is to regress the global 3D hand joint position vector pG ∈ R3×J . We use a CNN, referred to as JORNet (JOint Regression Net), to predict per-joint 3D root-relative positions e Additionally, JORNet also regresses pL ∈ R3×J in D. per-joint 2D position likelihood heatmaps H = {Hj }Jj=1 , which will be used to regularize the predicted 3D joint positions in a later step. We obtain global 3D joint positions L pG j = pj +r, where r is the global position of the hand center (or a point on an occluder) obtained by backprojecting the 2.5D hand root position (u, v, z) to 3D. JORNet uses the same architecture as HALNet and is trained with the same data. See Sections 4.3 and 4.4 for training details, and the supplementary document for architecture details. 4.3. SynthHands Dataset Supervised learning methods, including CNNs, require large amounts of training data in order to learn all the variation exhibited in real hand motion. Fully annotated real data would be ideal for this purpose but it is time consuming to manually annotate data and annotation quality may not always be good [17]. To circumvent this problem, existing methods [24, 25] have used synthetic data. Despite the advances made, existing datasets are constrained in a number of ways: they typically show unnatural mid-air motions, no Figure 4: Our SynthHands dataset is created by posing a photorealistic hand model with real hand motion data. Virtual objects are incorporated into the 3D scenario. To allow data augmentation, we output object foreground and scene background appearance as a constant plain color (top row), which are composed with shading details and randomized textures in a postprocessing step (bottom row). Figure 5: Our SynthHands dataset has accurate annotated data of a hand interacting with objects. We use a merged reality framework to track a real hand, where all joint positions are annotated, interacting with a virtual object (top). Synthetic images are rendered with chroma key-ready colors, enabling data augmentation by composing the rendered hand with varying object texture and real cluttered backgrounds (bottom). complex hand-object interactions, and do not model realistic background clutter and noise. We propose a new dataset, SynthHands, that combines real captured hand motion (retargeted to a virtual hand model) with natural backgrounds and virtual objects to sample all important dimensions of variability at previously unseen granularity. It captures the variations in natural hand motion such as pose, skin color, shape, texture, background clutter, camera viewpoint, and hand-object interactions. We now highlight some of the unique features of this dataset that make it ideal for supervised training of learning-based methods. Natural Hand Motions: Instead of using static hand poses [25], we captured real, non-occluded, hand motion in mid-air from a third-person viewpoint, with a state-ofthe-art real-time markerless tracker [31]. These motions were subsequently re-targeted onto a photorealistic synthetic hand rigged by an artist. Because we pose the synthetic hand using the captured hand motion, it mimics real hand motions and increases dataset realism. Hand Shape and Color: Hand shape and skin color exhibit large variation across users. To simulate real world diversity, SynthHands contains skin textures randomly sampled from 12 different skin tones. We also sample variation in other anatomical features (e.g., male hands are typically bigger and may contain more hair) in the data. Finally, we model hand shape variation by randomly applying a scaling parameter β ∈ [0.8, 1.2] along each dimension of a default hand mesh. Egocentric Viewpoint: Synthetic data has the unique advantage that we can render from arbitrary camera viewpoints. In order to support difficult egocentric views, we setup 5 virtual cameras that mimic different egocentric perspectives. The virtual cameras generate RGB-D images from this perspective while also simulating sensor noise and camera calibration parameters. Hand-Object Interactions: We realistically simulate hand-object interactions by using a merged reality approach to track real hand motion interacting with virtual objects. We achieve this by leveraging the real-time capability of existing hand tracking solutions [31] to show the user’s hand interacting with a virtual on-screen object. Users perform motions such as object grasping and manipulation, thus simulating real hand-object interactions (see Figure 5). Object Shape and Appearance: SynthHands contains interactions with a total of 7 different virtual objects in various locations, rotations and scale configurations. To enable augmentation of the object appearance to increase dataset variance, we render the object albedo (i.e., pink in Figure 12) and shading layers separately. We use chroma keying to replace the pink object albedo with a texture randomly sampled from a set of 145 textures and combining it with the shading image. Figure 12 shows some examples of the data before and after augmentation. Importantly, note that SynthHands does not contain 3D scans of the real test objects nor 3D models of similar objects used for evaluation in Section 6. This demonstrates that our approach generalizes to unseen objects. Real Backgrounds: Finally, we simulate cluttered scenes and backgrounds by compositing the synthesized handobject images with real RGB-D captures of real backgrounds, including everyday desktop scenarios, offices, corridors and kitchens. We use chroma keying to replace the default background (green in Figure 12) with the captured backgrounds. Our data generation framework is built using the Unity Game Engine and uses a rigged hand model distributed by Leap Motion [14]. In total, SynthHands contains roughly 220,000 RGB-D images exhibiting large variation seen in natural hands and interactions. Please see the supplementary document for more information and example images. 4.4. Training Both HALNet and JORNet are trained on the SynthHands dataset using the Caffe framework [10], and the AdaDelta solver with a momentum of 0.9 and weight decay factor of 0.0005. The learning rate is tapered down from 0.05 to 0.000025 during the course of the training. For training JORNet, we used the ground truth (u, v) and z of the hand root to create the normalized crop input. To improve robustness, we also add uniform noise (∈ [−25, 25] mm) to the backprojected 3D root position in the SynthHands dataset. We trained HALNet for 45,000 iterations and JORNet for 60,000 iterations. The final networks were chosen as the ones with the lowest loss values. The layers in our networks that are similar to ResNet50 are initialized with weights of the original ResNet50 architecture trained on ImageNet [28]. For the other layers, we initialize the weights randomly. For details of the loss weights used and the taper scheme, please see the supplementary document. 5. Hand Pose Optimization The estimated per-frame global 3D joint positions pG are not guaranteed to be temporally smooth nor do they have consistent inter-joint distances (i.e., bone lengths) over time. We mitigate this by fitting a kinematic skeleton parameterized by joint angles Θ, shown in Figure 3b, to the regressed 3D joint positions. Additionally, we refine the fitting by leveraging the 2D heatmap output from JORNet as an additional contraint and regularize it using joint limit and smoothness constraints. In particular, we seek to minimize E(Θ) = Edata (Θ, pG , H) + Ereg (Θ), (4) where Edata is the data term that incorporates both the 3D positions and 2D heatmaps Edata (Θ, pG , H) = wp3 Epos3D (Θ, pG ) + wp2 Epos2D (Θ, H). (5) The first term Epos3D minimizes the 3D distance between each predicted joint location pG j and its corresponding position M(Θ)j in the kinematic skeleton set to pose Θ Epos3D (Θ) = J X j=1 2 ||M(Θ)j − pG j ||2 . (6) The second data term, Epos2D , minimizes the 2D distance between each joint heatmap maximum φ(Hj ) and the projected 2D location of the corresponding joint in the kinematic skeleton Epos2D (Θ) = J X ||π(M(Θ)j ) − φ(Hj ))||22 , (7) j=1 where π projects the joint onto the image plane. We empirically tuned the weights for the different terms as: wp3 = 0.01 and wp2 = 5 × 10−7 . We regularize the data terms by enforcing joint limits and temporal smoothness constraints Ereg (Θ) = wl Elim (Θ) + wt Etemp (Θ) (8) where  0 X  Elim (Θ) = (θi − θil )2  θi ∈Θ (θ u − θ )2 i i , if θil ≤ θi ≤ θiu , if θi < θil , if θi > θiu (9) is a soft prior to enforce biomechanical pose plausibility, with Θl , Θu being the lower and upper joint angle limits, respectively, and Etemp (Θ) = ||∇Θ − ∇Θ(t−1) ||22 (10) enforces constant velocity to prevent dramatic pose changes. We empirically chose weights for the regularizers as: wl = 0.03 and wt = 10−3 . We optimize our objective using 20 iterations of conditioned gradient descent. 6. Results and Evaluation We conducted several experiments to evaluate our method and different components of it. To facilitate evaluation, we captured a new benchmark dataset EgoDexter consisting of 3190 frames of natural hand interactions with objects in real cluttered scenes, moving egocentric viewpoints, complex hand-object interactions, and natural lighting. Of these, we manually annotated 1485 frames using an annotation tool to mark 2D and 3D fingertip positions, a common approach used in free hand tracking [1, 33]. In total we gathered 4 sequences (Rotunda, Desk, Kitchen, Fruits) featuring 4 different users (2 female), skin color variation, background variation, different objects, and camera motion. Note that the objects in EgoDexter are distinct from the objects in the SynthHands training data to show the ability of our approach to generalize. In addition, to enable evaluation of the different components of our method, we also held out a test set consisting of 5120 fully annotated frames from the SynthHands dataset. Component Evaluation: We first analyze the performance of HALNet and JORNet on the synthetic test set. The main Figure 6: Comparison of 2D (left) and 3D (right) error of the joint position estimates of JORNet. JORNet was initialized with either the ground truth (GT, blue) or with the proposed hand localization step (HL, orange). We observe that HL initialization does not substantially reduce the performance of JORNet. As expected, fingertips-only errors (dashed lines) are higher than the errors for all joints. goal of HALNet is to accurately localize the 2D position of the root (which either lies on the hand or on an occluder in front) accurately. We thus use 2D Euclidean pixel error between the ground truth root position and the predicted position as the evaluation metric. On average, HALNet produces an error of 2.2 px with a standard deviation of 1.5 px on the test set. This low average error ensures that we always obtain reliable crops for JORNet. To evaluate JORNet, we use the 3D Euclidean distance between ground truth joint positions (of all hand joints) and the predicted position as the error metric. For comparison, we also report the errors for only the 3D fingertip positions which are a stricter measure of performance. Since the output of JORNet is dependent on the crop estimated in the hand localization step, we evaluate two conditions: (1) using ground truth crops, (2) using crops from the hand localization step. This helps evaluate how hand localization affects the final joint positions. Figure 6 shows the percentage of the test set that produces a certain 2D or 3D error for all joints and fingertips only. For 3D error, we see that using ground truth (GT) crops is better than using the crops from the hand localization (HL). The difference is not substantial which shows that the hand localization step does not lead to catastrophic failures of JORNet. For 2D error, however, we observe that JORNet initialized with HL results in marginally better accuracy. We hypothesize that this is because JORNet is trained on noisy root positions (Section 4.4) while the ground truth lacks any such noise. CNN Structure Evaluation: We now show that, on our real annotated benchmark EgoDexter, our approach that uses two subsequently applied CNNs is better than a single CNN to directly regress joint positions in cluttered scenes. We trained a CNN with the same architecture as JORNet but with the task of directly regressing 3D joint positions from full frame RGB-D images which often have large occlusions and scene clutter. In Figure 7, we show the 3D Figure 7: Comparison of our two-step RGB-D CNN architecture, the corresponding depth-only version and a single combined CNN which is trained to directly regress global 3D pose. Our proposed approach achieves the best performance on the real test sequences. Figure 8: Ablative analysis of the proposed kinematic pose tracking on our real annotated dataset EgoDexter (average fingertip error). Using only the 2D fitting energy leads to catastrophic tracking failure on all sequences. The version restricted to the 3D fitting term achieves a similar error as the raw 3D predictions while it ensures biomechanical plausibility and temporal smoothness. Our full formulation that combines 2D as well as 3D terms yields the lowest error. fingertip error plot for this CNN (single RGB-D) which is worse that our two-step approach. This shows that learning to directly regress 3D pose in cluttered scenes with occlusion is a harder task, which our approach simplifies by breaking it into two steps. Input Data Evaluation: We next show, on our EgoDexter dataset, that using both RGB and depth input (RGB-D) is superior to using only depth, even when using both our CNNs. Figure 7 compares the 3D fingertip error of a variant of our two-step approach trained with only depth data. We hypothesize that additional color cues help our approach perform significantly better. Gain of Kinematic Model: Figure 8 shows an ablative analysis of our energy terms as well as the effect of kinematic pose tracking on the final pose estimate. Because we Rotunda Desk Fruits Kitchen Figure 9: Qualitative results on our real annotated test sequences from the EgoDexter benchmark dataset. The results overlayed on the input images and the corresponding 3D view from a virtual viewpoint (bottom row) show that our approach is able to handle complex object interactions, strong self-occlusions and a variety of users and backgrounds. enforce joint angle limits, temporal smoothness, and consistent bone lengths, our combined approach produces the lowest average error of 32.6 mm. We were unable to quantitatively evaluate on the only other existing egocentric hand dataset [25] due to a different sensor unsupported by our approach. To aid qualitative comparison, we include similar reenacted scenes, background clutter, and hand motion in the supplemental document and video. Qualitative Results: Figure 9 shows qualitative results from our approach which works well for challenging real world scenes with clutter, hand-object interactions, and different hand shapes. We also show that a commercial solution (LeapMotion Orion) does not work well under severe occlusions caused by objects, see Figure 10 right. We refer to the supplemental document for results on how existing third person methods fail on EgoDexter and how our approach in fact generalizes to third person views. Runtime Performance: Our entire method runs in realtime on an Intel Xeon E5-2637 CPU (3.5 GHz) with an Nvidia Titan X (Pascal). Hand localization takes 11 ms, 3D joint regression takes 6 ms, and kinematic pose tracking takes 1 ms. Limitations: Our method works well even in challenging egocentric viewpoints and notable occlusions. However, there are some failure cases which are shown in Figure 10. Please see the supplemental document for a more detailed discussion of failure cases. We used large amounts of synthetic data for training our CNNs and simulated sensor noise for a specific camera preventing generalization. In the future, we would like to explore the application of deep domain adaptation [3] which offers a way to jointly make use of labeled synthetic data together with unlabeled or partially labeled real data. Figure 10: Fast motion that leads to misalignment in the colored depth image or failures in the hand localization step can lead to incorrect predictions (left two columns). LeapMotion Orion fails under large occlusions (right). 7. Conclusion We have presented a method for hand pose estimation in challenging first-person viewpoints with large occlusions and scene clutter. Our method uses two CNNs to localize and estimate, in real time, the 3D joint locations of the hand. A pose tracking energy further refines the pose by estimating the joint angles of a kinematic skeleton for temporal smoothness. To train the CNNs, we presented SynthHands, a new photorealistic dataset that uses a merged reality approach to capture natural hand interactions, hand shape, size and color variations, object occlusions, and background variations from egocentric viewpoints. We also introduce a new benchmark dataset EgoDexter that contains annotated sequences of challenging cluttered scenes as seen from egocentric viewpoints. Quantitative and qualitative evaluation shows that our approach is capable of achieving low errors and consistent performance even under difficult occlusions, scene clutter, and background changes. Acknowledgements: This work was supported by the ERC Starting Grant CapReal (335545). Dan Casas was supported by a Marie Curie Individual Fellow, grant 707326. Appendix This appendix includes additional experiments (Section A), details about our new synthetic dataset SynthHands (Section B), and information about our custom CNN architecture and training procedure (Section C). We also refer to our supplemental video1 for more visual results. A. Evaluation In this section, we show additional experiments and comparisons of our method. Improvement by Combining 2D and 3D Predictions: Figure 13 qualitative depicts the predicted joints by each of the key components of our pipeline — 2D predictions, 3D predictions, and final tracked skeleton — on the test sequence Fruits. Note that the modes of failure for the 2D and 3D predictions are different which leads to accurate skeleton tracking even if one kind of prediction is incorrect. Thus, the combination of 2D and 3D predictions with the tracking framework consistently produces the best results. Comparisons to the State of the Art: We were unable to quantitatively evaluate on the only other existing egocentric hand dataset [25] due to a different sensor currently unsupported by our approach. Using our method with the Senz3D camera requires adaptation of intrinsic camera parameters and noise characteristics for training. However, to provide a visual comparison to evaluate our method, we recorded sequences that mimic sequences used by Rogez et al. [25], and show qualitative evaluation in Figure 14 and in the supplementary video. Our method achieves significantly more accurate hand tracking, while running in real time. To show the completely different nature of our problem which cannot be solved by employing state-of-the-art methods for hand tracking in free air, we applied the method of Sridhar et al. [31] to our real test sequences from EgoDexter. Figure 16 demonstrates catastrophic failures of the aforementioned approach. On the other hand, Figure 15 and the supplemental video show how our method successfully tracks sequences mimicked from the work of Sridhar et al. We achieve comparable results, with improved stability of the hand root position. Performance on 3rd-Person Viewpoint: Even though the machine learning components of our method were only trained on our egocentric dataset SynthHands, Figure 17 demonstrates the generalizability to 3rd-person views. Note that the hand localization step is robust to other skin-colored parts, like faces, in the input. Analysis of Failure Cases: Despite the demonstrated success of our approach, we still suffer from limitations that produce erroneous tracking results. Figure 18 depicts the results from several intermediate steps of our method in case 1 http://handtracker.mpi-inf.mpg.de/projects/OccludedHands/ of failure. In particular, we show errors due to extreme self occlusions, severe hand and object occlusions, and when the hand is located out of the camera field of view. B. SynthHands Dataset Table 1 shows the modes of variation in the SynthHands dataset. Representative frames are shown in Figure 12. C. CNN Architecture and Training In this section, we explain the network architecture used for HALNet and JORNet and provide training details. Furthermore, we present experiments which lead to our specific design decisions. C.1. Network Design The ResNet[7] architecture has been successfully used for full body pose estimation in previous work [16]. While ResNet50 offers a good tradeoff between speed and accuracy, hand motion is fast and exhibits rapid directional changes. Further, the egocentric camera placement leads to even faster relative motion in the scene. Therefore, we experimented based on recent investigations into the nature of representations learned by ResNets [5] to get a faster architecture without significantly affecting the accuracy. Core Architecture: Starting from ResNet50, we remove a residual block from level 3, and keep only 4 residual blocks at level 4. Level 5 is replaced with two 3 × 3 convolution layers with 512 (conv4e) and 256 (conv4f) features and no striding. Both of these layers also use batch normalization [9]. From conv4f, A 3 × 3 convolutional stub followed by bilinear upsampling produces the joint location heatmaps, and a fully-connected layer with 200 nodes followed by anTable 1: SynthHands Details Mode of Variation Pose Wrist+Arm Rotation Shape Skin Color Camera Viewpoints Object Shapes Object Textures Background Clutter Amount of Variation 63,530 frames of real hand motion, sampled every 5th frame wrist: sampled from 70 deg. range arm: sampled from a 180 deg. range x, y, z scale sampled uniformly in [0.8, 1.2]; female + male mesh 2 x 6 hand textures (female/male) 5 egocentric viewpoints 7 objects 145 textures 10,000 real images, uniform random u,v offset in [-100, 100] other fully-connected layer predict the joint location vector. See Figure 19 for details. Average 3D Error (mm) 50 C.2. Training Details JORNet JORNet light 40 30 20 10 0 Wrist Thumb Index Middle Ring tips in 3D on the SynthHands test set. The full JORNet version yields a significant increase in performance compared to JORNet light which was only trained for wrist and fingertips. Little Figure 11: Training JORNet to regress heatmaps and local joint positions for all joints instead of only for fingertips and the wrist (JORNet light) reduces the error on the SynthHands test set. The resulting architecture needs 10 ms for a forward pass at resolution 320 x 240 (HALNet) and 6 ms at resolution 128 x 128 (JORNET) on a Nvidia Pascal Titan X GPU. This is a significant speed-up compared to the ResNet50 version which needs 18 ms and 11 ms, respectively. Evaluation on the SynthHands test set shows that the drop in accuracy is only marginal. ResNet50 trained on the hand localization task achieves 2.1 px average error whereas HALNet achieves 2.2 px. Intermediate Supervision: For HALNet and JORNet, we treat a subset of the feature maps at each of res3a, res4a and conv4e in the networks as the predicted heatmaps, for intermediate supervision [15]. For JORNet, we additionally use the feature maps at the aforementioned stages to predict joint positions for intermediate supervision (see Figure 19). Auxiliary Task in HALNet: Predicting heatmaps for all joints as auxiliary task helps HALNet to learn the structure of the hand. This leads to a better performance compared to a version only trained to regress the root heatmap. On the SynthHands test set, regressing heatmaps for all joints instead of only for the root improves the 2D pixel error by 6.4% (from 2.35 px to 2.2 px). Regressing All Joints in JORNet: Although fingertips and wrist location alone provide a strong constraint for the pose of the hand, training JORNet to regress the heatmaps and local 3D positions for all joints improves the accuracy. Figure 11 shows the average error for the wrist and all finger- We use the Caffe [11] framework for training our networks, using the AdaDelta scheme with momentum set to 0.9 and weight decay to 0.005. Both networks are trained with an input batch size of 16. For HALNet, we use a base learning rate of 0.05 and train for 45k iterations. The input has a spatial resolution of 320x240 px, and the output heatmaps have a resolution of 40x30 px. The main heatmap loss has a loss weight of 1.0, and all intermediate heatmap losses have loss weights of 0.5. For JORNet, the input has a spatial resolution of 128x128 px. We train with a base learning rate of 0.05, with main heatmap loss weight set at 1.0 and joint position loss weight at 2500. The intermediate heatmap losses have their loss weights set to 0.5 and intermediate joint position loss weights set to 1250. After 45k iterations, the base learning rate is lowered to 0.01, the intermediate heatmap loss weights lowered to 0.1 and the intermediate joint position loss weights lowered to 250, and trained for a further 15k iterations. Figure 12: An example set of random samples taken from our SynthHands dataset. See Table 1 for description of dataset variability. Figure 13: 2D predictions (top row), 3D predictions (middle row) and tracked skeleton (bottom row) on our real annotated sequence Fruits. The combination of 2D and 3D predictions in the tracking framework leads to better results than either of the predictions in isolation. (a) Pinch sponge (b) Grab Knife (c) Reach cupboard (d) Grab bottle (e) Write in notebook (f) Open book Figure 14: Qualitative evaluation of our results (top) and Rogez et al. [25] (bottom). We mimic the motions originally used by [25] because, due to sensor differences (i.e. lens intrinsics, etc.), we cannot directly run our trained CNNs on their data. Figure 15: Qualitative evaluation of our results (top) and Sridhar et al. [31] (bottom). Figure 16: Qualitative results produced by the approach of Sridhar et al. [31] on our benchmark dataset EgoDexter. The close proximity of the arm to the camera and the interaction with objects and the environment leads to catastrophic failures. Figure 17: Despite of being trained for egocentric views, our approach in fact generalizes to 3rd-person views. In addition, it is robust to the presence of other skin-colored body parts. Figure 18: The failure cases of our method can be caused by different intermediate steps. The first two columns show the output from HALNet, a heatmap and its maximum location with corresponding confidence. Note that the root stabilization step improved the location in the last row (from green to red) but did not succeed. The third, fourth and fifth column shows 2D predictions, 3D predictions, and the tracked kinematic skeleton, respectively. conv4e conv4f 3, 1, 512 3, 1, 256 256, 1024 res4d 256, 1024 res4c res3c 128, 512 2, 256, 1024 res4a res3b 128, 512 res2c 64, 256 res3a res2b 64, 256 2, 128, 512 res2a 1, 64, 256 3, 2 conv1 7, 1, 64 256, 1024 res4b interm. loss interm. loss interm. loss main loss Residual block (identity skip) Convolution block, with ReLU Residual block (convolution) MAX pooling layer (kernel size, stride) Scale BatchNorm k, s, f k, s, f EuclideanLoss InnerProduct (3 x #joints) Deconvolution layer (kernel size, stride, number of feature maps), fixed to bilinear weights Figure 19: Our network architecture. EuclideanLoss InnerProduct (3 x #joints) InnerProduct (200) EuclideanLoss JORNet – Main loss (joint positions + heatmaps) 4, 2, #heatmaps EuclideanLoss 4, 2, #heatmaps Eltwise SUM ReLU 1, s, f2 JORNet – Intermediate joint position loss 3, 1, 64 EuclideanLoss k, s, #heatmaps Slice (#heatmaps) 3, 1, #heatmaps = Convolution layer (kernel size, stride, number of feature maps) Residual block (convolution) HALNet / JORNet – Intermediate heatmap loss HALNet – Main loss (heatmaps) 1, 1, f2 3, 1, f1 ReLU 1, s, f1 ReLU = 4, 2, #heatmaps Residual block (identity skip) s, f1, f2 1, 1, f2 3, 1, f1 ReLU = Eltwise SUM ReLU f1, f2 1, 1, f1 ReLU Convolution block Deconvolution layer (kernel size, stride, number of feature maps) References [1] L. Ballan, A. Taneja, J. Gall, L. V. Gool, and M. Pollefeys. Motion Capture of Hands in Action using Discriminative Salient Points. In European Conference on Computer Vision (ECCV), 2012. 2, 6 [2] A. Canziani, A. Paszke, and E. Culurciello. An analysis of deep neural network models for practical applications. arXiv preprint arXiv:1605.07678, 2016. 4 [3] Y. Ganin and V. Lempitsky. Unsupervised domain adaptation by backpropagation. arXiv preprint arXiv:1409.7495, 2014. 8 [4] L. Ge, H. Liang, J. Yuan, and D. Thalmann. Robust 3D Hand Pose Estimation in Single Depth Images: from Single-View CNN to Multi-View CNNs. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 1, 2 [5] K. Greff, R. K. Srivastava, and J. Schmidhuber. Highway and residual networks learn unrolled iterative estimation. In International Conference on Learning Representations, 2016. 9 [6] H. Hamer, K. Schindler, E. Koller-Meier, and L. Van Gool. Tracking a hand manipulating an object. In Computer Vision, 2009 IEEE 12th International Conference On, pages 1475– 1482. IEEE, 2009. 2 [7] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. 4, 9 [8] IntelRealSenseSR300. https://click.intel.com/ realsense.html, 2016. 3 [9] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International Conference on Machine Learning, 2015. 9 [10] Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, and T. Darrell. Caffe: Convolutional architecture for fast feature embedding. arXiv preprint arXiv:1408.5093, 2014. 6 [11] Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, and T. Darrell. Caffe: Convolutional architecture for fast feature embedding. In Proceedings of the 22nd ACM International Conference on Multimedia, pages 675–678, 2014. 10 [12] C. Keskin, F. Kra,̧ Y. E. Kara, and L. Akarun. Real time hand pose estimation using depth sensors. In IEEE International Conference on Computer Vision Workshops (ICCVW), pages 1228–1234, 2011. 2 [13] N. Kyriazis and A. Argyros. Scalable 3d tracking of multiple interacting objects. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3430–3437, 2014. 2 [14] LeapMotion. https://developer.leapmotion. com/orion, 2016. 2, 6 [15] C.-Y. Lee, S. Xie, P. Gallagher, Z. Zhang, and Z. Tu. Deeplysupervised nets. In AISTATS, volume 2, page 6, 2015. 10 [16] D. Mehta, H. Rhodin, D. Casas, O. Sotnychenko, W. Xu, and C. Theobalt. Monocular 3d human pose estimation using transfer learning and improved CNN supervision. arXiv preprint arXiv:1611.09813v2, 2016. 9 [17] M. Oberweger, G. Riegler, P. Wohlhart, and V. Lepetit. Efficiently Creating 3D Training Data for Fine Hand Pose Estimation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 1, 4 [18] M. Oberweger, P. Wohlhart, and V. Lepetit. Training a feedback loop for hand pose estimation. In IEEE International Conference on Computer Vision (ICCV), pages 3316–3324, 2015. 1, 2 [19] I. Oikonomidis, N. Kyriazis, and A. A. Argyros. Efficient model-based 3d tracking of hand articulations using kinect. In BmVC, volume 1, page 3, 2011. 2 [20] I. Oikonomidis, N. Kyriazis, and A. A. Argyros. Full dof tracking of a hand interacting with an object by modeling occlusions and physical constraints. In Computer Vision (ICCV), 2011 IEEE International Conference on, pages 2088–2095. IEEE, 2011. 2 [21] P. Panteleris, N. Kyriazis, and A. A. Argyros. 3d tracking of human hands in interaction with unknown objects. In BMVC, pages 123–1, 2015. 2 [22] C. Qian, X. Sun, Y. Wei, X. Tang, and J. Sun. Realtime and Robust Hand Tracking from Depth. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1106–1113, 2014. 1, 2, 3 [23] H. Rhodin, C. Richardt, D. Casas, E. Insafutdinov, M. Shafiei, H.-P. Seidel, B. Schiele, and C. Theobalt. Egocap: egocentric marker-less motion capture with two fisheye cameras. ACM Transactions on Graphics (TOG), 35(6):162, 2016. 2 [24] G. Rogez, M. Khademi, J. Supančič III, J. M. M. Montiel, and D. Ramanan. 3D hand pose detection in egocentric RGB-D images. In Workshop at the European Conference on Computer Vision, pages 356–371. Springer, 2014. 2, 4 [25] G. Rogez, J. S. Supancic, and D. Ramanan. First-person pose recognition using egocentric workspaces. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 4325–4333, 2015. 2, 4, 5, 8, 9, 12 [26] M. Rohrbach, S. Amin, M. Andriluka, and B. Schiele. A database for fine grained activity detection of cooking activities. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1194–1201, 2012. 1 [27] J. Romero, H. Kjellström, and D. Kragic. Hands in action: real-time 3D reconstruction of hands in interaction with objects. In IEEE International Conference on Robotics and Automation (ICRA), pages 458–463, 2010. 2 [28] O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma, Z. Huang, A. Karpathy, A. Khosla, M. Bernstein, A. C. Berg, and L. Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJCV), 115(3):211–252, 2015. 6 [29] A. Sinha, C. Choi, and K. Ramani. Deephand: robust hand pose estimation by completing a matrix imputed with deep features. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 4150–4158, 2016. 1, 2 [30] S. Sridhar, A. M. Feit, C. Theobalt, and A. Oulasvirta. Investigating the dexterity of multi-finger input for mid-air text entry. In ACM Conference on Human Factors in Computing Systems, pages 3643–3652, 2015. 1 [31] S. Sridhar, F. Mueller, A. Oulasvirta, and C. Theobalt. Fast and Robust Hand Tracking Using Detection-Guided Optimization. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2015. 1, 2, 3, 5, 9, 12 [32] S. Sridhar, F. Mueller, M. Zollhoefer, D. Casas, A. Oulasvirta, and C. Theobalt. Real-time Joint Tracking of a Hand Manipulating an Object from RGB-D Input. In European Conference on Computer Vision (ECCV), 2016. 2, 3 [33] S. Sridhar, A. Oulasvirta, and C. Theobalt. Interactive markerless articulated hand motion tracking using RGB and depth data. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2456–2463, 2013. 2, 6 [34] X. Sun, Y. Wei, S. Liang, X. Tang, and J. Sun. Cascaded hand pose regression. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 824–832, 2015. 2 [35] A. Tagliasacchi, M. Schroeder, A. Tkach, S. Bouaziz, M. Botsch, and M. Pauly. Robust Articulated-ICP for RealTime Hand Tracking. Computer Graphics Forum (Symposium on Geometry Processing), 34(5), 2015. 1, 2 [36] D. Tang, H. Jin Chang, A. Tejani, and T.-K. Kim. Latent regression forest: Structured estimation of 3d articulated hand posture. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3786– 3793, 2014. 2 [37] D. Tang, J. Taylor, P. Kohli, C. Keskin, T.-K. Kim, and J. Shotton. Opening the black box: Hierarchical sampling optimization for estimating human hand pose. In Proc. ICCV, 2015. 2 [38] J. Taylor, L. Bordeaux, T. Cashman, B. Corish, C. Keskin, T. Sharp, E. Soto, D. Sweeney, J. Valentin, B. Luff, et al. Efficient and precise interactive hand tracking through joint, continuous optimization of pose and correspondences. ACM Transactions on Graphics (TOG), 35(4):143, 2016. 1, 2, 3 [39] J. Tompson, M. Stein, Y. Lecun, and K. Perlin. Real-time continuous pose recovery of human hands using convolutional networks. ACM Transactions on Graphics, 33, August 2014. 1, 2 [40] D. Tzionas, L. Ballan, A. Srikantha, P. Aponte, M. Pollefeys, and J. Gall. Capturing hands in action using discriminative salient points and physics simulation. International Journal of Computer Vision (IJCV), 2016. 2 [41] D. Tzionas and J. Gall. 3d object reconstruction from handobject interactions. In Proceedings of the IEEE International Conference on Computer Vision, pages 729–737, 2015. 2 [42] C. Wan, T. Probst, L. Van Gool, and A. Yao. Crossing nets: Dual generative models with a shared latent space for hand pose estimation. arXiv preprint arXiv:1702.03431, 2017. 1 [43] C. Wan, A. Yao, and L. Van Gool. Hand pose estimation from local surface normals. In European Conference on Computer Vision, pages 554–569. Springer, 2016. 2 [44] R. Wang, S. Paris, and J. Popović. 6d hands: markerless hand-tracking for computer aided design. In Proc. of UIST, pages 549–558. ACM, 2011. 2 [45] C. Xu and L. Cheng. Efficient hand pose estimation from a single depth image. In Proceedings of the IEEE International Conference on Computer Vision, pages 3456–3462, 2013. 2 [46] Q. Ye, S. Yuan, and T.-K. Kim. Spatial attention deep net with partial pso for hierarchical hybrid hand pose estimation. In European Conference on Computer Vision (ECCV), pages 346–361. Springer, 2016. 2 [47] W. Zhao, J. Zhang, J. Min, and J. Chai. Robust realtime physics-based motion control for human grasping. ACM Transactions on Graphics (TOG), 32(6):207, 2013. 1 [48] X. Zhou, Q. Wan, W. Zhang, X. Xue, and Y. Wei. Modelbased deep hand pose estimation. In IJCAI, 2016. 2
1cs.CV
arXiv:1012.3010v2 [math.AC] 28 Nov 2013 HOMOLOGICAL ALGEBRA MODULO EXACT ZERO-DIVISORS PETTER ANDREAS BERGH, OLGUR CELIKBAS AND DAVID A. JORGENSEN Abstract. We study the homological behavior of modules over local rings modulo exact zero-divisors. We obtain new results which are in some sense “opposite” to those known for modules over local rings modulo regular elements. 1. Introduction Given a local (meaning also commutative and Noetherian) ring S and an ideal I, one may ask whether the homological behavior of modules over S/I is related to that over S. In general this is hopeless; one needs to restrict the ideal I. When I is generated by a regular sequence, there is a well-developed and powerful theory relating the homological properties of modules over these two rings (see for instance [Av1], [AvBu], [Be], [Dao1], [Eis], [Gu1], [Jo1], and [Jo2]). For example, suppose that the ideal I is generated by a single regular element x ∈ S, denote the factor ring S/(x) by R, and let M and N be R-modules. Then a primary result is that R R TorR 1 (M, N ) = Tor2 (M, N ) = · · · = Torn (M, N ) = 0 for some n ≥ 2, implies TorS2 (M, N ) = · · · = TorSn (M, N ) = 0. In other words, vanishing of homology over R implies the vanishing of homology over S. An analogous statement for cohomology also holds. Another primary result compares the complexity of a finitely generated R-module with its complexity as an S-module (see Section 3 for the definition of complexity). Namely there are inequalities [Av1, 3.2(3)]: cxS (M ) ≤ cxR (M ) ≤ cxS (M ) + 1. In this paper we study the case where the element x ∈ S is in some sense the “next best thing” to being a regular element. More precisely, we consider the case where the annihilator of x is a nonzero principal ideal whose annihilator is also principal (and therefore is the ideal (x)). Following [HeŞ], the element x is said to be an exact zero-divisor if it is nonzero, belongs to the maximal ideal of S, and there exists another element y ∈ S such that annS (x) = (y) and annS (y) = (x). In this case we say that (x, y) is a pair of exact zero-divisors of S. The ideal (x) is then an example of a quasi-complete intersection ideal, a notion introduced in [AHŞ]. In that same paper results relating certain invariants of modules over S with those over S/(x) are proved. We continue along similar, but more homological lines, and show that even if the element x is the next best thing to being regular, namely an Date: March 13, 2018. 2000 Mathematics Subject Classification. 13D03. Key words and phrases. Exact zero divisors, (co)homology, complexity. 1 2 PETTER ANDREAS BERGH, OLGUR CELIKBAS AND DAVID A. JORGENSEN exact zero-divisor, then the homological relationships between S/(x)-modules over S/(x) and over S change dramatically compared to the case where x is regular. Two of our main results in Section 2 concern the vanishing of (co)homology. In particular the result for homology takes the following form: Theorem. Let R = S/(x) where S is a local ring and (x, y) is a pair of exact zero-divisors in S. Furthermore, let M and N be R-modules such that yN = 0. If there exists an integer n ≥ 2 such that TorR i (M, N ) = 0 for 1 ≤ i ≤ n, then TorSi (M, N ) ∼ = M ⊗S N for 1 ≤ i ≤ n − 1. Compared to the vanishing result for the case where x is regular, the conclusion of the previous theorem is opposite in the sense that it is a non-vanishing result: vanishing of homology over R implies the non-vanishing of homology over S (when the modules involved are nonzero and finitely generated.) For cohomology, we obtain the following analogue: Theorem. Let R = S/(x) where S is a local ring and (x, y) is a pair of exact zero-divisors in S. Furthermore, let M and N be R-modules such that yN = 0. If there exists an integer n ≥ 2 such that ExtiR (M, N ) = 0 for 1 ≤ i ≤ n, then ExtiS (M, N ) ∼ = HomS (M, N ) for 1 ≤ i ≤ n − 1. We also compare the complexities of finitely generated modules over R and over S. Similar to our previous results, we show that such a comparison is quite different from the case where x is regular. The following theorem is the main result of section 3. Theorem. Let R = S/(x) where S is a local ring and x is an exact zero-divisor in S. If M is a finitely generated R-module, then for any n there are inequalities βnR (M ) − n−2 X βiR (M ) ≤ βnS (M ) ≤ n X βiR (M ) i=0 i=0 of Betti numbers. In particular, the inequality cxS (M ) ≤ cxR (M ) + 1 holds. In the final section, Section 4, we discuss canonical endomorphisms of complexes of finitely generated free R-modules, and canonical elements of Ext2R (M, M ), for finitely generated R-modules M , in the case where R = S/(x) and (x, x) is a pair of exact zero-divisors of S. The main result, Theorem 4.2, equates the ability to lift a finitely generated R-module M from R to S to the triviality of the canonical element in Ext2R (M, M ). This generalizes classical results (see, for example, [ADS]) on lifting modules from T /(x) to T /(x2 ) in the case where x is a non-zero-divisor of the local ring T (cf. Example 4.3 below). 2. Vanishing results In this section we prove our vanishing results, starting with the homology version. We fix a local ring S, a pair of exact zero-divisors (x, y), and denote the local ring S/(x) by R. It should be mentioned that the modules we consider in this section are not necessarily assumed to be finitely generated. Since a (deleted) free resolution of R over S has the form y x y x ··· → S − →S− →S− →S− →S→0 HOMOLOGICAL ALGEBRA MODULO EXACT ZERO-DIVISORS 3 one has for any R-module N the following  for q = 0  N N/yN for q > 0 odd (†) TorSq (R, N ) ∼ =  annN (y) for q > 0 even and (‡)  for q = 0  N annN (y) for q > 0 odd ExtqS (R, N ) ∼ =  N/yN for q > 0 even Our main theorem on the vanishing of homology is the following. Theorem 2.1. Let R = S/(x) where S is a local ring and (x, y) is a pair of exact zero-divisors in S. Furthermore, let M and N be R-modules. If there exists an R R integer n ≥ 2 such that TorR i (M, N ) = Tori (M, N/yN ) = Tori (M, annN (y)) = 0 for 1 ≤ i ≤ n, then  for i = 0  M ⊗S N M ⊗S N/yN for 0 < i < n and i odd TorSi (M, N ) ∼ =  M ⊗S annN (y) for 0 < i < n and i even. Proof. Consider the first quadrant change of rings spectral sequence [Rot, Theorem 10.73]  S S TorR p M, Torq (R, N ) =⇒ Torp+q (M, N ). p From (†), the term 2 Ep,q 2 Ep,q is given by  R for q = 0  Torp (M, N ) R ∼ Torp (M, N/yN ) for q > 0 odd =  TorR p (M, annN (y)) for q > 0 even. The vanishing assumptions imply that columns 1 through n of the E 2 -page of this 2 spectral sequence vanish, i.e., Ep,q = 0 for all q ∈ Z and 1 ≤ p ≤ n. Fixing ∞ 2 such p and q, we see that Ep,q also vanishes since this term is a subquotient of Ep,q . S j Letting Hi denote Tori (M, N ) for all i, we have a filtration {Φ Hi } of Hi satisfying 0 = Φ−1 Hi ⊆ Φ0 Hi ⊆ · · · ⊆ Φi−1 Hi ⊆ Φi Hi = Hi , ∞ ∼ Φj Hi /Φj−1 Hi for all i and j. Thus the vanishing of E ∞ implies that with Ej,i−j = p,q Φp Hp+q = Φp−1 Hp+q , that is, Φp Hq = Φp−1 Hq for all q ∈ Z and 1 ≤ p ≤ n. 2 Now consider the zeroth column of the E 2 -page. For a positive q, the E0,q -term is isomorphic to M ⊗R N/yN when q is odd, and isomorphic to M ⊗R annN (y) 2 when q is even. Since Ep,q = 0 for all q ∈ Z and 1 ≤ p ≤ n, there is an isomorphism 2 ∞ ∼ E0,q = E0,q for q ≤ n − 1, giving  for q = 0  M ⊗S N ∞ ∼ M ⊗ N/yN for 0 < q < n and q odd E0,q = R  M ⊗R annN (y) for 0 < q < n and q even. But it follows from above that the equalities ∞ ∼ 0 E0,q = Φ H q = Φ 1 Hq = · · · = Φ q H q hold when q < n. Therefore, since Φq Hq = TorSq (M, N ), we are done.  4 PETTER ANDREAS BERGH, OLGUR CELIKBAS AND DAVID A. JORGENSEN As an immediate corollary we obtain the result, for the vanishing of homology, stated in the introduction. Corollary 2.2. Let R = S/(x) where S is a local ring and (x, y) is a pair of exact zero-divisors in S. Furthermore, let M and N be R-modules such that yN = 0. If there exists an integer n ≥ 2 such that TorR i (M, N ) = 0 for 1 ≤ i ≤ n, then TorSi (M, N ) ∼ = M ⊗S N for 0 ≤ i ≤ n − 1. Consequently, if M and N are nonzero and finitely generated, then TorSi (M, N ) 6= 0 for 0 ≤ i ≤ n − 1. Thus when the modules involved are finitely generated and nonzero, the corollary shows that the vanishing of homology over R implies the non-vanishing of homology over S. This is in stark contrast to the case when x is a regular element. In certain cases we can show that the Tors over S cannot vanish irrespective of vanishing of the Tors over R. Proposition 2.3. Let R = S/(x) where S is a local ring and (x, y) is a pair of exact zero-divisors, both of which are minimal generators of the maximal ideal of S. Furthermore, let M and N be nonzero finitely generated R-modules such that yN = 0. Then TorSi (M, N ) 6= 0 for all i ≥ 0. Proof. Consider a minimal free resolution of M over S: ∂ ∂ 1 2 F0 → 0 F1 −→ F : · · · → F2 −→ Letting m denote a minimal generator of M , we can define the homomorphism f : S/(x) → M sending 1̄ to m. Because x and y are minimal generators of the maximal ideal of S, we can lift this homomorphism to a chain map y ··· /S ···  / F2 x /S f2 /S f1 ∂2  / F1 / S/(x) f0 f  /M  / F0 ∂1 /0 /0 in such a way that each fi is a split injection. Tensoring the entire diagram with N we get the commutative diagram ··· /N ···  / F2 ⊗S N 0 f2 ⊗N ∂2 ⊗N 0 /N f1 ⊗N  / F1 ⊗S N ∂1 ⊗N /N f0 ⊗N  / F0 ⊗S N = /N /0 f ⊗N  / M ⊗S N /0 Now let n be a minimal generator of N . Then fi (1) ⊗S n is a minimal generator of Fi ⊗S N , and by commutativity, is in ker(∂i ⊗S N ) for all i ≥ 1. This element is not a boundary, however, since ∂i+1 ⊆ m Fi , and no element in the image of ∂i+1 ⊗S N is a minimal generator of Fi ⊗S N . It follows that TorSi (M, N ) 6= 0 for all i ≥ 0.  We next state the cohomological versions of Theorem 2.1 and Corollary 2.2; they are proved dually. Theorem 2.4. Let R = S/(x) where S is a local ring and (x, y) is a pair of exact zero-divisors in S. Furthermore, let M and N be R-modules. If there exists an HOMOLOGICAL ALGEBRA MODULO EXACT ZERO-DIVISORS 5 integer n ≥ 2 such that ExtiR (M, N ) = ExtiR (M, N/yN ) = ExtiR (M, annN (y)) = 0 for 1 ≤ i ≤ n, then  for i = 0  HomS (M, N ) HomS (M, annN (y)) for 0 < i < n and i odd ExtiS (M, N ) ∼ =  HomS (M, N/yN ) for 0 < i < n and i even Corollary 2.5. Let R = S/(x) where S is a local ring and (x, y) is a pair of exact zero-divisors in S. Furthermore, let M and N be R-modules with yN = 0. If there exists an integer n ≥ 2 such that ExtiR (M, N ) = 0 for 1 ≤ i ≤ n, then ExtiS (M, N ) ∼ = HomS (M, N ) for 0 ≤ i < n. Consequently, if N = M 6= 0, then ExtiS (M, M ) 6= 0 for 0 < i < n. 3. Complexity As in the previous section, we fix a local ring S, a pair of exact zero-divisors (x, y), and denote the local ring S/(x) by R. In this section all modules are assumed to be finitely generated. Our aim is to compare free resolutions of modules over R with those over S and determine relationships involving complexities. Given a local ring A and an A-module M , there exists a (deleted) free resolution of M · · · → F2 → F1 → F0 → 0 which is minimal, that is, it appears as a direct summand of every free resolution of M . The cokernel of the map Fn+1 → Fn is the nth syzygy module of M and denoted by ΩnA (M ). Minimal free resolutions are unique up to isomorphisms and hence the syzygies are uniquely determined up to isomorphism. Moreover, for every nonnegdef ative integer n, the nth Betti number βnA (M ) = rank Fn is a well-defined invariant n of M . It is well-known that dimk ExtA (M, k) = βnA (M ) = dimk TorA n (M, k) for every integer n where k is the residue field of A. It is also clear that the projective dimension of M is finite if and only if the Betti numbers of M eventually vanish. Thus the asymptotic behavior of the Betti sequence β0A (M ), β1A (M ), β2A (M ), . . . determines an important homological property of M . Following ideas from modular representation theory [Alp], an invariant measuring how “fast” the Betti sequence grows was introduced by Avramov in [Av1] (cf. also [Av2]). The complexity of M , denoted by cxA (M ), is defined as def cxA (M ) = inf{t ∈ N ∪ {0} | ∃a ∈ R such that βnA (M ) ≤ ant−1 for all n}, and measures the polynomial rate of growth of the Betti sequence of M . It follows from the definition that M has finite projective dimension if and only if cxA (M ) = 0, whereas cxA (M ) = 1 if and only if the Betti sequence of M is bounded. For an arbitrary local ring, the complexity of a module is not necessarily finite [Av3, 4.2.2]. In fact, by [Gu2, Theorem 2.3], finiteness of complexity for all finitely generated A-modules is equivalent to A being a complete intersection. We now return to our previous setting of exact zero-divisors. We first remark that every nonzero R-module has infinite projective dimension over S, that is, every such module has positive complexity over S. Indeed, (†) from the second paragraph of Section 2 shows that if TorSi (R, M ) = 0 for all i ≫ 0, then M/yM = 0. Thus M = 0 by Nakayama’s Lemma. 6 PETTER ANDREAS BERGH, OLGUR CELIKBAS AND DAVID A. JORGENSEN Over a local ring A, the complexity of a module equals the complexity of any of its syzygies: their minimal free resolutions are the same except at the beginning. Moreover, given a short exact sequence 0 → M1 → M2 → M3 → 0 of A-modules, the inequality (*) cxA (Mu ) ≤ max{cxA (Mv ), cxA (Mw )} holds for {u, v, w} = {1, 2, 3}. This follows simply by comparing the k-vector space dimensions of the Tor modules in the long exact sequence A A A · · · → TorA n (M1 , k) → Torn (M2 , k) → Torn (M3 , k) → Torn−1 (M1 , k) → · · · , where k is the residue field of A. In the next proposition we use the inequality (*) and prove that if M is an R-module with cxS (M ) 6= 1, then cxS (M ) = cxS (ΩnR (M )) for all n. Here the assumption cxS (M ) 6= 1 is necessary: the S-module R has a minimal free resolution y x y x ··· → S − →S− →S− →S− →S→0 and hence has complexity one over S. However its syzygies ΩnR (R) are all zero for n > 0. Proposition 3.1. Let R = S/(x) where S is a local ring and x is an exact zerodivisor in S. Then, for every finitely generated R-module M with cxS (M ) 6= 1, the equality cxS (M ) = cxS (ΩnR (M )) holds for all n. Proof. If cxS (M ) = 0, then M = 0 (see the third paragraph of Section 3.) Thus the result is trivial in this case. Next suppose cxS (M ) > 1. Consider the short exact sequence 0 → Ω1R (M ) → F → M → 0 where F is a free R-module. Since the S-module R has complexity one so does F . Hence the result follows from the inequality (∗) and the short exact sequence considered above.  Next we will compare the Betti numbers and complexities of modules over R with those over S. For that we first set some notations that generalize the notion of the Betti number and the complexity of a module. Let (A, m) be a local ring with residue field k, and M and N be A-modules with the property that M ⊗A N has finite length. Then, for every nonnegative integer n, the length of TorA n (M, N ) is finite. We define this length to be the nth Betti  def A number βn (M, N ) of the pair (M, N ), that is, βnA (M, N ) = ℓ TorA n (M, N ) . The length complexity of the pair (M, N ), denoted by ℓcxA (M, N ), is then defined as: def ℓcxA (M, N ) = inf{t ∈ N ∪ {0} | ∃a ∈ R such that βnA (M, N ) ≤ ant−1 for all n}, cf. [Dao2, the discussion preceding Definition 2.1]. Although letting N = k, we recover the Betti number and the ordinary complexity of M , that is, βnA (M ) = βnA (M, k) and cxA (M ) = ℓcxA (M, k), our definition for ℓcxA (M, N ) of the pair (M, N ) is different than the one originally defined by Avramov and Buchweitz [AvBu], where the minimal number of generators of the cohomology modules ExtnA (M, N ) is used. In general there is no HOMOLOGICAL ALGEBRA MODULO EXACT ZERO-DIVISORS 7 comparison between these two definitions of Betti numbers of the pair (M, N ); see also [Dao2, Theorem 5.4]. Theorem 3.2. Let R = S/(x) where S is a local ring and (x, y) is a pair of exact zero-divisors in S. Furthermore, let M and N be finitely generated R-modules such that yN = 0 and M ⊗R N has finite length. Then, for all n, (3.2) βnR (M, N ) − n−2 X βiR (M, N ) ≤ βnS (M, N ) ≤ n X βiR (M, N ) i=0 i=0 Remark. We have used the convention that negative Betti numbers are zero. Proof. As in the proof of Theorem 2.1, we consider the first quadrant change of rings spectral sequence:  S S TorR p M, Torq (R, N ) =⇒ Torp+q (M, N ). p 2 Since yN = 0, we see from (†) that the E 2 -page entries are given by Ep,q = R Torp (M, N ). We first prove the left-hand inequality of (3.2). Fix an integer n and consider the short exact sequence ∞ 0 → Φn−1 Hn → TorSn (M, N ) → En,0 → 0, ∞ where Φi Hn is the filtration of Hn from the proof of Theorem 2.1. Since En,0 =  S n n Ker dn,0 , we obtain the inequality ℓ Torn (M, N ) ≥ ℓ(Ker dn,0 ). Now for all 2 ≤ p ≤ n, there is an exact sequence p 0 → Ker dpn,0 → Ker dp−1 n,0 → Im dn,0 → 0, which implies ℓ(Ker dnn,0 ) n−1 = ℓ(Ker dn,0 ) − ℓ(Im dnn,0 )  n−2 n−1 = ℓ(Ker dn,0 ) − ℓ(Im dn,0 ) + ℓ(Im dnn,0 ) .. . = ℓ(Ker d1n,0 ) − n X ℓ(Im din,0 ). i=2 i For 2 ≤ i ≤ n, the image of is a submodule of En−i,i−1 , and the latter is a R 2 2 subquotient of En−i,i−1 . Then since En−i,i−1 = Torn−i (M, N ), there is an inequal 2 ity ℓ(Im din,0 ) ≤ ℓ TorR n−i (M, N ) . Moreover the module En,0 is a subquotient of  R 2 Ker d1n,0 . Thus, since En,0 = Torn (M, N ), we have ℓ(Ker d1n,0 ) ≥ ℓ TorR n (M, N ) . This gives  ℓ TorSn (M, N ) ≥ ℓ(Ker dnn,0 ) n X ℓ(Im din,0 ) = ℓ(Ker d1n,0 ) − din,0 i=2 ≥ proving the left-hand inequality. ℓ  TorR n (M, N ) − n−2 X i=0  ℓ TorR i (M, N ) , 8 PETTER ANDREAS BERGH, OLGUR CELIKBAS AND DAVID A. JORGENSEN For the right-hand inequality, we fix an integer n and consider the short exact sequence: ∞ 0 → Φp−1 Hn → Φp Hn → Ep,n−p →0 for 0 ≤ p ≤ n. Counting the lengths, we obtain equalities   ∞ ℓ (Φn Hn ) = ℓ Φn−1 Hn + ℓ En,0    ∞ ∞ + ℓ En,0 = ℓ Φn−2 Hn + ℓ En−1,1 .. . n X  ∞ . ℓ Ei,n−i = i=0 2 2 Each is a subquotient of Ei,n−i , and so since Ei,n−i = TorR i (M, N ), we obtain  R ∞ n the inequality ℓ(Ei,n−i ) ≤ ℓ Tori (M, N ) . Then since Φ Hn = TorSn (M, N ), we obtain  ℓ TorSn (M, N ) = ℓ (Φn Hn ) n X  ∞ ℓ Ei,n−i = ∞ Ei,n−i i=0 ≤ n X i=0 proving the right-hand inequality.  ℓ TorR i (M, N ) ,  As a consequence, using the right-hand side of the inequality (3.2), we obtain an upper bound for ℓcxS (M, N ) in terms of the complexity of (M, N ) over R. Corollary 3.3. Let R = S/(x) where S is a local ring and (x, y) is a pair of exact zero-divisors in S. Furthermore, let M and N be finitely generated R-modules such that yN = 0 and M ⊗R N has finite length. Then ℓcxS (M, N ) ≤ ℓcxR (M, N ) + 1. Proof. If ℓcxR (M, N ) = ∞, then there is nothing to prove. So suppose ℓcxR (M, N ) = c < ∞. Then, by the definition, there exists a real number a such that βnR (M, N ) ≤ anc−1 for all n. By Theorem 3.2, the inequality n n X X aic−1 ≤ (n + 1)anc−1 βiR (M, N ) ≤ βnS (M, N ) ≤ i=0 i=0 holds for all n. Therefore there is a real number b such that βnS (M, N ) ≤ bnc for all n. This shows that ℓcxS (M, N ) ≤ c + 1.  We are unaware of an example of a pair of R-modules for which equality holds in the left-hand side of (3.2). On the other hand, equality may occur in the right-hand side. Indeed, when the exact zero-divisors x and y are minimal generators of the maximal ideal of S, Henriques and Şega prove [HeŞ, 1.7] that the equality ∞ ∞ X 1 X R βn (M )tn βnS (M )tn = 1 − t n=0 n=0 of Poincaré series holds for every finitely generated R-module M . This gives: n X βnS (M ) = βiR (M ) i=0 HOMOLOGICAL ALGEBRA MODULO EXACT ZERO-DIVISORS 9 However, when x and y are arbitrary, the equality of the Poincaré series stated above may fail: Example 3.4. Let S = k[[x]]/(x3 ) where k is a field. Then x2 is an exact zero divisor in S. Set R = S/(x2 ) ∼ = k[[x]]/(x2 ). It can be seen that: ∞ ∞ X X 1 S n = βnR (k)tn βn (k)t = 1 − t n=0 n=0 This example also shows that the inequality of Corollary 3.3 can be strict. We now give an example illustrating the fact that the left-hand inequality of (3.2) does give useful lower bounds in some cases: Example 3.5. Let R = k[x1 . . . , xe ]/(x1 , . . . , xe )2 , and M be a finitely generated R-module. Then Ω1R (M ) is a finite dimensional vector space over k of dimension β1R (M ). It is easy to see that the Betti numbers of k are βnR (k) = en . It follows that βnR (M ) = β1R (M )en−1 for all n ≥ 1. From the left-hand inequality of (3.2) we have n−2 X βiR (M ) βnS (M ) ≥ βnR (M ) − i=0 = β1R (M )en−1 − n−2 X β1R (M )ei−1 i=1 = = ! − β0R (M )   en−2 − 1 R n−1 β1 (M ) e − − β0R (M ) e−1  n  e − en−1 − en−2 + 1 β1R (M ) − β0R (M ) e−1 β1R (M ) n−1 e − β0R (M ) 2 for e ≥ 2 and for any ring S such that there exists an exact zero-divisor x with R ∼ = S/(x). Note that the last inequality follows since for e ≥ 2 we have e2 − e − 2 ≥ 0. Then en−2 (e2 − e − 2) ≥ 0, which implies that en − en−1 − 2en−2 + 2 ≥ 0. Thus 2(en − en−1 − en−2 + 1) ≥ en−1 (e − 1), and the desired inequality follows. In particular, R-modules must have exponential growth over S as well. As a specific example, let S = k[x, y, z]/(x2 , y 2 , z 2 , yz). Then x is an exact zero-divisor in S, and R = S/(x) ∼ = k[y, z]/(y, z)2 has the form above. ≥ When N = k, the assumptions that M ⊗ N has finite length and yN = 0 hold automatically. Therefore, in this situation, Theorem 3.2 and Corollary 3.3 can be summarized as follows: Corollary 3.6. Let R = S/(x) where S is a local ring and x is an exact zero-divisor in S. Then, for every finitely generated R-module M , the inequalities βnR (M ) − n−2 X i=0 βiR (M ) ≤ βnS (M ) ≤ n X βiR (M ) i=0 hold for all n. Consequently cxS (M ) ≤ cxR (M ) + 1 holds. Remark. It follows from [AHŞ, 4.4] that R is a complete intersection if and only if S is a complete intersection. The complexity inequality obtained in Corollary 3.6 10 PETTER ANDREAS BERGH, OLGUR CELIKBAS AND DAVID A. JORGENSEN gives a different proof for the ‘only if’ direction this result: if cxR (k) < ∞, where k is the residue field of R, then it follows from Corollary 3.6 that cxS (k) < ∞ and hence, by [Gu2, 2.5], S is a complete intersection. Another observation related to the result stated above concerns commutative local Cohen-Macaulay Golod rings [Av3, 5.2]. Assume S is such a ring. Since a finitely generated module has infinite complexity over S in case it has infinite projective dimension over S and codepth(S) ≥ 2 [Av3, 5.3.3(2)], we conclude codepth(S) ≤ 1 (Recall cxS (R) = 1). Moreover, as x is not regular, codepth(S) = 1. This implies that S is a hypersurface and hence R is a complete intersection. As discussed in the introduction, when x is regular the complexity inequality is quite different than the one obtained in Corollary 3.6. More precisely, in that case the inequalities cxS (M ) ≤ cxR (M ) ≤ cxS (M )+1 hold. In particular the complexity of M over R is finite if and only if it is finite over S. However, in our situation, when x is an exact zero-divisor, we are unable to deduce any further inequalities, such as cxR (M ) ≤ cxS (M ), from Theorem 3.2. In fact we do not know whether there exists an R-module M with cxS (M ) < ∞ and cxR (M ) = ∞. We record this in the next question. Question. Let R = S/(x) where S is a local ring and x is an exact zero-divisor in S. Is cxR (M ) ≤ cxS (M ) for all finitely generated R-modules M ? 4. Canonical elements of Ext2R (M, M ) and Lifting In this section we restrict our attention to the case where (x, x) is a pair of exact zero-divisors in the local ring S, and R = S/(x). We discuss natural chain endomorphisms of complexes over R, following the construction in [Eis, Section 1], and show that whether or not they are null-homotopic dictates the liftability of R-modules to S. These results generalize classical results (see, for example [ADS]) for lifting modules modulo a regular element to modulo the square of the regular element. Canonical endomorphisms of complexes. Let (1) ∂i+1 ∂ i Fi−1 → · · · F : · · · → Fi+1 −−−→ Fi −→ be a complex of finitely generated free R-modules. We let (2) e e ∂i+1 ∂i e Fi−1 → · · · Fe : · · · → Fei+1 −−−→ Fei −→ denote a preimage over S of the complex F , that is, a sequence of homomorphisms ∂ei : Fei → Fei−1 of free S-modules such that F and Fe ⊗S R are isomorphic Rcomplexes. From the fact that ∂ei−1 ∂ei (Fei ) ⊆ xFei−2 for all i, we can write (3) si ∂ei−1 ∂ei = xe for some homomorphism sei : Fei → Fei−2 . Now we define the homomorphisms si : Fi → Fi−2 by (4) si = sei ⊗S R for all i. There are several properties of the si which we should like to mention. See [Eis, Section 1] for the proofs. (Note that in our case (x)/(x)2 = (x) ∼ = S/(x) is a free S/(x)-module.) HOMOLOGICAL ALGEBRA MODULO EXACT ZERO-DIVISORS 11 (a) The definition of si is independent of the factorization in (3). (b) The family s = {si } is a chain endomorphism of F of degree −2. (c) Let δi+1 δ i Gi−1 → · · · G : · · · → Gi+1 −−−→ Gi −→ be another complex of finitely generated free R-modules, and assume that there exists a chain map f : F → G. Let t = {ti = e ti ⊗S R : Gi → Gi−2 } be e ti for all i, where G the chain map defined by the factorizations δei−1 δei = xe is a preimage over S of G. Then the chain maps f s and tf are homotopic. (d) From (c) it follows that the definition of the si is independent, up to homotopy, of the preimage Fe of F chosen in (2). The group ExtnA (M, M ). Let A be an associative ring, and M an A-module. Suppose that F is a projective resolution of M . Then Hn (HomA (F, F )) is the group of homotopy equivalence classes of chain endomorphisms of F of degree n. For a chain endomorphism s of F of degree n, we let [s] denote the class of s in Hn (HomA (F, F )). Let G be another projective resolution of M over A. Then the comparison maps f : F → G and g : G → F lifting the identity map on M are homotopically equivalent. That is, f g is homotopic to the identity map on G and gf is homotopic to the identity map on F . It follows that the map (5) F θG : Hn (HomA (F, F )) → Hn (HomA (G, G)) given by [s] 7→ [f sg] is an isomorphism, with inverse θFG : [s] 7→ [gsf ]. It is wellknown that this group is ExtnA (M, M ) (see, for example [AV].) Canonical elements of Ext2R (M, M ). Returning to the situation where R = S/(x) for the pair (x, x) of exact zero-divisors, let F be a free resolution of M over R, and s be the endomorphism of F defined by (4). Thus we have the element [s] ∈ H2 (HomR (F, F )). That we call [s] a canonical element of Ext2R (M, M ) is reinforced by the following lemma. Lemma 4.1. Let R = S/(x) where S is a local ring and (x, x) is a pair of exact zero-divisors in S. Suppose that F and G are free resolutions of a finitely generated module M over R, that s is the canonical endomorphism of F as defined in (4), and that t is the canonical endomorphism of G as defined in (4). Then we have θFG ([t]) = [s] where θFG is the isomorphism defined in (5). Proof. First assume that F is a minimal free resolution of M . Then the comparison map f : F → G lifting the identity map on M can be chosen to be a split injection, with splitting g : G → F , also lifting the identity map on M . In particular, we have gf = idF , the identity map on F . e be a preimage Denote the differential on F by ∂, and that on G by δ. Let (Fe , ∂) e e over S of (F, ∂), and (G, δ) be a preimage over S of (G, δ). We choose preimages fe of f and e g of g over S such that gefe = idFe . ei → Fei−1 such that gei−1 δei = ∂ei e gi +xui As gi−1 δi = ∂i gi for all i, there exists ui : G e e for all i. Similarly, there exists vi : Fi → Gi−1 such that δei fei = fei−1 ∂ei + xvi for all 12 PETTER ANDREAS BERGH, OLGUR CELIKBAS AND DAVID A. JORGENSEN i. Thus we have x(e gi−2 e ti fei − sei ) = = = gei−2 δei−1 δei fei − ∂ei−1 ∂ei (∂ei−1 gei−1 + xui−1 )(fei−1 ∂ei + xvi ) − ∂ei−1 ∂ei x(∂ei−1 gei−1 vi + ui−1 fei−1 ∂ei ). It follows that gi−2 ti fi −si = ∂i−1 (gi−1 v i )+(ui−1 fi−1 )∂i for all i, where ui = ui ⊗S R and v i = vi ⊗S R. We will have shown that gtf is homotopic to s with homotopy hi = ui fi once we know that ui fi = gi−1 v i for all i. But this is easy: x(ui fei − gei−1 vi ) = = = gi−1 (δei fei − fei−1 ∂ei ) (e gi−1 δei − ∂ei gei )fei − e −∂ei gei fei + gei−1 fei−1 ∂ei 0, hence the claim follows. F Notice that we also have θG ([s]) = [t], when F is minimal. Therefore, for two arbitrary free resolutions F and G of M , that θFG ([t]) = [s] follows from composing G L θFG = θL θF where L is a minimal free resolution of M .  Lifting. Let B be an associative ring, I an ideal of B, and A = B/I. Recall that a finitely generated A-module M is said to lift to B, with lifting M ′ , if there exists ′ a finitely generated B-module M ′ such that M ∼ = M ′ ⊗B A, and TorB i (M , A) = 0 for all i ≥ 1. Similarly, a complex of finitely generated free A-modules ∂i+1 ∂ i Fi−1 → · · · F : · · · → Fi+1 −−−→ Fi −→ is said to lift to B, with lifting Fe, if there exists a preimage Fe of F e e ∂i+1 ∂i e Fi−1 → · · · Fe : · · · → Fei+1 −−−→ Fei −→ such that ∂ei−1 ∂ei = 0 for all i. A close connection between these two notions of lifting will be explained in the next theorem. We want also to show that when R = S/(x) for (x, x) a pair of exact zero-divisors, the triviality of the canonical element [s] determines whether the module M lifts to S. Theorem 4.2. Let R = S/(x) where S is a local ring and (x, x) is a pair of exact zero-divisors in S. Then for every finitely generated R-module M , the following are equivalent. (1) M lifts to S. (2) The canonical element [s] in Ext2R (M, M ) is trivial. (3) Every free resolution of M by finitely generated free R-modules lifts to S. (4) Some free resolution of M by finitely generated free R-modules lifts to S. Proof. (1) =⇒ (2). Suppose that M ′ is a lifting of M to S. Let e e ∂2 e ∂1 e F1 −→ F0 → 0 Fe : · · · → Fe2 −→ be a resolution of M ′ by finitely generated free S-modules. Since TorSi (M ′ , R) = 0 for all i > 0, F = Fe ⊗S R is a resolution of M ∼ = M ′ ⊗S R by finitely generated free R-modules. Computing the endomorphism s from the preimage Fe of F , which is exact, we see that s is actually the zero endomorphism, and is therefore certainly trivial in Ext2R (M, M ). HOMOLOGICAL ALGEBRA MODULO EXACT ZERO-DIVISORS 13 (2) =⇒ (3). By Lemma 4.1 the canonical element of Ext2R (M, M ) is trivial regardless of which resolution by finitely generated free R-modules F of M we choose to define it. Therefore let F be an arbitrary such resolution of M , and let s be the canonical chain endomorphism defined as in (4) of the subsection above on canonical endomorphisms of complexes. By assumption s is homotopic to zero. Therefore there exists a homotopy h = {hi } with hi : Fi → Fi−1 such that e si = ∂i−1 hi + hi−1 ∂i for all i. Let Fe be an arbritrary preimage of F , with maps ∂. e e e e e Let hi : Fi → Fi−1 be a preimage of hi for all i. There exists ui : Fi → Fi−2 such hi + e hi−1 ∂ei + xui for all i. Now consider the preimage F ♯ of F where that sei = ∂ei−1 e ♯ hi instead. we have we take F = Fei for all i, but we take the maps ∂ ♯ = ∂ei − xe i i ♯ ∂i−1 ∂i♯ = = = = (∂ei−1 − xe hi−1 )(∂ei − xe hi ) hi + e hi−1 ∂ei ) ∂ei−1 ∂ei − x(∂ei−1 e hi − e hi−1 ∂ei )) x(e si − ∂ei−1 e 0. Thus F ♯ is a lifting of F to S. (3) =⇒ (4) is trivial. To show that (4) =⇒ (1), assume that F is a free resolution of M by finitely generated free R-modules, which lifts to the complex Fe over S. We claim that Hi (Fe ) = 0 for i 6= 0. Indeed, if ∂ei (a) = 0, some a ∈ Fei , then a = ∂ei+1 (b) + xc for some b ∈ Fei+1 and c ∈ Fei by exactness of F . Since x∂ei (c) = 0, we have ∂ei (c) ∈ xFei−1 . Again by exactness of F we have c = ∂ei+1 (d) + xe for some d ∈ Fei+1 and e ∈ Fei . Therefore a = ∂ei+1 (b + xd). It follows that Fe is a resolution of M ′ = H0 (Fe) by finitely generated free S-modules, and thus M ′ is a lifting of M to S.  We end with an example showing that there are local rings S admitting a pair of exact zero-divisors (x, x), but no local ring T with regular element x e such that S = T /(e x2 ) and x = x e + (e x2 ). Therefore the notion of lifting modulo an exact zero-divisor is a more general notion than lifting from modulo a regular element to modulo the square of the regular element. Example 4.3. Let k be field, S = k[V, X, Y, Z]/I where I is the ideal (V 2 , Z 2 , XY, V X + XZ, V Y + Y Z, V X + Y 2 , V Y − X 2 ), and set v = V + I. Then (v, v) is a pair of exact zero-divisors. Moreover, it is shown in [AGP] that S does not have an embedded deformation. Therefore there is no local ring T and non-zero-divisor Ve of T such that S ∼ = T /(Ve 2 ). Acknowledgments This paper is the result of a visit by the first and second authors to the third in October/November 2010. They thank the Department of Mathematics at the University of Texas at Arlington for their kind hospitality. The authors thank the referee for his/her careful reading, diligence and helpful suggestions. 14 PETTER ANDREAS BERGH, OLGUR CELIKBAS AND DAVID A. JORGENSEN References [ADS] [Alp] [AGP] [Av1] [Av2] [Av3] [AvBu] [AHŞ] [AV] [Be] [Dao1] [Dao2] [Eis] [Gu1] [Gu2] [HeŞ] [Jo1] [Jo2] [Rot] M. Auslander, S. Ding, and Ø. Solberg, Liftings and weak liftings of modules, J. Algebra 156 (1993), 273–317. J. L. Alperin, Periodicity in groups, Illinois J. Math., 21(4), 776-783, 1977. L. Avramov, V. Gasharov and I. Peeva, A periodic module of infinite virtual projective dimension, J. Pure Appl. Algebra 62 (1989), 1-5. L. L. Avramov, Modules of finite virtual projective dimension, Invent. Math. 96 (1989), no. 1, 71-101. L. L. Avramov, Homological asymptotics of modules over local rings, Commutative algebra; Berkeley, 1987 (M. Hochster, C. Huneke, J. Sally, eds.), MSRI Publ. 15, Springer, New York 1989, pp. 33-62. L. L. Avramov, Infinite free resolutions, Six lectures on commutative algebra, Bellaterra 1996, Progr. Math. 166, Birkhäuser, Basel, (1998), 1-118. L. L. Avramov and R.-O. Buchweitz, Support varieties and cohomology over complete intersections, Invent. Math. 142 (2000), 285-318. L. L. Avramov, I. B. D. A. Henriques and L. M. Şega, Quasi-complete intersection homomorphisms, to appear in Pure and Applied Mathematics Quarterly, posted at arXiv:1010.2143. L.L. Avramov, O. Veliche, Stable cohomology over local rings, Adv. Math. 213 (2007), no. 1, 93-139. P. A. Bergh, On the vanishing of (co)homology over local rings, J. Pure Appl. Algebra 212 (2008), no. 1, 262-270. H. Dao, Some observations on local and projective hypersurfaces, Math. Res. Lett., 15 (2008), 207-219. H. Dao, Asymptotic behaviour of Tor over complete intersections and applications, preprint, (2006), posted at arxiv:07105818. D. Eisenbud, Homological algebra on a complete intersection, with an application to group representations, Trans. Amer. Math. Soc. 260 (1980), no. 1, 35-64. T. H. Gulliksen, A change of ring theorem with applications to Poincaré series and intersection multiplicity, Math. Scand. 34 (1974), 167-183. T. H. Gulliksen, On the deviations of a local ring, Math. Scand. 47 (1980), 5-20. I. B. D. A. Henriques and L. M. Şega, Free resolutions over short Gorenstein local rings, Math. Z. 267 (2011), 645-663. D. A. Jorgensen, Tor and torsion on a complete intersection, J. Algebra 195 (1997), 526-537. D. A. Jorgensen, Complexity and Tor on a complete intersection, J. Algebra 211 (1999), 578-598. J. Rotman, An introduction to homological algebra, Universitext, Springer, New York, second edition, 2009. Petter Andreas Bergh, Institutt for matematiske fag, NTNU, N-7491 Trondheim, Norway E-mail address: [email protected] Olgur Celikbas, Department of Mathematics, University of Kansas, Lawrence, KS 66045, USA Current address: Department of Mathematics, University of Missouri, Columbia, MO 65211, USA E-mail address: [email protected] David A. Jorgensen, Department of Mathematics, University of Texas at Arlington, Arlington, TX 76019, USA E-mail address: [email protected]
0math.AC
1 Common Throughput Maximization in UAV-Enabled OFDMA Systems with Delay Consideration arXiv:1801.00444v2 [cs.IT] 6 Jan 2018 Qingqing Wu, Member, IEEE, and Rui Zhang, Fellow, IEEE Abstract The use of unmanned aerial vehicles (UAVs) as communication platforms is of great practical significance in future wireless networks, especially for on-demand deployment in temporary events and emergency situations. Although prior works have shown the performance improvement by exploiting the UAV’s mobility, they mainly focus on delay-tolerant applications. As delay requirements fundamentally limit the UAV’s mobility, it remains unknown whether the UAV is able to provide any performance gain in delay-constrained communication scenarios. Motivated by this, we study in this paper a UAV-enabled orthogonal frequency division multiple access (OFDMA) network where a UAV is dispatched as a mobile base station (BS) to serve a group of users on the ground. We consider a minimum-rate ratio (MRR) for each user, defined as the minimum instantaneous rate required over the average achievable throughput, to flexibly adjust the percentage of its delay-constrained data traffic. Under a given set of constraints on the users’ MRRs, we aim to maximize the minimum average throughput of all users by jointly optimizing the UAV trajectory and OFDMA resource allocation. First, we show that the max-min throughput in general decreases as the users’ MRR constraints become more stringent, which reveals a fundamental throughputdelay tradeoff in UAV-enabled communications. Next, we propose an iterative parameter-assisted block coordinate descent method to optimize the UAV trajectory and OFDMA resource allocation alternately, by applying the successive convex optimization and the Lagrange duality, respectively. Furthermore, an efficient and systematic UAV trajectory initialization scheme is proposed based on a simple circular trajectory. Finally, simulation results are provided to verify our theoretical findings and demonstrate the effectiveness of our proposed designs. Index Terms The authors are with the Department of Electrical and Computer Engineering, National University of Singapore, email:{elewuqq, elezhang}@nus.edu.sg. Part of this work has been presented in IEEE APCC 2017 as an invited paper [1]. 2 UAV communications, delay constraint, throughput maximization, trajectory design, OFDMA, resource allocation. I. I NTRODUCTION As predicted in [2], the number of unmanned aerial vehicles (UAVs), also known as drones, will continue to surge over the next several years, with the global annual unit shipment increasing more than tenfold from 6.4 million in 2015 to 67.7 million by 2021. Such a dramatic increase is due to the steadily decreasing cost of UAVs and their fast-growing demand in applications such as surveillance and monitoring, aerial camera and radar, cargo delivery, communication platforms, etc. In June 2017, the International Olympic Committee (IOC) and Intel announced to use UAVs to enhance the future Olympic Games experience, such as the drone light show [3]. Just in the same month, the “Safe DRONE Act of 2017” was proposed to the United States Congress for accelerating the development of the UAV technology, which requested 14 million dollars for funding a host of research projects on UAVs [4]. In fact, many prominent companies such as Google, Qualcomm, Amazon, and Nokia, have already launched their respective programs to advance the UAV research and conduct UAV field tests. In particular, the recent trial results released by Qualcomm have shown that the current fourth-generation (4G) cellular network can provide reliable communications for UAVs at an altitude up to 400 feet [5], which paves the way for realizing cellular-enabled UAV communications in future. Besides being “drone clients” of wireless networks, UAVs can also be employed as various aerial communication platforms, to help improve the performance of existing wireless communication systems such as cellular networks [6]. Compared to the traditional terrestrial wireless communications, UAV-enabled communications mainly have the following three advantages. First, they are significantly less affected by channel impairments such as shadowing and fading, and in general possess more reliable airto-ground channels due to the much higher possibility of having line-of-sight (LoS) links with ground users. Second, UAVs can be deployed more flexibly and moved more freely in the three-dimensional (3D) space. Third, the high mobility of UAVs can be fully controlled to enhance desired communication links and/or avoid undesired interference via proper trajectory design. These features bring both opportunities and challenges in designing UAV-enabled wireless communications, which were not explored before in conventional terrestrial systems with fixed ground base stations (BSs) [6]. As UAVs are suitable to serve as airborne communication hubs 3 such as aerial BSs and/or relays, they are especially useful for the practical scenarios that require on-demand deployment in temporary events or emergency situations (such as natural disaster), when the ground infrastructures are insufficient or even unavailable. However, there are also open challenges that need to be tackled before realizing the full potential of UAV-enabled communications, such as UAV deployment and trajectory design, communications resource allocation and multiple access, etc. Recently, UAV deployment problems have been extensively studied in the literature [7]–[12]. The main design objective is to optimize the UAVs’ altitude, horizontal positions, and/or spatial density to achieve the maximum communication coverage in a given area. However, the high mobility or trajectory design of UAVs is not considered in these works. An energy-efficient relaying scheme is proposed in [13] where multiple UAVs cooperatively relay data packets from ground sensors to a remote BS based on time division multiple access (TDMA). Although the UAV mobility is considered in [13], the UAVs’ trajectories are assumed to be pre-determined and not optimized, which simplifies the design to a UAV-packet matching problem. In [14], both the static and mobile UAV-enabled wireless networks are studied which are underlaid with a device-to-device (D2D) communication network. Yet, the mobile UAV is only allowed to communicate at a set of stop points. As a result, the UAV trajectory is highly restricted and does not fully exploit the UAV’s high mobility for performance optimization. As such, a joint UAV trajectory and adaptive communication design is more promising. Motivated by this, a general trajectory and communication joint optimization framework is proposed in [15] for a UAVenabled mobile relaying system, which is also extended to the energy efficiency maximization in a point-to-point UAV-ground communication system [16]. The UAV trajectory designs in [15] and [16] can be considered as a generalization of the UAV deployment problem, subject to practical constraints on the UAV’s mobility, such as its initial/final locations, maximum speed and acceleration, etc. Thus, it is intuitive that a mobile UAV with optimized trajectory in general can achieve higher throughput than a static UAV, even with optimal deployment/placement. For UAV-enabled multiuser communication networks, a novel cyclical multiple access scheme is proposed in [17] where the UAV periodically serves each of the ground users along its cyclical trajectory via TDMA. In [18], a joint user scheduling, power control, and trajectory optimization problem is investigated for a multi-UAV enabled multiuser system. It is shown that with joint trajectory design and power control, the UAVs can cooperatively serve the ground users in a periodic manner with strong LoS links and yet avoiding severe interference. However, this is 4 achieved by scheduling each user to communicate only when its associated UAV is sufficiently close to it in each UAV flight period, which implies that the user has to wait for the next UAV flight period to communicate again. As a result, the throughput gain brought by the UAV’s mobility does not come for free but in fact at the cost of user communication delay. Future wireless networks are expected to provide different quality-of-service (QoS) guarantees for a wide range of applications with diversified requirements [19], [20]. In fact, the delay requirements of wireless multimedia services may vary dramatically in a large scale from milliseconds such as for video conferencing and online gaming, to several seconds for file downloading/sharing and data backup. For example, when a user is downloading files which are delay-tolerant in general, some other users in the same area may be watching high-definition (HD) movies on YouTube that require minimum rates at any time. In light of this, wireless networks with such mixed services should be optimized to not only maximize the system total throughput but also meet the heterogeneous delay requirements of different applications. Although the UAV trajectory design has been shown to significantly enhance the throughput of various wireless communication systems such as for mobile relaying channel [13], [15], multiple access channel (MAC) and broadcast channel (BC) [17], [21], [22], interference channel (IFC) [14], [18], and wiretap channel [14], [23], all these works consider only delay-tolerant applications where the users’ instantaneous rates in general cannot be guaranteed. Therefore, it remains unknown whether mobile UAVs are still able to provide throughput gains over static UAVs/ground BSs, when the users’ delay or minimum-rate requirements are considered. Motivated by such an open question, we study in this paper a UAV-enabled orthogonal frequency division multiple access (OFDMA) system, where a UAV is dispatched as a mobile BS to serve a group of users on the ground during a given finite period, as shown in Fig. 1. Besides having been standardized as the downlink multiple access scheme in the current 4G networks, OFDMA is also deemed as a promising candidate for the forthcoming fifth-generation (5G) wireless networks [24]–[26]. This is essentially attributed to its various advantages, e.g., flexible bandwidth and power allocation over users, which fits particularly well in our considered UAV-enabled network with heterogeneous user delay requirements. Without loss of generality, we consider two types of data traffic for each user: delay-constrained traffic where a minimum rate should be supported at any time during the UAV service period versus delay-tolerant traffic where no minimum rate is required and the transmission rate can be elastically allocated over the period. To this end, we introduce a minimum-rate ratio (MRR) for each user which is defined as 5 Fig. 1. A UAV-enabled wireless network. the minimum instantaneous rate required over the achievable average throughput of the whole period. As such, the MRR can be flexibly adjusted by each user to specify the percentage of the delay-constrained traffic required versus that of the delay-tolerant traffic, depending on real-time applications. Our goal is to maximize the minimum average throughput of all ground users while meeting a given set of constraints on the users’ MRRs, by jointly optimizing the UAV trajectory and OFDMA resource allocation. Compared to prior works [13]–[18], [21], [27], [28], such a joint UAV trajectory and resource allocation design is more general and practically useful since the user communication delay requirements are taken into account. This thus leads to a more fair throughput comparison with the terrestrial BSs or static UAVs and also helps to reveal a better understanding of the fundamental throughput gain achievable by exploiting the UAV’s mobility control subject to delay constraints. Intuitively, when the UAV flies towards some users to capture better channels with them, it gets farther away spontaneously from other users that are not in its heading direction and thus experiences degraded channels. As a result, more bandwidth and transmit power need to be allocated to those users so that their minimum rates can be achieved. This in turn would limit the potential rate increase of the users in the UAV’s heading direction. Thus, there exists a new and non-trivial tradeoff in the UAV trajectory design for throughput maximization when minimum-rate or delay constraints are considered. The main contributions of this paper are summarized as follows. First, we formulate a joint UAV trajectory and OFDMA resource allocation optimization problem to maximize the minimum 6 throughput of ground users while guaranteeing their specified MRR constraints. Next, we show that the system max-min throughput is non-increasing with respect to the users’ MRRs, which implies that the throughput gain of mobile UAVs over static UAVs reduces as the delay constraints become more stringent. Although the formulated problem is non-convex and challenging to solve, we propose an efficient iterative block coordinate descent algorithm to solve the bandwidth and power allocation problem and the UAV trajectory optimization problem alternately, which is guaranteed to converge. Specifically, in each iteration, the bandwidth and power allocation problem is solved optimally by applying the Lagrange duality method with given fixed UAV trajectory. While for the UAV trajectory optimization problem with fixed OFDMA resource allocation, the successive convex optimization technique is applied to tackle its non-convexity. However, due to the MRR constraints, it is shown that the conventional block coordinate descent method which directly iterates between the OFDMA resource allocation and UAV trajectory design will very likely get stuck at the initial point, which leads to an ineffective update of the UAV trajectory. To overcome this issue, we propose a new parameter-assisted block coordinate descent method where each parameter is a temporary MRR set to be larger than the target MRR for a corresponding user. Then at each iteration, we gradually decrease the temporary MRRs before solving the UAV trajectory optimization problem, until they reach the target MRRs for all users. It is shown that this new method can effectively update the UAV trajectory in each iteration, thus resolving the issue of conventional block coordinate descent method. Furthermore, we propose a systematic and low-complexity UAV trajectory initialization scheme based on the simple circular trajectory. Finally, numerical results are provided to verify the fundamental tradeoff between the system max-min throughput and the users’ delay/MRR constraints and demonstrate the effectiveness of our proposed designs. The rest of this paper is organized as follows. Section II introduces the system model and the problem formulation for a UAV-enabled OFDMA network. In Section III, we propose an efficient iterative algorithm as well as a general UAV trajectory initialization scheme for the considered problem. Section VI presents the numerical results to demonstrate the performance of the proposed designs. Finally, we conclude the paper in Section VI. Notations: In this paper, scalars are denoted by italic letters, while vectors and matrices are respectively denoted by bold-face lower-case and upper-case letters. RM ×1 denotes the space of M-dimensional real-valued vector. For a vector a, kak represents its Euclidean norm, aT denotes its transpose, and a  0 indicates that a is element-wise larger than or equal to 0. For 7 a time-dependent function x(t), ẋ(t) denotes its derivative with respect to time t. For a set K, |K| denotes its cardinality. II. S YSTEM M ODEL AND P ROBLEM F ORMULATION A. System Model As shown in Fig. 1, we consider a UAV-enabled OFDMA system where the UAV is employed as an aerial BS to serve a group of K users on the ground. The user set is denoted by K with |K| = K. In practice, the users that need to be served by the UAV can be either the terrestrial BSs that have no ground backhaul links or the ground mobile terminals in a geographical area that is poorly or not even covered by existing terrestrial BSs. At any time during the UAV flight period, denoted by T , the UAV can communicate with multiple ground users simultaneously by employing OFDMA, i.e., assigning each user a fraction of the total bandwidth/transmit power. In general, from the perspective of throughput maximization, it is intuitive that larger T is desirable since it will provide the UAV more time to fly closer to each ground user, leading to better airto-ground links. The effect of T on the system performance will be investigated in detail in Section IV. Since we target for a centralized design that is implemented off-line, the proposed algorithm can be performed at a central controller (e.g., installed on the UAV) who is able to collect all the users’ information such as their locations and MRRs. Then the obtained solutions can be programmed into the control and communication units of the UAV. We assume that the horizontal coordinate of each ground user is known in advance and fixed at wk = [xk , yk ]T ∈ R2×1 , k ∈ K. The UAV is assumed to fly at a fixed altitude H above ground and the time-varying horizontal coordinate of the UAV at time instant t is denoted by q(t) = [x(t), y(t)]T ∈ R2×1 , with 0 ≤ t ≤ T . To serve ground users periodically, we assume that the UAV needs to return to its initial location by the end of each period T , i.e., q(0) = q(T ). In addition, the UAV trajectory is also subject to the maximum speed constraints in practice, i.e, ||q̇(t)|| ≤ Vmax , 0 ≤ t ≤ T , where Vmax denotes the maximum UAV speed in meter/second (m/s). However, the continuous variable t essentially implies an infinite number of UAV speed constraints which are difficult to tackle in general. To facilitate our analysis and algorithm design, we apply the discrete linear state-space approximation technique, which results in a finite number of constraints. Specifically, we discretize the UAV flight period T into N equally-spaced time slots with step size δt , i.e., t = nδt , n ∈ N = {1, ..., N}. Note that for the given maximum UAV speed Vmax and altitude H, the number of time slots N can be chosen sufficiently large 8 such that the UAV’s location change within each time slot δt can be assumed to be negligible, compared to the link distances from the UAV to all ground users. However, a larger value of N inevitably increases the complexity of the proposed design. Thus, the number of time slots N can be properly chosen in practice to balance between the accuracy and algorithm complexity. More discussions on the choice of N as well as its impact on the system performance can be found in [18]. Based on such a discretization, the UAV trajectory can be characterized by a sequence of UAV locations q[n] = [x[n], y[n]]T , n = 1, · · · , N. As a result, the above constraints can be equivalently modeled as q[1] = q[N], 2 ||q[n + 1] − q[n]||2 ≤ Smax , n = 1, ..., N − 1, (1) (2) where Smax , Vmax δt is the maximum horizontal distance that the UAV can travel within one time slot. Furthermore, the distance from the UAV to user k in time slot n is assumed to be a constant that can be expressed as dk [n] = p H 2 + ||q[n] − wk ||2. (3) The measurement results in [29]–[31] have shown that the air-to-ground communication channels are mainly dominated by the LoS links even when the UAV is at a moderate altitude. For example, for the UAV at an altitude of H = 120 m, the LoS probability of air-to-ground links in rural environment exceeds 95% for a horizontal ground distance of 4 kilometers (Km) [29]. Thus, we assume that the channel quality depends mainly on the UAV-user distance for simplicity. In addition, the Doppler effect induced by the UAV mobility is assumed to be perfectly compensated at the receivers. Following the free-space path loss model, the channel power gain from the UAV to user k in time slot n can thus be expressed as hk [n] = ρ0 d−2 k [n] = ρ0 , H 2 + ||q[n] − wk ||2 (4) where ρ0 denotes the channel power gain at the reference distance d0 = 1 m. Denote the total available system bandwidth by B in Hertz (Hz). The fraction of bandwidth assigned to user k in time slot n is denoted by αk [n]. In a practical OFDMA system, αk [n] is in general a discrete value between 0 and 1, which increases linearly with the number of subcarriers assigned to user k in time slot n. It is known that when the number of subcarriers is sufficiently large, αk [n] 9 can be approximated to a continuous value between 0 and 1. Thus, the bandwidth allocation constraint can be expressed as K X αk [n] ≤ 1, ∀ n, (5) k=1 0 ≤ αk [n] ≤ 1, ∀ k, n. (6) Denote the transmit power allocated to user k in time slot n by pk [n] ≥ 0. Then the total transmit power constraint of the UAV can be expressed as K X pk [n] ≤ Pmax , ∀ n, (7) k=1 where Pmax is the maximum allowed transmit power of the UAV in each time slot. Accordingly, the instantaneous achievable rate of user k in time slot n, denoted by rk [n] in bits/second/Hz (bps/Hz), can be expressed as  pk [n]hk [n] rk [n] = αk [n] log2 1 + αk [n]BN0   pk [n]γ0 , = αk [n] log2 1 + αk [n](H 2 + ||q[n] − wk ||2 )  where γ0 , ρ0 , BN0 (8) with N0 denoting the power spectral density of the additive white Gaussian noise (AWGN) at the receivers. As a result, the average achievable throughput of user k over N time slots in bps/Hz, is given by N 1 X Rk = rk [n]. N n=1 (9) Motivated by the diversified user applications and heterogeneous delay requirements in the forthcoming 5G wireless networks, we consider both delay-constrained and delay-tolerant services for users in the system. Specifically, a parameter θk , θk ∈ [0 1], is introduced to denote the MRR of user k, which means that at any time slot, θk fraction of its average throughput over N slots is delay-constrained and the remaining 1 − θk fraction is delay-tolerant. In particular, θk = 0 and θk = 1 indicate that all the services of user k are delay-tolerant and delay-constrained, respectively. As such, the MRR constraint of user k in time slot n can be expressed as rk [n] ≥ θk Rk , ∀ k, n, (10) which implies that in any of the N time slots, at least θk fraction of the average throughput needs to be satisfied for each user k. Therefore, a system where some users’ services are all 10 delay-constrained while those of the others are all delay-tolerant, i.e., θk ∈ {0, 1}, ∀ k, is a special case of our general setup. B. Problem Formulation Let A = {αk [n], k ∈ K, n ∈ N }, P = {pk [n], k ∈ K, n ∈ N }, and Q = {q[n], n ∈ N }. By taking into account the MRR constraints of all users, we aim to maximize the minimum average throughput among them via jointly optimizing the bandwidth and power allocation (i.e., A and P) as well as the UAV trajectory (i.e., Q). Define η , min Rk . The optimization problem is k∈K formulated as max η,A,P,Q s.t. η (11a) Rk ≥ η, ∀ k, (11b) rk [n] ≥ θk Rk , ∀ k, n, (11c) K X pk [n] ≤ Pmax , ∀ n, (11d) k=1 pk [n] ≥ 0, ∀ k, n, K X αk [n] ≤ 1, ∀ n, (11e) (11f) k=1 0 ≤ αk [n] ≤ 1, ∀ k, n, (11g) 2 ||q[n + 1] − q[n]||2 ≤ Smax , n = 1, ..., N − 1, (11h) q[1] = q[N]. (11i) Note that the challenges of solving problem (11) lie in the following three aspects. First, Rk and rk [n] in constraints (11b) and (11c) are not jointly concave with respect to the optimization variables A, P, and Q. Second, for fixed UAV trajectory Q, although Rk and rk [n] are jointly concave with respect to A and P, (11c) is non-convex due to the presence of Rk in its left-handside (LHS). Third, for fixed bandwidth and power allocation A and P, Rk and rk [n] are neither convex nor concave with respect to Q. Consequently, problem (11) is a non-convex optimization problem and in general, there is no standard method for solving such a problem efficiently. 11 To tackle the above challenges, we first transform problem (11) into a more tractable form as follows, max η,A,P,Q s.t. η (12a) rk [n] ≥ θk η, ∀ k, n, (12b) (11b), (11d), (11e), (11f), (11g), (11h), (11i). (12c) Comparing (12b) with (11c), it follows that the feasible set of problem (11) is a subset of that of problem (12) in general. However, the equivalence of problems (11) and (12) holds if all users achieve the equal average throughput in the optimal solution to problem (11). This can be easily verified since otherwise the objective value of (11) can be further improved by allocating more transmit power and/or bandwidth to the user with a lower average throughput without violating the total transmit power and bandwidth allocation constraints (11d) and (11f). With such a transformation, we only need to focus on solving problem (12) in the rest of the paper. Although it is still a non-convex optimization problem, problem (12) facilitates the development of an efficient algorithm. Before proceeding to solve problem (12), we first show the effect of the users’ MRRs on the maximum objective value of problem (12). Theorem 1. The maximum objective value of problem (12) is an element-wise non-increasing function with respect to {θk }. Proof. Denote the optimal solutions of problem (12) with θ ∗ = {θk∗ , k ∈ K} and θ̂ = {θ̂k , k ∈ K} by S ∗ = {η ∗ , αk∗ [n], p∗k [n], q∗ [n], k ∈ K, n ∈ N } and Ŝ = {η̂, α̂k [n], p̂k [n], q̂[n], k ∈ K, n ∈ N }, respectively. To prove Theorem 1, we only need to show that η ∗ ≤ η̂ holds when θ̂  θ ∗ , where  indicates element-wisely less than or equal to, i.e., θ̂k ≤ θk∗ , ∀ k. Note that in problem (12), the MRRs are only involved in constraint (12b). Thus, we have the following inequalities   p∗k [n]γ0 ∗ ∗ ≥ θk∗ η ∗ ≥ θ̂k η ∗ , ∀ k, n, (13) rk [n] = αk [n] log2 1 + ∗ αk [n](H 2 + ||q∗ [n] − wk ||2 ) which implies that S ∗ is also a feasible solution of problem (12) with θ̂. Since η̂ is the maximum objective value of problem (12) with θ̂, it follows that η ∗ ≤ η̂, which thus completes the proof of Theorem 1. Theorem 1 sheds light on the fundamental tradeoff between the max-min average throughput and the user communication delay requirement: as the required MRR θk increases for any user 12 k, the max-min average throughput of the system decreases in general. This is because imposing more stringent minimum-rate requirements on users fundamentally limit the UAV’s mobility to fly closer to any user to achieve a better channel since at the same time it needs to meet the minimum-rate requirements of other users that are not in its heading direction and thus will have degraded channels with it. As a result, the degree of freedom for exploiting the UAV’s mobility via its trajectory design is restricted by such delay/MRR constraints, thus leading to lower max-min average throughput. III. P ROPOSED S OLUTION In this section, we propose an efficient parameter-assisted block coordinate descent algorithm for solving problem (12). Specifically, we first optimize the bandwidth and power allocation for given UAV trajectory and then optimize the UAV trajectory for given bandwidth and power allocation. These two optimization problems are solved alternately until convergence is achieved. A. Joint Bandwidth and Power Allocation Besides being a subproblem of problem (12), the bandwidth and power allocation optimization problem for given UAV trajectory may also correspond to a practical scenario when the UAV trajectory is pre-specified due to other tasks such as aerial imaging, rather than being optimized for achieving best communication performance. Specifically, for any given UAV trajectory Q, the bandwidth and power allocation {A, P} can be optimized by solving the following problem, 13 max η η,A,P (14a)   N pk [n]gk [n] 1 X αk [n] log2 1 + ≥ η, ∀ k, s.t. N n=1 αk [n]   pk [n]gk [n] αk [n] log2 1 + ≥ θk η, ∀ k, n, αk [n] K X (14b) (14c) pk [n] ≤ Pmax , ∀ n, (14d) k=1 pk [n] ≥ 0, ∀ k, n, K X (14e) αk [n] ≤ 1, ∀ n, (14f) k=1 0 ≤ αk [n] ≤ 1, ∀ k, n, (14g)   k [n] k [n] where gk [n] , hBN , 0 when αk [n] = 0, ∀ k, n, such that . Define αk [n] log2 1 + pk α[n]g 0 k [n] the LHSs of both (14b) and (14c) are continuous with respect to αk [n] over the whole  domain 0 ≤ k [n] αk [n] ≤ 1. As such, problem (14) is a convex optimization problem since αk [n] log2 1 + pk α[n]g k [n] in (14b) and (14c) is jointly concave with respect to αk [n] and pk [n] and (14d)-(14g) are all affine constraints. Furthermore, it can be verified that Slater’s constraint qualification is satisfied for problem (14) [32]. Therefore, strong duality holds and the duality gap between problem (14) and its dual problem is thus zero, which means that the optimal solution can be obtained efficiently by applying the Lagrange duality. The partial Lagrange function of problem (14) can be expressed as L(η, A, P, λ, µ, β, ν) =η + K X λk k=1   N 1 X pk [n]gk [n] −η αk [n] log2 1 + N n=1 αk [n] ! + N X βn Pmax − n=1 K X k=1 pk [n] ! !    X  K N X pk [n]gk [n] αk [n] − θk η + νn 1 − + µk,n αk [n] log2 1 + αk [n] n=1 k=1 k=1 n=1 !    K X N  K K X N X X X λk pk [n]gk [n] = 1− λk − µk,n θk η + + µk,n αk [n] log2 1 + N αk [n] n=1 n=1 K X N X k=1 − K X N X k=1 n=1 k=1 k=1 βn pk [n] − K X N X k=1 n=1 νn αk [n] + N X n=1 βn Pmax + N X νn , (15) n=1 where λ = {λk , ∀ k}, µ = {µk,n, ∀ k, n}, β = {βn , ∀ n}, and ν = {νn , ∀ n} are the non-negative Lagrange multipliers associated with constraints (14b), (14c), (14d), and (14f), respectively. The 14 boundary constraints (14e) and (14g) will be absorbed into the optimal solution in the following. Accordingly, the dual function is given by f (λ, µ, β, ν) = max L(η, A, P, λ, µ, β, ν) η,A,P s.t. (16a) pk [n] ≥ 0, ∀ k, n, (16b) 0 ≤ αk [n] ≤ 1, ∀ k, n, (16c) for which the following lemma holds. Lemma 1. To make f (λ, µ, β, ν) bounded from the above in (16), i.e., f (λ, µ, β, ν) < +∞, it P PK PN follows that K n=1 µk,n θk = 1 must hold. k=1 λk − k=1 PK PK PN PK Proof. This is shown by contradiction. If k=1 λk − n=1 µk,n θk > 1 or k=1 k=1 λk − PK PN n=1 µk,n θk < 1, it follows that f (λ, µ, β, ν) → +∞ by setting η → −∞ or η → +∞. k=1 Thus, neither of the above two inequalities can be true and the lemma is proved. Lemma 1 imposes additional constraints for dual variables λ and µ. As such, the dual problem of problem (14) is given by min f (λ, µ, β, ν) (17a) λ,µ,β,ν s.t. K X λk − K X N X µk,n θk = 1, (17b) λ  0, µ  0, β  0, ν  0. (17c) k=1 k=1 n=1 Next, we show how to obtain the primal optimal solution by applying the Lagrange duality. 1) Obtaining f (λ, µ, β, ν) by Solving Problem (16) : With the given dual variables, problem (16) can be decomposed into KN + 1 subproblems that can be solved independently in parallel. Specifically, one subproblem is for optimizing η and the other KN subproblems are for optimizing A and P, i.e., max η max αk [n],pk [n] s.t.  1− K X k=1 λk − K X N X k=1 n=1 µk,n θk ! η,    pk [n]gk [n] λk − βn pk [n] − νn αk [n] + µk,n αk [n] log2 1 + N αk [n] (18) (19a) pk [n] ≥ 0, ∀ k, n, (19b) 0 ≤ αk [n] ≤ 1, ∀ k, n, (19c) 15 P where each subproblem in (19) is for user k in time slot n. For problem (18), since K k=1 λk − PK PN n=1 µk,n θk = 1 holds as in Lemma 1, the objective value is zero which is independent of k=1 the value of η. This implies that we can choose any arbitrary real number as the optimal solution, denoted by η ⋆ . Without loss of generality, we simply set η ⋆ = 0 for the purpose of obtaining the dual function f (λ, µ, β, ν) and updating the dual variables1. Next, we consider problem (19). Since problem (19) is jointly concave with respect to pk [n] and αk [n], the solution that satisfies the Karush-Kuhn-Tucker (KKT) conditions is also the optimal solution. By taking the derivative of the objective function of (19) with respect to pk [n], the optimal power allocation, denoted by p⋆k [n], can be obtained as + 1 λk + Nµk,n − , (20) = αk [n] Nβn ln 2 gk [n] i+ h p⋆ [n] λk +N µk,n 1 where [x]+ , max{x, 0}. Let pek [n] , αkk [n] = N − , which can be regarded as the βn ln 2 gk [n] p⋆k [n]  power spectrum density of user k in time slot n. Note that in (20), the power allocation follows a multi-level water-filling structure. Substituting the obtained p⋆k [n] into problem (19) yields   λk + Nµk,n log2 (1 + pek [n]gk [n]) − βn pek [n] − νn αk [n] (21a) max αk [n] N s.t. 0 ≤ αk [n] ≤ 1, ∀ k, n. (21b) It is evident that problem (21) is a linear program (LP) with only one optimization variable, αk [n]. Thus, the optimal bandwidth allocation, denoted by αk⋆ [n], can be obtained as    λk + Nµk,n   1, if log2 (1 + pek [n]gk [n]) − βn pek [n] − νn > 0,   N      ⋆ λk + Nµk,n αk [n] = a, if log2 (1 + pek [n]gk [n]) − βn pek [n] − νn = 0,   N      0, otherwise, ∀ k, n. (22) where a can be any arbitrary real number between 0 and 1 since the objective value of problem (21) is not affected in this case. For simplicity, we set a = 0 as for the case of η. In general, (22) cannot provide the optimal primal solution for problem (14) even with optimal dual variables. Nevertheless, with the above proposed solutions to problems (18) and (19), the dual function f (λ, µ, β, ν) is obtained. 1 We note that η ⋆ = 0 cannot be the optimal primal solution to problem (14). How to obtain the optimal primal solution for this problem will be discussed later in Section III-A-3). 16 2) Obtaining Optimal Dual Solution to Problem (17) : After obtaining (η ⋆ , A⋆ , P⋆ ) for given λ, µ, β, and ν, we next solve the dual problem (17) to find the optimal dual variables that maximize f (λ, µ, β, ν). Note that although the dual function f (λ, µ, β, ν) is always convex by definition, it is non-differentiable in general. As a result, the commonly used subgradient based method such as the ellipsoid method, can be used to solve problem (17). In each iteration, the dual variables λ, µ, β, and ν are updated based on the subgradients of both the objective function and the constraint functions in problem (17). Specifically, the subgradient of the objective function is denoted by s0 = [∆λT , ∆µT , ∆β T , ∆ν T ]T where ∆λ, ∆µ, ∆β, and ∆ν are vectors with the elements respectively given by   N pk [n]gk [n] 1 X , ∀ k, αk [n] log2 1 + ∆λk = N n=1 αk [n]   pk [n]gk [n] ∆µk,n = αk [n] log2 1 + , ∀ k, n, αk [n] ∆βn = Pmax − K X pk [n], ∀ n, (23) (24) (25) k=1 ∆νn = 1 − K X αk [n], ∀ n. (26) k=1 Furthermore, the equality constraint in (17b) is equivalent to two inequality constraints: 1 − PK PN PK PK PN PK λ + µ θ ≤ 0 and −1 + λ − k k,n k k n=1 µk,n θk ≤ 0. Thus, the k=1 k=1 n=1 k=1 k=1 subgradient of the former constraint function is denoted by s1 = [∆λT , ∆µT , ∆β T , ∆ν T ]T where the corresponding elements are given by ∆λk = −1, ∆µk,n = −θk , ∆βn = 0, ∆νn = 0. In addition, the subgradient of the latter constraint function is given by s2 = −s1 . With the above subgradients, the dual variables can be updated by the constrained ellipsoid method toward the optimal solution with global convergence [33]. 3) Constructing Optimal Primal Solution to Problem (14) : Based on the obtained dual optimal solution λ∗ , µ∗ , β ∗ , and ν ∗ , it remains to obtain the optimal primal solution {η ∗ , A∗, P∗ } to problem (14). It is worth pointing out that for a convex optimization problem, the optimal solution that maximizes the Lagrangian function is the optimal primal solution if and only if such a solution is unique and primal feasible [32]. However, in our case, the optimal solutions η ⋆ and A⋆ that P PK PN maximize L(η, A, P, λ, µ, β, ν) are not unique given that K n=1 µk,n θk = 1 and k=1 λk − k=1   λk +N µk,n log2 (1 + pek [n]gk [n]) − βn pek [n] − µn = 0 as in (18) and (22). Therefore, additional N steps are needed in order to construct the optimal primal solution. The key observation is that 17 Algorithm 1 Joint bandwidth and power allocation algorithm for solving problem (14). 1: Initialize λ, µ, β, ν, and the ellipsoid. 2: repeat 3: Solve problem (18) and (19) to obtain η ⋆ , A⋆ , and P⋆ . 4: Compute the subgradients of the objective function and the constraint functions in problem (17). 5: Update λ, µ, β, and ν by using the constrained ellipsoid method. 6: until λ, µ, β, and ν converge within a prescribed accuracy. 7: Set (λ∗ , µ∗ , β ∗ , ν ∗ ) ← (λ, µ, β, ν). 8: Obtain η ∗ , A∗ , and P∗ by solving problem (27) and using (20). with given λ∗ , µ∗ , and β ∗ , the optimal power spectrum density (the ratio of the optimal power allocation to the optimal bandwidth allocation), i.e., pe∗k [n] = p∗k [n] , α∗k [n] can be uniquely obtained from (20). By substituting pe∗k [n] into the primal problem (14), we have max η,A s.t. η N 1 X αk [n] log2 (1 + pe∗k [n]gk [n]) ≥ η, ∀ k, N n=1 αk [n] log2 (1 + pe∗k [n]gk [n]) ≥ θk η, ∀ k, n, K X (27a) (27b) (27c) αk [n]e p∗k [n] ≤ Pmax , ∀ n, (27d) αk [n] ≤ 1, ∀ n, (27e) k=1 K X k=1 0 ≤ αk [n] ≤ 1, ∀ k, n. (27f) Given pe∗k [n], it is easy to observe that problem (27) is an LP with respect to A and η, which thus can be efficiently solved by using standard convex optimization solvers such as CVX [34]. After obtaining the optimal bandwidth allocation A∗ , the corresponding power allocation P∗ can be obtained as p∗k [n] = pe∗k [n]αk∗ [n], ∀ k, n. The details of the procedures for obtaining the optimal solution to problem (14) are summarized in Algorithm 1. The computational complexity of Algorithm 1 consists of three parts. The first part is for solving problems (18) and (19), the second part is for updating the dual variables by the ellipsoid method, and the third part is 18 for solving linear program problem (27). In step 3) of Algorithm 1, the complexity of solving problem (18) is O(1) and that of solving (19) is O(KN). The complexities of step 4) and 5) are O(KN) and O(K 2N 2 ), respectively. Since the ellipsoid method takes O(K 2 N 2 ) to converge, the total complexity for step 2) to 6) is O(K 4 N 4 ) [33]. The complexity of solving (27) is O(K 3 N 3 ). Therefore, the total complexity of Algorithm 1 is O(K 4N 4 ). B. UAV Trajectory Optimization Given any feasible bandwidth and power allocation {A, P}, problem (12) is simplified into the following problem for optimizing the UAV trajectory Q only, i.e., max η η,Q (28a)   N γk [n] 1 X αk [n] log2 1 + 2 ≥ η, ∀ k, s.t. N n=1 H + ||q[n] − wk ||2   γk [n] αk [n] log2 1 + 2 ≥ θk η, ∀ k, n, H + ||q[n] − wk ||2 where γk [n] , (28b) (28c) 2 ||q[n + 1] − q[n]||2 ≤ Smax , n = 1, ..., N − 1, (28d) q[1] = q[N], (28e) pk [n]ρ0 . αk [n]BN0 Note that problem (28) is not a convex optimization problem since the LHSs of constraints (28b) and (28c) are not concave with respect to q[n]. In general, there is no efficient method to obtain the optimal solution for such a non-convex problem. However, we observe that the LHSs of both (28b) and (28c) are convex with respect to ||q[n] − wk ||2 . Note that for a convex function, its first-order Taylor expansion is the global under-estimator at any point [32]. This thus motivates us to leverage the successive convex optimization technique to tackle the non-convex problem (28) by an iterative algorithm, where in each iteration, the LHSs of both (28b) and (28c) are replaced by more tractable functions derived from the Taylor expansion at a given local point. Specifically, with given local point qr [n], we have the following inequality  rk [n] = αk [n] log2 1 + γ0 2 H + ||q[n] − wk ||2    ≥ αk [n] −Ark [n] ||q[n] − wk ||2 − ||qr [n] − wk ||2 + Bkr [n] , rklb,r [n], (29) 19 where Ark [n] = (H 2 ||qr [n] +  Bkr [n] = log2 1 + − wk γ0 log2 e 2 || )(H 2 + ||qr [n] γ0 2 r H + ||q [n] − wk ||2  − wk ||2 + γ0 ) , (30) , ∀ k, n. (31) For any given local point Qr , define the function η lb,r (A, Q) = min i∈K PN lb,r n=1 rk [n]. With the lower bounds rklb,r [n], ∀ k, in (29) and Qr , problem (28) is approximated as the following problem η lb,r max ηlb,r ,Q N 1 X lb,r r [n] ≥ η lb,r , ∀ k, s.t. N n=1 k (32a) rklb,r [n] ≥ θk η lb,r , ∀ k, n, (32b) 2 ||q[n + 1] − q[n]||2 ≤ Smax , n = 1, ..., N − 1, (32c) q[1] = q[N]. (32d) Note that constraints (32a), (32b), and (32c) are all convex quadratic constraints and (32d) is a linear constraint. Therefore, problem (32) is a convex quadratically constrained quadratic program (QCQP) that can be solved within a polynomial complexity by standard convex optimization solvers such as CVX [34]. It is worth pointing out that due to the lower bounds adopted from (29), constraints (32a) and (32b) imply (28b) and (28c), respectively, but the reverse does not hold in general. In this regard, the optimal objective value obtained by solving problem (32) always serves as a lower bound for that of problem (28). C. Overall Algorithm Design In this section, we propose an efficient iterative algorithm to solve problem (12) based on the results in previous two sections. Note that the conventional block coordinate descent method alternately optimizes one block of optimization variables in each iteration while keeping other blocks of optimization variables fixed, until the convergence is achieved [35], [36]. However, directly applying such a block coordinate descent method for our considered problem, i.e., by alternately optimizing one block from the power and bandwidth allocation variables {A, P} in problem (14) and the UAV trajectory variables Q in problem (28), with the other block fixed, 20 may fail to update the UAV trajectory effectively. This can be observed from the MRR constraints in problem (28), i.e.,  αk [n] log2 1 + γk [n] 2 H + ||q[n] − wk ||2  ≥ θk η, ∀ k, n. (33) For given αk [n] and pk [n], ∀ k, n, since problem (28) aims to increase η by optimizing UAV trajectory q[n], the right-hand-side (RHS) of (33) is expected to increase after each iteration. As a result, for users that have met constraints in (14c) with equality in the last iteration, the only way to increase the LHS of (33) in the current iteration is by decreasing ||q[n] − wk ||2 , ∀ k. This implies that in each time slot n, the UAV’s location q[n] needs to be updated to decrease the distances from the UAV to all these users. Thus, the freedom for optimizing the UAV trajectory is severely limited which can lead to ineffective update of the UAV trajectory in each iteration. To tackle this issue, we propose a new parameter-assisted block coordinate descent method where each parameter is a temporary MRR for a corresponding user k, denoted by θtemp,k , which is set larger than the actual MRR target θk , if 0 < θk < 1. The main idea is to use the newly introduced temporary MRR θtemp,k > θk for solving problem (28) rather than directly using the target θk . Specifically, θtemp,k for each user k is gradually decreased before solving problem (28) in each iteration, until the target MRR θk is achieved for all users. As such, η will increase after each iteration, while the constraints in (33) will be relaxed due to the decrease of θtemp,k ’s, which thus permits a more effective UAV trajectory update in each iteration compared to the conventional block coordinate decent method. Furthermore, the proposed method also generates a feasible solution for the original problem (12) since θk will be eventually achieved by gradually decreasing θtemp,k with a predefined step size, θstep,k > 0. The details of the proposed method are summarized in Algorithm 2. The convergence of the proposed Algorithm 2 can be analyzed as follows. From step 4, it can be seen that θk , ∀ k, is non-increasing over the iterations. Recall that the objective value of problem (12) is element-wise non-increasing with respect to θk , ∀ k. Thus, it can be shown that the objective value achieved by Algorithm 2 is non-decreasing in each iteration. Furthermore, the objective value of problem (12) is bounded from the above. Thus, the proposed Algorithm 2 is guaranteed to converge and the obtained solution is also feasible for the original problem (11). Although the obtained solution is generally suboptimal, we validate the effectiveness of Algorithm 2 via simulations by comparing with other benchmark schemes in Section IV. 21 Algorithm 2 Parameter-assisted block coordinate descent algorithm for solving problem (12). 1: Initialize Q0 , θini,k , and Lmax . Let r = 0, θtemp,k = θini,k , and θstep,k = 2: repeat 3: θini,k −θk , Lmax ∀ k. Solve problem (14) by applying Algorithm 1 for given Qr , and denote the optimal solution as {Ar+1, Pr+1 }. 4: θtemp,k = max{θtemp,k − (r + 1)θstep,k , θk }, ∀ k. 5: Solve problem (28) for given {Ar+1, Pr+1 , Qr , θtemp,k }, and denote the optimal solution as {Qr+1 }. 6: 7: Update r = r + 1. until θtemp,k = θk , ∀ k, and the fractional increase of the objective value is below a threshold ǫ > 0. D. UAV Initial Trajectory and Users’ MRR Initialization In Algorithm 2, the initial UAV trajectory, Q0 = {q0 [n], ∀ n}, and the initial temporary users’ MRRs, θini,k , ∀ k, need to be set. First, we propose in the following a general and systematic trajectory initialization scheme based on the simple circular UAV trajectory, which also includes the one proposed in [21] with θk = 0, ∀ k, as a special case. For a circular UAV trajectory, we need to obtain the circle center cini = [xini , yini]T and radius rini . For convenience, the circle center is set as the geometry center of all users, which is given by cini = PK k=1 K wk . The main idea for determining the circle radius of the initial circular trajectory is based on the following three observations. First, it is intuitive that as θk increases, the area covered by the UAV trajectory shall decrease, as implied in Theorem 1. As such, the initial circle radius rini should decrease with θk , ∀ k. Second, when θk = 0, ∀ k, the initial circle radius should be simplified to that for the case when the MRR constraints are not considered as in [21]. Third, it is also known that when θk = 1, ∀ k, the UAV mobility does not provide any performance gain, which implies that the UAV should remain static. In such a case, the UAV trajectory becomes a point and the initial circle radius is thus zero. Based on the above observations, we propose to set the initial circle radius as rini = 1− PK k=1 θk K ! r0 , (34) where r0 is the circle radius for the case when θk = 0, ∀ k, or no MRR constraints are considered [21]. According to [21], r0 is obtained as follows: 1) by using the user geometry center cini as the 22 circle center, we first calculate the radius of a minimum circle that can cover all ground users, denoted by rmin = max ||wk −cini ||; 2) to balance the number of users outside and inside the UAV k∈K T rmin , 2 }. trajectory circle as well as satisfying the UAV speed constraint, we set r0 = min{ Vmax 2π From (34), it is easy to check that when θk = 0, ∀ k, rini = r0 and when θk = 1, ∀ k, rini = 0, , ∀ n. With cini and rini , the initial circular UAV trajectory Q0 is as expected. Let ϕn = 2π Nn−1 −1 given as follows, q0 [n] = [xini + rini cos ϕn , yini + rini sin ϕn ]T , n = 1, ..., N. (35) Next, we initialize the users’ MRRs, θini,k , ∀ k. Note that if user k has no MRR constraint, i.e., θk = 0, then there exists no constraint for user k in (33). Thus, user k will not cause the ineffective UAV trajectory update problem previously described in Section III-C and its initial MRR can be directly set as θini,k = 0. In contrast, as long as user k has a non-trivial MRR target, i.e., θk > 0, N corresponding MRR constraints in (33) will be imposed for user k which may cause ineffective updates of the UAV trajectory. Thus, the initial MRRs of users are set as   1, if θk > 0, (36) θini,k =  0, if θk = 0. IV. N UMERICAL R ESULTS In this section, numerical results are provided to validate the proposed joint OFDMA resource allocation and UAV trajectory design as well as the fundamental throughput-delay tradeoff in UAV-enabled wireless communications. We consider a system with K = 4 ground users that are located in a horizontal plane as shown in Fig. 2, marked by ‘×’s. The UAV is assumed to fly at a fixed altitude H = 500 m [31]. The total available communication bandwidth is B = 10 MHz and the noise power spectrum density at the ground users is assumed to be identical and set as N0 = −169 dBm/Hz. The channel power gain at the reference distance d0 = 1 m is set as ρ0 = −50 dB. Other parameters are set as Pmax = 0.1 W, Vmax = 50 m/s, T = 270 s, and N = 540, respectively, if not specified otherwise. For illustration, all the trajectories in the simulations are sampled every 4 s and the sampled points are marked by ‘△’s. A. UAV Trajectory and Max-min Throughput versus Homogeneous MRRs We first consider the homogeneous delay requirement case when all ground users have the same MRR, i.e., θk = θ, ∀ k. In Figs. 2 and 3, the UAV trajectory and the max-min throughput are 1500 1500 1000 1000 500 500 y(m) y(m) 23 0 0 −500 −500 −1000 −1000 −1500 −1500 −1000 −500 0 500 1000 −1500 −1500 1500 −1000 −500 x(m) 1500 1500 1000 1000 500 500 0 −500 −1000 −1000 −500 0 1000 1500 500 1000 1500 0 −500 −1000 500 (b) θ = 0.6 y(m) y(m) (a) θ = 0 −1500 −1500 0 x(m) 500 1000 1500 −1500 −1500 −1000 x(m) (c) θ = 0.8 −500 0 x(m) (d) θ = 1 Fig. 2. UAV trajectory versus homogeneous MRR θ = θk , ∀ k, for T = 270 s. illustrated respectively under different MRRs. It can be observed from Fig. 2 that as the MRR, θ, increases, the UAV’s flight distance decreases and the UAV’s trajectory shrinks gradually from a square to a smaller ellipse and finally a fixed point, given the same flight period T . In particular, when θ = 0, i.e., no MRR constraint is considered as in [21], the UAV sequentially visits and stays above each of the ground users by maximally exploiting its mobility. As such, the best air-to-ground channel can be realized between the UAV and each ground user. However, when θ > 0, the UAV’s trajectory adaptively changes depending on the value of θ, as expected. Notice that in this setup, the closer the UAV flies to one particular user, the farther it is away from some other users inevitably. As a result, meeting the MRR constraints of these users will consume more resources (power, bandwidth) and thus becomes the bottleneck for improving the max-min throughput of the system. Such a situation becomes worse when the MRR and/or the inter-user distance becomes larger. Generally speaking, with more stringent MRR constraints, the UAV trajectory tends to be more restricted to avoid getting too far away from any of the users. Finally, as all ground users have the same MRR constraint as well as the same average 24 1 Static UAV Initial trajectory Fly−and−hover trajectory Proposed trajectory Max−min throughput (bps/Hz) 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0 0.2 0.4 0.6 0.8 1 MRR, θ Fig. 3. Max-min throughput versus homogeneous MRR θ = θk , ∀ k, for T = 270 s. throughput, the UAV trajectories are shown to be all symmetric over the users in Fig. 2. The effect of the MRR constraint on the max-min average throughput is shown in Fig. 3. Specifically, we compare the following four trajectories: 1) Proposed trajectory which is obtained by applying Algorithm 2; 2) Fly-and-hover trajectory where the UAV flies with the maximum speed to visit all the users and hovers (with zero speed) above each of them by equally allocating the remaining time2; 3) Initial circular trajectory as described in Section III-D; and 4) Static UAV where the UAV remains static above the geometry center of the users. For all the four schemes considered, the bandwidth and power allocation is optimized by applying Algorithm 1 with the corresponding UAV trajectory. First, we observe that the max-min average throughput gradually decreases with the MRR for the first three considered trajectories with a mobile UAV in general. This is due to the fundamental tradeoff between the system throughput and the user delay/MRR constraint, which is in accordance with Theorem 1. Second, when the MRR is small, the proposed trajectory significantly outperforms the circular trajectory and static UAV. This is because a small MRR in general implies a large degree of freedom for the UAV trajectory design, but the static UAV cannot exploit the UAV mobility while the circular trajectory does not fully exploit the UAV mobility. In contrast, the fly-and-hover trajectory is observed to achieve the throughput very 2 It is worth pointing out that this trajectory is only feasible when T is sufficient large such that the UAV can visit above each of all ground users. 25 1.3 Max−min throughput (bps/Hz) 1.2 θ=0 θ=0.3 θ=0.6 θ=1 1.1 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0 100 200 300 400 500 600 700 800 Period T (s) Fig. 4. Max-min throughput versus UAV flight period T . close to the proposed trajectory for small MRR values. However, when the MRR becomes large, the fly-and-hover trajectory suffers from a significant throughput loss compared to the proposed trajectory. This is expected since the fly-and-hover trajectory results in highly asymmetric user channels over time and thus is inefficient for meeting increasingly more stringent users’ MRR requirements. Finally, when the MRR reaches the maximum value of one, the max-min average throughput of the proposed trajectory becomes identical to that of static UAV as the trajectory converges to the same point as the static UAV. In Fig. 4, the effect of the UAV flight period T on the max-min average throughput is shown under different values of the homogeneous MRR, θ. It is observed that the max-min throughput in the three cases with θ < 1 all increases with T , while for the case of θ = 1, the max-min throughput remains constant, regardless of T . This suggests that as long as the users have delaytolerant data traffic, i.e, θ < 1, the UAV mobility indeed provides throughput gains over a static UAV with θ = 1 for any T > 0. In addition, such a throughput gain generally increases with more flight time for the UAV, although the gain is more pronounced when θ is smaller or less strict delay/MRR constraints are applied. This is because in such cases, as T increases, the UAV has more time to get closer to each of the users and even be able to hover above them to enjoy the best channels to them. In contrast, if the services required by users are all delay-constrained, i.e., θ = 1, then the UAV is unable to achieve any throughput gain over the static case since 26 1500 1500 1000 1000 user 3 user 1 500 y(m) y(m) 500 0 −500 −1000 −1500 −1500 0 −500 user 2 user 4 −1000 −1000 −500 0 500 1000 −1500 −1500 1500 −1000 −500 1500 1500 1000 1000 500 500 0 −500 −1000 −1000 −500 0 1000 1500 1000 1500 0 −500 −1000 500 (b) θ3 = θ4 = 0.4 y(m) y(m) (a) θ3 = θ4 = 0 −1500 −1500 0 x(m) x(m) 500 1000 1500 −1500 −1500 x(m) (c) θ3 = θ4 = 0.6 −1000 −500 0 500 x(m) (d) θ3 = θ4 = 0.8 Fig. 5. UAV trajectory versus MRRs of equal θ3 and θ4 for T = 270 s with fixed θ1 = θ2 = 0.4. the optimal UAV trajectory in this case is also a fixed point. The above observations further demonstrate the fundamental throughput-delay tradeoff. B. UAV Trajectory and Max-min Throughput versus Heterogeneous MRRs Next, we consider the practical case when ground users have different MRRs in general. In this example, we fix θ1 = θ2 = 0.4 and vary θ3 and θ4 by assuming they are equal to show their effects on the proposed UAV trajectory and achievable max-min throughput. First, from Fig. 5, we observe that as the MRRs of users 3 and 4 become larger, the UAV tends to adjust its trajectory to get closer to these two users so as to meet their increasingly more stringent minimum-rate requirements. Meanwhile, since the MRRs of users 1 and 2 are fixed, their priority is higher/lower than that of users 3 and 4 in Fig. 5 (a) and Fig. 5 (c)/(d), respectively, in the optimized UAV trajectory design. This thus results in asymmetric UAV trajectories for the four users in these cases, which is in contrast to the symmetric trajectory in Fig. 5 (b) with the homogeneous users’ MRR constraint. As such, users 1 and 2 in Fig. 5 (c) and (d) on average 27 0.7 Static UAV Initial trajectory Fly−and−hover trajectory Proposed trajectory Max−min throughput (bps/Hz) 0.65 0.6 0.55 0.5 0.45 0.4 0.35 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 MRR, θ Fig. 6. Max-min throughput versus heterogeneous MRRs θ = θ3 = θ4 for T = 270 s with fixed θ1 = θ2 = 0.4. have worse air-to-ground channels than users 3 and 4 along the UAV trajectory. Since the same average throughput needs to be achieved for all users, the UAV needs to lower its speed and even hover at some positions near users 1 and 2 to compensate their inferior channels caused by the asymmetric UAV trajectory. Similar to Fig. 3, we compare in Fig. 6 the max-min throughput versus the MRRs of users 3 and 4 under the aforementioned four UAV trajectories. As θ3 and θ4 increase, the max-min average throughput is observed to decrease gradually, similarly as in Fig. 3. However, different from Fig. 3, since only two users, namely, users 3 and 4, rather than all users, increase their MRRs, the decreasing of the max-min throughput versus θ in Fig. 6 is less significant as compared to that in Fig. 3. V. C ONCLUSIONS Motivated by employing UAVs to provide both delay-constrained and delay-tolerant services in future wireless networks, we consider in this paper a UAV-enabled OFDMA network for serving multiple ground users with heterogeneous communication delay requirements. Specifically, by taking into account the users’ MRR constraints, the system max-min average throughput is maximized via jointly optimizing the UAV trajectory and OFDMA resource allocation. We first show that the max-min throughput in general decreases with the MRR of any user, which implies that the throughput gain arising from the UAV’s mobility is less significant as the user delay requirements become more stringent. Then, we show that directly applying the conventional block 28 coordinate descent method to solve the formulated problem may fail to update the UAV trajectory effectively. To overcome this issue, we propose a new parameter-assisted block coordinate descent algorithm which is shown by simulations to perform satisfactorily. Simulation results are provided to characterize the fundamental tradeoff between the system throughput and the user communication delay under different MRR setups. We hope that the results of the paper can help assessing more practically the performance of UAV-enabled wireless systems with heterogeneous delay requirements. Although a single UAV is considered in this work, the multi-UAV scenario with potentially co-channel interference [18] is worth pursuing. In addition, a cross-layer design by considering the UAV’s finite data buffer and the queuing delay along with UAV trajectory and physical-layer resource allocation is worthy of further investigation. Finally, as the UAV’s energy consumption and hence endurance are crucial in practice, it is appealing to consider energy-efficient UAV trajectory design [16], [37] under heterogenous user delay requirements. R EFERENCES [1] Q. Wu and R. Zhang, “Delay-constrained throughput maximization in UAV-enabled OFDM systems,” in Proc. IEEE APCC, Dec. 2017, to appear. [2] “Small unmanned aerial vehicles for aerial imaging, recreation, and aerial games: Global market analysis and forecasts.” [Online] Available: https://www.tractica.com/research/consumer-drones/. [3] “Intel is bringing its drone light shows to the olympics.” [Online] Available: https://unmanned-aerial.com/intel-bringingdrone-light-shows-olympics. [4] “Safe DRONE act of 2017.” [Online] Available: https://www.warner.senate.gov/public/index.cfm/pressreleases?ID= DFF94CA4-3691-4753-AEF2-EB3E97148754. [5] “Cellular drone communication: LTE drone trial report.” [Online] Available: https://www.qualcomm.com/documents/ lte-unmanned-aircraft-systems-trial-report. [6] Y. Zeng, R. Zhang, and T. J. Lim, “Wireless communications with unmanned aerial vehicles: Opportunities and challenges,” IEEE Commun. Mag., vol. 54, no. 5, pp. 36–42, May 2016. [7] A. Al-Hourani, S. Kandeepan, and S. Lardner, “Optimal LAP altitude for maximum coverage,” IEEE Wireless Commun. Lett., vol. 3, no. 6, pp. 569–572, Dec. 2014. [8] J. Lyu, Y. Zeng, R. Zhang, and T. J. Lim, “Placement optimization of UAV-mounted mobile base stations,” IEEE Commun. Lett., vol. 21, no. 3, pp. 604–607, Mar. 2017. [9] R. I. Bor-Yaliniz, A. El-Keyi, and H. Yanikomeroglu, “Efficient 3-D placement of an aerial base station in next generation cellular networks,” in Proc. IEEE ICC, May 2016. [10] V. V. Chetlur and H. S. Dhillon, “Downlink coverage analysis for a finite 3D wireless network of unmanned aerial vehicles,” [Online] Available: https://arxiv.org/abs/1701.01212. [11] A. Fotouhi, M. Ding, and M. Hassan, “Dynamic base station repositioning to improve performance of drone small cells,” in Proc. IEEE GLOBECOM, Dec. 2016. [12] C. Zhang and W. Zhang, “Spectrum sharing for drone networks,” IEEE J. Sel. Areas Commun., vol. 35, no. 1, pp. 136–144, Jan. 2017. 29 [13] K. Li, W. Ni, X. Wang, R. P. Liu, S. S. Kanhere, and S. Jha, “Energy-efficient cooperative relaying for unmanned aerial vehicles,” IEEE Trans. Mobile Comput., vol. 15, no. 6, pp. 1377–1386, Jun. 2016. [14] M. Mozaffari, W. Saad, M. Bennis, and M. Debbah, “Unmanned aerial vehicle with underlaid device-to-device communications: Performance and tradeoffs,” IEEE Trans. Wireless Commun., vol. 15, no. 6, pp. 3949–3963, Jun. 2016. [15] Y. Zeng, R. Zhang, and T. J. Lim, “Throughput maximization for UAV-enabled mobile relaying systems,” IEEE Trans. Commun., vol. 64, no. 12, pp. 4983–4996, Dec. 2016. [16] Y. Zeng and R. Zhang, “Energy-efficient UAV communication with trajectory optimization,” IEEE Trans. Wireless Commun., vol. 16, no. 6, pp. 3747–3760, Jun. 2017. [17] J. Lyu, Y. Zeng, and R. Zhang, “Cyclical multiple access in UAV-aided communications: A throughput-delay tradeoff,” IEEE Wireless Commun. Lett., vol. 5, no. 6, pp. 600–603, Dec. 2016. [18] Q. Wu, Y. Zeng, and R. Zhang, “Joint trajectory and communication design for multi-UAV enabled wireless networks,” IEEE Trans. Wireless Commun., to appear, [Online] Available: https://arxiv.org/abs/1705.02723. [19] Q. Wu, G. Y. Li, W. Chen, D. W. K. Ng, and R. Schober, “An overview of sustainable green 5G networks,” IEEE Wireless Commun. Mag., vol. 24, no. 4, pp. 72–80, Aug. 2017. [20] S. Zhang, Q. Wu, S. Xu, and G. Li, “Fundamental green tradeoffs: Progresses, challenges, and impacts on 5G networks,” IEEE Commun. Surveys Tuts., vol. 19, no. 1, pp. 33–56, First Quarter 2017. [21] Q. Wu, Y. Zeng, and R. Zhang, “Joint trajectory and communication design for UAV-enabled multiple access,” in Proc. IEEE Globecom, 2017, to appear, [Online] Available: https://arxiv.org/abs/1704.01765. [22] Q. Wu, J. Xu, and R. Zhang, “Capacity characterization of UAV-enabled two-user broadcast channel,” submitted to IEEE J. Sel. Areas Commun., 2017, [Online] Available: https://arxiv.org/abs/1801.00443. [23] G. Zhang, Q. Wu, M. Cui, and R. Zhang, “Securing UAV communications via trajectory optimization,” in Proc. IEEE GLOBECOM, Dec. 2017, to appear. [24] J. G. Andrews, S. Buzzi, W. Choi, S. V. Hanly, A. Lozano, A. C. Soong, and J. C. Zhang, “What will 5G be?” IEEE J. Sel. Areas Commun., vol. 32, no. 6, pp. 1065–1082, Jun. 2014. [25] Q. Wu, W. Chen, M. Tao, J. Li, H. Tang, and J. Wu, “Resource allocation for joint transmitter and receiver energy efficiency maximization in downlink OFDMA systems,” IEEE Trans. Commun., vol. 63, no. 2, pp. 416–430, Feb. 2015. [26] F. Wang, W. Chen, H. Tang, and Q. Wu, “Joint optimization of user association, subchannel allocation, and power allocation in multi-cell multi-association OFDMA heterogeneous networks,” IEEE Trans. Commun., vol. 65, no. 6, Jun. 2017. [27] S. Jeong, O. Simeone, and J. Kang, “Mobile edge computing via a UAV-mounted cloudlet: Optimal bit allocation and path planning,” [Online] Available: https://arxiv.org/abs/1609.05362. [28] M. Mozaffari, W. Saad, M. Bennis, and M. Debbah, “Mobile internet of things: Can UAVs provide an energy-efficient mobile architecture?” in Proc. IEEE GLOBECOM, Dec. 2016. [29] X. Lin et al., “The sky is not the limit: LTE for unmanned aerial vehicles,” [Online] Available: https://arxiv.org/abs/1707. 07534. [30] B. Van Der Bergh, A. Chiumento, and S. Pollin, “LTE in the sky: trading off propagation benefits with interference costs for aerial nodes,” IEEE Commun. Mag., vol. 54, no. 5, pp. 44–50, May 2016. [31] D. W. Matolak and R. Sun, “Air-ground channel characterization for unmanned aircraft systemsłpart III: The suburban and near-urban environments,” IEEE Trans. Veh. Technol., vol. 66, no. 8, pp. 6607–6618, Jan. 2017. [32] S. Boyd and L. Vandenberghe, Convex Optimization. Cambridge University Press, 2004. [33] S. Boyd, “Ellipsoid method,” stanford University, California, USA. [Online] Available: https://stanford.edu/class/ee364b/ lectures/ellipsoid method notes.pdf. 30 [34] M. Grant and S. Boyd, “CVX: MATLAB software for disciplined convex programming,” 2016. [Online] Available: http: //cvxr.com/cvx. [35] D. P. Bertsekas, Nonlinear Programming. Athena Scientific, 1999. [36] M. Hong, M. Razaviyayn, Z.-Q. Luo, and J.-S. Pang, “A unified algorithmic framework for block-structured optimization involving big data: With applications in machine learning and signal processing,” IEEE Signal Process. Mag., vol. 33, no. 1, pp. 57–77, Jan. 2016. [37] D. Yang, Q. Wu, Y. Zeng, and R. Zhang, “Energy trade-off in ground-to-UAV communication via trajectory design,” submitted to IEEE Trans. Veh. Technol, 2017, [Online] Available: https://arxiv.org/abs/1709.02975.
7cs.IT
Using MOEAs to Outperform Stock Benchmarks in the Presence of Typical Investment Constraints Andrew Clark1 and Jeff Kenyon2, Thomson Reuters Abstract Portfolio managers are typically constrained by turnover limits, minimum and maximum stock positions, cardinality, a target market capitalization and sometimes the need to hew to a style (such as growth or value). In addition, portfolio managers often use multifactor stock models to choose stocks based upon their respective fundamental data. We use multiobjective evolutionary algorithms (MOEAs) to satisfy the above real-world constraints. The portfolios generated consistently outperform typical performance benchmarks and have statistically significant asset selection. In finance, a portfolio is a collection of assets held by an institution or a private individual. The portfolio selection problem seeks the optimal way to distribute a given monetary budget on a set of available assets. The problem usually has two criteria: expected return to be maximized and risk to be minimized. Classical mean-variance portfolio selection aims at simultaneously maximizing the expected return of the portfolio and minimizing portfolio risk. In the case of linear equality and inequality constraints, the problem can be solved efficiently by quadratic programming, i.e., variants of Markowitz‟s critical line algorithm. What complicates this simple 1 2 Andrew Clark, Chief Index Strategist, Thomson Reuters Indices & Lipper, [email protected] Jeff Kenyon, Lead Software Engineer, Thomson Reuters Indices, [email protected] 1 statement of portfolio construction are the typical real-world constraints that are by definition non-convex, e.g. cardinality constraints which limits the number of assets in a portfolio and minimum and maximum buy-in thresholds. In what follows, we use multi-objective evolutionary algorithms (MOEAs)3 as an active set algorithm optimized for portfolio selection. The MOEAs generate the set of all feasible portfolios (those portfolios meeting the constraints), calculates the efficient frontier for each and also their respective Sharpe ratio. The portfolio with the best Sharpe ratio becomes the portfolio used for the next time period. We chose MOEAs to solve a non convex optimization problem because there are certain outstanding problems in terms of their use: 1) In the literature MOEAs have not been used to solve multiperiod financial problems (or multi-period problems in general), 2) The number and types of constraints in a real world financial portfolio problem exceeds what has been done with MOEAs so far and 3) It is not known if MOEA stock selection is statistically significant. We answer all of these questions with a yes thereby advancing the understanding and use of MOEAs. This especially true when it comes to solving a moderately difficult, multi-period real world problem such as those encountered in finance. A multi-objective optimization problem (MOP) differs from a single objective optimization problem because it contains several objectives that require optimization. When optimizing a single objective problem, the best single design solution is the goal. But for multiobjective problem with several (possibly conflicting) objectives, there is usually no single optimal solution. Because of this the decision maker is required to select a solution from a finite set of possible solutions by making compromises. A suitable solution should provide acceptable 3 See Coello et al Evolutionary Algorithms for Solving Multi-Objective Problems, Kluwer, 2002, for a good introduction to MOEAs. 2 performance over all objectives. The main motivation for using evolutionary algorithms (EAs) to solve multi-objective optimization problems is that EAs can deal simultaneously with a set of possible solutions which allows us to find several members of what is called the Pareto optimal set4 in a single run of the algorithm. This differs from deterministic mathematical programming techniques where a series of separate runs is required. Additionally EAs are less susceptible to the shape or continuity of the Pareto front, e.g., they can easily deal with discontinuous and concave Pareto fronts. Discontinuity and concavity problems are known obstacles for deterministic mathematical programming. Adapting any stochastic optimization algorithm (such as an EA) so it can perform a multiobjective optimization requires a change to the method of archiving possible solutions. Any solution on the Pareto front can be identified formally by the fact that it is not dominated by any other possible solution. A solution X is said to be dominated by solution Y if Y is at least as good on all counts (constraints) and better on at least one constraint. Stated mathematically: fi (Y ) fi ( X ) i 1, M and fi (Y ) f i ( X ) for some i As several possible solutions can be generated, an archive of the non-dominated (Pareto optimal) solutions needs to be maintained. A possible archiving scheme is: All feasible solutions (Pareto optimal vectors) generated are candidates for archiving 4 A solution or a set is considered Pareto optimal if there exists no feasible solution which would decrease some constraint without causing a simultaneous increase in at least one other constraint. 3 If a candidate solution dominates any existing members of the archive, the dominated solutions are removed If the new solution is dominated by any existing member of the archive, the new solution is not archived If the new solution neither dominates nor is dominated by any members of the archive, the new solution is added to the archive Using such a scheme, as the search progresses, the archive will converge to the true trade-off surface between constraints. As to the EA part of MOEA, a generic EA assumes a discrete search space H and a function f :H  where H is a subset of the Euclidean space (in a multiobjective problem H is a subset of the Euclidean space M where M is the number of constraints). The general problem is to find arg min f X H where X is a vector of the decision variables and f is the objective function. With EAs it is customary to distinguish genotype – the encoded representation of the variables from phenotype – the set of variables themselves. The vector X is represented by a string (or chromosome) s of length l made up of symbols drawn from an alphabet A using the mapping c : Al 4 H If the domain of c is total, i.e. the domain of c is all of Al, c is called a decoding function. The mapping c is not necessarily surjective. The range of c determines the subset of Al available for exploration by an evolutionary algorithm. The range of c, Ξ Al is needed in order to account for the fact that some strings in the image Al under c may represent invalid solutions to the original problem. The search space Ξ can be determined by either Shannon or 2nd order Renyi entropy. If the decision variables X are independent, Shannon entropy applies. If the decision variables are correlated then 2nd order Renyi entropy applies. A minimization of either entropy will help define the feasible search space Ξ. The string length l depends on the dimensions of both H and A with the elements of the string corresponding to genes and values to alleles. This statement of genes and alleles is often referred to as genotype-phenotype mapping. Given the statements above, the optimization becomes: arg min g S L given the function g ( s) f (c(s)) 5 Finally, in EAs it is helpful if c is a bijection. The important property of a bijection as it applies to EAs is that bijections have an inverse, i.e. there is unique vector x for every string and a unique string for each x. EAs involve techniques that implement mechanisms inspired by evolution such as reproduction, mutation, recombination, selection and survival of the fittest. Candidate solutions to the optimization problem play the role of individuals in a population and the objective function determines the environment within which the solutions "live.” Evolution of the population then takes place after the repeated application of the above operators5. In this process, there are two main forces that form the basis of EAs: recombination and mutation which create the necessary diversity and thereby facilitate novelty. Selection acts as a force increasing quality. Many aspects of EAs are stochastic. Changed pieces of information due to recombination and mutation are randomly chosen. On the other hand, selection operators can be either deterministic, or stochastic. In the latter case, individuals with a higher fitness have a higher chance to be selected than individuals with a lower fitness but typically even weak individuals have a chance to become a parent or to survive. Choosing the numerical values or techniques that will compute/simulate mutation, recombination and so forth tends to be heuristic. In the MOEA descriptions below, we use standard procedures and values to set the evolutionary parameters. For those interested in reading more about the various values and techniques that are used to select evolutionary parameters, the authors suggest 5 The mathematical development of EA operators and functions is contained in the end note of this paper. 6 K. Deb, Multi-Objective Optimization using Evolutionary Algorithms, John Wiley and Sons, 2000. The two optimization problems we face are: generate a series of monthly portfolios that outperform the S&P 500 over the last 30 years and generate a set of monthly portfolios that outperform the Russell 1000 Growth index over the last 15 years. The constraints we will operate under to attain our goals are: turnover is not to exceed 8% per month, the minimum stock position is set at 0.35% of the net asset value of the portfolio, the maximum stock position is set at 4% of the net asset value of the portfolio6 and a target market capitalization constraint where the average market capitalization of the portfolio must be greater than the average market capitalization of all stocks available to purchase in the current month (this last constraint will mean both portfolio sets will be what is called “large-cap” The S&P 500 and the Russell 1000 Growth are large-cap benchmarks). Another constraint common to both problems is we must choose stocks that maximize the scores generated by a multi-factor stock model7. This constraint typifies the use of what is called fundamental financial data to select stocks that are potential candidates for the final monthly portfolios. An additional constraint was added just for the Russell 1000 Growth problem: we cannot exceed the average book-to-price value of all stocks available for purchase in the current month. 6 The minimum and maximum position constraints also imply a cardinality constraint. Dividing 100% by 0.35% yields 286 which is the maximum number of stocks any portfolio can have. Dividing 100% by 4% gives 25 which the minimum number of stocks any portfolio can have. The cardinality constraint is solved in the first MOEA while the position constraints are solved in the second MOEA. 7 The details and back testing of the multi-factor stock model can be found in Chapter 3 of Handbook of Portfolio Construction, edited by John Guerard. We thank John for supplying the multi-factor scores and all the other data used in these models. 7 Meeting this constraint will mean we will generate the required growth portfolios for the Russell 1000 Growth pool. We solve the issues of the constraints by breaking them into two sets and use two MOEAs. The first MOEA generates potential portfolios that lie within the bounds of all the constraints except turnover and position. In the second MOEA, we trade off the turnover and position constraints as well as mean return and variance (the last being the typical factors used in mean-variance optimization). We set the rebalance period to quarterly versus monthly but stay within the stated turnover constraint (not to exceed 8% per month). The steps each MOEA takes are as follows. Data Loading, Retrieving and Filtering 1. Load the target candidate constituent sets from the multi-factor score files. “Sets” and “Files” because we need to build two sets of candidate portfolios each month, one for the large-cap portfolio and another for the large-cap growth portfolio (please note that the size of these files goes from approximately 1000 stocks in 1980 to more than 3000 in 2009). 2. Remove candidates that may be excluded, on an a priori basis, of being unable to contribute toward the portfolio goals. a. Remove candidates with scores of less than 20 (this was a heuristic choice) b. Rank candidates by market cap and eliminate the bottom 12% of candidates. If the market cap at this level is greater than US$750M, use US$750M as the floor for the cutoff (this cutoff is based upon common definitions of where small-cap stocks start to appear the U.S. stock market). 8 3. From this subset of candidate equities, retrieve daily price data going back 287 observations (for use in trading off mean and variance in second MOEA), and going forward 63 observations (for use in performance calculation of final [best] portfolio over the next three months). 4. Calculate the average market cap and average book to price score of the constituents in the target benchmark index (average book-to-price is used to determine if a portfolio satisfies the style constraint). 5. The candidate constituents remaining serve as the primary input to the MOEA phase. MOEA Phase I In this phase the goal is to identify a set of portfolios (ideally 50 or less) that will each be examined by the second MOEA. Output of the MOEA for each portfolio is the identification of a subset of the candidates (between 25 and 286) to be used as candidates for later optimization (again 25 because of the 4% maximum constraint and 286 because of 0.35% constraint). 1. The MOEA is invoked, passing the candidate constituent data, portfolio constituents from previous rebalances, the market cap average for the target benchmark index and population, generations, and mutation rate. For the large-cap growth portfolio, there is an additional parameter for the average book-price score of the target benchmark portfolio. a. MOEA algorithm is NSGA II, using single point crossover, bit flip mutation, and binary tournament for selection. For the passed parameters, population represents the number of proposed solutions that will be carried from generation to generation (note that the number of non-dominated solutions is often considerably smaller); generations is the number of generations to be evaluated within the 9 evolutionary algorithm; and mutation rate indicates the rate at which a dominated portfolio will be modified as it moves from generation to generation. b. For the large-cap portfolio, population is 500, generations are 1200, and mutation rate is 0.03 (3%). c. For large-cap growth portfolio, population is 50 (for the three-objective problem, a population of 500 tended to generate several hundred non-dominated solutions; the population number is dropped to avoid generating more solutions than can be explored in the MVO phase). All other parameters are the same. 2. Generation-zero portfolios are started with 156 equities randomly selected. If there are portfolios from a previous rebalance available, those portfolios are seeded into the population. 3. The large-cap portfolio objectives are the maximization of multi-factor score and average market cap. The large-cap growth portfolio adds a third objective to minimize the bookto-price score. 4. Penalties are in place to enforce the cardinality and market cap constraints. For large-cap growth, there is also a penalty for exceeding the book-price average passed in. 5. The MOEA phase produces two files as output. One file contains the objective values for the solution set, and the other contains the portfolios (where each equity has a 0/1 value) describing the Pareto efficient frontier. 6. Any portfolios passing constraints from the previous rebalance are added to the set of portfolios generated by the MOEA 10 MOEA Phase II In preparation for running the second MOEA, daily returns are calculated for all equities that may appear in a portfolio (to avoid having to recalculate a daily return series for an equity multiple times), and the daily risk free rate closest to the rebalance date is retrieved (for use in calculating the Sharpe ratio). Then for each portfolio from the previous MOEA, the following actions are taken: 1. Identify the equities designated as candidates for the portfolio being processed, and form the returns matrix. The minimum number of returns to be used is 126 (six months); because the number of observations must exceed the number of candidate equities (the so-called “curse of dimensionality”), the maximum number of returns in the series is determined by portfolio size, up to 287. 2. In addition to forming the returns matrix (step 1 above), we also need to generate mean expected returns, variances, and the covariance matrix. 3. The MOEA is called, using pointers to the above files, a pointer to the file containing the previous winning portfolio, and the MOEA parameters (population = 100, generations = 600, mutation rate = 0.01). 4. Following the lead of an earlier replication of MVO results using MOEA, the algorithm used is SPEA2. SBXCrossover, polynomial mutation, and selection by binary tournament. The SPEA2 archive size is the same as the prior population size. 5. Random portfolios are used for generation zero. If available, the previous winning portfolio is seeded into the generation zero set. 6. In each evaluation, the randomly assigned weights are normalized (so that they sum to 1). 11 7. In weighting strategy #1 (non-zero values are 0.0035 <= w <= 0.04), weights greater than 0.00175 are rounded up to 0.0035, while weights under that amount are rounded to zero. Weights over 0.04 are set to 0.04. All weight adjustments are added to a ledger, and then debited or credited at the end of the adjustment process (evenly divided among those that can accept the debit/credit amount without moving outside the set weight boundary). 8. In weighting strategy #2 (all equities are weighted, 0.0035 <= w <= 0.04), values less than 0.0035 are rounded up to 0.0035, while values over 0.04 are set to 0.04. All weight adjustments are added to a ledger, and then debited or credited at the end of the adjustment process (evenly divided among those that can accept the debit/credit amount without moving outside the set weight boundary). 9. There are four objectives for the MOEA: maximize return, minimize risk, minimize turnover and meet the maximum and minimum holdings constraint. The first two objectives are the standard MVO calculations8. The turnover and position objectives calculate the shift in weight between the previous winning portfolio and the proposed portfolio. It attempts to insure that no portfolios break the holdings or turnover bounds. 10. Once all MVOs have been run, the winning portfolio is then selected. Ideally, this is the portfolio with the best Sharpe ratio that has also passed the market cap and turnover constraints. If no portfolios pass the constraints, the portfolio with the best turnover is considered the winner. 11. The performance for the winning portfolio (and the target benchmark index) for the period until the next rebalance is then calculated and logged. 8 See Investments, Z. Bodie, A. Kane, A. J. Marcus Richard D. Irwin, Inc., Homewood, IL. 1989, pg. 203, formulas 7.10 and 7.11. 12 MOEA IIa If the turnover constraint is not met in Step 9, we use a third MOEA that trades off the best Sharpe ratio portfolio with its existing stock positions against turnover. The form this MOEA takes is somewhat similar to solving the minimum cut problem in graph theory using MOEAs9. The difference between our MOEA and the MOEAs that have been used to solve the minimum cut problem is that we are interested in reducing or enlarging the weight of one or more edges while keeping within the position limit constraints (though we do allow the stock holding to go to zero if needed). Once stocks are re-weighted and the turnover constraint reached, a new efficient frontier is calculated and the new Sharpe portfolio examined. If the new Sharpe portfolio meets the turnover and position constraints, the MOEA in IIa stops and the best Sharpe portfolio for this feasible portfolio from MOEA I is stored. The process is repeated for all the portfolios passed from MOEA I that do not meet the turnover constraints after their first Sharpe portfolio is formed. Once turnover constraints are met for the Sharpe portfolios that fail step 9 but pass what maybe called Step 9a, Steps 10 and 11 are now executed In Exhibit 1 are the 1, 3, 5 and 10 year annualized (transaction cost adjusted) returns for the large-cap MOEA portfolios and the S&P 500. The period covered is from December 1979 through December 2009 (121 months) 9 See for example “Computing Minimum Cuts by Randomized Search Heuristics,” F. Neumann, et al, http://arnetminer.org/viewpub.do?pid=228033 13 Exhibit 1 1 Year 3 Year 5 Year 10 Year S&P 500 9% 30% 54% 137% MOEA 13% 44% 84% 239% Exhibit 2 has the annualized risk and cumulative return on 10,000 USD for the S&P 500 and the MOEA portfolios for the same time period Exhibit 2 Cumulative Sharpe Ratio Information Ratio Return on 10,000 USD S&P 500 1.1 N/A 37,070 MOEA 1.8 0.14 49,500 In Exhibit 3 are the 1, 3, 5 and 10 year annualized (transaction cost adjusted) returns for the large-cap growth MOEA portfolios and the Russell Growth 1000. The period covered is from December 1996 through December 2009 (53 months) Exhibit 3 1 Year 3 Year 5 Year 10 Year R1000 Growth 10% 33% 61% 159% MOEA 14% 48% 93% 271% 14 Exhibit 4 has the annualized risk and cumulative return on 10,000 USD for the Russell Growth 1000 and the MOEA portfolios for the same time period Exhibit 4 Cumulative Sharpe Ratio Information Ratio Return on 10,000 USD R1000 Growth 0.14 N/A 25,688 MOEA 0.24 0.32 31,298 As seen in Exhibits 1 – 4 the percent return and USD return of the MOEA portfolios is approximately double the value of their benchmarks. On a risk-adjusted basis, the results are somewhat mixed. The information ratio for the large-cap growth MOEA is very significant while its Sharpe ratio is only a little larger than the Russell 1000 Growth Sharpe ratio and both are little different from 0 (zero). For the large-cap MOEA, its Sharpe ratio is significantly larger than its benchmark, but its information ratio is very small. So it is not clear that the MOEA portfolios are the better risk-adjusted portfolios in all cases. By not underperforming their benchmarks on a risk-adjusted basis, the implication is that at a minimum the MOEAs reside on a higher curve in risk-return space and could be the more attractive portfolios to investors. As to the other constraints: 1) In 100% of all cases, the MOEA portfolios on a weighted market capitalization basis met or exceeded the market capitalization constraint, 2) For the smallest and 15 largest positions constraints based on net asset value, none of the MOEA portfolios broke this constraint on either the minimum or maximum side, 3) Turnover did occasionally exceed the 8% limit per month. These occurrences tended to happen early in the 1980‟s portfolios just as the MOEA was getting on its feet. And the turnover limit was broken in a small number of later portfolios as well. The authors conjecture that in the latter cases the non-dominated feasible solutions handed off to the second MOEA were composed of individual stocks different enough from the prior quarter‟s portfolio that all the resulting portfolios prevented the turnover constraint from being met. This is an open question however and needs further investigation. As to one of the reasons why we chose to use MOEAs - is the stock selection of the quarterly portfolios statistically significant - we find the answer to be yes. As measured by John Guerard10 the MOEA asset selection was very significant. This is a very pleasant surprise to the authors, especially as the portfolios typically contained 150 – 200 stocks. Our results demonstrate that MOEAs can generate statistically significant asset selection while operating under real world constraints and using fundamentally driven stock scores. In this paper we demonstrate that MOEAs in the presence of real world constraints can generate portfolios that have higher returns than their benchmarks, comparable (if not better) risk adjusted returns versus their benchmarks and statistically significant asset selection.11 10 Private communication We have been asked the question: what are MOEA run times like versus mixed integer programming. We asked a colleague of ours – Todd Morrison – to use the same data supplied to us by John Guerard and the same constraints to solve the same optimization problems but by using mixed integer programming. The total time needed to generate all the portfolios for each problem was less using MOEAs than mixed integer programming. There is an important caveat however. The major difference in performance occurs before the number of stocks approaches 3000 or more. At that point MOEAs and mixed integer programming take approximately the same time to form the final quarterly portfolio. Further, these test results must be taken with a large grain of salt. The tests discussed here 11 16 We arrive at these portfolios by dividing the MOEA in two: the first MOEA generates all the non-denominated feasible sets that meet all the constraints except turnover and minimum and maximum position. The second MOEA trades off the last two constraints along with mean and variance to come up with the final portfolio that has the best Sharpe ratio (or meets the maximum turnover if the other constraints are not met). As MOEA I can generate feasible solutions to constrained stock selection problems, it could be of help to portfolio managers when deciding which stocks stay in, which move out and which are added to her portfolio. The run time of MOEA I, operating under the constraints above and in the presence of 3000 or more stocks, is 15 – 30 minutes in order to generate a set of 20 - 30 feasible solutions (the run time is less if a smaller solution set is needed). The advantage the feasible solution set gives to the portfolio manager is that at a glance she can see the trade-offs between possible stock portfolios, all of which meet most (if not in some cases all) the constraints to varying degrees. Finally, as best as we know, this is the first multi-period use of MOEAs in stock portfolio construction. We are encouraged by the results and hope others will extend and improve upon our work. are only two of many problems that can be solved using either technique. A test bed needs to be developed before a clear statement of equality or superiority can be made. 17 Acknowledgements The authors would like to thank John Guerard of McKinley Capital for the challenge he set us. We would not have tested MOEAs in the way described above without John’s challenge. ENDNOTE The „gory” details of EAs such as the hows and whys of mutation are not described above. What follows are those details. First we will define the EA fitness function. As H is nonempty set and c : Al f :H  , we can define the fitness scaling function Ts :  H and  and a related fitness function  Ts  f  c . In this definition it is understood that the objective function f is determined by the application, while the specification of the decoding function c12 and the fitness scaling function Ts are design issues13. Execution of an EA typically begins by randomly sampling with replacement from Al. The resulting collection is the initial population denoted P. More generally a population is a collection P = {a1 ,…,aμ } of individuals ai Al . The number of individuals μ is referred to as the population size. 12 Remember that if the domain of c is total, i.e. the domain of c is all of A I, c is called a decoding function. The mapping c is not necessarily surjective. The range of c determines the subset of Al available for exploration by the evolutionary algorithm. 18 Following initialization, execution proceeds iteratively. Each iteration consists of an application of one or more evolutionary operators. The combined effect of the evolutionary operators applied in a particular generation t N is to transform the current population P(t) into a new population P(t+1). In the population transformation,  (the parent and offspring population sizes , respectively). A mapping T : H H is called a population transformation. If T ( P) then P is a parent population and P/ is the offspring population. If P then they are called simply the population size. The population transform (PT) resulting from an evolutionary operatory (EO) often depends on the outcome of a random experiment. In Merkle and Lamont 14 this result is referred to as a random population transform (RPT) or random PT  and To define RPT, let R: T (H ,  be a set (the sample space). A random function H ) is called a random population transformation. The distribution of  PTs resulting from the application of an EO depends on the operator parameters, in other words an EO maps its parameters to a RPT. 14 L.D. Merkle and G.B. Lamont, “A Random Function Based Framework for Evolutionary Algorithms”, in Proceedings of the Seventh International Conference on Genetic Algorithms, Morgan Kauffman, San Mateo, CA., 1997 19 Now that we have defined both the fitness function and RPT, we can define in general an evolutionary operator: let  , X be a set (the parameter space) and :X T ,T H , a set. The mapping – H  is an evolutionary operator. The set of evolutionary operators is denoted as EVOP H , , X , . There are three common evolutionary operators: recombination, mutation and selection. These three operators are roughly analogous to their similarly named counterparts in genetics. The application of them in EAs strictly follows Darwin - survival of the fittest. In Merkle and Lamont‟s definition of the recombination operator r there exists P H , X and EVOP H , , X , If such that one individual in the offspring population r P depends on more than individual of P then r is referred to as a recombination operator. A mutation is defined in the following manner. Let m EVOP H , , X , , for every X and for every . If for every P H and if each individual in the offspring population m depends on at most one individual of P then m is called a mutation operator. 20 P Finally for selection let s EVOP H , , X T H , ), cases and if s satisfies a s , ( P) . If P H , a P then s is a selection operator. 21 X, :H  in all
5cs.CE
G ENERATIVE T EMPORAL M ODELS WITH M EMORY Mevlana Gemici∗ , Chia-Chun Hung∗ , Adam Santoro∗ , Greg Wayne∗ Shakir Mohamed, Danilo J. Rezende, David Amos, Timothy Lillicrap arXiv:1702.04649v2 [cs.LG] 21 Feb 2017 DeepMind, London A BSTRACT We consider the general problem of modeling temporal data with long-range dependencies, wherein new observations are fully or partially predictable based on temporally-distant, past observations. A sufficiently powerful temporal model should separate predictable elements of the sequence from unpredictable elements, express uncertainty about those unpredictable elements, and rapidly identify novel elements that may help to predict the future. To create such models, we introduce Generative Temporal Models augmented with external memory systems. They are developed within the variational inference framework, which provides both a practical training methodology and methods to gain insight into the models’ operation. We show, on a range of problems with sparse, long-term temporal dependencies, that these models store information from early in a sequence, and reuse this stored information efficiently. This allows them to perform substantially better than existing models based on well-known recurrent neural networks, like LSTMs. 1 I NTRODUCTION Many of the data sets we use in machine learning applications are sequential, whether these be natural language and speech processing data, streams of high-definition video, longitudinal timeseries from medical diagnostics, or spatio-temporal data in climate forecasting. Generative Temporal Models (GTMs) are a core requirement for these applications. Generative Temporal Models are also important components of intelligent agents, as they permit counterfactual reasoning, physical predictions, robot localisation, and simulation-based planning among other capacities (Sutton, 1991; Deisenroth and Rasmussen, 2011; Watter et al., 2015; Levine and Abbeel, 2014; Assael et al., 2015). These tasks require models of high-dimensional observation sequences and contain complex, long temporal dependencies—requirements that most available GTMs are unable to fulfil. Developing such GTMs is the aim of this paper. Many GTMs—whether they are linear or nonlinear, deterministic or stochastic—assume that the underlying temporal dynamics is governed by low-order Markov transitions and use fixed-dimensional sufficient statistics. Examples of such models include Hidden Markov Models (Rabiner, 1989), and linear dynamical systems such as Kalman filters and their non-linear extensions (Kalman, 1960; Ghahramani and Hinton, 1996; Krishnan et al., 2015). The fixed-order Markov assumption used in these models is insufficient for characterising many systems of practical relevance. Bialek et al. (2001) quantitatively show that Markov assumptions fail to describe physical systems with longrange correlations, and fail to approximate the long-distance dependencies in written literature. Models that instead maintain information in large, variable-order histories, e.g., recurrent neural networks (Pearlmutter, 1995), can have significant advantages over ones constrained by fixed-order Markov assumptions. Most recently proposed GTMs, like variational recurrent neural networks (VRNNs) (Chung et al., 2015b) and Deep Kalman Filters (Krishnan et al., 2015), are built upon well-known recurrent neural networks, like Long Short-Term Memory (LSTM) (Hochreiter and Schmidhuber, 1997) and ∗ Equal Contributions. 1 Gated Recurrent Units (GRUs) (Chung et al., 2015a). In principle, these recurrent networks can solve variable-order Markovian problems, as the additive dynamics are designed to store and protect information over long intervals. In practice, they scale poorly when higher capacity storage is required. These RNNs are typically densely connected, so the parametric complexity of the model can grow quadratically with the memory capacity. Furthermore, their recurrent dynamics must serve two competing roles: they must preserve information in a stable state for later retrieval, and they must perform relevant computations to distill information for immediate use. These limitations point to the need for RNNs that separate memory storage from computation. Recurrent networks that successfully separate memory storage from computation have been developed for several settings such as algorithm learning (Graves et al., 2014; Grefenstette et al., 2015; Joulin and Mikolov, 2015; Reed and de Freitas, 2015; Riedel et al., 2016; Vinyals et al., 2015), symbolic reasoning (Weston et al., 2014; Sukhbaatar et al., 2015), and natural language processing (Bahdanau et al., 2014; Kumar et al., 2015; Hermann et al., 2015; Kadlec et al., 2016). These recurrent networks store information in a memory buffer and use differentiable addressing mechanisms (often called “differentiable attention”) to efficiently optimise reading from and writing to memory. The particular details of a system’s memory access mechanisms play a critical role in determining its data efficiency. We demonstrate that generative temporal models with memory (GTMMs) exhibit a significantly enhanced capacity to solve tasks involving complex, long-term temporal dependencies. We develop a common architecture for generative temporal models and study four instantiations that each use a different type of memory system. These four models allow us to show how different memory systems are adapted to different types of sequential structure and the resulting impact on modelling success, data-efficiency, and generation quality. Our models are distinct from the one presented by Li et al. (2016), who developed a deep generative model for images posessing an attentional lookup mechanism. For Li et al. (2016), the memory contains a table of parameters that is not updated within a sequence. Instead, it is a table of biases that is jointly optimised for end-to-end performance. In contrast, our systems dynamically update the memory within each sequence. We structure our discussion by first describing the general approach for designing generative temporal models and performing variational inference (Section 2). We then compare GTMMs with VRNNs (Chung et al., 2015b) on a set of visual sequence tasks designed to stress different problems that arise when modelling information with long time dependencies. Finally, we make strides toward scaling the models to richer perceptual modelling in a three-dimensional environment. In the process, we make the following technical contributions: • We develop a general architecture for generative models with memory. This architecture allows us to develop GTMMs based on four memory systems: a new positional memory architecture referred to as an Introspection Network, the Neural Turing Machine (NTM) (Graves et al., 2014), the Least-Recently Used access mechanism (LRU) (Santoro et al., 2016), and the Differentiable Neural Computer (DNC) (Graves et al., 2016). • We show that variational inference makes it easy to train scalable models capable of handling high-dimensional input streams leading to new state-of-the-art temporal VAEs. • We show that our new models outperform the current state-of-the-art for GTMs based on several tasks that range from generative variants of the copy task to one-shot recall across long time delays. • We show that our GTMMs can model realistic 3D environments and demonstrate that these models capture important aspects of physical and temporal consistency, such as coherently generating first-person views under loop closure. 2 G ENERATIVE T EMPORAL M ODELS Generative temporal models (GTMs), such as Kalman filters, non-linear dynamical systems, hidden Markov models, switching state-space models, and change-point models (Särkkä, 2013) are a popular choice for modeling temporal and sequential data using latent variables. These models explain a set of observations x≤T = {x1 , x2 , . . . , xT } with a set of corresponding latent variables 2 (a) Variational RNNs (b) Autoreg. dynamics (c) Latent-only Figure 1: Variants of generative temporal models. Circled variables are stochastic; boxed variables are deterministic. Solid lines show dependencies in the generative model; dashed lines show additional dependencies for the inference model. z≤T = {z1 , z2 , . . . , zT } and specify the joint distribution pθ (x≤T , z≤T ) = T Y pθ (xt |fx (z≤t , x<t ))pθ (zt |fz (z<t , x<t )), (1) t=1 where θ are model parameters. This formulation supports a wide range of models, some variants of which are shown in Fig. 1. Particular examples include non-linear state space models (Tornio et al., 2007), Deep Kalman Filters (Krishnan et al., 2015), and stochastic recurrent neural networks (Fraccaro et al., 2016; Bayer and Osendorfer, 2014). A particular model can be specified in Eq. (1) by fixing the distributions and the functional dependencies on the conditioned variables. • Distributions. We typically assume that the prior distribution pθ (zt |fz (z<t , x<t )) is a Gaussian and the likelihood function pθ (xt |fx (z≤t , x<t )) is any distribution appropriate for the observed data, such as a Gaussian for continuous observations or a Bernoulli for binary data. • Conditional dependencies. Our models introduce a deterministic hidden-state variable ht that is modified at every time point using a transition map ht = fh (ht−1 , xt , zt ). The function fz (ht−1 ) is a prior map that describes the non-linear dependence on past observations and latent variables, using the hidden state, and provides the parameters of the latent variable distribution. The nonlinear function fx (zt , ht−1 ) is an observation map that provides the parameters of the likelihood function, and depends on the latent variables and state. These functions are specified using deep neural networks, which can by fully-connected, convolutional, or recurrent networks. The most general model retains all possible dependencies between latent variables and deterministic state variables in its maps: the transition map ht = fh (ht−1 , xt , zt ) is parameterised by an LSTM network and depends on the history variable ht−1 , the current observation xt , and the current latent variable zt ; the observation map fx (ht−1 , zt ) depends on the past history and the current latent variable. This is the structure used by Chung et al. (2015b) in variational RNNs (VRNN) in figure 1a. VRNNs forms the baseline in our comparisons since it retains all possible dependencies within the model and provides one of the best existing models. Other dependency structures can also be considered, although they are not used in this paper: GTMs with autoregressive dynamics (figure 1b) have a transition map that depends only on visible variables, i.e. ht = fh (ht−1 , xt ), and other statespace models use observation maps that depends only on latent variables pθ (xt |x<t , z≤t ) = fx (zt ). 2.1 VARIATIONAL I NFERENCE FOR GTM S Having specified a model (1), our task is to infer the posterior distribution of the latent variables and learn the model parameters. Variational inference is currently one of the most widelyused approaches, since it is well suited to problems with high-dimensional observations and highdimensional parameter spaces. Variational inference also allows for the design of fast and scalable algorithms, is easily composed with other gradient-based learning systems, and provides tools for principled model evaluation and comparison. To compute the marginal probability of the observed data p(x≤T ), we must integrate out any latent variables z≤T . This integration is often intractable and variational methods compute marginal probabilities by transforming this intractable integration 3 problem into a tractable optimization problem. We construct a variational bound on the log-marginal likelihood as follows:   Z pθ (x≤T , z≤T ) log p(x≤T ) = log pθ (x≤T , z≤T )dz≤T = log Eqφ (z≤T |x≤T ) (2) qφ (z≤T |x≤T ) ≥ Eqφ (z≤T |x≤T ) [log pθ (x≤T |z≤T )] − KL [qφ (z≤T |x≤T )kpθ (z≤T )] = F(q; θ). (3) In Eq. (2), we rewrote the expectation in terms of a distribution qφ (z≤T |x≤T ) with variational parameters φ. In equation (3), by application of Jensen’s inequality, we obtained a lower bound on the marginal likelihood; KL[qkp] is the Kullback-Leibler divergence between distributions q and p. This lower bound (3), known as the negative free energy, has two terms that trade off reconstruction accuracy (the expected log-likelihood term) against the complexity of the posterior approximation (the KL-divergence term), and provides a tractable objective function for optimization. In this form, the distribution qφ (z≤T |x≤T ) is an approximation to the true posterior distribution over the latent variables pθ (z≤T |x≤T ). We further choose an auto-regressive form for this distribution. QT Qt−1 qφ (z≤T |x≤T ) = t=1 qφ (zt |z<t , x≤t ); qφ (z<t |x<t ) = τ =1 qφ (zτ |z<τ , x≤τ ). (4) This choice of approximate posterior distribution allows us to rewrite the total free energy F as the sum of per-step free energies Ft : PT F(q; θ) = t=1 Eqφ (z<t |x<t ) [Ft ( q; θ)] (5) Ft = Eqφ (zt |z<t ,x≤t ) [log pθ (xt |z≤t , x<t )] − KL [qφ (zt |z<t , x≤t )kpθ (zt |z<t , x<t )] (6) A detailed derivation appears in Appendix A. Recent approaches for variational inference use two additional tools to optimize the free energy. First, since the expectations in (5) and (6) are typically not known in closed form, the gradient of (6) is computed using a Monte Carlo estimator. For continuous latent variables, the pathwise derivative (reparameterisation trick) can be used (Fu, 2005; Rezende et al., 2014; Kingma and Welling, 2014). Second, the approximate posterior distribution q is represented by an inference (or recognition) model whose outputs are the parameters of the posterior distribution. Inference networks amortise the cost of inference across all posterior computations and make joint optimisation of the model and the variational parameters possible. The inference model qφ (zt |fq (x≤t , z<t )) uses a posterior map fq specified by a deep network that provides the parameters of the q-distribution as a function of the current observation, and the past history of latent variables and observations. Latent variable models trained using amortised variational inference and Monte Carlo gradient estimation are referred to as variational auto-encoders (VAEs) (Kingma and Welling, 2014). For generative temporal models, they are referred to as temporal VAEs. 3 G ENERATIVE T EMPORAL M ODELS WITH E XTERNAL M EMORY In existing models, temporal structure is captured by LSTM networks with state variables ht (Fig. 1). As we summarised in the introduction and will exhibit in the experiments, LSTMs are powerful sequence models but suffer from the limitation that they strongly couple memory capacity with recurrent processing and the number of trainable parameters. This limitation can result in slow learning or demand large models to achieve high capacity memory. To overcome this issue, we now develop generative temporal models with memory (GTMMs), i.e. ones that are augmented with external memory systems. We modify our temporal VAEs to rely on the output of an external memory system, which at every point in time is queried to produce a memory context Ψt . The prior and the posterior used become: Prior pθ (zt |z<t , x<t ) = N (zt |fzµ (Ψt−1 ), fzσ (Ψt−1 )) Posterior qφ (zt |z<t , x≤t ) = N (zt |fqµ (Ψt−1 , xt ), fqσ (Ψt−1 , xt )) (7) (8) where we use a prior that is a diagonal Gaussian that depends on the memory context through the prior map fz , and use a diagonal Gaussian approximate posterior that depends on the observation xt and the memory context Ψt−1 through a posterior map fq . We show a stochastic computational 4 … Mt-1 Mt Mt+1 Ψt-1 Ψt Ψt+1 zt zt+1 zt+2 xt xt+1 xt+2 … ht-1 wt ht-1 kt wt zt-1 Bt-1 Ψt-1 zt-1 Bt-1 Ψt-1 c Figure 2: Components of a generative temporal model with external memory. (Left) High-level structure of the model showing the memory system M and how it connects to the generative model. Red and green lines indicate writing and reading operations, respectively. At update t, the controller state from time t − 1 is combined with the latent variable from time t − 1 to produce the attention weight. This produces a memory context that is only a function of the data that were in memory before time t, so we denote it Ψt−1 . (Middle) Schematic of the introspective memory system. (Right) Schematic of memory systems like NTM and DNC. graph for the modified generative process in Fig. 2. This structure is generic and flexible and allows any type of memory system to be used, allowing the remainder of the system to be unchanged since all dependencies are through the memory context Ψt . External memory systems comprise two components: an external memory Mt , which stores latent variables zt (or transformations of them), and a controller, which implements the addressing scheme that informs memory storage and retrieval. Two types of addressing schemes are possible: contentbased addressing accesses memories based on their similarity to a given cue, while position-based addressing accesses memories based on their position within the memory-store. We now expand on four types of memory systems that have different characteristics, describing the specific memory and controllers used, and how the final memory context Ψt is computed. 3.1 I NTROSPECTIVE -GTMM S We now develop an external memory system that uses a position-based addressing scheme for fast learning of temporal dependencies, related to the Pointer Networks of Vinyals et al. (2015). It is able to effectively handle sequences with temporally-extended dependency structures, trains quickly, and can be robustly applied to a wide variety of tasks (and we verify this in the experimental section). We refer to this memory system as an introspection network. Memory. The memory M is a first-in-first-out buffer with at most L storage locations into which latent variables zt are written as they are generated at each time step. It is natural to directly store the latent variables, since they are compressed representations of the data at each time point. This type of memory does not require the model to learn how to write to memory, but only how to read from it. This feature is what enables fast learning. Controller. The controller is responsible for memory retrieval. At every time step t, the controller first updates the hidden states using an LSTM network frnn (Eq. 9), which fuses information from the previous hidden state ht−1 and the previously generated latent variable zt−1 . If additional context information ct is available, then this is also included as an input. To access a memory, softattention weights are computed using an attention network fatt based on the output of the controller ht (Eq. 10). A set of R attention weights (or read heads) is used to retrieve multiple memories at the same time. Each attention weight wtr is used to compute a weighted average over the rows of the memory matrix to produce a retrieved memory vector φrt . State update ht = frnn (ht−1 , zt−1 , ct ) Attention wtr = fatt (ht ); kwtr k = 1, wtr [i] > 0 Retrieved memory φrt = wtr · Mt−1 (9) (10) (11) A number of attention functions fatt can be used, including softmax P and Gaussian. We make use of normalised linear attention with softplus outputs wt = k(ht )/ u k(hu ), where the function k is a deep feed-forward network. This attention system proved easy to use and did not require special initialisation. In this model, we found that softmax attention had slower convergence. 5 Gating mechanism. The ability to retrieve multiple memories φrt makes it possible for the latent variables zt to depend on a variable number of past latent variables. We allow the network to adjust the importance of each of the retrieved memories φrt by learning correction biases gtr . The corrections are passed through a sigmoid function σ(·) and element-wise multiplied with the context vector. Memory context Ψrt = φrt r σ(gt−1 ) (12) The final memory context Ψt that is the output of the memory system is the concatenation of the memory-contexts for each read-head, Ψt = [Ψ1t , Ψ2t , . . . , ΨR t ], and forms the memory context that is passed to the generative model. The complete flow of information in the Introspection Network is shown in the stochastic computational graph in Fig. 2. 3.2 M ODELS WITH C ONTENT-BASED A DDRESSING Introspective GTMMs can learn fast, but their simple memory structure limits the range of applications to which they can be applied. We now develop GTMMs with three alternative types of memory architectures: the Neural Turing Machine (NTM) (Graves et al., 2014), which combines both content-based and positional addressing; Least-Recently Used (LRU) access, which exclusively employs content-based addressing; and the Differentiable Neural Computer (DNC) (Graves et al., 2016), which uses content-based addressing and a mechanism of positional addressing that links positions in memory based on temporal adjacency of writing. We call these models the NTM-GTMM, LRU-GTMM, and DNC-GTMM, respectively. We describe high-level aspects of the memory and controllers used, but defer detailed discussion of the properties and alternative parameterisations to Graves et al. (2014), Santoro et al. (2016) and Graves et al. (2016). Memory. Unlike the first-in-first-out buffer used previously, the memory for NTMs and DNCs are a generic storage that allows information to be written to, and read from any location. Controller. The controller uses an LSTM network frnn (Eq. 13) that updates the state-history ht and the external memory Mt using the latent variables from the previous time step and any additional, context information ct on which the generative model is conditioned: State update (ht , Mt ) = frnn (ht−1 , Mt−1 , zt−1 , ct ) (13) To perform a content-based read of R items from the memory Mt , the controller generates a set of keys krt (14), and compares them to each row of the memory Mt−1 using a cosine similarity measure to yield a set of soft attention weights (15). The retrieved memory φrt is then obtained by a weighted sum of the attention weights and the memory Mt−1 (16). r krt = fkey (ht ); Keys Attention Retrieved memory wtr r ∈ {1, . . . , R} wtr [i] = fatt (Mt−1 , kt ); ≥ r r φt = wt · Mt−1 0; kwtr k (14) =1 (15) (16) The memory context Ψt that is passed to the generative model is the concatenation of the retrieved memories for each read-head and the controller state, Ψt = [φ1t , . . . , φR t , ht ]. 4 E VALUATION M ETHODOLOGY We evaluated our models both qualitatively and quantitatively. Qualitative assessment involved the visual inspection of generated sequences; for example, if the task were to copy a particular portion of an observed sequence after some set number of steps, then this copy procedure should be evident in sequences generated by the models. Qualitative assessments revealed significant differences between models even when differences in their variational lower bounds were minimal. We also 6 Table 1: Number of parameters used in models. Model VRNN Introspective-GTMM NTM-GTMM LRU-GTMM DNC-GTMM Digits and characters 1,884,177 1,863,107 1,869,381 1,866,282 1,859,336 3D environments 5,912,706 5,972,806 5,986,692 5,979,115 5,980,327 used three quantitative metrics to gather a more complete picture of the model behaviour: first, the variational lower bound objective function, tracked across training; second, the KL-divergence at a particular time-point for every training sequence (the last time-point per episode) tracked across training steps; and third, the per time-point KL-divergences averaged over a batch of sequences after training was completed. Per time-step KL-divergences, KL [qφ (zt |z<t , x≤t )kpθ (zt |z<t , x<t )], measure the number of bits of additional information needed to represent the posterior distribution relative to the prior distribution over the latent variable being used to explain the current observation. They indicate the amount of prior knowledge the model contains. If a KL-divergence is close to zero, then the current observation is fully-predictable from previous information. For the tasks considered here, which were defined by random sequences at every episode, this would imply that the model stores information in memory from the beginning of the episode to construct predictive priors for the rest of the episode. Calculating this quantity across training sequences for the last time point in each sequence (the second metric) demonstrates how quickly the memory system becomes useful for prediction across training (the last time point in our problems was always the most predictable). Viewing the average per time-step KL, averaged over a batch of sequences after training (the third metric), indicates how much information a trained model gathers throughout a sequence to make predictions. 4.1 T RAINING D ETAILS Our posterior and observation maps used convolutional and deconvolutional networks, in some cases with residual, skip connections (He et al., 2015). Refer to Appendix B for explicit details. All models were trained by stochastic gradient descent on the variational lower bound (Eq. 6) using the Adam optimizer (Kingma and Ba, 2014) with a learning rate of 10−3 (except for sequences with > 100 steps, where we used 10−4 ). Mini-batches of 10 training sequences were used for computing gradients in all tasks. For tasks involving digits and characters, we used latent variables of size 32; for the 3D environment, we used latent variables of size 256. We used five read heads in all tasks. The number of memory slots used for the GTMMs was taken to be the same as the number of steps in the training sequences in each task, except for the LRUGTMM, which used a number of slots that was five times the number of time steps (note: the LRU ties the number of write heads to the number of read heads, and with many write heads it fills up a small memory quickly). The hidden state size of the LSTM in all models was chosen to keep the total number of parameters within ∼ 5% of one another (see Table 1). For each model, we ran 20 replicas with the same hyperparameters. When we performed quantifications for figures, we first averaged over all 10 example sequences in a mini-batch, then we computed means and standard errors across the replicas for the model type. 5 E XPERIMENTAL R ESULTS We tested our models on seven tasks that probed their capacity to learn and make predictions about temporal data with complex dependencies. Tasks involved image-sequence modelling, and offered tests of deduction, spatial reasoning, and one-shot generalisation. Example training sequences are provided for each task described below. In Appendix C, we present generated samples for most of the tasks. For tasks with artificial data sets, pseudo-code to generate the training sequences is given in Appendix D. 7 negative VLB negative VLB negative VLB Figure 3: Example sequence for the perfect recall task using a pre-recall interval l = 20 followed by a recall interval k = 5. Figure 4: Top Row: the perfect recall task with l = 15 and k = 5. Left: The average KullbackLeibler divergence (KLD) per frame, serving as a measure of prediction error between the prior and posterior. Each of the models learned that there is repetition at frame 10, but the Introspective GTMM exhibited the lowest error. Middle: The last frame KLD was also lowest for the Introspective GTMM at convergence. Right: The Introspective GTMM convergenced fastest and to the lowest level, but we see that the negative variational lower bound was close for all models. Middle Row: the perfect recall task with l = 20 and k = 5. The results were roughly similar. Bottom Row: the perfect recall task with l = 50 and k = 5. Over substantially larger time intervals, the models were able to detect regularity in the data sequences. 5.1 P ERFECT R ECALL Training sequences consisted of k randomly sampled MNIST digits to be remembered during a prerecall interval, which extended for l time steps. Thus, l − k digits were distractor stimuli. A recall interval occurred after l steps, during which the first k images were presented again. We constructed variants of the task with k = 5 and l ∈ {15, 20, 50}. Fig. 3 shows a typical training sequence for this task. To succeed at this task, the models had to encode and store the first k images, protect them during the distractor interval, and retrieve them during the recall interval. Successful use of memory would elicit a drop in the KL-divergence during the recall interval, since information stored in memory – and not information extracted from the current observation – would be used for image reconstruction. 8 negative VLB negative VLB negative VLB Figure 5: In the parity recall task, the recall interval consisted of images indicating the evenness or oddness of each of the initial k images. Figure 6: Top Row: the parity recall task with l = 15 and k = 5. The difference between models was minimal here, likely because the memory storage required to solve the task is only k = 5 bits. Middle Row: the task with parameters l = 20 and k = 5. Bottom Row: with l = 50 and k = 5. Again, all models succeeded equally despite the longer delay. The performance for this task is reported in Fig. 4. All models showed the effect that the KLdivergence between the prior and posterior becomes reduced at the beginning of the recall phase. However, for the GTMMs and especially the Introspective GTMM, the reduction was most significant. This implies that the models were predicting the arriving frames based on memory. The effect was more pronounced the larger the sequence length. 5.2 PARITY R ECALL In contrast to the previous experiment in which exact recall of the images was demanded, in the parity recall task we asked the model to identify and report on a latent property of the data. During the recall interval, the model must generate a sequence of k 0-s and 1-s, matched to the parity of the first k images. That is, the first recalled digit should be a zero if the first digit in the initial sequence was odd, and one if it was even. Fig. 5 shows a typical training sequence. Successful models, then, need to implicitly classify input digits. Although the computation required for this task is more complicated than for perfect recall, the information content that is to be stored is actually smaller – i.e., a single bit per image. 9 negative VLB Figure 7: For the one-shot recall task, sequences at test time were created from a set of characters that were not used during training. Even so, perfect recall should still be possible. Figure 8: The one-shot recall task with experimental parameters l = 20 and k = 5. Again, because the task was very similar to perfect recall in structure, the models performed in a comparable rank order, with the Introspective GTMM showing significant KL reductions when the sequence was predictable from memory. Less memory is required for parity recall than for perfect recall as the details of each image need not be retained; instead, only the parity of each image should be tracked, requiring 5 bits total. All models performed satisfactorily here, as we see in Fig. 6, exhibiting KL reductions when the number of possible digit classes drops from 10 to only 1 (the remembered parity digit images). The models were able to contend with long delays equally, suggesting that the primary advantage for GTMMs over VRNNs is in tasks that require the storage of a large number of bits. 5.3 O NE -S HOT R ECALL We also examined the abilities of the GTMMs to memorise novel information by testing on sequences of data on which they had not been directly trained. A typical training sequence was shown in Fig. 7, where the images at every point in time are drawn from the Omniglot data set (Lake et al., 2015). The training data consisted of all 50 alphabets with three characters excluded from each alphabet. The unseen characters were used to form new, unseen sequences at test time. The task was otherwise the same as the perfect recall task, but the demands on the generative model and memory were more substantial. The GTMMs all outperformed the VRNN with the Introspective GTMM showing significant reductions in KL divergence at the beginning of the recall phase (Fig. 8). This was notable because the memorised images are entirely novel hold-outs from the training set. Thus, the GTMMs, and in particular the Introspective GTMM, were able to construct useful latent variable representations for novel stimuli, store them in memory, and use them to predict future events during the recall phase. 5.4 L EARNING DYNAMIC D EPENDENCIES The preceding tasks have all demanded ordered recall of the sequence. Here, we tested whether recall in a more complicated order is possible. A typical training sequence is shown in Figure 9. We began with a sequence of l digits as before. The next k digits were generated by an “index-andrecall” game. In the figure example, the final digit in the pre-recall interval is an 8. The numerical value of the digit indicates from which position in the sequence the next digit is copied. Here, position 8 contains a 3, which is the first digit in the recall interval. Position 3 contains a 0, and so on. Successful models therefore had to learn to classify digits and to use the class labels to find images based on their temporal order of presentation. 10 negative VLB Figure 9: Training sequence for the dynamic dependency task following an index-and-recall game in which each image digit provided a positional reference to the next digit in the sequence order. Figure 10: Dynamic dependency task with l = 20 and k = 5: The DNC-GTMM and the Introspective GTMM were the best at this complex addressing task. This task requires the models to learn an algorithmic addressing procedure in which the current image indicates the time point the next image was stored, allowing the memory address storing the latent variables from that time point to be looked up. All of the GTMMs perform considerably better than the VRNN on the task, with the most substantial improvements achieved by the Introspective GTMM and the DNC-GTMM (Fig. 10). 5.5 S IMILARITY-C UED R ECALL The last task probed positional indexing, but here we construct a task that demands content-based addressing. In each training sequence, we first present a random sequence of digits for l time steps. The k digits in the recall interval are a randomly chosen, contiguous sub-sequence of length k from the pre-recall interval (Fig. 11). To solve this task, a model must be able to use the first image in the recall interval as a cue, find the most similar image to the cue that it has seen previously, and produce the temporal sequence that followed it. Similarity-cued recall played more strongly to the advantages of memory systems with contentbased addressing. The task required using a cue image to find the images in sequence that followed the cue during the pre-recall exposure phase. To perform this operation, the memory systems with content-based addressing, the NTM, LRU, and DNC, could encode the cue and look up similar feature encodings in memory. As long as there was a mechanism to iterate through the subsequent latent variables, the task can then be easily solved. DNC-GTMM could use its temporal transition links for this task, as described in (Graves et al., 2016). Because it lacks content-based addressing, the Introspective-GTMM did not perform better than the VRNN (Fig. 12). 5.6 NAVIGATION IN AN MNIST M AP An important motivation for developing GTMMs was the desire to improve the capacity of agents to understand the spatial structure of their environments. As an example problem, we created a 2D environment represented by a 4 × 4 grid, where each grid cell contained a random MNIST digit (Fig. 13). In this case, instead of an agent, we took a random walk on the grid using actions up, down, left, and right for 25 steps to move between neighbouring locations, receiving an observation corresponding to the current grid cell. The actions were always treated as context variables and were not predicted by the GTMMs. We expected that the GTMMs conditioned on random walk action sequences would be able to generate the same observation in case a grid cell is revisited in an action sequence; that is, the GTMM should have maintained a coherent map of an environment. 11 negative VLB Figure 11: Example training sequence for the similarity-cued recall Task. Figure 12: Similarity-cued recall with temporal dependencies of length l = 20 and k = 5. The memory models with content-based addressing, i.e., the NTM-, LRU-, and DNC-GTMM, showed the most significant KL reductions and lowest task losses. Since the actions are generated by a random walk process, the structure of this problem is poorly captured by memory addressing mechanisms that are based on time or positional order in a sequence. Instead, models that used content-based addressing could encode the sequence of actions alongside the latent variable representations of the images. When it was necessary to predict what is present at an already visited location, content-based addressing could be used to look up the latent variables based on the action sequence. Since any grid location could be reached via multiple routes, the models had also to capture the invariance that action sequences should be converted into displacements from the origin. The DNC- and LRU-GTMM performed best at this task (Figure 14), exhibiting significant KL reductions as more of the environment was explored. In Fig. 15, we also show generation of a sequences in the maze by each model. Only LRU-GTMM and DNC-GTMM consistently generated the same digits when returning to the same positions. Although the NTM-backed GTMM has content-based addressing, its ability to allocate free locations in memory is generally inferior to the abilities of models using LRUs and DNCs. The LRU- and DNC-based mechanisms could easily store new memories but also could collocate the new memories with context information registering the computed position on the grid each image was located. 5.7 T OWARDS C OHERENT G ENERATION IN R EALISTIC 3D E NVIRONMENTS Ultimately, we wish to design agents that operate in realistic environments and can learn from sequential information, using memory to form predictions. These agents should possess spatiotemporally coherent memories of environments, understanding that walls typically do not shift and that undisturbing movements change camera angles but not scene arrangements. Our first study of this problem was to test whether GTMMs can maintain consistent predictions when provided with frames from an in-place rotation of a camera for two full turns. These experiments used a procedurally-generated 3D maze environment with random wall configurations, textures, and object positions. The rotational dynamics of the environment included acceleration, so each frame did not represent a view from an angle that is equally distributed around the unit circle. The models had to cope with this structure. Additionally, because the frames were captured at discrete moments, the models had to learn to interpolate past views after the full turn, instead of merely copying frames from the first rotation. The rotational period was t = 15 steps, and a full episode took place over t = 30 steps. An example training sequence is shown in Figure 16. A successful generative model of this data had to create random environment panoramas and generate views consistent with the panorama on the second full turn. 12 negative VLB Figure 13: A random walk action sequence was provided to the model along with images found at each location. At boundaries, the action sequence was restricted to stay in bounds. Each action was provided as a conditioning variable for generation that was not modeled itself. Figure 14: MNIST Maze task. The GTMMs with content-based addressing acquired information about the environment and could coherently model it. In Fig. 17, we see that the VRNN had the lowest variational lower bound. However, in the generative samples, it is clear that the VRNN was also incoherent across time, as it forgot information about paintings on the walls and buildings on the skyline (Fig. 28). We argue that the more representative quantification, of more significance than the training loss, is the Kullback-Leibler divergence of the last frame, as well as the KL reduction at the time of the turn. These indicators showed that the DNC-GTMM and Introspective-GTMM models were able to predict the redundant frames from memory. 6 D ISCUSSION AND C ONCLUSIONS The aim of this paper has been to open a research direction. We have seen that, on a range of tasks, standard generative temporal models are limited by their memory capacity and memory access mechanisms. This has motivated the design of new generative temporal models with external memory systems whose performance is in some cases qualitatively better. We have tried to provide proofs of concept without extraneous complication: for example, our variational distributions are simple, diagonal Gaussians; we could consider more complex posterior distributions, like those used in DRAW (Gregor et al., 2015), normalising flows (Rezende and Mohamed, 2015), auxiliary variables (Ranganath et al., 2016), or models with discrete variables (Eslami et al., 2016). We have also aimed to explore the advantages and disadvantages of a variety of external memory mechanisms for generative temporal modelling. Our results suggest that none of the architectures we report on is uniformly dominant across tasks. However, an interesting direction of further research is strongly suggested by our results. Namely, we imagine that a new model, combining the direct storage of latent variables, as in the Introspective-GTMM, with content-based addressing, as in the NTM-, LRU-, and DNC-GTMM, could indeed prove to have performance that is uniformly dominant across all tasks. Furthermore, many of these sparse memory access models can be more efficiently implemented by using fast K-nearest neighbour lookup, though we did not explore such savings here. We leave the development of these more sophisticated models to future work. The storage of latent variables or transformed latent variables in memory additionally suggests several intriguing extensions of our framework. Currently, the models are based on the mathematics 13 t = 10 t = 15 t = 20 t = 25 S DNC Intro. LRU NTM VRNN Actions t=5 Figure 15: Generation examples in the MNIST Maze. Actions are shown in the top row. In each column of that row, the last five actions at each time point (t = 5, 10, 15, . . . ) are indicated by yellow arrows. The best four models of each type are shown in each row below. The first time a grid cell was visited, the red pixel channel was turned on; the second time, a new image was generated and superimposed, with the red and green channels turned on (so overlaid image colour is red+green=yellow); the third time, the blue channel was turned on, so the overlaid, generated image was white. We see that the VRNN had inconsistent generations, as the subsequent visits to grid cells produced overlays of different colours that did not share the same shape. The NTM and Introspection models were by comparison better at coherent generation, and the LRU- and DNC-based GTMMs were the best here, so that, for example, the white and yellow digits masked the underlying red digit. 14 negative VLB Figure 16: A training sequence for a 30 timestep in-place rotation, where the period until repetition was approximately 15 steps. Figure 17: Realistic environments task. The VRNN had the lowest variational lower bound, but this measure tells very little of the overall story. Instead, the DNC-GTMM and Introspective-GTMM showed significant KL reductions when the sequence is predictable from memory, and this measure translates into good behaviour during generation of samples. of optimal filtering: they produce a sample at every time step that is drawn from the filtering posterior qφ (zt |z<t , x≤t ). Once latent variables are stored in memory, the formal distinction between filtering and smoothing (with a non-temporally causal posterior qφ (zt |x≤T )) begins to break down. We can imagine further mechanisms that modify previously written latent variables after the fact by overwriting previously written locations. The explicit storage of latent variables in memory supports this, whereas it would be difficult to precisely modify the component of the latent state that encodes a historical latent variable in a more conventional, densely connected RNN. 15 R EFERENCES J.-A. M. Assael, N. Wahlström, T. B. Schön, and M. P. Deisenroth. Data-efficient learning of feedback policies from image pixels using deep dynamical models. arXiv preprint arXiv:1510.02173, 2015. D. Bahdanau, K. Cho, and Y. Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014. J. Bayer and C. Osendorfer. Learning stochastic recurrent networks. arXiv preprint arXiv:1411.7610, 2014. W. Bialek, I. Nemenman, and N. Tishby. Predictability, complexity, and learning. Neural computation, 13(11):2409–2463, 2001. J. Chung, C. Gulcehre, K. Cho, and Y. Bengio. Gated feedback recurrent neural networks. arXiv preprint arXiv:1502.02367, 2015a. J. Chung, K. Kastner, L. Dinh, K. Goel, A. C. Courville, and Y. Bengio. A recurrent latent variable model for sequential data. In Advances in neural information processing systems, pages 2962– 2970, 2015b. M. Deisenroth and C. E. Rasmussen. Pilco: A model-based and data-efficient approach to policy search. In Proceedings of the 28th International Conference on machine learning (ICML-11), pages 465–472, 2011. S. A. Eslami, N. Heess, T. Weber, Y. Tassa, D. Szepesvari, G. E. Hinton, et al. Attend, infer, repeat: Fast scene understanding with generative models. In Advances In Neural Information Processing Systems, pages 3225–3233, 2016. M. Fraccaro, S. K. Sønderby, U. Paquet, and O. Winther. Sequential neural models with stochastic layers. In Advances in Neural Information Processing Systems, 2016. M. C. Fu. Stochastic gradient estimation. Technical report, DTIC Document, 2005. Z. Ghahramani and G. E. Hinton. Parameter estimation for linear dynamical systems. Technical report, Technical Report CRG-TR-96-2, University of Totronto, Dept. of Computer Science, 1996. A. Graves, G. Wayne, and I. Danihelka. Neural turing machines. arXiv preprint arXiv:1410.5401, 2014. A. Graves, G. Wayne, M. Reynolds, T. Harley, I. Danihelka, A. Grabska-Barwińska, S. G. Colmenarejo, E. Grefenstette, T. Ramalho, J. Agapiou, et al. Hybrid computing using a neural network with dynamic external memory. Nature, 538(7626):471–476, 2016. E. Grefenstette, K. M. Hermann, M. Suleyman, and P. Blunsom. Learning to transduce with unbounded memory. In Advances in Neural Information Processing Systems, pages 1828–1836, 2015. K. Gregor, I. Danihelka, A. Graves, D. Jimenez Rezende, and D. Wierstra. Draw: A recurrent neural network for image generation. In ICML, 2015. K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385, 2015. K. M. Hermann, T. Kocisky, E. Grefenstette, L. Espeholt, W. Kay, M. Suleyman, and P. Blunsom. Teaching machines to read and comprehend. In Advances in Neural Information Processing Systems, pages 1693–1701, 2015. S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural computation, 9(8):1735–1780, 1997. A. Joulin and T. Mikolov. Inferring algorithmic patterns with stack-augmented recurrent nets. In Advances in Neural Information Processing Systems, pages 190–198, 2015. R. Kadlec, M. Schmid, O. Bajgar, and J. Kleindienst. Text understanding with the attention sum reader network. arXiv preprint arXiv:1603.01547, 2016. R. E. Kalman. A new approach to linear filtering and prediction problems. Journal of basic Engineering, 82(1):35–45, 1960. D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. CoRR, 2014. D. P. Kingma and M. Welling. Auto-encoding variational Bayes. In ICLR, 2014. R. G. Krishnan, U. Shalit, and D. Sontag. Deep kalman filters. arXiv preprint arXiv:1511.05121, 2015. A. Kumar, O. Irsoy, J. Su, J. Bradbury, R. English, B. Pierce, P. Ondruska, I. Gulrajani, and R. Socher. Ask me anything: Dynamic memory networks for natural language processing. arXiv preprint arXiv:1506.07285, 2015. B. M. Lake, R. Salakhutdinov, and J. B. Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 350(6266):1332–1338, 2015. 16 S. Levine and P. Abbeel. Learning neural network policies with guided policy search under unknown dynamics. In Advances in Neural Information Processing Systems, pages 1071–1079, 2014. C. Li, J. Zhu, and B. Zhang. Learning to generate with memory. arXiv preprint arXiv:1602.07416, 2016. B. A. Pearlmutter. Gradient calculations for dynamic recurrent neural networks: A survey. IEEE Transactions on Neural networks, 6(5):1212–1228, 1995. L. R. Rabiner. A tutorial on hidden markov models and selected applications in speech recognition. Proceedings of the IEEE, 77(2):257–286, 1989. R. Ranganath, D. Tran, and D. M. Blei. Hierarchical variational models. In International Conference on Machine Learning, 2016. S. Reed and N. de Freitas. Neural programmer-interpreters. arXiv preprint arXiv:1511.06279, 2015. D. J. Rezende and S. Mohamed. Variational inference with normalizing flows. arXiv preprint arXiv:1505.05770, 2015. D. J. Rezende, S. Mohamed, and D. Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In ICML, 2014. S. Riedel, M. Bošnjak, and T. Rocktäschel. Programming with a differentiable forth interpreter. arXiv preprint arXiv:1605.06640, 2016. A. Santoro, S. Bartunov, M. Botvinick, D. Wierstra, and T. Lillicrap. One-shot learning with memory-augmented neural networks. arXiv preprint arXiv:1605.06065, 2016. S. Särkkä. Bayesian filtering and smoothing, volume 3. Cambridge University Press, 2013. S. Sukhbaatar, J. Weston, R. Fergus, et al. End-to-end memory networks. In Advances in neural information processing systems, pages 2440–2448, 2015. R. S. Sutton. Dyna, an integrated architecture for learning, planning, and reacting. ACM SIGART Bulletin, 2(4):160–163, 1991. M. Tornio, A. Honkela, and J. Karhunen. Time series prediction with variational bayesian nonlinear state-space models. In Proc. European Symp. on Time Series Prediction (ESTSP07), pages 11–19, 2007. O. Vinyals, M. Fortunato, and N. Jaitly. Pointer networks. In Advances in Neural Information Processing Systems, pages 2692–2700, 2015. M. Watter, J. Springenberg, J. Boedecker, and M. Riedmiller. Embed to control: A locally linear latent dynamics model for control from raw images. In Advances in Neural Information Processing Systems, pages 2746–2754, 2015. J. Weston, S. Chopra, and A. Bordes. Memory networks. arXiv preprint arXiv:1410.3916, 2014. 17 A P ER S TEP VARIATIONAL L OWER B OUND The variational bound gives Z log p(x) = log dz p(x, z) (17) Z q(z|x) q(z|x) p(x, z) = log Eq(z|x) q(z|x) p(x, z) ≥ Eq(z|x) log (by Jensen’s ineq.). q(z|x) = log dz p(x, z) (18) (19) (20) For sequences of random variables, the corresponding inequality is log p(x≤T ) ≥ Eq(z≤T |x≤T ) log p(x≤T , z≤T ) . q(z≤T |x≤T ) (21) In our formulation, we assume the factorisations p(x≤T , z≤T ) = T Y p(xt |z≤T , x<t )p(zt |z<t , x<t ) t=1 and q(z≤T |x≤T ) = T Y q(zt |z<t , x≤t ). t=1 These allow us to convert equation 21 into a per time-step bound. We have: " T # X Q log p(x≤T ) ≥ E Tt=1 q(zt |z<t ,x≤t ) log p(xt |z≤t , x<t ) + log p(zt |z<t , x<t ) − log q(zt |z<t , x≤t ) t=1 (22) " = EQT T X t=1 q(zt |z<t ,x≤t ) # log p(xt |z≤t , x<t ) + log t=1 Let Ct ≡ log p(xt |z≤t , x<t ) + log p(zt |z<t ,x<t ) q(zt |z<t ,x≤t ) . " log p(x≤T ) ≥ EQT t=1 p(zt |z<t , x<t ) . q(zt |z<t , x≤t ) (23) Then: T X q(zt |z<t ,x≤t ) # Ct (24) t=1 Z Z q(z1 |x1 ) = z1 Z q(z2 |z1 , x≤2 )· · · z2 q(zT |z<T , x≤T ) zT T X Ct . (25) t=1 Each Ct is not a function of the elements of the set {zt+1 , zt+2 , . . . , zT }. Therefore, we can move each Ct out from the integrals involving only those terms: Z Z Z = q(z1 |x1 )C1 q(z2 |z1 , x≤2 )· · · q(zT |z<T , x≤T ) z z2 z Z 1 Z Z T + q(z1 |x1 ) q(z2 |z1 , x≤2 )C2 · · · q(zT |z<T , x≤T ) z1 z2 zT + ... Z Z Z + q(z1 |x1 ) q(z2 |z1 , x≤2 )· · · z1 z2 zT 18 q(zT |z<T , x≤T )CT (26) The interior integrals all sum to 1 since the q-s are distributions. Thus, we have: Z = q(z1 |x1 )C1 z1 Z Z + q(z1 |x1 ) q(z2 |z1 , x≤2 )C2 z1 z2 + ... Z Z Z + q(z1 |x1 ) q(z2 |z1 , x≤2 )· · · z1 z2 q(zT |z<T , x≤T )CT . (27) zT We can write this more simply as F= T X EQtτ =1 q(zτ |z<τ ,x≤τ ) Ct . (28) t=1 Finally, we bring this expression into a more conventional form by writing   T X p(zt |z<t , x<t ) Q t F= E τ =1 q(zτ |z<τ ,x≤τ ) log p(xt |z≤t , x<t ) + log q(zt |z<t , x≤t ) t=1    T X p(zt |z<t , x<t ) EQt−1 q(zτ |z<τ ,x≤τ ) Eq(zt |z<t ,x≤t ) log p(xt |z≤t , x<t ) + log = τ =1 q(zt |z<t , x≤t ) t=1  T X = EQt−1 q(zτ |z<τ ,x≤τ ) Eq(zt |z<t ,x≤t ) log p(xt |z≤t , x<t ) τ =1 t=1  − KL[q(zt |z<t , x≤t )||p(zt |z<t , x<t )] . (29) Bringing back the distributional parameters pθ and qφ yields an equation equivalent to the main text. B B.1 V ISUAL A RCHITECTURES TASKS WITH D IGITS AND C HARACTERS Convolution/ Deconvolution N Batch Normalization {} Concatenation + Sum Rectified Linear Layer 7x7 5x5 N 3x3 Concatenation {} + N 1x1 Figure 18: The first visual block. The posterior map – that is, the mapping from inputs xt to latents zt – was implemented as a convolutional neural network (CNN). The CNN consisted of two “blocks,” arranged in series (the first block is shown in Figure 18). The first block was fed a 1 × 28 × 28 grey-scale image as input (rescaling the input images if necessary), where the saturation was mapped into the range (−1, 1). This input was passed to four, parallel, dimension-preserving convolutional streams, which each 19 convolved the input using 8 kernels of size 1 × 1, 3 × 3, 5 × 5, and 7 × 7, respectively, padding as necessary for dimension-preservation. The outputs from the parallel streams were passed through a batch-normalization layer and a rectified-linear layer, before being concatenated to a total of 32 feature-maps. These 32 feature-maps served as the input to a dimension-halving convolution using a kernel of size 3 × 3, which was followed by a batch normalization layer and a rectified linear layer. Thus, this first processing block functioned to take in a 32 × 32 image as input and return 32 featuremaps of size 16 × 16. A second, identical block followed from the first, except for two differences: there was no batch normalization and rectified layer after the final convolution, and the final number of kernels was 64. To produce a sample of a latent variable, we then mapped the kernels through a linear layer to a vector of length 64. 32 of these dimensions were used to construct the mean µ and 32 were used to construct the vector log σ for the parameters of a Gaussian distribution. Together with a sample from a standard normal , the latent was generated as zt = µt + σt t , thus completing the posterior map. The observation map – the mapping from latents and any recurrent deterministic variables to reconstructions x̂t – was identical to the posterior map, except convolution operations were replaced with deconvolution operations. B.2 TASKS I NVOLVING F RAMES OF 3D E NVIRONMENTS For the three-dimensional environment visual model, our inputs included colour channels comprising 3 × 32 × 32 values. We used two separate pathways, one roughly to encode global information across an image, and another roughly to encode local textures. The global information pathway convolved the image using 128 5 × 5 kernels with stride 3, no padding. These were then passed through 256 4 × 4 kernels with stride 2 without padding. Then the feature-maps were convolved with 256 4 × 4 kernels with stride 1 without padding. This gave 256 1 × 1 super-pixels. The local texture pathway had a convolutional layer with 16 kernels of size 4 × 4, stride 2, padding of 1. The feature-maps were passed through another convolutional layer with 8 kernels of size 4 × 4, stride 2, and padding of 1. This yielded a block of size 8 × 8 × 8, which was linearised to 512 vector elements and concatenated with the 256 features from the global information pathway. These were passed through a linear layer to produce a 250-dimensional µ and 250-dimensional log σ for the latent distribution. The observation map was the transpose of this model as before. C G ENERATED S AMPLES FOR S ELECT TASKS VRNN NTM LRU Intro. DNC Figure 19: Perfect recall with l = 10, k = 5. The last k = 5 frames should match the first 5. 20 VRNN NTM LRU Intro. DNC Figure 20: Perfect recall with l = 20, k = 5. The last k = 5 frames should match the first 5. VRNN NTM LRU Intro. DNC ... ... ... ... ... Figure 21: Perfect recall with l = 50, k = 5. Intermediate frames are omitted. The last k = 5 frames should match the first 5. VRNN NTM LRU Intro. DNC Figure 22: Parity recall with l = 10, k = 5. Over the last 5 frames, a generated 0 indicates should correspond to an even digit in the first five frames, and a generated 1 should correspond to an odd digit. 21 VRNN NTM LRU Intro. DNC Figure 23: Parity recall with l = 20, k = 5. Same as above. ... ... ... ... ... VRNN NTM LRU Intro. DNC Figure 24: Parity recall with l = 50, k = 5. input VRNN continual generation recon. NTM LRU Intro. DNC Figure 25: One-shot recall with l = 20, k = 5. The last 5 generated images should match the first 5, even though these images were held out from the training set. 22 VRNN NTM LRU Intro. DNC Figure 26: Dynamic dependency task with l = 20, k = 5. Starting from the fifth-to-last frame, the numeric value of each digit should indicate the temporal position of the digit to retrieve next. VRNN NTM LRU Intro. DNC Figure 27: Content-based recall with l = 20, k = 5. The fifth-to-last frame is a repeat of a frame in the pre-recall phase. A working model should have continued to generate the same sequence from there. 23 24 recon. continual generation Figure 28: Rotation in a complex environment. The models observed 15 frames from the environment during one rotation, then generated corresponding frames during a second rotation. The VRNN model clearly forgot information from the first rotation, but the other models clearly demonstrated memory of paintings on the walls, floor colour, and buildings on the skyline. DNC Intro. LRU NTM VRNN D P SEUDOCODE FOR G ENERATING A RTIFICIAL S EQUENCES WITH C HARACTERS AND D IGITS Algorithm 1 Training Sequence Generation for Perfect Recall/One-shot Recall Tasks 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: procedure P ERFECT R ECALL /O NE S HOT R ECALL generator ← instance generator from dataset (MNIST/OmniGlot) l ← length of random sequence k ← length of recall interval sequence ← {} . Pick a random sequence of instances from the dataset for i = 1, l do sequence[i] ← s ∼ generator() . Repeat instances from the beginning of the sequence for j = 1, k do append(sequence, sequence[j]) return sequence . Return the full sequence Algorithm 2 Training Sequence Generation for Parity Recall Task 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: procedure PARITY R ECALL generator ← instance generator from dataset (MNIST) l ← length of random sequence k ← length of recall interval sequence, labels ← {}, {} . Pick a random sequence of instances from . the dataset and their labels for i = 1, l do sequence[i], labels[i] ← s, ls ∼ generator() . Append random 0 or 1 instances based on the parity of the . labels of instances from beginning of the sequence for j = 1, k do append(sequence, s ∼generator(label = parity(labels[j]))) return sequence . Return full sequence Algorithm 3 Training Sequence Generation for Dynamic Dependency Task 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: procedure DYNAMIC D EPENDENCY generator ← instance generator from dataset (MNIST) l ← length of random sequence k ← length of recall interval sequence, labels ← {}, {} . Pick a random sequence of instances from . the dataset and their labels for i = 1, l do sequence[i], labels[i] ← s, ls ∼ generator() . Use the label of the previous instance as an 0-based address and . append the instance located in that address in the sequence for j = 1, k do append(sequence, sequence[labels[l+j-1]] ) return sequence . Return full sequence Algorithm 4 Training Sequence Generation for Similarity-Cued Recall Tasks 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: procedure S IMILARITY BASED D EPENDENCY generator ← instance generator from dataset (MNIST) l ← length of random sequence k ← length of recall interval sequence ← {} . Pick a random sequence of instances from the dataset for i = 1, l do sequence[i] ← s ∼ generator() . Uniformly choose a random sub-sequence and . append it to the end of the sequence r ∼ Uniform[1, l − k] sub-sequence ← sequence[r : r + k] append(sequence, sub-sequence) return sequence . Return full sequence 25
9cs.NE
Compiling Quantum Circuits to Realistic Hardware Architectures using Temporal Planners Davide Venturelli1,2 , Minh Do3,4 , Eleanor Rieffel1 , Jeremy Frank4 arXiv:1705.08927v2 [quant-ph] 21 Dec 2017 1 NASA Ames Research Center, Quantum Artificial Intelligence Laboratory USRA Research Institute for Advanced Computer Science (RIACS) 3 Stinger Ghaffarian Technologies (SGT Inc.) 4 NASA Ames Research Center, Planning and Scheduling Group 2 E-mail: [email protected] 2 Abstract. To run quantum algorithms on emerging gate-model quantum hardware, quantum circuits must be compiled to take into account constraints on the hardware. For near-term hardware, with only limited means to mitigate decoherence, it is critical to minimize the duration of the circuit. We investigate the application of temporal planners to the problem of compiling quantum circuits to newly emerging quantum hardware. While our approach is general, we focus on compiling to superconducting hardware architectures with nearest neighbor constraints. Our initial experiments focus on compiling Quantum Alternating Operator Ansatz (QAOA) circuits whose high number of commuting gates allow great flexibility in the order in which the gates can be applied. That freedom makes it more challenging to find optimal compilations but also means there is a greater potential win from more optimized compilation than for less flexible circuits. We map this quantum circuit compilation problem to a temporal planning problem, and generated a test suite of compilation problems for QAOA circuits of various sizes to a realistic hardware architecture. We report compilation results from several state-of-the-art temporal planners on this test set. This early empirical evaluation demonstrates that temporal planning is a viable approach to quantum circuit compilation. 1. Introduction We explore the use of temporal planners to optimize compilation of quantum circuits to newly emerging quantum hardware. Currently only special purpose quantum hardware is commercially available: quantum annealers that run only one type of quantum optimization algorithm. The emerging gate-model processors, currently in prototype phase, are universal in that, once scaled up, they can run any quantum algorithm. This facilitates expanding the empirical exploration of quantum algorithms beyond optimization, as well as enabling the exploration of a broader array of quantum approaches to optimization. Quantum algorithms are usually specified as idealized quantum circuits that do not take into account hardware constraints. This approach makes sense since the actual physical constraints vary from architecture to architecture. With the advent of gate-model processors, researchers have begun to explore approached to compiling idealized quantum circuits to realistic hardware. For example, emerging superconducting quantum processors have planar architectures with nearest-neighbor restrictions on the locations (qubits) to which the gates can be applied. Such processors include the 5-qubit processor IBM recently made publicly available the cloud [IBM, 2017a], recently updated to 20 qubits, and processors being fabricated by other groups, such as Intel/TU Delft [Versluis et al., 2016], UC Berkeley [Ramasesh et al., 2017], Rigetti Computing [Sete et al., 2016] [Reagor et al., 2017], and Google [Boxio, 2016]. All cited groups have announced plans to build 3 gate-model quantum processors with 40 or more qubits in the near term. Idealized circuits generally do not respect nearest neighbor constraints; idealized quantum circuits generaly contain many gates between pairs of qubits that are not nearest neighbors and therefor cannot be implemented directly on the processors. - see Figure 2 for more details. For this reason, compiling idealized quantum circuits to superconducting hardware requires adding supplementary gates that move qubit states to locations where the desired gate can act on them. Quantum computational hardware suffers from decoherence, which degrades the performance of quantum algorithms over time. Especially for near-term hardware, with only limited means to mitigate decoherence, it is critical to minimize the duration of (execution of) the circuit that carries out the quantum computation, so as to minimize the decoherence experienced by the computation. Other, more sophisticated, compilation cost functions, such as figure-of-merits taking into account fidelity of operations [Bishop et al., 2017] [Moll et al., 2017], could be used in the future within the temporal planning approach to compilation we explore here. Optimizing the duration of compiled circuits is a challenging problem due to the parallel execution of gates with different durations. For quantum circuits with flexibility in when the gates can be applied, or when some gates commute with each other (so can be applied in a different order while still achieving the same computation) the search space for feasible compilations is larger than for less flexible circuits. That freedom makes it more challenging to find optimal compilations but also means there is a greater potential win from more optimized compilation than for less flexible circuits. While there has been active development of software libraries that server as a software toolchain to compile an algorithm (specified in some standardized language) into idealized quantum circuits (see Ref. [Chong et al., 2017] for a review, and [Wecker and Svore, 2014] [Smith et al., 2016a] [Steiger et al., 2016a] [Devitt, 2016] [Barends et al., 2016] for the most relevant works), few approaches have been explored for compiling idealized quantum circuits to realistic quantum hardware [Beals et al., 2013] [Brierley, 2015] [Bremner et al., 2016], leaving the problem open for innovation. Recent studies explore exact schemes [Wille et al., 2014], approximate tailored methods [Kole et al., 2017] or formulations suited for off-the-shelf Mixed Integer Linear Programming (MILP) solvers such as Gurobi [Bhattacharjee and Chattopadhyay, 2017]. The benchmarks in prior work have mostly revolved around circuits composed by elementary gates relevant for faulttolerant quantum computing schemes, with attention shifting recently in the quantum computing community towards algorithms to be run on near-term hardware. These algorithms have circuits that often contain a large number of mutually commuting gates, 4 but not necessarily natively available in the hardware. Recently a tailored scheduling heuristic approach has been published by [Guerreschi and Park, 2016] to schedule quantum circuits with many commuting gates (but only for gates of unity duration and/or on a linear architecture.) Prior work had not used a temporal planning approach, which can be applied quite generally, enabling us to address, for the first time, gates with variable durations, generic architectures with inhomogeneous spatial features, and efficiencies that can be gained when large numbers of gates commute. An similar issue arising when compiling classical programs is the register allocation problem, in which program variables are assigned to machine registers to improve execution time; this problem reduces to graph coloring [Fu et al., 2005]. In this paper, we apply temporal planning techniques to the problem of compiling quantum circuits to realistic gate-model quantum hardware. Temporal planning is a subdomain of Automated Planning and Scheduling, a branch of Artificial Intelligence (AI) which is concerned with the identification of strategic decisions, among a large finite set of possibilities, to achieve a specific goal that includes temporal constraints or time optimization objectives. As we will explain in Section 4, we use domain-independent AI planners to find a parallel sequence of conflict-free instructions that, when executed, achieve the same result as the machine-independet quantum circuit. Additional instructions specific to a gate-model architecture are inserted. The temporal planners aim to provide a machinedependent plan that minimizes makespan, while respecting all machine-dependent constraints (e.g. available gates to perform swap operations, physical layout of the gates, duration of gates, exclusions on simultaneous operations.) While our approach is general, we focus our initial experiments on circuits that have few ordering constraints and thus allow highly parallel plans. We report on experiments using a diverse set of temporal planners to compile circuits of various sizes to an architecture inpired by those currently being built. This early empirical evaluation demonstrates that temporal planning is a viable approach to quantum circuit compilation. In Sec. 2, we describe the problem of compiling idealized quantum circuits to specific hardware architectures in detail. Sec. 3 describes QAOA circuits, the class of circuits with many commuting gates that we target for our initial invstigation. Section 4 explains our mapping of the quantum circuit compilation problem to temporal planning problem. Sec. 5 presents our results applying state-of-the-art temporal planners to this circuit compilation problem. In Sec. 6, we outline future research directions stemming from this study. The aim is to write the paper to communicate clearly to both the quantum computing community and the temporal planning and artificial intelligence communities, so it will necessarily 5 contain some material that is review for one or the other group. 2. Architecture-specific quantum circuit compilation problem Quantum circuits for general quantum algorithms are often described on an idealized architecture in which any 2-qubit gate can act on any pair of qubits. Physical constraints impose restrictions on which pairs of qubits support gate interactions in an actual physical architecture. In this work, we concentrate on superconducting qubit architectures, using an abstract model that takes into account gate durations and the nearest neighbor topology of the quantum processors which will be used as the basis for the temporal planning formulation of the compilation problem. In general, the model will specify different types of abstract quantum gates, each taking different durations, with a duration depending on the specific physical implementation in terms of primitive gates. Gate-model quantum architectures operate as digital computers with a clock, and times could be expressed in terms of clock cycles. Elementary or primitive gates are the gates that have been directly implemlented in the hardware and carefully calibrated, so are generally the fastest possible operations. However, from a sequence of primitive gates, composite gates can be synthesized, making it possible to describe a chip in terms of the relevant gates for the algorithm, as long as we take into account the number of clock cycles that are required to perform the wanted gate. In the model, qubits in a quantum processor can be thought of as nodes in a graph, and the relevant 2-qubit quantum gates are associated to edges. In many architectures more than one 2-qubit gate may be implementable between a given pair of qubits, so this structure is a multigraph (multiple edges allowed between two nodes). In general the gates are nonsymmetric so the multi-graph could be directed (i.e. distinguishing the roles of two qubits), as for instance is the case if we include the primitive (calibrated) gates in the IBM Quantum Experience chip [IBM, 2017b]. Gates that operate on distinct sets of qubits may be able operate concurrently, though there can be additional restrictions on which operations can be done in parallel, such as requiring the sets in operation to be non-adjacent, due to cross-talk and frequency-crowding, as in Google’s proposed architecture [Boxio, 2016]). The swap gate and its synthesis: In this study, we make extensive use of a particular type of a 2-qubit gate, the swap gate, which exchanges the state of two qubits, though other gate choices are possible. In order for the computation specified by the idealized circuit to be completed, quantum information must be moved to locations where the desired gates = X−π/2 X−π/2 iSWAP = iSWAP = iSWAP 6 X−π/2 Figure 1. A known decomposition of the swap gate using as primitive gates three CNOTs or replacing recursively the C-NOTs with their synthesis in terms of iSWAPs and X-rotations. can be carried out, and a sequence of swap gates can be used to move the contents of two distant qubits to a location where a desired gate can be executed. For this reason, the swap gate is a useful gate for compilation in sparsely-connected architectures. This origin of the “duration” abstraction for gates is exemplified in Figure 1(left) for the swap gate, which can be efficiently decomposed in three control-NOT (CNOT) gates [Schuch and Siewert, 2003]. The swap gate should last at least three times as long as the CNOT gate [Vatan and Williams, 2004]. Figure 1(right) shows a possible synthesis of the same swap in terms of only iSWAP gates, which are the primitives available everywhere across the chip described in [Sete et al., 2016] . Beside the timings dictated by logical gate synthesis, different choices of synchronization and time-scales of executions are possible, leading to different possible durations. For instance, in [Caldwell et al., 2017] the controlled-Z gate (CZ) could last 175 or 270 nanoseconds depending on which choices are made at calibration. Across the chip, calibration might result in different gate times depending on the location in the chip even if the underlying circuitry is the same, as shown in [IBM, 2017b], where the CNOT gate duration could vary up to a factor of 2. For the purposes of this study, we consider a simplified model in which swap gates are available between any two adjacent qubits on the chip and all swap gates have the same duration, but our temporal planning approach can handle the more general cases. 2.1. Formal problem statement An idealized quantum circuit consists of a set of nodes (qubits), which can be thought of as memory locations, and a specification of start times for operations (gates), each acting on a single node or set of nodes. The idealized quantum circuit also includes implicit or explicit specification of which operations commute (the order in which they are exe- 7 cuted can be switched without affecting the computation) either individually or as blocks. A hardware architecture specification can be viewed as a weighted, labeled multigraph on a set of nodes, corresponding to physical quantum memory locations (qubits) in the hardware, where each edge represents an operation (quantum gate) that can be physically implemented on the pair of qubits in the physical hardware, possibly as a composite gate, with the labels indicating the type of quantum gate and the weight giving its duration. The output of the compilation process is a circuit that can be used to perform a quantum computation. It does not perform the computation itself, and therefore the compilation step can be carried out on a conventional (non-quantum) computer. In this work, we are concerned with the efficiency and effectiveness of the compilation. A separate issue, which we do not consider here, is the performance of the quantum algorithms we are compiling. Ideal to hardware-specific quantum circuit compilation problem: The problem input is an idealized quantum circuit and a hardware multigraph. The output is a time-resolved hardware-specific circuit that implements the quantum computation described by idealized quantum circuit. The objective is to minimize the makespan (the circuit duration) of the resulting schedule. 2.2. Compilation examples Fig. 2 shows a hypothetical chip design that we will use for our experiments on circuit compilation. It is inspired by the architecture proposed by Rigetti Computing Inc. [Sete et al., 2016]. Qubits are labeled with ni and the colored edges indicate the types of 2-qubit gates available (considering just those relevant for the algorithm), in this case swap gates and two other types of 2-qubit gate (further described in Section 4). Given an idealized circuit consisting only of the non-swap gates, used to define general quantum algorithms, the circuit compilation problem is to find a new architecture-specific circuit by adding swap gates when required, and reordering commuting operations when desired. The objective is to minimize the overall duration to execute all gates in the new circuit. To illustrate the challenges of finding effective compilation, we present some concrete examples, with reference to the 8-qubit section in the top left of Fig. 2. Example 1: Suppose that at the beginning of the compilation, each qubit location ni is associated to the qubit state qi . Let us also assume that the idealized circuit requires the application of a red gate to the states q2 and q4 , initially located on qubits n2 and n4 . One way to achieve this task would be to swap the state in n4 with n1 , while at the same 8 n2 n3 0000 n1 n4 n5 n6 n7 n8 Figure 2. Left: A schematic for the hypothetical chip design, based on an architecture proposed by Rigetti Computing used in our numerical experiments. Available relevant 2-qubit gates are represented by colored arcs in a weighted multigraph. Each color is associated to a specified, distinct gate-type and duration: SWAP gates (black) and two other types of 2-qubits gates (red and blue). The 1-qubit gates are present at each qubit (black dot). Right: Dashed boxes indicate the three different chip sizes used in our empirical evaluation (see Sec. 5). For visual clarity, only the label locations and the SWAP-gates for the smaller chip size, corresponding to the top-left sector of the largest chip, are shown. time swapping n2 with n3 . Another swap, between n1 and n2 , positions q4 in n2 where a red-gate connects it to q2 (which is now in n3 ). The sequence of gates to achieve the stated goal are: {SWAPn4 ,n1 , SWAPn2 ,n3 } → ≡ RED (q2 , q4 ) SWAP n1 ,n2 → RED n2 ,n3 (1) The first line refers to the sequence of gate applications, while the second corresponds to the algorithm objective specification (a task defined over the qubit states). The sequence in Eq. (1) takes 2τswap + τred clock cycles where τ? represents the duration of the ?-gate. Example 2: Consider an idealized circuit that requires BLUE(q1 , q2 ) ∧ RED(q4 , q2 ), in no particular order. If τblue > 3 × τswap , the compiler might want to execute BLUEn1 ,n2 while the qubit state q4 is swapped all the way clockwise in five SWAPs from n4 to n3 where REDn2 ,n3 can be executed. However, if τblue < 3×τswap , it is preferable to wait until the end of BLUEn1 ,n2 9 and then start to executthe instruction sequence in Eq. (1). 3. Compiling QAOA for the MaxCut problem While our approach can be used to compile arbitrary quantum circuits to a wide range of architectures, in this paper we concentrate on one particular case: the class of Quantum Alternating Operator Ansatz (QAOA) circuits [Farhi et al., 2014a, Hadfield et al., 2017] for MaxCut (defined in the later part of this section) to the above-mentioned architecture inspired to Rigetti Computing Inc. [Sete et al., 2016]. We choose to work with QAOA circuits because they have many gates that commute with each other (i.e., no ordering enforced). Such flexibility in the ordering of the gates means that the compilation search space is larger than for other less flexible circuits. This makes finding the optimal compilation more challenging, but also means there is potential for greater compilation optimization, compared to other less flexible classes of circuits. QAOA circuits have been the focus of recent research [Farhi et al., 2014a] [Farhi et al., 2014b] [Farhi and Harrow, 2016] [Wecker et al., 2016] [Yang et al., 2016] [Guerreschi and Smelyanski, 2017] [Jiang et al., 2017] [Wang et al., 2017] [Hadfield et al., 2017] in the quantum computing community since their introduction by Farhi et al. in [Farhi et al., 2014a]. The acronym was reworked from “quantum approximate optimization algorithm” to “quantum alternating operator ansatz” in [Hadfield et al., 2017] since QAOA circuits have been applied to exact optimization and sampling as well as to approximate optimization and there are other quantum approaches to approximate optimization. Recently Google Inc. proposed an alternative quantum approximate optimization approach in fixed nearest-neighbor architectures explicitly to avoid the compilation step that is the subject of our work [Farhi et al., 2017]. Their numerical results on MaxCut instances show a small hit in performance. Furthermore, unlike the QAOA circuits we consider here, in which the number of parameters is independent of the number of qubits, their alternative approach has many more parameters, which increase with the number of qubits, and these parameters must be optimized separately for each architecture. While their approach makes good use of near-term hardware with numbers of qubits for which the parameter optimization is tractable, ultimately one wants a scalable algorithm that can be compiled to arbitrary architectures. Thus, while interesting, especially in the very nearterm, rather than obviating the need, their work serves to underscore the need for efficient approaches to optimize compilation. 10 q5 q1 PS1 MX PS2 q6 q3 q4 q7 Figure 3. Example of a 6-vertex MaxCut problem on a randomly generated graph (qstates q2 and q8 are not appearing in this instance). The association of quantum states to every node allows the definition of the compilation objectives in terms of gates, as exemplified on the right panel for QAOA p = 2. Colored edges refer to Figure 6. We chose MaxCut as the target problem of reference, as it is becoming one of the de facto benchmark standards for quantum optimization of all types and it is considered a primary target for experimentation in the architecture of [Sete et al., 2016]. MaxCut Problem: Given a graph G(V, E) with n = |V | vertices and m = |E| edges. The objective is to partition the graph vertices into two sets such that the number of edges connecting vertices in different sets is maximized. A quadratic boolean objective function for MaxCut is: 1 X (1 − si sj ), (2) U= 2 (i,j)∈E where si are binary variables, one for each vertex vi , with values +1 or -1 indicating to which partition the vertex vi is assigned. Idealized QAOA circuits alternate between a phase separation step (PS), based on the objective function, and a mixing step. The phase-separation step for QAOA for MaxCut is simpler than for other optimization problems, consisting of a set of identical 2-qubit gates that must be applied between certain pairs of qubits depending on the graph of the MaxCut instance under consideration. Specifically, the idealized QAOA circuit for MaxCut requires a 2-qubit gate for each quadratic term in the objective function of Eq. (2), as well as 1-qubit gates for each vertex for the mixing step [Farhi et al., 2014a]. 11 In Fig. 3 a 6-vertex graph is shown, providing an illustrative instance that will be used to describe the compilation procedure. We will refer to these as p-s gates, and the main goal of the compilation is to carry them out. The p-s gates all commute with each other, implying that they can be carried out in any order without changing the computation. In the mixing phase, a set of 1-qubit operations are applied, one to each qubit‡ All p-s gates that involve a specific qubit q must be carried out before the mixing operator on q can be applied. These two steps are repeated p times. We consider p = 1 and p = 2 in our experiments (detailed in Section 5). For every vertex i ∈ V , QAOA for MaxCut requires a quantum state qi to be assigned on a qubit on the chip, and for every edge (i, j) ∈ E, the PS step of QAOA requires executing a gate corresponding to P - S(qi , qj ). We ignore the final mixing step since it is trivial to compile by just applying the 1-qubit mixing gate to each qubit as the last operation. We chose the architecture proposed by Rigetti Compuing in [Sete et al., 2016] (see Fig. 2) for our initial exploration because it offers a particularly interesting compilation, and therefore planning, problem, due to the existence of two different kinds of nearest neighbor relation in the proposed hardware. After the synthesis of the QAOA MaxCut gates, these two different relations become two different durations of two-qubit gates, which corresponds to the red and blue edges as described above. In our problem specification, while there are two flavors of p-s gates (red, blue), corresponding to two different durations of execution, the compilation goals (see figure 3) do not care on which of these two types of gates carries out the required steps. For the purpose of this proof-of-concept work, these durations we assign to the gates are not derived from actual designs of ongoing experiments, but are realistic and serve to illustrate possible future designs. The constraints on the compilation problem can be understood, with reference to Fig. 2, as: • SWAP gates are located at every edge with τswap = 2. • there are two kind of non-swap gates: P - S gates are 2-qubit gates and 1-qubit gates. • MIX gates are gates are located at every edge of the grid, but their duration τp−s can be 3 or 4 depending on their location (respectively blue or red edges in Fig.2). P-S ‡ This is another simple feature of MaxCut, and it is due to the fact that all possible 2N si variable assignments (see Eq. 2) are defining a valid cut. If this wasn’t the case, then the mixing phase would also likely require the application of 2-qubit gates, further complicating the scheduling problem. 12 • MIX gates are located at every vertex with τmix =1. • In an initialization stage, which is not considered as part of the compilation problem, a quantum state is assigned to each qubit. 4. Compilation of a Quantum Circuit as Temporal Planning Problem Planning is the problem of finding a conflict-free set of actions and their respective execution times that connects the initial-state I and the desired goal state G. We now introduce some key concepts that provide the background for approaching the problem of compiling quantum circuits as a temporal planning problem. Classical planning problems are expressed in terms of binary state variables and actions. Examples of state variables for our problem are “The quantum state Ψ is assigned to qubit number X” and “The quantum state Φ has been transformed by the application of gate G present on qubits X and Y ,” which may be True or False. Actions consist of two lists, a set of preconditions and a set of effects. The effects of an action consists of a subset of state variables with the values they take on if the action is carried out. For example, the action “State Ψ is now moved from qubit X to qubit Y ” has one precondition, “State Ψ is assigned to X = True” and has two effects “State Ψ is assigned to X = False” and “State Ψ is assigned to Y = True.” A specific planning problem specifies an initial state, with values specified for all state variables, and a goal, specified values for one or more state variables. As for preconditions, goals are conventionally positive, so the goal value for the goal variables is True. Generally, the goal specifies values for only a small subset of the state variables. A plan is a sequence of actions. A valid plan, or a solution to the planning problem, is a sequence of actions A1 , ..., AL such that the state at time step ti−1 meets the preconditions for action Ai , the effects of action Ai are reflected in the state at time step ti , and the state at the end has all of the goal variables set to True. For an introduction on Automated Planning and Scheduling, see [Ghallab et al., 2004]. Planners: A planner is software implementing a collection of algorithms; it takes as input a specification of domain and a problem description and returns a valid plan if one exists. Many different approaches have been implemented to find a viable plan, among them: (i) heuristically search over the possible valid plan trajectories or over the library of partial plans or (ii) compile the planning problem into another combinatorial substrate (e.g., SAT, MILP, CSP) and feed the problem to off-the-shelf solvers. 13 Planning Domain Description Language (PDDL): PDDL is a modeling language that was originally created to standardize the input for planners competing in the International Planning Competition (IPC). Over time, it has become the de facto standard for modeling languages used by many domain-independent planners. We use PDDL 2.1, which allows the modeling of temporal planning formulation in which every action a has duration da , starting time sa , and end time ea = sa + da . Action conditions cond(a) are required to be satisfied either (i) instantaneously at sa or ea or (ii) required to be true starting at sa and remain true until ea . Action effects eff (a) may instantaneously occur at either sa or ea . Actions can execute when their temporally-constrained conditions are satisfied, and when executed, will cause state-change effects. The most common objective function in temporal planning is to minimize the plan makespan, i.e. the shortest total plan execution time. This objective matches well with the objective of our targeted quantum circuit compilation problem. To enable reuse of key problem features present in an ensemble of similar instances, the PDDL model of a planning problem is separated into two major parts: (i) the domain description that captures the common objects and behaviors shared by all problem instances of this planning domain and (ii) the problem instance description that captures the problem-specific objects, initial state, and goal setting for each particular problem. PDDL is a flexible language that offers multiple alternatives for modeling a planning problem. These modeling choices greatly affect the performance of existing PDDL planners. For instance, many planners pre-process the original domain description before building plans; this process is time-consuming, and may produce large ‘ground’ models depending on how action templates were written. Also, not all planners can handle all PDDL language features effectively (or even at all). For this project, we have iterated through different modeling choices with the objective of constructing a PDDL model that: (i) contains a small number of objects and predicates for compact model size; (ii) uses action templates with few parameters to reduce preprocessing effort; while (iii) ensuring that the model can be handled by a wide range of existing PDDL temporal planners. Modeling Quantum Gate Compilation in PDDL 2.1: To apply a temporal planner to the circuit compilation problem, we must represent the allowed gates as actions and the desired circuit as a set of goal variables. We describe how to do so for the QAOA circuit compilation problem exemplified in Fig. 3, ensuring that for a plan to be valid, the required P - S or MIX gates are scheduled for each step of the algorithm. At the high-level, in this domain, we need to model: (i) how actions representing P - S, SWAP, and MIX gates affect qubits and 14 (:constants q1 q2 q3 q4 q5 q6 q7 q8 - qstate) (:durative-action swap 1 2 :parameters (?q1 - qstate ?q2 - qstate) :duration (= ?duration 2) :condition (and (at start (located at 1 ?q1)) (at start (located at 2 ?q2))) :effect (and (at start (not (located at 1 ?q1))) (at start (not (located at 2 ?q2))) (at end (located at 1 ?q2)) (at end (located at 2 ?q1)))) (:durative-action mix q5 at 1 :parameters ( ) :duration (= ?duration 1) :condition (and (at start (located at 1 q5)) (at start (GOAL PS1 q1 q5)) (at start (GOAL PS1 q5 q6)) (over all (not (mixed q5)))) :effect (and (at start (not (located at 1 q5))) (at end (located at 1 q5)) (at end (mixed q5)))) (:durative-action P-S 2ndPhaseSeparation at 6-7 :parameters (?q1 - qstate ?q2 - qstate) :duration (= ?duration 3) (:durative-action P-S 1stPhaseSeparation at 6-7 :condition (and (at start (located at 6 ?q1)) :parameters (?q1 - qstate ?q2 - qstate) :duration (= ?duration 3) (at start (located at 7 ?q2)) :condition (and (at start (located at 6 ?q1)) (at start (not (GOAL PS2 ?q1 ?q2))) (at start (located at 7 ?q2)) (at start (GOAL PS1 ?q1 ?q2)) (at start (not (GOAL PS1 ?q1 ?q2))) (at start (mixed ?q1)) :effect (and (at start (not (located at 6 ?q1))) (at start (mixed ?q2))) (at start (not (located at 7 ?q2))) :effect (and (at start (not (located at 6 ?q1))) (at end (located at 6 ?q1)) (at start (not (located at 7 ?q2))) (at end (located at 7 ?q2)) (at end (located at 6 ?q1)) (at end (GOAL PS1 ?q1 ?q2)) (at end (located at 7 ?q2)) (at end (GOAL PS1 ?q2 ?q1))))) (at end (GOAL PS2 ?q1 ?q2)) (at end (GOAL PS2 ?q2 ?q1))))) Figure 4. PDDL model of actions representing some exemple of SWAP, MIX, and P - S gates. The first line indicates that this compilation problem involves 8 qubit states. For each action, the duration indicates how long the action takes. The first action, a swap at qubits 1 and 2, has as parameters the two qstates to swap. The condition checks that these states are indeed located at the qubits on which the swap will occur. The effect makes sure the states have been swapped. The second action mixes qstate q5 at qubit 1, with conditions that state q5 is indeed at qubit 1, and both the phase separation gates involving qstate q5 (see Fig. 3) have been carried out. The effects include setting mixed q5 to TRUE The third and fourth actions are phase separation actions in a p = 2 circuit corresponding to the first and second levels of the algorithm. 15 qubit states (qstate); (ii) the actual qubits and qstates involved in a particular compilation problem, with their initial locations and final goal requirements, (iii) the underlying graph structure (gates connecting different pairs of qubits). We follow the conventional practice of modeling (i) in the domain description while (ii) is captured in the problem description. One common practice is to model (iii) within the problem file. However, given that we target a rather sparse underlying qubit-connecting graph structure (see Fig. 2), we decide to capture it within the domain file to ease the burden of the “grounding” and pre-processing step for existing planners, which can be very time-consuming. Specifically: Objects: We need to model three types of object: qubits, qstates, and the location of the P - S and SWAP gates (i.e., edges in the multigraph of Fig. 2 connecting different qubits). Since qstates are associated (by means of the predicate located at, see Fig. 4 for concrete example) to specific qubits, they have been modeled explicitly as planning objects, while the qubits and the gate locations (i.e., edges) are modeled implicitly. It is clear from the action definitions in Fig. 4 that qubit locations are embedded explicitly within the action declaration. This approach avoids declaring qubits as part of the action parameters, significantly reducing the number of ground actions to be generated. For 2-qubit actions, the potential number of ground actions reduces from N 4 to N 2 × |E|, with N the number of qubits in the chip (up to 40) and E the set of connections between qubits. While it’s true that many modern planners will be able to filter out invalid ground actions during the grounding/preprocessing step, our empirical evaluation shows that capturing the graph structure explicitly in the domain file speeds up the preprocessing time of all tested planners, sometime as significantly as 40x. Actions: Temporal planning actions are created to model: (i) 2-qubit SWAP gates, (ii) 2-qubit P - S gates, and (iii) 1-qubit MIX gates. For reference, Fig. 4 shows the PDDL description of a SWAP gate between qubits 1 and 2, the MIX gate of state q5 on qubit 1, and the P - S gates between qubits 6 and 7 at the first and second phase separation. § In the action’s condition list, we specify that gates are accomplished on the two qstates only if they are located on the corresponding qubits. Note that some planners (e.g., CPT, POPF) can not handle action preconditions that are specified negatively (e.g., (overall(not(mixedq5))) of action mix q5 at 1 in Figure 4). For those planners, we’ve also created another PDDL version of our domain where dummy predicates such as not mixed is introduced to represent the opposite value of those that need to be negatively satisfied in some action’s § The full set of PDDL model for all our tested problems is available at: https://ti.arc.nasa.gov/ m/groups/asr/planning-and-scheduling/VentCirComp17_data.zip 16 precondition list. To prevent a qstate q currently belonging to qubit X from being addressed by multiple gates at the same time (i.e. “mutex” relations in planning terminology), we assign value FALSE to the predicate (located at X q) at the starting time of all actions involving q. The most complex constraint to model is the conditions to mix a qstate q given the requirement that all P - S gates involving q in the previous phase separation step have been executed. We explored several other choices to model this requirement such as: (i) use a metric variable P Scount(q) to model how many P - S gates involving q have been achieved at a given moment; or (ii) use ADL quantification and conditional effect constructs supported in PDDL. Ultimately, we decided to explicitly model all P - S gates that need to be achieved as conditions of the MIX(q) action. This is due to the fact that alternative options require using more expressive features of PDDL2.1 which are not supported by many effective temporal planners.k Objective: For a level p QAOA circuit, the goal is to have all of the (GOAL P Si ?q1 ?q2) predicates, for any q1 and q2 connected in the graph, for 1 ≤ i ≤ p set to TRUE and all mixedi qj set to true for 1 ≤ j ≤ N and 1 ≤ i ≤ p − 1 (since the final mixing step can be added by hand at the end). Since we only consider p = 1 and p = 2, so only have a mixing step in the p = 2 case, we have simplified the notation to simply mixed qj. Further, we use the standard temporal planning objective of minimizing the plan makespan. Minimizing the makespane coincides with minimizing the circuit depth, which is the main objective of the compilation problem. Alternative models: Given that non-temporal planners can perform much better than temporal planners on problems of the same size, we also created the non-temporal version of the domain by discretizing action durations into consecutive “time-steps” ti , introducing additional predicates next(ti , ti+1 ) enforcing a link between consecutive time-steps. However, initial evaluation of this approach with the M/Mp SAT-based planner [Rintanen, 2012] (which optimize parallel planning steps) indicated that the performance of non-temporal planners on this discretized (larger) model is much worse than the performance of existing temporal planners on the original model. k Only one of six planners in the Temporal track of the latest IPC (2014) supports numeric variables and also only one of six supports quantified conditions. Preliminary tests with our PDDL model using metric variables to track satisfied goals involving qstate q using several planners shows that they perform much worse than on non-metric version, comparatively. This is to be expected as currently, state-of-the-art PDDL planners still do not handle metric quantities as well as logical variables. 17 Another option is to totally ignore the temporal aspect and encode it as a “classical” planning problem where actions are instantaneous. A post-processing step is then introduced to inject back the temporal constraints and schedule actions in the found classical plans. While we do not believe this approach would produce good quality plans, it’s another promising option to scale up to larger problems in this domain. 5. Empirical Evaluation We modeled the QAOA circuit compilation problem as described in the previous sections and tested them using various off-the-shelf PDDL 2.1 Level 4 temporal planners. The results were collected on a RedHat Linux 2.4Ghz machine with 8GB RAM. Problem generation: We consider three problem sizes based on grids with N = 8, 21 and 40 qubits (dashed boxes in Fig. 2). The utilized chip layouts are representative of devices to come in the next 2 years¶ For each grid size, we generated two problem classes: (i) p = 1 (only one PS-mixing step) and (ii) p = 2 (two PS-mixing steps). To generate the graphs G for which a MaxCut needs to be found, for each grid size, we randomly generate 100 Erdös-Rényi graphs G [Erdös and Rényi, 1960]. Half (50 problems) are generated by choosing N of N (N − 1)/2 edges over respectively 7, 18, 36 qstates randomly located on the circuit of size 8, 21, and 40 qubits (referred to herafter as ‘Utilization’ u=90%). The other half are generated by choosing N edges over 8, 21, and 40 qstates, respectively (referred to herafter as ‘Utilization’ u=100%). In total, we report tests on 600 random planning problems with size in the range [1024-232000] for the number of grounded actions and [192-8080] for the number of predicates. Planner setup: Since larger N and p lead to more complex setting with more predicates, ground actions, requiring planners to find longer plans, the allocated cutoff time for different setting are as follow: (i) 10 minutes per instance for N = 8, (ii) 30 minutes per instance for P = 1, N = 21; (iii) 60 minutes per instance for other cases. The timelimits are comparable to what used in the previous International Planning Competitions. We select planners that performed well in the temporal planning track of previous IPCs, while at the same time representing a diverse set of planning technologies: ¶ A gate-model 8-qubit chip with the grid we used is currently available from Rigetti, however the gate set is currently uncalibrated or calibrated with different durations depending on the edges, so our benchmarks do not model actual hardware. 18 • LPG: which is based on local search with restarts over action graphs [Gerevini et al., 2003]. Specifically, LPG incrementally builds a multi-level graph structure. Each layer represented by a single action and each graph edge represents a supporting connection between one action’s effect with a condition of another action appearing in a later layer. The graph leaf nodes represent action conditions that have not been supported (i.e., “connected”) by other action effects. At the beginning of the search process, LPG starts with a two-layer graph consisting of two newly created actions: (i) Ainit : which occupies the first layer of the graph, has an empty condition list, and has an effect list represents state variables that are true in the initial states; (ii) Agoal : which occupies the last layer, has an empty effect list, and has a condition list represents all goals. At each search step, LPG generates the local search neighborhood by considering all decisions of either: (i) establishing a new edge connecting an existing action’s effect with an open condition of another action appears in a later layer (without conflicting with negative effects of other actions), (ii) removing an edge from the existing graph; (iii) adding another action to the graph; (iv) removing an action from the graph. Each resulting candidate partial (i.e., incomplete) plan in the local search neighborhood is evaluated by a heuristic function balancing between how close that candidate is from being a complete plan (i.e., fewer unsatisfied conditions) and how good the quality of the likely complete plan starting from that candidate partial plan based on the user’s defined objective function (e.g., minimizing the plan makespan). LPG then selects the best candidate partial plan from the search neighborhood and starts a new search episode. This process is repeated until a complete plan is found. When LPG is run in the “anytime” mode, it does not stop when the first complete plan is found, but will restart its planning process with the found plan(s) used as the baseline quality comparison on the subsequent trials. • Temporal FastDownward (TFD): a heuristic forward state-space (FSS) search planner with post-processing to reduce makespan [Eyerich et al., 2009]. In the FSS framework, the planner starts from the initial state I with an empty plan P and tries to extends P until the state resulted from applying P satisfies all goals+ . In each search step, FSS planners will generate new search nodes by taking a state SP = Apply(P, I), reached from applying P to the initial state I, and considers all actions A applicable in SP (i.e., all conditions of A are satisfied by SP ). All newly generated states S 0 = Apply(A, SP ) are put in the search queue, ordered by the heuristically evaluated “quality” of S 0 . The heuristic value evaluating a given state S generally depends on two factors: (i) the + This is in contrast to the backward state-space (BSS) planners, which build the plan “backward” starting from the goals until it reaches the initial state. 19 quality of the partial plan leading from I to S, and (ii) the estimation on the quality of the remaining plan leading from S to the goals. In TFD, the second part is estimated through analyzing a set of special structure called the domain-transition graphs (DTG) and causal-graph (CG) that are statically built for each planning problem∗ . After a valid plan P is found, TFD also tries to improve the final plan makespan by rescheduling actions in P , pushing them to start as early as possible without violating the various logical and temporal constraints between different actions in P such as causal supports and potential conflicts caused by actions’ negative effects. This postprocessing step is done greedily and takes little time compared to the planning process. • SGPlan: partition the planning problem into subproblems that can be solved separately, while resolving the inconsistencies between partial plans using extended saddle-point condition [Wah and Chen, 2004] [Chen and Wah, 2006]. Specifically, SGPlan uses a sub-goal partitioning strategy in which a high-level planning problem is divided into smaller planning problems, each one targets a smaller subset of goals. Furthermore, if a “landmark” (i.e., a given state or condition that needs to be visited by all plans when solving a given problem) is found for a subset of the goals, that landmark can be used to further partition a sub-planning problem into a subset of secondary sub-problems. Thus, the original planning problem can be partitioned into a hierarchy of multi-level interconnected smaller sub-problems, each with its own initial state and set of goals. Each sub-problem can be solved by any off-the-shelf planner. In particular, SGPlan uses a slightly modified Metric-FF, a forward state-space planner, and an earlier version of LPG to solve sub-planning problems. • CPT: uses the Partial Order Causal Link (POCL) framework, which once dominated planning research. POCL planners search through the space of partial plans; each one consists of a list of actions and the causal-link between them. A causal-link indicates that an action’s effect is used to support another action’s condition. CPT [Vidal and Geffner, 2006] utilizes techniques from constraint-programming to create (1) effective branching scheme to select what action to consider next during each search step; (2) a makespan-bound automatically extracted from the planning problem to set the horizon for the solution search. At the moment, CPT is one of the most effective temporal planners that can minimize plan makespan. ∗ A directed edge in the DTG connects two values v and v 0 of a given state variable s in which there exist an action a that can make the “transition” from v to v 0 by deleting v and add v 0 when executed. There is an edge in CG connecting two DTGs associated with two state variables s and s0 if there is an action a that has a condition depends on s and an effect causing change of the value of s0 . 20 Utilization u LPG TFD SGPlan POPF CPT P1 P2 N8 N21 N40 N8 N21 0.9 1.0 0.9 1.0 0.9 1.0 0.9 1.0 0.9 1.0 50 50 50 50 10 14 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 48 50 8 19 50 50 4 6 50 50 - Table 1. Summary of the solving capability of selected planners. Numbers indicate how many random problems out of 50 have been solved. • POPF: is a forward-chaining planner that combines forward-state-space search framework with ideas from the POCL planning framework. In POCL planning, a new action is a threat to a causal link if it removes the condition the action introduces in support of another action. During the forward search, when applying an action to a state, POPF [Coles et al., 2010] seeks to introduce only the ordering constraints needed to resolve threats, rather than insisting the new action occurs after all of those already in the plan. POPF mostly uses the relaxed-plan heuristic similar to other forward statespace planners, but has a dedicated Simple Temporal Network (STN) implementation to handle the temporal constraints incurred from temporal actions interleaving in the explored partial plans. Besides temporal constraints, POPF can also handle linear continuous numeric effects on resources. It does so by offloading those constraints to a dedicated MILP solver. We ran SGPlan (Ver 5.22), TFD (Ver IPC2014), POPF, and CPT (latest versions at time of writing) with their default parameters. Unlike other planners, which support a single mode, LPG (Ver TD 1.0) has three standard modes, which we all ran to collect empirical results: (i) -speed that uses heuristic geared toward finding a valid plan quickly, (ii) -quality that uses heuristic balancing plan quality and search steps, and (iii) -n 10 (k = 10) that will try to find within the time limit up to 10 plans of gradually better quality by using the makespan of previously found plan as upper-bound when searching for a new plan. Since LPG (k = 10) option always dominates both LPG-quality and LPG-speed by solving more problems with better overall quality for all setting, we will exclude results for LPG-quality and LPG-speed from our evaluation discussion. For the rest of this section, LPG result is represented by LPG (k = 10). 21 Utilization u LPG TFD SGPlan POPF p=1, N8 0.9 1.0 0.88 0.89 0.87 0.87 0.67 0.68 0.81 0.81 p=1, N21 0.9 1.0 0.91 0.87 0.95 0.90 0.64 0.67 0.90 0.94 p=2, N8 0.9 1.0 0.50 0.52 0.99 0.99 0.75 0.79 0.87 0.91 Table 2. Plan quality comparison between different planners using IPC formula (higher value indicates better plan quality). Highlighted results represent the best performance in the problem class. CPT results for N=8 p=1 are proven optimal so they are implicitly assigned 1.0. Evaluation Result Summary: Table 1 shows the overall performance on the ability to find a plan of different planners. SGPlan stops after finding one valid plan while TFD, LPG, and POPF are “anytime” planners that exhaust the allocated time limit and try to find gradually improving quality plans. While CPT can find multiple plans, it does not return any until it can prove that the plan found is optimal. Since no planner was able to find a single solution for N = 40 and p = 2 within the 60 minute cutoff, we omit the result for this case from Table 1. Overall, LPG was able to solve the highest number of problems, followed by TFD, SGPlan, and POPF. Being an optimal-guarantee planner, CPT can only solve the smallest problem set (N = 8, p = 1) and can not find any solution for the other sets. SGPlan can find a solution very quickly, compared to the time it takes other three other anytime planners to find the first solution. It is the only planner that can scale up and solve all 100 problem in the N = 40 for p = 1 (finding plans with 150-220 actions). Unfortunately, SGPlan stopped with an internal error for N = 21 and p = 2. TFD generally spent a lot of time on preprocessing for p = 1, N = 21 (around 15 minutes) and p = 2, N = 21 (around 30 minutes) but when it is finished with the pre-processing phase] it can find a solution quickly and also can improve the solution quality quickly. TFD spent all of the 60 minutes time limit on pre-processing for N = 40 problems. LPG can generally find the first solution more quickly than POPF and much faster than TFD (but still much more slowly than SGPlan) but does not improve the solution quality as quickly as TFD or POPF. Plan quality comparison: to compare the plan quality across planners, we use the formula ] The two most time-consuming parts in TFD’s pre-processing routine are “processing axioms” and “invariant analysis”. While “processing axioms” are always consistently time-consuming, “invariant analysis” is heuristically done and sometime can be quick while some other times can be very time consuming. 22 ■ 45 35 30 25 20 makespan (CPT□ TFD■ LPG■ POPF■ SGPlan■) 15 10 10 ■ ■ ■ ■ ■ ■ ■ ■ ■ ■■■ ■ ■ ■ ■ ■■ ■ ■ ■■ ■ ■■■ ■■■ ■ ■ ■■ ■■■ ■■ ■ ■■ ■ ■■■■ ■■■■■■ ■■■ ■ ■■ ■■■■ ■ ■■■ ■■ ■■■ □ ■■ ■■ ■ ■■□ □□□■ □□□ ■■■ ■■ ■■□□□ ■□ ■□□ □ ■□ ■□□□ ■■□□ □ ■□ □ □□□ □□ □ □ 40 15 20 25 ■ □ □ 100 80 60 40 20 20 100 80 60 40 20 20 ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■■ ■■■ ■ ■ ■ ■■ ■ ■■ ■ ■ ■ ■■ ■ ■ ■■ ■ ■ ■■ ■■ ■ ■■■■ ■■ □ ■ ■■■■■ ■■ ■■ □■ □□ ■■ ■■■□ ■■ ■ ■■ □□■□ ■ □ ■ □□□ □□ ■ □ □ ■□ ■□□ □ □ ■ □□ □ □ □ □ □□ □ 30 35 40 45 15 20 25 ■ ■ ■ ■■■ ■ ■■■ ■ ■■ □□□ ■ □ ■□□ □ 30 ■ ■ ■ ■ ■ ■ □ □ 35 □ ■ ■ ■ □ 40 45 15 ■ ■ ■ ■■ ■ ■ ■ ■ ■ ■ ■ ■■ ■ ■ ■ ■ ■■■ ■■■ ■ ■ ■■■ ■■■■■■■ ■■■ ■ ■■ ■ ■ ■ ■ ■■■ ■ ■ ■■ ■■■■ ■ ■ ■ ■ ■ ■ ■ ■■■■■ ■■■ ■■■■ ■■■ ■ ■ ■■ ■■■■ ■ ■■ ■■■ ■ ■■■ ■■■ ■ ■ ■ ■■ 60 80 makespan TFD 100 120 ■ ■■■ ■■■■ ■ ■■ ■■■ ■ ■ ■■ ■■■■■■■■■ ■■ ■■■ ■■ ■■■ ■■ ■■■■■ ■ ■■ ■ ■ ■■ ■■■ ■■ ■■ ■ ■ ■ ■■■■■■ ■■ ■■■ ■ ■■ ■ ■ ■■ ■■■■■ ■■■■ ■ ■■■ ■■■■ ■■■ ■■ ■■■ ■■■ ■ ■ ■ ■■■ ■ ■ ■ ■ ■ ■ ■ ■ ■■ ■■ ■ ■ ■ ■ ■ ■ ■ 60 80 makespan TFD 40 60 ■ ■ 100 100 120 ■ ■ ■ ■ ■ ■ ■■■ ■■ ■ ■■ ■ ■ ■ ■■■ ■■■■ ■ ■■ ■ ■ ■ ■■ ■ ■ ■■■■ ■■ ■■ ■■ ■■ ■■■ ■ ■■■ ■ ■■■ ■ ■■ ■■■ ■■ ■■■ ■ ■■ ■ ■ ■ ■ ■■■ ■■■ ■ ■ ■■ ■■ ■ ■ ■ ■■ ■■■■■ ■■ ■■■ ■ ■ ■ ■ ■ ■ ■■ ■ ■ ■ ■ ■■ ■ 40 ■■ ■ ■■ ■■ ■■■ ■ ■ 60 makespan LPG 25 30 35 40 15 45 ■ ■ ■ ■ 80 ■ ■ ■ 100 60 80 makespan POPF 100 120 60 40 30 35 40 ■ ■ ■ 45 ■ 60 80 100 makespan SGPlan ■ ■ ■ ■ ■ ■ ■■■ ■■ ■ ■ ■ ■ ■ ■ ■■■■ ■ ■ ■■■ ■■ ■ ■ ■ ■■ ■■■■■■ ■ ■■ ■ ■■ ■ ■ ■■■ ■■■■■■■ ■ ■ ■■■ ■■ ■ ■■ ■■■ ■■■■ ■ ■■■ ■■■ ■ ■■■ ■ ■ ■■ ■■■■ ■ ■■■ ■ ■ ■■■ ■ ■■ ■ ■■■ ■ ■ ■ ■ ■ ■■ ■■■■■ ■ ■ ■■■■■■ ■ ■■ ■ ■■■■■■ 40 25 ■ □ ■ ■■ ■ ■■ ■ ■■ ■ ■ ■■■■ ■ ■ ■■■■■ ■■ ■ ■ ■ ■■ ■■■ ■■ ■ ■■■ ■■ ■■ ■ ■ ■ ■■ ■ ■ ■ ■■■ ■ ■ ■■■■ ■ ■■ ■ ■ ■ ■ ■ ■ ■ ■ ■■ ■■■■ ■■ ■■ ■■ ■■ ■ ■■ ■■■■■■ ■■■■■■■ ■■ ■■■■■■■■■■■ ■ ■ ■ ■ ■ ■■ ■ ■ ■ ■■■ ■■ ■■ ■ ■ ■ ■ ■■■■ ■ ■■ ■■■ ■■ ■ ■■■■ ■■■■ ■ ■■■■ ■ ■■ ■ ■■■ ■ ■■■ ■■■ ■■■ ■ ■■■ ■ ■■ ■■■■■■ ■ ■■■■■ ■■ ■■■■ ■■■■■■■ ■ ■ ■ ■■■ ■ ■■ ■ ■ ■ ■■■ ■ 40 20 ■ makespan SGPlan ■ ■ ■ ■ ■ 80 makespan LPG ■ ■ ■ 40 ■ ■ ■ ■ 40 20 ■ ■ ■ ■■■ ■■ ■■ ■ ■ ■ ■ ■ ■ ■■ ■ ■ ■ ■■■■■■ ■■■ ■ ■■■ ■■■ ■■ ■■■ ■■■ ■■■■■ ■ ■ ■ ■■■ ■■■ ■■■ □■ ■ ■■■ ■■■□ ■ ■ □□ □□ ■□ □ □ ■ ■■■ ■□ ■ ■■ ■ □ □ ■■ ■ ■□■ ■ ■□ □□□□ ■ □ □■□ □■ □□ □ ■■ ■□ □ □ □ □ ■□□□ ■□ □ □ □ ■ □ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■■ ■ □ makespan POPF ■ ■■■ ■ ■ ■■■ ■■ ■■■ ■■ ■ ■■■ ■■ ■ ■■■■■■ ■ ■ ■■ ■■■■■ ■ ■■■■■ ■■■ ■■ ■■ ■■■■ ■■■■■■ ■■■ ■■ ■■■ ■ ■■ ■■ ■■ ■■■■ ■ ■ ■ ■■ ■■■■■■ ■■■■■ ■■■■■ ■■■■ ■ ■ ■ ■ ■ ■■ ■ ■ ■ ■■■ ■■ ■ ■■ ■■ ■ ■■ ■ ■ ■ ■ ■■■■■ ■ ■ ■ ■■■ ■■■ ■ ■ ■ ■■■ ■■ ■■■■■ ■■■ ■ ■■■■■ ■ ■■ ■■■ ■■■ ■■ ■■■■ ■ ■■■□ ■ ■ □ □ □ ■□ ■■□ ■□■□□ ■ ■ □ ■■■□ ■■ ■ □ ■□□ □ □□ □□ □□ ■■ ■■ ■■ □ □□ □ ■□ ■□ □ □ □□□ makespan LPG makespan TFD 120 ■ ■ ■ ■ 120 ■ ■■ ■ ■ ■■ ■ ■ ■ ■■ ■ ■ ■ ■ ■■■ ■■■■ ■■■ ■ ■ ■ ■ ■■ ■■ ■ ■■■■ ■■ ■ ■ ■■■■■■ ■■■■■ ■■■■■■■ ■ ■ ■■ ■■■ ■■■■ ■ ■■ ■ ■■■■■■■■ ■■ ■■ ■■ ■■■ ■■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■■ ■■■■■■■■ ■■■■ ■ ■■ ■ ■ ■■■ ■■ ■■ ■ ■ ■ ■ ■ 80 makespan POPF 100 40 60 80 100 makespan SGPlan Figure 5. Instance-by-instance makespan comparison of the used planners on the problem set for u=1.0 (results for u=0.9 are qualitatively similar). Scatterplots indicate on the xaxis a specific planner, compared on the y axis against another planner (color code in the legend). The dashed line indicate equal makespan. The first row of plots shows N =8, p=1; the second row N =8, p=2; the third row N =21, p=1. employed by the IPCs to grade planners in the temporal planning track since IPC6 [Helmert et al., 2008]: for each planning instance i, if the best-known makespan is produced by a plan Pi , then for a given planner X that returns a plan PXi for i, the score of PXi is calculated as: makespan(Pi ) divided by makespan(PXi ). A comparative value closer to 1.0 indicates that planner X produces better quality plan for instance i. We use this formula and average the score for our three tested planners over the instance ensembles that are completely 23 solved by the time cutoff. Table 2 shows the performance of different planners with regard to plan quality. For N = 8 and p = 1, for which we know the optimal plans given that CPT was able to solve all 100 problems, LPG found the best quality plans but TFD is only slightly worse and POPF is not far behind. The comparison results for N = 21 and p = 1 is similar in the sense that the three anytime planners LPG, TFD, and POPF perform very similarly but in this case TFD and POPF are slightly better than LPG. For N = 8 and p = 2, TFD nearly always produce the best quality plan with POPF slightly behind while LPG perform significantly worse. The mixing and the requirement to synchronize the two phase-separation seems to confuse the local search heuristic in LPG. SGPlan, which unlike TFD, LPG, POPF only find a single solution, produce lower quality plans, as expected. However, for the p = 2 case, SGPlan produces overall better quality plans compared to LPG, even though LPG returns multiple plans for each instance. Fig. 5 shows in further detail the head-to-head makespan comparison between different pairs of planners, specifically pairwise comparisons between TFD, SGPLan, LPG, and POPF: TFD always dominates SGPlan, TFD dominates LPG majority of the times (except for N = 8, p = 1 where the performances are comparable), and SGPlan dominates LPG on bigger problems, but is slightly worse on smaller problems. POPF performance in general is very similar with the one of TDF, especially for N = 8. For a more detailed analysis with data reported for each specific instance, see [NASA, 2017]. Planning time comparison: Both TFD, LPG, and POPF use “anytime” search algorithms and use all of their allocated time to try finding better gradually better quality plans. In contrast, SGPlan return a single solution and thus generally take a very short amount of time with the median solving time for SGPlan in p=1|N8 , p=1|N21 , P =1|N40 and P =2|N8 are 0.02, 1, 25, and 0.05 seconds††. CPT, in general, set a very tight upper-bound on makespan before trying to find a plan within the bound and prove that the solution is optimal. For the smallest problem set when it can solve all 100 instances, it took a very short time between 1 to 2 seconds to find and prove optimality. However, for any other bigger set, its tight upper bounds proven to be ineffective in finding a single solution. Other planners: We have also conducted tests on: VHPOP, HSP*, and YASPH. While LPG, SGPlan, TFD, and POPF were selected for their ability to solve large planning prob†† For comparison purpose, LPG-quality, which also try to returns a single solution of good quality, produces the median solving time for P =1|N8 and P =2|N8 are 0.9 and 70 seconds respectively. 24 lems, we hoped that HSP* and VHPOP would return optimal plans to complement CPT in providing a baseline for plan quality estimation. Unfortunately, HSP* and VHPOP failed to find a single plan even for our smallest problems for various reason: VHPOP ran out of memory quickly, while HSP* couldn’t find any plan for a cutoff time of 2 hours. We have preliminary acceptable results with YAHSP up to N=40 but they will be discussed in a future work. Discussion: Our preliminary empirical evaluation shows that the test planners provide a range of tradeoffs between scalability and plan quality. At one end, SGPlan can scale up to large problem sizes and solve them in a short amount of time, providing reasonably good quality plans (compared to the best known solutions). At the other end, TFD utilizes all of the allocated time to find the best quality solutions but in general is the slowest by far to obtain a valid solution. LPG and POPF balance between the two: they can either find one solution quickly like SGPlan or can utilize the whole time prior to cutoff to find better quality solutions. Since planning is exponentially hard with regard to the problem size (i.e., number of state variables and actions), being able to partition it into sub-problems of smaller sizes definitely helps SGPlan to be find a valid solution quickly. However, there are several reasons that TFD, LPG, and POPF can find overall better quality solutions: (i) their anytime algorithms allow them to gradually find better quality plans, using the previously found plans as baseline for pruning unpromising search directions; (ii) SGP’s partitioning algorithm is based on logical relationship between state variables and actions and ignores all temporal aspects. Thus, combining plans for sub-problems using logical global constraints can lead to plans of lower quality for time-sensitive objective function such as minimizing the plan makespan. Fig. 6 shows a visualization of plans in a ‘Gantt chart’ format, putting the planners in comparison for a single N =8 instance from Fig. 3. To illustrate the representation, we can look at the shown p=2 case: consider the, qstate q1 initially located at n1 . The first gate it is involved in is the phase separation gate shown in green between qstates q1 and q4. The second gate is a phase separation gate between qubits 1 and 2 which contain qstates q1 and q3 respectively, because states q2 and q3 were swapped in the previous step. State q1 is then swapped with the state in qubit 2, prior to being involved in another phase separation gate, between the contents of qubits 2 and 3, this time with state q5 that was swapped into qubit 3 during time steps 3 − 4. It is then mixed while still located at qubit 2. Continuing to read through the chart in this way, we see that qstate q1 undergoes the following sequence 25 n1 n2 n3 n4 n5 n6 n7 n8 n1 n2 n3 n4 n5 n6 n7 n8 n1 n2 n3 n4 n5 n6 n7 n8 n1 n2 n3 n4 n5 n6 n7 n8 POPF ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ n1 n2 n3 n4 n5 n6 n7 n8 ■ ■ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 SGPlan ■ ■ ■ ■ ■ ■ ■ ■ LPG ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ■ ■ ■ ■ ■ ■ 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 TFD ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ n1 n2 n3 n4 n5 n6 n7 n8 ■ ■ ■ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 TFD p=2 ■ ■ ■ ■ ■ ■ + ■ ■ 1 ■ 3 ■ ■ 5 ■ 4 ■ ■ CPT ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ■ 7 ■ ■ ■ ■ ■ ■ ■ + ■ + ■ + ■ + ■ ■ ■ + + ■ ■ ■ ■ + + + ■ ■ ■ ■ ■ 6 ■ ■ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 Figure 6. The Gantt charts show compilations, labeled for each planner of the QAOA for the MaxCut instance depicted in Fig. 3 on the N=8 processor in Fig. 2. Schedules have time on the x-axis and qubit locations on the y-axis. Each row indicates what gate operates on each qubit at a given time during the plan (Colored blocks represents p-s gates, of duration 3 or 4 depending on their location, with synchronized pair colors associated to edges in Fig. 3 and white blocks are swap gates). The last schedule shows a compilation of p = 2 performed by TFD. Black blocks with numbers are mix gates acting on the corresponding state. Gates marked with a + indicate superfluous gates that were inserted in the plan by TFD, that could be detected and eliminated in post-processing. 26 of actions: P - S 3 (q1 , q4 ) → P - S3 (q1 , q3 ) → P - S4 (q1 , q5 ) → → → P - S4 (q1 , q5 ) → WAIT(4) → P - S3 (q1 , q3) → WAIT(3) MIX (q1 ) WAIT (2) → P - S3 (q1 , q4 ) where we denote the duration of the P - S gates in subscript and we introduced an WAIT gate to indicate inaction times. The second mixing phase is trivially scheduled at the end of the last tasks for each qstate. In the shown case, TFD has found an optimal solution (same makespan as CPT). Based on an “eye-test” and manual analysis, the best plans returned are usually of good quality but not without defects. Note also that the plan found by TFD for p=2 is also worse than the one that would be trivially obtained by replicating the optimal makespan p=1 solution twice (the second time in reverse). The displayed output also contains some unnecessary gates. Examples are the repeated swaps at time 11 and 30, and the mixing of the un-utilized logical states q2 and q8 at times 1,5. These spurious gates/actions do not affect the makespan, and they can be identified and eliminated by known plan postprocessing techniques [Do and Kambhampati, 2003]. We also believe a tighter PDDL model will help eliminate extra gates. 6. Conclusion and Future Work In this paper we presented a novel approach to the problem of compiling idealized quantum circuits to specific quantum hardware, focusing our experiments on QAOA circuits. Our presentation and tests have been focused on the pedagogical and practically relevant example of MaxCut, but the approach is sufficiently general to be applied to QAOA circuits for any discrete optimization problem, and to arbitrary quantum circuits more generally. Because QAOA has so many commuting gates, we expect to obtain a bigger win for this sort of algorithm than typical quantum algorithms. For most circuits, however, the problem of determining which swaps to make when to ensure that the qstates are next each other in order to carry out the desired gate sequence is highly non-trivial. Many swaps can be done in parallel, and ideally would place qstates in such a way that multiple gates can be carried out before having to swap again, or more generally in a way so as to minimize the run time of the circuit. For these reasons, we expect the temporal planning approach to enable significant gains over a brute force for circuits generally. A handful of well-established temporal planners were able to compile the QAOA circuits with reasonable efficiency, demonstrating the viability of this approach. We plan 27 to expand the portfolio of plannes we have tested, keeping up with latest AI planning technology; the data used in our tests, as well as the PDDL models, will be made available online at [NASA, 2017]. One thing that will be expanded in our analysis is the assessment of the quality of the best plans found compared to optimal solutions. At the moment, there is no published work on finding optimal solution for this problem and, as outlined in the previous section, our current effort to get existing optimal-makespan planners to find solutions has been successful only for N = 8, p = 1. Another important direction is to support circuit optimization beyond the makespan objective: for instance there is currently tremendous interest in the definition of figure-of-merits that could quantify the power of near-term quantum devices to execute experiment of interests (i.e. quantum supremacy experiments) [Bishop et al., 2017]. This work paves the way for future work on the use of AI planning methods for quantum circuit compilation and design. In future work, we plan to further tune the performance of the planners, including choosing an initial assignment of qstates to qubits favorable for compilation, instead of using a random assignment. In order to scale reliably to QAOA circuits with more levels and therefore larger plan sizes, we will develop decomposition approaches in which p ¿ 1 could be divided into multiple p = 1 problems to be solved independently and matched in a postprocessing phase. Initial results show that the advantage of not decomposing the problem amounts to approximately 10% of reduction of the makespan on average, and more than half of the test instances can be scheduled optimally by focusing on the p = 1 problem. We will also compare with other approaches to this compilation problem such as sorting networks [Beals et al., 2013] [Brierley, 2015] [Bremner et al., 2016], constraint programming (CP), or tailored scheduling heuristics [Guerreschi and Park, 2016] and develop more advanced hybrid compilation methods building on the various strengths of the temporal planning approaches and of other approaches. Once mature we will integrate compilation with other software supporting experimentation with various nearterm processors. A virtue of the planning approach is that the temporal planning framework is very flexible with respect to features of the hardware, including irregular graph structures and diverse gate durations. In the future, we can include in the PDDL modeling additional features that are characteristics of quantum computer architectures, such as the crosstalk effects of 2-qubit gates, realistic durations from optimal 2-qubit gate synthesis that could allow P - S and SWAP gates to be performed as a single gate, or the ability to quantum teleport quantum states across the chip [Copsey et al., 2003], and features of broad classes of quantum 28 algorithms including measurement and feedback, error correction, and fault tolerant gate implementations. As hardware graphs, primitive gate sets, and gate durations for processors build by experimental groups become available, we will apply this temporal planning approach with these hardware parameters as input. Conversely, results from future work comparing results of compilation to different potential architectures may suggest hardware designs that take into account the ability to support efficient compiled circuits. We will also consider other families of quantum circuits, including QAOA circuits applied to problems beyond MaxCut [Hadfield et al., 2017], and to more typical quantum circuits, with fewer pairwise commuting gates, but for which it remains difficult to fine an optimal sequence of swap and goal gates. This temporal planning approach to quantum circuit compilation should be of great interest to the community developing low-level quantum compilers for generic architectures [Steiger et al., 2016b] [Häner et al., 2016] and to designers of machine-instructions languages for quantum computing [Smith et al., 2016b] [Cross et al., 2017]. 7. Acknowledgements The authors acknowledge useful discussions with Will Zeng, Robert Smith, and Bryan O’Gorman. The authors appreciate support from the NASA Advanced Exploration Systems program and NASA Ames Research Center (Sponsor Award No. NNX12AK33A and contract No. NNA16BD14C). The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purpose notwithstanding any copyright annotation thereon. [Barends et al., 2016] Barends, R., Shabani, A., Lamata, L., Kelly, J., Mezzacapo, A., Heras, U. L., Babbush, R., Fowler, A. G., Campbell, B., Chen, Y., et al. (2016). Digitized adiabatic quantum computing with a superconducting circuit. Nature, 534(7606):222–226. [Beals et al., 2013] Beals, R., Brierley, S., Gray, O., Harrow, A. W., Kutin, S., Linden, N., Shepherd, D., and Stather, M. (2013). Efficient distributed quantum computing. Proceedings of the Royal Society A., 469(2153):767 – 790. [Bhattacharjee and Chattopadhyay, 2017] Bhattacharjee, D. and Chattopadhyay, A. (2017). Depth-optimal quantum circuit placement for arbitrary topologies. arXiv preprint arXiv:1703.08540. [Bishop et al., 2017] Bishop, L., Bravyi, S., Cross, A., Gambetta, J., and Smolin, J. (2017). Quantum volume. https://ibm.biz/BdiaQe. 29 [Boxio, 2016] Boxio, S. (2016). Characterizing quantum supremacy in near-term devices. In arXiv preprint arXiv:1608.0026. [Bremner et al., 2016] Bremner, M. J., Montanaro, A., and Shepherd, D. J. (2016). Achieving quantum supremacy with sparse and noisy commuting quantum computations. arXiv preprint arXiv:1610.01808. [Brierley, 2015] Brierley, S. (2015). Efficient implementation of quantum circuits with limited qubit interactions. arXiv preprint arXiv:1507.04263. [Caldwell et al., 2017] Caldwell, S., Didier, N., Ryan, C., Sete, E., Hudson, A., Karalekas, P., Manenti, R., Reagor, M., da Silva, M., Sinclair, R., et al. (2017). Parametrically-activated entangling gates using transmon qubits. arXiv preprint arXiv:1706.06562. [Chen and Wah, 2006] Chen, Y. and Wah, B. (2006). Temporal planning using subgoal partitioning and resolution in sg-plan. Journal of Artificial Intelligence Research, 26:323 – 369. [Chong et al., 2017] Chong, F. T., Franklin, D., and Martonosi, M. (2017). Programming languages and compiler design for realistic quantum hardware. Nature, 549(7671):180–187. [Coles et al., 2010] Coles, A. J., Coles, A. I., Fox, M., and Long, D. (2010). Forward-chaining partialorder planning. In Proceedings of the Twentieth International Conference on Automated Planning and Scheduling (ICAPS-10). [Copsey et al., 2003] Copsey, D., Oskin, M., Impens, F., Metodiev, T., Cross, A., Chong, F. T., Chuang, I. L., and Kubiatowicz, J. (2003). Toward a scalable, silicon-based quantum computing architecture. IEEE Journal of selected topics in quantum electronics, 9(6):1552–1569. [Cross et al., 2017] Cross, A. W., Bishop, L. S., Smolin, J. A., and Gambetta, J. M. (2017). Open quantum assembly language. arXiv preprint arXiv:1707.03429. [Devitt, 2016] Devitt, S. J. (2016). Performing quantum computing experiments in the cloud. Physical Review A, 94(3):222–226. [Do and Kambhampati, 2003] Do, M. B. and Kambhampati, S. (2003). Improving the temporal flexibility of position constrained metric temporal plans. In Proceedings of the 13th International Conference on Artificial Intelligence Planning and Scheduling (ICAPS). [Erdös and Rényi, 1960] Erdös, P. and Rényi, A. (1960). On the evolution of random graphs. Publications of the Mathematical Institute of the Hungarian Academy of Sciences, 5:569–573. [Eyerich et al., 2009] Eyerich, P., Mattmüller, R., and Röger, G. (2009). Using the context-enhanced additive heuristic for temporal and numeric planning. In Proceedings of the 19th International Conference on Automated Planning and Scheduling, pages 318 – 325. [Farhi et al., 2014a] Farhi, E., Goldstone, J., and Gutmann., S. (2014a). A quantum approximate optimization algorithm. In arXiv preprint arXiv:1411.4028. [Farhi et al., 2014b] Farhi, E., Goldstone, J., and Gutmann., S. (2014b). A Quantum Approximate Optimization Algorithm Applied to a Bounded Occurrence Constraint Problem. In arXiv preprint axXiv:1412.6062. [Farhi et al., 2017] Farhi, E., Goldstone, J., Gutmann, S., and Neven, H. (2017). Quantum algorithms for fixed qubit architectures. arXiv preprint arXiv:1703.06199. [Farhi and Harrow, 2016] Farhi, E. and Harrow, A. W. (2016). Quantum supremacy through the quantum approximate optimization algorithm. In arXiv preprint arXiv:1602.07674. [Fu et al., 2005] Fu, C., Wilken, K., and Goodwin, D. (2005). A faster optimal register allocator. The Journal of Instruction-Level Parallelism, 7:1 – 31. [Gerevini et al., 2003] Gerevini, A., Saetti, L., and Serina, I. (2003). Planning through stochastic local search and temporal action graphs. Journal of Artificial Intelligence Research, 20:239 – 290. 30 [Ghallab et al., 2004] Ghallab, M., Nau, D., and Traverso, P. (2004). Automated Planning: theory and practice. Elsevier. [Guerreschi and Smelyanski, 2017] Guerreschi, G. and Smelyanski, M. (2017). Practical optimization for hybrid quantum-classical algorithms. In arXiv preprint arXiv:1701.01450. [Guerreschi and Park, 2016] Guerreschi, G. G. and Park, J. (2016). Gate scheduling for quantum algorithms. arXiv preprint arXiv:1612.08208. [Hadfield et al., 2017] Hadfield, S., Wang, Z., O’Gorman, B., Rieffel, E. G., Venturelli, D., and Biswas, R. (2017). From the Quantum Approximate Optimization Algorithm to a Quantum Alternating Operator Ansatz. ArXiv e-prints. [Häner et al., 2016] Häner, T., Steiger, D. S., Svore, K., and Troyer, M. (2016). A software methodology for compiling quantum programs. arXiv preprint arXiv:1604.01401. [Helmert et al., 2008] Helmert, M., Do, M., and Refanidis, I. (2008). The 2008 international planning competition: Deterministic track. http://icaps-conference.org/ipc2008/ deterministic/. 2008-02-19. [IBM, 2017a] IBM (2017a). The ibm quantum experience. http://www.research.ibm.com/ quantum/. 2017-02-19. [IBM, 2017b] IBM (2017b). Ibm quantum experience ibmqx3 backend specifications. https: //github.com/QISKit/ibmqx-backend-information/tree/master/backends/ ibmqx3. [Jiang et al., 2017] Jiang, Z., Rieffel, E., and Wang, Z. (2017). A qaoa-inspired circuit for grover’s unstructured search using a transverse field. In arXiv preprint arXiv:1702.0257. [Kole et al., 2017] Kole, A., Datta, K., and Sengupta, I. (2017). A new heuristic for n-dimensional nearest neighbor realization of a quantum circuit. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems. [Moll et al., 2017] Moll, N., Barkoutsos, P., Bishop, L. S., Chow, J. M., Cross, A., Egger, D. J., Filipp, S., Fuhrer, A., Gambetta, J. M., Ganzhorn, M., Kandala, A., Mezzacapo, A., Müller, P., Riess, W., Salis, G., Smolin, J., Tavernelli, I., and Temme, K. (2017). Quantum optimization using variational algorithms on near-term quantum devices. ArXiv e-prints. [NASA, 2017] NASA (2017). Repository with complementary materials for the reproduction of the tests of the paper (pddl files and instances). https://ti.arc.nasa.gov/m/groups/asr/ planning-and-scheduling/VentirComp17_data.zip. [Ramasesh et al., 2017] Ramasesh, V., O’Brien, K., Dove, A., Kreikebaum, J. M., Colless, J., and Siddiqi, I. (2017). Design and characterization of a multi-qubit circuit for quantum simulations. In March Meeting 2017. American Physical Society. [Reagor et al., 2017] Reagor, M., Osborn, C., Tezak, N., Staley, A., Prawiroatmodjo, G., Scheer, M., Alidoust, N., Sete, E., Didier, N., da Silva, M., et al. (2017). Demonstration of universal parametric entangling gates on a multi-qubit lattice. arXiv preprint arXiv:1706.06570. [Rintanen, 2012] Rintanen, J. (2012). Planning as satisfiability: Heuristics. Artificial Intelligence, 193:45 – 86. [Schuch and Siewert, 2003] Schuch, N. and Siewert, J. (2003). Natural two-qubit gate for quantum computation using the xy interaction. Physical Review A, 67(3):032301. [Sete et al., 2016] Sete, E. A., Zeng, W. J., and Rigetti, C. T. (2016). A functional architecture for scalable quantum computing. In , IEEE International Conference on Rebooting Computing (ICRC). [Smith et al., 2016a] Smith, R. S., Curtis, M. J., and Zeng, W. J. (2016a). A practical quantum instruction 31 set architecture. In arXiv preprint arXiv:1608.03355. [Smith et al., 2016b] Smith, R. S., Curtis, M. J., and Zeng, W. J. (2016b). A practical quantum instruction set architecture. arXiv preprint arXiv:1608.03355. [Steiger et al., 2016a] Steiger, D. S., Häner, T., and Troyer, M. (2016a). Projectq: An open source software framework for quantum computing. In arXiv preprint arXiv:1612.08091. [Steiger et al., 2016b] Steiger, D. S., Häner, T., and Troyer, M. (2016b). Projectq: An open source software framework for quantum computing. arXiv preprint arXiv:1612.08091. [Vatan and Williams, 2004] Vatan, F. and Williams, C. (2004). Optimal quantum circuits for general twoqubit gates. Phys. Rev. A, 69:032315. [Versluis et al., 2016] Versluis, R., Poletto, S., Khammassi, N., Haider, N., Michalak, D., Bruno, A., Bertels, K., and DiCarlo, L. (2016). Scalable quantum circuit and control for a superconducting surface code. arXiv preprint arXiv:1612.08208. [Vidal and Geffner, 2006] Vidal, V. and Geffner, H. (2006). Branching and pruning: An optimal temporal pocl planner based on constraint programming. Artificial Intelligence Journal, 170(3):298335. [Wah and Chen, 2004] Wah, B. and Chen, Y. (2004). Subgoal partitioning and global search for solving temporal planning problems in mixed space. International Journal on Artificial Intelligence Tools, 13(4):767 – 790. [Wang et al., 2017] Wang, Z., Hadfield, S., Jiang, Z., and Rieffel, E. G. (2017). The Quantum Approximation Optimization Algorithm for MaxCut: A Fermionic View. arXiv:1706.02998. [Wecker et al., 2016] Wecker, D., Hastings, M. B., and Troyer, M. (2016). Training a quantum optimizer. In arXiv preprint arXiv:1605.05370. [Wecker and Svore, 2014] Wecker, D. and Svore, K. M. (2014). Liqui|>: A software design architecture and domain-specific language for quantum computing. In arXiv preprint arXiv:1402.4467. [Wille et al., 2014] Wille, R., Lye, A., and Drechsler, R. (2014). Exact reordering of circuit lines for nearest neighbor quantum architectures. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 33(12):1818–1831. [Yang et al., 2016] Yang, Z. C., Rahmani, A., Shabani, A., Neven, H., and Chamon, C. (2016). Optimizing variational quantum algorithms using pontryagin’s minimum principle. In arXiv preprint arXiv:1607.06473.
3cs.SY
The Secret Sharer: Measuring Unintended Neural Network Memorization & Extracting Secrets arXiv:1802.08232v1 [cs.LG] 22 Feb 2018 Nicholas Carlini University of California, Berkeley Jernej Kos National University of Singapore Chang Liu University of California, Berkeley Úlfar Erlingsson Google Brain Abstract In the machine-learning domain, such unintended sharing of secrets is a real-world concern of pressing importance. Machine learning is seeing rapid adoption and it is increasingly common for models to be trained on data very likely to contain secrets, such as people’s personal messages, location histories, or medical information [4, 37, 49]. We must worry about sharing of secrets, since the currently popular deep-learning methods are prone to both memorizing details about their training data and inadvertently revealing aspects of those details in their behavior [44, 57]. Most worryingly, secrets may be shared widely: models are commonly made available to third parties, or even the public, through black-box prediction services on the network, or as white-box pretrained models [8, 24]. Contributions. We introduce the entropy-based metric exposure for measuring a models memorization of a given secret, and show how this metric can be efficiently estimated using numerical methods. We focus our study specifically on deep-learning generative sequence models trained on text data (as used in, e.g., language models and translation) where the secrets may be, for example, social-security or credit card numbers. We empirically establish that secrets are memorized early and quickly during training, with models often fully memorizing them in fewer than a dozen epochs, long before training completes. Furthermore, for a given training data corpus we show that memorization occurs even when secrets are very rare (one in a million) and when models are small (the number of parameters are a fraction of the corpus size). While common techniques for regularization (like weight decay, dropout, or early-stopping) may improve generalization, they do not inhibit memorization. Further, we leverage our exposure metric to provide additional evidence for prior results [26, 28, 32, 45, 57]. Building on the above, we develop the first mechanisms for efficiently extracting secrets from deeplearning models, given only black-box access. To demonstrate their practicality we apply them to real- Machine learning models based on neural networks and deep learning are being rapidly adopted for many purposes. What those models learn, and what they may share, is a significant concern when the training data may contain secrets and the models are public—e.g., when a model helps users compose text messages using models trained on all users’ messages. This paper presents exposure, a simple-to-compute metric that can be applied to any deep learning model for measuring the memorization of secrets. Using this metric, we show how to extract those secrets efficiently using black-box API access. Further, we show that unintended memorization occurs early, is not due to overfitting, and is a persistent issue across different types of models, hyperparameters, and training strategies. We experiment with both real-world models (e.g., a state-ofthe-art translation model) and datasets (e.g., the Enron email dataset, which contains users’ credit card numbers) to demonstrate both the utility of measuring exposure and the ability to extract secrets. Finally, we consider many defenses, finding some ineffective (like regularization), and others to lack guarantees. However, by instantiating our own differentiallyprivate recurrent model, we validate that by appropriately investing in the use of state-of-the-art techniques, the problem can be resolved, with high utility. 1 Dawn Song University of California, Berkeley Introduction Once a secret has been learned, it can be difficult not to share it more widely—whether it is revealed indirectly, by our actions, by accident, or directly—as artfully explored in Joseph Conrad’s The Secret Sharer [9]. This issue also arises in the domain of machine learning: whenever training data contains sensitive information, a natural concern is whether the trained model has learned any secrets, and whether the model may possibly share those secrets, whether directly or indirectly. 1 updates the weights θ of the neural network by setting world models and data, e.g., to extract credit card numbers from models trained on the Enron email data. Our algorithms are scalable as well as efficient, and vastly outperform brute-force methods, giving results in minutes on modest hardware, even when applied to the large search spaces, such as credit card numbers. Finally, we consider a range of defenses for preventing the unintended memorization of secrets, thereby thwarting their extraction. We find regularization to be ineffective as a defense, and pattern-matching based sanitization likely to be both fragile and incomplete. We develop new state-of-the-art differentially-private recurrent models, which offer strong guarantees along with good utility, and empirically verify that they can prevent the unintended sharing of secrets. In its totality, we find our work provides strong motivation for differentiallyprivate learning methods; we advocate their use to control memorization and thwart extraction of secrets. 2 0 θnew That is, adjust the weights -far in the direction that minimizes the loss of the network using the current θ. Here,  is called the learning rate. It is often necessary to train over the training data X multiple iterations (each iteration is called one epoch) in order to reach maximum accuracy. 2.2 Generative Sequence Models A generative sequence model is a fundamental module for many tasks such as language-modeling, translation, and dialogue systems. A generative sequence model is designed to generate a sequence of tokens x1 ...xn according to an (unknown) distribution Pr(x1 ...xn ). Generative sequence models empirically compute this distribution, which can be decomposed by Bayes’ rule as Pr(x1 ...xn ) = Πni=1 Pr(xi |x1 ...xi−1 ) into a sequence of computations of conditional distribution Pr(xi |x1 ...xi−1 ) for a single token xi at timestep i. Modern generative sequence models employ neural networks to estimate this conditional distribution. We write this probability of a neural network fθ with input x1 ...xi−1 outputting xi as Background: Neural Networks This section presents the technical preliminaries relevant to our work, covering material that will look familiar to readers knowledgeable about neural networks and recurrent generative sequence models. 2.1 m 1 X ∇L(x̄j , ȳj , θ) ← θold −  0 m j=1 Concepts, Notation, and Training A neural network is a parameterized function fθ (·) that is designed to approximate an arbitrary function. Neural networks are most often used when it is difficult to explicitly formulate how a function should be computed, whereas what to compute can be effectively specified using examples, known as training data. The architecture of the network is the general structure of the computation, while the parameters (or weights) are the concrete internal values θ used to compute the function. We use standard notation [22]. Given a training set X = {(xi , yi )}m i=1 consisting of the m training data xi and labels yi , the process of training teaches the neural network to map each given instance to the corresponding label. Training is achieved through performing nonlinear optimization, e.g., by performing gradient descent with respect to the parameters θ on a loss function that measures how close the network is to correctly classifying each input. The most common loss P function used is the cross-entropy loss H(p, q) = − p(z) log(q(z)), Pfθ (xi |x1 ...xi−1 ) = Pr(xi |fθ (x1 ...xi−1 )) A neural network typically handles fixed-sized inputs, but fθ takes a sequence with a variable-length as its input. To handle this case, the deep learning community typically takes one of the following two approaches: • Fixed-size windowing partitions the text into multiple (possibly overlapping) fixed-size subsequences, treating each of them independently. • Stateful input processing, e.g., using recurrent neural networks (RNNs). An RNN takes two arguments, a current token (e.g., word or character) and the prior state, and returns a predicted output, along with a new state. Thus, RNNs can process arbitrarylength text sequences. We consider both architectures in this paper. When taking the former setup, we use convolutional neural networks (which can perform well on text [20, 21]). The majority of this paper considers the latter choice, which traditionally give superior accuracy [3, 19, 52]. z and so the sample-wise loss is L(x, y, θ) = H(fθ (x), y) for a network fθ . To perform training, we first sample a random minibatch B consisting of labeled training examples 0 0 {(x̄j , ȳj )}m j=1 drawn from X (where m is the batch size; often between 32 and 1024). Standard gradient descent 2.3 2 Overfitting in Machine Learning Overfitting is one 3.0 Validation Loss of the core diffiTraining Loss 2.5 culties in machine learning. It is 2.0 much easier to produce a classifier 1.5 that can perfectly label the training 1.0 data than a clas0 20 40 sifier that generEpochs alizes to correctly Figure 1: A model overfitting. label new, previously unseen data. Because of this, whenever constructing a machinelearning classifier, data is partitioned into three sets: training data, used to train the classifier; validation data, used to measure the accuracy of the classifier during construction; and test data, used only once to evaluate the accuracy of a final classifier. This provides a metric to detect when overfitting has occurred. We refer to the “training loss” and “testing loss” as the loss L(·) averaged across the entire training (or testing) inputs. Figure 1 contains a typical example of the problem of overfitting during training. Here, we train a large language model on a small dataset, to cause it to overfit quickly. Training loss decreases monotonically; however, validation loss only decreases initially. Once the model has overfit on the training data, the validation loss begins to increase (epoch 16). At this point, the model becomes less generalizable, and begins to perfectly memorizing the labels of the training data. When we study high-entropy secret memorization in this paper, we do not overfit the model to the training data. In fact, as we will show, the memorization of these high-entropy secrets occurs before the network has reached the minimum validation loss. Cross-Entropy Loss training on email data, we might be concerned about the data containing the secret “My social security number is 123-45-6789”. We assume the format is known to the adversary, (e.g., ”). To obtain a coms = “My SSN is pleted secret, we therefore fill in the holes in the format with some randomness (e.g., r = “123456789”). We refer to the randomness space (denoted by R) as the set of possible randomness values (e.g., nine digits, 0-9). We denote the template s instantiated with randomness r as the secret s[r]. Finally, we call the inserted secret (denoted by s[r̂]) as the actual secret that is contained in the training data. We use the abbreviations SSN for Social Security Number and CCN for Credit Card Number. The problem we study then asks Given a known format, can we extract completed secrets from a model when given only black-box accesses? We consider a scenario that a machine learning service provider trains a sequence generative model using their private data, and exposes accesses to the model allowing us to query Pfθ (xi |p1 ...pi−1 ) (but does not allow us to inspect the weights θ). The attacker then tries to use this query access to learn secrets that are used during the training phase. Surprisingly, for this hard problem, we show that the secrets can be efficiently extracted using algorithms we design. 3.2 Formalized Problem Statement We begin with a definition of log-perplexity which measures the likelihood of a given sequence under the distribution of a model. Definition 1. The log-perplexity of a secret x is Pxθ (x1 ...xn ) 3 = Motivation and Problem Statements = In this section, we provide an overview of the memorization problem in deep-learning generative sequence models, and how to extract the secrets from the models via black-box accesses. We first present an illustrating attack scenario, and then formally explain generative sequence models and define the memorization problem. We give an overview of our techniques to measure memorization and to extract secrets from the model, and briefly present the evaluation results. 3.1 − log2 Pr(x1 ...xn )  n  X − log2 Pr(xi |fθ (x1 ...xi−1 )) i=1 We would like to define the memorization of a model with respect to the above log-perplexity. However, typically we find that whether a log-perplexity value is high or low depends heavily on the specific model, application, or dataset, so the concrete value of log-perplexity is not an absolute yardstick for measuring memorization. Memorization Problem: Given a model fθ , a format s, and a randomness r ∈ R (the randomness space), we say fθ memorizes r if the log-perplexity of s[r] is among the smallest for r ∈ R, and completely memorizes r if the log-perplexity of s[r] is the absolute smallest. 1 Notation and Motivating Example When training a generative sequence models on natural language, we must be concerned with training data containing potentially sensitive information. For example, if 1 When 3 considering multiple secrets we discuss each independently. Let the secret format s = “The random number is ”. We then chose a completely random r̂, and insert s[r̂] at a random position one time in the Penn Treebank dataset. We train our language model on this modified dataset, and compute its log-perplexity Pxθ (s[r̂]) versus the log-perplexity of a different (not inserted) secret r0 of the same format Pxθ (s[r0 ]). Our hypothesis, that memorization is occurring, is therefore that Pxθ (s[r̂]) < Pxθ (s[r0 ]). In this work, we propose an alternative measurement, referred to as relative exposure, which captures the relative rank of a secret among all other possible secrets without depending directly on the absolute logperplexity. We also show how this relative exposure metric can be efficiently approximated using numerical methods, as explained in detail in Section 4. Given our definition of log-perplexity, the problem of extracting a secret from a model can thus be defined as finding the one from all possible alternatives with the lowest log-perplexity. Formally, we have Results. We perform the above experiment 100 times. We train each model for only one epoch (i.e., after training the model on the secret one time), and compare the log-perplexity of s[r̂] and s[r0 ]. In 88 of the cases we observe Pxθ (s[r̂]) < Pxθ (s[r0 ]), allowing us to reject the null hypothesis and conclude there the model has at least partially memorized the secret (at p-value p < 10−30 ). Secret Extraction Problem: Given a model fθ , a format s, and a randomness space R, the secret extraction problem searches for r∗ = argmin Pxθ (s[r]). r∈R We present several methods to solve this problem, both exactly and approximately, in Section 5. 4 4.2 Although log-perplexity is helpful to demonstrate that neural networks memorize training data, it is unclear to what extent this occurs. To aid our study, we define the rank as an improve measure: Measuring Unintended Memorization In this section we perform simple experiments to concretely demonstrate that neural networks memorize secrets, by showing that models memorize random numbers inserted in the training data. 4.1 Exposure: An Improved Measure Definition 2. The rank of a secret s[r] is rankθ (s[r]) = |{r0 ∈ R : Pxθ (s[r0 ]) ≤ Pxθ (s[r])}| Memorization in Neural Networks We now repeat the experiment from earlier, only train our language model to minimum validation loss instead of stopping after one epoch. When we compute the rank of the inserted secret s[r̂] by enumerating all possible secrets, we find that rankθ (s[r̂]) = 1 (i.e., that s[r̂] has the lowest log-perplexity among all possible secrets). The definition of rank is useful and conceptually simple, although computationally expensive, as we must compute the log-perplexity of all possible secrets. To overcome this issue, we define a new measure: the exposure. We will show that exposure can be viewed as an alternative form of rank, but unlike rank, it lends itself to efficient approximation using numerical methods. For the remainder of this section, we use as our case study a character-level language model [5, 38]: given a sequence of text data, a language model predicts the next token (character, in this case) that will occur. Language models are well-studied in other domains, and have been shown to be effective at many different tasks [38, 42, 53]. Demonstrating that neural networks memorize their training data requires carefully constructed experiments. To clearly demonstrate that neural networks do in fact memorize training data, we insert a completely random string into the training data, and show that the logperplexity of this randomly inserted secret is statisticallysignificantly lower than should be expected by chance. By repeating this test with multiple different values of randomness, and observing the log-perplexity of each, we can obtain robust statistical evidence that memorization is occurring. Definition 3. Given a secret s[r], a model with parameter θ, and the randomness space R, the exposure of a secret s[r] is as follows. (Theorem 1 in Appendix C derives the relation to rank.)    exposureθ (s[r]) = − log2 Pr Pxθ (s[t]) ≤ Pxθ (s[r]) Experimental setup. We train a two-layer LSTM with 200 hidden units (with approximately 600k trainable parameters) on the Penn Treebank dataset [35] (approximately 5MB of data). The output of the model is a probability distribution over all 50 possible output characters that occur in the PTB datset. Full hyperparameter settings are given in Table 8 (Appendix A). t∈R = log2 |R| − log2 rankθ (s[r]) Note that |R| is a constant. Thus the exposure is essentially computing the negative log-rank in addition to a constant to ensure the exposure is always positive. 4 Frequency (×104) 6 Kolmogorov–Smirnov goodness-of-fit test [36] for 106 iterations, we fail to reject the null hypothesis (p > 0.1). At 109 iterations, the test is able to reject the null hypothesis (p < 0.01). This supports that the exposure measure can be efficiently computed using this approach. Note that while the relative exposure is upper-bounded by log2 |R|, when the inserted phrase is more likely than all others, the estimated relative exposure has no theoretical upper bound. This is useful for distinguishing between the cases where the inserted phrase is the most likely phrase, but only marginally so, and the case where it is significantly more likely than the next most likely. SN-PDF Measured distribution 5 4 3 2 1 0 50 100 150 200 Log-Perplexity of secrets s[r] Figure 2: Skew normal fit to the measured perplexity distribution. 4.3 5 We now present different algorithms to extract secrets from a model. Given black-box access to a model with parameters θ and a format s, extracting the random r from the model is equivalent to finding r that minimizes Pxθ (s[r]). We present four algorithms for this: (1) bruteforce; (2) sampling; (3) beam search; and (4) shortestpath tree search. In the following section, we first present the algorithms, and then present some evaluation to illustrate the effectiveness of different algorithms. Efficiently Approximating Exposure Using random sampling to estimate exposure is effective when the rank of the secret is large enough that other secrets s[r0 ] where Pxθ (s[r0 ]) ≤ Pxθ (s[r]) are likely to be found in a random search. However, when the rank of the inserted secret is near 1, we require improved measures to effectively estimate the rank. To compute exposureθ (s[r]), first observe   Pr Pxθ (s[t]) ≤ Pxθ (s[r]) t∈R X   = Pr Pxθ (s[t]) = v . v≤Pxθ (s[r]) 5.1 Thus, from its summation form, we can approximate the discrete distribution of log-perplexity using an integral of a continuous distribution using Z Brute-force algorithm The brute-force algorithm simply enumerates all possible r ∈ R, computes Pxθ (s[r]), and selects the one with the smallest value. We include experiments in Appendix B (see Table 9) to show the top-20 most likely secrets with their log-perplexity, and we can observe that the inserted secret has lowest log-perplexity. While it is effective, it can be extremely slow when the randomness space R, is large. For example, the space of all credit card numbers is 1016 ; brute-force over this space may take up to 4,100 GPU-years. t∈R exposureθ (s[r]) ≈ Black Box Secret Extraction Pxθ (s[r]) ρ(x) dx 0 where ρ(x) is the continuous density function. To implement this idea, we must choose a continuous distribution class so that (a) the integral can be efficiently computed, and (b) the continuous distribution class can accurately approximate the discrete distribution Pr(Lθ (s[r]) = v). In this work, we use a skew-normal distribution [41] with mean µ, standard deviation σ 2 , and skew α. The above approach can effectively approximate the exposure. Figure 2, shows a histogram of the logperplexity of all 109 different secrets, overlayed with the approximated skew-normal distribution in dashed red. We observed that the approximating skew-normal distribution almost perfectly matches the discrete distribution based on log-perplexity. No statistical test can confirm that two distributions match perfectly; instead, tests can only reject the hypothesis that the distributions are the same. When we run the 5.2 Generative Sampling We can use a generative model to sample a set of secrets, and then can select the one minimizing Pxθ (·). Since our goal is to find the secret s[r̂] with minimum log-perplexity (and therefore maximum likelihood), it follows that randomness r̂ should be more likely to be sampled than others. Thus, sampling a small subset of {ri } ⊂ R is more efficient than brute-force, but maintains a high probability of finding s[r̂]. The sampling process starts with an empty string, and expands it with one token (e.g., a character) at a time. When expanding the i-th token, it references the template s. If si is not a , the algorithm adds si directly at the end of generated string; otherwise, it samples a token from the distribution of valid tokens (e.g., all digits 0-9) 5 search, is guaranteed to find the string with minimum log-perplexity. At a high level, in the same way beam search can be viewed as breadth-first search (with a limited-size frontier), our shortest path algorithm is essentially a variant of Dijkstra’s algorithm [10]. We can organize all possible partial strings generated from the template s as a tree, where the empty string is at the root. A partial string b is a child of a if b expands one token t from a. The edge weight from a to b is − log Pfθ (t|a). Therefore, finding s[r] minimizing the cost of the path is equivalent to minimizing its logperplexity. Figure 3 presents an example to illustrate the idea. Figure 3: An example to illustrate the shortest path search algorithm. Each node represents one partially generated string. Each edge denotes the conditional probability P (xi |x1 ...xi−1 ). The path corresponding to the secret (i.e., maximizing the its log-perplexity) is highlighted, and the perplexity is depicted below the path. defined by Pfθ (xi |x1 ...xi−1 ) = Pr(xi |fθ (x1 ...xi−1 )). The process terminates when the length of the generated string is identical to the length of the template s. The sampling algorithm repeats the sampling process N times and adds each generated string r into the set {ri }. 5.3 The shortest path algorithm is inspired by Dijkstra’s algorithm [10] which computes the shortest distance on a graph with non-negative edge weights. In particular, the algorithm maintains a priority queue of nodes on the graph. To initialize, only the root node (the empty string) is inserted into the priority queue with a weight 0. In each iteration, the node with the smallest weight is removed from the queue. Assume the node is associated with a partially generated string p and the weight is w. Then for each token t such that p@t is a child of p, we insert the node  p@t into the priority queue with w + −log Pfθ (t|p) , where − log Pfθ (t|p) is the weight on the edge from p to p@t. Beam search Given a model that can predict likelihood scores of future text occurring given some context, beam search is the de facto procedure used in deep learning to compute the most likely output [20, 34, 52]. Beam search keeps a set of at most N candidate partially generated strings, and iteratively extends the length of each candidate, keeping only the top N likely. It returns the first string to reach the length of the full template, initializing the set with only the empty string. On each iteration i, beam search expands every string in the set with every possible token. Formally, beam search explores a sequence of sets. Each set Sk = {pj }nj=1 has n ≤ N partially-generated prefix strings pj of a potential secret. Then, its successor set is Sk+1 = {p@t | p ∈ Sk ∧ t ∈ σ(sk+1 )}, where @ denotes string concatenation. Here, t is a token, and ( {0, 1, . . . 9} if sk = σ(sk ) = {sk } otherwise. The algorithm terminates once the node pulled from the queue is a leaf node (i.e., a node of maximum length). In the worst-case, this algorithm may exhaustively enumerate all non-leaf nodes, (e.g., when all possible strings are evenly distributed). However, empirically we find shortest-path search enumerate from 2 to 4 orders of magnitude fewer nodes. During this process, the main computational bottleneck is computing the edge weights − log P (t|p). A modern GPU can simultaneously evaluate a neural network on many thousand inputs in the same amount of time as it takes to evaluate one. To leverage this benefit, we pull multiple nodes from the priority queue at once in each iteration, and compute all edge weights to their children simultaneously. In doing so, we observe a 50× to 500× reduction in overall runtime. Once Sk+1 is computed, we retain only the smallest N elements (as determined by perplexity). Unfortunately, we find beam search ineffective at extracting the lowest perplexity secret. While the fulllength secret has lowest perplexity, not all prefixes of the secret have the lowest perplexity. 5.4 Applying this optimization violates the guarantee that the first leaf node found is always the best. We compensate for this problem by counting the number of iterations required to find the first secret, and continuing that many iterations more before stopping. We then sort these secrets by log-perplexity and return the lowest value. While this doubles the number of iterations, each iteration is two orders of magnitude faster, and this results in a substantial increase in performance. Shortest Path Search Both the sampling algorithm and beam search are approximation algorithms, which are not guaranteed to find the optimal solution. Our next algorithm, shortest-path 6 Architecture 30 Testing Loss 3.0 Training Loss 25 2.5 20 2.0 15 1.5 10 5 0 GRU GRU LSTM LSTM CNN CNN CNN WaveNet WaveNet Cross-Entropy Loss Estimated exposure of inserted secret 35 1.0 0 5 10 15 20 25 Epochs of training 30 Layers Units Test Loss Exposure 1 2 1 2 1 2 4 2 4 370 235 320 200 436 188 122 188 122 1.18 1.18 1.17 1.16 1.29 1.28 1.25 1.24 1.25 36 37 38 35 24 19 22 18 20 Table 1: Estimated exposure of an inserted secret for various model architectures. All models have 620K (+/- 5K) parameters and so have the same theoretical capacity. Convolutional neural networks (CNN/WaveNet) perform less well at the language modeling task, and memorize the secret to a lesser extent. 35 Figure 4: Comparing training and testing loss to estimated exposure across epochs on 5% of the PTB dataset . Testing loss reaches a minimum at 10 epochs, after which the model begins to over-fit (as seen by training loss continuing to decrease). Estimated exposure also peaks at this point, and decreases afterwards. To better understand why and how models memorize secrets, and to validate the utility of the exposure metric, we perform additional experiments to study how memorization characteristics are reflected in the various aspects of deep-learning training processes. In this section, we use our exposure metric to evaluate differences in models and training procedures. Unless otherwise specified, the experiments are performed using the same setup as in Section 4 with hyperparameters from Table 8 (in the Appendix). epoch 40 (with p-value p < .001). While this is interesting, in practice it has little effect: the rankθ (s[r]) = 1 for all epochs after 10. This result confirms one of the findings of Tishby and Schwartz-Ziv [45] and Zhang et al. [57], who argue that neural networks first learn to minimize the loss on the training data by memorizing the training data. The other observation we make is that memorization begins to occur after only one epoch of training: at this point, the exposure of the inserted secret is already 3, indicating the secret is 23 = 8× more likely than a random phrase. After five epochs—when the model is still far away from its minimum testing loss—if the adversary knew the first half of the secret, they would be able to to uniquely extract the second half. 6.1 6.2 6 Characterizing Memorization of Secrets Across Training Iterations Across Different Architectures We now evaluate several different classical neural network architectures. The results are presented in Table 1. We show that all of them suffer the memorization problem. We observe that the two classical recurrent neural networks, i.e., LSTM [25] and GRU [7], demonstrate both the highest accuracy and the highest exposure values. Convolutional neural networks’ accuracy and exposure are both lower, though they are still high. Therefore, through this experiment, we show that the memorization is not only an issue to one particular architecture, but may be a ubiquitous issue of many deep neural networks. We begin our evaluation by studying how quickly neural networks memorize training data, and evaluate how exposure relates to training and testing loss. Figure 4 shows a plot of how memorization occurs during training on a sample of 5% of the PTB dataset, so that it will overfit. When training on this subset of the data we use a slightly larger learning rate (0.01) to obtain higher accuracy. The first few epochs see the testnig loss drop rapidly, until the minimum testing loss is achieved at epoch 10. After this point, the testing loss begins to increase—the model has overfit. Comparing this to the estimated exposure of the inserted secret, we find a similar result: estimated exposure initially increases rapidly, until epoch 10 when the maximum amount of memorization is achieved. Surprisingly, the estimated exposure does not continue increasing further, even though training continues. In fact, the exposure at epoch 10 is actually higher than the exposure at 6.3 Across Training Strategies There are various settings for training strategies and techniques that are known to impact the accuracy of the final model. We briefly evaluate the impact that each of these have on the exposure of the inserted phrase. 7 Batch Size 50 16 32 64 128 256 512 1024 1.7 4.0 4.8 9.9 12.3 14.2 15.7 Number of LSTM Units 100 150 200 250 4.3 6.2 11.7 14.0 21.0 21.8 23.2 6.9 14.4 19.2 25.9 26.4 30.8 26.7 9.0 14.1 18.9 32.5 28.8 26.0 27.0 Secret 6.4 14.6 21.3 35.4 31.2 26.0 24.4 Exposure at Epoch 5 10 hsi hei hsi hei - - - - - - - - 5.0 6.3 5.0 6.1 5.1 5.2 6.1 7.1 6.8 7.5 9.5 11.1 Table 3: Estimated exposure of phrases when the adversary is aware of different amounts of surrounding context (hsi and hei are unique context phrases of 5 characters known to the adversary). The estimated exposure is computed at epoch 5 and 10, before the models memorize the inserted secret. Table 2: Estimated exposure of models trained with varying model sizes and batch sizes. Models of the same size trained for the same number of epochs and reached similar test loss. Larger batch sizes, and larger models, both increase the amount of memorization. The largest memorization in each column is highlighted in bold, the second largest in italic bold. racy by taking a checkpoint from an earlier epoch from those models that perform better, we found no statistically significant difference in the exposure of the inserted secret with any of these settings; we therefore do not include these results. Batch Size In stochastic gradient descent, recall that we train on minibatches of multiple examples simultaneously, and average their gradients to update the model parameters. This is usually done for computational efficiency—due to their parallel nature, modern GPUs can evaluate a neural network on many thousands of inputs simultaneously. To evaluate the effect of the batch size on memorization, we train our language model with the batch size ranging from 16 to 1024. (At each batch size, we train 10 models and average the results.) All models reach nearly identical final training loss (1.11) and testing loss (1.17). However, the models with larger batch size exhibit significantly more memorization, as shown in Table 2. This experiment provides additional evidence for prior work which has argued that using a smaller batch size yields models which generalize better [26, 28, 32]. While this does give a method of reducing memorization for some models, it unfortunately comes at a significant cost: training with a small batch size is often prohibitively slow, and prevents parallelizing training across GPUs (and servers, in a decentralized fashion).2 6.4 Across Secret Formats and Context One surprising observations we make during studying the memorization of secrets during training is that the context that the adversary is aware of significantly affects the ability of the adversary to detect whether memorization has occurred. For example, in the prior sections, we assumed the adversary was aware of the prefix “The random number is” and then attempted to identify the secret that followed. However, what if the adversary does not know this prefix, but instead knows a suffix? Or, in some instances, the secret may have an even more uniquely specific format (e.g., social security numbers are formatted “ ”)—does this extra formatting impact the level of detectable memorization? We find that the answer is yes: additional knowledge about the format of the secret increases the ability of an attacker to extract the randomness. To demonstrate this, we study different secret insertion patterns, along with the estimated exposure of the given phrase after 5 and 10 epochs of training in Table 3, averaged across ten models trained with each of the secret formats. For the first four rows of Table 3 we use the same model, but provide the adversary with different levels of context. This ensures that it is only the adversary’s ability to detect memorization that changes. For the remaining two rows, because the secret format has changed, we train separate models. We find that increasing the available context also increases the exposure, especially when inner context is available; this additional context becomes increasingly important as training proceeds. Shuffling, Bagging, and Optimization Method. Given a fixed batch-size, we now examine how other settings impact memorization. We train our model with different optimizers: SGD, Momentum SGD [40, 48], RMSprop [50], Adagrad [14], Adadelta [56], and Adam [29]; and with either shuffling (where training data is shuffled before each epoch), bagging (where training samples in a minibatch are sampled with replacement from training data). Not all models converge to the same final test accuracy. However, when we control for the final test accu2 In fact, recent work has begun using even larger batch sizes (e.g., 32K) to train models many orders of magnitude more quickly than previously possible [23, 54, 55]. 8 # Insertions 1 1 2 5 10 80% 100% 100% 100% Number of Unique Phrases 10 50 100 11% 38% 100% 100% 2% 18% 100% 100% 1% 16% 100% 100% dataset (used in Section 4 and 6). Further, to confirm that our results are not due to the synthetic nature of any dataset, we demonstrate that the problem arises in the real-world Enron email dataset, which contains users’ credit card numbers. Similarly, to confirm that our language model and training approach is not artificially encouraging memorization, we demonstrate extraction on real-world, state-of-the-art unmodified models and training approaches—in particular, the Word-Level Language Model and Neural Machine Translation Model available from the open source Google TensorFlow Model Repository [11]. 500 0.1% 1% 98% 100% Table 4: Expected percentage of phrases that are uniquely extractable. Each inserted secret has the same format. 6.5 Memorization across Multiple Simultaneous Secrets As a final set of experiments, we now examine what happens when k secrets are inserted in the dataset (each potentially inserted multiple times). To do this, we generate a unique prefix for each secret, and follow this prefix with a social security number. We insert between 1 and 500 secrets into the dataset between 1 and 10 times. In Table 4 we show the results of this analysis. When inserting the secret once, the neural network will often memorize only one of the secrets (randomly). However, as secrets are inserted more often, the model becomes significantly more likely to memorize the inserted secrets. 6.6 7.1 To evaluate different secret extraction approaches, we use the same language model we have been using on the PTB dataset with a single 9-digit random secret inserted once. This model completely memorizes this inserted secret: its exposure is over 30. Brute force. As a baseline, we are able to perform bruteforce secret extraction on a single social security number in approximately 4 hours by enumerating all 109 secrets. Generative sampling. Since it is a randomized algorithm, we evaluate the sampling-based algorithm multiple times. We observe that it runs on average for 107 iterations before it can find the secret with a probability 90%. This is 100× faster than the brute-force algorithm, on average. Intriguing Memorization Selectivity The fact that models completely memorize secrets in the training data is completely unexpected: our language model is only 600KB when compressed3 , and the PTB dataset is 1.7MB when compressed. Assuming that the PTB dataset can not be compressed significantly more than this, it is therefore information-theoretically impossible for the model to have memorized all training data—it simply does not have enough capacity with only 600KB of weights. Despite this, when we repeat our experiment and train this language model multiple times, the inserted secret is the most likely 80% of the time (and in the remaining times the secret is always within the top10 most likely). At present we are unable to fully explain the reason this occurs. We conjecture that the model learns a lossy compression of the training data on which it is forced to learn and generalize. But since secrets are random, incompressible parts of the training data, no such force prevents the model from simply memorizing their exact details. 7 Beam search. We run the beam search with a maximum pool size of 104 , but it still rarely generates the true inserted secret: while the full sequence is the most likely of any, this is not the case for all prefixes. Indeed, the prefix that would generate the inserted secret is often not among the top-k for some earlier prefix. Shortest path search. Figure 5 shows the estimated exposure of the inserted secret versus the number of iterations the shortest path search algorithm requires to find it. The shortest-path search algorithm has reduced the number of secrets enumerated in the search from 109 to 105 (a factor of 10, 000×) when the exposure of the inserted phrase is greater than 30. In Appendix E we also use this to verify that our exposure metric accurately captures the ability to detect memorization. 7.2 Evaluating the Extraction of Secrets Dataset Evaluation: Enron Emails We now confirm that our results on the PTB dataset, where we artificially inserting one random number, also hold true on real-world data. That is to say, instead of running experiments on data with inserted secrets, we In this section, we first evaluate different secret extraction algorithms using our language model on the PTB 3 See Evaluating Extraction Algorithms Appendix D.3 for how we do this compression. 9 Iterations of Dijkstra to find secret User Secret Type 107 A CCN 52 106 B SSN 13 105 C SSN SSN SSN 16 10 22 D SSN 32 F SSN 13 G CCN CCN CCN 36 29 48 104 103 20 25 30 35 40 Estimated exposure of inserted secret Figure 5: Number of iterations of the shortest path search algorithm required to identify the inserted 9-digit secret. Extracting with bruteforce search requires 109 iterations. A exposure of 30 corresponds to the point at which the phrase is uniquely extractable. X X X This model is 80× larger than the character-level language model, at 48 million parameters. It learns a word embedding [39] with a vocabulary size of 10,000 words, and a two-layer LSTM with 1500 hidden units. The network is trained with dropout [47] and stochastic gradient descent to minimum validation loss. We do not modify the training process or architecture. Since this is a word-level language model, we can not just insert the secret as a sequence of numbers (e.g., “The secret is 1234”) because “1234” would be considered a word, and it is not one of the 10,000 words contained in the vocabulary (all other words are replaced with the special unknown-word token, hunki). We consider two methods of allowing the language model to see this secret • Split the numbers into each being their own word: “The random number is 1 2 3 4”. This approach is often taken in practice when using a limited-size vocabulary [33, 43]. • Change the format of the secret to fit the model, and use the English word for each number: “the random number is one two three four”. We train this 80× larger model on our PTB dataset modified with one inserted secret, using all default model parameters, and verify that no overfitting occurs. We repeat our evaluation from Section 4.2 with the same 9-digit secret using one of the two formats. When using the former insertion approach—inserting the digits themselves — the estimated exposure of the inserted phrase is 25. Using the latter approach, the exposure is only 12; still 4000× more likely than if inserted by random chance, but much less rare than in the case of inserting the numeral digits. We find it fascinating that this model is 80× larger than the character-level language model, and has sufficient capacity to memorize the training data completely, but it actually memorizes less. Evaluating Word-Level Models To confirm that our language model is not only memorizing due to it being a character-level model, we train a world-level language model. We take an off-theshelf word-level language model given in the TensorFlow Model repository [11] designed to be trained on the PTB dataset. 4 http://www.cs.cmu.edu/ Extracted? Table 5: Summary of results on the Enron email dataset. Three secrets are extractable in under an hour; all are heavily memorized. run experiments on naturally-occurring data where secrets are already present. The Enron Email Dataset4 consists of several hundred thousand emails sent between employees of Enron Corporation, and subsequently released by the Federal Energy Regulatory Commission in its investigation. The complete dataset consists of the full emails, with attachments. Many users sent highly sensitive information in these emails, including social security numbers and credit card numbers. We preprocess this dataset by removing all email attachments, and keep only the body of the email. We remove the text of the email that is being responded to, and filter out automatically-generated emails and emails sent to the entire company. We separate emails by sender, ranging from 1.7MB to 5.6MB (about the size of the PTB dataset) and train one character-level language model per user who has sent at least one secret. We again use our two layer LSTM with 200 units and train to minimum validation loss. In Appendix G we give detailed statistics of the datasets. We summarize our results in Table 5. Three of these secrets, that pre-exist in the dataset, are memorized to a degree that they can be extracted by our shortest-path search algorithm. 7.3 Exposure enron/ 10 Times Inserted Estimated Exposure 1 2 4 10 21 33 8 Extracted? As we have shown above, neural networks quickly memorize secrets. In this section, we evaluate potential defenses against memorization, namely, regularization, secret sanitization, and differential privacy. We empirically analyze their impact on memorization and accuracy. X Table 6: Estimated exposure of a secret inserted in the Neural Machine Translation model. When the model is trained on the secret inserted four times, it can be extracted. 7.4 Evaluating Defenses 8.1 Regularization It would be reasonable to assume that memorization is due to the model overfitting to the training data. Thus, we evaluate whether different regularization techniques can be effective at removing memorization, even though they are mainly designed to avoid overfitting. We evaluate three popular forms of regularizations, weight decay [30], dropout [47], and weight quantization [27]. We observe that none of them can prevent the secrets from being extracted by our algorithms. Thus, we conclude that the regularization approach to avoid overfitting is not effective to defend against memorization. Details of this analysis are presented in Appendix D. Evaluating Neural Translation Models After language models, perhaps the next most common use of generative sequence models is Neural Machine Translation. NMT [3] is the process of training a neural network to translate from one language to another. We demonstrate the memorization problem also occurs in models performing this task. Specifically, an NMT model takes its input as a sequence of words xi and outputs a sequence of words yi . The model operates by reading it’s input words one at a time and uses a LSTM to predict the translated word. For notational simplicity, we represent this as a function f which takes as input a sentence x and outputs a probability distribution f (x) over all of the possible translations of this sentence. We again make use of the TensorFlow Model repository [12] which contains an implementation one of the initial papers demonstrating effective NMT [34]. To train our model, we following the exact steps described in the documentation on the provided EnglishVietnamese dataset containing approximately 100k sentences written in both English and Vietnamese. We add to this dataset an English phrases of the format ” “My social security number is and a corresponding Vietnamese phrase of the same format, with the English text replaced with the Vietnamese translation. We insert this pair once, twice, or four times. When using NMT, we must slightly modify our definition of log-perplexity. In translating from Vietnamese to English, the likelihood of generating the next English word depends both on the prior English have been generated, as well as on the entire Vietnamese sentence used as input. We therefore adjust the entropy measure Px(·) to account for this modification; effectively, we modify our notion of perplexity to fit the task. Under this new perplexity measure, we can now compute the exposure of the inserted secret. We summarize these results in Table 6. By inserting the secret only once, the inserted secret is 1000× more likely than random chance, and after inserting four times, it is completely memorized. 8.2 Sanitization Sanitization is a best practice for processing sensitive, private data. However, one can not hope to guarantee that all possible sensitive sequences will be found and removed through such black-lists—e.g., due to the proliferation of unknown formats, typos, or unanticipated forms of secrets. Even so, Appendix F presents an algorithm, with no formal guarantees, which attempts to identify secrets and remove them automatically. 8.3 Differential Privacy Differential privacy [13, 15, 16] is a privacy notion to bound the information that of an algorithm is provided about its input with high confidence. As background, we introduce its formal definitions as follows. Definition 4. A random algorithm A is (ε, δ)differentially private if Pr(A(D) ∈ S) ≤ exp(ε) · Pr(A(D0 ) ∈ S) + δ for any set S of possible outputs of A, and any two data sets D, D0 that differ in at most one element. Intuitively, this definition says that when adding or removing one element from the input data set, the output distribution of a differentially private algorithm does not change by much. Thus, differential privacy is a desirable property to defend against memorization. Consider that D contains one occurrence of the secret, and 11 9 No DP With DP D0 = D − {s}. Slightly imprecisely speaking, the output model of a differentially private training algorithm running over D, which contains the secret, is similar to the output model trained from D0 , which does not contain the secret. Thus, such a model can not memorize the secret as completely. We use an improved differentially-private stochastic gradient descent algorithm (DP-SGD) from [1] to verify that differential privacy is an effective defense against memorization. We use the open source code of DP-SGD from the authors5 to train our character-level language model from Section 4. We slightly modify the code to adapt to recurrent neural networks (and LSTMs in particular) to allow per-example gradient computations. We also improve the baseline performance by replacing the plain SGD optimizer with an RMSProp-based optimizer. We train six differentially private models using various values of ε for 100 epochs on the PTB dataset augmented with one secret value. Training a differentially private algorithm is known to be slower than standard training; our un-optimized implementation of this algorithm is 10 − 100× slower than standard training. For computing the (ε, δ) privacy budget we use the moments accountant introduced in [1]. We set δ = 10−9 in each case. The gradient is clipped by a threshold L = 10.0 to avoid gradient explosion. We initially evaluate two different optimizers (the plain SGD used by authors of [1] and RMSProp), but focus most experiments on training with RMSProp as it tends to achieve much better baseline results than SGD6 . Table 7 shows the evaluation results. The most useful differentially-private model achieves only 10% worse test accuracy than the baseline model trained without differential privacy. As we decrease ε to 1.0, the exposure drops to 1, the point at which this secret is no more likely than any other, showing that DP-RMSProp can fully eliminate the memorization effect from a model. Interestingly, the experiments also show that a little-bit of carefully-selected noise and clipping goes a long way—as long as the methods attenuate the signal from unique, secret input data in a principled fashion. Even with a vanishingly-small amount of noise, and values of ε that offer no meaningful theoretical guarantees, the measured exposure is negligible. Testing Loss Estimated Exposure 0.65 1.21 5.26 89 2 × 108 1 × 109 ∞ 1.69 1.59 1.41 1.34 1.32 1.26 2.11 1.1 2.3 1.8 2.1 3.2 2.8 3.6 N/A N/A 1.86 1.17 9.5 31.0 Optimizer ε RMSProp RMSProp RMSProp RMSProp RMSProp RMSProp SGD SGD RMSProp Table 7: The RMSProp models trained with differential privacy do not memorize the training data and always have lower testing loss than a non-private model trained using standard SGD techniques. (Here, ε = ∞ means that only clipping is done, but that no noise is added.) Backdoor (intentional) memorization. Perhaps the most closely related work to ours is that of Song et al. [46], who also study training data extraction. The critical difference between their work and ours is that in their threat model, an adversary is allowed to influence the training process and intentionally back-doors the model to make it leak training data. They are able to achieve incredibly powerful attacks as a result of this threat model. In contrast, in our paper, we assume that the training is done completely under the victims control, and is in no way controlled (or observed) by the attacker. Membership Inference. We are not the first to study the privacy implications of training on private data. Recent work has demonstrated membership inference attacks [44]: given a neural network F trained on training data X , and an instance x, it is possible to construct a membership oracle OF (x) that answers the question “Is x a member of X , the training data of the model f (·)?” Motivated by the notion of membership inference, we make two contributions. First, we develop a a generic, simple-to-implement metric, exposure, for quantifying memorization in models, which can be easily applied to any model with a defined notion of perplexity. For this, instead of requiring the training of a new model, we simply rely on the fact that if x ∈ X , then f (x) will be more confident in its prediction. Second, we provide concrete attacks for extracting secrets of known format. (Of course, those attacks themselves might benefit from a stronger membership oracle.) Related Work There is a large body of work related to the privacy of training data. We briefly summarize related work. 5 https://github.com/tensorflow/models/tree/ master/research/differential_privacy/dp_sgd/ 6 We do not perform hyperparameter tuning with SGD or RMSProp. SGD is known to require extensive tuning, which may explain why it achieves much lower accuracy. Generalization in Neural Networks. The other inspiration for our work is the demonstration by Zhang et al. [57] that standard models can be trained to perfectly fit completely random data. Specifically, the authors show 12 that the same architecture that can classify MNIST [31] digits correctly with 99.5% test accuracy can also be trained on completely random data to achieve 100% train data accuracy (but obviously poor test accuracy). Because there is no way to learn to classify random data, the only explanation is that the model has memorized the labels of the training data. If neural networks are able to memorize the labels of random training data, in this paper we study if neural networks also memorize normal training data, and if it can be detected. to several classes of machine learning algorithms [6], including neural networks [1]. In Section 8.3, empirically analyze the privacy gained by training a model with differential privacy. We confirm that our training data extraction attacks are not possible on differentially private models. 10 Conclusions Memorization of rare details appears to be a fundamental aspect of deep-learning training processes. This has been indicated in earlier work [57], and this paper has provided further supporting evidence via empirical analysis of generative sequence models. Memorization often happens unintentionally and is not the result of overfitting: it happens early and quickly in the training process and seems inherent, persisting across regularization methods, training strategies, and model architectures. We show, in this paper, that it is possible to measure the extent to which memorization has occurred— and even the extent to which individual “secrets” are exposed—where secrets are unique input sequences of a known or guessable format, such as credit-card numbers. Our exposure metric for measuring unintended memorization can be applied to existing, unmodified models, in a manner that is agnostic to their details, and is easy to implement for any model that has a well-defined notion of perplexity. Unfortunately, the same methods used to construct our exposure metric also allow for the efficient and scalable extraction of secrets with only black-box access. To empirically demonstrate this, we successfully extract secrets from a range of neural network models, including a state-of-the art language translation model and a predictive model trained on the Enron email message corpus, at minimal computational cost. Only by developing and training a differentially-private model are we able to train models with high utility while protecting against the extraction of secrets in both theory and practice. Training data leakages. Ateniese et al. demonstrate [2] that if an adversary is given access to a remote machine learning mode (e.g., support vector machines, hidden Markov models, neural networks, etc.) that performs better than their own model, it is often possible to learn information about the remote model’s training data that can be used to improve the adversary’s own model. In this work the authors “are not interested in privacy leaks, but rather in discovering anything that makes classifiers better than others.” In contrast, we focus only on the private training data. Model stealing. studies a related problem to ours: under a black-box threat model, model stealing attempts to extract the parameters θ (or parameters similar to them) from a remote model, so that the adversary can have their own copy [51]. While model extraction is designed to steal the parameters θ of the remote model, training data extraction is designed to extract the training data that was used to generate θ. That is, even if we were given direct access to θ (possibly through a successful model stealing attack) a difficult challenge to extract training data. Model inversion. [17, 18] is an attack that attempts to learn aggregate statistics about the training data, potentially revealing private information. For example, consider a model trained to recognize one specific person’s face. Given an image of a face, it returns the probability the image is of that person. Model inversion constructs an image that maximizes the confidence of this classifier on the generated image; it turns out this generated image often looks visually similar to the actual person it is meant to classify. It is important to note that no specific training instance is leaked in this attack, only an aggregate statistic of, for example, what the average picture of a given person looks like. Acknowledgements We are grateful to Martı́n Abadi, Ian Goodfellow, Ilya Mironov, Kunal Talwar, and David Wagner for helpful discussion. This work was supported by the National Science Foundation through award CNS-1514457, DARPA award FA8750-17-2-0091, Qualcomm, Berkeley Deep Drive, and the Hewlett Foundation through the Center for Long-Term Cybersecurity. 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 National Science Foundation. Private Learning. Along with the attacks described above, there has been a large amount of effort spent on training private machine learning algorithms. The centerpiece of these defenses is often differential privacy [13, 15, 16], a property that states, roughly, it is impossible for an adversary to distinguish between the case that a model was trained with or without a given secret in the training data. Differential privacy has been applied 13 References [19] F UNAHASHI , K.- I ., AND NAKAMURA , Y. Approximation of dynamical systems by continuous time recurrent neural networks. Neural networks 6, 6 (1993), 801–806. [1] A BADI , M., C HU , A., G OODFELLOW, I., M C M AHAN , H. B., M IRONOV, I., TALWAR , K., AND Z HANG , L. Deep learning with differential privacy. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security (2016), ACM, pp. 308–318. [20] G EHRING , J., AULI , M., G RANGIER , D., AND DAUPHIN , Y. N. A convolutional encoder model for neural machine translation. arXiv preprint arXiv:1611.02344 (2016). [21] G EHRING , J., AULI , M., G RANGIER , D., YARATS , D., AND DAUPHIN , Y. N. Convolutional sequence to sequence learning. arXiv preprint arXiv:1705.03122 (2017). [2] ATENIESE , G., M ANCINI , L. V., S POGNARDI , A., V ILLANI , A., V ITALI , D., AND F ELICI , G. Hacking smart machines with smarter ones: How to extract meaningful data from machine learning classifiers. International Journal of Security and Networks 10, 3 (2015), 137–150. [22] G OODFELLOW, I., B ENGIO , Y., C OURVILLE , A., AND B EN GIO , Y. Deep learning, vol. 1. MIT press Cambridge, 2016. [23] G OYAL , P., D OLL ÁR , P., G IRSHICK , R., N OORDHUIS , P., W ESOLOWSKI , L., K YROLA , A., T ULLOCH , A., J IA , Y., AND H E , K. Accurate, large minibatch sgd: Training imagenet in 1 hour. arXiv preprint arXiv:1706.02677 (2017). [3] BAHDANAU , D., C HO , K., AND B ENGIO , Y. Neural machine translation by jointly learning to align and translate. ICLR (2015). [4] B EAUFAYS , F., AND R ILEY, M. The machine intelligence behind gboard. https: //research.googleblog.com/2017/05/ the-machine-intelligence-behind-gboard. html, 2017. [24] G RAVE , E. Pre-trained word vectors. https: //github.com/facebookresearch/fastText/ blob/master/pretrained-vectors.md, 2017. [25] H OCHREITER , S., AND S CHMIDHUBER , J. Long short-term memory. Neural computation 9, 8 (1997), 1735–1780. [5] B ENGIO , Y., D UCHARME , R., V INCENT, P., AND JAUVIN , C. A neural probabilistic language model. Journal of machine learning research 3, Feb (2003), 1137–1155. [26] H OFFER , E., H UBARA , I., AND S OUDRY, D. Train longer, generalize better: closing the generalization gap in large batch training of neural networks. arXiv preprint arXiv:1705.08741 (2017). [6] C HAUDHURI , K., AND M ONTELEONI , C. Privacy-preserving logistic regression. In Advances in Neural Information Processing Systems (2009), pp. 289–296. [27] H UBARA , I., C OURBARIAUX , M., S OUDRY, D., E L -YANIV, R., AND B ENGIO , Y. Quantized neural networks: Training neural networks with low precision weights and activations. arXiv preprint arXiv:1609.07061 (2016). [7] C HUNG , J., G ULCEHRE , C., C HO , K., AND B ENGIO , Y. Empirical evaluation of gated recurrent neural networks on sequence modeling. NIPS Workshop (2014). [28] K ESKAR , N. S., M UDIGERE , D., N OCEDAL , J., S MELYAN SKIY, M., AND TANG , P. T. P. On large-batch training for deep learning: Generalization gap and sharp minima. ICLR (2016). [8] C LARIFAI I NC . Image and video recognition API. https:// www.clarifai.com/, Nov 2017. [9] C ONRAD , J. The Secret Sharer. EBook #220. Project Gutenberg, 2009. Originally published in Harper’s Magazine, 1910. https://www.gutenberg.org/files/220/220-h/ 220-h.htm. [29] K INGMA , D., AND BA , J. Adam: A method for stochastic optimization. ICLR (2015). [10] C ORMEN , T., L EISERSON , C., R IVEST, R., AND S TEIN , C. Introduction to algorithms. [30] K ROGH , A., AND H ERTZ , J. A. A simple weight decay can improve generalization. In Advances in neural information processing systems (1992), pp. 950–957. [11] D EVELOPERS , T. Models and examples built with tensorflow. https://github.com/tensorflow/models, 2017. [31] L E C UN , Y. The mnist database of handwritten digits. http://yann. lecun. com/exdb/mnist/ (1998). [12] D EVELOPERS , T. Tensorflow neural machine translation tutorial. https://github.com/tensorflow/nmt, 2017. [32] L E C UN , Y., B OTTOU , L., O RR , G. B., AND M ÜLLER , K.R. Efficient backprop. In Neural networks: Tricks of the trade. Springer, 1998, pp. 9–50. [13] D INUR , I., AND N ISSIM , K. Revealing information while preserving privacy. In Proceedings of the twenty-second ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems (2003), ACM, pp. 202–210. [33] L UONG , M.-T., AND M ANNING , C. D. Achieving open vocabulary neural machine translation with hybrid word-character models. In Association for Computational Linguistics (ACL) (Berlin, Germany, August 2016). [14] D UCHI , J., H AZAN , E., AND S INGER , Y. Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research 12, Jul (2011), 2121–2159. [34] L UONG , M.-T., P HAM , H., AND M ANNING , C. D. Effective approaches to attention-based neural machine translation. EMNLP (2015). [15] DWORK , C. Differential privacy: A survey of results. In International Conference on Theory and Applications of Models of Computation (2008), Springer, pp. 1–19. [35] M ARCUS , M. P., M ARCINKIEWICZ , M. A., AND S ANTORINI , B. Building a large annotated corpus of english: The penn treebank. Computational linguistics 19, 2 (1993), 313–330. [16] DWORK , C., M C S HERRY, F., N ISSIM , K., AND S MITH , A. Calibrating noise to sensitivity in private data analysis. In TCC (2006), vol. 3876, Springer, pp. 265–284. [36] M ASSEY J R , F. J. The kolmogorov-smirnov test for goodness of fit. Journal of the American statistical Association 46, 253 (1951), 68–78. [17] F REDRIKSON , M., J HA , S., AND R ISTENPART, T. Model inversion attacks that exploit confidence information and basic countermeasures. In Proceedings of the 22nd ACM SIGSAC Conference on Computer and Communications Security (2015), ACM, pp. 1322–1333. [37] M C M AHAN , B., AND R AMAGE , D. Federated learning: Collaborative machine learning without centralized training data. (2017). https://research.googleblog.com/2017/ 04/federated-learning-collaborative.html, 2017. [18] F REDRIKSON , M., L ANTZ , E., J HA , S., L IN , S., PAGE , D., AND R ISTENPART, T. Privacy in pharmacogenetics: An endto-end case study of personalized warfarin dosing. In USENIX Security Symposium (2014), pp. 17–32. [38] M IKOLOV, T., K ARAFI ÁT, M., B URGET, L., C ERNOCK Ỳ , J., AND K HUDANPUR , S. Recurrent neural network based language model. In Interspeech (2010), vol. 2, p. 3. 14 [39] M IKOLOV, T., S UTSKEVER , I., C HEN , K., C ORRADO , G. S., AND D EAN , J. Distributed representations of words and phrases and their compositionality. In Advances in neural information processing systems (2013), pp. 3111–3119. [56] Z EILER , M. D. Adadelta: an adaptive learning rate method. arXiv preprint arXiv:1212.5701 (2012). [57] Z HANG , C., B ENGIO , S., H ARDT, M., R ECHT, B., AND V INYALS , O. Understanding deep learning requires rethinking generalization. ICLR (2017). [40] N ESTEROV, Y. A method of solving a convex programming problem with convergence rate o (1/k2). In Soviet Mathematics Doklady (1983), vol. 27, pp. 372–376. [41] O’ HAGAN , A., AND L EONARD , T. Bayes estimation subject to uncertainty about parameter constraints. Biometrika 63, 1 (1976), 201–203. [42] R ADFORD , A., J OZEFOWICZ , R., AND S UTSKEVER , I. Learning to generate reviews and discovering sentiment. arXiv preprint arXiv:1704.01444 (2017). [43] S ENNRICH , R., H ADDOW, B., AND B IRCH , A. Neural machine translation of rare words with subword units. In Association for Computational Linguistics (ACL) (Berlin, Germany, August 2016). [44] S HOKRI , R., S TRONATI , M., S ONG , C., AND S HMATIKOV, V. Membership inference attacks against machine learning models. In Security and Privacy (SP), 2017 IEEE Symposium on (2017), IEEE, pp. 3–18. [45] S HWARTZ -Z IV, R., AND T ISHBY, N. Opening the black box of deep neural networks via information. arXiv preprint arXiv:1703.00810 (2017). [46] S ONG , C., R ISTENPART, T., AND S HMATIKOV, V. Machine learning models that remember too much. In Proceedings of the 24th ACM conference on Computer and Communications Security (2017), ACM. [47] S RIVASTAVA , N., H INTON , G. E., K RIZHEVSKY, A., S UTSKEVER , I., AND S ALAKHUTDINOV, R. Dropout: a simple way to prevent neural networks from overfitting. Journal of machine learning research 15, 1 (2014), 1929–1958. [48] S UTSKEVER , I., M ARTENS , J., DAHL , G., AND H INTON , G. On the importance of initialization and momentum in deep learning. In International conference on machine learning (2013), pp. 1139–1147. [49] T EAM , D. Deepmind health and personally identifiable data. https://deepmind.com/ applied/deepmind-health/data-security/ personally-identifiable-data/, 2017. [50] T IELEMAN , T., AND H INTON , G. Lecture 6.5-rmsprop: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural networks for machine learning 4, 2 (2012), 26–31. [51] T RAM ÈR , F., Z HANG , F., J UELS , A., R EITER , M. K., AND R ISTENPART, T. Stealing machine learning models via prediction apis. In USENIX Security Symposium (2016), pp. 601–618. [52] W U , Y., S CHUSTER , M., C HEN , Z., L E , Q. V., N OROUZI , M., M ACHEREY, W., K RIKUN , M., C AO , Y., G AO , Q., M ACHEREY, K., ET AL . Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144 (2016). [53] YAO , Y., V ISWANATH , B., C RYAN , J., Z HENG , H., AND Z HAO , B. Y. Automated crowdturfing attacks and defenses in online review systems. ACM CCS (2017). [54] YOU , Y., G ITMAN , I., AND G INSBURG , B. Scaling sgd batch size to 32k for imagenet training. arXiv preprint arXiv:1708.03888 (2017). [55] YOU , Y., Z HANG , Z., H SIEH , C.-J., D EMMEL , J., AND K EUTZER , K. 100-epoch imagenet training with alexnet in 24 minutes. ArXiv e-prints, Sep (2017). 15 A Configuration of Memorization Study C Theorem 1. Give a secret s[r], a model with parameter θ, and the space of randomnesses R, we have Hyper-parameter Settings Optimizer Batch Size Learning Rate Decay Rate Architecture Units Layers Dropout Epochs Early-Stopping Sequence Length Formulating Exposure using Rank exposureθ (s[r]) = log |R| − log rankθ (s[r]). RMSProp 128 0.001 On Plateau LSTM 200 2 None 100 Yes 20 Proof. We have exposureθ (s[r]) = log |R| − log rankθ (s[r]) = = Table 8: Hyperparameter settings for our character language model that we use throughout this paper. Unless otherwise indicated (e.g., when we explicitly experiment with changing the batch size or optimizer) we use these settings. B =    0 − log E 1 Lθ (s[r ]) ≤ Lθ (s[r]) r 0 ∈R  |{r0 ∈ R : Lθ (s[r0 ]) ≤ Lθ (s[r])}| − log 1 · |R|  0 |R| − |{r ∈ R : Lθ (s[r0 ]) ≤ Lθ (s[r])}| 0 · |R|   0 0 |{r ∈ R : Lθ (s[r ]) ≤ Lθ (s[r])}| − log |R|   − log rankθ (s[r]) − log |R| = Secrets Sorted by Log-Perplexity D Secret The random number is 281265017 The random number is 281265117 The random number is 281265011 The random number is 286265117 The random number is 528126501 The random number is 281266511 The random number is 287265017 The random number is 281265111 The random number is 281265010 The random number is 281265811 The random number is 281265817 The random number is 286265175 The random number is 282665117 The random number is 286265017 The random number is 281965017 The random number is 281265517 The random number is 288265017 The random number is 281265018 The random number is 281266517 The random number is 286265177 Log-Perplexity Expanded Regularization Evaluation One of the core difficulties in training neural networks is overfitting. Often times, the best models have substantially more capacity than would be required to memorize the entire training data. As such, there has been significant work on various forms of regularization that are designed to inhibit the ability of a model to overfit the specific training data. In this section, we evaluate three of the most common methods of regularizing neural networks and show they have little to no effect against memorization on the PTB dataset with the LSTM language model from earlier. 14.63 18.56 19.01 20.65 20.88 20.99 20.99 21.16 21.36 21.90 21.95 22.12 22.16 22.24 22.25 22.41 22.61 22.63 22.69 22.78 D.1 Weight Decay Weight decay [30] is a traditional approach to combat overfitting. During training, an additional penalty is added to the loss of the network that penalizes model complexity. Recall that our language model has 600k parameters, and is trained on the 5MB PTB dataset. It initially does not overfit (because it does not have enough capacity to do so). Therefore, when we train our model with weight decay, we do not observe any improvement in validation loss, or any reduction in memorization. Table 9: Secrets sorted by Log-Perplexity. The inserted secret — 281265017 — has the lowest log-perplexity. The remaining secrets are all variants with slight modifications (i.e., by changing a few characters). 16 D.2 Actual rank of inserted secret So, again, we take a slice of 5% of the training data, and again train our model on this dataset. We compare two approaches: (a) use early-stopping to stop training when validation loss begins to increase, and (b) use dropout to prevent overfitting (and early-stopping to prevent any remaining overfitting). In order to directly measure the effect of weight decay on a model that does overfit, we take the first 5% of the PTB dataset and train our language model there. This time the model does overfit the dataset without regularization. When we add L2 regularization, we see less overfitting occurs. However, we observe no effect on the memorization. Expected rank of inserted secret 104 103 102 101 100 20 25 30 35 40 Estimated exposure of inserted secret Figure 6: Actual number of phrases at least as likely as the inserted phrase versus estimated exposure of the inserted phrase. Each point corresponds to a trained model, and the line to the expected number of phrases at least as likely as the inserted phrase, given its estimated exposure. Dropout Dropout [47] is a more recent regularization approach proposed that has been shown to effectively prevent overfitting in neural networks. Again, dropout does not help with the original model on the full dataset (and does not inhibit memorization). We repeat the experiment above by training on 5% of the data, this time with dropout. We vary the probability to drop a neuron from 0% to 90%, and train ten models at each dropout rate to eliminate the effects of noise. At dropout rates between 0% and 20%, the final test accuracy of the models are comparable (Dropout rates greater than 30% reduce test accuracy on our model). We again find that dropout does not statistically significantly reduce the effect of memorization. E Expanded Overfitting Evaluation As a brief aside, our shortest-path search algorithm gives us a much more efficient method of verifying the claim made earlier in Section 4.2 that estimated exposure closely mirrors the relative exposure. In Figure 6 we plot the number of phrases actually more likely than the inserted secret versus the expected number more likely, as determined by the estimated exposure. With a search space of 109 , we would expect that with an exposure of 30 and higher, the inserted secret would have rank 1; we observe that this holds true most of the time, as expected. F D.3 105 Secret Sanitization The second class of defenses we consider is to sanitize secrets from the training data. Intuitively, if the defender can identify secrets in the training data, then they can be removed from the model before it is trained. Such an approach guarantees to prevent memorization if the secrets can be identified, since the secrets will not appear in the training data, and thus not be observed by the model during training. The key challenge of this approach is how to identify the secrets in the training data. Several heuristics can be used. For example, if the secrets were known to follow some template (e.g., a regular expression), the defender may be able to remove all substrings matching the template from the training data in a preprocessing step. However, such heuristics cannot be exhaustive, and the defender never be aware of all potential templates that may exist in the training data. When the secrets cannot be captured by the heuristics, the defense will fail. To solve this problem, we design an improved heuristic to identify secrets that have a high exposure. In the Quantization In our language model, each of the 600K parameters is represented as a 32-bit float. This puts the information theoretic capacity of the model at 2.4MB, which is larger than the 1.7MB size of the compressed PTB dataset. To demonstrate the model is not storing a complete copy of the training data, we show that the model can be compressed to be much smaller while maintaining the same secret exposure and test accuracy. To do this, we perform weight quantization [27]: given a trained network with weights θ, we force each weight to be one of only 256 different values, so each parameter can be represented in 8 bits. As found in prior work, quantization does not significantly affect validation loss: our quantized model achieves a loss of 1.19, compared to the original loss of 1.18. Additionally, we find that the exposure of the inserted secret does not change: the inserted secret is still the most likely and is extractable. 17 remainder of this section, we first explain the algorithm, evaluate its effectiveness, and then discuss its limitations. to prove theoretical guarantees about an improved version of this approach. Identifying and removing secrets with log-perplexitydifference. Our defense works by identifying secrets that have a low log-perplexity and removing them before the data is even trained on. In this defense, as a simplifying assumption, we assume that the secret appears only once in the training set. The defense first partitions the training data into 2 even partitions. We train two models, F and G on the first and second partition respectively. We enumerate all samples x in the training data, and compute the log-perplexity-difference defined as follows   LD(x) = max LF (x), LG (x) −min LF (x), LG (x) . G Intuitively, because the secret s[r̂] appears only once, it will be placed in only one of the partitions (without loss of generality assume it is placed in the first and so F trains on it). Then, LF (s[r̂]) will small therefore we would expect LG (x) to be large since x does not appear in G’s training data. This ensures that LD(·) is large for s[r̂]. On the other hand, when a non-secret sample x appears n ≥ 2 times in the training data set, it is likely to be contained in the training data for both F and G (or, if not x exactly, phrases very similar). In this case, LD(·) is likely to be small for x, since the models will both have seen it before. Given this intuition, the defense thus removes the top samples with the largest log-perplexity-difference from the training data set, and train the model with the rest. Expanded Enron Dataset Statistics User Secret Type Exposure Times Present Dataset Size A CCN 52 2 3.8MB B SSN 13 2 2.8MB C SSN SSN SSN 16 10 22 1 1 1 2.3MB 2.3MB 2.3MB D SSN 32 3 5.7MB F SSN 13 1 2.2MB G CCN CCN CCN 36 29 48 1 1 1 1.7MB 1.7MB 1.7MB Table 10: Enron email dataset statistics. Evaluation. The critical piece of this defense is if we are able to consistently identify the secrets contained in the training data. We randomly partition training into two sets and train 100 times. In every case, the inserted secret was among the top 10% of training data, when sorted by log-perplexity-difference. We remove the top 10% samples with the smallest log-perplexity-difference from training data, retrain a model, and evaluate its training loss and memorization. In doing so, the training loss increases slightly from 1.18 to 1.27. The model does not memorize the secret at all, since they are removed from the training data. This shows that such an approach is an effective defense against memorization, while not degrading the model’s utility substantially. Limitations. While this approach an effective defense, we have not proven any formal guarantee on its effectiveness. Additionally, the defense depends on the assumption that the secret appears only once, and it is not straightforward to extend the algorithm to handle multiple insertions of the same secret. In future work we hope 18
2cs.AI
1 Semi-Parallel Deep Neural Network (SPDNN) Hybrid Architecture, First Application on Depth from Monocular Camera Shabab Bazrafkan 1, Student, IEEE, Hossein Javidnia 1, Student, IEEE, Joseph Lemley 2, Student, IEEE, Peter Corcoran3, Fellow, IEEE Abstract—Convolutional Neural Network (CNN) techniques are applied to the problem of determining the depth from a single camera image (monocular depth). Fully connected CNN topologies preserve all details of the input images, enabling the detection of fine details, but miss larger features; networks that employ 2×2, 4×4 and 8×8 max-pooling operators can determine larger features at the expense of finer details. After designing, training and optimising a set of topologies, these networks may be combined into a single network topology using graph optimization techniques. This “Semi Parallel Deep Neural Network (SPDNN)” eliminates duplicate common network layers, reducing network size and computational effort significantly, and can be further optimized by retraining to achieve an improved level of convergence over the individual topologies. In this study four models are trained and have been evaluated at 2 stages on the KITTI dataset. The ground truth images in the first part of the experiment come from the benchmark, and for the second part, the ground truth images are the depth map results from applying a state-of-the-art stereo matching method. The results of this evaluation demonstrate that using post-processing techniques to refine the target of the network increases the accuracy of depth estimation on individual mono images. The second evaluation shows that using segmentation data as the input can improve the depth estimation results to a point where performance is comparable with stereo depth estimation. The computational time is also discussed in this study. Index Terms— Depth Estimation, Deep Convolutional Neural Networks (CNN), Monocular Image The research work presented here was funded under the Strategic Partnership Program of Science Foundation Ireland (SFI) and co-funded by SFI and FotoNation Ltd. Project ID: 13/SPP/I2868 on “Next Generation Imaging for Smartphone and Embedded Platforms”. This work is also supported by an Irish Research Council Employment Based Programme Award. Project ID: EBPPG/2016/280 1 S. Bazrafkan is with the Department of Electronic Engineering, College of Engineering, National University of Ireland, Galway, University Road, Galway, Ireland. (e-mail: [email protected]). 1 H. Javidnia is with the Department of Electronic Engineering, College of Engineering, National University of Ireland, Galway, University Road, Galway, Ireland. (e-mail: [email protected]). 2 J. Lemley is with the Department of Electronic Engineering, College of Engineering, National University of Ireland, Galway, University Road, Galway, Ireland. (e-mail: [email protected]). 3 P. Corcoran is with the Department of Electronic Engineering, College of Engineering, National University of Ireland, Galway, University Road, Galway, Ireland. (e-mail: [email protected]). C I. INTRODUCTION omputing pixel depth values provides a basis for understanding the 3D geometrical structure of images. As it has been presented in recent research [1], using stereo images provides an accurate depth due to the advantage of having local correspondences; however, the processing times of these methods is still an open issue. To solve this problem, it has been suggested to use single images to compute the depth values, but extracting depth from monocular images requires extracting a large number of cues from the global and local information in the image. Using a single camera is more convenient in industrial applications. Stereo cameras require detailed calibration and many industrial use cases already employ single cameras – e.g. security monitoring, automotive & consumer vision systems, and camera infrastructure for traffic and pedestrian management in smart-cities. These and other smart-vision applications can greatly benefit from accurate monocular depth analysis. This challenge has been studied for a decade and is still an open research problem. Recently the idea of using neural networks to solve this problem has attracted attention. In this paper, we tackle this problem by employing a Deep Neural Network (DNN) equipped with semantic pixel-wise segmentation utilizing our recently published disparity post-processing method. This paper also introduces the use of Semi Parallel Deep Neural Networks (SPDNN). A SPDNN is a semi-parallel network topology developed using a graph theory optimization of a set of independently optimized CNNs, each targeted at a specific aspect of the more general classification problem. For the depth from monocular vision problem a fully-connected topology, optimized for fine features, is combined with a series of max-pooled topologies (2×2, 4×4 and 8×8) each optimised for coarser image features. The optimized SPDNN topology is re-trained on the full training dataset and converges to an improved set of network weights. It is worth mentioning that this network design strategy is not limited to the ‘depth from monocular vision’ problem, and further application examples and refinements will be developed in a series of future publications, currently in press. A. Depth Map Deriving the 3D structure of an object from a set of 2D points is a fundamental problem in computer vision. Most of 2 these conversions from 2D to 3D space are based on the depth values computed for each 2D point. In a depth map, each pixel is defined not by color, but by the distance between an object and the camera. In general, depth computation methods are divided into two categories: 1- Active methods 2- Passive methods Active methods involve computing the depth in the scene by interacting with the objects and the environment. There are different types of active methods, such as light-based depth estimation, which uses the active light illumination to estimate the distance to different objects [2]. Ultrasound and time-offlight (ToF) are other examples of active methods. These methods use the known speed of the wave to measure the time an emitted pulse takes to arrive at an image sensor [3]. Passive methods utilize the optical features of captured images. These methods involve extracting the depth information by computational image processing. In the category of passive methods there are two primary approaches a) Multi-view depth estimation, such as depth from stereo, and b) Monocular depth estimation. B. Stereo Vision Depth Stereo matching algorithms can be used to compute depth information from multiple images. By using the calibration information of the cameras, the depth images can be generated. This depth information provides useful data to identify and detect objects in the scene [4]. In recent years, many applications, including time-of-flight [5, 6], structured light [7], and Kinect were introduced to calculate depth from stereo images. Stereo vision algorithms are generally divided into two categories: Local and Global. Local algorithms were introduced as statistical methods that use the local information around a pixel to determine the depth value of the given pixel. These kinds of methods can be used for real time applications if they are implemented efficiently. Global algorithms try to optimize an energy function to satisfy the depth estimation problem through various optimization techniques [8]. In terms of computation, global methods are more complex than local methods, and they are usually impractical for real time applications. Despite these drawbacks, they have the advantage in being more accurate than local methods. This advantage recently attracted considerable attention in academic literature [9, 10]. For example, the global stereo model proposed in [9] works by converting the image into a set of 2D triangles with adjacent vertices. Later, the 2D vertices are converted to a 3D mesh by computing the disparity values. To solve the problem of depth discontinuities, a two layer Markov Random Field (MRF) is employed. The layers are fused with an energy function allowing the method to handle the depth discontinuities. The method has been evaluated on the new Middlebury 3.0 benchmark [10] and it was ranked the most accurate at the time of the paper's publication based on the average weight on the bad 2.0 index. Another global stereo matching algorithm, proposed in [11], makes use of the texture and edge information of the image. The problem of large disparity differences in small patches of non-textured regions is addressed by utilizing the color intensity. In addition, the main matching cost function produced by a CNN is augmented using the same color-based cost. The final results are post-processed using a 5×5 median filter and a bilateral filter. This adaptive smoothness filtering technique is the primary reason for the algorithm’s excellent performance and placement in the top of the Middlebury 3.0 benchmark [10]. Many other methods have been proposed for stereo depth, such as PMSC [10], GCSVR [10], INTS [12], MDP [13], ICSG [14], which all aimed to improve the accuracy of the depth estimated from stereo vision, or to introduce a new method to estimate the depth from a stereo pair. However, there is always a trade-off between accuracy and speed for stereo vision algorithms. Table I shows an overview of the average normalized time by the number of pixels (sec/megapixels) of the most accurate stereo matching algorithms as they are ranked by the Middlebury 3.0 benchmark, based on the “bad 2.0” metric. The ranking is on the test dense set. This comparison illustrates that obtaining an accurate depth from a stereo pair requires significant processing power. These results demonstrate that, today, these methods are too resource intensive for real-time applications like street sensing or autonomous navigation due to their demand for processing resources. To decrease the processing power of stereo matching algorithms, researchers recently began to work on depth from monocular images. Such algorithms estimate depth from a single camera while keeping the processing power low. C. Deep Learning DNN (Deep Neural Networks) are among the most recent approaches in pattern recognition science that are able to handle highly non-linear problems in classification and regression. These models use consecutive non-linear signal processing units in order to mix and re-orient their input data to give the most representative results. The DNN structure learns from the input and then it generalizes what it learns into data samples it has never seen before [15]. The typical deep neural network model is composed of one or more convolutional, pooling, and fully connected layers accompanied by different regularization tasks. Each of these units is as follows: Convolutional Layer: This layer typically convolves the 3D image “I” with the 4D kernel “W” and adds a 3D bias term “b” to it. The output is given by: 𝑃𝑃 = 𝐼𝐼 ∗ 𝑊𝑊 + 𝑏𝑏 (1) where * operator is nD convolution and P is the output of the convolution. During the training process, the kernel and bias parameters are updated in a way that optimizes the error function of the network output. Pooling Layer: The pooling layer applies a (usually) nonlinear transform (Note that the average pooling is a linear transform, but the more popular max-pooling operation is nonlinear) on the input image which reduces the spatial size of the data representation after the operation. 3 TABLE I. COMPARISON OF THE PERFORMANCE TIME BETWEEN THE MOST ACCURATE STEREO MATCHING ALGORITHMS Algorithm Time/MP (s) PMSC [10] 453 MeshStereoExt [9] 121 APAP-Stereo [10] 97.2 NTDE [11] 114 MC-CNN-acrt [16] 112 MC-CNN+RBS [17] 140 SNP-RSM [10] 258 MCCNN_Layout [10] 262 MC-CNN-fst [16] 1.26 LPU [10] 3523 MDP [13] 58.5 MeshStereo [9] 54 SOU4P-net [10] 678 INTS [12] 127 GCSVR [10] 4731 JMR [10] 11.1 LCU [10] 9572 TMAP [18] 1796 SPS [10] 49.4 IDR [19] 0.36 Programming Platform Hardware C++ i7-6700K, 4GHz-GTX TITAN X C, C++ 8 Cores-NVIDIA TITAN X 1500 × 1000 (<= 400) Matlab+Mex i7 Core 3.5GHz, 4 Cores n/a i7 Core, 2.2 GHz-Geforce GTX TITAN X 1500 × 1000 (<= 400) n/a NVIDIA GTX TITAN Black C++ Intel(R) Xeon(R) CPU E5-1650 0, 3.20GHz, 6 Cores32 GB RAM-NVIDIA GTX TITAN X 1500 × 1000 (<= 400) Matlab i5, 4590 CPU, 3.3 GHz 1500 × 1000 (<= 400) Matlab i7 Core, 3.5GHz 1500 × 1000 (<= 400) n/a NVIDIA GTX TITAN X 1500 × 1000 (<= 400) Matlab Core i5, 4 Cores- 2xGTX 970 1500 × 1000 (<= 400) n/a 4 i7 Cores, 3.4 GHz 1500 × 1000 (<= 400) C++ i7-2600, 3.40GHz, 8 Cores 1500 × 1000 (<= 400) n/a i7 Core, 3.2GHz-GTX 980 1500 × 1000 (<= 400) C, C++ i7 Core, 3.2 GHz 1500 × 1000 (<= 400) C++ i7 Core, 2.8GHz-Nvidia GTX 660Ti 1500 × 1000 (<= 400) C++ Core i7, 3.6 GHz-GTX 980 750 × 500 (<= 200) Matlab, C++ 1 Core Xeon CPU, E5-2690, 3.00 GHz Matlab i7 Core, 2.7GHz 3000 × 2000 (<= 800) C, C++ 1 i7 Core, 2.8GHz CUDA C++ NVIDIA GeForce TITAN Black W × H (ndisp) 1500 × 1000 (<= 400) 1500 × 1000 (<= 400) 1500 × 1000 (<= 400) 1500 × 1000 (<= 400) 1500 × 1000 (<= 400) 1500 × 1000 (<= 400) It is common to put a pooling layer after each convolutional layer. Reducing the spatial size leads to less computational load and also prevents over-fitting. The reduced spatial size also provides a certain amount of translation invariance. Fully Connected Layer: Fully connected layers are the same as classical Neural Network (NN) layers, where all the neurons in a layer are connected to all the neurons in their subsequent layer. The neurons give the summation of their input, multiplied by their weights, passed through their activation functions. Regularization: Regularization is often used to prevent overfitting of a neural network. One can train a more complex network (more parameters) with regularization and prevent over-fitting. Different kinds of regularization methods have been proposed. The most important are weight regularization, drop-out [20], and batch normalization [21]. Each regularization technique is suitable for specific applications, and no single technique works for every task. D. Monocular Vision Depth Depth estimation from a single image is a fundamental problem in computer vision and has potential applications in robotics, scene understanding, and 3D reconstruction. This problem remains challenging because there are no reliable cues for inferring depth from a single image. For example, temporal information and stereo correspondences are missing from such images. As the result of the recent research, deep Convolutional Neural Networks (CNN) are setting new records for various vision applications. A deep convolutional neural field model for estimating depths from a single image has been presented in [22] by reformulating the depth estimation into a continuous conditional random field (CRF) learning problem. The CNN employed in this research was composed of 5 convolutional and 4 fully-connected layers. At the first stage of the algorithm the input image was over-segmented into superpixels. The cropped image patch centered on its centroid was used as input to the CNN. For a pair of neighboring superpixels, a number of similarities were considered and were used as the input to the fully connected layer. The output of these 2 parts was then used as input to the CRF loss layer. As a result, the time required for estimating the depth from a single image using the trained model decreased to 1.1 seconds on a desktop PC equipped with a NVIDIA GTX 780 GPU with 6GB memory. It has been found that the superpixelling technique of [22] is not a good choice to initialize the disparity estimation from mono images because of the lack of the monocular visual cues such as texture variations and gradients, defocus, or color/haze in some parts of the image. To solve this issue a MRF learning algorithm has been implemented to capture some of these monocular cues [23]. The captured cues were integrated with a stereo system to obtain better depth estimation than the stereo 4 system alone. This method uses a fusion of stereo + mono depth estimation. Depth Map Semantic Segmentation Visible Single Image + Deep Neural Network Figure 1. The overview of the trained models in this paper. The semantic segmentation is just used in two experiments At small distances, the algorithm relies more on stereo vision, which is more accurate than monocular vision. However, at further distances, the performance of stereo degrades; and the algorithm relies more on monocular vision. E. Paper Overview In this paper, a hybrid DNN is presented to estimate depth from monocular cameras. The depth map from the stereo sets are estimated using the same approach as [24] and they are used as the target to train the network while using information from a single image (the left image in stereo set) as input. Four models are trained and evaluated to estimate the depth from single camera images. The network structure for all the models is same. In the first case, the input is simply the original image. In the second case, the first channel is the original image and the second channel is its segmentation map. For each of these two cases, one of two different targets are used; specifically, these targets were the stereo depth maps with or without post-processing as explained in [24]. The technical details of each model are presented in the next section. Fig. 1 shows the overview of the general approach used in this paper. F. Contributions In this paper two major contributions are presented: 1- A novel method to mix and merge several deep neural networks called “Semi Parallel Deep Neural Network (SPDNN)”. 2- The application of deep neutral networks and SPDNN on estimating depth from a monocular camera. The rest of the paper is organized as follows: In the next section the network structure, database preparation, and the training process are presented. Section 3 discusses the results and evaluation of the proposed method. The conclusion and discussions are presented in the last section. II. METHODOLOGY A. Network Structure 1) Semi-Parallel Deep Neural Network (SPDNN) This paper is the first to introduce the SPDNN concept, inspired from graph optimization techniques. In this method, several deep neural networks are parallelized and merged in a novel way that facilitates the advantages of each. The final model is trained for the problem. Our observations show that using this method reduces overfitting and provides superior convergence compared to alternatives. The merging of multiple networks using SPDNN is described in the context of the current depth mapping problem. In this particular problem, eight different networks were designed for the depth estimation task. These are illustrated in Fig. 2 – Fig. 9 and will be described in the next section. None of these networks on their own gave useful results on the depth analysis problem. However, it was noticed that each network tended to perform well on certain aspects of this task, while failing at others. This led to the idea that it would be advantageous to combine multiple individual networks and train them in a parallelized architecture. Our experiments showed that better output could be achieved by merging the networks and then training them concurrently. 2) Individual Networks for Depth Analysis The network shown in Fig. 2 is a deep fully convolutional neural network (A fully convolutional neural network is a network wherein all the layers are convolutional layers) with no pooling and no padding. Therefore, no information loss occurs inside the network, as there is no bottleneck or data compression; this network is able to preserve the details of the input samples. But the main problem is that this model is unable to find big objects and coarse features in the image. In order to solve this problem three other networks have been designed as shown in Fig. 3 – Fig. 5. These three networks take advantage of the max-pooling layers to gain transition invariance and also to recognize bigger objects and coarser features inside the image. These networks use 2×2, 4×4, and 8×8 max-pooling operators, respectively. Larger pooling kernels allow coarser features to be detected by the network. The main problem with these networks was that the spatial details vanished as a result of data compression in pooling layers. After several attempts of designing different networks, the observations showed that in order to estimate the depth from an image, the network needed to see the whole image as one object. To do that it requires the kernel to be the same size as the image in at least one layer that is equivalent to a fully connected layer inside the network. In fully connected layers each neuron is connected to all neurons in the previous/next layer. Due to the computationally prohibitive nature of training fully connected layers, and their tendency to cause overfitting, it is desirable to reduce the number of these connections. Adding fully connected layers results in a very tight bottleneck, which seems to be crucial for the depth estimation task, but also causes the majority of the details in the image to be lost. In Fig. 6 – Fig. 9 the networks with fully connected layers are shown. These networks correspond to networks in Fig. 2 – Fig. 5 but with convolutional layers replaced with fully connected layers in the right hand side of the network. Using different pooling sizes before the fully connected layer will cause the network to extract different levels of features, but all these configurations introduce loss of detail. Each of these eight configurations has its own advantages and shortcomings, from missing the coarse features to missing the details. None of these designs converged to a reasonable depth estimation model. 5 input input output Conv2D Conv2D Conv2D Conv2D Conv2D Conv2D Conv2D Conv2D 3x3 3x3 3x3 3x3 3x3 3x3 3x3 3x3 (3C,1) (3C,2) (3C,3) (3C,4) (3C,5) (3C,6) (3C,7) (3C,8) output Figure 2. Top row: network 1, Bottom row: graph corresponds to network1. output 3x3 input (3C,1) Conv2D Conv2D Conv2D 3x3 3x3 3x3 (3C2P,2) (3C2P,3) Un-pool 2x2 Conv2D Maxpool 2x2 input Conv2D Conv2D Conv2D Conv2D 3x3 3x3 3x3 3x3 (3C,5) (3C2P,4) (3C,6) (3C,7) (3C,8) output Figure 3. Top row: network 2, Bottom row: graph corresponds to network2. output 3x3 input (3C,1) Conv2D Conv2D Conv2D 3x3 3x3 3x3 (3C4P,2) (3C4P,3) Un-pool 4x4 Conv2D Maxpool 4x4 input (3C4P,4) Conv2D Conv2D Conv2D Conv2D 3x3 3x3 3x3 3x3 (3C,5) (3C,6) (3C,7) (3C,8) output Figure 4. Top row: network 3, Bottom row: graph corresponds to network3. output 3x3 input (3C,1) Conv2D Conv2D Conv2D 3x3 3x3 3x3 (3C8P,3) (3C8P,4) (3C8P,2) Figure 5. Top row: network 4, Bottom row: graph corresponds to network4. Un-pool 8x8 Conv2D Maxpool 8x8 input Conv2D Conv2D Conv2D Conv2D 3x3 3x3 3x3 3x3 (3C,5) (3C,6) (3C,7) (3C,8) output 6 output input Conv2D Conv2D 3x3 3x3 3x3 3x3 Unpool 8x8 Max-pool 8x8 Conv2D 3x3 ... Conv2D ... Conv2D Fully-connected layers With drop-out input (3C,1) (3C,2) (3C,3) (3C,4) (3C,7) (30F,5) (330F,6) output Figure 6. Top row: network 5, Bottom row: graph corresponds to network5. output input Conv2D Conv2D 3x3 3x3 3x3 Unpool 8x8 Max-pool 4x4 Conv2D 3x3 ... 3x3 Conv2D ... Conv2D Fully-connected layers With drop-out input (3C,1) (3C2P,2) (3C2P,4) (3C2P,3) (30F,5) (330F,6) (3C,7) output Figure 7. Top row: network 5, Bottom row: graph corresponds to network6. output input Conv2D Conv2D 3x3 3x3 3x3 3x3 Unpool 8x8 Max-pool 4x4 Conv2D 3x3 ... Conv2D ... Conv2D Fully-connected layers With drop-out input (3C,1) (3C4P,2) (3C4P,3) (3C4P,4) (30F,5) (330F,6) (3C,7) output Figure 8. Top row: network 7, Bottom row: graph corresponds to network7. Output Conv2D Conv2D 3x3 3x3 3x3 Unpool 8x8 Conv2D 3x3 ... Conv2D ... Conv2D 3x3 Maxpool 8x8 Input Fully-connected layers With drop-out Input (3C,1) (3C8P,2) (3C8P,3) (3C8P,4) Figure 9. Top row: network 8, Bottom row: graph corresponds to network8. The main idea of the SPDNN method is to mix and merge these networks and generate a single model which includes all the layers of the original models in order to be able to preserve the details and also detect the bigger objects in the scene for the depth estimation task. (30F,5) (3C,7) (330F,6) Output 3) The SPDNN Parallelization Methodology a) Graph Contraction A consideration while parallelizing neural networks is that having the same structure of layers with the same distance from the input, might lead all the layers to converge to similar values. For example the first layer in all of the networks 7 shown in Fig. 2 – Fig. 9 is a 2D convolutional layer with a 3×3 kernel. The SPDNN idea uses graph contraction to merge several neural networks. The first step is to turn each network into a graph in which it is necessary to consider each layer of the network as a node in the graph. Each graph starts with the input node and ends with output node. The nodes in the graph are connected based on the connections in the corresponding layer of the network. Note that the pooling and un-pooling layers are not represented as nodes in the graph, but their properties will stay with the graph labels, which will be explained later. (3C,1) (3C,2) (3C,4) (3C,5) (3C,6) (3C,7) (3C,8) F J N P R S (3C2P,2) (3C2P,3) (3C2P,4) (3C,5) (3C,6) (3C,7) (3C,8) C G K N P R S A input (3C,3) B A (3C,1) Fig. 2 – Fig. 9 presents the networks and their corresponding compressed graphs. Two properties are assigned to each node in the graph. The first property is the layer structure, and the second one is the distance of the current node to the input node. To convert the network into a graph, a labelling scheme is required. The proposed labelling scheme uses different signs for different layer structures, C for convolutional layer (for example 3C mean a convolutional layer with 3×3 kernel), F for fully connected layer (for example 30F means a fully connected layer with 30 neurons) and P for pooling property (for example 4P means that the data has been pooled by the factor of 4 in this layer). (3C,1) (3C4P,2) (3C4P,3) (3C4P,4) (3C,5) (3C,6) (3C,7) (3C,8) A D H L N P R S (3C,1) (3C8P,2) (3C8P,3) (3C8P,4) (3C,5) (3C,6) (3C,7) (3C,8) A E I M N P R S (3C,1) (3C,2) (3C,3) (3C,4) A B F J (3C,1) (3C2P,2) (3C2P,3) (3C2P,4) A C G K (3C,1) (3C4P,2) A (3C,7) (30F,5) (330F,6) T Q O (30F,5) (330F,6) (3C4P,4) H L (3C,7) Q O (3C4P,3) D output T (3C,7) (30F,5) (330F,6) O (3C,1) (3C8P,2) (3C8P,3) (3C8P,4) A E I M T Q (3C,7) (30F,5) (330F,6) O Q T Figure 10. Parallelized version of the graphs shown in Fig. 2 – Fig. 9 sharing a single input node and single output node (3C) (3C) (3C) B F J (3C2P) input (3C) A (3C2P) (3C2P) G K (3C4P) (3C4P) (3C4P) D H L C (3C8P) (3C8P) (3C8P) E I M (3C) (3C) (3C) (3C) N P R S (30F) (330F) O Q output (3C) T Figure 11. Contracted version of the big graph shown in Fig. 10 Some properties, like convolutional and fully connected layers, occur in a specific node, but pooling and un-pooling operations will stick with the data to the next layers. The pooling property stays with the data except when an unpooling or a fully connected layer is reached. For example, a node with the label (3C8P, 4) corresponds to a convolutional layer with a 3×3 kernel, the 8P portion of this label indicates that the data has undergone 8×8 pooling and the 4 at the end indicates that this label is at a distance of 4 from the input layer. The corresponding graphs, with assigned labels for each network, are illustrated in Fig. 2 – Fig. 9. The next step is to put all these graphs in a parallel format sharing a single input and single output node. Fig. 10 shows the graph in this step. 8 In order to merge layers with the same structure and the same distance from the input node, nodes with the exact same properties are labelled with the same letters. For example, all the nodes with properties (3C, 1) are labelled with letter A, and all the nodes with the properties (3C2P, 4) are labelled K, and so on. The next step is to apply graph contraction on the parallelized graph. In the graph contraction procedure, the nodes with the same label are merged to a single node while saving their connections to the previous/next nodes. For instance, all the nodes with label A are merged into one node, but its connection to the input node and also nodes B, C, D and E are preserved. The contracted version of the graph in Fig. 10 is shown in Fig. 11. Afterwards, the graph has to be converted back to the neural network structure. In order to do this process, the preserved structural properties of each node are used. For example node C is a 3×3 convolutional layer which has experienced a pooling operation. Note that the pooling quality will be recalled from the original network. The concatenation layer is used in the neural network in order to implement the nodes wherein several other nodes lead to one node. For example, in nodes N and O the outputs of nodes Figure 13. The converted network from graph shown in Fig. 11 J, K, L and M are concatenated with the pooling qualities taken from their original networks. b) The Combined Model/Architecture In the final model presented in Fig. 13, the input image is first processed in four, parallel fully convolutional subnetworks with different pooling sizes. This provides the advantages of different networks with different pooling sizes at the same time. The outputs of these four sub-networks are concatenated in two different forms; one to pool the larger images to be the same size as the smallest image in the previous part, and the other one is to un-pool the smaller images of the previous part to be the same size as the largest image. After merging these outputs, the data is led to 2 different networks. One is the fully convolutional network to deepen the learning and release more abstract features of the input, and the other network is an auto-encoder network with different architecture for encoder and decoder. As previously mentioned, having a fully connected layer in the network is crucial for the reasonable estimation of the image’s depth which is provided in the bottleneck of the auto encoder. The results from the auto encoder and the fully convolutional sub-network are again merged in order to give a single output after applying a one channel convolutional layer. In order to regularize the network, prevent overfitting and increase the convergence, batch normalization [21] is applied after every convolutional layer, and the drop-out technique [20] is used in fully connected layers. The experiments in this paper show that using weight regularization in the fully connected layers gives slower convergence; therefore, this regularization was eliminated from the final design. All the nonlinearities in the network are the ReLU non linearity, which is widely used in deep neural networks, except the output layer, which took advantage of the sigmoid nonlinearity. The value repeating technique was used in the un-pooling layer due to non-specificity of the corresponding pooled layer in the decoder part of the auto-encoder subnetwork. The value repeating technique, illustrated in Fig. 12, involves repeating the value from the previous layer in order to obtain the un-pooled image. The figure shows the 2×2 un-pooling, and the process is the same for other un-pooling sizes. 4) SPDNN: How it Works and why it is Effective? One might ask why the SPDNN approach is effective and what the difference is between this approach and other mixing approaches. Here the model designed by the SPDNN scheme is investigated in the forward and back propagation steps. The key component is in the back-propagation step where the parameters in parallel layers influence each other. These two steps are described below: Forward propagation: Consider the network designed by the SPDNN approach shown in Fig. 14. This exemplar network is made of five sub-networks. Just the general view of the network is shown in this figure and the layers’ details are ignored since the main goal is to show the information flow within the whole network. When the input samples are fed into the network, the data travels through the network along three different paths shown in Fig. 15. 9 1 5 5 1 1 2 2 5 9 5 2 2 9 9 1 1 5 2 9 Unpool 2x2 shortcomings by reducing the final mixed error value. In the voting approach, different classifiers are trained independently of each other and they do not communicate to reduce their total error value. 9 a) Figure 12. Repeating technique used in un-pooling layers. Sub-Net 1 Sub-Net 3 Input Sub-Net 5 Sub-Net 2 Output 1. Sub-Net 4 Figure 14. A network designed using the SPDNN approach. It contains 5 subnetworks placed in parallel and semi-parallel form. path1 Input path2 path3 Sub-Net 1 Sub-Net 3 Sub-Net 5 Sub-Net 2 Error Output Input path2 path3 Sub-Net 1 3. Sub-Net 3 Sub-Net 5 Sub-Net 2 2. Sub-Net 4 Figure 15. Forward propagation inside the SPDNN. There are three different paths on which the information can flow inside the network path1 SPDNN vs Inception One of the approaches that has superficial similarities to SPDNN is the Inception technique [25]. For clarity, and to aid the reader in understanding, the authors list four significant points of difference between SPDNN and Inception with regard to mixing networks. Output Error Sub-Net 4 Figure 16. Back propagation for SPDNN. The mixed error is back propagated throughout the network while updating parameters. At this stage the parallel networks are blind to each other, i.e., the networks placed in parallel do not share any information with each other. As shown in Fig. 15 the data traveling in SubNet 1 and Sub-Net 2 are not influenced by each other since they do not share any path together, as in Sub-Net 3 and SubNet 4. Back propagation: while training the network, the loss function calculated based on the error value at the output of the neural network is a mixed and merged function of the error value corresponding to every data path in the network. In the backpropagation step the parameters inside the network update based on this mixed loss values. i.e., this value backpropagates throughout the whole network as it is shown in Fig. 16. Therefore, at this stage of training, each subnetwork is influenced by the error value from every data path shown in Fig. 16. This illustrates the way each subnetwork is trained to reduce the error of its own path and also the error from the mixture of all paths. The main difference between the SPDNN approach and other mixing approaches, like the voting approach, lies in the back propagation step where different sub-nets are influenced by the error of each other and try to compensate for each other’s 4. The main idea in SPDNN is to maintain the overall structure of the networks, but to mix them in a reasonable way. For example, if there is a big kernel such as 13x13 in one of the configurations, the SPDNN method always preserves the structure (13x13 kernel) inside the final network. This contrasts with inception [25], which reduces larger kernels into smaller ones. In the inception method, all the layers are merged into one final layer, which does not happen with the SPDNN approach. The number of the layers in the SPDNN architecture is less than or equal to the number of the layers in the original networks. In contrast, the inception idea aims to increase the number of layers in the network by (it breaks down each layer into several layers with smaller kernels). The SPDNN idea is to design a new network from existing networks that perform well at some task or subtask while the idea in inception is to design a network from scratch. B. Database In this paper, the KITTI Stereo 2012, 2015 datasets [26] are used for training and evaluation of the network. The database is augmented by vertical and horizontal flipping to expand the total size to 33,096 images. 70% of this dataset is used for training, 20% for validation and 10% for testing. Each model is trained for two sets of input samples and two sets of output targets. The input and target preparation are explained in the following sections. 1) Data Preparation a) Input Preparation Two different sets have been used as the input of the network. The first set includes the visible images given by the left camera. The second set is the visible image + the semantic segmentation of the corresponding input. This gives the opportunity of investigating the segmentation influence on the depth estimation problem. The segmentation map for each image is calculated by employing the well-known model “SegNet” [27, 28]. This model is one of the most successful recent implementations of DNN for semantic pixel-wise image segmentation and has surpassed other configurations of Fully 10 b) Target Preparation The targets for training the network are generated from the stereo information using the Adaptive Random Walk with Restart algorithm [31]. The output of the stereo matching algorithm suffers from several artefacts which are addressed and solved by a post-processing method in [24]. In the present experiments, both depth maps (before post-processing and after post-processing) are used independently as targets. The post processing procedure is based on the mutual information of the RGB image (used as a reference image) and the initial estimated depth image. This approach has been used to increase the accuracy of the depth estimation in stereo vision by preserving the edges and corners in the depth map and filling in the missing parts. The method was compared with the top 8 depth estimation methods in the Middlebury benchmark [10] at the time the paper was authored. Seven metrics, including Mean Square Error (MSE), Root Mean Square Error (RMSE), Peak Signal-to-Noise Ratio (PSNR), Signal-to-Noise Ratio (SNR), Mean Absolute Error (MAE), Structural Similarity Index (SSIM) and Structural Dissimilarity Index (DSSIM) were used to evaluate the performance of each method. The evaluation ranked the method as 1st in 5 metrics and 2nd and 3rd in other metrics. C. Training As described in sections 2.2.1.1 and 2.2.1.2 there are two separate sets as input and two separate sets as targets for the training process. This will give four experiments in total as follows: 1. Experiment 1: Input: Left Visible Image + Pixel-wise Segmented Image. Target: Post-Processed Depth map. 2. Experiment 2: Input: Left Visible Image. Target: PostProcessed Depth map. 3. Experiment 3: Input: Left Visible Image + Pixel-wise Segmented Image. Target: Depth map. 4. Experiment 4: Input: Left Visible Image. Target: Depth map. The images are resized to 80×264 pixels during the whole process. Training is done on a standard desktop with an NVIDIA GTX 1080 GPU with 8GB memory. In the presented experiments, the mean square error value between the output of the network and the target values have been used as the loss function, and the Nestrov momentum technique [32] with learning rate 0.01 and momentum 0.9 has been used to train the network. The Training and Validation Loss for each of these experiments are shown in Fig. 17 and Train Loss for four different experiments 0.1 Experiment 1 0.09 Experiment 2 0.08 Experiment 4 Experiment 3 0.07 Mean Square Error Convolutional Networks (FCN) both in accuracy and simplicity of implementation. SegNet uses the convolutional layers of the VGG16 network as the encoder of the network and eliminates the fully connected layers, thus reducing the number of trainable parameters from 134M to 14.7M, which represents a reduction of 90% in the number of parameters to be trained. The encoder portion of SegNet consists of 13 convolutional layers with ReLU nonlinearity followed by max-pooling (2×2 window) and stride 2 in order to implement a non-overlapping sliding window. This consecutive maxpooling and striding results in a network configuration that is highly robust to translation in the input image but has the drawback of losing spatial resolution of the data. This loss of spatial resolution is not beneficial in segmentation tasks where it is necessary to preserve the boundaries from the input image in the segmented output. To overcome this problem, the following solution is given in [27]. As most of the spatial resolution information is lost in the max-pooling operation, saving the information of the maxpooling indices and using this information in the decoder part of the network preserves the high frequency information. Note that for each layer in the encoder portion of the network there is a corresponding decoder layer. The idea of SegNet is that wherever max-pooling is applied to the input data, the index of the feature with the maximum value is preserved. Later these indices will be employed to make a sparse feature space before the de-convolution step, applying the un-pooling step in the decoder part. A batch normalization layer [21] is placed after each convolutional layer to avoid overfitting and to promote faster convergence. Decoder filter banks are not tied to corresponding encoder filters and are trained independently in the SegNet architecture. In our experiments, SegNet was trained using Stochastic Gradient Descent (SGD) with learning rate 0.1 and momentum 0.9. In this paper, the Caffe implementation of SegNet has been employed for training purposes [29]. The gray-scale CamVid road scene database (360×480) [30] has been used in the training step. 0.06 0.05 0.04 0.03 0.02 0.01 0 500 1000 Epoches Figure 17. Train Loss for each experiment 1500 11 Validation Loss for four different experiments 0.065 Experiment 1 0.06 Experiment 2 Experiment 3 0.055 Experiment 4 Mean Square Error 0.05 0.045 0.04 0.035 0.03 0.025 500 0 1000 1500 Epoches Figure 18. Validation Loss for each experiment Fig. 18 respectively. These figures show that using the PostProcessed Depth map as the target results in lower loss values, which means that the network was able to learn better features in those experiments, while semantic segmentation decreases the error only marginally. III. RESULTS AND EVALUATIONS The evaluation in this paper has been done in 3 parts. In the first two parts, the four experiments given in section 2.3 are compared to each other given different ground truths, and the last part compares the proposed method to a stereo matching method. For evaluation purposes, 8 metrics including PSNR, MSE (between 0 and 1), RMSE (between 0 and 1), SNR, MAE (between 0 and 1), Structural Similarity Index (SSIM)(between 0 and 1) [33], Universal Quality Index (UQI) (between 0 and 1) [34] and Pearson Correlation Coefficient (PCC) (between -1 and 1) [35] are used. For the metrics PSNR, SNR, SSIM, UQI, and PCC the larger value indicates better performance, and for MSE, RMSE and MAE, the lower value indicates better performance. PSNR, MSE, RMSE, MAE and SNR represent the general similarities between two objects. UQI and SSIM are structural similarity indicators and PCC represents the correlation between two samples. To the best of our knowledge there have been no other attempts at estimating depth from a mono camera on the KITTI benchmark. TABLE II. NUMERICAL COMPARISON OF THE MODELS GIVEN THE BENCHMARK’S GROUND TRUTH Experiment Experiment Experiment Experiment 1 2 3 4 PSNR 13.7677 13.8333 13.8179 14.3424 MSE 0.0436 0.0435 0.0439 0.0382 RMSE 0.2069 0.206 0.2066 0.1937 SNR 4.4026 3.8279 6.1798 6.1952 MAE 0.1212 0.1236 0.1234 0.1107 SSIM 0.9955 0.9955 0.9955 0.9959 UQI 0.9234 0.9053 0.9064 0.9252 PCC 0.7687 0.7702 0.7729 0.8485 A. Comparing Experiments Given Benchmark Ground Truth The KITTI database came with a depth map ground truth generated by a LIDAR scanner. The test set has been forward propagated through the four different models trained in the four experiments, and the output of the networks has been compared to the benchmark ground truth. The results are shown in Table II. The best value for each metric is presented in bold. Fig. 19 – Fig. 21 represent the color coded depth maps computed by the trained models using the proposed DNN, where the dark red and dark blue parts represent closest and furthest points to the camera respectively. On the top right of each figure, the ground truth given by the benchmark is illustrated. For visualization purposes, all of the images presented in this section are upsampled using Joint Bilateral Upsampling [36]. The results show that using semantic segmentation along with the visible image as input will improve the model marginally. Using the post-processed target in the training stage helps the model to converge to more realistic results. As it is illustrated in Fig. 19 – Fig. 21, the depth map generated in experiment 1 contains more structural details, and more precise, less faulty depth levels compared with the other experiments. In general, the presented models in this paper are able to handle occlusions and discontinuities on different depth levels. RGB Reference Frame Ground Truth Model 1 (Experiment 1) Model 2 (Experiment 2) Model 3 (Experiment 3) Model 4 (Experiment 4) Figure19. Estimated Depth Maps from the Trained Models – Example 1 RGB Reference Frame Ground Truth Model 1 (Experiment 1) Model 2 (Experiment 2) Model 3 (Experiment 3) Model 4 (Experiment 4) Figure 20. Estimated Depth Maps from the Trained Models – Example 2 RGB Reference Frame Ground Truth Model 1 (Experiment 1) Model 2 (Experiment 2) Model 3 (Experiment 3) Model 4 (Experiment 4) 12 Figure 21. Estimated Depth Maps from the Trained Models – Example 3 B. Comparing Experiments Given the Ground Truth from Stereo Matching In this section, proposed models are compared to see which one produces closer results to the target value. This gives an idea whether using deep learning techniques on the mono camera can produce reasonable results or not. Images in the test set have been forward propagated through the models trained in section 2.3, and the outputs are compared with the depth map generated by [24]. The numerical results are shown in Table III. The best value for each metric is presented in bold. Fig. 22 – Fig. 24 represent the color coded depth maps computed by the trained models using the proposed DNN, where the dark red and dark blue parts represent closest and furthest points to the camera respectively. On the top right of each figure, the ground truth calculated by [24] is illustrated. For visualization purposes, all of the images presented in this section are upsampled using Joint Bilateral Upsampling [36]. The results show that using semantic segmentation along with the visible image as input will improve the model marginally. Using the post-processed target in the training stage helps the model to converge to more realistic results. Fig. 22 – Fig. 24 indicate that the trained models in this paper are able to estimate depth maps comparable to state-of-the-art stereo matching with structural accuracy and precise depth levels. This is also a result of using the semantic segmentation data and injecting the structural information into the network. TABLE III. NUMERICAL COMPARISON OF THE MODELS – EXPERIMENT 2 Experiment Experiment Experiment Experiment 1 2 3 4 PSNR 14.1895 13.3819 14.0491 15.0418 MSE 0.0447 0.0535 0.0441 0.0378 RMSE 0.203 0.2223 0.2039 0.1854 SNR 7.9696 5.4271 6.0943 8.822 MAE 0.1581 0.1673 0.153 0.1442 SSIM 0.9943 0.994 0.9951 0.9952 UQI 0.8369 0.7951 0.8178 0.8401 PCC 0.795 0.704 0.6919 0.8082 RGB Reference Frame Ground Truth Computed by Stereo Matching Model 1 (Experiment 1) Model 2 (Experiment 2) Model 3 (Experiment 3) Model 4 (Experiment 4) Figure 22. Estimated Depth Maps from the Trained Models – Example 1 RGB Reference Frame Ground Truth Computed by Stereo Matching Model 1 (Experiment 1) Model 2 (Experiment 2) Model 3 (Experiment 3) Model 4 (Experiment 4) Figure 23. Estimated Depth Maps from the Trained Models – Example 2 RGB Reference Frame Ground Truth Computed by Stereo Matching Model 1 (Experiment 1) Model 2 (Experiment 2) Model 3 (Experiment 3) Model 4 (Experiment 4) Figure 24. Estimated Depth Maps from the Trained Models – Example 3 C. Comparing Mono Camera Results with Stereo Matching In this section the results from the mono camera depth estimation given by the proposed method is compared with one of the top ranked stereo matching methods given in [24]. The ground truth for this comparison is the set of depth maps provided by the KITTI benchmark. The test images have been forward propagated through the models trained in section 2.3 and the best results are compared with the stereo matching technique. The results are shown in Table IV. The results indicate that using mono camera images and deep learning techniques can provide results which are comparable to stereo matching techniques. As shown in Table IV, the mono camera DNN method was able to provide depth maps similar to the stereo matching methods, represented by PSNR, MSE, MAE, RMSE and SNR. TABLE IV. NUMERICAL COMPARISON BETWEEN STEREO MATCHING AND THE PROPOSED MONO CAMERA MODEL Stereo Matching [24] Mono Camera DNN PSNR 14.8234 14.3424 MSE 0.0351 0.0382 RMSE 0.1845 0.1937 SNR 4.8836 4.4026 MAE 0.1017 0.1107 SSIM 0.9966 0.9959 UQI 0.9353 0.9234 PCC 0.823 0.7687 13 Calculation Time Comparison (logarithmic scale) 2 1 0 M es h P A Ste MS PA re C P- oE [1 St xt 0] er [9 eo ] M C [ M -CN N 10 T ] C -C N- DE N ac [ N +R rt [ 11] M 1 C C SN BS 6] N N P-R [17 _L S ] M ay M C o -C ut [10 N [1 ] N 0 -fs ] t[ 1 LP 6] M U es M [1 SO hS DP 0] U tere [13 4P o ] -n [9 et ] [1 0 I G NT ] C S SV [1 R 2] [ JM 10] R LC [10 TM U ] A [10 P ] [1 Pr S op PS 8] os [ ed ID 10] M R[ et 1 ho 9] d log10(Time/MP (s)) 3 Methods Figure 25. Comparison of computational time in logarithmic scale Having close values for SSIM (0.9966 and 0.9959 in the range [0,1]) and UQI (0.9353 and 0.9234 in the range [0,1]) shows how the mono camera DNN method is able to preserve the structural information, as compared to the Stereo Matching method. D. Comparing Running Times In this section the computational time of the proposed method is compared against the stereo matching methods provided in Table I. The evaluations indicate that the proposed method is able to perform at a rate of ~1.23 sec/MP on a desktop computer equipped with i7 2600 CPU @ 3.4 GHz and 16GB of RAM. Fig. 25 shows the comparison of the computational times. The comparison is done in a logarithmic scale due to the large range of computational times between different methods. IV. CONCLUSION AND DISCUSSION In this paper we have introduced the use of the Semi Parallel Deep Neural Networks (SPDNN) method. An SPDNN is a semi-parallel network topology developed using a graph theory optimization of a set of independently optimized CNNs, each targeted at a specific aspect of the more general classification problem. For depth estimation from a monocular set up, a model including fully-connected topology optimized for fine features is combined with a series of max-pooled topologies. The optimized SPDNN topology is re-trained on the full training dataset and converges to an improved set of network weights. Here we used this design strategy to train an accurate model for estimating depth from monocular images. In this work, 8 different deep neural networks have been mixed and merged using the SPDNN method in order to take advantage of each network’s qualities. The mixed network architecture was then trained in four separate scenarios wherein each scenario uses a different set of inputs and targets during training. Four distinct models have been trained. The pixel-wise segmentation and depth estimations given in [24] were used to provide samples for use in the training stage. The KITTI benchmark was used for training and experimental purposes. Each model was evaluated in two sections, first against the ground truth provided by the benchmark, and secondly against the disparity maps computed by the stereo matching method (section 3.1 and 3.2). The results show that using the postprocessed depth map presented in [24] for training the network results in more precise models, and adding the semantic segmentation of the input frame to the input helps the network preserve the structural information in the output depth map. The results in section 3.2 show how close the proposed depth estimation using mono camera can be to the stereo matching method. The semantic segmentation information helps the network converge to the stereo matching results, although the improvement is marginal in this case. The results of the third comparisons in section 3.3 show a slightly higher accuracy obtained by employing the stereo matching technique, but our results demonstrate that there is not a big difference between the depths from the models trained by proposed DNN and the values computed by stereo matching. The numerical results for this evaluation show the similarity between the mono camera using DNN method and the stereo matching method, and also the power of the presented method in preserving the structural information in the output depth map. An important advantage of these models is the processing time of ~1.23 sec/MP. This is equal to 38 fps for an input image of size (80×264) on an i7 2600 CPU @ 3.4 GHz and 16GB of RAM. This makes the model suitable for providing depth estimation in real time. This performance is comparable to the stereo methods MC-CNN-fst [16] and JMR [10], which are 37 fps and 4 fps respectively for the same size of image, taking advantage of GPU computation power (NVIDIA GTX TITAN X and GTX 980 respectively). The IDR method [19] can give up to 131 fps for the same image size by using an NVIDIA GeForce TITAN Black GPU and CUDA C++ implementation, but the performance on CPU is not given by the authors, so any comparisons with this method would be unfair. Using pixel-wise segmentation as one of the inputs of the network slightly increased the accuracy of the models, and also helped the model preserve the structural details of the input image. However, it also brought some artefacts, such as wrong depth patches on the surfaces. The evaluation results also illustrate the higher accuracy of the models where a postprocessed depth map was used as the target in the training procedure. A. Future Works and Improvements The model presented in this work is still a big model to implement in low power consumer electronic devices (e.g., hand held devices). Future work will include a smaller design which is able to perform as well as the presented model. The other consideration for the current method is the training data size (which is always the biggest consideration with deep learning approaches). The amount of stereo data available in the databases is usually not big enough to train a deep neural network. The augmentation techniques can help to expand databases, but the amount of extra information they provide is limited. Providing a larger set with accurate depth maps will improve the results significantly. The SPDNN approach is currently being to other problems and is giving promising results on both classification and regression problems. Those results will be presented in future publications. 14 REFERENCE [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] M. Weber, M. Humenberger, and W. Kubinger, "A very fast census-based stereo matching implementation on a graphics processing unit," in 2009 IEEE 12th International Conference on Computer Vision Workshops, ICCV Workshops, 2009, pp. 786793. B. Freedman, A. Shpunt, M. Machline, and Y. Arieli, "Depth mapping using projected patterns," ed: Google Patents, 2013. A. Govari, A. C. Altmann, Y. Ephrath, and V. Gliner, "Tissue depth estimation using gated ultrasound and force measurements," ed: Google Patents, 2016. D. Nair. (Aug 24, 2016). 3D Imaging with NI LabVIEW. Available: http://www.ni.com/white-paper/14103/en/ C. Niclass, M. Soga, H. Matsubara, and S. Kato, "A 100m-Range 10-Frame/s 340×96-Pixel Time-of-Flight Depth Sensor in 0.18-μm CMOS," in ESSCIRC (ESSCIRC), 2011 Proceedings of the, 2011, pp. 107-110. C. Niclass, K. Ito, M. Soga, H. Matsubara, I. Aoyagi, S. Kato, et al., "Design and characterization of a 256x64-pixel single-photon imager in CMOS for a MEMS-based laser scanning time-of-flight sensor," Optics Express, vol. 20, pp. 11863-11881, 2012/05/21 2012. D. Scharstein and R. Szeliski, "High-accuracy stereo depth maps using structured light," in Computer Vision and Pattern Recognition, 2003. Proceedings. 2003 IEEE Computer Society Conference on, 2003, pp. I-195-I-202 vol.1. R. K. Gupta and S.-Y. Cho, "A Correlation-Based Approach for Real-Time Stereo Matching," in Advances in Visual Computing: 6th International Symposium, ISVC 2010, Las Vegas, NV, USA, November 29 – December 1, 2010, Proceedings, Part II, G. Bebis, R. Boyle, B. Parvin, D. Koracin, R. Chung, R. Hammound, et al., Eds., ed Berlin, Heidelberg: Springer Berlin Heidelberg, 2010, pp. 129-138. C. Zhang, Z. Li, Y. Cheng, R. Cai, H. Chao, and Y. Rui, "MeshStereo: A Global Stereo Model with Mesh Alignment Regularization for View Interpolation," in 2015 IEEE International Conference on Computer Vision (ICCV), 2015, pp. 2057-2065. Middlebury Stereo Evaluation - Version 3. Available: http://vision.middlebury.edu/stereo/eval3/ K. R. Kim and C. S. Kim, "Adaptive smoothness constraints for efficient stereo matching using texture and edge information," in 2016 IEEE International Conference on Image Processing (ICIP), 2016, pp. 3429-3433. X. Huang, Y. Zhang, and Z. Yue, "Image-Guided Non-Local Dense Matching with Three-Steps Optimization," ISPRS Ann. Photogramm. Remote Sens. Spatial Inf. Sci., vol. III-3, pp. 67-74, 2016. A. Li, D. Chen, Y. Liu, and Z. Yuan, "Coordinating Multiple Disparity Proposals for Stereo Computation," in IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, USA, 2016, pp. 4022-4030. M. Shahbazi, G. Sohn, J. Théau, and P. Ménard, "Revisiting Intrinsic Curves for Efficient Dense Stereo Matching," ISPRS Ann. Photogramm. Remote Sens. Spatial Inf. Sci., vol. III-3, pp. 123130, 2016. B. Yegnanarayana, Artificial neural networks: PHI Learning Pvt. Ltd., 2009. J. Žbontar and Y. LeCun, "Stereo matching by training a convolutional neural network to compare image patches," J. Mach. Learn. Res., vol. 17, pp. 2287-2318, 2016. J. T. Barron and B. Poole, "The Fast Bilateral Solver," arXiv:1511.03296, vol. abs/1511.03296, 2016. E. T. Psota, J. Kowalczuk, M. Mittek, P. L. C, and rez, "MAP Disparity Estimation Using Hidden Markov Trees," in 2015 IEEE International Conference on Computer Vision (ICCV), 2015, pp. 2219-2227. J. Kowalczuk, E. T. Psota, and L. C. Perez, "Real-Time Stereo Matching on CUDA Using an Iterative Refinement Method for Adaptive Support-Weight Correspondences," IEEE Transactions on Circuits and Systems for Video Technology, vol. 23, pp. 94-104, 2013. N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov, "Dropout: a simple way to prevent neural networks [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] from overfitting," J. Mach. Learn. Res., vol. 15, pp. 1929-1958, 2014. S. Ioffe and C. Szegedy, "Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift," arXiv:1502.03167, vol. abs/1502.03167, 2015. F. Liu, C. Shen, G. Lin, and I. Reid, "Learning Depth from Single Monocular Images Using Deep Convolutional Neural Fields," IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 38, pp. 2024-2039, 2016. A. Saxena, J. Schulte, and A. Y. Ng, "Depth estimation using monocular and stereo cues," in Proceedings of the 20th international joint conference on Artifical intelligence, Hyderabad, India, 2007, pp. 2197-2203. H. Javidnia and P. Corcoran, "A Depth Map Post-Processing Approach Based on Adaptive Random Walk With Restart," IEEE Access, vol. 4, pp. 5509-5519, 2016. C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, et al., "Going deeper with convolutions," in Proceedings of the IEEE conference on computer vision and pattern recognition, 2015, pp. 1-9. M. Menze and A. Geiger, "Object scene flow for autonomous vehicles," in 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2015, pp. 3061-3070. V. Badrinarayanan, A. Kendall, and R. Cipolla, " SegNet: A Deep Convolutional Encoder-Decoder Architecture for Image Segmentation," arXiv:1511.00561, vol. abs/1511.00561, 2015. A. Kendall, V. Badrinarayanan, and R. Cipolla, "Bayesian segnet: Model uncertainty in deep convolutional encoder-decoder architectures for scene understanding," arXiv preprint arXiv:1511.02680, 2015. A. Kendall, V. Badrinarayanan, and R. Cipolla. Caffe Implementation of SegNet. Available: https://github.com/alexgkendall/caffe-segnet G. J. Brostow, J. Shotton, J. Fauqueur, and R. Cipolla, "Segmentation and Recognition Using Structure from Motion Point Clouds," in Computer Vision – ECCV 2008: 10th European Conference on Computer Vision, Marseille, France, October 1218, 2008, Proceedings, Part I, D. Forsyth, P. Torr, and A. Zisserman, Eds., ed Berlin, Heidelberg: Springer Berlin Heidelberg, 2008, pp. 44-57. S. Lee, J. H. Lee, J. Lim, and I. H. Suh, "Robust stereo matching using adaptive random walk with restart algorithm," Image and Vision Computing, vol. 37, pp. 1-11, 2015/05/01/ 2015. I. Sutskever, J. Martens, G. E. Dahl, and G. E. Hinton, "On the importance of initialization and momentum in deep learning," ICML (3), vol. 28, pp. 1139-1147, 2013. W. Zhou, A. C. Bovik, H. R. Sheikh, and E. P. Simoncelli, "Image quality assessment: from error visibility to structural similarity," IEEE Transactions on Image Processing, vol. 13, pp. 600-612, 2004. W. Zhou and A. C. Bovik, "A universal image quality index," IEEE Signal Processing Letters, vol. 9, pp. 81-84, 2002. K. Pearson, "Note on regression and inheritance in the case of two parents," Proceedings of the Royal Society of London, vol. 58, pp. 240-242, 1895. J. Kopf, M. F. Cohen, D. Lischinski, and M. Uyttendaele, "Joint bilateral upsampling," ACM Trans. Graph., vol. 26, p. 96, 2007.
1cs.CV
DeepSentiBank: Visual Sentiment Concept Classification with Deep Convolutional Neural Networks Tao Chen1 , Damian Borth2 , Trevor Darrell2 and Shih-Fu Chang1 1 arXiv:1410.8586v1 [cs.CV] 30 Oct 2014 1 Columbia University, USA {taochen,sfchang}@ee.columbia.edu ABSTRACT This paper introduces a visual sentiment concept classification method based on deep convolutional neural networks (CNNs). The visual sentiment concepts are adjective noun pairs (ANPs) automatically discovered from the tags of web photos, and can be utilized as effective statistical cues for detecting emotions depicted in the images. Nearly one million Flickr images tagged with these ANPs are downloaded to train the classifiers of the concepts. We adopt the popular model of deep convolutional neural networks which recently shows great performance improvement on classifying largescale web-based image dataset such as ImageNet. Our deep CNNs model is trained based on Caffe, a newly developed deep learning framework. To deal with the biased training data which only contains images with strong sentiment and to prevent overfitting, we initialize the model with the model weights trained from ImageNet. Performance evaluation shows the newly trained deep CNNs model SentiBank 2.0 (or called DeepSentiBank) is significantly improved in both annotation accuracy and retrieval performance, compared to its predecessors which mainly use binary SVM classification models. Categories and Subject Descriptors H.3.3 [Information Storage and Retrieval]: Information Retrieval and Indexing Keywords deep learning, visual sentiment, affective computing 1. INTRODUCTION The explosive growth of social media and online visual content has motivated the research on large-scale social multimedia analysis. Among these research efforts, understanding the emotion and sentiment in visual media content has attracted increasing attention in research and practical applications.. Images and videos depicting strong sentiments can strengthen the opinion conveyed in the content and more effectively influence the audience. Understanding sentiment expressed in visual content will greatly benefit social media communication and enable broad applications in education, advertisement and entertainment. Modeling generic visual concepts (nouns) such as “sky” and “dog” has been studied extensively in computer vision, but modeling adjectives correlated with visual sentiments like “amazing” and “shy” remains difficult, if not impossible, due to the big “affective gap” between the low-level 2 2 University of California, Berkeley, CA {borth@icsi,trevor@eecs}.berkeley.edu visual features and the high-level sentiment. Therefore, Borth et al. [1] proposed a more tractable approach which models sentiment related visual concepts as a mid-level representation to fill the gap. Those concepts are Adjective Noun Pairs (ANPs), such as “happy dog” and “beautiful sky”, which combine the sentimental strength of adjectives and detectability of nouns. Though these ANP concepts do not directly express emotions or sentiments, they were discovered based on strong co-occurrence relationships with emotion tags of web photos, and thus are useful as effective statistical cues for detecting emotions depicted in the images. In [1] binary SVM classifiers of the ANPs are trained on the whole images, denoted as SentiBank 1.1. Later Chen et al. [2] improve these classifiers by considering object-based concept localization and leveraging semantic similarity among the concepts. The dataset for training the visual sentiment concepts involves thousands of categories consisting of about one million images downloaded from Flickr. Recently, Krizhevsky et al. [18] show deep convolutional neural networks (CNNs) is able to achieve great classification performance improvement and efficiency on similar datasets such as ImageNet [4]. The model has a much larger learning capacity that can be controlled by varying the network depth and breadth, compared to SVM and other learning methods. Its strong assumptions of stationarity of statistics and locality of pixel dependencies about the nature of images are also mostly correct. CNNs are also easier to train than standard feedforward neural networks with layers of similar size, since they have much fewer connections and parameters, with only slightly degraded theoretic performance. CNNs also have the capability to incorporate model weights learned from more general dataset, which can be applied to our case by transferring the model learned over ImageNet to the specialized dataset like SentiBank.. This work introduces SentiBank 2.0, or called DeepSentiBank, a visual sentiment concepts classification model which is trained under Caffe [14, 15], a GPU based deep learning framework. We adopt similar CNNs architecture used in [18] while training on the ILSVRC2012 [4] dataset. We find that initializing the model with the model weights trained from ImageNet provides much better performance that training from visual sentiments dataset alone. Performance evaluation and comparisons with its predecessors show the newly trained DeepSentiBank significantly improves the annotation accuracy in ANP classification as well as moderately improves the ANP retrieval performance. 2. 2.1 RELATED WORK Modeling Sentiment Most work on sentiment analysis so far has been based on textual information [36, 8, 32]. Sentiment models have been demonstrated to be useful in various applications including human behavior prediction [8], business [26], and political science [34]. Compared to text-based sentiment analysis, modeling sentiment based on images has been much less studied. The most relevant work is [1], which proposed to design a largescale visual sentiment ontology based on Adjective-Noun Pairs (the sentiment modeling is then based on one-vs-all SVMs). Chen et al. [2] further improve the model by considering object-based concept localization and leveraging semantic similarity among the concepts. 2.2 Modeling Visual Concepts Concept modeling has been widely studied in multimedia [25, 31], and computer vision (often referred as “attributes”) [9]. The concepts being modeled are mostly objects [31], scenes [27], or activities [10]. There is work trying to solve the “fine grained recognition” task, where the categories are usually organized in a hierarchical structure. [6, 7, 5]. There is also work trying to model “non-conventional” concepts or properties of the images, such as image aesthetic and quality [16, 22], memorability [12], interestingness [12], and affection/emotions [21, 35, 13, 21, 35, 37]. The models are usually trained by SVM and other layer lacking learning methods. 2.3 Deep Learning Deep convolutional networks have been long studied in computer vision. Successful results on digit recognition using supervised back-propagation networks have been achieved in early research[20]. More recently, similar networks are applied on large benchmark datasets consisting of more than one million images, such as ImageNet [4], with competition-winning results [18]. The learned deep representations can be transferred across tasks. It has been extensively studied in an unsupervised setting [29, 23]. However, such models in convolutional networks have been limited to relatively small datasets such as CIFAR and MNIST, and only achieved modest success in [19]. Sermanet et al. [30] propose to use unsupervised pre-training, followed by supervised fine-tuning to solve the problem of insufficient training data. Supervised pretraining approach using a concept-bank paradigm [17, 33] is also proven successful in computer vision and multimedia settings. It learns the features on large-scale data in a supervised setting, then transfers them to different tasks with different labels. Recently, Girshick et al. [11] shows that supervised pre-training on a large dataset, followed by domain-adaptive fine-tuning on smaller dataset is an efficient paradigm for scarce data. 3.1 The analysis of emotion, affect and sentiment from visual content has become an exciting area in the multimedia community allowing to build new applications for brand monitoring, advertising, and opinion mining. To create an corpora for sentiment analysis on visual content and stimulate innovative research on this challenging issue, a database is constructed by Borth et al. [1]. This database contains a Visual Sentiment Ontology (VSO) consisting of more than 3,000 adjective noun pairs (ANPs), SentiBank1 , a set of 1,200 trained visual concept detectors providing a mid-level representation of sentiment, and associated training images acquired from Flickr. Construction of the VSO is founded on psychological research by data-driven discovery - for each of the 24 emotions defined in Plutchik’s theory [28], images and videos are retrieved from Flickr and YouTube respectively to extract concurrent tags. The set of all adjectives and all nouns is then used to form ANPs such as “beautiful flowers” or “sad eyes”. SentiBank is then trained on the images tagged by these ANPs. 3.2 VISUAL SENTIMENT ONTOLOGY AND CONCEPTS OVERVIEW In this section, we briefly review the visual sentiment ontology construction in [1] and define our classification problem. Dataset The database contains a set of Flickr images for training and testing ANP classifiers in SentiBank 1.1. For each ANP, at most 1,000 images tagged with it are downloaded, resulting about one million images for 3,316 ANPs. To train the visual sentiment concept or ANP classifiers, we first filter out the ANPs associated with less than 120 images. 2,089 ANPs with 867,919 images are left after filtering. For each ANP, 20 images are randomly selected for testing, while others are used in training, ensuring at least 100 training images per ANP. To prevent bias in the test set, any training image and test image pair associated with same ANP must not share a same publisher on Flickr. The ANP tags from Flickr users are used as labels for each image. Note those labels may suffer from incompleteness and noisiness, i.e., not all true labels are annotated and sometimes there are falsely assigned labels also. However we do not fix them due to the huge amount of annotation tasks. We use the labels as is and thus will refer to them as pseudo ground truth. We also build a subset to compare the retrieval performance of different models. This subset only contains images associated with six nouns, namely “car”, “dog”, “dress”, “face”, “flower” and “food”. These nouns are not only frequently tagged in the social multimedia, but also associated with diverse adjectives to form a large set of ANPs (135 in total). Its training set is the corresponding subset of the full training set. Its test set however, contains 60 manually annotated images for each ANP, where 20 are positive and 40 are negative. The retrieval performance is evaluated by the average precision on the ranking result of the 60 test images for each ANP. For this dataset, we will compare the new DeepSentiBank with an earlier version of SentiBank using object-based localization, called SentiBank 1.5R (indicating region based SentiBank) [2]. 4. 3. Building Ontology 4.1 DEEP CONVOLUTIONAL NETWORKS SOLUTION NEURAL Introduction of Caffe 1 Version 1.1 can be downloaded from http://visual-sentiment-ontology.appspot.com/. Figure 1: The architecture of the deep convolutional neural networks. Caffe is a deep learning framework developed by taking full account of cleanliness, readability, and speed. It was created by Jia [14], and is in active development by the Berkeley Vision and Learning Center (BVLC) and by community contributors. Caffe is released under the BSD 2Clause license 2 . Using Caffe for deep learning programming has multiple advantages. Its clean architecture enables rapid deployment. Networks are specified in simple config files, with no hardcoded parameters in the code. Switching between CPU and GPU is as simple as setting a flag ĺC so models can be trained on a GPU machine, and then used on commodity clusters. 4.2 CNN Architecture Here we describe the overall architecture of the deep convolutional neural networks for training the visual sentiment concept classification model, SentiBank 2.0 or DeepSentiBank. The architecture mostly follows [18]. As depicted in Figure 1, the net contains eight main layers (conv or fc) with weights; the first five are convolutional and the other three are fully- connected. The output of the last fully-connected layer is fed to a 2089-way softmax which produces a distribution over the 2089 class labels. The network maximizes the average across training instances of the log-probability of the correct label under the prediction distribution by multinomial logistic regression. The kernels of the second, fourth, and fifth convolutional layers are connected only to half of kernel maps in the previous layer. The kernels of the third convolutional layer are connected to all kernel maps in the second layer. The neurons in the fullyconnected layers are connected to all neurons in the previous layer. Following [24], the Rectified Linear Units (ReLUs) non-linearity f (x) = max(0, x) is applied to the output of every convolutional and fully-connected layer. Overlapping max-pooling layers (pool) follow the first, second and fifth ReLU layers (relu). The pooling layer consists of a grid of pooling units spaced 2 pixels apart, each summarizing a neighborhood of size 3 × 3 centered at the location of the pooling unit. Local response normalization layers (lm) 2 http://caffe.berkeleyvision.org/ Table 1: The input/output data size (left) and the layer shape (right) for each layer. name input data conv1 pool1 norm1 conv2 pool2 norm2 conv3 conv4 conv5 pool5 fc6 fc7 fc8 label output size 3 × 256 × 256 3 × 227 × 227 96 × 55 × 55 96 × 27 × 27 96 × 27 × 27 256 × 27 × 27 256 × 13 × 13 256 × 13 × 13 384 × 13 × 13 384 × 13 × 13 256 × 13 × 13 256 × 6 × 6 4096 4096 2089 1 1 name conv1 conv2 conv3 conv4 conv5 fc6 fc7 fc8 shape 96 × 3 × 11 × 11 256 × 48 × 5 × 5 384 × 256 × 3 × 3 384 × 192 × 3 × 3 256 × 192 × 3 × 3 4096 × 9216 4096 × 4096 2089 × 4096 follow the first and second pooling layers. The responsenormalized activity bix,y is given by the expression  bix,y = aix,y / k + α min(N −1,i+n/2) X β (aix,y )2  j=max(0,i−n/2) where aix,y is the activity of a neuron computed by maxpooling, the sum runs over n “adjacent” kernel maps at the same spatial position, and N is the total number of kernels in the layer. The constants k = 2, n = 5, α = 10−4 , and β = 0.75. The dropout layers (dropout) are applied in the first two fully-connected layers. The input/output data size and the layer shape for each layer is shown in Table 1. All training and test images are first normalized to 256 × 256 without keeping the aspect ratio. To prevent overfitting, we apply data augmentation consists of generating image translations and horizontal reflections. We do this by extracting random 227 × 227 patches (and their horizontal reflections) from the 256 × 256 images and training our network on these extracted patches. The first convolutional layer filters the 227 × 227 × 3 input image with 96 kernels of size 11 × 11 × 3 with a stride of 4 pixels. The second convolutional layer takes as input the (pooled and response-normalized) output of the first convolutional layer and filters it with 256 kernels of size 5 × 5 × 48. The third, fourth, and fifth convolutional layers are connected to one another without pooling or normalization. The third convolutional layer has 384 kernels of size 3 × 3 × 256 connected to the (normalized and pooled) outputs of the second convolutional layer. The fourth convolutional layer has 384 kernels of size 3×3×192 , and the fifth convolutional layer has 256 kernels of size 3 × 3 × 192. The fully-connected layers have 4096 neurons each. 4.3 Learning Details The regression objective is minimized by stochastic gradient descent with a batch size of 256 examples, momentum of 0.9, and weight decay of 0.0005. The small weight decay here is not only a regularizer by also reduces the model’s training error. Due to insufficient data and the bias to images with strong sentiment, training on our dataset may suffer from overfitting. Since our dataset is from the same domain of ImageNet, it is promising to use fine-tuning. We initialized the weights by the model trained from ILSVRC2012 except the top layer. the pre-trained model can be downloaded from http://caffe.berkeleyvision.org/getting_ pretrained_models.html. The learning rate is initialized at 0.001. Regarding the full forward-backward pass of each batch as an iteration, we run a total of 250,000 iterations (about 77 epochs). We divide learning rate by 10 after every 100,000 iterations (about 20 epochs). For comparison, we also train a similar model without fine-tuning. We initialize the weights in each layer from a zero-mean Gaussian distribution with standard deviation 0.01. We initialize the neuron biases in the second, fourth, and fifth convolutional layers, as well as in the fullyconnected hidden layers with the constant 0.1, and in the remaining layers with the constant 0. The learning rate is initialized at 0.01. During testing, we center crop the test images into 227 × 227, apply forward propagation with the trained model weights and use the softmax as predicted probability of each concept. 5. 5.1 EXPERIMENTAL RESULTS Computation Speed Our experiment is done on a single server machine with 16-core dual Intel E5-2650L processor, 64GB memory and a nVidia K20 GPU. The training over 826,806 images takes about 9 days and testing over 41,780 test images takes about 6 minutes. The maximum memory used is 42GB, and storing data takes 300GB disk space. 5.2 Figure 2: The curves of ranked top-10 accuracy per ANP of different approaches. The curves have been smoothed. Performance and Comparisons We evaluate the new classification model by both annotation accuracy (measured by the percentage of images that have the pseudo ground truth label in top detected concepts) and retrieval performance (measured by mean average precision). 5.2.1 Annotation accuracy The annotation accuracy is evaluated on the full test set of 2,089 ANPs mentioned in Section 3.2 and measured by top-k accuracy - the percentage of images that have the pseudo ground truth label in top k detected concepts. Top1, 5, 10 accuracies of each and all ANPs are computed and compared among fine-tuned deep CNNs model (SentiBank 2.0), deep CNNs model without fine-tuning, and SentiBank 1.1 [1]. The overall accuracies are listed in Table 2. Different from genetic visual concepts, some visual sentiment concepts can be very abstract, such as “terrible crime” and “strong community”. Such ANPs usually have very low classification performance, and are meaningless to be included in the classifiers library for generating mid-level sentiment related features. Thus it is important to compare the performances of ANPs with acceptable detectability. Similar to [1], for each approach, we select top 1,200 ANPs ranked by Top10 accuracy. Note different approach will produce different ANP subsets. The overall accuracies for these subsets are also shown in Table 2. Figure 2 shows the curve of ranked top-10 accuracy per ANP for each subset. According to the table and the figure it is clear that the CNNs-based approaches greatly outperform the SVM based approach, with as much as 370% performance gain on top-1 accuracy, 200% on top-5, and 150% on top-10. Fine-tuned model is also 14~25% better than the one without fine-tuning. Figure 3 shows some examples of top detected concepts from test images by the fine-tuned model. It shows that despite the serious problem of incomplete and incorrect labels in our dataset, the top detected concepts can still be accurate. Since the pseudo ground truth labels may not be correct, thus the top-5 and top-10 accuracies are more appropriate than top-1 accuracy. We also realize an important reason for the performance boost is that the SVM based SentiBank trains binary classifiers, rather than a general multi-label classification approach. Such binary classification setting is more suitable for retrieval, instead of annotation. Thus, in the next section, we will evaluate the performance of DeepSentiBank in terms of image retrieval. 5.2.2 Retrieval performance Figure 3: Examples of top 10 concepts detected from test images by the fine-tuned DeepSentiBank model. The red concepts are the pseudo ground truth concepts. Credits of images (from top to bottom, from left to right): ©Mauricio Gelfuso, Bob Wright, fraKara, Melanie Bateman, Photographs-n-Memories, Matt Swanson, Twan Goossens, S Debras, Erin Nichols, Yael Levine, 7 Years Later... and Anda Stavri of Flickr. Figure 4: The mean AP for each and all noun categories for the subset of 135 ANPs mentioned in Section 3.2. The retrieval performance is evaluated on the subset of 135 ANPs mentioned in Section 3.2. We apply the models trained from SentiBank 1.1, 1.5R and DeepSentiBank to the test set. For each ANP, the test images are ranked by the estimated probability of the ANP. The performance is measured by average precision (AP) at top 20. The mean AP for each and all noun categories are shown in Figure 4. Although not designed for retrieval, DeepSentiBank still outperforms SentiBank 1.1 by 62.3% and SentiBank 1.5R by 8.9%. Note DeepSentiBank is only trained on whole images and does not consider concept localization or concept similarity. It means the performance could be further improved if we incorporate the two factors into deep learning. Recently, R-CNN [11] shows state-of-the-art performance on object detection, which can be a promising candidate approach for the concept localization. 6. CONCLUSION This paper presents a visual sentiment concept classification model based on deep convolutional neural networks. The deep CNNs model is trained based on Caffe, a newly developed deep learning framework. To deal with the biased training data which only contains images with strong sentiment and to prevent overfitting, we initialize the model with the model weights trained from ImageNet. Performance evaluation shows the newly trained deep CNNs model DeepSentiBank is significantly better in both annotation and retrieval, compared to previous work using independent binary SVM classification models. In the future, we will incorporate the concept localization into the deep CNNs model, and improve network structure by leveraging concept relations. The high performance boost will also help to improve applications built on SentiBank, such as assistive comment robot [3] and twitter sentiment prediction, or other applications such as sentiment-aware image editing. 7. REFERENCES [1] Damian Borth, Rongrong Ji, Tao Chen, Thomas Breuel, and Shih-Fu Chang. Large-scale visual sentiment ontology and detectors using adjective noun pairs. In Proceedings of the 21st ACM International Conference on Multimedia. ACM, 2013. [2] Tao Chen, Felix X. Yu, Jiawei Chen, Yin Cui, Yan-Ying Chen, and Shih-Fu Chang. Object-based visual sentiment concept analysis and application. In Proceedings of the 22nd ACM International Conference on Multimedia. ACM, 2014. [3] Yan-Ying Chen, Tao Chen, Winston H. Hsu, Hong-Yuan Mark Liao, and Shih-Fu Chang. Predicting viewer affective comments based on image content in social media. In Proceedings of the International Conference on Multimedia Retrieval. ACM, 2014. [4] J Deng, A Berg, S Satheesh, H Su, A Khosla, and L Fei-Fei. Large scale visual recognition challenge. www. image-net. org/challenges/LSVRC/2012, 1, 2012. Table 2: Evaluation of Different SentiBank Models in terms of Retrieval SentiBank ver. SentiBank 1.1 DeepSentiBank w/o fine-tuning DeepSentiBank Top-1 1.7075% 6.5235% 8.1629% 2,089 ANPs Top-5 Top-10 6.3211% 10.2917% 16.0095% 22.4941% 19.1132% 26.1012% [5] 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. [6] Jia Deng, Jonathan Krause, and Li Fei-Fei. Fine-grained crowdsourcing for fine-grained recognition. In Computer Vision and Pattern Recognition (CVPR), 2013 IEEE Conference on, pages 580–587. IEEE, 2013. [7] Kun Duan, Devi Parikh, David Crandall, and Kristen Grauman. Discovering localized attributes for fine-grained recognition. In Computer Vision and Pattern Recognition. IEEE, 2012. [8] Andrea Esuli and Fabrizio Sebastiani. SentiWordNet: A publicly available lexical resource for opinion mining. In Proceedings of the Conference on Language Resources and Evaluation, volume 6, 2006. [9] V. Ferrari and A. Zisserman. Learning visual attributes. In Neural Information Processing Systems, 2007. [10] Yanwei Fu, Timothy M Hospedales, Tao Xiang, and Shaogang Gong. Attribute learning for understanding unstructured social activity. In European Conference on Computer Vision. Springer, 2012. [11] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In IEEE CVPR, 2014. [12] P. Isola, J. Xiao, A. Torralba, and A. Oliva. What makes an image memorable? In Computer Vision and Pattern Recognition, 2011. [13] Jia Jia, Sen Wu, Xiaohui Wang, Peiyun Hu, Lianhong Cai, and Jie Tang. Can we understand van Gogh’s mood?: Learning to infer affects from images in social networks. In Proceedings of the 20th ACM international conference on Multimedia, pages 857–860. ACM, 2012. [14] Yangqing Jia. Caffe: An open source convolutional architecture for fast feature embedding. Available from http://caffe.berkeleyvision.org/, 2013. [15] Yangqing Jia, Evan Shelhamer, Jeff Donahue, Sergey Karayev, Jonathan Long, Ross Girshick, Sergio Guadarrama, and Trevor Darrell. Caffe: Convolutional architecture for fast feature embedding. In Proceedings of the 22nd ACM International Conference on Multimedia. ACM, 2014. [16] Dhiraj Joshi, Ritendra Datta, Elena Fedorovskaya, Quang-Tuan Luong, James Z Wang, Jia Li, and Jiebo Luo. Aesthetics and emotions in images. Signal Processing Magazine, IEEE, 28(5):94–115, 2011. [17] Lyndon Kennedy and Alexander Hauptmann. Lscom lexicon definitions and annotations (version 1.0). 2006. Top-1 3.0386% 11.4430% 14.3572% 1,200 ANPs Top-5 Top-10 11.4288% 18.7356% 28.4856% 39.0800% 33.3726% 44.3664% [18] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. Imagenet classification with deep convolutional neural networks. In F. Pereira, C.J.C. Burges, L. Bottou, and K.Q. Weinberger, editors, Advances in Neural Information Processing Systems 25, pages 1097–1105. Curran Associates, Inc., 2012. [19] Quoc V Le. Building high-level features using large scale unsupervised learning. In Acoustics, Speech and Signal Processing (ICASSP), 2013 IEEE International Conference on, pages 8595–8598. IEEE, 2013. [20] Yann LeCun, Bernhard Boser, John S Denker, Donnie Henderson, Richard E Howard, Wayne Hubbard, and Lawrence D Jackel. Backpropagation applied to handwritten zip code recognition. Neural computation, 1(4):541–551, 1989. [21] J. Machajdik and A. Hanbury. Affective image classification using features inspired by psychology and art theory. In Proceedings of ACM Multimedia, pages 83–92, 2010. [22] L. Marchesotti, F. Perronnin, D. Larlus, and G. Csurka. Assessing the aesthetic quality of photographs using generic image descriptors. In Proceedings of the International Conference on Computer Vision, 2011. [23] Grégoire Mesnil, Yann Dauphin, Xavier Glorot, Salah Rifai, Yoshua Bengio, Ian J Goodfellow, Erick Lavoie, Xavier Muller, Guillaume Desjardins, David Warde-Farley, et al. Unsupervised and transfer learning challenge: a deep learning approach. In ICML Unsupervised and Transfer Learning, pages 97–110, 2012. [24] Vinod Nair and Geoffrey 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. [25] M. Naphade, J. Smith, J. Tesic, S.-F. Chang, W. Hsu, L. Kennedy, A. Hauptmann, and Curtis J. Large-scale concept ontology for multimedia. In IEEE Multimedia, 2006. [26] Bo Pang and Lillian Lee. Opinion mining and sentiment analysis. Information Retrieval, 2(1-2):1–135, 2008. [27] Genevieve Patterson and James Hays. Sun attribute database: Discovering, annotating, and recognizing scene attributes. In Computer Vision and Pattern Recognition. IEEE, 2012. [28] Robert Plutchik. Emotion: A Psychoevolutionary Synthesis. Harper & Row, Publishers, 1980. [29] Rajat Raina, Alexis Battle, Honglak Lee, Benjamin Packer, and Andrew Y Ng. Self-taught learning: transfer learning from unlabeled data. In Proceedings [30] [31] [32] [33] [34] [35] [36] [37] of the 24th international conference on Machine learning, pages 759–766. ACM, 2007. Pierre Sermanet, Koray Kavukcuoglu, Soumith Chintala, and Yann LeCun. Pedestrian detection with unsupervised multi-stage feature learning. In Computer Vision and Pattern Recognition (CVPR), 2013 IEEE Conference on, pages 3626–3633. IEEE, 2013. J.R. Smith, M. Naphade, and A. Natsev. Multimedia semantic indexing using model vectors. In International Conference on Multimedia and Expo, 2003. Mike Thelwall, Kevan Buckley, Georgios Paltoglou, Di Cai, and Arvid Kappas. Sentiment strength detection in short informal text. Journal of the American Society for Information Science and Technology, 61(12):2544–2558, 2010. Lorenzo Torresani, Martin Szummer, and Andrew Fitzgibbon. Efficient object category recognition using classemes. In Computer Vision–ECCV 2010, pages 776–789. Springer, 2010. Andranik Tumasjan, Timm O Sprenger, Philipp G Sandner, and Isabell M Welpe. Predicting elections with Twitter: What 140 characters reveal about political sentiment. In Proceedings of the 4th International AAAI Conference on Weblogs and Social Media, 2010. Weining Wang and Qianhua He. A survey on emotional semantic image retrieval. In Image Processing, 2008. ICIP 2008. 15th IEEE International Conference on, pages 117–120. IEEE, 2008. Theresa Wilson, Janyce Wiebe, and Paul Hoffmann. Recognizing contextual polarity in phrase-level sentiment analysis. In Proceedings of the Conference on Human Language Technology and Empirical Methods in Natural Language Processing, 2005. V. Yanulevskaya, J. van Gemert, K. Roth, A. Herbold, N. Sebe, and J.M. Geusebroek. Emotional valence categorization using holistic image features. In Proceedings of the IEEE International Conference on Image Processing, pages 101–104, 2008.
9cs.NE
A Compressive Sensing Approach to Community Detection with Applications Ming-Jun Lai∗ Daniel Mckenzie † arXiv:1708.09477v2 [cs.IT] 22 Sep 2017 September 25, 2017 Abstract The community detection problem for graphs asks one to partition the n vertices V of a graph G into k communities, or clusters, such that there are many intracluster edges and few intercluster edges. Of course this is equivalent to finding a permutation matrix P such that, if A denotes the adjacency matrix of G, then PAP> is approximately block diagonal. As there are k n possible partitions of n vertices into k subsets, directly determining the optimal clustering is clearly infeasible. Instead one seeks to solve a more tractable approximation to the clustering problem. In this paper we reformulate the community detection problem via sparse solution of a linear system associated with the Laplacian of a graph G and then develop a two-stage approach based on a thresholding technique and a compressive sensing algorithm to find a sparse solution which corresponds to the community containing a vertex of interest in G. Crucially, our approach results in an algorithm which is able to find a single cluster of size n0 in O(n ln(n)n0 ) operations and all k clusters in fewer than O(n2 ln(n)) operations. This is a marked improvement over the classic spectral clustering algorithm, which is unable to find a single cluster at a time and takes approximately O(n3 ) operations to find all k clusters. Moreover, we are able to provide robust guarantees of success for the case where G is drawn at random from the Stochastic Block Model, a popular model for graphs with clusters. Extensive numerical results are also provided, showing the efficacy of our algorithm on both synthetic and real-world data sets. 1 Introduction The clustering problem for a graph G = (V, E) is to divide the vertex set V into subsets V = C1 ∪ . . . ∪ Ck such that there are many intracluster edges (edges between vertices in the same cluster) and few intercluster edges (edges between vertices in different clusters) in E. This is a widely studied problem in exploratory data analysis, as one can reasonably assume that vertices in the same cluster a ‘similar’, in some sense. We refer the reader to the survey article [20] for further details and a thorough overview of existing algorithmic approaches. We note that [20] refers to the clustering problem as the community detection problem, and we shall use these two phrases interchangeably. As is well-known, detecting clusters in G is equivalent to finding a permutation matrix P such that if A is the adjacency matrix of G, then PAP> is almost block diagonal. Thus, we can think of the clustering problem as a special case of the matrix reduction problem where the matrix in question has binary entries. ∗ [email protected]. Department of Mathematics, University of Georgia, Athens, GA 30602. This research is partially supported by the National Science Foundation under the grant #DMS 1521537. † [email protected]. Department of Mathematics, University of Georgia, Athens, GA 30602. The second author gratefully acknowledges the financial support of the NRF of South Africa while this research was conducted 1 One class of robust and accurate algorithms used to solve the clustering problem are the spectral algorithms. Loosely, they work as follows. Suppose that |V | = n and let L denote the graph Laplacian, while 1Ca denotes the indicator vector of the a-th cluster (both to be defined in §3). Suppose further that it is known a priori that G has k clusters. Let v1 , . . . , vk be orthogonal eigenvectors associated to the k smallest eigenvalues of L, and consider the subspace span{v1 , . . . , vk } ⊂ Rn . One can show that, under certain conditions, this subspace is ‘close’ to span{1C1 , . . . , 1Ck } and hence one can use the basis {v1 , . . . , vk } to infer the supports of the basis {1C1 , . . . , 1Ck } , thus determining the clusters C1 , . . . , Ck (of course supp(1Ca ) = Ca ). We refer the reader to [41], [35] or [37] for details. Despite its theoretical and experimental success,the spectral approach has three main drawbacks: 1. The number of clusters k, needs to be known a priori. Clearly this is not always the case for real data sets. 2. The algorithm cannot be used to find only a few clusters. As in many applications one is only interested in finding one or two clusters ( thinking of the problem of identifying friends or associates of a given user from a social network data set). Moreover in other cases where the data set is extremely large, or only partially known, it might be computationally infeasible to identify all clusters. 3. Computing an eigen decomposition of L typically requires O(n3 ) operations, making spectral methods prohibitively slow for truly large data sets, such as those arising from electronic social networks like Facebook or LinkedIn, or those arising from problems in Machine Learning. However, in many situations (the social network example being one such case), the expected size of the clusters, n0 , is small compared to n, and hence the indicator vectors 1Ca will be sparse. Our approach is to adapt sparse recovery algorithms from the compressive sensing study to solve the following problem: arg min ||Lx||2 : subject to xi = 1 and ||x||0 ≤ n0 (1.1) to determine, directly, an approximation to the indicator vector of the cluster containing the vertex of interest vi . One can then recover the cluster by considering the support of this vector. If desired, one can iterate the algorithm to find all the remaining clusters of G. Adapting compressive sensing algorithms to solve (1.1) proves challenging, as L is a poorly conditioned sensing matrix. In general, a greedy type algorithm such as orthogonal matching pursuit or iterative hard thresholding (cf. [21]) work very well when there are no intercluster edges (in this case finding clusters reduces to finding connected components). Unfortunately, in the presence of even a small number of intercluster edges, the first few iterations of a greedy algorithm are likely to pick some indices outside the desired cluster. To overcome this difficulty, we propose a novel two stage algorithm (see Algorithm 4 in §8) in which the first stage identifies a subset Ω ⊂ V which contains the cluster of interest with high probability. The second stage then extracts the cluster of interest from Ω using a greedy algorithm (we use Subspace Pursuit cf. [14]). In addition to the aforementioned algorithm, the main contributions of this paper are the following: 1. An analysis of the Restricted Isometry and Coherence properties of the graph Laplacian. In particular, we provide a series of probabilistic bounds on the restricted isometry constants and coherence of Laplacians of graphs drawn from a well-studied model of random graphs (the Stochastic Block Model (SBM)). See §5 and §6. 2. A proof that the Optimal Matching Pursuit (OMP) algorithm can be successfully used to detect connected components of any graph, by solving (1.1) (see §7.) 2 3. A proof that, given a vertex vi , our Single Cluster Pursuit (SCP) Algorithm 4 successfully finds the cluster containing vi when G is drawn from the Stochastic Block Model (SBM), for a certain range of parameters and with probability tending to 1 as n → ∞. We achieve this by combining the bounds of contribution with the theory of totally perturbed compressive sensing, e.g. in [28]. 4. An analysis of the computational complexity of Algorithm 4, showing that it finds a single cluster in O(n2 + ln(n)nn0 ) time and all clusters in O(kn2 + ln(n)n2 ) time. The structure of this paper is as follows. After briefly reviewing related work in §2, in §3 and §4 we acquaint the reader with the necessary concepts from spectral graph theory and compressive sensing, respectively. In §5 and §6 we study the restricted isometry property and coherence property of Laplacians of random graphs. In §7 and §8, we describe two algorithms to handle graphs from the Stochastic Block Model G(n, k, p, q) for q = 0 and q > 0, with respectively. We shall show that, under certain mild assumptions on the graph G, the algorithms will indeed find the correct clustering with high probability. §9 contains the computational complexity analysis, some possible extensions and several future research directions. Finally, in §10 we present the results of several numerical experiments to demonstrate the accuracy and speed of our algorithm and its powerful performance. 2 Related Work The notion of community detection in graphs arises independently in multiple fields of applied science, such as Sociology ([47],[40]), Computer Engineering ([26]), Machine Learning ([43]) and Bioinformatics ([13]). In addition, many data sets can be represented as graphs by considering data points as vertices and attaching edges between vertices that are ‘close’ with respect to an appropriate metric. Thus, community detection algorithms can also be used to detect clusters in general data sets, and indeed they have been shown to be superior to other clustering algorithms (for example k-means) at detecting non-convex clusters ([30]). The canonical probabilistic model of a graph containing communities is the Stochastic Block Model (SBM), first explicitly introduced in the literature in the early 1980’s by Holland, Laskey, and Leinhardt in [29]. Since then, there has been an explosion of interest in the SBM, driven in large part by its many applications. In [1], Abbe identifies three forms of the community detection problem, based on the kind of asymptotic accuracy we require (here, as in the rest of the paper, when we speak of asymptotics we are considering the situation where the number of vertices, n, goes to ∞). In this paper we shall be concerned with the Exact Recovery Problem, where we require that P (#misclassified vertices > 0) = o(1). A fundamental information theoretic barrier to exact recovery is given by the following result (cf. [3]): Theorem 2.1. The exact recovery problem , i.e. P (#misclassified vertices > 0) = o(1) with respect to n for the symmetric SBM G(n, k, p, q) is solvable in polynomial time if, writing p = P ln(n)/n and q = Q ln(n)/n: p  1 √ P − Q >1 (2.1) k and not solvable if: p  1 √ P − Q <1 (2.2) k Remark 2.2. This result was proved in [3] (and see also [1]). We note that in the cases our algorithm is guaranteed to solve the exact recovery problem (see Theorem 8.2), we assume that √ √  1 P − Q → ∞, well above this theoretical bound. k 3 Given the bound (2.1), the challenge then is to construct efficient algorithms to solve the Exact Recovery Problem. There are myriad algorithmic approaches, such as the spectral approach (originally proposed by Fiedler in [19] for the two cluster case), hierarchical approaches like the DIANA algorithm popular in bioinformatics ([31]) and message passing algorithms ([24]), to name a few. Recently, two new classes of algorithms, namely degree-profiling ([3]) and semidefinite progamming approaches ([2], [36], [27] and [33] among others) have been shown to solve the exact recovery problem with high probability right down to the theoretical bound (2.1). Degree-profiling even runs in quasi-linear time, although it requires the parameters p, q and k as inputs, making it less than ideal for analysing real world data sets. As the new algorithm we propose is most closely related to the spectral approach, let us recall this algorithm here (as formulated by Ng, Jordan and Weiss in [41]). Algorithm 1 The Spectral Clustering Algorithm (SC) Input: the adjacency matrix A. (1) Form the degree matrix D = diag (d1 , . . . , dn ) and Laplacian L := D−1/2 AD−1/2 (2) Find the k (orthogonal) eigenvectors v1 , . . . , vk corresponding to the k largest eigenvalues of L. (3) Form the matrix U = [v1 , . . . , vk ] and normalize the rows to get V (4) Sort the rows of V into k clusters B1 , . . . , Bk using k-means. (5) Assign vertex i to community Cj if and only if row i is in Bj . Output: Communities C1 , . . . , Ck . We mention that notions from Compressive Sensing have been applied to community detection before, notably in the semidefinite programming approaches mentioned above, and in [45] where signal processing techniques for functions defined on a graph G are used to speed up the computation of the eigenvectors of L. Our approach is distinct from these. To the best of the authors’ knowledge, the study in this paper is the first attempt to find the indicator vectors 1Ci directly using sparse recovery. 3 Preliminary on Graph Theory 3.1 Some Elementary Notions and Definitions Formally, by a graph G we mean a set of vertices V together with a subset E ⊂ {{u, v} : u, v ∈ V } of edges1 . As we are only concerned with finite graphs, we shall always identify the vertex set V with a finite set of consecutive natural numbers: V = [n] := {1, 2, . . . , n}. The degree of any vertex i ∈ G is the total number of edges incident to i, that is di = |{{i, j} ∈ E}|. 0 0 0 0 0 A subgraph G of G is a subset of vertices V ⊂ V together with a subset of vertices E ⊂ E ∩ V × V . Given any subset S ⊂ V , we denote by GS the subgraph with vertex set S and edge set all edges {i, j} with i, j ∈ S. A path in G is a set of ‘linked’ edges {{i1 , i2 }, {i2 , i3 }, . . . , {ik−1 , ik }, and we say that G is connected if there is a path linking any two vertices i, j ∈ V , and disconnected otherwise. If G is disconnected, any subgraph GS ⊂ G which is connected and maximal with respect to the property of being connected is called a connected component. If G is connected, we define the diameter of G to be the length of (i.e. the number of edges in) the longest path. Given any i ∈ V and any non-negative integer j, we define the ball Bj (i) ⊂ V to be the set of all vertices connected to i be a path of length j or shorter. A good reference on elementary graph theory is [5]. 1 We only consider undirected graphs 4 3.2 The Graph Laplacian To any graph G with |V | = n we associate a symmetric, n × n, non-negative matrix called the adjacency matrix A, defined as Aij = Aji = 1 if {i, j} ∈ E and Aij = 0 otherwise. The graph Laplacians of G are defined as follows. Definition 3.1. Let A denote the adjacency matrix of a graph G and let D denote the matrix diag(d1 , . . . , dn ) where di is the degree of the i-th vertex. We define the normalized, symmetric graph Laplacian of G as Ls := I − D−1/2 AD−1/2 and the normalized, random walk graph Laplacian as Lrw := I − D−1 A. We first have a few basic properties of graph Laplacians. Theorem 3.2. Suppose that L = Ls or Lrw . We have the following properties: 1. The eigenvalues of L are real and non-negative. 2. λn−1 ≤ 2 3. Let λ1 ≤ λ2 ≤ . . . ≤ λn denote the eigenvalues of L in ascending order. Let k denote the number of connected components of G. Then λi = 0 for i ≤ k and λi > 0 for i > k. Proof. For L = Ls , Items 1 to 3 follow from Lemma 1.7 in [12]. If L = Lrw , observe that Lrw = D−1/2 Ls D1/2 , and so the eigenvalues of Lrw and Ls coincide. Hence the above hold for Lrw as well.  n For any subset S ⊂ [n] we define its indicator vector, denoted 1S ∈ R , by (1S )i = 1 if i ∈ S and zero otherwise. Let C1 , · · · , Ck be the clusters of G. One can check (and see also [35] proposition 2) that Lrw 1Ci = 0 for i = 1, · · · , k. Thus we have the following: Theorem 3.3. The indicator vectors of the connected components of G, 1C1 , . . . , 1Ck , form a basis for the zero eigenspace (i.e. the kernel) of Lrw . For the rest of this paper, by L we shall mean Lrw . We shall refer to the i-th column of L as `i . One can easily check that: Aik (`i )k = δik − . dk Finally, we shall denote by L−i the submatrix of L obtained by dropping the column `i . 3.3 Random Graph Theory As outlined in §2, the Stochastic Block Model (SBM) is a widely used mathematical model of a random graph with clusters. Definition 3.4. Given n = kn0 , fix a partition of V := [n] into k subsets C1 , . . . , Ck of equal size n0 . We say G is drawn from the SBM G(n, k, p, q) if, for all i, j ∈ [n] with i 6= j , the edge {i, j} is inserted independently and with probability p if i, j ∈ Ca for some a = 1, · · · , k and q otherwise. As we area interested in clustering we assume that q << p. We emphasize that the partition V = C1 ∪C2 ∪. . .∪Ck is fixed before any edges are assigned. We note that the subgraphs GCa are i.i.d instances of a simpler random graph model, the Erdös-Rényi (ER) model G(n0 , p), first introduced in [18] Definition 3.5. We say H is drawn from the ER model G(n0 , p) if H has n0 vertices and for all i, j ∈ [n0 ] the edge {i, j} is inserted independently and with probability p. 5 Returning to the SBM, for any vertex i in community Ca , we define its in-community degree as d0i = #{{i, j} ∈ E : j ∈ Ca } and its out-of-community degree as di := #{{i, j} ∈ E : j ∈ / Ca }. One can easily see that E[d0i ] = p(n0 − 1) and E[di ] = q(n − n0 ) and by definition di = d0i + di . In fact d0i is the degree of i considered as a vertex in the ER subgraph GCa . An important fact about degrees in ER random graphs is that they concentrate around their mean: Theorem 3.6. Suppose G is drawn from G(n, k, p, q). 1. For any α > 0, if p ≥ 4 ln(n) then with probability at least 1 − 1/n: α 2 n0 (1 − α)n0 p ≤ d0i ≤ (1 + α)n0 p 2. In particular, if p ≥ p 1/ ln(n) = o(1). for all i ∈ {1, 2, · · · , n} (3.1) 4k(ln(n))2 then (3.1) holds, with probability at least 1 − 1/n, for α = n Proof. This theorem is a variation on a well known result for ER graphs (e.g. theorem 3.6 in [25]). Each d0i follows the binomial distribution with parameters n0 − 1 and p, so by the Chernoff   2 bound: P |d0i − n0 p| ≥ αn0 p ≤ e−α n0 p/2 . Hence:     0 P max |di − n0 p| ≥ αn0 p = P |d01 − n0 p| ≥ αn0 p or |d02 − n0 p| ≥ αn0 p or . . . or |d0n − n0 p| ≥ αn0 p i∈[n] n X   2 P |d0i − n0 p| ≥ αn0 p = ne−α n0 p/2 ≤ i=1  Thus P max i∈[n0 ] |d0i  4 ln(n) 2 ln(n2 ) 2 − n0 p| ≤ αn0 p = 1 − ne−α n0 p/2 If p ≥ 2 = then: α n0 α 2 n0 1 − ne−α 2 n p/2 0 2 ≤ 1 − ne− ln(n ) = 1 − 1/n p This proves part 1. Part 2 follows by taking α = 1/ ln(n), in which case the lower bound on p becomes: 4k(ln(n))2 4 ln(n) 4(ln(n))2 4(ln(n))2 = = = α 2 n0 n0 n/k n  The second remarkable property of the ER model is that the eigenvalues of L also concentrate around their mean: Theorem 3.7. Let L be the Laplacian of a random graph drawn from G(n0 , p) with p >> (ln(n0 ))2 /n0 and let λ1 ≤ λ2 ≤ . . . ≤ λn0 denote its eigenvalues. Then almost surely 2 : max |1 − λi | ≤ (1 + o(1)) √ i6=1 4 g(n0 ) log2 (n0 ) + pn0 pn0 where g(n0 ) is a function tending to infinity arbitrarily slowly. 2 Given a family of random graph models Gn we say that some graph property P holds almost surely if P[G ∈ Gn , G does not have P] = o(1) with respect to n 6 Proof. Given that the expected degree of each vertex in G is pn0 , this is just Theorem 3.6 in [11]  Remark 3.8. For our purposes, it will be enough to note that this gives: √ √ 4/ p 4/ p 1 1 λ2 ≥ 1 − √ − o( √ ) and λn0 ≤ 1 + √ + o( √ ) n0 n0 n0 n0 almost surely. 4 Preliminaries on Compressive Sensing Let Φ ∈ Rm×N and y ∈ Rm with m < N . We say that a vector x is sparse if it has few non-zero entries relative to its length. We follow the convention of defining the ‘0 quasi-norm’ as: kxk0 = #{xi : xi 6= 0} and we say x is s-sparse if kxk0 ≤ s. Compressive sensing is concerned with solving arg min{kxk0 : x ∈ RN , Φx = y} (4.1) in the case where m < N (that is, when the linear system is underdetermined). We call (4.1) the Sparse Recovery Problem. One also considers the Perturbed Sparse Recovery Problem where y = Φx∗ + e with kek2 ≤ η << kyk2 and we wish to solve: x# := arg min{kxk0 : x ∈ RN , kΦx − yk2 ≤ η} (4.2) while guaranteeing that x# is a good approximation to x∗ by bounding kx# − x∗ k2 ? We remark that problem (4.2) is equivalent to the dual problem: x# := arg min{kΦx − yk2 : x ∈ RN , kxk0 ≤ n0 } (4.3) We refer the reader to [21] for an excellent introduction to the area. 4.1 Computational Algorithms Many numerical algorithms have been invented for solving (4.1) and (4.3), for example, `1 convex minimization and its variations, hard thresholding iteration and its variations, greedy approaches such as orthogonal matching pursuit (OMP) as well as more exotic approaches like `q nonconvex minimization. See, for example, [10], [8], [6], [46], [7], [22], [23]. Due to its efficiency, we shall focus on the greedy approach in this paper, specifically the Orthogonal Matching Pursuit (OMP) and Subspace Pursuit (SP) algorithms, see Algorithms 2 and 3, respectively. For notational convenience, we shall follow [21] and denote by ΦS the column submatrix of Φ consisting of the columns indexed by the subset S ⊂ [N ]. For a vector x ∈ RN we denote by xS either the subvector in R|S| consisting of the entries xi for i indexed by S, or the vector  xi if i ∈ S (xS )i = 0 if i ∈ /S It should always be clear from the context which definition we are referring to. We also remind the reader of the following operations on vectors v ∈ Rn , defined in [21]:  vi if i ∈ S Ls (v) = index set of s largest absolute entries of v and Hs (v) = vLs (v) = 0 if i ∈ /S 7 where Hs is sometimes referred to as the Hard Thresholding Operator. Algorithm 2 The OMP Algorithm Inputs: y and Φ Initialize: r(0) = y, S (0) = ∅, x(0) = 0 and α = 0. while True do α←α+1 i(α) := L1 (Φ> rα−1 ) S (α) = S (α−1) ∪ {i(α) } x(α) := arg min{||ΦS (α) zS (α) − y||2 : z ∈ RN and supp(z) ⊂ S (α) } r(α) := y − Φx(α) if Stopping Criterion met then Output x# := xα Break end if end while Algorithm 3 The SP algorithm ([14]) Inputs: y, Φ and an integer s ≥ 1 Initialization: (1) T 0 = Ls (Φ> y). (2) x0 = arg min{ky − ΦT 0 xk2 : supp(x) ⊂ T 0 } (3) r0 = y − ΦT 0 x0 Iteration: for k = 1 : kmax do  (1) T̂ k = T k−1 ∪ Ls Φ> rk−1 (2) u = arg min{ky − ΦT̂ k xk2 : x ∈ RN and supp(x) ⊂ T̂ k } (3) T k = Ls (u) and xk = Hs (u) (4) rk = y − ΦT k xk end for The most common stopping criteria for Algorithm 2 are α = k, or kr(α) k2 <  for a given k or . A sufficient condition to guarantee the convergence of Algorithm 2 is the following Theorem 4.1. For any S ⊂ [N ], if ΦS is injective and satisfies kΦ†S ΦS c k1→1 < 1, (4.4) where Φ†S is the pseudo-inverse of ΦS , then any vector x with support S is recovered in at most s = |S| steps of OMP. We refer to [46] for a proof. See also Remark 3.6 in [21]. Remark 4.2. In [14] where the SP algorithm is introduced, they suggest solving the least squares problems (that is (2) in Initialization and (2) in Iteration) exactly. In our implementation, we use MATLAB’s lsqr algorithm to solve them approximately, to a high precision. As pointed out by [38] in their analysis of CoSaMP, a very similar algorithm, this does not affect the convergence analysis of the algorithm. 8 4.2 Fundamental Concepts A very important concept, the restricted isometry property (RIP), introduced by Candés and Tao ([10]) plays a critical role in the study of the existence and uniqueness of a sparse solution from a sensing matrix and whether the solution of an `1 minimization is the sparse solution. Another concept, mutual coherence, introduced by Donoho and his collaborators in ([17] is also used in this study. Definition 4.3. Letting 0 < s < m < N be an integer and ΦS be a submatrix of Φ which consists of columns of Φ whose column indices are in S ⊂ [N ]. The restricted isometry constant (RIC) δs of Φ is the smallest quantity such that (1 − δs )kxk22 ≤ kΦS xk22 ≤ (1 + δs )kxk22 (4.5) for all subsets S with with cardinality |S| ≤ s. If a matrix Φ has such a constant δs < 1 for some s, Φ is said to possesses RIP of order s. It is known that δs = min S⊂{1,··· ,n} |S|≤s kΦ> S ΦS − Is k2→2 , (4.6) where Is is the identity matrix of size s × s. Definition 4.4. The coherence of a matrix Φ, denoted µ, is the largest normalized inner product between its columns: |hφi , φj i| . µ := max i6=j kφi k2 kφj k2 4.3 Totally Perturbed Compressive Sensing Frequently it is useful to modify problem (4.3) further to allow for small perturbations in the observed measurement matrix. That is, suppose that y = Φx∗ + e and let Φ̂ = Φ + E, where E is a small perturbation matrix. Denoting again: x# := arg min{kΦ̂x − yk2 : x ∈ RN , kxk0 ≤ s}, (4.7) can we still guarantee that x# is a good approximation to x∗ by bounding kx# −x∗ k2 ? Problem (4.7) is called the Totally Perturbed Sparse Recovery Problem. Analyzing (4.7) is often more important for applications than analyzing (4.3), as frequently we only know the measurement matrix Φ to within a certain error tolerance. Theorem 4.5 (Herman and Strohmer, [28]). Suppose that Φ̂ = Φ + E. Let δs and δ̂s denote the s restricted isometry constants of Φ and Φ̂ respectively. Define3 sΦ := kEk2,s /kΦk2,s . Then: δ̂s ≤ (1 + δs ) (1 + sΦ )2 − 1 To bound the error kx# − x∗ k2 , we need the following result. Define y = Φx and suppose that ŷ = Φx + e is the observed (perturbed) measurement vector. Suppose further that we only have access to Φ̂ = Φ + E, a small perturbation of the measurement matrix. Define y := kek2 /kyk2 , Φ = kEk2 /kΦk2 and let sΦ be as above. 3 For a matrix Φ we denote by kΦkp the induced operator norm kΦkp = maxx6=0 semi-norm max kΦS kp S⊂[n] |S|=s 9 kΦxkp kxkp By kΦkp,s we mean the Theorem 4.6. Suppose that x is s-sparse. Define the following constants: q √ √ 2 (1 + δ̂ 2 ) 2δ̂3s 2 2+1 ( 2 + 2)δ̂3s 3s (1 − δ̂3s )(1 − ρ̂) + and τ̂ = q ρ̂ = . 2 1 − δ̂3s (1 − δ̂3s )(1 − ρ̂) 1 − δ̂ 2 3s Suppose that δ̂3s ≤ 0.4859. Then after m = ln(Φ + y )/ ln(ρ̂) iterations of Subspace Pursuit (Algorithm 3) applied to problem (4.7), we have ! p kx − xm k2 1 + δ̂s ≤ τ̂ + 1 (sΦ + y ). kxk2 1 − sΦ Remark 4.7. This is Theorem 2 in [34], adapted to the case the x is s-sparse (the result in. loc. sit. is for the more general case where x is compressible). 5 The RIP of Laplacian of Random Graphs We first study the RIP for the Laplacian of a connected ER graph drawn from G(n0 , p). We then extend this to a result on the RIP for graphs drawn from the SBM G(n, k, p, 0), as these can be thought of as a disjoint union of k ER graphs. Finally, we extend to graphs drawn from G(n, k, p, q) for 0 < q << p using a perturbation argument. 5.1 RIP for Laplacian of G(n0 , p) Lemma 5.1. Let L be the Laplacian of a connected graph G with n0 vertices. Let S ⊂ [n0 ] with |S| = s < n0 . Then σmin (LS ) ≥ (1 − s/n0 )λ2 and δs = max{1 − (1 − s/n0 ) λ22 , λ2n0 − 1}, where λi denotes the i-th eigenvalue of L, ordered from smallest to largest. Proof. Let w1 , . . . , wn0 be an orthonormal basis of eigenvectors of L with eigenvalues P 0 λ1 ≤ · · · ≤ λn0 , where λ1 = 0 and λ2 > 0. For any v supported on S with kvk2 = 1, write v = ni=1 αi wi . Note that w1 = √1n0 1 and ker(L) = span(w1 ). Then: kLvk22 = L n X ! 2 αi wi = i=1 2 n X 2 αi λi wi i=2 = 2 n X αi2 λ2i ≥ i=2 n X ! αi2 λ22 i=2 P 0 2 P 0 2 αi = 1 − α12 . Thus kLvk22 ≥ λ22 (1 − α12 ) and so Because ni=1 αi = kvk22 = 1 we have that ni=2 clearly this quantity is minimized by making α1 as large as possible. Observe that:   √ 1 1 √ s 1 α1 = √ 1 · v ≤ √ kvk1 ≤ √ ( skvk2 ) = √ . n0 n0 n0 n0 We remark that this bound on α1 is sharp, and is achieved by taking v = σmin (LS ) = min supp(v)⊂S kvk2 =1 kLvk22 r ≥ 1− s n0 2 ! λ22  = On the other hand: max kLvk22 ≤ max kLvk22 = λ2n0 . supp(v)⊂S kvk2 =1 kvk2 =1 10 √1 1S . s s 1− n0  Hence: λ22 . Hence for any S ⊂ [n] with |S| = s, and any v with supp(v) ⊂ S and kvk2 = 1, we have:   s λ22 ≤ kLvk22 ≤ λ2n0 1− n0 and the claim about δs follows.  Theorem 5.2 (RIP for Laplacian of ER graphs). Suppose that G ∈ G(n0 , p) with Laplacian L and suppose that p >> (ln(n0 ))2 /n0 . If s = γn0 with γ ∈ (0, 1) then 8p−1/2 1 δs ≤ γ + (1 − γ) √ + o( √ ) n0 n0 almost surely 4 Proof. By Theorem 3.7, and Remark 3.8, 4p−1/2 4p−1/2 1 1 λ2 ≥ 1 − √ − o( √ ) and λn0 ≤ 1 + √ + o( √ ) n0 n0 n0 n0 almost surely. Combining this with Lemma 5.1, we get that: !2 4p−1/2 1 δs ≤ 1 − (1 − s/n0 ) 1 − √ − o( √ ) n0 n0 ! 1 8p−1/2 + o( √ ) = 1 − (1 − γ) 1 − √ n0 n0 ! 8p−1/2 1 8p−1/2 1 = 1 − 1 − γ − (1 − γ) √ + o( √ ) = γ + (1 − γ) √ + o( √ ). n0 n0 n0 n0 as claimed.  We conclude this subsection with a lower bound for kLk2,s (see §4.3 for the definition of k · k2,s ), where L is the Laplacian of a connected graph. Lemma 5.3. If L is the Laplacian of a connected graph G with n0 vertices, then kLk2,s ≥ λs−1 ,. Proof. Recall that: kLk2,s := max kLS k2 = max σmax (LS ) (5.1) S⊂[n] |S|=s S⊂[n] |S|=s We shall apply Theorem 5.4 below. For a matrix such as L which is conjugate to a symmetric nonnegative definite matrix, the eigenvalues coincide with the singular values. Translating the notation of this Theorem 5.4 into the current situation, for p = n, q = s, βi = σi (LS ) and αi = λi (L). Clearly, min(m, n) = min(n, n) = n and min(p, q) = min(n, s) = s. We use Theorem 5.4 again to get: σmax (LS ) ≥ λs−1 . And so max σmax (LS ) ≥ λs−1 .  S⊂[1,··· ,n] |S|=s In the proof above, we have used the following classic interpolation Theorem for singular values: 4 Recall that here and throughout this paper we say that a property holds almost surely if the probability that it does not hold is o(1) with respect to n0 (or sometimes n) 11 Theorem 5.4. Let A be an m × n matrix with singular values α1 ≤ α2 ≤ . . . ≤ αmin(m,n) . Suppose that B is a p × q submatrix of A, with singular values β1 ≤ β2 ≤ . . . ≤ βmin(p.q) Then: αmin(m,n)−i ≥ βmin(p,q)−i for i = 0, 1, . . . , min(p, q) − 1 and βi ≥ αmin(m,n)−min(p,q)−(m−p)−(n−q)−1+i for integer i satisfying min(p, q) + (m − p) + (n − q) + 2 − min(m, n) ≤ i ≤ min(m, n). Proof. This is Theorem 1 in [44]. Note that they use the opposite notational convention: α1 ≥ α2 ≥ . . . ≥ αmin(m,n) and β1 ≥ β2 ≥ . . . ≥ βmin(p.q) .  5.2 RIP for Laplacian of Graphs from G(n, k, p, 0) Lemma 5.5. Suppose that a graph G has k connected components C1 , · · · , Ck , all of size n0 (for example, G ∈ G(n, k, p, 0)). Let GC1 , . . . , GCk denote the subgraphs on these components and let Li denote their Laplacians. Then for any s < n0 , δs (LG ) = maxi δs (Li ). Suppose S ⊂ Ci for i. For simplicity we assume i = 1, but the other cases are   1some LS where L1 denotes the Laplacian of GC1 and 0 here is the zero identical. In this case LS = 0 matrix of the appropriate size. If supp(v) ⊂ S, then kLS vk22 = kL1S vs k22 and so: Proof. (1 − δs (L1 ))kvk22 ≤ kLS vk22 ≤ (1 + δs (L1 ))kvk22 (5.2) It follows that, for all index sets S contained in a single component (i.e. S ⊂ Ci for some i), we have:   (1 − max δs (Li ) )kvk22 ≤ kLS vk22 ≤ (1 + max δs (Li ) )kvk22 . i i Now suppose that Pk S 6⊂ Ci . Write S = ∪i Si where Si := S ∩ Ci . Given any v with supp(v) = S, we can write v = i=1 vi with vi = HSi (v). Then: kLS vk22 = k X 2 LSi vi i=1 2 Crucially, observe that all the terms LSi vi have disjoint support. Hence: 2 kLS vk22 = X i LSi vi = 2 X kLSi vi k22 ≥ X i  1 − δsi (Li ) kvi k22 by (5.2) i i ≥ min 1 − δsi (L ) i X  kvi k22 = min 1 − δsi (Li ) kvk22 i i     i 2 i = 1 − max δsi (L ) kvk2 ≥ 1 − max δs (L ) kvk22 i i with the final inequality holding as si ≤ s for all i and δt is non-decreasing in t. An identical argument yields that:   kLS vk22 ≤ 1 + max δs (Li ) kvk22 i 12 and so we have   (1 − max δs (Li ) )kvk22 ≤ kLS vk22 ≤ (1 + max δs (Li ) )kvk22 . i i This completes the proof.  Theorem 5.6 (RIP for Laplacian of Graphs from Stochastic Block Model). Suppose G ∈ G(n, k, p, 0), with n0 = n/k and Laplacian L. Suppose further that p >> (ln(n0 ))2 /n0 and that k is O(1) with respect to n. If s = γn0 with γ ∈ (0, 1) then: 8p−1/2 1 δs (L) ≤ γ + (1 − γ) √ + o( √ ) n0 n0 (5.3) almost surely. Proof. Because q = 0, G will have k connected components with probability 1. Note that each subgraph Gi is an i.i.d ER graph, drawn from G(n0 , p). Let Li denote the Laplacian of GCi . By Theorem 5.2 8p−1/2 1 δs (Li ) ≤ γ + (1 − γ) √ + o( √ ) (5.4) n0 n0 almost surely. That is, there exists a function f (n0 ) going to 0 as n0 → ∞ such that (5.4) holds with probability 1 − f (n0 ). As the GCi are i.i.d: 8p−1/2 1 max δs (Li ) ≤ γ + (1 − γ) √ + o( √ ) 1≤i≤k n0 n0 (5.5) with probability (1 − f (n0 ))k . As long as k is eventually bounded with respect to n0 (i.e. k is O(1) with respect to n), (1 − f (n0 ))k → 1 as n0 → ∞. Hence (5.5) holds almost surely.  Again, we conclude this subsection with a lower bound for kLk2,s . Lemma 5.7. Suppose that a graph G has k connected components C1 , · · · , Ck , all of size n0 . Let GC1 , . . . , GCk denote the subgraphs on these components and let Li denote their Laplacians. Then kLk2,s ≥ maxa∈[k] λs−1 (La ). Proof. We leave the proof to the interested reader. 5.3  RIP for Laplacian of Graphs from G(n, k, p, q) with q > 0 Finally, we study the RIP for Laplacian of graphs from G(n, k, p, q) with q > 0. Observe that for G ∈ G(n, k, p, q) we may write A = A0 + A where A0 contains the intracluster edges and A contains the intercluster edges:  1 if {i, j} ∈ E and i, j ∈ Ca for an a ∈ {1, · · · , k} 0 Aij = 0 otherwise  1 if {i, j} ∈ E and i ∈ Ca and j ∈ Cb for some a 6= b Aij = 0 otherwise. Assuming that q << p, there are much fewer intercluster than intracluster edges, and thus A is much sparser than A0 . Observe further that we can regard A0 as the adjacency matrix of a subgraph G0 ⊂ G, obtained by removing all the intercluster edges. In fact, G0 ∈ G(n, k, p, 0). Let L0 denote the Laplacian of the underlying graph G0 . It is tempting to assume that L = L0 + L , where L is a 13 Laplacian associated to A , but unfortunately this is not the case. However, one can still regard L as a small perturbation of L0 , i.e. L = L0 + E. In order to establish bounds on the restricted isometry constants of L, we need to bound the size of the perturbation E, which we do in Theorem 5.8. First, recall that, as in §3.3, for any i ∈ Ca , d0i denotes the in-community degree (equivalently the degree P of i in GCa or G0 ) and di denotes the out-of-community degree. In terms of A0 and A , d0i = j A0ij P and di = j Aj . Define ri = di /d0i . We can assume that di << d0i , equivalently ri << 1, for all i. Theorem 5.8. Let L be the Laplacian of a graph drawn at random from G(n, k, p, q) with p ≥ 4k(ln(n))2 /n and let α be as in part 2 of Theorem 3.6. Suppose further that max1≤i≤n ri ≤ r << 1. Then L = L0 + E where L0 is the Laplacian of G0 and E = E1 + E2 such that supp(E1 ) = supp(A0 ) and supp(E2 ) = supp(A ) and the following bounds hold: 1. kE1 k∞ , kE2 k∞ ≤ r + O(r2 ). 2. kE1 k1 , kE2 k1 ≤ β 2 r + O(r2 ) 3. kE1 k2 , kE2 k2 ≤ βr + O(r2 ). 4. for any s < n, kE1 k2,s , kE2 k2,s ≤ βr + O(r2 ) and kEk2,s ≤ 2βr + O(r2 ) where β 2 = (1 + α)/(1 − α). The proof of Theorem 5.8 uses the following lemma: Lemma 5.9. Suppose that L is the Laplacian of a graph G drawn from G(n, k, p, q), and let L0 denote the Laplacian of the underlying (disconnected) graph G0 , thought of as drawn from G(n, k, p, 0). Suppose further that max1≤i≤n ri ≤ r << 1. Then L = L0 + E, where:  ( 1 ri + O(r2 ) A0ij if i, j ∈ Ca d0i   Eij = 1 2 (ri − 1) + O(r ) Aij if i ∈ Ca and j ∈ Cb for a 6= b d0 i A Proof. By definition Lij = δij − dij where δij = 1 if i = j and zero otherwise. Observe i 1 1 1 1 1 1 1 = 0 Because ri << 1 for all i, by Taylor’s Theorem = that = 0  = 0  d di di di + di di 1 + 0i di 1 + ri di  1 1 − ri + O(ri2 ) . Direct computation reveals that, for i, j ∈ Ca : 0 di ! 0 A   1 1 ij Lij = δij − 0 1 − ri + O(ri2 ) A0ij = δij − 0 + 0 ri + O(r2 ) A0ij di di di  1 = L0ij + 0 ri + O(r2 ) A0ij di as 1/d0i ≤ ri = O(r). The calculation for i, j in different clusters is similar.  Let us write E = E1 + E2 where E1 will contain the ‘on-diagonal’ perturbation, and E2 will contain the ‘off diagonal’ perturbation:   Eij if i, j ∈ Ca , a ∈ [k] Eij if i ∈ Ca and j ∈ Cb for a 6= b, a, b ∈ [k] 1 2 Eij = and Eij = 0 otherwise 0 otherwise We are now ready to prove Theorem 5.8. 14 Proof. [Proof of theorem 5.8] By definition, k · k∞ is the maximum absolute row sum of the matrix in question. For any i, let Ca be the cluster to which it belongs. Then: X |E1ij | = j X ri + O(r2 ) ri + O(r2 ) X 0 ri + O(r2 ) 0 0 A = (di ) = ri + O(r2 ). A = ij ij d0i d0i d0i j∈Ca j∈Ca Hence, we have   X = max  |E1ij | = max(ri ) + O(r2 ) ≤ r + O(r2 ). kE1 k∞ i i j Similarly: X |E2ij | = j X (ri − 1) + O(r2 ) 1 + O(r2 ) X  1 + O(r2 )   A ≤ A = (di ) ≤ ri + O(r2 ) ij ij d0i d0i d0i j ∈C / a j ∈C / a as ri := di /d0i , and so again:  kE2 k∞ = max   X i |E2ij | = max(ri ) + O(r2 ) ≤ r + O(r2 ) i j Before continuing, recall that as p ≥ 4k(ln(n))2 /n we may choose an α = o(1) with respect to n such that (1 − α)n0 p ≤ d0i ≤ (1 + α)n0 p almost surely for all i ∈ [n], by part 2 of Theorem 3.6. Now, because k · k1 is the maximum absolute column sum, for any j in cluster Ca , we have X |E1ij | = 1≤i≤n X ri + O(r2 ) r + O(r2 ) X 0 r + O(r2 ) 0 0 A ≤ A ≤ (dmax ) ij ij d0i d0min d0min i∈Ca i∈Ca ≤ (r + O(r2 )) (1 + α)n0 p r(1 + α) = + O(r2 ) = β 2 r + O(r2 ) (1 − α)n0 p (1 − α) and so: ! 1 kE k1 = max X j |E1ij | ≤ β 2 r + O(r2 ). i Similarly; X |E2ij | = 1≤i≤n X (ri − 1) + O(r2 ) dj 1 + O(r2 ) X   2 A ≤ A = (1 + O(r )) ij ij d0i d0min d0min i∈C / a i∈C / a ≤ (1 + O(r2 )) 1+α 1−α dj d0max ≤ (1 + O(r2 )) 1 + α dj ≤ β 2 rj + O(r2 ) 1 − α d0j and so again we have ! kE2 k1 = max j X |E2ij | ≤ β 2 max(rj ) + O(r2 ) ≤ β 2 r + O(r2 ). j i Now, by the Riesz-Thorin interpolation theorem: 1/2 2 2 kE1 k2 ≤ kE1 k1 kE1 k1/2 ∞ ≤ β r + O(r ) 15 1/2 (r + O(r2 ))1/2 = βr + O(r2 ) and by an identical argument kE2 k2 ≤ βr + O(r2 ). Part 4 follows from the simple fact that for any matrix B, kBk2,s ≤ kBk2 , and the bound for kEk2,s follows from the fact that E = E1 + E2 and the triangle inequality.  We are now ready to state and prove the main result of this section. Theorem 5.10. Suppose that G ∈ G(n, k, p, q), with block sizes n0 = n/k and Laplacian L. Suppose further that: 1. p >> (ln(n0 ))2 /n0 2. k is O(1) with respect to n. 3. max ri ≤ r << 1. 1≤i≤n If t = γn0 with γ ∈ (0, 1) then: r 1 D2 δt (L) ≤ γ + D1 r + √ + D3 √ + O(r2 ) + o( √ ) n0 n0 n0 (5.6) almost surely, where D1 , D2 and D3 are O(1) with respect to n0 Proof. As above, we write L = L0 + E, where L0 is the Laplacian of the subgraph G0 , thought of as drawn from G(n, k, p, 0). We define δt := δt (L0 ) and δ̂t := δt (L). By Theorem 4.5: δ̂t ≤ (1 + δt )(1 + tL )2 − 1. (5.7) As defined in a previous section, tL := kEk2,t /kL0 k2,t . Theorem 5.8 gives us that kEk2,t ≤ 2βr + O(r2 ), while Lemma 5.7 gives kL0 k2,t ≥ max1≤a≤k λt−1 (La ) (recall that La denotes the Laplacian of the subgraph GCa ). By a similar argument to that of Theorem 5.6, we can apply Lemma 3.7 (and see also remark 3.8) to get: 4p−1/2 1 max λt−1 (La ) ≥ 1 − √ − o( √ ) 1≤a≤k n0 n0 almost surely, assuming that k is eventually bounded with respect to n0 . For convenience, choose n0 √ large enough such that 4p−1/2 / n0 + o( √1n0 ) ≤ 1/4. Under this assumption: tL0 = kEk2,t 2βr + O(r2 ) 8βr ≤ = + O(r2 ) kL0 k2,t 1 − 1/4 3 Combining this with (5.7) and Theorem 5.6: ! 2 8p−1/2 1 8βr 2 δ̂s ≤ 1 + γ + (1 − γ) √ + o( √ ) 1+ + O(r ) − 1 n0 n0 3 !  8p−1/2 1 16βr 2 = 1 + γ + (1 − γ) √ + o( √ ) 1+ + O(r ) − 1 n0 n0 3 !    −1/2 β 1  128(1 − γ)p 1 16β(1 + γ) r =γ+r +√ 8(1 − γ)p−1/2 + √ + O(r2 ) + o( √ ) 3 n0 n0 3 n0 and letting D1 = 16β(1 + γ)/3, D2 = 8(1 − γ)p−1/2 , D3 = 128(1 − γ)p−1/2 β 2 /3 gives equation (5.6). Finally, because β → 1 as n → ∞, we indeed have that D1 , D2 and D3 are O(1) with respect to n0 .  16 6 The Coherence Properties for Laplacians of Random Graphs In this section we study the coherence properties of Laplacians of random graphs. Mainly, we compute a lower bound for |h`i , `j i| when i and j are in the same cluster and hence a lower bound for µ(L−1 ). We begin with a basic result for graphs from G(n, k, p, 0). 0 Theorem 6.1. P Let A be the adjacency matrix of a graph G drawn at random from G(n, k, p, 0) and define χi,j = k Aik Akj . Suppose further that there exists an α ∈ (0, 1) such that (1 − α)pn0 ≤ d0i ≤ (1 + α)pn0 . Then for any i, j ∈ C1 with i 6= j: r r (1 + α)n0 p ln(1/δ) (1 + α)n0 p ln(1/δ) 2 2 (1 − α)n0 p − ≤ χi,j ≤ (1 + α)n0 p + (6.1) 2 2 with probability 1 − δ. Proof. Let B1 (i) denote the ball of radius 1 centered at i. That is, B1 (i) := {k ∈ [n] : {i, k} ∈ E}. By definition |B1 (i)| = di . Observe that: X X χi,j = Aik Akj = Akj k k∈B1 (i) Each Akj is an i.i.d. Bernoulli random variable with parameter p. Applying the Chernoff bound to this sum:  q 2    di ln(1/δ) r  2  2 X di ln(1/δ)     P Akj ≤ pdi − ≤ exp − =δ 2 di   k∈B1 (i) and (1 − α)pn0 ≤ di ≤ (1 + α)pn0 so: # # " " r r (1 + α)n p ln(1/δ) d ln(1/δ) 0 i P χi,j ≤ (1 − α)n0 p2 − ≤ P χi,j ≤ pdi − ≤δ 2 2 The upper bound on χi,j is proved analogously.  We now provide a bound on the inner product |h`0i , `0j i| when i and j are in the same cluster: Theorem 6.2. Let L0 be the Laplacian of a graph G0 drawn at random from G(n, k, p, 0). As in Theorem 6.1, suppose that there exists an α ∈ (0, 1) such that (1 − α)pn0 ≤ d0i ≤ (1 + α)pn0 but in addition assume that α is o(1) with respect to n. Define β 2 = (1 + α)/(1 − α). Then for any δ ∈ (0, 1) and for any i, j ∈ Ca , a ∈ [k], with i 6= j: s   2 β 1 ln(1/δ) 1 − 3/2 |h`0i , `0j i| ≥ n0 (1 + α) 2(1 + α)3 p3 n 0 with probability 1 − δ for n large enough. Proof. Recall that h`0i , `0j i  = − 1 1 + di dj 17  Aij + n X Aik Ajk k=1 d2k There are two possibilities; either i and j are connected ({i, j} ∈ E) or they are not ({i, j} ∈ / E). We treat these cases separately. Suppose first that {i, j} ∈ / E. In this case, Aij = 0 and so: h`0i , `0j i = n X Aik Ajk d2k k=1 ≥ 1 d2max χij by assumption, dmax ≤ (1 + α)pn0 and by so by Theorem 6.1: ! r 1 (1 + α)n0 p ln(δ) 0 0 2 h`i , `j i ≥ (1 − α)n0 p − − 2 (1 + α)2 p2 n20 s   1 1 1 − ln(δ) = − 3/2 2 n0 (1 + α)β 2(1 + α)3 p3 n (6.2) 0 Alternatively, suppose that {i, j} ∈ E. Then Aij = 1 and by Theorem 6.1: 2 1 − χij dmax (1 + α)pn0 (1 − α)2 p2 n20 ! r 2 1 (1 + α)n p ln(δ) 0 ≥ − (1 + α)n0 p2 + − (1 + α)pn0 (1 − α)2 p2 n20 2 s   1 2 β2 1 − ln(δ)β 2 = − − 3/2 n0 (1 − α)p (1 + α) 2(1 − α)3 p3 n0 |h`0i , `0j i| ≥ 2 − 1 χij d2min ≥ (6.3) Let us compare the leading terms in (6.2) and (6.3). Because α → 0 as n → ∞, β → 1 and thus 1/((1 + α)β) → 1. On the other hand, 2/((1 − α)p) − β 2 /(1 − α) → 2/p − 1 > 1, assuming p < 1. Thus, for n large enough, the right hand side of (6.3) is larger than the right hand side of (6.2), and so we can summarize both bounds as: s   1 1 − ln(δ) β2 0 0 |h`i , `j i| ≥ − 3/2 n0 (1 + α) 2(1 + α)3 p3 n0 for large enough n. Next we consider the case where intercluster edges are present, i.e. where q > 0.  Theorem 6.3. Let L be the Laplacian of G drawn from G(n, k, p, q), q > 0, and suppose that i, j ∈ C1 . Assume further that: 1. p ≥ 4k(ln(n))2 /n √ 2. maxi ri ≤ r with r = r0 / n0 where r0 = O(1) with respect to n0 . Then almost surely: 1 |h`i , `j i| ≥ n0  β2 1+α  − o( 1 ). n0 where α is o(1) with respect to n and β 2 = (1 + α)/(1 − α). Proof. As before, let e1i (resp. e1j ) denote the i-th (resp. j-th) column of E1 , while e2i (resp. e2j ) denote the i-th (resp. j-th) column of E2 . Then: h`i , `j i = h`0i + e1i + e2i , `0j + e1j + e2j i = h`0i , `0j i + h`0i , e1j i + h`0i , e2j i + he1i , `0j i + he1i , e1j i + he1i , e2j i + he2i , `0j i + he2i , e1j i + he2i , e2j i 18 By construction, e1i and e2j have disjoint support (and similarly for e1j and e2i ), as do `0i and e2j (and similarly `0j and e2i ). Hence: h`0i , e2j i = he1i , e2j i = he2i , `0j i = he2i , e1j i = 0 and so: |h`i , `j i| ≥ h`0i , `0j i − h`0i , e1j i − he1i , `0j i − he1i , e2j i − he2i , e2j i (6.4) Now `0i and `0j can be thought of as columns in the Laplacian of a graph drawn at random from G(n, k, p, 0). By part 2 of Theorem 3.6 we may choose an α = o(1) with respect to n such that (1 − α)pn0 ≤ d0i ≤ (1 + α)pn0 for all i, with probability 1 − 1/n. Now we apply Theorem 6.2 to get: s   β2 1 − ln(δ) 1 0 0 − 3/2 |h`i , `j i| ≥ n0 (1 + α) 2(1 + α)3 p3 n 0 √ −p3 n0 3√ (and noting e−p n0 < 1/n0 for large enough n0 ) with probability 1 − δ − 1/n. Taking δ = e s s     1/2 2 2 1 β 1 − ln(δ) 1 β 1 n0 − 3/2 = − 3/2 n0 (1 + α) 2(1 + α)3 p3 n0 (1 + α) 2(1 + α)3 n0 n0  2   2  1 β 1 1 β 1 = − 5/4 √ = − o(1/n0 ) n0 1 + α n0 1 + α 2(1 + α)3/2 n0 with probability at least 1 − 1/n0 − 1/n = 1 − (k + 1)/n. Next, we consider the term h`0i , e1j i. !  0 0 X r A ri A0ij X rm A0im A0mj A m mj 3 |h`0i , e1j i| = δim − 0im + O(r ) = + O(r3 ) 0 − 0 0 )2 d d (d d m m m i m m X r r r r 0 0 3 ≤ 0 + 0 2 A A + O(r ) ≤ 0 + 0 2 min{d0i , d0j } + O(r3 ) dmin (dmin ) m im mj dmin (dmin )   r d0 ≤ 0 1 + max + O(r3 ) dmin d0min As stated earlier, d0min ≥ (1 − α)pn0 and d0max ≤ (1 + α)pn0 with probability 1 − 1/n, and so:    r (1 + α)pn0 r 0 1 |h`i , ej i| ≤ 1+ + O(r3 ) = 1 + β 2 + O(r3 ) (1 − α)pn0 (1 − α)pn0 (1 − α)pn0 Clearly the same bound holds for |he1i , `0j i|. Finally, consider |he1i , e1j i|. A similar calculation to the one above reveals that:   r2 β4 1 1 |hei , ej i| ≤ + O(r4 ) n0 (1 − α)p as well as: |he2i , e2j i| ≤ r + O(r3 ) (1 − α)pn0 Putting all these bounds back in to equation (6.4), we get:  2      1 β 1 2r(1 + β 2 ) r2 β4 r 3 4 3 |h`i , `j i| ≥ − o( ) − + O(r ) + + O(r ) + + O(r ) n0 1 + α n0 (1 − α)pn0 n0 (1 − α)p (1 − α)pn0  2    1 β r 2(1 + β 2 ) rβ 4 1 = − + + + O(r3 ) n0 1 + α n0 (1 − α)p (1 − α)p (1 − α)p 19 √ 3/2 Using the assumption that r = r0 / n0 , we see that r/n0 = r0 /n0 which is of order o(1/n0 ). 3/2 Similarly r3 = r03 /n0 which is also of order o(1/n0 ). Thus:  2  1 β 1 |h`i , `j i| ≥ − o( ) n0 1 + α n0 with probability 1 − O(1/n0 ), as claimed.  Remark 6.4.  Since  the coherence µ of L is defined as µ = maxi6=j |h`i , `j i|. Theorem 6.3 also implies β2 1 thatµ ≥ n0 1+α − o( n10 ). 7 Compressive Sensing Clustering for Graphs from G(n, k, p, 0) In this section, we consider graphs from G(n, k, p, 0). This is the case that there are no inter-cluster edges. We may safely assume that each GCi is connected, as long as p > ln(n0 )/n0 . Lemma 7.1. Let L be the Laplacian of a graph with k connected components C1 , . . . , Ck . Assume, without loss of generality, that vertex 1 ∈ C1 . Define x# as: x# := arg min{kxk0 : x ∈ Rn , Lx = 0 and x1 = 1} (7.1) Then x# = 1C1 Proof. From Theorem 3.3, ker(L) = span{1C1 , . . . , 1Ck } and hence any x with Lx = 0 can be P written as: x = ki=1 ci 1Ci . If x1 = 1 (recall we are assuming that 1 ∈ C1 ) then c1 = 1 and so P x = 1C1 + ki=2 ci 1Ci . Recall that all the 1Ci have disjoint support, and so clearly the sparsest solution x such that Lx = 0 is that x has c2 = c3 = . . . = ck = 0. Hence indeed x# = 1C1  One can rephrase this slightly as a standard compressed sensing problem. Recall `i is the i-th column of L and L−i := [`1 , . . . , `i−1 , `i+1 , . . . , `n ] in which case: xi = 1 ⇔ L−i x−i = −`i , where if x = [x1 , x2 , . . . , xn ]> ∈ Rn , x−i = [x1 , . . . , xi−1 , xi+1 , . . . , xn ]> ∈ Rn−1 . Thus problem (7.1) becomes: x# := arg min{kxk0 : x ∈ Rn−1 , Lx = −`1 }. (7.2) We now show that problem (7.2) can be efficiently solved using OMP (Algorithm 2 in §4) Theorem 7.2. Suppose that G ∈ G(n, k, p, 0) has k connected components C1 , . . . , Ck ⊂ V each of size n0 . OMP (Algorithm 2) applied to the sparse recovery problem (7.2) will return x# = 1C1 \{1} after n0 − 1 iterations. C1 can then be recovered as {1} ∪ supp(x# ). Remark 7.3. Note that the assumption that G ∈ G(n, k, p, 0) is not necessary; this theorem holds for all graphs with k connected components. Also, observe that this theorem is not probabilistic. It holds with certainty for all graphs G. We shall appeal to the exact recovery condition, Theorem 4.1 to establish Theorem 7.2. Let us begin with Lemma 7.4. If C1 ⊂ V is a connected component then LC1 \{1} is injective, where LC1 \{1} is the submatrix from L with column indices in C1 \ {1}. 20  L1−1 Proof. First, observe that LC1 \{1} = , where L1 is the Laplacian of GC1 . It suffices to 0 show that L1−1 is injective. As GC1 is connected, ker(L1 ) = span{1}, by Theorem 3.2. Suppose there exists a u ∈ Rn0 −1 , u 6= 0 such that L1−1 u = 0. Then [0, u> ]> is in ker(L1 ) = span{1}, a contradiction.   Theorem 7.5. With notation as above (i.e. C1 is the connected component of G containing the first vertex) we have that: kL†C1 \{1} LC1c k1 = 0 (7.3) Proof. By Lemma 7.4 LC1 \{1} is injective so its pseudo-inverse is given by:  −1 L L†C1 \{1} = L> L> C1 \{1} C1 \{1} C1 \{1}  1    0 L−1 As observed in the proof of Lemma 7.4, LC1 \{1} = . Similarly, LC1c = , where L̃ denotes 0 L̃ the Laplacian of GC1c . In both cases 0 denotes the zero matrix of appropriate size. To show (7.3) it c will suffice to show that L> C1 \{1} LC1 = 0, but this follows easily as:     0 (L1−1 )> 0> = (L1−1 )> 0 + 0> L̃ = 0 L̃ This completes the proof.  Theorem 7.2 now follows easily: Proof. [Proof of Theorem 7.2] By Theorem 7.5 the exact recover condition (Theorem 4.1) holds , and thus the result follows.  8 Compressive Sensing Clustering for Graphs from G(n, k, p, q) We now turn our attention to the same problem for G(n, k, p, q) with 0 < q << p. We follow the notation established in §5.3, and decompose A as A = A0 + A where A contains the intercluster edges and A0 is the adjacency matrix of the subgraph G0 with k connected components. Denoting the i-th column of L0 as `0i and the i-th column of E as ei , observe that `1 = `01 + e1 = −L0 1C1 \{1} + e1 or − `1 = L1C1 \{1} − e1 . Defining x# as: x# := arg min{kL−1 x − (−`1 )k2 : x ∈ Rn−1 , kxk0 ≤ n0 }. (8.1) Then x# ≈ 1C1 \{1} . We recognize this as a totally perturbed sparse recovery problem (4.7), with Φ = L0 , Φ̂ = L0 + E = L, y = −`1 = −`01 − e1 . We shall show that, provided E is small enough, supp(x# ) = supp(1C1 \{1} ) = C1 \ {1}. Hence, solving problem (8.1) is equivalent to finding the community C1 . Unfortunately, a straightforward application of Algorithm 2 to (8.1) does not work. Empirically, it is observed that the first several greedy steps in Algorithm 2 invariably pick up wrong indices due to the presence of noise E. We need a new approach. Let us start with the following Theorem 8.1. Let L be the Laplacian of a graph G ∈ G(n, k, p, q) with p ≥ 4k(ln(n))2 /n. Suppose that max ri := max di /d0i ≤ r, (8.2) i∈{1,...,n} i∈{1,··· ,n} √ where r = r0 / n0 with r0 a constant independent of n0 . Define Ω := Ld10(n0 −1)/9e (L> −1 `1 ). For n0 large enough, we have that C1 \ {1} ⊂ Ω almost surely. 21 Proof. Suppose otherwise, then there exists an i∗ ∈ C1 \ {1} not in Ω. Let Λ = Ω ∩ C1c . As we are assuming that C1 \ {1} 6⊂ Ω, we have that |Λ| ≥ n0 /9. Moreover, by definition of i∗ , we have that |h`1 , `i∗ i| ≤ |h`1 , `j i| for all j ∈ Ω, and in particular: |h`1 , `i∗ i| ≤ |h`1 , `j i| for all j ∈ Λ Summing over Λ we get: |Λ||h`1 , `i∗ i| ≤ X |h`1 , `j i| = kL> Λ `1 k 1 (8.3) j∈Λ We shall show that equation (8.3) cannot hold for n0 large enough. Because p ≥ 4k(ln(n))2 /n and r << 1, we may use Theorem 5.8, which we shall do repeatedly. By this theorem, we have that L = L0 + E = L0 + E1 + E2 with kEj k∞ ≤ r = O(r2 ) for j = 1, 2. Moreover by construction 0 L0Λ = where L̃ denotes the Laplacian of the subgraph GC1c and 0 is the zero matrix of size L̃Λ  1 ` n0 × |Λ|. Similarly, `1 = `01 + e1 and we may write `01 = 1 where `11 ∈ Rn0 is the first column of 0 1 L , the Laplacian of the subgraph GC1 and 0 is the zero vector of length n − n0 . Thus: 0 > 0 0 > > 1 kL> Λ `1 k1 ≤ k(LΛ ) `1 k1 + k(LΛ ) e1 k1 + kE ` k1  1  `1  + k(L0Λ )> e1 k1 + kE> `1 k1 = 0> L̃> Λ 0 ≤ 0 + k(L0Λ )> k1 ke1 k1 + kE> k1 k`1 k1 (8.4) Now k(L0Λ )> k1 = kL0Λ k∞ , as these are dual norms. As k · k∞ is equal to the maximum absolute row sum, it is clear that kL0Λ k∞ ≤ kL0 k∞ . Now:     0 X X A 1 1 ij 0 0 0 kL k∞ = max δij − 0 = max 1 + 0 Aij  = max 1 + 0 (di ) = 2 i i i d d di i i j j6=i Moreover, ke1 k1 ≤ maxi kei k1 = kEk1 , hence ke1 k1 ≤ 2β 2 r + O(r2 ), while kE> k1 = kEk∞ ≤ kE1 k∞ + kE2 k∞ = 2r + O(r2 ) both by Theorem 5.8. Finally, `1 = `01 + e1 as above, so k`1 k ≤ k`01 k1 + β 2 r + O(r2 ). We compute k`01 k1 : k`01 k1 = n X i=1 n δi1 − X A0 A0i1 1 (1 + α)pn0 i1 (d01 ) ≤ 1 + = 1 + β2 = 1 + ≤1+ 0 0 d (1 − α)pn di d min 0 i i=2 Returning to equation (8.4): 2 2 2 2 2 kL> Λ `1 k1 ≤ (2)(2β r) + (2r)(1 + β ) + O(r ) = (2 + 6β )r + O(r ) = On the other hand, by Theorem 6.3 we have that:  2  1 β 1 − o( ) |h`1 , `i∗ i| ≥ n0 1 + α n0 22 (2 + 6β 2 )r0 + O(r2 ) √ n0 almost surely, and so we can bound the left hand side of (8.3) as:   2   β 1 β2 n0 1 ∗ − o( ) = |Λ||h`1 , `i i| ≥ − o(1) 9 n0 1 + α n0 9(1 + α) Thus, if inequality (8.3) were true, it would imply that: β2 (2 + 6β 2 )r0 + O(r2 ) − o(1) ≤ √ 9(1 + α) n0 which cannot be true for n0 large enough, as α and r are o(1) with respect to n0 and β 2 is O(1), thus √ β 2 /(9(1 + α)) − o(1) → 1/9 while (2 + 6β 2 )r0 / n0 → 0. Hence we may always take n0 large enough so that, with probability at least 1 − 1/n0 , inequality (8.3) cannot hold. Thus no such i∗ which is in C1 \ {1} but not in Ω can be found, and so the Theorem 8.1 is proved.  With the result of Theorem 8.1 in mind, we are able to derive a new algorithm to find the communities from G ∈ G(n, k, p, q) for p >> q > 0: Algorithm 4 Single Cluster Pursuit (SCP) Input: The adjacency matrix A of a graph G, and estimate of the size of clusters n0 (1) Initialization Compute L = I − D−1 A. (2) Trimming Let Ω = Ld10(n0 −1)/9e (L> −1 `1 ) (3) Perturbed Sparse Recovery P (a) y = i∈Ω `i + `1 (b) Solve z# = arg min{kLΩ z − yk2 s.t. z ∈ R|Ω| and kzk0 ≤ n0 /9} using the SP algorithm (c) Λ# = supp(z# ).  Output: C1# = {1} ∪ Ω \ Λ# . Next we show that Algorithm 4 succeeds almost surely. Theorem 8.2. Let G be a graph drawn at random from the G(n, k, p, q) model. Suppose that k = O(1) with respect to n and either: 1. q = Q n and p = √ P ln(n) n ln(ln(n)) with Q and P being constants and P > 979, or with Q → ∞ as n → ∞ and p = 2. q = Q ln(n) n large enough n. P ln(n) √ n with P → ∞ as n → ∞ and Q P < 1 979 for Then Algorithm 4 will recover C1 (that is, C1# = C1 ) almost surely. Proof. For notational convenience let s := (n0 − 1)/9. In both cases, p ≥ 4k(ln(n))2 /n and so by part 2 of Theorem 3.6, d0min ≥ (1 − α)n0 p almost surely for α = o(1) with respect to n. In case 1, by (i) of Theorem 3.4 in [25], dmax ≤ ln(n)/(ln(ln(n)) − ln(ln(ln(n))) almost surely. Ignoring the triple-logarithmic term: d d 1 r0 max 0i ≤ max ≤ √ =: √ i di P (1 − α) n0 n0 d0min with r0 < 1/979 for large enough n as α = o(1). In case 2, by (ii) of Theorem 3.4 in [25], dmax ≤ Q ln(n) almost surely, and so: max i di dmax Q/P r0 ≤ ≤ √ =: √ 0 0 (1 − α) n n0 di dmin 0 23 and again r0 < 1/979 for large enough n. We may thus apply Theorem 8.1 to get that C1 \ {1} ⊂ Ω almost surely. As before we define Λ := Ω ∩ C1c ; it is easy to see |Λ| ≤ n0 /9. The challenge in step (3) of Algorithm 4 is to separate C1 \ {1} from Λ. We do this by solving for 1Λ = 1Ω − 1C1 \{1} instead of 1C1 \{1} , as: X  L0Ω 1Λ = L0Ω 1Ω − 1C1 \{1} = L0Ω 1Ω − L0Ω 1C1 \{1} = `0i − (−`01 ) =: y0 (8.5) i∈Ω and noting that k1Λ k0 ≤ n0 /9, we see that 1Λ is the unique solution to arg min{kL0Ω z − y0 k2 : z ∈ Rd10n0 /9e , kzk0 ≤ n0 /9} (8.6) Defining y to be a perturbation of y0 and writing, as in §5.3, LΩ = L0Ω + EΩ : ! y := X i∈Ω Defining e = e1 + P i∈Ω ei `i + `1 = X `0i + i∈Ω X ei + `01 + e1 = y0 + e1 + i∈Ω X ei i∈Ω we recognize the problem: z# = arg min{kLΩ z − yk2 : z ∈ Rd10n0 /9e , kzk0 ≤ n0 /9} (8.7) as a totally perturbed version of (8.6). Thus, we may apply the results of §4.3 to bound kz# − 1Λ k2 . As in §4.3, we define δt := δt (L0 ) and δ̂t := δt (L). (We refer the reader to §4.3 for the definitions of sL0 , y , ρ̂ and τ̂ .) Let us bound on these quantities. Observe that in both cases, p >> (ln(n0 ))2 /n0 and by assumption k is O(1) with respect to n, thus as in the proof of Theorem 5.10 we get sL0 = √ 8βr/3 = 8βr0 /(3 n0 ), for n0 large enough. Applying the result of Theorem 5.10 with t = 3s = n0 /3: 1 D2 D3 r 1 + D1 r + √ + √ + O(r2 ) + o( √ ) 3 n0 n0 n0 1 (D1 r0 + D2 ) D3 r0 1 1 1 (D1 r0 + D2 ) 1 = + + + O( ) + o( √ ) = + + o( √ ). √ √ 3 n0 n0 n0 n0 3 n0 n0 δ̂3s ≤ Hence for large enough n0 , we certainly have δ̂3s ≤ 0.4859 as required. In fact, let us take n0 large enough such that δ̂3s ≤ 1/3 + 1/18 = 7/18 ≈ 0.39. Choosing n0 larger if necessary, we shall also assume that sL0 < 1/3. In this case, a straightforward, but tedious calculation will reveal that ρ̂ ≤ 0.7 and similarly τ̂ < 166 (see the statement of Theorem 4.6 for the definitions of ρ̂ and τ̂ ). We now turn our attention to y . p p √ ky0 k2 = kL0Ω1 1Λ k2 ≥ 1 − δs k1Λ k2 = 1 − δs s while kek2 = kE1Ω + e1 k2 ≤ kEk2 k1Ω∪{1} k2 ≤ 2βr + O(r2 ) So we have √ 10s. √  √ 2 10 2βr + O(r2 ) kek2 2 10βr0 1 √ y := = =p + o( √ ) 0 ky k2 n0 1 − δs n0 (1 − δs ) Appealing to Theorem 5.10 with s = n0 /9: δs ≤ 1/9 + 64p−1/2 1 + o( √ ). √ 9 n0 n0 24 Again, we will assume that n0 is large enough such that δs ≤ 2/9 ≈ 0.22. Under this assumption: √ βr0 2 10 βr0 y ≤ p √ ≤ 8√ n0 7/9 n0 Finally, we use Theorem 5.10 again, this time with t = s = n0 /9: δ̂s ≤ 1/9 + 1 D1 r0 + D2 + o( √ ) √ n0 n0 and take n0 large enough such that δ̂s ≤ 2/9 (this is possible as D1 and D2 are O(1) with respect to n0 ). Now Theorem 4.6 guarantees that ! p kxm − 1Λ k2 1 + δ̂s ≤ τ̂ + 1 (sL0 + y ) k1Λ k2 1 − sL0 Where m := ln(sL0 + y )/ ln(ρ̂) = O(ln(n0 )). Substituting in for the various constants: ! p √  1 + 2/9 kxm − 1Λ k2 8βr0 166( 11)(32) βr0 8βr0 = < (166) √ +√ √ k1Λ k2 1 − 1/3 3 n0 n0 6 n0 √  n0 βr0 2937 √ = 979βr0 ⇒kxm − 1Λ k2 < 3 n0 As the Lemma 8.3 below, as long as kxm − 1Λ k2 < 1, we have that supp(xm ) = supp(1Λ ). Because β → 1 and r0 < 1/979, this will hold for large enough n0 .  Lemma 8.3. Suppose that x∗ ∈ Rn is a binary vector with kx∗ k0 = t, and x ∈ Rn is any other vector that also has kxk0 = t. If kx∗ − xk2 < 1 then supp(x) = supp(x∗ ). Proof. Suppose otherwise. Then there exists an i ∈ supp(x∗ ) \ supp(x). Clearly: kx∗ − xk2 ≥ |x∗i − xi | = |1 − 0| = 1 which contradicts the hypotheses.  As mentioned in the introduction, we may iterate Algorithm 4 to find all the clusters of G. We call this algorithm Iterated Single Cluster Pursuit, or ISCP. 9 Computational Complexity and Extensions In this section we bound the computational complexity and explain some extensions. 9.1 Computational Complexity In this subsection we show that Algorithm 4 is faster than existing spectral methods. We do this by determining the approximate number of operations required in each step of Algorithm 4. Throughout, we shall assume that A and L are sparse matrices. P 1. Computing di = j Aij requires di operations. We can safely assume that di = d0i + di ≤ n0 so the cost of computing each di is at most O(n0 ) This needs to be done a total of n times to compute D = diag(d1 , . . . , dn ), giving a total cost of O(nn0 ). 25 2. The cost of the thresholding step is dominated by the matrix-vector multiply L> −1 `1 . Because `1 has d1 + 1 ≤ n0 non-zero entries, the cost of this is bounded by O(nn0 ). 3. The computational cost of solving the perturbed sparse recovery problem in step 3 using SP is equal to the number of iteration times the cost of each iteration. As shown in the proof of Theorem 8.2, it suffices to perform O(ln(n0 )) = O(ln(n)) iterations. The cost of each iteration is determined by calculating the cost of each step in the iterative part of SP (see Algorithm 3): k−1 ) is dominated by the cost of the matrix-vector multiply L> rk−1 , (a) Computing Ls (L> Ωr Ω hence is O(nn0 ). (b) Solving the least square problem in step (2) using a good numerical solver (we used MATLAB’s lsqr algorithm) is on the order of the cost of a matrix-vector multiply, i.e. O(nn0 ), as explained in [38]. (c) The cost of sorting and thresholding (step (3)) is O(n ln(n)). (d) Finally the cost of computing the new residual rk in step (4) is dominated by the matrix k vector multiply L> Ω1 r , hence is O(nn0 ). We conclude that the cost of a single iteration of the SP Algorithm is O(nn0 ), and so the cost of step 3 of Algorithm 4 is O(n ln(n)n0 ) Thus, the number of computations required to find a single cluster using Algorithm 4 is O(n ln(n)n0 ). To find all the clusters C1 , . . . , Ck one can iterate Algorithm 4 k − 1 times. The cost of this is certainly less than O(kn ln(n)n0 ) = O(n2 ln(n)). 9.2 Extensions 1. Our Algorithm 4 can be extended to deal with the communities of non-equal size. Hence, our study can be extended too. A numerical example is included in the next section to demonstrate this extension. For simplicity, we leave the study for the interested reader. 2. Although Algorithm 4 works on binary adjacency matrices, it handles weighted adjacency matrices just as well (see §10.2.2). 3. As mentioned in the introduction, graph clustering can also be applied to more general data sets. Given any (finite) set of points X = {x1 , . . . , xn } in some metric space (M, d), there are several ways to associate a graph on n vertices to X. For example, we could attach an edge between vertices i and j whenever d(xi , xj ) ≤ C for some constant C. Alternatively, for each vertex i we could determine the K closest points to xi , say {xj1 , . . . , xjK }, and insert the edges {i, j1 }, . . . , {i, jK } to obtain the K-nearest neighbours graph GK . Empirically, we have found the latter approach to perform better, as dmin (GK ) = K giving better control over the quantities ri crucial to the analysis of Algorithm 4. See §10.2.2 for an example of this approach. 4. Algorithm 4 can easily be extended to the co-clustering problem, as described in [15]. Briefly suppose that we are given two categorically different sets of variables X = {x1 , . . . , xn } and Y = {y1 , . . . , ym } as well as a n × m matrix B such that the Bij -th entry represents the correlation between xi and yj . The goal of co-clustering is to simultaneously partition X and Y into subsets X = X1 ∪ . . . Xk and Y = Y1 ∪ . . . ∪ Yk such that the correlations between x ∈ Xi and y ∈ Yi are strong while the correlations between x ∈ Xi and y ∈ Yj for i 6= j are weak. As pointed out by Dhillon in [15], one can regard this as a graph clustering 26 problem for a weighted5 bipartite graph with vertex set V = {u1 , . . . , un , v1 , . . . , vm } and weights w(ui , vj ) = Bij , w(ui , uj ) = w(vi , vj ) = 0. The adjacency matrix and Laplacian of G are:     0 B In×n −D−1 B X A= L= > B> 0 −D−1 Im×m Y B where DX represents the row sums of B while DY represents the column sums. Assume temporarily that instead of clusters G has k connected components C1 , . . . , Ck . Each GCi will be a bipartite graph, and Ci splits as Ci = CiX ∪ CiY where CiX corresponds to Xi and similarly > > CiY corresponds to Yi . The indicator vector will split similarly: 1Ci = [1> Xi 1Yi ] and: 1Xi − D−1 X B1Yi = −1 > 1Yi − DY B 1Xi  0 = L1Ci  We may convert these two ‘first-order’ equations into a single ‘second-order’ equation as 1Yi = > D−1 Y B 1Xi and so:   −1 > −1 −1 > 0 = 1Xi − D−1 BD B 1 = I − D BD B 1Xi X i X Y X Y −1 > Defining the ‘bi-partite Laplacian’ as LBP = I − D−1 X BDY B we see that if x1 ∈ X1 then the indicator vector 1X1 is the unique solution to: arg min{kzk0 : z ∈ Rn , LBP z = 0 and z1 = 1} −1 > once we have found 1X1 we can recover 1Y1 as 1Y1 = DY B 1X1 . Returning to the clustering problem, we see that we may approximate 1X1 ( and hence 1Yi ) by solving the problem arg min{kLBP −1 z − (−`BP,1 )k2 : z ∈ Rn−1 , kzk0 ≤ nX 0 − 1} using Algorithm 4, where nX 0 is the size of the clusters Xi . We leave the technical analysis of this approach to the interested reader. 5. In future work, we intend to show how Algorithm 4 can be adapted into an ‘online’ algorithm which allows one to rapidly update the community assignments as more vertices are added to the graph. 10 Numerical Examples 10.1 Synthetic Data We tested Single Cluster Pursuit (SCP, Algorithm 4) on graphs drawn from the SBM. We implemented this algorithm in MATLAB 2016b and run on a mid-2010 iMac computer with 8 GB of RAM and a 3.06 GHz Intel Core i3 processor. For comparison we used the Trembley, Puy, Gribonval and Vandergheynst implementation of Spectral Clustering (SC, Algorithm 1) included in their Compressive Spectral Clustering toolbox available at http://cscbox.gforge.inria.fr/ ([45]). 5 We assume that the correlations Bij are non-negative 27 10.1.1 Example 1 Typical output of SCP applied to randomly drawn graphs from the SMB G(n, k, p, q) with p = √ P ln(n)/ n and q = Q ln(n)/n as in case 2 of Theorem 8.2 is shown in the third frame of figure 1. Both SCP and SC succeed in finding cluster 1 without error (indeed SC finds all clusters without error) but SCP is faster, taking 0.0262 seconds compared to the 0.1018 seconds required by SC. We remark that even for Q, P such that Q/P >> 1/979 SCP is successful, suggesting that the bounds in Theorem 8.2 are too conservative. √ , 2 ln(n) Figure 1: The adjacency matrix of a graph drawn from G(1000, 5, 2 ln(n) n ) is shown in the top n left. The same matrix, with its rows and columns randomly permuted (using the same permutation for both) is shown in the top right. The output of SCP applied to the permuted matrix is shown in the bottom left, while the output of SC on the same matrix is shown on the bottom right. 10.1.2 Example 2 We then tested Iterated SCP (ISCP) for graphs randomly drawn from the SBM G(n, k, p, q) with √ p = P ln(n)/ n and q = Q ln(n)/n. Typical output is shown in Figure 2. Again, both algorithms are successful (that is, both find all 10 communities without error). 28 √ Figure 2: The adjacency matrix of a graph drawn at random from G(5000, 10, 4 ln(n) , 4 ln(n) n ) is shown n in the top left. The same matrix, with its rows and columns randomly permuted (using the same permutation for both) is shown in the top right. The output of SCP applied to the permuted matrix is shown in the bottom left, while the output of SC on the same matrix is shown on the bottom right. 10.1.3 Example 3 Next, we tested the resilience of SCP to noise by running it on G drawn at random from G(2400, 6, 0.5, q) with q increasing from 0 to 150/2000. For each q, we ran SCP on 10 different G drawn independently and at random from G(2400, 6, 0.5, q) and computed the average fraction of indices that were misclassified. Figure 3 shows the result of this experiment, with E[di ] = q(n − n0 ) on the x-axis. As observed in Experiment 1, SCP performs much better than theoretically guaranteed by Theorem 8.2. Indeed, Figure 3 demonstrates that SCP detects community 1 without error up until E[di ] = 40, at which r ≈ 40/200 = 1/5. 29 Figure 3: Fraction of indices misclassified by SCP, for G ∈ G(2400, 6, 0.5, Q/2000). The horizontal axis represents Q, that is, the level of ‘noise’ in the graph. The vertical axis represents the fraction of misclassified vertices = |C1# \ C1 |/|C1# |. As can be seen, SCP performs without error until Q ≈ 40, well beyond the theoretical guarantees given by Theorem 8.2 10.1.4 Example 5 In our final example, we use ISCP to solve the co-clustering problem, as discussed in §9.2. Typical output is shown in image 4 Figure 4: A 2000 × 1000 binary matrix with 10 equally sized block, randomly permuted and then co-clustered using ISCP, applied as discussed in §9.2. 10.1.5 Example 4 Finally we compared the run times of SCP, SC and ISCP on G(n, k, p, q) for increasing n. We studied √ three regimes: constant k, constant n0 (cluster size) and k, n0 = O( n). In all three cases we fixed √ p = 2 log(n)/ n and q = 2 log(n)/n. The results of these experiments are presented in figures 5c - 5b (the run times are in seconds, and are the average of ten independent trials for the same n). As is clear, SCP significantly outperforms SC in finding a single cluster. Moreover, when k is large enough compared to the number of vertices (n), ISCP finds all clusters faster than SC. 30  (a) Varying k from 20 to 120 and n accordingly, while fixing n0 . G ∈ G 400k, k,  (b) Varying k, n0 and n. G ∈ G kn0 , k, 2 log(n) 2 log(n) √ , n n  log(n) (c) Varying n and n0 while fixing k. G ∈ G n, 40, 2√ , (n) 2 log(n) 2 log(n) √ , n n   2 log(n) n  Figure 5: Comparing SCP, ISCP and SC for graphs drawn from the SBM of increasing size. As can be seen, SCP is significantly faster than SC 31 10.2 Real Data Sets We now present two examples of SCP and ISCP applied to real-world data sets. 10.2.1 Political Blogs Data Set The polblogs data set is a collection of 1494 political weblogs, or blogs, collected by Adamic and Glance ([4]) prior to the 2004 American presidential election. The data is presented as an unweighted, undirected graph, with vertices corresponding to the blogs, and edges between blogs i and j if there is a hyperlink from i to j, or vice versa. This data set is well-studied (see, for example [32], [39] and [42], amongst others), and is a good test case for at least two reasons: 1. In addition to a natural division into two roughly equally sized clusters (liberal vs. conservative), the data set exhibits additional clustering at smaller scales. That is, within the set of all liberal blogs, one can identify subclusters of blogs, and similarly for the conservative blogs. This is explored further in [42]. 2. The ground truth for the division into liberal vs. conservative is known, as Adamic and Glance ([4]) manually labelled the data set. This provides an opportunity to verify one’s results that is rare for real-world data sets. Our methodology was as follows. We follow Olhede and Wolfe ([42]) in using only the 1224 blogs with links to at least one other blog in the data set. As SCP can be thrown off by low degree vertices ( these will have high values of ri ) we experimented with different thresholds. That is, we discarded vertices of degree lower than dthresh for varying values of dthresh . We then used SCP to detect a cluster containing an arbitrary liberal blog, of size approximately equal to the number of liberal blogs. We call this cluster Cluster 1 (C1 ). We call the remaining vertices Cluster 2 C2 . The results are tabulated in ??. We record the number of vertices left after thresholding, the percentage of the first cluster consisting of liberal blogs, the percentage of the second cluster consisting of conservative blogs and the time taken. The values shown are the averages of ten independent runs. dthresh 0 2 4 6 8 10 12 14 16 18 # of vertices 1224 1087 903 813 735 693 644 596 547 505 % of C1 liberal 63.71 71.57 81.45 89.12 91.95 93.14 93.95 93.05 94.24 93.97 % of C2 conservative 66.93 75.68 83.86 91.06 93.69 94.57 95.32 94.66 95.39 94.87 time (in seconds) 0.0380 0.0928 0.0467 0.0479 0.0428 0.0411 0.0256 0.0377 0.0379 0.0225 Table 1: Results of SCP applied to the polblogs data set for varying degree thresholds. When dthresh = 10 the fraction of cluster 1 classified as liberal, and the fraction of cluster 2 identified as conservative, closely resemble the compositions reported by Newman in [39] As is clear, increasing dthresh above 10 makes little difference. Our results also agree with the clusters found by Newman in [39], where he finds one cluster which is 93% liberal, and a second 32 cluster which is 97% conservative. Of course, to achieve this accuracy we have had to discard over 40% of our data points. An interesting future line of research would be to improve the handling of low degree vertices by SCP. To detect clustering at a finer scale, we ran SCP to find a cluster of size 80 containing a randomly selected liberal blog (smithersmpls.com). The output of this is shown in figure 7. As can be seen by the increased density of the top-left hand corner, our algorithm finds a subset of blogs containing smithersmpls.com that are more densely connected to each other than they are to the rest of the data set. We remark that this experiment took approximately 0.06 seconds, so with even modest computational resources one could investigate clustering at a large range of scales in such a data set. Figure 6: Typical Output of SCP applied to the polblogs data set with dthresh = 10. Figure 7: Detecting fine scale structure in the polblogs data set. The top left hand corner represents a sub-cluster of 80 liberal blogs containing a given randomly selected liberal blog. 33 10.2.2 Gene Expression Data Set Our second data set consists of Gene Expression values collected via Microarray for a sample of Neurospora crassa at 13 different time points, originally studied in [16]. The data consists of 2436 time series, one for each Gene of interest, consisting of 13 scaled expression readings. Each scaled expression reading is a floating point number between 4 and 13. We treat this data as a set of 2436 data points X = {x1 , . . . , x2436 } in R13 . We then constructed an Affinity Matrix A1 as suggested √ in [41] defined as A1ij = exp(−kxi − xj k22 /σ 2 ). Here σ was chosen to be 10 although we note that experimenting with other values of σ did not qualitatively change the results. To promote sparsity, we added the additional step of constructing a K-nearest-neighbours adjacency matrix from A1 by retaining the (weighted) edge {i, j} if and only if xj is among the K nearest neighbours of xi or vice versa. Call the resulting adjacency matrix A2,K . We remark that, much like the parameter σ used in constructing A1 , varying K did not qualitatively affect the results obtained. Thus, we shall fix K = 100 and refer to A2,100 simply as A2 . Figure 8 shows the results of this preprocessing in reverse-grayscale (that is, larger values are darker). Figure 8: The adjacency matrix A2 , resulting from preprocessing the Gene Expression Data set originally studied in [16]. We used ISCP to look for clusters on two different scales, informed by the underlying biology of 34 the data set6 . First, we looked for clusters of size 90 − 100, as this is around the number of genes targeted by a single regulator in N. crassa. The results of this experiment are shown in figure 9. In a well studied organism such as N. crassa, the functions of many genes are known. In fact of the 2436 genes in this data set, more than half of them (1442) have been assigned a MIPS label, which is an hierarchical system for labelling genes by function. Moreover, in [16], the genes in this data set are grouped into twelve categories according to their functions, for example ‘signaling’ or ‘transcriptional control and regulation’. Biologically, an interesting question is which functional categories cluster together. Thus, for our second numerical experiment we used ISCP to detect clusters of size 450−550 (results pictured in Figure 10) and recorded the number of genes of each category 7 occurring in each cluster. We can assess the biological significance of this clustering by performing a chi-squared test. The null hypothesis is that there is no relation between the clusters and the functional categories, in which the expected number of genes in Category j contained in Cluster i, in the notation of R Table ??, is Eij = TC j × (Ti /1442). For example, E12 = 164 × (321/1442) = 36.51 Denoting the observed (i.e. O12 = 32, O21 = 19 and so on) we compute the chi-squared test statistic P P counts by Oij 2 as i j (Eij − Oij ) /Eij = 73.87. From a table of values for the χ2 distribution8 , we get that assuming the null hypothesis there is a 0.1% chance that this statistic is greater than 73.40. Thus, we may safely reject the null hypothesis, and assume that the Clustering found by ISCP is related to the functions of the genes in the data set. Category 1 2 3 4 5 6 7 8 9 10 11 TR Cluster size 1 2 3 4 5 13 19 13 15 20 32 36 23 32 41 15 18 21 14 19 22 28 33 17 31 42 24 34 22 35 46 37 57 27 26 36 11 10 17 18 19 10 13 2 15 8 12 11 5 9 20 25 32 22 13 68 70 71 47 66 321 290 318 220 293 527 513 452 554 390 TC 80 164 87 131 157 193 92 59 45 112 322 1442 2436 Cluster Table 2: The number of genes in each category present in each cluster. The row totals represent the number of genes with a MIPS classifier present in each cluster (the total number of genes with a MIPS classifier is 1442). Anomalously high or low counts are shown in bold. 6 and the authors gratefully acknowledge many informative discussions with Professor Jonathan Arnold and his lab For a description of the categories the reader is referred to [16]. The counts are displayed in Table ??. The categories are numbered by the order in which they appear in figure 15 in [16], omitting the category ‘clock’ as there are no MIPS codes associated with this category. 8 Note that there are (#rows − 1)(#columns − 1) = 40 degrees of freedom here 7 35 Figure 9: Output of ISCP applied to A2 , set to find clusters of size 90 − 100. Figure 10: Output of ICSP applied to A2 , set to find clusters of size 450 − 550. 36 References [1] E. Abbe, Community detection and stochastic block models: recent developments, arXiv preprint arXiv:1703.10146 (2017). [2] E. Abbe, A.S. Bandeira, and G. Hall, Exact recovery in the stochastic block model, IEEE transactions on Information Theory Vol. 62 no. 1, pp. 471-487 (2016). [3] E. Abbe and C. Sandon, Community detection in general stochastic block models: Fundamental limits and efficient algorithms for recovery. Foundations of Computer Science (FOCS), 2015 IEEE 56th Annual Symposium on, pp. 670-688 (2015). [4] L. A. Adamic and N. Glance, The political blogosphere and the 2004 us election: divided they blog. Proceedings of the 3rd international workshop on Link discovery, pp. 36-43 (2005). [5] J. M. Aldous and R. J. Wilson, Graphs and Applications: An Introductory Approach, Springer Science & Business Media (2000). [6] A. Beck and M. Teboulle, A fast iterative shrinkage-thresholding algorithm for linear inverse problems, SIAM J. Image Sciences, Vol. 2, pp. 183–202 (2009). [7] T. Blumensath and M. E. Davies, Iterative hard thresholding for compressed sensing, Appl. Comput. Harmon. Anal., Vol. 27, pp.265–274 (2009). [8] E. J. Candès, M. B. Wakin, and S. Boyd, Enhancing sparsity by re-weighted `1 minimization, Journal of Fourier Analysis and Applications, Vol. 14, pp. 877-905 (2008). [9] E. J. Candés, J. K. Romberg, and T. Tao, Stable signal recovery from incomplete and inaccurate measurements, Communications on Pure and Applied Mathematics, Vol. 59 issue 8, pp. 12071223 (2006). [10] E. J. Candés and T. Tao, Decoding by linear programming, IEEE Transactions on Information Theory, Vol 51, pp. 4203–4215 (2005). [11] F. R. K. Chung, L. Lu, and V. Vu. The spectra of random graphs with given expected degrees, Proceedings of the National Academy of Sciences, Vol. 100 issue 11, pp. 6313-6318 (2003). [12] F. R. K. Chung, Spectral graph theory, No. 92, American Mathematical Soc. (1997). [13] M. S. Cline, M. Smoot, E. Cerami, A. Kuchinsky, N. Landys, C. Workman, R. Christmas, I. Avila-Campilo, M. Creech, B. Gross et al., Integration of biological networks and gene expression data using cytoscape, Nature protocols, Vol. 2 issue 10, pp. 2366-2382 (2007). [14] W. Dai and O. Milenkovic, Subspace pursuit for compressive sensing signal reconstruction, IEEE Transactions on Information Theory, Vol. 55 issue 5, pp. 2230-2249 (2009). [15] I. S. Dhillon, Co-clustering documents and words using spectral graph partitioning, Proceedings of the seventh ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 269-274 (2001). [16] W. Dong, X. Tang, Y. Yu, R. Nilsen, R. Kim, J. Griffith, J. Arnold and H-B. Schüttler, Systems biology of the clock in Neurospora crassa, PloS one, 3.8, e3105 (2008). 37 [17] D. L. Donoho and M. Elad, Optimally sparse representation in general (nonorthogonal) dictionaries via `1 minimization, Proceedings of the National Academy of Sciences, Vol. 100 issue 5, pp. 2197-2202 (2003). [18] P. Erdõs and A. Rènyi, On Random Graphs 1, Publicationes Mathematicae Debrecen, Vol. 6, pp. 290-297 (1959). [19] M. Fiedler, A property of eigenvectors of nonnegative symmetric matrices and its application to graph theory, Czechoslovak Mathematical Journal Vol 25.4, pp. 619-633 (1975). [20] S. Fortunato, Community detection in graphs, Physics reports, Vol. 486 issues 3-5 , pp. 75-174 (2010). [21] S. Foucart and H. Rauhut, A Mathematical Introduction to Compressive Sensing, Birkäus Verlag (2013). [22] S. Foucart, Hard thresholding pursuit: an algorithm for compressive sensing, SIAM Journal on Numerical Analysis, Vol. 49 issue 6, pp. 2543-2563 (2011). [23] S. Foucart and M-J. Lai, Sparsest solutions of underdetermined linear Systems via `q minimization for 0 ≤ q ≤ 1, Applied and Computational Harmonic Analysis, Vol. 26 issue 3, pp. 395-407 (2009). [24] B. J. Frey and D. Dueck, Clustering by passing messages between data points, Science Vol. 315 no. 5814, pp. 972-976 (2007). [25] A. Frieze and M. Karoński, Introduction to Random Graphs, Cambridge University Press (2015). [26] L. Hagen and A. B. Kahng, New spectral methods for ratio cut partitioning and clustering, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, Vol. 11 issue 9, pp.1074-1085 (1992). [27] B. Hajek, Y. Wu, and J. Xu, Achieving exact cluster recovery threshold via semidefinite programming, IEEE Transactions on Information Theory Vol. 62.5, pp. 2788-2797 (2016). [28] M. A. Herman and T. Strohmer, General deviants: An analysis of perturbations in compressed sensing, IEEE Journal on Selected Topics in Signal Processing, Vol. 4 issue 2, pp. 342-349 (2010). [29] P. W. Holland, K. B. Laskey, and S. Leinhardt, Stochastic block models: First steps, Social Networks, Vol. 5 issue 2, pp.109-137 (1983). [30] A. K. Jain, Data clustering: 50 years beyond K-means, Pattern Recognition Letters, Vol. 31 issue 8, pp. 651-666 (2010). [31] L. Kaufman and P. J. Rousseeuw, Fitting Groups in Data. An Introduction to Cluster Analysis, Wiley, New York (1990). [32] F. Krzakala, C. Moore, E. Mossel, J. Neeman, A. Sly, L. Zdeborovà and P. Zhang, Spectral Redemption in clustering sparse networks Proceedings of the National Academy of Sciences, Vol. 110 no. 52, pp. 20935-20940 (2013). [33] C. M. Le, E. Levina, and R. Vershynin, Sparse random graphs: regularization and concentration of the Laplacian, arXiv preprint arXiv:1502.03049 (2015). 38 [34] H. Li, Improved analysis of SP and CoSaMP under total perturbations, EURASIP Journal on Advances in Signal Processing 2016, no. 1, pp. 112 (2016). [35] U. Von Luxburg, A tutorial on spectral clustering, Statistics and Computing, Vol. 17 issue 4, pp. 395-416 (2007). [36] A. Montanari and S. Sen, Semidefinite programs on sparse random graphs, arXiv preprint arXiv:1504.05910 (2015). [37] M. C. V. Nascimento and A. De Carvalho, Spectral methods for graph clustering - A survey, European Journal of Operational Research, Vol. 211 issue 2, pp. 221-231 (2011). [38] D. Needell and J. A. Tropp, CoSaMP: Iterative signal recovery from incomplete and inaccurate samples, Applied and Computational Harmonic Analysis, Vol. 26 issue 3, pp. 301-321 (2009). [39] M. E. J. Newman, Modularity and community structure in networks, Proceedings of the National Academy of Sciences, Vol. 103 no. 23, pp 8577-8582 (2006). [40] M. E. J. Newman, D. J. Watts, and S. H. Strogatz, Random graph models of social networks, Proceedings of the National Academy of Sciences, Vol. 99 suppl. 1, pp. 2566-2572 (2002). [41] A. Y. Ng, M. I. Jordan, and Y. Weiss, On spectral clustering: analysis and an algorithm, Advances in Neural Information Processing Systems, pp. 849-856 (2002). [42] S. C. Olhede and P. J. Wolfe, Network histograms and universality of block model approximation, arXiv preprint arXiv:312-5306v3 (2014). [43] J. Shi and J. Malik, Normalized cuts and image segmentation, IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 22 issue 8, pp. 888-905 (2000). [44] R. C. Thompson, Principal submatrices IX: Interlacing inequalities for singular values of submatrices, Linear Algebra and Its Applications, Vol. 5 issue 1, pp. 1-12 (1972). [45] N. Tremblay, G. Puy, R. Gribonval and P. Vandergheynst, Compressive spectral clustering, Machine Learning, Proceedings of the Thirty-third International Conference (ICML 2016), pp. 20-22 (2016). [46] J. A. Tropp, Greed is good: Algorithmic results for sparse approximation, IEEE Transactions on Information Theory, Vol. 50 issue 10, pp. 2231-2242 (2004). [47] W. W. Zachary, An Information flow model for conflict and fission in small groups, Journal of Anthropological Research, Vol. 33 issue 4, pp. 452-473 (1977). 39
7cs.IT
arXiv:1701.04028v1 [cs.IT] 15 Jan 2017 Using data-compressors for statistical analysis of problems on homogeneity testing and classification Boris Ryabko Andrey Guskov Institute of Computational Technologies of SB RAS Novosibirsk, Russian Federation The State Public Scientific Technological Library of SB RAS, Novosibirsk, Russian Federation Irina Selivanova The State Public Scientific Technological Library of SB RAS, Novosibirsk, Russian Federation Abstract—Nowadays data compressors are applied to many problems of text analysis, but many such applications are developed outside of the framework of mathematical statistics. In this paper we overcome this obstacle and show how several methods of classical mathematical statistics can be developed based on applications of the data compressors. keywords: data compression, hypothesis testing, homogeneity test, classification, universal code. I. I NTRODUCTION Data compression methods (or universal codes) were discovered in the 1960’s and nowadays they are widely used to compress texts for their storage or transmission. In the last thirty years, it was recognized that data compressors can be used for many purposes which are far from file compaction. In particular, it was shown that methods of data compression can be used for prediction and hypothesis testing for time series in the framework of classical mathematical statistics, see [15] and a review there. Later, several authors applied data compressors to problems which are close, in spirit, to homogeneity testing, estimation of correlation and covariance, classifications, clustering and some others; see [3], [4], [10], [11], [18]. The main idea of their approach can be understood from the following example. Suppose that there are three sequences of letters x1 x2 ...xn , y1 y2 ... yk , z1 z2 ...zm and a certain data-compressor ϕ. The sequences x1 x2 ...xn , y1 y2 ... yk obey different probability distributions, whereas z1 z2 ...zm obeys one of them. The goal is to determine this distribution. (It is the well-known “three samples problem”.) If x1 x2 ...xn and z1 z2 ...zm obey the same probability distribution, then, the sequence z1 z2 ...zm will be compressed better after x1 x2 ...xn than after y1 ... yk . More precisely, if one compresses sequences x1 x2 ...xn , y1 y2 ... yk and combined ones x1 x2 ...xn z1 z2 ...zm and y1 y2 ... yk z1 z2 ...zm , the difference |ϕ(x1 x2 ...xn z1 z2 ...zm )| − |ϕ(x1 x2 ...xn )| will be less than |ϕ(y1 y2 ...yk z1 z2 ...zm )|−|ϕ(y1 y2 ...yk )| (Here |U | is the length U .) For instance, let x1 x2 ...xn , z1 z2 ...zm be texts in English, whereas y1 y2 ... yk is in German. Then the English text z1 z2 ...zm will be compressed better after the text in the same language (x1 x2 ...xn ) than after the text in German (y1 y2 ...yk ), i.e. the first difference will be less than the second one. This natural approach was used for diagnostic of the authorship of literary and musical texts, for estimation of closeness of DNA sequences, construction of phylogenetic trees and many other problems ( [3], [4], [6], [10], [11], [18], [19]). Many papers (see [11] and review there) were devoted to the measurement of the interdependence between sequences (or the association, similarity, closeness, etc.), because such measures plays an important rule in clustering, classification and some other methods of text analysis. It is important to note, that their approaches are outside of the framework of mathematical statistics and, in particular, do not give a possibility to reason about consistency of estimates, tests, classifiers, clustering, etc. It is important that the modern data compressors are based on so-called universal codes and the main properties of universal codes are valid for them (as far as asymptotic properties can be valid for a real computer program). A formal definition of universal codes is given in Appendix 1, but here we informally note that universal codes can compress sequences generated by a source with unknown statistics till its Shannon entropy, which, in turn, is a lower limit on lossless compression. Note that nowadays there are many classes of universal III. T HE MAIN THEOREMS codes which are based on different ideas and showed their practical efficiency. Out of the most popular we mention the PPM algorithm, which is used along with the arithmetic code ( [1], [14]), Lempel-Ziv codes ( [20], [21]), Borrows-Willer transformation ( [2], [12]) which is used along with the “book stack” (or MTF) code ( [16], [17]) and some others (see for review ( [13], [15]). In this paper we show how the idea of compression of combined texts described above can be used for solving problems of homogeneity testing, classification, and estimation of a measure of interdependence, or the association. A distinction of the suggested method from other approaches is that it belongs to the framework of mathematical statistics. First we present a theorem which can be considered as a theoretical basis for application of data compressors for solving the problems described above. First, for two words v1 ..vl and u1 ..us we define the following value: |ϕ(v1 ..vl /u1 ..us )| = |ϕ(u1 ..us v1 ..vl )| − |ϕ(u1 ..us )|, (1) where s, l are integers. Informally, it is the length of the codeword for v1 ..vl if it is encoded with the word u1 ..us . Theorem 1. Let µx and µy be stationary ergodic sources generating letters from a finite alphabet A and let their memory be upper-bounded by a certain constant M . Suppose that ...y−t y−t+1 ... y−1 y0 is generated by µy , whereas ...x−t x−t+1 ...x−1 x0 and w1 ...wm , m ≥ 1, are generated by µx in such a way that all three sequences are independent, and let ϕ be a universal code. Define II. D EFINITIONS AND PROBLEM FORMULATIONS First we briefly consider the main properties of socalled universal codes, paying the main attention to their meaning whereas formal definitions of codes, stationary ergodic sources and Shannon entropy are given in Appendix 1 and can be found in [5], [15]. Here we only note that we consider so-called lossless codes ϕ which encode words over alphabet A using words from the binary alphabet {0, 1} in such a way that any word can be decoded without mistakes, i.e. there exists a map ϕ−1 such that for any word w over A ϕ−1 (ϕ(w)) = w. Let a code ϕ be applied to encode sequences generated by a stationary ergodic source µ. The value Rt (ϕ, µ) = 1t |ϕ(x1 ...xt )| − h∞ (µ) is called the redundancy, where h∞ (µ) is the limit entropy, see Appendix 1. (It is known that h∞ (µ) is an attainable lower limit for lossless codes, that is why the difference is called the redundancy.) By definition, the code ϕ is called universal if the redundancy goes to 0 as t grows, i.e. limt→∞ Rt (ϕ, µ) = 0 . (In other words, a universal code compresses sequences generated by any stationary ergodic source till the limit value.) The main goal of the paper is to give a compressionbased solution for the following problems: i) Homogeneity test, where there are several sequences 1 s , ... y1s y2s ...ym , x11 x12 ...x1n1 , ..., xk1 xk2 ...xknk , y11 y21 ...ym 1 s generated either by a single source or by two different ones, and two corresponding hypotheses. We also consider the more general case where there are more than two different sets of sequences. ii) Classification problems, where there are samples 1 s , ... y1s y2s ...ym x11 x12 ...x1n1 , ..., xk1 xk2 ...xknk , y11 y21 ...ym 1 s generated two different (but unknown) sources and z1 ...zl is generated by one of the two. The goal is to determine which of them generated z1 ...zl . iii) Estimation of a so-called measurement of interdependence, or the association. ∆t,k,m = |ϕ(w1 ...wm /y−k y−k+1 ...y−1 y0 )|− |ϕ(w1 ...wm /x−t x−t+1 ...x−1 x0 )| (2) where |ϕ(v1 ..vl /u1 ..us )| is defined in (1). Then there exists such a constant λ and an integer m0 that for any m > m0 there is such an integer L that, for any t > m + L, k > m + L, Eµx Eµy (∆t,k,m ) ≥ λ m + ◦(m) , (3) and, if µx = µy then λ = 0, otherwise λ > 0. Here Eν () is the expectation with respect to the measure ν. The proof is given in Appendix 2, whereas here we give some explanations of the theorem. The theorem compares two cases: the word w1 ...wm is compressed either together with x−t x−t+1 ...x−1 x0 or with y−k y−k+1 ...y−1 y0 . The word w1 ...wm is generated by µx , hence, it should be compressed better with x−t x−t+1 ...x−1 x0 and the value |ϕ(w1 ...wt /x−t x−t+1 ...x−1 x0 )|(= |ϕ(x−t x−t+1 ... x−1 x0 w1 ...wt )|− |ϕ(x−t x−t+1 ...x−1 x0 )|) should be less than |ϕ(w1 ...wt /y−k y−k+1 ...y−1 y0 )|. The theorem shows, that, indeed, the word w1 ...wm is compressed better together with x−t x−t+1 ...x−1 x0 if the lengths of sequences w1 w2 ...wm , x−t x−t+1 ...x−1 x0 and y−k y−k+1 ...y−1 y0 are sufficiently large. Let there be two sets of sequences: X = { x11 x12 ...x1n1 , 1 2 2 , x1 x2 ...x2n2 , ..., xk1 xk2 ...xknk }, and Y = { y11 y21 ..., ym 1 2 s s s 2 2 y1 y2 ...ym2 , ... y1 y2 ...yms }, generated by possibly different measures µx and µy . We consider two hypotheses H0 = {µx = µy } and H1 = {µx 6= µy } and our goal is to develop a statistical test for them using the sets X and Y . First we give an informal description of the suggested test, which will be based on data compression. 2 y, y ∗ ∈ Y the ratios |x|/|x∗ | and |y|/|y ∗ | are upperbounded by a certain constant, then, with probability 1, the Type II error goes to 0. Combine a half of the sequences from the set X into X ∗ bk/2c bk/2c bk/2c x2 ...xnbk/2c (say, x11 x12 ...x1n1 , x21 x22 ...x2n1 , ... , x1 2 1 , ..., , y11 y22 ...ym ) and half of Y (say and y11 y21 ...ym 2 1 bs/2c bs/2c bs/2c ∗ y1 y2 ...ymbs/2c )) into Y . Then compress all other sequences using a universal code ϕ along with X ∗ and Y ∗ . If H0 is true, the values |ϕ(xi1 xi2 ...xini / X ∗ )| , j i = bk/2c + 1, ..., k and |ϕ(y1j y2j ...ym / X ∗ )| , j = j bs/2c+1, ..., s should be evenly mixed. Otherwise, if H1 is true, then, on average, the numbers from the second set should be larger than those from the first one, because the probability distributions of the sequences from i yji yji ...ym and X ∗ are different, whereas the probability j distributions of the sequences xi1 xi2 ...xini and X ∗ are the same (here and below |U | is the number of elements in U ). The test. A more formal description of the suggested test is as follows: i) Denote the set X \ X ∗ by X̂ and Y \ Y ∗ by Ŷ and calculate for any xi1 xi2 ...xini from X̂ the values γi = |ϕ(xi1 xi2 ...xini /Y ∗ )| − |ϕ(xi1 xi2 ...xini /X ∗ )| The proof is given in Appendix 2, but here we give some comments. First, note that there are many tests of homogeneity for 2 × 2 tables and, in principle, any of them can be used. That is why, we do not describe the test Ψα on sizes of n1,1 , n1,2 , n2,1 , n2,2 . Second, the described method can be easily extended from the two-sample problem to the s-sample problem, s > 2. Namely, let there be s, s > 2, sets V1 , V2 , ..., Vs of sequences generated by stationary ergodic sources µ1 , µ2 ..., µs . Let there be the hypotheses H0 = {µ1 = µ2 = ... = µs } and H1 = H̄0 . In this case we carry out calculations based on the scheme described above in order to obtain a so-called s × s table and then apply a test for homogeneity, see ( [7]). Measurement of the interdependence and association. If the hypothesis of homogeneity is rejected, it is natural to measure interdependence. We suggest to measure interdependence between two sets of sequences X and Y (and the corresponding sources) based on the above described 2 × 2 tables. (In the case of the s-sample problem, s > 2, the measures will be based on the s × s table.) This problem is wellinvestigated in the mathematical statistics, see, for example, ( [7], part 33). That is why, we mention such measures only briefly. For 2 × 2 tables we mention the coefficient of association, Q, defined by the equation Q = (n1,1 n2,2 − n1,2 n2,1 )/n1,1 n2,2 + n1,2 n2,1 ) and p the coefficient V = (n1,1 n2,2 − n1,2 n2,1 )/ (n1,1 + n2,2 )(n1,1 + n2,1 )(n1,2 + n2,2 )(n2,1 + n2,2 ), see, ( [7], part 33). It is important to note that there are well-known methods of building standard errors and confidence interval for Q and V ( [7], part 33). (4) j and for any y1j y2j ...ym from Ŷ j j j δj = |ϕ(y1j y2j ...ym /X ∗ )| − |ϕ(y1j y2j ...ym /Y ∗ )| . (5) j j Define n1,1 = |{i : γi ≥ 0}|, n1,2 = |{i : γi < 0}|, n2,1 = |{i : δi < 0}|, n2,2 = |{i : δi ≥ 0}| . (6) ii) Apply the test of the independence for the 2 × 2 table to N2,2 = n1,1 n2,1 n1,2 n2,2 . A detailed analysis of this problem is carried out in [7], part 33. In particular, there is a description of efficient tests for homogeneity problem for the 2×2 table (see part 33.22). We denote this test as Ψα , where α is the level of significance. Note, that there are some requirements for values of n1,1 , n1,2 , n2,1 , n2,2 which should be valid if Ψα is used (see [7]). 1 , ŵ2 = Let there be sequences ŵ1 = w11 w21 ...wm 1 k k k k ..., ŵ = w1 w2 ...wmk , generated by stationary ergodic sources ν1 , ..., νk , correspondingly, where k ≥ 2. There is a new sequence û = u1 u2 ...un , n ≥ 2, and it is known beforehand that it is generated by one of the sources from {ν1 , ..., νk }. The problem of classification is to determine which source generated the sequence û = u1 u2 ...un . By definition, a method of classification is called asymptotically consistent if, with probability 1, the method finds ν which generated the sequence u1 u2 ...un when min(n, m1 , m2 , ..., mk ) goes to infinity. 2 w12 w22 ...wm , 2 Theorem 2. Let µx and µy be stationary ergodic measures whose memory is finite (but, possibly, unknown). If the above described test is applied for testing H0 against H1 along with the test Ψα and the requirements of Ψα for values of n1,1 , n1,2 , n2,1 , n2,2 are valid, then for any code ϕ the Type I error is not grater than α. If ϕ is a universal code, |X| and |Y | go to infinity and the lengths of all sequences from X and Y go to infinity in such a way that for all sequences x, x∗ ∈ X, Method of classification. We suggest the following method of classification: decide that the sequence 3 where P (b) and Q(b) are probability distributions over alphabet B. It is known that for any distributions P and Q the KL divergence is nonnegative and equals 0 if and only if P (a) = Q(a) for all a . Let us describe universal codes, or data compressors. (A detailed description can be found, for example, in [15].) First we note that (as is known in Information Theory) sequences generated by a source p can be ”compressed” on average till the limit Shannon entropy h∞ (p) and, on the other hand, there is no code ψ for which the expected codeword length is less than h∞ (p); see [5]. As defined above, a code ϕ is universal if it compresses till this limit. We will consider universal codes which can be applied to any word x1 ...xs , n > 0, from a certain alphabet A and such that the following natural property is valid: for any words u, v, |v| > 0, u1 u2 ...un was generated the source νj for which i j = arg min |ϕ(u1 u2 ...un /w1i w2i ...wm )| . k i=1,...,k (7) Theorem 3. Let ν1 , ..., νk be stationary ergodic measures whose memories are finite (but, possibly, unknown). If ϕ is a universal code and the lengths of all sequences û, ŵ1 , ŵ2 , ..., ŵk go to infinity in such a way that lim |û|/ min |ŵj | = 0 , |û|→∞ j (8) then the described method is asymptotically consistent. IV. A PPENDIX 1 Let τ be a stationary ergodic source generating letters from a finite alphabet A. (Definitions can be found in [5].) The m− order (conditional) Shannon entropy and the limit Shannon entropy are defined as follows: X X τ (v) hm (τ ) = − τ (a| v) log τ (a| v), v∈Am |ϕ(uv)| − |ϕ(u)| > 0 . a∈A h∞ (τ ) = lim hm (τ ). m→∞ For any universal code ϕ we define a measure πϕ as follows: (9) It is known that for any integer m hm (τ ) ≥ hm+1 (τ ) ≥ h∞ (τ ), (13) πϕ (x1 x2 ...xt ) = 2−|ϕ(x1 x2 ...xt )| , (10) (14) where x1 x2 ...xt is a word over A. It is known that for any t X πϕ (u) = 1 , (15) see [5]. Now we define codes. Let A∞ be the set of all infinite words x1 x2 . . . over the alphabet A. A data compression method (or code) ϕ is defined as a set of mappings ϕn such that ϕn : An → {0, 1}∗ , n = 1, 2, . . . and for each pair of different words x, y ∈ An ϕn (x) 6= ϕn (y). Informally, it means that the code ϕ can be applied for compression of each message of any length n over the alphabet A and the message can be decoded if its code is known. It is also required that each sequence ϕn (u1 )ϕn (u2 )...ϕn (ur ), r ≥ 1, of encoded words from the set An , n ≥ 1, can be uniquely decoded into u1 u2 ...ur . Such codes are called uniquely decodable. For example, let A = {a, b}, the code ψ1 (a) = 0, ψ1 (b) = 00, obviously, is not uniquely decodable. It is well known that if a code ϕ is uniquely decodable then the lengths of the codewords satisfy the following inequality (Kraft inequality): Σu∈An 2−|ϕ(u)| ≤ 1 , see, for ex., [5]. Moreover, if the sum Σu∈An 2−|ϕ(u)| is less than 1, there exists such a code ϕ∗ that i) ∗ Σu∈An 2−|ϕ (u)| = 1 , and |ϕ∗ (u)| ≤ |ϕ(u)| for any word u, [5]. (Informally, it means, that ϕ∗ compresses better.) So, we can consider only codes for which Note that this equation shows that the code ϕ estimates the (unknown) probability precisely, where T grows. Σu∈An 2−|ϕ(u)| = 1 . V. A PPENDIX 2: PROOFS u∈At (see the Kraft inequality and (11)). Now we consider an application of universal codes (or data compressors) which is the main tool for solving the problems mentioned in Introduction. From (1) and (14) we immediately obtain that |ϕ(v1 ..vl /u1 ..us )| = − log(πϕ (v1 ..vl |u1 ..us )) (16) and the right part is defined correctly, see (13). The following property of universal codes will play an important role in what follows. Let µz be a stationary ergodic source generating letters from an alphabet A and ϕ be a universal code. For any integer m ≥ 1 and w1 ...wm ∈ Am with probability 1 lim log T →∞ (11) We will use a so-called Kullback-Leibler (KL) divergence, which is defined by X P (b) , (12) D(P ||Q) = P (b) log Q(b) πϕ (w1 w2 ...wm |z−T ...z0 ) = 0. µz (w1 w2 ...wm |z−T ...z0 ) (17) Proof of Theorem 1. First we prove the following Claim. X Eµx Eµy µx (w1 w2 ...wm ) w1 w2 ...wm b∈B 4 µx (w1 ...wm |x−t x−t+1 ...x0 ) = (m − M )λ + O(1) , µy (w1 ...wm |y−k y−k+1 ...y0 ) (18) where M is a upper bound of memories of µx and µy , and λ is such a constant that λ = 0 if µx = µy and λ > 0 otherwise. Proof of the claim. The left side can be presented as follows: X Eµx Eµy µx (w1 w2 ...wm ) X +... + log w1 ...wM µx ((wM +1 |w1 ...wM ) µy ((wM +1 |w1 w2 ...wM ) X +Eµx Eµy ( µx (w1 w2 ...wM −1 ) w1 w2 ...wM −1 X µx (w1 ...wm |x−t x−t+1 ...x0 ) = µy (w1 ...wm |y−k y−k+1 ...y0 ) X Eµx Eµy ( µx (w1 w2 ...wm−1 ) µx ((wM |x0 w1 w2 ...wM −1 ) + ... µy ((wM |y0 w1 w2 ...wM −1 ) log + X µx (w1 ) log w1 w1 w2 ...wm−1 µx (w1 |x−M +1 x−M +2 ...x0 ) ) . (20) µy (w1 |y−M +1 y−M +2 ...y0 ) For any function ψ(ue+1 , ..., ue+b ) and any measure ν(u1 u2 ...ue ue+1 ...ue+b ) X ν(u1 u2 ...ue ue+1 ...ue+b ) µx (wm |w1 w2 ...wm−1 ) wm µx (wm |x−t x−t+1 ...x0 w1 w2 ...wm−1 ) µy (wm |y−k y−k+1 ...y0 w1 w2 ...wm−1 ) X + µx (w1 w2 ...wm−2 ) u1 u2 ...ue ue+1 ...ue+b ψ(ue+1 , ..., ue+b ) = w1 w2 ...wm−2 X µx (wM |x0 w1 w2 ...wM −1 ) wM log log µx (wM +1 |w1 ...wM ) wM +1 log w1 w2 ...wm X X µx (w1 ...wM ) X ν(ue+1 ...ue+b )ψ(ue+1 , ..., ue+b ) , ue+1 ...ue+b µx (wm−1 |w1 w2 ...wm−2 ) where e and b are integers. Having taken into account this equation, stationarity µx and µy , equations (V), (V) and (V), we obtain X Eµx Eµy µx (w1 w2 ...wm ) wm−1 µx (wm−1 |x−t x−t+1 ...x0 w1 w2 ...wm−2 ) µy (wm−1 |y−k y−k+1 ...y0 w1 w2 ...wm−2 ) X µx (w1 |x−t x−t+1 ...x0 ) +... + µx (w1 ) log ) . (19) µ y (w1 |y−k y−k+1 ...y0 ) w log w1 w2 ...wm µx (w1 ...wm |x−t x−t+1 ...x0 ) = µy (w1 ...wm |y−k y−k+1 ...y0 ) X (m − M ) µx (w1 w2 ...wM ) 1 log It is supposed that the memory of µx and µy is upper-bounded by M . Hence, by definition, it means that µr (v|ui ui+1 ...uj ) = µr (v|uj−M +1 uj−M +2 ...uj ), where j ≥ i+M −1. From this equation and the previous one we obtain the following equation: X Eµx Eµy µx (w1 w2 ...wm ) w1 w2 ...wm−2 X µx (wM +1 |w1 w2 ...wM ) wM +1 w1 w2 ...wm log µx ((wM +1 |w1 w2 ...wM ) + O(1) . µy ((wM +1 |w1 w2 ...wM ) µx (w1 ...wm |x−t x−t+1 ...x0 ) = µy (w1 ...wm |y−k y−k+1 ...y0 ) From properties of K-L divergence (see (12) ) we can X X see that λ > 0 if µx 6= µy and, obviously, λ = 0, if µx (w1 w2 ...wm−1 ) µx (wm |w1 w2 ...wm−1 ) µx = µy . The claim is proven. w1 w2 ...wm−1 wm Let us proceed with proof of the theorem. Having µx (wm |wm−M ...wm−1 ) taken into account the definitions (16) and (1), we obtain log that µy (wm |wm−M ...wm−1 ) X X Eµx Eµy (∆t,k,m ) = + µx (w1 ...wm−2 ) µx (wm−1 |w1 ...wm−2 ) X X X log w1 ...wm−2 wm−1 u−t u−t+1 ...u0 ∈At+1 v−k v−k+1 ...v0 ∈Ak+1 w1 w2 ...um ∈Am µx (wm−M −1 ...wm−2 ) log µy (wm−M −1 ...wm−2 ) µy (v−k v−k+1 ...v0 )µx (u−t u−t+1 ...u0 )µx (w1 w2 ...um ) 5 log πϕ (w1 ...wm |u−t u−t+1 ...u0 ) . πϕ (w1 ...wm |v−k v−k+1 ...v0 ) [5] Cover, T. M., Thomas, J. A., 2006. Elements of information theory. Wiley-Interscience, New York, NY, USA. [6] Ferragina, P., Giancarlo, R., Greco, V., Manzini, G., Valiente, G., 2007. Compression-based classification of biological sequences and structures via the universal similarity metric: experimental assessment. BMC bioinformatics 8 (1), 1. [7] Kendall, M., Stuart, A., 1961. The advanced theory of statistics; Vol.2: Inference and relationship. London. [8] Khmelev, D. V., Teahan, W. J., 2003. A repetition based measure for verification of text collections and for text categorization. In: Proceedings of the 26th annual international ACM SIGIR conference on Research and development in informaion retrieval. ACM, pp. 104–110. [9] Kieffer, J. C., Yang, E.-H., 2000. Grammar-based codes: a new class of universal lossless source codes. IEEE Transactions on Information Theory 46 (3), 737–754. [10] Kukushkina, O. V., Polikarpov, A., Khmelev, D. V., 2001. Using literal and grammatical statistics for authorship attribution. Problems of Information Transmission 37 (2), 172–184. [11] Li, M., Chen, X., Li, X., Ma, B., Vitányi, P. M., 2004. The similarity metric. IEEE transactions on Information Theory 50 (12), 3250–3264. [12] Manzini, G., 2001. An analysis of the burrowswheeler transform. Journal of the ACM (JACM) 48 (3), 407–430. [13] Rissanen, J., Jul. 1984. Universal coding, information, prediction, and estimation. Information Theory, IEEE Transactions on 30 (4), 629 – 636. [14] Rissanen, J., Langdon, G. G., 1979. Arithmetic coding. IBM Journal of research and development 23 (2), 149–162. [15] Ryabko, B., Astola, J., Malyutov, M., 2016. Compression-Based Methods of Statistical Analysis and Prediction of Time Series. Springer. [16] Ryabko, B. Y., 1980. Data compression by means of a book stack. Problemy Peredachi Informatsii 16 (4), 16–21. [17] Ryabko, B., Horspool, N. R., Cormack, G. V., Sekar, S., Ahuja, S. B., 1987. Technical correspondence. Communications of the ACM 30 (9), 792–797. [18] Teahan, W. J., Harper, D. J., 2003. Using compression-based language models for text categorization. In: Language modeling for information retrieval. Springer, pp. 141–165. [19] Vitányi, P. M., 2011. Information distance in multiples. IEEE Transactions on Information Theory 57 (4), 2451–2456. [20] Ziv, J., Lempel, A., 1977. A universal algorithm for sequential data compression. IEEE Transactions on information theory 23 (3), 337–343. [21] Ziv, J., Lempel, A., 1978. Compression of individual sequences via variable-rate coding. IEEE Transactions on Information Theory 24, 530–536. (21) The following equation is obvious: log πϕ (w1 ...wm |u−t u−t+1 ...u0 ) = πϕ (w1 ...wm |v−k v−k+1 ...v0 ) log µx (w1 ...wm |u−t u−t+1 ...u0 ) + µy (w1 ...wm |v−k v−k+1 ...v0 ) log πϕ (w1 ...wm |u−t u−t+1 ...u0 ) + µx (w1 ...wm |u−t u−t+1 ...u0 ) log µy (w1 ...wm |v−k v−k+1 ...v0 ) . πϕ (w1 ...wm |v−k v−k+1 ...v0 ) (22) The first term is estimated in the claim, see (V), whereas the second and the third terms can be estimated based on (17). So, from the claim and (17), we can see that, with probability 1, Eµx Eµy (∆t,k,m ) = (m − M )λ + O(1) . The theorem is proven. Proof of the Theorem 2. First we consider the case where H0 is true. It means that the sequences from X̂ and Ŷ obey the same distribution. Hence, γi (4) and δj (5) have the same distribution, too, and the above mentioned test Ψα from [7], part 33, can be applied. Now we consider the case where H1 is true. In this case the length of any sequence grows, so, the length will be grater than m0 from Theorem 1. The number of sequences grows to infinity and the total length of a half of them goes to infinity in such a way that for any integer L the total length will be grater than the sum m + L from Theorem 1. From this theorem we can see that n1,2 and n2,1 goes to 0 and, hence, the Type II error goes to 0. Proof of the Theorem 3. Suppose, that the sequence u1 u2 ...un was generated by νj . Then, we can see from Theorem 1 that, with probability 1, the value i |ϕ(u1 u2 ...un /w1i w2i ...wm )| grows as λi n + ◦(n), λi > k i i i 0, if i 6= j, (i.e. w1 w2 ...wm ) is generated by νi ). On i i the other hand, |ϕ(u1 u2 ...un /w1i w2i ...wm )| = ◦(n). k i i i Hence, |ϕ(u1 u2 ...un / w1 w2 ... wmi )| is minimal when i = j (i.o., u1 u2 ...un is generated by νj ). The theorem is proven. R EFERENCES [1] Bell, T., Witten, I. H., Cleary, J. G., 1989. Modeling for text compression. ACM Computing Surveys (CSUR) 21 (4), 557– 591. [2] Burrows, M., Wheeler, D. J., 1994. A block-sorting lossless data compression algorithm. [3] Cilibrasi, R., Vitanyi, P., 2005. Clustering by compression. IEEE Transactions on Information Theory 51, 1523–1545. [4] Cilibrasi, R., Vitányi, P., De Wolf, R., 2004. Algorithmic clustering of music based on string compression. Computer Music Journal 28 (4), 49–67. 6
10math.ST
Optimization of stochastic lossy transport networks and applications to power grids arXiv:1712.07411v1 [math.OC] 20 Dec 2017 Alessandro Zocca∗ and Bert Zwart† December 21, 2017 Abstract Motivated by developments in renewable energy and smart grids, we formulate a stylized mathematical model of a transport network with stochastic load fluctuations. Using an affine control rule, we explore the trade-off between the number of controllable resources in a lossy transport network and the performance gain they yield in terms of expected transportation losses. Our results are explicit and reveal the interaction between the level of flexibility, the intrinsic load uncertainty and the network structure. Keywords: stochastic network; optimization; lossy transport; total effective resistance; efficiency; robustness; power grids; renewable energy sources. 1 Introduction A transport network is an abstract model describing a structure in which some commodity is transferred from the “source” nodes of the network to the “sink” nodes according to a specified routing that is determined by some external principle or design, see [10, 46]. Examples of transport networks are road networks, railways, pipes, and power grids. In this work we focus in particular on lossy transport networks where a fraction of the transported good is inevitably lost, having in mind as primary application power systems in which part of the transported electricity is lost due to heat dissipation in the line conductors. The main question that we want to address in the present paper is whether these transportation losses can be reduced in the scenario in which we have no direct control on the routing, but some of the nodes of the network have controllable loads. This is the case for power systems in which the line flows are determined by physical laws, but at the same time feature an increasing number of controllable energy resources, like energy storage devices, smart buildings and appliances, and electric vehicles. In the present work we consider a probabilistic model to describe the stochastic fluctuations of the load in (a subset of) the nodes of the network. This is instrumental to model the stochastic load fluctuations due to power demand uncertainty and intermittent generation by renewable energy ∗ Department of Computing and Mathematical Sciences, California Institute of Technology, Pasadena, CA 91125, Email: [email protected] † Centrum Wiskunde and Informatica (CWI), 1098 XG Amsterdam, The Netherlands 1 sources. The current power grids were originally built around conventional power generation systems and therefore they are not equipped to cope with this massive amount of uncertainty, especially in power supply. Managing this uncertainty on such a large scale with existing methods will soon become crucial: in the next decades power grids will have to become more flexible and robust to reduce the likelihood of contingencies and blackouts, whose social and economic impact is enormous. As mentioned earlier, next to the increasing renewable penetration, there is another powerful trend that is driving this pervasive evolution of power system: the advent of distributed energy resources. At a high level, all these resources can be seen as “virtual storage/batteries”, in the sense that over short time-scales they can dynamically reduce their power consumptions and even inject electricity in the power grid when necessary, see [32, 43]. Even if at the present stage these resources are not fully incorporated, they have a huge potential: if their penetration increases and we can actively and optimally control them, then they can make power grids more flexible and at the same time effectively mitigate the volatile nature of renewable power generation and allow a higher share of renewable energy sources. The controllable loads that we consider in this work should be seen as an abstraction of more concrete examples, such as (i) actual energy storage that is neither full nor empty, (ii) distribution grids with ample flexible and/or deferrable load [32, 33, 36, 37] or (iii) conventional generators that can provide balancing services. The stochastic network model considered in this paper aims to understand the potential that these controllable resources can have in mitigating the load uncertainty and in particular the transportation losses due to the stochastic load fluctuations in the network nodes. Specifically, we consider a network with random sources and sinks modelled by an undirected connected weighted graph G consisting of n nodes and m edges to which are associated non-negative weights w ∈ Rm +, and investigate how much could the average total loss be reduced by operating optimally the subset B ⊆ V of nodes with controllable loads. The metric we consider here to quantify the transportation losses due to stochastic fluctuations is a quadratic function of the load profile that has been introduced in [21], where the authors showed that is a good approximation for the true total power losses in AC power grids. It is a scalar quantity that in our setting captures both the correlations in the load fluctuations as well as the role of the controllable loads in that are available in the network. Such a metric generalizes the notion of total effective resistance Rtot (G) of the graph G, also known as Kirchhoff index. This is a key quantity that measures how well connected and robust a network is and for this reason has been extensively studied and rediscovered in various contexts, such as complex network analysis [13], theoretical chemistry (for an overview see [47] and references therein), and probability theory [12]. We then formulate a constrained optimization problem to find the optimal load-sharing factors for the controllable loads. We prove that the solution is unique and give a closed-form expression for the optimal control in which appears an interplay between the network structure, the location of the controllable nodes, and the correlation structure of the load fluctuations. In particular, our result shows how the correlation structure between load fluctuations affects the optimal operation of the network resources and this is extremely relevant in power grids with geographically close wind or solar farms, whose power outputs will be highly correlated. These insights are derived without making Gaussian assumptions on the distribution of the fluctuations. We then use this explicit solution to explore the trade-off between the number of controllable resources available in a network and the performance gain they yield, quantified as transportation 2 loss reduction. The analysis builds on and extends that of the conference paper [48], in which the scenario with exactly two controllable loads has been considered. In particular, the authors show therein that the expected total loss due to fluctuations can be reduced by 25% in a line network by adding one controllable storage device. In the present paper we extended that insight by showing that for large graphs the total expected loss can be on average reduced by a factor (1 + 1/k)/2 when k controllable loads are available. This insight holds when each node in the network is self-sustainable on average. This suggests that, even if power grids are becoming locally more robust and self-supportive, transportation losses can be reduced by up to 50 percent, and the number of controllable loads or balancing services k quantify how close one can get to this reduction. Though our model is stylized, it provides a simple quantitative estimate on the value of balancing services in a scenario where each node in the network is self-sustainable on average. We remark that our stylized model is “static”, in the sense the optimal control we derive does rebalance the total power mismatch in the network in any scenario, but does not depend on the realized load fluctuations. Indeed, it depends only on the network structure, on the location of the controllable loads and on their average covariance structure of the load fluctuations. For this reason our model is not specific for a precise time-scale and provides insights into the value of balancing services both in real-time operations as well as long-term planning. Our work complements a large body of literature on optimal topology design for power grids [11, 17, 21] and on optimal control of multiple controllable devices and generators where often the designed controls, often called participation factors are also affine in the stochastic load fluctuations, see e.g., [1, 5, 6, 18, 19, 22, 30, 34, 39, 40, 41]. Optimal policies for storage management, especially aiming at the mitigation of the uncertainties in wind generation, have been explored in [2, 16, 15, 44], where, however, the physical network is not modelled explicitly. Optimal storage placement can increase network reliability, as shown in [3] by simulation techniques. Storage can also be used for arbitrage, exploiting temporal price differences [8, 9] and the impact of storage on energy markets has been studied in [7, 14]. The rest of the paper is organized as follows. We provide a detailed model description in Section 2. In Section 3 we investigate the optimal load sharing factors in several scenarios. These results are applied in Section 4 where a scaling law is presented for large networks. In Section 5 we report several numerical experiments. Section 6 concludes. 2 Model description In this paper we model a lossy transport network as a weighted graph (G, w), where the graph G is a simple undirected graph G = (V, E) with |V | = n nodes and |E| = m edges and w ∈ Rm + is the collection of edge weights. In the context of power grids, the nodes of G are often referred to as buses, the edges as transmission lines and the quantity wi,j is the susceptance of the transmission line connecting buses i and j. Missing edges can be thought as edges with zero weight. The weighted Laplacian matrix of the graph G is the matrix L ∈ Rn×n defined as (P if i = j, k6=i wi,k Li,j := −wi,j if i 6= j. Denote by λ1 , λ2 , . . . , λn its eigenvalues and by v1 , v2 , . . . , vn the corresponding eigenvectors, which we can take to be pairwise orthogonal. It is well-known that L is a real symmetric positive 3 semi-definite matrix, which means that it has a real non-negative spectrum, i.e., 0 ≤ λ1 ≤ . . . ≤ λn . All the rows of L sum up to zero and thus the matrix L is singular. Under the assumption that G is a connected graph, the eigenvalue λ1 = 0 has multiplicity one and the corresponding eigenvector v1 is the vector with all unit entries, which we denote by 1 ∈ Rn . Let L+ ∈ Rn×n be the Moore-Penrose pseudoinverse of the weighted Laplacian matrix L. Using the eigenspace structure of L, the pseudoinverse L+ can be defined as −1  11T 11T − . L := L + n n + The matrix L+ is also real, symmetric, and positive semi-definite and its spectrum is 0 < λ−1 n ≤ −1 . . . ≤ λ2 . For further spectral properties of graphs, we refer the reader to [38, 45]. Denote by p ∈ Rn the load profile at the network nodes, where pi is the load at node i for every i = 1, . . . , n. In the context of power grids the i-th entry of the vector p models the power generated (if pi > 0) or consumed (if pi < 0) at node i. We say that a load profile p ∈ Rn is balanced if 1T p = 0. Given a network with a balanced load profile p ∈ Rn , we define its total loss H = H(p) as 1 H := pT L+ p. 2 The scalar quantity H is a quadratic form of the load profile vector p and, as such, is always non-negative, thanks to the fact that L+ is a positive semi-definite matrix. The total loss H will be central in our analysis. H is the most natural choice for an efficiency metric in a lossy transport network as H quantifies the total losses occurred in the network when subject to a given load profile. More specifically, for power systems H has been shown by [21] to be good approximation for total power loss in AC power grids. The quantity H has also been considered as measure of the network tension, i.e., the aggregate load of the network in [20, 24], where it is shown to be monotone along a cascade failure, as long as the network remains connected. As we will show later, the total loss H is indeed a generalized total effective resistance in the sense that it quantifies how robust the network G is against a stochastic load profile with a predefined covariance structure. 2.1 Stochastic loads and load-sharing factors In this work we are particularly interested in a transport network with a stochastic load profile, which means that we will take p to be a multivariate random variable. More precisely, we will take p to be of the form p = µ + ω, where µ ∈ Rn is the nominal load profile in the network and ω is a n-dimensional random variable modeling the fluctuations. We henceforth assume that Eω = 0 and denote by Σ ∈ Rn×n the covariance matrix of the load fluctuations, namely Σi,j = cov(ωi , ωj ) = E[ωi ωj ]. Nodes in which there are no stochastic load fluctuations can be modelled by setting all the entries equal to zero in the corresponding row and column of the matrix Σ. We denote by S ⊆ V the subset of nodes with stochastic load fluctuations and we will henceforth assume that |S| ≥ 1. We further assume that the load profile is balanced on average, namely 1T µ = 0. This assumption, however, does not guarantee that every realization of the load profile is balanced: 4 indeed, the total mismatch 1T p in the network is a random variable, which is distributed as the sum of fluctuations, since n X T T T 1 p = 1 (p − µ) = 1 ω = ωi . i=1 Let σ 2 := Var as P n i=1  ωi be the variance of the sum of the load fluctuations, which also rewrites 2 σ = n X Σi,j = 1T Σ1 = tr(Σ11T ). (1) i,j=1 Since we assumed that there is at least one node with stochastic load fluctuations, we have σ 2 > 0. In order to cope with the stochastic fluctuations and, in particular, to keep the network balanced, we assume that load at each node is controllable: for every i = 1, . . . , n, node i can deal with (either Pn generate or store) a controllable fraction αi ∈ R of the realized total mismatch T 1 (p − µ) = i=1 ωi . In other words, we assume that while using the load-sharing coefficients α = (α1 , . . . , αn ) ∈ Rn the net load profile p(α) is given by  p(α) = p1 −α1 n X i=1 ωi , . . . , pn −αn n X   ωi = µ1 +ω1 −α1 i=1 n X ωi , . . . , µn +ωn −αn i=1 n X  ωi . i=1 P For any j = 1, . . . , n, the term αj ni=1 ωi corresponds to the power generated or stored in the corresponding controllable load when using an affine control responsive to stochastic load fluctuations. We can rewrite the net power injection p(α) in matrix form as p(α) = Cα p = Cα (µ + ω) = µ + Cα ω, where Cα ∈ Rn×n is the matrix defined as  1 − α1 −α1 ... −α1  −α2 1 − α2 −α2 . . . −α2  ... .. ..  T . . Cα := I − α 1 =   . .. ..  . −αn . . . −αn 1 − αn (2)     .   Note that the last equality in (2) follows from the fact that 1T µ = 0 since Cα µ = (I − α 1T )µ = µ − 0 · α = µ. When the load-sharing coefficient α is used, the total mismatch in the network is equal to 1T p(α) = 1T Cα (µ + ω) = 1T (I − α 1T )ω = (1T − (1T α)1T )ω. Therefore, since we want the net load profile to be balanced for any realization ω, we need to impose that n X T 1 α= αi = 1. (3) i=1 We remark that the affine control modelled via the load-sharing vector α is a simplification, especially when the controllable loads models energy storage. Indeed, it does not incorporate many details, among which possible ramping constraints or the current state of charge. In our model such details are omitted on purpose to have a mathematically tractable optimization 5 problem and to better identify the interplay between load uncertainty and storage operations. A further simplification we make is that we allow to choose α without invoking line limits, as we also do this for mathematical tractability, see Section 6 for further comments. Note that affine control is fairly common in power systems operations, see, e.g., [4]. 2.2 Expected total loss: definition and properties For any 1 ≤ k ≤ n, we can model a network where exactly k nodes have controllable loads by imposing that the remaining n − k nodes have load-sharing coefficients equal to zero, so that for any such node pi = pi (α). Using the net load profile p(α), the total loss rewrites as 1 H(α) = p(α)T L+ p(α), 2 and therefore {H(α)}α∈Rn is a family of random variables parametrized by the control α. Being a quadratic form and being L+ a positive semi-definite matrix, it immediately follows that H(α) is a non-negative random variable for any α ∈ Rn . The next proposition shows how, leveraging the properties of the matrices L+ and Cα , the expected total loss EH(α) rewrites as the sum of two contributions, one stochastic and one deterministic which is not affected by the control α. Furthermore, the expected total loss is rewritten as a quadratic function the load-sharing vector α. The proof of this proposition is presented in Appendix A. Proposition 2.1. Consider a network with nominal load profile µ such that 1T µ = 0 and zero-mean stochastic fluctuations described by a covariance matrix Σ. Then, the expected total loss using the control α is given by 1 EH(α) = EHs (α) + µT L+ µ, 2 (4) where EHs (α) is the expected total loss due to the stochastic fluctuations. Furthermore, EHs (α) ≥ 0 for every α ∈ Rn , and the following identity holds: EHs (α) = σ2 T + 1 (α L α) − 1T ΣL+ α + tr(ΣL+ ). 2 2 (5) The first important remark is that the expected total loss EH(α) is a quadratic form in the vector α ∈ Rn since it can be rewritten as EH(α) = σ2 T α Aα − bT α + c, 2 (6) where A = L+ is a positive semi-definite matrix, σ 2 > 0, b = L+ Σ1 ∈ Rn , and c = tr(ΣL+ )/2 + 1 T + µ L µ ∈ R+ . Furthermore, we can already conclude that the nominal load profile µ has no 2 impact on the optimal control α, since it appears only in the constant term c. A second important observation is that a closer look to (5) reveals that if the covariance matrix is multiplied by a factor δ > 0, the resulting expected total loss is also δ times the original one. Before investigating what is the optimal load-sharing vector for a given network and covariance structure of the noise, we argue here why the quantity EH(α) can be seen as a generalized notion of effective resistance. In order to do so, we will first recall some classical definitions. 6 The effective resistance Ri,j between a pair of nodes i and j of the network G is defined as the electrical resistance measured across nodes i and j when we look at G as electrical network −1 in which resistors with conductance w1−1 , . . . , wm are placed at the corresponding network edges. Equivalently, + + Ri,j := (ei − ej )T L+ (ei − ej ) = L+ i,i + Lj,j − 2Li,j . The total effective resistance of a graph G is then defined as n 1X Rtot (G) := Ri,j . 2 i,j=1 The same quantity is also known as Kirchhoff index when the network G is such that all the edge weights are equal to 1. This is a key quantity that measures how well connected the network is and for this reason has been extensively studied and rediscovered in various contexts, such as complex network analysis [13], theoretical chemistry, see [47] and references therein for an overview, and probability theory [12]. In the context of electrical networks the total effective resistance Rtot (G) is shown in [17] to be proportional to the average power dissipated in a resistive network (G, w) when random i.i.d. currents with zero mean and unit variance are injected at the nodes. We can look at the network (G, w, α) with controllable loads introduced earlier as a flexible transport network, where the load-sharing coefficients α1 , . . . , αn can be tuned to respond optimally to specific stochastic load fluctuations. In this respect, we claim that the quantity EHs (α) can be seen as a (rescaled) generalized total effective resistance that measures how “robust” the network (G, w, α) is against stochastic load fluctuations with covariance structure Σ. To further corroborate this claim, we now show that the expected total loss reduces to the classical total effective resistance Rtot (G) in the special case where the load-sharing coefficients are all equal, i.e., αi = 1/n for every i = 1, . . . , n, and the stochastic load fluctuations are i.i.d. random variables with with zero mean and unit variance, i.e., Σ = I. Using (5), the expected total loss due to fluctuations rewrites as 1  n 1 1 Rtot (G) EHs 1 = 2 (1T L+ 1) − 1T L+ 1 + tr(L+ ) = tr(L+ ) = , (7) n 2n 2 2 2n where in the last step we use the well-known identity Rtot (G) = n · tr(L+ ) proved by [23] that relates the total effective resistance of a graph with its spectrum. Rayleigh’s monotonicity principle [12] states that the pairwise effective resistance Ri,j is a non-increasing function of the edge weights and, as a consequence, also the total effective resistance Rtot (G) is. The following proposition, proved in Appendix A, shows that a similar property also holds for H(α): regardless of the load-sharing vector α, the total power loss does not increase when edges are added or weights are increased. Proposition 2.2 (Monotonicity of total power loss). Let G be a weighted connected graph and let G0 the graph obtained from G by increasing the weight of edge e = (i, j) by β > 0 or by adding the edge e = (i, j) with weight β > 0. For any load-sharing vector α ∈ Rn and any realization of the stochastic load fluctuations ω, the following inequality holds 0 HG (α) ≤ HG (α), 0 and, in particular, EHG (α) ≤ EHG (α). 7 3 Optimal load-sharing control In this section we consider the problem of minimizing the expected total loss EH(α) given a network G and a stochastic load covariance structure Σ. Let B ⊆ V be the subset of k nodes with controllable loads. We focus first on the scenario in which not all the nodes have controllable loads and thus assume 1 ≤ k < n. Besides the constraint (3), we further add n − k constraints on the optimal load-sharing vector α ∈ Rn to account for the absence of controllable loads in the nodes in V \ B, obtaining the following constrained optimization problem in Rn :   minα∈Rn EHs (α) (8) s.t. 1T α = 1,   αv = 0, ∀ v ∈ V \ B. Note we consider only the expected total loss due to stochastic load fluctuations in the objective function, since in view of (4) it differs only by a constant from the expected total loss. We henceforth assume that the k nodes with the controllable loads are those with labels 1, . . . , k, i.e., B = {1, . . . , k}. We can make this assumption without loss of generality as it amounts to a relabelling the network nodes. If this is the case, the rows and columns of matrices L, L+ , and Σ and the entries of the vector µ are also rearranged accordingly. e ∈ Rk to Let PB ∈ {0, 1}n×k be the binary matrix that maps any k-dimensional vector α n e = (α e 1, . . . , α e k , 0, . . . , 0) ∈ R . Such a matrix can be defined the n-dimensional vector PB α component-wise as (PB )i,j := δ{i=j} δ{i≤k} , for i = 1, . . . , n and j = 1, . . . , k, and has the following structure:   I PB = k , O where Ik is the k × k identity matrix and O ∈ Rn−k×k is a matrix with all entries equal to zero. In our first main result we present a closed-form expression for the optimal load-sharing factors of k controllables. Theorem 3.1 (Optimal load-sharing between k < n controllables). Consider a network with balanced nominal load profile 1T µ = 0 in which the nodes in B = {1, . . . , k} have controllable e ∗ 0), with loads. The solution of the optimization problem (8) is the load-sharing vector α∗ = (α   1 + −1 1 + −1 −1 T + Σ1 ∗ e = (LB ) 1 + Ik − (LB ) J (L+ α ∈ Rk , (9) B ) PB L tB tB σ2 + + −1 + T + T where L+ B is the k × k principal submatrix of L , i.e., LB := PB L PB , and tB := 1 (LB ) 1 > 0. If all the nodes with stochastic load fluctuations have controllable loads, i.e., S ⊆ B, then e∗ = α Σ1 , σ2 (10) e ∗v = 0 for every v ∈ B \ S. and, in particular, α The involved expression (9) for the optimal load-sharing factors reflects the interplay that exists between the network structure, the location of the controllable loads B, and the correlation structure of the load fluctuations in determining the losses. 8 In the special case where all the nodes with stochastic load fluctuations have controllable loads there is a nice interpretation for the optimal load-sharing coefficients: indeed α∗i is proportional to how much the stochastic fluctuations of node i contribute in relative terms to the variance of the total mismatch, since P n X Var(ω ) + Cov(ωi , ωj ) 1 1 i Pj6=ni α∗i = 2 eTi Σ1 = 2 Σi,j = σ σ j=1 Var( i=1 ωi ) P Var(ωi ) + j6=i Cov(ωi , ωj ) . (11) =P  P n Var(ω ) + Cov(ω , ω ) k k j j6=k k=1 We further remark that in the case of i.i.d. stochastic fluctuations in all the nodes, the second term in (9) vanishes, since the vector Σ1 lies in the null space of L+ (being a multiple of 1), and, therefore, the optimal control is equal to (L+ )−1 1 e = T B+ −1 . α 1 (LB ) 1 ∗ In particular, it does not depend depend on the variance of the load fluctuations, but only on the network structure and on the location B of the controllable loads, both encoded in the matrix L+ B. 3.1 Full controllability In this subsection we focus on the special case where the load is controllable in every node, i.e., B = V , which is not covered in Theorem 3.1. Indeed, the proof method does not work in this scenario due to the non-invertibility of the graph Laplacian L, and for this reason is treated separately here. The problem of minimizing the expected loss EH(α) when all the nodes have controllable loads can be written as an optimization problem on Rn with a single constraint, namely ( minα∈Rn EH(α) (12) s.t. 1T α = 1. As mentioned earlier, thanks to Proposition 2.1 we can immediately conclude that the optimal load-sharing vector does not depend on the vector µ, which appears only in the constant term in the equality (4) for the expected loss. The next theorem derives an analytical expression for the optimal solution of this optimization problem. Theorem 3.2 (Optimal load-sharing between n controllables). Consider a network G with n nodes and a balanced nominal load profile 1T µ = 0. The solution of the optimization problem (12) is the load-sharing vector α∗ given by Σ1 α∗ = 2 . σ The highlight of this result is that in the scenario where all nodes have controllable loads, the optimal control α∗ does not depend on the graph structure, but only on the covariance structure of the fluctuations. 9 The same interpretation as in the special case S ⊆ B of Theorem 3.1 holds here for the optimal load-sharing coefficients: α∗i is proportional to how much the stochastic fluctuations of node i contribute in relative terms to the variance of the total mismatch, see (11). In particular, when a node i does not have stochastic load fluctuations, then it is optimal not to use the controllable load in that node not to do anything, since α∗i = 0 in view of the fact that the i-th row of Σ is identically zero. It immediately follows from Theorem 3.2 that when the the stochastic load fluctuations are independent and identically distributed, the optimal load-sharing factors are all equal, namely α∗ = 1 1. n Furthermore, the expected total loss due to stochastic fluctuations when using the optimal load-sharing coefficient rewrites as   1 T 1 + + ∗ tr(ΣL ) − 2 1 ΣL Σ1 . EHs (α ) = 2 σ In this special case, the fact that EHs (α∗ ) ≥ 0 can equivalently be proved as follows: p p 1T ΣL+ Σ1 = tr(ΣL+ ΣJ) ≤ tr((ΣL+ )2 )tr((ΣJ)2 ) ≤ tr(ΣL+ )2 tr(ΣJ)2 = tr(ΣL+ )tr(ΣJ) = σ 2 tr(ΣL+ ). where both the inequalities leverage in a crucial way that all the matrices Σ, J, L+ are positive semi-definite. The first inequality follows from the fact that in the space of positive semi-definite matrices trace is a proper inner-product and thus obeys Cauchy-Schwarz inequality, p tr(AB) ≤ tr(A2 ) tr(B 2 ) ∀ A, B positive semi-definite matrices. The second inequality follows from the fact that tr(A2 ) ≤ tr(A)2 for any positive semi-definite matrix A, obtained by applying Cauchy-Schwarz inequality with A = B. 4 Scaling properties of the expected total loss In this section we explore the relation between the expected total loss and the number of controllable loads. Even if the intuition suggests that the expected total loss should be a decreasing function in the number of controllable loads, but this may not be true in general, as the total loss depends both on the location of the controllable loads as well as on the the load-sharing factors. For instance, in Section 5 we present a counterexample of a network in which by adding the one controllable load and readjusting the load-share factors to be all equal, the expected total power loss increases. To get rid of these heterogeneities and obtain a more transparent result for the impact of the number of controllable loads, we calculate the expected total loss for a fixed number of controllable loads averaging on all their possible locations and assuming they share equally the load. Consider an integer 1 ≤ k ≤ n and denote by Bk ⊂ Rn the collection of load-sharing vectors with exactly k non-zero identical entries (and thus equal to 1/k, in view of (3)), namely ( ) 1X Bk := ei : B ⊆ V, |B| = k , k i∈B 10 where ei ∈ Rn is the vector with the i-th entry equal to 1 and zero elsewhere. Let Hk denote the expected total loss due to stochastic load fluctuations averaging over all their possible locations of k controllable nodes share equally the load, i.e., 1 X Hk := EHs (α). |Bk | α∈B k  n This average consists of |Bk | = k terms, one for each possible displacement of k controllable nodes in a network with n nodes. The following theorem states an explicit expression for Hk that makes the dependence on the number of controllable node k very explicit, showing in particular that Hk is, up to a constant, proportional to 1/k. Theorem 4.1 (Average total loss with k controllable loads). Consider a network G of n nodes with balanced nominal profile load, i.e., 1T µ = 0. Then, Hk = C1 + C2 , k where C1 , C2 ∈ R are two constants that do not depend on k given by 1 tr(L+ ) C1 := tr(ΣL+ ) − σ 2 2 2n(n − 1) and C2 := σ 2 tr(L+ ) . 2(n − 1) Both the constants C1 and C2 depend on the graph structure via L+ , on its size n, and on the covariance matrix Σ. We remark that the constant C2 is always strictly positive, as tr(L+ ) > 0 (L+ being a positive semi-definite matrix) and σ 2 > 0, in view of (1). We are interested in understanding how the expected total loss scales for large graphs. Assume we can take a sequence of graphs {Gn }n∈N of growing size, |Vn | = n, and of covariance matrices {Σn }n∈N with total variance σn2 = 1T Σn 1, so that the limit (n − 1) tr(Σn L+ n) n→∞ σn2 tr(L+ n) γ := lim exists. Note that the fact that inequality Hn ≥ 0 holds for every n ∈ N (see Proposition 2.1) guarantees that γ ≥ 0. Under these assumptions, we have that the relative gain of having k controllable loads with respect to a single one scales as     Hk 1 1 1 1 1 1 lim = + = + . 2 tr(L+ ) −1 σn (n−1) tr(Σn L+ n−1 n−1 n→∞ H1 n n) k 1+γ 1+γ k 1 + limn→∞ n (n−1) tr(Σ L+ ) + lim + n→∞ 2 n σ tr(L ) n n n n In the scenario where the load fluctuations are independent and identically distributed, regardless of the graph structure, the asymptotic scaling reads lim n→∞ Hk 1 1 = + . H1 2 2k as (13) (n − 1) tr(Σn L+ (n − 1) σn2 tr(L+ n−1 n) n) = lim = lim = 1. n→∞ n→∞ n→∞ σn2 tr(L+ n σn2 tr(L+ n n) n) In Subsection 5.5 we show numerically that the way the expected total loss scales on average with the number of controllable loads as stated in Theorem 4.1 is pretty accurate in general, even without averaging over all possible locations of the controllable loads. γ = lim 11 5 Numerical examples 5.1 Impact of covariance structure The next two figures illustrates how the covariance structure influence the optimal control for a small network of 12 nodes. Figure 1 covers the case in which all the nodes have stochastic load fluctuations, i.e., S = V , while in Figure 2 we present a scenario where S ( V . In both figures the nodes with controllable loads are drawn as squares, whose area is proportional to the corresponding load-sharing factor. 3 3 3 9 9 8 2 9 8 2 2 4 4 5 5 12 12 5 7 7 8 4 12 7 6 6 6 11 11 (a) i.i.d. load fluctuations e ∗ = (0.3167, 0.4826, 0.2007) α 11 (b) Independent but not identically distributed load fluctuations e ∗ = (0.3335, 0.4876, 0.1789) α (c) Correlated load fluctuations e ∗ = (0.4109, 0.3841, 0.2050) α Figure 1: Example of a stochastic loss transport network in which all nodes have stochastic load fluctuations but with different covariance structure. The correlation matrix Σc used for Figure 1 is generated at random in case (c) and is such that σc2 = 1T Σc 1 = 50.42. The correlation matrix Σb one used in case (b) is obtained using the diagonal entries of Σc . Note that both in case (a) and (b), the correlation matrices have been rescaled so that their total variance is still equal to σa2 = σb2 = σc2 . The correlation matrices for Figure 2 are obtained analogously. 3 3 3 9 9 8 2 9 8 2 4 5 12 7 4 5 12 7 5 12 7 6 6 11 (a) i.i.d. fluctuations e ∗ = (0.2571, 0.5162, 0.2267) α 8 2 4 6 11 (b) Independent but not identically distributed fluctuations e ∗ = (0.2624, 0.5317, 0.2059) α 11 (c) Correlated fluctuations e ∗ = (0.2011, 0.5504, 0.2485) α Figure 2: Example of a stochastic loss transport network with different covariance structure for the load fluctuations. The nodes in black are those with stochastic load fluctuations. 12 5.2 Relative position of controllable loads and stochastic nodes Figure 3 visualizes the optimal load-sharing factors in the scenario where the subset of stochastic nodes is fixed, S = {1, 3, 5, 7, 9, 11}, as well as the covariance matrix, but the displacement of the controllable loads, i.e., the subset B, changes. 12 12 1 1 11 12 1 2 10 10 2 2 3 9 10 3 9 4 8 11 11 3 9 8 4 4 8 5 7 5 6 (a) S ⊂ B = {1, 4, 5, 7, 10, 11} EHs (α∗ ) = 2.8825 7 5 6 7 6 (b) S 6⊂ B = {1, 3, 5, 7, 9, 11} EHs (α∗ ) = 3.3552 (c) S ⊂ B c , B = {2, 5, 6, 8, 9, 12} EHs (α∗ ) = 3.8134 Figure 3: Example of a stochastic loss transport network with the same covariance structure for the load fluctuations, but different displacement of the controllable loads and the corresponding expected total loss. Figure 3(a) presents the scenario in which S ⊆ B and the optimal control for the nodes in B \ S = {5, 11} is equal to zero, as prescribed by Theorem 3.1. In the other two cases, (b) and (c), we picked subsets B of controllable loads such that S 6⊆ B and the corresponding value of the expected losses suggest it is optimal to place the controllable loads in the nodes affected by stochastic fluctuations. 5.3 Negative load-sharing coefficients The fact that a load-sharing corresponding node absorbs P factor is non-negative means that theP part of power excess (if ni=1 ωi > 0) and balance out shortages (if ni=1 ωi < 0). In most of the related work in primary response mechanisms and autonomous generation controls for power grids, the load-sharing coefficients (often called participation factors) are in fact taken to be non-negative, i.e., αv ≥ 0 for all v ∈ B. This assumption tacitly implies that all the controllable generators and storage have “coordinated” actions, in the sense that they either all increase or all decrease their power output. In our formulation of the optimization problems (8) and (12) we do not make such an assumption and load-sharing factors can also be negative, as long as the condition (3) is met. This is crucial as for certain covariance structures of the load fluctuations (especially when there are strong negative correlations) it is optimal to have negative load-sharing coefficients in some nodes: we illustrate this fact for a small network illustrated in Figure 4. 13 2 3 4 1 Figure 4: A small network modeled by a graph with n = 4 nodes and m = 4 edges with unit weights Table 1 below lists the optimal load-sharing factors α∗ corresponding to different set of controllable loads in the network in Figure 4 where the load fluctuations covariance structure is assumed to be   1 0 0 −0.5  0 1 0 −0.5  . Σ=  0 0 1 −0.5  −0.5 −0.5 −0.5 1 The best way for the controllable loads to respond to the negative correlations that the load fluctuations have in this network is having the controllable load in node 4 taking actions “mirroring” those of the other three nodes, in the sense that α∗4 < 0 while the load-sharing coefficients of the other nodes in B are always positive. B α∗ (B) {1, 4} {6/5, 0, 0, −1/5} {1, 2, 4} {2/3, 2/3, 0, −1/3} {1, 2, 3, 4} {1/2, 1/2, 1/2, −1/2} Table 1: Sets of controllable loads for the network in Figure 4 with the corresponding optimal load-sharing factors 5.4 Non-monotonicity of expected power loss when adding controllable loads An extra controllable load always reduces the expected total power loss if the corresponding optimal load-sharing vector α∗ is selected, since it corresponds to removing one constraints in the optimization problem (8). However, if the chosen load-sharing factors of the augmented subset of controllable loads are not the optimal ones, adding an extra controllable load does not necessarily reduce the expected total power loss. We illustrate this with an example in which the control is assumed to be equal-share between the controllable loads in B. Consider the network given in Figure 5 and assume that the stochastic loads are i.i.d. with unit variance. 14 3 4 2 1 5 Figure 5: A small network modeled by a graph with n = 7 nodes and m = 9 edges with unit weights Table 2 below lists the expected total power losses for some subsets B of controllable loads and compares them with those for some augmented subset B ∪ {4}. B {2} {2, 5} {2, 6, 7} EH(B) EH(B ∪ {4}) 2.6875 3.0625 2.0625 2.13194 1.79861 1.84375 Table 2: Expected total power losses for the network in Figure 5 assuming equal load-sharing coefficients for some subsets B of controllable loads and then for the subsets augmented with an extra node, namely B ∪ {4}. 5.5 Empirical evidence of the scaling law (13) In the following example we consider the IEEE RTS 96-bus test network and track the expected total loss while adding one by one controllable loads in random locations and assuming equal share among the available controllable loads. As illustrated by Figure 6, the theoretical scaling for the expected total loss scales with the number of controllable loads stated in Theorem 4.1 while averaging on all possible locations is in fact very accurate also for a single instance where new controllable locations are randomly added. 15 70 70 60 60 50 50 40 40 10 20 30 40 50 60 70 10 (a) I.i.d. load fluctuations 20 30 40 50 60 70 (b) Independent but not identically distributed load fluctuations 70 60 50 40 10 20 30 40 50 60 70 (c) Correlated load fluctuations Figure 6: Theoretical scaling (in red) as predicted by Theorem 4.1 vs. empirical total loss (in black) while adding controllable loads one by one in random locations. 6 Concluding remarks In this paper we consider a stochastic lossy transport network in which some nodes have controllable loads and derive a closed-form expression for the optimal control when aiming to minimize the average total loss. The model is inspired by power systems where distributed energy resources can be used as virtual storage to mitigate the fluctuations in the power generated by renewable energy sources. Our analysis (i) uncovers a interplay between the network structure, the location of the controllable loads and the covariance structure of the load fluctuations and (ii) give insights in how much the average total loss can be reduced by adding a certain number of controllable loads to the network. The stylized mathematical model considered in the present paper gives useful insight in understanding how the optimal displacement and operations of distributed energy resources are affected by correlated load fluctuations. For this reason complements the recent efforts in the electrical engineering community in upgrading the existing models for power grids to account both for the intrinsic volatility of renewable energy generation and storage capabilities, see, e.g., [22, 25, 26, 27, 28, 29]. In the present work we do not account for line limits, aiming to get a transparent insight in the interplay between load uncertainty and optimal storage operations. Nonetheless, we remark that the quadratic form we consider as a objective function can be rewritten as weighted sum of 16 the line flows squared and for this reason the optimal control should prevents line flows from being too large and in particular above the corresponding line capacities. The optimization problems considered in this paper focus on the network efficiency and do not account for economic factors and neither prevents the excessive usage of controllable loads. Both these factors can be accounted for by adding an additional term to the objective in the optimization problems (12) and (8) of the form αT P α + q T α with P is the diagonal matrix with positive entries P1,1 , . . . , Pn,n on the diagonal and q = (q1 , . . . , qn ) is a vector with non-negative entries. Let ξ be a positive real number that weights the relative importance of the penalty/cost term αT P α + q T α with respect to the average total loss. The generalized optimization problem reads ( minα∈Rn EH(α) + ξ (αT P α + q T α) (14) s.t. 1T α = 1, The solution of this constrained optimization problem is  σ2 −1  −1   σ2 ∗ + + L + ξP L + ξP α = δ1 + I + δJ (ξq + Σ1), 2 2 −1 −1 with δ := 1 + ξP 1 , and can be obtained in a similar way of that in Theorem 3.1, leveraging the fact that the matrix L+ + ξP is positive definite. Such an extension can be instrumental to explore the trade-off between the best operations for the network and the corresponding cost or penalties for the excessive usage of the controllable nodes. This is particularly relevant for instance in the design of primary response mechanisms and autonomous generation controls for power grids [1, 6, 18, 19, 30, 39, 42]. In these works only economic criteria are considered to tune the load-sharing coefficients and therefore combining them with a network performance metric such as the expected total loss could be interesting.  T  σ2 + L 2 Acknowledgment: This research is supported by NWO VICI grant 639.033.413 and NWO Rubicon grant 680.50.1529. Appendices A Properties of the total power loss Proof. Proof of Proposition 2.1. Using the expression for Cα in (2), we can rewrite H(α) as 1 1 1 H(α) = (µ + Cα ω)T L+ (µ + Cα ω) = µT L+ µ + ω T CαT L+ Cα ω + µT L+ Cα ω. 2 2 2 Note that one of the terms on the RHS, namely 12 µT L+ µ, is not random and does not depend on the control α. Define the random variable 1 1 Hs (α) := H(α) − µT L+ µ = ω T CαT L+ Cα ω + µT L+ Cα ω, 2 2 17 (15) which describes precisely the contribution of the stochastic fluctuations to the transportation losses. From the fact that L+ is a positive semi-definite matrix it follows that 1 T T + 1 ω Cα L Cα ω = (Cα ω)T L+ (Cα ω) ≥ 0 ∀ ω ∈ Rn . 2 2 (16) Combining (15), (16), and the fact that E(µT L+ Cα ω) = µL+ Cα Eω = 0 yields that   1 T T + ω Cα L Cα ω ≥ 0. EHs (α) = E 2 Applying a classic result for quadratic forms of random vector, see Corollary 3.2b.1 in [31] and using the fact that Eω = 0, we derive   1 T T + 1 (17) E ω Cα L Cα ω = tr(CαT L+ Cα Σ), 2 2 which yields EHs (α) = 1 tr(CαT L+ Cα Σ), 2 since E(µT L+ Cα ω) = µL+ Cα Eω = 0. We now derive identity (5). Recall the following well-known properties of the trace of matrix: (i) The trace is invariant under cyclic permutations, i.e., for any r ∈ N tr(A1 . . . Ar ) = tr(A2 . . . Ar A1 ) = . . . = tr(Ar A1 . . . Ar−1 ). (ii) The trace of a matrix and of its transpose coincide, i.e., tr(A) = tr(AT ); (iii) The trace of the outer product of two vectors is their inner product, namely tr(vwT ) = tr(v ⊗ w) = v T w. First note that we can rewrite CαT L+ Cα = (I − α 1T )T L+ (I − α 1T ) = (I − 1 αT )(L+ − L+ α 1T ) = L+ − L+ α 1T − 1 αT L+ + 1 αT L+ α 1T . (18) The aforementioned properties of the trace yield (ii) (i) tr(ΣL+ α 1T ) = tr((ΣL+ α 1T )T ) = tr(1αT L+ Σ) = tr(Σ1αT L+ ), (19) and (iii) (iii) tr(Σ1αT L+ ) = tr(Σ1(L+ α)T ) = tr((Σ1) ⊗ (L+ α)) = (Σ1)T (L+ α) = 1T ΣL+ α. (20) By combining all these equalities and exploiting the linearity of the trace operator, we obtain (18) tr(ΣCαT L+ Cα ) = tr(ΣL+ ) − tr(ΣL+ α 1T ) − tr(Σ1 αT L+ ) + tr(Σ1 αT L+ α 1T ) (19) = tr(ΣL+ ) − 2 · tr(Σ1 αT L+ ) + (αT L+ α) · tr(Σ1 1T ) (20) = tr(ΣL+ ) − 2 · (1T ΣL+ α) + (αT L+ α) · tr(ΣJ), where in the second step we also used the fact that αT L+ α is a scalar. 18 Proof. Proof of Proposition 2.2 Assume that e = (i, j) ∈ (V × V ) is the edge with weight β > 0 that has been added to G or whose edge weight has been increased by β > 0 and let me = (ei − ej ) ∈ Rn be the corresponding non-weighted incidence vector. In both cases the Laplacian matrix of the newly obtained graph G0 can be written as LG0 = LG + β me mTe and, using the generalized version of the Sherman-Morrison formula in [35], we get + L+ G0 = LG − β −1 1 T + L+ G me me LG . + mTe L+ m e G We can thus rewrite the total loss corresponding to any net power injection vector p(α) as 1 0 HG (α) = p(α)T LG0 p(α) 2 1 1 T + = p(α)T L+ p(α)T L+ G p(α) − G me me LG p(α) −1 2 2(β + mTe L+ m ) e G T + 2 (me LG p(α)) , = HG (α) − 2(β −1 + mTe L+ G me ) T + 2 and conclude by noticing that mTe L+ G me ≥ 0 and (me LG p(α)) ≥ 0. B Proof of Theorem 3.1 In the proof of Theorem 3.1 we will make use of the so-called block matrix inversion formula, which is stated in the next lemma. Lemma   B.1 (Block matrix inversion formula). Consider a matrix with the block structure A B . If both A and D − CA−1 B are non-singular matrices, then C D  A B C D −1  =  A−1 − A−1 B(D − CA−1 B)−1 CA−1 −A−1 B(D − CA−1 B)−1 . −(D − CA−1 B)−1 CA−1 (D − CA−1 B)−1 Proof. Proof of Theorem 3.1. For any vector α ∈ Rn which is such that αi = 0 for every node e Using this e ∈ Rk such that α = PB α. i ∈ V \ B, there exists a unique k-dimensional vector α T correspondence and the fact that the nominal load profile is balanced, i.e., 1 µ = 0, we can rewrite 2 1 (4) σ e T PBT L+ PB α) e = e − 1T ΣL+ PB α e + tr(ΣL+ ). EHs (α) = EH(PB α) (α 2 2 Therefore the n-dimensional optimization problem (8) rewrites as a k-dimensional optimization problem with a single constraint, namely  2  min σ (α e T PBT L+ PB α) e − 1T ΣL+ PB α e k 2 (21) e α∈R  T e = 1. s.t. 1 α 19 T + k×k The matrix L+ is positive definite, as for any vector v ∈ Rk , v 6= 0, B := PB L PB ∈ R   + v T + T T + > 0, v LB v = v PB L PB v = (v 0) L 0 where the last inequality follows from the fact that the vector (v 0) is not a multiple of the vector 1 and thus does not lie in the null space of L+ . The optimization problem in (21) has then a unique solution, since the corresponding Hessian is positive definite. Let γ ∈ R be the Lagrange multiplier γ associated with the unique equality constraint of the optimization problem (21). The associated Lagrangian associated is e γ) = L(α, σ2 T T + e − γ(1T α e − 1). e − (PBT L+ Σ1)T α e (PB L PB )α α 2 Setting b := PBT L+ Σ1 ∈ Rk , the optimality conditions read ( e − γ1 = b, σ 2 L+ Bα T e = 1, 1 α or, equivalently, in matrix form  2 +     e σ LB −1 α b = . T γ 1 1 0 (22) Being positive definite, L+ B is invertible and its inverse is also positive definite, which means that + −1 + T tB := 1 (LB ) 1 > 0. In view of the fact that σ 2 t−1 B 6= 0 and LB is invertible, we can use the block matrix inversion formula given in Lemma B.1 to obtain 1    1 1 + −1 + −1 + −1  2 + −1 (L ) (L ) 1 I − J(LB ) σ LB −1   σ2 B tB tB B =  . 2 T σ 1 T + −1 1 0 1 (LB ) tB tB The solution of the linear system (22) then reads 1    1 1 + −1 + −1 + −1    2 + −1     (L J(L (L ) I − ) ) 1 B B e σ LB −1 α b  σ2 B  b t t B B = =  σ2 1 T + −1 γ 1 1 1T 0 1 (LB ) tB tB e ∈ Rk is given by and thus the optimal load-sharing vector α   −1 (L+ 1 1 + −1 ∗ B) e = α I − J(LB ) b + (L+ )−1 1 2 σ t tB B   1 1 + −1 b + −1 + −1 = (LB ) 1 + (LB ) I − J(LB ) tB tB σ2   1 + −1 1 + −1 Σ1 + −1 + −1 = (LB ) 1 + (LB ) − (LB ) J(LB ) PBT L+ 2 tB tB σ   1 1 + −1 −1 −1 T + Σ1 = (L+ (LB ) J (L+ . B) 1 + I − B ) PB L tB tB σ2 20 We now focus on the special case where S ⊆ B and prove identity (10). Rewrite L+ as a block matrix  +  LB L+ C , T (L+ L+ C) Bc + k×k k×n−k n−k×n−k with L+ , L+ and L+ . Note that L+ B ∈ R C ∈ R Bc ∈ R B and LB c are symmetric matrices, since L+ is. Note that this is consistent with the former definition of L+ B , since  +  LB L+ T + T T C PB L PB = (Ik | O)L+ (Ik | O) = (Ik | O) (Ik | O) = L+ + T B. (L+ ) L c C B First note that −1 T + (L+ B ) PB L = −1 (L+ B ) (Ik | O)  L+ L+ B C + T (L+ ) L C Bc  + + + −1 + −1 k×n = (L+ B ) (LB | LC ) = (Ik | (LB ) LC ) ∈ R From the assumption S ⊆ B it follows that the covariance matrix can be rewritten as   ΣB O Σ= , O O where ΣB ∈ Rk×k is itself a covariance matrix. Trivially 1T (ΣB | O)1 = tr(ΣB J) = tr(ΣJ) = σ 2 . Furthermore,     ΣB O + −1 T + + −1 T + ΣB O + −1 + (LB ) PB L Σ = (LB ) PB L = (Ik | (LB ) LC ) = (ΣB | O). O O O O e ∗ then rewrites as The optimal control α   −1 −1 (L+ (L+ ∗ −1 T + Σ1 B) B) J e = α 1 + Ik − (L+ B ) PB L tB tB σ2   (L+ )−1 (L+ )−1 J 1 = B 1 + Ik − B (ΣB | O) 2 tB tB σ + −1 + −1 1 1T (ΣB | O)1 (L ) (L ) = B 1 + (ΣB | O) 2 − B 1 tB σ tB σ2 + −1 + −1 (L ) Σ1 (L ) = B 1+ 2 − B 1 tB σ tB Σ1 = 2. σ C Proof of Theorem 3.2 In (6) we already rewrote the objective function of the optimization problem (12) as EHs (α) = σ2 T α Aα − bT α + c. 2 where A = L+ , b = L+ Σ1 ∈ Rn , and c = tr(ΣL+ )/2 ∈ R+ and notice that, for the purpose of solving the optimization problem (12), we can ignore the constant term c. 21 We can consider the representation with respect to the orthogonal basis of eigenvectors , v2 , . . . , vn of L+ of a vector α ∈ R, namely α = β1 1 + β2 v2 + . . . + βn vn , (23) for some β1 , . . . , βn ∈ R. From the constraint 1T α = 1, it immediately follows that β1 = 1/n. Indeed, nβ1 = β1 1T 1 = β1 1T 1 + β2 1T v2 + . . . + βn 1T vn = 1T (β1 1 + β2 v2 + . . . + βn vn ) = 1T α = 1. Let v2 , . . . , vn be an orthonomal basis of eigenvectors of the graph Laplacian L corresponding to the non-zero eigenvalues λ2 , . . . , λn and define the real coefficients κ2 , . . . , κn as κi := hΣ1, vi i = 1T Σvi , i = 2, . . . , n. Leveraging the latter definition and the representation (23), we can rewrite T + T + α L α = (β1 1+β2 v2 +. . .+βn vn ) L (β1 1+β2 v2 +. . .+βn vn ) = n X β12 1T L+ 1+ βi2 viT L+ vi i=2 = n X β2 i i=2 λi and T T + T + b α = 1 ΣL α = 1 ΣL (β1 1 + β2 v2 + . . . + βn vn ) = n X βi i=2 λi T 1 Σvi = n X i=2 βi κi . λi By combining the latter two identities, the objective function rewrites as n n σ2 T σ 2 X βi2 X κi T EH(α) = α Aα − b α = − βi . 2 2 i=2 λi λi i=2 (24) The optimization problem (12) is therefore equivalent to a unconstrained problem in Rn−1 whose variables are β2 , . . . , βn . Define the function g : Rn−1 → R as n n σ 2 X βi2 X κi g(β2 , . . . , βn ) := − βi . 2 i=2 λi λi i=2 The gradient of the function g is the vector   κi 2 βi ∇g(β2 , . . . , βn ) = σ − λi λi i=2,...,n −1 and its Hessian matrix of g is the diagonal matrix H(g) = σ 2 · diag(λ−1 2 , . . . , λn ). The Hessian H(g) is constant as it does not depend on β2 , . . . , βn . Furthermore, H(g) is a positive definite matrix since all its diagonal terms are positive, in view of the fact that λi > 0 for i = 2, . . . , n and that σ 2 > 0. This means that any critical point satisfying ∇g(β2 , . . . , βn ) = 0 would then be a minimum for the function g. The optimality condition ∇g(β2 , . . . , βn ) = 0 can be solved explicitly, yielding κi βi∗ = 2 , i = 2, . . . , n. σ 22 , As a consequence the optimal load-sharing coefficients are unique and they are given by n 1 1 X α = 1+ 2 κi vi . n σ i=2 ∗ Set v1 = D and κ1 = hΣ1, v1 i = 1T Σv1 = 1T Σ √1n 1. Note that α∗ rewrites as ! ! n n n X X X 1 κ 1 1 Σ1 1 1 α∗ = 2 √ 1 + 2 κi vi = 2 κi vi = hΣ1, vi i vi = 2 . σ n σ i=2 σ a i=1 σ i=1 √1 1 n Proof of Theorem 4.1 The starting point of the proof are two identities that leverage the properties of the pseudoinverse L+ of the graph Laplacian. Firstly, n X   X X  X  X X + + + ei = L ei = L ei 1{i∈B} L B⊆V : |B|=k i∈B + =L B⊆V : |B|=k i∈B n X X ei i=1 1{i∈B}  i=1 B⊆V : |B|=k  n X n + ei =L  −1  k−1 i=1 B⊆V : |B|=k     n n−1 + n − 1 + X  = L ei = L 1 = 0, k−1 k − 1 i=1 (25) where we use the fact that in a graph with n nodes, each nodes belong to exactly of k nodes. We further claim that X  X T  X  n − 2 e i L+ ei = tr(L+ ), k − 1 i∈B i∈B B⊆V : |B|=k  with the convention that n−2 = 0. Since n−1  X T  X  X X e i L+ ei = eTi L+ ei + eTi L+ ej , i∈B i∈B we can rewrite the LHS of (26) as X  X T  X  ei L+ ei = B⊆V : |B|=k i∈B i∈B i∈B X B⊆V : |B|=k n−1 k−1  subsets (26) i,j∈B, i6=j X  eTi L+ ei + i∈B X B⊆V : |B|=k  X  eTi L+ ej . i,j∈B, i6=j (27) The first term on the RHS of (27) can be rewritten as n  X  X X X eTi L+ ei = eTi L+ ei B⊆V : |B|=k i∈B i=1 1{i∈B}  B⊆V : |B|=k n  X    n n−1 X T + n−1 T + = e L ei = e L ei k−1 i k − 1 i=1 i i=1   n   n−1 X + n−1 = L = tr(L+ ), k − 1 i=1 i,i k−1 23 while the second term on the RHS of (27) is equal to  X B⊆V : |B|=k X eTi L+ ej  X = i,j∈B, i6=j  = P X i6=j i6=j  n  X n−2 T + = e L ej k−2 i i=1 eTi L+ ej = −tr(L+ ), which immediately follows from eTi L+ ej + i6=j n X = 1{i∈B, j∈B}     n−2 X T + n−2 e L ej = − tr(L+ ). k − 2 i6=j i k−2 In the last step we used the fact that eTi L+ ej + tr(L+ ) = X B⊆V : |B|=k i6=j  X eTi L+ ej ek T L+ X L+ i,i = i n X k=1 X eTi L+ ej + X eTi L+ ei i i6=j  ek = 1T L+ 1 = 0. k=1 Hence, (27) rewrites as X B⊆V : |B|=k X ei T L + i∈B X  ei = n − 1     n−2  n−2 + − tr(L ) = tr(L+ ), k−1 k−2 k−1 i∈B which concludes the proof of identity (26). P Each load-sharing vector α ∈ Bk can be written as α = k1 i∈B ei , for some B ⊆ V , |B| = k. In view of Proposition 2.1, the expected total loss due to stochastic fluctuations when using this load-sharing vector is given by !T ! ! X X σ2 1 X 1 1 1 EHs (α) = ei L+ ei − 1T ΣL+ ei + tr(ΣL+ ). 2 k i∈B k i∈B k i∈B 2 Therefore, 1 1 Hk = tr(ΣL+ ) + 2 |Bk | " X B⊆V : |B|=k 2 σ 2 1X k i∈B ei T L+ 1 X k i∈B  ei − 1T ΣL+ 1 X k ei  # . i∈B Using (25) and (26), we get  n−2 + + 1 1 n−k + 2 tr(L ) k−1 + 2 tr(L )  Hk = tr(ΣL ) + σ = tr(ΣL ) + σ n 2 2 k2 k 2 2 k · n(n − 1) +  1 tr(L+ ) 1 − nk 1 1 1 + 2 tr(L ) = tr(ΣL+ ) + σ 2 = tr(ΣL ) + σ − . 2 2n(n − 1) nk 2 2(n − 1) k n References [1] D. Apostolopoulou, P. Sauer, and A. Dominguez-Garcia. Automatic Generation Control and Its Implementation in Real Time. In 2014 47th Hawaii International Conference on System Sciences, pages 2444–2452. IEEE, jan 2014. 24 [2] A. Bejan, R. Gibbens, and F. Kelly. Statistical aspects of storage systems modelling in energy networks. In 46th Annual Conference on Information Sciences and Systems (CISS), pages 1–6, Princeton, NJ, mar 2012. IEEE. [3] D. Bhaumik, D. Crommelin, and B. Zwart. A computational method for optimizing storage placement to maximize power network reliability. In To appear in the Proceeding of the 2016 Winter Simulation Conference, 2015. [4] D. Bienstock, M. Chertkov, and S. Harnett. Chance-Constrained Optimal Power Flow: Risk-Aware Network Control under Uncertainty. SIAM Review, 56(3):461–495, 2014. [5] D. Bienstock, C. Matke, G. Munoz, and S. Yang. Robust linear control of nonconvex battery operation in transmission systems. Preprint at arXiv:1610.09432, 2016. [6] M. Chertkov and Y. Dvorkin. Chance Constrained Optimal Power Flow with Primary Frequency Response. Preprint at arXiv:1703.06724, 2017. [7] J. Cruise, L. Flatley, and S. Zachary. Impact of storage competition on energy markets. Preprint at arXiv:1606.05361, 2016. [8] J. Cruise, R. Gibbens, and S. Zachary. Optimal control of storage for arbitrage, with applications to energy systems. In 48th Annual Conference on Information Sciences and Systems (CISS), number i, 2014. [9] J. Cruise and S. Zachary. The optimal control of storage for arbitrage and buffering, with energy applications. Preprint at arXiv:1509.05788, 2015. [10] C. F. Daganzo. Fundamentals of Transportation and Traffic Operations. Emerald Group Publishing Limited, sep 1997. [11] D. Deka, H. Nagarajan, and S. Backhaus. Optimal Topology Design for Disturbance Minimization in Power Grids. Preprint at arXiv:1703.00558, 2017. [12] P. G. Doyle and J. L. Snell. Random Walks and Electric Networks. American Mathematical Monthly, 94(January):202, 2000. [13] W. Ellens, F. Spieksma, P. Van Mieghem, a. Jamakovic, and R. Kooij. Effective graph resistance. Linear Algebra and its Applications, 435(10):2491–2506, nov 2011. [14] N. Gast, J.-Y. Le Boudec, A. Proutière, and D.-C. Tomozei. Impact of storage on the efficiency and prices in real-time electricity markets. Proceedings of the 4th international conference on Future energy systems - e-Energy ’13, 2:15, 2013. [15] N. Gast, D.-C. Tomozei, and J.-Y. Le Boudec. Optimal Storage Policies with Wind Forecast Uncertainties. ACM SIGMETRICS Performance Evaluation Review, 40(3):1–5, 2012. [16] N. Gast, D.-C. Tomozei, and J.-Y. Le Boudec. Optimal Generation and Storage Scheduling in the Presence of Renewable Forecast Uncertainties. IEEE Transactions on Smart Grid, 5(3):1328–1339, 2014. 25 [17] A. Ghosh, S. Boyd, and A. Saberi. Minimizing Effective Resistance of a Graph. SIAM Review, 50(1):37–66, 2008. [18] S. Guggilam, C. Zhao, E. Dall’Anese, Y. Chen, and S. Dhople. Engineering Inertial and Primary-frequency Response for Distributed Energy Resources. Preprint at arXiv:1706.03612, 2017. [19] S. Guggilam, C. Zhao, E. Dall’Anese, Y. Chen, and S. Dhople. Primary frequency response with aggregated DERs. In 2017 American Control Conference (ACC), pages 3386–3393. IEEE, may 2017. [20] L. Guo, C. Liang, and S. Low. Monotonicity Properties and Spectral Characterization of Power Redistribution in Cascading Failures. Communication, Control, and Computing (Allerton), 2017 55th Annual Allerton Conference on, 2017. [21] J. Johnson and M. Chertkov. A majorization-minimization approach to design of power transmission networks. In 49th IEEE Conference on Decision and Control (CDC), pages 3996–4003. IEEE, 2010. [22] Y. Kanoria, A. Montanari, D. Tse, and B. Zhang. Distributed storage for intermittent energy sources: Control design and performance limits. In 49th Annual Allerton Conference on Communication, Control, and Computing, pages 1310–1317, 2011. [23] D. J. Klein and M. Randić. Resistance distance. Journal of Mathematical Chemistry, 12(1):81–95, 1993. [24] C. Lai and S. Low. The redistribution of power flow in cascading failures. In 2013 51st Annual Allerton Conference on Communication, Control, and Computing (Allerton), pages 1037–1044. IEEE, oct 2013. [25] W. Lin and E. Bitar. Decentralized control of distributed energy resources in radial distribution systems. In 2016 IEEE International Conference on Smart Grid Communications (SmartGridComm), pages 296–301. IEEE, nov 2016. [26] W. Lin and E. Bitar. Performance bounds for robust decentralized control. In 2016 American Control Conference (ACC), pages 4323–4330. IEEE, 2016. [27] W. Lin and E. Bitar. Decentralized Stochastic Control of Distributed Energy Resources. IEEE Transactions on Power Systems, 8950(c):1–1, 2017. [28] A. Lorca and X. A. Sun. Multistage Robust Unit Commitment with Dynamic Uncertainty Sets and Energy Storage. IEEE Transactions on Power Systems, 32(3):1678–1688, 2017. [29] Á. Lorca, X. A. Sun, E. Litvinov, and T. Zheng. Multistage Adaptive Robust Optimization for the Unit Commitment Problem. Operations Research, 64(1):32–51, feb 2016. [30] M. Lubin, Y. Dvorkin, and S. Backhaus. A Robust Approach to Chance Constrained Optimal Power Flow With Renewable Generation. IEEE Transactions on Power Systems, 31(5):3840–3849, sep 2016. 26 [31] A. Mathai and S. Provost. Quadratic forms in random variables: Theory and applications. Statistics: textbooks and monographs, Vol. 126, 1992. [32] J. Mathias, A. Bušić, and S. Meyn. Demand Dispatch with Heterogeneous Intelligent Loads. In 50th Annual Hawaii International Conference on System Sciences (HICSS), Waikoloa, HI, United States, 2017. [33] J. Mathias, R. Kaddah, A. Bušić, and S. Meyn. Smart Fridge / Dumb Grid? Demand Dispatch for the Power Grid of 2020. In 2016 49th Hawaii International Conference on System Sciences (HICSS), pages 2498–2507. IEEE, jan 2016. [34] C. Matke, D. Bienstock, G. Muñoz, S. Yang, D. Kleinhans, and S. Sager. Robust optimization of power network operation: storage devices and the role of forecast errors in renewable energies. In H. Cherifi, S. Gaito, W. Quattrociocchi, and A. Sala, editors, Complex Networks & Their Applications V, volume 693 of Studies in Computational Intelligence, pages 809–820. Springer International Publishing, Cham, 2017. [35] C. D. Meyer, Jr. Generalized Inversion of Modified Matrices. SIAM Journal on Applied Mathematics, 24(3):315–323, may 1973. [36] S. Meyn, P. Barooah, A. Bušić, Y. Chen, and J. Ehren. Ancillary service to the grid using intelligent deferrable loads. IEEE Transactions on Automatic Control, 60(11):2847–2862, 2015. [37] S. Meyn, P. Barooah, A. Bušić, and J. Ehren. Ancillary service to the grid from deferrable loads: The case for intelligent pool pumps in Florida. In 52nd IEEE Conference on Decision and Control, pages 6946–6953. IEEE, dec 2013. [38] G. Ranjan, Z.-L. Zhang, and D. Boley. Incremental Computation of Pseudo-Inverse of Laplacian. In COCOA 2014: 8th International Conference on Combinatorial Optimization and Applications, volume 5573, pages 729–749. Springer International Publishing, 2014. [39] L. Roald, G. Andersson, S. Misra, M. Chertkov, and S. Backhaus. Optimal power flow with wind power control and limited expected risk of overloads. In 2016 Power Systems Computation Conference (PSCC), volume 60, pages 1–7. IEEE, 2016. [40] L. Roald, S. Misra, T. Krause, and G. Andersson. Corrective Control to Handle Forecast Uncertainty: A Chance Constrained Optimal Power Flow. IEEE Transactions on Power Systems, 32(2):1–1, 2016. [41] E. Sjodin, D. Gayme, and U. Topcu. Risk-mitigated optimal power flow for wind powered grids. In 2012 American Control Conference (ACC), pages 4431–4437. IEEE, jun 2012. [42] K. Sundar, H. Nagarajan, M. Lubin, L. Roald, S. Misra, R. Bent, and D. Bienstock. Unit commitment with N-1 Security and wind uncertainty. In 2016 Power Systems Computation Conference (PSCC), pages 1–7. IEEE, jun 2016. [43] J. A. Taylor and J. L. Mathieu. Uncertainty in Demand ResponseIdentification, Estimation, and Learning. In The Operations Research Revolution, pages 56–70. INFORMS, sep 2015. 27 [44] P. Van De Ven, N. Hegde, L. Massoulié, and T. Salonidis. Optimal control of end-user energy storage. IEEE Transactions on Smart Grid, 4(2):789–797, 2013. [45] P. Van Mieghem. Graph Spectra for Complex Networks. CUP, 2011. [46] P. Whittle. Networks: Optimisation and Evolution. Cambridge University Press, 2007. [47] B. Zhou and N. Trinajstić. A note on Kirchhoff index. Chemical Physics Letters, 455(13):120–123, mar 2008. [48] A. Zocca and B. Zwart. Minimizing heat loss in DC networks using batteries. In 2016 54th Annual Allerton Conference on Communication, Control, and Computing (Allerton), pages 1306–1313. IEEE, sep 2016. 28
3cs.SY
A rational analysis of curiosity Rachit Dubey ([email protected]) Department of Education, University of California at Berkeley, CA, USA Thomas L. Griffiths (tom [email protected]) Department of Psychology, University of California at Berkeley, CA, USA arXiv:1705.04351v1 [cs.AI] 11 May 2017 Abstract We present a rational analysis of curiosity, proposing that people’s curiosity is driven by seeking stimuli that maximize their ability to make appropriate responses in the future. This perspective offers a way to unify previous theories of curiosity into a single framework. Experimental results confirm our model’s predictions, showing how the relationship between curiosity and confidence can change significantly depending on the nature of the environment. Keywords: curiosity; rational analysis; computational model Introduction In 1928, upon returning from a vacation, Alexander Fleming, who was a professor of Bacteriology at St. Mary’s Hospital in London, noticed how a mold floating in one of his dirty petri dishes held the surrounding bacteria at bay. This peculiar event led him to develop a hypothesis that would be a prelude to the development of penicillin. The history of science abounds with incidents in which an event piqued the curiosity of a scientist thereby leading to important discoveries (other examples include Curie, Faraday, and Planck). For this reason, intellectual curiosity has long been recognized as the essence of science. In fact, Herbert Simon famously titled a 1992 talk given at Carnegie Mellon as ‘The cat that curiosity couldn’t kill’ and described curiosity to be not only the beginning of all science, but also its end (Gobet, 2016). Considering how important curiosity is to scientific discoveries and many other aspects of cognition, it is surprising that our understanding of curiosity as a psychological phenomenon remains quite limited (Simon, 2001; Gottlieb et al., 2013; Kidd & Hayden 2015). Encouragingly, the field has seen a revived interest in curiosity in recent years with psychologists and neuroscientists beginning concentrated efforts to study curiosity systematically (Kang et al, 2009; Gruber, Gelman, & Ranganath, 2013; Law et al., 2016; Walin, O’Grady & Xu, 2016). However, much previous work on curiosity has either focused on defining a taxonomy for curiosity or providing a mechanistic explanation of curiosity (Kidd & Hayden, 2015). This means that while we have made some progress describing the psychological processes involved in human curiosity, we have not satisfactorily provided an explanation of the purpose and function of curiosity. For example, a commonly held notion about the function of curiosity is that it motivates learning (Loewenstein, 1994; Kidd & Hayden, 2015). Although it is easy to say that learning is the goal of curiosity, this is not very precise in its meaning. How does curiosity facilitate learning? Why does it do so? In light of this, in this paper we present a rational analysis of curiosity in the spirit of Anderson (1990) and Marr (1982) with the goal of providing a purposive explanation of curiosity. Our work shows that a rational analysis can predict many aspects of curiosity without making assumptions about its mechanisms. We start by defining an abstract representation of the problem that curiosity solves and making a small number of assumptions about the nature of the environment. Following that, we explore the optimal solution to this problem in light of these assumptions. Our theory posits that people are curious about stimuli that maximally increase the usefulness of their current knowledge. Depending on the structure of the environment, the stimuli that maximize this value can either be ones that are completely novel or that are of intermediate complexity. As a consequence, our rational analysis provides a way to unite previously distinct theories of curiosity into a single framework. The rest of the paper is structured as follows. We first review previous theories of curiosity and then introduce our rational model of curiosity. Following that, we show how our model offers support to previous distinct accounts of curiosity thereby unifying them in a single model. We then conduct a behavioral experiment to test our model’s predictions and evaluate how our model accords with human curiosity. We close with a discussion of the implications of our results. Models of curiosity A number of theories have been proposed in the past to describe the psychological processes involving curiosity. In this section, we describe these theories in brief and provide their individual strengths and weaknesses. Curiosity based on novelty. Several psychological theories have linked curiosity with novelty by hypothesizing that gaining information about novel stimuli is intrinsically rewarding (Berlyne, 1950; Smock & Holt, 1962). Berlyne (1960) called this “perceptual curiosity” and described it as a driving force that motivates an organism to seek out novel stimuli which diminishes with an increase in exposure. This has also been supported by some neuroscientific studies that show that novel stimuli activate reward-responsive areas in the brain (Ranganath and Rainer, 2003; Düzel et al., 2010). However, a severe limitation of this theory is that it assumes that it is optimal for an individual to explore novel stimuli in all environments. A novel stimulus doesn’t necessarily mean that it contains information that is useful or generalizable to an individual. This is also pointed out by previous studies that show that exploration based only on novelty could lead agents to be trapped in unlearnable situations (Gottlieb et al., 2013). Curiosity based on information-gap. One of the most popular theories of curiosity is the information-gap hypothesis proposed by Loewenstein (1994). According to the information-gap hypothesis, curiosity arises whenever an individual has a gap in information prompting it to complete its knowledge and resolve the uncertainty. Thus, curiosity peaks when one has a small amount of knowledge but it diminishes when one knows too little or too much about the stimuli. A number of studies have supported this prediction and showed that curiosity is an inverted U-shaped function of confidence, with people showing the highest curiosity for topics that they were moderately confident about (Kang et al., 2009; Baranes, Oudeyer, & Gottlieb, 2015). Berlyne (1960) called this form of curiosity “epistemic curiosity” and described it as a drive to acquire knowledge. While this theory has considerable strengths, it is also constrained in that an individual can only be curious about stimuli in known contexts. Thus, if an individual has no prior knowledge about stimuli in the environment then it is not clear how curiosity will function in that environment (as one will not be curious about any stimuli in an environment that it has no prior knowledge of). Curiosity based on learning progress. A third theory concerning curiosity is guided by the hypothesis that learning progress generates intrinsic reward (Schmidhuber,1991; Schmidhuber, 2010). This hypothesis proposes that the brain is intrinsically motivated to pursue tasks in which one’s predictions are always improving. Thus, an individual will not be interested in tasks that are too easy or too difficult to predict but will rather focus on tasks that are learnable. Based on Schmidhuber’s framework, a number of papers in developmental robotics have supported this idea showing how an agent can explore in an unknown environment (Oudeyer & Kaplan, 2006; Oudeyer, Kaplan, & Hafner, 2007). While this theory can probably describe some forms of curiosity, it is again constrained in explaining curiosity in certain environments. For example, if an agent is ever present in an environment that has many difficult tasks then it is not clear how curiosity will work (as an agent will not be curious about anything within that environment). Summary and prospectus. While each of these theories have their strengths, we first note that all the above theories are concerned with describing how curiosity functions and how it relates to different psychological factors. However, none of these theories satisfactorily provide an explanation as to why curiosity works the way it does. Second, we believe that all these theories need not be in contention but are all rather special cases of curiosity. As we will describe in the rest of the paper, our rational model supports each of these theories and unifies them in one common model. Computational problem underlying curiosity Suppose that an agent is in an environment with n stimuli, each of which provides a reward if the appropriate response is produced. The goal of the agent is to decide what to explore in the environment in order to maximize its knowledge and hence maximize rewards in the future. The environment determines the probability with which each stimulus occurs in the environment. Let pk denote the “need probability” that a stimulus k will occur in the future (Anderson, 1990). Given this, the agent assigns a confidence value ck to each stimulus in the environment. ck denotes the probability the agent knows the correct response to the kth stimulus. This probability increases at a decreasing rate with respect to the number of exposures hk with that stimulus. hk denotes the number of times the agent has been exposed to the kth stimulus. For convenience, we describe the relationship between c and h by a bounded growth function, ck = 1 − e−hk . (1) However, our predictions hold for any monotonically increasing function. Next, the agent computes the value of its overall knowledge. The value, denoted as V , is a function of the need probability p and the confidence factor c and is given as follows: V = ∑ pk .ck . (2) k According to this equation, the value of an agent’s knowledge is simply the chance of successfully responding to the next stimulus computed by summing over all stimuli in the environment. The goal of the agent is to increase the value of its current knowledge V , which it can do so by taking actions to increase h for the various stimuli in the environment. So the computational problem that the agent has to solve is choosing which stimulus to explore further i.e. deciding which stimulus k to increase hk for. Deriving an optimal solution To solve the problem of choosing which stimulus to explore further, the agent can evaluate the change in V as it explores each stimulus in the environment. Thus for every stimulus k in the environment, the agent should compute the change in its knowledge that would result from exploring that stimulus. The stimulus that causes the largest increase in the overall value should be explored first. This computation can be done simply by differentiating V with respect to hk , Rational model of curiosity dck dV = pk . . dhk dhk In this section, we detail our rational model of curiosity. We first consider the abstract computational problem underlying curiosity and then formally derive an optimal solution to this problem. An agent operating according to this model will explore stimuli that have a high rate of change of value w.r.t exposure dV associated with them. This rate of change, i.e. dh , is simply k the curiosity the agent has for knowing the kth item, which we (3) about stimuli that it is least confident about: Ωk = 1 − ck . (6) According to our rational model, when the agent is in an environment where pk and hk are independent of each other (as described in Graph 2, Figure 1), the relationship between curiosity and exposure will be the one described in Equation 5 where pk is simply a constant value. Thus, curiosity is highest when exposure is lowest and it decreases as exposure increases i.e. curiosity is highest for novel stimuli. The relationship between curiosity and confidence can be rewritten as Figure 1: Relationship between need probability pk , exposure hk , and confidence ck in different environmental structures. Graph 1 shows an environment in which need probability is related to exposure and subsequently confidence. Graph 2 shows an environment in which need probability is independent of exposure and confidence. denote as Ωk . The agent will explore stimuli in the environment that it is most curious about. In this way, curiosity helps the agent to achieve its goal of maximizing its knowledge. Under the choice of the form of ck given in Equation 1, we calculate this derivative as follows: d(1 − e−hk ) . Ωk = pk . dhk (4) Upon differentiation, we get the relationship of curiosity Ωk , with respect to need probability pk and exposure hk as follows: Ωk = pk .e−hk . (5) Relationship to previous models Having a formal account of curiosity, we now describe how our model relates to previous theories of curiosity. First, we note that in our rational model framework, two different forms of environmental structure can exist. The first form comes in when the agent is an environment where pk is related to hk (as described in Graph 1, Figure 1). In this environment, stimuli frequently encountered by an agent are more likely to be needed in the future. Thus, the probability that the agent will require a stimulus in the future determines the number of times the agent is exposed to the stimulus which in turn determines the confidence of the agent in knowing that stimulus. The second form comes in when the agent is in an environment where pk and hk are independent of each other (as described in Graph 2, Figure 1). In this environment, the agent can encounter any stimulus in the future regardless of their previous occurrence. Novelty based curiosity. According to theories that are based on curiosity driven by novelty, an agent is most curious Ωk = pk .(1 − ck ). (7) If pk is equal for all k, this reduces to Equation 6. Thus, when need probability and exposure are not related to each other, our rational model is similar to the previously proposed novelty based curiosity theory. Information-gap hypothesis. When the agent is in an environment pk and hk are related to each other (as in Graph 1, Figure 1), then pk is proportional to hk and the relationship between curiosity and exposure given in Equation 5 reduces to Ωk ∝ hk .e−hk . (8) Subsequently, using Equation 1, confidence will be related to curiosity as Ωk ∝ − log(1 − ck ).(1 − ck ). (9) Interestingly, this relationship between curiosity and confidence is highly similar to the one described by the information gap hypothesis. Loewenstein used Shannon’s (1948) entropy formula to describe the relationship between curiosity and confidence as below: Ωk = − log(ck ).(ck ). (10) Both the information-gap theory and our model predict that an inverted U-shape relationship exists between curiosity and confidence. In this view, when an agent exists in an environment where need probability is related to exposure, our rational model relates to the information-gap theory. Relationship to curiosity based on learning progress. According to the learning progress hypothesis, an agent is intrinsically motivated to pursue tasks in which predictions are constantly improving thereby avoiding boring or extremely complicated tasks. An agent operating under this model ends up exploring stimuli of “intermediate complexity”. Our model proposes that an agent will explore stimuli that maximize the value of its current knowledge. In an environment where need probability and exposure are related to each other, then curiosity is highest for stimulus with moderate exposure i.e. intermediate complexity (Equation 8 and 9). Thus, Figure 2: Relationship between a) curiosity and exposure, and b) curiosity and confidence in an environment where need probability is related to exposure (Graph 1, Figure 1). in this environment, an agent that aims to maximize its knowledge behaves similarly to an agent whose curiosity is driven by learning progress. Summary. Whereas previous theories associated curiosity to factors such as novelty, knowledge gap, and learnability, our model shows that depending on the structure of the environment, an agent’s curiosity can be driven by any of these factors. In this way, our rational model allows to bridge previous theories related to curiosity in a single framework. In an environment where need probability and exposure are related, our rational model associates with the information gap and learning progress hypothesis. In an environment where need probability and exposure are not related, our model is akin to the novelty-based theory of curiosity. Empirical predictions The rational model presented above makes two different empirical predictions. Prediction 1. The first prediction arises when the agent is in an environment where the relationship between pk and hk holds true (as in Graph 1, Figure 1). The relationship between curiosity and exposure can be described using Equation 8 and between curiosity and confidence using Equation 9. Thus, Equation 8 predicts that an inverted U-shape relationship will exist between curiosity and exposure and Equation 9 similarly predicts that curiosity will be highest when the agent is moderately confident about a stimulus (see Figure 2). We test this prediction in the confidence sampling condition of our behavioral experiment. Note that this prediction fits the information gap and learning progress hypothesis which also predict an inverted Ushape curve between curiosity and confidence. While several studies have supported the existence of this U-shaped relationship, our model also predicts how to make this effect go away as described in our second prediction. Prediction 2. Our second prediction comes in when the agent is in an environment where the relationship between pk and hk no longer holds true (as described in Graph 2, Figure 1). Then the relationship between curiosity and exposure will be the one described in Equation 5 and the relationship between curiosity and confidence will be that given in Equation 7. Equation 5 predicts that curiosity is highest when exposure is lowest and it decreases as exposure increases. Similarly, Equation 7 predicts that curiosity will be highest when confidence is the lowest (also shown in Figure 3). We test this prediction in the uniform sampling condition of the behavioral experiment. While this prediction accords with the prediction of the novelty based hypothesis, that hypothesis can’t explain our model’s first prediction. On the other hand, while the information gap and learning progress hypothesis were in line with our model’s first prediction, both of these theories fail to explain our model’s second prediction. Testing the model predictions This section details the behavioral experiment that was conducted in order to test our model predictions. The experiment used two different scenarios – confidence sampling and uniform sampling – to assess whether people’s curiosity is affected by changes in the relationship between need probability and confidence. In the confidence sampling condition, we created an environment such that need probability was related to confidence (Graph 1, Figure 1) and in the uniform sampling condition they were independent of each other (Graph 2, Figure 1). Based on our model predictions, we hypothesize that an inverted U-shape relation will exist between confidence and curiosity in the confidence condition and a decreasing relation will exist in uniform sampling condition. Participants We recruited 298 participants from Amazon Mechanical Turk. They earned $1.50 for participation with the option of earning an additional bonus of $0.80. Participants in the experiment were randomly assigned to one of two conditions: confidence sampling condition (163 participants) and uniform sampling condition (135 participants). Informed consent was obtained using a consent form approved by the institutional review board at Berkeley. Stimuli Figure 3: Relationship between a) curiosity and exposure, and b) curiosity and confidence in an environment where need probability is independent of exposure (Graph 2, Figure 1). The stimuli used in the experiment were 40 trivia questions on various topics that were taken directly from Experiment 1 in Kang et al. (2009). According to the authors, these questions were designed to measure curiosity about semantic knowledge and evoke a range of curiosity levels. Procedure The experiment was divided into two phases – the main round and bonus round. The main round was used to elicit and measure curiosity in participants. Participants were shown 40 trivia questions one after another and were asked to rate their confidence (i.e., probability that they know the correct answer) and curiosity in knowing the correct answer. Curiosity ratings were on a scale from 1 to 7 and the confidence scale ranged from 0 to 100%. Following Kang et al.’s methodology, the raw curiosity ratings were individually normalized and confidence was rescaled to range from 0 to 1. The order of trivia questions was randomized for each participant. Thus, the main round of the experiment followed the procedure of Kang et al.’s design closely. This part of the experiment took approximately 7-8 minutes to complete. After the main round, the bonus round began which consisted of two parts. In the first part, all 40 questions from the main round were shown one after another and participants could choose to reveal the answer to those questions. However, each time they chose to reveal an answer, they had to wait an extra 10 seconds for the next question to appear. Findings from Experiment 3 of Kang et al. (2009) showed that participants were more likely to spend time, to wait longer, for the answers that they were more curious about. Thus, requiring participants to spend time to obtain information served as a proxy to measure their curiosity. In the second part, participants attempted to answer 10 questions that were sampled from the main round ($0.08 bonus for each correct answer). To discourse participants from using Google or other search engines, they were only given 2 minutes in total to answer the questions. At the beginning of the experiment, participants were randomly assigned to two conditions – the confidence and the uniform condition. Both the conditions had the same main round as described above but used different sampling methods for the bonus round. In the confidence condition, the sampling in bonus round was done based on the confidence ratings provided by the participants i.e. the questions for which participant’s confidence rating was higher were more likely to appear in the second part of the bonus round. In the uniform condition, this sampling procedure was completely random i.e. each question was equally likely to appear in second part of the bonus round. Critically, participants were informed about the sampling procedure for their respective condition before the beginning of the bonus round. In a sense, the confidence condition creates a situation in which confidence is related to need probability (Graph 1 in Figure 1) and the uniform condition breaks this relationship (Graph 2 in Figure 1). According to our model’s predictions we should see an inverted U-shape between curiosity and confidence for both the conditions in the main round. However, the curiosity of participants (i.e. the answers they revealed) should be different for both conditions in the bonus round. For the confi- Figure 4: Relationship of curiosity and confidence in the main round for a) confidence condition and b) uniform condition. The markers indicate mean curiosity at each confidence level and the solid curve is the regression line. Curiosity is an inverted-U function of confidence for both conditions. dence condition participants’ probability of revealing an answer should be highest for questions which they were moderately confident about. On the other hand, in the uniform condition, participants should be most curious about questions for which they were least confident about. Results For all analyses that follow, we removed participants that revealed either too little (<3) or too many answers (>37) in the bonus round. 78 participants were excluded based on this criterion and our final data consisted of 220 participants (118 in the confidence condition and 102 in the uniform condition). Main Round. Consistent with our prediction, an inverted U-shape exists between curiosity and confidence for both Figure 5: Probability of participants revealing an answer as a function of confidence in the bonus round. Consistent with our model’s prediction, an inverted U-shape exists between curiosity and confidence in the confidence condition and a decreasing relationship exists in the uniform condition. conditions (Figure 4). Following the method of Kang et al., we fitted curiosity with confidence and uncertainty i.e. confidence × (1-confidence) for both conditions. For the confidence condition, the model provided r = 0.2 and a significant coefficient for uncertainty (estimate = 2.01, p < 0.001). For the uniform condition, the model provided similar results with r = 0.2 and significant coefficient for uncertainty (estimate = 2.12, p < 0.001). Thus, for both conditions, the model provided a significant quadratic coefficient thereby demonstrating the prevalence of an inverted U-shape between curiosity and confidence for both conditions. Bonus Round. We first computed the probability of participants revealing an answer conditioned on the confidence rating for both the conditions. As per our model’s predictions, an inverted U-shape exists for the confidence condition and a decreasing relationship exists for the uniform condition (Figure 5). Similar to the previous analysis, we fitted confidence and uncertainty to both the conditions. For the confidence condition, the model provided r = 0.9 and a significant coefficient for both confidence and uncertainty (estimates = -0.15 and 0.53 respectively with p < 0.05 for both) thereby showing a U-shape relationship. For the uniform condition, the model provided r = 0.91 but the coefficient for uncertainty was not significant (p = 0.09). On the other hand, the coefficient for confidence was significant (estimate = -0.23, p < 0.001), implying a decreasing relationship of curiosity with confidence for the uniform condition. Discussion Curiosity is one of the hallmarks of human intelligence and is crucial to scientific discovery and invention. Models of curiosity have previously explained human curiosity by linking it to various psychological factors such as novelty, information-gap, and learning progress. We have shown that these different models are all special cases of curiosity — depending on the environment, curiosity can be driven by any of these factors. Along with providing a way to unify previous distinct mechanistic accounts of curiosity, our rational model explains human curiosity in various settings. Our results suggest that human curiosity is not only sensitive to the properties of the stimuli but it is also affected by the nature of the environment. If people are in an environment where need probability influences exposure, then their curiosity is highest for stimuli for which they are moderately confident about. On the other hand, if need probability and exposure are independent of each other then curiosity is highest for novel stimuli, i.e. stimuli for which people have little confidence. This can have important implications in the context of education where researchers are concerned with ways to pique curiosity in students. If we want to make people curious about tasks or activities for which they have little confidence in, perhaps subtle changes in the structure of the environment might be a step towards achieving that. We intend to explore such possibilities in future work, building upon the foundation established in this paper and working towards a better understanding of how to make people more curious especially in pedagogical settings. References Anderson, J. R. (1990). The adaptive character of thought. Psychology Press. Baranes, A., Oudeyer, P.-Y., & Gottlieb, J. (2015). Eye movements reveal epistemic curiosity in human observers. Vision research, 117, 81–90. Berlyne, D. E. (1950). Novelty and curiosity as determinants of exploratory behaviour1. British Journal of Psychology. General Section, 41(1-2), 68–80. Berlyne, D. E. (1960). Conflict, arousal, and curiosity. Düzel, E., Bunzeck, N., Guitart-Masip, M., & Düzel, S. (2010). Novelty-related motivation of anticipation and exploration by dopamine (nomad): implications for healthy aging. Neuroscience & Biobehavioral Reviews, 34(5), 660–669. Gobet, F. (2016). From bounded rationality to expertise. In Minds, models and milieux (pp. 151–166). Springer. Gottlieb, J., Oudeyer, P.-Y., Lopes, M., & Baranes, A. (2013). Information-seeking, curiosity, and attention: computational and neural mechanisms. Trends in cognitive sciences, 17(11), 585– 593. Gruber, M. J., Gelman, B. D., & Ranganath, C. (2014). States of curiosity modulate hippocampus-dependent learning via the dopaminergic circuit. Neuron, 84(2), 486–496. Kang, M. J., Hsu, M., Krajbich, I. M., Loewenstein, G., McClure, S. M., Wang, J. T. Y., & Camerer, C. F. (2009). The wick in the candle of learning: Epistemic curiosity activates reward circuitry and enhances memory. Psychological Science, 20(8), 963–973. Kidd, C., & Hayden, B. Y. (2015). The psychology and neuroscience of curiosity. Neuron, 88(3), 449–460. Law, E., Yin, M., Goh, J., Chen, K., Terry, M. A., & Gajos, K. Z. (2016). Curiosity killed the cat, but makes crowdwork better. In Proceedings of the 2016 CHI Conference on Human Factors in Computing Systems (pp. 4098–4110). Loewenstein, G. (1994). The psychology of curiosity: A review and reinterpretation. Psychological bulletin, 116(1), 75. Marr, D. (1982). Vision: A computational approach. Oudeyer, P.-Y., & Kaplan, F. (2006). Discovering communication. Connection Science, 18(2), 189–206. Oudeyer, P.-Y., Kaplan, F., & Hafner, V. V. (2007). Intrinsic motivation systems for autonomous mental development. IEEE transactions on evolutionary computation, 11(2), 265–286. Ranganath, C., & Rainer, G. (2003). Neural mechanisms for detecting and remembering novel events. Nature Reviews Neuroscience, 4(3), 193–202. Schmidhuber, J. (1991). Curious model-building control systems. In IEEE International Joint Conference on Neural Networks, 1991. (pp. 1458–1463). Schmidhuber, J. (2010). Formal theory of creativity, fun, and intrinsic motivation (1990–2010). IEEE Transactions on Autonomous Mental Development, 2(3), 230–247. Shannon, C. E. (1948). A mathematical theory of communication. Bell System Technical Journal, 27(4), 623–656. Simon, H. A. (2001). Seek and ye shall find: How curiosity engenders discovery. Designing for science: Implications from everyday, classroom, and professional settings, 5–20. Smock, C. D., & Holt, B. G. (1962). Children’s reactions to novelty: An experimental study of “curiosity motivation”. Child Development, 631–642. Walin, H., ’Grady, S. O., & Xu, F. (2016). Curiosity and its influence on children’s memory. In Proceedings of the 38th Annual Conference of the Cognitive Science Society.
2cs.AI
A Multi-Swarm Cellular PSO based on Clonal Selection Algorithm in Dynamic Environments Somayeh Nabizadeh Alireza Rezvanian Mohammd Reza Meybodi Computer & IT Engineering Department Islamic Azad University, Qazvin Branch Qazvin, Iran [email protected] Computer & IT Engineering Department Amirkabir University of Technology Tehran, Iran [email protected] Computer & IT Engineering Department Amirkabir University of Technology Tehran, Iran [email protected] Abstract— Many real-world problems are dynamic optimization problems. In this case, the optima in the environment change dynamically. Therefore, traditional optimization algorithms disable to track and find optima. In this paper, a new multiswarm cellular particle swarm optimization based on clonal selection algorithm (CPSOC) is proposed for dynamic environments. In the proposed algorithm, the search space is partitioned into cells by a cellular automaton. Clustered particles in each cell, which make a sub-swarm, are evolved by the particle swarm optimization and clonal selection algorithm. Experimental results on Moving Peaks Benchmark demonstrate the superiority of the CPSOC its popular methods. Keywords- dynamic environment; multi swarm cellular pso; cellular automata; clonal selection algorithm. system [9-10] and ant colony optimization were presented for solving dynamic optimization problems. In this paper, due to diversity maintenance and speeding up, the hybrid algorithm based on multi-swarm cellular PSO and clonal selection algorithm is proposed. In the proposed algorithm, a simple clustering is used to form sub-population in each cell and clonal selection algorithm is applied for each swarm in each cell to improve solutions. The rest of this paper is organized as follows: section II briefly introduced the cellular PSO. The proposed algorithm is described in section III. Experimental results of proposed algorithm on Moving Peaks Benchmark as a popular dynamic environment with comparison with alternative algorithms are reported in section IV. Finally, section 5 concludes the paper. II. I. INTRODUCTION In the real-world problems, many of optimization problems are modeled as dynamic optimization problems, which optima change whole the time. The traditional optimization algorithms are failed in the dynamic environments, because the traditional algorithms cannot track the changes in the environments [1]. Several approaches such as maintenance diversity methods, increase diversity methods, memory-based methods and multi-swarm methods are developed for solving dynamic optimization problems [2]. One of the successful algorithms in dynamic environments is particle swarm optimization (PSO) algorithm [3] with several developments. In [4], the parents maintain diversity and identify the promising regions while the offspring search local areas to find local extrema by multi-swarm algorithm. Cellular PSO is proposed by Hashemi et al [5-6] based on PSO and cellular automata. In cellular PSO, the search space is partitioned into cells. Individual in each cells make a subpopulation, are evolved by PSO. Moreover, Evolutionary algorithms such as genetic algorithm [7], differential evolution [8], artificial immune CELLULAR PSO The original PSO introduced in 1995, is based on swarm behavior by Kennedy and Eberhart. In PSO, each solution is considered as a particle which represents a single bird in a swarm. Initially, the particles are created and positioned randomly in the search space. Then, each particle is updated iteratively according to the best personal and global fitness observed value to reach optimal fitness [11]. In Cellular PSO, the search space is partitioned by a cellular automaton (CA). Particles in each cell in the CA searches and control its corresponding region according to some transmission state rules of CA. Each particle is assigned to a cell based on its position in the space and the search procedure is performed separately for each cell and its neighbors by using the PSO. This search method provides enough diversity and provides the ability of following multiple optimum solutions. In addition, neighboring cells communicate information about their best known solutions which results in a more appropriate cooperation between neighboring cells sharing their experiences. This in turn increases the efficiency of the algorithm [6]. At each iteration in the algorithm, the velocity and position of the particles are updated according to the following equations: (1) v i (t 1) wv i (t ) c1 r1 ( pBest i pi (t )) c 2 r2 (lBestMem k pi (t )) (2) pi t 1 pi t vi t i 1, ..., m Where vi is the velocity of the ith particle and pi is its position, while r1 and r2 are uniformly distributed random variables in (0,1). c1 and c2 are the learning parameters which are often considered to be equal. w is the inertia weight which may be constant or variable. pBesti is the best known solution for the ith particle and lBestMemk is the best known solution of kth cell neighbor to which particle i belongs. Kamosi et al. proposed a multi-swarm algorithm for dynamic environments, which address the diversity loss problem by introducing two types of swarm: a parent swarm, which explores the search space to find promising area containing local optima and several non-overlapping child swarms, each of which is responsible for exploiting a promising area found by the parent swarm [12]. The main drawback of cellular PSO is that the number of cells exponentially increases as the dimension of the problem and/or the number of partitions increase. Moreover, it is not possible to change the number of cells during runtime. To overcome the problem of fixed number of cells, clustering is used to dynamically create swarms in each cell. Due to clustering technique, it is not necessary to increase the number of cells in order to obtain a more precise search and therefore, the exponential increase in the number of cells is prevented. Moreover, clonal selection algorithm is applied for solution improvement. The general procedure of CSA is defined as follows: Clonal Selection Algorithm (CSA) 1. Initialize population of antibodies randomly. 2. Repeat steps 3-6 until stopping conditions is met 3. Evaluate the antibodies and calculate their affinity 4. Select a number of the highest affinity antibodies of N and cloning these antibodies with respect their affinities 5. Mutate all the colonies with a rate proportional to their affinities 6. Add the mutated antibodies to the population and reselect a number of the maturated antibodies as memory It is note that, several versions of CSA are developed by researchers in the literature, although it is used standard CSA in the proposed algorithm. IV. PROPOSED ALGORITHM In cellular PSO, a CA is used for solution space partitioning. CA technique is known as a mathematical model of systems with several simple components which have local communications. Using CA and the local rules, an ordered structure may be obtained from a completely random state. Two well-known neighborhood structures of Von Neumann and Moore in CA are shown in figure 1. (a) III. CLONAL SELECTION ALGORITHM Artificial immune system algorithms are bio-inspired algorithms which have been inspired by natural immune system. Natural immune system is divided into innate immune and adaptive immune, the algorithms are proposed by researchers, which are modeled based on the latter. Moreover, based on several theories for natural immune system, the inspired models are developed into five groups: (1) negative selection algorithms, (2) Artificial immune network, (3) clonal selection algorithms, (4) Danger Theory inspired algorithms, (5) Dendritic cell algorithms [13-14]. Clonal selection algorithm (CSA) is one of the artificial immune system algorithms, which is inspired from natural immune system mechanisms. Clonal selection was proposed by de Castro for learning and optimization [15]. The main features of CSA were considered such as affinity proportional reproduction and hypermutation. (b) Figure 1. 2-D Neighborhood structure in CA; (a) Moore; (b) Von Neumann In our proposed method, generally, after partitioning the space into cells, a simple clustering is applied on particles to make swarms in each cell. In during the cellular PSO, clonal selection is used to improve the solutions. In the proposed algorithm, the position and the velocity of the particles are updated according to equation (3) and equation (2). v i (t 1) wv i (t ) c1r1 ( pBest i (3) x i (t )) c 2r2 (sBestMem k x i (t )) Where sBestMemk , is the best position in group k, is used as dynamic memory of the group to which particle i belongs. In addition, best particles in each group are updated by using the following equation. k (4) v (t 1) c r ( pBest x (t )) c r (cBestMem x (t )) i 1 1 i 2 2 i k k i k c3r3 (x i (t ) sBestMeml ) wv i (t ) Where sBestMemlk, the best position in dynamic memory of the cell to which the group belongs and sBestMemlk is the best position in other groups in the cell. As an example, if the best particle in group j of cell k is updated, sBestMemlk is the best position among all the groups in cell k except group j. The forth part of the Equation prevents the groups from converging to a local extrema. In the proposed algorithm, after each change clonal selection which increases the efficiency of the algorithm is performed for each swarm. The CSA is applied to the CBest of each cell. The overall process includes definition of a magnitude and a direction of movement for each dimension determining the magnitude and direction of the search in that dimension. Moving in each dimension according to the specified magnitude and direction, the fitness is calculated for the obtained position and if improved, the current position is substituted by the obtained one and if not, the movement direction is reversed in that dimension and a new direction is followed. If the fitness is improved performing the latter action, the update is performed and if not, the magnitude of movement is decreased and the process begins for the next dimension. The whole procedure is performed for all dimensions until in a movement further improvement is impossible in all dimensions and the minimum movement magnitude is reached in all dimensions. The flow chart of proposed algorithm is illustrated as figure 2. 100 90 80 70 60 50 40 30 20 10 0 0 10 20 30 40 50 60 70 80 90 100 60 70 80 90 100 (a) 100 90 80 70 60 50 40 30 20 10 0 0 10 20 30 40 50 (b) Figure 3. (a) Particles in the partitioned search space (b) new position of the particles in the search space after some iterations. V. EXPERIMENTAL RESULTS In order to evaluate the proposed algorithm in dynamic environments, several experiments are performed on Moving Peaks Benchmark (MPB). In the MPB, there are some peaks in a multi-dimensional space, where the height, width, and position of each peak alter when the environment changes. Unless stated otherwise, the parameters of the MPB are set to the values presented in table 1 [12,16-17]. TABLE I. Figure 2. Flow chart of proposed method In the algorithm, when particles in a swarm converge to a position, the swarm becomes inactive and its particles are used as free particles in finding better solutions in other swarms of the cell or in the neighbor cells. Figure 3 depict the running of the algorithm of particles in a 2-D search space. DEFAULT SETTINGS OF MPB Parameter number of peaks m Frequency of change f height severity width severity peak shape shift length s number of dimensions D cone height range H cone width range W cone standard height I Search space range A Value 10 every 5000 evaluations 7.0 1.0 Cone 1.0 5 [30.0, 70.0] [1, 12] 50.0 [0, 100] TABLE IV. In order to compare the proposed method with other algorithms, the offline error (OE), provided by the equation below, is used. 1 T OE f ( pbest (t ) (5) T t 1 Where f is the fitness function, T is the maximum number of iterations and pBest(t) is the best known global solution found by the algorithm in iteration t. For the proposed method the inertia weight is considered as a random variable between 0.4 and 0.9. The acceleration coefficient is set to 1.496180, the number of particles is 40; the type of neighborhood structure is Moore and the size of partition is 5. In the experiments, proposed algorithm so called Cellular PSObased on Clonal Selection as CPSOC is compared with Hibernating Multi Swarm Optimization as HmSO [17], Learning Automata based Immune Algorithm as LAIA [9], Cellular Differential Evolution as CDE [8], Cellular Particle Swarm Optimization as CPSO [6], and Adaptive Particle Swarm Optimization as APSO [16] by offline error. For each experiment, the average offline error and standard deviation of 30 times independent running is reported. The results of several dynamics are listed in the table II, to table V. TABLE II. M HmSO LAIA CDE CPSO APSO CPSOC 8.53±0.49 7.34±0.32 8.20±0.19 7.81±0.51 4.81±0.14 8.29±0.55 5 7.40±0.31 7.05±0.39 6.06±0.05 6.59±0.31 4.95±0.11 6.29±0.21 10 7.56±0.27 6.91±0.32 5.93±0.04 7.35±0.22 5.16±0.11 5.45±0.17 20 7.81±0.20 6.95±0.38 5.60±0.03 7.79±0.27 5.81±0.08 5.47±0.19 30 8.33±0.18 6.92±0.33 5.56±0.03 7.88±0.23 6.03±0.07 5.59±0.12 40 8.45±0.18 6.84±0.31 5.47±0.02 7.83±0.21 6.10±0.08 5.63±0.16 50 8.83±0.17 6.43±0.29 5.47±0.02 8.12±0.22 5.95±0.06 5.74±0.11 100 8.85±0.16 6.58±0.26 5.29±0.02 7.90±0.24 6.08±0.06 5.45±0.07 200 8.85±0.16 6.41±0.27 5.07±0.02 7.82±0.20 6.20±0.04 5.79±0.10 M HmSO HmSO LAIA CDE CPSO APSO CPSOC 1 1.75±0.10 2.48±0.15 2.38±0.78 3.78±0.25 1.06±0.03 2.31±0.21 5 1.92±0.11 2.51±0.19 2.12±0.02 2.91±0.14 1.55±0.05 2.01±0.13 10 2.39±0.16 2.82±0.27 2.42±0.02 3.18±0.16 2.17±0.07 1.56±0.15 20 2.46±0.09 3.16±0.36 3.05±0.04 3.65±0.13 2.51±0.05 2.41±0.13 30 2.57±0.05 3.14±0.33 3.29±0.03 3.90±0.11 2.61±0.02 2.78±0.10 40 2.56±0.06 3.02±0.31 3.43±0.03 4.20±0.13 2.59±0.03 2.90±0.12 50 2.65±0.05 3.05±0.31 3.44±0.02 4.08±0.11 2.66±0.02 3.18±0.09 100 2.72±0.04 3.14±0.35 3.36±0.01 4.23±0.09 2.62±0.02 3.22±0.07 200 2.81±0.04 3.08±0.32 3.13±0.01 4.09±0.10 2.64±0.01 3.09±0.12 TABLE V. M HmSO OFFLINE ERROR ±STANDARD ERROR FOR F =5000 LAIA CDE CPSO APSO CPSOC 1 0.87±0.05 1.94±0.19 1.53±0.07 2.36±0.14 0.53±0.01 1.02±0.14 5 1.18±0.04 2.09±0.18 1.50±0.04 1.94±0.16 1.05±0.06 0.99±0.15 10 1.42±0.04 2.14±0.15 1.64±0.03 2.09±0.13 1.31±0.03 1.75±0.10 20 1.50±0.06 2.97±0.21 2.64±0.05 2.94±0.13 1.69±0.05 1.93±0.11 30 1.65±0.04 2.98±0.23 2.62±0.05 3.04±0.09 1.78±0.02 2.28±0.10 40 1.65±0.05 3.07±0.29 2.76±0.05 3.16±0.11 1.86±0.02 2.62±0.09 50 1.66±0.02 2.93±0.27 2.75±0.05 3.19±0.10 1.95±0.02 2.74±0.10 100 1.68±0.03 3.06±0.24 2.73±0.03 3.24±0.09 1.95±0.01 2.84±0.12 200 1.71±0.02 2.95±0.23 2.61±0.02 3.15±0.08 1.90±0.01 2.69±0.08 OFFLINE ERROR ±STANDARD ERROR FOR F =500 1 TABLE III. M OFFLINE ERROR ±STANDARD ERROR FOR F =2500 OFFLINE ERROR ±STANDARD ERROR FOR F =1000 LAIA CDE CPSO APSO CPSOC 1 4.46±0.26 4.96±0.32 4.98±0.35 5.86±0.42 2.72±0.04 4.74±0.32 5 4.27±0.08 4.01±0.31 3.96±0.04 5.26±0.26 2.99±0.09 3.95±0.21 10 4.61±0.07 3.94±0.29 3.98±0.03 5.75±0.23 3.87±0.08 3.20±0.20 20 4.66±0.12 3.72±0.29 4.53±0.02 5.74±0.19 4.13±0.06 3.52±0.17 30 4.83±0.09 4.03±0.31 4.77±0.02 5.84±0.16 4.12±0.04 3.96±0.12 40 4.82±0.09 3.97±0.32 4.87±0.02 5.84±0.17 4.15±0.04 4.21±0.17 50 4.96±0.03 4.22±0.31 4.87±0.02 5.84±0.14. 4.11±0.03 3.98±0.11. 100 5.14±0.08 4.19±0.32 4.85±0.02 5.73±0.11 4.26±0.04 4.13±0.12 200 5.25±0.08 4.38±0.31 4.46±0.01 5.48±0.11 4.21±0.02 4.15±0.01 According to the results of the table II to table V, the proposed algorithm is better than alternative algorithms relatively. VI. CONCLUSION In this paper, an improving cellular PSO algorithm proposed by clonal selection algorithm in dynamic environment. The proposed algorithm, speed up the clellular PSO algorithm by clustering and improve the quality of solutions by clonal selection algorithm. Moreover in the proposed algorithm, it is applied precise search without increasing the number of partitions. The experimental results on the moving peaks benchmark as a popular dynamic environment with comparison with state of the art algorithms shows the relative improvements for our suggestions. REFERENCES [1] [2] [3] C. Cruz, J. R. González, and D. A. Pelta, “Optimization in dynamic environments: a survey on problems, methods and measures,” Soft Computing, vol. 15, no.7, pp. 1427-1448, 2010. D. Ayvaz, H. R. Topcuoglu, and F. Gurgen, “Performance evaluation of evolutionary heuristics in dynamic environments,” Applied Intelligence, pp. 1–15, 2011. S. Nabizadeh, K. Faez, S. Tavassoli, and A. Rezvanian, “A novel method for multi-level image thresholding using particle swarm Optimization algorithms,” in 2010 2nd International Conference on Computer Engineering and Technology (ICCET), 2010, vol. 4, pp. V271-V275. [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] R. I. Lung and D. Dumitrescu, “A collaborative model for tracking optima in dynamic environments,” in Evolutionary Computation, 2007. CEC 2007. IEEE Congress on, 2007, pp. 564-567. A. B. Hashemi and M. Meybodi, “A multi-role cellular PSO for dynamic environments,” in 14th International CSI Computer Conference (CSICC), 2009, pp. 412-417. A. Hashemi and M. Meybodi, “Cellular PSO: A PSO for dynamic environments,” Advances in Computation and Intelligence, Lecture Notes in Computer Science, vol. 5821, pp. 422-433, 2009. H. Wang, S. Yang, W. Ip, and D. Wang, “Adaptive Primal–Dual Genetic Algorithms in Dynamic Environments,” Systems, Man, and Cybernetics, Part B: Cybernetics, IEEE Transactions on, vol. 39, no. 6, pp. 13481361, 2009. V. Noroozi, A. Hashemi, and M. Meybodi, “CellularDE: a cellular based differential evolution for dynamic optimization problems,” Adaptive and Natural Computing Algorithms, Lecture Notes in Computer Science, vol. 6593, pp. 340-349, 2011. A. Rezvanian and M. R. Meybodi, “An adaptive mutation operator for artificial immune network using learning automata in dynamic environments,” in 2010 Second World Congress on Nature and Biologically Inspired Computing (NaBIC), 2010, pp. 479-483. A. Rezvanian and M. R. Meybodi, “Tracking Extrema in Dynamic Environments Using a Learning Automata-Based Immune Algorithm,” Grid and Distributed Computing, Control and Automation, vol. 121, pp. 216-225, 2010. A. Hashemi and M. Meybodi, “A note on the learning automata based algorithms for adaptive parameter selection in PSO,” Applied Soft Computing, vol. 11, no. 1, pp. 689-705, 2011. M. Kamosi, A. B. Hashemi, M. R. Meybodi, "A New Particle Swarm Optimization Algorithm for Dynamic Environments", Swarm, Evolutionary, And Memetic Computing, Lecture Notes in Computer Science, 2010, vol. 6466, pp. 129-138, A. Rezvanian and M. R. Meybodi, “LACAIS: Learning Automata based Cooperative Artificial Immune System for Function Optimization,” in 3rd International Conference on Contemporary Computing (IC3 2010), Noida, India. Contemporary Computing, CCIS, 2010, vol. 94, pp. 64-75. D. Dasgupta, S. Yu, F. Nino, “Recent Advances in Artificial Immune Systems: Models and Applications”, Applied Soft Computing, vol. 11, no. 2, pp. 1574-1587, 2011. L.N. De Castro, F. J.Von Zuben, F.J., “Learning and optimization using the clonal selection principle”, IEEE Transactions on Evolutionary Computation, vol. 6, no. 3, pp. 239-251, 2002. I. Rezazadeh, M. R. Meybodi, A. Naebi, “Adaptive Particle Swarm Optimization Algorithm for Dynamic Environments”, Advances In Swarm Intelligence, Lecture Notes in Computer Science, 2011, vol. 6728, pp. 120-129. M. Kamosi, A. B. Hashemi, M. R. Meybodi, “A hibernating multiswarm optimization algorithm for dynamic environments”, in 2010 Second World Congress on Nature and Biologically Inspired Computing (NaBIC), 2010, pp. 363-369.
9cs.NE
JOURNAL OF LATEX CLASS FILES, VOL. 13, NO. 9, SEPTEMBER 2014 1 From State Estimation to Network Reconstruction arXiv:1701.09084v1 [cs.SY] 28 Jan 2017 Farnaz Basiri, Jose Casadiego, Marc Timme, Dirk Witthaut Abstract—We develop methods to efficiently reconstruct the topology and line parameters of a power grid from the measurement of nodal variables. We propose two compressed sensing algorithms that minimize the amount of necessary measurement resources by exploiting network sparsity, symmetry of connections and potential prior knowledge about the connectivity. The algorithms are reciprocal to established state estimation methods, where nodal variables are estimated from few measurements given the network structure. Hence, they enable an advanced grid monitoring where both state and structure of a grid are subject to uncertainties or missing information. Index Terms—State estimation, Power system control, SCADA systems, Compressed sensing I. I NTRODUCTION The secure and reliable operation of complex power grids requires a precise knowledge of the grid topology and the state of connected generation and transmission elements. A central tool is ‘state estimation’, i.e the estimation of the current state of the nodes from few, possibly noisy measurements and the grid data. Various methods and algorithms have been developed in this field, see e.g. [1] for a review. A prime example is the estimation of the voltage phase angles from power flow measurements (see e.g. [2] for basic textbook examples). State estimation algorithms typically assume that the network structure, i.e. the location and parameters of transmission lines and transformers, are known. However, parts of the information might be lacking or uncertain, for example for contingencies or attacks, such that the question arises: Is it possible to reconstruct the network structure from local measurements only? In this article we develop two algorithms that enable the faithful reconstruction of the network structure or parts of it from the measurement of nodal variables. Special attention is paid to the efficiency of these methods: We show how to reduce the number of measurements using methods from compressed sensing exploiting the structural properties of power grids. We here focus on the DC approximation to formulate the fundamental ideas of network reconstruction most clearly. The presented algorithms can find several applications in the monitoring and operation of (smart) power grids. While it is unlikely that the entire network structure is unknown, situations regularly occur where parts of the information F. Basiri is with the Forschungszentrum Jülich, Institute for Energy and Climate Research - Systems Analysis and Technology Evaluation (IEK-STE), 52428 Jülich. J. Casadiego and M. Timme are with the Max Planck Institute for Dynamics and Self-Organization (MPIDS), 37077 Göttingen, Germany. D. Witthaut is with the Forschungszentrum Jülich, Institute for Energy and Climate Research - Systems Analysis and Technology Evaluation (IEK-STE), 52428 Jülich, Germany and the Institute for Theoretical Physics, University of Cologne, 50937 Köln, Germany. is lacking. Manual switches still exist in many distribution grids, transmission lines can get lost in contingency cases and targeted attacks can cause entire regions of a grid to collapse. We present an example where the connectivity in two regions of the grid is a priori unknown, but can be reconstructed from a single snapshot of the nodal variables. In future power grids, the network’s structure will become even more variable: The transmission of high-voltage direct current (HVDC) lines in hybrid power grids can be actively controlled and the effective line parameters can be regulated with flexible alternating current transmission system (FACTS) devices. Then it becomes essential to include lacking information or uncertainties of the grid topologies in any grid monitoring tool. The methods presented in this article shall contribute to the development of such advanced monitoring algorithms [3]–[5]. II. T HE DC APPROXIMATION The DC approximation describes the flow of real power flow in AC power grids in a linearized way. It is derived from the full nonlinear load flow equations under the following additional simplifying assumptions [2], [6]–[8]: • All bus voltage magnitudes |Vs | are close to 1 p.u. and approximated to be exactly |Vs | = 1 p.u. • Voltage angle differences across branches are small, such that sin(ϕs − ϕr ) ≈ ϕs − ϕr and cos(ϕs − ϕr ) ≈ 1. • Branches can be considered lossless. In particular, branch resistances and charging capacitances are negligible. The approximate real power flow from node s to node r over a transmission line with reactance Xsr is then given by |Vs ||Vr | −1 sin(ϕs − ϕr ) ≈ Xsr (ϕs − ϕr ) (1) Xsr where ϕs is the phase angle at bus s. The real power balance at the node s reads N N X X −1 Ps = Psr = Xsr (ϕs − ϕr ). (2) Psr = r=1 r=1 For notational convenience we summarize these equations in matrix form. We define the vector of all voltage angles and power injections, ϕ = (ϕ1 , . . . , ϕN )T ∈ RN , P = (P1 , . . . , PN )T ∈ RN , where N is the number of buses or nodes in the grid and the superscript ‘T ’ denotes the transpose of a vector or matrix. The DC approximation then yields the condition Bϕ = P , (3) N ×N where the nodal susceptance matrix B ∈ R has elements  X N  X −1 if k = n; j=1 nj Bnk = (4)  −X −1 if k 6= n. nk JOURNAL OF LATEX CLASS FILES, VOL. 13, NO. 9, SEPTEMBER 2014 2 The matrix B is a Laplacian matrix, which has one zero eigenvalue with eigenvector (1, 1, . . . , 1)T [9]. This eigenvector represents a global shift of all voltage angles without physical significance. To avoid this complication, one often fixes the voltage angle at a reference bus and excludes this bus from the calculation, i.e. the corresponding row and column will be missing in B. We finally note that mathematically equivalent models of flow are used to describe hydraulic networks [10] or vascular networks of plants [11]. III. S TATE E STIMATION State estimation is a mathematical procedure by which the state of an electric power system is extracted from a set of measurements [1]. In general, any measurement can be expressed as a function of the system state. Let zi = hi (x) (5) denote a measured quantity, where x is the system state and hi is a function specific to the measured quantity zi . Assume that M measurements are taken. Then, all measurements can be written in compact form z = h(x) (6) where x ∈ RN ×1 is the system state, z ∈ RM ×1 is a vector of measured quantities and h is a vector function, i.e. a mapping RN → RM Typically more measurements than the number of state variables to be determined are taken, i.e. M > N , such that equation (6) is overdetermined. It is then solved in a leastsquares fashion, i.e. one calculates x such that kz − h(x)k22 is minimized. For underdetermined equations (6) typically many solutions exist. It is often helpful to work with a simplified DC approximation model for the measurement equations in analyzing the inherent limitations of various methods related solely to the measurement configuration [12]. The state of the grid is described by the voltage phase angles x = ϕ and shall be estimated from measurements. As explicated above, the real power flow measured from bus s to r can be approximated by −1 Psr = Xsr (ϕs − ϕr ) + esr N X Psr + e0s Let us come back to the defining equation for the DC approximation Bϕ = P . (9) In state estimation, we assume that the nodal phase angles ϕ are difficult to measure and shall be estimated from the knowledge of the two other quantities in this equation, B and P . But we can also reverse the problem and ask what happens if we don’t know the nodal susceptance matrix B. Can we efficiently reconstruct its entries from measurements of the two remaining quantities P and ϕ? This problem may appear hypothetical at a first glance, as the network structure and parameters are generally known. But there are situations where at least parts of the network structure are unknown: Switches can be open or closed, transmission lines can undergo failures, or plans may be inaccurate. Even more, in times of war or terrorism we may be extremely unsure about the physical integrity of parts of the grid. Can we reconstruct the structure of the grid from measurements only? In the following we develop a mathematical theory of network reconstruction. To introduce the method, we start from the hypothetical situation that B is completely unknown, whereas P and ϕ can be measured perfectly. We then study more realistic cases, where only parts of the grid topology are unknown. We first notice that a single measurement of P and ϕ will obviously not be enough to reconstruct the entire grid topology. However, we may repeat our measurement at different times t1 , t2 , . . . , tM such that we obtain a large number of conditions on the entries of B of the form X Brk ϕk (tm ) = Pr (tm ) (10) k which hold for all rows r = 1, . . . , N and all measurement time steps m = 1, . . . , M . Furthermore we know that the rowsums of the nodal susceptance matrix (4) vanish, X Brk = 0. (11) k In total we thus have N × (M + 1) conditions which we can use to reconstruct the unknown entries of B. A. Row-wise reconstruction (7) where ϕs is the phase angle at bus s and esr is a measurement error. Similarly, a power injection measurement Ps = IV. N ETWORK R ECONSTRUCTION (8) r=1 at a given bus s can be expressed as a sum of flows along incident branches to that bus. The measurement vector z thus consists of a subset of the power flows Psr and power injections Ps . In the DC approximation the vector function h are all linear, which strongly simplifies the problem such that it is especially suitable to introduce new concepts such as network reconstruction. In a first approach we aim to reconstruct the nodal admittance matrix row-by-row (cf. [13]–[16]). To simplify notation we collect all measurement conditions (10) and the condition (11) for a given row r and rewrite them in matrix form      Pr (t1 ) ϕ1 (t1 ) · · · ϕN (t1 )  B r1  .   ..  ..  .   ..   ..  .  (12)   .  =  Pr (tM ) ϕ1 (tM ) · · · ϕN (tM ) BrN 0 1 ··· 1 | {z } | {z } =:B r {z } | =:Φ N ×1 =:P r Here, B r ∈ R denotes the transpose of the rth row of the nodal admittance matrix B, which we want to reconstruct. The matrix Φ ∈ R(M +1)×N summarizes all measurement results JOURNAL OF LATEX CLASS FILES, VOL. 13, NO. 9, SEPTEMBER 2014 3 for the voltage phase angles at all time steps, while the vector P r ∈ R(M +1)×1 summarizes the values of the power injection only for node r. The last row of the matrix equation represents the condition (11) for the row sum. Now we have to distinguish, whether equation (12) is (over)determined or underdetermined. If the number of linearly independent equations is larger or equal to N we generally have enough information to directly compute B r . In particular there is exactly one solution if rank(Φ̄|P¯r ) = rank(Φ̄) = N , which can be calculated using Gaussian elimination. Nevertheless, matrix inversion can be numerically ill-conditioned, especially for systems with large N [17]. If the data includes some measurement noise, the system of equations (12) can be overdetermined when measuring M + 1 > N times such that it is solvable in a least squares fashion, i.e. we have to determine the vector B r ∈ RN ×1 minimizing the 2-norm kΦB r − P r k22 = M +1 X (ΦB r − P r )2k . (13) k=1 To efficiently reconstruct the grid topology, we want to rely on as few measurements as possible. If M +1 < N , we generally have an underdetermined set of equations which admits many possible solutions. Is it possible to obtain the correct solution also in this case? Do we have more information about B r which we can exploit? Indeed, we know that a power grid is typically very sparse – a single substation is connected to only few other substations. Thus we choose the one solution to equation (12) which minimizes the number of non-zero entries of B r . Unfortunately, the direct minimization is computationally hard in general. In 2006 Candes, Romberg, Tao and Donoho showed that an efficient reconstruction is nevertheless possible using a convex surrogate for sparsity: the 1-norm [18], [19]. Under weak conditions, the correct sparse solution can be calculated efficiently by minimizing the 1-norm kB r k1 = N X |B rk | (14) k=1 subject to the constraint (12). This problem can be mapped to a linear program which we explicate in the following section. B. Partial reconstruction In applications we will rarely encounter the situation that the structure of a power grid is completely unknown. In a typical application we know the value of Brs of all transmission lines (s, r) in one part of the grid and have to reconstruct only the remaining entries of the matrix B – for instance we might want to monitor the position of manual switches at remote places of the grid. To keep track of our knowledge about the network, we define the matrix K ∈ RN ×N with entries  1 if the value of Brs is known for line (r, s) Krs := 0 otherwise. (15) We again proceed row by row. For the rth row we reduce equation (12) to red Φred = P red (16) r Br r , where  P red r  ϕc (t1 ) N  ..  X   = Pr − Brc Krc  .   ϕc (tM ) c=1 1 (17) and Φred is the submatrix of Φr obtained by deleting all r columns c for which Krc = 1 and B red is the submatrix of r B r obtained by deleting all rows r0 for which Kr,r0 = 1. The dimension of the reduced linear system of equations (16) is smaller than in the original problem (12), such that the correct solution can typically be found from fewer measurements. C. Reconstruction from power flow measurements The reconstruction scheme introduced above requires the knowledge of the voltage phase angle at all nodes of the grid. This data can in principle be obtained using phasor measurement units (PMUs), but these are typically very expensive. The measurement of other quantities such as real power flows is typically much simpler. Fortunately, we usually do not have to reconstruct the entire grid in most cases. In a typical application we know a lot about the grid and have to reconstruct only parts of the matrix B. Then the measurement of power injections and real power flows of a certain subset of transmission lines can be enough to perform the reconstruction of the remaining data using the methods described above. Technically, this amounts to combining methods of classical state estimation and network reconstruction. So assume that we can measure the power injection Pn for all nodes n ∈ {1, . . . , N } at the time steps t1 , . . . , tM . In addition we have knowledge about the transmission line parameters, in particular Xsr , and measure the real power flow  −1 Psr (tm ) = Xsr ϕr (tm ) − ϕs (tm ) (18) for a subset L of all transmission lines at all time steps t1 , . . . , tM . If this set of equations is fully determined or even overdetermined we reconstruct the state vector ϕ(tm ) as in the classical state estimation problem described in section III. As before the resulting estimates for the nodal phase angles for all time steps t1 , . . . , tM are then summarized in the matrix Φ. In addition we have partial knowledge about the nodal susceptance matrix, in particular we already know the entries −1 Brs = Bsr = −Xsr (19) for all (s, r) ∈ L. This information can then be used to reconstruct the remaining entries of B as described in the previous section. V. I MPLEMENTATION A. Least-squares solution If we have many measurements or prior knowledge available, then the system of equations (12) can be be overdetermined. In this case equation must be solved in a least squares fashion, i.e. we have to solve min kΦB r − P r k22 , Br (20) JOURNAL OF LATEX CLASS FILES, VOL. 13, NO. 9, SEPTEMBER 2014 4 which leads to [15] Start B r = (ΦT Φ)−1 ΦT P r (21) Measurement of Φ and 𝑃 provided that Φ is full rank such that the inverse exists. Leastsquares solutions are already implemented in many numerical solvers, for instance in the MATLAB function mldivide. Add constraint ∑𝑐 𝐵𝑟𝑐 = 0 B. Minimizing the 1-norm no 𝑟𝑘(Φ) < 𝑁 ? The key to an efficient reconstruction of B from an underdetermined system of equations is the minimization of the 1-norm [18], [19]. This problem can be mapped to a linear program which can be solved efficiently, i.e. the computation time scales at most polynomially with the input length. So we consider the linear system of equations (12) and assume that it is solvable and underdetermined. The solutions span an affine subspace of of RN with dimension D = N − rank(Φ). All solutions can be written as + W y, B r = B (sp) r Linear Sy underdet yes 𝑟 = 1 (sp) Calculate Specific solution 𝐵𝑟 Solve linear program (22) (sp) min𝑦 ‖𝑊𝑦 + 𝐵𝑟 ‖ 1 N ×D where the columns of the matrix W ∈ R form a basis for the kernel (nullspace) of Φ and y ∈ RD is a vector of is a specific solution to equation (12); in parameters. B (sp) r the implementation it is obtained using the MATLAB function mldivide. We now search for the vector y such that the 1norm (14) assumes its minimum. This optimization problem is rewritten as a linear program [20] min 1T s s + Wy  s B (sp) r , B (sp) + W y  −s r such that min f T x x such that Ax  b. (sp) 𝑇 Set 𝐵(𝑟, : ) = [𝑊𝑦 + 𝐵𝑟 (24) using the further auxiliary variables     y W −1l x= , A= , s −W −1l  (sp)    Br 0 b= , f = , 1 −B (sp) r where 1l ∈ RN ×N is the identity matrix and 0 ∈ RD is a vector of zeros. C. Row-Wise Reconstruction We first describe the implementation of the row-wise reconstruction of B from the measurement data without any prior knowledge about the entries of B, whose basic idea has been outlined in section IV-A. The algorithm to solve this problem is illustrated by the flow-chart in Fig. 1. We implement this algorithm in Matlab, the central part of the program code is listed in Fig. 2. First data is collected and the matrix Φ and the vectors P r are formed. Then the problem is solved depending on the rank of the matrix Φ. If the system is (over)determined, we directly solve it for B using the Matlab-function mldivide. ] 𝐵 = Φ\𝑃𝑟 𝑟 = 𝑟+1 yes 𝑟≤𝑁 no Return 𝐵 (23) where s ∈ RN is an auxiliary variable, 1 ∈ RN is a vector of ones and  and  denotes entry-wise comparison. In the standard form of many commercial solvers the optimization problem reads underdet Calculate null space 𝑊of Φ Fig. 1. Flow chart for row-wise reconstruction. MATLAB code for the central part is listed in Fig. 2. If the system is underdetermined we proceed row-by-row and reconstruct B r as described in section V-B using the function null to compute the matrix W and the function linprog to solve the linear program (24). D. Iterative reconstruction In practice we typically have some prior knowledge about the entries of the matrix B as outlined in section IV-B. An algorithm to perform the reconstruction exploiting the prior knowledge is illustrated by the flow-chart in Fig. 3 Most interestingly, we can also use this algorithm to greatly improve the convergence of the reconstruction algorithm. For intermediate values of M we typically face the situation that some rows are successfully reconstructed while others are not. If we have not reconstructed B successfully, but gained further knowledge, we may use it in the following. Having successfully reconstructed the rth row of B, we also know the entries Br0 ,r = Br,r0 for all other rows r0 due to the symmetry of the matrix. We thus propose to perform the reconstruction iteratively. In each step of the reconstruction process we use the initial knowledge about the entries of the matrix B and also the knowledge gained in previous steps. The algorithm shown in Fig. 3 starts with the input of the measurement results and the prior knowledge of the system JOURNAL OF LATEX CLASS FILES, VOL. 13, NO. 9, SEPTEMBER 2014 5 Start % Case 1: Overdetermined system: if rank(Phi) >= N Breconstruct = Phi \ Pt; Input measurement results Φ, 𝑃𝑟 and prior knowledge 𝐵, 𝐾 new Set 𝐾 = 𝐾 new , 𝑟 = 0 % Case 2: Underdetermined system: else Proceed to next row 𝑟 = 𝑟 + 1 % Calculate nullspace of Phi W = null(Phi); D = size(W,2); Set Φ𝑟red , 𝑃𝑟red , 𝑁𝑟red = 𝑁 − Σ𝑐 𝐾𝑟𝑐 yes 𝑁𝑟red = 0 ? no % treat all rows separately: for r=1:N 𝑟(Φred ) < 𝑁red Linear Sy underdet underdet no yes Solve linear program min ‖𝐵𝑟red ‖1 s.t. Φred 𝐵𝑟red = 𝑃𝑟red % one specific solution Br_sp = Phi \ Pt(:,r); no % f A b y y Choose sparse solution = [zeros(D,1); ones(N,1)]; = [W, -eye(N); - W, -eye(N)]; = [-Br_sp; +Br_sp]; = linprog(f,A,b); = y(1:D); 𝐵𝑟red = Φ𝑟red \𝑃𝑟red Successful? new Set 𝐾𝑟𝑐 = 1 ∀𝑐 = 1, … 𝑁 Add results 𝐵𝑟red to matrix 𝐵 no 𝑟 = 𝑁? yes 𝐾 % Write result to matrix B Breconstruct(r,:) = (W*y+Br_sp)’; new =𝐾? yes no no new 𝐾𝑟𝑐 = 1 ∀ 𝑟, 𝑐no ? yes Output Warning end Return 𝐵 end Fig. 2. MATLAB code for row-wise reconstruction which is encoded in the matrices B and K. It solves the reconstruction problem iteratively, processing row-by-row in each iteration. For each row, we first calculate the reduced as defined in section IV-B. Then we and P red matrices Φred r r attempt to reconstruct the vector B red as described above: If r the problem is (over)determined we solve the linear system of equations using the Matlab-function mldivide, if it is underdetermined we minimize the 1-norm kB red r k1 subject to the constraint (16). If the reconstruction was successful, we add the results to the matrix B and update the knowledge matrix K. To facilitate the bookkeeping we define two matrices K and K new : We set K = K new at the beginning of each iteration and only modify K new during the step. The iteration stops when the reconstruction has been successfully new completed, i.e. Krc = 1 for all r, c = 1 . . . , N , or when no further progress has been made, i.e. K new has not been modified during the last step. One unsolved problem remains: If we do not know the matrix B a priori, how can we know if the reconstruction of the rth row has been successful? In the underdetermined case we cannot decide whether the reconstructed values Brc are definitely correct – but we can decide if they are reasonable in terms of the connectivity of the grid. Power grids are generally very sparse: A single substation is connected to only few other Fig. 3. Flow chart for the iterative reconstruction algorithm. substations. Hence we seek for a solution which is most sparse, i.e. which minimizes kB r k0 = number of non-zero entries of B r . (25) However, we cannot minimize kB r k0 directly as this is a computationally hard problem. The ingenious contribution of Candes, Romberg, Tao and Donoho [18], [19] was the proof that the most sparse solution can be obtained by minimizing kB r k1 with high probability if a sufficient amount of measurement data is available. Otherwise we find a solution which minimizes the 1-norm, but has a large number of nonzero entries kB r k0 . In algorithm in Fig. 3 we thus adopt the definition that the reconstruction of the rth row is assumed to be successful if (a) the linear system is overdetermined or (b) the reconstructed row B r is sufficiently sparse, i.e. kB r k0 ≤ dmax for some upper limit dmax . A typical value used in the following is dmax = 15. VI. A PPLICATIONS AND P ERFORMANCE A. Reconstruction from time series We demonstrate the applicability of network reconstruction from time series measurements for a test grid taken from [21] illustrated in Figure 4 (a). This data set includes hourly data for demand and generation Pk (t) for one year and all N = JOURNAL OF LATEX CLASS FILES, VOL. 13, NO. 9, SEPTEMBER 2014 6 (a) φk(tm) [degree] Pk(tm) [MW] (b) 2000 0 1000 −100 0 −200 10 10 −10 −10 0 number of errors (c) minimum number of measurements 300 20 time t m 40 [hour] 60 0 20 time t m 40 [hour] 60 400 200 100 0 10 0 60 200 100 25 30 35 40 45 50 number of measurements M 55 60 Fig. 4. Example of the complete grid reconstruction for a test grid with N = 117 nodes. (a) Test grid from [21]. It is assumed that the network topology, i.e. the location and parameters of the transmission lines (grey) are completely unknown. (b) The reconstruction is based on the time series of the nodal power injections Pk (t) and voltage angles ϕk (t). Two time series are shown. (c) Performance of the iterative algorithm shown in Fig. 3. Perfect reconstruction is obtained with M ≥ 55 measurements. We use the test grid and the load and generation time series of the scenario 2013 from [21]. For the sake of simplicity we have removed the import/export nodes and rescaled the generation to exactly match the load. 117 nodes. The nodal voltage angles ϕk (t) are then obtained by solving the DC approximation (3) for all time steps. The resulting time series of the power injections and angles are shown in Figure 4 (b) for two nodes as an example. The algorithm shown in Figure 3 can now reconstruct the entire network topology - i.e. all entries of the nodal susceptance matrix B - from the time series data. To evaluate the performance of the algorithm we vary the amount of input data. For each value of M we run the algorithm and count the number of successfully reconstructed entries and the number of reconstruction errors. To account for small numerical errors, we say that an entry (r, k) of the nodal susceptance matrix is successfully reconstructed if reconstructed true |Br,k − Br,k | < , (26) where the numerical tolerance is chosen as  = 10−3 × maxij |Bij |. Figure 4 (c) shows that Mmin = 55 measurements are sufficient to faithfully reconstruct the entire nodal susceptance matrix B. Most importantly, a faithful reconstruction is possible in the strongly underdetermined case: The minimum number of measurements Mmin = 55 is less than half of the matrix dimension N = 117. This is possible because we can 10 1 10 2 10 3 10 2 10 3 (b) 40 20 0 10 0 300 0 20 (a) 10 1 grid size N Fig. 5. Performance of (a) the row-wise reconstruction algorithm shown in Fig. 1 and (b) the iterative algorithm shown in Fig. 3. We have tested the algorithms for several test grids from [22], [23] for synthetic power injection data, choosing either the ϕk (blue circles) or the Pk (red crosses) randomly (see text for details). Shown is the minimum number of measurements M needed to obtain a faithful reconstruction as a function of the grid size N . Results have been averaged over 10 random realizations. exploit the sparsity of the matrix B as an additional structural information. B. Minimum Measurement Requirements and Scaling The algorithms presented in figures 1 and 3 allow for a reconstruction of the network topology also in the underdetermined case. But how many measurements Mmin are needed for a faithful reconstruction and how does this number scale with the grid size N ? To systematically study the efficiency of the reconstruction algorithms, we consider various test grids of different size taken from [22], [23] and use randomized synthetic data for the time series. We consider two different types of time series data. First we draw the voltage phase angles ϕk (t) uniformly at random from the interval [−π/8, +π/8] (type I). This scenario is not realistic but close to the original mathematical work [18], [19], where random Gaussian sampling vectors are considered. Second, we choose the power injections Pk (t) at random from a normal distribution with mean zero and standard deviation as in the original test grid (type II). For both types and both reconstruction algorithms (row-wise and iterative), we run the reconstruction algorithm as a function of the number of measurements M taken into account and determine the minimum number of measurements Mmin for a faithful reconstruction, i.e. zero reconstruction errors. Each numerical experiment is repeated 10 times. First, we observe that the iterative algorithm allows for a faithful reconstruction from underdetermined input data for all grids under consideration and both data types. The minimum number of measurements Mmin is much smaller than the grid size N in all cases. The row-wise algorithm performs less well as it does not exploit the symmetry of the matrix B. JOURNAL OF LATEX CLASS FILES, VOL. 13, NO. 9, SEPTEMBER 2014 power flow [MW] (a) 7 prior knowledge (b) 1 ? 29.6 22.2 bus number 37 10 20 14.8 ? 7.4 30 1 10 0 (c) phase angles φk [°] 20 bus number 30 reconstructed network (d) 1 4.8 3.6 bus number 6 10 20 2.4 1.2 30 1 10 0 20 bus number 30 Fig. 6. Reconstruction of missing information from flow measurements (a) The IEEE 30-bus test grid. Real power flows are measured on the colored lines. In two regions the grid topology is assumed to be unknown. (b) The prior knowledge matrix K. Grey shading indicates that the respective line parameter Bjk is known. The white region is completely unknown. (c) The voltage phase angles ϕk are reconstructed from the power flow measurements using standard state estimation methods. (d) The completely grid topology is perfectly reconstructed using the algorithm shown in Fig. 3. Second, efficient reconstruction is possible with both algorithms for the type I input data. The theory of compressed sensing shows that a reconstruction of sparse vectors is possible with high probability from a number of measurements scaling only logarithmically with the problem dimension N if some conditions are satisfied [18], [19]. This logarithmic scaling is well confirmed by the results of our numerical experiments. For the iterative algorithm the scaling seems to be even slower. However, the proofs for the efficiency of compressed sensing depend on two features of the sampling vectors: isotropy and incoherence. Roughly speaking, isotropy means that all directions in the vector space are sampled equally well. Incoherence guarantees that the redundancy in the information gained by two measurements is small. Both features are no longer guaranteed for type II input data. In fact, we observe that the row-wise reconstruction algorithm does not perform well in this case. The minimum number of measurements Mmin is only slightly smaller than the problem dimension N such that the iterative algorithm performs much better. C. Reconstruction from flow measurements The iterative algorithm allows to take into account prior knowledge to efficiently reconstruct the missing information about the grid topology. Such a problem can arise in practice when a larger part of the grid is subject to damages or attacks. An example of such a situation is depicted in figure 6 (a). It is assumed that we have no reliable information about the grid in two areas indicated by the question marks. However, we do have information about the connections of all remaining nodes and we assume that we can measure the real power flow along the colored solid lines. The prior knowledge of the grid topology is encoded in the matrix K, which is illustrated in figure 6 (b). White entries indicate where we do not know the entries of the matrix B. The missing information is found by combining classical state estimation and network reconstruction. First, the voltage phase angles for all nodes of the network are reconstructed as described in section III, the results being shown in figure 6 (c). Second, the iterative reconstruction algorithm shown in figure 3 is applied using the measured power injections, the prior knowledge B and K as well as the estimated voltage phase angles as input data. The algorithm then faithfully reconstructs all the missing information about the grid topology. The −1 reconstructed values of the line susceptances Xsr shown in figure 6 (d) exactly match the true values. Most importantly, the full reconstruction is possible already for M = 1 in this case, i.e. with a single snapshot of the power injections P , making use of the prior knowledge. VII. C ONCLUSION AND O UTLOOK We have introduced two algorithms to reconstruct the structure of a power grid from nodal measurements only. One algorithm is straightforward and row-based, reconstructing the lines of the grid node by node. The second is iterative and takes into account both prior knowledge about the presence of absence of lines as well as the knowlegde generated by that algorithm during previous steps. We have demonstrated how these algorithms can be used to reconstruct the entire network structure from time series or missing information on the grid topology from a single snapshot. The presented algorithms exploit several structural properties of power grids to reduce the number of necessary measurements. Power grids are typically very sparse, i.e. each substation is connected to only few other substations. Hence, methods from compressed sensing can be used which allow for a faithful reconstruction also in the underdetermined case. The iterative reconstruction algorithm makes use of the symmetry of the nodal susceptance matrix. Loosely speaking the algorithm solves the simple parts of the reconstruction problem first and than uses the gained information for the remaining parts. We have shown that this trick leads to a vast reduction of the measurement resources. The present work presents a step towards hybrid state estimation/network reconstruction algorithms. In future smart grids one can face the situation where both nodal variables and the grid topology are subject to uncertainties or lacking information. A pure state estimation starting from perfect knowledge of the network structure is then no longer sufficient. Advanced grid monitoring algorithms must be able of coping with missing information in both state and structure. ACKNOWLEDGEMENTS We thank D. Gross and R. Kueng for inspiring discussions. We gratefully acknowledge support from the Helmholtz Association (via the joint initiative “Energy System 2050 - A Contribution of the Research Field Energy” and the grant no. VH-NG-1025 to D.W.) and the Federal Ministry of Education and Research (BMBF grant nos. 03SF0472B and 03SF0472E to D.W. and M.T.). JOURNAL OF LATEX CLASS FILES, VOL. 13, NO. 9, SEPTEMBER 2014 R EFERENCES [1] A. Meliopoulos, B. Fardanesh, and S. Zelingher, “Power system state estimation: modeling error effects and impact on system operation,” in Proceedings of the 34th Annual Hawaii International Conference on System Sciences (HICSS-34). IEEE, 2001, p. 2012. [2] A. J. Wood, B. F. Wollenberg, and G. B. Sheblé, Power Generation, Operation and Control. New York: John Wiley & Sons, 2014. [3] Y. Yuan, G.-B. Stan, S. Warnick, and J. Goncalves, “Robust dynamical network structure reconstruction,” Automatica, vol. 47, no. 6, pp. 1230 – 1235, 2011. [4] J. Yu, G. G. Karady, and L. Gu, “Applications of embedded hvdc in power system transmission,” in 2012 Power Engineering and Automation Conference, 2012, pp. 1–6. [5] S. Bolognani, R. Carli, and M. Todescato, “State estimation in power distribution networks with poorly synchronized measurements,” in 53rd IEEE Conference on Decision and Control, 2014, pp. 2579–2584. [6] J. J. Grainger and W. D. Stevenson Jr., Power System Analysis. New York: McGraw-Hill, 1994. [7] K. Purchala, L. Meeus, D. V. Dommelen, and R. Belmans, “Usefulness of dc power flow for active power flow analysis,” in IEEE Power Engineering Society General Meeting, 2005, 2005, pp. 454–459 Vol. 1. [8] D. Van Hertem, J. Verboomen, K. Purchala, R. Belmans, and W. L. Kling, “Usefulness of DC power flow for active power flow analysis with flow controlling devices,” in 8th IEE International Conference on AC DC Power Transmission (ACDC 2006). IEE, 2006, pp. 58–62. [9] M. Newman, Networks: An Introduction. New York: Oxford University Press, 2010. [10] N. Hwang and R. Houghtalen, Fundamentals of Hydraulic Engineering Systems. Upper Saddle River, NJ: Prentice Hall, 1996. [11] E. Katifori, G. J. Szöllösi, and M. O. Magnasco, “Damage and Fluctuations Induce Loops in Optimal Transport Networks,” Phys. Rev. Lett., vol. 104, p. 48704, 2010. [12] A. Abur and A. G. Exposito, Power system state estimation: theory and implementation. Boca Raton: CRC Press, 2004. [13] M. Timme, “Revealing Network Connectivity from Response Dynamics,” Phys. Rev. Lett., vol. 98, no. 22, p. 224101, 2007. [14] S. G. Shandilya and M. Timme, “Inferring network topology from complex dynamics,” New J. Phys., vol. 13, no. 1, p. 013004, 2011. [15] M. Timme and J. Casadiego, “Revealing networks from dynamics: an introduction,” J. Phys. A Math. Theor., vol. 47, no. 34, p. 343001, 2014. [16] X. Han, Z. Shen, W.-X. Wang, and Z. Di, “Robust Reconstruction of Complex Networks from Sparse Data,” Phys. Rev. Lett., vol. 114, no. 2, p. 028701, 2015. [17] J. Stoer and R. Bulirsch, Introduction to Numerical Analysis. New York: Springer, 1993. [18] D. L. Donoho, “Compressed sensing,” Inf. Theory, IEEE Trans., vol. 52, no. 4, pp. 1289–1306, 2006. [19] E. J. Candes, J. K. Romberg, and T. Tao, “Stable signal recovery from incomplete and inaccurate measurements,” Comm. Pure Appl. Math., vol. 59, no. 8, pp. 1207–1223, 2006. [20] S. Boyd and L. Vandenberghe, Convex optimization. Cambridge: Cambridge University Press, 2004. [21] H. Barrios, A. Roehder, H. Natemeyer, and A. Schnettler, “A benchmark case for network expansion methods,” in Proc. IEEE PowerTech 2015 Eindhoven, 2015, pp. 1–6. [22] R. D. Zimmerman, C. E. Murillo-Sanchez, and R. J. Thomas, “MATPOWER: Steady-State Operations, Planning and Analysis Tools for Power Systems Research and Education,” IEEE Trans. Power Syst., vol. 26, p. 12, 2011. [23] S. Fliscounakis, P. Panciatici, F. Capitanescu, and L. Wehenkel, “Contingency ranking with respect to overloads in very large power systems taking into account uncertainty, preventive and corrective actions,” IEEE Trans. Power Syst., vol. 28, p. 4909, 2013. Farnaz Basiri Farnaz Basiri received the B.Sc. and M.Sc. degree in electrical power engineering from the RWTH Aachen University, Aachen, Germany in 2013 and 2015, respectively. Since 2015 she joined the Reaserch Group at Reaserch Center Jülich, Germany as a Research Associate and is currently pursuing the Ph.D. degree. 8 Jose Casadiego received his Licentiate degree in Physics from the University of Carabobo (Venezuela) in 2009. He completed his PhD studies in the International Max Planck Research School for Physics of Biological and Complex systems (Göttingen) in 2016 working on model-free approaches for revealing interactions in complex networks from collective dynamics. He now works as a Postdoctoral Researcher at the Network Dynamics Group of the Max Planck Institute for Dynamics and Self-Organization. Marc Timme studied physics and applied mathematics at the Universities of Würzburg (Germany), Stony Brook (New York, USA) and Göttingen (Germany). He holds an M.A. in Physics from Stony Brook and a Doctorate in Theoretical Physics (Göttingen). After postdoctoral and visiting stays at Cornell University (New York, USA) and the National Research Center of Italy (Sesto Fiorentino) he is heading the Max Planck Research Group on Network Dynamics at the Max Planck Institute for Dynamics and SelfOrganization. He is Adjunct Professor at the University of Göttingen. Dirk Witthaut received his Diploma (MSc) and PhD in Physics from the Technical University of Kaiserslautern, Germany, in 2004 and 2007, respectively. He has been a Postodoctoral Researcher at the Niels Bohr Institute in Copenhagen, Denmark and at the Max Planck Institute for Dynamics and Self-Organization in Göttingen, Germany and a Guest Lecturer at the Kigali Institue for Science and Technology in Rwanda. Since 2014 he is heading a Research Group at Forschungszentrum Jülich, Germany and he is Junior Professor at the University of Cologne, Germany.
3cs.SY
International Conference on Fascinating Advancement in Mechanical Engineering (FAME2008), 11-13, December 2008 Numerical Solution of Cylindrically Converging Shock Waves M. Shabouei, R. Ebrahimi and K. Mazaheri Body  Abstract—The cylindrically converging shock wave was numerically simulated by solving the Euler equations in cylindrical coordinates with TVD scheme and MUSCL [1] approach, using Roe's approximate Riemann solver [2] and super-bee nonlinear limiter [3]. The present study used the in house code developed for this purpose. The behavior of the solution in the vicinity of axis is investigated and the results of the numerical solution are compared with the computed data given by Payne [4], Lapidus [5], Abarbanel and Goldberg [6] Sod [7] and Leutioff et al. [8]. Keywords—Compressible flow, Converging shock, Cylindrical shock waves, Numerical simulation. I. INTRODUCTION The cylindrical converging shock problem was computed by Payne [4], Lapidus [5], Abarbanel and Goldberg [6], Satofuka [9], Sod [7], Ben-Artzi and Falcovitz [10], Leutioff et al. [8] and Matsuo et al. [11]. The finite difference method (the Lax scheme) was first applied to the cylindrical shock tube problem by Payne. Lapidus used the “Cartesian method” to compute flows with radial symmetry. Comparisons with Payne’s solutions indicated that there was a difference in the shock speeds. Abarbanel and Goldberg computed the same problem using an iterative procedure based on the modified LaxWendroff method. The results were compared with Payne’s solutions and it differed markedly from this solutions. Satofuka used other difference schemes to solve the present imploding shock problem. Sod solved this problem and captured sharp discontinuity throughout the calculation by combining the Glimm’s random choice method [12] and time splitting. The Mohammad Shabouei is MSc. Student at Dept. of Aerospace Eng., Khaj-Nasir Toosi Univ. of Tech., Tehran, Iran, (corresponding author to provide e-mail: [email protected], [email protected]). Reza Ebrahimi is Associate Professor at Dept. of Aerospace Eng., Khaj-Nasir Toosi Univ. of Tech., Tehran, Iran, (e-mail: [email protected]). Kiumars Mazaheri Body is Associate Professor at Dept. of Mech. Eng., Tarbiat Modares Univ., Tehran, Iran (e-mail: [email protected]). results were compared with the finite difference methods and it indicated a difference in the time at which the shock reached the axis. Ben-Artzi and Falcovitz proposed "GRP" (generalized Riemann problem) method as an upwind second-order scheme. Cylindrical shock tube problems were tested and it was in very good agreement with those of Abarbanel and Goldberg and Sod. Leutioff et al. [8] used finite difference scheme of invariant character proposed by Rusanov [13].The results of the numerical calculation are compared with Abarbanel and Goldberg and Payne. Differences between the results are due to the non-invariant character of the other methods. Matsuo et al. [11] simulated propagation of the converging shock wave, which is assumed to be generated by an instantaneous energy release on a rigid cylindrical wall. The results compared whit selfsimilar solution, the random choice method, the method of characteristics and the second-order finite difference method with artificial viscosities. They all agreed with one another except for the focusing stage. A theoretical investigation of converging shock waves by means of similarity solution in a perfect gas has been presented by Guderley [14], Butler [15], Zeldovich and Raizer [16], Whitham [17] and Lazarus [18]. Van Dyke and Guttmann [19] and Hafner [20] also proposed alternative methods to solve the convergent shock problem. More recently Sharma and Radha [21], Bilbao and Gratton [22], Samtaney and Pullin [23], Hidalgoa and Mendozab [24] have derived other similarity solution to this problem. A famous self-similar solution that describes implosions is the convergent shock wave solved first by Guderley. Guderley showed that the strength of the shock wave varies inversely in case of cylindrical or spherical symmetry. A review on theoretical solution has been written by Meyer-ter-Vehn and Schalk [25], where additional references can be found. Over the years many experimental works have been done on cylindrically converging shock waves. Perry and Kantrowitz [26], Wu et al. [27] , [28], Takayama et al. [29], Watanabe et al. [30] and Eliasson et al. [31] , [32] investigated such experiments. Perry and Department of Mechanical Engineering, Mepco Schlenk Engineering College, Sivakasi, India Kantrowitz and Wu et al. studied the production and stability of convergent cylindrical shock waves. Takayama et al. also investigated the stability of converging cylindrical shock waves in air. Watanabe et al. studied Shock wave focusing in a vertical annular shock tube and the light emission from a converging shock wave was investigated experimentally by Eliasson et al. at their two reported works. The objective of the present work is to numerically study a cylindrically converging shock wave and use the in house code developed for this purpose in order to identify fluid characteristics at various initial conditions. It is common to use annular shock tubes to create and study converging shock waves. The converging shocks are often visualized by either schlieren photographs or interferograms taken during the focusing process. These methods give a measure of the shock position and shape development as a function of time. With these techniques it is not possible to measure other quantities, like temperatures and pressures [32]. But with annular shock tubes can perfectly compute flow properties. So, in the present we use a cylindrical shock tube with a cylindrical diaphragm of radius r0 separates two uniform regions of a gas at rest where the outer pressure and density being higher than the inner ones. At time t = 0 the diaphragm is ruptured and the inward flow starts. A shock wave is created and travels into the low pressure region followed by a contact discontinuity towards the axis, while an expansion fan travels outward into the high pressure region. In this system of differential equations the axis is a singular point of the solution due to the polar coordinates. To remove the singularity nature at the centre, Payne [4] used extrapolation as a trick and Lapidus [5] proposed the Cartesian method which employed the equations in Cartesian coordinates. In order to verify the CFD scheme, the cylindrically converging shock wave and the shock tube problem were first calculated and compared with the data found in literatures and exact solution, respectively. The CFD scheme is then used to study the cylindrically converging shock. Variations of the pressure and temperature profiles are traced step by step during the simulations, and their dependence on the initial conditions is discussed. Following our previous study [33], the present work also involves a distinct point: the initial pressure and density ratio is much larger than that in the preceding studies. Actually it ranges from tens to thousands. II. GOVERNING EQUATIONS AND NUMERICAL SIMULATIONS In this paper we consider the numerical study of the compressible one-dimensional multi-component Euler equations for an inviscid, non-heat conducting, and cylindrically symmetric flow describing the unsteady motion of converging cylindrical shock waves. The equations can be written in conservation form for an ideal gas in cylindrical coordinates as following  (AU )  (AF )  G t r (1) where u          2 U    u  , F (U )    u  P  ,  E  u (  E  P )       0   dA    G (U )  P   dr   0  whereas  is the density, u is the velocity, P is the pressure, E is the total energy; t and r are the independent variables which represent time and the space coordinate of symmetry respectively and A is the flow cross section. Here E  P 1  u2  (  1.0) 2 where  is the ratio of specific heats and in this work a constant greater than 1.0.After simplicity, the system (1) can be written in the form U F  G t r where u   1 dA   2 G   u  A dr   u (  E  P )  and for cylindrical symmetry 2 (2) International Conference on Fascinating Advancement in Mechanical Engineering (FAME2008), 11-13, December 2008 IV. CODE VERIFICATION u   1  2 G   u  r   u (  E  P )  The method of solution consists of a combination of TVD scheme and operator splitting. To use method of splitting, first remove the inhomogeneous geometry source term G (U ) from the system (2). Thus we will solve the system U F  0 t r (3) which reduces to one-dimensional Euler equations in Cartesian coordinates. The system (3) is integrated using the explicit Lax-Wendroff scheme. To obtain a sharp and monotone discontinuities representation, a TVD scheme and MUSCL [1] approach based on Roe's approximate Riemann solver [2] is employed, along with the super-bee limiter [3]. This scheme is second-order accurate both in space and time. Once system (3) has been solved, the system of ordinary differential equations dU G dt (4) is solved, the solution of system (3) being used to obtain the geometry source term G (U ) in (4). In the present work, we used the 2nd order Runge-Kutta method to solve system (4). III. DIMENSIONLESS EQUATIONS The dependent variables are non-dimensionalized with respect to the undisturbed fluid properties. Density is dimensionless with  0 and pressure with  P0 where   1.4 . For the velocity, the sound speed of the undisturbed fluid, reference. The length scale is c 0 , is used as the r0 , the radius of the diaphragm. Hence, the length scale does not change for different gases. The time is dimensionless with the length scale divided by the sound speed in the undisturbed fluid (i.e., t 0  r0 c 0 ). The gas is assumed to behave like an ideal gas which has the non-dimensional equation of state in the form P   T . Three numerical tests have been conducted to validate the present simulation. The first two tests are some extreme cases of one-dimensional unsteady shock tube problems that were compared with the exact solution and with numerical results of lattice Boltzmann method (LBM) [34] to validate the TVD scheme simulation. Generally speaking, the computed properties (pressure, density, velocity and Mach No.) profiles are in very good agreement with the exact and LBM solutions of shock tube for wide range of initial conditions. As the third case, cylindrically converging shock wave data are compiled from the literature and compared to the present work to establish validation. In general the overall trend of the computed results agrees with those of previous simulations such as Payne [4], Lapidus [5], Abarbanel and Goldberg [6], Sod [7] and Leutioff et al. [8]. However, there exist some discrepancies. The major difference is the time at which the shock reaches the axis. In all the methods used earlier the shock converges at the axis of symmetry at a later or slightly earlier time than in our case. Considering different assumptions in the numerical simulations and the theoretical analysis, the differences are understandable which will be discussed in next section. In conclusion, the code is well verified and the numerical solutions are acceptable with reasonable accuracy. V. RESULTS AND DISCUSSION For the present numerical simulation the initial pressure and density ratio as initial conditions, are varied in a wide range from tens to thousands. In the profiles given below initial pressure and density ratio have the same value and the temperature in the two initial regions inside and outside the diaphragm is assumed to be equal. With increasing time the temperature field becomes non-uniform. We took r0 , the radius of the diaphragm 1.0 and the mesh size r  0.005 . The time step t is chosen such that CFL condition, , is satisfied, i.e. max(| u | c ) t / r   where  ,in the present work is set to 0.5. In the following, results cover the relatively wide ranges of initial conditions from weak shock (the ratio of initial conditions 4), intermediate strength (the ratio 10) to strong shock (the ratio 20). In figure 1, initial pressure and density ratio is 4. The pressure and temperature distribution is displayed Department of Mechanical Engineering, Mepco Schlenk Engineering College, Sivakasi, India at time intervals of 0.1 and 0.2 respectively. The shock appears as a rapid variation in P and T which is completely sharp. As time increases and the shock travels towards the axis and the strength of it increases. contact discontinuity (similar to the shock wave) is completely sharp. Fig. 2 Pressure (a) and Density (b) profiles at time intervals of 0.1 for initial pressure and density ratio 10. In figure 2, initial pressure and density ratio is 10. The pressure and density profile is shown at time intervals of 0.1. In the density profile, the basic properties of shock are similar to those of the pressure and temperature distribution, except that the rise in density across the shock is smaller, corresponding to a temperature increase. In the density profile such as temperature, a contact discontinuity appears. In figure 3, initial pressure and density ratio is rise to 20. The pressure and temperature distribution is displayed at time intervals of 0.1. As predicted by Payne [4] the stronger shock increases in strength more rapidly than the weak shock as it approaches the axis. Fig. 1 Pressure (a) and Temperature (b) profiles at several time steps for initial pressure and density ratio 4. After the passage of the shock, the pressure at the points behind it continues to rise. When the shock reaches the axis, maximum but finite value of pressure in convergence is occurred. In the temperature profile, the basic properties of shock are similar to those of the pressure distribution, but the rise in temperature across the shock is higher. In addition to the shock wave, in the temperature graph a contact discontinuity appears. The contact surface travels towards the axis behind the converging shock. As a result of using the super-bee limiter, the 4 International Conference on Fascinating Advancement in Mechanical Engineering (FAME2008), 11-13, December 2008 similar trend of variations as those of previous works even the present simulation of radially symmetric flows is advantageous over the method used by earlier researchers, because they are using schemes with different degree of artificial viscosity which may affect the physical situation and may change, up to certain extent, the fundamental principles of conservation. With the most of other methods used in comparison, the shock and contact discontinuity are smeared and the smearing of contact discontinuity is more dramatic. In the graphs we get steeper gradients than the most previous works will show. This leads to a better position of the shock wave and contact surface, and at the same time it indicates less dissipation. In all the methods used earlier the shock converges at the axis of symmetry at a later or slightly earlier time than in our case. The time of convergence with artificial viscosity for others it is given as t c  0.66 (Payne), t c  0.57 (Abarbanel and Goldberg) and t c  0.5826 (Leutioff et al.). As a criterion for the convergence-time the change of sign of the velocity in the axis point was applied. VI. CONCLUSION Fig. 3 Pressure (a) and Temperature (b) profiles at time intervals of 0.1 for initial pressure and density ratio 20. This problem was solved by Payne [4] using Laxdifference scheme of first order and there is an implicit term of artificial viscosity in this scheme by approximation Abarbanel and Goldberg [6] have used the modified Lax-Wendroff scheme and an additional term is coming in their scheme which plays the role of artificial viscosity and takes the values between 0.2 and 1.0. Lapidus [5] has used the Cartesian method with Lax-Wendroff scheme, whereas Leutioff et al. [8] used the Cartesian method with Rusanov's scheme [13]. The artificial viscosity used in Leutioff et al. [8] calculations is about 0.04 and is hundred times smaller than the artificial viscosity used by Lapidus [5] which is 4.0. Though the distributions of pressure, Temperature and density in our case give the almost The equation of gas dynamics are solved using a TVD scheme and MUSCL [1] approach based on Roe's approximate Riemann solver [2] is employed, along with the super-bee limiter [3] which keeps the shock waves and contact discontinuity perfectly sharp. The results obtained above clearly demonstrate the advantage of the scheme compared with the methods used by other authors. It seems to be a powerful method for computing flows with radialy symmetry and gives very good description of discontinuities during the simulations and the behavior of the solution in the focusing stage. REFERENCES [1] [2] [3] [4] B. Van Leer, "Towards the ultimate conservative difference scheme. V.: A second-order sequel to Godunov's method ", J. Comput. Phys., vol. 32, 1979, pp. 101-136. P. L. ROE, "Approximate Riemann Solvers, Parameter Vectors, and Difference Schemes", J. Comput. Phys., vol. 43, 1981, pp. 357-372. P. L. ROE, "Characteristic-Based Schemes For The Euler Equations", Annu. Rev. Fluid Mech., vol. 18, 1986, pp. 337365. R. B. Payne, "A numerical method for a converging cylindrical shock", J. Fluid Mech., vol. 2, 1957, pp. 185-200. Department of Mechanical Engineering, Mepco Schlenk Engineering College, Sivakasi, India [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] A. Lapidus, "Computation of radially symmetric shocked flows", J. Comput. Phys., vol. 8, 1971, pp. 106. S. Abarbanel and M. Goldberg, "Numerical solution of quasiconservative hyperbolic systems of the cylindrical shock problem" J. Comput. Phys., vol. 10, 1972, pp. 1. G. A. Sod, "A numerical study of a converging cylindrical shock", J. Fluid Mech., vol. 83, 1977, pp. 785-794. D. Leutloff and K. G. Roesner, "Numerical Solution Of Converging Shock Problem", Computers & Fluids, vol. 16, No. 2, 1988, pp. 175-182. N. Satofuka, "A study of difference methods for radially symmetric shocked flows", Lecture Notes in Physics, (Edited by R. D. Richtmyer), 1975, Springer, Berlin. M. Ben-Artzi and J. Falcovitz, " An upwind second-order scheme for compressible duct flows ", SIAM J. Sci. Statist. Comput., vol. 7, No. 3, 1986, pp. 744-768. H. Matsuo, Y. Ohya and K. Fujiwara, "Numerical Simulation of Cylindrically Converging Shock Waves", J. Comput. Phys., vol 75, 1988, pp. 384-399. J. Glimm, "Solution in the large for nonlinear hyperbolic system of equations", Comm. Pure Appl. Math., vol. 18, 1965, pp. 697. V. V. Rusanov, "The calculation of non-stationary shock waves with obstacles", Zh. Vychsl. mat. Fiz., vol. l, 1961. G. Guderley, "Starke kugelige und zylindrische Verdichtungsst6Be in der Nahe des Kugelmittelpunktes bzw. der Zylinderachse", Luftfahrtforschung, vol. 19, 1942, pp. 302. D. S. Butler, "Converging spherical and cylindrical shocks", Armaments Research Establishment, Rep. No. 54/55, 1954. Y. B. Zeldovich and Y. P. Raizer, Physics of Shock Waves and High Temperature Hydrodynamic Phenomena—ll, Academic Press, New York, 1967. G. B. Whitham, Linear and Nonlinear Waves, Wiley, New York, 1974. R. B. Lazarus and R. D. Richtmyer, Report LA-6823-MS, Los Alamos Sci. Lab., 1977. M. Van Dyke and A. J. Guttmann, " The converging shock wave from a spherical or cylindrical piston ", J. Fluid Mech., vol. 120, 1982, pp. 451. P. Hafner, "Strong Convergent Shock Waves Near the Center of Convergence:A Power Series Solution", SlAM J. Appl. Math., vol. 48, 1988, pp.1244. V. D. Sharma and CH. Radha, "Similarity Solutions For Converging Shocks In a Relaxing Gas", Int. J. Engng Sci., vol. 33, No. 4, 1995, pp. 535-553. [22] L.E. Bilbao and J. Gratton, "Spherical and cylindrical convergent shocks", IL NUOVO CIMENTO, vol. 18 D, No. 9, September 1996, pp. 1041-1060. [23] R. Samtaney and D. I. Pullin, "On initial-value and self-similar solutions of the compressible Euler equations", Phys. Fluids, vol. 8 (10), October 1996, pp. 2650-2655. [24] J. C. Hidalgoa and S. Mendozab, "Self-similar imploding relativistic shock waves", Phys. Fluids, vol. 17, (096101) 2005, pp. 1-8. [25] J. Meyer-Ter-Vehn and C. Schalk "Self-similar compression waves in gas dynamics", Z. Naturforsch, vol. 37a, 1982, pp. 955-969. [26] R. W. Perry and A. Kantrowitz, "The production and stability of converging shock waves", J. appl. Phys., vol. 22, 1951, pp. 878. [27] J. H. T. Wu, R. A. Neemeh, P. P. Ostrowski and M. N. Elabdin, "Production of converging cylindrical shock waves by finite element conical contractions", Shock tube and shock wave research, (Edited by Bayne Ahlborn, Abraham Hertzberg and David Russel), Seattle, 1977. [28] J. H. T. Wu, R. A. Neemeh and P. P. Ostrowski, "Experimental studies of the production of converging cylindrical shock waves", AIAA, vol. 18, 1980. [29] K. Takayama, H. Kleine, and H. Grönig, "An experimental investigation of the stability of converging cylindrical shock waves in air", Exp. Fluids, vol. 5, 1987, pp. 315. [30] M. Watanabe, O. Onodera, K. Takayama, "Shock wave focusing in a vertical annular shock tube", Shock waves at Marseille IV: Shock structure and kinematics,1995. [31] V. Eliasson, N. Tillmark, A. J. Szeri, and N. Apazidis, "Light emission during shock wave focusing in air and argon", Phys. Fluids, vol. 19, 2007. [32] V. Eliasson, W. D. Henshaw, and D. Appelo, "On cylindrically converging shock waves shaped by obstacles", Physica D, 2008, pp. 1-7. [33] M. Shabouei, R. Ebrahimi, and K. Mazaheri Body, "Numerical Simulation of Converging Spherical Shock Problem", In Ninth International Congress of Fluid Dynamics & Propulsion (ICFDP 9), Alexandria, Egypt 2008. [34] M. Komeili, M. Mirzaei, and M. Shabouei. "Performance of 1D and 2-D Lattice Boltzmann (LB) in Solution of the Shock Tube Problem." In International Conference on Fascinating Advancement in Mechanical Engineering (FAME2008), India, 2008, arXiv:1602.02675. 6
5cs.CE
Subspace Selection to Suppress Confounding Source Domain Information in AAM Transfer Learning Azin Asgarian1 , Ahmed Bilal Ashraf2 , David Fleet1 , and Babak Taati1,2,3 1 Department of Computer Science, University of Toronto Toronto Rehabilitation Institute, University Health Network 3 Institute of Biomaterials & Biomedical Engineering, University of Toronto arXiv:1708.08508v2 [cs.CV] 3 Oct 2017 2 Abstract Active appearance models (AAMs) are a class of generative models that have seen tremendous success in face analysis. However, model learning depends on the availability of detailed annotation of canonical landmark points. As a result, when accurate AAM fitting is required on a different set of variations (expression, pose, identity), a new dataset is collected and annotated. To overcome the need for time consuming data collection and annotation, transfer learning approaches have received recent attention. The goal is to transfer knowledge from previously available datasets (source) to a new dataset (target). We propose a subspace transfer learning method, in which we select a subspace from the source that best describes the target space. We propose a metric to compute the directional similarity between the source eigenvectors and the target subspace. We show an equivalence between this metric and the variance of target data when projected onto source eigenvectors. Using this equivalence, we select a subset of source principal directions that capture the variance in target data. To define our model, we augment the selected source subspace with the target subspace learned from a handful of target examples. In experiments done on six publicly available datasets, we show that our approach outperforms the state of the art in terms of the RMS fitting error as well as the percentage of test examples for which AAM fitting converges to the ground truth. 1. Introduction Active appearance models (AAMs) are deformable generative models used to capture shape and appearance variation for various computer vision applications [1]. AAMs have been very successful in applications where the objects of interest have spatial correspondence in structure, e.g. face analysis (pre-processing for identity recognition, pose-estimation, emotion recognition) [2–4], hand analysis (hand and gesture recognition, accessibility applications) [5, 6], and 3D brain segmentation [7]. Figure 1. Overview of Subspace Selection AAM transfer learning. The left most column shows the case when the model is based only on target domain examples. The right most column shows the case when the model is based on the principal directions of the source domain. In the middle, we show the situation where the target model is augmented with those source principal directions which capture target data variance. The AAM model is constructed by building a statistical shape model from a set of annotated landmark points which are predefined to describe the shape of an object e.g. the face. An appearance model is also built using a set of images that are warped to a canonical reference shape (usually the mean of the shape model). For a given test image, model fitting involves finding the best combination of shape and appearance parameters such that the reconstructed shape can be warped into the reference frame; and the input image (subjected to the same warp) is best described by the reconstructed image based on the appearance parameters. A key requirement for learning is the availability of a training set consisting of images and detailed annotation of landmark points. In an attempt to capture variations in pose, expression, illumination, and identity, a number of face datasets have been collected and annotated (e.g. [8,9]). Although the collection and annotation of datasets was necessary to ensure that models capture enough variation, it has also led the community to realize that collecting more and more data might not be the best approach [10, 11]. Historically, every time AAM fitting was required on a different set of variations, a new dataset would be collected and annotated. Despite this effort over the last two decades, the generalizability of AAMs to new domains remains challenging [10]. To overcome this issue, transfer learning has received attention from the AAM research community [11]. Transfer learning techniques attempt to improve generalizability of AAMs to a new set of data (referred to as the target domain) through the transfer of knowledge learned from a pre-existing set of data (referred to as the source domain). In this paper, for transferring the learned knowledge we focus on the principal directions of the source dataset and propose to judiciously select a subspace from the space of source data. We argue that not all principal source directions are useful, and some directions might even be detrimental to the AAM fitting process. We propose a method to weed out the confounding directions that are not representative of target subspace. Specifically, we retain the source basis vectors which co-vary with target examples and capture the variance in the target dataset. As a result, we end up discarding source basis vectors that do not co-vary with the target data. We then combine these retained source directions with the target subspace determined by a handful of target examples. An overview of our approach is shown in Figure 1. Specific contributions in this paper are as follows: • We propose a metric to compute the directional similarity between source eigenvectors and the target subspace. We show an equivalence between the directional similarity metric and the variance of target data when projected onto source eigenvectors (§3). • Capitalizing on this equivalence, we present a method to select a subspace from source shape and appearance models by picking a subset of principal directions that capture the variance in target data. This retained subset encodes the knowledge transferred from the source to the target domain (§3). • In experiments on six publicly available datasets, we show that our approach outperforms a series of baselines including state of the art AAM transfer learning method [11] (§5). Also we present several insights that emerge by analyzing the source directions selected by our algorithm (§5.1). 2. Background We begin with a brief description of AAMs and their training process, following [12]. We then review existing literature on transfer learning methods for AAMs. 2.1. Active Appearance Models: A Review An AAM is a generative model that captures variation of shape and appearance from a set of labeled examples. The model thus has two parts, one for shape, and another for appearance. Shape Model: A shape s is represented by a 2D mesh of V vertices, s = (x1 , y1 , x2 , y2 , ..., xV , yV )T . Consider a set of N training samples {(Ii , si ) | i ∈ {1, ..., N }}, each consisting of an image Ii and its corresponding shape si . To build a model, the shape samples (s1 , s2 , ..., sN ) are first aligned using Generalized Procrustes Analysis [12]. The outcome of procrustes analysis is a global 2D similarity transformation which can also be modeled by a linear combination of four basis vectors [12]. The set of four basis vectors modeling the global transformation will be denoted Φg . Let the matrix Z = [z1 , z2 , ..., zN ] ∈ R2V ×N consist of the aligned shape samples. By applying PCA to Z we get the orthonormal shape eigenvectors (that model local shape variation) Φl ∈ R2V ×K (where K < N ), and the corresponding eigenvalues λ ∈ RK . Φg and Φl are then combined to give the shape model {µ, Φ}, where Φ ∈ R2V ×(K+4) , and µ ∈ R2V is the mean shape. Any arbitrary shape sample s can now be represented in this model as ŝ = µ + Φp, where p = ΦT (s − µ), p = (p1 , p2 , ..., pK+4 )T ∈ RK+4 , represents the shape parameters of s. Appearance Model: To train the appearance model, each training image Ii is first warped from its shape si to the mean shape µ, and then vectorized to form ai ∈ RL . The appearance model is built by applying PCA to the matrix A = (a1 , a2 , ..., aN ) ∈ RL×N , thus yields the mean appearance ν ∈ RL , the orthonormal appearance eigenvectors Ψ ∈ RL×M (where M < N ), and corresponding eigenvalues κ ∈ RM . Any vectorized appearance sample a can then be represented by a set of appearance parameters q, where q = (q1 , q2 , ..., qM )T ∈ RM . A trained AAM model is specified by its components: A = (µ, Φ, λ, ν, Ψ, κ). Fitting an image I to model A involves finding the best combination of shape and appearance parameters such that there exists a warp mapping the reconstructed shape into the reference frame; and the squared difference between the input image (subjected to the same warp) and the reconstructed image (based on the appearance parameters) is minimized. 2.2. Transfer Learning for AAMs Although AAMs have seen tremendous success for a number of computer vision applications, their generalizablity is still sometimes challenging [10]. Specifically, when fitting is required on a very different set of images than those used to train the model, the fitting performance declines [10, 11]. This has led to the collection and annotation of many datasets (e.g. [8, 9]). If we have to fit AAMs to images that capture a different set of variations in expression, pose, illumination, or identity, ideally one would prefer to avoid the annotation step altogether or annotate only a handful of examples. When a model is learned using only a few annotated examples, often it is not sufficiently expressive due to lack of enough variation [11]. What is the best way to make use of the already annotated datasets? How best to fuse the knowledge learned from multiple data sources and generalize it to new data? These questions warrant investigating the use of transfer learning for AAMs, wherein the goal is to transfer knowledge gained from previously available data (referred to as the source domain) to a new set of data (referred to as the target domain). Transfer learning comes in several settings depending on whether the data are labeled in the source/target domain and whether the learning tasks in the source and target domains are the same [13]. In the context of AAM transfer learning, we focus on the situation when very few annotated examples are available for the target (T) domain, while the source (S) domain has a significant number of annotated examples, possibly coming from different datasets. Let the model AT = (µT , ΦT , λT , νT , ΨT , κT ) be learned from only a few target samples (e.g. < 10). Such a model leads to extreme overfitting, due to the lack of variation in the training set [14]. This effect becomes pronounced especially when the model is trained with high dimensional images [11], as is often the case. On the other hand, a model AS = (µS , ΦS , λS , νS , ΨS , κS ) trained only with source samples has significant variation, but a part of this variation might not be representative of the target domain. This can act as a confounding factor for the fitting process. There is thus a need to make use of however little knowledge is available from the target data, while simultaneously capitalizing on the large body of information available in the source domain. The goal of AAM transfer learning is to use both the target and the source samples to train a model A∗ = (µ∗ , Φ∗ , λ∗ , ν ∗ , Ψ∗ , κ∗ ), such that A∗ outperforms both AT and AS on test samples from the target domain. 2.3. Baselines The source-only and target-only models (AS and AT ) serve as a bare minimum baseline that a transfer learning approach must outperform. A useful transfer learn- ing method should also outperform a model trained directly on the union of the source and target data denoted by ASU T = (µSU T , ΦSU T , λSU T , νSU T , ΨSU T , κSU T ). The fourth baseline we consider is the subspace transfer (ST) method [11], which employs the mean shape and mean appearance of target model, i.e. µST = µT and νST = νT . However, eigenvectors are evaluated by concatenating the source and target basis vectors, followed by a QR decomposition on matrices [ΦT , ΦS ] and [ΨT , ΨS ], to orthogonalize the basis vectors. Finally, the current state-of-the-art AAM transfer learning employs an instance-weighted (IW) approach by assigning weights to source domain samples based on importance sampling [11]. 3. Subspace Selection Our method1 aims to transfer the knowledge gained from the source domain by selecting a subspace from the source dataset. First, we retain the target basis vectors ΦT as is, so that the information gained from target samples is not lost. Moreover, since the number of target examples assumed to be small, we propose to augment the target basis vectors with additional principal directions from the source data that are most representative of target space. What should be our criterion to select source eigenvectors that are representative of the target subspace? Since all the basis vectors in ΦS and ΦT are of unit norm, every vector in ΦS is related to those in ΦT through a rotation, i.e. ( i ∈ {1, ..., NS } φTj = Ri→j φSi (1) j ∈ {1, ..., NT } where φSi and φTj are the i-th and j-th eigenvectors in ΦS and ΦT respectively, and Ri→j is the rotation between the two vectors. This makes the squared cosine of the angle between φSi and φTj as a natural measure of similarity between the two eigenvectors. One measure of the overall similarity of the φSi to the target subspace ΦT , denoted γi , is defined as: γi = NT X cos2 θi→j (2) j=1 where θi→j is the angle between φSi and φTj . However, all the directions in ΦT are not equally important and, therefore, we propose that the similarity metric between φSi and ΦT should also encode the relative importance of eigenvectors in ΦT . Specifically, we define a weighted combination of individual similarities (cos2 θi→j ) such that each term is weighted by the corresponding eigenvalue associated with φTj , i.e. 1 Our code is available at https://github.com/azinasg/ AAM_TL. γi(weighted) = NT X λTj cos2 θi→j (3) j=1 Because all eigenvectors have unit norm, we can write the above as follows: γi(weighted) = φTSi (ΦT ΛT ΦTT )φSi (4) where ΛT is a diagonal matrix containing target eigenvalues along the diagonal. We note that the term in the parentheses is the eigen decomposition of the target covariance matrix, therefore γi(weighted) = φTSi ( 1 ZT ZTT )φSi NT − 1 (5) where ZT ∈ R2V ×NT contains the aligned and mean centered shape samples from the target. We have thus shown that the weighted similarity metric between φSi and the target subspace ΦT is exactly equal to the variance of the target data in the direction of the i-th source eigenvector. In particular, we define the variance of the target data given source model as 2 ), with σi2 = σT2 |ΦS = (σ12 , σ22 , ..., σK S 1 φT ZT ZTT φSi NT − 1 Si (6) So σi2 is a measure of similarity between the i-th source eigenvector and target subspace. Therefore, in order to choose a subset of source eigenvectors that best represents the target subspace, we propose to sort the source eigenvectors in descending order of σi2 (instead of the default ordering based on source eigenvalues,). After rearranging the source eigenvectors, we pick up the top D eigenvectors from the rearranged version of ΦS to get ΦD . We treat D as a hyper-parameter, which we determine by cross validation. We then concatenate the target basis vectors i.e. ΦT with ΦD , and orthonormalize them using QR factorization to get Φ∗ to define our model. The steps involved in our subspace selection method are summarized in Algorithm 1. 3.1. Appearance To evaluate the appearance part of our model, there are two differences in the procedure. First, since ΨS and ΨT are defined within two different base meshes i.e. µS and µT , for finding projected target variance in appearance, we warp all eigenvectors of ΨS from given mean µS to µT with a piecewise affine warp WµS →µT (ΦS ). Second, after finding ΨD , before QR decomposition, all appearance eigenvectors must be defined in the mean shape of the model, which again can be done easily by defining a piecewise affine warp. Algorithm 1 Subspace Selection Algorithm 1: procedure S ELECTION (ΦT , ΦS , ZT ) 2: for each ΦSi ∈ ΦS do 3: σi2 = NT1−1 ΦTSi ZT ZTT ΦSi 4: end for 5: ΦD ← First D basis vectors of ΦS arranged 2 ) based on σT2 |ΦS = (σ12 , σ22 , ..., σK S ∗ 6: Φ ← QR factorization([ΦT , ΦD ]) 7: return Φ∗ 8: end procedure 4. Experimental Setup 4.1. Data To compare our approach with other methods, we have conducted extensive experiments over six publicly available face datasets. In all, 555 samples were randomly selected from the following databases: LFPW [4], Helen [15], CK+ [9], iBUG [16], and AFW [17]. Images from the above datasets have ground truth annotations for 68 points. Images in the CK+ dataset cover seven posed expressions. The rest of the datasets cover a large variation in pose and illumination, and the majority of images are from young people and children with happy or neutral expressions. In addition, we selected 320 examples from the UNBCMcMaster Shoulder Pain Expression Archive [8] by temporal downsampling (1 in 100) of videos in the dataset. The UNBC-McMaster dataset contains real expressions of pain from persons with shoulder injury. Each image in this data has ground truth annotation for 66 points. For other datasets which had 68 point annotations, the two additional points (inner corners of mouth) were removed so that annotations were consistent across all datasets. All experiments were thus done with 66 point annotations. In terms of the choice for source and target domains we considered the following two settings: Setting 1: Real expressions in target: In this setting, UNBC-McMaster dataset was considered as the target domain, while the rest of the datasets were considered as the source domain. Five examples were randomly selected from the target domain to define the target training set. The test set consisted of 210 examples by excluding all the images from persons which were part of the training set. Since UNBC-McMaster data consists of real expressions of pain, in this setting the target domain consists of real expressions not present in the source. Setting 2: Posed expressions in target: In this setting, CK+ dataset was considered as the target domain. The purpose of this setting is to present a further challenge to transfer learning methods by considering a target domain with multiple posed or fake expressions (e.g. sadness, anger, 8 6 80 Test Examples Converged (%) 7 Mean RMS Error (% face size) 90 Target (T) Source (S) Union of S & T (SUT) Subspace Transfer Instance-Weighted [11] Ours 5 4 70 60 Target (T) Source (S) Union of S & T (SUT) Subspace Transfer Instance-Weighted [11] Ours 50 40 30 20 10 3 0 50 100 150 Iteration 200 250 0 1.5 300 (a) RMS fitting error (Target: UNBC-McMaster) 2.0 2.5 3.0 3.5 4.0 RMS Error (% face size) 4.5 5.0 (b) % of test examples converged (Target: UNBC-McMaster) Figure 2. Comparison of RMS fitting error and the percentage of converged test examples in Setting 1. 6.0 5.0 80 Test Examples Converged (%) 5.5 Mean RMS Error (% face size) 90 Target (T) Source (S) Union of S & T (SUT) Subspace Transfer Instance-Weighted [11] Ours 4.5 4.0 3.5 3.0 70 60 Target (T) Source (S) Union of S & T (SUT) Subspace Transfer Instance-Weighted [11] Ours 50 40 30 20 10 0 50 100 150 Iteration 200 250 300 (a) RMS fitting error (Target: CK+) 0 1.5 2.0 2.5 3.0 3.5 4.0 RMS Error (% face size) 4.5 5.0 (b) % of test examples converged (Target: CK+) Figure 3. Comparison of RMS fitting error and the percentage of converged test examples in Setting 2. etc.) which are absent or substantially underrepresented in the source domain. For this setting, the source domain not only excluded the CK+ dataset (because it is the target domain), but also excluded UNBC-McMaster (which might include expression variations similar to CK+) to make the setting more challenging. For training, five examples were randomly picked from the target domain. The test set consisted of 150 examples by excluding all the images from persons which were part of the training set. 4.2. Fitting Details For fitting, the Wiberg Inverse Compositional algorithm was used [2, 3]. We consider the fitting procedure as converged when the relative change in the cost function is very small (< 10−5 ). The maximum number of iterations was set to 300. To initialize the fitting procedure, a bounding box is first fit around the face using the Viola-Jones face detector [18]. Then the mean shape of target (µT ) is fit to the face bounding box by estimating a transformation (including only scale and translation). We call this initialization the base initialization. To avoid getting stuck in poor local minima we try 10 different perturbations around the base initialization by adding Gaussian noise in scale, translation, and rotation. 4.3. Performance Metrics We use two standard criteria defined previously in the literature [3, 10] for evaluating AAM performance. The first criterion is the fitting accuracy. To quantify fitting accuracy, we measure the RMS error between the points of fitted shape and the ground truth landmark points normalized by the face size (average height and width of face) as suggested in [17]. The second criterion is the percentage of test examples that converge to the ground truth shape given a tolerance in the RMS fitting error (here, 10−5 ). Specifically, we analyze the percentage of test examples that converged to the ground truth as a function of the RMS error tolerance. Proportion of Test Examples Converged 1.0 Default Ordering Ordering Based on Proposed Metric 0.8 0.6 0.4 0.2 0.0 0 5 10 15 Number of Shape Components 20 Figure 4. Percentage of converged test examples (with normalized RMS error less than 0.05) shown as a function of D, where D represents the top D source eigenvectors as ordered according to our proposed metric compared against the default ordering 5. Results We compare different models in terms of the RMS error and percentage convergence for Setting 1 (UNBCMcMaster as target) in Figure 2. The curves in Figure 2(a) show the RMS error (averaged over examples for which the converged RMS error was less than 5% of the face size) as a function of iterations. The plots in Figure 2(b) show the percentage of test examples converged to the ground truth as a function of RMS tolerance in pixels. The corresponding curves for Setting 2 (CK+ as target) are shown in Figure 3. For both settings our approach outperforms all other methods in terms of RMS error as well as the percentage of test examples that converge to the ground truth. For our approach, the number of source principal components that were selected (i.e. the hyper-parameter D) was determined to be 3 for shape, and 30 for appearance using cross validation. Cross validation was performed by varying D and picking the top D source eigenvectors ordered according to their ability to capture variance in target data as determined in Equation 6. In Figure 3, curves showing the two performance metrics should be interpreted together. For instance, in Figure 3(a) and 3(b), we see that the “Target” model has a good fitting accuracy over converged trials, while the percentage of convergence is very low. This is possibly due to the the lack of expressiveness of the model based only on target examples. On the other hand, the “Source” model has a higher rate of convergence, but the fitting accuracy is low. Also the “SUT” model performs well above the “Target” model and close to the “Source” model with a slight improvement resulting from the inclusion of target samples. The IW ap- Figure 5. Representative examples for AAM fitting. The first two rows and the last two rows show RMS fitting error and a visualization of AAM fitting on two test examples from UNBC-McMaster dataset and CK+ respectively. proach [11] has a small improvement in percentage of converged examples over previous models; but unexpectedly performs worse than the “Target” model in terms of the fitting accuracy, perhaps due to the source weight heuristics thereby affecting the target principal directions as well. Our approach improves the percentage of converged examples, and the fitting error is significantly decreased. Figure 4 shows the percentage of converged trials with RMS error less than 0.05, obtained by picking top D source eigenvectors as ordered by our metric (magenta plot). For comparison we also show the same by picking top D eigenvectors based on the default ordering using their corresponding eigenvalues i.e. according to variance of source data. It shows that our approach outperforms this default ordering by ∼12 percentage points in convergence rate on average. In Figure 5 we show the visual comparison of AAM fitting for different approaches. The first two rows show test samples from UNBC-McMaster dataset which include examples of pain expression and/or older adults not in the source domain of Setting 1. The last two rows show test samples from the CK+ dataset showing substantial fake expressions which were absent in the source domain of Setting 2. In all cases, the fitting results of our algorithm (last column) are closer to the actual landmark points and the RMS fitting error is also the minimum. % Var (S) = 55.73 % Var (T) = 6.46 % Var (S) = 1.36 % Var (T) = 1.45 % Var (S) = 15.78 % Var (T) = 5.26 % Var (S) = 1.32 % Var (T) = 0.23 % Var (S) = 6.31 % Var (T) = 16.60 % Var (S) = 1.04 % Var (T) = 4.59 % Var (S) = 3.81 % Var (T) = 8.04 % Var (S) = 0.87 % Var (T) = 3.20 % Var (S) = 2.67 % Var (T) = 4.82 % Var (S) = 0.70 % Var (T) = 0.92 % Var (S) = 2.34 % Var (T) = 4.94 % Var (S) = 0.59 % Var (T) = 3.25 % Var (S) = 1.83 % Var (T) = 0.44 % Var (S) = 0.56 % Var (T) = 8.31 Figure 6. Visualization of Source principal directions. The three selected shape eigenvectors augmented to the target space are shown in green box. For every principal direction, the percentage variance captured in the source and target domains is also shown. 5.1. Analysis of Selected Source Directions 6. Conclusions and Future Work In this section we analyze the source principal directions picked by our subspace selection method. A visualization of source shape principal components for Setting 2 is shown in Figure 6. The arrows on the landmark points indicate the difference vector between the eigenvector and the mean shape. The three selected eigenvectors are enclosed in green boxes. For every principal component, we also show the percentage variance of the source and target samples when projected onto the component. The first two selected eigenvectors are principal directions which cover sizable variance around the mouth and eye region, explaining why they were selected because the target data set has significant expression variation around these regions. Similarly, the third selected eigenvector has dominant motion around the eyebrow region. In this paper we have presented a transfer learning method for AAMs. Our method is based on selecting a subset of source eigenvectors that are most representative of the target subspace. This selection is based on a metric that captures the directional similarity between source eigenvectors and the target subspace. We have shown an equivalence between the similarity metric and the variance captured by source eigenvectors in the target space – which was our basis for selecting a subset of source principal components. We have conducted our experiments over six publicly available datasets and have tested challenging scenarios wherein the variations in the target domain were substantially different from those in the source domain. Our method outperforms the state of the art AAM transfer learning approach [11] and other baselines. We note that the experimental setups tested in [11] were significantly less challenging as examples for source and target domains came from the same dataset. For further analysis, we looked into the source examples that are best explained by the selected directions (Figure 7). As can be seen, these are the source examples which are explained well by direction vectors capturing target variance and show more vivid expressions around the mouth and eye regions. On top of these images in Figure 7, we also show the weight assigned to them by the instance-weighted approach. As a comparison, in the last row we show source examples which were highly weighted by the same approach. We see that neutral and smiling faces which are in majority in the source get weighted by the heuristic IW approach, while the source examples which are perhaps more representative of the target data are given low weights. However, by selecting only those eigenvectors which capture target variance, we see that we are able to encode the information from just the right source examples, and transfer it to the target domain. We have demonstrated that even when only a handful of annotated target examples are available, superior AAM fitting could be achieved using our transfer learning approach. Collecting and annotating datasets is a painstaking and time consuming step. This often becomes an obstacle in the way of using AAM fitting in novel application settings. Our work can have potential impact on extending the use of AAMs to new application domains. For instance, within clinical settings, there is growing interest to use facial expression analysis for healthcare applications such as pain monitoring in older adults, assessing signs of depression, aggression, and agitation. In contexts such as the above, collection of large datasets is doubly challenging because of patient confidentiality and privacy issues. In the future we plan to investigate how well our method generalizes to applications not involving face analysis such as brain seg- basis vector 3 basis vector 4 w = 0.043 basis vector 14 w = 0.128 w = 0.196 w = 0.044 w = 0.042 Source samples that are best aligned with selected bases (and corresponding weights using Haase et al.’s heuristic) w = 0.55 w = 0.79 w = 1.0 w = 0.68 w = 0.49 w = 0.51 w = 0.45 Highest weighted source samples using Haase et al.’s heuristic Figure 7. Source examples that are best explained by the selected eigenvectors on the basis of target variance. Within the source data these examples turn out to be less frequent examples. We also show the weights assigned to these examples using the instanceweighted approach [11]. Last row shows source samples that were assigned highest weights based on [11]. mentation. 7. Acknowledgments This research was supported by the AGE-WELL NCE, the Canadian Institutes of Health Research (CIHR), and the Toronto Rehabilitation Institute University Health Network (TRI-UHN). References [1] Timothy F Cootes, Gareth J Edwards, Christopher J Taylor, et al. Active appearance models. IEEE Transactions on PAMI, 23(6):681–685, 2001. [2] Joan Alabort-i Medina, Epameinondas Antonakos, James Booth, Patrick Snape, and Stefanos Zafeiriou. Menpo: A comprehensive platform for parametric image alignment and visual deformable models. In ACM International Conference on Multimedia, pages 679–682. ACM, 2014. [3] Joan Alabort-i Medina and Stefanos Zafeiriou. A unified framework for compositional fitting of active appearance models. IJCV, pages 1–39, 2016. [4] Peter N Belhumeur, David W Jacobs, David J Kriegman, and Neeraj Kumar. Localizing parts of faces using a consensus of exemplars. IEEE transactions on PAMI, 35(12):2930–2940, 2013. [5] Sumaira Kausar and M. Younus Javed. A survey on sign language recognition. In Frontiers of Information Technology, pages 95–98, Washington, DC, USA, 2011. IEEE Computer Society. [6] T. Heap and D. Hogg. Towards 3d hand tracking using a deformable model. In Automatic Face and Gesture Recognition, pages 140–145, Oct 1996. [7] Z.R. Luo, X.J. Zhuang, R.Z. Zhang, J.Q. Wang, C. Yue, and X. Huang. Automated 3d segmentation of hippocampus based on active appearance model of brain mr images for the early diagnosis of alzheimer’s disease. Minerva Med., 105:157–165, 2014. [8] Patrick Lucey, Jeffrey F Cohn, Kenneth M Prkachin, Patricia E Solomon, and Iain Matthews. Painful data: The unbcmcmaster shoulder pain expression archive database. In Automatic Face and Gesture Recognition and Workshops, pages 57–64. IEEE, 2011. [9] Patrick Lucey, Jeffrey F Cohn, Takeo Kanade, Jason Saragih, Zara Ambadar, and Iain Matthews. The extended cohnkanade dataset (ck+): A complete dataset for action unit and emotion-specified expression. In CVPR Workshops, pages 94–101. IEEE, 2010. [10] Joan Alabort-i Medina and Stefanos Zafeiriou. Bayesian active appearance models. In Proceedings of the IEEE CVPR, pages 3438–3445, 2014. [11] Daniel Haase, Erid Rodner, and Joachim Denzler. Instanceweighted transfer learning of active appearance models. In CVPR, pages 1426–1433, 2014. [12] Iain Matthews and Simon Baker. Active appearance models revisited. IJCV, 60(2):135–164, 2004. [13] Sinno Jialin Pan and Qiang Yang. A survey on transfer learning. IEEE Transactions on knowledge and data engineering, 22(10):1345–1359, 2010. [14] Ralph Gross, Iain Matthews, and Simon Baker. Generic vs. person specific active appearance models. Image and Vision Computing, 23(12):1080–1093, 2005. [15] Vuong Le, Jonathan Brandt, Zhe Lin, Lubomir Bourdev, and Thomas S Huang. Interactive facial feature localization. In ECCV, pages 679–692. Springer, 2012. [16] Christos Sagonas, Georgios Tzimiropoulos, Stefanos Zafeiriou, and Maja Pantic. 300 faces in-the-wild challenge: The first facial landmark localization challenge. In IEEE ICCV Workshops, pages 397–403, 2013. [17] Xiangxin Zhu and Deva Ramanan. Face detection, pose estimation, and landmark localization in the wild. In CVPR, pages 2879–2886. IEEE, 2012. [18] Paul Viola and Michael J Jones. Robust real-time face detection. IJCV, 57(2):137–154, 2004.
1cs.CV
1 An Approximate ML Detector for MIMO Channels Corrupted by Phase Noise arXiv:1708.02321v1 [cs.IT] 7 Aug 2017 Richard Combes and Sheng Yang Abstract We consider the multiple-input multiple-output (MIMO) communication channel impaired by phase noises at both the transmitter and receiver. We focus on the maximum likelihood (ML) detection problem for uncoded single-carrier transmission. We derive an approximation of the likelihood function, based on which we propose an efficient detection algorithm. The proposed algorithm, named self-interference whitening (SIW), consists in 1) estimating the self-interference caused by the phase noise perturbation, then 2) whitening the said interference, and finally 3) detecting the transmitted vector. While the exact ML solution is computationally intractable, we construct a simulation-based lower bound on the error probability of ML detection. Leveraging this lower bound, we perform extensive numerical experiments demonstrating that SIW is, in most cases of interest, very close to optimal with moderate phase noise. More importantly and perhaps surprisingly, such near-ML performance can be achieved by applying only twice the nearest neighbor detection algorithm. In this sense, our results reveal a striking fact: nearML detection of phase noise corrupted MIMO channels can be done as efficiently as for conventional MIMO channels without phase noise. Index Terms MIMO systems, phase noise, maximum likelihood detection, probability of error. I. I NTRODUCTION We consider the signal detection problem for the following discrete-time multiple-input multipleoutput (MIMO) channel   y = diag ejθr,1 , . . . , ejθr,nr H diag ejθt,1 , . . . , ejθt,nt x + z , (1) The authors are with the Laboratory of Signals and Systems (L2S), CentraleSupélec, 3 rue Joliot-Curie, 91190 Gif-sur-Yvette, France. (e-mail: richard.combes,[email protected]) August 9, 2017 DRAFT 2 where H ∈ Cnr ×nt is the channel matrix known to the receiver; z ∈ Cnr ×1 represents a realization of the additive noise whereas θt,l and θr,k are the phase noises at the l th transmit antenna and the k th receive antenna, respectively; the input vector x ∈ Cnt ×1 is assumed to be carved from a quadratic amplitude modulation (QAM). The goal is to estimate x from the observation y ∈ Cnr ×1 , with only statistical knowledge on the additive noise and the phase noises. In the case where the phase noise is absent, the problem is well understood, and the maximum likelihood (ML) solution can be found using any nearest neighbor detection (NND) algorithm (see [1] and the references therein). In particular, the sphere decoder [2] has been shown to be very efficient [3], so that its expected complexity (averaged over channel realizations) is polynomial in the problem dimension nt . Furthermore, there exist approximate NND algorithms (e.g., based on lattice reduction) that achieve near-ML performance when applied for MIMO detection [4]. The presence of phase noise in (1) is both a practical and long-standing problem in communication. In their seminal paper [5] back in the 70’s, Foschini et al. used this model to capture the residual phase jitter at the phase-locked loop of the receiver side, and investigated both the performance of decoding algorithms as well as constellation design in the scalar case (nt = nr = 1). As a matter of fact, in most wireless communication systems, phase noise is present due to the phase and frequency instabilities in the radio frequency oscillators used at both the transmitter and the receiver [6]. The channel (1) can be seen as a valid mathematical model when the phase noise varies slowly as compared to the symbol duration.1 While phase noise can be practically ignored in conventional MIMO systems, its impact becomes prominent at higher carrier frequencies since it can be shown that phase noise power increases quadratically with carrier frequency [6], [8]. The performance degradation due to phase noise becomes even more severe with the use of higher order modulations for which the angular separation between constellation points can be small. At medium to high SNR, phase noise dominates additive noise, becoming the capacity bottleneck [9], [10]. As for signal detection, finding the ML solution for the MIMO phase noise channel (1) is hard in general. Indeed, unlike for conventional MIMO channels, the likelihood function of the transmitted signal cannot be obtained in closed form. 1 As pointed out in [7] and the references therein, an effective discrete-time channel is usually obtained from a waveform phase noise channel after filtering. When the continuous-time phase noise varies rapidly during the symbol period, the filtered output also suffers from amplitude perturbation. More discussion is provided in Section VI-D. August 9, 2017 DRAFT 3 Our Contribution. In this work, we propose an efficient MIMO detection algorithm which finds an approximate ML solution in the presence of phase noise. The main contributions of this work are summarized as follows. (i) We derive a tractable approximation of the likelihood function of the transmitted signal. While the exact likelihood does not have a close-form expression, the proposed approximation has a simple form and turns out to be accurate for weak to medium phase noises. (ii) Since maximizing the approximate likelihood function over a discrete signal set is still hard, we propose a heuristic method that finds an approximate solution by applying twice the nearest neighbor detection algorithm. The proposed algorithm, called self-interference whitening (SIW), has a simple geometric interpretation. Intuitively, the phase noise perturbation generates self-interference that depends on the transmitted signal through the covariance matrix. The main idea is to first estimate the covariance of the self-interference with a potentially inaccurate initial signal solution, then perform the whitening with the estimated covariance, followed by a second detection. From the optimization point of view, our algorithm can be seen as a (well-chosen) concave approximation to a non-concave objective function. (iii) We assess the performance of SIW and competing algorithms in different communication scenarios. Since the error probability of ML decoding is unknown, we propose a simulationbased lower bound which we use as a benchmark. Simulation results show that SIW achieves near ML performance in most scenarios. In this sense, our work reveals that near optimal MIMO detection with phase noise can be done as efficiently as without phase noise. Although the likelihood approximation is derived using the assumption that the phase noise has a Gaussian distribution, our numerical experiments show that SIW works well even with non-Gaussian phase noises. Related Work. Receiver design with phase noise mitigation has been extensively investigated in the past years (see [11], [12] and references therein). More complex channel models, including multi-carrier systems (e.g., OFDM) and time-correlated phase noises (e.g., the Wiener process) have also been considered. In particular, joint data detection and phase noise estimation algorithms have been proposed in [13], [11]. A phase noise estimation based scheme to improve the system performance for smaller alphabets has been proposed in [12]. However, the challenging problem of signal detection in MIMO phase noise channels using higher order modulation, where August 9, 2017 DRAFT 4 performance is extremely sensitive to phase noise, has not been addressed adequately before. The remainder of the paper is organized as follows. We start with a formal description of the problem in the next section. The approximation of the likelihood function is derived in Section III-A, followed by the proposed algorithm described in Section III-B. The hardness of finding the exact ML solution is investigated in Section IV. We present the numerical experiments in Section V. Further discussion on the proposed algorithm and relevance of the considered channel model is provided in Section VI. Section VII concludes the paper. II. A SSUMPTIONS AND P ROBLEM F ORMULATION Notation Throughout the paper, we use the following notation. For random quantities, we use upper case letters, e.g., X, for scalars, upper case letters with bold and non-italic fonts, e.g., V , for vectors, and upper case letter with bold and sans serif fonts, e.g., M , for matrices. Deterministic quantities are denoted in a rather conventional way with italic letters, e.g., a scalar x, a vector v , and a matrix M . The Euclidean norm of a vector v is denoted by kvv k, respectively. The transpose and conjugated transpose of M are M T and M H , respectively. A. System model In the following, we describe formally the channel model (1) presented in the previous section. We assume a MIMO channel with nt transmit and nr receive antennas. Let H denote the channel matrix, where the (k, l)-th element of H , denoted as hk,l , represents the channel gain between the l th transmit antenna and k th receive antenna. The transmitted vector is denoted by x = [x1 , . . . , xnt ]T , where xl ∈ X , l = 1, . . . , nt , X being typically a QAM constellation P with normalized average energy, i.e., |X1 | x∈X |x|2 = 1. For a given transmitted vector x , the received vector in base-band can be written as the following random vector Y = Λ RH Λ T x + Z , (2)   where the diagonal matrices Λ R := diag ejΘr ,1 , . . . , ejΘr ,nr and Λ T := diag ejΘt,1 , . . . , ejΘt,nt capture the phase perturbation at the receiver and transmitter, respectively; Z is the additive white Gaussian noise (AWGN) vector with Z ∼ CN (0, γ −1I ), where γ is the nominal signalto-noise ratio (SNR). We assume that the phase noise Θ := [Θt,1 · · · Θt,nt Θr,1 · · · Θr,nr ]T is jointly Gaussian with Θ ∼ N (0, Q θ ) where the covariance matrix Q θ can be arbitrary. Note August 9, 2017 DRAFT 5 that this model includes as a special case the uplink channel in which nt is the number of single-antenna users. In such a case, the transmit phase noises are independent. For simplicity, we consider uncoded transmission in which each symbol xl can take any value from X with equal probability. Further, we assume that the channel matrix can be random but is perfectly known at the receiver, whereas such knowledge at the transmitter side is irrelevant in uncoded transmission. We also define H Θ := Λ RH Λ T and accordingly H θ for some realization of Θ = θ . By definition, we have H 0 = H . Finally, we ignore the temporal correlation of the phase noise process and the channel process, and focus on the spatial aspect of the signal detection problem. B. Problem formulation With AWGN, we have the following conditional probability density function (pdf) p(yy | x , θ , H ) = γ nr −γkyy −H Hθ x k2 e , π nr (3) from which we obtain the likelihood function by integrating over Θ   p(yy | x , H ) = EΘ p(yy | x , Θ , H ) i  h γ nr y −H HΘ x k2 −γky + ln nr . = ln EΘ e π (4) (5) The ML detector finds an input vector from the alphabet X nt such that the likelihood function is maximized. In practice, it is often more convenient to use the log-likelihood function as the objective function, i.e., after removing a constant term  h i y −H HΘ x k2 −γky x y H Q f (x , , , γ, θ ) := ln EΘ e , (6) where the arguments γ and Q θ can be omitted whenever confusion is not likely. Thus, xML (yy , H ) := arg maxn f (x x, y , H ). x̂ x ∈X t (7) From (7) we see two main challenges to compute the optimal solution: 1) The expectation in (7) cannot be obtained in closed form. A numerical implementation is equivalent to finding the numerical integral in nt + nr dimensions. This can be extremely hard in high dimensions. 2) The size of the optimization space, |X |nt , can be prohibitively large when the modulation size |X | and the input dimension nt become large. August 9, 2017 DRAFT 6 In Section IV, we examine in more details why both of these issues are indeed challenging. In a conventional MIMO channel without phase noise, finding the ML solution is reduced to solving the following problem x0ML (yy , H ) := arg minn kyy − H 0 x k2 , x̂ x ∈X t (8) which is also called the minimum Euclidean distance detection or nearest neighbor detection (NND). Although the search space in (8) remains large, the expectation is gone. Furthermore, since the objective function is the Euclidean distance, efficient algorithms (e.g., sphere decoder [2] or lattice decoder [1]) exploiting the geometric structure of the problem can be applied without searching over the whole space X nt . It is shown in [3] that the sphere decoder has a polynomial average complexity with respect to the input dimension nt when the channel matrix is drawn i.i.d. from a Rayleigh distribution. In practice, one may simply ignore the existence of phase noise and still apply (8) to obtain x0ML which we refer to as the naive ML solution in our work. While this can work relatively x̂ well when the phase noise is close to 0, it becomes highly suboptimal with stronger phase noise which is usually the case in high frequency bands with imperfect oscillators. In this paper, we provide a near ML solution by circumventing the two challenges mentioned earlier. We first propose an approximation of the likelihood function. Then we propose an algorithm to solve approximately the optimization problem (7). III. P ROPOSED S CHEME A. Proposed Approximation of the Likelihood Function In this section, we propose to approximate the likelihood function with the implicit assumption that the phase noise is not large. Indeed, in practice, the standard deviation of the phase noise is typically smaller than 10 degrees ≈ 0.174 rad. For stronger phase noises, it is no longer reasonable to use QAM and the problem should be addressed differently. ΛRH Λ Tx k = kΛ ΛH H Λ Tx k, The likelihood function (3) depends on the Euclidean norm kyy −Λ R y −H in which the difference vector ΛH R y − H Λ Tx can be rewritten and approximated as follows   jθθ t e  HDx Dy]  ΛH (9) R y − H Λ Tx = [−H e−jθθ r HDx Dy] θ, ≈ (yy − H x ) − j[H August 9, 2017 (10) DRAFT 7  where we define D x := diag(x1 , . . . , xnt ), D y := diag(y1 , . . . , ynr ), and recall that θ := θ Tt θ Tr T (10) is from the linear approximation2 ejθθ = 1 + jθθ + o(θθ ). Thus the Euclidean norm has the corresponding real approximation: Aθ + b k2 , kyy − Λ RH Λ Tx k2 ≈ kA where A ∈ R2nr ×(nt +nr ) and b ∈ R2nr ×1 are defined as     H D x) Dy ) Im (H Im (D Re (yy − H x )  , b :=  . A :=  H D x ) − Re (D Dy ) − Re (H Im (yy − H x ) (11) (12) With the above approximation, we can derive the approximation of the log-likelihood function. Proposition 1. Let A and b be defined as in (12). Then we have the following approximation of  h i y −H H θ xk2 −γky x, y , H , γ, Q θ ) with the log-likelihood function ln EΘ e ≈ fˆ(x 1 x, y , H ) := −γ b TWx−1b − ln det (W Wx ) , fˆ(x 2 (13) AQ θA T . Wx := I + 2γA (14) where Wx is defined as Hence, the proposed approximate ML (aML) solution is   1 T −1 xaML (yy , H ) := arg minn γ b Wx b + ln det (W Wx ) . x̂ x ∈X t 2 (15) Proof. Since we assume that Θ ∼ N (0, Q θ ), we have   Z h i 1 1 −1 T T T AΘ +bbk2 −γkA 2 A A + Q θ ) θ − 2γbb Aθ − γkbbk EΘ e =p d θ exp −θθ (γA (16) Qθ ) θ det(2πQ {z 2 } | 1 −1 Q 2 s  Q) det(Q Q)A ATb exp −γkbbk2 + γ 2b TA (2Q Qθ ) det(Q   Z 1 1 −1 T T T Q)A A b ) Q (θθ + γ(2Q Q)A A b) · dθ p exp −(θθ + γ(2Q 2 Q) det(2πQ θ s  Q) det(Q Q)A ATb = exp −γkbbk2 + γ 2b TA (2Q Qθ ) det(Q s  Q) det(Q A((2Q Qθ )−1 + γA ATA )−1A T )bb = exp −γbbT (II − γA Qθ ) det(Q = 2 (17) (18) (19) Here we use, with a slight abuse of notation, ejθθ to denote the vector obtained from the element-wise complex exponential operation. Similarly, the little-o Landau notation o(θθ ) is element-wise. August 9, 2017 DRAFT ; 8 (a) 4-QAM, f = fˆ = −10. (b) 16-QAM, f = fˆ = −4. (c) 64-QAM, f = fˆ = −1.6. Fig. 1: The proposed approximation of the likelihood function in the scalar case. Solid line is the actual likelihood level set, dashed line is the approximation. Here γ = 30dB and phase noise has standard deviation 3◦ at the transmitter and at the receiver. s =  Q) det(Q A(2Q Qθ )A AT )−1b exp −γbbT (II + γA Qθ ) det(Q  1 T T −1 b I A Q A b =p exp −γb (I + 2γA ) , θ AQ θA T ) det(II + 2γA (20) (21) where (18) holds since the integrand in (17) is a pdf with respect to θ ; (20) is from the Woodbury −1 V . Taking the logarithm and we obtain matrix identity (II + U C V )−1 = I − U C −1 + V U the approximated log-likelihood function (13). In Figure 1, we illustrate the proposed approximation for 4-, 16-, and 64-QAM. In all three cases, we plot for each constellation point a level set of the likelihood function with respect to “yy ” in solid line. The level sets of the approximated likelihood function are plotted similarly in dashed line. While the likelihood function is evaluated using numerical integration, the approximation is in closed form given by (13). In this figure, we observe that the approximation is quite accurate, especially for signal points with smaller amplitude. Further, the resemblance of the level sets for the approximate likelihood to ellipsoids suggests that the main contribution in the right hand side of (13) comes from the first term −γ b TWx−1b . We shall exploit this feature later on to construct the proposed algorithm. Qθ → 0, i.e., when the phase noise vanishes faster than Remark 1. We can check that when γQ the AWGN does, the above solution minimizes kbbk2 = kyy − H x k2 , which corresponds to the optimal NND solution in the conventional MIMO case. Nevertheless, when the phase noise does August 9, 2017 DRAFT 9 not vanish, the approximate log-likelihood function (13) depends on x in a rather complex way, due to the presence of the matrix Wx . Focusing on the term b TWx−1b , we can think of Wx as the covariance matrix of some equivalent noise. Indeed, if we approximate the multiplicative phase noise as an additive perturbation, then the perturbation is a self-interference that depends on the input vector x . This perturbation is not isotropic nor circularly symmetric, and can be captured by the covariance matrix Wx . Some more discussions in this regard will be given in the following subsection. While the proposed approximation simplifies significantly the objective function, the optimization problem (15) remains hard when the search space is large. For instance, with 64-QAM and 4 × 4 MIMO, the number of points in Xtn is more than 107 ! Therefore, we need further simplification by exploiting the structure of the problem. B. The Self-Interference Whitening Algorithm As mentioned above, the difficulty of the optimization (15) is mainly due to the presence of the matrix Wx that depends on x . Let us first assume that the Wx corresponding to the optimal xaML were somehow known, and is denoted by Wx̂x . Then the optimization problem (15) solution x̂ would be equivalent to   1 T −1 Wx̂x ) xaML (yy , H ) = arg minn γ b Wx̂x b + ln det (W x̂ x ∈X t 2 = arg minn b TWx̂x−1b x ∈X (23) t −1 −1 Wx̂x 2 ỹy − Wx̂x 2 H̃ H x̃ x k2 , = arg minn kW x ∈X − 21 where Wx̂x (22) t   −1 H −1 x, ỹy , and H̃ H are defined by is any matrix such that Wx̂x 2 Wx̂x 2 = Wx̂x−1 ; x̃       x) H ) − Im (H H) Re (x Re (yy ) Re (H  , ỹy :=   , H̃ . x :=  H :=  x̃ x) H ) Re (H H) Im (x Im (yy ) Im (H (24) (25) Note that for a given Wx̂x , (24) can be solved efficiently with any NND algorithm. Unfortunately, xaML , the exact Wx̂x cannot be found. Therefore, the idea is without knowing the optimal solution x̂ x, and then solve the optimization to first estimate the matrix Wx̂x with some suboptimal solution x̂ problem (24) with a NND. We call this two-step procedure self-interference whitening (SIW). August 9, 2017 DRAFT 10 x0ML as the initial estimate to obtain Wx̂x , and For instance, we can use the naive ML solution x̂ have −1 −1 ML ML x0aML (yy , H ) = arg minn kW Wx̂x0 2 ỹy − Wx̂x0 2 H̃ H x̃ x k2 . x̂ x ∈X t (26) Remark 2. The intuition behind the SIW scheme is as follows. From the definition of Wx in (14) and A in (12), we see that Wx depends on x only through H D x . First, the column space of H D x does not vary with x since D x is diagonal. Second, a small perturbation of x does x0ML is close to the not perturb Wx too much in the Euclidean space. Since the naive ML point x̂ actual point x in the column space of H , it provides an accurate estimate of Wx . This can also be observed on Figure 1c, where we see that the ellipsoid-like dashed lines have similar sizes and orientations for constellation points that are close to each other. Remark 3. Another possible initial estimate is the naive linear minimum mean square error (LMMSE) solution. As the naive ML, the naive LMMSE ignores the phase noise and returns H H (γ −1I + H H H )−1y − x k2 . x0LMMSE (yy , H ) := arg minn kH x̂ x ∈X t (27) It is worth mentioning that in the presence of phase noise the naive LMMSE is not necessarily dominated by the naive ML solution, as will shown in the numerical experiments of Section V. The main algorithm of this work is described in Algorithm 1. In the algorithm, the complex function NND(yy , H , X ) finds among the points from the alphabet X the closest one to y in H , X̃ ) is the real counterpart of NND. The the column space of H ; the function realNND(ỹy , H̃ x0 )” embeds the real vector x̃ x0 to the complex space by taking the upper function “complex(x̃ half as the real part and the lower half as the imaginary part. It is worth noting that the newly obtained point is accepted only when it has a higher approximate likelihood value than the naive ML point does. An example of the scalar case is provided in Figure 2 where 256-QAM is used. The transmitted point is x and the received point is y. The solid line is the level set of the likelihood function. If the likelihood function was computed for each point in the constellation, then one would recover x from y successfully. But this would be hard computationally. With the Euclidean detection, x̂ that is closer to y than x is would be found instead, which would cause an erroneous detection. The SIW algorithm can “correct” the error as follows. First, to estimate the unknown matrix Wx , we compute the matrix Wx̂x which is represented by the red dashed ellipse around x̂. We can see that the estimate Wx̂x is very close to the correct value Wx , August 9, 2017 DRAFT 11 Algorithm 1 Self-interference whitening Input: y , H , γ, Q θ x0LMMSE from (27) Find x̂ x0ML ← NND(yy , H , X ) Find x̂ x0ML , y , H , γ, Q θ ) then x0LMMSE , y , H , γ, Q θ ) > fˆ(x̂ if fˆ(x̂ x ← x̂ x0LMMSE x̂ else x ← x̂ x0ML x̂ end if x using (12) and (14) Generate Wx̂x from x̂ 1 Find Wx̂x2 using the Cholesky decomposition H according to (25) Generate ỹy and H̃ −1 −1 x0 ← realNND(W Wx̂x 2 ỹy , Wx̂x 2 H̃ H x̃ x, X̃ ) x̃ x0 ← complex(x̃ x0 ) x̂ x0 , y , H , γ, Q θ ) > fˆ(x̂ x, y , H , γ, Q θ ) then if fˆ(x̂ x0aML ← x̂ x0 x̂ else x0aML ← x̂ x x̂ end if x(2) Output: x̂ aML given by the actual x (blue dashed line). Then, we generate the coordinate system with Wx̂x and search for the closest constellation point to y in this coordinate system. In this example, x can be recovered successfully. More importantly, computationally efficient NND algorithms can be used to perform the search. Remark 4. The complexity of the SIW algorithm is essentially twice that of the NND algorithm used, since the other operations including the LMMSE detection have at most cubic complexity with respect to the dimension of the channel. The complexity of the NND algorithm depends directly on the conditioning of the given matrix. If the columns are close to orthogonal, then channel inversion is almost optimal. However, in the worse case, when the matrix is ill-conditioned, the NND algorithm can be slow and its complexity is exponential in the problem dimension. As August 9, 2017 DRAFT 12 x y x̂ = x̂0ML 2 3 Wx̂ x 1 y x̂ = x̂0ML Fig. 2: Illustration of the proposed detection in the scalar case. An example with 256-QAM, PN 2◦ . The dashed lines represent the ellipse defined by the matrix Wx̂ (in red) and Wx (in blue). mentioned earlier, there exist approximate NND algorithms, e.g., based on lattice reduction, that can achieve near optimal performance with much lower complexity. IV. H ARDNESS OF ML D ECODING In the section we explore how ML decoding may be implemented. While in most cases of interest the SIW algorithm gives near-optimal performance, and ML decoding is too costly computationally, it is useful to simply provide lower bounds on the performance of any decoding algorithm. We comment on the difficulty of implementing ML decoding, in particular when the dimensions nr , nt are large. For simplicity, we assume that {Θt,k }k=1,...,nt are i.i.d. N (0, σt2 ) and {Θr,k }k=1,...,nr are i.i.d. N (0, σr2 ). A. Hardness of computing the likelihood h i HΘ x k2 To compute the likelihood one needs to compute EΘ e−γkyy −H . For large dimensions, this seems impossible to do in closed form or using numerical integration. However a natural August 9, 2017 DRAFT 13 alternative is to use the Monte-Carlo method, using the following estimate: ! s X 1 2 H (t) x k Θ x, y , H , γ, Q θ ) ≈ F̂s := ln fˆ(x , e−γkyy −H s t=1 (28) where Θ (1) , . . . , Θ (s) are s i.i.d. copies of Θ . Using the delta method [14] and the central limit theorem, the asymptotic variance of this estimator is  HΘ x k2 1 Var e−γkyy −H Var(F̂s ) ∼  2 , s HΘ x k2 ] E [e−γkyy −H s → ∞. (29) Let us compute this quantity in the (arguably easiest) case where H is the identity matrix with nt = nr = n: 2 kyy − HΘ x k = n X 2 yk − xk ej(Θr,k +Θt,k ) . (30) k=1 Define the one-dimensional likelihood h i j(Θr +Θt ) |2 g(x, y, γ, σ) := E e−γ|y−xe , and using independence we calculate the moments: n h i Y y −H HΘ xk2 −γky E e = g(xk , yk , γ, σ), Var(e y −H HΘ xk2 −γky )= k=1 n Y g(xk , yk , 2γ, σ) − k=1 (31) (32) n Y g(xk , yk , γ, σ)2 . (33) k=1 From (29), the asmyptotic variance is hence: Var(F̂s ) = where v(x, y, γ, σ) := g(x,y,2γ,σ) . g(x,y,γ,σ)2 j(Θr +Θt ) |2 random variable e−γ|y−xe 1 s n Y ! v(xk , yk , γ, σ) − 1 . (34) k=1 It is noted that, unless σr2 + σt2 = 0 or x = 0, or y = 0, the cannot be a constant. Thus, we have v(xk , yk , γ, σ) > 1 for k = 1, . . . , n. As a result, the asymptotic error (34) grows exponentially with the dimension n, so that the Monte-Carlo method is infeasible in high dimensions, since the number of samples must also scale exponentially with n to maintain a constant error. For instance, consider xk = yk = 1 for all k, γ = 40dB, nr = nt = 20, and σr = σt = 3 degrees. Then v ≈ 7, so that, to obtain an error smaller than 0.1, one would require s ≈ 1018 samples, which is clearly not feasible in practice. August 9, 2017 DRAFT 14 B. Hardness of maximum likelihood search Assume that one is able to estimate the value of the likelihood with high accuracy (as seen above this is typically hard), and denote by f¯ this value. We may then consider the following algorithm. Given the received symbol y , and a radius ρ, one first computes the set of points x ∈ X nt : kyy − H x k2 ≤ ρ2 }, then one computes the value of f¯ for each of those S := {x points and returns the point maximizing f¯. In the large system limit, the following concentration phenomenon occurs. Proposition 2. Assume that H has i.i.d. entries with distribution CN (0, 1) and X is chosen Y − HX k2 . Then we have: uniformly at random from X nt . Define the radius R2 := kY  2 +σ 2  σr   t + γ −1 nr , E R2 = 2nt nr 1 − e− 2 (35) and for any η > 0 we have: n    o P (1 − η)E R2 ≤ R2 ≤ (1 + η)E R2 → 1, (36) nt , nr → ∞. Note that the above result is general and does not impose that the number of antennas nr , nt scale at the same speed. We draw two conclusions from this result: (i) Any such algorithm applied p with radius (1 + η) E [R2 ] for any η > 0 is guaranteed to inspect the optimal point with high probability. (ii) Any such algorithm which r has a large success   probability needs to inspect every  2 √ σ 2 +σ point in a sphere of radius O nt nr 1 − exp − r 2 t , and therefore typically has a very high complexity. From the above analysis we see that the second difficulty of the decoding problem for phase noise channels, even when the likeihood can be computed, lies in the number of points to be inspected which is exponentially large in nr , nt . The problem is that computing the likelihood at any given point does not give us any information about the structure of f , and does not help in maximizing f efficiently. C. Non-concavity in the high SNR regime Indeed maximizing f is difficult, and it seems that even performing zero-forcing, i.e., maximizing f over x ∈ Cnt rather than over x ∈ X nt , is difficult since f is non-concave, at least in the high SNR regime. We first show that, in the high SNR regime, the log-likelihood can be approximated by a function of the minimal value of kyy − Hθ xk2 , where the minimum is taken over all possible phases θ . August 9, 2017 DRAFT 15 Lemma 1. For all x, y , H , Qθ , we have the following high SNR behavior 1 x, y , H , γ, Q θ ) = m(x x, y , H ) := min kyy − Hθ x k2 . lim − f (x θ ∈Rnt +nr γ (37) γ→∞ Proof. Consider  > 0, we have that 1 kyy − HΘ x k2 ≤ m(xx, y , H ) +  e−γ(m(xx,yy ,HH )+) ≤ e−γkyy −HHΘ xk ≤ e−γm(xx,yy ,HH ) . 2  (38) Taking expectations and then logarithms: n o 1 1 2 x, y , H )+)+ ln P kyy −H HΘx k ≤ m(x x, y , H )+ ≤ f (x x, y , H , γ, Q θ ) ≤ −m(x x, y , H ). −(m(x γ γ Since the mapping θ 7→ kyy − Hθ x k2 is continuous, for any given  > 0, the probability  x, y , H ) +  is strictly positive. Letting γ → ∞, we have P kyy − HΘ x k2 ≤ m(x 1 1 x, y , H , γ, Q θ ) ≤ lim sup f (x x, y , H , γ, Q θ ) ≤ −m(x x, y , H ). x, y , H ) + ) ≤ lim inf f (x −(m(x γ→∞ γ→∞ γ γ x, y , H , γ, Q θ ) = m(x x, y , H ). Since the above holds for all  > 0, we have limγ→∞ − γ1 f (x We can now show that in general the log-likelihood is not concave, hence maximizing it is not straightforward. x, y , H , γ, Q θ ) Proposition 3. For γ large enough and H 6= 0 , there exists y such that x 7→ f (x is a non-concave function. Proof. Assume that f is concave, then for all x we must have:    1 x + x∗ ∗ x, y , H , γ, Q θ ) + f (x x , y , H , γ, Q θ ) ≤ f , y , H , γ, Q θ . f (x 2 2 (39) From Lemma 1, the above inequality implies that    1 x + x∗ ∗ x, y , H ) + m(x x , y, H ) ≥ m m(x , y, H . 2 2 (40) We shall construct an example to show that the above does not hold in general. Consider any z x. Then x and z are such that H z 6= 0 , and let y = H z and x = j(|z1 |, ..., |znt |), so that x ∗ = −x x, y , H ) = m(zz , y , H ) = 0. Similarly m(x x∗ , y , H ) = 0. equal up to a phase transformation, so m(x ∗ x By definition m( x +x , y , H ) = m(00, y , H ) = kyy k2 . In this example, (40) would imply 0 ≥ kyy k2 , 2 which is clearly a contradiction since y 6= 0 . Hence f cannot be concave for γ large enough. This fact that the log-likelihood is in general non-concave gives another important insight: SIW can in fact be seen as a (well chosen) concave approximation of a non-concave function. To circumvent the problem of non-concavity of the log-likelihood SIW approximates it by a August 9, 2017 DRAFT 16 function which, when Wx is fixed, is concave. As non-concavity appears mainly for high SNRs, the discrepancy between the performance of ML and SIW (if any) should be more visible in the high SNR regime, and this will be confirmed by our numerical experiments in the next section. V. N UMERICAL E XPERIMENTS In this section, we look at different communication scenarios in which we compare the proposed scheme to some baseline schemes, including two schemes that ignore the phase noise: • The naive LMMSE solution given by (27) • The naive ML solution (8) and a scheme that takes the phase noise into account: • Selection between naive LMMSE and ML: the receiver first finds the naive LMMSE and naive ML solutions, then computes the proposed approximate likelihood function and selects the one with higher value. Note that we focus on the vector detection error rate3 as our performance metric. A. Simulation-based lower bounds In order to appreciate the performance of the proposed algorithm, we need to compare it not only with the existing schemes, but also to the fundamental limit given by ML detection, which is optimal. Let us recall that the proposed SIW algorithm may suffer from two levels of suboptimality. First, the approximate likelihood function (13) may be inaccurate in some cases. Second, even if (13) is accurate, the SIW algorithm is not guaranteed to find the optimal solution (15). Therefore, in order to identify the source of the potential suboptimality, it would be useful to compare the performance of the SIW scheme with the performance given by (13) and with that given by (7). Unfortunately, as pointed out earlier, finding (13) requires an exhaustive search with complexity growing as |X |nt . Finding (7) is even harder because of the numerical multi-dimensional integration. As such, we resort to lower bounds on the detection error for (13) and (7), respectively, which are enough for our purpose of benchmarking. To that end, we write   aML X, Y , H ) < maxn fˆ(x x, Y , H ) Pe ≥ P fˆ(X x ∈X 3 t (41) The detection is considered successful only when all the symbols in x are recovered correctly. Otherwise an error is declared. August 9, 2017 DRAFT 17  x, Y , H ) , X, Y , H ) < max fˆ(x ≥ P fˆ(X  x ∈L ∀ L ⊆ X nt , (42) where the first lower bound is from the definition of the detection criterion, namely, error occurs if there exists at least one input vector that has a strictly higher approximate likelihood value. Note that although the second inequality is valid for all L, it becomes equality if L contains all the points in X nt that have a higher approximate likelihood value than X does. In this work, we only take a large set around X to obtain the lower bound (42), without any theoretical guarantee of tightness of (42). Similarly, for ML detection, we have   ML X, Y , H ) < maxn f (x x, Y , H ) Pe ≥ P f (X x ∈X (43) t X, Y , H ) < f (X X0 , Y , H )} ≥ P {f (X X 6= X 0 , f (X X, Y , H ) < f (X X0 , Y , H )} , = P {X (44) ∀ X 0 ∈ X nt , (45) where the first lower bound is from the definition of the ML detection criterion, namely, error occurs if there exists at least one input vector that has a strictly higher likelihood value; the X, Y , H ) < f (X X0 , Y , H ); Note that the equality (45) holds since X 6= X 0 is a consequence of f (X second lower bound (44) holds for any vector X 0 from the alphabet X nt and with equality when X 0 is the exact ML solution. Since the ML solution is unknown, we can use any suboptimal solution instead and still obtain a valid lower bound. Now we can see that (45) is much easier to evaluate than (43) is since there is no need to perform the maximization over X nt . Intuitively, if X 0 is a near ML solution, then the lower bound should be tight enough. We shall have some more discussions on this with the upcoming numerical examples. The lower bound (45) can be obtained by simulation: 1) For a given observation y and channel H , find a suboptimal solution x 0 . x, y , H ) and f (x x0 , y , H ), count an ML error only when f (x x, y , H ) < 2) If x 0 6= x , compute f (x x0 , y , H ); otherwise the counter remains unchanged. f (x With the proposed method, we need to perform twice the numerical integration (e.g., MonteCarlo integration) only when x 0 6= x . If the latter event happens with small probability, then the average complexity to evaluate (45) is low. In other words, using a x 0 from a better reference scheme not only makes the lower bound tighter but also makes it easier to evaluate. August 9, 2017 DRAFT 18 (a) 64-QAM, PN 3◦ . (b) 256-QAM, PN 2◦ . (c) 1024-QAM, PN 1◦ . Fig. 3: SISO Rayleigh fading with i.i.d. phase noise. B. Scenario 1: Point-to-point SISO channel The first scenario focuses on the point-to-point Rayleigh fading single-antenna channels, also known as single-input single-output (SISO) channels. We consider three different modulation orders (64, 256, and 1024) with correspondingly three values of phase noise strength (3◦ , 2◦ , and 1◦ ) in terms of the standard deviation at both the transmitter and receiver sides. The idea is to assess the performance of the proposed algorithm in different phase noise limited regimes. In the SISO case, we compare the proposed scheme with the naive ML scheme which consists in a simple threshold detection for the real and imaginary parts. Several remarks are in order. First, we see that ignoring the existance of phase noise incurs a significant performance loss. Second, if exhaustive search is done with the proposed likelihood approximation, then it achieves the ML performance. This can be seen from the fact that the proposed simulation-based lower bound overlaps with the curve with exhaustive search. This confirms the accuracy of the closed-form approximation (13) at least in the SISO case. It is worth mentioning that the exact likelihood in this case can also be derived via the Tikhonov distribution as shown in [5], [15] where the analytic expression involving the Bessel function has been provided. Finally, more remarkably, the SIW algorithm almost achieves the ML performance without exhaustive search. C. Scenario 2: Point-to-point LoS-MIMO channel The second scenario is the point-to-point line-of-sight (LoS) MIMO system commonly deployed as microwave backhaul links [16], [9], [17]. We assume that the channel is constant over time but each antenna is driven by its own oscillator. This is the worst-case assumption but also often motivated by the fact that the communication distance is large and thus the distance August 9, 2017 DRAFT 19 (a) 0.33 Opt. distance, 64-QAM. (b) 0.7 Opt. distance, 256-QAM. (c) Opt. distance, 1024-QAM. Fig. 4: 4 × 4 LoS MIMO. Each antenna has i.i.d. phase noise of standard deviation 1◦ . between antenna elements is increased accordingly to make sure that the channel matrix is well conditioned [16], [17]. Here, we adopt the model with two transmit and two receive antennas each one with dual polarizations. This is effectively a 4×4 MIMO channel. The optimal distance between the antenna elements at each side can be derived as a function of the communication distance [16]. However, it may not always be possible to install the antennas with the optimal spacing due to practical constraints. The condition number of the channel matrix increases when the antenna spacing decreases away from the optimal distance. In Figure 4, we consider three configurations with distances 0.33, 0.7, and 1 of the optimal value, generated using the model from [17]. Accordingly, we use 64-, 256-, and 1024-QAM. For simplicity, we do not consider any precoding although it may further improve the performance as shown in [17]. We assume that the phase noises are i.i.d. with standard deviation of 1◦ . We make the following observations. First, as in the SISO case, phase noise mitigation substantially improves performance. Also, the proposed likelihood approximation remains accurate as shown by the comparison between the exhaustive search (15) and the lower bound on ML detection. Further, the proposed SIW algorithm follows closely the exhaustive search curve and hence achieves near ML performance. Finally, although in the considered scenario the naive LMMSE is outperformed by the naive ML scheme, the selection between them can provide a non-negligible gain as shown in Figure 4b. D. Scenario 3: Uplink SIMO channel with centralized receiver oscillator The third scenario is the uplink cellular communication channel with four single-antenna users and one multi-antenna base station receiver. It is assumed that the phase noises at the users’ side are i.i.d., whereas there is no phase noise at the receiver side. This is a reasonable August 9, 2017 DRAFT 20 (a) 4 × 4, 64-QAM, PN 4◦ . (b) 4 × 4, 256-QAM, PN 2◦ . (c) 4 × 10, 256-QAM, PN 2◦ . Fig. 5: Uplink SIMO channel. Four single-antenna users with i.i.d. phase noise, multi-antenna receiver without phase noise. assumption since the oscillators at the base station are usually of higher quality than those used by mobile devices. We assume i.i.d. Rayleigh fading in this scenario where three configurations are considered, as shown in Figure 5. Unlike in the previous scenarios, the naive ML is dominated by the naive LMMSE at high SNR. This somewhat counter-intuitive observation can be explained as follows. Without receiver phase noise, the channel can be inverted and we obtain a spatial parallel channel. Although channel inversion incurs some power loss when the channel is not orthogonal, each of the resulting parallel subchannels sees an independent phase noise. Therefore, the demodulation only suffers from a scalar self-interference. On the other hand, with naive ML the receiver tries to find the closest vector in the image space of H to the received vector y . Since the linear map H mixes the perturbation of the different transmit phase noises, the naive ML detection, ignoring the presence of phase noise, suffers from the aggregated perturbation from all the phase noises. That is why the naive LMMSE can be better than the naive ML scheme in the high SNR regime where phase noise dominates the additive noise. In the case when both the transmitter and the receiver have comparable phase noises, such a phenomenon is rarely observed since the channel inversion also increases the perturbation with the presence of receiver phase noises. From Figure 5, we remark that as before the proposed SIW scheme is superior to the other schemes. With a relatively strong phase noise of 4◦ , the error rate of SIW is 3 to 4 times lower than that of the naive schemes and is at most twice that of the ML lower bound. With a smaller phase noise of 2◦ , the SIW scheme can support 256-QAM with four receive antennas, achieving an error rate 5 times lower than that of the naive schemes. In Figure 5c, we increase the number August 9, 2017 DRAFT 21 Fig. 6: Uniform phase noise at both transmitter and receiver, Rayleigh fading. of receive antennas to 10, we see that the gap between the naive schemes is decreased due to the increased orthogonality of the channel. Nevertheless, the gap between the naive schemes and the proposed scheme does not decrease since the orthogonality between the users does not reduce the impact of the phase noise from the transmitter side. We could expect the same observation even with massive MIMO. Nevertheless, with massive MIMO uplink, the receiver phase noise can be mitigated substantially due to the asymptotic orthogonality [18]. VI. F URTHER D ISCUSSION AND E XPERIMENTS A. Robustness to the phase noise distribution One of the main assumptions of our work is that the phase noise follows a Gaussian distribution. Indeed, our derivation of the closed-form approximation (13) depends on this assumption. We have seen that this approximation is very accurate in various practical scenarios with Gaussian phase noise. In practice, however, phase noises may not be Gaussian, which leads to the following natural question on the robustness: Does the proposed algorithm still work when the phase noise is not Gaussian? The answer turns out to be positive when we let the phase noise be uniformly distributed. In Figure 6, we consider three previous configurations (shown in Figure 3c, 5a, and 5b, respectively) but with uniform phase noises. From the results, we see that the proposed algorithm works well as in the Gaussian phase noise, especially when the phase noise is small. In fact, we believe that the phase noise distribution with certain regularity (e.g., continuous and August 9, 2017 DRAFT 22 Fig. 7: Impact of iterations. bounded density) should not have great impact on the performance of the proposed algorithm when the phase noise is not too strong. B. Further improvement with more iterations Although the proposed scheme achieves near ML performance in many cases, there is still room for improvement in some situations. As shown in Figure 5 for the 4 × 4 channel with 64QAM, the error floor of the proposed scheme is three times higher than the one of the exhaustive search. In order to reduce the error floor, we propose to introduce a list of candidate solutions by iteration. We recall that in the SIW scheme we start from the best solution between naive ZF and naive ML, and we use this solution as a starting point to estimate the matrix W x followed by a nearest neighbor detection. The SIW algorithm replaces the starting point with the newly found one if the latter has a higher approximated likelihood. We can extend the SIW algorithm with more iterations. Specifically, we can fix a maximum number of iterations. As long as the newly found point is not inside the list, it should be added to the list and we continue to iterate. The procedure stops either when we hit the maximum number of iterations or we find a point already inside the list. At the end, we select the point with the highest likelihood value from the list. August 9, 2017 DRAFT 23 C. Potential issues in the very high SNR regime At very high SNR, the proposed approximation (13) may become less accurate and the perforHΘ x k mance loss increases with SNR. It can be seen from (6) that the approximation error of kyy −H has greater impact as γ grows. Numerical experiments show that such performance loss may be apparent for SNR higher than 40dB depending on the constellation size. A straightforward workaround is to impose a ceiling value of the SNR γmax for the decoder. In other words, for SNR higher than the threshold γmax , we let the decoder work as if it were at γmax . Intuitively, the probability of error cannot be larger than the one at γmax , since we are feeding less noisy observations to the decoder than what they are supposed to be. With the decoding function, the observation space can be partitioned into |X |nt regions, each one of which corresponds to a vector in X nt . The probability of decoding error is the probability that the observation is outside of the decoding region corresponding to the actual input. With a smaller variance of AWGN, the observation has a higher probability to be inside the region, hence a lower probability of error. Nevertheless, the formal proof of this argument is not trivial, and is outside of the scope of the current paper.4 Another issue at very high SNR is that the likelihood may be too small as compared to the finite numerical precision. Therefore, it becomes impossible to obtain the simulation-based lower bound in a reliable way. Furthermore, the number of Monte-Carlo samples required to reach any given accuracy grows with the SNR. D. On the practical validity of the adopted discrete-time model The discrete-time channel model (1) that we adopt in this work is a simplification of the waveform phase noise channel. Indeed, the discrete-time output sequence is obtained from filtering followed by sampling in most communication systems. Filtering a waveform corrupted by phase noise results in not only phase perturbation but also amplitude variation [19]. In the following, we shall show that the amplitude variation is negligible in the practical regime of interest. For simplicity, we focus on the single-antenna case with a rectangular filter (i.e., an integrator). We adhere to the commonly accepted Wiener model for the continuous-time phase 4 We can always add an artificial noise to the observation in order to reduce the SNR to γmax before the detection. In this way we have an error floor for SNR beyond γmax . August 9, 2017 DRAFT 24 noise process {Θ(t)}. In particular, Θ(t) ∼ N (0, βt). The equivalent filtered channel gain for the k th symbol interval of duration T is Z Z 1 (k+1)T jΘ(t) d jΘ(kT ) 1 T jΘ(t) e dt = e e dt T kT T 0 (46) d from the property of a Wiener process where = means equality in distribution. Assuming that we can somehow track the past state Θ(kT ) perfectly, we now focus on the following random variable due to the residual phase noise corresponding to the innovation part: Z 1 T jΘ(t) e dt B(β, T ) := T 0 Z βT d 1 = ej Θ̃(t) dt βT 0 d = B(1, βT ) (47) (48) (49) d where in (48) follows from Θ(t) = Θ̃(βt) for some normalized Wiener process {Θ̃(t)} with Θ̃(t) ∼ N (0, t). We notice that the random variable B(β, T ) depends on the parameters β and T only through the product βT . The distribution of B(β, T ) has been characterized both approximately [19] and exactly [20]. In particular, an approximate moment-generating function has been derived in [19] for small phase noise. We can use the results therein to obtain the following characterization. Proposition 4. Let us consider the polar representation B(β, T ) = GejΦ with G ≥ 0 and Φ ∈ [−π, π). When S := βT is small, we have S S2 , Var (Φ) ≈ , Var (G) ≈ 3 180 and thus, 2 1 Var (G) ≈ Var (Φ) . 20 (50) (51) In Figure 8, we compare the approximation given by (51) to the correct value obtained numerically. The approximation (51) is surprisingly accurate even for a standard deviation of 20◦ for the phase. More importantly, such results show that for a small phase perturbation up to 5 degrees – this is the regime of interest in the present work – the amplitude variation is less than −55 dB. Therefore, the interference caused by the amplitude variation is dominated by the AWGN and can be treated as noise without any performance loss. In other words, the discrete-time model adopted in this work – ignoring the amplitude variation – is indeed valid for phase noise with moderate variance. August 9, 2017 DRAFT 25 Fig. 8: Amplitude vs phase perturbation for filtered channel gain. E. Constellation design The purpose of the current work is to design a detector that takes into account the phase perturbation for existing systems in which typical QAM signaling is used. As we observe from the numerical experiments, in some of the scenarios, even the lower bound on the ML detection error exhibits an error floor. The error floor is however not a fundamental limit of either the detector or the channel. With a carefully designed signaling scheme, the probability of ML detection error can be arbitrarily small with an increasing SNR. For instance, if we use amplitude modulation, then when the SNR grows, the amplitude ambiguity decreases and the detection error vanishes. The cost of such an extreme scheme is a reduced spectral efficiency. Algorithms to design a constellation based on the statistics of both the additive and phase noises have been proposed in the literature (see [5], [21] and the references therein). To the best of the authors’ knowledge, only SISO has been considered so far. In the MIMO case, such constellations can still be used and should provide improvements over QAM. The difficulty with non-QAM constellation lies in the MIMO detection part, since efficient NND algorithms cannot be applied directly. The constellation design problem for MIMO phase noise channels is a challenging and interesting problem in its own right, which is however out of the scope of the current work. VII. C ONCLUSIONS In this work, we have studied the ML detection problem for uncoded MIMO phase noise channels. We have proposed an approximation of the likelihood function that has been shown August 9, 2017 DRAFT 26 to be accurate in the regimes of practical interest. More importantly, thanks to the geometric interpretation of the approximate likelihood function, we have designed a simple algorithm that can solve approximately the optimization problem with only two nearest neighbor detections. Numerical experiments show that the proposed algorithm can greatly mitigate the impact of phase noises in different communication scenarios. R EFERENCES [1] E. Agrell, T. Eriksson, A. Vardy, and K. Zeger, “Closest point search in lattices,” IEEE Trans. Inf. Theory, vol. 48, no. 8, pp. 2201–2214, Aug. 2002. [2] E. Viterbo and J. Boutros, “A universal lattice code decoder for fading channel,” IEEE Trans. Inf. Theory, vol. 45, no. 10, pp. 1639–1642, Jul. 1999. [3] B. Hassibi and H. Vikalo, “On the sphere-decoding algorithm I. Expected complexity,” IEEE Trans. Signal Process., vol. 53, no. 8, pp. 2806– 2818, Aug. 2005. [4] J. Jaldén and P. Elia, “DMT optimality of LR-aided linear decoders for a general class of channels, lattice designs, and system models,” IEEE Trans. Inf. Theory, vol. 56, no. 10, pp. 4765–4780, Oct. 2010. [5] G. J. Foschini, R. D. Gitlin, and S. B. Weinstein, “On the selection of a two-dimensional signal constellation in the presence of phase jitter and gaussian noise,” Bell Labs Technical Journal, vol. 52, no. 6, pp. 927–965, 1973. [6] A. Hajimiri and T. H. Lee, “A general theory of phase noise in electrical oscillators,” IEEE Journal of Solid-State Circuits, vol. 33, no. 2, pp. 179–194, Feb. 1998. [7] H. Ghozlan and G. Kramer, “Models and information rates for wiener phase noise channels,” IEEE Trans. Inf. Theory, vol. 63, no. 4, pp. 2376–2393, Apr. 2017. [8] A. Demir, A. Mehrotra, and J. Roychowdhury, “Phase noise in oscillators: A unifying theory and numerical methods for characterization,” IEEE Transactions on Circuits and Systems I: Fundamental Theory and Applications, vol. 47, no. 5, pp. 655–674, May 2000. [9] G. Durisi, A. Tarable, C. Camarda, R. Devassy, and G. Montorsi, “Capacity bounds for MIMO microwave backhaul links affected by phase noise,” IEEE Trans. Commun., vol. 62, no. 3, pp. 920–929, Mar. 2014. [10] S. Yang and S. Shamai (Shitz), “On the multiplexing gain of discrete-time MIMO phase noise channels,” IEEE Trans. Inf. Theory, vol. 63, no. 4, pp. 2394–2408, Apr. 2017. [11] R. Krishnan, G. Colavolpe, A. G. i Amat, and T. Eriksson, “Algorithms for joint phase estimation and decoding for MIMO systems in the presence of phase noise and quasi-static fading channels,” IEEE Trans. Signal Process., vol. 63, no. 13, pp. 3360–3375, July 2015. [12] T. Datta and S. Yang, “Improving MIMO detection performance in presence of phase noise using norm difference criterion,” in 53rd Annual Allerton Conference on Communication, Control, and Computing (Allerton), Sep. 2015, pp. 286–292. [13] H. Mehrpouyan, A. A. Nasir, S. D. Blostein, T. Eriksson, G. K. Karagiannidis, and T. Svensson, “Joint estimation of channel and oscillator phase noise in MIMO systems,” IEEE Trans. Signal Process., vol. 60, no. 9, pp. 4790–4807, Sep. 2012. [14] G. W. Oehlert, “A note on the delta method,” The American Statistician, vol. 46, no. 1, pp. 27–29, 1992. [15] G. Colavolpe, A. Barbieri, and G. Caire, “Algorithms for iterative decoding in the presence of strong phase noise,” IEEE J. Select. Areas Commun., vol. 23, no. 9, pp. 1748–1757, Sep. 2005. August 9, 2017 DRAFT 27 [16] F. Bøhagen, P. Orten, and G. E. Øien, “Design of optimal high-rank line-of-sight MIMO channels,” IEEE Trans. Wireless Commun., vol. 6, no. 4, pp. 1420–1425, Apr. 2007. [17] P. Ferrand and S. Yang, “Blind precoding in line-of-sight MIMO channels,” in IEEE SPAWC, Edinburgh, UK, 2016. [18] E. Björnson, J. Hoydis, M. Kountouris, and M. Debbah, “Massive MIMO systems with non-ideal hardware: Energy efficiency, estimation, and capacity limits,” IEEE Trans. Inf. Theory, vol. 60, no. 11, pp. 7112–7139, Nov. 2014. [19] G. J. Foschini and G. Vannucci, “Characterizing filtered light waves corrupted by phase noise,” IEEE Trans. Inf. Theory, vol. 34, no. 6, pp. 1437–1448, Jun. 1988. [20] Y. Wang, Y. Zhou, D. K. Maslen, and G. S. Chirikjian, “Solving phase-noise Fokker-Planck equations using the motiongroup Fourier transform,” IEEE Trans. Commun., vol. 54, no. 5, pp. 868–877, May 2006. [21] R. Krishnan, A. G. i Amat, T. Eriksson, and G. Colavolpe, “Constellation optimization in the presence of strong phase noise,” IEEE Trans. Commun., vol. 61, no. 12, pp. 5056–5066, Dec. 2013. A PPENDIX A. Proof of Proposition 2 ΛRHΛ T − H )X X so that R2 = kV V + Z k2 . We have: Define the vector V := (Λ V k2 + kZ Z k2 + Z H V + V H Z R2 = kV (52) V k2 + kZ Zk2 )2 + (Z ZH V + V H Z )2 + 2(kV V k2 + kZ Zk2 )2 (Z ZH V + V H Z ). R4 = (kV (53) Using the fact that V and Z are independent and Z has i.i.d. CN (0, γ −1 ) entries, we verify that       V k2 + E kZ Z k2 , E R2 = E kV           V k4 + E kZ Zk4 + 2E kZ Zk2 E kV V k2 + 2γ −1 kV V k2 , E R4 = E kV V k2 ) + Var(kZ Zk2 ) + 2γ −1 EkV V k2 . Var(R2 ) = Var(kV (54) (55) (56) Zk2 ] = nr γ −1 and Var(kZ Zk2 ) = 2nr γ −2 , it follows that Since E [kZ     V k2 + γ −1 nr , E R2 = E kV (57)   V k2 ) + 2γ −2 nr + 2γ −1 E kV V k2 . Var(R4 ) = Var(kV (58) V k2 . We now calculate the moments of kV Expectation over H : Let us define Ak,l := Xl (ej(Θt,l +Θr,k ) − 1) and write, conditional on A , 2 Vk = kV nt nr X X k=1 August 9, 2017 l=1 2 Hk,l Ak,l d = nr X Ek , (59) k=1 DRAFT 28 Ak k2 ) with Ak := [Ak,l ]l=1,...,nt , k = 1, . . . , nr ; we used the fact that H has where Ek ∼ Exp(1/kA V k2 for a given i.i.d. CN (0, 1) entries. Then we can calculate the first and second moments of kV A = [Aj,k ]j,k : 2 Vk ] = EH |AA [kV nr X EH |AA [Ek ] = k=1 nt nr X X |Ak,l |2 , "   V k4 = EH |AA EH |AA kV nr X  #  E2k + EH |AA  k=1 = nr X (60) k=1 l=1   A k k4 +  2kA k=1 nt nt X X k0 =1 k0 6=k nt X nt X k0 =1 k0 6=k   Ek Ek0  (61) k=1   Ak k2 kA A k 0 k2  kA (62) k=1 nr X nr X Ak k2 kA Ak0 k2 . (1 + 1{k = k 0 })kA = (63) k0 =1 k=1   Moments of A : We recall that |Ak,l |2 = 2|Xl |2 (1 − cos(Θr,k + Θt,l )). We have that E |Xl |2 =   1 and define E |Xl |4 = P̄ 2 , for l = 1, . . . , nt . Using the independence and the identity  for zero-mean Gaussian Θ, we obtain E [cos(Θ)] = exp − Var(Θ) 2   σ 2 +σ 2     2 2 − r2 t E |Ak,l | = 2E |Xl | E [1 − cos(Θt,l + Θr,k )] = 2 1 − e . (64) We now calculate the correlation between the entries of A E(|Ak,l |2 |Ak0 ,l0 |2 ) = 4E(|Xl |2 |Xl0 |2 ) ρk,k,0 l,l0 (65) with ρk,k,0 l,l0 := E((1 − cos(Θt,l + Θr,k ))(1 − cos(Θt,l0 + Θr,k0 ))) σ 2 +σ 2 − r2 t = 1 − 2e + e−σr −σt cosh(σr2 (1{k = k 0 } + σt2 1{l = l0 })), 2 2 (66) (67) where to obtain the last equality we use the trigonometric identities and again apply the identity  x −x E [cos(Θ)] = exp − Var(Θ) ; we recall that cosh(x) = e +e . 2 2 V k2 : From (60) and (64), we have the first moment Moments of kV nt nr X   σ 2 +σ 2   X   2 2 − r2 t Vk = E kV E |Ak,l | = nt nr 2 1 − e . (68) k=1 l=1 August 9, 2017 DRAFT 29 For the variance, we apply (63) and (68) 2     V k2 V k4 − E kV V k2 = E kV (69) Var kV nt  nt X nr X nr X X       2 2 0 2 2 0 0 0 0 E |Ak,l | |Ak ,l | (1 + 1{k = k }) − E |Ak,l | E |Ak ,l | . = k0 =1 k=1 l0 =1 l=1 (70) Noting that E [|Ak,l |2 |Ak0 ,l0 |2 ] = E [|Ak,l |2 ] E [|Ak0 ,l0 |2 ] if k 6= k 0 and l 6= l0 , we obtain the variance   V k2 ) = 4nt nr w1 + w2 (nt − 1) + w3 (nr − 1) , Var(kV (71) where w1 , w2 , w3 > 0 do not depend on nt , nr and correspond to the cases (k = k 0 , l = l0 ), (k = k 0 , l 6= l0 ), (k 6= k 0 , l = l0 ), respectively, in the summation (70), 2 2 2 w1 := 2P̄ 2 (1 − 2e−σ + e−2σ cosh(2σ 2 )) − (1 − e−σ )2 , 2 2 2 w2 := 2(1 − 2e−σ + e−2σ cosh(σr2 )) − (1 − e−σ )2 , 2 2 2 w3 := P̄ 2 (1 − 2e−σ + e−2σ cosh(σt2 )) − (1 − e−σ )2 , where we define σ 2 := (72) (73) (74) σt2 +σr2 . 2 Putting it together: From (54) and (68), we have  2 +σ 2  σr     t V k2 + γ −1 nr = nt nr 2 1 − e− 2 + γ −1 nr , E R2 = E kV (75) which yields the first result. Note that E [R2 ] ≥ c1 nt nr for some constant c1 > 0 with respect to (nt , nr ). From (56) and (71), we have proven that there exists a constant c2 > 0 such that   V k2 ) + 2γ −2 nr + 2γ −1 E kV V k2 ≤ c2 nr nt (nt + nr ). Var(R2 ) = Var(kV (76) Hence Var(R2 ) c2 ≤ (E [R2 ])2 c21  1 1 + nr nt  → 0, nt , nr → ∞, (77) and applying Chebychev’s inequality yields the second result:      P (1 − η)E R2 ≤ R2 ≤ (1 + η)E R2 → 1, nt , nr → ∞. August 9, 2017 (78) DRAFT 30 B. Proof of Proposition 4 From [19, eq.6]5 , we can derive the moment-generating function (MGF) of (G, Φ) 1 MG,Φ (ξ, η) = eξ sinhc− 2 p  Sξ " ## " r !  −1 p  Sξ Sξ Sη 2 cothc − + tanhc Sξ , (79) · exp 8 4 4 where we define sinhc(x) := sinh(x) , x coth(x) , x cothc(x) := tanhc(x) := tanh(x) , x and recall that S := βT . It follows that the MGF of G and Φ are p  MG (ξ) = MG,Φ (ξ, 0) = e sinhc Sξ ,   1 2 Sη , MΦ (η) = MG,Φ (0, η) = exp 6 ξ − 12 (80) (81) where we used the fact that, when x → 0, sinhc(x) = 1 + O(x2 ), tanhc(x) = 1 + O(x2 ), and cothc(x) − 1 1 = + O(x2 ). 2 x 3 (82) After finding the first and second derivatives of both MGF (80) and (81) with some elementary manipulations, we obtain the desired variances  S2 2 Var (G) = E G2 − (E (G))2 = MG00 (0) − (MG0 (0)) = , 180  S 2 Var (Φ) = E Φ2 − (E (Φ))2 = MΦ00 (0) − (MΦ0 (0)) = . 3 (83) (84) Note that we use approximate equality in (50) and (51) since the MGF derived in [19] is indeed approximative with the assumption of small S. 5 Note that the random variable B in (47) differs with the one in [19, eq.1] in a normalization factor T . The MGF has been scaled accordingly. August 9, 2017 DRAFT
7cs.IT
1 A unifying energy-based approach to stability of power grids with market dynamics arXiv:1604.05200v2 [math.OC] 27 Jul 2016 Tjerk Stegink, Claudio De Persis, Member, IEEE, and Arjan van der Schaft, Fellow, IEEE Abstract—In this paper a unifying energy-based approach is provided to the modeling and stability analysis of power systems coupled with market dynamics. We consider a standard model of the power network with a third-order model for the synchronous generators involving voltage dynamics. By applying the primal-dual gradient method to a social welfare optimization, a distributed dynamic pricing algorithm is obtained, which can be naturally formulated in port-Hamiltonian form. By interconnection with the physical model a closed-loop port-Hamiltonian system is obtained, whose properties are exploited to prove asymptotic stability to the set of optimal points. This result is extended to the case that also general nodal power constraints are included into the social welfare problem. Additionally, the case of line congestion and power transmission costs in acyclic networks is covered. Finally, a dynamic pricing algorithm is proposed that does not require knowledge about the power supply and demand. Index Terms—port-Hamiltonian, frequency regulation, optimal power dispatch, dynamic pricing, social welfare, distributed control, convex optimization. I. I NTRODUCTION P ROVISIONING energy has become increasingly complicated due to several reasons, including the increased share of renewables. As a result, the generators operate more often near their capacity limits and transmission line congestion occurs more frequently. One effective approach to alleviate some of these challenges is to use real-time dynamic pricing as a control method [1]. This feedback mechanism can be used to encourage the consumers to change their usage when in some parts of the grid (control areas) it is difficult for the generators and the network to match the demand. Real-time dynamic pricing also allows producers and consumers to fairly share utilities and costs associated with the generation and consumption of energy among the different control areas. The challenge of achieving this in an optimal manner while the grid operates within its capacity limits, is called the social welfare problem [2], [3]. Many of the existing dynamic pricing algorithms focus on the economic part of optimal supply-demand matching [2], [4]. However, if market mechanisms are used to determine the optimal power dispatch (with near real-time updates of This work is supported by the NWO (Netherlands Organisation for Scientific Research) programme Uncertainty Reduction in Smart Energy Systems (URSES). T.W. Stegink and C. De Persis are with the Engineering and Technology institute Groningen (ENTEG), University of Groningen, 9747 AG Groningen, the Netherlands. {t.w.stegink, c.de.persis}@rug.nl A.J. van der Schaft is with the Johann Bernoulli Institute for Mathematics and Computer Science, University of Groningen, Nijenborgh 9, 9747 AG Groningen, the Netherlands. [email protected] the dispatch commands) dynamic coupling occurs between the market update process and the physical response of the physical power network dynamics [5]. Consequently, under the assumption of market-based dispatch, it is essential to consider the stability of the coupled system incorporating both market operation and electromechanical power system dynamics simultaneously. While on this subject a vast literature is already available, the aim of this paper is to provide a rigorous and unifying passivity-based stability analysis. We focus on a more accurate and higher order model for the physical power network than conventionally used in the literature. In particular, we use a third-order model for the synchronous generators including voltage dynamics. As a result, market dynamics, frequency dynamics and voltage dynamics are considered simultaneously. Finally, we propose variations of the basic controller design that, among other things, allow the incorporation of capacity constraints on the generation and demand of power and on the transmission lines, and enhance the transient dynamics of the closed-loop system. The approach taken in this paper is to model both the dynamic pricing controller as well as the physical network in a port-Hamiltonian way, emphasizing energy storage and power flow. This provides a unified framework for the modeling, analysis and control of power networks with market dynamics, with possible extensions to more refined models of the physical power network, including for example turbine dynamics. A. Literature review The coupling between a high-order dynamic power network and market dynamics has been studied before in [5]. Here a fourth-order model of the synchronous generator is used in conjunction with turbine and exciter dynamics, which is coupled to a simple model describing the market dynamics. The results established in [5] are based on an eigenvalue analysis of the linearized system. It is shown in [6] that the third-order model (often called the flux-decay model) for describing the power network, as used in the present paper, admits a useful passivity property that allows for a rigorous stability analysis of the interconnection with optimal power dispatch controllers, even in the presence of time-varying demand. A common way to solve a general optimization problem like the social welfare problem is by applying the primaldual gradient method [7], [8], [9]. Also in power grids this is a commonly used approach to design optimal distributed controllers, see e.g. [10], [11], [12], [13], [14], [15]. The 2 problem formulations vary in these papers, with the focus being on either the generation side [10], [12], the load side [11], [16], [17] or both [13], [14], [18], [15]. We will elaborate on these references in the following two paragraphs. A vast literature focuses on linear power system models coupled with gradient-method-based controllers [10], [12], [11], [17], [13], [19]. In these references the property that the linear power system dynamics can be formulated as a gradient method applied to a certain optimization problem is exploited. This is commonly referred to as reverse-engineering of the power system dynamics [13], [10], [12]. However, this approach falls short in dealing with models involving nonlinear power flows. Nevertheless, [14], [18], [15], [16] show the possibility to achieve optimal power dispatch in power networks with nonlinear power flows using gradient-method-based controllers. On the other hand, the controllers proposed in [14], [18], [15] have restrictions in assigning the controller parameters and in addition require that the topology of the physical network is a tree. B. Main contributions The contribution of this paper is to propose a novel energybased approach to the problem that differs substantially from the aforementioned works. We proceed along the lines of [20], [21], where a port-Hamiltonian approach to the design of gradient-method-based controllers in power networks is proposed. In those papers it is shown that both the power network as well as the controller designs admit a portHamiltonian representation which are then interconnected to obtain a closed-loop port-Hamiltonian system. After showing that the third-order dynamical model describing the power network admits a port-Hamiltonian representation, we provide a systematic method to design gradientmethod-based controllers that is able to balance power supply and demand while maximizing the social welfare at steady state. This design is carried out first by establishing the optimality conditions associated with the social welfare problem. Then the continuous-time gradient method is applied to obtain the port-Hamiltonian form of the dynamic pricing controller. Then, following [20], [21], the market dynamics is coupled to the physical power network in a power-preserving manner so that all the trajectories of the closed-loop system converge to the desired synchronous solution and to optimal power dispatch. Although the proposed controllers share similarities with others presented in the literature, the way in which they are interconnected to the physical network, which is based on passivity, is to the best of our knowledge new. Moreover, they show several advantages. 1) Physical model: Since our approach is based on passivity and does not require to reverse-engineer the power system dynamics as a primal-dual gradient dynamics, it allows to deal with more complex nonlinear models of the power network. More specifically, the physical model for describing the power network in this paper admits nonlinear power flows and timevarying voltages, and is more accurate and reliable than the classical second-order model [22], [23], [24]. In addition, most of the results that are established in the present paper are valid for the case of nonlinear power flows and cyclic networks, in contrast to e.g. [13], [10], [12], [19], [19], where the power flows are linearized and e.g. [15], [18], [14] where the physical network topology is a tree. Moreover, in the aforementioned references the voltages are assumed to be constant. While the third-order model for the power network as considered in this paper has been studied before using passivity based techniques [6], the combination with gradient method based controllers is novel. In addition, the stability analysis does not rely on linearization and is based on energy functions which allow us to establish rigorous stability results. 2) State transformation: In [10], [12] it is shown how a state transformation of the closed-loop system can be used to eliminate the information about the demand from the controller dynamics, which improves implementation of the resulting controller. We pursue this idea and show that the same kind of state transformation can also be used for more complex physical models as considered in this paper. This avoids the requirement of knowing the demand to determine the market price. 3) Controller parameters: In the present paper we show that both the physical power network as well as the dynamic pricing controllers admit a port-Hamiltonian representation, and in particular are passive systems. As a result, the interconnection between the controller and the nonlinear power system is power-preserving, implying passivity of the closedloop system as well. Consequently, we do not have to impose any condition on controller design parameters for guaranteeing asymptotic stability, contrary to [14], [18], [15]. 4) Port-Hamiltonian framework: Because of the use of the port-Hamiltonian framework, the proposed controller designs have the potential to deal with more complex models for the power network compared to the model described in this paper. As long as the more complex model remains portHamiltonian, the results continue to be valid. This may lead to inclusion of, for example, turbine dynamics or automatic voltage regulators in the analysis, although this is beyond the scope of the present paper. Furthermore, higher order models for the synchronous generator could be considered. In addition, we propose various extensions to the basic controller design that have not been investigated in the aforementioned references. 5) Transmission costs: In addition to nodal power constraints and line congestion, we also consider the possibility of including power transmission costs into the social welfare problem. Including such costs may in particular be useful in reducing energy losses or the risk of a breakdown of certain transmission lines. 6) Non-strict convex objective functions: By relaxing the conditions on the objective function, we show that also nonstrict convex/concave cost/utility functions can be considered respectively. In addition, the proposed technique allows to add damping in the gradient method based controller which may improve the convergence rate of the closed-loop system. 3 7) Barrier functions: We highlight the possibility to use barrier functions to enforce the trajectories to stay withing the feasible region, which allows operation within the capacity constraints for all time, even during transients. This permits a more realistic application of the proposed controller design. The remainder of this paper is organized as follows. In Section II the preliminaries are stated. Then the basic dynamic pricing algorithm is discussed in Section III and convergence of the closed-loop system is proven. Variations of the basic controller design are discussed in Section IV where in Section IV-A nodal power congestion is included into the social welfare problem, and in Section IV-B the case line congestion for the acyclic power networks is discussed. A dynamic pricing algorithm is proposed in Section IV-C which does not require knowledge about the power supply and demand. In Section IV-D the possibility to relax the convexity assumption and to improve the transient dynamics of the basic controller is discussed. Finally, the conclusions and suggestions for future research are discussed in Section V. II. P RELIMINARIES A. Notation Given a symmetric matrix A ∈ Rn×n , we write A > 0 (A ≥ 0) to indicate that A is a positive (semi-)definite matrix. The set of positive real numbers is denoted by R>0 and likewise the set of vectors in Rn whose elements are positive by Rn>0 . We write A∨B to indicate that either condition A or condition B holds, e.g., a > 0 ∨ b > 0 means that either a > 0 or b > 0 holds. Given v ∈ Rn then v  0 denotes the element-wise inequality. The notation 1 ∈ Rn is used for the vector whose elements are equal to 1. Given a twice-differentiable function f : Rn → Rn then the Hessian of f evaluated at x is denoted by ∇2 f (x). Given a vector η ∈ Rm , we denote by sin η ∈ Rm the element-wise sine function. Given a differentiable function f (x1 , x2 ), x1 ∈ Rn1 , x2 ∈ Rn2 then ∇f (x1 , x2 ) denotes the gradient of f with respect to x1 , x2 evaluated at x1 , x2 and likewise ∇x1 f (x1 , x2 ) denotes the gradient of f with respect to x1 . Given a solution x of ẋ = f (x), where f : Rn → Rn is a Lebesgue measurable function and locally bounded, the omega-limit set Ω(x) is defined as [25] n Ω(x) := x̄ ∈ Rn | ∃{tk }∞ k=1 ⊂ [0, ∞) o with lim tk = ∞ and lim x(tk ) = x̄ . k→∞ are arbitrary labeled with a ‘+’ and a ‘-’, so that the incidence matrix D of the resulting directed graph is given by Dik Each bus represents a control area and is assumed to have a controllable power supply and demand. The dynamics at each bus is assumed to be given by [22], [6] δ̇i = ωi Mi ω̇i = − 0 0 Bij Eqi Eqj sin δij − Ai ωi + Pgi − Pdi 0 0 = Ef i − (1 − (Xdi − Xdi )Bii )Eqi X 0 0 − (Xdi − Xdi ) Bij Eqj cos δij , (1) j∈Ni which is commonly referred to as the flux-decay model. Here we use a similar notation as used in established literature on power systems [22], [23], [26], [24]. See Table I for a list of symbols used in the model (1) and throughout the paper. δi ωib ωn ωi 0 Eqi Ef i Pdi Pgi Mi Ni Ai Bij Bii Xdi 0 Xdi 0 Tdi Voltage angle Frequency Nominal frequency Frequency deviation ωi := ωib − ω n q-axis transient internal voltage Excitation voltage Power demand Power generation Moment of inertia Set of buses connected to bus i Asynchronous damping constant Negative of the susceptance of transmission line (i, j) Self-susceptance d-axis synchronous reactance of generator i d-axis transient reactance of generator i d-axis open-circuit transient time constant Table I PARAMETERS AND STATE VARIABLES OF MODEL (1). Assumption 1. By using the power network model (1) the following assumptions are made, which are standard in a broad range of literature on power network dynamics [22]. • • Consider a power grid consisting of n buses. The network is represented by a connected and undirected graph G = (V, E), where the nodes, V = {1, ..., n}, is the set of buses and the edges, E = {1, . . . , m} ⊂ V × V, is the set of transmission lines connecting the buses. The k-th edge connecting nodes i and j is denoted as k = (i, j) = (j, i). The ends of edge k X j∈Ni 0 0 Tdi Ėqi k→∞ B. Power network model   +1 if i is the positive end of edge k = −1 if i is the negative end of edge k   0 otherwise. • Lines are purely inductive, i.e., the conductance is zero. This assumption is generally valid for the case of high voltage lines connecting different control areas. The grid is operating around the synchronous frequency which implies ωib ≈ ω n for each i ∈ V. In addition, we assume for simplicity that the excitation voltage Ef i is constant for all i ∈ V. Define the voltage angle differences between the buses by η = DT δ. Further define the angular momenta by p := M ω, where ω = ω b −1ω n are the (aggregated) frequency deviations and M = diagi∈V {Mi } are the moments of inertia. Let 0 0 0 0 Γ(Eq0 ) = diagk∈E {γk } and γk = Bij Eqi Eqj = Bji Eqi Eqj 4 where k corresponds to the edge between node i and j. Then we can write (1) more compactly as [6] η̇ = DT ω M ω̇ = −DΓ(Eq0 ) sin η − Aω + Pg − Pd Td0 Ėq0 = −F (η)Eq0 (2) + Ef where A = diagi∈V {Ai }, Pg = coli∈V {Pgi }, Pd = 0 0 coli∈V {Pdi }, Td0 = diagi∈V {Tdi }, Eq0 = coli∈V {Eqi }, Ef = coli∈V {Ef i }. For a given η, the components of the matrix F (η) ∈ Rn×n are defined as 1 0 + Bii , Xdi − Xdi Fij (η) = −Bij cos ηk = Fji (η), Fii (η) = i∈V (3) k = (i, j) ∈ E and Fij (η) = 0 otherwise.P Since for realistic power networks 0 Xdi > Xdi , and Bii = j∈Ni Bij > 0 for all i ∈ V, it follows that F (η) > 0 for all η [22], [23]. Considering the physical energy1 stored in the generator and the transmission lines respectively, we define the Hamiltonian as ! 0 2 (E − E ) 1X f i qi Hp = Mi−1 p2i + 0 2 Xdi − Xdi i∈V (4)  1X 0 2 0 2 0 0 + Bij (Eqi ) + (Eqj ) − 2Eqi Eqj cos ηk 2 The assumption η̄ ∈ (−π/2, π/2)m is standard in studies on power grid stability and is also referred to as a security constraint [6]. In addition, the Hessian condition guarantees the existence of a local storage function around the equilibrium. The following result, which establishes decentralized conditions for checking the positive definiteness of the Hessian, was proven in [28]: 0 Proposition 1. Let Ēqi ∈ Rn>0 and η̄ ∈ (−π/2, π/2)m . If for all i ∈ V we have 0 X sin2 η̄k Eqj 1 + B + B ii ij 0 0 cos η̄ Xdi − Xdi Eqi k k=(i,j)∈E   X Ēqi > Bij cos η̄k 1 + tan2 η̄k > 0 Ēqj k=(i,j)∈E then ∇2 Hp (x̄p ) > 0. It can be verified that the condition stated in Proposition 1 is satisfied if the following holds [28]: • the generator reactances are small compared to the transmission line reactances • the voltage (angle) differences are small. Remarkably, these conditions hold for a typical operation point in power transmission networks. k=(i,j)∈E where ηk = δi − δj . The first term of the Hamiltonian Hp represents the shifted kinetic energy stored in the rotors of the generators and the second term corresponds to the magnetic energy stored in the generator circuits. Finally, the last term of Hp corresponds to the magnetic energy stored in the inductive transmission lines. By (4), the system (2) can be written in port-Hamiltonian form [27] as     0 0 0 DT 0  ∇Hp + I −I  up 0 ẋp = −D −A 0 0 0 0 −Rq (5)     0 I 0 ω yp = ∇Hp = 0 −I 0 −ω where xp = col(η, p, Eq0 ), up = col(Pg , Pd ) and Rq = (Td0 )−1 (Xd − Xd0 ) > 0, 0 Td0 = diagi∈V {Tdi } > 0, 0 Xd − Xd0 = diagi∈V {Xdi − Xdi } > 0. For a study on the stability and equilibria of the flux-decay model (5), based on the Hamiltonian function (4), we refer to [6]. The stability results established in [6] rely on the following assumption. Assumption 2. Given a constant input up = ūp . There exists an equilibrium (η̄, p̄, Ēq0 ) of (5) that satisfies η̄ ∈ im DT , η̄ ∈ (−π/2, π/2)m and ∇2 H(η̄, p̄, Ēq0 ) > 0. aesthetic reasons we define the Hamiltonian Hp as ω n times the physical energy as the factor 1/ω n appears in each of the energy functions. As a result, Hp has the dimension of power instead of energy. 1 For C. Social welfare problem We define the social welfare by S(Pg , Pd ) := U (Pd ) − C(Pg ), which consists of a utility function U (Pd ) of the power consumption Pd and the cost C(Pg ) associated to the power production Pg . We assume that C(Pg ), U (Pd ) are strictly convex and strictly concave functions respectively. Remark 1. It is also possible to include mutual costs and utilities among the different control areas, provided that the convexity/concavity assumption is satisfied. The objective is to maximize the social welfare while achieving zero frequency deviation. By analyzing the equilibria of (1), it follows that a necessary condition for zero frequency deviation is 1T Pd = 1T Pg [6], i.e., the total supply must match the total demand. It can be noted that (Pg , Pd ) is a solution to the latter equation if and only if there exists a v ∈ Rmc satisfying Dc v −Pg +Pd = 0 where Dc ∈ Rn×mc is the incidence matrix of some connected communication graph with mc edges and n nodes. Because of the latter equivalence, we consider the following convex minimization problem: min Pg ,Pd ,v − S(Pg , Pd ) = C(Pg ) − U (Pd ) s.t. Dc v − Pg + Pd = 0. (6a) (6b) Remark 2. Although this paper focuses on optimal active power sharing, we stress that it is also possible to consider (optimal) reactive power sharing simultaneously, see e.g. [28] for more details. The Lagrangian corresponding to (6) is given by L = C(Pg ) − U (Pd ) + λT (Dc v − Pg + Pd ) (7) 5 with Lagrange multipliers λ ∈ Rn . The resulting first-order optimality conditions are given by the Karush–Kuhn–Tucker (KKT) conditions ∇C(P̄g ) − λ̄ = 0, −∇U (P̄d ) + λ̄ = 0, DcT λ̄ = 0, (8) Dc v̄ − P̄g + P̄d = 0. Since the minimization problem is convex, strong duality holds and it follows that (P̄g , P̄d , v̄) is an optimal solution to (6) if and only if there exists an λ̄ ∈ Rn that satisfies (8) [29]. III. BASIC PRIMAL - DUAL GRADIENT CONTROLLER In this section we design the basic dynamic pricing algorithm which will be used as the starting point for the controllers designs discussed in Section IV. Its dynamics is obtained by applying the primal-dual gradient method [7], [10], [14] to the minimization problem (6), resulting in τg Ṗg = −∇C(Pg ) + λ + ugc τd Ṗd = ∇U (Pd ) − λ + udc we interchangeably write the system dynamics in terms of both xc and zc for ease of notation. In these new variables the dynamics (9) admits a natural port-Hamiltonian representation [20], which is given by   0 0 0 I 0 0 0 −I   ẋc =   0 0 0 −DcT  ∇Hc (xc ) + ∇S(zc ) −I I Dc 0   I 0 0 I   u + (10) 0 0 c 0 0     I 0 0 0 P yc = ∇Hc (xc ) = g , 0 I 0 0 Pd 1 (11) Hc (xc ) = xTc τc−1 xc . 2 (9a) Note that the system (10) is indeed a port-Hamiltonian system2 since S is concave and therefore satisfies the incremental passivity property (9b) (z1 − z2 )T (∇S(z1 ) − ∇S(z2 )) ≤ 0, ∀z1 , z2 ∈ R3n+mc . τv v̇ = −DcT λ (9c) τλ λ̇ = Dc v − Pg + Pd . (9d) Here we introduce additional inputs uc = col(ugc , udc ) which are to be specified later on, and τc := blockdiag(τg , τd , τv , τλ ) > 0 are controller design parameters. Recall from Section II-C that there is freedom in choosing a communication network and the associated incidence matrix. Depending on the application, one may prefer all-to-all communication where the underlying graph is complete, or communication networks where its associated graph is a star, line or cycle graph. In addition, τc determines the converge rate of the dynamics (9); a large τc gives a slow convergence rate whereas a small τc gives a fast convergence rate. Observe that the dynamics (9) has a clear economic interpretation [1], [2], [5]: each power producer aims at maximizing their own profit, which occurs whenever their individual marginal cost is equal to the local price λi + ugci . At the same time, each consumer maximizes its own utility but is penalized by the local price λi − udci . The equations (9c), (9d) represent the distributed dynamic pricing mechanism where the quantity v represents a virtual power flow along the edges of the communication graph with incidence matrix Dc . We emphasize virtual, since v may not correspond to the real physical power flow as the communication graph may be different than the physical network topology. Equation (9d) shows that the local price λi rises if the power demand plus power outflow at node i ∈ V is greater than the local power supply plus power inflow of power at node i and vice versa. The inputs ugc , udc are interpreted as additional penalties or prices that are assigned to the power producers and consumers respectively. These inputs can be chosen appropriately to compensate for the frequency deviation in the physical power network as we will show now. To this end, define the variables xc = (xg , xd , xv , xλ ) = (τg Pg , τd Pd , τv v, τλ λ) = τc zc and note that, in the sequel, The port-Hamiltonian controller (10) is interconnected to the physical network (5) by taking uc = −yp , up = yc . Define the extended vectors of variables by    η I 0 0 0 0 0 0 0 M 0 0 0 0 0   ω     0 0 I 0 0 0 0  Eq0       x :=  0 0 0 τg 0 0 0   Pg  =: τ z. (12) 0 0 0 0 τd 0 0   Pd     0 0 0 0 0 τv 0   v  0 0 0 0 0 0 τλ λ Then the closed-loop port-Hamiltonian system takes the form   0 DT 0 0 0 0 0 −D −A 0 I −I 0 0     0 0 −Rq 0 0 0 0    −I 0 0 0 0 I  ẋ =   ∇H(x)  0   0 I 0 0 0 0 −I   T  0 0 0 0 0 0 −Dc 0 0 0 −I I Dc 0 + ∇S(z), (13) where H = Hp +Hc is equal to the sum of the energy function (4) corresponding to the physical model, and the controller Hamiltonian (11). In the sequel we write (13) more compactly as ẋ = (J − R)∇H(x) + ∇S(z), where R = RT ≥ 0, J = −J T . We define the equilibrium set of (13), expressed in the variable z, by Z1 = {z̄ | z̄ is an equilibrium of (13)}. (14) Note that each z̄ ∈ Z1 satisfies the optimality conditions (8) and simultaneously the zero frequency constraints of the 2 Strictly speaking, (10) is an incremental port-Hamiltonian system [27]. 6 physical network (5) given by ω̄ = 0. Hence, Z1 corresponds to the desired equilibria, and the next theorem states the convergence to this set of optimal points. Theorem 1. For every z̄ ∈ Z1 satisfying Assumption 2 there exists a neighborhood Υ around z̄ where all trajectories z satisfying (13) with initial conditions in Υ converge to the set Z1 . In addition, the convergence of each such trajectory is to a point. Proof. Let z̄ ∈ Z1 and define the shifted Hamiltonian H̄ around x̄ := τ z̄ as [27], [6] H̄(x) = H(x) − (x − x̄)T ∇H(x̄) − H(x̄). (15) After rewriting, the closed-loop port-Hamiltonian system (13) is equivalently described by − (∇Eq0 H̄)T Rq ∇Eq0 H̄ ≤ 0, A. Including nodal power constraints The results of Section III can be extended to the case where nodal constraints on the power production and consumption are included into the optimization problem (6). To this end, consider the social welfare problem min Pg ,Pd ,v − S(Pg , Pd ) := C(Pg ) − U (Pd ) s.t. Dc v − Pg + Pd = 0, g(Pg , Pd )  0 (17a) (17b) (17c) where g : R2n → Rl is a convex function. ẋ = (J − R)∇H̄(x) + ∇S(z) − ∇S(z̄). The shifted Hamiltonian H̄ satisfies H̄˙ = −ω T Aω + (z − z̄)T (∇S(z) − ∇S(z̄)) include, among other things, the possibility to incorporate nodal power constraints, and line congestion in conjunction with transmission costs into the social welfare problem. (16) where equality holds if and only if ∇Eq0 H̄(x) = ∇Eq0 H(x) = 0, ω = 0, Pg = P̄g , Pd = P̄d since S(z) is strictly concave in Pg and Pd . Bearing in mind Assumption 2, it is observed that ∇2 H(x) = ∇2 H̄(x) > 0 for all x in a sufficiently small open neighborhood around x̄. Hence, as H̄˙ ≤ 0, there exists a compact sublevel set Υ of H̄ around z̄ contained in such neighborhood, which is forward invariant. By LaSalle’s invariance principle, each the solution with initial conditions in Υ converges to the largest invariant set S contained in Υ ∩ {z | ∇Eq0 H(x) = 0, ω = 0, Pg = P̄g , Pd = P̄d }. On such invariant set λ = λ̄ and η, v, Eq0 are constant. Hence, z converges to S ⊂ Z1 as t → ∞. Finally, we prove that the convergence of each solution of (13) initializing in Υ is to a point. This is equivalent to proving that its omega-limit set Ω(x) is a singleton. Since the solution x is bounded, Ω(x) 6= ∅ by the Bolzano-Weierstrass theorem [30]. By contradiction, suppose now that there exist two distinct point in Ω(x), say x̄1 , x̄2 ∈ Ω(x), x̄1 6= x̄2 . Then there exists H̄1 (x), H̄2 (x) defined by (15) with respect to x̄1 , x̄2 respectively and scalars c1 , c2 ∈ R>0 such that H̄1−1 (≤ c1 ) := {x | H̄1 (x) ≤ c1 }, H̄2−1 (≤ c2 ) := {x | H̄2 (x) ≤ c2 } are disjoint and compact as the Hessian of H̄1 , H̄2 is positive definite in the neighborhood Υ. Since each trajectory z converges to Z1 as proven above, it follows that τ −1 x̄1 , τ −1 x̄2 ∈ Z1 . Together with x̄1 ∈ Ω(x), this implies that there exists a finite time t1 > 0 such that x(t) ∈ H̄1−1 (≤ c1 ) for all t ≥ t1 as the set H̄1−1 (≤ c1 ) is invariant by the dissipation inequality (16). Similarly, there exists a finite time t2 > 0 such that x(t) ∈ H̄2−1 (≤ c2 ) for all t ≥ t2 . This implies that the solution x(t) satisfies x(t) ∈ H̄1−1 (≤ c1 ) ∩ H̄1−1 (≤ c1 ) = ∅ for t ≥ max(t1 , t2 ) which is a contradiction. This concludes the proof. Remark 3. Note that (17c) captures the convex inequality constraints considered in the existing literature. For example, by choosing g as     Pg − Pgmax g1 (Pg , Pd ) g2 (Pg , Pd )  Pgmin − Pg     g(Pg , Pd ) =  g3 (Pg , Pd ) = Pd − P max  , d g4 (Pg , Pd ) Pdmin − Pd the resulting inequality constraints (17c) become Pgmin  Pg  Pgmax , Pdmin  Pd  Pdmax which, among others, are used in [13], [14], [18]. In the sequel, we assume that (17) satisfies Slater’s condition [29]. As a result, (P̄g , P̄d , v̄) is an optimal solution to (17) if and only if there exists λ̄ ∈ Rn , µ̄ ∈ Rl≥0 satisfying the following KKT optimality conditions: ∂g (P̄g , P̄d )µ̄ = 0, ∂Pg ∂g (P̄g , P̄d )µ̄ = 0, −∇U (P̄d ) + λ̄ + ∂Pd Dc v̄ − P̄g + P̄d = 0, DcT λ̄ = 0, ∇C(P̄g ) − λ̄ + g(P̄g , P̄d )  0, µ̄  0, (18) µ̄T g(P̄g , P̄d ) = 0. Next, we introduce the following subsystems [20], [9] ( gi (wi ) if µi > 0 + ẋµi = (gi (wi ))µi := max{0, gi (w)} if µi = 0 (19) 1 T −1 yµi = ∇gi (wi )∇Hµi (xµi ), Hµi (xµi ) = xµi τµi xµi 2 with state xµi := τµi µi ∈ R≥0 , outputs yµi ∈ Rl , inputs wi ∈ R2n , and i ∈ I := {1, . . . , l}. Here gi (.) is the i’th entry of the vector-valued function g(.) = coli∈V {gi (.)}. Note that, for a given i ∈ I and for a constant input w̄i , the equilibrium set Zµi of (19) is characterized by all (µ̄i , w̄i ) satisfying gi (w̄i ) ≤ 0, µ̄i ≥ 0, µ̄i = 0 ∨ gi (w̄i ) = 0. (20) IV. VARIATIONS IN THE CONTROLLER DESIGN More formally, for i ∈ I the equilibrium set Zµi of (19) is given by In this section we propose several variations and extensions of the controller designed in the previous section. These Zµi := {(µ̄i , w̄i ) | (µ̄i , w̄i ) satisfies (20)}. 7 Remark 4. In case the inequality constraints of Remark 3 (e.g. Pg  Pgmax ) are considered, the subsystems (19) take the decentralized form ( max Pgi − Pgi if µi > 0 max + ẋµi = (Pgi − Pgi )µi = max max{0, Pgi − Pgi } if µi = 0 1 yµi = ∇Hµi (xµi ), Hµi (xµi ) = xTµi τµ−1 xµi , i ∈ V, i 2 (21) and similar expressions can be given for the remaining inequalities Pgmin  Pg , Pdmin  Pd  Pdmax . The subsystems (19) have the following passivity property [20]. states, the closed-loop system inherits the same property provided that an equilibrium of (24) exists. Proposition 2 ([20]). Let i ∈ I, (µ̄i , w̄i ) ∈ Zµi and define ȳµi := ∇gi (w̄i )µ̄i . Then (19) is passive with respect to the shifted external port-variables w̃i := wi − w̄i , ỹµi := yµi − ȳµi . Additionally, (µi , wi ) → Zµi as t → ∞ for (µi , wi ), wi = w̄i satisfying (19). where x̃µ := xµ − x̄µ and H̄ is defined by (23). By Proposition 2 and Remark 5, the time-derivative of H̄e satisfies X H̄˙ e ≤ ũT ỹ + w̃T ỹµi = ũT ỹ − ũT ỹ = 0 Consider again system (13) ẋ = (J − R)∇H(x) + ∇S(z) + GT u    P 0 0 I y = G∇H(x) = g , G = Pd 0 0 0 0 I 0 0 0 0  (22) with the state x defined by (12), where we introduce an additional input u ∈ R2n and output y ∈ R2n . Remark 5. Note that for any steady state (x̄, ū) of (22), the latter system is passive with respect to the shifted external port-variables ũ := u − ū, ỹ = y − ȳ, ȳ := G∇H(x̄), using the storage function H̄(x) := H(x) − (x − x̄)T ∇H(x̄) − H(x̄). (23) We interconnect the subsystems (19) to (22) in a powerpreserving way by X wi = w = y ∀i ∈ I, u=− yµi i∈I to obtain the closed-loop system η̇ = DT ω M ω̇ = Td0 Ėq0 = −DΓ(Eq0 ) sin η − −F (η)Eq0 + Ef (24a) Aω + Pg − Pd (24c) ∂g (Pg , Pd )µ − ω τg Ṗg = −∇C(Pg ) + λ − ∂Pg ∂g τd Ṗd = ∇U (Pd ) − λ − (Pg , Pd )µ + ω ∂Pd τv v̇ = −∇CT (v) − DT λ τλ λ̇ = Dv − Pg + Pd τµi µ̇i = (gi (Pg , Pd ))+ µi , (24b) (24d) (24e) (24f) (24g) i ∈ I. (24h) Observe that the equilibrium set Z2 of (24), if expressed in the co-energy variables, is characterized by all (z̄, µ̄) that satisfy (18) in addition to ω̄ = 0, −DΓ(Ēq0 ) sin η̄ + P̄g − P̄d = 0, −F (η̄)Ēq0 + Ef = 0, and therefore corresponds to the desired operation points. Since both the subsystems (19) and the system (13) admit an incrementally passivity property with respect to their steady Theorem 2. For every (z̄, µ̄) ∈ Z2 satisfying Assumption 2 there exists a neighborhood Υ of (z̄, µ̄) where all trajectories z satisfying (24) with initial conditions in Υ converge to the set Z2 and the convergence of each such trajectory is to a point. Proof. Let (z̄, µ̄) ∈ Z2 and consider the shifted Hamiltonian H̄e around (x̄, x̄µ ) = (τ z̄, τµ µ̄) defined by X 1 x̃µ H̄e (x, xµ ) := H̄(x) + H̄µi (xµi ) = H̄(x) + x̃Tµ τx−1 µ 2 i∈I i∈I where equality holds only if Pg = P̄g , Pd = P̄d , ω = 0, ∇Eq0 H(x) = 0. On the largest invariant set where H̄˙ e = 0 it follows by the second statement of Proposition 2 that µ = µ̄. As a result, λ = λ̄ and v, η, Eq0 are constant on this invariant set. Since the right-hand side of (19) is discontinuous and takes the same form as in [25], we can apply the invariance principle for discontinuous Caratheodory systems [25, Proposition 2.1] to conclude that (z, µ) → Z2 as t → ∞. By following the same line of arguments as in the proof of Theorem 1, convergence of each trajectory to a point is proven. Remark 6. Theorem 2 uses the Caratheodory variant of the Invariance Principle which requires that the Caratheodory solution of (24) is unique and that its omega-limit set is invariant [25]. These requirements are indeed satisfied by extending Lemmas 4.1-4.4 of [25] to the case where equality constraints and nonstrict convex/concave (utility) functions are considered in the optimization problem [25, equation (3)], noting that these lemmas only require convexity/concavity instead of their strict versions. In particular, by adding a quadratic function of the Lagrange multipliers associated with the equality constraints to the Lyapunov function, it can be proven that monotonicity of the primal-dual dynamics with respect to primal-dual optimizers as stated in [25, Lemma 4.1] holds for this more general case as well, see also [20], [31]. Remark 7. Instead of using the hybrid dynamics (19) for dealing with the inequality constraints (17c), we can instead introduce the so called barrier functions Bi = −ν log(−gi (Pg , Pd )) that are added to the objective function [29]. Simultaneously, the corresponding inequalities in the social welfare problem (17) are removed to obtain the modified convex optimization problem X min − S(Pg , Pd ) − ν log(−gi (Pg , Pd )) Pg ,Pd ,v (25) i∈V s.t. Dc v − Pg + Pd = 0. Here ν > 0 is called the barrier parameter and is usually chosen small. By applying the primal-dual gradient method to 8 (25) it can be shown that, if the system is initialized in the interior of the feasible region, i.e. where (17c) holds, then the trajectories of the resulting gradient dynamics remain within the feasible region and the system converges to a suboptimal value of the social welfare [7], [29], [32]. However, if Slater’s condition holds, this suboptimal value which depends on ν converges to the optimal value of the social welfare problem as ν → 0 [29]. The particular advantage of using barrier functions is to avoid the use of an hybrid controller and to enforce that the trajectories remain within the feasible region for all future time. the physical model (2), we obtain the following closed-loop system: η̇ = DT ω M ω̇ = Td0 Ėq0 = min Pg ,Pd ,v − S(Pg , Pd , v) := C(Pg ) + CT (v) − U (Pd ) (26a) s.t. Dv − Pg + Pd = 0 (26b) − κ  v  κ, (26c) where κ ∈ Rm satisfies the element-wise inequality κ  0. Note that in this case the communication graph is chosen to be identical with the topology of the physical network, i.e., Dc = D. As a result, the additional constraints (26c) bound the (virtual) power flow along the transmission lines as |vk | ≤ κk , k ∈ E. The corresponding Lagrangian is given by L = C(Pg ) + CT (v) − U (Pd ) + λT (Dv − Pg + Pd ) + µT+ (v − κ) + µT− (−κ with Lagrange multipliers λ ∈ R , µ+ , µ+ ∈ resulting KKT optimality conditions are given by ∇C(P̄g ) − λ̄ = 0, Rm ≥0 . (28c) τd Ṗd = ∇U (Pd ) − λ + ω (28e) T τv v̇ = −∇CT (v) − D λ − µ+ + µ− (28f) τλ λ̇ = Dv − Pg + Pd (28g) (v − κ)+ µ+ (−κ − v)+ µ− . (28h) (28i) The latter system can partially be put into a port-Hamiltonian form, since equations (28a)-(28g) can be rewritten as ẋ = (J − R)∇H(x) + ∇S(z) + N µ  T 0 0 0 0 −I 0 N= , 0 0 0 0 I 0 (29) where the variables x, z and the Hamiltonian H are respectively defined by (12) and (13) as before, and µ = col(µ+ , µ− ). Since the network topology is a tree (i.e. ker D = {0}), the equilibrium of (28) satisfies v̄ = Γ(Ēq0 ) sin η̄. Hence, the controller variable v corresponds to the physical power flow of the network if the closed-loop system is at steady state. Consequently, the constraints and costs on v correspond to constraints and costs of the physical power flow if the system converges to an equilibrium. Theorem 3. Let the network topology be acyclic and let (z̄, µ̄) be an (isolated) equilibrium of (28) satisfying Assumption 2. Then all trajectories (z, µ) of (28) initialized in a sufficiently small neighborhood around (z̄, µ̄) converge asymptotically to (z̄, µ̄) Proof. Let (z̄, µ̄) be the equilibrium of (28). By defining the shifted Hamiltonian H̄(x) around x̄ := τ z̄ by − v) n (28b) (28d) τ− µ̇− = The previous section shows how to include nodal power constraints into the social welfare problem. In case the network is acyclic, line congestion and power transmission costs can be incorporated into the optimization problem as well. To this end, define the (modified) social welfare by U (Pd )− C(Pg )−CT (v) where the convex function CT (v) corresponds to the power transmission cost. If security constraints on the transmission lines are included as well, the optimization problem (6) modifies to Aω + Pg − Pd τg Ṗg = −∇C(Pg ) + λ − ω τ+ µ̇+ = B. Including line congestion and transmission costs (28a) −DΓ(Eq0 ) sin η − −F (η)Eq0 + Ef H̄(x) = H(x) − (x − x̄)T ∇H(x̄) − H(x̄) The one can rewrite (29) as ẋ = (J − R)∇H̄(x) + ∇S(z) − ∇S(z̄) + N µ̃ −∇U (P̄d ) + λ̄ = 0, (30) T ∇CT (v̄) + D λ̄ + µ̄+ − µ̄− = 0, −κ  v̄  κ, µ̄+ , µ̄−  0, µ̄T+ (v̄ − κ) = 0, Dv̄ − P̄g + P̄d = 0, (27) µ̄T− (−κ − v̄) = 0. Suppose that Slater’s condition holds. Then, since the optimization problem (26) is convex, it follows that (P̄g , P̄d , v̄) is an optimal solution to (26) if and only if there exists λ̄ ∈ Rn , µ̄ = col(µ̄+ , µ̄− ) ∈ R2m ≥0 satisfying (27) [29]. By applying the gradient method to (26) in a similar manner as before and connecting the resulting controller with where µ̃ := µ − µ̄. Consider candidate Lyapunov function 1 1 V (x, µ) = H̄(x) + µ̃+ τµ+ µ̃+ + µ̃T− τµ− µ̃− 2 2 and observe that T T T µ̃T+ (v − κ)+ µ+ ≤ µ̃+ (v − κ) = µ̃+ (v̄ − κ + ṽ) ≤ µ̃+ ṽ T µ̃T− (−κ − v)+ µ− ≤ µ̃− (−κ − v) = µ̃T− (−κ − v̄ − ṽ) ≤ −µ̃T− ṽ. 9 Bearing in mind (30), the time-derivative of V amounts to 1 1 Ĥ(x̂) = Hp + xTg τg−1 xg + xTd τd−1 xd 2 2 1 1 + xTv τv−1 xv + (xθ − p)τλ−1 (xθ − p). 2 2 By writing the system of differential equations (31) explicitly we obtain V̇ = −ω T Aω − (∇Eq0 H(x))T Rq ∇Eq0 H(x) + (z − z̄)T (∇S(z) − ∇S(z̄)) T + − ṽ T µ̃+ + ṽ T µ̃− + µ̃T+ (v − κ)+ µ+ + µ̃− (−κ − v)µ− ≤ −ω T Aω + (z − z̄)T (∇S(z) − ∇S(z̄)) − (∇Eq0 H(x))T Rq ∇Eq0 H(x) ≤ 0 η̇ = DT ω where equality holds only if ∇Eq0 H(x) = 0, ω = 0, Pg = P̄g , Pd = P̄d . On the largest invariant set S where ∇Eq0 H(x) = 0, ω = 0, Pg = P̄g , Pd = P̄d it follows that, since the graph contains no cycles λ = λ̄, v = v̄, µ = µ̄ and that η, Eq0 are constant, which corresponds to an equilibrium. In particular ∇V (x, µ) = 0 for all (z, µ) ∈ S and (z̄, µ̄) ∈ S. Since by Assumption 2 we have ∇2 V (x̄, µ̄) > 0, it follows that (z̄, µ̄) is isolated. By the invariance principle for discontinuous Caratheodory systems [25] all trajectories (z, µ) of (28) initializing in a sufficienly small neighborhood around (z̄, µ̄) satisfy µ → µ̄, z → z̄ as t → ∞. Remark 8. It is possible to include nodal power constraints, line congestion and transmission costs simultaneously. However, as the results in this section are only valid for acyclic graphs, it should also be assumed for the more general case that the physical network is a tree. C. State transformation Consider again the minimization problem (6). As shown before, by applying the gradient method to the social welfare problem, the closed-loop system (13) is obtained. Note that in the λ-dynamics the demand Pd appears, which in practice is often uncertain. A possibility to eliminate the demand from the controller dynamics is by a state transformation [10], [12]. To this end, define the new variables       η η I 0 0 0 0 0 0 p  p  0 I 0 0 0 0 0  0    0 Eq  0 0 I 0 0 0 0 Eq            Pg  =: τ̂ ẑ, 0 0 0 I 0 0 0 x̂ :=  = x = τ̂ x  g      xd   0 0 0 0 I 0 0   Pd         xv   0 0 0 0 0 I 0  v 0 I 0 0 0 0 I xθ θ i.e., xθ := τθ θ = p + xλ . Then (13) transforms to  0 DT 0 0 −D −A 0 I   0 0 −Rq 0  ˙x̂ =  0 −I 0 0   0 I 0 0   0 0 0 0 −D −A 0 0 the port-Hamiltonian system 0 −I 0 0 0 0 0 0 0 0 0 0 0 Dc with Hamiltonian  DT −A   0   0   ∇Ĥ(x̂) 0   −DcT  −A + ∇S(ẑ) (31) M ω̇ = −DΓ(Eq0 ) sin η − Aω + Pg − Pd Td0 Ėq0 = −F (η)Eq0 + Ef τg Ṗg = −∇C(Pg ) + τλ−1 (τθ θ − M ω) − ω τd Ṗd = ∇U (Pd ) − τv v̇ = τλ−1 (τθ θ −DcT τλ−1 (τθ θ (32) − M ω) + ω − M ω) τθ θ̇ = Dc v − DΓ sin η − Aω. Define Z4 as the set of all ẑ ∗ := (η̄, ω̄, P̄g , P̄d , v̄, θ̄) that are an equilibrium of (32). Using the previous established tools we can prove asymptotic stability to the set of optimal points Z4 . Theorem 4. For every ẑ ∗ ∈ Z4 satisfying Assumption 2 there exists a neighborhood Υ around ẑ ∗ where all trajectories ẑ satisfying (32) (or equivalently (31)) and initializing in Υ converge to Z4 . In addition, the convergence of each such trajectory is to a point. Proof. We proceed along the same lines as in the proof of Theorem 1. Since the stability result of Theorem 1 is preserved after a state transformation, the proof is concluded. Note that the latter result holds for all τg , τd , τv , τλ , τθ > 0. The controller appearing in (32) can be simplified by choosing τλ = τθ = M . As a result, the controller dynamics is described by τg Ṗg = −∇C(Pg ) + θ − 2ω (33a) τd Ṗd = ∇U (Pd ) − θ + 2ω (33b) τv v̇ = −DcT (θ M θ̇ = Dc v − − ω) DΓ(Eq0 ) sin η (33c) − Aω. (33d) The main advantage of controller design (33) is that no information about the power supply and demand is required in the dynamic pricing algorithm (33c), (33d), where we observe that the quantity θ − 2ω acts here as the electricity price for the producers and consumers. Another benefit of the proposed dynamic pricing algorithm is that, contrary to [16], no information is required about ω̇. On the other hand, knowledge about the physical power flows and the power system parameters M, A is required. Determining the radius of uncertainty of these parameters under which asymptotic stability is preserved remains an open question [10]; see [17] for results in a similar setting where only the damping term A is assumed to be uncertain. D. Relaxing the strict convexity assumption By making a minor modification to the social welfare problem (6), it is possible to relax the condition that the 10 functions C, U are strictly convex and concave respectively. To this end, consider the optimization problem 1 C(Pg ) − U (Pd ) + ρ||Dc v − Pg + Pd ||2 Pg ,Pd ,v 2 s.t. Dc v − Pg + Pd = 0, min (34a) (34b) where ρ > 0, C(Pg ) is convex and U (Pd ) is concave, which makes the optimization problem (34) convex. Suppose that there exists a feasible solution to the minimization problem, then the set of optimal points of (34) is identical with the set of optimal points of (6) which is characterized by set of points satisfying the KKT conditions (8). The corresponding augmented Lagrangian of (34) is given by Lp = C(Pg ) − U (Pd ) − λT (Dc v + Pg − Pd ) 1 + ρ||Dc v + Pg − Pd ||2 . 2 Consequenctly, the distributed dynamics of the primal-dual gradient method applied to (34) amounts to τg Ṗg = −∇C(Pg ) + λ − ρ(Dc v + Pg − Pd ) τd Ṗd = ∇U (Pd ) − λ + ρ(Dc v + Pg − Pd ) τv v̇ = DcT λ − ρDcT (Dc v + Pg − Pd ) (35) τλ λ̇ = −Dc v − Pg + Pd , which can be written in the same port-Hamiltonian form as (13) where in this case 1 S(Pg , Pd , v) = U (Pd ) − C(Pg ) − ρ||Dc v − Pg + Pd ||2 . 2 (36) This leads to the following result. Theorem 5. Consider the system (13) where S is given by (36) and suppose that C, U are convex and concave functions respectively. Then for every z̄ ∈ Z1 satisfying Assumption 2, where Z1 is defined by (14), there exists a neighborhood Υ around z̄ wherein each trajectory z satisfying (13) converges to a point in Z1 . Proof. Let z̄ ∈ Z1 . By the proof of Theorem 1 it follows that H̄˙ = −ω T Aω + (z − z̄)T (∇S(z) − ∇S(z̄)) − (∇Eq0 H̄)T Rq ∇Eq0 H̄, S ⊂ Z1 . By continuing along the same lines as the proof of Theorem 1, convergence of each trajectory to a point is proven. Remark 9. Adding the quadratic term in the social welfare problem as done in (34a) provides an additional advantage. As this introduces more damping in the resulting gradientmethod-based controller, see (37), it may improve the convergence properties of the closed-loop dynamics [33], [34]. Moreover, the amount of damping injected into the system depends on parameter ρ, which can be chosen freely. V. C ONCLUSIONS AND FUTURE RESEARCH In this paper a unifying and systematic energy-based approach in modeling and stability analysis of power networks has been established. Convergence of the closed-loop system to the set of optimal points using gradient-method-based controllers have been proven using passivity based arguments. This result is extended to the case where nodal power constraints are included into the problem as well. However, for line congestion and power transmission cost the power network is required to be acyclic to prove asymptotic stability to the set of optimal points. The results established in this paper lend themselves to many possible extensions. One possibility is to design an additional (passive) controller that regulates the voltages to the desired values or achieves alternative objectives like (optimal) reactive power sharing. This could for example be realized by continuing along the lines of [28]. Recent observations, see [35], suggest that the portHamiltonian framework also lends itself to consider higherdimensional models for the synchronous generator than the third-order model used in this paper, while the same controllers as designed in the present paper can be used in this case as well. In addition, current research includes extending the results of the present paper to network-preserving models where a distinction is made between generator and load nodes. One of the remaining open questions is how to deal with line congestion and power transmission costs in cyclic power networks with nonlinear power flows. In addition, all of the results established for the nonlinear power network only provide local asymptotic stability to the set of optimal points. Future research includes determining the region of attraction. where the second term can be written as P̃dT (∇U (Pd ) − ∇U (P̄d )) − P̃gT (∇C(Pg ) − ∇C(P̄g ))  T    −I I −Dc P̃g P̃g −I Dc  P̃d  ≤ 0 − ρ P̃d   I (37) −DcT DcT −DcT Dc ṽ ṽ where P̃g = Pg − P̄g , P̃d = Pd − P̄d , ṽ = v − v̄. Hence, we obtain that H̄˙ ≤ 0 where equality holds only if ω = 0, ∇Eq0 H̄(x) = 0 and Dc ṽ + P̃g − P̃d = Dc v + Pg − Pd = 0. On the largest invariant set S where H̄˙ = 0 we have ω = 0 c and η, Eq0 optimality invariance where all are constant and (Pg , Pd , v, λ) satisfy the KKT conditions (8). Therefore S ⊂ Z1 and by LaSalle’s principle there exists a neighborhood Υ around z̄ trajectories z satisfying (13) converge to the set R EFERENCES [1] F. Alvarado, “The stability of power system markets,” IEEE Transactions on Power Systems, vol. 14, no. 2, pp. 505–511, May 1999. [2] A. Kiani and A. Annaswamy, “The effect of a smart meter on congestion and stability in a power market,” in 49th IEEE Conference on Decision and Control, Atlanta, USA, December, 2010. [3] ——, “A hierarchical transactive control architecture for renewables integration in smart grids,” in Decision and Control (CDC), 2012 IEEE 51st Annual Conference on. IEEE, 2012, pp. 4985–4990. [4] M. Roozbehani, M. Dahleh, and S. Mitter, “On the stability of wholesale electricity markets under real-time pricing,” in 49th IEEE Conference on Decision and Control (CDC), 2010, pp. 1911–1918. [5] F. Alvarado, J. Meng, C. DeMarco, and W. Mota, “Stability analysis of interconnected power systems coupled with market dynamics,” IEEE Transactions on Power Systems, vol. 16, no. 4, pp. 695–701, 2001. [6] S. Trip, M. Bürger, and C. De Persis, “An internal model approach to (optimal) frequency regulation in power grids with time-varying voltages,” Automatica, vol. 64, pp. 240–253, 2016. 11 [7] J. Arrow, L. Hurwicz, H. Uzawa, and H. Chenery, Studies in linear and non-linear programming. Stanford University Press, 1958. [8] D. Feijer and F. Paganini, “Stability of primal–dual gradient dynamics and applications to network optimization,” Automatica, vol. 46, pp. 1974–1981, September 2010. [9] A. Jokić, M. Lazar, and P. P. Van den Bosch, “On constrained steadystate regulation: dynamic KKT controllers,” Automatic Control, IEEE Transactions on, vol. 54, no. 9, pp. 2250–2254, 2009. [10] N. Li, L. Chen, C. Zhao, and S. H. Low, “Connecting automatic generation control and economic dispatch from an optimization view,” in American Control Conference. IEEE, 2014, pp. 735–740. [11] E. Mallada and S. Low, “Distributed frequency-preserving optimal load control,” in IFAC World Congress, 2014. [12] Y. Seungil and C. Lijun, “Reverse and forward engineering of frequency control in power networks,” in Proc. of IEEE Conference on Decision and Control, Los Angeles, CA, USA, 2014. [13] X. Zhang, N. Li, and A. Papachristodoulou, “Achieving real-time economic dispatch in power networks via a saddle point design approach,” in Power & Energy Society General Meeting, 2015. IEEE, 2015, pp. 1–5. [14] X. Zhang and A. Papachristodoulou, “A real-time control framework for smart power networks with star topology,” in American Control Conference (ACC), 2013, pp. 5062–5067. [15] ——, “A real-time control framework for smart power networks: Design methodology and stability,” Automatica, vol. 58, pp. 43–50, 2015. [16] C. Zhao, E. Mallada, and S. Low, “Distributed generator and loadside secondary frequency control in power networks,” in 49th Annual Conference on Information Sciences and Systems (CISS). IEEE, 2015, pp. 1–6. [17] E. Mallada, C. Zhao, and S. Low, “Optimal load-side control for frequency regulation in smart grids,” in Communication, Control, and Computing (Allerton), 2014 52nd Annual Allerton Conference on. IEEE, 2014, pp. 731–738. [18] X. Zhang and A. Papachristodoulou, “Distributed dynamic feedback control for smart power networks with tree topology,” in American Control Conference (ACC), 2014, pp. 1156–1161. [19] C. Zhao, U. Topcu, N. Li, and S. Low, “Design and stability of load-side primary frequency control in power systems,” Automatic Control, IEEE Transactions on, vol. 59, no. 5, pp. 1177–1189, 2014. [20] T. W. Stegink, C. De Persis, and A. J. van der Schaft, “Port-Hamiltonian formulation of the gradient method applied to smart grids,” IFACPapersOnLine, vol. 48, no. 13, pp. 13–18, 2015. [21] ——, “A port-Hamiltonian approach to optimal frequency regulation in power grids,” arXiv preprint arXiv:1509.07318, 2015. [22] J. Machowski, J. Bialek, and J. Bumby, Power System Dynamics: Stability and Control, 2nd ed. Ltd: John Wiley & Sons, 2008. [23] P. Kundur, Power System Stability and Control. Mc-Graw-Hill Engineering, 1993. [24] P. Sauer and M. Pai, Power system dynamics and stability. PrenticeHall, 1998. [25] A. Cherukuri, E. Mallada, and J. Cortés, “Asymptotic convergence of constrained primal–dual dynamics,” Systems & Control Letters, vol. 87, pp. 10–15, 2016. [26] P. Anderson and A. Fouad, Power System Control and Stability, 1st ed. The Iowa State Univsersity Press, 1977. [27] A. van der Schaft and D. Jeltsema, “Port-Hamiltonian systems theory: An introductory overview,” Foundations and Trends in Systems and Control, vol. 1, no. 2-3, pp. 173–378, 2014. [28] C. De Persis and N. Monshizadeh, “A modular design of incremental Lyapunov functions for microgrid control with power sharing,” arXiv preprint arXiv:1510.05811, 2015. [29] S. Boyd and L. Vandenberghe, Convex Optimization, 1st ed. Cambridge University Press, 2004. [30] W. Rudin, Principles of mathematical analysis. McGraw-Hill New York, 1964, vol. 3. [31] A. Cherukuri, B. Gharesifard, and J. Cortes, “Saddle-point dynamics: conditions for asymptotic stability of saddle points,” arXiv preprint arXiv:1510.02145, 2015. [32] J. Wang and N. Elia, “A control perspective for centralized and distributed convex optimization,” in Decision and Control and European Control Conference (CDC-ECC), 2011 50th IEEE Conference on. IEEE, 2011, pp. 3800–3805. [33] S. Boyd, N. Parikh, E. Chu, B. Peleato, and J. Eckstein, “Distributed optimization and statistical learning via the alternating direction method of multipliers,” Foundations and Trends in Machine Learning, vol. 3, no. 1, pp. 1–122, 2011. [34] R. T. Rockafellar, “The multiplier method of Hestenes and Powell applied to convex programming,” Journal of Optimization Theory and applications, vol. 12, no. 6, pp. 555–562, 1973. [35] T. W. Stegink, C. De Persis, and A. J. van der Schaft, “Optimal power dispatch in networks of high-dimensional models of synchronous machines,” arXiv preprint arXiv:1603.06688, 2016. Tjerk Stegink is a Ph.D. candidate at the Engineering and Technology Institute, Faculty of Mathematics and Natural Sciences, University of Groningen, the Netherlands. He received his B.Sc. (2012) in Applied Mathematics and M.Sc. (2014, cum laude) in Systems, Control and Optimization from the same university. His main research interests are in modeling and nonlinear distributed control of power systems. Claudio De Persis received the Laurea degree (cum laude) in electrical engineering in 1996 and the Ph.D. degree in system engineering in 2000, both from Sapienza University of Rome, Rome, Italy. He is currently a Professor at the Engineering and Technology Institute, Faculty of Mathematics and Natural Sciences, University of Groningen, the Netherlands. He is also affiliated with the Jan Willems Center for Systems and Control. Previously he was with the Department of Mechanical Automation and Mechatronics, University of Twente and with the Department of Computer, Control, and Management Engineering, Sapienza University of Rome. He was a Research Associate at the Department of Systems Science and Mathematics, Washington University, St. Louis, MO, USA, in 2000–2001, and at the Department of Electrical Engineering, Yale University, New Haven, CT, USA, in 2001–2002. His main research interest is in control theory, and his recent research focuses on dynamical networks, cyberphysical systems, smart grids and resilient control. He was an Editor of the International Journal of Robust and Nonlinear Control (2006–2013), and is currently an Associate Editor of the IEEE Transactions On Control Systems Technology (2010–2015), of the IEEE Transactions On Automatic Control (2012–2015), and of Automatica (2013–present). Arjan van der Schaft received the undergraduate (cum laude) and Ph.D. degrees in Mathematics from the University of Groningen, The Netherlands. In 1982 he joined the Department of Applied Mathematics, University of Twente, where he was appointed as full professor in Mathematical Systems and Control Theory in 2000. In September 2005 he returned to his Alma Mater as a full professor in Mathematics. Arjan van der Schaft is Fellow of the Institute of Electrical and Electronics Engineers (IEEE), and Fellow of the International Federation of Automatic Control (IFAC). He was Invited Speaker at the International Congress of Mathematicians, Madrid, 2006. He was the 2013 recipient of the 3-yearly awarded Certificate of Excellent Achievements of the IFAC Technical Committee on Nonlinear Systems. He is (co-)author of the following books: System Theoretic Descriptions of Physical Systems (1984), Variational and Hamiltonian Control Systems (1987, with P.E. Crouch), Nonlinear Dynamical Control Systems (1990, with H. Nijmeijer), L2-Gain and Passivity Techniques in Nonlinear Control (1996, 2000), An Introduction to Hybrid Dynamical Systems (2000, with J.M. Schumacher), Port-Hamiltonian Systems Theory: An Introductory Overview (2014, with D. Jeltsema).
3cs.SY
Mean Field Residual Networks: On the Edge of Chaos Greg Yang∗ Samuel S. Schoenholz arXiv:1712.08969v1 [cs.NE] 24 Dec 2017 Microsoft Research AI [email protected] Google Brain [email protected] Abstract We study randomly initialized residual networks using mean field theory and the theory of difference equations. Classical feedforward neural networks, such as those with tanh activations, exhibit exponential behavior on the average when propagating inputs forward or gradients backward. The exponential forward dynamics causes rapid collapsing of the input space geometry, while the exponential backward dynamics causes drastic vanishing or exploding gradients. We show, in contrast, that by adding skip connections, the network will, depending on the nonlinearity, adopt subexponential forward and backward dynamics, and in many cases in fact polynomial. The exponents of these polynomials are obtained through analytic methods and proved and verified empirically to be correct. In terms of the “edge of chaos” hypothesis, these subexponential and polynomial laws allow residual networks to “hover over the boundary between stability and chaos,” thus preserving the geometry of the input space and the gradient information flow. In our experiments, for each activation function we study here, we initialize residual networks with different hyperparameters and train them on MNIST. Remarkably, our initialization time theory can accurately predict test time performance of these networks, by tracking either the expected amount of gradient explosion or the expected squared distance between the images of two input vectors. Importantly, we show, theoretically as well as empirically, that common initializations such as the Xavier or the He schemes are not optimal for residual networks, because the optimal initialization variances depend on the depth. Finally, we have made mathematical contributions by deriving several new identities for the kernels of powers of ReLU functions by relating them to the zeroth Bessel function of the second kind. 1 Introduction Previous works [9, 3, 11] have shown that randomly initialized neural networks exhibit a spectrum of behavior with depth, from stable to chaotic, which depends on the variance of the initializations: the cosine distance of two input vectors converges exponentially fast with depth to a fixed point in [0, 1]; if this fixed point is 1, then the behavior is stable; if this fixed point is 0, then the behavior is chaotic. It has been argued in many prior works [1, 9] that effective computation can only be supported by a dynamical behavior that is on the edge of chaos. Too much stability prevents the neural network from telling apart two different inputs. While some chaotic behavior can increase the expressivity of a network, too much chaos makes the neural network think two similar inputs are very different. At the same time, the same initialization variances also control how far gradient information can be propagated through the network; the networks with chaotic forward dynamics will tend to suffer from exploding gradients, while networks with stable forward dynamics will tend to suffer from vanishing gradients. ∗ Work done while at Harvard University 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. These works have focused on vanilla (fully connected) feedforward networks. Here we consider residual networks [6, 7] (with fully-connected layers and without batchnorm), which are a family of recently proposed neural network architectures that has achieved state-of-the-art performance on image recognition tasks, beating all other approaches by a large margin. The main innovation of this family of architectures is the addition of a passthrough (identity) connection from the previous layer to the next, such that the usual nonlinearity computes the “residual” between the next-layer activation and the previous-layer activation. In this work, we seek to characterize randomly initialized residual networks. One of our main results is that random residual networks for many nonlinearities such as tanh live on the edge of chaos, in that the cosine distance of two input vectors will converge to a fixed point at a polynomial rate, rather than an exponential rate, as with vanilla tanh networks. Thus a typical residual network will slowly cross the stable-chaotic boundary with depth, hovering around this boundary for many layers. In addition, for most of the nonlinearities considered here, the mean field estimate of the gradient grows subexponentially with depth. In fact, for α-ReLU, the αth-power of ReLU, for α < 1, the gradient grows only polynomially. These theoretical results provide some theoretical justification for why residual networks work so well in practice. In our experiments, we are also able to predict surprisingly well the relative performances of trained residual networks based only on their initialization hyperparameters, in a variety of settings. In particular, we find that the quality of initialization for tanh resnets is determined by trainability (how much gradient explosion on average) while that for (α-)ReLU resnets is determined by expressivity (how far can two different input vectors be pulled apart) (see Section 6). To the best of our knowledge, this is the first time that a quantity other than gradient explosion/vanishing has been found to control the quality of initialization. We establish theoretically and empirically that the best initialization variances for residual networks depend on the depth of the network (contrary to the feedforward case [11]), so that common initialization schemes like Xavier [4] or He [5] cannot be optimal. In fact, even the rationale of He initialization is incorrect for ReLU residual networks because it tries to control gradient dynamics rather than expressivity. However we want to emphasize that we study a simplified model of residual networks in this work, with no batchnorm or convolutional layers, so that these results are not necessarily indicative of the MSRA residual network used in practice [6]. In the body of this paper, we give account of general intuition and/or proof strategy when appropriate for our theoretical results, but we relegate all formal statements and proofs to the appendix. 2 Background Consider a vanilla feedforward neural network of L layers, with each layer l having N (l) neurons; here layer 0 is the input layer. For the ease of presentation we assume all hidden layer widths are the (0) (0) same N (l) = N for all l > 0. Let x(0) = (x1 , . . . , xN (0) ) be the input vector to the network, and let x(l) for l > 0 be the activation of layer l. Then a neural network is given by the equations (l) (l) (l) xi = φ(hi ), hi = N X (l) (l−1) wij xj (l) + bi j=1 where (i) h(l) is the pre-activation at layer l, (ii) w(l) is the weight matrix, (iii) b(l) is the bias vector, and (iv) φ is a nonlinearity, for example tanh or ReLU, which is applied coordinatewise to its input. To lighten up notation, we suppress the explicit layer numbers l and write X xi = φ(hi ), hi = wij xj + bi j where • implicitly denotes •(l) , and • denotes •(l−1) (and analogously, • denotes •(l+1) ). A series of papers [9, 10, 11] investigated the “average behavior” of random neural networks (l) (l) 2 sampled via wij ∼ N (0, σw /N ), bi ∼ N (0, σb2 ), for fixed parameters σw and σb , independent of l. P N Consider the expectation of N1 i=1 x2i , the normalized squared length of x, over the sampling of w and b. Poole et al. [9] showed that this quantity converges to a fixed point exponentially fast for sigmoid nonlinearities. Now suppose we propagate two different vectors x(0) and (x(0) )0 through the 2 PN network. Poole et al. [9] also showed that the expectation of the normalized dot product N1 i=1 xi x0i converges exponentially fast to a fixed point. The ratio between the normalized squared length and the normalized dot product is the cosine distance between x and x0 . Thus these two exponential convergence results show that the cosine distance converges exponentially fast to a fixed point as well. Intuitively, this means that a vanilla feedforward network “forgets” the geometry of the input space “very quickly,” after only a few layers. In addition, Schoenholz et al. [11], under certain independence assumptions, showed that the expected normalized squared norm of the gradient also vanishes or explodes in an exponential fashion with depth, with the ”half-life” controlled by σw and σb . They verified that this theoretical ”half-life” correlates in practice with the maximal number of layers that are admissible to good performance. At the same time, Daniely et al. [3] published work of similar nature, but phrased in the language of reproducing kernel Hilbert spaces, and provided high probability estimates that are meaningful for the case when the width N is finite and the depth is logarithmic in N . However, they essentially fixed the variance parameters σ• , and furthermore, their framework (for example the notion of a “skeleton”) does not immediately generalize to the residual network case. In this work, we show that residual networks have very different dynamics from vanilla feedforward networks. In most cases, the cosine distance convergence rate and the gradient growth rate are subexponential in a residual network, and in most cases, these rates may be polynomial. 3 Preliminaries Residual networks were first introduced by [6] and later refined by [7], and they are now commonplace among deployed neural systems. The key innovation there is the addition of a shortcut connection from the previous layer to the next. We define the following idealized architectures for ease of analysis. Note that we only consider fully-connected affine layers instead of convolutional layers. A reduced residual network (RRN) has the recurrence X xi = φ(hi ) + x, hi = wij xj + bi . j A (full) residual network (FRN) in addition has an affine connection given by weights v and biases a from the nonlinearity φ(h) to the next layer: X X xi = vij φ(hj ) + xi + ai , hi = wij xj + bi j j We are interested in the “average behavior” of these network when the weights and biases, (l) (l) (l) (l) wij , bi , vij , and ai are sampled i.i.d. from Gaussian distributions resp. with standard devi(l) 2 ations σw , σb , σv , and σa , independent from l. Here we take the variance of wij to be σw /N so that (l) 2 the variance of each hi is σw , assuming each xj is fixed (similarity for vij ). Such an initialization scheme is standard in practice. We make several key “physical assumptions” to make theoretical computations tractable: (l) (l) Axiom 3.1 (Symmetry of activations and gradients). (a) We assume h(hi )2 i = h(hj )2 i and (0) (0) (l) h(xi )2 i = h(xj )2 i for any i, j, l. (b) We also assume that the gradient ∂E/∂xi with respect to (l) (l) the loss function E satisfies h(∂E/∂xi )2 i = h(∂E/∂xj )2 i for any i, j, l. One can see that Axiom 3.1(a) is satisfied if the input x(0) ∈ {±1}N and Axiom 3.1(b) is satisfied if Axiom 3.2 below is true and the gradient at the last layer ∂E/∂xL ∈ {±1}N . But in general it (l) (l) is justified both empirically and theoretically as an approximation, because (hi )2 − (hj )2 stays (l) (l) about constant with l, but (hi )2 and (hj )2 grow rather quickly at the same pace with l (as will be (l) seen later in calculations), so that their additive difference becomes negligible; similarly for (xi )2 (l) and (∂E/∂hi )2 . 3 Axiom 3.2 (Gradient independence). (a) We assume the we use a different set of weights for backpropagation than those used to compute the network outputs, but sampled i.i.d. from the same (l) distributions. (b) For any loss function E, we assume that the gradient at layer l, ∂E/∂xi , is (l) (l−1) independent from all activations hj and xj from the previous layer. Axiom 3.2(a) was first made in [11] for computing the mean field theory of gradients for feedforward tanh networks. This is similar to the practice of feedback alignment [8]. Even though we are the first to explicitly formulate Axiom 3.2(b), in fact it was already applied implicitly in the gradient (l) (l+1) calculations of [11]. Note that a priori Axiom 3.2(b) is not true, as ∂E/∂xi depends on φ̇(hk ) (l) (l−1) for every k, which depend on hj for each j, and which depends on xk for every k. Nevertheless, in practice both subassumptions hold very well. Now we define the central quantities studied in this paper. Inevitably, our paper involves a large amount of notation that may be confusing for the first-time reader. We have included a glossary of symbols (Table A.1) to ameliorate notation confusion. (l) Definition 3.3. Fix an input x(0) . Define the length quantities q(l) := h(h1 )2 i and p(l) := (l) h(x1 )2 i for l > 0 and p(0) = kx(0) k2 /N . Here the expectations h•i are taken over all random initialization of weights and biases for all layers l, as N → ∞ (large width limit). Note that in our definition, the index 1 does not matter by Axiom 3.1. Definition 3.4. Fix two inputs x(0) and x(0)0 . We write •0 to denote a quantity • with respect to the 0 (l) (l) (l) (l) input x(0) . Then define the correlation quantities γ (l) := hh1 h1 0 i and λ(l) := hx1 x1 0 i for l > 0 and γ (0) = x(0) · x(0)0 /N , where the expectations h•i are taken over all random initialization of weights and biases for all layers l, as N → ∞ (large width limit). Again, here the index 1 1 does not matter by Axiom 3.1. By metric expressivity, we mean s(l) := 2N hkx(l) − x(l)0 k2 i = 1 1 (l) 2 (l)0 2 (l) (l)0 (l) (l)0 (l) k i − 2hx · x i) = 2 (p + p ) − γ . Additionally, define the cosine 2N (hkx k i + hkx p p distance quantities e(l) := γ (l) / p(l) p(l)0 and c(l) := λ(l) / q(l) q(l)0 , and we will also call e(l) angular expressivity. In this paper, for the ease of presentation, we assume p(0) = p(0)0 . Then, as we will see, p(l) = p(l)0 , q(l) = q(l)0 for all l, and as a result, e(l) = γ (l) /p(l) and s(l) = p(l) − γ (l) = (1 − e(l) )p(l) . (L) Definition 3.5. Fix an input x(0) and a gradient vector (∂E/∂xi )i of some loss function E with (l) (l) respect to the last layer x(L) . Then define the gradient quantities χ(l) := h(∂E/∂x1 )2 i, χ• := (l) (l) (l) h(∂E/∂•1 )2 i for • = a, b, and χ• := h(∂E/∂•11 )2 i for • = w, v. Here the expectations are taken with Axiom 3.2 in mind, over both random initialization of forward and backward weights and biases, as N → ∞ (large width limit). Again, the index 1 or 11 does not matter by Axiom 3.1. Asymptotic notations. The expressions f = O(g) ⇐⇒ g = Ω(f ) have their typical meanings, and f = Θ(g) iff f = O(g), g = O(f ). We take f (x) = Õ(g(x)) ⇐⇒ g(x) = Ω̃(f (x)) to mean f (x) = O(g logk x) for some k ∈ Z (this is slightly different from the standard usage of Õ), and f = Θ̃(g) ⇐⇒ f = Õ(g) & g = Õ(f ). We introduce a new notation: f = Θ̌(g) if f (x) = O(g(x) · x ) and f (x) = Ω(g(x) · x− ), as x → ∞, for any  > 0. All asymptotic notations are sign-less, i.e. can indicate either positive or negative quantities, unless stated otherwise. 4 Overview The primary reason we may say anything about the average behavior of any of the above quantities is the central limit theorem: every time the activations of the previous layer pass through an affine layer whose weights are sampled i.i.d., the output is a sum of a large number of random variables, and thus follows approximately Gaussian distributions. The mean and variance of these distributions can be computed by keeping track of the mean and variances of the activations in the previous layer. In what follows, we use this technique to derive recurrence equations governing p, q, γ, λ, χ for different architectures and different activation functions. We use these equations to investigate the 4 dynamics of e and s, the key quantities in the forward pass, and the dynamics of χ, the key quantity in the backward pass. The cosine distance e in some sense measures the angular geometry of two vectors. If e = 1, then the vectors are parallel; if e = 0, then they are orthogonal. Just as in [9] and [11], we will show that in all of the architectures and activations we consider in this paper, e(l) converges to a fixed point e∗ as l → ∞ 1 . Thus, on the average, as vectors propagate through network, the geometry of the original input space, for example, linear separability, is “forgotten” by residual networks as well as by vanilla networks. But we will prove and verify experimentally that, while Poole et al. [9] and [11] showed that the convergence rate to e∗ is exponential in a vanilla network, the convergence rate is rather only polynomial in residual networks, for tanh and α-ReLU (Defn 5.2) nonlinearities; see Thm B.5, Thm B.11, Thm B.17, and Thm B.18. This slow convergence preserves geometric information in the input space, and allows a typical residual network to “hover over the edge of chaos”: Even when the cosine distance e(l) converges to 0, corresponding to “chaos”, (resp. 1, corresponding to “stability”), for the number of layers usually seen in practice, e(l) will reside well away from 0 (resp. 1). Similarly, the quantity s measures the metric geometry of two vectors. The evolution of s(l) with l tells us the ability of the average network to separate two input points in terms of Euclidean distance. Again, for tanh and α-ReLU (α < 1) nonlinearities, s varies only polynomially with l. On the other hand, χ(l) measures the size of gradient at layer l, and through it we track the dynamics of gradient backpropagation, be it explosion or vanishing. In contrast to vanilla tanh networks, which can experience both of these two phenomenon depending on the initialization variances, typical residual networks cannot have vanishing gradient, in the sense of vanishing χ(l) as l → 1; see Thm B.5 and Thm B.12. Furthermore, while vanilla tanh networks exhibit exponentially vanishing or exploding gradients, all of the activation/architecture pairings considered here, except the full residual network with ReLU, have subexponential gradient dynamics. While tanh residual networks √ (0) (l) (reduced or full) has χ ≈ exp(Θ( l))χ (Thm B.13), α-ReLU residual networks for α < 1 have χ(0) ≈ poly(l)χ(l) (Thm B.20). Instead of ∂E/∂xi , we may also consider the size of gradients of actual trainable parameters. For tanh and α-ReLU with α < 1, they are still subexponential and polynomial (Thm B.21). On the other hand, while χ(0) = exp(Θ(l))χ(l) for a ReLU resnet, its weight gradients have size independent of layer, within O(1) (Thm B.21)! This is the only instance in this paper of gradient norm being completely preserved across layers. The above overviews the theoretical portion of this paper. Through experiments, we discover that we can very accurately predict whether one random initialization leads to better performance than another on the test set, after training, by leveraging this theory we build. Residual networks of different nonlinearities have different controlling quantities: for resnets with tanh, the optimal initialization is obtained by controlling the gradient explosion χ(0) /χ(L) ; whereas for ReLU and α-ReLU, the optimal initialization is obtained by maximizing s without running into numerical issues (with floating point computation). See Section 6 for details. Over the course of our investigation of α-ReLU, we derived several new identities involving the associated kernel functions, first defined in [2], which relate them to the zeroth Bessel functions (Lemmas C.31 to C.34). 5 Theoretical Results In what follows in the main text, we assume σ• > 0 for all • = w, v, b, a; in the appendix, the formal statement of each main theorem will contain results for other cases. We are interested in the two major categories of nonlinearities used today: tanh-like and rectified units. We make the following formal definitions as a foundation for further consideration. Definition 5.1. We say a function φ is tanh-like if φ is antisymmetric (φ(−x) = −φ(x)), |φ(x)| ≤ 1 for all x, φ(x) ≥ 0, ∀x ≥ 0, and φ(x) monotonically increases to 1 as x → ∞. Definition 5.2. Define the α-ReLU ψα (x) = xα if x > 0 and 0 otherwise. 2 By applying the central limit theorem as described in the last section, we derive a set of recurrences for different activation/architecture pairs, shown in Table 1 (see appendix for proofs). They leverage certain integral transforms 3 as in the following 5 Table 1: Main Recurrences Antisymmetric/RRN Any/FRN 2 q = σw p + σb2 p = Vφ(q) + p 2 q = σw p + σb2 p = σv2 Vφ(q) + σa2 + p 2 λ = σw γ + σb2 γ = Wφ(q, λ) + γ 2 λ = σw γ + σb2 γ = σv2 Wφ(q, λ) + σa2 + γ 2 χ = (σw Vφ̇(q) + 1)χ Theorems B.2, B.3, B.5 2 χ = (σv2 σw Vφ̇(q) + 1)χ Theorems B.8, B.10, B.12 Table 2: Summary of Main Dynamics Results. Note that while χ(l) is exponential for ReLU/FRN, the gradients with respect to weight parameters have norms (χw and χv ) constant in l (Thm B.21). Also, the χ(l) entry for α-ReLU is for α ∈ (3/4, 1) only p(l) s(l) e(l) − e∗ χ(l) Tanh/RRN Tanh/FRN ReLU/FRN α-ReLU/FRN, α < 1 Θ(l), B.2 Θ(l), B.4 2 Θ̌(l π −1 ), B.4 √ exp(Θ( l)), B.6 Θ(l), B.9 Θ(l), B.11 poly(l), B.11 √ exp(Θ( l)), B.12 exp(Θ(l)), B.16 exp(Θ(l)), B.17 Θ(l−2 ), B.17 Θ(l1/(1−α) ), Θ(l1/(1−α) ), poly(l), exp(Θ(l)), B.20 Θ(l (1−α)(2α−1) ), B.20 B.16 B.18 B.18 α2 Definition 5.3. Define the transforms V  and Wby Vφ(q) := E[φ(z)2 : z ∼ N (0, q)] and ρ ν Wφ(ρ, ν) := E[φ(z)φ(z 0 ) : (z, z 0 ) ∼ N (0, )]. ν ρ These recurrences are able to track the corresponding quantities in practice very well. For example, Fig. 1 compares theory vs experiments for the tanh/FRN pair. The agreement is very good for tanh/RRN (not shown, but similar to the case of tanh/FRN with σv = 1 and σa = 0) and αReLU/FRN as well (see Fig. A.1). As mentioned in previous sections, we seek to characterize the long term/high depth behavior of all of the quantities defined in Section 2. To do so, we solve for the asymptotics of the recurrences in Table 1, where φ is instantiated with tanh or α-ReLU. Our main dynamics results are summarized in Table 2. 5.1 Tanh Forward dynamics. When φ = tanh, p(l) and q(l) increase as Θ(l) in either RRN or FRN (Thm B.2), as one might expect by observing that V tanh(q) → 1 as q → ∞ so that, for example in the RRN case, the recurrence p = V tanh(q) + p becomes p = 1 + p. This is confirmed graphically by the black lines of the leftmost chart of Fig. 1. We carefully verify that this intuition is correct in its proof in the appendix, and find that in fact p(l) ∼ l in the RRN case and p(l) ∼ (σv2 + σa2 )l in the FRN case. What about γ (l) ? The middle chart of Fig. 1 shows that over time, e(l) = γ (l) /p(l) contracts toward the center of the interval [0, 1], but from the looks of it, it is not clear whether there is a stable fixed point e∗ of e or not. We prove that, in fact, all trajectories of e not starting at 1 do converge to a single fixed point, but only at a polynomial rate, in both the RRN and FRN cases (Thm B.2 and Thm B.10); we can even explicitly compute the fixed point and the rate of convergence: For FRN, there is a unique stable fixed point e∗ < 1 determined by the equation e∗ = 1 2 [σ 2 arcsin (e∗ ) + σa2 ], σv2 + σa2 v π ∗ and |e∗ − e(l) | decreases like l−δ , where δ ∗ := 1 − 1 2 σv2 p . π 1 − (e∗ )2 σv2 + σa2 6 Figure 1: Our equations predict the relevant quantities very well in practice. These plots make the comparison between prediction and measurements for the full resnet with tanh activation, with σv2 = 1.5, σa2 = .5, 2 σw = 1.69, σb2 = .49. Left-to-right: (a) p(l) and γ (l) against layer l for 200 layers. (b) e(l) = γ (l) /p(l) against l for 200 layers. Both (a) and (b) trace out curves for different initial conditions. (c) Different gradient quantities against l for 50 layers. From left to right the layer number l decreases, following the direction of backpropagation. Notice that the gradient increases in norm as l → 1. All three figures exhibit smooth curves, which are theoretical estimates, and irregular curves with shades around them, which indicate empirical means and standard deviations (both of which taken in regular scale, not log scale). (a) and (b) are made with 20 runs of resnets of width 1000. (c) is made with 25 runs of resnets of width 250. 1.0 0.8 0.6 0.4 1- 2 π 0.2 * δ* 0.0 0 1 2 3 4 σa /σv ∗ Figure 2: Left-to-right: (a) Plots of e∗ and δ ∗ against σa /σv . (b) In log-log scale: the dashed line is l−δ −1 , and the colored lines are e(l) − e(l−1) for different initial conditions e(0) . That they √become parallel at about ∗ l = 400 on verifies that e(l) = Θ(l−δ ). 4 (c) In log-log scale: The dashed line is A l (A given in Thm B.13), and the colored lines are log(•(1) /•(l) ) for • = χ, χb , χw . That they all converge together starting around l = 1000 indicates that the approximation in Thm B.13 is very good for large l. Since e∗ < 1, s = (1 − e)p = Θ(p) = Θ(l). The case of RRN can be viewed as a special case of the above, setting σv2 = 1 and σa2 = 0, which yields e∗ = 0 and δ ∗ = 1 − π2 . We observe that both e∗ and δ ∗ only depend on the ratio ρ := σa /σv , so in Fig. 2 we graph these two quantities as a function of ρ. e∗ and δ ∗ both increase with ρ and asymptotically approach 1 and 1/2 respectively from below. When ρ = σa = 0, e∗ = 0 and δ ∗ = 1 − π2 . Thus the rate of convergence at its slowest for tanh/FRN is δ ∗ = 1 − π2 ≈ 0.36338, where asymptotically the network tends toward a chaotic regime e∗ = 0, corresponding to a large weight variance and a small bias variance; it at its fastest is δ ∗ = 1/2, where asymptotically the network tends toward a stable regime e∗ = 1, corresponding to ∗ a large bias variance and small weight variance. We verify δ ∗ by comparing e(l) − e(l−1) to l−δ −1 ∗ ∗ in log-log scale. If e(l) = Θ(l−δ ), then e(l) − e(l−1) = Θ(l−δ −1 ) and should obtain the same ∗ slope as l−δ −1 as l → ∞. The middle figure of Fig. 2 ascertains that this is indeed the case, starting around layer number 400. Backward dynamics. Finally, we show that the gradient is approximated by √ √ χ(m) = exp(A( l − m) + O(log l − log m))χ(l) (?) q q σ2 σ where A = 43 π2 σw in the RRN case and A = 43 π2 √ v2 w 2 in the FRN case (Thm B.6 and σv +σa Thm B.13). The rightmost plot of Fig. 2 verifies that indeed, for large l ≥ 1000, this is a very good approximation. This demonstrates that the mean field assumption of independent backpropagation weights is very practical and convenient even for residual networks. 7 Note that in the FRN case, the constant A can be decomposed into A = σa2 /σv2 )−1/2 . 4 3 q 2 π · σv · σw · (1 + ∗ Consider the ratio ρ := σa /σv . If ρ  1, then e ≈ 1 (Fig. C.17), meaning that the typical network essentially computes a constant function, and thus unexpressive; at the same time, large ρ makes A small, and thus ameliorating the gradient explosion problem, making the network more trainable. On the other hand, if ρ  1, then e∗ ≈ 0 (Fig. C.17), the typical network can tease out the finest differences between any two input vectors, and a final linear layer on top of such a network should be able to express a wide variety of functions [9]; at the same time, small ρ increases A, worsening the gradient explosion problem, making the network less trainable. This is the same expressivity-trainability tradeoff discussed in [11]. 5.2 α-ReLU Forward dynamics. As with the tanh case, to deduce the asymptotic behavior of random α-ReLU resnets, we need to understand the transforms Vψα and Wψα . Fortunately, Vψα has a closed form, and Wψα has been studied before [2]. In particular, if α > − 12 , then Vψα (q) = cα qα , where cα is a constant with a closed form given by Lemma B.15. In addition, by [2], we know that Wψα (q, cq) = Vψα (q)Jα (c) for Jα given in Appendix C.7.1. Fig. C.17 shows a comparison of Jα for different αs along with the identity function. 2 Substituting in cα qα for Vψα , we get a difference equation p − p = σv2 cα (σw p + σb2 )α + σa2 governing the evolution of p. This should be reminiscent of the differential equation Ṗ (l) = CP (l)α , which has solution ∝ l1/(1−α) for α < 1, and ∝ exp(Cl) when α = 1. And indeed, the solutions p(l) to these difference equations behave asymptotically exactly like so (Thm B.16). Thus ReLU behaves 2 very explosively compared to α-ReLU with α < 1. In fact, in simulations, for σw = 1.69 and 2 σv = 1.5, the ReLU resnets overflows into infs after around 100 layers, while there’s no problem from any other kind of networks we consider. Regardless, α-ReLU for all α massages e(l) toward a fixed point e∗ that depends on α. When φ = ψ1 , the standard ReLU, e(l) converges to 1 asymptotically as Cl−2 for an explicit constant C depending on σv and σw only (Thm B.17), so that s = (1 − e)p = Θ(l−2 exp(Θ(l))) = exp(Θ(l)). When φ = ψα for α < 1, then e(l) converges to the nonunit fixed point e∗ of Jα at a rate of Θ̌(l−µ ), where µ = (1 − J̇α (e∗ ))/(1 − α) is independent of the variances (Thm B.18), so that s = Θ(p). These rates are verified in Fig. A.2. Backward dynamics. Finally, we have also characterized the rate of gradient growth for any α ∈ ( 34 , 1].5 In the case of α = 1, the dynamics of χ is exponential, the same as that of p, 2 + 1. For α ∈ ( 34 , 1), the dynamics is polynomial, but χ(l−m) = χ(l) B m where B = 12 σv2 σw with different exponent in general from that of the forward pass: χ(l−m) = Θ(1)χ(l) (l/(l − m))R α2 for R = (1−α)(2α−1) , where the constants in Θ(1) do not depend on l or m. This exponent R is 3 minimized on α ∈ [ 4 , 1) at α = 3/4, where R = 9/2 (but on α ∈ ( 12 , 1) it is minimized at α = 2/3, where R = 4); see Fig. B.8. These exponents are verified empirically in Fig. A.2. Looking only at χ and the gradients against the biases, it seems that ReLU suffers from a dramatic case of exploding gradients. But in fact, because χ gains a factor of B moving backwards while p (l−m) (l−m) loses a factor of B, the gradient norm χw (and similarly for χv ) is independent of how far, m, the gradient has been propagated (Thm B.21) — this is certainly the best gradient preservation among all of the models considered in this paper. Thus strangely, random ReLU FRN exhibits both the best (constant for v and w) and the worse (exponential for a and b) gradient dynamics. This begs the question, then, is this a better deal than other α-ReLU for which for any learnable parameter we have at most a polynomial blowup with depth in its gradient? Our experiments (discussed below) show that α-ReLU is useful to the extent that smaller α avoids numerical issues with exponentiating forward and backward dynamics, but the best performance is given by the largest α that avoids them (Fig. 3(c, d)); in fact, the metric expressivity s, determines performance, not gradient explosion (see α-ReLU experiments). 8 250 250 200 200 150 150 100 100 50 50 0.5 1.0 σw2 1.5 2.0 200 150 L 300 L L 300 100 50 0.5 1.0 σw2 1.5 2.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 σa2 /σv2 300 1.0 2.0 3.0 4.0 5.0 200 L 100 50 40 30 20 10 0.05 0.10 0.15 0.25 0.50 1.00 1.50 2 σw 2 Figure 3: From left to right, top to bottom: (a) and (b): σw , L, and test set accuracy of a grid of tanh reduced (left) and full (right) resnets trained on MNIST. Color indicates performance, with ligher colors indicating higher accuracy on test set. Other than the values on the axes, we have fixed σb2 = σa2 = 12 and σv2 = 1. The 2 white dotted lines are given by σw L = C, where C = 170 on the left and C = 145 on the right. We see that both dotted lines accurately predict the largest optimal σw for each depth L. (c) Varying the ratio σa2 /σv2 p 2 2 while fixing σv / 1 + σa /σv , and thus fixing A, the leading constant of log χ(0) /χ(L) . (d) in log-log scale: 2 Heatmap gives the test accuracies of ReLU FRN for varying σw and L. Curves give level sets for the log (L) (0) (L) (0) (0) (L) 2 ratios log s /s ≈ log p /p ≈ log χ /χ = L log(1 + σv2 σw /2). (e) Red heatmap shows the test accuracies of a grid of α-ReLU FRN with varying α and L as shown, but with all σ• s fixed. The white dashed α2 curve gives a typical contour line of LR = const, where R = (1−α)(2α−1) . The yellow-to-blue curves form a set of level curves for s(l) = p(l) − γ (l) = const, with yellow curves corresponding to higher levels. 6 Experimental Results Our experiments show a dichotomy of what matters in initialization: for tanh resnets, quality of an initialization is determined by how much gradient explosion there is (measured by χ(0) /χ(L) ); for (α-)ReLU resnets, it is determined by how expressive the random network is (measured by the metric expressivity s(L) ). We hypothesize this is because in tanh √ resnets, the gradient dynamics is much more explosive than the expressivity dynamics (exp(Θ( l)) vs Θ(l)), whereas for ReLU it’s somewhat the opposite (χw , χv = Θ(1) vs s = exp(Θ(l))). Tanh, vary σw . We train a grid of reduced and full tanh resnets on MNIST, varying the variance 2 σw and the number of layers (for FRN we fix σv = 1). The results are indicated in Fig. 3(a, b). We see that in either model, deeper resnets favor much smaller σw than shallower ones. The white dotted lines in Fig. 3(a, b) confirm our√theory: according to Eq. (?), for the same gradient ratio R = χ(0) /χ(L) , we want log R ≈ σw L. Indeed, the white dotted lines in Fig. 3(a, b) trace out such a level curve and it remarkably pinpoints the largest σw that gives the optimal test set accuracy for each depth L. Why isn’t the best initialization given by R = 1 ⇐⇒ σw = 0? We believe that when L and/or σw is small, gradient dynamics no longer dominates the initialization quality because it has “less room to explode,” and expressivity issues start to dampen the test time performance. Tanh, vary σa2 /σv2 . As suggested in the analysis of Eq. (?), the ratio ρ2 = σa2 /σv2 determines the fixed point e∗ and its convergence rate by itself while also contributes to the rate of gradient explosion in tanh p FRN. We seek to isolate its effect on forward dynamics by varying σv with ρ such that σv / 1 + ρ2 is kept constant, so that the leading term of the log gradient ratio is kept approximately equal for each L and ρ. Fig. 3(c) shows the test accuracies of a grid of tanh FRN initialized with such an ensemble of σ• s. What stands out the most is that performance is maximized essentially 9 around a fixed value of L regardless of ρ, which shows that indeed gradient dynamics determines the initialization quality in tanh resnets. There is also a minor increase in performance with increasing ρ regardless of L; this is counterintuitive as increasing ρ means “decreasing expressivity.” It is currently not clear what accounts for this effect. 2 ∈ [0, 1.5] while fixing ReLU, vary σw We train a grid of ReLU FRN on MNIST, varying σw 1 2 2 2 σv = 1, σa = σb = 2 . The resulting test set accuracies are shown in Fig. 3(d). The dark upper region signifies failure of training caused by numerical issues with exploding activation and gradient norms: This corresponds to the region where p(L) , which is a measure of the mean magnitude of an neuronal activation in layer L, becomes too big. We see that the best test accuracies are given by depths just below where these numerical issues occur. However, if we were to predict that the optimal init is the one minimizing χ(0) /χ(L) ≥ 1, then we would be wrong — in fact it is exactly the opposite. In this case, the dynamics of s(l) , p(l) , and χ(0) /χ(l) are approximately the same (all exp(Θ(l)) with the same hidden constants), and optimal performance corresponds to the highest s(L) , p(L) , and χ(0) /χ(L) without running into infs. α-ReLU, vary α. We similarly trained a grid of α-ReLU FRN on MNIST, varying only α and the depth, fixing all σ• . Fig. 3(e) shows their test accuracies. We see similar behavior to ReLU, where when the net is too deep, numerical issues doom the training (black upper right corner), but the best performance is given by L just below where this problem occurs. In this case, if we were to predict optimality based on minimizing gradient explosion, we would be again wrong, and furthermore, the contour plot of χ(0) /χ(L) (white dashed line) now gives no information at all on the test set accuracy. In contrast, the contours for s(l) succeeds remarkably well at this prediction (yellow/green lines).6 By interpolation, this suggests that indeed in the ReLU case, it is expressivity, not trainability, which determines performance at test time. In all of our experiments, we did not find e dynamics to be predictive of neural network performance. 7 Conclusion In this paper, we have extended the mean field formalism developed by [9, 10, 11] to residual networks, a class of models closer to practice than classical feedforward neural networks as were investigated earlier. We proved and verified that in both the forward and backward passes, most of the residual networks discussed here do not collapse their input space geometry or the gradient information exponentially. We found our theory incredibly predictive of test time performance despite saying nothing about the dynamics of training. In addition, we overwhelmingly find, through theory and experiments, that an optimal initialization scheme must take into account the depth of the residual network. The reason that Xavier [4] or He [5] scheme are not the best for residual networks is in fact not that their statistical assumptions are fragile — theirs are similar to our mean field theoretic assumptions, and they hold up in experiments for large width — but rather that their structural assumptions on the network break very badly on residual nets. Open Problems. Our work thus have shown that optimality of initialization schemes can be very unstable with respect to architecture. We hope this work will form a foundation toward a mathematically grounded initialization scheme for state-of-the-art architectures like the original He et al. residual network. To do so, there are still two major components left to study out of the following three: 1. Residual/skip connection 2. Batchnorm 3. Convolutional layers. Recurrent architectures and attention mechanisms are also still mostly unexplored in terms of mean field theory. Furthermore, many theoretical questions still yet to be resolved; the most important with regard to mean field theory is: why can we make Axioms 3.1 and 3.2 and still be able to make accurate predictions? We hope to make progress on these problems in the future and encourage readers to take part in this effort. 10 Acknowledgments Thanks to Jeffrey Ling for early exploration experiments and help with the initial draft. Thanks to Felix Wong for offering his wisdom and experience working in statistical physics. References [1] Nils Bertschinger and Thomas Natschlger. Real-time computation at the edge of chaos in recurrent neural networks. Neural Computation, 16(7):1413–1436, July 2004. ISSN 0899-7667. doi: 10.1162/089976604323057443. [2] Youngmin Cho and Lawrence K. Saul. Kernel methods for deep learning. In Advances in neural information processing systems, pages 342–350, 2009. URL http://papers.nips. cc/paper/3628-kernel-methods-for-deep-learning. [3] Amit Daniely, Roy Frostig, and Yoram Singer. Toward Deeper Understanding of Neural Networks: The Power of Initialization and a Dual View on Expressivity. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems 29, pages 2253– 2261. Curran Associates, Inc., 2016. URL http://papers.nips.cc/paper/ 6427-toward-deeper-understanding-of-neural-networks-the-power-of-initialization-and-a-dualpdf. [4] Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In PMLR, pages 249–256, March 2010. URL http://proceedings.mlr. press/v9/glorot10a.html. Delving deep into [5] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. rectifiers: Surpassing human-level performance on imagenet classification. In Proceedings of the IEEE international conference on computer vision, pages 1026– 1034, 2015. URL http://www.cv-foundation.org/openaccess/content_iccv_2015/ html/He_Delving_Deep_into_ICCV_2015_paper.html. [6] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep Residual Learning for Image Recognition. pages 770–778, 2016. URL https://www.cv-foundation.org/ openaccess/content_cvpr_2016/html/He_Deep_Residual_Learning_CVPR_2016_ paper.html. [7] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In European Conference on Computer Vision, pages 630–645. Springer, 2016. [8] Timothy P. Lillicrap, Daniel Cownden, Douglas B. Tweed, and Colin J. Akerman. Random synaptic feedback weights support error backpropagation for deep learning. Nature Communications, 7:ncomms13276, November 2016. ISSN 2041-1723. doi: 10.1038/ncomms13276. URL https://www.nature.com/articles/ncomms13276. [9] Ben Poole, Subhaneil Lahiri, Maithreyi Raghu, Jascha Sohl-Dickstein, and Surya Ganguli. Exponential expressivity in deep neural networks through transient chaos. In Advances In Neural Information Processing Systems, pages 3360–3368, 2016. [10] Maithra Raghu, Ben Poole, Jon Kleinberg, Surya Ganguli, and Jascha Sohl-Dickstein. On the expressive power of deep neural networks. arXiv:1606.05336 [cs, stat], June 2016. URL http://arxiv.org/abs/1606.05336. arXiv: 1606.05336. [11] Samuel S. Schoenholz, Justin Gilmer, Surya Ganguli, and Jascha Sohl-Dickstein. Deep Information Propagation. 2017. URL https://openreview.net/pdf?id=H1W1UN9gg. 11 Notes 1 Under simplified conditions, Daniely et al. [3] showed that there exists a fixed point for any “well-behaved” activation function in a feedforward net. However, this result does not apply to architectures with residual connections. 2 Note that in practice, to avoid the diverging gradient ψ̇α (x) → ∞ as x → 0, we can use a tempered version Ψα (x) of α-ReLU, defined by Ψα (x) = (x + )α − α on x > 0 and 0 otherwise, for some small  > 0. The conclusions of this paper on ψα should hold similarly for Ψα as well. 3 Daniely et al. [3] called the version of Wφ with fixed ρ = 1 the “dual function” of φ. ∗ A more natural visualization is to graph e(l) − e∗ versus l−δ , but because of floating point precision, (l) e − e∗ doesn’t converge to 0, but a small number close to 0, so that the log-log plot wouldn’t look like what is expected. 4 5 Our derivations actually apply to all α ∈ ( 21 , 1], where at α = 12 , the expected norm of the gradient diverges within our mean field formalism. However, at α ≤ 34 , the variance of the gradient already diverges (Thm B.19), so we cannot expect the empirical values to agree with our theoretical predictions. But in fact, empirically our theoretical predictions seem to form an upper bound on the gradient norms (see Fig. A.1). 6 the contour for p(l) is similar, but its slopes are slightly off from the heatmap contours. 12 Appendices A Additional Figures In figures appearing in the appendix, k means χ (due to legacy reasons). 1022 1017 ° (0) = 0: 03 1.2 ° (0) = 0: 70 1018 1015 ° (0) = 1: 37 1016 ° (0) 1.0 = 2: 03 1013 ° (0) = 2: 70 1014 ° (0) = 3: 37 1012 α=1 1019 1.4 p (0) = 3: 40 1020 1011 0.8 ℸ (l) 109 1010 0.6 107 108 e (0) = 0: 01 0.4 106 e (0) = 0: 40 104 ∂E=∂bi ∂E=∂wij 105 e (0) = 0: 21 103 e (0) = 0: 60 0.2 e (0) = 0: 79 102 101 e (0) = 0: 99 100 10-1 0.0 10 20 30 40 50 10 20 layer l 3.0 30 40 50 40 30 layer l 1e13 20 10 0 layer l 108 1.4 p (0) = 3: 40 107 ° (0) = 0: 03 2.5 1.2 ° (0) = 0: 70 106 ° (0) = 1: 37 1.0 ° (0) = 2: 03 2.0 ° (0) = 3: 37 α = .9 105 ° (0) = 2: 70 104 0.8 103 1.5 0.6 102 e (0) = 0: 01 1.0 0.4 e (0) = 0: 21 e (0) = 0: 40 0.5 e (0) = 0: 60 0.2 e (0) = 0: 79 101 100 ℸ (l) ∂E=∂bi 10-1 ∂E=∂wij e (0) = 0: 99 0.0 10-2 0.0 0 50 100 150 0 50 layer l 1.2 100 150 40 30 layer l 1e8 20 10 0 20 10 0 20 10 0 20 10 0 20 10 0 20 10 0 layer l 105 1.2 p (0) = 3: 40 ° (0) = 0: 03 1.0 104 1.0 ° (0) = 0: 70 ° (0) = 1: 37 103 ° (0) = 2: 03 0.8 0.8 ° (0) = 2: 70 102 ° (0) = 3: 37 α = .8 0.6 0.6 0.4 0.4 101 e (0) = 0: 01 e (0) = 0: 21 100 e (0) = 0: 40 0.2 0.2 e (0) = 0: 60 e (0) = 0: 79 ℸ (l) 10-1 ∂E=∂bi ∂E=∂wij e (0) = 0: 99 0.0 10-2 0.0 0 50 100 150 0 50 layer l 100 150 40 700000 layer l 105 1.2 ℸ (l) p (0) = 3: 40 ° (0) = 0: 03 600000 30 layer l 104 1.0 ° (0) = 0: 70 ∂E=∂bi ∂E=∂wij ° (0) = 1: 37 500000 ° (0) = 2: 03 400000 ° (0) = 3: 37 103 0.8 ° (0) = 2: 70 α = .7 102 0.6 101 300000 0.4 e (0) = 0: 01 200000 e (0) = 0: 21 100 e (0) = 0: 40 0.2 100000 e (0) = 0: 60 10-1 e (0) = 0: 79 e (0) = 0: 99 0 10-2 0.0 0 50 100 150 0 50 layer l 100 150 40 layer l 105 1.2 ℸ (l) p (0) = 3: 40 ° (0) = 0: 03 35000 104 1.0 ° (0) = 0: 70 30000 ° (0) = 1: 37 25000 ° (0) = 2: 70 30 layer l 40000 ∂E=∂bi ∂E=∂wij 103 ° (0) = 2: 03 0.8 102 ° (0) = 3: 37 α = .6 20000 101 0.6 100 15000 0.4 e (0) = 0: 01 e (0) = 0: 21 10000 e (0) = 0: 40 0.2 e (0) = 0: 60 5000 e (0) = 0: 79 e 0 (0) 50 100 150 10-2 = 0: 99 10-3 0.0 0 10-1 0 50 layer l 100 150 40 30 layer l 16000 layer l 106 1.2 p (0) = 3: 40 105 ° (0) = 0: 03 14000 1.0 ° (0) = 0: 70 12000 ° (0) = 1: 37 10000 ° (0) = 2: 70 104 ° (0) = 2: 03 103 0.8 ° (0) = 3: 37 α = .55 102 8000 0.6 101 6000 0.4 e (0) = 0: 01 100 e (0) = 0: 21 4000 e 0.2 (0) = 0: 40 10-1 ℸ (l) e (0) = 0: 60 2000 e (0) = 0: 79 10-2 ∂E=∂bi ∂E=∂wij e (0) = 0: 99 0 10-3 0.0 0 50 100 150 0 50 layer l 100 150 40 9000 layer l 1017 1.2 p (0) = 3: 40 8000 1015 ° (0) = 0: 03 1.0 ° (0) = 0: 70 7000 ° (0) ℸ (l) ∂E=∂bi ∂E=∂wij 1011 0.8 ° (0) = 2: 70 5000 α = .51 1013 ° (0) = 1: 37 ° (0) = 2: 03 6000 30 layer l 109 = 3: 37 107 0.6 4000 105 3000 0.4 e (0) = 0: 01 e (0) = 0: 21 2000 e (0) = 0: 40 0.2 103 101 e (0) = 0: 60 1000 e (0) = 0: 79 10-1 e (0) = 0: 99 0 10-3 0.0 0 50 100 layer l 150 0 50 100 layer l 150 40 30 layer l Figure A.1: Empirical vs theoretical dynamics for p(l) , e(l) , and different gradient quantities for α-ReLU, with format similar to Fig. 1. We refer to each figure on each row from left to right as (a), (b), and (c). Note that in the α = 1 case, figure (a) (p(l) and γ (l) for different initial values) has log scale y-axis and (a) and (b) have x-axis ranging from 1 to 50, while for other α, (a) has normal y-axis and (a) and (b) have x-axis ranging from 1 to 200. We do so because the norm of the activation vector in a typical ReLU resnet blows up into NaN at around layer 90, while this is not a problem for α < 1. Our theoretical predictions track the average of empirical values closely for forward quantities p(l) , γ (l) , and e(l) for all α, but variance is extremely large for e(l) at α = 1; it also predicts the average gradient norm accurately for α = 1 to α = .7 (despite the fact that we should not expect so for α ≤ .75 due to exploding variance (Thm B.19)), although variance is large for α = 1 at earlier layers (i.e. later layers w.r.t backpropagation). However it consistently and significantly overestimates the average gradient norm for α = .6 to α = .5, where the variance is so large that one standard deviation below the 2 mean results in negative values. All plots are made with parameters σv2 = 1.5, σa2 = .5, σw = 1.69, σb2 = .49; only α is varied. All figures exhibit smooth curves, which are theoretical estimates, and irregular curves with shades around them, which indicate empirical means and standard deviations (both of which taken in regular scale, not log scale). For each α, figures (a) and (b) are made with 20 runs of resnets of width 1000. (c) is made with 25 runs of resnets of width 250. 13 100 1033 e (0) = 0: 01 1029 e (0) = 0: 21 10-1 e (0) = 0: 40 e (0) = 0: 60 10-2 e (0) = 0: 79 e (0) = 0: 99 10-3 α = .9 ℸ (0) =ℸ (1) (0) (l) Âb =Âb 1025 Âw(0) =Âw(l) 1021 lR lR+1 1017 l ¡¹ l R ¡ ®=(1 ¡ ®) 1013 10-4 109 10-5 105 101 10-6 10-3 10-7 10-7 10-8 100 101 102 104 103 10-11 100 101 layer l 103 104 103 104 103 104 103 104 103 104 103 104 1020 e (0) = 0: 01 1018 e (0) = 0: 21 10-1 10-2 e (0) = 0: 40 1016 e (0) = 0: 60 1014 e (0) = 0: 79 1012 e (0) = 0: 99 10-3 α = .8 102 layer l 100 1010 l ¡¹ ℸ =ℸ (0) (1) (0) (l) Âb =Âb Âw(0) =Âw(l) lR lR+1 l R ¡ ®=(1 ¡ ®) 108 10-4 106 104 10-5 102 10-6 100 10-2 10-7 10-4 10-8 100 101 102 104 103 10-6 100 101 layer l e (0) = 0: 01 10-1 e (0) = 0: 21 10-2 e (0) = 0: 60 10-3 e (0) = 0: 99 1015 e (0) = 0: 40 e (0) = 0: 79 ℸ (0) =ℸ (1) (0) (l) Âb =Âb 1013 Âw(0) =Âw(l) 1011 lR lR+1 109 l ¡¹ 10-4 α = .7 102 layer l 1017 100 l R ¡ ®=(1 ¡ ®) 107 105 10-5 103 10-6 101 10-7 10-1 10-8 10-9 100 10-3 101 102 104 103 10-5 100 101 layer l 102 layer l 100 e (0) = 0: 01 e (0) = 0: 21 10-1 e (0) = 0: 40 e (0) = 0: 79 α = .6 l ℸ (0) =ℸ (1) 1015 Âb =Âb 1011 e (0) = 0: 99 10-3 1017 1013 e (0) = 0: 60 10-2 109 ¡¹ (0) (l) Âw(0) =Âw(l) lR lR+1 l R ¡ ®=(1 ¡ ®) 107 10-4 105 10-5 103 101 10-6 10-1 10-7 10-8 100 10-3 101 102 104 103 10-5 100 101 layer l 102 layer l 100 e (0) = 0: 01 1023 e (0) = 0: 21 10-1 e (0) = 0: 60 e (0) = 0: 79 e (0) = 0: 99 (l) Âb =Âb Âw(0) =Âw(l) 1017 lR lR+1 1014 l R ¡ ®=(1 ¡ ®) l ¡¹ 10-3 α = .55 ℸ (0) =ℸ (1) (0) 1020 e (0) = 0: 40 10-2 1011 108 10-4 105 10-5 102 10-1 10-6 10-4 10-7 100 101 102 104 103 10-7 100 101 layer l 102 layer l 100 e (0) = 0: 01 e (0) = 0: 21 10-1 e (0) = 0: 40 10-2 α = .51 e (0) = 0: 60 e (0) = 0: 79 e (0) = 0: 99 l ¡¹ 10-3 1070 ℸ (0) =ℸ (1) 1062 Âb =Âb 1054 Âw(0) =Âw(l) 1046 lR lR+1 1038 l R ¡ ®=(1 ¡ ®) (0) (l) 1030 1022 1014 10-4 106 10-2 10-5 10-10 10-18 10-6 10-26 10-7 100 101 102 103 layer l 104 10-34 100 101 102 layer l Figure A.2: We verify the exponents of the forward and backward dynamics for α-ReLU FRN. For each row, the figures are labeled (a) and (b) from left to right. The format is the same as in Fig. C.17. All figures are in log-log scale. (a) We exhibit our theoretical dynamics of the cosine distance e(l) based on the recurrences Thm B.8 and Thm B.10 for different initial conditions e(0) . We draw |e(l) − e(l−1) | for each of these dynamics in colored solid lines. We predict that each dynamic is Θ̌(l−µ ), where µ = (1 − J̇α (e∗ ))/(1 − α), and the dashed line gives l−µ−1 (Thm B.18), shifted vertically to better compare the slope in log scale (i.e. the exponent of the polynomial dynamics). (See footnote 4 for why we plot the dynamics this way). We see that the our asymptotic prediction is very accurate for the sequence of e(l) that starts with e(0) = 0.99, the closest to e∗ for each α, while other lines only slowly converge to the same exponent (which is the slope in the log-log plot). This is to be expected based on the proof of Thm B.18. For α = .9, the e(0) = .99 line upticks at around 103 and then turn into NaNs due to numerical instability. (b) Colored lines are •(0) /•(l) for • = χ, χb , χw (we are not taking logs in addition to plotting in log-log scale like in Fig. C.15). The dashed lines are our asymptotic predictions for the dynamics with corresponding colors, based on Thm B.21, again shifted appropriately to easily compare slope visually. We see that for every alpha our asymptotic predictions are highly accurate. For both (a) and (b), we did not show α = 1 case as ReLU FRN runs into numerical issues quickly (i.e. with even for 100 layers) because of exponential explosions in p(l) and χ(l) as predicted by Thms B.16 and B.20, so we cannot expect to empirically verify the precise predicted asymptotics. All plots are made with parameters 2 σv2 = 1.5, σa2 = .5, σw = 1.69, σb2 = .49; only α is varied. 14 Table A.1: Glossary of Symbols. “Mean normalized” is abbreviated “m.n.” B Symbol Meaning Ref σ• x(l) h(l) N p(l) q(l) γ (l) λ(l) s(l) e(l) e∗ c(l) χ(l) (l) χ• φ ψα V W δ∗ A R Jα standard deviation of trainable parameter • activation vector/input vector hidden vector width (same across all layers) m.n. squared length of activation vector x(l) m.n. squared length of hidden vector h(l) m.n. dot product x(l) · x(l)0 m.n. dot product h(l) · h(l)0 m.n. squared distancepkx(l) − x(l)0 k2 cosine distance γ (l) / p(l) p(l)0 limit value of e(l) as lp→ ∞ cosine distance λ(l) / q(l) q(l)0 m.n. gradient squared norm w.r.t. x(l) m.n. gradient squared norm w.r.t. trainable parameter • variable nonlinearity R → R α-ReLU variance integral transform covariance integral transform ∗ e(l) converges like Θ(l−δ ) in tanh FRN leading coeff of log χ(0) /χ(L) in tanh FRN log χ(0) /χ(L) ∼ R log L for (α < 1)-ReLU kernel function of α-ReLU 3.3 3.3 3.4 3.4 3.4 3.4 3.4 3.5 3.5 5.2 5.3 5.3 B.11 B.13 B.20 C.30 A Listing of Main Theorems B.1 B.1.1 Tanh Reduced Residual Network Lemma B.1. Suppose φ is antisymmetric. Then in an RRN, p and q satisfy the recurrence 2 q = σw p + σb2 p = Vφ(q) + p. Theorem B.2. Suppose φ is tanh-like. Assume RRN architecture. • If σw = 0, then p(l) = lVφ(σb2 ) + p(0) and q(l) = σb2 . 2 • If σw > 0, liml→∞ p(l) /l = 1 and liml→∞ q(l) /(σw l) = 1. If φ = tanh, then we can obtain more terms of the asymptotic expansions: −1 1/2 −2 p(l) = l − 2Cσw l − C 2 σw log l + O(1) 2 q(l) = σw l − 2Cσw l1/2 − C 2 log l + O(1) p as l → ∞, where C = 2/π. Theorem B.3. Suppose φ is antisymmetric. Then in an RRN, λ and γ satisfy the recurrence 2 λ = σw γ + σb2 γ = Wφ(q, λ) + γ. Theorem B.4. Suppose φ is a tanh-like nonlinearity in an RRN. Assume e(0) < 1. • If σw = 0, then γ (l) = lWφ(σb2 , σb2 ) + γ (0) = lVφ(σb2 ) + γ (0) and λ(l) = σb2 , so that e(l) → 1 and 1 − e(l) = Θ(l−1 ). As a result, s(l) = p(l) (1 − e(l) ) = Θ(1). 15 2 2 • If σw > 0, then γ (l) = Θ̌(l π ), and e(l) → 0 like Θ̌(l π −1 ). Thus s(l) = Θ(p(l) ) = Θ(l). Theorem B.5. For any nonlinearity φ in an RRN, under assumptions Axiom 3.1 and Axiom 3.2, whenever φ̇2 (ζ) has finite variance for Gaussian variable ζ, 2 χ = (σw Vφ̇(q) + 1)χ, χb = χVφ̇(q), χw = χVφ̇(q)p. Theorem B.6. For φ = tanh in an RRN, • If σw = 0, χ(m) = χ(l) for all l, m. • If σw > 0, √ √ log(χ(m) /χ(l) ) = A( l − m) + B(log l − log m) + O(1) q 4 2 4 where A = 43 π2 σw and B = 3π − σw 9π . Theorem B.7. Suppose φ = tanh. Then in an RRN (l) (l) • If σw = 0, χb = χ(L) Vφ̇(σb2 ) and χw = χ(L) Vφ̇(σb2 )((l − 1)Vφ(σb2 ) + p(0) ), where L is the last layer. • If σw > 0, √ √ (l) /χb ) = A( l − m) + Bb (log l − log m) + O(1) √ √ (l) log(χ(m) m) + Bw (log l − log m) + O(1) w /χw ) = A( l − q where A = 43 π2 σw (same as A in Thm B.6) and Bb = B + 12 , Bw = B − 12 , with (m) log(χb B= B.1.2 4 3π 2 4 − σw 9π (same as B in Thm B.6). Full Residual Network Theorem B.8. For any nonlinearity φ in an FRN, 2 q = σw p + σb2 p = σv2 Vφ(q) + σa2 + p Theorem B.9. Suppose φ is tanh-like. Assume the FRN architecture. • If σw = 0, then p(l) = (σv2 Vφ(σb2 ) + σa2 )l + p(0) , and q(l) = σb2 . • If σw > 0, then p(l) = b0 l + b1 l1/2 + b2 log l + O(1), where b0 = σv2 + σa2 −2Cσ 2 σ −1 b1 = p v w σv2 + σa2 b2 = and C = q 2 π. −2 −C 2 σv4 σw (σv2 + σa2 )2 2 2 2 Additionally, q(l) = σw b0 l + σw b1 l1/2 + σw b2 log l + O(1). Theorem B.10. For any nonlinearity φ, in an FRN 2 λ = σw γ + σb2 γ = σv2 Wφ(q, λ) + σa2 + γ Theorem B.11. Assume φ = tanh in an FRN. Suppose e(0) < 1. • If σw = 0, then λ(l) = σb2 and γ (l) = l(σv2 Wφ(σb2 , σb2 ) + σa2 ) + γ (0) = l(σv2 Vφ(σb2 ) + σa2 )+γ (0) . Thus e(l) → 1 and 1−e(l) = Θ(l−1 ). As a result, s(l) = p(l) (1−e(l) ) = Θ(1). 16 400 10 5.5 p p ¡ b0 l b0 l 350 b1 p p ¡ b0 l ¡ b1 l + 5: 4 p l b2 logl + 5: 4 5 5.0 0 4.5 −5 4.0 −10 3.5 300 250 200 150 100 50 0 −15 0 50 100 150 200 3.0 0 50 100 150 200 0 50 100 150 200 Figure B.3: Empirical verification of Thm B.9. • If σw > 0, then e(l) converges to the unique fixed point e∗ 6= 1 determined by the equation e∗ = 1 2 [σ 2 arcsin (e∗ ) + σa2 ]. σv2 + σa2 v π ∗ Furthermore, e(l) converges to e∗ polynomially: |e(l) − e∗ | is Θ̌(l−δ ), where δ ∗ := 1 − 1 2 1 σv2 2 p ∈ [ − 1, ) π 1 − (e∗ )2 σv2 + σa2 π 2 Since e∗ < 1, s(l) = Θ(p(l) ) = Θ(l). Theorem B.12. For any nonlinearity φ in an FRN, under assumptions Axiom 3.1 and Axiom 3.2, whenever φ̇(ζ)2 has finite variance for Gaussian variable ζ, 2 χ = (σv2 σw Vφ̇(q) + 1)χ, χb = σv2 χVφ̇(q), χw = σv2 χVφ̇(q)p, χv = χVφ(q), χa = χ Theorem B.13. Assume φ = tanh in an FRN. • If σw = 0, χ(m) = χ(l) for all l, m. • If σw > 0, then for l ≥ m ≥ 0, √ √ log(χ(m) /χ(l) ) = A( l − m) + B(log l − log m) + O(1) where r 2 σv2 σw p π σv2 + σa2   σv4 4 3 2 B= − σw 9π σv2 + σa2 σv2 + σa2 A= 4 3 Fig. B.4 shows empirical verification of the asymptotic expansion of χ for various values of σ• s. Theorem B.14. Suppose φ = tanh in an FRN. • If σw = 0, then (l) χb = σv2 χ(L) Vφ̇(σb2 ) 2 (L) χ(l) Vφ̇(σb2 )((σv2 Vφ(σb2 ) + σa2 )(l − 1) + p(0) ) w = σv χ (L) χ(l) Vφ(σb2 ) v =χ (L) χ(l) . a =χ • If σw > 0, then for l ≥ m ≥ 0, 17 σv = 0.6, σw = 0.8, σa = 0.7, σb = 0.3 σv = 0.7, σw = 0.9, σa = 0.3, σb = 0.2 σv = 0.8, σw = 0.4, σa = 0.5, σb = 0.6 20 10 8 8 15 ℸ 6 ℸ − √ l 4 6 ℸ √ l + const √ l + const 10 ℸ − √ l logl + const logl + const 5 ℸ √ l + const 4 ℸ − √ l logl + const 2 2 0 0 0 0 200 400 600 800 1000 0 σv = 0.9, σw = 0.8, σa = 0.8, σb = 0.1 200 400 600 800 1000 15.0 ℸ 10.0 √ l + const 2 logl + const 1 ℸ − √ l 7.5 5.0 ℸ − √ l logl + const 400 600 800 1000 1000 ℸ √ l + const 8 ℸ − √ l 6 logl + const 4 2 −1 200 800 10 √ l + const 2.5 0 600 12 ℸ 0 0.0 400 14 3 12.5 200 σv = 0.8, σw = 0.7, σa = 0.6, σb = 0.9 4 17.5 0 σv = 0.7, σw = 0.2, σa = 0.4, σb = 0.4 0 0 200 400 600 800 1000 0 200 400 600 800 1000 Figure B.4: Empirical verification of the asymptotic expansion of χ for various values of σ• s. Note that we have chosen all small values for σ• s. For larger values, the constant term in Thm B.13 begins to dominate (primarily because of the expansion log(1 + x) = x + Θ(x2 ) has large Θ term when x is large), and χ behaves more like exp(Θ(l)) up to depth 1000. √ √ (l) /χb ) = A( l − m) + Bb (log l − log m) + O(1) √ √ (l) log(χ(m) m) + Bw (log l − log m) + O(1) w /χw ) = A( l − √ √ (m) (l) log(χa /χa ) = A( l − m) + B(log l − log m) + O(1) √ √ (l) m) + B(log l − log m) + O(1) log(χ(m) v /χv ) = A( l − q   σ2 σ σv4 4 3 2 where A = 43 π2 √ v2 w 2 and B = 9π − σ are as in Thm B.13 and 2 2 2 2 w σ +σ σ +σ (m) log(χb σv +σa Bb = B + B.2 1 2 v a v a and Bw = B − 12 . α-ReLU Lemma B.15. If α > − 12 , then Vψα (q) = cα q α , where cα = √1 2α−1 Γ π α+ 1 2  . Note that if α ≤ − 12 , then Vψα (q) is not defined (its defining integral does not converge). B.2.1 Full Residual Network By Thm B.8 and Lemma B.15, we have the length recurrences 2 q = σw p + σb2 p = σv2 cα qα + σa2 + p Theorem B.16. Suppose we have the nonlinearity φ = ψα . The in an FRN: If α = 1, then 2 p(l) = Θ((1 + σv2 σw /2)l ), with the hidden constant depending on the initial condition. If 0 < α < 1, 1 1 1 2α cα (1 − α)] 1−α . then p(l) = Θ(l 1−α ). More precisely, liml→∞ p/l 1−α = [σv2 σw Fig. B.5 empirically verifies the asymptotics for α = 1 for various σv and σw . Similarly, by Thm B.10, if q = q0 , then 2 λ = σw γ + σb2 γ = σv2 qα Wψα (1, c) + σa2 + γ 18 1048 2, 2 2, 1 0.5, 2 1044 1040 1036 1032 1028 1024 1020 1016 1012 108 104 100 0 10 20 30 40 50 layer l Figure B.5: Verification of the exponential asymptotics of p(l) when α = 1. The lines of each color correspond to different (σw , σv ) pairs, which are given in the legend. The solid lines are given by the recurrences Thm B.8, 2 and the dashed lines are given by our asymptotics (1 + σv2 σw /2)l (Thm B.16). Note that the y-axis is in log-scale. 0.99 0.98 0.97 0.96 0.95 e (0) = 0: 01 e (0) = 0: 21 0.94 e (0) = 0: 40 e (0) = 0: 60 e (0) = 0: 79 0.93 e (0) = 0: 99 e¤ 0.92 0 2000 4000 6000 8000 10000 layer l Figure B.6: Verification of fixed point e∗ in Thm B.18 for α = .6. Different colors correspond to different initial conditions e(0) , and the dashed line gives the fixed point. 2 −1 B U l]−2 for Theorem B.17. Suppose φ = ψ1 . Then in an FRN, e(l) → 1 and 1 − e(l) ∼ [ 14 σv2 σw √ 2 2 2 B = 1+σv2 σw /2 and U = 3π . As a result, s(l) = (1−e(l) )p(l) = Θ(l−2 exp(Θ(l))) = exp(Θ(l)). Theorem B.18. Suppose φ = ψα for 0 < α < 1 in an FRN. Then e converges to the unique nonunit fixed point e∗ of Jα , and |e∗ − e(l) | is Θ̌(l−µ ), where µ = (1 − J̇α (e∗ ))/(1 − α). Additionally, s(l) = Θ(p(l) ) = Θ(l1/(1−α) ). Fig. B.6 verifies empirically that e∗ is indeed the fixed point of e(l) . Fig. A.2 verifies empirically the convergence rate l−µ . Fig. B.7 plots J̇α (e∗ ) and µ versus α. It certainly looks like µ = 21 (1 − α), but we have no proof for it. Based on this conjecture, we see there is a “discontinuity” of µ at α = 1: µ → 0 as α → 1, but for α = 1, the actual convergence dynamics has exponent −2 by Thm B.17. Because of the following theorem, we cannot expect the equations of Thm B.12 to hold for α ≤ 34 . Theorem B.19. Suppose we have the nonlinearity ψα in an FRN. Var(ψ̇α (ζ)2 ) diverges for any Gaussian variable ζ with mean 0 if α ≤ 34 but is finite if α > 43 . Theorem B.20. Suppose we have the nonlinearity ψα in an FRN. If α = 1, then χ(l−m) = m α2 2 χ(l) 12 σv2 σw + 1 . If α ∈ ( 43 , 1), then χ(l−m) = Θ(1)χ(l) (l/(l − m))R for R = (1−α)(2α−1) , where the constants in Θ(1) do not depend on l or m. 2 α This exponent (1−α)(2α−1) is minimized at α = 34 on α ∈ (3/4, 1), where the value is α = 23 on α ∈ (1/2, 1), where the value achieved is 4) (Fig. B.8(a)). As a corollary, 19 9 2 (and at dα dc μ (* ) 0.25 1.000 0.20 0.995 0.990 0.15 0.985 0.10 0.980 0.05 0.975 0.5 0.6 0.7 0.8 0.9 1.0 α 0.6 0.7 0.8 0.9 α Figure B.7: (a) A plot of J̇α (e∗ ) versus α. (b) A plot of the exponent µ of the dynamics of |e∗ − e(l) | (see Thm B.18) α 1-α 30 -1 25 -2 -R -3 20 -4 15 -5 10 -6 0.6 0.7 0.8 0.9 1.0 α 0.6 0.7 0.8 0.9 1.0 α Figure B.8: (a) The exponent of the polynomial gradient dynamics with respect to α-ReLU versus α. (b) The exponent of the dynamics of χv and χw . Theorem B.21. If φ = ψ1 in an FRN, then for l ≥ m ≥ 0, (l−m) χb = Θ(1)χ(l) B m , χ(l−m) = Θ(1)χ(l) B l , w χ(l−m) = Θ(1)χ(l) B l , v χ(l−m) = Θ(1)χ(l) B m . a 2 /2. where B = 1 + σv2 σw If φ = ψα in an FRN, for α < 1, then for l ≥ m ≥ 0, (l−m) χb α χ(l−m) = Θ(1)χ(l) lR (l − m) 1−α −R , w = Θ(1)χ(l) lR (l − m)−R−1 , α χ(l−m) = Θ(1)χ(l) lR (l − m) 1−α −R , v χ(l−m) = Θ(1)χ(l) (l/(l − m))R . a Fig. A.2 verifies the backward asymptotic dynamics empirically for different α < 1. Fig. B.8(b) α graphs the exponent 1−α − R in terms of α. We see that on [0.5, 1], the maximum of this exponent is at α = 1. C Proofs A brief note about notation: We use ∼ to denote both how a random variable is sampled (ex: x ∼ N (0, 1) for a Gaussian x) and how a function behaves asymptotically, i.e. f (x) ∼ g(x) as x → a iff limx→a f (x)/g(x) = 1. Context should be enough to differentiate between these two cases. We in addition use ' to denote asymptotic expansion. For example, if {αi }i≥0 is a sequence of strictly decreasing reals and {βi }i≥0 is a sequence of nonzero reals, then X f (x) ' βi (x − ξ)αi i≥0 means that as x → ξ, f (x) − PN i=0 βi (x − ξ)αi = Θ((x − ξ)αN +1 ). 20 C.1 Preliminary Lemmas Lemma C.1. We have 2 σw γ + σb2 = e(1 + O(γ −1 )). 2 p + σ2 σw b regardless of whether e(l) = γ (l) /p(l) converges. But suppose e(l) = γ (l) /p(l) → e∗ . If e∗ < 1, then 2 σw γ + σb2 = e(1 + Θ(γ −1 )). 2 p + σ2 σw b If e∗ = 1, then 2 σw γ + σb2 = e(1 + Θ(p−1 )), 2 σw p + σb2 where  = 1 − e. 2 Proof. Write M = σb2 /σw . 2 γ + σb2 σw 1 + M γ −1 = e(1 + ) 2 p + σ2 σw 1 + M p−1 b = e(1 + M (γ −1 − p−1 ) + O(p−1 (γ −1 − p−1 ))). In any situation, γ −1 − p−1 = O(γ −1 ) because γ ≤ p, so this gives the first statement. If e∗ exists and e∗ < 1, then γ −1 − p−1 = Θ(γ −1 ), which yields the second statement. If e∗ exists and e∗ = 1, then γ −1 − p−1 = p−1 ((1 − )−1 − 1) = p−1 ( + O(2 )) = Θ(p−1 ). For any function f that is (k + 1)-times differentiable in a neighborhood of 0, we have the asymptotic expansion k X dn f zn f (z) = (0) + O(z k+1 ), as z → 0. n dz n! n=0 Since dn q 1/2 Vφ(q) d(1/q)n = q→∞ (−1)n √ 2n 2π Z ∞ φ2 (z)z 2n dz −∞ whenever the RHS is integrable, we have Lemma C.2. Suppose φ2 (z)z 2n is integrable over z ∈ R for all 0 ≤ n ≤ N + 1. Then Vφ(q) = PN q −1/2 ( n=0 Cn q −n + O(q −N −1 )) as q → ∞, where Z ∞ (−1)n √ Cn := φ2 (z)z 2n dz. 2n n! 2π −∞ Note that sechd (z) = Θ(e−d|z| ) for z → ∞ as long as d > 0, so that Cn from the above result converges when φ = sechd . Therefore P Lemma C.3. Let d > 0. We have V sechd (q) ' q −1/2 n≥0 Cn q −n , where Z ∞ (−1)n √ Cn := sech2d (z)z 2n dz. 2n n! 2π −∞ As corollaries, we obtain the following asymptotics. q ˙ Lemma C.4. Vtanh(q) = 32 π2 q −1/2 + Θ(q −3/2 ) as q → ∞. ˙ = sech2 (z) and Proof. Use Lemma C.3 along with the fact that tanh(z) 2 1 2 sech z tanh z. 21 R sech4 z dz = 2 3 tanh z + Lemma C.5. 1 − V tanh(q) = q 2 −1/2 πq + Θ(q −3/2 ) as q → ∞. Proof. Use Lemma C.3 along with the fact that 1 − tanh2 (z) = sech2 (z) and tanh z. R sech2 z dz = Lemma C.6. sech2 (t) ≥ exp(−t2 ) for all t, with equality iff t = 0. Proof. The lower bound is equivalent to 2 2 ≥ et−t 2 The RHS has derivative (1 − t)et−t /2 /2 + e−t−t − (1 + t)e−t−t 2 /2 2 /2 . This is 0 iff 1−t = e−2t 1+t which has a solution 0 and in general can only have solution t ∈ (−1, 1) (by considering the sign of the LHS). Since each side is analytic in t ∈ (−1, 1), we expand 1−t = log e−2t 1+t log(1 − t) − log(1 + t) = −2t log (−t − t2 − · · · ) − (t − t2 + · · · ) = −2t −2t − 2t3 − · · · = −2t which shows that the only solution is t = 0. A simple plot shows that t = 0 is a maximum, where the bound in question achieves equality. Lemma C.7. Suppose φ = tanh. Then Vφ̇(q) ≥ √ 1 . 4q+1 As a sanity check, Lemma C.4 shows that Vφ̇(q) ∼ C0 q 1/2 where C0 ≈ .5319, which is above the .5 in this lemma. Proof. By Lemma C.6, √ dµ(z)φ̇2 ( qz) Z 1 dz exp(−z 2 /2 − 2qz 2 ) ≥√ 2π Z 1 =√ dz exp(−(4q + 1)z 2 /2) 2π 1 =√ . 4q + 1 Z Vφ̇(q) = Fig. C.9 demonstrates Lemma C.7. Lemma C.8. Let d ∈ R and 1 < M < N with N − M ∈ Z≥0 . Set Σ(M, N, d) := we fix M and let N → ∞,  Θ(1) if d < −1      log N + O(1) if d = −1  d+1 N Σ(M, N, d) = if −1 < d < 0 d+1 + O(1)    N − M + 1 if d = 0    1 1 d d+1 max(0,d−1) + 2 N + O(N ) if d > 0 d+1 N 22 PN a=M ad . If Vsech 2 (0; q) ¸ (4q + 1) ¡1=2 1.0 Vsech 2 (0; q) (4q + 1) ¡1=2 0.8 f(q) 0.6 0.4 0.2 0.0 0 10 20 30 40 50 q Figure C.9: Illustration of Lemma C.7: Vφ̇(q) vs purposes, √ 1 4q+1 √ 1 4q+1 for φ = tanh. This bound is very tight, and for most can be taken as a good approximation of Vφ̇(q). R N +1 RN Proof. Consider the integrals A = M ad da and B = M −1 ad da. They evaluate to A = 1 1 d+1 − M d+1 ) and B = d+1 (N d+1 − (M − 1)d+1 ) when d 6= −1 and to A = d+1 ((N + 1) log(N + 1) − log M and B = log N − log(M − 1) when d = −1. When d ≤ 0, we have A ≤ B and Σ(M, N, d) ∈ [A, B]; when d > 0, B ≤ A and Σ(M, N, d) ∈ [B, A]. Thus, as N → ∞ with M fixed, when d < −1, Σ(M, N, d) = Θ(1); when d = −1, Σ(M, N, −1) = log N + O(1); and d+1 when d > −1, we have Σ(M, N, d) = Nd+1 + O(N d ). Now for a > 0 and d > −1 and d 6= 0, 1, Z a+1 z d − ad dz = 1 ((a + 1)d+1 − ad ) d + 1 a d = (ad + ad−1 + · · · ) − ad 2 d d−1 + Θ(ad−2 ). = a 2 where the hidden constants in Θ depend only on d (and in fact this term vanishes if d = 1). Thus Z N +1 N X d d Σ(M, N, d) = z dz − [ ad−1 + Θ(ad−2 )] 2 M a=M 1 d = ((N + 1)d+1 − M d+1 ) − Σ(M, N, d − 1) + Θ(Σ(M, N, d − 2)) d+1 2 If −1 < d < 0, then Σ(M, N, d − 1) = Θ(1), so that Σ(M, N, d) = N d+1 d+1 + O(1). If d > 0 and d 6= 1, then Σ(M, N, d − 1) = Nd d , (N +1)d+1 d+1 + O(1) = so that 1 1 N d+1 + N d + Θ(N max(0,d−1) ) − N d + Θ(Σ(M, N, d − 2)) d+1 2 1 1 = N d+1 + N d + O(N max(0,d−1) ). d+1 2 Σ(M, N, d) = We can obtain more terms in the expansion for higher d via the Euler-Maclaurin formula, but this suffices for our purposes. C.2 Dynamics Zoo This section deduces the asymptotic behaviors of some sequences governed by recurrence equations. For the most part, the leading term of their asymptotic expansions is as one would expect from the corresponding differential equation. However, in some cases we need subleading terms for later results. They require slightly more nuanced reasoning. First we present a technical lemma. Lemma C.9. Let F : R × N → R be a function such that for a subset U ⊆ R, and for all z, z 0 ∈ U, z ≥ z 0 =⇒ F (z, n) ≥ F (z 0 , n) for every n. Suppose sequences a(l) , b(l) , c(l) satisfy 23 • a(l+1) = F (a(l) , l) for all l; • b(l+1) ≤ F (b(l) , l) for all l above a constant Kb . • c(l+1) ≥ F (c(l) , l) for all l above a constant Kc . and furthermore, a(l) , b(l) , c(l) all fall into U for l above a constant KU . If for some m ≥ max(Kb , KU ), b(m) ≤ a(m) , then b(l) ≤ a(l) , ∀l ≥ m. Similarly, if for some n ≥ max(Kc , KU ), c(n) ≥ a(n) , then c(l) ≥ a(l) , ∀l ≥ n. Proof. For the first claim: b(m) ≤ a(m) =⇒ b(m+1) ≤ F (b(m) , m) ≤ F (a(m) , m) = a(m+1) . Here the last inequality used the monotonicity of F . Induction gives the desired result. It’s similar for the second claim, where the inductive step is c(m) ≥ a(m) F (c(m) , m) ≥ F (a(m) , m) = a(m+1) . =⇒ c(m+1) ≥ Lemma C.10. Suppose (l) satisfies the recurrence (l) = (l−1) (1 + δ ). lβ for some nonzero constant δ ∈ R independent of l. • If β > 1, then (l) = Θ(1). • If β = 1, then (l) = Θ(lδ ). δ 1−β • If 0 < β < 1, then (l) = exp( 1−β l + Θ̃(lψ1 (1−2β) )), where ψ1 (x) = max(0, x) is the ReLU function. Proof. We have log (l) = log (l−1) + log(1 + δ/lβ ) = log (l−1) + δ/lβ + Θ(δ 2 /l2β ) for large l. If β > 1, then P l l−β converges, and log (l) = log (0) − Θ(1) (l) = Θ(1). If β = 1, then log (l) = log (0) + δ log l + Θ(1) (l) = Θ(lδ ). If β < 1, then log (l) = log (0) + (l) = exp( δ 1−β l + Θ̃(l1−2β ) 1−β δ 1−β l + Θ̃(lψ1 (1−2β) )). 1−β Lemma C.11. Suppose (l) = Cl−α + (l−1) (1 + δ/lβ ) for α ∈ R, C 6= 0, and δ 6= 0. Then • If β > 1, then – (l) = Θ(l1−α ) if α ∈ (0, 1); – (l) = Θ(log l) if α = 1; – (l) = Θ(1) if α > 1. 24 • If β = 1, then – (l) = Θ(lmax(δ,1−α) ) if 1 − δ 6= α. – (l) = Θ(lδ log l) if 1 − δ = α. Furthermore, for β = −δ = 1, (l) ∼ l−1 if α > 2, (l) ∼ l1−α if α < 2, and (l) ∼ lδ log l if α = 2. Proof. We can unwind the recurrence to get  (l) = l X −α m m=1 l Y δ δ (0) (1 + β ) (1 + β ) +  n n n=1 n=m+1 l Y Suppose β > 1. By Lemma C.10, we get l X (l) = Θ(1) m−α + (0) Θ(1) m=1  1−α ) if α ∈ (0, 1) Θ(l = Θ(log l) if α = 1  Θ(1) if α > 1. Now suppose β = 1. By Lemma C.10, we get (l) = l X m−α Θ(m−δ lδ ) + (0) Θ(lδ ) m=1 where the constants hidden inside the Θ are the same in every term of the sum. If α > 1 − δ, then Pl m−δ−α = o(m−1 ), so that m=1 m−δ−α = Θ(1), and (l) = Θ(lδ ) + (0) Θ(lδ ) = Θ(lδ ). On the other hand, if α < 1 − δ, then Pl m=1 m−δ−α = Θ(l1−δ−α ). So (l) = Θ(l1−α ) + (0) Θ(lδ ) = Θ(l1−α ). If α = 1 − δ, then Pl m=1 m−δ−α = Θ(log l). So (l) = Θ(lδ log l) + (0) Θ(lδ ) = Θ(lδ log l). Finally, if β ∈ (0, 1), then δ (l) = e 1−β l 1−β +Θ(l1−2β ) l X −δ 1−β m−α e 1−β m +Θ(m1−2β ) δ + e 1−β l 1−β +Θ(l1−2β ) m=1 The case of δ = −1 telescopes, so that the upper and lower constants hidden in Θ can both be taken to be 1. Lemma C.12. Suppose for some β > 0, a sequence (l) satisfies (l) = (l−1) (1 − µ((l−1) )β /l), Then (l) ∼ (βµ log l)−1/β . 25 (0) ∈ (0, 1 ). µ Proof. Consider the differential equation ẋµ = −µxβ+1 /t µ for constant µ has solution xµ = [β(µ log t + C)]−1/β for some constant C determined by initial condition. Note that −µxµ (t)β+1 /t ≤ xµ (t + 1) − xµ (t) ≤ −µxµ (t + 1)β+1 /(t + 1) = −(1 − o(t−1 ))µxµ (t)β+1 /t. For any small enough α > 0, we apply Lemma C.9 with F (, l) =  − µβ+1 /l (which is monotonic in  for small enough ), c(l) = xµ (l), and b(l) = xµ−α (l) to obtain xµ−α (l) ≤ (l) ≤ xµ (l) for large enough l and appropriately chosen initial conditions. This shows that (l) = Θ(log l−1/β ) Taking α → 0, we also obtain the leading coefficient (l) ∼ [βµ log l]−1/β . Lemma C.13. Suppose a sequence u(l) is governed by the equation u(l) − u(l−1) = A(u(l−1) + B)α , 1 α α where α ∈ [0, 1) and A > 0. Then u(l) = K1 l 1−α − K2 l 1−α log l + o(l 1−α log l), where K1 = 1 1 α [A(1 − α)] 1−α and K2 = 12 A 1−α (1 − α) 1−α −1 α. Proof. Leading term. The differential equation ẋA,B = A(xA,B + B)α 1 has solution xA,B (l) = [A(1 − α)(l + S)] 1−α − B for some constant S. Since ẋA,B is monotonic, we have (writing x = xA,B for brevity) A(xA,B (l) + B)α = ẋA,B (l) ≤ xA,B (l + 1) − xA,B (l) ≤ ẋA,B (l + 1) ≤ (A + o(1))(xA,B (l) + B)α for large enough l. We apply Lemma C.9 with F (x, l) = x + A(x + B)α (which is monotonic in x for large x), c(l) = xA,B (l), and b(l) = xA−,B (l) to obtain xA−,B (l) ≤ u(l) ≤ xA,B (l) 1 for large enough l and appropriate initial conditions. Therefore lim u(l) /l 1−α ∈ [[(A − )(1 − 1 1 α)] 1−α , [A(1 − α)] 1−α ]. Taking  → 0 gives the leading term. 1 1 Subleading term. Now let v (l) := u(l) − ℵl 1−a , where ℵ = [A(1 − α)] 1−α . Then we have the recurrence 1 1 1 v (l+1) + ℵ(l + 1) 1−α − v (l) − ℵl 1−α = A(v (l) + ℵl 1−α + B)α α α α 1 1−α 1 1 α v (l+1) − v (l) + ℵ( l + ( )( )l 1−α −1 + Θ(l 1−α −2 )) 1−α 2 1−α 1−α α v (l+1) − v (l) 1 = A[ℵα l 1−α + α(v (l) + B)ℵα−1 l−1 + Θ((v (l) + B)l−1− 1−α )] α α 1 1 α = v (l) l−1 − ℵ( )( )l 1−α −1 + g(l) 1−α 2 1−α 1−α α for some g(l) = O(l 1−α −2 + l−1 ) and where, to get the last equation, we have used Aαα = α α to cancel the l 1−α term and simplified αAℵα−1 = 1−α . 1 1−α ℵ α α For any J > 0, the differential equation v̇J (l) = 1−α vJ (l)l−1 − Jl 1−α −1 has solution vJ (l) = α α α α C[l(1 − α)] 1−α − Jl 1−α log l. Note that the functions FJ (z, n) = z + 1−α zn−1 − Jn 1−α −1 and GJ (z, n) = FJ (z, n) + g(n) is monotonic in z (for positive n). For large l, we also have v̇J (l) and FJ (vJ (l), l) = vJ (l) + v̇J (l) decreasing in l. Thus for any  > 0 and l large enough GJ+ (vJ (l), l) ≤ FJ+/2 (vJ (l), l) ≤ vJ (l)+v̇J (l+1) ≤ vJ (l+1) ≤ FJ (vJ (l), l) ≤ GJ− (vJ (l), l). 26 Now apply Lemma C.9 with F = GK , a(l) = v (l) , c(l) = vK− , b(l) = vK+ where K := 1 α 1 α 1 1−α 1 (1 − α) 1−α −1 α, with appropriately chosen initial conditions. This yields 2 ℵ( 1−α )( 1−α ) = 2 A α liml→∞ v (l) /(l 1−α log l) ∈ [−K − , −K + ] for every  > 0, and there it must be equal to K. We have thus obtained the asymptotic expansion 1 α α α 1 1 u(l) = [A(1 − α)l] 1−α − A 1−α (1 − α) 1−α −1 αl 1−α log l + o(l 1−α log l). 2 Lemma C.14. Suppose a sequence u(l) is governed by the equation u(l) − u(l−1) = −A(u(l−1) + B)α , 1 where α > 1 and A > 0. Then u(l) ∼ [A(α − 1)l] 1−α . Proof. Similar to Lemma C.13. Lemma C.15. Suppose a sequence u(l) is governed by the equation u(l) − u(l−1) = A(u(l−1) + B)α + C, 1 where α ∈ (0, 1). Then u(l) = K1 l 1−α + R(l), where the remainder R(l) is  α 1  −K2 l 1−α log l if α > 2 1 R(l) ∼ (C − K2 )l log l if α = 2 and K2 6= C   C(1−α) l if α < 21 1−2α 1 1 α where K1 = [A(1 − α)] 1−α , K2 = 12 A 1−α (1 − α) 1−α −1 α as in Lemma C.13. Proof. u is bounded below by the dynamics v (l) − v (l−1) = A(v (l−1) + B)α and bounded above by the dynamics w(l) − w(l−1) = (A + o(1))(w(l−1) + B)α . By Lemma C.13, both v and w are 1 asymptotic to u(l) ∼ [A(1 − α)l] 1−α , which gives the result. 1 Now define v (l) = u(l) − [A(1 − α)l] 1−α , and similar to the proof of Lemma C.13, we find v (l+1) − v (l) = 1 α α v (l) l−1 − Kl 1−α −1 + C + g(l) 1−α α α α > 1 ⇐⇒ α > 12 , then where K = 21 A 1−α (1 − α) 1−α −1 α and g(l) = O(l 1−α −2 + l−1 ). If 1−α α α −1 C + g(l) = o(l 1−α ) and we can proceed as in the proof of Lemma C.13 to find v (l) ∼ Kl 1−α log l. α −1 α α If 1−α = 1 ⇐⇒ α = 1 and K 6= C, then v (l+1) − v (l) = 1−α v (l) l−1 − (K − C)l 1−α + g(l), so α that the technique used in Lemma C.13 would obtain v (l) ∼ (K − C)l 1−α log l = (K − C)l log l. If α 1 α (l+1) − v (l) = 1−α v (l) l−1 + C + o(1), then by using the differential 1−α < 1 ⇐⇒ α < 2 , then v α equation v̇J (l) = 1−α vJ (l)l−1 + J to approximate the difference equation solution and applying Lemma C.9 as in the proof of Lemma C.13, we obtain v (l) (l) ∼ C.3 C(1−α) 1−2α l. Forward Dynamical Equations Here we derive the recurrences governing the forward length and correlation quantities p, q, λ, γ. We start with reduced residual networks. Lemma B.1. Suppose φ is antisymmetric. Then in an RRN, p and q satisfy the recurrence 2 q = σw p + σb2 p = Vφ(q) + p. 27 Proof. We have X q = hh2j i = h (wji xi + bj )2 i i = hb2j i X X X 2 2 hwji xi bj i + 2 hwji wli x2i i + hwji xi i + 2 i i j6=l But wji , wli , x, and bj form an independency, so the last two sums are 0, and the terms in the first sum split multiplicatively. Therefore X 2 q = σb2 + hwji ihx2i i i 2 σw p N 2 2 = σb + σw p. = σb2 +N · For the recurrence of p, we have p = hx2i i = h(φ(hi ) + xi )2 i = hφ(hi )2 i + hx2i i + 2hφ(hi )xi i As N → ∞, the coefficient wii of xi in hi has vanishing covariance, so hi and xi become independent. Therefore hφ(hi )xi i = hφ(hi )ihxi i. Because hP i is the sum of a large number of independent random variables, by CLT, hi is a Gaussian with mean i hwji ihxi i + hbj i = 0 since hwji i = hbj i = 0. Our antisymmetry assumption on φ then implies hφ(hi )i = 0. Therefore, p = hφ(hi )2 i + hx2i i = Vφ(q) + p as desired. Theorem B.3. Suppose φ is antisymmetric. Then in an RRN, λ and γ satisfy the recurrence 2 λ = σw γ + σb2 γ = Wφ(q, λ) + γ. Proof. Similar to Lemma B.1. Now, for the full residual networks, the proofs are similar, but we no longer need to assume that φ is antisymmetric because of the randomization via the extra sets of weights. Theorem B.8. For any nonlinearity φ in an FRN, 2 q = σw p + σb2 p = σv2 Vφ(q) + σa2 + p Proof. q = hh2j i = h(wji xi + bj )2 i = h(wji xi )2 i + hb2j i 2 = σw hx2i i + σb2 2 = σw p + σb2 p = hx2i i = h(vij φ(hj ) + xi + ai )2 i = σv2 hφ(hi )2 i + hx2i i + σa2 = σv2 Vφ(q) + σa2 + p where in the third equality for p, we are now using the independence of vij from all other variables to cancel out the terms, whereas before we had to rely on φ being antisymmetric. 28 Theorem B.10. For any nonlinearity φ, in an FRN 2 λ = σw γ + σb2 γ = σv2 Wφ(q, λ) + σa2 + γ Proof. Similar to Thm B.8. C.4 Backward Dynamical Equations Here we derive the recurrences governing the gradient quantities χ and χ• for different •, all under (l) the gradient independence assumption. Write βi = ∂E(l) for a cost function E. ∂xi Theorem B.5. For any nonlinearity φ in an RRN, under assumptions Axiom 3.1 and Axiom 3.2, whenever φ̇2 (ζ) has finite variance for Gaussian variable ζ, 2 χ = (σw Vφ̇(q) + 1)χ, χb = χVφ̇(q), χw = χVφ̇(q)p. Proof. For a reduced residual network, we have the following derivative computation: ∂xi ∂hi = δji + φ̇(hi ) , ∂xj ∂xj ∂xi = δji φ̇(hj ), ∂hj ∂hi = wij , ∂xj ∂hi = xj , ∂wij ∂hi = δij . ∂bj Then β j = βj + X = βj + X βi φ̇(hi ) i ∂hi ∂xj βi φ̇(hi )wij i hβ 2j i = h[βj + X βi φ̇(hi )wij ]2 i i = hβj2 i + X hβi2 φ̇2 (hi )(wij )2 i i +2 X hβi βk φ̇(hi )wij φ̇(hk )wkj i + 2 X hβj βi φ̇(hi )wij i i i<k The last two terms of the above vanish as wij is independent from wkj , hi , hk and βi , βj , βk by Axiom 3.2, and hwij i = 0. Therefore, applying Axiom 3.1, 2 hβj2 ihφ̇2 (hi )i + hβj2 i hβ 2j i = σw 2 = (σw Vφ̇(q) + 1)hβj2 i We similarly have X ∂E ∂xi ∂E = = βj φ̇(hj ), ∂bj ∂xi ∂hj i  2 ∂E h i = hβj2 φ̇(hj )2 i = hβj2 iVφ̇(q), ∂bj X ∂E ∂xi ∂hj ∂E = = βj φ̇(hj )xi , ∂wji ∂xi ∂hj ∂wji i  2 ∂E h i = hβj2 φ̇2 (hj )x2i i = hβj2 iVφ̇(q)p, ∂wji since ∂xi = δji φ̇(hj ) ∂hj by Axiom 3.2(b); since ∂xi = δji φ̇(hj ) ∂hj by Axiom 3.2(b) In the last equation we have also used the fact that as N → ∞, hj and xi become independent (they 2 are jointly Gaussian and their correlation hwji i goes to 0 with N ). 29 Theorem B.12. For any nonlinearity φ in an FRN, under assumptions Axiom 3.1 and Axiom 3.2, whenever φ̇(ζ)2 has finite variance for Gaussian variable ζ, 2 Vφ̇(q) + 1)χ, χ = (σv2 σw χb = σv2 χVφ̇(q), χw = σv2 χVφ̇(q)p, χv = χVφ(q), χa = χ Proof. For the full residual network, we have the following derivative computations: X ∂xi ∂hk ∂xi ∂hi ∂hi = δji + vik φ̇(hk ) , = vij φ̇(hj ), = wij , = xj , ∂xj ∂xj ∂hj ∂xj ∂wij k ∂xi = φ(hk ), ∂vik Again let βj = ∂E ∂xj . ∂hi = 1, ∂bi ∂xi = 1. ∂ai Then βj = X βi (δji + X i k X βi (δji + X = i vik φ̇(hk ) ∂hk ) ∂xj vik φ̇(hk )wkj ) k Thus, hβ 2j i = h[ X βi (δji + X i vik φ̇(hk )wkj )]2 i k X 2 2 + hvik ihwkj iVφ̇(q)hβi2 i = hβj2 i = hβj2 i(1 i,k 2 + σv2 σw Vφ̇(q)) where in the second equality we applied the independence argument as in the proof of Thm B.5, leveraging Axiom 3.2, and in the third equality we used Axiom 3.1 to get hβi2 i = hβj2 i. The other computations are similar to the proof of Thm B.12. C.5 C.5.1 Tanh: Reduced Residual Network Forward Dynamics Theorem B.2. Suppose φ is tanh-like. Assume RRN architecture. • If σw = 0, then p(l) = lVφ(σb2 ) + p(0) and q(l) = σb2 . 2 l) = 1. If φ = tanh, then we can • If σw > 0, liml→∞ p(l) /l = 1 and liml→∞ q(l) /(σw obtain more terms of the asymptotic expansions: −1 1/2 −2 p(l) = l − 2Cσw l − C 2 σw log l + O(1) 2 q(l) = σw l − 2Cσw l1/2 − C 2 log l + O(1) p as l → ∞, where C = 2/π. Proof. The case with σw = 0 is trivial. We assume σw > 0 from here on. p and q are asymptotically linear with l. We first show that, for any ω < 1, l + p(0) ≥ p(l) ≥ ωl and 2 2 σw (l + p(0) ) + σb2 ≥ q(l) ≥ σw ω(l − 1) + σb2 , 30 2 so that p(l) ∼ l and q(l) ∼ σw l. The upper bounds are trivial, given Vφ(q) ≤ 1 for any q. We show the lower bounds for any ω < 1. For any  > 0, define ℵ by φ2 (ℵ ) = exp(−). Then Vφ(q) ≥ exp(−) Pr[z 6∈ [−ℵ , ℵ ] : z ∼ N (0, q)]   2ℵ ≥ exp(−) 1 − √ 2πq where the second inequality follows from an overestimate of the Pr[z ∈ [−ℵ , ℵ ]] via the mode of N (0, q). For any q ≥ q(0) , Vφ(q) is then lower bounded by ! p r !   p p (0) 2 q 2 q(0) 1− p q(0) 1− φ2 = φ2 > 0. (0) π 2πq Thus p(l) and q(l) are unbounded with l.  Furthermore, as q → ∞, the lower bound exp(−) 1 − (l) fore, for any ω < 1, p ≥ ωl and q (l) ≥ 2 σw ω(l − 1) + √2ℵ 2πq σb2 .  goes to exp(−), for any . There- Asymptotic expansion. Now we repeat the following to get each successive asymptotic term of p(l) (l) and q(l) : We plug in the current V tanh(q) = 1 − Cq−1/2 + Θ(q−3/2 ) p asymptotic form of q into(l) Pl (Lemma C.5), where C = 2/π. Next we take the sum q = r=1 V tanh(q(r) ), which yields one more term in the asymptotic expansion of p than the last round. We then repeat until we get only constant terms. The following exhibits a trace of this procedure, where in the summation step for q(l) , we implicitly apply 2 2 q = σw l + o(l) = σw l(1 + o(1)) −1 −1/2 −1 −1/2 q−1/2 = σw l (1 + o(1)) = σw l + o(l−1/2 ) p= l X 1 − C(q(r) )−1/2 + Θ((q(r) )−3/2 ) r=1 = l X −1 −1/2 1 − C(σw r + o(r−1/2 )) + Θ(r−3/2 ) r=1 −1 1/2 = l − 2Cσw l + o(l1/2 ) 2 2 q = σw l − 2Cσw l1/2 + o(l1/2 ) = σw l(1 − 2Cσ2−1 l−1/2 + o(l−1/2 )) −1 −1/2 −1 −1/2 −1 −1/2 −2 −1 q−1/2 = σw l (1 + Cσw l + o(l−1/2 )) = σw l + Cσw l + o(l−1 ) p= l X −1 −1/2 −2 −1 1 − C(σw l + Cσw l + o(l−1 )) + Θ(l−3/2 ) r=1 −1 1/2 −2 = l − 2Cσw l − C 2 σw log l + o(log l) log l 2 −1 −1/2 −2 log l q = σw l(1 − 2Cσw l − C 2 σw + o( )) l l 1 log l −1 −1/2 −1 −1/2 −2 log l q−1/2 = σw l (1 + Cσw l + C 2 σw + o( )) 2 l l l X 1 log r −3 log r −1 −1/2 −2 −1 p= 1 − C(σw r + Cσw r + C 2 σw + o( 3/2 ))) + Θ(r−3/2 ) 3/2 2 r r r=1 −1 1/2 −2 = l − 2Cσw l − C 2 σw log l + O(1) which is what we want. 31 Lemma C.16. Let φ is antisymmetric. Then for τ ∈ [0, π/2], Z √ √ q q 1 Wφ(q, q cos τ ) = lim dw dw0 Υ(w, w0 ; τ )φ( √ (w + w0 ))φ( √ (w0 − w)) t→τ π sin t w0 ≥|w| 2 2 Z π Z ∞ 2 1 √ dθΣ( qr, θ; τ ) r dre−r /2 = π 0 0 Z π Z 1 ∞ −1 −s2 q −1 /2 dθΣ(s, θ; τ ) s dsq e = π 0 0 Z π Z ∞ 2 −1 1 ∂ = dθ dse−s q /2 Σ(s, θ; τ ) π 0 ∂s 0 w2 1 where Υ(w, w0 ; τ ) := e− 2 ( 1−c + φ(s sin θ)φ(s sin(θ − τ )). (w0 )2 1+c ) (w0 )2 1−c 1 − e− 2 ( 2 w + 1+c ) with c = cos τ , and Σ(s, θ; τ ) := Of course, in the above lemma, the limit in the first equation is only necessary when τ = 0 or τ = π/2. Proof. Let c := cos τ and Γ := Wφ(q, cq) =  where Σ = 1 √ 2πq 1 − c2 Z dz exp(−zT Σ−1 z/2)φ(z)φ(z 0 ),  cq . q q cq Our proof will have two portions: Symmetrization of the Γ integral and trigonometric change of variables for evaluation.   −1 1 1 Symmetrization. Σ is diagonalized by Ω = √2q , 1 1 Σ = ΩT Diag(1 − c, 1 + c)Ω. By a change of variable w = Ωz, so that dw = q −1 dz, we have Z √ √ q 0 q 1 T −1 √ dw exp(−w Diag(1 − c, 1 + c) w/2)φ( √ (w − w))φ( √ (w + w0 )) Γ= 2 2 2 2π 1 − c Z √ √ (w0 )2 q 0 q w2 1 + 1+c ) 0 − 12 ( 1−c 0 √ = dw dw e φ( √ (w − w))φ( √ (w + w )) 2 2 2π 1 − c2 By a change of variable swapping w with w0 , we get Γ=− 1 2π 1 − c2 √ Z 1 dw dw0 e− 2 ( Thus 2Γ = 1 2π 1 − c2 √ Z (w0 )2 1−c 2 w + 1+c ) √ √ q q φ( √ (w + w0 ))φ( √ (w0 − w)) 2 2 √ √ q q dw dw0 Υ(w, w0 ; τ )φ( √ (w + w0 ))φ( √ (w0 − w)) 2 2 where 1 w2 Υ(w, w0 ; τ ) = e− 2 ( 1−c + (w0 )2 1+c ) 1 − e− 2 ( (w0 )2 1−c 2 w + 1+c ) . Note that, by the antisymmetry of φ, the integrand K := Υ(w, w0 ; τ )φ(. . .)φ(. . .) above has the symmetries K(w, w0 ) = K(w0 , w) = K(w, −w0 ), and is everywhere nonnegative. Fig. C.10 displays a contour plot of K for typical values of q and c. So Z 1 Γ= √ dw dw0 K(w, w0 ). π 1 − c2 w0 ≥|w| 32 Figure C.10: The integrand of Γ after symmetrization. Here c = .2 and q = 100 and φ = tanh. This gives the first equation in the lemma. Polar Coordinates. Let √w 1−c 0 = r cos θ, √w = r sin θ, so that 1+c √ √ τ w = r cos θ 1 − c = 2r cos θ sin 2 √ √ τ 0 w = r sin θ 1 + c = 2r sin θ cos 2 p dw dw0 = 1 − c2 r dr dθ = (sin2 τ )r dr dθ. Then Z w2 e−( 1−c + A := (w0 )2 1+c )/2 p p φ( q/2(w + w0 ))φ( q/2(w0 − w)) dw dw0 w0 ≥|w| = sin2 τ ∞ Z r dre−r 2 /2 0 Similarly, let √w 1+c π−τ /2 Z √ √ dθφ( qr sin(θ + τ /2))φ( qr sin(θ − τ /2)). τ /2 0 = r cos θ, √w = r sin θ, so that 1−c √ √ τ w = r cos θ 1 + c = 2r cos θ cos 2 √ √ τ 0 w = r sin θ 1 − c = 2r sin θ sin 2 p dw dw0 = 1 − c2 r dr dθ = (sin2 τ )r dr dθ, and Z w2 e−( 1+c + B= (w0 )2 1−c )/2 p p φ( q/2(w + w0 ))φ( q/2(w0 − w)) dw dw0 w0 ≥|w| = − sin2 τ Z = − sin2 τ Z ∞ r dre−r 2 /2 0 0 Z π/2+τ /2 √ √ dθφ( qr cos(θ + τ /2))φ( qr cos(θ − τ /2)) π/2−τ /2 ∞ r dre−r 2 /2 Z τ /2 √ √ dθφ( qr sin(θ + τ /2))φ( qr sin(θ − τ /2)). −τ /2 Thus 1 (A − B) π 1 − c2 Z Z π−τ /2 2 1 ∞ √ √ = r dre−r /2 dθφ( qr sin(θ + τ /2))φ( qr sin(θ − τ /2)) π 0 −τ /2 Z ∞ Z π 2 1 √ √ = r dre−r /2 dθφ( qr sin(θ))φ( qr sin(θ − τ )). π 0 0 Γ= √ 33 This gives the second equation in the lemma, and a change of variables s = √ qr gives the third. For the fourth equality, we start from the third equality, and apply integration by parts: Z π Z 2 −1 1 ∞ dθΣ(s, θ; τ ) s dsq −1 e−s q /2 π 0 0 Z ∞ Z 2 −1 1 π = dssq −1 e−s q /2 Σ(s, θ; τ ) dθ π 0 0  Z ∞ Z π  ∞ 2 −1 2 −1 ∂ 1 dse−s q /2 Σ(s, θ; τ ) = + dθ −e−s q /2 Σ(s, θ; τ ) π 0 ∂s 0 s=0 Z π Z ∞ 2 −1 ∂ 1 dθ dse−s q /2 Σ(s, θ; τ ). = π 0 ∂s 0 2 −1 where the last equality follows because Σ(0, θ; τ ) = 0 and e−s q /2 → 0 as s → ∞. In the following lemmas, the “2” is not important, and can be any arbitrary finite or infinite value. Lemma C.17. Suppose a function f : (0, 2) → R is C k on (0, 2). If limx↓0 f (i) (x) exists and is finite for every i ∈ [0, k], then f can be extended to [0, 2) such that one sided ith derivatives exist at 0 for all i ∈ [0, k]. R1 Proof. Consider f (i) (0) := f (i) (1) − 0 f (i+1) (x) dx for i ∈ [0, k − 1], which naturally is also R equal to f (i) () − 0 f (i+1) (x) dx for any  > 0. Certainly f (i) (x) → f (i) (0) as x → 0 if this limit exists — and by assumption it does, for 0 ≤ i ≤ k − 1. Therefore, we can define the extension of f (i) to x = 0 to be f (i) (0) := f (i) (0). But we need to check that for i ∈ [0, k − 1]. 1 lim (f (i) () − f (i) (0)) = f (i+1) (0)  →0 so that all one sided ith derivatives exist. But Z 1 (i) 1  (i+1) (f () − f (i) (0)) = f (x) dx   0 Z 1 = f (i+1) (0) + (f (i+1) (x) − f (i) (0))I(x ∈ [0, ]) dx 0 Since limx↓0 f (i+1) (x) = f (i+1) (0), f (i+1) (x)−f (i+1) (0) is bounded for small x, and by dominated R1 R1 convergence, 0 (f (i+1) (x) − f (i) (0))I(x ∈ [0, ]) dx → 0 0 dx = 0 as  → 0. Thus 1 lim (f (i) () − f (i) (0)) = f (i+1) (0) →0  as desired. Lemma C.18. If f : [0, 2) → R is C k on (0, 2) and has one sided derivatives at 0 up to order k, then f () = f (0) + f (1) (0) + · · · + for any i ≤ k. 34 i−1 (i−1) f (0) + O(i ) (i − 1)! Proof. We have  Z f (1) (x) dx Z  (1) = f (0) + f (0) + f (1) (x) − f (1) (0) dx 0 Z  Z x0 f (2) (x2 ) dx2 dx1 = f (0) + f (1) (0) + 0 0 Z  Z x1 2 (2) (1) f (2) (x2 ) − f (2) (0) dx2 dx1 = f (0) + f (0) + f (0) + 2 0 0 .. . Z  Z x1 Z xi−1 i−1 (i−1) f () = f (0) + f (1) (0) + · · · + f (0) + dx1 dx2 · · · dxi f (i) (xi ) (i − 1)! 0 0 0 f () = f (0) + 0 for any i ≤ k. It suffices then to bound the size of the integral. Since f (i) (x) → f (i) (0) as x ↓ 0 by assumption, |f (i) (xi )| is bounded by some constant C on the integration region A := {(x1 , . . . , xi ) :  ≥ x1 ≥ · · · ≥ xi } for small enough . Therefore, Z  Z x1 Z xi−1 dx1 dx2 · · · dxi f (i) (xi ) 0 0 0 Z = f (i) (xi )I(~x ∈ A) d~x ≤ C|A| = Θ(i ). As a corollary, Lemma C.19. If f : (0, 2) → R is smooth on (0, 2) and limx→0 f (i) (x) exists and is finite for all i, then f can be extended to [0, 2) and be one-sided smooth at 0, and f () = f (0) + f (1) (0) + · · · + i−1 (i−1) f (0) + O(i ) (i − 1)! for any i. Lemma C.20. Let φ = tanh. For any fixed c, Wφ(q, cq) is smooth (infinitely differentiable) on q ∈ (0, ∞). As a function of Q := q −1 , it can be extended smoothly to the point Q = 0, so that Wφ(q, cq) = 0lim Wφ(q 0 , cq 0 ) + q −1 0lim ∂Wφ(q 0 , cq 0 )/∂(q 0 )−1 + · · · q →∞ q →∞ −i+1 + q lim ∂ i−1 Wφ(q 0 , cq 0 )/∂(q 0 )−i+1 + O(q −i ) (i − 1)! q0 →∞ for any i ≥ 0. Furthermore, for c bounded away from 1, the constants hidden O can be taken independent of c. Proof. Smoothness on (0, ∞). By the third equation of Lemma C.16, for Q ∈ (0, ∞) ⇐⇒ q ∈ (0, ∞), Z Z 1 ∞ ∂ n  −s2 Q/2  π s ds Qe dθ|φ(s sin θ)φ(s sin(θ − τ ))| π 0 ∂Qn 0 Z ∞ ∂ n  −s2 Q/2  Qe < ∞, ≤ s ds ∂Qn 0 so by Leibniz’s integral rule and a simple induction, all derivatives of Wφ(q, cq) against Q exists for any Q ∈ (0, ∞). 35 k Extension to Q = 0. By Lemma C.19, it suffices to show that the limit of ∂ Wφ(q,cq) exists and ∂Qk is finite as Q → 0, for all k. Let τ = arccos c. By the fourth equation of Lemma C.16, we have explicitly Z Z ∞ 2 1 π ∂ ∂ k Wφ(q, cq) 2 = dθ ds(−s /2)k e−s Q/2 Σ(s, θ; τ ) ∂Qk π 0 ∂s 0 Z ∞ Z 2 ∂ (−2)−k π ds s2k e−s Q/2 Σ(s, θ; τ ) = dθ π ∂s 0 0 for any Q ∈ (0, ∞). Note that for φ = tanh, φ̇ = sech2 , ∂ Σ(s, θ; τ ) = sin θφ̇(s sin θ)φ(s sin(θ − τ )) + sin(θ − τ )φ(s sin θ)φ̇(s sin(θ − τ )). ∂s ∂ k Wφ ∂Qk as follows: Z ∞ 2 ∂ k Wφ(q, cq) (−2)−k π = dθ ds s2k e−s Q/2 sin θφ̇(s sin θ)φ(s sin(θ − τ )) k ∂Q π 0 0 Z ∞ −k Z π 2 (−2) + dθ ds s2k e−s Q/2 sin(θ − τ )φ(s sin θ)φ̇(s sin(θ − τ )) π 0 0 We show that for each piece, the limit as Q → 0 exists and is finite, for any k. This will prove the smooth extendability of Wφ to Q = 0. We will do this for the first piece; the second is similar. We split the integral of Z For Q > 0, the integrand is absolutely integrable, so we may switch the integrals. Z π Z ∞ 2 dθ ds s2k e−s Q/2 sin θφ̇(s sin θ)φ(s sin(θ − τ )) 0 Z 0∞ Z π 2k −s2 Q/2 = dss e dθ sin θφ̇(s sin θ)φ(s sin(θ − τ )) 0 0 We now try to bound the inner integral by an exponentially decreasing term e−sµ for some µ; clearly, by monotone convergence on the outer integral as Q → 0, this would show the limit of the integral exists and is finite. Because φ is odd and φ̇ is even, the inner integrand is negative on θ ∈ [0, τ ) and positive on θ ∈ (τ, π]. We will break up the inner integral as follows, for some fixed  > 0 satisfying τ −  > 0 independent of s (recall τ ∈ (0, π/2]). Z π dθ sin θφ̇(s sin θ)φ(s sin(θ − τ )) 0 Z  Z π  Z π− = + dθ sin θφ̇(s sin θ)φ(s sin(θ − τ )) + dθ sin θφ̇(s sin θ)φ(s sin(θ − τ )) 0 π−  2 −z Now because φ̇(z) = sech (z) ≤ 2e , and sin θ ≥ sin  on θ ∈ [, π − ], Z π− dθ sin θφ̇(s sin θ)φ(s sin(θ − τ ))  Z ≤2 π− dθ exp(−s sin )  = 2(π − 2) exp(−s sin ). For the other part: Z π dθ sin θφ̇(s sin θ)φ(s sin(θ − τ )) π− Z 0 sin(π − θ)φ̇(s sin π − θ)φ(s sin(π − θ − τ )) d(π − θ) =  Z =  dθ sin θφ̇(s sin θ)φ(s sin θ + τ ) 0 36 so that  Z Z π  dθ sin θφ̇(s sin θ)φ(s sin(θ − τ )) + 0 π−  Z dθ sin θφ̇(s sin θ)[φ(s sin(τ + θ)) − φ(s sin(τ − θ))] = 0 But by intermediate value theorem, φ(s sin(τ +θ))−φ(s sin(τ −θ)) = 2θ∂φ(s sin(τ +θ))/∂θ|θ=ψ = 2θφ̇(s sin(τ + ψ))s cos(τ + ψ) for some ψ ∈ [−θ, θ]. By the assumption on , φ(s sin(τ + θ)) − φ(s sin(τ − θ)) ≤ 2φ̇(s sin(τ − ))s cos(τ − ). Then Z  dθ sin θφ̇(s sin θ)[φ(s sin(τ + θ)) − φ(s sin(τ − θ))] Z 0 ≤ dθ sin θφ̇(s sin θ)2φ̇(s sin(τ − ))s cos(τ − ) 0 ≤ 2φ̇(s sin(τ − ))s cos(τ − )O(1) Because τ −  > 0 by assumption on , and because φ̇(z) = exp(−Θ+ (z)), this quantity is exp(−Θ+ (z)), as desired (here Θ+ denotes a positive quantity). Thus Z π dθ sin θφ̇(s sin θ)φ(s sin(θ − τ )) Z  Z π  Z = + dθ sin θφ̇(s sin θ)φ(s sin(θ − τ )) + 0 0 π− π− dθ sin θφ̇(s sin θ)φ(s sin(θ − τ ))  = exp(−Θ+ (s)) k Wφ and similarly for the other piece of ∂∂Q k , so that Z ∞ Z π 2k −s2 Q/2 dss e dθ sin θφ̇(s sin θ)φ(s sin(θ − τ )) 0 Z 0∞ 2Q = dss2k e−s 2 −Θ+ (z) Z0 ∞ → dss2k e−Θ+ (z) 0 is finite as Q → 0, by monotone convergence. Independence of constant hidden in O((q 0 )−i ). The constant hidden is a function of the  chosen above, which depend on τ , but only to the extent that it must satisfy τ −  > 0. As long as we are interested in a set C of c that is bounded away from 1, the corresponding set of τ is bounded away from 0, so  can be taken to be some number smaller than all of the corresponding τ . Lemma C.21. Suppose φ is tanh-like. Then for c ∈ [0, 1], 2 arcsin(c), π and weakly increases to this upper bound as q → ∞. Furthermore, Wφ(q, cq) ≤ • If c = 0 or 1, then equality holds regardless of q. • If c ∈ (0, 1) is held constant, π2 arcsin(c) − Wφ(q, cq) = Θ(q −1 ), where the hidden constants in Θ depend on c. But the constants can be made independent of c if c ∈ [, 1 − ] for some  > 0. Proof. The cases of c = 0 or 1 are obvious by the definition of W. So from here on we assume c ∈ (0, 1). 37 0.35 0.30 Wtanh(0, q, q, q cos 1) 2 arcsin(cos π 1) 0.25 Q= 0.2 0.4 0.6 0.8 1.0 1 q Figure C.11: We verify empirically that the subleading term in W tanh(q, cq) is linear in q −1 , for constant c. Indeed, observe that the curve of of W tanh intersects the y-axis at an angle. Let τ := arccos c. By the first equation of Lemma C.16 and the assumption that φ is tanh-like, it is immediate that Wφ(q, cq) is nondecreasing in q. By dominated convergence, using the second equation of Lemma C.16, we get Z 2 1 ∞ r dre−r /2 (π − 2τ ) lim Wφ(q, cq) = q→∞ π 0 π − 2τ = π 2 = arcsin c. π Then the convergence rate is O(q −1 ) by Lemma C.20 and Taylor’s theorem. Thus to show the convergence rate is Θ(q −1 ), it suffices to show that D := ∂Wφ(q,cq) < 0. But this is apparent from ∂Q the first equation of Lemma C.16: For τ ∈ (0, π/2), Z 1 1 D= dw dw0 Υ(w, w0 ; τ )(− √ Q−3/2 ) π sin τ w0 ≥|w| 2 2 p p 0 × [φ̇( q/2(w + w ))φ( q/2(w0 − w)) p p + φ( q/2(w + w0 ))φ̇( q/2(w0 − w))] <0 since Υ is positive on the integration domain, and φ̇ and φ are both positive for positive arguments, by the assumption of φ being tanh-like. Independence of the constants in Θ(q −1 ) from c when c ∈ [, 1 − ]. By Lemma C.20, the upper constant can be made independent from c. Since D is monotonically decreasing in c (or monotonically increasing in τ ) and |D| is monotonically increasing in c (or monotonically decreasing in τ ), we have |D| > |D| , which can be taken to be the lower constant in Θ(q −1 ). c= Fig. C.11 verifies empirically that the subleading term in W tanh(q, cq) is linear in q −1 , for constant c. Theorem B.4. Suppose φ is a tanh-like nonlinearity in an RRN. Assume e(0) < 1. • If σw = 0, then γ (l) = lWφ(σb2 , σb2 ) + γ (0) = lVφ(σb2 ) + γ (0) and λ(l) = σb2 , so that e(l) → 1 and 1 − e(l) = Θ(l−1 ). As a result, s(l) = p(l) (1 − e(l) ) = Θ(1). 2 2 • If σw > 0, then γ (l) = Θ̌(l π ), and e(l) → 0 like Θ̌(l π −1 ). Thus s(l) = Θ(p(l) ) = Θ(l). Proof. We have by Lemma C.21, γ= 2 arcsin(λ/q) − Θ(q−1 ) + γ. π 38 2 2 Since q = σw p + σb2 by Thm B.2, and λ = σw γ + σb2 by Thm B.3, ! 2 σw γ + σb2 2 γ = arcsin − Θ(q−1 ) + γ. 2 p + σ2 π σw b (l) We claim that γ (l) → ∞ as l → ∞. Otherwise, there  is some C such  that γ ≤ C for all l. For C (l) large enough l, p ≥ ωl for any ω < 1 and arcsin σ2 p(l−1) +σ2 = Θ(1/l) by linearization of w b arcsin. Thus γ (l) = Θ(log l), but this contradicts our assumption that γ is bounded. This proves our claim. Therefore, for large enough l, 2 σw γ + σb2 = γ/p + Θ(l−1 ). 2 p + σ2 σw b Fig. C.12 shows π2 arcsin x vs x. One sees that 1 is an unstable fixed point; if e < 1 − , then 2 π arcsin e < 1 −  − δ for some δ. Thus c drops monotonically until some threshold under which the linearization of arcsin, arcsin x = x + Θ(x3 ), is applicable. So for large enough l, 2 arcsin(γ/p + Θ(l−1 )) − Θ(l−1 ) π 2 = γ/p + O(l−1 ) π γ−γ = 2 2 As p(l) ∼ l by Thm B.2, this difference equation has solution γ = Ω(l π − ), O(l π + ) for any  by using the dynamics of Lemma C.11 to upper and lower bound this difference equation. C.5.2 Backward Dynamics Theorem B.6. For φ = tanh in an RRN, • If σw = 0, χ(m) = χ(l) for all l, m. • If σw > 0, √ √ log(χ(m) /χ(l) ) = A( l − m) + B(log l − log m) + O(1) q 4 2 4 where A = 43 π2 σw and B = 3π − σw 9π . Proof. The σw = 0 case is obvious. We will assume σw > 0 from here on. q Let p(l) = b0 l + b1 l1/2 + b2 log l + O(1). Then for D = 23 π2 , we have (implicitly applying Lemma C.4 and Lemma C.8), −1/2 −1/2 −1 q−1/2 = σw b0 l −1 −1/2 −1 −1 (1 − b1 b−1 l − b2 b−1 l log l + O(l−1 )) 0 2 0 2 Vφ̇(q) = Dq−1/2 + Θ(q−3/2 ) −1/2 −1/2 −1 = Dσw b0 l −1 −1/2 −1 −1 (1 − b1 b−1 l − b2 b−1 l log l + O(l−1 )) 0 2 0 2 −1/2 −1/2 −1 log(BVφ̇(q) + 1) = BDσw b0 l −3/2 −1 − (BDσw b0 l X −2 −1 −1 −1 b1 2−1 + B 2 D2 σw b0 2 )l + Θ(l−3/2 log l) −1/2 1/2 −1 log(BVφ̇(q(r) ) + 1) = 2BDσw b0 l r=1 −3/2 −1 − (BDσw b0 −2 −1 −1 b1 2−1 + B 2 D2 σw b0 2 ) log l + O(1) 39 q −1 −2 2 In our case, we have b0 = 1, b1 = −2Cσw , b2 = C 2 σw , B = σw , C = π2 , which gives r l X 4 4 2 2 4 (r) σw l1/2 + ( − σw ) log l + O(1). log(BVφ̇(q ) + 1) = 3 π 3π 9π r=1 so that (m) χ (l) /χ " r # √ √ 4 4 2 2 4 σw ( l − m) + ( − σw )(log l − log m) + O(1) = exp 3 π 3π 9π Theorem B.7. Suppose φ = tanh. Then in an RRN (l) (l) • If σw = 0, χb = χ(L) Vφ̇(σb2 ) and χw = χ(L) Vφ̇(σb2 )((l − 1)Vφ(σb2 ) + p(0) ), where L is the last layer. • If σw > 0, √ √ (l) /χb ) = A( l − m) + Bb (log l − log m) + O(1) √ √ (l) log(χ(m) m) + Bw (log l − log m) + O(1) w /χw ) = A( l − q where A = 43 π2 σw (same as A in Thm B.6) and Bb = B + 12 , Bw = B − 12 , with (m) log(χb B= 4 3π 2 4 − σw 9π (same as B in Thm B.6). Proof. The σw = 0 case is obvious. We will assume σw > 0 from here on. As in the proof of Thm B.6, −1/2 −1/2 −1 Vφ̇(q) = Dσw b0 where D = 2 3 q l + Θ(l−1 ) 2 π. Thus by Thm B.5, r √ √ 4 2 4 (m) (l) 2 4 log(χ /χ ) = σw ( l − m) + ( − σw )(log l − log m) + O(1) 3 π 3π 9π r √ √ 4 2 4 1 (m) (l) 2 4 log(χb /χb ) = σw ( l − m) + ( − − σw )(log l − log m) + O(1) 3 √π 3π 2 9π Similarly, since p = l + Θ( l) by Thm B.2, we have r √ √ 1 4 2 4 2 4 (m) (l) σw ( l − m) + ( + − σw )(log l − log m) + O(1) log(χw /χw ) = 3 π 3π 2 9π C.6 C.6.1 Tanh: Full Residual Network Forward Dynamics Theorem B.9. Suppose φ is tanh-like. Assume the FRN architecture. • If σw = 0, then p(l) = (σv2 Vφ(σb2 ) + σa2 )l + p(0) , and q(l) = σb2 . • If σw > 0, then p(l) = b0 l + b1 l1/2 + b2 log l + O(1), where b0 = σv2 + σa2 −2Cσ 2 σ −1 b1 = p v w σv2 + σa2 b2 = and C = q 2 π. −2 −C 2 σv4 σw (σv2 + σa2 )2 2 2 2 Additionally, q(l) = σw b0 l + σw b1 l1/2 + σw b2 log l + O(1). 40 Proof. The σw = 0 case is obvious. We will assume σw > 0 from here on. As in Thm B.2, p will have expansion p = b0 l + b1 l1/2 + b2 log l + O(1). Then, for C = −1/2 −1/2 −1 q−1/2 = σw b0 l X Vφ(q r=1 (r) )= l X l q 2 π, −1 −1/2 −1 −1 (1 − b1 b−1 l − b2 b−1 l log l + O(l−1 )) 0 2 0 2 1 − C(q(r) )−1/2 + Θ((q(r) )−3/2 ) r=1 −1/2 1/2 −1 = l − 2Cσw b0 p(l) = σv2 l X l −3/2 −1 −1 + Cσw b1 b0 2 log l + O(1) +σa2 l r=1 −1/2 1/2 −1 = (σv2 + σa2 )l − 2Cσv2 σw b0 l −3/2 −1 −1 + Cσv2 σw b1 b0 2 log l + O(1) which yields b0 = σv2 + σa2 −1/2 −1 b1 = −2Cσv2 σw b0 b2 = −2Cσ 2 σ −1 = p v w σv2 + σa2 −2 −C 2 σv4 σw (σv2 + σa2 )2 Lemma C.22. Suppose φ is tanh-like. Then γ ≤ σv2 and σv2 2 arcsin (λ/q) + σa2 + γ, π 2 arcsin (λ/q) + σa2 + γ − γ = Θ(q−1 ). π Proof. Similar to the proof of Lemma C.21. Lemma C.23. Let u∗ ∈ [0, 1). Let ft : [0, 1) → [0, 1] be a continuous function for each t ∈ N, to each of which we associate two numbers 0 ≤ at ≤ u∗ ≤ bt ≤ 1. Suppose for each t, ft (u) > u for all u ∈ [0, at ) and ft (u) < u for all u ∈ (bt , 1). Assume that for each u, ft (u) − u → 0 as t → ∞ uniformly over u. If at % u∗ and bt & u∗ , then for any u0 ∈ [0, 1), the dynamics ut = ft (ut−1 ) has a limiting point. Furthermore, either ut → u∗ or ut eventually converges monotonically (decreasing or increasing) to a limit point. Proof. Fix a u0 ∈ [0, 1). If ut → u∗ then we are done. Otherwise, suppose there is a neighborhood [u∗ − , u∗ + ] such that for an infinite sequence t1 , t2 , . . ., uti 6∈ [u∗ − , u∗ + ]. WLOG assume uti < u∗ −  for all i and (ti )i is the sequence of all ts that satisfy this inequality. If (ti )i contains {s : s ≥ N } for some N , then for some M > N , for every t > M , at > u∗ − > ut . By assumption, ut is monotonic for all t > M but is bounded above. Thus ut has a fixed point û ≤ u∗ −  as desired. Now assume there are infinite is such that ti − 1 6= ti−1 (i.e. ti − 1 is not part of the sequence (ti )i ). We will show that this case is contradictory. Take T large enough such that at > u∗ − /2 and |ft (u) − u| < /4 for all u and for all t ≥ T (T exists by premise). Let j be the smallest index such that tj > T and tj − 1 6= tj−1 . By the definition of j, utj −1 ≥ u∗ − . If utj −1 ≥ u∗ − /2, then by definition of T , u∗ −  > utj = ftj (utj −1 ) > utj −1 − /4 > u∗ − 3/4 > u∗ − , a contradiction. If u∗ −  ≤ utj −1 ≤ u∗ − /2, then by the definition of T , utj −1 ≤ atj −1 so that utj = ftj (utj −1 ) > utj −1 ≥ u∗ − , a contradiction. The “furthermore” claim is clear from our proof above. Theorem B.11. Assume φ = tanh in an FRN. Suppose e(0) < 1. 41 • If σw = 0, then λ(l) = σb2 and γ (l) = l(σv2 Wφ(σb2 , σb2 ) + σa2 ) + γ (0) = l(σv2 Vφ(σb2 ) + σa2 )+γ (0) . Thus e(l) → 1 and 1−e(l) = Θ(l−1 ). As a result, s(l) = p(l) (1−e(l) ) = Θ(1). • If σw > 0, then e(l) converges to the unique fixed point e∗ 6= 1 determined by the equation 1 2 e∗ = 2 [σv2 arcsin (e∗ ) + σa2 ]. 2 σv + σa π ∗ Furthermore, e(l) converges to e∗ polynomially: |e(l) − e∗ | is Θ̌(l−δ ), where δ ∗ := 1 − 2 1 σv2 1 2 p ∈ [ − 1, ) 2 2 ∗ 2 π 1 − (e ) σv + σa π 2 Since e∗ < 1, s(l) = Θ(p(l) ) = Θ(l). Proof. The σw = 0 case is obvious. We will assume σw > 0 from here on. If σa = 0, then e∗ as defined above is 0, and e = as before. γ p 2 decreases as Θ(l π −1 ) to 0, by the same reason So from now on suppose σa > 0. We apply Lemma C.23 first to show that e converges. We have σv2 Wφ(q, cq) + σa2 = ep − ep = ep − ep + ep − ep = (e − e)p + e(p − p) p = (p − p)[(e − e) + e] p−p p σv2 Wφ(q, cq) + σa2 +e = (e − e) σv2 Vφ(q) + σa2 p−p   p − p σv2 Wφ + σa2 −e =e−e p σv2 Vφ + σa2 i h 2 (l) (l−1) σv2 Wφ(q(l) ,c(l) q(l) )+σa If we define fl (u) := p −p − u + u (the LHS of the above), then p(l) σ 2 Vφ(q(l) )+σ 2 v a fl (u) − u = O(l−1 ) uniformly for all u because p(l) = Θ(l), p(l) − p(l−1) = Θ(1), and the part in the bracket is O(1), with constants all (able to be taken) independent of u. We divide [0, 1) into the following intervals I1 = [1, 1/2), I2 = [1/2, 3/4), I3 = [3/4, 7/8), . . .. For each Ik , it is clear that the trajectories of e(l) = fl (e(l−1) ) with e(0) ∈ Ik will fall into some interval Jk bounded away from 1 for all l ≥ L, for large enough h 2L2 (dependent2 on k). Theniwe can apply Lemmas C.1, C.5 (l) (l−1) σv π arcsin(u)+σa and C.21 to get fl (u) = p −p − u + o(1) + u where the constants in o(1) σ 2 +σ 2 p(l) v a is uniform for all e(0) ∈ Ik . For u < e∗ (as defined in the theorem statement), 2 σ 2 2 arcsin(u)+σa e∗ , v π σ2 +σ2 v a 2 2 σv2 π arcsin(u)+σa 2 σv2 +σa >u < u (see Fig. C.12). Thus as l → ∞, the o(1) term gets smaller h 22 i 2 σ arcsin(u)+σa and smaller, and this monotonicity holds for fl (u) − u = v π σ2 +σ2 − u + o(1) > 0 (resp. and for u > v a < 0) on larger and larger intervals [0, al ] ∩ Jk (resp. [bl , 1) ∩ Jk ). This proves all the preconditions for Lemma C.23, which yields that Ik converges to a limit point. As this argument is independent of k, we have that for all e(0) ∈ [0, 1), e(l) converges. Now we solve for the limit point. Suppose e has limit point e† (possibly different from e∗ described in the theorem); if we express γ (l) = (e† + (l) )p(l) , then σv2 Wφ(q, cq) + σa2 = γ − γ = (e† + )p − (e† + )p = e† (p − p) + p − p p σv2 Wφ(q, cq) + σa2 = e† +  + ( − ) 2 2 σv Vφ(q) + σa p−p 42 1.0 2 sin-1 (x) π 0.5 1.5 × 2 sin-1 (x) π +0.5 1.5+0.5 -1.0 0.5 -0.5 1.0 0.5 × 2 sin-1 (x) π +1.5 0.5+1.5 -0.5 x -1.0 Figure C.12: Graph of y(e) = 22 1 2 +σ 2 [σv π σv a arcsin(e) + σa2 ] for various σv and σa . As l → ∞, c ∼ e → e† , and Wφ(q, e† q) → π2 arcsin(e† ), and Vφ(q) → 1. Additionally, p/(p − p) = Θ(l) and  = o(1) so that  −  = o(l−1 ). Then we have, taking limits l → ∞, σv2 π2 arcsin(e† ) + σa2 = e† . σv2 + σa2 Since fl (as defined above) repels points away from 1, the only solution for e† when e(0) < 1 is e† = e∗ as specified in the theorem statement. We defer the proof of the convergence rate to e∗ to Thm C.25. Lemma C.24. Let e∗ be the stable fixed point determined by σa and σv . Then as long as σv > 0, 1 1 2 2 σv2 p ∈( , ] 2 2 ∗ 2 π 1 − (e ) σv + σa 2 π Proof. Write ρ := 2 σa σv2 . By definition of e∗ , we get 2 arcsin e∗ + ρ π e∗ − π2 arcsin e∗ ρ== 1 − e∗ Substituting ρ into the expression in question, it follows that we want to show  −1 1 − π2 arcsin e∗ 2 2 1 2 ∗ 2 −1/2 −1 ∗ 2 −1/2 (1 − e ) (1 + ρ) = (1 − e ) ∈( , ] ∗ π π 1−e 2 π e∗ = (1 − ρ) for e∗ ∈ [0, 1) (the endpoint at 1 is not included since σv > 0. But this is 2 2 (1 − e∗ )1/2 (1 + e∗ )−1/2 (1 − arcsin e∗ )−1 . π π Set g(e∗ ) to be this expression. We could proceed by finding critical points, but a simple plot Fig. C.13 shows that g is decreasing on [0, 1), with extremal values at the end points: g(e∗ ) ∈ [ lim g(e∗ ), g(0)), ∗ e →1 for e∗ ∈ [0, 1). √ For the limit, we note that arcsin e∗ has an asymptotic expansion π2 − 2(1 − π 1 e)1/2 + Θ((1 − e)3/2 ) at 1, so that (1 − e∗ )1/2 (1 − π2 arcsin e∗ )−1 → √ , and g(e∗ ) → as 2 2 2 e∗ → 1. Obviously g(0) = 2 π. Theorem C.25. If e(0) < 1, then |e(l) − e∗ | is Ω(l−δ δ ∗ := 1 − ∗ −ε σv2 ) and O(l−δ ∗ +ε ) for any ε > 0, where 2 1 2 1 p ∈ [1 − , ), π 1 − (e∗ )2 σv2 + σa2 π 2 where the bounds on the right follow from Lemma C.24. 43 0.64 0.62 0.60 g[* ] 0.58 1 2 0.56 2 π 0.54 0.52 0.2 0.4 0.6 0.8 1.0 * Figure C.13: Plot of g(e∗ ) in the proof of Lemma C.24 Proof. Define ω(q, c) = π2 arcsin(c) − W tanh(q, cq). By Lemma C.21, for large enough l, c is close to e∗ bounded away from 0 or 1, so that ω(q, c) = Θ(q−1 ) with the constant hidden in Θ independent of c. Additionally, by Lemma C.5, 1 − V tanh(q) = Θ(q−1/2 ). Therefore, 2 arcsin(e∗ + ) − ω(q, c)) + σa2 + γ π 2  + Θ(2 )] − Θ(l−1 ) + σa2 + γ = σv2 [arcsin(e∗ ) + p π 1 − (e∗ )2  2 = e∗ (σv2 + σa2 ) + (e∗ + )p + σv2 p + Θ(2 ) − Θ(l−1 ) π 1 − (e∗ )2  2 e∗ (p − p − σv2 − σa2 ) = p − p + σv2 p + Θ(2 ) − Θ(l−1 ) π 1 − (e∗ )2 2  e∗ σv2 (Vφ(q) − 1) = p − p + σv2 p + Θ(2 ) − Θ(l−1 ) π 1 − (e∗ )2 1 2 1  = (e∗ σv2 (1 − Vφ(q)) + Θ(2 ) − Θ(l−1 ) + (p + σv2 p )) p π 1 − (e∗ )2 (e∗ + )p = σv2 ( = Θ(l−3/2 ) + (1 − δ (l) /l) where l 2 1 2 (σ Vφ(q) + σa2 − σv2 p ) + Θ(/l) p v π 1 − (e∗ )2 1 2 )/(σv2 + σa2 ) + Θ(/l) = (1 + Θ(l−1/2 ))(σv2 (1 − Θ(l−1/2 )) + σa2 − σv2 p π 1 − (e∗ )2 δ (l) = = δ ∗ + O(l−1/2 ), where δ ∗ := 1− π2 √ ∗ σv2 1 2 2 , which is positive by Lemma C.24. 1−(e∗ )2 σv +σa By taking the δ of Lemma C.11 ∗ to be δ + ε or δ − ε respectively for lower and upper bounding the dynamics of (l) , the solution ∗ ∗ (l) is Ω(l−δ −ε ) and O(l−δ +ε ) for any ε > 0 since 12 > δ ∗ . C.6.2 Backward Dynamics Theorem B.13. Assume φ = tanh in an FRN. • If σw = 0, χ(m) = χ(l) for all l, m. • If σw > 0, then for l ≥ m ≥ 0, √ √ log(χ(m) /χ(l) ) = A( l − m) + B(log l − log m) + O(1) 44 where r 2 σv2 σw p π σv2 + σa2   4 3 σv4 2 B= − σw 9π σv2 + σa2 σv2 + σa2 4 A= 3 Proof. The σw = 0 case is obvious. We will assume σw > 0 from here on. As in the proof of Thm B.6, −1/2 −1 log(χ(m) /χ(l) ) = 2BDσw b0 √ √ ( l − m) −3/2 −1 − (BDσw b0 q 2 where B = σv2 σw , D = 23 π2 , −2 −1 −1 b1 2−1 + B 2 D2 σw b0 2 )(log l − log m) + O(1) b0 = σv2 + σa2 −2Cσ 2 σ −1 b1 = p v w σv2 + σa2 b2 = with C = q 2 π. −2 −C 2 σv4 σw . 2 2 (σv + σa )2 This simplifies to the desired form. Theorem B.14. Suppose φ = tanh in an FRN. • If σw = 0, then (l) χb = σv2 χ(L) Vφ̇(σb2 ) 2 (L) χ(l) Vφ̇(σb2 )((σv2 Vφ(σb2 ) + σa2 )(l − 1) + p(0) ) w = σv χ (L) χ(l) Vφ(σb2 ) v =χ (L) χ(l) . a =χ • If σw > 0, then for l ≥ m ≥ 0, √ √ (l) /χb ) = A( l − m) + Bb (log l − log m) + O(1) √ √ (l) log(χ(m) m) + Bw (log l − log m) + O(1) w /χw ) = A( l − √ √ (m) (l) log(χa /χa ) = A( l − m) + B(log l − log m) + O(1) √ √ (l) log(χ(m) m) + B(log l − log m) + O(1) v /χv ) = A( l − q   σ2 σ σv4 4 3 2 where A = 43 π2 √ v2 w 2 and B = 9π − σ 2 2 2 2 w are as in Thm B.13 and σ +σ σ +σ (m) log(χb σv +σa Bb = B + 1 2 v a v a and Bw = B − 12 . Proof. Similar to Thm B.7. C.7 α-ReLU: Full Residual Network The following can be checked readily Lemma B.15. If α > − 12 , then Vψα (q) = cα q α , where cα = Since ψ̇α = αψα−1 , we have as a corollary, 45 √1 2α−1 Γ π α+ 1 2  . 0.11 0.10 0.09 0.08 0.07 0.06 0.05 0.04 1 p (l) =l 1 ¡ ® 0.03 1 [¾v2 ¾w2® c® (1 ¡ ®)] 1 ¡ ® 0.02 0 2000 4000 6000 8000 10000 Figure C.14: Verification of leading term of Thm C.28 for α = 0.55. Lemma C.26. If α > 21 , then Vψ̇α (q) = α2 cα−1 q α−1 . As a special case, when α = 1, cα = 12 . The following is a trivial computation, but useful for many simplifications. Lemma C.27. cα+1 /cα = 2α + 1. C.7.1 Forward Dynamics 2 Theorem C.28. Suppose we have the nonlinearity φ = ψ1 . Then p(l) = Θ((1 + σv2 σw /2)l ), with the hidden constant depending on the initial condition. Proof. We have 1 2 2 σ (σ p + σb2 ) + σa2 + p 2 v w 1 1 2 + 1)p + (σv2 σb2 + σa2 ). = ( σv2 σw 2 2 By the standard method of characteristic equation, we get that p= p(l) = A + CB l where A = − 2 σa +σb2 σv2 , 2 σv2 σw B =1+ 2 σv2 σw 2 , and C is a coefficient determined by initial conditions. Theorem C.29. Suppose α < 1. We have the following asymptotic expansion 1 p(l) = K1 l 1−α + R(l) where the remainder term  α  −K2 l 1−α log l R(l) ∼ (C − K2 )l log l   C(1−α) l 1−2α 1 if α > if α = if α < 1 2 1 2 1 2 and K2 6= C 1 α 2α 2α 1−α where K1 = [σv2 σw cα (1 − α)] 1−α , K2 = 21 [σv2 cα σw ] (1 − α) 1−α −1 α and C = σa2 . Fig. C.14 verifies the leading coefficient and the exponent of the leading term. Proof. The difference equation governing the evolution of p is p − p = A(p + B)α + C 2α 2 where A = σv2 cα σw , B = σb2 /σw , and C = σa2 . Then Lemma C.15 yields the result. Thm C.29 combined with Thm C.28 gives the following result. 46 f(c) f(c) 0 1.0 1 6 0.8 1 0.6 1 3 2 2 0.4 3 5 6 0.2 1 0.2 0.4 0.6 0.8 1.0 c f(c) -5 1.00 -6  -7 1 2 2 -8 3 1 0.99 2 2 3 0.98 5 5 -9 6 6 0.97 1 1 -10 c 0.96 -11 c 0.96 0.97 0.98 0.99 1.00 c 0.96 0.97 0.98 0.99 1.00 c Figure C.15: (a) Jα for different αs and the identity function. From this plot, it looks like Jα (c) ≥ c and J̇α (c) ≤ 1 for all α ∈ ( 12 , 1] with equality iff c = 1, but this is misleading. (b) shows |Jα (c) − c| in log scale. Where the curves dip below the x-axis indicate points where Jα (c) = c. We see that in fact every Jα has a solution Jα (c) = c for a c < 1, when α < 1. (c) Furthermore, at each such c, J̇α < 1. f(c) 1.0 0.8 1 0.6 c 0.4 0.2 0.2 0.4 0.6 0.8 1.0 c Figure C.16: J1 vs identity Theorem B.16. Suppose we have the nonlinearity φ = ψα . The in an FRN: If α = 1, then 2 p(l) = Θ((1 + σv2 σw /2)l ), with the hidden constant depending on the initial condition. If 0 < α < 1, 1 1 1 2α then p(l) = Θ(l 1−α ). More precisely, liml→∞ p/l 1−α = [σv2 σw cα (1 − α)] 1−α . By [2], we know that Wψα (q, qc) = Vψα (q)Jα (c), where Jα (c) = Jα (arccos c) and Z π/2 1 dη cosα η Jα (θ) := (sin θ)2α+1 Γ(α + 1) . 2πcα (1 − cos θ cos η)1+α 0 (4) Note that Jα (c) ∈ (−∞, ∞) for α ∈ (−1, ∞) and any c ∈ (0, 1), even though Vψα is only defined for α > −1/2. Fig. C.15 shows a comparison of Jα for different αs along with the identity function. By [3, Lemma 11], Jα is an increasing and convex function as long as ψα2 is Gaussian-integrable, which is precisely when α > −1/2. We can compute Jα (1) = Wψα (q, q)/Vψα (q) = 1, and Γ( α + 1 )2 2 2 Jα (0) = Wψα (q, 0)/Vψα (q) = Vψα/2 (q)2 /Vψα (q) = c2α/2 /cα = 2√1 π Γ(α+ . We record these 1 2) observations as a lemma. Lemma C.30. Jα (c) is an increasing and convex function for each α > −1/2 on c ∈ [0, 1]. Jα (1) = 1 and Jα (0) = α 1 2 1 Γ( 2 + 2 ) √ . 2 π Γ(α+ 21 ) For α = 1, Cho and Saul [2] computed 1 p J1 (c) = ( 1 − c2 + (π − arccos(c))c). π Fig. C.16 shows a plot of J1 vs identity. It has derivative J̇1 (c) = 1 − π1 arccos c, which shows that J̇1 (c) < 1 with equality iff c = 1, and consequently J1 (c) ≥ c with equality iff c = 1. At the same time, J̇1 (c) ≥ 0 with equality iff c = −1, so J1 is increasing on [−1, 1]. It has an asymptotic √ 2 2 3/2 expansion J1 (1 − ε) = 1 − ε + 3π  + Θ(5/2 ) at 1. R∞ The zeroth Bessel function of the second kind is defined by K0 (z) = 1 e−zx (x2 − 1)−1/2 dx. It is one of the fundamental solutions to the homogeneous differential equation x2 ẏ + xẏ − x2 y = 0. The following lemma shows that Jα can be expressed in terms of K0 . R∞ 1 Lemma C.31. For any α > −1, Jα (θ) = 2πc sin2α+1 θ 0 dxK0 (x)ex cos θ xα α Proof. Cho and Saul [2] gave the expression Z ∞ Z 2πcα Jα (θ) = csc θ du 0 ∞ 2 dve−(u 0 47 +v 2 −2uv cos θ)/2 sin2 θ α α u v . Note that the integrand is symmetric in u and v. Thus, if V = {(u, v) : u, v ≥ 0 & v ≥ u}, then Z 2 2 2 2πcα Jα (θ) = 2 csc θ du dve−(u +v −2uv cos θ)/2 sin θ uα v α . V √ Now make the change of variables from V to {(p, q) : q ≥ 2 p}: p = uv q=u+v dp dq = (v − u) du dv dp = v du + u dv dq = du + dv du dv = (q2 − 4p)−1/2 dp dq so that we have Z 2πcα Jα (θ) = 2 csc θ 0 ∞ dpep(1+cos θ) csc 2 θ pα Z ∞ √ 2 p dqe−q 2 csc2 θ (q2 − 4p)−1/2 . The inner integral in q can be expressed in terms of K0 by a change of variable x = q2 /2 Z ∞ 2 2 1 dpep(1+cos θ) csc θ pα e−p csc θ K0 (p csc2 θ) 2πcα Jα (θ) = 2 csc θ 2 0 Z ∞ 2 = csc θ dpK0 (p csc2 θ)ep cos θ csc θ pα 0 Z ∞ 2α+1 = sin θ dxK0 (x)ex cos θ xα √ p: 0 Define Lα (θ) = 2πcα Jα (θ) csc2α+1 θ = Lemma C.32. If α > 1, then R∞ 0 dxK0 (x)ex cos θ xα . Lα (θ) = csc2 θ[(2α − 1) cos θLα−1 (θ) + (α − 1)2 Lα−2 (θ)]. Proof. We will prove this claim for θ < 1, and by continuity this also proves the case θ = 1. As remarked above, K0 (z) = K̈0 (z) + z −1 K̇0 (z). Thus Z ∞ Lα (θ) = dx(K̈0 (x) + x−1 K̇0 (x))ex cos θ xα 0 x cos θ α−1 ∞ = K̇0 ex cos θ xα |∞ x |0 0 + K0 e Z − dx[cos θex cos θ xα + αex cos θ xα−1 ]K̇0 Z − dx[cos θex cos θ xα−1 + (α − 1)ex cos θ xα−2 ]K0 p π −z Asymptotically, K0 (z) ∼ as z → ∞ and K0 (z) ∼ − ln(z) as z & 0, and K̇0 (z) ∼ 2z e p π −z − 2z e as z → ∞ and K̇0 (z) ∼ −z −1 as z & 0. Thus, as α > 1, p K̇0 ex cos θ xα |∞ π/2e−x(1−cos θ) xα−1 + lim ex cos θ xα−1 = 0 0 = − lim x→∞ x&0 p x cos θ α−1 ∞ −x(1−cos θ) α−2 K0 e x |0 = − lim π/2e x + lim ex cos θ xα−1 ln x = 0 x→∞ x&0 So Z Lα (θ) = − cos θLα−1 (θ) − (α − 1)Lα−2 (θ) − dx[cos θex cos θ xα + αex cos θ xα−1 ]K̇0 Via another integration by parts, the integral on the right is x cos θ α−1 cos θex cos θ xα K0 |∞ x K0 |∞ 0 + αe 0 Z 2 x cos θ α x cos θ α−1 − dx[cos θe x + 2α cos θe x + α(α − 1)ex cos θ xα−2 ]K0 = −[cos2 θLα (θ) + 2α cos θLα−1 (θ) + α(α − 1)Lα−2 (θ)] 48 where the evaluation terms vanish just like before. Altogether, we have Lα (θ) = cos2 θLα (θ) + (2α − 1) cos θLα−1 (θ) + (α − 1)2 Lα−2 (θ) = csc2 θ[(2α − 1) cos θLα−1 (θ) + (α − 1)2 Lα−2 (θ)] As a corollary we get Lemma C.33. Suppose α > 1. Then Jα (θ) = cos θJα−1 (θ) + (α − 1)2 (2α − 1)−1 (2α − 3)−1 sin2 θJα−2 (θ) Jα (c) = cJα−1 (c) + (α − 1)2 (2α − 1)−1 (2α − 3)−1 (1 − c2 )Jα−2 (c) The derivative of Jα (θ) turns out to be quite simple. Lemma C.34. Suppose α > 0. Then J˙α (θ) = −α2 (2α − 1)−1 Jα−1 (θ) sin θ J̇α (c) = α2 (2α − 1)−1 Jα−1 (c) Proof. We will prove the first formula. The second follows from chain rule. By Lemma C.31, Z 1 sin2α+1 θ dxK0 (x)ex cos θ xα Jα (θ) = 2πcα Z 1 2α ˙ Jα (θ) = [(2α + 1) sin θ cos θ dxK0 (x)ex cos θ xα 2πcα Z − sin2α+2 θ dxK0 (x)ex cos θ xα+1 ] cα+1 csc θJα+1 (θ) cα = (2α + 1) csc θ[cos θJα (θ) − Jα+1 (θ)]. = (2α + 1) cot θJα (θ) − As α + 1 > 1, by Lemma C.33, this is − (2α + 1) csc θ[(α − 1)2 (2α + 1)−1 (2α − 1)−1 sin2 θJα−1 (θ)] = −(α − 1)2 (2α − 1)−1 sin θJα−1 (θ). Thus J̇α (1) = α2 (2α − 1)−1 Jα−1 (1) = α2 (2α − 1)−1 for any α > 0 by Lemma C.30. For 1/2 < α ≤ 1, J̇α (1) ≥ 1 with equality iff α = 1, and for α = 1/2, J̇α (1) = ∞ > 1 by continuity of J̇α (c) in α. Because for α > −1/2, Jα is increasing and convex on [0, 1] and Jα (0) > 0 by Lemma C.30, Jα intersects identity at a unique point away from 1 when α ∈ [1/2, 1). We record this as a theorem. Theorem C.35. For α ∈ [1/2, 1), Jα (c) = c has two solutions: an unstable solution at 1 (”unstable” meaning J̇α (1) > 1) and a stable solution in e∗ ∈ (0, 1) (”stable” meaning J̇α (e∗ ) < 1). This result confirms that pictures presented in Fig. C.17b,c are qualitatively correct, that there are indeed stable fixed points of Jα away from 1. 2 −1 Theorem B.17. Suppose φ = ψ1 . Then in an FRN, e(l) → 1 and 1 − e(l) ∼ [ 14 σv2 σw B U l]−2 for √ 2 B = 1+σv2 σw /2 and U = 23π2 . As a result, s(l) = (1−e(l) )p(l) = Θ(l−2 exp(Θ(l))) = exp(Θ(l)). Proof. If e < 1, then c= 2 σw γ + σb2 ≥e 2 p + σ2 σw b J1 (c) ≥ J1 (e) σ 2 cα qα J1 (c) + σb2 e= v 2 ≥ J1 (e) σv cα qα + σb2 49 f(c) 0 1.0 1 6 0.8 1 0.6 1 3 2 2 0.4 3 5 6 0.2 1 0.2 0.4 0.6 0.8 1.0 f(c) f(c) -5 1.00 -6 1 -7 3 2 2 3 0.98 5 5 -9 6 6 0.97 1 1 -10 c 0.96 -11 c c 1 0.99 2 2 -8 0.96 0.97 0.98 0.99 1.00 c 0.96 0.97 0.98 0.99 1.00 c Figure C.17: Left-to-right: (a) Jα for different αs and the identity function (black, dashed line). J1 is highlighted in red. From this plot, it looks like Jα (c) ≥ c and J̇α (c) ≤ 1 for all α ∈ ( 12 , 1] with equality iff c = 1, but this is misleading. (b) shows |Jα (c) − c| in log scale. Where the curves dip below the x-axis indicate points where Jα (c) = c. We see that in fact every Jα has a solution Jα (c) = c for a c < 1, when α < 1. (c) Furthermore, at each such c, J̇α < 1. (b) and (c) demonstrate the existence of stable fixed points away from 1 for Jα , α ∈ (1/2, 1), which is confirmed rigorously by Thm C.35. but e ≥ J1 (e) > e as noted above. Thus by monotone convergence e converges, and e∗ = 1 is the only possible fixed point. By Lemma C.1, c = e(1 + Θ(p−1 )) = 1 −  + Θ(p−1 ) = 1 − u where u := 1 − Θ(p−1 ). Using the asymptotic expansion J1 (1 − ) = 1 −  + U 3/2 + Θ(5/2 ), we have q (1 − )p = σv2 J1 (1 − u) + σa2 + (1 − )p 2 q −p = σv2 (J1 (1 − u) − 1) − p 2 2q = σv [−u + U u3/2 3/2 + Θ(u5/2 5/2 )] − p 2 1 q  =  [p + σv2 (u − U u3/2 1/2 + Θ(u5/2 3/2 ))] p 2 1 q 2 =  [p − σa + σv2 (Θ(p−1 ) − U u3/2 1/2 + Θ(u5/2 3/2 ))] p 2 2 2q −σa + σv 2 (Θ(p−1 ) − U u3/2 1/2 + Θ(u5/2 3/2 )) ] = [1 + p −σa2 q−1 + 21 σv2 (Θ(p−1 ) − U u3/2 1/2 + Θ(u5/2 3/2 )) = [1 + ] pq−1 2 Let the content of the bracket on the RHS be ℵ. We have pq−1 = (1 + o(1))B/σw . If  = O(p−1 ), −1 then ℵ = 1 − O(p ), but because p is exponentially decreasing, this means  = Θ(1) and does not converge to 0 — this is a contradiction. Therefore,  = ω(p−1 ), and 1 2 U 1/2 (1 + o(1))]  = [1 − B −1 σv2 σw 2 1 2  −  = − B −1 σv2 σw U 3/2 (1 + o(1)) 2 2 −1 Using Lemma C.14 to upper and lower bound our dynamics, we get that (l) ∼ [ 14 σv2 σw B U l]−2 . Lemma C.36. Let φ be any nonlinearity. Suppose Wφ(r, rd) = Vφ(r)K(d) for some twice differentiable function K(d) independent of q, where K(1) = 1 naturally. Suppose further that • K(d) = d has a solution d = e∗ > 0 where K̇(e∗ ) = δ < 1; • K(d) > d for all d < e∗ and K(d) < d for all 1 > d > e∗ ; and • K is nondecreasing. Let (l) := e(l) − e∗ and suppose e(0) < 1. If γ (l) → ∞ and Vφ(q(l) ) → ∞, then (l) → 0 and satisfies   σ 2 + (1 − δ + O())σv2 Vφ(q) = 1− a + Vφ(q)Θ(γ −1 p−1 ). p 50 Proof. First we note that because e∗ is the only stable fixed point of the dynamics x 7→ K(x), with the basin of attraction [0, 1), we can show e(l) → e∗ as in the proof of Thm B.11 (using Lemma C.23). Write V (l) := Vφ(q(l) ). We first show that e(l) → e∗ . When l is large, c= e= 2 σw γ + σb2 = e(1 + O(γ −1 )) 2 σw p + σb2 σv2 V K(c) + σa2 = K(c)(1 + O(V −1 K(c)−1 )). σv2 V + σa2 If γ (l) is bounded for all l, then e → 0 because p(l) → ∞. Since K(c) > 0 for c ∈ [0, 1] and V (l) → ∞, we have that in the limit l → ∞, liml→∞ e = 0 = K(liml→∞ e) = K(0) (by the continuity of K), which is impossible by our assumptions. Thus γ (l) → ∞, and we have liml→∞ e = K(liml→∞ e). By our assumptions, e∗ is the only stable fixed point of K with basin of attraction [0, 1), so this shows that e → e∗ as desired. Now we derive the equation in question. Note that c = e(1 + Θ(γ −1 )) because e∗ < 1. We use the Taylor expansion K(e∗ + ) = e∗ + δ + O(2 ).  (e∗ + )p = σv2 V K (e∗ + )(1 + Θ(γ −1 )) + σa2 + (e∗ + )p = σv2 V (e∗ + δ( + Θ(γ −1 )) + O(2 )) + σa2 + (e∗ + )p p = σv2 V (δ( + Θ(γ −1 )) + O(2 )) + p  = (1 − σa2 + (1 − δ + O())σv2 V ) + Θ(V γ −1 p−1 ) p Theorem B.18. Suppose φ = ψα for 0 < α < 1 in an FRN. Then e converges to the unique nonunit fixed point e∗ of Jα , and |e∗ − e(l) | is Θ̌(l−µ ), where µ = (1 − J̇α (e∗ ))/(1 − α). Additionally, s(l) = Θ(p(l) ) = Θ(l1/(1−α) ). Proof. We apply Lemma C.36. We first check the conditions of the lemma, with K = Jα . The following conditions were already verified. • Jα has a fixed point e∗ less than but very close to 1, where its slope is υ := J̇α (e∗ ) < 1. (Thm C.35) • Jα (d) > d for all d < e∗ and Jα (d) < d for all d > e∗ . (By the convexity shown in Lemma C.30) • Jα is nondecreasing (Lemma C.30). Furthermore, from its integral formula (Eq. (4)), we see easily that Jα is smooth at e∗ < 1. We also proved the following 1 1 2α • p(l) ∼ [σv2 σw cα (1 − α)] 1−α l 1−α (Thm C.29) and γ (l) is asymptotically a constant fraction (l) of p (Lemma C.36), so both go to ∞. 2 • Vψα (q) = cα qα = cα (σw p + σb2 )α = Θ(lα/(1−α) ), so goes to ∞. (Lemma B.15) Thus, for υ = J̇(e∗ ), 2α σa2 + (1 − υ + O())σv2 Vφ(q) (1 − υ)σv2 σw cα ∼ 1−α p p = l−1 (1 − υ)/(1 − α). 51 1 Now, Vφ(q)γ −1 p−1 = Θ(l− 1−α −1 ). By using the dynamics of Lemma C.11 to upper and lower bound our dynamics, we have (l) = Ω(l−µ− ), O(l−µ+ ) for any  > 0, where µ = min((1 − υ)/(1 − α), 1/(1 − α)) = (1 − υ)/(1 − α). C.7.2 Backward Dynamics Lemma C.37. Suppose random variable X ∼ N (0, σ 2 ), and Y = ψ−β (X) for some β > 0, where ψα is α-ReLU. Then for ξ > 0, Y has density Pr[Y ∈ [ξ, ξ + dξ]] = β √ 1 1 2πσ 2 ξ − β −1 e−ξ −2/β /2σ 2 . At ξ = 0, Y has density given by a Dirac delta of mass 21 . Furthermore, Y has finite second moment iff β < 12 . Proof. We have Pr[Y ∈ [ξ, ∞)] = Pr[X ∈ [0, ξ −1/β ]] Z ξ−1/β 2 2 1 =√ e−x /2σ dx. 2 2πσ 0 Differentiating the RHS against ξ using Leibniz’s rule, we get d Pr[Y ∈ [ξ, ∞)]/dξ = √ = 1 2πσ 2 e−ξ −2/β /2σ 2 d −1/β ξ dξ −2/β 1 −1 /2σ 2 √ ξ − β −1 e−ξ . 2 β 2πσ Negating both sides gives the density fY of Y for ξ > 0. For ξ = 0, observe that limξ→0 fY (ξ) = 0 1 −2/β /2σ 2 because, while ξ − β −1 blows up polynomially, e−ξ blows up exponentially. Thus the contribution of Y ’s mass at Y = 0 from X > 0 is 0. On the other hand, all X < 0 gets mapped to Y = 0, so fY (0) = 12 δ0 , where δ0 is the Dirac delta. For the second assertion, observe that fY (ξ) ∼ Thus, ξ 2 fY (ξ) is integrable iff 2 − 1 β √ 1 1 β 2πσ 2 ξ − β −1 as ξ → ∞. − 1 < −1 ⇐⇒ β < 21 . Theorem B.19. Suppose we have the nonlinearity ψα in an FRN. Var(ψ̇α (ζ)2 ) diverges for any Gaussian variable ζ with mean 0 if α ≤ 34 but is finite if α > 43 . Proof. Note that ψ̇α ∝ ψα−1 , so it suffices to show that Var(ψα−1 (ζ)2 ) = Var(ψ2α−2 (ζ)) is infinite for ζ ∼ N (0, σ 2 ). By Lemma C.37 with β = 2 − 2α, ψ2α−2 (ζ) has finite variance iff β < 12 ⇐⇒ α > 34 . Theorem B.20. Suppose we have the nonlinearity ψα in an FRN. If α = 1, then χ(l−m) = m α2 2 χ(l) 12 σv2 σw , + 1 . If α ∈ ( 43 , 1), then χ(l−m) = Θ(1)χ(l) (l/(l − m))R for R = (1−α)(2α−1) where the constants in Θ(1) do not depend on l or m. Proof. If α = 1, then So χ(l−m) /χ(l) = Θ(1)B m 1 2 χ = χ(1 + σv2 σw ). 2 2 for B = 1 + 12 σv2 σw . 52 If 1 2 < α < 1, then χ/χ − 1 is 2 σv2 σw Vφ̇(q) 2 2 = σv2 σw α cα−1 qα−1 2 2 2 = σv2 σw α cα−1 (σw p)α−1 + Θ(pα−2 ) α 1 α−2 α 2α 2 = σv2 σw α cα−1 (K1 l 1−α − K2 l 1−α log l + o(l 1−α log l))α−1 + Θ(l 1−α ) = = 2α 2 σv2 σw α cα−1 [K1α−1 l−1 + Θ(l−2 log l)] 2α 2 σv2 σw α cα−1 K1α−1 l−1 + Θ(l−2 log l) −1 −2 = Rl + Θ(l + O(l −3 by Thm C.29 ) log l) 2α 2 where R = σv2 σw α cα−1 K1α−1 = α2 (1−α)(2α−1) 1 2α and K1 = [σv2 σw cα (1 − α)] 1−α . So χ = χ exp(Rl−1 + Θ(l−2 log l))  R l (l−m) (l) χ = Θ(1)χ l−m as desired. Theorem B.21. If φ = ψ1 in an FRN, then for l ≥ m ≥ 0, (l−m) χb = Θ(1)χ(l) B m , χ(l−m) = Θ(1)χ(l) B l , w χ(l−m) = Θ(1)χ(l) B l , v χ(l−m) = Θ(1)χ(l) B m . a 2 /2. where B = 1 + σv2 σw If φ = ψα in an FRN, for α < 1, then for l ≥ m ≥ 0, (l−m) χb α χ(l−m) = Θ(1)χ(l) lR (l − m) 1−α −R , w = Θ(1)χ(l) lR (l − m)−R−1 , α χ(l−m) = Θ(1)χ(l) lR (l − m) 1−α −R , v χ(l−m) = Θ(1)χ(l) (l/(l − m))R . a Proof. The proof is similar to that of Thm B.7. 53
9cs.NE
On the Geodesic Centers of Polygonal Domains⋆ Haitao Wang arXiv:1607.05824v1 [cs.CG] 20 Jul 2016 Department of Computer Science Utah State University, Logan, UT 84322, USA [email protected] Abstract. In this paper, we study the problem of computing Euclidean geodesic centers of a polygonal domain P with a total of n vertices. We discover many interesting observations. We give a necessary condition for a point being a geodesic center. We show that there is at most one geodesic center among all points of P that have topologically-equivalent shortest path maps. This implies that the total number of geodesic centers is bounded by the combinatorial size of the shortest path map equivalence decomposition of P, which is known to be O(n10 ). One key observation is a π-range property on shortest path lengths when points are moving. With these observations, we propose an algorithm that computes all geodesic centers in O(n11 log n) time. Previously, an algorithm of O(n12+ǫ ) time was known for this problem, for any ǫ > 0. 1 Introduction Let P be a polygonal domain with a total of h holes and n vertices, i.e., P is a multiply-connected region whose boundary is a union of n line segments, forming h + 1 closed polygonal cycles. A simple polygon is a special case of a polygonal domain with h = 0. For any two points s and t, a shortest path or geodesic path from s to t is a path in P whose Euclidean length is minimum among all paths from s to t in P; we let d(s, t) denote the Euclidean length of any shortest path from s to t and we also say that d(s, t) is the shortest path distance or geodesic distance from s to t. A point s is a geodesic center of P if s minimizes the value maxt∈P d(s, t), i.e., the maximum geodesic distance from s to all points of P. In this paper, we study the problem of computing the geodesic centers of P. The problem in simple polygons has been well studied. It is known that for any point in a simple polygon, its farthest point must be a vertex of the polygon [20]. It has been shown that the geodesic center in a simple polygon is unique and has at least two farthest points [18]. Due to these helpful observations, efficient algorithms for finding geodesic centers in simple polygons have been developed. Asano and Toussaint [2] first gave an O(n4 log n) time algorithm for the problem, and later Pollack, Sharir, and Rote [18] solved the problem in O(n log n) time. It had been an open problem whether the problem is solvable in linear time until recently Ahn et al. [1] presented a linear-time algorithm for it. Finding a geodesic center in a polygonal domain P is much more difficult. This is partially due to that a farthest point of a point in P may be in the interior of P [3]. Also, it is easy to construct an example where the geodesic center of P is not unique (e.g., see Fig. 1). Bae, Korman, and Okamoto [4] gave the first-known algorithm that can compute a geodesic center in O(n12+ǫ ) time for any ǫ > 0. They first showed that for any point its farthest points must be vertices of its shortest path map in P. Then, they considered the shortest path map equivalence decomposition (or SPM-equivalence decomposition) [7], denoted by Dspm ; for each cell of Dspm , they computed the upper envelope of O(n) graphs in three-dimensional space, which takes O(n2+ǫ ) time [10], to search a geodesic center in the cell. Since the size of Dspm is O(n10 ) [7], their algorithm runs in O(n12+ǫ ) time. A concept closely related to the geodesic center is the geodesic diameter, which is the maximum geodesic distance over all pairs of points in P, i.e., maxs,t,∈P d(s, t). In simple polygons, due to the property that there always exists a pair of vertices of P whose geodesic distance is equal to the geodesic ⋆ An extended-abstract of this paper will appear in the Proceedings of the 24th Annual European Symposium on Algorithms (ESA 2016). v3 b2 u2 a2 P Fig. 1. The boundary of P consists of an outer and an inner equilateral triangles with their geometric centers co-located. Each of the three thick points is a geodesic center of P. t b3 v1 b1 a1 s v2 u1 a3 u3 Fig. 2. Illustrating the π-range property. Suppose there are three shortest s-t paths through vertices ui and vi with i = 1, 2, 3, respectively. If s and t move along the blue arrows simultaneously (possibly with different “speeds”), then all three shortest paths strictly decreases (it is difficult to tell whether this is true from the figure, so these two blue directions here are only for illustration purpose). The special case happens when the six angles ai and bi for i = 1, 2, 3 satisfy ai = bi for i = 1, 2, 3. diameter, efficient algorithms have been given for computing the geodesic diameters. Chazelle [6] gave the first algorithm that runs in O(n2 ) time. Later, Suri [20] presented an O(n log n)-time algorithm. Finally, the problem was solved in O(n) time by Hershberger and Suri [11]. Computing the geodesic diameter in a polygonal domain P is much more difficult. It was shown in [3] that the geodesic diameter can be realized by two points in the interior of P, in which case there are at least five distinct shortest paths between the two points. As for the geodesic center problem, this makes it difficult to discretize the search space. By an exhaustive-search method, Bae, Korman, and Okamoto [3] gave the first-known algorithm for computing the diameter of P and the algorithm runs in O(n7.73 ) or O(n7 (log n + h)) time. Refer to [5,8,13,15,16,17,19] for other variations of geodesic diameter and center problems (e.g., the L1 metric and the link distance case). 1.1 Our Contributions We conduct a “comprehensive” study on geodesic centers of P. We discover many interesting observations, and some of them are even surprising. For example, we show that even if a geodesic center is in the interior of P, it may have only one farthest point, which is somewhat counter-intuitive. We give a necessary condition for a point being a geodesic center. We also show that there is at most one geodesic center among all points of P that have topologically-equivalent shortest path maps in P. This immediately implies that the interior of each cell or each edge of the SPM-equivalence decomposition Dspm can contain at most one geodesic center, and thus, the total number of geodesic centers of P is bounded by the combinatorial size of Dspm , which is known to be O(n10 ) [7]. Previously, the only known upper bound on the total number of geodesic centers of P is O(n12+ǫ ), which is implied by the algorithm in [4]. These observations are all more or less due to an interesting observation, which we call the π-range property and is one key contribution of this paper. Here we demonstrate an application of the π-range property (see the paper for the details). Let s and t be two points in the interior of P such that t is a farthest point of s in P. Refer to Fig. 2 for an example. Suppose there are three shortest paths from s to t as shown in Fig. 2. The π-range property says that unless a special case happens, there exists an open range of exactly size π (e.g., delimited by the right open half-plane bounded by the vertical line through s in Fig. 2) such that if s moves along any direction in the range for an infinitesimal distance, we can always find a direction to move t such that the lengths of all three shortest paths strictly decrease. Further, if the special case does not happen, we can explicitly determine the above 2 t2 t3 s t1 Fig. 3. Illustrating a geodesic center s with three farthest points t1 , t2 , t3 such that all these four points are in the interior of P. There are three shortest paths from s to each of t1 , t2 , t3 . range of size π. In fact, it is the special case that makes it possible for a geodesic center having only one farthest point. With these observations, we propose an exhaustive-search algorithm to compute a set S of candidate points such that all geodesic centers must be in S. For example, refer to Fig. 3 for a schematic diagram, where a geodesic center s has three farthest points t1 , t2 , t3 and all these four points are in the interior of P. The nine shortest paths from s to t1 , t2 , t3 provide a system of eight equations, which give eight (independent) constraints that can determine the four points s, t1 , t2 , t3 if we consider the coordinates of these points as eight variables. This suggests our exhaustive-search approach to compute candidate points for such a geodesic center s (similar exhaustive-search approaches are also used before, e.g., [3,7]). However, if a geodesic center s has only one farthest point (e.g., Fig. 2), then we have only three shortest paths, which give only two constraints. In order to determine s and t, which have four variables, we need two more constraints. It turns out the π-range property (i.e., the special case) provides exactly two more constraints (on the angles as shown in Fig. 2). In this way, we can still compute candidate points for such s. Also, if a geodesic center has two farthest points, we will need one more constraint, which is also provided by the π-range property (the non-special case). Note that the previous exhaustive-search approaches [3,7] do not need the π-range property. The number of candidate points in S is O(n11 ). To find all geodesic centers from S, a straightforward solution is to compute the shortest path map for every point of S, which takes O(n12 log n) time in total. Again, with the help of the π-range property, we propose a pruning algorithm to eliminate most points from S in O(n11 log n) time such that none of the eliminated points is a geodesic center and the number of the remaining points of S is only O(n10 ). Consequently, we can find all geodesic centers in additional O(n11 log n) time by computing their shortest path maps. Although we improve the previous O(n12+ǫ ) time algorithm in [4] by a factor of roughly n1+ǫ , the running time is still huge. We feel that our observations (in particular, the π-range property) may be more interesting than the algorithm itself. We suspect that these observations may also find applications in other related problems. The paper is lengthy and some discussions are quite tedious, which is mainly due to a considerable number of cases depending on whether a geodesic center and its farthest points are in the interior, on an edge, or at vertices of P, although the essential idea is quite similar for all these cases. The rest of the paper is organized as follows. In Section 2, we introduce notation and review some concepts. In Section 3, we give our observations. In particular, we prove the π-range property in Section 4. Our algorithm for computing the candidate points is presented in Section 5. Finally, we find all geodesic centers from the candidate points in Section 6. 3 2 Preliminaries Consider any point s ∈ P. Let dmax (s) denote the maximum geodesic distance from s to all points of P, i.e., dmax (s) = maxt∈P d(s, t). A point t ∈ P is a farthest point of s if d(s, t) = dmax (s). We use F (s) to denote the set of all farthest points of s in P. For any two points p and q in P, for convenience of discussions, we say that p is visible to q if the line segment pq is in P and the interior of pq does not contain any vertex of P. We use |pq| to denote the (Euclidean) length of any line segment pq. Note that two points s and t in P may have more than one shortest path between them, and if not specified, we use π(s, t) to denote any such shortest path. For simplicity of discussion, we make a general position assumption that any two vertices of P have only one shortest path and no three vertices of P are on the same line. Denote by I the set of all interior points of P, V the set of all vertices of P, and E the set of all relatively interior points on the edges of P (i.e., E is the boundary of P minus V). Shortest path maps. Given a point s ∈ P, a shortest path map of s [7], denoted by SPM (s), is a decomposition of P into regions (or cells) such that in each cell σ, the combinatorial structures of shortest paths from s to all points t in σ are the same, and more specifically, the sequence of obstacle vertices along π(s, t) is fixed for all t in σ. Further, the root of σ, denoted by r(σ), is the last vertex of V ∪ {s} in the path π(s, t) for any point t ∈ σ (hence π(s, t) = π(s, r(σ)) ∪ r(σ)t; note that r(σ) is s if s is visible to t). As in [7], we classify each edge of σ into three types: a portion of an edge of P, an extension segment, which is a line segment extended from r(σ) along the opposite direction from r(σ) to the vertex of π(s, t) preceding r(σ), and a bisector curve/edge that is a hyperbolic arc. For each point t in a bisector edge of SPM (s), t is on the common boundary of two cells and there are two shortest paths from s to t through the roots of the two cells, respectively (and neither path contains both roots). The vertices of SPM (s) include V ∪ {s} and all intersections of edges of SPM (s). If a vertex t of SPM (s) is an intersection of two or more bisector edges, then there are more than two shortest paths from s to t. The map SPM (s) has O(n) vertices, edges, and cells, and can be computed in O(n log n) time [12]. It was shown [4] that any farthest point of s in P must be a vertex of SPM (s). For differentiation, we will refer to the vertices of V as polygon vertices and refer to the edges of E as polygon edges. The SPM-equivalence decomposition Dspm of P [7] is a subdivision of P into regions such that for all points s in the interior of the same region or edge of Dspm , the shortest path maps SPM (s) are topologically equivalent. Chiang and Mitchell [7] showed that the combinatorial complexity of Dspm is bounded by O(n10 ) and Dspm can be computed in O(n11 ) time. Directions and ranges. In this paper, we will have intensive discussions on moving points along certain directions. For any direction r, we represent r by the angle α(r) ∈ [0, 2π) counterclockwise from the positive direction of the x-axis. For convenience, whenever we are talking about an angle α, unless otherwise specified, depending on the context we may refer to any angle α + 2π · k for k ∈ Z. For any two angles α1 and α2 with α1 ≤ α2 < α1 + 2π, the interval [α1 , α2 ] represents a direction range that includes all directions whose angles are in [α1 , α2 ], and α2 − α1 is called the size of the range. Note that the range can be open (e.g., (α1 , α2 )) and the size of any direction range is no more than 2π. Consider a half-plane h whose bounding line is through a point s in the plane. We say h delimits a range of size π of directions for s that consists of all directions along which s will move towards inside h. If h is an open half-plane, then the range is open as well. A direction r for s ∈ P is called a free direction of s if we move s along r for an infinitesimal distance then s is still in P. We use Rf (s) to denote the range of all free directions of s. Clearly, if s ∈ I, Rf (s) contains all directions; if s ∈ E, Rf (s) is a (closed) range of size π; if s ∈ V , Rf (s) is delimited by the two incident polygon edges of s. 4 3 Observations Consider any point s ∈ P and let t be any farthest point of s. Recall that t is a vertex of SPM (s) [4]. Suppose we move s infinitesimally along a free direction r to a new point s′ . Since |ss′ | is infinitesimal, we can assume that s and s′ are in the same cell σ of Dspm . Further, if s is in the interior of σ, then s′ is also in the interior of σ. Regardless of whether s is in the interior of σ or not, there is a vertex t′ ∈ SPM (s′ ) corresponding to the vertex t of SPM (s) in the following sense [7]: If the line segment s′ t′ is a shortest path from s′ to t′ , then st is a shortest path from s to t; otherwise, if s′ , u1 , u2 , . . . , uk , t′ is the sequence of the vertices of V ∪ {s′ , t′ } in a shortest path from s′ to t′ , then s, u1 , u2 , . . . , uk , t is also the sequence of the vertices of V ∪ {s, t} in a shortest path from s to t. In the case that s is on the boundary of σ while s′ is in the interior of σ, there might be more than one such vertex t′ ∈ Dspm corresponding to t (refer to [7] for the details) and we use Mt (s′ ) to denote the set of all such vertices t′ . We should point out that although a vertex in SPM (s) may correspond to more than one vertex in SPM (s′ ), any vertex in SPM (s′ ) can correspond to one and only one vertex in SPM (s) (because s′ is always in the interior of σ). We introduce the following definition which is crucial to the paper. Definition 1. A free direction r is called an admissible direction of s with respect to t if as we move s infinitesimally along r to a new point s′ , d(s′ , t′ ) < d(s, t) holds for each t′ ∈ Mt (s′ ). For T any t ∈ F (s), let R(s, t) denote the set of all admissible directions of s with respect to t; let R(s) = t∈F (s) R(s, t). The following Lemma 1, which gives a necessary condition for a point being a geodesic center of P, explains why we consider admissible directions. Before proving Lemma 1, we introduce some notation and Observation 1. Consider any two points s and t in P. Suppose the vertices of V ∪ {s, t} along a shortest s-t path π(s, t) are s = u0 , u1 , . . . , uk = t. According to our definition on the “visibility”, s is visible to t if and only if k = 1. If s is not visible to t, then k 6= 1 and we call u1 an s-pivot and uk−1 a t-pivot of π(s, t). It is possible that there are multiple shortest paths between s and t, and thus there might be multiple s-pivots and t-pivots for (s, t). We use Us (t) and Ut (s) to denote the sets of all s-pivots and t-pivots for (s, t), respectively. Note that according to our above definition, for any u ∈ Us (t), the line segment su does not contain any polygon vertex in its interior. We have the following observation. Similar results have been given in [3]. Observation 1 Suppose t is a farthest point of a point s. 1. If t is in I, then |Ut (s)| ≥ 3 and t must be in the interior of the convex hull of the vertices of Ut (s). 2. If t is in E, say, t ∈ e for a polygon edge e of E, then |Ut (s)| ≥ 2 and Ut (s) has at least one vertex in the open half-plane bounded by the supporting line of e and containing the interior of P in the small neighborhood of e. Further, Ut (s) has at least one vertex in each of the two open half-planes bounded by the line through t and perpendicular to e. Proof: The proof is similar to those in [3]. The main idea is that if the conditions are not satisfied, then we can always find a point t′ further to s than t, incurring contradiction.  Lemma 1. If s is a geodesic center of P, then R(s) = ∅. Proof: Assume to the contrary that R(s) 6= ∅. Let r be any direction in R(s). Then, r is in R(s, t) for each t ∈ F (s). In other words, r is an admissible direction of s with respect to each t ∈ F (s). Suppose we move s infinitesimally along r to a new point s′ . In the following, we show that dmax (s′ ) < dmax (s), which contradicts with that s is a geodesic center. 5 t∗ t′ e s γs γt rs rt t u u l t′ v Fig. 4. Illustrating the proof of Lemma 1 for the case t′ ∈ E: Fig. 5. Illustrating the definitions of the angles γs and γt . |ut′ | < |ut∗ |. Consider any t′ ∈ F (s′ ), i.e., t′ is a farthest point of s′ . To prove dmax (s′ ) < dmax (s), it is sufficient to show that d(s′ , t′ ) < dmax (s). If t′ is in Mt (s′ ) for any t ∈ F (s), then since r is an admissible direction of s with respect to t, it holds that d(s′ , t′ ) < d(s, t) = dmax (s). In the following, we assume t′ is not in Mt (s′ ) for any t ∈ F (s). Let V (s) be the set of all vertices of SPM (s) that are not in F (s). Let δ = dmax (s)−maxt∈V (s) d(s, t). Note that since |V (s)| is finite, the value δ is well-defined. Also note that the value δ is fixed and does not depend on s′ . Since s moves infinitesimally to s′ , we can assume |ss′ | < δ. Since t′ is a farthest point of s′ , t′ must be a vertex of SPM (s′ ). Let t∗ be the vertex of SPM (s) corresponding to t′ . Note that although a vertex of SPM (s) may correspond to multiple vertices of SPM (s′ ), a vertex of SPM (s′ ) corresponds to one and only one vertex of SPM (s). Hence, the vertex t∗ is unique, and further, Ut′ (s′ ) ⊆ Ut∗ (s). Since t′ is not in Mt (s′ ) for any t ∈ F (s), we know that t∗ is not in F (s) but in V (s). Therefore, d(s, t∗ ) ≤ maxt∈V (s) d(s, t) = dmax (s) − δ. Since ss′ ∈ P, it holds that d(s′ , t′ ) ≤ |s′ s| + d(s, t′ ). Therefore, if we can prove d(s, t′ ) ≤ d(s, t∗ ), since |ss′ | < δ and d(s, t∗ ) ≤ dmax (s) − δ, we can obtain d(s′ , t′ ) ≤ |s′ s| + d(s, t′ ) < δ + dmax (s) − δ = dmax (s). In the sequel, we prove d(s, t′ ) ≤ d(s, t∗ ). If t′ ∈ V, then t∗ must be t′ [7]. Hence, d(s, t′ ) = d(s, t∗ ) and thus d(s, t′ ) ≤ d(s, t∗ ) trivially follows. In the following, we assume t′ 6∈ V. Thus, t′ is either in E or I. Recall that Ut′ (s′ ) ⊆ Ut∗ (s). To prove d(s, t′ ) ≤ d(s, t∗ ), it is sufficient to find a vertex u ∈ Ut′ (s′ ) such that |ut′ | ≤ |ut∗ | because d(s, t′ ) = d(s, u) + |ut′ | and d(s, t∗ ) = d(s, u) + |ut∗ |. To this end, we will make use of Observation 1. 1. If t′ ∈ E, let e be the polygon edge of E that contains t′ . Since t′ is a farthest point of s′ , by Observation 1, there must be a vertex of Ut′ (s′ ) on either open half-plane bounded by lt′ , where lt′ is the line through t′ and perpendicular to e. Since t′ ∈ E, t∗ is either on e or an endpoint of e [7]. In either case, one open half-plane bounded by lt′ contains t∗ and the other does not (e.g., see Fig. 4). Let u be the vertex of Ut′ (s′ ) in the open half-plane bounded by lt′ that does not contain t∗ . Clearly, |ut′ | ≤ |ut∗ | holds. 2. If t′ ∈ I, then since t′ is a farthest point of s′ , by Observation 1, t′ must be in the interior of the convex hull of all vertices of Ut′ (s′ ). Then, regardless of whatever position of t∗ is, there must be a vertex u ∈ Ut′ (s′ ) on the convex hull such that |ut′ | ≤ |ut∗ | holds. The lemma is thus proved.  As explained in Section 1, we will compute candidate points for geodesic centers. As a necessary condition, Lemma 1 will be helpful for computing those candidate points. Consider any point s ∈ P. Let t be a farthest point of s. We need to find a way to determine the admissible range R(s, t). To this end, we will give a sufficient condition for a direction being in R(s, t). We first assume that s is not visible to t, and as will be seen later, the other case is trivial. Let u and v respectively be the s-pivot and the t-pivot of (s, t) in a shortest s-t path π(s, t). Clearly, d(s, t) = |su| + d(u, v) + |vt|. We define du,v (s, t) = |su| + d(u, v) + |vt| as a function of s ∈ R2 and t ∈ R2 . Suppose we move s along a free direction rs with the unit speed and move t along a free direction rt with a speed τ ≥ 0. Let γs denote the smaller angle between the following two rays originated from s (e.g., see Fig. 5): one with direction rs and one with direction from u to s. Similarly, 6 let γt denote the smaller angle between the following two rays originated from t: one with direction rt and one with direction from v to t. In fact, as discussed in [3], if we consider d(s, t) as a four-variate function, the triple (rs , rt , τ ) corresponds to a vector ρ in R4 , and the directional derivative of du,v (s, t) at (s, t) ∈ R4 along ρ, denoted by d′u,v (s, t), and the second directional derivative of du,v (s, t) at (s, t) along ρ, denoted by d′′u,v (s, t), are d′u,v (s, t) = cos γs + τ cos γt , d′′u,v (s, t) = sin2 γt sin2 γs +τ · . |su| |tv| (1) Since τ ≥ 0, d′′u,v (s, t) ≥ 0 always holds. Further, if τ 6= 0, then d′′u,v (s, t) = 0 if and only if sin2 γs = sin2 γt = 0, i.e., each of γs and γt is either 0 or π. In the following, in order to make the discussions more intuitive, we choose to use the parameters rs , rt , and τ instead of the vectors of R4 . For each vertex u ∈ Us (t), there must be a vertex v ∈ Ut (s) such that the concatenation of su, π(u, v), and vt is a shortest path from s to t, and we call such a vertex v a coupled t-pivot of u (if u has more than one such vertex, then all of them are coupled t-pivots of u). Similarly, for each vertex v ∈ Ut (s), we also define its coupled s-pivots in Us (t). The following lemma provides a sufficient condition for a direction being an admissible direction for s with respect to t. Lemma 2. Suppose t is a farthest point of s and s is not visible to t. 1. For t ∈ I, a free direction rs is in R(s, t) if there is a free direction rt for t with a speed τ ≥ 0 such that when we move s along rs with the unit speed and move t along rt with speed τ , each vertex v ∈ Ut (s) has a coupled s-pivot u with either d′u,v (s, t) < 0, or d′u,v (s, t) = 0 and d′′u,v (s, t) = 0. 2. For t ∈ E, a free direction rs is in R(s, t) if there is a free direction rt for t that is parallel to the polygon edge of E containing t with a speed τ ≥ 0 such that when we move s along rs with the unit speed and move t along rt with speed τ , each vertex v ∈ Ut (s) has a coupled s-pivot u with either d′u,v (s, t) < 0, or d′u,v (s, t) = 0 and d′′u,v (s, t) = 0. 3. For t ∈ V, a free direction rs is in R(s, t) if we move s along rs with the unit speed, each vertex v ∈ Ut (s) has a coupled s-pivot u with either d′u,v (s, t) < 0, or d′u,v (s, t) = 0 and d′′u,v (s, t) = 0. Proof: Suppose we move s infinitesimally along rs to s′ . The point t, as a vertex of SPM (s), corresponds to a set Mt (s′ ) of vertices in SPM (s′ ). To prove that rs is an admissible direction for s with respect to t, we need to show that d(s′ , t′ ) < d(s, t) for any t′ ∈ Mt (s′ ). In the following, we discuss the three cases depending on whether s is in I, E, or V. We remark that the proof would be much simpler if we only considered the “non-degenerate” case whether s is in the interior of a cell of the SPM-equivalence decomposition Dspm (because in that case Mt (s′ ) has only one vertex). The case t ∈ I. We first prove the case t ∈ I. We begin with proving the following claim. Claim: Suppose we move s to s′ infinitesimally along a free direction r; if there is a point t∗ in the interior of the convex hull of the vertices of Ut (s) such that d(s′ , v) + |vt∗ | ≤ d(s, t) holds for each v ∈ Ut (s) and d(s′ , v) + |vt∗ | < d(s, t) holds for at least one vertex v ∈ Ut (s), then r is in R(s, t). We prove the claim as follows. Consider any t′ ∈ Mt (s′ ). To prove r ∈ R(s, t), it is sufficient is to show that d(s′ , t′ ) < d(s, t). Since s moves to s′ infinitesimally, the distance between t and t′ is also infinitesimal. Let H be the convex hull of the vertices of Ut (s). By Observation 1, t is in the interior of H. Hence, t′ is also in the interior of H. Further, since t′ ∈ Mt (s′ ) and Ut′ (s′ ) ⊆ Ut (s), it holds that d(s′ , t′ ) = minv∈Ut (s) (d(s′ , v) + |vt′ |). If t′ = t∗ , because there exists a vertex v ∈ Ut (s) with d(s′ , v) + |vt∗ | < d(s, t), we can obtain ′ d(s , t′ ) = minv∈Ut (s) (d(s′ , v) + |vt′ |) < d(s, t), which proves the claim. Below we assume t′ 6= t∗ . 7 v1 u1 s t v2 u2 Fig. 6. Suppose s and t have two shortest paths: πu1 ,v1 (s, t) and πu2 ,v2 (s, t), with s ∈ u1 u2 and t ∈ v1 v2 . If s moves towards u1 and t moves towards v2 (or s moves towards u2 and t moves towards v1 ) for the same speed, then d′ui ,vi (s, t) = 0 and d′′ui ,vi (s, t) = 0 hold for both i = 1, 2. We triangulate H by adding a line segment from t∗ to each vertex of H. Let △vi vj t∗ be a triangle that contains t′ , where vi and vj are two adjacent vertices of H. Since t′ 6= t∗ , it is easy to see that at least one of |t′ vi | < |t∗ vi | and |t′ vj | < |t∗ vj | must hold. Consequently, we can derive the following d(s′ , t′ ) = min (d(s′ , v) + |vt′ |) ≤ min{d(s′ , vi ) + |vi t′ |, d(s′ , vj ) + |vj t′ |} v∈Ut (s) < max{d(s′ , vi ) + |vi t∗ |, d(s′ , vj ) + |vj t∗ |} ≤ d(s, t). The last inequality is due to the condition in the claim that d(s′ , v) + |vt∗ | ≤ d(s, t) holds for each v ∈ Ut (s). The claim is thus proved. Now we are back to prove the lemma for the case t ∈ I. Suppose we move s infinitesimally along rs with the unit speed to s′ , and move t simultaneously along rt with speed τ ; let t∗ be the point where t is located when s arrives at s′ . Since |ss′ | is infinitesimal, |tt∗ | is also infinitesimal. In the following, we will show that t∗ satisfies the condition in the above claim, which will lead to the lemma. For each vi ∈ Ut (s), let ui be the coupled s-pivot of vi such that either d′ui ,vi (s, t) < 0, or d′ui ,vi (s, t) = 0 and d′′ui ,vi (s, t) = 0. Note that dui ,vi (s′ , t∗ ) is the length of a path from s′ to t∗ that is the concatenation of s′ ui , π(ui , vi ), and vi t∗ . Similarly, d(s′ , vi ) + |vi t∗ | is also the length of a path from s′ to t∗ that is the concatenation of π(s′ , vi ), and vi t∗ . Hence, the following holds d(s′ , vi ) + |vi t∗ | ≤ dui ,vi (s′ , t∗ ). (2) On the one hand, for any vi ∈ Ut (s), since either d′ui ,vi (s, t) < 0 or d′ui ,vi (s, t) = 0, we obtain dui ,vi (s, t) ≥ dui ,vi (s′ , t∗ ). Hence, with Inequality (2), we obtain d(s′ , vi ) + |vi t∗ | ≤ dui ,vi (s, t) for any vi ∈ Ut (s). On the other hand, since t ∈ I and t is a vertex of SPM (s), by Observation 1, Ut (s) has at least three vertices. A vertex v of Ut (s) is called a special t-pivot if it has a coupled s-pivot u such that d′u,v (s, t) = 0 and d′′u,v (s, t) = 0 (as shown in [3] this case happens only if rs is towards u and rt is leaving v, or rs is leaving u and rt is towards v; e.g., see Fig 6). It was shown in [3] that Ut (s) has at most two special t-pivots (e.g., see Fig 6). Hence, there is at least one vertex vi ∈ Ut (s) such that d′ui ,vi (s, t) < 0. This implies that d(s, t) > dui ,vi (s′ , t∗ ). With Inequality (2), we have d(s′ , vi ) + |vi t∗ | < d(s, t). The above proves that t∗ satisfies the condition in the claim. Hence, the lemma follows for the case t ∈ I. The case t ∈ V. We proceed on the third case t ∈ V. Recall the definitions of s′ , t′ , and Mt (s′ ) in the beginning of the proof of the lemma. Our goal is to prove d(s, t) > d(s′ , t′ ). Note that since t is a polygon vertex, t′ is either t or on one of the two polygon edges of E incident to t [7]. Consider any vertex v ∈ Ut (s). It has a coupled s-pivot u such that d′u,v (s, t) < 0, or d′u,v (s, t) = 0 and d′′u,v (s, t) = 0. In fact, since t does not move (i.e., τ = 0), it is not possible that both d′u,v (s, t) = 0 and d′′u,v (s, t) = 0 hold. Indeed, since τ = 0, according to Equation (1), d′u,v (s, t) = cos γs and 2 d′′u,v (s, t) = sin|su|γs . Both d′u,v (s, t) = 0 and d′′u,v (s, t) = 0 hold if and only if cos γs = sin γs = 0, which is not possible for any angle γs . Hence, we obtain d′u,v (s, t) < 0. This implies that d(s, t) = du,v (s, t) > |s′ u| + d(u, v) + |vt|. Further, since d(s, t) = |su| + d(u, v) + |vt|, it holds that |su| > |s′ u|. 8 Let v be any vertex of Ut′ (s′ ). By the definitions of s′ and t′ , Ut′ (s′ ) ⊆ Ut (s). Hence, v is in Ut (s). The above shows that v has a coupled s-pivot u with d′u,v (s, t) < 0, and |su| > |s′ u|. Since v ∈ Ut′ (s′ ), s′ u ∪ π(u, v) ∪ vt′ is a shortest path from s′ to t′ . Hence, d(s′ , t′ ) = |s′ u| + d(u, v) + |vt′ |. If t′ = t, then since |su| > |s′ u|, it follows that d(s′ , t′ ) = |s′ u|+d(u, v)+|vt′ | < |su|+d(u, v)+|vt| = d(s, t), which proves the lemma. If t′ 6= t, as discussed above, t′ is on one of the two polygon edges incident to t, which implies that Ut (s) has more than one vertex [7]. We claim that there must exist a vertex v ∈ Ut (s) such that |t′ v| ≤ |tv|. Indeed, suppose to the contrary that |t′ v| > |tv| for every v ∈ Ut (s). Then, since t′ is in Mt (s′ ) and |ss′ | is infinitesimal, |tt′ | is also infinitesimal. Note that π(s, t) cannot be a line segment since otherwise Ut (s) would have only one vertex, incurring contradiction. Also, due to our general position assumption that no three polygon vertices are on the same line, since t is polygon vertex, the last three vertices of any shortest path from s to t are not in the same line. Since |tt′ | is infinitesimal, it holds that d(s, t′ ) = minv∈Ut (s) (d(s, v) + |vt′ |) (similar results were also proved in [3]). Since |t′ v| > |tv| for every v ∈ Ut (s), d(s, t′ ) > minv∈Ut (s) (d(s, v) + |vt|) = d(s, t), which contradicts with that t is a farthest point of s. In light of the above claim, we assume |t′ vi | ≤ |tvi | for a vertex vi ∈ Ut (s). Let ui be the coupled s-pivot of vi such that either d′ui ,vi (s, t) < 0 or d′ui ,vi (s, t) = 0. We have shown above that |sui | > |s′ ui | Note that since t′ ∈ Mt (s′ ), it also holds that d(s′ , t′ ) = minv∈Ut (s) (d(s′ , v) + |vt′ |). Based on the above discussion, we can derive the following, d(s′ , t′ ) = min (d(s′ , v) + |vt′ |) ≤ d(s′ , vi ) + |vi t′ | v∈Ut (s) ≤ |s′ ui | + d(ui , vi ) + |vi t′ | < |sui | + d(ui , vi ) + |vi t| = d(s, t). This proves the lemma for the case t ∈ V. The case t ∈ E. Let e be the polygon edge that contains t. Suppose we move s infinitesimally along rs with the unit speed to s′ and move t simultaneously along rt with speed τ for the same time to a point t∗ (i.e., t∗ is the location of t when s arrives at s′ ). Since |ss′ | is infinitesimal, |tt∗ | is also infinitesimal. Since rt is parallel to e and t is in the interior of e, t∗ is also in the interior of e. Recall that t corresponds to a set Mt (s′ ) of vertices in SPM (s′ ). Our goal is to prove d(s′ , t′ ) < d(s, t) for any t′ ∈ Mt (s′ ). Consider any t′ ∈ Mt (s′ ). Below, we prove that d(s′ , t′ ) < d(s, t). As shown in [7], t′ may be on e or not. In either case, t′ is infinitesimally close to t as |ss′ | is infinitesimal. Consider any vi ∈ Ut (s). Let ui be the coupled s-pivot of v such that either d′ui ,vi (s, t) < 0, or ′ dui ,vi (s, t) = 0 and d′′ui ,vi (s, t) = 0. Hence, dui ,vi (s, t) ≥ dui ,vi (s′ , t∗ ). By Observation 1, at least one vertex of Ut (s) must be in the open half-plane bounded by the supporting line of e and containing the interior of P in the small neighborhood of e; let vj be such a vertex. Since t moves along the direction rt , which is parallel to e, according to Equation (1), it is not possible that d′′uj ,vj (s, t) = 0. This implies that d′uj ,vj (s, t) < 0. Consequently, we obtain duj ,vj (s, t) > duj ,vj (s′ , t∗ ). Next we prove the following claim: For any point q on e that is infinitesimally close to t, it holds that minvi ∈Ut (s) (|s′ ui | + d(ui , vi ) + |vi q|) < d(s, t). Indeed, if q = t∗ , then we have minvi ∈Ut (s) (|s′ ui | + d(ui , vi ) + |vi q|) ≤ |s′ uj | + d(uj , vj ) + |vj q| = duj ,vj (s′ , t∗ ) < duj ,vj (s, t) = d(s, t). Next we assume q 6= t∗ . By Observation 1, Ut (s) has at least one vertex in each of the two open half-planes bounded by lt , where lt is the line through s and perpendicular to e. Without loss of generality, we assume e is horizontal (e.g., see Fig. 7). Hence, there is a vertex v ′ ∈ Ut (s) strictly to the left of lt and a vertex v ′′ ∈ Ut (s) strictly to the right of lt . Since both q and t∗ are infinitesimally close to t, v ′ (resp., v ′′ ) is strictly to the left (resp., right) of both q and t∗ . Without loss of generality, we 9 t q t∗ v t t∗ t′′ e t′ e v ′′ ′ v0 v1 lt Fig. 7. Since v ′ is to the left of both q and t∗ and q is to the left t∗ , it holds that |v ′ q| < |v ′ t∗ |. Fig. 8. Illustrating the proof: |v1 t∗ | > |v1 t′′ | > |v1 t′ |. assume q is to the left of t∗ . Then, we have |qv ′ | < |t∗ v ′ |. Let v ′ be vk for some index k. Consequently, minvi ∈Ut (s) (|s′ ui |+d(ui , vi )+|vi q|) ≤ |s′ uk |+d(uk , vk )+|vk q| < |s′ uk |+d(uk , vk )+|vk t∗ | = duk ,vk (s′ , t∗ ) ≤ duk ,vk (s, t) = d(s, t). Therefore, the above claim is proved. Now we are back to our original problem for proving d(s′ , t′ ) < d(s, t). Depending on whether t′ is on e or not, there are two cases. If t′ is on e, then since t′ is infinitesimally close to t, then by the above claim, it holds that minvi ∈Ut (s) (|s′ ui |+d(ui , vi )+|vi t′ |) < d(s, t). Note that since t′ is in Mt (s′ ), d(s′ , t′ ) = minvi ∈Ut (s) (|s′ ui |+ d(ui , vi ) + |vi t′ |). Hence, we obtain d(s′ , t′ ) < d(s, t). If t′ is not on e, the proof is somewhat similar in spirit to the case t ∈ I. We begin with proving an observation that there must be a vertex v ∈ Ut (s) such that |vt′ | < |vt∗ |. Without loss of generality, we assume e is horizontal. All vertices of Ut (s) are in one of the closed half-planes bounded by le , where le is the horizontal line containing e. Without loss of generality, we assume all vertices of Ut (s) are below or on the line le , i.e., they are in the closed half-plane bounded by le from above (let h denote the half-plane). Since t′ is not on e and t′ is infinitesimally close to t, t′ is strictly below le . Next, we do a “triangulation” around the point t∗ . Imagine that we rotate a rightwards ray originated from t∗ clockwise to sweep the half-plane h, and let v1 , v2 , . . . vm be the vertices of Ut (s) hit by our sweeping ray in order. Note that v1 and vm may be on e. If v1 is not on e, let v0 be the right endpoint of e. If vm is not on e, let vm+1 be the left endpoint of e. Since t′ is infinitesimally close to t and t′ is in h, t′ must be in one of the triangles △t∗ vi vi+1 for 0 ≤ i ≤ m. Suppose t′ is in △t∗ vi vi+1 for some 1 ≤ i ≤ m − 1. Then, vi and vi+1 are both from Ut (s). Since t′ is in △t∗ vi vi+1 , one of |t′ vi | < |t∗ vi | and |t′ vj | < |t∗ vj | must hold, and this proves the above observation. If t′ is in △t∗ vi vi+1 for i = 0 or m, then one of vi and vi+1 is not in Ut (s). So we cannot use the same argument as above. In the following, we only prove the case for i = 0, and the other case is similar. When t′ is in △t∗ v0 v1 , v0 is the right endpoint of e and v1 is not on e (e.g., see Fig. 8). In the following, we show that |v1 t′ | < |v1 t∗ |, which will prove the observation. By Observation 1, Ut (s) has at least one vertex strictly to right of the vertical line through t. Since is infinitesimal, Ut (s) has at least one vertex strictly to the right of the vertical line lt∗ through t∗ as well. By the definition of v1 , v1 must be strictly to the right of lt∗ . Hence, the slope of the line through v1 and t∗ is strictly negative. Recall that t′ is in △t∗ v0 v1 . If t′ is on v1 t∗ , then since t′ 6= t∗ (due to t′ 6∈ e), we have |v1 t∗ | > |v1 t′ |. Otherwise, we extend v1 t′ until it hits v0 t∗ at a point t′′ , which is strictly to the right of t∗ . Since both t∗ and t′ are infinitesimally close to t, |t∗ t′ | is also infinitesimal and thus |t∗ t′′ | is infinitesimal as well. Since the slope of v1 t∗ is strictly negative and t′′ is strictly to the right of t∗ , we obtain |v1 t∗ | > |v1 t′′ | > |v1 t′ |. |tt∗ | The above proves the observation. In light of the above observation, we assume |t′ vi | < |t∗ vi | for a vertex vi ∈ Ut (s). Let ui be the coupled s-pivot of vi such that either d′ui ,vi (s, t) < 0, or d′ui ,vi (s, t) = 0. Note that dui ,vi (s, t) ≥ dui ,vi (s′ , t∗ ). Since t′ is in Mt (s′ ), d(s′ , t′ ) = minv∈Ut (s) (d(s′ , v) + |vt′ |). Based on the above discussion, 10 t hs (t) s Fig. 9. Illustrating Observation 2: The blue direction is towards the interior of hs (t) and thus is in R(s, t). we derive the following d(s′ , t′ ) = min (d(s′ , v) + |vt′ |) ≤ d(s′ , vi ) + |vi t′ | < d(s′ , vi ) + |vi t∗ | v∈Ut (s) ≤ |s′ ui | + d(ui , vi ) + |vi t∗ | = dui ,vi (s′ , t∗ ) ≤ dui ,vi (s, t) = d(s, t). This proves that d(s′ , t′ ) < d(s, t). This finishes the proof for the case t ∈ E. The lemma is thus proved for all three cases.  Lemma 2 is on the case where s is not visible to t. If s is visible to t, the result is trivial, as shown in Observation 2. Observation 2 Suppose t is a farthest point of s and s is visible to t. Then t must be a polygon vertex of V. Further, a free direction rs of s is in R(s, t) if and only if rs is towards the interior of hs (t), where hs (t) is the open half-plane containing t and bounded by the line through s and perpendicular to st (e.g., see Fig. 9). Proof: Since s is visible to t, st is the only shortest path from s to t. As t is a vertex of SPM (s), t cannot be in I or E, since otherwise there would be more than one shortest s-t path. Thus, t ∈ V. Consider any free direction rs of s. Suppose we move s infinitesimally along rs to s′ . According to our definition of “visibility”, st does not contain any polygon vertex in its interior. Since |ss′ | is infinitesimal, s′ is also visible to t. Therefore, the point t, as a vertex of SPM (s), corresponds to a vertex of SPM (s′ ) that is t itself. Hence, rs is in R(s, t) if and only |s′ t| < |st|. Clearly, |s′ t| < |st| if and only if rs is towards the interior of the open half-plane hs (t).  By Observation 2, if s is visible to t, then the range R(s, t) is the intersection of the free direction range Rf (s) and an open range of size π delimited by the open half-plane hs (t). The next lemma is proved by using Lemmas 1 and 2 as well as Observation 2. Lemma 3. Among all points of P that have topologically equivalent shortest path maps in P, there is at most one geodesic center. This implies that each cell or edge of Dspm contains at most one geodesic center in its interior, which further implies that the number of geodesic centers of P is O(|Dspm |), where |Dspm | is the combinatorial complexity of Dspm . Proof: Let Q be any set of points of P that have topologically equivalent shortest path maps in P. We show that there is at most one geodesic center in Q, which will prove the lemma. Note that any two points of Q must be visible to each other since otherwise their shortest path maps would not be topologically equivalent. Let s be a geodesic center in Q. Let s′ be any other point in Q. In the following, we prove that dmax (s′ ) > dmax (s), which implies that s′ cannot be a geodesic center, and thus the lemma will be proved. Consider the direction rs of moving s towards s′ . Since s is visible to s′ , rs is a free direction. Since s is a geodesic center, by Lemma 1, R(s) is empty. Thus, s has a farthest point t such that rs 6∈ R(s, t). Because t is a farthest point of s, d(s, t) = dmax (s). If s is visible to t, by Observation 2, rs is not towards the interior of the open half-plane hs (t). Hence, |s′ t| > |st|, and thus dmax (s′ ) ≥ d(s′ , t) ≥ |s′ t| > |st| = d(s, t) = dmax (s). In the following, we assume that s is not visible to t. Depending on whether t is in V, E, or I, there are three cases. 11 The case t ∈ V. Suppose t ∈ V. Due to rs 6∈ R(s, t), by Lemma 2(3), if we move s along rs with unit speed, there exists a vertex v ∈ Ut (s) such that either d′u,v (s, t) > 0, or d′u,v (s, t) = 0 and d′′u,v (s, v) 6= 0, for any coupled s-pivot u of v. Let u be any coupled s-pivot of v. Note that su ∪ π(u, v) ∪ vt is a shortest path from s to t, whose length is du,v (s, t). Since SPM (s) and SPM (s′ ) are topologically equivalent and t is a polygon vertex, s′ u ∪ π(u, v) ∪ vt is a shortest path from s′ to t, whose length is du,v (s′ , t). In the following, we show that du,v (s′ , t) > du,v (s, t). Indeed, as s moves towards s′ along rs with unit speed, recall that the second derivative d′′u,v (s, t) ≥ 0 always holds. Hence, if d′u,v (s, t) > 0, then during the movement of s, it always holds that d′u,v (s, t) > 0. This implies that du,v (s′ , t) > du,v (s, t). Similarly, if d′u,v (s, t) = 0 and d′′u,v (s, t) 6= 0, then since d′′u,v (s, t) ≥ 0, we obtain d′′u,v (s, t) > 0. Consequently, as s moves towards s′ along rs with unit speed, except for the starting moment, it holds that d′u,v (s, t) > 0 and d′′u,v (s, t) ≥ 0. Thus, du,v (s′ , t) > du,v (s, t). The above proves that d(s′ , t) = du,v (s′ , t) > du,v (s, t) = d(s, t). Therefore, we obtain dmax (s′ ) > dmax (s) since dmax (s′ ) ≥ d(s′ , t) > d(s, t) = dmax (s). The case t ∈ E. If t ∈ E, let e denote the polygon edge of E that contains t. Due to rs 6∈ R(s, t), by Lemma 2(2), if we move s along rs with unit speed and move t along e with any speed τ ≥ 0, there exists a vertex v ∈ Ut (s) such that either d′u,v (s, t) > 0, or d′u,v (s, t) = 0 and d′′u,v (s, v) 6= 0, for any coupled s-pivot u of v. Let u be any coupled s-pivot of v. Note that su ∪ π(u, v) ∪ vt is a shortest path from s to t, whose length is du,v (s, t). Since SPM (s) and SPM (s′ ) are topologically equivalent and t ∈ e, the point t, as a vertex of SPM (s), corresponds to one and only one vertex t′ in SPM (s′ ) that is also on e. Then, s′ u ∪ d(u, v) ∪ vt′ is a shortest path from s′ to t′ , whose length is du,v (s′ , t′ ). In the following, we show that du,v (s′ , t′ ) > du,v (s, t), which will lead to dmax (s′ ) > dmax (s) as dmax (s′ ) ≥ d(s′ , t′ ) = du,v (s′ , t′ ) and dmax (s) = d(s, t) = du,v (s, t). Suppose we move s along rs towards s′ with unit speed and move t along e towards t′ with speed τ = |tt′ |/|ss′ |. Hence, when s arrives at s′ , t arrives at t′ simultaneously. By Lemma 2(2), either d′u,v (s, t) > 0, or d′u,v (s, t) = 0 and d′′u,v (s, v) 6= 0. In either case, by the same analysis as in the above case t ∈ V, we can show that du,v (s′ , t′ ) > du,v (s, t) and we omit the details. The case t ∈ I. The proof for this case is very similar. Due to rs 6∈ R(s, t), by Lemma 2(1), if we move s along rs with unit speed and move t along any free direction with any speed τ ≥ 0, there exists a vertex v ∈ Ut (s) such that either d′u,v (s, t) > 0, or d′u,v (s, t) = 0 and d′′u,v (s, v) 6= 0, for any coupled s-pivot u of v. Since SPM (s) and SPM (s′ ) are topologically equivalent, t corresponds to one and only one vertex t′ in SPM (s′ ) that is also in I. The rest of the argument is exactly the same as that for the case t ∈ E. We can prove that dmax (s′ ) > dmax (s) and we omit the details. This completes the proof for the lemma.  Remark: By extending the proof of Lemma 3, it is possible to obtain a slightly stronger result: Every cell (including its boundary) of Dspm contains at most one geodesic center. The following corollary can be proved by the same techniques as Lemma 3, and it implies that if t is a farthest point of s, then slightly moving s along a free direction that is not in R(s, t) can never obtain a geodesic center. Corollary 1. Suppose t is a farthest point of s. If we move s infinitesimally along a free direction that is not in R(s, t), then dmax (s) will become strictly larger. Proof: Let rs be any free direction that is not in R(s, t). Suppose we move s infinitesimally along rs to s′ . By using exactly the same argument as in the proof of Lemma 3, we can show that SPM (t) has a vertex t′ corresponding to t in SPM (s) such that d(s, t) < d(s′ , t′ ). Therefore, we obtain dmax (s) = d(s, t) < d(s′ , t′ ) ≤ dmax (s′ ), which proves the corollary.  12 So far we have shown that the total number of geodesic centers is bounded by the combinatorial size of Dspm. This result, although it is interesting in its own right, is not quite helpful for computing the geodesic centers. In order to compute candidate points for geodesic centers, we need to find a way to determine the range R(s, t). It turns out that it is sufficient to determine R(s, t) when t is in a non-degenerate position with respect to s in the following sense: Suppose t is a farthest point of s; we say that t is non-degenerate with respect to s if there are exactly three, two, and one shortest s-t paths for t in I, E, and V, respectively (by Observation 1, this implies that |Ut (s)| is 3, 2, and 1, respectively for the three cases). Lemma 2 gives a sufficient condition for a direction in R(s, t). The following lemma gives both a sufficient and a necessary condition for a direction in R(s, t) when t is non-degenerate, and the lemma will be used to explicitly compute the range R(s, t) in Section 4. Note that Observation 2 already gives a way to determine R(s, t) when s is visible to t. Lemma 4. Suppose t is a non-degenerate farthest point of s and s is not visible to t. Then, a free direction rs is in R(s, t) if and only if 1. for t ∈ I, there is a free direction rt for t with a speed τ ≥ 0 such that when we move s along rs with unit speed and move t along rt with speed τ , each vertex v ∈ Ut (s) has a coupled s-pivot u with d′u,v (s, t) < 0. 2. for t ∈ E, there is a free direction rt for t that is parallel to the polygon edge containing t with a speed τ ≥ 0 such that when we move s along rs with unit speed and move t along rt with speed τ , each vertex v ∈ Ut (s) has a coupled s-pivot u with d′u,v (s, t) < 0. 3. for t ∈ V, when we move s along rs with unit speed, each vertex v ∈ Ut (s) has a coupled s-pivot u with d′u,v (s, t) < 0. Proof: First of all, in any of these three cases, if the condition in the lemma statement holds, by Lemma 2, rs is in R(s, t). In the following, we prove the other direction of the lemma. Let rs be in R(s, t). Suppose we move s along rs infinitesimally to s′ . Since t is non-degenerate with respect to s, the point t, as a vertex of SPM (s), corresponds to one and only one vertex t′ in SPM (s′ ) (i.e., Mt (s′ ) = {t′ }) [7]. Due to rs ∈ R(s, t), d(s, t) > d(s′ , t′ ). In the following, we prove the three cases: t ∈ I, t ∈ E, and t ∈ V. The case t ∈ I. Suppose we move s towards s′ with unit speed and move t towards t′ with speed |tt′ |/|ss′ |. Then, when s arrives at s′ , t arrives at t′ simultaneously. Consider any vertex v ∈ Ut (s). To prove the lemma for this case, our goal is to show that there exists a coupled s-pivot u of v with d′u,v (s, t) < 0. Let u be any coupled s-pivot of v. Hence, d(s, t) = du,v (s, t). Since Mt (s′ ) = {t′ }, s′ u ∪ π(u, v) ∪ vt′ is a shortest path from s′ to t′ , and thus d(s′ , t′ ) = du,v (s′ , t′ ). We claim that d′u,v (s, t) < 0. Suppose to the contrary that d′u,v (s, t) ≥ 0. If d′u,v (s, t) > 0, then we would obtain du,v (s, t) < du,v (s′ , t′ ), which contradicts with d(s, t) > d(s′ , t′ ). Similarly, if d′u,v (s, t) = 0, since d′′u,v (s, t) ≥ 0, we would obtain du,v (s, t) ≤ du,v (s′ , t′ ), which contradicts with d(s, t) > d(s′ , t′ ). Hence, d′u,v (s, t) < 0 is proved. This proves the lemma for the case t ∈ I. The case t ∈ E. Let e be the polygon edge containing t. Then, t′ is also on e. Suppose we move s towards s′ with unit speed and move t on e towards t′ with speed |tt′ |/|ss′ |. Hence, when s arrives at s′ , t arrives at t′ simultaneously. Consider any vertex v ∈ Ut (s). Let u be any coupled s-pivot of v. As in the above case, du,v (s, t) = d(s, t) and du,v (s′ , t′ ) = d(s′ , t′ ). Using the same analysis as in the above case we can also prove that d′u,v (s, t) < 0, which leads to the lemma. 13 The case t ∈ V. In this case, since t is a polygon vertex, t′ = t. Suppose we move s towards s′ with unit speed. Consider any vertex v ∈ Ut (s). Let u be any coupled s-pivot of v. Again, du,v (s, t) = d(s, t) and du,v (s′ , t′ ) = d(s′ , t′ ). Using the same analysis as in the first case we can also prove that d′u,v (s, t) < 0, which leads to the lemma.  Lemma 4 will be used to determine the range R(s, t) for a non-degenerate farthest point of s. The details are deferred in Section 4, where we will show that R(s, t) is the intersection of the free direction range Rf (s) and an open range of size π (i.e., the previously mentioned π-range property). In addition, we present Lemma 5, which will be useful for computing the candidate points in Section 5. If a farthest point t of s is not non-degenerate, then we say that t is degenerate (note that s cannot be visible to t in the degenerate case). Lemma 5 provides a sufficient condition for a direction in R(s, t) particularly for a degenerate farthest point t of s. Lemma 5. Suppose t is a degenerate farthest point of s. 1. For t ∈ I, a free direction rs is in R(s, t) if the following conditions are satisfied: (1) there exist three vertices v1 , v2 , v3 ∈ Ut (s) such that t is in the interior of the triangle △v1 v2 v3 (i.e., {v1 , v2 , v3 } satisfies the same condition as Ut (s) in Observation 1(1)); (2) there exists a free direction rt for t with a speed τ ≥ 0 such that when we move s along rs with unit speed and move t along rt with speed τ , each vertex v ∈ {v1 , v2 , v3 } has a coupled s-pivot u with d′u,v (s, t) < 0. 2. For t ∈ E, suppose e is the polygon edge containing t. A free direction rs is in R(s, t) if the following conditions are satisfied: (1) there exist two vertices v1 , v2 ∈ Ut (s) such that {v1 , v2 } has one vertex in each of the two open half-planes bounded by the line through t and perpendicular to e, and {v1 , v2 } has at least one vertex in the open half-plane bounded by the supporting line of e and containing the interior of P in the small neighborhood of e (i.e., {v1 , v2 } satisfies the same condition as Ut (s) in Observation 1(2)); (2) there is a free direction rt for t parallel to e with a speed τ ≥ 0 such that when we move s along rs with unit speed and move t along rt with speed τ , each vertex v ∈ {v1 , v2 } has a coupled s-pivot u with d′u,v (s, t) < 0. Proof: The proof uses similar techniques as in the proof of Lemma 2. Indeed, the proof of Lemma 2 mainly relies on Observation 1. Here, for the case t ∈ I, {v1 , v2 , v3 } satisfies Observation 1(1); for the case t ∈ E, {v1 , v2 } satisfies Observation 1(2). Therefore, similar techniques as in the proof of Lemma 2 can be used here. We briefly discuss it below. The case t ∈ I. We first consider the case t ∈ I. Let v1 , v2 , and v3 be the polygon vertices specified in the lemma statement. For each i with 1 ≤ i ≤ 3, let ui be the coupled s-pivot of vi with d′ui ,vi (s, t) < 0. Suppose we move s along rs infinitesimally with unit speed to s′ and simultaneously move t along rt with speed τ to a point t∗ (i.e., t∗ is the location of t when s arrives at s′ ). Since |ss′ | is infinitesimal, |tt∗ | is also infinitesimal. Since t is in the interior of △v1 v2 v3 , t∗ is also in the interior of the triangle. Consider any t′ in Mt (s′ ). To prove that rs is in R(s, t), our goal is to show that d(s′ , t′ ) < d(s, t). Since |ss′ | is infinitesimal, |tt′ | is also infinitesimal and t′ is also in the interior of △v1 v2 v3 . For each 1 ≤ i ≤ 3, since d′ui ,vi (s, t) < 0, it holds that dui ,vi (s, t) > dui ,vi (s′ , t∗ ). The three segments t∗ vi for i = 1, 2, 3 partition △v1 v2 v3 into three smaller triangles and t′ must be one of them. Without loss of generality, assume t′ is in △v1 v2 t∗ . Hence, at least one of |t′ v1 | < |t∗ v1 | and |t′ v2 | < |t∗ v2 | holds. Without loss of generality, we assume the former one holds. Therefore, we can derive d(s′ , t′ ) ≤ |s′ u1 | + d(u1 , v1 ) + |v1 t′ | < |s′ u1 | + d(u1 , v1 ) + |v1 t∗ | = du1 ,v1 (s′ , t∗ ) < du1 ,v1 (s, t) = d(s, t). The case t ∈ E. Let v1 and v2 be the two polygon vertices specified in the lemma statement. For each i with 1 ≤ i ≤ 2, let ui be the coupled s-pivot of vi with d′ui ,vi (s, t) < 0. Suppose we move s along rs infinitesimally with unit speed to s′ and simultaneously move t along e with speed τ to a point t∗ . Since |ss′ | is infinitesimal, |tt∗ | is also infinitesimal. Consider any t′ in Mt (s′ ). To prove that rs is in R(s, t), our goal is to show that d(s′ , t′ ) < d(s, t). 14 For each 1 ≤ i ≤ 2, since d′ui ,vi (s, t) < 0, it holds that dui ,vi (s, t) > dui ,vi (s′ , t∗ ). Since |tt∗ | is infinitesimal, {v1 , v2 } has one vertex in each of the open half-planes bounded by the line through t∗ and perpendicular to e. Also, because at least one vertex of v1 and v2 is in the open half-plane bounded by the supporting line of e and containing the interior of P in the small neighborhood of e, regardless of whether t′ is on e or not, we can use the similar approach as in the proof of Lemma 2 (for the case t ∈ E) to show that either |t′ v1 | < |t∗ v1 | or |t′ v2 | < |t∗ v2 | holds. Consequently, by the similar argument as the above case for t ∈ I, we can obtain d(s′ , t′ ) < d(s, t).  4 Determining the Admissible Direction Range R(s, t) and the π-Range Property In this section, we determine the admissible direction range R(s, t) for any point s and any of its nondegenerate farthest point t. In particular, we will prove the π-range property mentioned in Section 1. Depending on whether t is in V, E, and I, there are three cases. Recall that Rf (s) is the range of all free directions of s. In each case, we will show that R(s, t) is the intersection of Rf (s) and an open range Rπ (s, t) of size π. We call Rπ (s, t) the π-range. As will be seen later, the π-range Rπ (s, t) can be explicitly determined based on the positions of s, t, and the vertices of Us (t) and Ut (s). In fact, for each case, we will give more general results that are on shortest path distance functions. These more general results will also be useful for computing the candidate points later in Section 5. 4.1 The Case t ∈ V We first discuss the case t ∈ V. The result is relatively straightforward in this case. If s is visible to t, the π-range Rπ (s, t) is defined to be the open range of directions delimited by the open half-plane hs (t) as defined in Observation 2; by Observation 2, R(s, t) = Rf (s) ∩ Rπ (s, t). In the following, we assume s is not visible to t. We first present a more general result on a shortest path function. Let s and t be any two points in P such that t is in V and s is not visible to t. Let π(s, t) be any shortest s-t path in P. Let u and v be the s-pivot and t-pivot in π(s, t), respectively. Thus, du,v (s, t) = |su| + d(u, v) + |vt|. Now we consider du,v (s, t) as a function of s and t in the entire plane R2 (not only in P; namely, when we move s and t, they are allowed to move outside P, but the function du,v (s, t) is always defined as |su| + d(u, v) + |vt|, where d(u, v) is a fixed value). The π-range Rπ (s, t) is defined with respect to t and the path π(s, t) as follows: a direction rs for s is in Rπ (s, t) if d′u,v (s, t) < 0 when we move s along rs with unit speed. The following lemma is quite straightforward. Lemma 6. The π-range Rπ (s, t) is exactly the open range of size π delimited by hs (u), where hs (u) is the open half-plane containing u and bounded by the line through s and perpendicular to su. Proof: The analysis is similar to Observation 2. Suppose we move s along a direction rs with unit speed. Then, d′u,v (s, t) < 0 if and only if rs is towards the interior of hs (u).  Now we are back to our original problem to determine R(s, t) for a non-degenerate farthest point t of s with t ∈ V. Since t is non-degenerate and t is in V, there is only one shortest path π(s, t) from s to t. We define Rπ (s, t) as above. Based on Observation 2 and Lemmas 4(3), we have Lemma 7, and thus R(s, t) can be determined by Observation 2 and Lemma 6. Lemma 7. R(s, t) = Rf (s) ∩ Rπ (s, t). Proof: If s is visible to t, we have already shown that the lemma is true. Below we assume s is not visible to t. Let u and v be the s-pivot and t-pivot in π(s, t), respectively. Note that v is the only vertex in Ut (s) and u is the only vertex in Us (t). 15 1. Consider any direction rs ∈ R(s, t), i.e., rs is an admissible direction for s with respect to t. According to Lemma 4(3), when we move s along rs with unit speed, it holds that d′u,v (s, t) < 0. This implies that rs is in Rπ (s, t). Since rs is in R(s, t), rs is in Rf (s). Therefore, rs is in Rf (s)∩ Rπ (s, t). 2. Consider any direction rs in Rf (s) ∩ Rπ (s, t). First of all, rs is a free direction. Since rs is in Rπ (s, t), when s moves along rs with unit speed, d′u,v (s, t) < 0. Since v is the only vertex in Ut (s), by Lemma 4(3), rs is in R(s, t). The lemma is thus proved. 4.2  The Case t ∈ E The analysis for this case is substantially more complicated than the previous case, although the next case for t ∈ I is even more challenging. One may consider the analysis for this case as a “warm-up” for the most general case t ∈ I. As in the previous case, we first present a more general result that is on two shortest path distance functions. Let s and t be any two points in P such that t is in E and there are two shortest s-t paths π1 (s, t) and π2 (s, t) (this implies that s is not visible to t). Let e be the polygon edge containing t and let l(e) denote the line containing e. For each i = 1, 2, let πi (s, t) = πui ,vi (s, t), i.e., ui and vi are the s-pivot and t-pivot of πi (s, t), respectively. We further require the set {v1 , v2 } satisfy the same condition as Ut (s) in Observation 1(2), i.e., {v1 , v2 } has at least one vertex in the open half-plane bounded by l(e) and containing the interior of P in the small neighborhood of e, and it has at least one vertex in each of the two open half-planes bounded by the line through t and perpendicular to e. We say that the two shortest paths π1 (s, t) and π2 (s, t) are canonical with respect to s and t if {v1 , v2 } satisfies the above condition. In the following, we assume π1 (s, t) and π2 (s, t) are canonical. Note that the condition implies that v1 6= v2 . However, u1 = u2 is possible. For each i = 1, 2, we consider dui ,vi (s, t) = |sui | + d(ui , vi ) + |vi t| as a function of s ∈ R2 (instead of s ∈ P only) and t ∈ e. In this case, the π-range Rπ (s, t) of s is defined with respect to t and the two paths π1 (s, t) and π2 (s, t) as follows: a direction rs for s is in Rπ (s, t) if there exists a direction rt parallel to e for t with a speed τ ≥ 0 such that when we move s along rs with unit speed and move t along rt with speed τ ≥ 0, d′ui ,vi (s, t) < 0 holds for i = 1, 2. In Section 4.1, we showed that the π-range for the case s ∈ V is an open range of size π. Here we will show a similar result in Lemma 8 unless a special case happens. Although the analysis in Section 4.1 is quite straightforward, the result here for two functions dui ,vi (s, t) with i = 1, 2 is somewhat surprising and the proof is substantially more difficult (one could imagine that a similar result for three functions, as shown in Section 4.4, is even more surprising). Before presenting Lemma 8, we introduce some notation. → For any two points p and q in the plane, define − pq as the direction from p to q. Recall that the angle of any direction r is defined to be the angle in [0, 2π) counterclockwise from →, and let α denote the the positive direction of the x-axis. Let α1 denote the angle of the direction − su 1 2 → (e.g., see Fig. 10). Note that by our way of defining pivot vertices, α = α angle of the direction − su 2 1 2 if and only if u1 = u2 . Note that v1 and v2 are in a closed half-plane bounded by the line l(e). We assign a direction to l(e) such that each of v1 and v2 are to the left or on l(e). Define βi as the smallest angle to rotate − → l(e) counterclockwise such that the direction of l(e) becomes the same as the direction tvi , for each i = 1, 2 (e.g., see Fig. 10). Hence, both β1 and β2 are in [0, π]. Without of loss of generality, we assume β1 ≤ β2 (otherwise the analysis is symmetric). Since {v1 , v2 } contains at least one vertex in each of the open half-planes bounded by the line through t and perpendicular to e, we have β1 ∈ [0, π/2) and β2 ∈ (π/2, π]. Further, since at least one of v1 and v2 is not on l(e), it is not possible that both β = 0 and β = π hold. 16 v2 u2 v1 β2 β1 u1 α2 α1 l(e) s t Fig. 10. Illustrating the definitions of the angles. u2 u1 u2 u1 = u2 s α2 α1 v2 v1 t v1 v2 α1 s 26.66◦ β2 v1 s v2 u1 β1 t t Fig. 11. Illustrating several concrete examples for Lemma 8. Left: the special case (the vertical line through t bisects ∠v1 tv2 ); in this case, Rπ (s, t) = ∅. Middle: the case where α1 = α2 , and thus α = 0, sin(α) = 0, and u1 = u2 ; in this case, Rπ (s, t) = (α1 −π/2, α1 +π/2), which is delimited by the open half-plane (marked with red color in the figure) bounded by the line through s and perpendicular to su1 . Right: the most general case where α1 = 30◦ , α2 = 90◦ , β1 = 30◦ , β2 = 135◦ ; γ by calculation, λ ≈ 1.3165, arctan( sin(α) ) ≈ 56.66◦ , and thus, Rπ (s, t) ≈ (α1 − 56.66◦ , α1 + 56.66◦ ) = (−26.66◦ , 153.34◦ ); the open half-plane that delimits Rπ (s, t) is marked with red color in the figure. Let α = α2 − α1 . We refer to the case where β1 + β2 = π and α = ±π (i.e., α is π or −π) as the special case. In the special case, s is on u1 u2 and the vertical line through t and perpendicular to l(e) bisects the angle ∠v1 tv2 . Lemma 8. The π-range Rπ (s, t) is determined as follows (e.g., see Fig. 11). Rπ (s, t) =  λ λ ), α1 − arctan( sin(α) ) + π) (α1 − arctan( sin(α)     λ λ   (α1 − arctan( sin(α) ) − π, α1 − arctan( sin(α) )) (α1 − π/2, α1 + π/2)     (α1 − 3π/2, α1 − π/2)    ∅ if sin(α) > 0, if sin(α) < 0, if sin(α) = 0 and λ > 0, if sin(α) = 0 and λ < 0, if sin(α) = 0 and λ = 0, β2 where λ = cos α − cos cos β1 . Further, α = ±π and β1 + β2 = π (i.e., the special case) if and only if sin(α) = 0 and λ = 0. Remark: Unlike Lemma 6 whose geometric intuition is very straightforward, it is not clear to us how to interpret Lemma 8 intuitively. We defer the proof of Lemma 8 to Section 4.3. According to Lemma 8, if the special case happens, Rπ (s, t) is empty; otherwise, it is an open range of size exactly π. Since α = 0 if and only if u1 = u2 , the case u1 = u2 is also covered by the lemma. Now we are back to our original problem to determine the range R(s, t) for a non-degenerate farthest point t ∈ E of s. By Observation 2, s is not visible to t. Further, s and t have exactly two shortest paths π1 (s, t) and π2 (s, t). Clearly, by Observation 1(2), the two paths are canonical. Therefore, the π-range Rπ (s, t) of s with respect to t and the two shortest paths π1 (s, t) and π2 (s, t) can be determined by Lemma 8. By using Lemma 4(2), we have the following lemma. 17 s P t Fig. 12. Illustrating an example in which a geodesic center s is in I and has only one farthest point t. The polygonal domain P is between two (very close) concentric squares plus an additional (very small) triangle so that s is in I. The point s is at the middle of the top edge of the inner square, and t is at the middle of the bottom edge of the outer square. One can verify that s is a geodesic center and t is the only farthest point of s. The two shortest paths from s to t are shown with red dashed segments. Note that the middle point of every edge of the inner square is a geodesic center. Lemma 9. R(s, t) = Rπ (s, t) ∩ Rf (s). Proof: For each i = 1, 2, let ui and vi be the s-pivot and t-pivot of the shortest path πi (s, t), respectively. Since s and t have only two shortest paths π1 (s, t) and π2 (s, t), Ut (s) = {v1 , v2 } and Us (t) = {u1 , u2 }. Further, for each i = 1, 2, vi has only one s-pivot, which is ui . 1. Consider any direction rs ∈ R(s, t). Clearly, rs ∈ Rf (s). By Lemma 4(2), there exists a direction rt parallel to e for t with a speed τ ≥ 0 such that if we move s along rs for unit speed and move t along lt with speed τ , each vertex v ∈ Ut (s) has a coupled s-pivot u with d′u,v (s, t) < 0. Since Ut (s) = {v1 , v2 } and for each i = 1, 2, vi has only one s-pivot ui , it holds that d′ui ,vi (s, t) < 0. Hence, rs is in Rπ (s, t). 2. Consider any rs in Rf (s, t) ∩ Rπ (s, t). First of all, rs is a free direction. Since rs is in Rπ (s, t), there exists a direction rt parallel to e for t with a speed τ ≥ 0 such that if we move s along rs for unit speed and move t along rt with speed τ , d′ui ,vi (s, t) < 0 for each i = 1, 2. Since Ut (s) = {v1 , v2 }, according to Lemma 4(2), rs is in R(s, t). The lemma thus follows.  Suppose t is the only farthest point of s and t is non-degenerate. According to Lemma 8, if the special case happens, Rπ (s, t) = ∅, and thus R(s, t) = ∅ by Lemma 9. By Corollary 1, whenever we move s along any free direction infinitesimally, the value dmax (s) will be strictly increasing. Therefore, it is possible that the point s, which is in I and has only one farthest point, is a geodesic center. It is not difficult to construct such an example by following the left figure of Fig. 11; e.g., see Fig. 12. Hence, we have the following corollary. Corollary 2. It is possible that a geodesic center is in I and has only one farthest point. 4.3 Proof of Lemma 8 Consider any direction rs for moving s. Let θs denote the angle of rs . Recall that the moving direction rt for t is parallel to e and we have assigned a direction to the line l(e). Let θt denote the smallest angle to rotate l(e) such that l(e) becomes the same direction as rt (thus the definition of θt is “consistent” with the definitions of β1 and β2 ). Since rt is parallel to e, θt is either 0 or π. According to Equation (1), we can obtain the derivatives of the two functions du1 ,v1 (s, t) and du2 ,v2 (s, t) as follows ( d′u1 ,v1 (s, t) = − cos(α1 − θs ) − τ · cos(β1 − θt ), (3) d′u2 ,v2 (s, t) = − cos(α2 − θs ) − τ · cos(β2 − θt ). 18 Therefore, for each i = 1, 2, d′ui ,vi (s, t) is a function of θs , θt , and τ . In order to simplify our proof for Lemma 8, we first give the following lemma. Lemma 10. A direction rs is in Rπ (s, t) if and only if there exist θt ∈ {0, π} and τ ≥ 0 such that d′u1 ,v1 (s, t) = 0 and d′u2 ,v2 (s, t) < 0 (the same also holds if we exchange the indices 1 and 2). Proof: Given any direction rs for s, the angle θs is fixed, and thus for each i = 1, 2, d′ui ,vi (s, t) is a function of θt and τ . In the following, we will use d′i (θt , τ ) to represent d′ui ,vi (s, t) for each i = 1, 2. We first prove one direction of the lemma. Assume d′1 (θt , τ ) = 0 and d′2 (θt , τ ) < 0 for some θt ∈ {0, π} and τ ≥ 0. Our goal is to show that rs is in Rπ (s, t). To this end, it is sufficient to find another pair (θt′ , τ ′ ) with θt′ ∈ {0, π} and τ ′ ≥ 0 such that d′1 (θt′ , τ ′ ) < 0 and d′2 (θt′ , τ ′ ) < 0. Recall that neither β1 nor β2 can be π/2. Since θt is either 0 or π, β1 − θt 6= ±π/2, and thus cos(β1 − θt ) 6= 0. Since d′1 (θt , τ ) = 0 and d′2 (θt , τ ) < 0, if τ > 0, regardless of whether cos(β1 − θt ) is positive or negative, we can always change τ infinitesimally to a new value τ ′ > 0 such that d′1 (θt , τ ′ ) < 0 and d′2 (θt , τ ′ ) < 0. If τ = 0, then by Equation (3), − cos(α1 − θs ) = 0 and − cos(α2 − θs ) < 0. We let τ ′ be an infinitesimally small positive value and let θt′ be 0. Since β1 ∈ [0, π/2), we have cos(β1 − θt′ ) > 0, and thus d′1 (θt′ , τ ′ ) < 0 due to − cos(α1 − θs ) = 0. Further, since τ ′ is an infinitesimal small positive value and − cos(α2 − θs ) < 0, we have d′2 (θt′ , τ ′ ) < 0. This proves that rs must be in Rπ (s, t). We proceed to prove the other direction of the lemma. Assume rs is in Rπ (s, t). By the definition of Rπ (s, t), there exist θt ∈ {0, π} and τ ≥ 0 such that d′1 (θt , τ ) < 0 and d′2 (θt , τ ) < 0. Our goal is to find another pair (θt′ , τ ′ ) with θt′ ∈ {0, π} and τ ′ ≥ 0 such that d′1 (θt′ , τ ′ ) = 0 and d′2 (θt′ , τ ′ ) < 0. Recall that cos(β1 − θt ) 6= 0. Depending on whether cos(β1 − θt ) is positive or negative, there are two cases. If cos(β1 − θt ) < 0, then cos(β2 − θt ) > 0 because β1 ∈ [0, π/2), β2 ∈ (π/2, π], and θt ∈ {0, π}. Since τ ≥ 0, if we increase the value τ , d′1 (θt , τ ) will strictly increase and d′1 (θt , τ ) will strictly decrease. Hence, if we keep increasing τ , there must be a moment when d′1 (θt , τ ) = 0 and d′1 (θt , τ ) < 0. We are done with the proof. If cos(β1 − θt ) > 0, then cos(β2 − θt ) < 0. Depending on whether τ = 0, there are two subcases. – If τ = 0, let θt′ = (θt + π mod 2π) (i.e., we reverse the moving direction of t). Consequently, we obtain cos(β1 − θt′ ) < 0 and cos(β2 − θt′ ) > 0. Then, we can use the same approach as above, i.e., keep increasing τ until d′1 (θt′ , τ ) = 0 and d′1 (θt′ , τ ) < 0. – If τ > 0, then if we decrease τ , d′1 (θt , τ ) increases and d′2 (θt , τ ) decreases. We keep decreasing the value τ until one of the two events happens: τ = 0 and d′1 (θt , τ ) = 0. Whichever event happens first, it always holds that d′2 (θt , τ ) < 0. If d′1 (θt , τ ) = 0 happens first (or both events happen simultaneously), we are done with the proof. Otherwise, we obtain τ = 0 and both d′1 (θt , τ ) and d′2 (θt , τ ) are negative. Then, we can use the same approach as the above case for τ = 0 to prove. This completes the proof for the lemma.  To simplify the notation, let w1 = −d′u1 ,v1 (s, t) and w2 = −d′u2 ,v2 (s, t). Once rs is fixed (and thus θs is fixed), both w1 and w2 are implicitly considered as functions of θt ∈ {0, π} and τ ≥ 0. By Lemma 10, Rπ (s, t) consists of all directions rs for s such that there exist θt ∈ {0, π} and τ ≥ 0 with w1 = 0 and w2 > 0. Let x = α1 − θs . Recall that α = α2 − α1 . Then, α2 − θs = x + α. Thus, we have ( w1 = cos(x) + τ · cos(β1 − θt ), w2 = cos(x + α) + τ · cos(β2 − θt ). 19 First of all, let w1 = 0. As shown in the proof of Lemma 10, since β1 ∈ [0, π/2) and θt ∈ {0, π}, it holds that cos(β1 − θt ) 6= 0. Consequently, we have τ =− cos(x) . cos(β1 − θt ) Since τ ≥ 0 and β1 ∈ [0, π/2), we obtain the following: if cos(x) > 0, then θt = π; if cos(x) < 0, then θt = 0; if cos(x) = 0, then θt can be either 0 or π. cos(x) By substituting τ with − cos(β in w2 and using the angle sum identities of trigonometric 1 −θt ) functions, we have w2 = cos(x + α) + τ · cos(β2 − θt ) cos(x) · cos(β2 − θt ) cos(β1 − θt ) cos(β2 ) = cos(x) · cos(α) − sin(x) · sin(α) − cos(x) · . cos(β1 ) = cos(x) · cos(α) − sin(x) · sin(α) − The last equality in the above equation is because regardless of whether θt is 0 or π, it always holds cos(β2 ) cos(β2 ) 2 −θt ) that cos(β cos(β1 −θt ) = cos(β1 ) . Recall that λ = cos(α) − cos(β1 ) in the statement of Lemma 8. Hence, w2 = cos(x) · λ − sin(x) · sin(α). Therefore, w2 > 0 is equivalent to cos(x) · λ > sin(x) · sin(α). The above discussion shows the following observation. Observation 3 w1 = 0 and w2 > 0 if and only if the following holds: cos(x) · λ > sin(x) · sin(α). (4) Depending on whether sin(α) is positive, negative, or zero, there are three cases. 1. If sin(α) > 0, depending on whether cos(x) is positive, negative, or zero, there are further three subcases. (a) If cos(x) > 0, then x ∈ (−π/2, π/2) and Inequality (4) is equivalent to tan(x) < w1 = 0 and w2 > 0 if and only if x ∈ λ sin(α) . Thus, λ sin(x) . Thus, λ )). (−π/2, arctan( sin(α) (b) If cos(x) < 0, then x ∈ (−3π/2, −π/2) and Inequality (4) is equivalent to tan(x) > λ ) (arctan( sin(α) − π, −π/2). w1 = 0 and w2 > 0 if and only if x ∈ π (c) If cos(x) = 0, then x = ± 2 and Inequality (4) is equivalent to sin(x) < 0, which further implies that x must be −π/2. Thus, w1 = 0 and w2 > 0 if and only if x = −π/2. Combining the above discussions for the case sin(α) > 0, w1 = 0 and w2 > 0 if and only if λ λ ) − π, arctan( sin(α) )). x ∈ (arctan( sin(α) 2. If sin(α) < 0, the analysis is symmetric. Depending on whether cos(x) is positive, negative, or zero, there are further three subcases. (a) If cos(x) > 0, then x ∈ (−π/2, π/2) and Inequality (4) is equivalent to tan(x) > w1 = 0 and w2 > 0 if and only if x ∈ λ sin(α) . Thus, λ sin(x) . Thus, λ ), π/2). (arctan( sin(α) (b) If cos(x) < 0, then x ∈ (π/2, 3π/2) and Inequality (4) is equivalent to tan(x) < λ (π/2, arctan( sin(α) )+ w1 = 0 and w2 > 0 if and only if x ∈ π). π (c) If cos(x) = 0, then x = ± 2 and Inequality (4) is equivalent to sin(x) > 0, which further implies that x must be π/2. Thus, w1 = 0 and w2 > 0 if and only if x = π/2. Combining the above discussions for the case sin(α) > 0, w1 = 0 and w2 > 0 if and only if λ λ ), arctan( sin(α) ) + π). x ∈ (arctan( sin(α) 20 3. If sin(α) = 0, then Inequality (4) is equivalent to cos(x)·λ > 0. Depending on whether λ is positive, negative, or zero, there are further three subcases. (a) If λ > 0, then Inequality (4) is equivalent to cos(x) > 0, implying that x ∈ (−π/2, π/2). (b) If λ < 0, then Inequality (4) is equivalent to cos(x) < 0, implying that x ∈ (π/2, 3π/2). (c) If λ = 0, then Inequality (4) is equivalent to 0 < 0, which is not possible for any x. λ )− As a summary, w1 = 0 and w2 > 0 if and only if: for sin(α) > 0, x ∈ (arctan( sin(α) λ λ λ )); for sin(α) > 0, x ∈ (arctan( sin(α) ), arctan( sin(α) ) + π); for sin(α) = 0 and λ > 0, π, arctan( sin(α) x ∈ (−π/2, π/2); for sin(α) = 0 and λ < 0, x ∈ (π/2, 3π/2); for sin(α) = 0 and λ = 0, x ∈ ∅. Recall that x = α1 − θs . By Lemma 10, we obtain the π-range Rπ (s, t) as follows.  λ λ  (α1 − arctan( sin(α) ), α1 − arctan( sin(α) ) + π) if sin(α) > 0,   λ λ   (α1 − arctan( sin(α) ) − π, α1 − arctan( sin(α) )) if sin(α) < 0, Rπ (s, t) = (α1 − π/2, α1 + π/2) if sin(α) = 0 and λ > 0,     (α1 − 3π/2, α1 − π/2) if sin(α) = 0 and λ < 0,    ∅ if sin(α) = 0 and λ = 0. We complete the proof of Lemma 8 by showing the following claim: α = ±π and β1 + β2 = π if and only if sin(α) = 0 and λ = 0. We prove the claim below. cos(β2 ) 2) = −1 − cos(β Assume α = ±π and β1 + β2 = π. Then, sin(α) = 0, and λ = cos(α) − cos(β cos(β1 ) . Since 1) β1 + β2 = π, cos(β1 ) = − cos(β2 ). Hence, λ = 0. On the other hand, assume sin(α) = 0 and λ = 0. Then, α is 0 or ±π. We claim that α cannot be zero. Indeed, suppose to the contrary that α = 0. Since β1 ∈ [0, π/2) and β2 ∈ (π/2, π], it always cos(β2 ) cos(β2 ) 2) holds that cos(β cos(β1 ) < 0. Hence, λ = cos(α) − cos(β1 ) = 1 − cos(β1 ) , which is always positive, contradicting with λ = 0. cos(β2 ) . Due to λ = 0, it holds that The above proves that α = ±π. Then, we have λ = −1 − cos(β 1) cos(β2 ) = − cos(β1 ), which implies that β1 + β2 = π since β1 ∈ [0, π/2) and β2 ∈ (π/2, π]. 4.4 The Case t ∈ I The analysis for this case is substantially more difficult than the case t ∈ E. As before, we first present a more general result that is on three shortest path distance functions. Let s and t be any two points in P such that t is in I and there are three shortest s-t paths π1 (s, t), π2 (s, t), and π3 (s, t) (this implies that s is not visible to t). For each i = 1, 2, 3, let πi (s, t) = πui ,vi (s, t), i.e., ui and vi are the s-pivot and t-pivot of πi (s, t), respectively. We say that the three paths are canonical with respect to s and t if they have the following two properties. 1. t is in the interior of the triangle △v1 v2 v3 . 2. Suppose we reorder the indices such that v1 , v2 , and v3 are clockwise around t, then u1 , u2 , and u3 are counterclockwise around s (e.g., see Fig. 2). The above first property implies that v1 , v2 , and v3 are distinct, but this may not be true for u1 , u2 , u3 . In the following, we assume that the three shortest paths πi (s, t) with 1 ≤ i ≤ 3 are canonical, and we reorder the indices such that v1 , v2 , and v3 are clockwise around t and u1 , u2 , and u3 are counterclockwise around s. For each i = 1, 2, 3, we consider dui ,vi (s, t) = |sui | + d(ui , vi ) + |vi t| as a function of s ∈ R2 and t ∈ R2 . In this case, the π-range Rπ (s, t) of s is defined with respect to t and the three paths πi (s, t) for i = 1, 2, 3 as follows: a direction rs for s is in Rπ (s, t) if there exists a direction rt for t with a speed τ ≥ 0 such that when we move s along rs with unit speed and move t along rt with speed τ , d′ui ,vi < 0 holds for i = 1, 2, 3. 21 u2 b2 u3 u2 = u3 b3 = 120◦ t v1 a1 = 100◦ a2 u1 s a3 = 140◦ v3 v3 b3 = 120◦ t v1 a1 = 100◦ u1 s b2 b1 = 90◦ v2 a3 = 260 ◦ b1 = 90◦ v2 Fig. 13. Illustrating two concrete examples for Lemma 11. Left: The sizes of the angles of ai and bi for 1 ≤ i ≤ 3 are 2 already shown in the figure with α1 = 0. By calculation, δ ≈ 0.2426, δ1 ≈ −0.1736, δ2 ≈ 0.3072, arctan( δ1 −δ ) ≈ −63.23◦ , δ ◦ ◦ ◦ ◦ ◦ and thus Rπ (s, t) ≈ (α1 + 63.23 , α1 + 63.23 + 180 ) = (63.23 , 243.23 ). Right: a case where α2 = α3 with α1 = 0. Thus, a2 = 0 and u2 = u3 . The sizes of other angles are already shown in the figure. By calculation, δ ≈ 2.1220, δ1 ≈ −0.1736, 2 δ2 ≈ −0.3768, arctan( δ1 −δ ) ≈ 5.47◦ , and thus Rπ (s, t) ≈ (α1 − 5.47◦ , α1 − 5.47◦ + 180◦ ) = (−5.47◦ , 174.53◦ ). The open δ half-planes that delimit Rπ (s, t) in both examples are marked with red color. As Lemma 8 in the previous cases, we will have a similar lemma (Lemma 11), which says that unless a special case happens the range Rπ (s, t) is an open range of size exactly π. The proof is much more challenging. Before presenting Lemma 11, we introduce some notation. Recall the definitions of the angles of directions. For each i = 1, 2, 3, let βi denote the angle of the − → − → direction tvi (i.e., the angle of tvi counterclockwise from the positive x-axis). Further, we define three angles bi for i = 1, 2, 3 as follows (e.g., see Fig. 2). Define b1 as the smallest angle we need to rotate − → − → − → the direction tv1 clockwise to tv2 ; define b2 as the smallest angle we need to rotate the direction tv2 − → − → − → clockwise to tv3 ; define b3 as the smallest angle we need to rotate the direction tv3 clockwise to tv1 . For any two angles α′ and α′′ , we use α′ ≡ α′′ to denote α′ = α′′ mod 2π. It is easy to see that b1 ≡ β1 − β2 , b2 ≡ β2 − β3 , and b3 ≡ β3 − β1 . Note that since t is in the interior of △v1 v2 v3 , it holds that bi ∈ (0, π) for i = 1, 2, 3. Note that b1 + b2 + b3 = 2π. →. According to our definition of For each i = 1, 2, 3, let αi denote the angle of the direction − su i pivot vertices, ui = uj if and only if αi = αj for any two i, j ∈ {1, 2, 3}. We define three angles ai for → i = 1, 2, 3 as follows (e.g., see Fig. 2). Define a1 as the smallest angle we need to rotate the direction − su 1 →; define a as the smallest angle we need to rotate the direction − → clockwise counterclockwise to − su su 2 2 2 →; define a as the smallest angle we need to rotate the direction − → clockwise to − →. Hence, to − su su su 3 3 3 1 a1 ≡ α2 − α1 , a2 ≡ α3 − α2 , and a3 ≡ α1 − α3 . We refer to the case where ai = bi for each i = 1, 2, 3 as the special case. Lemma 11. The π-range Rπ (s, t) is determined as follows (e.g., see  δ1 −δ2 2  (α1 − arctan( δ1 −δ  δ ), α1 − arctan( δ ) + π)   δ1 −δ2 δ1 −δ2   (α1 − arctan( δ ) − π, α1 − arctan( δ )) Rπ (s, t) = (α1 − π/2, α1 + π/2)    (α1 − 3π/2, α1 − π/2)     ∅ Fig. 13). if if if if if δ δ δ δ δ > 0, < 0, = 0 and δ1 > δ2 , = 0 and δ1 < δ2 , = 0 and δ1 = δ2 , sin(α2 −α1 ) cos(β2 −β1 )−cos(α2 −α1 ) 1 )−cos(α3 −α1 ) 3 −α1 ) , and δ2 = cos(β3 −β . Further, where δ = sin(α sin(β3 −β1 ) − sin(β2 −β1 ) , δ1 = sin(β2 −β1 ) sin(β3 −β1 ) ai = bi for each i = 1, 2, 3 (i.e., the special case) if and only if δ = 0 and δ1 = δ2 . We defer the proof of Lemma 11 to Section 4.5. According to Lemma 11, if the special case happens, then Rπ (s, t) is empty; otherwise, it is an open range of size exactly π. Now we are back to our original problem to determine the range R(s, t) for a non-degenerate farthest point t ∈ I of s. Since there are exactly three shortest s-t paths πi (s, t) for i = 1, 2, 3, the three paths must be canonical. To see this, by Observation 1, t is in the interior of △v1 v2 v3 . Further, 22 it is easy to see that no two of the three paths cross each other since otherwise there would be more than three shortest s-t paths, this implies that the second property of the canonical paths holds. Let Rπ (s, t) be the π-range of s with respect to t and the above three shortest paths. We have the following result. Lemma 12. R(s, t) = Rπ (s, t) ∩ Rf (s). Proof: For each i = 1, 2, 3, let ui and vi be the s-pivot and t-pivot of the shortest path πi (s, t), respectively. Since s and t have only three shortest paths, Ut (s) = {v1 , v2 , v3 } and Us (t) = {u1 , u2 , u3 }. Further, for each i = 1, 2, 3, vi have only one s-pivot, which is ui . 1. Consider any rs ∈ R(s, t). Clearly, rs ∈ Rf (s). By Lemma 4(1), there is a direction rt for t with a speed τ ≥ 0 such that when s moves along rs with unit speed and t moves along rt with speed τ , each v ∈ Ut (s) has a coupled s-pivot u with d′u,v (s, t) < 0. Since Ut (s) = {v1 , v2 , v3 } and each vi has only one s-pivot ui for each 1 ≤ i ≤ 3, we have d′ui ,vi (s, t) < 0 for i = 1, 2, 3. Hence, rs is in Rπ (s, t). 2. Consider any rs in Rπ (s, t) ∩ Rf (s). First of all, rs is a free direction. Since rs is in Rπ (s, t), there exists a direction rr for t with a speed τ ≥ 0 such that if s moves along rs for unit speed and t moves along rt with speed τ , then d′ui ,vi (s, t) < 0 for i = 1, 2, 3. Since Ut (s) = {v1 , v2 , v3 }, according to Lemma 4(1), rs is in R(s, t). The lemma thus follows. 4.5  Proof of Lemma 11 Consider any direction rs for moving s and rt for moving t. Let θs denote the angle of the direction rs . Let θt denote the angle of rt . According to our analysis for Equation (1), we can obtain the derivatives of the three functions d′ui ,vi (s, t) for i = 1, 2, 3, as follows.  ′  du1 ,v1 (s, t) = − cos(α1 − θs ) − τ · cos(β1 − θt ), d′u2 ,v2 (s, t) = − cos(α2 − θs ) − τ · cos(β2 − θt ),   ′ du3 ,v3 (s, t) = − cos(α3 − θs ) − τ · cos(β3 − θt ). (5) Therefore, for each i = 1, 2, 3, d′ui ,vi (s, t) is a function of θs , θt , and τ . In order to simplify our proof for Lemma 11, we first give the following lemma. Lemma 13. A direction rs is in Rπ (s, t) if and only if there exist θt ∈ [0, 2π) and τ ≥ 0 such that d′u1 ,v1 (s, t) = 0 and d′ui ,vi (s, t) < 0 for i = 2, 3 (the same result holds if we switch the index 1 with 2 or 3). Proof: In order to make the notation consistent with the rest of Section 4.5, instead of proving the statement of the lemma, we prove the following statement (which is essentially the same as the lemma): rs is in Rπ (s, t) if and only if there exist θt and τ ≥ 0 such that d′u2 ,v2 (s, t) = 0 and d′ui ,vi (s, t) < 0 for i = 1, 3. Let x = α1 − θs and y = β1 − θt . Hence, we have the following:  ′  du1 ,v1 (s, t) = − cos(x) − τ · cos(y), d′u2 ,v2 (s, t) = − cos(α2 − α1 + x) − τ · cos(β2 − β1 + y),   ′ du3 ,v3 (s, t) = − cos(α3 − α1 + x) − τ · cos(β3 − β1 + y). 23 q y o lq Fig. 14. Illustrating the polar coordinate of q with τ = |oq|. Consider any fixed direction rs . The angle θs is also fixed, and thus x is fixed. Hence, for each i = 1, 2, 3, d′ui ,vi (s, t) is a function of θt and τ , and thus also a function of y and τ . In the following proof, we will use d′i (y, τ ) to represent d′ui ,vi (s, t) for each i = 1, 2, 3. We first prove one direction of the lemma. Suppose rs is in Rπ (s, t). Then there exist y and τ ≥ 0 such that d′i (y, τ ) < 0 for each i = 1, 2, 3. Our goal is to prove that there exit y ′ and τ ′ ≥ 0 such that d′2 (y ′ , τ ′ ) = 0 and d′i (y ′ , τ ′ ) < 0 for i = 1, 3. The idea is to change y and τ simultaneously in such a way that d′2 (y, τ ) is constant, but d′1 (y, τ ) strictly increases while d′3 (y, τ ) strictly decreases, and we keep making the change until d′1 (y, τ ) becomes zero. To this end, we will find a way that when we change τ and y simultaneously, τ ·cos(y) is constant, −τ · cos(β2 − β1 + y) increases, and −τ · cos(β3 − β1 + y) decreases, as follows. Since cos(β2 − β1 + y) = cos(β2 − β1 ) · cos(y) − sin(β2 − β1 ) · sin(y), we have d′2 (y, τ ) = − cos(α2 − α1 + x) − τ · cos(y) · cos(β2 − β1 ) + τ · sin(y) · sin(β2 − β1 ). Similarly, we derive d′3 (y, τ ) = − cos(α3 − α1 + x) − τ · cos(y) · cos(β3 − β1 ) + τ · sin(y) · sin(β3 − β1 ). Consider a point q in a polar coordinate system with coordinate (τ, y), i.e., τ = |oq| and the polar angle of q is y, where o is the origin (e.g., see Fig. 14). Let lq be the vertical line through q. Note that if τ = 0, then q = o and lq is the vertical line through o. For any point p on lq , let τp = |op| and let yp be the polar angle of p. Suppose we move p on lq from top to bottom, it is easy to see that τp cos(yp ) is constant and τp sin(yp ) is strictly decreasing. Based on this observation, we will find y ′ and τ ′ ≥ 0 such that d′2 (y ′ , τ ′ ) = 0 and d′i (y ′ , τ ′ ) < 0 for i = 1, 3, as follows. Recall that β1 − β2 ≡ b1 and b1 ∈ (0, π). Thus, sin(β2 − β1 ) < 0. Similarly, since β3 − β1 ≡ b3 and b3 ∈ (0, π), sin(β3 − β1 ) > 0. Hence, if we change the values of y and τ simultaneously such that q moves along lq downwards, then d′1 (y, τ ) does not change, but d′2 (y, τ ) strictly increases while d′3 (y, τ ) strictly decreases. We keep making the above change until at some moment d′2 (y, τ ) becomes zero, at which moment we have d′2 (y, τ ) = 0 and d′2 (y, τ ) < 0 for i = 1, 3. The above proves one direction of the lemma. Next, we prove the other direction. Suppose there exist y and τ ≥ 0 such that d′2 (y, τ ) = 0 and d′i (y, τ ) < 0 for i = 1, 3. Our goal is to show that there exist y ′ and τ ′ ≥ 0 such that d′i (y ′ , τ ′ ) < 0 for i = 1, 2, 3. 1. If τ > 0, depending on whether cos(β2 − β1 + y) = 0, there are two subcases. (a) If cos(β2 − β1 + y) = 0, then it is always possible to change y infinitesimally such that cos(β2 − β1 + y) > 0. Due to τ > 0, d′2 (y, τ ) < 0. Also, since the change of y is infinitesimal and both cos(y) and cos(β3 − β1 + y) are continuous functions, we still have d′i (y, τ ) < 0 for i = 2, 3. We are done with the proof. (b) If cos(β2 − β1 + y) 6= 0, depending on whether cos(β2 − β1 + y) is positive or negative, we can infinitesimally increase or decrease τ , such that τ is still positive and d′i (y, τ ) < 0 holds for each i = 1, 2, 3. We are done with the proof. 24 2. If τ = 0, then again depending on whether cos(β2 − β1 + y) is positive, negative, or zero, there are three subcases. (a) If cos(β2 − β1 + y) > 0, then we can increase τ infinitesimally such that τ > 0 and d′i (y, τ ) < 0 for i = 1, 2, 3. (b) If cos(β2 −β1 +y) < 0, then we first change y to y +π (i.e., the moving direction of t is reversed). After this, since τ = 0, we still have d′2 (y, τ ) = 0 and d′i (y, τ ) < 0 for i = 1, 3. However, the difference is that now cos(β2 − β1 + y) > 0 for the new y. Then, we can use the same analysis as the first subcase. (c) If cos(β2 − β1 + y) = 0, then we first slightly change y such that cos(β2 − β1 + y) > 0. Since τ = 0, we still have d′2 (y, τ ) = 0 and d′i (y, τ ) < 0 for i = 1, 3. However, the difference is that now cos(β2 − β1 + y) > 0 for the new y. Then, we can use the same analysis as the first subcase. This completes the proof of the lemma.  ′ To simplify the notation, let wi = −dui ,vi (s, t) for each i = 1, 2, 3. Let x = α1 − θs and y = β1 − θt . Then, by Equation (5), we have the following.   w1 = cos(x) + τ · cos(y), (6) w2 = cos(α2 − α1 + x) + τ · cos(β2 − β1 + y),   w3 = cos(α3 − α1 + x) + τ · cos(β3 − β1 + y). Once rs is fixed, both θs and x are fixed. Also, given any θt , we can determine y, and vice versa. In the following, for each i = 1, 2, 3, we consider wi implicitly as a function of y ∈ [0, 2π) and τ ≥ 0. By Lemma 13, Rπ (s, t) consists of all directions rs for s such that there exist y and τ ≥ 0 with w1 = 0 and wi > 0 for i = 2, 3. Let w1 = 0. Then cos(x) + τ · cos(y) = 0. Depending on whether cos(x) is positive, negative, or zero, there are three cases. The case cos(x) > 0. In this case, since τ · cos(y) = − cos(x), we have τ · cos(y) < 0 and τ 6= 0. Since τ ≥ 0, we obtain τ > 0 and cos(y) < 0, implying that y ∈ (π/2, 3π/2). Further, we have τ = − cos(x)/ cos(y). By replacing τ with − cos(x)/ cos(y) in Equation (6) for w2 , we obtain w2 = cos(α2 − α1 ) · cos(x) − sin(α2 − α1 ) · sin(x)  cos(x)  · cos(β2 − β1 ) · cos(y) − sin(β2 − β1 ) · sin(y) − cos(y) = cos(α2 − α1 ) · cos(x) − sin(α2 − α1 ) · sin(x) − cos(β2 − β1 ) · cos(x) + sin(β2 − β1 ) · tan(y) · cos(x). Since cos(x) > 0, if we divide the right side of the above formula by cos(x), we obtain that w2 > 0 if and only if cos(α2 − α1 ) − sin(α2 − α1 ) · tan(x) − cos(β2 − β1 ) + sin(β2 − β1 ) · tan(y) > 0. Recall that β1 − β2 ≡ b1 and b1 ∈ (0, π), and thus sin(β2 − β1 ) < 0. Hence, the above inequality is equivalent to cos(β2 − β1 ) − cos(α2 − α1 ) + sin(α2 − α1 ) · tan(x) . (7) tan(y) < sin(β2 − β1 ) Therefore, we obtained that w2 > 0 if and only if Inequality (7) holds. Similarly, for w3 , we can obtain that w3 > 0 if and only if the following inequality holds: tan(y) > cos(β3 − β1 ) − cos(α3 − α1 ) + sin(α3 − α1 ) · tan(x) . sin(β3 − β1 ) 25 (8) Note that to obtain Inequality (8), we need to use the fact that sin(β3 − β1 ) > 0, which is due to β3 − β1 ≡ b3 and b3 ∈ (0, π). As a summary, the above shows that w1 = 0 and wi > 0 for i = 2, 3 if and only if both Inequalities (7) and (8) hold. Recall that since cos(x) > 0, y is in (π/2, 3π/2). Further, note that we can find an angle y ∈ (π/2, 3π/2) such that both (7) and (8) hold if and only if the right side of Inequality (7) is strictly larger than the right side of Inequality (8). Hence, we obtain the following observation. Observation 4 For the case cos(x) > 0, there exist y and τ ≥ 0 such that w1 = 0 and wi > 0 for i = 2, 3 if and only if the right side of Inequality (7) is strictly larger than the right side of Inequality (8), which is equivalent to the following inequality: δ · tan(x) < δ1 − δ2 , (9) where δ, δ1 , and δ2 are defined as in the statement of Lemma 11. Proof: Recall that δ= δ1 = sin(α3 − α1 ) sin(α2 − α1 ) − , sin(β3 − β1 ) sin(β2 − β1 ) cos(β3 − β1 ) − cos(α3 − α1 ) cos(β2 − β1 ) − cos(α2 − α1 ) , and δ2 = . sin(β2 − β1 ) sin(β3 − β1 ) That the right side of Inequality (7) is larger than the right side of Inequality (8) is equivalent to the following cos(β2 − β1 ) − cos(α2 − α1 ) cos(β3 − β1 ) − cos(α3 − α1 ) sin(α3 − α1 ) · tan(x) sin(α2 − α1 ) · tan(x) − < − , sin(β3 − β1 ) sin(β2 − β1 ) sin(β2 − β1 ) sin(β3 − β1 ) which is further equivalent to Inequality (9).  Recall that cos(x) > 0. Thus, x ∈ (−π/2, π/2). 2 If δ > 0, Inequality (9) is equivalent to tan(x) < δ1 −δ δ . Consequently, since x ∈ (−π/2, π/2), we δ1 −δ2 obtain that x ∈ (−π/2, arctan( δ )). δ1 −δ2 2 If δ < 0, Inequality (9) is equivalent to tan(x) > δ1 −δ δ , implying that x ∈ (arctan( δ ), π/2). If δ = 0, Inequality (9) is equivalent to 0 < δ1 − δ2 . Hence, if δ1 > δ2 , then any x can make the inequality hold, implying that x ∈ (−π/2, π/2); otherwise, no x can make it hold. In summary, for the case cos(x) > 0, there exist y and τ ≥ 0 such that w1 = 0 and wi > 0 for δ1 −δ2 2 i = 2, 3 if and only if: x ∈ (−π/2, arctan( δ1 −δ δ )) when δ > 0; x ∈ (arctan( δ ), π/2) when δ < 0; x ∈ (−π/2, π/2) when δ = 0 and δ1 > δ2 . The case cos(x) < 0. In this case, x ∈ (π/2, 3π/2). The analysis is similar to the above case. We omit the details and only give the result below. 2 There exist y and τ ≥ 0 such that w1 = 0 and wi > 0 for i = 2, 3 if and only if: x ∈ (arctan( δ1 −δ δ )+ 2 π, 3π/2) when δ > 0; x ∈ (π/2, arctan( δ1 −δ δ )+π) when δ < 0; x ∈ (π/2, 3π/2) when δ = 0 and δ1 < δ2 . The case cos(x) = 0. In this case x = ±π/2. The analysis for this case is different from the above two cases. We will show the following result: There exist y and τ ≥ 0 such that w1 = 0 and wi > 0 for i = 2, 3 if and only if: x = −π/2 when δ > 0; x = π/2 when δ < 0 (there is no value for x when δ = 0). By Lemma 13, there exist y and τ ≥ 0 such that w1 = 0 and wi > 0 for i = 2, 3 if and only there exist y and τ ≥ 0 such that wi > 0 for i = 1, 2, 3. For convenience, in this case, we will find all directions rs such that there exist y and τ ≥ 0 with wi > 0 for i = 1, 2, 3. 26 Since cos(x) = 0, we have w1 = τ · cos(y). Since we require w1 > 0, τ cannot be 0 and thus τ > 0 w1 must hold. Therefore, we have cos(y) > 0 and y ∈ (−π/2, π/2). In addition, τ = cos(y) . By replacing w1 τ with cos(y) and setting cos(x) to 0 in Equation (6) for w2 , we obtain the following w2 = cos(α2 − α1 ) · cos(x) − sin(α2 − α1 ) · sin(x)   w1 · cos(β2 − β1 ) · cos(y) − sin(β2 − β1 ) · sin(y) + cos(y) = − sin(α2 − α1 ) · sin(x) + cos(β2 − β1 ) · w1 − sin(β2 − β1 ) · tan(y) · w1 . Hence, w2 > 0 if and only if the following holds sin(β2 − β1 ) · tan(y) · w1 < − sin(α2 − α1 ) · sin(x) + cos(β2 − β1 ) · w1 . Recall that since β1 − β2 = b1 and b1 ∈ (0, π), sin(β2 − β1 ) < 0. Since w1 > 0, the above inequality is equivalent to the following tan(y) > − sin(α2 − α1 ) · sin(x) + cos(β2 − β1 ) · w1 sin(β2 − β1 ) · w1 (10) For w3 , by the similar analysis (we also need to use the fact that sin(β3 − β1 ) > 0), w3 > 0 if and only if the following holds tan(y) < − sin(α3 − α1 ) · sin(x) + cos(β3 − β1 ) · w1 sin(β3 − β1 ) · w1 (11) Based on the above discussion, wi > 0 for i = 1, 2, 3 if and only if we can find y ∈ (−π/2, π/2) such that both Inequalities (10) and (11) hold. It is not difficult to see that we can find y ∈ (−π/2, π/2) such that both Inequalities (10) and (11) hold if and only if the right side of Inequality (10) is strictly less than the right side of Inequality (11), i.e., − sin(α3 − α1 ) · sin(x) + cos(β3 − β1 ) · w1 − sin(α2 − α1 ) · sin(x) + cos(β2 − β1 ) · w1 < . sin(β2 − β1 ) · w1 sin(β3 − β1 ) · w1 (12) Since w1 > 0, we have the following observation. Observation 5 wi > 0 for i = 1, 2, 3 if and only if there exits w1 > 0 such that h i δ · sin(x) < w1 · cot(β3 − β1 ) − cot(β2 − β1 ) . Proof: The left side of Inequality (12) is equal to cot(β2 − β1 ) − is equal to cot(β3 − β1 ) − sin(α3 −α1 ) sin(β3 −β1 ) · sin(x) w1 . sin(α2 −α1 ) sin(β2 −β1 ) · sin(x) w1 and the right side Hence, Inequality (12) is equivalent to the following sin(x) h sin(α3 − α1 ) sin(α2 − α1 ) i < cot(β3 − β1 ) − cot(β2 − β1 ). · − w1 sin(β3 − β1 ) sin(β2 − β1 ) sin(α2 −α1 ) 3 −α1 ) Recall that δ = sin(α sin(β3 −β1 ) − sin(β2 −β1 ) . Since w1 > 0, the observation is obtained. We also have the following observation. Lemma 14. It holds that cot(β3 − β1 ) − cot(β2 − β1 ) < 0. 27  Proof: Note that β3 − β1 ≡ b3 and β2 − β1 ≡ b3 + b2 . Hence, to prove the lemma, it is sufficient to prove cot(b3 ) < cot(b3 + b2 ). Recall that bi is in (0, π) for each i = 1, 2, 3. Since b1 + b2 + b3 = 2π, it holds that b3 + b2 ∈ (π, 2π). Note that cot(b3 ) = cot(b3 + π). Due to b3 ∈ (0, π), b3 + π ∈ (π, 2π). Hence, both b3 + b2 and b3 + π are in (π, 2π). Since b2 ∈ (0, π), b3 + b2 < b3 + π. Because cot(·) is a strictly decreasing function on (π, 2π), we obtain cot(b3 + b2 ) > cot(b3 + π) = cot(b3 ), which proves the lemma.  Recall that x is either π/2 or −π/2. In light of Lemma 14, if δ > 0, then there exists w1 > 0 such that the inequality in Observation 5 is satisfied if and only if sin(x) < 0, i.e., x = −π/2. Therefore, if δ > 0, by Observation 5, wi > 0 for i = 1, 2, 3 if and only if x = −π/2. Similarly, we can obtain that if δ < 0, then wi > 0 for i = 1, 2, 3 if and only if x = π/2. If δ = 0, then for any x and any w1 > 0, the inequality in Observation 5 can never be satisfied. Therefore, for any x, it is not possible to have wi < 0 for all i = 1, 2, 3. A summary of all three cases. Let R(x) be the set of values for x such that there exist y and τ ≥ 0 with wi > 0 for i = 1, 2, 3. In other words, since x = α1 − θt , R(s) = {α1 − θt | θt ∈ Rπ (s, t)}. By our discussions for all three cases cos(x) > 0, cos(x) < 0, and cos(x) = 0, we can obtain the following: If δ > 0, we have  δ1 −δ2  for cos(x) > 0, (−π/2, arctan( δ )) δ1 −δ2 2 R(x) = (arctan( δ1 −δ δ ) + π, 3π/2) = (arctan( δ ) − π, −π/2) for cos(x) < 0,   {−π/2} for cos(x) = 0. Therefore, if δ > 0, R(x) is the union of the above three 2 π, arctan( δ1 −δ δ )). Similarly, if δ < 0, we have  δ1 −δ2  for (arctan( δ ), π/2) 2 R(x) = (π/2, arctan( δ1 −δ δ ) + π) for   {π/2} for 2 intervals, which is (arctan( δ1 −δ δ ) − cos(x) > 0, cos(x) < 0, cos(x) = 0. δ1 −δ2 2 Therefore, if δ < 0, R(x) = (arctan( δ1 −δ δ ), arctan( δ ) + π). Finally, if δ = 0, depending on the values of δ1 and δ2 , there are three (−π/2, π/2). If δ1 < δ2 , R(x) = (π/2, 3π/2). If δ1 = δ2 , R(x) = ∅. As a summary, we obtain the following  δ1 −δ2 2  (arctan( δ1 −δ  δ ) − π, arctan( δ )) if δ > 0,   δ1 −δ2 δ1 −δ2   (arctan( δ ), arctan( δ ) + π) if δ < 0, R(x) = (−π/2, π/2) if δ = 0 and    (π/2, 3π/2) if δ = 0 and     ∅ if δ = 0 and cases. If δ1 > δ2 , R(x) = δ1 > δ2 , δ1 < δ2 , δ1 = δ2 , Since R(s) = {α1 − θt | θt ∈ Rπ (s, t)}, we obtain the range Rπ (s, t) for θs as follows.  δ1 −δ2 2  (α1 − arctan( δ1 −δ  δ ), α1 − arctan( δ ) + π) if δ > 0,   δ1 −δ2 δ1 −δ2   (α1 − arctan( δ ) − π, α1 − arctan( δ )) if δ < 0, Rπ (s, t) = (α1 − π/2, α1 + π/2) if δ = 0 and δ1 > δ2 ,   (α1 − 3π/2, α1 − π/2) if δ = 0 and δ1 < δ2 ,     ∅ if δ = 0 and δ1 = δ2 , 28 To prove Lemma 11, it remains to show that δ = 0 and δ1 = δ2 if and only if ai = bi for each i = 1, 2, 3. To this end, we first give the following lemma. Lemma 15. If δ = 0 and δ1 = δ2 , then δ1 = δ2 = 0. Proof: Recall that sin(α3 − α1 ) sin(α2 − α1 ) − , sin(β3 − β1 ) sin(β2 − β1 ) cos(β2 − β1 ) − cos(α2 − α1 ) cos(β3 − β1 ) − cos(α3 − α1 ) δ1 = , and δ2 = . sin(β2 − β1 ) sin(β3 − β1 ) δ= For the purpose of differentiation, we use δ(1, 2, 3), δ1 (1, 2, 3), and δ2 (1, 2, 3) to represent the above δ, δ1 , and δ2 , respectively. We use (1, 2, 3) because our previous discussion considered d′ui ,vi (s, t) in the order of 1, 2, 3. Suppose δ(1, 2, 3) = 0 and δ1 (1, 2, 3) = δ2 (1, 2, 3). In the following, we give an “indirect” approach to prove δ1 (1, 2, 3) = δ2 (1, 2, 3) = 0. Our previous discussion has proved that Rπ (s, t) = ∅ if and only δ(1, 2, 3) = 0 and δ1 (1, 2, 3) = δ2 (1, 2, 3). In other words, there is no value for θs such that there exist θt and τ ≥ 0 with wi > 0 for i = 1, 2, 3 if and only if δ(1, 2, 3) = 0 and δ1 (1, 2, 3) = δ2 (1, 2, 3). Our previous analysis considered the three functions wi in the order of 1, 2, 3. If we consider them in the order of 2, 3, 1, by using the same analysis, we can obtain that Rπ (s, t) = ∅ if and only if δ(2, 3, 1) = 0 and δ1 (2, 3, 1) = δ2 (2, 3, 1), where δ(2, 3, 1) = sin(α1 − α2 ) sin(α3 − α2 ) − , sin(β1 − β2 ) sin(β3 − β2 ) cos(β3 − β2 ) − cos(α3 − α2 ) cos(β1 − β2 ) − cos(α1 − α2 ) , and δ2 (2, 3, 1) = . sin(β3 − β2 ) sin(β1 − β2 ) Another way to think about this is that we can replace 1, 2, 3 by 2, 3, 1, respectively, in δ(1, 2, 3), δ1 (1, 2, 3), and δ2 (1, 2, 3). The main reason why the same analysis as before still works is that if we follow the order of 2, 3, 1, the vertices of u2 , u3 , u1 are still in the counterclockwise order around s and the vertices of v2 , v3 , v1 are still in the clockwise order around t. We omit the detailed analysis. Similarly, if we consider the three functions wi in the order of 3, 1, 2, by using the same analysis, we can obtain that Rπ (s, t) = ∅ if and only if δ(3, 1, 2) = 0 and δ2 (3, 1, 2) = δ3 (3, 1, 2), where δ1 (2, 3, 1) = δ(3, 1, 2) = sin(α2 − α3 ) sin(α1 − α3 ) − , sin(β2 − β3 ) sin(β1 − β3 ) cos(β2 − β3 ) − cos(α2 − α3 ) cos(β1 − β3 ) − cos(α1 − α3 ) , and δ2 (3, 1, 2) = . sin(β1 − β3 ) sin(β2 − β3 ) Recall that δ(1, 2, 3) = 0 and δ1 (1, 2, 3) = δ2 (1, 2, 3). Thus, Rπ (s, t) = ∅. According to the above discussion, δ(2, 3, 1) = 0 and δ1 (2, 3, 1) = δ2 (2, 3, 1), and δ(3, 1, 2) = 0 and δ2 (3, 1, 2) = δ3 (3, 1, 2). In the following, we show that δ1 (1, 2, 3) = δ2 (1, 2, 3) = δ1 (2, 3, 1) = δ2 (2, 3, 1) = δ2 (3, 1, 2) = δ3 (3, 1, 2) = 0, which will prove the lemma. First of all, δ2 (1, 2, 3) = −δ1 (3, 1, 2) holds because cos(β3 − β1 ) = cos(β1 − β3 ), cos(α3 − α1 ) = cos(α1 − α3 ), and sin(β3 − β1 ) = − sin(β1 − β3 ). Similarly, we can obtain δ1 (2, 3, 1) = −δ2 (3, 1, 2) and δ1 (1, 2, 3) = −δ2 (2, 3, 1). Due to δ2 (1, 2, 3) = −δ1 (3, 1, 2) and δ1 (2, 3, 1) = −δ2 (3, 1, 2), we derive δ1 (1, 2, 3) = δ2 (1, 2, 3) = −δ1 (3, 1, 2) = −δ2 (3, 1, 2) = δ1 (2, 3, 1) = δ2 (2, 3, 1). In particular, we have δ1 (1, 2, 3) = δ2 (2, 3, 1). The above has obtained that both δ1 (1, 2, 3) = −δ2 (2, 3, 1) and δ1 (1, 2, 3) = δ2 (2, 3, 1) hold, implying that δ1 (1, 2, 3) = δ2 (2, 3, 1) = 0. Consequently, δ1 (1, 2, 3) = δ2 (1, 2, 3) = δ1 (2, 3, 1) = δ2 (2, 3, 1) = δ2 (3, 1, 2) = δ3 (3, 1, 2) = 0. The lemma thus follows.  δ1 (3, 1, 2) = 29 Lemma 16. δ = 0 and δ1 = δ2 if and only if ai = bi for each i = 1, 2, 3. Proof: Recall that a1 ≡ α2 − α1 , a2 ≡ α3 − α2 , a3 ≡ α1 − α3 , b1 ≡ β1 − β2 , b2 ≡ β2 − β3 , and b3 ≡ β3 − β1 . We first prove one direction of the lemma. Suppose ai = bi for each i = 1, 2, 3. Then, δ= − sin(a3 ) sin(a1 ) sin(α3 − α1 ) sin(α2 − α1 ) − = − = 0. sin(β3 − β1 ) sin(β2 − β1 ) sin(b3 ) − sin(b1 ) Also, we have cos(β2 − β1 ) = cos(b1 ) and cos(α2 − α1 ) = cos(a1 ). Since a1 = b1 , we obtain δ1 = 0. Similarly, we have cos(β3 − β1 ) = cos(b3 ) and cos(α3 − α1 ) = cos(a3 ). Since a3 = b3 , we obtain δ2 = 0. This proves that δ = 0 and δ1 = δ2 . Next we prove the other direction of the lemma. Suppose δ = 0 and δ1 = δ2 . In the following we prove ai = bi for i = 1, 2, 3. By Lemma 15, we know that δ1 = δ2 = 0. Since δ1 = 0, it holds that cos(β2 − β1 ) = cos(α2 − α1 ), i.e., cos(b1 ) = cos(a1 ). Similarly, since δ2 = 0, it holds that cos(β3 − β1 ) = cos(α3 − α1 ), i.e., cos(b3 ) = cos(a3 ). sin(a1 ) 3) On the other hand, δ = 0 implies that sin(a sin(b3 ) = sin(b1 ) . Note that b1 + b2 + b3 = 2π. Recall that two or even all three of u1 , u2 , u3 may be the same. According to our definitions of the three angles a1 , a2 , a3 , if u1 = u2 = u3 , then a1 = a2 = a3 = 0; otherwise, a1 + a2 + a3 = 2π although one of the three angles may still be zero. In either case, it holds that a1 + a2 + a3 ≤ 2π. In the sequel, we first prove a1 = b1 and a3 = b3 . Note that bi ∈ (0, π) for each i = 1, 2, 3, and ai ∈ [0, 2π) for each i = 1, 2, 3. Assume to the contrary that b1 6= a1 and b3 6= a3 . Due to cos(b1 ) = cos(a1 ), it must be that a1 = 2π − b1 . Since b1 ∈ (0, π), we obtain a1 ∈ (π, 2π). Similarly, due to cos(b3 ) = cos(a3 ), it must be that a3 = 2π − b3 . Since b3 ∈ (0, π), we obtain a3 ∈ (π, 2π). This yields that a1 + a3 > 2π, contradicting with a1 + a2 + a3 ≤ 2π. Therefore, at least one of b1 6= a1 and b3 6= a3 must be true. Without loss of generality, we assume b1 = a 1 . sin(a1 ) 3) Since sin(a sin(b3 ) = sin(b1 ) and b1 = a1 , it is obviously true that sin(a3 ) = sin(b3 ). Recall that we already have cos(a3 ) = cos(b3 ). Therefore, it must hold that a3 = b3 mod 2π. Since ai ∈ [0, 2π) and b3 ∈ (0, π), we obtain that a3 = b3 . This proves that a1 = b1 and a3 = b3 . Since neither b1 nor b3 is zero, we obtain a1 6= 0 and a3 6= 0, and thus a1 + a2 + a3 = 2π. This implies that a2 = b2 since b1 + b2 + b3 = 2π. The lemma thus follows.  5 Computing the Candidate Points In this section, with the help of the observations in Sections 3 and 4, we compute a set S of candidate points such that all geodesic centers must be in S. Let s be any geodesic center. Recall that F (s) is the set of all farthest points of s. Depending on whether s is in V, E, or I, the size |F (s)|, whether some points of F (s) are in V, E, or I, whether s has a degenerate farthest point, there are a significant (but still constant) number of cases. For each case, our algorithm uses an exhaustive-search approach to compute a set of candidate points such that s must be in the set. In particular, there are four cases, called dominating cases, for which the number of candidate points is O(n11 ). But the total number of the candidate points for all other cases is only O(n10 ). Therefore, the set S has a total of O(n11 ) candidate points. We will show that S can be computed in O(n11 log n) time. To find the geodesic centers in S, a straightforward algorithm works as follows. For each point ŝ ∈ S, we can compute dmax (ŝ) in O(n log n) time by first computing the shortest path map SPM (ŝ) of ŝ in O(n log n) time [12] and then obtaining the maximum geodesic distance from ŝ to all vertices 30 of SPM (ŝ). Since all geodesic centers are in S, the points of S with the smallest dmax (ŝ) are geodesic centers of P. Since |S| = O(n11 ), the above algorithm runs in O(n12 log n) time. Let Sd denote the set of the candidate points for the four dominating cases. Clearly, the bottleneck is on finding the geodesic centers from Sd . To improve the algorithm, when we compute the candidate points of Sd , we will maintain the corresponding path information. By using these path information and based on new observations, we will present in Section 6 an O(n11 log n) time “pruning algorithm” that can eliminate most of the points from Sd such that none of the eliminated points is a geodesic center and the number of remaining points in Sd is only O(n10 ). Consequently, we can use the above straightforward algorithm to find all geodesic centers in O(n11 log n) time. In the rest of this section, we focus on computing the set S. Our algorithm for finding the geodesic centers from S (in particular, the pruning algorithm) will be given in Section 6. In the following, we adopt the follow convention on notation: s represents a true geodesic center and ŝ represents a corresponding candidate point. First of all, for the case s ∈ V, we consider all polygon vertices of V as candidate points. In the following, we only consider the case s ∈ E or s ∈ I. If s has a degenerate farthest point, we refer to it as the degenerate case; otherwise it is a non-degenerate or general case. We will compute candidate points for the general case and the degenerate case in Sections 5.2 and 5.3, respectively. The four dominating cases are all general cases. We begin with computing the candidate points for a special case in Section 5.1. 5.1 A Special Case Consider a non-degenerate farthest point t of s such that t is in E or I. If t is in E, then there are exactly two shortest s-t paths; we say that t is a special farthest point of s if the π-range Rπ (s, t) of s with respect to t and the two shortest paths is ∅ (i.e., the special case in Lemma 8). Similarly, if t is in I, then there are exactly three shortest s-t paths; we say that t is a special farthest point of s if the π-range Rπ (s, t) of s with respect to t and the three shortest paths is ∅ (i.e., the special case in Lemma 11). If s has a special farthest point, we refer to it as the special case. Let s be any geodesic center in the special case. In this subsection, we will compute a set S1 of O(n5 ) candidate points in O(n5 log n) time for the special case, such that s must be in S1 . Let t be a special farthest point of s. By the above definition, t is in E or I. We discuss the two cases below. The case t ∈ E. Let e be the polygon edge that contains t. Let π1 (s, t) and π2 (s, t) be the two shortest s-t paths. For each i = 1, 2, let ui and vi be the s-pivot and t-pivot of πi (s, t), respectively (i.e., πi (s, t) = πui ,vi (s, t)). Then, we have |su1 | + d(u1 , v1 ) + |v1 t| = |su2 | + d(u2 , v2 ) + |v2 t|. We define the angles α1 , α2 , β1 , β2 in the same way as those for Lemma 8 in Section 4.2. Since Rπ (s, t) = ∅, by Lemma 8, β1 + β2 = π and α2 − α1 = ±π. Note that α2 − α1 = ±π implies that s is on the line segment u1 u2 . β1 + β2 = π implies that lt bisects the angle ∠v1 tv2 , where lt is the line through t and perpendicular to e. In summary, s and t satisfy the following “constraints”: (1) t ∈ e; (2) |su1 | + d(u1 , v1 ) + |v1 t| = |su2 | + d(u2 , v2 ) + |v2 t|; (3) s ∈ u1 u2 ; (4) lt bisects the angle ∠v1 tv2 . If we consider the coordinates of s and t as four variables, the above four (independent) constraints can determine s and t. An easy observation is that s must be in a bisector edge of two cells of SPM (t) whose roots are u1 and u2 , respectively (in fact s is the intersection of the bisector edge and u1 u2 ). Correspondingly, we compute the candidate points in an exhaustive way as follows. We enumerate all possible combinations of a polygon edge as e and two polygon vertices as v1 and v2 . For each combination, we find a point t on e such that the above condition (4) can be satisfied. 31 Next we compute the shortest path map SPM (t) of t. For each bisector edge of SPM (t), we consider it as e and let u1 and u2 be the roots of the two cells of SPM (t) incident to e; we report the intersection e ∩ u1 u2 (if any) as a candidate point ŝ. In this way, we can compute at most O(n) candidate points on SPM (t) since the combinatorial complexity of SPM (t) is O(n). Thus, for each combination of e, v1 , and v2 , we can compute O(n) candidate points. Since there are O(n3 ) combinations, we can compute O(n4 ) candidate points and we add these points to S1 . By our above discussions, the geodesic center s must be in S1 . Since computing a shortest path map takes O(n log n) time [12], the running time of the above algorithm is bounded by O(n4 log n). The case t ∈ I. In this case, there are exactly three shortest s-t paths: πi (s, t) = πui ,vi (s, t) with i = 1, 2, 3. Then we have |su1 | + d(u1 , v1 ) + |v1 t| = |su2 | + d(u2 , v2 ) + |v2 t| = |su3 | + d(u3 , v3 ) + |v3 t|. We define the angles ai , bi , for i = 1, 2, 3, in the same way as those for Lemma 11 in Section 4.4. By Lemma 11, ai = bi for i = 1, 2, 3. If we consider the coordinates of s and t as four variables, the above equation on the lengths of the three shortest paths provide two constraints and the identities of the three pairs of angles provide other two (independent) constraints, and thus the total four (independent) constraints can determine s and t. Correspondingly, we compute the candidate points for s as follows. We enumerate all possible combinations of three polygon vertices as v1 , v2 , v3 . We compute the shortest path maps of v1 , v2 , and v3 in O(n log n) time. Next we compute the overlay of the three shortest path maps. The overlay is of size O(n2 ) and can compute in O(n2 log n) time [3,7]. Then, for each cell of the overlay, we obtain the three roots of the cell in the three shortest path maps and consider them as u1 , u2 , u2 . Finally, we use the above four constraints to determine a constant number of pairs (ŝ, t) (we assume this can be done in constant time since the angles ai and bi can be parameterized by the coordinates of ŝ and t), and we add each ŝ to S1 as a candidate point. In this way, for each combination of v1 , v2 , v3 , we can compute O(n2 ) candidate points in O(n2 log n) time. Since there are O(n3 ) combinations, we can compute O(n5 ) candidate points in O(n5 log n) time. 5.2 The General Case Recall that in the general case s does not have a degenerate farthest point. Depending on whether s is in I or in E, there are two main cases. We first consider the case s ∈ I. The case s ∈ I. Depending on whether |F (s)| is 1, 2, or at least 3, there are further three cases. The case |F (s)| = 1. If |F (s)| = 1, let t be the only farthest point of s. Thus, R(s) = R(s, t). By Lemma 1, R(s) = ∅. Hence, R(s, t) = ∅. Since s ∈ I, by our observations in Section 4 (in particular, Lemmas 6, 7, 8, 9, 11, 12), t is either in E or I, and in either case Rπ (s, t) = ∅ since s ∈ I and Rf (s) consists of all directions. Hence, t must be a special farthest point of s, which implies that s has been computed in the candidate point set S1 . The case |F (s)| = 2. If |F (s)| = 2, we assume that F (s) does not have any special farthest points since otherwise s would have already been computed in S1 . Let F (s) = {t1 , t2 }. Depending on whether each of t1 and t2 is in V, E, or I, there are several cases. In the following, we use (x, y, z) to refer to the case where x, y, z points of F (s) are in I, E, and V, respectively, with x + y + z = 2. For example, (1, 1, 0) refers to the case where one point of F (x) is in I and the other is in E. 1. Case (2, 0, 0). We first consider the most general case where ti ∈ I for i = 1, 2. Other cases are very similar. For each i = 1, 2, since ti ∈ I, ti has three shortest paths to s: πuij ,vij (s, ti ) with 32 j = 1, 2, 3. Hence, we have the following |t1 v11 | + d(v11 , u11 ) + |u11 s| = |t1 v12 | + d(v12 , u12 ) + |u12 s| = |t1 v13 | + d(v13 , u13 ) + |u13 s| =|t2 v21 | + d(v21 , u21 ) + |u21 s| = |t2 v22 | + d(v22 , u22 ) + |u22 s| = |t2 v23 | + d(v23 , u23 ) + |u23 s|. Further, since s has only two farthest points and s ∈ I, it must hold that R(s) = Rπ (s, t1 ) ∩ Rπ (s, t2 ) = ∅ by Lemma 1. Recall that we have assumed that F (s) does not have any special farthest points. Therefore, neither Rπ (s, t1 ) nor Rπ (s, t2 ) is ∅. By Lemma 11, each of Rπ (s, t1 ) and Rπ (s, t2 ) is an open range of size π. For each i = 1, 2, the directions of Rπ (s, ti ) are delimited by an open half-plane whose bounding line contains s, and we refer to the bounding line as the bounding line of the range Rπ (s, ti ). Since Rπ (s, t1 ) ∩ Rπ (s, t2 ) = ∅, we can obtain that the bounding line of Rπ (s, t1 ) is the same as that of Rπ (s, t2 ). If we consider the coordinates of s, t1 , and t2 as six variables, the above system of equations on the distances of the six shortest paths provide five constraints and that the bounding lines of the two π-ranges overlap provides another constraint (note that the bounding lines of the two π-range can be parameterized by the coordinates of s, t1 , and t2 ). Hence, the six (independent) constraints can determine the triple (s, t1 , t2 ). Correspondingly, our algorithm for computing the candidate points works as follows. We enumerate all possible combinations of six polygon vertices as vij for i = 1, 2 and j = 1, 2, 3. We compute overlay of the shortest path maps of the six vertices. For each cell of the overlay, we obtain the six roots in the six shortest path maps as uij for i = 1, 2 and j = 1, 2, 3. Using the six constraints as discussed above, we can obtain a constant number of triples (ŝ, t1 , t2 ), and each such ŝ is a candidate point. In this way, for each combination, we can compute O(n2 ) candidate points in O(n2 log n) time. Since there are O(n6 ) combinations, we can compute O(n8 ) candidate points in overall O(n8 log n) time. As analyzed above, s must be one of these candidate points. 2. Case (1, 1, 0). In this case, one of t1 and t2 is in I and the other is in E. Without loss of generality, we assume t1 ∈ I and t2 ∈ E. Hence, t1 has three shortest paths to s: πu1j ,v1j (s, t1 ) for j = 1, 2, 3, and t2 has two shortest paths to s: πu2j ,v2j (s, t2 ) for j = 1, 2. Hence, we have the following |t1 v11 | + d(v11 , u11 ) + |u11 s| = |t1 v12 | + d(v12 , u12 ) + |u12 s| = |t1 v13 | + d(v13 , u13 ) + |u13 s| =|t2 v21 | + d(v21 , u21 ) + |u21 s| = |t2 v22 | + d(v22 , u22 ) + |u22 s|. As in the previous case, Rπ (s, t1 )∩ Rπ (s, t2 ) = ∅ and each of the two π-ranges is nonempty; further, and the two bounding lines of these two π-ranges must overlap. Let e be the polygon edge that contains t. The above equations provide four constraints and the overlap of the two bounding lines of the two π-ranges provides another constraint. In addition, t2 ∈ e gives the sixth constraint. As in the previous case, the six constraints can determine s, t1 , and t2 if we consider their coordinates as six variables. Correspondingly, we compute candidate points as follows. We enumerate all possible combinations of a polygon edge as e and five polygon vertices as v11 , v12 , v13 , v21 , v22 . We compute the overlay of the shortest path maps of the five vertices. For each cell of the overlay, we obtain the five roots in the five shortest path maps as u11 , u12 , u13 , u21 , u22 . Then we obtain the equations as above. Along with the constraint that t2 ∈ e and the constraint that the two bounding lines of the π-ranges Rπ (ŝ, t1 ) and Rπ (ŝ, t2 ) overlap, we can obtain a constant number of triples (ŝ, t1 , t2 ), and each such ŝ is a candidate point. In this way, for each combination, we can compute O(n2 ) candidate points in O(n2 log n) time. Since there are O(n8 ) combinations, we can compute O(n8 ) candidate points for s in O(n8 log n) time. 3. Other Cases. The other cases are all very similar (i.e., (1, 0, 1), (0, 2, 0), (0, 1, 1), (0, 0, 2)), and we can compute a total of O(n8 ) candidate points in O(n8 log n) time. We omit the details. As a summary, for the case |F (s)| = 2, we can compute at most O(n8 ) candidate centers in O(n8 log n) time. 33 The case |F (s)| ≥ 3. In this case, the geodesic center s has at least three farthest points. We assume s does not have any special farthest points since otherwise s would have already been computed in S1 . Hence, for each t ∈ F (s), the π-range Rπ (s, t) is not empty and thus is an open range of size π. Together with Lemma 1, this further implies that s must have three farthest points t1 , t2 , t3 such that Rπ (s, t1 ) ∩ Rπ (s, t2 ) ∩ Rπ (s, t3 ) = ∅. Depending on whether each of ti for i = 1, 2, 3 is in I, E, V, there are several cases. Similarly, we use (x, y, z) to refer to the case where x, y, and z points of t1 , t2 , t3 are in I, E, and V, respectively, with x + y + z = 3. We begin our discussion with the most general case (3, 0, 0), where t1 , t2 , t3 are all in I. This is one of the four dominating cases and we will need to compute O(n11 ) candidate points. Further, our algorithm is slightly different from the previous cases in the following sense: First, in addition to the candidate points, we will also maintain the corresponding path information; second, when computing the candidate points, we will have a “validation procedure”. Recall that Sd is the set of candidate points for all four dominating cases. The path information will be used in the next section to quickly prune most of the points in Sd and the validation procedure can be considered as a “preliminary pruning step”. The details are given below. For each i = 1, 2, 3, since ti is in I, there are exactly three shortest paths from s to ti : πuij ,vij (s, t) with j = 1, 2, 3. Hence, we have the following |t1 v11 | + d(v11 , u11 ) + |u11 s| = |t1 v12 | + d(v12 , u12 ) + |u12 s| = |t1 v13 | + d(v13 , u13 ) + |u13 s| =|t2 v21 | + d(v21 , u21 ) + |u21 s| = |t2 v22 | + d(v22 , u22 ) + |u22 s| = |t2 v23 | + d(v23 , u23 ) + |u23 s| =|t3 v31 | + d(v31 , u31 ) + |u31 s| = |t3 v32 | + d(v32 , u32 ) + |u32 s| = |t3 v33 | + d(v33 , u33 ) + |u33 s|. If we consider the coordinates of s, t1 , t2 , and t3 as eight variables, the above equations on the lengths of nine paths provide eight constraints, which are sufficient to determine all four points. Correspondingly, we compute the candidate points as follows. We enumerate all possible combinations of nine polygon vertices as vi1 , vi2 , vi3 , with i = 1, 2, 3. For each combination, we compute the overlay of the shortest path maps of these nine vertices. The size of the overlay is O(n2 ). For each cell C of the overlay, we obtain nine roots of the shortest path maps and consider them as ui1 , ui2 , ui3 for i = 1, 2, 3. We form the above system of eight equations and solve it to obtain a constant number of quadruples of points (ŝ, t̂1 , t̂2 , t̂3 ). We also obtain a path length, denoted by d(ŝ), which is equal to the value in the above equations, e.g., d(ŝ) = |ŝu11 | + d(u11 , v11 ) + |v11 t̂1 |. In addition, we perform a validation procedure on each such quadruple (ŝ, t̂1 , t̂2 , t̂3 ) as follows. First, we check whether ŝ is in C, which can be done in O(log n) time by using a point location data structure [9,14] with O(n2 ) time and space preprocessing on the overlay. If yes, for each ti with i = 1, 2, 3, we check whether d(ŝ) is equal to d(ŝ, t̂i ), which can be computed in O(log n) time by using the two-point shortest path query data structure given by Chiang and Mitchell [7] with O(n11 ) time and space preprocessing on P. If yes, we check whether vi1 , vi2 , vi3 satisfy the condition in Observation 1(1), i.e., whether t̂i is in the interior of the triangle △vi1 vi2 vi3 for each i = 1, 2, 3. If yes, for each t̂i with i = 1, 2, 3, we check whether the order of the vertices of vi1 , vi2 , vi3 around t̂i are consistent with the order of the vertices of ui1 , ui2 , ui3 (we say that the two orders are consistent if after reordering the indices, vi1 , vi2 , vi3 are clockwise around t̂i while ui1 , ui2 , ui3 are counterclockwise around s; note that this consistency is needed for determining the π-range in Lemma 11). If yes, for each t̂i with i = 1, 2, 3, we compute the π-range Rπ (s, t̂i ) determined by Lemma 11, and then check whether Rπ (ŝ, t̂1 ) ∩ Rπ (ŝ, t̂2 ) ∩ Rπ (ŝ, t̂3 ) is empty. If yes, we say that the quadruple (ŝ, t̂1 , t̂2 , t̂3 ) passes the validation procedure and we call ŝ a valid candidate point and add ŝ to the set Sd . In addition, we maintain the following path information: d(ŝ), t̂i , vij , and uij , with 1 ≤ i ≤ 3 and 1 ≤ j ≤ 3. In fact, only d(ŝ) will be used later in the algorithm and all other information are only for the reference purpose in the analysis. 34 In this way, for each combination of nine polygon vertices, we can compute O(n2 ) valid candidate for Sd in O(n2 log n) time (not including the preprocessing time). Since there are O(n9 ) combinations, we can compute a total of O(n11 ) valid candidate points for Sd in O(n11 log n) time. Note that the geodesic center s and the quadruple (s, t1 , t2 , t3 ) discussed above must pass the validation procedure, and thus the quadruple (s, t1 , t2 , t3 ) will be computed by our exhaustive-search algorithm and s will be computed as a valid candidate point in Sd . Based on our validation procedure, the following observation summarizes the properties of the valid candidate points. These properties will be used to prove the correctness of our pruning algorithm in Section 6. Observation 6 Suppose (ŝ, t̂1 , t̂2 , t̂3 ) is a quadruple that passes the validation procedure, with uij and vij , i = 1, 2, 3 and j = 1, 2, 3 defined as above. Then the following hold. 1. For each i = 1, 2, 3, ŝuij ∪ π(uij , vij ) ∪ vij t̂i is a shortest path from ŝ to t̂i for each j = 1, 2, 3. 2. For each i = 1, 2, 3, vi1 , vi2 , vi3 satisfy the condition of Observation 1(1), i.e., t̂i is in the interior of the triangle △vi1 vi2 vi3 . 3. d(ŝ) = d(ŝ, t̂i ) for each i = 1, 2, 3. 4. Rπ (ŝ, t̂1 ) ∩ Rπ (ŝ, t̂2 ) ∩ Rπ (ŝ, t̂1 ) = ∅. The above computes the candidate points for the case (3, 0, 0). In the following, we compute candidate points for other cases. The algorithms are similar. 1. Case (2, 1, 0). In this case, two of t1 , t2 , t3 are in I and the third one is in E. Without loss of generality, we assume t1 and t2 are in I and t3 is in E. Let e be the polygon edge containing t3 . This is the second dominating case. We will also perform a validation procedure and maintain the corresponding path information. For each i = 1, 2, since ti is in I, there are three shortest paths from s to ti : πuij ,vij (s, t) for j = 1, 2, 3. Since t3 ∈ E, there are two shortest paths from s to t3 : πu3j ,v3j (s, t) for j = 1, 2. Hence, we have the following |t1 v11 | + d(v11 , u11 ) + |u11 s| = |t1 v12 | + d(v12 , u12 ) + |u12 s| = |t1 v13 | + d(v13 , u13 ) + |u13 s| =|t2 v21 | + d(v21 , u21 ) + |u21 s| = |t2 v22 | + d(v22 , u22 ) + |u22 s| = |t2 v23 | + d(v23 , u23 ) + |u23 s| =|t3 v31 | + d(v31 , u31 ) + |u31 s| = |t3 v32 | + d(v32 , u32 ) + |u32 s|. If we consider the coordinates of s, t1 , t2 , t3 as eight variables, the above equations give seven constraints. With the additional constraint that t3 is on e, we can determine (s, t1 , t2 , t3 ). Correspondingly, we compute the candidate points as follows. We enumerate all combinations of eight polygon vertices (as v11 , v12 , v13 , v21 , v22 , v23 , v31 , v32 ) and one polygon edge (as e). For each combination, we can compute O(n2 ) quadruples (ŝ, t̂1 , t̂2 , t̂3 ). For each such quadruple, we also perform the validation procedure similarly as before with the following differences. For t̂3 , since there is no vertex v33 , we ignore all operations that involve v33 . Further, we check whether {v11 , v12 } satisfy the condition in Observation 1(2) (instead of Observation 1(1)). We determine the range Rπ (s, t3 ) by using Lemma 8 (instead of Lemma 11). In this way, we can compute at most O(n11 ) valid candidate points in O(n11 log n) time and add them to Sd , and also, we maintain the corresponding path information similarly as before. Observation 6 still holds correspondingly with the following difference: in (1) there are only two shortest paths for t̂3 ; in (2) for t̂3 , {v11 , v12 } satisfy the condition of Observation 1(2). 2. Cases (1, 2, 0) and (0, 3, 0). These are the other two dominating cases. We can compute O(n11 ) valid candidate points in O(n11 log n) time. The algorithms are very similar to the previous two cases. For each case, we also need a validation procedure and keep the path information. We omit the details. 35 We have discussed all four dominating cases. Note that the candidate points for all four dominating cases are in I. The rest of the cases are not dominating cases. For each of the remaining cases, the validation procedure and the path information will not be needed any more. 3. Other cases. Our algorithms for all other cases (e.g. (2, 0, 1), (1, 1, 1), (1, 0, 2), (0, 2, 1), (0, 1, 2), (0, 0, 3)) are very similar as before (except that the validation procedure and the path information are not needed). We can compute a total of O(n10 ) candidate points in O(n10 log n) time. We omit the details. As a summary for the case s ∈ I, for the four dominating cases, we have computed O(n11 ) valid candidate points in O(n11 log n) time with the corresponding path information. For all other cases, we have computed O(n10 ) candidate points. The case s ∈ E. Our algorithm for computing candidate points for this case is slightly different. Consider a geodesic center s in E. Let es denote the polygon edge that contains s. Depending on whether |F (s)| is 1 or not, there are two cases. The case |F (s)| = 1. If |F (s)| = 1, let t be the only farthest point of s. We assume that t is not a special farthest point of s since otherwise s would have already been computed in S1 in Section 5.1. Thus, by Lemma 8, the π-range Rπ (s, t) is an open range of size π. Since t is the only farthest point of s, by Lemma 1, R(s) = R(s, t) = ∅. By Lemma 9, R(s, t) = ∅ implies that the bounding line of the range Rπ (s, t) contains es , and this provides a constraint for determining s and t. Depending on whether t is in I, E, or V, there are three cases. 1. The case t ∈ I. We first consider the most general case in which t ∈ I. There are three shortest s-t paths: πui vi (s, t) for i = 1, 2, 3. Thus, we have the following |tv1 | + d(v1 , u1 ) + |u1 s| = |tv2 | + d(v2 , u2 ) + |u2 s| = |tv3 | + d(v3 , u3 ) + |u3 s|. If we consider the coordinates of s and t as four variables, then the above equations provide two constraints and s ∈ es gives another constraint. In addition, that the bounding line of the range Rπ (s, t) contains es provides the fourth constraint. Hence, the four constraints can determine s and t. Correspondingly, we compute the candidate points as follows. We enumerate all possible combinations of three polygon vertices as v1 , v2 , v3 . For each combination, we compute the overlay of the shortest path maps of v1 , v2 , and v3 . For each cell C of the overlay, if it contains a portion of a polygon edge, we consider the edge as es and obtain three roots of the shortest path maps as u1 , u2 , and u3 . Using the four constraints discussed above, we can obtain a constant number of tuples (ŝ, t) and each such ŝ is a candidate point. In this way, we can compute O(n5 ) candidate points in O(n5 log n) time. 2. The case t ∈ E. Let et be the polygon edge that contains t. There are two shortest s-t paths, which gives one constraint for determining s and t. s ∈ es and t ∈ et provide two constraints. Finally, that the bounding line of the range Rπ (s, t) contains es gives the fourth constraint. Hence, we still have four constraints to determine s and t. The algorithm is similar to the previous case. We can compute O(n5 ) candidate points in O(n5 log n) time. We omit the details. 3. The case t ∈ V. In this case, t is a polygon vertex, which provides two constraints (or t is fixed already). s ∈ es is another constraint. As before, that the bounding line of the range Rπ (s, t) contains es provides the fourth constraint. We compute the candidate points as follows. We enumerate all polygon vertices. For each vertex, we consider it as t and compute the shortest path map SPM (t). For each cell C of SPM (t), if it contains a portion of polygon edge on its boundary, then we consider that edge as es . Next, we find a candidate point ŝ on that portion of es in C such that the π-range Rπ (ŝ, t) (determined by Lemma 8) has its bounding line contain es . In this way, we can compute O(n2 ) candidate points in O(n2 log n) time. 36 In summary, for the case |F (s)| = 1, we compute O(n5 ) candidate points in O(n5 log n) time. The case |F (s)| ≥ 2. Let t1 and t2 be the two farthest points of s. We assume s does not have any special farthest points since otherwise s would have already been computed in S1 . Then, neither Rπ (s, t1 ) nor Rπ (s, t2 ) is empty. Depending on whether each of t1 and t2 is in I, E, or V, there are several cases. We first consider the most general case where both t1 and t2 are in I. Other cases are very similar. For each i = 1, 2, since ti ∈ I, there are three shortest paths from s to ti : πuij ,vij (s, t) with j = 1, 2, 3. Hence, we have the following |t1 v11 | + d(v11 , u11 ) + |u11 s| = |t1 v12 | + d(v12 , u12 ) + |u12 s| = |t1 v13 | + d(v13 , u13 ) + |u13 s| =|t2 v21 | + d(v21 , u21 ) + |u21 s| = |t2 v22 | + d(v22 , u22 ) + |u22 s| = |t2 v23 | + d(v23 , u23 ) + |u23 s|. The above equations provide five constraints for s and t. With the constraint that s ∈ es , we can determine s, t1 , and t2 , if we consider their coordinates as six variables. Correspondingly, we compute the candidate points as follows. We enumerate all possible combinations of six polygon vertices as v11 , v12 , v13 , v21 , v22 , v23 . For each combination, we compute the overlay of the shortest path maps of the six vertices. For each cell C of the overlay, if C contains a portion of a polygon edge, then we consider the edge as es and using the six constraints mentioned above to compute at most a constant number of triples (ŝ, t1 , t2 ). Hence, for each combination, we can compute at most O(n2 ) candidate points in O(n2 log n) time. In this way, we can compute O(n8 ) candidate points in O(n8 log n) time. Candidate points for other cases can be computed similarly. We can compute O(n8 ) candidate points in O(n8 log n) time. We omit the details. As a summary for the case s ∈ E, we can compute a total of O(n8 ) candidate points in O(n8 log n) time. 5.3 The Degenerate Case In the degenerate case, the geodesic center s has at least one degenerate farthest point. Depending on whether s is in I or E, there are two main cases. The Case s ∈ I. Depending on whether |F (s)| is 1 or not, there are further two cases. The case |F (s)| = 1. Let t be the only point of F (s). Then t is a degenerate farthest point of s. Depending on whether t is in V, E, or I, there are three cases. 1. If t ∈ V, then since t is degenerate, there are at least two shortest s-t paths. Further, since t is polygon vertex and due to our general position assumption that no two polygon vertices have more than one shortest path, it holds that |Us (t)| ≥ 2. If |Us (t)| ≥ 3, then s is a vertex of SPM (t). Correspondingly, we can compute candidate points as follows. For each polygon vertex, we consider it as t and compute its shortest path map SPM (t). Then, we report each vertex of SPM (t) as a candidate points. In this way, we can compute O(n2 ) candidate points for s in O(n2 log n) time. If |Us (t)| = 2, let Us (t) = {u1 , u2 }. We first prove a claim: s ∈ u1 u2 . Indeed, suppose to the contrary that the claim is not true. Then, su1 and su2 form an angle ∠u1 su2 ∈ (0, π). Consider the direction rs for moving s along the bisector of ∠v1 sv2 and towards the interior of ∠v1 sv2 . If we move s along rs with unit speed, since ∠u1 su2 is strictly less than π and Us (t) = {u1 , u2 }, each vertex v ∈ Ut (s) has a coupled s-pivot u ∈ Us (t) with d′u,v (s, t) < 0. Since s ∈ I, rs is a free direction. By Lemma 4, rs is an admissible direction of s with respect 37 to t, i.e., rs ∈ R(s, t). Since R(s) = R(s, t), we obtain that R(s) is not empty, contradicting with Lemma 1. The claim thus follows. s ∈ u1 u2 provides a constraint for determining s (if we consider t ∈ V as fixed at a polygon vertex). Further, there are two shortest s-t paths πui vi (s, t) with i = 1, 2. Hence, s must be in the bisector edge that is incident to the two cells whose roots are u1 and u2 , respectively, in the shortest path map SPM (t). Correspondingly, we compute the candidate points as follows. We enumerate all polygon vertices. For each polygon vertex, we consider it as t and compute SPM (t). For each bisector edge of SPM (t), we obtain the roots of the two cells incident to the bisector edge as u1 and u2 . Then, we compute a candidate point ŝ on the bisector edge such that ŝ ∈ u1 u2 (i.e., ŝ is the intersection of u1 u2 and the bisector edge). In this way, we can compute O(n2 ) candidate points in O(n2 log n) time. 2. If t ∈ E, then since t is degenerate, there are at least three shortest s-t paths. Let et be the polygon edge that contains t. Since t is a farthest point of s, t must have two vertices v1 and v2 that satisfy the condition in Observation 1. Hence, there are two shortest s-t paths πui ,vi (s, t) for i = 1, 2. Since s ∈ I, we claim that the π-range Rπ (s, t) with respect to the two shortest paths πui ,vi (s, t) for i = 1, 2 must be empty. Assume to the contrary that this is not true. Then, by Lemma 5(2), R(s, t) is not empty (in fact, Rπ (s, t) ⊆ R(s, t)). Since t is the only farthest point of s, we obtain that R(s) = R(s, t) 6= ∅, which contradicts with Lemma 1. Since Rπ (s, t) = ∅, one can check that s has already been computed in S1 in Section 5.1 (for the case t ∈ E). 3. If t ∈ I, since t is degenerate, there are at most four shortest s-t paths. By Observation 1, |Ut (s)| ≥ 3. Depending on whether |Ut (s)| = 3, there are two cases. We first discuss the case where |Ut (s)| = 3. Let v1 , v2 , v3 be the three vertices in Ut (s). By Observation 1, t is in the interior of the triangle △v1 v2 v3 . Then, there must exist three shortest s-t paths πui ,vi (s, t) such that no two paths cross each other, and this implies that the three paths are canonical. Let Rπ (s, t) denote the π-range of s with respect to t and the above three shortest paths. If Rπ (s, t) = ∅, then one can check that s has already been computed in S1 in Section 5.1. Otherwise, as the above second case, since s ∈ I and F (s) = {t}, by Lemma 5(1) any direction in Rπ (s, t) is in R(s, t), implying that R(s) = R(s, t) 6= ∅, which contradicts with Lemma 1. Next we discuss the case where |Ut (s)| > 3. By Observation 1, t is in the interior of the convex hull of all vertices of Ut (s). If there exist three vertices v1 , v2 , v3 of Ut (s) such that t is in the interior of △v1 v2 v3 , then we can still use the same approach as the above case for |Ut (s)| = 3. Otherwise, there must exist four vertices v1 , v2 , v3 , v4 ∈ Ut (s) such that t is the intersection of the two line segments v1 v2 and v3 v4 . On the other hand, since s ∈ I and t is the only farthest point of s, we claim that |Us (t)| ≥ 2. Indeed, suppose to the contrary that |Us (t)| = 1. Then, if we move s towards the only vertex u of Us (t) with unit speed, then for each vertex v ∈ Ut (s), d′u,v (s, t) < 0 holds. Hence, by Lemma 2(1), the above direction for s is in R(s, t), implying that R(s) = R(s, t) 6= ∅, which contradicts with Lemma 1. Therefore, the claim follows. Depending on whether |Us (t)| ≥ 3, there are two cases. (a) If |Us (t)| ≥ 3, then s is a vertex of the shortest path map SPM (t). Correspondingly, we compute the candidate points as follows. We enumerate all possible combinations of four polygon vertices as vi for 1 ≤ i ≤ 4. For each such combination, we compute the intersection of v1 v2 and v3 v4 and consider the intersection as t. Then we compute SPM (t) and return all vertices of SPM (t) as candidate points. In this way, for each combination, we can compute at most O(n) candidate points in O(n log n) time. Since there are O(n4 ) combinations, we can compute a total of O(n5 ) candidate points in O(n5 log n) time. 38 (b) If |Us (t)| = 2, let Us (t) = {u1 , u2 }. An easy observation is that s must be on the bisector edge of u1 and u2 in SPM (t). Further, by the same analysis as before, we can show that s must be on u1 u2 . Correspondingly, we can compute the candidate points as follows. We enumerate all possible combinations of four polygon vertices as vi for 1 ≤ i ≤ 4. For each such combination, we compute the intersection of v1 v2 and v3 v4 and consider the intersection as t. Then, we compute SPM (t). For each bisector edge of SPM (t), we obtain the roots of the two cells incident to the bisector edge as u1 and u2 , respectively. Then, we find the intersection of u1 u2 and the bisector edge as a candidate point. Since there are O(n) bisector edges, we can find O(n) candidate points. In this way, we can compute O(n5 ) candidate points in O(n5 log n) time. This finishes the case for |F (s)| = 1. The case |F (s)| ≥ 2. Recall that s has at least one degenerate farthest point. Let t1 and t2 be any two points of F (s) such that t1 is degenerate. We first consider the most general case where both t1 and t2 are in I. For each i = 1, 2, ti has at least three shortest paths from s and |Uti (s)| ≥ 3. Since t1 is degenerate, t1 has at least four shortest paths from s. Depending on whether |Ut1 (s)| = 3, there are two cases. If |Ut1 (s)| > 3, let v1j for 1 ≤ j ≤ 4 be any four vertices of Ut1 (s). Hence, there are four shortest paths from s to t1 : πu1j ,v1j (s, t1 ) with 1 ≤ j ≤ 4. For t2 , let v2j for 1 ≤ j ≤ 3 be any three vertices of Ut2 (s), and there are three shortest paths from s to t2 : πu2j ,v2j (s, t2 ) with 1 ≤ j ≤ 3. We can form a system of equations with the lengths of the above seven shortest paths, which give six constraints to determine (s, t1 , t2 ). Correspondingly, we can compute O(n9 ) candidate points in O(n9 log n) time. The algorithm is similar to the previous algorithms and we omit the details. If |Ut1 (s)| = 3, let v1j for 1 ≤ j ≤ 3 be the three vertices of Ut1 (s). Since there are at least four shortest paths from s to t1 and due to our general position assumption that no two polygon vertices have more than one shortest path, there exists a vertex, say v11 , in Ut1 (s) such that there are at least two shortest paths from s to v11 . Hence, s must be on a bisector edge of the shortest path map SPM (v11 ). Let πu1j ,v1j (s, t1 ) for j = 1, 2, 3 be three shortest paths from s to t1 . Let πu2j ,v2j (s, t2 ) for j = 1, 2, 3 be three shortest paths from s to t2 . We can form a system of equations with the lengths of the six paths. These equations can give five constraints, and along with that s is on a bisector edge of SPM (t1 ), we can determine (s, t1 , t2 ) (equivalently, one may also consider that the seven shortest paths give six constraints). Correspondingly, we compute the candidate points as follows. We enumerate all possible combinations of six polygon vertices as vij for i = 1, 2 and j = 1, 2, 3. For each combination, we compute the overlay of the shortest path maps of these vertices. For each cell of the overlay, if its boundary has a portion of a bisector edge of SPM (v11 ), then based on the above system of equations on the lengths of the six paths, we determine a constant number of triples (ŝ, t1 , t2 ) and each such ŝ is a candidate point. Since the size of the overlay is O(n2 ), we can determine O(n2 ) candidate points for each combination. Since there are O(n6 ) combinations, we can compute O(n8 ) candidate points in O(n8 log n) time. The above computes O(n9 ) candidate points for the case where both t1 and t2 are in I. Other cases are very similar. For example, consider the case where t1 ∈ I and t2 is on a polygonal edge e ∈ E. Comparing with the previous case, since t2 is in E, there will be one less constraint on the equations of shortest path lengths, but t2 ∈ e gives one more constraint. All other cases are similar. We can compute at most O(n9 ) candidate points in O(n9 log n) for all other cases. The details are omitted. This finishes the case for |F (s)| ≥ 2 and thus the case for s ∈ I. The Case s ∈ E. Let es be the polygon edge that contains s. Let t be a degenerate farthest point of s. Depending on whether t is in V, E, or I, there are three cases. 39 1. If t ∈ V, then there are at least two shortest s-t paths. Further, since t is a polygon vertex, due to our general position assumption that any two polygon vertices have no more than one shortest path, Us (t) has at least two vertices. This implies that s is in a bisector edge of SPM (t). Further, as s is on es , s is at the intersection of a bisector edge of SPM (t) and es . Correspondingly, we compute the candidate points as follows. We consider all polygon vertices. For each vertex, we consider it as t and compute SPM (t). For each bisector edge, if it intersects a polygon edge, we compute the intersection as a candidate point. In this way, we can compute O(n2 ) candidate points in O(n2 log n) time. 2. If t ∈ E, let et be the polygon edge that contains t. Since t ∈ E and t is degenerate, there are at least three shortest paths from s to t. Since t ∈ et , Ut (s) must have two vertices v1 and v2 that satisfy the condition of Observation 1(2). Hence, |Ut (s)| ≥ 2. Depending on whether |Ut (s)| ≥ 3, there are two cases. (a) If |Ut (s)| ≥ 3, let vi with i = 1, 2, 3 be any three vertices of Ut (s). Then, there are three shortest s-t paths πui ,vi (s, t) for i = 1, 2, 3. We have the following |tv1 | + d(v1 , u1 ) + |u1 s| = |tv2 | + d(v2 , u2 ) + |u2 s| = |tv3 | + d(v3 , u3 ) + |u3 s|. The above equations provide two constraints, and along with the constraints that s ∈ es and t ∈ et , the four constraints can determine s and t. Correspondingly, we compute the candidate points as follows. We enumerate all possible combinations of three vertices as vi for i = 1, 2, 3 and a polygon edge as et . For each combination, we compute the overlay of the shortest path maps of v1 , v2 , and v3 . For each cell C of the overlay, if it has an edge that is a portion of a polygon edge, then we consider the polygon edge as es and obtain the three roots of the three shortest path maps as ui for i = 1, 2, 3. Next, using the four constraints mentioned above, we can determine a constant number of tuples (ŝ, t) and each such ŝ is a candidate point. Since the size of the overlay is O(n2 ), for each combination we can obtain O(n2 ) candidate points in O(n2 log n) time. Since there are O(n4 ) combinations, we can compute O(n6 ) candidate points in O(n6 log n) time. (b) If |Ut (s)| = 2, let v1 and v2 be the two vertices of Ut (s). Since there are at least three shortest s-t paths and due to our general position assumption that no two polygon vertices have more than one shortest path, one of v1 and v2 , say v1 , must have at least two shortest paths to s such that |Us (v1 )| ≥ 2. Hence, s is on a bisector edge of SPM (v1 ). Since s ∈ es , s is the intersection of es and a bisector edge of SPM (v1 ). Correspondingly, we can compute the candidate points as follows. We enumerate all polygon vertices. For each vertex, we consider it as v1 and compute its shortest path map SPM (v1 ). Then, for each intersection between a bisector edge of SPM (v1 ) and a polygon edge, we consider it as a candidate point. Since the size of SPM (v1 ) is O(n), there are O(n) such candidate points. In this way, we can compute at most O(n2 ) candidate points in O(n2 log n) time. 3. If t ∈ I, then there are at least four shortest s-t paths, and |Ut (s)| ≥ 3 by Observation 1. Depending on whether |Ut (s)| ≥ 4, there two cases. (a) If |Ut (s)| ≥ 4, then let vi with 1 ≤ i ≤ 4 be any four vertices of Ut (s). Then, there are four shortest s-t paths πui ,vi (s, t) for 1 ≤ i ≤ 4. We have the following |tv1 | + d(v1 , u1 ) + |u1 s| = |tv2 | + d(v2 , u2 ) + |u2 s| = |tv3 | + d(v3 , u3 ) + |u3 s| = |tv4 | + d(v4 , u4 ) + |u4 s|. The above equations provide three constraints, and along with the constraints that s ∈ es , the four constraints can determine s and t. Correspondingly, we can compute O(n6 ) candidate points in O(n6 log n) time. The algorithm is similar as before and we omit the details. 40 (b) If |Ut (s)| = 3, let vi with i = 1, 2, 3 be the three vertices of Ut (s). Since there are at least four shortest s-t paths and due to our general position assumption that no two polygon vertices have more than one shortest path, one of vi with i = 1, 2, 3, say v1 , must have at least two shortest paths to s such that |Us (v1 )| ≥ 2. Hence, s is on a bisector edge of SPM (v1 ). Since s ∈ es , s is the intersection of es and a bisector edge of SPM (v1 ). Correspondingly, by using the same approach as the above case 2(b), we can compute O(n2 ) candidate points in O(n2 log n) time. This finishes the case for s ∈ E. This also finishes our algorithms for computing candidate points for the degenerate case. In summary, we can compute a total of O(n9 ) candidate points in O(n9 log n) time such that s is one of these candidate points. 6 Computing the Geodesic Centers In this section, we find all geodesic centers from the candidate point set S. Let S ′ denote the set of candidate points for all cases other than the four dominating cases. Recall that Sd is the set of candidate points for the four dominating cases. Hence, S = S ′ ∪ Sd . As discussed in Section 5, |S ′ | = O(n10 ) and we can find all geodesic centers in S ′ in O(n11 log n) time by computing their shortest path maps. In the following, we focus on finding all geodesic centers in Sd . We first remove all points from Sd that are also in S ′ , which can be done in O(n11 log n) time (e.g., by first sorting these points by their coordinates). Then, for any point s ∈ Sd , if s is a geodesic center, s does not have any degenerate farthest point since otherwise s was also in S ′ and thus would have already been removed from Sd . Recall that each point s of Sd is a valid candidate point and we have maintained its path information for s (in particular, the value d(s)). We first perform the following duplication-cleanup procedure: for each point s ∈ Sd , if there are many copies of s, we only keep the one with the largest value d(s) (if more than one copy has the largest value, we keep an arbitrary one). This procedure can be done in O(n11 log n) time (e.g., by first sorting all points of Sd by their coordinates). According to our algorithm for computing the candidate points of Sd , we have the following observation. Observation 7 After the duplication-cleanup procedure, for any point s ∈ Sd , if s is a geodesic center, then dmax (s) = d(s). Proof: For differentiation, we use Sd to denote the original set of Sd before the duplication-cleanup procedure and use Sd′ to denote the set after the procedure. Note that Sd and Sd′ contain the same physical points and the difference is that for each point of Sd′ , Sd may contain multiple copies of the point, and each copy is associated with different path information. Recall that none of the point of Sd is in S ′ . Consider any point s ∈ Sd′ and suppose s is a geodesic center. According to our algorithm for computing candidate points of Sd , there must be a copy of s in Sd for which we have maintained its path information that includes a farthest point t of s and d(s) = d(s, t) by Observation 6. Since t is a farthest point of s, d(s, t) = dmax (s). Therefore, there exists a copy of s in Sd with d(s) = dmax (s). Let s′ denote any other copy of s in Sd . Again, by Observation 6, d(s′ ) is equal to the shortest path distance from s′ to a point t′ . Hence, d(s′ ) ≤ dmax (s′ ) = dmax (s) = d(s). According to our duplication-cleanup procedure, if d(s′ ) < d(s), then the copy s′ will be removed from Sd′ . Otherwise, either copy may be removed, but in either case, the d(·) value of the remaining copy is always equal to dmax (s). Hence, the observation follows.  Recall that all points of Sd are in I. 41 In the following, we give a pruning algorithm that can eliminate most of the points from Sd such that none of these eliminated points is a geodesic center and the number of remaining points of Sd is O(n10 ). Our pruning algorithm relies on the property that each candidate point s of Sd is valid. Specifically, if s is computed for the dominating case (3, 0, 0), then s is associated with the following path information d(s), ti , vij , and uij for 1 ≤ i ≤ 3 and 1 ≤ j ≤ 3, such that Observation 6 holds (i.e., s is ŝ and each ti is t̂i ). For other three dominating cases (e.g., (2, 1, 0), (1, 2, 0), and (0, 3, 0)), there are similar properties. By using these properties, we have the following lemma. Lemma 17. Let s be any point in Sd . If s is in the interior of a cell or an edge of Dspm, then for any other point s′ in the interior of the same cell or edge of Dspm , it holds that dmax (s′ ) > d(s). Proof: The proof uses similar techniques as that for Lemma 3. We only prove the case for s being a candidate point for Case (3, 0, 0), and other cases are similar. Recall that s is associated with the following path information d(s), ti , vij , and uij for 1 ≤ i ≤ 3 and 1 ≤ j ≤ 3, such that Observation 6 holds. If s′ be any other point in the same cell or edge of Dspm that contains s. Hence, SPM (s) and SPM (s′ ) are topologically equivalent. Consider any ti with 1 ≤ i ≤ 3. By Observation 6, for each j = 1, 2, 3, πuij ,vij (s, t) is a shortest paths from s to ti . Since SPM (s) and SPM (s′ ) are topologically equivalent, SPM (s′ ) has one and only one vertex t′i corresponding to ti and for each j = 1, 2, 3, πuij ,vij (s′ , t′i ) is a shortest path from s′ to t′i . Let r be the direction from s to s′ . By Observation 6, Rπ (s, t1 )∩Rπ (s, t2 )∩Rπ (s, t3 ) = ∅. Therefore, r is not in Rπ (s, ti ) for some i with 1 ≤ i ≤ 3. Without loss of generality, we assume r is not in Rπ (s, t1 ). Suppose we move s along the direction r with unit speed and move t1 to t′1 with speed |t1 t′1 |/|ss′ |. Hence, when s arrives at s′ , t1 arrives at t′1 simultaneously. Since r is not in Rπ (s, t1 ), there must be a path πu1j ,v1j (s, t1 ) for some j with 1 ≤ j ≤ 3 such that d′u1j ,v1j (s, t1 ) < 0 does not hold. Without loss of generality, we assume j = 1. In other words, either d′u11 ,v11 (s, t1 ) > 0 or d′u11 ,v11 (s, t1 ) = 0. 1. If d′u11 ,v11 (s, t1 ) > 0, then since d′′u11 ,v11 (s, t1 ) ≥ 0 always holds, we have du11 ,v11 (s, t1 ) < du11 ,v11 (s′ , t′1 ). Since d(s) = du11 ,v11 (s, t1 ) and dmax (s′ ) ≥ d(s′ , t′1 ) = du11 ,v11 (s′ , t′1 ), we obtain that dmax (s′ ) > d(s), which proves the lemma. 2. If d′u11 ,v11 (s, t1 ) = 0, recall that d′′u11 ,v11 (s, t1 ) ≥ 0 always holds. If d′′u11 ,v11 (s, t1 ) > 0, then we again obtain du11 ,v11 (s, t1 ) < du11 ,v11 (s′ , t′1 ), and consequently, dmax (s′ ) > d(s). Otherwise, d′′u11 ,v11 (s, t1 ) = 0. We claim that this case cannot happen. Indeed, suppose to the contrary that d′′u11 ,v11 (s, t1 ) = 0. Then, we have du11 ,v11 (s, t1 ) = du11 ,v11 (s′ , t′1 ). Since πu1j ,v1j (s′ , t′1 ) for j = 2, 3 is also a shortest path from s to t′1 , we have du11 ,v11 (s′ , t′1 ) = du12 ,v12 (s′ , t′1 ) = du13 ,v13 (s′ , t′1 ), and thus, du12 ,v12 (s, t1 ) = du12 ,v12 (s′ , t′1 ) and du13 ,v13 (s, t1 ) = du13 ,v13 (s′ , t′1 ). This is only possible if d′u1j ,v1j (s, t1 ) = 0 and d′′u1j ,v1j (s, t1 ) = 0 for both j = 2, 3. However, by Observation 6, t1 is in the interior of the triangle △v11 v12 v13 ; as discussed earlier (i.e., the discussions for Fig. 6), this implies that it is not possible to have d′u1j ,v1j (s, t1 ) = 0 and d′′u1j ,v1j (s, t1 ) = 0 for all j = 1, 2, 3, incurring contradiction. This completes the proof of the lemma.  Lemma 18. For any two points s1 and s2 of Sd that are in the interior of the same cell or the same edge of Dspm , if d(s1 ) < d(s2 ), then s1 cannot be a geodesic center, and if d(s1 ) = d(s2 ), then neither s1 nor s2 is a geodesic center. Proof: Consider any two points s1 and s2 of Sd that are in the interior of the same cell or the same edge of Dspm. By Lemma 17, dmax (s1 ) > d(s2 ) and dmax (s2 ) > d(s1 ). If d(s1 ) < d(s2 ), then we obtain dmax (s1 ) > d(s2 ) > d(s1 ). Thus, s1 cannot be a geodesic center since otherwise d(s1 ) would be equal to dmax (s1 ) by Observation 7. 42 Similarly, if d(s1 ) = d(s2 ), then we have both dmax (s1 ) > d(s2 ) = d(s1 ) and dmax (s2 ) > d(s1 ) = d(s2 ). Thus, neither s1 nor s2 is a geodesic center.  Based on Lemma 18, our pruning algorithm for Sd works as follows. For each point s of Sd , we determine the cell, edge, or vertex of Dspm that contains s in its interior, which can be done in O(log n) time by using a point location data structure [9,14] with O(n10 ) time and space preprocessing on Dspm . For each edge or cell, let Sd′ be the set of points of Sd that are contained in its interior. We find the point s of Sd′ with the largest value d(s). If there are more than one such point in Sd′ , we remove all points of Sd′ from Sd ; otherwise, remove all points of Sd′ except s from Sd . By Lemma 18, none of the points of Sd that are removed above is a geodesic center. After the above pruning algorithm, Sd contains at most one point in the interior of each cell, edge, or vertex of Dspm . Hence, |Sd | = O(|Dspm |). Since |Dspm | = O(n10 ) [7], we obtain |Sd | = O(n10 ). Theorem 1. All geodesic centers of P can be computed in O(n11 log n) time. Acknowledgment The author wishes to thank Yan Sun for the discussions on proving the π-range property. References 1. H.-K. Ahn, L. Barba, P. Bose, J.-L. De Carufel, M. Korman, and E. Oh. A linear-time algorithm for the geodesic center of a simple polygon. In Proc. of the 31st Annual Symposium on Computational Geometry (SoCG), pages 209–223, 2015. 2. T. Asano and G. Toussaint. Computing the geodesic center of a simple polygon. Technical Report SOCS-85.32, McGill University, Montreal, Canada, 1985. 3. S.W. Bae, M. Korman, and Y. Okamoto. The geodesic diameter of polygonal domains. Discrete and Computational Geometry, 50:306–329, 2013. 4. S.W. Bae, M. Korman, and Y. Okamoto. Computing the geodesic centers of a polygonal domain. In Proc. of the 26th Canadian Conference on Computational Geometry (CCCG), 2014. Journal version published online in Computational Geometry: Theory and Applications, 2015. 5. S.W. Bae, M. Korman, Y. Okamoto, and H. Wang. Computing the L1 geodesic diameter and center of a simple polygon in linear time. Computational Geometry: Theory and Applications, 48:495–505, 2015. 6. B. Chazelle. A theorem on polygon cutting with applications. In Proc. of the 23rd Annual Symposium on Foundations of Computer Science, pages 339–349, 1982. 7. Y.-J. Chiang and J.S.B. Mitchell. Two-point Euclidean shortest path queries in the plane. In Proc. of the Annual ACM-SIAM Symposium on Discrete Algorithms, pages 215–224, 1999. 8. H.N. Djidjev, A. Lingas, and J.-R. Sack. An O(n log n) algorithm for computing the link center of a simple polygon. Discrete and Computational Geometry, 8:131–152, 1992. 9. H. Edelsbrunner, L. Guibas, and J. Stolfi. Optimal point location in a monotone subdivision. SIAM Journal on Computing, 15(2):317–340, 1986. 10. D. Halperin and M. Sharir. New bounds for lower envelopes in three dimensions, with applications to visibility in terrains. Discrete and Computational Geometry, 12:313–326, 1994. 11. J. Hershberger and S. Suri. Matrix searching with the shortest-path metric. SIAM Journal on Computing, 26(6):1612– 1634, 1997. 12. J. Hershberger and S. Suri. An optimal algorithm for Euclidean shortest paths in the plane. SIAM Journal on Computing, 28(6):2215–2256, 1999. 13. Y. Ke. An efficient algorithm for link-distance problems. In Proc. of the 5th Annual Symposium on Computational Geometry, pages 69–78, 1989. 14. D. Kirkpatrick. Optimal search in planar subdivisions. SIAM Journal on Computing, 12(1):28–35, 1983. 15. J.S.B. Mitchell. Geometric shortest paths and network optimization, in Handbook of Computational Geometry, J.-R Sack and J. Urrutia (eds.), pages 633–702. Elsevier, Amsterdam, the Netherlands, 2000. 16. B.J. Nilsson and S. Schuierer. Computing the rectilinear link diameter of a polygon. In Proc. of the International Workshop on Computational Geometry - Methods, Algorithms and Applications, pages 203–215, 1991. 17. B.J. Nilsson and S. Schuierer. An optimal algorithm for the rectilinear link center of a rectilinear polygon. Computational Geometry, 6:169–194, 1996. 18. R. Pollack, M. Sharir, and G. Rote. Computing the geodesic center of a simple polygon. Discrete and Computational Geometry, 4(1):611–626, 1989. 43 19. S. Schuierer. An optimal data structure for shortest rectilinear path queries in a simple rectilinear polygon. International Journal of Compututational Geometry and Applications, 6:205–226, 1996. 20. S. Suri. Computing geodesic furthest neighbors in simple polygons. Journal of Computer and System Sciences, 39:220–235, 1989. 44
8cs.DS
Constructive Galois Connections arXiv:1511.06965v4 [cs.PL] 26 Oct 2016 Taming the Galois Connection Framework for Mechanized Metatheory David Darais David Van Horn University of Maryland, USA [email protected] University of Maryland, USA [email protected] Abstract pings between the domains known as abstraction α ∈ C 7→ A and concretization γ ∈ A 7→ C such that c ⊑ γ(a) ⇐⇒ α(c)  a. Since its introduction by Cousot and Cousot in the late 1970s, this theory has formed the basis of many static analyzers, type systems, model-checkers, obfuscators, program transformations, and many more applications [7]. Given the remarkable set of intellectual tools contributed by this theory, an obvious desire is to incorporate its use into proof assistants to mechanically verify proofs by abstract interpretation. When embedded in a proof assistant, verified algorithms such as static analyzers can then be extracted from these proofs. Monniaux first achieved the goal of mechanization for the theory of abstract interpretation with Galois connections in Coq [26]. However, he notes that the abstraction side (α) of Galois connections poses a serious problem since it requires the admission of non-constructive axioms. Use of these axioms prevents the extraction of certified programs. So while Monniaux was able to mechanically verify proofs by abstract interpretation in its full generality, certified artifacts could not generally be extracted. Pichardie subsequently tackled the extraction problem by mechanizing a restricted formulation of abstract interpretation that relied only on the concretization (γ) side of Galois connections [29]. Doing so avoids the use of axioms and enables extraction of certified artifacts. This proof technique is effective and has been used to construct several certified static analyzers [1, 5, 6, 29], most notably the Verasco static analyzer, part of the CompCert C compiler [18, 19]. Unfortunately, this approach sacrifices the full generality of the theory. While in principle the technique could achieve mechanization of existing soundness theorems, it cannot do so faithful to existing proofs. In particular, Pichardie writes [29, p. 55]:1 Galois connections are a foundational tool for structuring abstraction in semantics and their use lies at the heart of the theory of abstract interpretation. Yet, mechanization of Galois connections remains limited to restricted modes of use, preventing their general application in mechanized metatheory and certified programming. This paper presents constructive Galois connections, a variant of Galois connections that is effective both on paper and in proof assistants; is complete with respect to a large subset of classical Galois connections; and enables more general reasoning principles, including the “calculational” style advocated by Cousot. To design constructive Galois connection we identify a restricted mode of use of classical ones which is both general and amenable to mechanization in dependently-typed functional programming languages. Crucial to our metatheory is the addition of monadic structure to Galois connections to control a “specification effect”. Effectful calculations may reason classically, while pure calculations have extractable computational content. Explicitly moving between the worlds of specification and implementation is enabled by our metatheory. To validate our approach, we provide two case studies in mechanizing existing proofs from the literature: one uses calculational abstract interpretation to design a static analyzer, the other forms a semantic basis for gradual typing. Both mechanized proofs closely follow their original paper-and-pencil counterparts, employ reasoning principles not captured by previous mechanization approaches, support the extraction of verified algorithms, and are novel. Categories and Subject Descriptors F.3.2 [Semantics of Programming Languages]: Program analysis Keywords The framework we have retained nevertheless loses an important property of the standard framework: being able to derive a correct approximation f ♯ from the specification α ◦ f ◦ γ. Several examples of such derivations are given by Cousot [8]. It seems interesting to find a framework for this kind of symbolic manipulation, while remaining easily formalizable in Coq. Abstract Interpretation, Galois Connections, Monads 1. Introduction Abstract interpretation is a general theory of sound approximation widely applied in programming language semantics, formal verification, and static analysis [10–14]. In abstract interpretation, properties of programs are related between a pair of partially ordered sets: a concrete domain, hC, ⊑i, and an abstract domain, hA, i. When concrete properties have a -most precise abstraction, the correspondence is a Galois connection, formed by a pair of map- This important property is the so-called “calculational” style, whereby an abstract interpreter (f ♯ ) is derived in a correct-byconstruction manner from a concrete interpreter (f ) composed with abstraction and concretization (α◦f ◦γ). This style of abstract interpretation is detailed in Cousot’s monograph [8], which concludes: Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]. Copyright is held by the owner/author(s). Publication rights licensed to ACM. ICFP’16, September 18–24, 2016, Nara, Japan ACM. 978-1-4503-4219-3/16/09...$15.00 http://dx.doi.org/10.1145/2951913.2951934 The emphasis in these notes has been on the correctness of the design by calculus. The mechanized verification of this formal development using a proof assistant can be foreseen with automatic extraction of a correct program from its correctness proof. 1 1 Translated from French by the present authors. 2. Verifying a Simple Static Analyzer In the subsequent 17 years, this vision has remained unrealized, and clearly the paramount technical challenge in achieving it is obtaining both generality and constructivity in a single framework. This paper contributes constructive Galois connections, a framework for mechanized abstract interpretation with Galois connections that achieves both generality and constructivity, thereby enabling calculational style proofs which make use of both abstraction (α) and concretization (γ), while also maintaining the ability to extract certified static analyzers. We develop constructive Galois connections from the insight that many classical Galois connections used in practice are of a particular restricted form, which is reminiscent of a direct-style verification. Constructive Galois connections are the general abstraction theory for this setting and can be mechanized effectively. We observe that constructive Galois connections contain monadic structure which isolates classical specifications from constructive algorithms. Within the effectful fragment, all of classical Galois connection reasoning can be employed, while within the pure fragment, functions must carry computational content. Remarkably, calculations can move between these modalities and verified programs may be extracted from the end result of calculation. To support the utility of our theory we build a library for constructive Galois connections in Agda [28] and mechanize two existing abstract interpretation proofs from the literature. The first is drawn from Cousot’s monograph [8], which derives a correct-byconstruction analyzer from a specification induced by a concrete interpreter and Galois connection. The second is drawn from Garcia, Clark and Tanter’s “Abstracting Gradual Typing” [17], which uses abstract interpretation to derive static and dynamic semantics for gradually typed languages from traditional static types. Both proofs use the “important property of the standard framework” identified by Pichardie, which is not handled by prior mechanization approaches. The mechanized proofs closely follow the original pencil-and-paper proofs, which use both abstraction and concretization, while still enabling the extraction of certified algorithms. Neither of these papers have been previously mechanized. Moreover, we know of no existing mechanized proof involving calculational abstract interpretation. Finally, we develop the metatheory of constructive Galois connections, prove them sound, and make precise their relationship to classical Galois connections. The metatheory is itself mechanized; claims are marked with “AGDAX” whenever they are proved in Agda. (All claims are marked.) In this section we contrast two perspectives on verifying a static analyzer: using a direct approach, and using the theory of abstract interpretation with Galois connections. The direct approach is simple but lacks the benefits of a general abstraction framework. Abstract interpretation provides these benefits, but at the cost of added complexity and resistance to mechanized verification. In Section 3 we present an alternative perspective: abstract interpretation with constructive Galois connections—the topic of this paper. Constructive Galois connections marry the worlds presented in this section, providing the simplicity of direct verification, the benefits of a general abstraction framework, and support for mechanized verification. To demonstrate both verification perspectives we design a parity analyzer in each style. For example, a parity analysis discovers that 2 has parity even, succ(1) has parity even, and n + n has parity even if n has parity odd. Rather than sketch the highlevel details of a complete static analyzer, we instead zoom into the low-level details of a tiny fragment: analyzing the successor arithmetic operation succ(n). At this level of detail the differences, advantages and disadvantages of each approach become apparent. 2.1 The Direct Approach Using the direct approach to verification one designs the analyzer, defines what it means for the analyzer to be sound, and then completes a proof of soundness. Each step is done from scratch, and in the simplest way possible. This approach should be familiar to most readers, and exemplifies how most researchers approach formalizing soundness for static analyzers: first posit the analyzer and soundness framework, then attempt the proof of soundness. One limitation of this approach is that the setup—which gives lots of room for error—isn’t known to be correct until after completing the final proof. However, a benefit of this approach is it can easily be mechanized. Analyzing Successor A parity analysis answers questions like: “what is the parity of succ(n), given that n is even?” To answer these questions, imagine replacing n with the symbol even, a stand-in for an arbitrary even number. This hypothetical expression succ(even) is interpreted by defining a successor function over parities, rather than numbers, which we call succ♯ . This successor operation on parities is designed such that if p is the parity for n, succ♯ (p) will be the parity of succ(n): Contributions This paper contributes the following: P := {even, odd} succ♯ (even) := odd succ♯ : P → P succ♯ (odd) := even Soundness The soundness of succ♯ is defined using an interpretation for parities, which we notate JpK: • a foundational theory of constructive Galois connections which is both general and amenable to mechanization using a dependently typed functional programming language; J K : P → ℘(N) • a proof library and two case studies from the literature for JevenK := {n | even(n)} JoddK := {n | odd(n)} Given this interpretation, a parity p is a valid analysis result for a number n if the interpretation for p contains n, that is n ∈ JpK. The analyzer succ♯ (p) is then sound if, when p is a valid analysis result for some number n, succ♯ (p) is a valid analysis result for succ(n): mechanized abstract interpretation; and • the first mechanization of calculational abstract interpretation. The remainder of the paper is organized as follows. First we give a tutorial on verifying a simple analyzer from two different perspectives: direct verification (§2.1) and abstract interpretation with Galois connections (§2.2), highlighting mechanization issues along the way. We then present constructive Galois connections as a marriage of the two approaches (§3). We provide two case studies: the mechanization of an abstract interpreter from Cousot’s calculational monograph (§4), and the mechanization of Garcia, Clark and Tanter’s work on gradual typing via abstract interpretation (§5). Finally, we formalize the metatheory of constructive Galois connections (§6), relate our work to the literature (§7), and conclude (§8). n ∈ JpK =⇒ succ(n) ∈ Jsucc♯ (p)K (DA-Snd) The proof is by case analysis on JpK; we show the case p = even: 2 n ∈ JevenK ⇔ even(n) ⇔ odd(succ(n)) ⇔ succ(n) ∈ JoddK * defn. of J K + * defn. of even/odd + * defn. of J K + ⇔ succ(n) ∈ Jsucc♯ (even)K * defn. of succ♯ + An Even Simpler Setup There is another way to define and prove soundness: use a function which computes the parity of a number in the definition of soundness. This approach is even simpler, and will help foreshadow the constructive Galois connection setup. parity : N → P 2.2 Classical Abstract Interpretation To verify an analyzer using abstract interpretation with Galois connections, one first designs abstraction and concretization mappings between sets N and P. These mappings are used to synthesize an optimal specification for succ♯ . One then proves that a postulated succ♯ meets this synthesized specification, or alternatively derives the definition of succ♯ directly from the optimal specification. In contrast to the direct approach, rather than design the definition of soundness, one instead designs the definition of abstraction within a structured framework. Soundness is not designed, it is derived from the definition of abstraction. Finally, there is added boilerplate in the abstract interpretation approach, which requires lifting definitions and proofs to powersets ℘(N) and ℘(P). parity(0) := even parity(succ(n)) := f lip(parity(n)) where f lip(even) := odd and f lip(odd) := even. This gives an alternative and equivalent way to relate a number and a parity, due to the following correspondence: n ∈ JpK ⇐⇒ parity(n) = p (DA-Corr) The soundness of the analyzer is then restated: parity(n) = p =⇒ parity(succ(n)) = succ♯ (p) Abstracting Sets Powersets are introduced in abstraction and concretization functions to support relational mappings, like mapping the symbol even to the set of all even numbers. The mappings are therefore between powersets ℘(N) and ℘(P). The abstraction and concretization mappings must also satisfy correctness criteria, detailed below, at which point they are called a Galois connection. The abstraction mapping from ℘(N) to ℘(P) is notated α, and is defined as the pointwise lifting of parity(n): or by substituting parity(n) = p: parity(succ(n)) = succ♯ (parity(n)) (DA-Snd*) Both this statement for soundness and its proof are simpler than before. The proof follows directly from the definition of parity and the fact that succ♯ is identical to f lip. The concretization mapping from ℘(P) to ℘(N) is notated γ, and is defined as the flattened pointwise lifting of JpK: γ(P ) := {n | p ∈ P ∧ n ∈ JpK} γ : ℘(P) → ℘(N) The correctness criteria for α and γ is the correspondence: N ⊆ γ(P ) ⇐⇒ α(N ) ⊆ P (GC-Corr) The correspondence means that, to relate elements of different sets—in this case ℘(N) and ℘(P)—it is equivalent to relate them through either α or γ. Mappings like α and γ which share this correspondence are called Galois connections. An equivalent correspondence to (GC-Corr) is two laws relating compositions of α and γ, called expansive and reductive: Mechanized Verification This direct approach to verification is amenable to mechanization using proof assistants like Coq and Agda. These tools are founded on constructive logic in part to support verified program extraction. In constructive logic, functions f : A → B are computable and often defined inductively to ensure they can be extracted and executed as programs. Analogously, propositions P : ℘(A) are encoded constructively as undecidable predicates P : A → prop where x ∈ P ⇔ P (x). To mechanize the verification of succ♯ we first translate its definition to a constructive setting unmodified. Next we translate JpK to a relation I(p, n) defined inductively on n: I(even, 0) α(N ) := {parity(n) | n ∈ N } α : ℘(N) → ℘(P) The Main Idea Correspondences like (DA-Corr)—between an interpretation for analysis results (JpK) and a function which computes analysis results (parity(n))—are central to the constructive Galois Connection framework we will describe in Section 3. Using correspondences like these, we build a general theory of abstraction that recovers this direct approach to verification, mirrors all of the benefits of abstract interpretation with classical Galois connections, supports mechanized verification, and in some cases simplifies the proof effort. We also observe that many classical Galois connections used in practice can be ported to this simpler setting. N ⊆ γ(α(N )) α(γ(P )) ⊆ P (GC-Exp) (GC-Red) Property (GC-Red) ensures α is the best abstraction possible w.r.t. γ. For example, a hypothetical definition α(N ) := {even, odd} is expansive but not reductive because α(γ({even})) 6⊆ {even}. In general, Galois connections are defined for arbitrary posets hA, ⊑A i and hB, ⊑B i. The correspondence (GC-Corr) and its expansive/reductive variants are generalized in this setting to use partial orders ⊑A and ⊑B instead of subset ordering. We are also omitting monotonicity requirements for α and γ in our presentation (although (GC-Corr) implies monotonicity). I(p, n) I(f lip(p), succ(n)) The mechanized proof of (DA-Snd) using I is analogous to the one we sketched, and the mechanized proof of (DA-Snd*) follows directly by computation. The proof term for (DA-Snd*) in both Coq and Agda is simply refl, the reflexivity judgment for syntactic equality modulo computation in constructive logic. Powerset Lifting The original functions succ and succ♯ cannot be related through α and γ because they are not functions between powersets. To remedy this they are lifted pointwise: Wrapping Up The two different approaches to verification we present are distinguished by which parts of the design are postulated, and which parts are derived. Using the direct approach, the analysis succ♯ , the interpretation for parities JpK and the definition of soundness are all postulated up-front. When the soundness setup is correct but the analyzer is wrong, the proof at the end will not go through and the analyzer must be redesigned. Even worse, when the soundness setup and the analyzer are both wrong, the proof might actually succeed, giving a false assurance in the soundness of the analyzer. However, the direct approach is attractive because it is simple and supports mechanized verification. ↑succ : ℘(N) → ℘(N) ↑succ(N ) := {succ(n) | n ∈ N } ↑succ♯ : ℘(P) → ℘(P) ↑succ♯ (P ) := {succ♯ (p) | p ∈ P } These lifted operations are called the concrete interpreter and abstract interpreter, because the former operates over the concrete domain ℘(Z) and the latter over the abstract domain ℘(P). In the framework of abstract interpretation, static analyzers are just abstract interpreters. Lifting to powersets is necessary to use the abstract interpretation framework, and has the negative effect of adding boilerplate to definitions and proofs of soundness. 3 Soundness The definition of soundness for succ♯ is synthesized by relating ↑succ♯ to ↑succ composed with α and γ: α(↑succ(γ(P ))) ⊆ ↑succ♯ (P ) Calculational Derivation of Abstract Interpreters Rather than posit ↑succ♯ and prove it correct directly, one can instead derive its definition through a calculational process. The process begins with the optimal specification on the left-hand-side of (GC-Opt), and reasons equationally towards the definition of a function. In this way, ↑succ♯ is not postulated, rather it is derived by calculation, and the result is both sound and optimal by construction. The derivation is by case analysis on P which has four cases: {}, {even}, {odd} and {even, odd}; we show P = {even}: (GC-Snd) The left-hand side of the ordering is an optimal specification for any abstraction of ↑succ (a consequence of (GC-Corr)), and the subset ordering says ↑succ♯ is an over-approximation of this optimal specification. The reason to over-approximate is because the specification is a mathematical description, and the abstract interpreter is usually an algorithm, and therefore not always able to match the specification precisely. The proof of (GC-Snd) is by case analysis on P . We do not show the proof, rather we demonstrate a proof later in this section which also synthesizes the definition of succ♯ . One advantage of the abstract interpretation framework is that it gives the researcher the choice between four soundness properties, all of which are equivalent and generated by α and γ: ♯ α(↑succ(γ(P ))) ⊆ ↑succ (P ) (GC-Snd/αγ) ↑succ(γ(P )) ⊆ γ(↑succ♯ (P )) (GC-Snd/γγ) ♯ α(↑succ(N )) ⊆ ↑succ (α(N )) ♯ ↑succ(N ) ⊆ γ(↑succ (α(N ))) (GC-Snd/αα) (GC-Snd/γα) (GC-Opt) Not all analyzers are optimal, however optimality helps identify those which approximate too much. Consider the analyzer ↑succ♯′ : ↑succ♯′ (P ) := {even, odd} Resistance to Mechanized Verification Despite the beauty and utility of Galois connections, advocates of the approach have yet to reconcile their use with advances in mechanized reasoning: every mechanized verification of an executable abstract interpreter todate has resisted the use of Galois connections, even when initially designed to take advantage of the framework. The issue in mechanizing Galois connections amounts to a conflict between supporting both classical set-theoretic reasoning and executable static analyzers. Supporting executable static analyzers calls for constructive mathematics, a problem for α functions because they are often non-constructive, an observation first made by Monniaux [26]. To work around this limitation, Pichardie [29] advocates for designing abstract interpreters which are merely inspired by Galois connections, but ultimately avoiding their use in verification, which he terms the “γ-only” approach. Successful verification projects such as Verasco adopt this “γ-only” approach [18, 19], despite the use of Galois connections in designing the original Astrée analyzer [4]. To better understand the foundational issues with Galois connections and α functions, consider verifying the abstract interpretation approach to soundness for our parity analyzer using a proof assistant built on constructive logic. In this setting, the encoding of the Galois connection must support elements of infi- This analyzer reports that succ(n) could have any parity regardless of the parity for n; it’s the analyzer that always says “I don’t know”. This analyzer is perfectly sound but non-optimal. Just like soundness, four completeness statements are generated by α and γ, however each of the statements are not equivalent: (GC-Cmp/αγ) ↑succ(γ(P )) = γ(↑succ (P )) (GC-Cmp/γγ) α(↑succ(N )) = ↑succ♯ (α(N )) (GC-Cmp/αα) ↑succ(N ) = γ(↑succ♯ (α(N ))) (GC-Cmp/γα) * defining ↑succ♯ + Added Complexity The abstract interpretation approach requires a Galois connection up-front which necessitates the introduction of powersets ℘(N) and ℘(P). This results in powerset-lifted definitions and adds boilerplate set-theoretic reasoning to the proofs. This is in contrast to the direct approach which never mentions powersets of parities. Not using powersets results in more understandable soundness criteria, requires no boilerplate set-theoretic reasoning, and results in fewer cases for the proof of soundness. This boilerplate becomes magnified in a mechanized setting where all details must be spelled out to a proof assistant. Furthermore, the simpler proof of (DA-Snd*)—which was immediate from the definition of parity—cannot be recovered within the abstract interpretation framework, which shows one abandons simpler proof techniques in exchange for the benefits of abstract interpretation. Because the left-hand-side is an optimal specification, an abstract interpreter will never be strictly more precise. Therefore, optimality is written equivalently using an equality: ♯ * defn. of α + The derivation of the other cases is analogous, and together they define the implementation of ↑succ♯ . Deriving analyzers by calculus is attractive because it is systematic, and because it prevents the issue where an analyzer is postulated and discovered to be unsound only after failing to complete its soundness proof. However, this calculational style of abstract interpretation is not amenable to mechanized verification with program extraction because α is often non-constructive, an issue we describe later in this section. α(↑succ(γ(P ))) ⊇ ↑succ♯ (P ) α(↑succ(γ(P ))) = ↑succ♯ (P ) = {odd} , ↑succ ({even}) Completeness The mappings α and γ also synthesize an optimality statement for ↑succ♯ , a kind of completeness property, by stating that it under-approximates the optimal specification: ↑succ♯′ : ℘(P) → ℘(P) * defn. of γ + * defn. of ↑succ + * defn. of even/odd + ♯ Because each soundness property is equivalent (also a consequence of (GC-Corr)), one can choose whichever variant is easiest to prove. The soundness setup (GC-Snd) is the αγ rule, however any of the other rules can also be used. For example, one could choose αα or γα; in these cases the proof considers four disjoint cases for N : N is empty, N contains only even numbers, N contains only odd numbers, and N contains both even and odd numbers. α(↑succ(γ(P ))) = ↑succ♯ (P ) α(↑succ(γ({even}))) = α(↑succ({n | even(n)})) = α({succ(n) | even(n)}) = α({n | odd(n)}) Abstract interpreters which satisfy the αγ variant are called optimal because they lose no more information than necessary, and those which satisfy the γα variant are called precise because they lose no information at all. The abstract interpreter succ♯ is optimal but not precise, because γ(↑succ♯ (α({1}))) 6= ↑succ({1}) To overcome mechanization issues with Galois connections, the state-of-the-art is restricted to use γγ rules only for soundness (GC-Snd/γγ) and completeness (GC-Cmp/γγ). This is unfortunate for completeness properties because each completeness variant is not equivalent. 4 nite powersets—like the set of all even numbers—as well as executable abstract interpreters which manipulate elements of finite powersets—like {even, odd}. To support representing infinite sets, the powerset ℘(N) is modelled constructively as a predicate N → prop. To support defining executable analyzers that manipulate sets of parities, the powerset ℘(P) is modelled as an enumeration of its inhabitants, which we call Pc : Abstracting Sets A constructive Galois connection between sets A and B contains two mappings: the first is called extraction, notated η, and the second is called interpretation, notated µ: η:A→B η and µ are analogous to classical Galois connection mappings α and γ. In the parity analysis described in Section 2.1, the extraction function was parity and the interpretation function was J K. Constructive Galois connection mappings η and µ must form a correspondence similar to (GC-Corr): Pc := {even, odd, ⊥, ⊤} where ⊥ and ⊤ represent {} and {even, odd}. This enables a definition for ↑succ♯ : Pc → Pc which can be extracted and executed. The consequence of this design is a Galois connection between N → prop and Pc ; the issue is now α: α : (N → prop) → P µ : B → ℘(A) x ∈ µ(y) ⇐⇒ η(x) = y (CGC-Corr) The intuition behind the correspondence is the same as before: to compare an element x in A to an element y in B, it is equivalent to compare them through either η or µ. Like classical Galois connections, the correspondence between η and µ is stated equivalently through two composition laws. Extraction functions η which form a constructive Galois connection are also a “best abstraction”, analogously to α in the classical setup: c This version of α cannot be defined constructively, as doing so requires deciding predicates over φ : N → prop. To define α one must perform case analysis on predicates like ∃n, φ(n) ∧ even(n) to compute an element of Pc , which is not possible for arbitrary φ. However, γ can be defined constructively: sound : x ∈ µ(η(x)) tight : x ∈ µ(y) =⇒ η(x) = y γ : Pc → (N → prop) (CGC-Ext) (CGC-Red) In general, any theorem of soundness using Galois connections can be rewritten to use only γ, making use of (GC-Corr); this is the essence of the “γ-only” approach, embodied by the soundness variant (GC-Snd/γγ). However, this principle does not apply to all proofs of soundness using Galois connections, many of which mention α in practice. For example, the γ-only setup does not support calculation in the style advocated by Cousot [8]. Furthermore, not all completeness theorems can be translated to γ-only style, such as (GC-Cmp/γα) which is used to show an abstract interpreter is fully precise. Aside We use the term extraction function and notation η from Nielson et al [27] where η is used to simplify the definition of an abstraction function α. We recover α functions from η in a similar way. However, their treatment of η is a side-note to simplifying the definition of α and nothing more. We take this simple idea much further to realize an entire theory of abstraction around η/µ functions and their correspondences. In this “lowered” theory of η/µ we describe soundness/optimality criteria and calculational derivations analogous to that of α/γ while support mechanized verification, none of which is true of Nielson et al’s use of η. Wrapping Up Abstract interpretation differs from the direct approach in which parts of the design are postulated and which parts are derived. The direct approach requires postulating the analyzer and definition of soundness. Using abstract interpretation, a Galois connection between sets is postulated instead, and definitions for soundness and completeness are synthesized from the Galois connection. Also, abstract interpretation support deriving the definition of a static analyzer directly from its proof of correctness. The downside of abstract interpretation is that it requires lifting succ and succ♯ into powersets, which results in boilerplate set-theoretic reasoning in the proof of soundness. Finally, due to foundational issues, the abstract interpretation framework is not amenable to mechanized verification while also supporting program extraction using constructive logic. Induced Specifications Four equivalent soundness criteria are generated by η and µ just like in the classical framework. Each soundness statement uses η and µ in a different but equivalent way (assuming (CGC-Corr)). For a concrete f : A → A and abstract f ♯ : B → B, f ♯ is sound if f any of the following properties hold: x ∈ µ(y) ∧ y ′ = η(f (x)) =⇒ y ′ = f ♯ (y) ′ ′ ♯ x ∈ µ(y) ∧ x = f (x) =⇒ x ∈ µ(f (y)) ♯ (CGC-Snd/ηµ) (CGC-Snd/µµ) y = η(f (x)) =⇒ y = f (η(x)) (CGC-Snd/ηη) x′ = f (x) =⇒ x′ ∈ µ(f ♯ (η(x))) (CGC-Snd/µη) In the direct approach to verifying an example parity analysis described in Section 2.1, the first soundness property (DA-Snd) is generated by the µµ variant, and the second soundness property (DA-Snd*) which enjoyed a simpler proof is generated by the ηη variant. We write these soundness rules in a slightly strange way so we can write their completeness analogs simply by replacing ⇒ with ⇔. The origin of these rules comes from an adjunction framework, which we discuss in Section 6. The mappings η and µ also generate four completeness criteria which, like classical Galois connections, are not equivalent: 3. Constructive Galois Connections In this section we describe abstract interpretation with constructive Galois connections—a parallel universe of Galois connections analogous to classical ones. The framework enjoys all the benefits of abstract interpretation, but like the direct approach avoids the pitfalls of added complexity and resistance to mechanization. We will describe the framework of constructive Galois connections between sets A and B. When instantiated to N and P, the framework recovers exactly the direct approach from Section 2.1. We will also describe constructive Galois connections in the absence of partial orders, or more specifically, we will assume the discrete partial order: x ⊑ y ⇔ x = y. (Partial orders didn’t appear in our demonstration of classical abstract interpretation, but they are essential to the general theory.) We describe generalizing to partial orders and recovering classical results from constructive ones at the end of this section. The fully general theory of constructive Galois connections is described in Section 6 where it is compared side-by-side to classical Galois connections. x ∈ µ(y) ∧ y ′ = η(f (x)) ⇐⇒ y ′ = f ♯ (y) ′ ′ (CGC-Cmp/ηµ) ♯ x ∈ µ(y) ∧ x = f (x) ⇐⇒ x ∈ µ(f (y)) (CGC-Cmp/µµ) y = η(f (x)) ⇐⇒ y = f ♯ (η(x)) ′ ′ ♯ x = f (x) ⇐⇒ x ∈ µ(f (η(x))) (CGC-Cmp/ηη) (CGC-Cmp/µη) Inspired by classical Galois connections, we call abstract interpreters f ♯ which satisfy the ηµ variant optimal and those which satisfy the µη variant precise. The above soundness and completeness rules are stated for concrete and abstraction functions f : A → A and f ♯ : B → B. 5 However, they generalize easily to relations R : ℘(A × A) and predicate transformers F : ℘(A) → ℘(A) (i.e. collecting semantics) through the adjunction framework discussed in Section 6. The case studies in Sections 4 and 5 describe abstract interpreters over concrete relations and their soundness conditions. and sound and optimal by construction. In addition to these benefits of a general abstraction framework, constructive Galois connections are amenable to mechanized verification. Both extraction (η) and interpretation (µ) can be mechanized effectively, as well as proofs of soundness, completeness, and calculational derivations. Calculational Derivation of Abstract Interpreters The constructive Galois connection framework also supports deriving abstract interpreters through calculation, analogously to the calculation we demonstrated in Section 2.2. To support calculational reasoning, the four logical soundness criteria are rewritten into statements about subsumption between powerset elements: 3.1 Partial Orders and Monotonicity ♯ {η(f (x)) | x ∈ µ(y)} ⊆ {f (y)} The full theory of constructive Galois connections generalizes to posets hA, ⊑iA and hB, ⊑B i by making the following changes: • Powersets must be downward-closed, that is for X : ℘(A): x ∈ X ∧ x′ ⊑ x =⇒ x′ ∈ X (CGC-Snd/ηµ*) ♯ {f (x) | x ∈ µ(y)} ⊆ µ(f (y)) Singleton sets {x} are reinterpreted to mean {x | x′ ⊑ x}. For mechanization, this means ℘(A) is encoded as an antitonic function, notated with a down-right arrow A → prop, where the partial ordering on prop is by implication. (CGC-Snd/µµ*) ♯ {η(f (x))} ⊆ {f (η(x))} (CGC-Snd/ηη*) ♯ {f (x)} ⊆ µ(f (η(x))) (PowerMon) ′ (CGC-Snd/µη*) • Functions must be monotonic, that is for f : A → A: x ⊑ x′ =⇒ f (x) ⊑ f (x′ ) The completeness analog to the four rules replaces set subsumption with equality. Using the ηµ* completeness rule, one calculates towards a definition for f ♯ starting from the left-hand-side, which is the optimal specification for abstract interpreters of f . To demonstrate calculation using constructive Galois connections, we show the derivation of succ♯ from its induced specification, the result of which is sound and optimal (because each step is = in addition to ⊆) by construction; we show p = even: (FunMon) We notate monotonic functions f : A → A. Monotonicity is required for mappings η and µ, and concrete and abstract interpreters f and f ♯ . • The constructive Galois connection correspondence is general- ized to partial orders in place of equality, that is for η and µ: x ∈ µ(y) ⇐⇒ η(x) ⊑ y (CGP-Corr) {parity(succ(n)) | n ∈ JevenK} = {parity(succ(n)) | even(n)} = {f lip(parity(n)) | even(n)} = {f lip(even)} * defn. of J K + * defn. of parity + * Eq. DA-Corr + = {odd} * defn. of f lip + x ∈ µ(y) ∧ y ′ ⊑ η(f (x)) =⇒ y ′ ⊑ f ♯ (y) (CGP-Snd/ηµ) , {succ♯ (even)} * defining succ♯ + x ∈ µ(y) ∧ x′ ⊑ f (x) =⇒ x′ ∈ µ(f ♯ (y)) (CGP-Snd/µµ) or alternatively, by generalizing the reductive property: x ∈ µ(y) =⇒ η(x) ⊑ y • Soundness criteria are also generalized to partial orders: y ⊑ η(f (x)) =⇒ y ⊑ f ♯ (η(x)) We will show another perspective on this calculation later in this section, where the derivation of succ♯ is not only sound and optimal by construction, but computable by construction as well. ′ ′ ♯ x ⊑ f (x) =⇒ x ∈ µ(f (η(x))) (CGP-Snd/ηη) (CGP-Snd/µη) We were careful to write the equalities in Section 3 in the right order so this change is just swappping = for ⊑. Completeness criteria are identical with ⇔ in place of ⇒. Mechanized Verification In addition to the benefits of a general abstraction framework, constructive Galois connections are amenable to mechanization in a way that classical Galois connections are not. In our Agda library and case studies we mechanize constructive Galois connections in full generality, as well as proofs that use both mapping functions, such as calculational derivations. As we discussed in Sections 2.1 and 2.2, the constructive encoding for infinite powersets ℘(A) is A → prop. This results in the following types for η and µ when encoded constructively: η:N→P (CGP-Red) To demonstrate when partial orders and monotonicity are necessary, consider designing a parity analyzer for the max operator: max♯ : P × P → P max♯ (even, even) := even max♯ (even, odd) := ? max♯ (odd, odd) := odd max♯ (odd, even) := ? The last two cases for max♯ cannot be defined because the maximum of an even and odd number could be either even or odd, and there is no representative for “any number” in P. To remedy this, we add any to the set of parities: P+ := P∪{any}; the new element any is interpreted: JanyK := {n | n ∈ N}; the partial order on P+ becomes: even, odd ⊑ any; and the correspondence continues to hold using this partial order: n ∈ Jp+ K ⇐⇒ parity(n) ⊑ p+ . max♯ is then defined using the abstraction P+ and proven sound and optimal following the abstract interpretation paradigm. µ : P → N → prop In constructive logic, the arrow type N → P classifies computable functions, and the arrow type P → N → prop classifies undecidable relations. (CGC-Corr) is then mechanized without issue: µ(p, n) ⇐⇒ η(n) = p See the mechanization details in Section 2.1 for how η and µ are defined constructively for the example parity analysis. Wrapping Up Constructive Galois connections are a general abstraction framework similar to classical Galois connections. At the heart of the constructive Galois connection framework is a correspondence (CGC-Corr) analogous to its classical counterpart. From this correspondence, soundness and completeness criteria are synthesized for abstract interpreters. Constructive Galois connections also support calculational derivations of abstract interpreters which 3.2 Relationship to Classical Galois Connections We clarify the relationship between constructive and classical Galois connections in three ways: • Any constructive Galois connection can be lifted to obtain an equivalent classical Galois connection, and likewise for soundness and completeness proofs. 6 • Any classical Galois connection which can be recovered by a The monadic structure of classical powersets is standard, and is analogous to the nondeterminism monad familiar to Haskell programmers. However, the model ℘(A) = A → prop is the uncomputable nondeterminism monad and mirrors the use of setcomprehensions on paper to describe uncomputable sets (specifications), rather than the use of monad comprehensions in Haskell to describe computable sets (constructed values). We generalize ℘( ) to a monotonic monad, similarly to how we generalized powersets to posets in Section 3.1. This results in monotonic versions of monad operators ret and bind: constructive one contains no additional expressive power, rendering it an equivalent theory with added boilerplate reasoning. • Not all classical Galois connections can be recovered by con- structive ones. From these relationships we conclude that one benefits from using constructive Galois connections whenever possible, classical Galois connections when no constructive one exists, and both theories together as needed. We make these claims precise in Section 6. A classical Galois connection is recovered from a constructive one by the following lifting: α : ℘(A) → ℘(B) γ : ℘(B) → ℘(A) ret : A → ℘(A) ret(x) := {x′ | x′ ⊑ x} α(X) := {η(x) | x ∈ X} γ(Y ) := {x | y ∈ Y ∧ x ∈ µ(y)} bind : ℘(A) × (A → ℘(B)) → ℘(B) bind(X, f ) := {y | x ∈ X ∧ y ∈ f (x)} We adopt Moggi’s notation [25] for monadic extension where bind(X, f ) is written f ∗ (X), or just f ∗ for λX.f ∗ (X). We call the powerset type ℘(A) a specification effect because it has monadic structure, supports encoding arbitrary properties over values in A, and cannot be “escaped from” in constructive logic, similar to the IO monad in Haskell. In classical mathematics, there is an isomorphism between singleton powersets ℘1 (A) and the set A. However, no such constructive mapping exists for ℘1 (A) → A. Such a function would decide arbitrary predicates in A → prop to compute the A inside the singleton set. This observation, that you can program inside ℘( ) monadically in constructive logic, but you can’t escape the monad, is why we call it a specification effect. Given the monadic structure for powersets, and the intuition that they encode a specification effect in constructive logic, we can recast the theory of constructive Galois connections using monadic operators. To do this we define a helper operator which injects “pure” functions into the “effectful” function space: When a classical Galois connection can be written in this form for some η and µ, then one can use the simpler setting of abstract interpretation with constructive Galois connections without any loss of generality. We also observe that many classical Galois connections in practice can be written in this form, and therefore can be mechanized effectively using constructive Galois connections. The case studies in presented in Sections 4 and 5 are two such cases, although the original authors of those works did not initially write their classical Galois connections in this explicitly lifted form. An example of a classical Galois connection which is not recovered by lifting a constructive Galois is the Independent Attributes (IA) abstraction, which abstracts relations R : ℘(A × B) with their component-wise splitting hRl , Rr i : ℘(A) × ℘(B): α : ℘(A × B) → ℘(A) × ℘(B) α(R) := h{x | ∃y.hx, yi ∈ R}, {y | ∃x.hx, yi ∈ R}i γ : ℘(A) × ℘(B) → ℘(A × B) γ(Rl , Rr ) := {hx, yi | x ∈ Rl , y ∈ Rr } pure : (A → B) → (A → ℘(B)) pure(f )(x) := ret(f (x)) We then rewrite (CGC-Corr) using ret and pure: ret(x) ⊆ µ(y) ⇐⇒ pure(η)(x) ⊆ ret(y) This Galois connection is amenable to mechanized verification. In a constructive setting, α and γ are maps between A × B → prop and (A → prop) × (B → prop), and can be defined directly using logical connectives ∃ and ∧: (CGM-Corr) and we rewrite the expansive and reductive variant of the correspondence using ret, bind (notated f ∗ ) and pure: ret(x) ⊆ µ∗ (pure(η)(x)) α(R) := hλ(x).∃(y).R(x, y), λ(y).∃(x).R(x, y)i γ(Rl , Rr ) := λ(x, y).Rl (x) ∧ Rr (y) ∗ pure(η) (µ(y)) ⊆ ret(y) (CGM-Exp) (CGM-Red) The four soundness and completeness conditions can also be written in monadic style; we show the ηµ soundness property here: IA can be mechanized effectively because the Galois connection consists of mappings between specifications and the foundational issue of constructing values from specifications does not appear. IA is not a constructive Galois connection because there is no pure function µ underlying the abstraction function α. Because constructive Galois connections can be lifted to classical ones, a constructive Galois connection can interact directly with IA through its lifting, even in a mechanized setting. However, once a constructive Galois connection is lifted it loses its computational properties and cannot be extracted and executed. In practice, IA is used to weaken (⊑) an induced optimal specification after which the calculated interpreter is shown to be optimal (=) up-to-IA. IA never appears in the final calculated interpreter, so not having a constructive Galois connection formulation poses no issue. pure(η)∗ (pure(f )∗ (µ(y))) ⊆ pure(f ♯ )(y) (CGM-Snd) The left-hand-side of the ordering is the optimal specification for f ♯ , just like (CGC-Snd/ηµ) but using monadic operators. The righthand-side of the ordering is f ♯ lifted to the monadic function space. The constructive calculation of succ♯ we showed earlier in this section is a calculation of this form. The specification on the left has type ℘(P), and it has effects, meaning it uses classical reasoning and can’t be executed. The abstract interpreter on the right also has type ℘(P), but it has no effects, meaning it can be extracted and executed. The calculated abstract interpreter is thus not only sound and optimal by construction, it is computable by construction. Constructive Galois connections are empowering because they treat specification like an effect, which optimal specifications ought to have, and which computable abstract interpreters ought not to have. Using a monadic effect discipline we support calculations which start with a specification effect, and where the “effect” is eliminated through the process of calculation. The monad laws are crucial in canceling uses of ret with bind to arrive at a final pure computation. For example, the first step in a derivation for (CGM-Snd) can immediately simplify using monad laws to: 3.3 The “Specification Effect” The machinery of constructive Galois connections follow a monadic effect discipline, where the effect type is the classical powerset ℘( ); we call this a specification effect. First we will describe the monadic structure of powersets ℘( ) and what we mean by “specification effect”. Then we will recast the theory of constructive Galois connections in this monadic style, giving insights into why the theory supports mechanized verification, and foreshadowing key fragments of the metatheory we develop in Section 6. pure(η ◦ f )∗ (µ(y)) ⊆ pure(f ♯ )(y) 7 i∈ b∈ Z := {. . . , −1, 0, 1, . . .} B := {true, f alse} integers ρ ∈ env := var ⇀ Z a ς ∈ Σ ::= hρ, cei a J K ∈ aop → Z × Z ⇀ Z ⊢ ⇓ variables J Kc ∈ cmp → Z × Z → B ⊢ ⇓b ∈ ℘(env × bexp × B) ⊕ ∈ aop ::= + | − | × | / arithmetic op. J Kb ∈ bop → B × B → B < ∈ cmp ::= < | = comparison op. < booleans x ∈ var ::= . . . ∈ bop ::= ∨ | ∧ arithmetic exp. be ∈ bexp ::= b | ae < ae | be boolean exp. < ae ∈ aexp ::= i | x | rand | ae ⊕ ae be AR AND ρ ⊢ ae1 ⇓a i1 ρ ⊢ ae2 ⇓a i2 AO P a ρ ⊢ ae1 ⊕ ae2 ⇓ J⊕Ka (i1 , i2 ) ce ∈ cexp ::= skip | ce ; ce | x := ae ρ ⊢ ae ⇓a i CA SSIGN hρ, x := aei 7→c hρ[x ← i], skipi | if be then ce else ce | while be do ce 7→c ∈ ℘(Σ × Σ) ρ ⊢ rand ⇓a i boolean op. ∈ ℘(env × aexp × Z) command exp. ρ ⊢ be ⇓b true CW HILE -T hρ, while be do cei 7→c hρ, ce ; while be do cei Figure 1. Case Study: WHILE abstract syntax ρ ⊢ be ⇓b f alse CW HILE -F hρ, while be do cei 7→c hρ, skipi 4. Case Study: Calculational AI In this section we apply constructive Galois connections to the Calculational Design of a Generic Abstract Interpreter from Cousot’s monograph [8]. To our knowledge, we achieve the first mechanically verified abstract interpreter derived by calculus. The key challenge in mechanizing the interpreter is supporting both abstraction (α) and concretization (γ) mappings, which are required by the calculational approach. Classical Galois connections do not support mechanization of the abstraction mapping without the use of axioms, and the required axioms block computation, preventing the extraction of verified algorithms. To verify Cousot’s generic abstract interpreter we use constructive Galois connections, which we describe in Section 3 and formalize in Section 6. Using constructive Galois connections we encode extraction (η) and interpretation (µ) mappings as constructive analogs to α and γ, calculate an abstract interpreter for an imperative programming language which is sound and computable by construction, and recover the original classical Galois connection results through a systematic lifting. First we describe the setup for the analyzer: the abstract syntax, the concrete semantics, and the constructive Galois connections involved. Following the abstract interpretation paradigm with constructive Galois connections we design abstract interpreters for denotation functions and semantics relations. We show a fragment of our Agda mechanization which closely mirrors the pencil-andpaper proof, as well as Cousot’s original derivation. Figure 2. Case Study: WHILE concrete semantics 4.2 Abstract Semantics with Constructive GCs Using abstract interpretation with constructive Galois connections, we design an abstract semantics for WHILE in the following steps: 1. An abstraction for each set Z, B and env. 2. An abstraction for each denotation function J Ka , J Kc and J Kb . 3. An abstraction for each semantics relation ⇓a , ⇓b and 7→c . Each abstract set forms a constructive Galois connection with its concrete counterpart. Soundness criteria is synthesized for abstract functions and relations using constructive Galois connection mappings. Finally, we verify and calculate abstract interpreters from these specifications which are sound and computable by construction. We describe the details of this process only for integers and environments (the sets Z and env), arithmetic operators (the denotation function J Ka ), and arithmetic expressions (the semantics relation ⇓a ). See the Agda development accompanying this paper for the full mechanization of WHILE. Abstracting Integers We design a simple sign abstraction for integers, although more powerful abstractions are certainly possible [24]. The final abstract interpreter for WHILE is parameterized by any abstraction for integers, meaning another abstraction can be plugged in without added proof effort. The sign abstraction begins with three representative elements: neg, zer and pos, representing negative integers, the integer 0, and positive integers. To support representing integers which could be negative or 0, negative or positive, or 0 or positive, etc. we design a set which is complete w.r.t these logical disjunctions: 4.1 Concrete Semantics The WHILE language is an imperative programming language with arithmetic expressions, variable assignment and while-loops. We show the syntax for this language in Figure 1. WHILE syntactically distinguished arithmetic, boolean and command expressions. rand is an arithmetic expression which can evaluate to any integer. Syntactic categories ⊕, < and range over arithmetic, comparison and boolean operators, and are introduced to simplify the presentation. The WHILE language is taken from Cousot’s monograph [8]. The concrete semantics of WHILE is sketched without full definition in Figure 2. Denotation functions J Ka , J Kc and J Kb give semantics to arithmetic, conditional and boolean operators. The semantics of compound syntactic expressions are given operationally with relations ⇓a , ⇓b and 7→c . Relational semantics are given for arithmetic expressions and commands due to the nondeterminism of rand and nontermination of while. These semantics serve as the starting point for designing an abstract interpreter. < i♯ ∈ Z♯ := {none, neg, zer, pos, negz, nzer, posz, any} Z♯ is given meaning through an interpretation function µz , the analog of a γ from the classical Galois connection framework: µz : Z♯ → ℘(Z) µz (none) := {} µz (neg) := {i | i < 0} µz (zer) := {0} µz (pos) := {i | i > 0} 8 µz (negz) := {i | i ≤ 0} µz (nzer) := {i | i 6= 0} µz (posz) := {i | i ≥ 0} µz (any) := {i | i ∈ Z} The partial ordering on abstract integers coincides with subset ordering through µz , that is i♯1 ⊑z i♯2 ⇐⇒ µz (i♯1 ) ⊆ µz (i♯2 ): The specification which encodes soundness and optimality for J K♯a is generated using the constructive Galois connection for Z: neg ⊑z negz, nzer pos ⊑z nzer, posz ♯′ z a ♯′ ♯′ ♯a ♯ ♯ hi1,i2i ∈ µz(i♯1,i♯2) ∧ hi♯′ 1 ,i2 i ⊑ η (JaeK (i1,i2)) ⇔ hi1 ,i2 i ⊑ JaeK (i1,i2) zer ⊑z negz, posz none ⊑z i♯ ⊑z i♯ ⊑z any (See (CGC-Cmp/ηµ) in Section 3 for the origin of this equation.) For J K♯a , we postulate its definition and verify its correctness postfacto using the above property, although we omit the proof details here. The definition of J K♯a is standard, and returns none in the case of division by zero. We show only the definition of + here: To be a constructive Galois connection, µz forms a correspondence with a best abstraction function η z :   neg if i < 0 η z : Z → Z♯ η z (n) := zer if i = 0  pos if i > 0 J K♯a : aexp → Z♯ × Z♯ → Z♯   pos if pos ⊑z    z neg if neg ⊑ G ♯a ♯ ♯ J+K (i1 , i2 ) := zer if zer ⊑z    zer if pos ⊑z    zer if neg ⊑z and we prove the constructive Galois connection correspondence: i ∈ µz (i♯ ) ⇐⇒ η z (i) ⊑z i♯ The Classical Design To contrast with Cousot’s original design using classical abstract interpretation, the key difference is the abstraction function. The abstraction function using classical Galois connections is recovered through a lifting of our η z : G z αz (I) := η (i) αz : ℘(Z) → Z♯ J Ka℘ ∈ aexp → ℘(Z × Z) → ℘(Z) JaeKa℘ (II) := {JaeKa (i1 , i2 ) | hi1 , i2 i ∈ II} Abstraction functions of this form—℘(B) → A, for some concrete set A and abstract set B—are representative of most Galois connections used in the literature for static analyzers. However, these abstraction functions are precisely the part of classical Galois connections which inhibit mechanized verification. The extraction function η z does not manipulate powersets, does not inhibit mechanized verification, and recovers the original non-constructive αz through this standard lifting. and then J K♯a is proven correct w.r.t. this lifting using αz and γ z : αz (JaeKa℘ (γ z (i♯1 , i♯2 ))) = JaeK♯a (i♯1 , i♯2 ) This property cannot be mechanized without axioms because αz is non-constructive. Furthermore, the proof involves additional powerset boilerplate reasoning, which is not present in our mechanization of correctness for J K♯a using constructive Galois connections. The state-of-the art approach of “γ-only” verification would instead mechanize the γγ variant of correctness: Abstracting Environments An abstract environment maps variables to abstract integers rather than concrete integers. ρ♯ ∈ env♯ := var → Z♯ JaeKa℘ (γ z (i♯1 , i♯2 )) = γ z (JaeK♯a (i♯1 , i♯2 )) r env is given meaning through an interpretation function µ : which is similar to our µµ rule: µr ∈ env♯ → ℘(env) µr (ρ♯ ) := {ρ | ∀x.ρ(x) ∈ µz (ρ♯ (x))} An abstract environment represents concrete environments that agree pointwise with some represented integer in the codomain. The order on abstract environments is the standard pointwise ordering and obeys ρ♯1 ⊑r ρ♯2 ⇐⇒ µr (ρ♯1 ) ⊆ µr (ρ♯2 ): hi1, i2i ∈ µz(i♯1,i♯2) ∧ hi′1, i′2i = JaeKa(i1,i2) ⇔ hi′1, i′2i ∈ µz(JaeK♯a(i♯1,i♯2)) The benefit of our approach is that soundness and completeness properties which also mention extraction (η) can also be mechanized, like calculating abstract interpreters from their specification. Abstracting Relations The verification of an abstract interpreter for relations is similar to the design for functions: induce a specification using the constructive Galois connection, and prove correctness w.r.t. the induced spec. The relations we abstract are ⇓a , ⇓b and 7→c , and we call their abstract interpreters A♯ , B♯ and C ♯ . Rather than postulate the definitions of the abstract interpreters, we calculate them from their specifications, the results of which are sound and computable by construction. The arithmetic and boolean abstract interpreters are functions from abstract environments to abstract integers, and the abstract interpreter for commands computes the next abstract transition states of execution. We only present select calculations for A♯ ; see our accompanying Agda development for each calculation in mechanized form. A♯ has type: ρ♯1 ⊑r ρ♯2 ⇐⇒ (∀x.ρ♯1 (x) ⊑z ρ♯2 (x)) To form a constructive Galois connection, µr forms a correspondence with a best abstraction function η r : η r ∈ env → env♯ i♯2 i♯2 i♯2 i♯2 i♯2 The Classical Design To contrast with Cousot’s original design using classical abstract interpretation, the key difference is that we avoid powerset liftings all-together. Using classical Galois connections, the concrete denotation function must be lifted to powersets: i∈I ♯ i♯1 ∨ pos ⊑z i♯1 ∨ neg ⊑z i♯1 ∧ zer ⊑z i♯1 ∧ neg ⊑z i♯1 ∧ pos ⊑z η r (ρ) := λx.η z (ρ(x)) and we prove the constructive Galois connection correspondence: ρ ∈ µr (ρ♯ ) ⇐⇒ η r (ρ) ⊑r ρ♯ The Classical Design To contrast with Cousot’s original design using classical abstract interpretation, the key difference is again the abstraction function. The abstraction function using classical Galois connections is: A♯ [ ] : aexp → env♯ → Z♯ αr (R) := λx.αz ({ρ(x) | ρ ∈ R}) αr : ℘(env) → env♯ which is also not amenable to mechanized verification. To induce a spec for A♯ , we first revisit the concrete semantics relation as a powerset-valued function, which we call A: Abstracting Functions After designing constructive Galois connections for Z and env we define what it means for J K♯a , some abstract denotation for arithmetic operators, to be a sound abstraction of J Ka , its concrete counterpart. This is done through a specification induced by mappings η and µ, analogously to how specifications are induced using classical Galois connections. A[ ] : aexp → env → ℘(Z) A[ae](ρ) := {i | ρ ⊢ ae ⇓a i} The induced spec for A♯ is generated with the monadic bind operator, which we notate using Moggi’s star notation ∗ : pure(η z )∗ (A[ae]∗ (µr (ρ♯ ))) ⊆ pure(A♯ [ae])(ρ♯ ) 9 Case ae = rand: z r -- Agda Calculation of Case ae = x: ♯ a α[A] (Var x) ρ♯ = [proof-mode] {η (i) | ρ ∈ µ (ρ ) ∧ ρ ⊢ rand ⇓ i} z r ♯ do [[ (pure · η z ) ∗ · (A[ Var x ] ∗ · (µr · ρ♯)) ]] a = {η (i) | ρ ∈ µ (ρ ) ∧ i ∈ Z} * defn. of ρ ⊢ rand ⇓ i + ⊆ {η z (i) | i ∈ Z} * ∅ when µr (ρ♯ ) = ∅ + ⊆ {any} * {any} mon. w.r.t. ⊑z + , {A♯ [rand](ρ♯ )} * defining A♯ [rand] +  [focus-right [· ] of (pure · η z ) ∗ ] begin do [[ A[ Var x ] ∗ · (µr · ρ♯) ]]  * A[Var]/≡ +  [[ (pure · lookup[ x ]) ∗ · (µr · ρ♯) ]] Case ae = x:  * lookup/µr /≡ + {η z (i) | ρ ∈ µr (ρ♯ ) ∧ ρ ⊢ x ⇓a i}  [[ µz ∗ · (pure · lookup♯[ x ] · ρ♯) ]] = {η z (ρ(x)) | ρ ∈ µr (ρ♯ )} * defn. of ρ ⊢ x ⇓a i + = {η z (i) | i ∈ µz (ρ♯ (x))} * defn. of µr (ρ♯ ) +  [[ (pure · η z ) ∗ · (µz ∗ · (pure · lookup♯[ x ] · ρ♯)) ]] * Eq. CGC-Red +  * reductive[ηµ] + ♯ ⊆ {ρ (x)} ♯ ♯ end ♯ , {A [x](ρ )}  [[ ret · (lookup♯[ x ] · ρ♯) ]] * defining A [x] +  [[ pure · A♯[ Num n ] · ρ♯ ]]  Case ae = x (Monadic): z ∗ r ∗ ♯ pure(η ) (A[x] (µ (ρ ))) Figure 4. Constructive GC calculations in Agda = pure(λρ.η z (ρ(x)))∗ (µr (ρ♯ )) * defn. of A[x] + = pure(η z )∗ (µz∗ (ρ♯ (x))) * defn. of µr (ρ♯ ) + ⊆ ret(ρ♯ (x)) * Eq. CGC-Red + ♯ ♯ , pure(A [x])(ρ ) The Classical Design Classically, one first designs a powerset lifting of the concrete semantics, called a collecting semantics: A℘ [ ] : aexp → ℘(env) → ℘(Z) A℘ [ae](R) := {i | ρ ∈ R ∧ ρ ⊢ ae ⇓a } * defining A♯ [x] + The classical soundness specification for A♯ [ae](ρ♯ ) is then: Figure 3. Constructive GC calculations on paper αz (A℘ [ae](γ r (ρ♯ ))) ⊑ A♯ [ae](ρ♯ ) However, as usual, the abstraction αz cannot be mechanized effectively, preventing a mechanized derivation of A♯ by calculus. which unfolds to: {η z (i) | ρ ∈ µr (ρ♯ ) ∧ ρ ⊢ ae ⇓a i} ⊆ {A♯ [ae](ρ♯ )} 5. Case Study: Gradual Type Systems To calculate A♯ we reason equationally from the spec on the left towards the singleton set on the right, and declare the result the definition of A♯ . We do this by case analysis on ae; we show the cases for ae = rand and ae = x in Figure 3. Each calculation can also be written in monadic form, which is the style we mechanize; we repeat the variable case in monadic form in the figure. Recent work in metatheory for gradual type systems by Garcia et al. [17] shows how a Galois connection discipline can guide the design of gradual typing systems. Starting with a Galois connection between precise and gradual types, both the static and dynamic semantics of the gradual language are derived systematically. This technique is called Abstracting Gradual Typing (AGT). The design presented by Garcia et al is to begin with a precise type system, like the simply typed lambda calculus, and add a new type ? which functions as the ⊤ element in the lattice of type precision. The precise typing rules are presented with meta-operators <: .. for subtyping and ∨ for the join operator in the subtyping lattice. The gradual type system is then written using abstract variants <:♯ .. ♯ and ∨ which are proven correct w.r.t. specifications induced by the Galois connection. Mechanized Calculation Our Agda calculation of A♯ strongly resembles the on-paper monadic one. We show the Agda proof code for abstract variable references in Figure 4. The first line is the top level definition site for the derivation of A♯ for the Var case. The proof-mode term is part of our “proof-mode” library which gives support for calculational reasoning in the form of Agda proof combinators with mixfix syntax. Statements surrounded by double square brackets [[e]] restate the current proof state, which Agda will check is correct. Reasoning steps are employed through *e+ terms, which transform the proof state from the previous form to the next. The term [focus-right [· ] of e] focuses the goal to the right of the outermost application, scoped between begin and end. Using constructive Galois connections, our mechanized calculation closely follows Cousot’s classical one, uses both η and µ mappings, and results in a verified, executable static analyzer. Such a result is not possible using classical Galois connections, due to the inability to encode α functions constructively. We complete the full calculation of Cousot’s generic abstract interpreter for WHILE in Agda as supplemental material to this paper, where the resulting interpreter is both sound and computable by construction. We also provide our “proof-mode” library which supports general calculational reasoning with posets. The Precise Type System The AGT paper describes two designs for gradual type systems in increasing complexity. We chose to mechanize a hybrid of the two which is simple, like the first design, yet still exercises key challenges addressed by the second. We also made slight modifications to the design at parts to make mechanization easier, but without changing the nature of the system. The precise type system we mechanized is the simply typed lambda calculus with booleans, and top and bottom elements for a subtyping lattice, which we call any and none: τ ∈ type ::= none | B | τ → τ | any The first design in the AGT paper does not involve subtyping, and their second design incorporates record types with width and depth subtyping. By just focusing on none and any, we exercise 10 Γ ⊢ e 1 : τ1 Γ ⊢ e 2 : τ2 Γ ⊢ e 3 : τ3 Γ♯ ⊢♯ e♯1 : τ1♯ Γ♯ ⊢♯ e♯2 : τ2♯ Γ♯ ⊢♯ e♯3 : τ3♯ τ1 <: B .. Γ ⊢ if e1 then e2 else e3 : τ1 ∨ τ2 IF .. ♯ Γ♯ ⊢♯ if e1 then e2 else e3 : τ1♯ ∨ τ2♯ Γ ⊢ e 1 : τ1 τ1 <: τ11 → τ21 Γ ⊢ e 2 : τ2 τ2 <: τ11 A PP Γ ⊢ e1 (e2 ) : τ21 Γ♯ ⊢♯ e♯1 : τ1♯ Γ♯ ⊢♯ e♯2 : τ2♯ Γ♯ ⊢♯ e♯ : τ1♯ closed(un) =⇒ ⊢ ⌈un⌉ : ? ⊢ ♯ ♯ ♯ ♯ ♯ ♯ ♯ ♯ τ11 ⊑ τ12 ∧ τ21 ⊑ τ22 =⇒ τ11 → τ21 ⊑ τ12 → τ22 Just as in our other designs by abstract interpretation, type♯ is given meaning by an interpretation function µ, which is the constructive analog of a classical concretization (γ) function: µ : type♯ → ℘(type) µ(?) := {τ | τ ∈ type} µ(τ1♯ → τ2♯ ) := {τ1 → τ2 | τ1 ∈ µ(τ1♯ ) ∧ τ2 ∈ µ(τ2♯ )} The extraction function η is, remarkably, the identity function: η(τ ) = τ and the constructive Galois correspondence holds: τ ∈ µ(τ ♯ ) ⇐⇒ η(τ ) ⊑ τ ♯ .. ♯ hτ1 , τ2 i ∈ µ(τ1♯ , τ2♯ ) ∧ τ3♯ ⊑ η(τ1 ∨ τ2 ) ⇐⇒ τ3♯ ⊑ τ1♯ ∨ τ2♯ Key properties of gradual subtyping and the gradual join operator is how they operate over the unknown type ?: ? <: τ τ <: ? ⊑ e♯2 =⇒ ⊢ (EDL) ♯ e♯2 : τ2♯ ∧ τ1♯ ⊑ τ2♯ (GG) Kleisli Galois Connections We summarize Kleisli Galois connections in Figure 7. Kleisli Galois connections are analogous to classical ones, but with monadic analogs to α and γ, and monadic identity and composition operators ret and ⊛ in place of the function space identity and composition operators id and ◦. τ1 ∈ µ(τ1♯ ) ∧ τ2 ∈ µ(τ2♯ ) ∧ τ1 <: τ2 ⇐⇒ τ1♯ <:♯ τ2♯ ♯ ∧ e♯1 Powerset Monad See Sections 3.1 and 3.3 for the downwardclosure monotonicity property, and monad definitions and notation for the monotonic powerset monad. The monad operators obey standard monad laws. We introduce one new operator for monadic function composition: (g ⊛ f )(x) := g ∗ (f (x)). Gradual Operators Given the constructive Galois connection between gradual and precise types, we synthesize specifications for .. abstract analogs of subtyping <: and the subtyping join operator ∨, .. ♯ and relate them to their abstractions <:♯ and ∨ : .. ♯ : τ1♯ Classical Galois Connections We review classical Galois connections in Figure 7. A Galois connection between posets A and B contains two adjoint functors α and γ which share a correspondence. An equivalent formulation of the correspondence is two unit equations called extensive and reductive. Abstract interpreters are sound by over-approximating a specification induced by α and γ. τ ♯ ∈ {none, B, any} ♯ e♯1 In this section we develop the full metatheory of constructive Galois connection and prove precise claims about their relationship to classical Galois connections. We develop the metatheory of constructive Galois connections as an adjunction between posets with powerset-Kleisli adjoint functors. This is in contrast to classical Galois connections which come from an identical setup, but with the monotonic function space as adjoint functors, as shown in Figure 7. We connect constructive to classical Galois connections through an isomorphism between a subset of classical to the entire space of constructive. To form this isomorphism we introduce an intermediate structure, Kleisli Galois connections, which we show are isomorphic to the classical subset, and isomorphic to constructive ones using the constructive theorem of choice, as depicted in Figure 8. ♯ And arrow types are monotonic: ♯ ♯ 6. Constructive Galois Connection Metatheory τ ⊑τ ⊑? ♯ (FAT) ♯ The partial ordering is reflexive and has ? at the top: ♯ G-C OE ⊢ e : τ ⇐⇒ ⊢♯ e : τ τ ♯ ∈ type♯ ::= none | B | τ ♯ → τ ♯ | any | ? .. G-A PP Gradual Metatheory Using AGT, the gradual type system is a syntactic analog to the precise one but with gradual types and operators, which we show in Figure 6. Using this system, and constructive Galois connections, we mechanize in Agda the key AGT metatheory results from the paper: equivalence for fullyannotated terms (FAT), embedding of dynamic language terms (EDL), and gradual guarantee (GG): Gradual Types The essence of AGT is to design a gradual type system by abstract interpretation of the precise type system. To do this, a new top element is added to the precise type system, although rather than representing the top of the subtyping lattice like any, it represents the top of the precision lattice, and is notated ?: η : type → type♯ G-I F Figure 6. Case Study: gradual type system the subtyping machinery of their approach without the blowup in complexity from formalizing record types. The typing rules in AGT are written in strictly syntax-directed form, with explicit use of subtyping in rule hypotheses. We show three precise typing rules for if-statements, application and coercion in Figure 5. The subtyping lattice in the precise system is the “safe for substitution” lattice, and well typed programs enjoy progress and preservation. when τ1♯ <:♯ τ2♯ Γ♯ ⊢♯ e♯ :: τ2♯ : τ2♯ Figure 5. Case Study: precise type system µ(τ ♯ ) := τ ♯ ♯ ♯ τ1♯ <:♯ τ11 → τ21 ♯ ♯ ♯ τ2 <: τ11 ♯ Γ♯ ⊢ e♯1 (e♯2 ) : τ21 Γ ⊢ e : τ1 τ1 <: τ2 C OE Γ ⊢ e :: τ2 : τ2 ♯ τ1♯ <:♯ B Kleisli to Classical and Back All Kleisli Galois connections hκα, κγi between A and B can be lifted to recover a classical Galois connection hα, γi between ℘(A) and ℘(B) through a monadic ♯ .. ♯ ?∨ τ =τ ∨ ?=? 11 Adjunction Category Adjoints LAdjoint RAdjoint Corr Extensive Reductive Soundness Optimality Classical GCs Posets Mono. Functions α:A →B γ:B →A id(x) ⊑ γ(y) ⇔ α(x) ⊑ id(y) id ⊑ γ ◦ α α ◦ γ ⊑ id α ◦ f ◦ γ ⊑ f♯ α ◦ f ◦ γ = f♯ Kleisli/constructive GCs Posets ℘-Monadic Functions κα : A → ℘(B) κγ : B → ℘(A) ret(x) ⊆ κγ(y) ⇔ κα(x) ⊆ ret(y) ret ⊑ κγ ⊛ κα κα ⊛ κγ ⊑ ret κα ⊛ f ⊛ κγ ⊑ f ♯ κα ⊛ f ⊛ κγ = f ♯ Computational Constructive Kleisli Classical Set inclusion Theorem of choice Figure 8. Relationship between classical, Kleisli and constructive Lemma 1 (CGC-Induce).AGDAX For every Kleisli Galois connection hκα, κγi, there exists a constructive Galois connection hη, µi where hpure(η), µi = hκα, κγi. Figure 7. Comparison of constructive v classical adjunctions Because the mapping from Kleisli to constructive is interesting we provide a proof, which to our knowledge is novel. The proof builds a constructive Galois connection hη, µi from a Kleisli hκα, κγi by exploiting the Kleisli correspondence and making use of the constructive theorem of choice. lifting operator on Kleisli Galois connections hκα, κγi∗ : hα, γi = hκα, κγi∗ = hκα∗ , κγ ∗ i This lifting is sound, meaning Kleisli soundness and optimality results can be translated to classical ones. Proof. To turn an arbitrary Kleisli Galois connection into a constructive one, we show that the effect on κα : A → ℘(B) is benign, or in other words, that there exists some η such that κα = pure(η). We prove this using two ingredients: a constructive interpretation of the Kleisli extensive law, and the constructive theorem of choice. We first expand the Kleisli expansive property, unfolding definitions of ⊛ and ret, to get an equivalent logical statement: Theorem 1 (KGC-Sound). AGDAX For any Kleisli relationship of soundness between f and f ♯ , that is κα ⊛ f ⊛ κγ ⊑ f ♯ , its lifting to classical is also sound, that is α ◦ f ∗ ◦ γ ⊑ f ♯∗ where hα, γi = hκα, κγi∗ , and likewise for optimality relationships. This lifting is also complete, meaning classical Galois connection soundness and optimality results can always be translated to Kleisli ones, when α and γ are of lifted form. ∀x.∃y.y ∈ κα(x) ∧ x ∈ κγ(y) (KGC-Exp) Statements of this form can be used in conjunction with an axiom of choice in classical mathematics, which is: Theorem 2 (KGC-Complete).AGDAX For any classical relationship of soundness between f ∗ and f ♯∗ , that is α ◦ f ∗ ◦ γ ⊑ f ♯∗ , its lowering to Kleisli is also sound when hα, γi = hκα, κγi∗ , that is κα ⊛ f ⊛ κγ ⊑ f ♯ , and likewise for optimality relationships. (∀x.∃y.R(x, y)) =⇒ (∃f.∀x.R(x, f (x))) (AxChoice) This theorem is admitted as an axiom in classical mathematics, but in constructive logic—the setting used for extracting verified algorithms–(AxChoice)is definable as a theorem, due to the computational interpretation of logical connectives ∀ and ∃. We define (AxChoice) as a theorem in Agda without trouble: Due to soundness and completeness, one can work with the simpler setup of Kleisli Galois connections without any loss of generality. The setup is simpler because Kleisli Galois connection theorems only quantify over individual elements rather than elements of powersets. For example, the soundness criteria κα ⊛ f ⊛ κγ ⊑ f ♯ is proved by showing κα∗ (f ∗ (κγ(x))) ⊆ f ♯ (x) for an arbitrary element x : A, whereas in the classical proof one must show κα∗ (f ∗ (κγ ∗ (X))) ⊆ f ♯∗ (X) for arbitrary sets X : ℘(A). choice : ∀{A B}{R : A → B → Set} → (∀ x → ∃ y st R x y) → (∃ f st ∀ x → R x (f x)) choice P = ∃ (λ x → π1 (P x)) , (λ x → π2 (P x)) Constructive Galois Connections Constructive Galois connections are a restriction of Kleisli Galois connections where the abstraction mapping is a pure rather than monadic function. We call the left adjoint extraction, notated η, and the right adjoint interpretation, notated µ. The constructive Galois connection correspondence, alternative expansive and reductive formulation of the correspondence, and soundness and optimality criteria are identical to Kleisli Galois connections where hκα, κγi = hpure(η), µi. Applying (AxChoice) to (KGC-Exp) then gives: ∃η.∀x.η(x) ∈ κα(x) ∧ x ∈ κγ(η(x)) (ExpChioce) which proves the existence of a pure function η : A → B. In order to form a constructive Galois connection η and µ must satisfy the correspondence, which we prove in split form: x ∈ µ(η(x)) x ∈ µ(y) =⇒ η(x) ⊑ y Constructive to Kleisli and Back Our main theorem which justifies the soundness and completeness of constructive Galois connections is an isomorphism between constructive and Kleisli Galois connections. The easy direction is soundness, where a Kleisli Galois connection is formed by defining hκα, κγi = hpure(η), µi. Soundness and optimality theorems are then lifted from constructive to Kleisli without modification. (CGC-Exp) (CGC-Red) The expansive property is immediate from the second conjunct in (ExpChioce). The reductive property follows from the Kleisli reductive property: x ∈ κγ(y) ∧ y ′ ∈ κα(x) =⇒ y ′ ⊑ y (KGC-Red) The constructive variant of reductive is proved by satisfying the first two premises of (KGC-Red), where x ∈ κγ(y) is by assumption and y ′ ∈ κα(x) is by the first conjunct in (ExpChioce). So far we have shown that for a Kleisli Galois connection hκα, κγi, there exists a constructive Galois connection hη, µi where µ = κγ. However, we have yet to show pure(η) = κα. To show this, we prove an analog of a standard result for classical Galois connections: that α and γ uniquely determine each other. Theorem 3 (CGC-Sound).AGDAX For any constructive relationship of soundness between f and f ♯ , that is pure(η) ⊛ f ⊛ µ ⊑ f ♯ , its lifting to classical is sound, that is κα ⊛ f ⊛ κγ ⊑ f ♯ where hκα, κγi = hpure(η), µi, and likewise for optimality relationships. The other direction, completeness, is much more surprising. First we establish a lowering for Kleisli Galois connections. 12 Lemma 2 (Unique Abstraction).AGDAX For any two Kleisli Galois connections hκα1 , κγ1 i and hκα2 , κγ2 i, κα1 = κα2 iff κγ1 = κγ2 Deductive Synthesis Fiat [16] is a library for the Coq proof assistant which supports semi-automated synthesis of programs as refinements of their specifications. Fiat uses the same powerset type and monad as we do, and their “deductive synthesis” process similarly derives correct-by-construction programs by calculus. Fiat derivations start with a user-defined specification and calculate towards an under-approximation (⊒), whereas calculational abstract interpretation starts with an optimal specification and calculates towards an over-approximation (⊑). It should be possible to generalize their framework to use partial orders to recover aspects of our work, or to invert the lattice used in our abstract interpretation framework to recover aspects of theirs. A notable difference in approach is that Fiat makes heavy use of Coq’s tactic programming language to automate rewrites inside respectful contexts, whereas our system provides no interactive proof automation and each calculational step must be justified explicitly. We then conclude pure(η) = κα as a consequence of the above lemma and the fact that µ = κγ. Given the above mapping from Kleisli Galois connections to constructive ones, we prove the completeness of this mapping. Theorem 4 (CGC-Complete).AGDAX For any Kleisli relationship of soundness between f and f ♯ , that is κα⊛f ⊛κγ ⊑ f ♯ , its lowering to constructive is also sound, that is pure(η) ⊛ f ⊛ µ ⊑ f ♯ where hη, µi is induced, and likewise for optimality relationships. Mechanization We mechanize the metatheory for constructive Galois connections and both case studies from Sections 4 and 5 in Agda, as well as a general purpose proof library for posets and calculational reasoning with the monotonic powerset monad. The development is available at: github.com/plum-umd/cgc. Monadic Abstract Interpretation Monads in abstract interpretation have recently been applied to good effect for modularity [15, 31]. However, that work uses monads to structure the semantics, not the Galois connections and proofs. Wrapping Up In this section we showed that constructive Galois connections are sound w.r.t. classical Galois connections, and complete w.r.t. the subset of classical Galois connections recovered by lifting constructive ones. We showed this by introducing an intermediate space of Galois connections, Kleisli Galois connections, and by establishing two sets of isomorphisms between a subset of classical and Kleisli, and between Kleisli and constructive. The proof of isomorphism between constructive and Kleisli yielded an interesting proof which applies the constructive theorem of choice to one of the Kleisli Galois connection correspondence laws. Future Directions Now that we have established a foundation for constructive Galois connection calculation, we see value in verifying larger derivations (e.g. [23, 30]). Furthermore we would like to explore whether or not our techniques have any benefit in the space of general-purpose program calculations à la Bird. Currently our framework requires the user to justify every detail of the program calculation, including monotonicity proofs and proof scoping for rewrites inside monotonic contexts. We imagine much of this can be automated, requiring the user to only provide the interesting parts of the proof, à la Fiat[16]. Our experience has been that even Coq’s tactic system slows down considerably when automating all of these details, and we foresee using proof by reflection in either Coq (e.g. Rtac [20]) or Agda to automate these proofs in a way that maintains proof-checker performance. There have been recent developments on compositional abstract interpretation frameworks [15] where abstract interpreters and their proofs of soundness are systematically derived side-by-side. That framework relies on correctness properties transported by Galois transformers, which we posit would benefit from mechanization since they hold both computational and specification content. 7. Related Work This work connects two long strands of research: abstract interpretation via Galois connections and mechanized verification via dependently typed functional programming. The former is founded on the pioneering work of Cousot and Cousot [11, 12]; the latter on that of Martin-Löf [21], embodied in Norell’s Agda [28]. Our key technical insight is to use a monadic structure for Galois connections, following the example of Moggi [25] for the λ-calculus. Calculational Abstract Interpretation Cousot describes calculational abstract interpretation by example in his lecture notes [9] and monograph [8], and recently introduced a unifying calculus for Galois connections [14]. Our work mechanizes Cousot’s calculations and provides a foundation for mechanizing other instances of calculational abstract interpretation (e.g. [22, 30]). We expect our work to have applications to the mechanization of calculational program design [2, 3] by employing only Galois retractions, i.e. α ◦ γ is an identity [14]. There is prior work on mechanized program calculation [33], but it is not based on abstract interpretation. 8. Conclusions This paper realizes the vision of mechanized and constructive Galois connections foreshadowed by Cousot [8, p. 85], giving the first mechanically verified proof by calculational abstract interpretation; once for his generic static analyzer and once for the semantics of gradual typing. Our proofs by calculus closely follow the originals. The primary discrepancy is the use of monads to isolate specification effects. By maintaining this discipline, we are able to verify calculations by Galois connections and extract computational content from pure results. The resulting artifacts are correct-by-verifiedconstruction, thereby avoiding known bugs in the original.2 Verified Static Analyzers Verified abstract interpretation has many promising results [1, 5, 6, 29], scaling up to large-scale realworld static analyzers [18]. However, mechanized abstract interpretation has yet to benefit from the Galois connection framework. Until now, approaches use classical axioms or “γ-only” encodings of soundness and (sometimes) completeness. Our techniques for mechanizing Galois connections should complement these approaches. Acknowledgments We thank Ron Garcia and Éric Tanter for discussions of their work. Éric also helped with our French translation. We thank the Colony Club in D.C. and the Board & Brew in College Park for providing fruitful environments in which to work. We thank the anonymous reviewers of ICFP 2016 for their helpful feedback. This material is partially based on research sponsored by DARPA under agreement number AFRL FA8750-15-2-0104. Galculator The Galculator [32] is a proof assistant founded on an algebra of Galois connections. This tool is similar to ours in that it mechanically verifies Galois connection calculations. Our approach is more general, supporting arbitrary set-theoretic reasoning and embedded within a general purpose proof assistant, however their approach is fully automated for the small set of derivations which reside within their supported theory. 2 di.ens.fr/~cousot/aisoftware/Marktoberdorf98/Bug History 13 References the 42Nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2015. ACM, 2015. [1] G. Barthe, D. Pichardie, and T. Rezk. A certified lightweight noninterference java bytecode verifier. In R. D. Nicola, editor, Programming Languages and Systems, Lecture Notes in Computer Science. Springer Berlin Heidelberg, 2007. [2] R. Bird and O. de Moor. The Algebra of Programming. Prentice Hall, 1996. [3] R. S. Bird. A calculus of functions for program derivation. In D. A. Turner, editor, Research Topics in Functional Programming. AddisonWesley, 1990. Also available as Technical Monograph PRG-64, from the Programming Research Group, Oxford University. [4] B. Blanchet, P. Cousot, R. Cousot, J. Feret, L. Mauborgne, A. Miné, D. Monniaux, and X. Rival. A static analyzer for large safety-critical software. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’03. ACM, 2003. [17] R. Garcia, A. M. Clark, and É. Tanter. Abstracting gradual typing. In Proceedings of the 43rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2016), St Petersburg, FL, USA, Jan. 2016. ACM Press. To appear. [18] J. H. Jourdan, V. Laporte, S. Blazy, X. Leroy, and D. Pichardie. A Formally-Verified c static analyzer. In Proceedings of the 42Nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’15. ACM, 2015. [19] X. Leroy. Formal verification of a realistic compiler. Commun. ACM, 2009. [20] G. Malecha and J. Bengtson. Extensible and efficient automation through reflective tactics. In Programming Languages and Systems - 25th European Symposium on Programming, ESOP 2016. Springer, 2016. [21] P. Martin-Löf. Intuitionistic Type Theory. Bibliopolis, 1984. [22] J. Midtgaard and T. Jensen. A calculational approach to Control-Flow analysis by abstract interpretation. In M. Alpuente and G. Vidal, editors, Static Analysis, Lecture Notes in Computer Science, chapter 23. Springer Berlin Heidelberg, 2008. [5] S. Blazy, V. Laporte, A. Maroneze, and D. Pichardie. Formal verification of a c value analysis based on abstract interpretation. In F. Logozzo and M. Fähndrich, editors, Static Analysis, Lecture Notes in Computer Science. Springer Berlin Heidelberg, 2013. [6] D. Cachera and D. Pichardie. A certified denotational abstract interpreter. In M. Kaufmann and L. Paulson, editors, Interactive Theorem Proving, Lecture Notes in Computer Science. Springer Berlin Heidelberg, 2010. [7] P. Cousot. Abstract interpretation. URL http://www.di.ens.fr/~ cousot/AI/. [23] J. Midtgaard and T. Jensen. A calculational approach to ControlFlow analysis by abstract interpretation. In M. Alpuente and G. Vidal, editors, Static Analysis Symposium, LNCS. Springer, 2008. [24] A. Miné. The octagon abstract domain. Higher-Order and Symbolic Computation, 2006. [25] E. Moggi. An abstract view of programming languages. Technical report, Edinburgh University, 1989. [8] P. Cousot. The calculational design of a generic abstract interpreter. In M. Broy and R. Steinbrüggen, editors, Calculational System Design. NATO ASI Series F. IOS Press, Amsterdam, 1999. [26] D. Monniaux. Réalisation mécanisée d’interpréteurs abstraits. Rapport de DEA, Université Paris VII, 1998. French. [27] F. Nielson, H. R. Nielson, and C. Hankin. Principles of Program Analysis. Springer-Verlag, 1999. [9] P. Cousot. MIT 16.399: Abstract interpretation, 2005. [10] P. Cousot and R. Cousot. Static determination of dynamic properties of programs. In 2nd International Symposium on Programming, 1976. [11] P. Cousot and R. Cousot. Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Proceedings of the 4th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages. ACM, 1977. [28] U. Norell. Towards a practical programming language based on dependent type theory. PhD thesis, Department of Computer Science and Engineering, Chalmers University of Technology, SE-412 96 Göteborg, Sweden, Sept. 2007. [29] D. Pichardie. Interprétation abstraite en logique intuitionniste: extraction d’analyseurs Java certifiés. PhD thesis, Université Rennes, 2005. [30] I. Sergey, J. Midtgaard, and D. Clarke. Calculating graph algorithms for dominance and shortest path. In J. Gibbons and P. Nogueira, editors, Mathematics of Program Construction, Lecture Notes in Computer Science. Springer Berlin Heidelberg, 2012. [31] I. Sergey, D. Devriese, M. Might, J. Midtgaard, D. Darais, D. Clarke, and F. Piessens. Monadic abstract interpreters. In Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM, 2013. [12] P. Cousot and R. Cousot. Systematic design of program analysis frameworks. In Proceedings of the 6th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, POPL ’79. ACM, 1979. [13] P. Cousot and R. Cousot. Inductive definitions, semantics and abstract interpretations. In Proceedings of the 19th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’92. ACM, 1992. [14] P. Cousot and R. Cousot. A Galois connection calculus for abstract interpretation. In Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’14. ACM, 2014. [32] P. F. Silva and J. N. Oliveira. ‘Galculator’: Functional prototype of a Galois-connection based proof assistant. In Proceedings of the 10th International ACM SIGPLAN Conference on Principles and Practice of Declarative Programming, PPDP ’08. ACM, 2008. [15] D. Darais, M. Might, and D. Van Horn. Galois transformers and modular abstract interpreters. In Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2015, pages 552–571. ACM, 2015. [16] B. Delaware, C. Pit-Claudel, J. Gross, and A. Chlipala. Fiat: Deductive synthesis of abstract data types in a proof assistant. In Proceedings of [33] J. Tesson, H. Hashimoto, Z. Hu, F. Loulergue, and M. Takeichi. Program calculation in Coq. In M. Johnson and D. Pavlovic, editors, Algebraic Methodology and Software Technology, Lecture Notes in Computer Science, chapter 10. Springer Berlin Heidelberg, 2011. 14
6cs.PL
Learning-Based Modular Indirect Adaptive Control for a Class of Nonlinear Systems Mouhacine Benosman, Amir-massoud Farahmand, Meng Xia arXiv:1509.07860v1 [cs.SY] 25 Sep 2015 Abstract We study in this paper the problem of adaptive trajectory tracking control for a class of nonlinear systems with parametric uncertainties. We propose to use a modular approach, where we first design a robust nonlinear state feedback which renders the closed loop input-to-state stable (ISS), where the input is considered to be the estimation error of the uncertain parameters, and the state is considered to be the closed-loop output tracking error. Next, we augment this robust ISS controller with a model-free learning algorithm to estimate the model uncertainties. We implement this method with two different learning approaches. The first one is a model-free multi-parametric extremum seeking (MES) method and the second is a Bayesian optimization-based method called Gaussian Process Upper Confidence Bound (GP-UCB). The combination of the ISS feedback and the learning algorithms gives a learning-based modular indirect adaptive controller. We show the efficiency of this approach on a two-link robot manipulator example. I. I NTRODUCTION Classical adaptive methods can be classified into two main approaches; ‘direct approaches’, where the controller is updated to adapt to the process, and ‘indirect approaches’, where the model is updated to better reflect the actual process. Many adaptive methods have been proposed over the years for linear and nonlinear systems, we could not possibly cite here all the design and analysis results that have been reported, instead we refer the reader to e.g., [1], [2] and the references therein for more details. Of particular interest to us is the indirect modular approach to adaptive nonlinear control, e.g., [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12]. In this approach, first the controller is designed by assuming that all the parameters are known and then an identifier is used to guarantee certain boundedness of the estimation error. The identifier is independent of the designed controller and thus the approach is called ‘modular’. For example, a modular approach has been proposed in [3] for adaptive neural control of pure-feedback nonlinear systems, where the input-to-state stability (ISS) modularity of the controller-estimator is achieved and the closed-loop stability is guaranteed by the small-gain theorem (see also [13], [14]). Mouhacine Benosman (m [email protected]) is with the Multimedia group of Mitsubishi Electric Research Laboratories (MERL), Cambridge, MA 02139, USA. Amir-massoud Farahmand is with the Data Analytics group of MERL. Meng Xia is with the with the Department of Electrical Engineering, University of Notre Dame, Notre Dame, IN 46556, USA (part of this work has been completed during her internship at MERL). In this work, we build upon this type of modular adaptive design and provide a framework which combines modelfree learning methods and robust model-based nonlinear control to propose a learning-based modular indirect adaptive controller, where model-free learning algorithms are used to estimate, in closed-loop, the uncertain parameters of the model. The main difference with the existing model-based indirect adaptive control methods, is the fact that we do not use the model to design the uncertainty parameters estimation filters. Indeed, model-based indirect adaptive controllers are based on parameters estimators designed using the system’s model, e.g., the X-swapping methods presented in [2], where gradient descent filters obtained using the systems dynamics are designed to estimate the uncertain parameters. We argue that because we do not use the system’s dynamics to design uncertainties estimation filters we have less restrictions on the type of uncertainties that we can estimate, e.g., uncertainties appearing nonlinearly can be estimated with the proposed approach, see [5] for some earlier results on a mechatronics application. We also show here that with the proposed approach we can estimate at the same time a vector of linearly dependent uncertainties, a case which cannot be straightforwardly solved using model-based filters, e.g., refer to [15] where it is shown that the X-swapping model-based method fails to estimate a vector of linearly dependent model coefficients. In this work, we implement the proposed approach with two different model-free learning algorithms: The first one is a dither-based MES algorithm, and the second one is a Bayesian optimization-based method called GP-UCB. The latter solves the exploration-exploitation problem in the continuous armed bandit problem, which is a non-associative reinforcement learning (RL) setting. Indeed, MES is a model-free control approach with well known convergence properties, since it has been analyzed in many papers, e.g., [16], [17], [16], [18], [19]. This makes MES a good candidate for the model-free estimation part of our modular adaptive controller, as already shown in some of our preliminary results in [7], [8], [10]. However, one of the main limitations with dither-based MES is the convergence to local minima. To improve this part of the controller, we introduce here another model-free learning algorithm in the estimation part of the adaptive controller. Indeed, we propose in this paper to use a reinforcement learning algorithm based on Bayesian optimization methods, known as GP-UCB, e.g., [20], which contrary to the MES algorithm is guaranteed to reach the global minima in a finite search space. One point worth mentioning at this stage is that comparatively to‘pure’ model-free controllers, e.g., pure MES or model-free RL algorithms, the proposed control here has a different goal. Indeed, the available model-free controllers are meant for output or state regulation, i.e., solving a static optimization problem. In the contrary, here we propose to use model-free learning to complement a model-based nonlinear control to estimate the unknown parameters of the model, which means that the control goal, i.e., state or output trajectory tracking is handled by the model-based controller. The learning algorithm is used to improve the tracking performance of the model-based controller, and once the learning algorithm has converged, one can carry on using the nonlinear model-based feedback controller alone, i.e., without the need of the learning algorithm. Furthermore, due to the fact that we are merging together a model-based control with a model-free learning algorithm, we believe that this type of controller can converge faster to an optimal performance, comparatively to the pure model-free controller, since by ‘partly’ using a model-based controller, we are taking advantage of the partial information given by the physics of the system, whereas the pure model-free algorithms assume no knowledge about the system, and thus start the search for an optimal control signal from scratch. Similar ideas of merging model-based control and MES has been proposed in [12], [21], [22], [4], [5], [6], [7], [8], [10]. For instance in [12], [21] extremum seeking is used to complement a model-based controller, under linearity of the model assumption in [12] (in the direct adaptive control setting, where the controllers gains are estimated), or in the indirect adaptive control setting, under the assumption of linear parametrization of the control in terms of the uncertainties in [21]. The modular design idea of using a model-based controller with ISS guaranty, complemented with an MES-based module can be found in [5], [6], [7], [8], [10], where the MES was used to estimate the model parameters and in [4], [23], where feedback gains were tuned using MES algorithms. The work of this paper falls in this class of ISS-based modular indirect adaptive controllers. The difference with other MES-based adaptive controllers is that, due to the ISS modular design we can use any model-free learning algorithm to estimate the model uncertainties, not necessarily extremum seeking-based. To emphasis this we show here the performance of the controller when using a type of RL-based learning algorithm as well. The rest of the paper is organized as follows. In Section II, we present some notations, and fundamental definitions that will be needed in the sequel. In Section III, we formulate the problem. The nominal controller design are presented in Section IV. In Section IV-B, a robust controller is designed which guarantees ISS from the estimation error input to the tracking error state. In Section IV-C, the ISS controller is complemented with an MES algorithm to estimate the model parametric uncertainties. In section IV-D, we introduce the RL GP-UCB algorithm as a model-free learning to complement the ISS controller. Section V is dedicated to an application example and the paper conclusion is given in Section VI. II. P RELIMINARIES Throughout the paper, we use k · k to denote the Euclidean norm; i.e., for a vector x ∈ Rn , we have kxk , √ kxk2 = xT x, where xT denotes the transpose of the vector x. We denote by Card(S) the size of a finite set qP P n n 2 S . The Frobenius norm of a matrix A ∈ Rm×n , with elements aij , is defined as kAkF , i=1 j=1 |aij | . Given x ∈ Rm , the signum function is defined as sign(x) , [sign(x1 ), sign(x2 ), · · · , sign(xm )]T , where sign(.) denotes the classical signum function. We use f˙ to denote the time derivative of f and f (r) (t) for the r -th derivative of f (t), i.e. f (r) , dr f dt . We denote by Ck , functions that are k times differentiable and by C∞ , a smooth function. A continuous function α : [0, a) → [0, ∞) is said to belong to class K if it is strictly increasing and α(0) = 0. It is said to belong to class K∞ if a = ∞ and α(r) → ∞ as r → ∞ [24]. A continuous function β : [0, a) × [0, ∞) → [0, ∞) is said to belong to class KL if, for a fixed s, the mapping β(r, s) belongs to class K with respect to r and, for each fixed r , the mapping β(r, s) is decreasing with respect to s and β(r, s) → 0 as s → ∞ [24]. Next, We introduce some definitions that will be used in the sequel, e.g. [24]: Consider the system ẋ = f (t, x, u) (1) where f : [0, ∞) × Rn × Rm → Rn is piecewise continuous in t and locally Lipschitz in x and u, uniformly in t. The input u(t) is piecewise continuous, bounded function of t for all t ≥ 0. Definition 1 ([24], [25]): The system (1) is said to be input-to-sate stable (ISS) if there exist a class KL function β and a class K function γ such that for any initial state x(t0 ) and any bounded input u(t), the solution x(t) exists for all t ≥ t0 and satisfies kx(t)k ≤ β(kx(t0 )k, t − t0 ) + γ( sup ku(τ )k). t0 ≤τ ≤t Theorem 1 ([24], [25]): Let V : [0, ∞) × Rn → R be a continuously differentiable function such that α1 (kxk) ≤V (t, x) ≤ α2 (kxk) ∂V ∂V + f (t, x, u) ≤ −W (x), ∂t ∂x ∀kxk ≥ ρ(kuk) > 0 (2) for all (t, x, u) ∈ [0, ∞) × Rn × Rm , where α1 , α2 are class K∞ functions, ρ is a class K function, and W (x) is a continuous positive definite function on Rn . Then, the system (1) is input-to-state stable (ISS). Remark 1: Note that other equivalent definitions for ISS have been given in [25, pp. 1974-1975]. For instance, Theorem 1 holds if inequality (2) is replaced by ∂V ∂V + f (t, x, u) ≤ −µ(kxk) + Ω(kuk) ∂t ∂x where µ ∈ K∞ T C 1 and Ω ∈ K∞ . III. P ROBLEM F ORMULATION A. Nonlinear system model We consider here affine uncertain nonlinear systems of the form ẋ = f (x) + ∆f (t, x) + g(x)u, (3) y = h(x), where x ∈ Rn , u ∈ Rp , y ∈ Rm (p ≥ m), represent the state, the input and the controlled output vectors, respectively. ∆f (t, x) is a vector field representing additive model uncertainties. The vector fields f , ∆f , columns of g and function h satisfy the following assumptions. Assumption A1 The function f : Rn → Rn and the columns of g : Rn → Rp are C∞ vector fields on a bounded set X of Rn and h : Rn → Rm is a C∞ vector on X . The vector field ∆f (x) is C1 on X . Assumption A2 System (3) has a well-defined (vector) relative degree {r1 , r2 , · · · , rm } at each point x0 ∈ X , P and the system is linearizable, i.e., m i=1 ri = n. Assumption A3 The desired output trajectories yid (1 ≤ i ≤ m) are smooth functions of time, relating desired initial points yid (0) at t = 0 to desired final points yid (tf ) at t = tf . B. Control objectives Our objective is to design a state feedback adaptive controller such that the output tracking error is uniformly bounded, whereas the tracking error upper-bound is function of the uncertain parameters estimation error, which can be decreased by the model-free learning. We stress here that the goal of learning algorithm is not stabilization but rather performance optimization, i.e., the learning improves the parameters estimation error, which in turn improves the output tracking error. To achieve this control objective, we proceed as follows: First, we design a robust controller which can guarantee input-to-state stability (ISS) of the tracking error dynamics w.r.t the estimation errors input. Then, we combine this controller with a model-free learning algorithm to iteratively estimate the uncertain parameters, by optimizing online a desired learning cost function. IV. A DAPTIVE C ONTROLLER D ESIGN A. Nominal Controller Let us first consider the system under nominal conditions, i.e., when ∆f (t, x) = 0. In this case, it is well know, e.g., [24], that system (3) can be written as y (r) (t) = b(ξ(t)) + A(ξ(t))u(t), (4) where (r ) (r ) (rm ) y (r) (t) = [y1 1 (t), y2 2 (t), · · · , ym (t)]T , ξ(t) = [ξ 1 (t), · · · , ξ m (t)]T , (ri −1) ξ i (t) = [yi (t), · · · , yi (t)], (5) 1≤i≤m The functions b(ξ), A(ξ) can be written as functions of f , g and h, and A(ξ) is non-singular in X̃ , where X̃ is the image of the set of X by the diffeomorphism x → ξ between the states of system (3) and the linearized model (4). Now, to deal with the uncertain model, we first need to introduce one more assumption on system (3). Assumption A4 The additive uncertainties ∆f (t, x) in (3) appear as additive uncertainties in the input-output linearized model (4)-(5) as follows (see also [26]) y (r) (t) = b(ξ(t)) + A(ξ(t))u(t) + ∆b(t, ξ(t)), where ∆b(t, ξ) is C1 w.r.t. the state vector ξ ∈ X̃ . (6) Remark 2: Assumption A4, can be ensured under the so-called matching conditions ([27], p. 146). It is well known that the nominal model (4) can be easily transformed into a linear input-output mapping. Indeed, we can first define a virtual input vector v(t) as v(t) = b(ξ(t)) + A(ξ(t))u(t). (7) Combining (4) and (7), we can obtain the following input-output mapping y (r) (t) = v(t). (8) Based on the linear system (8), it is straightforward to design a stabilizing controller for the nominal system (4) as un = A−1 (ξ) [vs (t, ξ) − b(ξ)] , (9) where vs is a m × 1 vector and the i-th (1 ≤ i ≤ m) element vsi is given by (r ) (ri −1) vsi = yidi − Krii (yi (r −1) − yidi ) − · · · − K1i (yi − yid ). (10) If we denote the tracking error as ei (t) , yi (t) − yid (t), we obtain the following tracking error dynamics (ri ) ei (t) + Krii e(ri −1) (t) + · · · + K1i ei (t) = 0, (11) where i ∈ {1, 2, · · · , m}. By properly selecting the gains Kji where i ∈ {1, 2, · · · , m} and j ∈ {1, 2, · · · , ri }, we can obtain global asymptotic stability of the tracking errors ei (t). To formalize this condition, we add the following assumption. Assumption A5 There exists a non-empty set A where Kji ∈ A such that the polynomials in (11) are Hurwitz, where i ∈ {1, 2, · · · , m} and j ∈ {1, 2, · · · , ri }. (ri −1) To this end, we define z = [z 1 , z 2 , · · · , z m ]T , where z i = [ei , e˙i , · · · , ei ] and i ∈ {1, 2, · · · , m}. Then, from (11), we can obtain ż = Ãz, where à ∈ Rn×n is a diagonal block matrix given by à = diag{Ã1 , Ã2 , · · · , Ãm }, and Ãi (1 ≤ i ≤ m) is a ri × ri matrix given by  0 1   0    Ãi =  0   ..  .  −K1i −K2i (12)  1 .. . 1 ··· ··· −Krii      .     As discussed above, the gains Kji can be chosen such that the matrix à is Hurwitz. Thus, there exists a positive definite matrix P > 0 such that (see e.g. [24]) ÃT P + P à = − I. (13) In the next section, we build upon the nominal controller (9) to write a robust ISS controller. B. Lyapunov reconstruction-based ISS Controller We now consider the uncertain model (3), i.e., when ∆f (t, x) 6= 0. The corresponding exact linearized model is given by (6) where ∆b(t, ξ(t)) 6= 0. The global asymptotic stability of the error dynamics (11) cannot be guaranteed anymore due to the additive uncertainty ∆b(t, ξ(t)). We use Lyapunov reconstruction techniques to design a new controller so that the tracking error is guaranteed to be bounded given that the estimate error of ∆b(t, ξ(t)) is bounded. The new controller for the uncertain model (6) is defined as uf = un + ur , (14) where the nominal controller un is given by (9) and the robust controller ur will be given later. By using the controller (14), and (6) we obtain y (r) (t) = b(ξ(t)) + A(ξ(t))uf + ∆b(t, ξ(t)), = b(ξ(t)) + A(ξ(t))un + A(ξ(t))ur + ∆b(t, ξ(t)), = vs (t, ξ) + A(ξ(t))ur + ∆b(t, ξ(t)), (15) where (15) holds from (9). Which leads to the following error dynamics ż = Ãz + B̃δ, (16) where à is defined in (12), δ is a m × 1 vector given by δ = A(ξ(t))ur + ∆b(t, ξ(t)), and the matrix B̃ ∈ Rn×m is given by  B̃1    B̃2 B̃ =   ..  .  B̃m (17)     ,    where each B̃i (1 ≤ i ≤ m) is given by a ri × m matrix such that   1 for l = ri , q = i B̃i (l, q) =  0 otherwise. (18) If we choose V (z) = z T P z as a Lyapunov function for the dynamics (16), where P is the solution of the Lyapunov equation (13), we obtain V̇ (t) = ∂V ż, ∂z = z T (ÃT P + P Ã)z + 2z T P B̃δ, = − kzk2 + 2z T P B̃δ, (19) where δ given by (17) depends on the robust controller ur . Next, we design the controller ur based on the form of the uncertainties ∆b(t, ξ(t)). More specifically, we consider here the case when ∆b(t, ξ(t)) is of the following form ∆b(t, ξ(t)) = E Q(ξ, t), (20) where E ∈ Rm×m is a matrix of unknown constant parameters, and Q(ξ, t) : Rn × R → Rm is a known bounded function of sates and time variables. For notational convenience, we denote by Ê(t) the estimate of E , and by 2 eE = E − Ê , the estimate error. We define the unknown parameter vector ∆ = [E(1, 1), ..., E(m, m)]T ∈ Rm , b i.e., concatenation of all elements of E , its estimate is denoted by ∆(t) = [Ê(1, 1), ..., Ê(m, m)]T , and the b . estimation error vector is given by e∆ (t) = ∆ − ∆(t) Next, we propose the following robust controller b ur = − A−1 (ξ)[B̃ T P zkQ(ξ, t)k2 + E(t)Q(ξ, t)]. (21) ż = f˜(t, z, e∆ ), (22) The closed-loop error dynamics can be written as where e∆ (t) is considered to be an input to the system (22). Theorem 2: Consider the system (3), under Assumptions A1-A5, where ∆b(t, ξ(t)) satisfies (20). If we apply to (3) the feedback controller (14), where un is given by (9) and ur is given by (21). Then, the closed-loop 2 system (22) is ISS from the estimation errors input e∆ (t) ∈ Rm to the tracking errors state z(t) ∈ Rn . Proof: By substitution (21) into (17), we obtain b Q(ξ, t) + ∆b(t, ξ(t)) δ = − B̃ T P zkQ(ξ, t)k2 − E(t) b Q(ξ, t) + E Q(ξ, t), = − B̃ T P zkQ(ξ, t)k2 − E(t) If we consider V (z) = z T P z as a Lyapunov function for the error dynamics (16). Then, from (19), we obtain b Q(ξ, t) V̇ ≤ − kzk2 + 2z T P B̃E Q(ξ, t) − 2z T P B̃ E(t) − 2kz T P B̃k2 kQ(ξ, t)k2 , which leads to V̇ ≤ − kzk2 + 2z T P B̃eE Q(ξ, t) − 2kz T P B̃k2 kQ(ξ, t)k2 . Since z T P B̃eE Q(ξ) ≤ kz T P B̃eE Q(ξ)k ≤ kz T P B̃kkeE kF kQ(ξ)k = kz T P B̃kke∆ kkQ(ξ)k, we obtain V̇ ≤ − kzk2 + 2kz T P B̃kke∆ kkQ(ξ, t)k − 2kz T P B̃k2 kQ(ξ, t)k2 1 1 ≤ − kzk2 − 2(kz T P B̃kkQ(ξ, t)k − ke∆ k)2 + ke∆ k2 2 2 1 2 2 ≤ − kzk + ke∆ k . 2 Thus, we have the following relation 1 V̇ ≤ − kzk2 , 2 ∀kzk ≥ ke∆ k > 0, Then from the Lyapunov direct theorem in [24], [25], we obtain that system (22) is ISS from input e∆ to state z. C. MES-based parametric uncertainties estimation Let us define now the following cost function b = F (z(∆)), b J(∆) (23) where F : Rn → R, F (0) = 0, F (z) > 0 for z ∈ Rn − {0}. We need the following assumptions on J . b ∗ = ∆. Assumption A6 The cost function J has a local minimum at ∆ b are Assumption A7 The initial error e∆ (t0 ) is sufficiently small, i.e., the original parameter estimate vector ∆ close enough to the actual parameter vector ∆. Assumption A8 The cost function J is analytic and its variation with respect to the uncertain parameters is ˜ ≤ ξ2 , ξ2 > 0, ∆ ˜ ∈ V(∆ b ∗ ), where V(∆ b ∗ ) denotes a compact b ∗ , i.e., k ∂J (∆)k bounded in the neighborhood of ∆ b ∂∆ b ∗. neighborhood of ∆ We can now present the following result. Lemma 3: Consider the system (3), under Assumptions A1-A8, where the uncertainty is given by (20). If we apply to (3) the feedback controller (14), where un is given by (9), ur is given by (21), the cost function is given b by (23), and ∆(t) are estimated through the ES algorithm π b ai > 0, x̃˙ i = ai sin(ωi t + )J(∆), 2 b i (t) = x̃i + ai sin(ωi t − π ), i ∈ {1, 2, . . . , m2 } ∆ 2 (24) with ωi 6= ωj , ωi + ωj 6= ωk , i, j, k ∈ {1, 2, . . . , m2 }, and ωi > ω ∗ , ∀ i ∈ {1, 2, . . . , m2 }, with ω ∗ large enough. Then, the norm of the error vector z(t) admits the following bound kz(t)k ≤ β(kz(0)k, t) + γ(β̃(ke∆ (0)k, t) + ke∆ kmax ), where ke∆ kmax = ξ1 ω0 + qP m2 2 i=1 ai , ξ1 > 0, ω0 = maxi∈{1,2,...,m2 } ωi , β ∈ KL, β̃ ∈ KL and γ ∈ K. Proof: Based on Theorem 2, we know that the tracking error dynamics (22) is ISS from the input e∆ (t) to the state z(t). Thus, by Definition 1, there exist a class KL function β and a class K function γ such that for any initial state z(0), any bounded input e∆ (t) and any t ≥ 0, kz(t)k ≤ β(kz(0)k, t) + γ( sup ke∆ (τ )k). (25) 0≤τ ≤t b , to do so we use the results presented Now, we need to evaluate the bound on the estimation vector ∆(t) in [17]. First, based on Assumption A8, the cost function is locally Lipschitz, i.e. there exists η1 > 0 such b ∗ ). Furthermore, since J is analytic, it can be that |J(∆1 ) − J(∆2 )| ≤ η1 k∆1 − ∆2 k, for all ∆1 , ∆2 ∈ V(∆ b ∗ ) by a quadratic function, e.g. Taylor series up to the second order. Based on this approximated locally in V(∆ and on Assumptions A6 and A7, we can obtain the following bound ([17, p. 436-437],[28]) ke∆ (t)k − kd(t)k ≤ ke∆ (t) − d(t)k ≤ β̃(ke∆ (0), tk) + ξ1 , ω0 where β̃ ∈ KL, ξ1 > 0, t ≥ 0, ω0 = maxi∈{1,2,...,m2 } ωi , and d(t) = [a1 sin(ω1 t + π2 ), . . . , am2 sin(ωm2 t + π2 )]T . We can further obtain that ξ1 + kd(t)k ω0 v u m2 X ξ1 u a2i . ≤ β̃(ke∆ (0), tk) + +t ω0 ke∆ (t)k ≤ β̃(ke∆ (0), tk) + i=1 Together with (25) yields the desired result. Remark 3: The adaptive controller of Lemma 3 uses the ES algorithm (24) to estimate the model parametric uncertainties. One might ask the question: where is the famous persistence of excitation (PE) condition here ? The answer can be found in the examination of equation (24). Indeed, the ES algorithm uses as ‘input’ the sinusoidal signals ai sin(ωi t + π2 ) which clearly satisfy the PE condition. The main difference with classical adaptive control result, is that these excitation signals are not entering the system dynamics directly, but instead are applied as inputs to the ES algorithm, reflected on the ES estimations outputs and thus transmitted to the system through the feedback loop. As we mentioned earlier, the dither-based MES has a problem of local minima, to improve this point we propose in the next section to use GP-UCB as the model-free learning algorithm for model uncertainties estimation. D. GP-UCB based parametric uncertainties estimation In this section we propose to use Gaussian Process Upper Confidence Bound (GP-UCB) algorithm to find the uncertain parameter ∆ vector [20], [29]. GP-UCB is a Bayesian optimization algorithm for stochastic optimization, i.e., the task of finding the global optimum of an unknown function when the evaluations are potentially contaminated with noise. The underlying working assumption for Bayesian optimization algorithms, including GP-UCB, is that the function evaluation is costly, so we would like to minimize the number of evaluations while having as accurate estimate of the minimizer (or maximizer) as possible [30]. For GP-UCB, this goal is guaranteed by having an upper bound on the regret of the algorithm – to be defined precisely later. One difficulty of stochastic optimization is that since we only observe noisy samples from the function, we cannot really be sure about the exact value of a function at any given point. One may try to query a single point many times in order to have an accurate estimate of the function. This, however, may lead to excessive number of samples, and can be wasteful way of assigning samples when the true value of the function at that point is actually far from optimal. The Upper Confidence Bounds (UCB) family of algorithms provide a principled approach to guide the search [31]. These algorithms, which are not necessarily formulated in a Bayesian framework, automatically balance the exploration (i.e., finding regions of the parameter space that might be promising) and the exploration (i.e., focusing on the regions that are known to be the best based on the current available knowledge) using the principle of optimism in the face of uncertainty. These algorithms often come with strong theoretical guarantee about their performance. For more information about the UCB class of algorithms, refer to [32], [33], [34]. GP-UCB is a particular UCB algorithms that is suitable to deal with continuous domains. It uses a Gaussian Process (GP) to maintain the mean and confidence information about the unknown function. We briefly discuss GP-UCB in our context following the discussion of the original papers [20], [29]. Consider the cost function J : D → R to be minimized. This function depends on the dynamics of the closed-loop system, b used in the controller design. So we may consider it as an unknown which itself depends on the parameters ∆ b. function of ∆ For the moment, let us assume that J is a function sampled from a Gaussian Process (GP) [35]. Recall that a GP is a stochastic process indexed by the set D that has the property that for any finite subset of  t b 1, ∆ b 2, . . . , ∆ b t } ⊂ D , the joint distribution of J(∆ b i) is a multivariate the evaluation points, that is {∆ i=1 h i b = E J(∆) b and its covariance function (or kernel) Gaussian distribution. GP is defined by a mean function µ(∆) h  i b ∆ b ′ ) = Cov(J(∆), b J(∆ b ′ )) = E J(∆) b − µ(∆) b b ′ ) − µ(∆ b ′ ) . The kernel K of a GP determines the K (∆, J(∆  b b′ 2  ∆k b ∆ b ′ ) = exp − k∆− behavior of a typical function sampled from the GP. For instance, if we choose K(∆, , 2l2 the squared exponential kernel with length scale l > 0, it implies that the the GP is mean square differentiable of all orders. We write J ∼ GP(µ, K ). Let us first briefly describe how we can find the posterior distribution of a GP(0, K ); a GP with zero prior mean. b 1, ∆ b 2, . . . , ∆ b t−1 } ⊂ D , we have observed the noisy evaluation yi = J(∆ b i ) + ηi b t−1 , {∆ Suppose that for ∆ with ηi ∼ N (0, σ 2 ) being i.i.d. Gaussian noise. We can find the posterior mean and variance for a new point b ∗ ∈ D as follows: Denote the vector of observed values by yt−1 = [y1 , . . . , yt−1 ]⊤ ∈ Rt−1 , and define the ∆ b i, ∆ b j ), and the vector Grammian matrix K ∈ Rt−1×t−1 with [K]i,j = K (∆ K∗ b 1, ∆ b ∗ ), . . . , K (∆ b t−1 , ∆ b ∗ )]. = [K(∆ b ∗ ) and the variance σt (∆ b ∗ ) of the posterior of the GP evaluated at ∆ b ∗ are (cf. Section The expected mean µt (∆ 2.2 of [35])   b ∗ ) = K∗ K + σ 2 I −1 yt−1 , µt (∆   2 −1 b ∗ ) = K(∆ b ∗, ∆ b ∗ ) − K⊤ σt2 (∆ K∗ . ∗ K +σ I b t by solving the following optimization At round t, the GP-UCB algorithm selects the next query point ∆ problem1 : b b − β 1/2 σt−1 (∆). b t ← argmin µt−1 (∆) ∆ t (26) b ∆∈D Where βt depends on the choice of kernel among other parameters of the problem. The optimization problem (26) is often nonlinear and non-convex. Nonetheless solving it only requires querying the GP, which in general is much faster than querying the original dynamical system. This is important when the dynamical system is a physical system and we would like to minimize the number of interactions with it before b with small J(∆) b . One practically easy way to approximately solve (26) is to restrict the search to a finding a ∆ finite subset D ′ of D . The finite subset can be a uniform grid structure over D , or it might consist of randomly selected members of D . The theoretical guarantee for GP-UCB is in the form of regret upper bound. Let us define ∆∗ ← argmin∆∈D J(∆), b t ) − J(∆∗ ). This is the global minimizer of the objective function. The regret at time t is defined by rt = J(∆ b t according the cost function J . The cumulative regret at time T a measure of sub-optimality of the choice of ∆ PT is defined as RT = t=1 rt . Ideally we would like limt→∞ RTT = 0. The behavior of the cumulative regret RT depends on the set D and the choice of kernel. If we fix the confidence parameter δ > 0, for the squared exponential kernel, the asymptotic behavior of RT is q  d+1 O T [log (T ) + log(1/δ)] , with probability at least 1 − δ (cf. Theorem 3 of [20], [29]). This result does not even require the function J to be a GP. It only requires the function to have a finite norm in the reproducing kernel Hilbert space (RKHS) HK defined by the kernel K. 1 UCB algorithms are often formulated as maximization problems, so the “upper” confidence bound is calculated. Here we actually compute the “lower” confidence bound, but to keep the naming convection, we still GP-UCB instead of GP-LCB. Remark 4: One main difference with some of the existing model-based adaptive controllers, is the fact that the learning-based estimation algorithm used here does not depend on the model of the system, i.e., the only information needed to compute the learning cost function (23) is the desired trajectory and the measured output of the system (please refer to Section V for an example). This makes the learning-based adaptive controllers suitable for the general case of nonlinear parametric uncertainties. For example in [36], a similar preliminary algorithm has been tested in the case of nonlinear models of electromagnetic actuators with a nonlinear parametric uncertainty. Another point worth mentioning here, is the fact that with the available modular model-based adaptive controllers, like the X-swapping modular algorithms, e.g., [37], it is not possible in some cases to estimate multiple uncertainties simultaneously. For instance, it is shown in [15] that the X-swapping adaptive control cannot estimate multiple uncertainties in the case of electromagnetic actuators, due to the linear dependency of the uncertain parameters, i.e., when we consider three parametric uncertainties affecting the same output acceleration, in which case the model-based estimation filters cannot distinguish between the uncertainties from this acceleration. However, when dealing with the same example, the MES-based modular indirect adaptive control approach was successful in estimating multiple uncertainties at the same time [28]. A similarly challenging case is considered in the example presented in the next section. V. T WO - LINK M ANIPULATOR E XAMPLE We consider here a two-link robot manipulator, with the following dynamics (see e.g. [38]) H(q)q̈ + C(q, q̇)q̇ + G(q) = τ, (27) where q , [q1 , q2 ]T denotes the two joint angles and τ , [τ1 , τ2 ]T denotes the two joint torques. The matrix H ∈ R4×4 is assumed to be non-singular and its elements are given by H11 = m1 ℓ2c1 + I1 + m2 [ℓ21 + ℓ2c2 + 2ℓ1 ℓc2 cos(q2 )] + I2 , H12 = m2 ℓ1 ℓc2 cos(q2 ) + m2 ℓ2c2 + I2 , (28) H21 = H12 , H22 = m2 ℓ2c2 + I2 . The matrix C(q, q̇) is given by  C(q, q̇) ,  −hq˙2 −hq˙1 − hq˙2 hq˙1 0 where h = m2 ℓ1 ℓc2 sin(q2 ). The vector G = [G1 , G2 ]T is given by  , G1 = m1 ℓc1 g cos(q1 ) + m2 g[ℓ2 cos(q1 + q2 ) + ℓ1 cos(q1 )], (29) G2 = m2 ℓc2 g cos(q1 + q2 ), where, ℓ1 , ℓ2 are the lengths of the first and second link, respectively, ℓc1 , ℓc2 are the distances between the rotation center and the center of mass of the first and second link respectively. m1 , m2 are the masses of the first and second link, respectively, I1 is the moment of inertia of the first link and I2 the moment of inertia of the second link, respectively, and g denotes the earth gravitational constant. In our simulations, we assume that the parameters take the following values: I2 = m2 = 5.5 kg, ℓ1 = 1.1 m, ℓ2 = 1.1 m, ℓc1 = 0.5 m, ℓc2 = 0.5 m, I1 = 11 12 5.5 12 kg · m2 , m1 = 10.5 kg, kg · m2 , g = 9.8 m/s2 . The system dynamics (27) can be rewritten as q̈ = H −1 (q)τ − H −1 (q) [C(q, q̇)q̇ + G(q)] . (30) Thus, the nominal controller is given by τn = [C(q, q̇)q̇ + G(q)] + H(q) [q¨d − Kd (q̇ − q˙d ) − Kp (q − qd )] , (31) where qd = [q1d , q2d ]T , denotes the desired trajectory and the diagonal gain matrices Kp > 0, Kd > 0, are chosen such that the linear error dynamics (as in (11)) are asymptotically stable. We choose as output references the P 5th order polynomials q1ref (t) = q2ref (t) = 5i=0 ai (t/tf )i , where the ai ’s have been computed to satisfy the boundary constraints qiref (0) = 0, qiref (tf ) = qf , q̇iref (0) = q̇iref (tf ) = 0, q̈iref (0) = q̈iref (tf ) = 0, i = 1, 2, with tf = 2 sec, qf = 1.5 rad. In these tests, we assume that the nonlinear model (27) is uncertain. In particular, we assume that there exist additive uncertainties in the model (30), i.e., q̈ = H −1 (q)τ − H −1 (q) [C(q, q̇)q̇ + G(q)] − E G(q). (32) Where, E is a matrix of constant uncertain parameters. Following (21), the robust-part of the control writes as τr = −H(B̃ T P zkGk2 − Ê G(q)), where  B̃ T =  0 1 0 0 0 0 0 1 (33)  , P is solution of the Lyapunov equation (13), with  0 1 0 0    −Kp1 −Kd1 0 0 à =    0 0 0 1  0 0 −Kp2 −Kd2     ,    z = [q1 − q1d , q̇1 − q̇1d , q2 − q2d , q̇2 − q̇2d ]T , and Ê is the matrix of the parameters’ estimates. Eventually, the final feedback controller writes as τ = τn + τr . (34) We consider here the challenging case where the uncertain parameters are linearly dependent. In this case the uncertainties’ ‘effect’ is not observable from the measured output (see Remark 4). Indeed, in the case where the uncertainties enter the model in a linearly dependent function, e.g. when the matric ∆ has only one non-zero line, some of the classical available modular model-based adaptive controllers, like for instance X-swapping controllers, cannot be used to estimate all the uncertain parameters simultaneously. For example, it has been shown in [15], that the model-based gradient descent filters failed to estimate simultaneously multiple parameters in the case of the electromagnetic actuators example. For instance, in comparison with the ES-based indirect adaptive controller of [21], the modular approach does not rely on the parameters mutual exhaustive assumption, i.e., each element of the control vector needs to be linearly dependent on at least one element of the uncertainties vector. More specifically, we consider here the following case: ∆(1, 1) = 0.3, ∆(1, 2) = 0.6, and ∆(2, i) = 0, i = 1, 2. In this case, the uncertainties’ effect on the acceleration q̈1 cannot be differentiated, and thus the application of the model-based X-swapping method to estimate the actual values of both uncertainties at the same time is challenging. Similarly, the method of [21], cannot be readily applied because the second control τ2 is not linearly depend on the uncertainties, which only affects τ1 . However, we show next that, by using the modular ISS-based controller, we manage to estimate the actual values of the uncertainties simultaneously and improve the tracking performance. A. MES-based uncertainties estimation b i (i = 1, 2) are computed using a discrete version of (24), given by The estimates of the two parameters ∆ π b xi (k + 1) = xi (k) + ai tf sin(ωi tf k + )J(∆), 2 (35) b i (k + 1) = xi (k + 1) + ai sin(ωi tf k − π ), i = 1, 2 ∆ 2 b i (0) = 0. We choose the following learning cost function where, k ∈ N denotes the iteration index, xi (0) = ∆ R b − qd (t))T Q1 (q(∆) b − qd (t))dt b = tf (q(∆) J(∆) 0 (36) Rt b − q̇d (t))T Q2 (q̇(∆) b − q̇d (t))dt, + 0 f (q̇(∆) where Q1 > 0 and Q2 > 0 denote the weight matrices. We implement the learning parameters: a1 = 0.1, a2 = 0.05, ω1 = 7 rad/sec, ω2 = 5 rad/sec. The obtained performance cost function is displayed on Figure 1(a), where we see that the performance improves over the learning iterations. The corresponding parameters estimation profiles are reported on Figures 1(b), and 1(c), which show a quick convergence of the first estimates ˆ 1 to a neighborhood of the actual value. The convergence of the second estimates ∆ ˆ 2 is slower, which is ∆ expected from the ES algorithms when many parameters are estimated at the same time. One has to underline here, however, that the convergence speed of the estimates and the excursion around their final mean values, can be directly fine-tuned by the proper choice of the learning coefficients ai , ωi , i = 1, 2 in equation (35). Finally, The tracking performance is shown on Figures 2(a), 2(b), where we can see that, after learning the actual values of the uncertainties, the tracking of the desired trajectories is recovered. We only show the first angular trajectories here, because the uncertainties affect directly only the acceleration q̈1 , and their effect on the tracking for the second angular variable is negligible. Cost Function 5 4 3 2 1 0 0 50 100 150 200 250 Number of iterations (a) Cost function over the learning iterations (MES) 1 ˆ1 ∆ 0.5 0 −0.5 0 50 100 150 200 250 Number of iterations (b) Estimate of ∆1 over the learning iterations (MES) 0.4 ˆ2 ∆ 0.2 0 −0.2 −0.4 0 50 100 150 200 250 Number of iterations (c) Estimate of ∆2 over the learning iterations (MES) Fig. 1. Cost function and uncertainties estimates- MES algorithm B. GP UCB-based uncertainties estimation In this section, to show that the modular ISS-based controller is independent of the choice of the learning algorithm, we apply the GP-UCB learning algorithm-based estimator to the same two-links manipulator example. 2 )t We apply the algorithm IV-D, with the following parameters: σ = 0.1, l = 0.2, and βt = 2log( card(D 6δ ′ π2 ), with δ = 0.05. We test the GP-UCB algorithm under the same conditions as in the previous section. The obtained parameters and tracking results are reported on figures 3(a), 3(b), 3(c), 4(a), 4(b). We can see on these figures that similar Desired and Actual q1 [rad] 2 Reference With learning Without learning 1.5 1 0.5 0 −0.5 0 0.5 1 1.5 2 Time [sec] Desired and Actual q̇1 [rad/sec] (a) Obtained vs. desired first angular trajectory (MES) 1.5 1 0.5 0 −0.5 0 0.5 1 1.5 2 Time [sec] (b) Obtained vs. desired first angular velocity trajectory (MES) Fig. 2. Obtained vs. desired trajectories (MES) to the MES-based adaptive controller, the uncertainties are well estimated. One could argue that they are better estimated with the GP-UCB algorithm because there is no permanent dither signal, which leads to permanent oscillations in the MES-based learning. The tracking performance is clearly improved in this case as well, due to the precise estimation of the parameters. 6 Cost Function 5 4 3 2 1 0 50 100 150 200 Number of iterations (a) Cost function over the learning iterations (GP-UCB) 1 0.8 ˆ1 ∆ 0.6 0.4 0.2 0 0 50 100 150 200 Number of iterations (b) Estimate of ∆1 over the learning iterations (GP-UCB) 0.8 ˆ2 ∆ 0.6 0.4 0.2 0 50 100 150 200 Number of iterations (c) Estimate of ∆2 over the learning iterations (GP-UCB) Fig. 3. Cost function and uncertainties estimates- (GP-UCB) algorithm 1.6 Reference With learning Without learning Desired and Actual q1 [rad] 1.4 1.2 1 0.8 0.6 0.4 0.2 0 −0.2 0 0.5 1 1.5 2 Time [sec] (a) Obtained vs. desired first angular trajectory (GP-UCB) 1.6 Desired and Actual q̇1 [rad/sec] 1.4 1.2 1 0.8 0.6 0.4 0.2 Reference With learning Without learning 0 −0.2 0 0.5 1 1.5 2 Time [sec] (b) Obtained vs. desired first angular velocity trajectory (GPU-CB) Fig. 4. Obtained vs. desired trajectories (GPU-CB) VI. C ONCLUSION We have studied the problem of adaptive control for nonlinear systems which are affine in the control with parametric uncertainties. For this class of systems, we have proposed the following controller: We use a modular approach, where we first design a robust nonlinear controller, designed based on the model (assuming knowledge of the uncertain parameters), and then complement this controller with an estimation module to estimate the actual values of the uncertain parameters. This type of modular approaches are certainly not new, e.g., the X-swapping methods. However, the novelty here is that the estimation module that we propose is based on model-free learning algorithms. Indeed, we propose to use two learning algorithms, namely, a multi-parametric extremum seeking algorithm, and a GP-UCB algorithm, to learn in realtime the uncertainties of the model. We call the learning approach ‘model-free’ for the simple reason that it only requires to measure an output signal from the system and compare it to a desired reference signal (independent of the model), to learn the best estimates of the model uncertainties. We have guaranteed the stability (while learning) of the proposed approach, by ensuring that the model-based robust controller, leads to an ISS results, which guarantees boundedness of the states of the closed-loop system, even during the learning phase. The ISS result together with a convergent learning-algorithm eventually leads to a bounded output tracking error, which decreases with the decrease of the estimation error. We believe that, one of the main advantages of the proposed controller, comparatively to the existing model-based adaptive controllers, is that we can learn (estimate) multiple uncertainties at the same time even if they appear in the model equation in a challenging way, e.g., linearly dependent uncertainties affecting only one output, or uncertainties appearing in a nonlinear term of the model, which are well known limitations of the model-based estimation approaches. Another advantage of the proposed approach, is that due to its modular design, one could easily change the learning algorithm without having to change the model-based part of the controller. Indeed, as long as the first part of the controller, i.e., the model-based part, has been designed with a proper ISS property, one can ‘plug into it’ any convergent learning model-free algorithm, as demonstrated here by using two different learning approaches. We reported in this short paper some preliminary results about using GP-UCB in a modular adaptive control setting. In a longer journal version of the work, we will report more detailed comparisons between the MES-based adaptive controller, the GP UCB-based controller (for example in a more realistic noisy environment), and some existing model-based ‘classical’ adaptive controllers, e.g., as found in [1]. R EFERENCES [1] P. Ioannou and J. Sun, Robust Adaptive Control. Dover Publications, 2012. [2] M. Krstic, I. Kanellakopoulos, and P. Kokotovic, Nonlinear and Adpative Control Design. New York: Wiley, 1995. [3] C. Wang, D. J. Hill, S. S. Ge, and G. Chen, “An ISS-modular approach for adaptive neural control of pure-feedback systems,” Automatica, vol. 42, no. 5, pp. 723–731, 2006. [4] M. Benosman and G. Atinc, “Multi-parametric extremum seeking-based learning control for electromagnetic actuators,” in American Control Conference, 2013, pp. 1914–1919. [5] ——, “Nonlinear learning-based adaptive control for electromagnetic actuators,” in European Control Conference, 2013, pp. 2904– 2909. [6] G. Atinc and M. Benosman, “Nonlinear learning-based adaptive control for electromagnetic actuators with proof of stability,” in IEEE, Conference on Decision and Control, 2013, pp. 1277–1282. [7] M. Benosman, “Learning-based adaptive control for nonlinear systems,” in IEEE European Control Conference, 2014. [8] ——, “Extremum-seeking based adaptive control for nonlinear systems,” in IFAC World Congress, 2014. [9] K. A. Wise and E. Lavretsky, “Robust and adaptive control of x-45a j-ucas: A design trade study,” in IFAC World Congress. [10] M. Xia and M. Benosman, “Extremum seeking-based indirect adaptive control for nonlinear systems with time-varying uncertainties,” in European Control Conference, 2015. [11] E. Lavretsky, “Combined/composit model reference adaptive control,” IEEE, Transactions on Automatic Control, vol. 54, no. 11, pp. 2692–2697, 2009. [12] P. Haghi and K. Ariyur, “On the extremum seeking of model reference adaptive control in higher-dimensional systems,” in American Control Conference, 2011, pp. 1176–1181. [13] E. D. Sontag, “Smooth stabilization implies coprime factorization,” Automatic Control, IEEE Transactions on, vol. 34, no. 4, pp. 435–443, 1989. [14] Z.-P. Jiang, A. R. Teel, and L. Praly, “Small-gain theorem for ISS systems and applications,” Mathematics of Control, Signals and Systems, vol. 7, no. 2, pp. 95–120, 1994. [15] M. Benosman and G. Atinc, “Non-linear adaptive control for electromagnetic actuators,” IET Control Theory and Applications, vol. 9, no. 2, pp. 258–269, 2015. [16] K. B. Ariyur and M. Krstic, Real Time Optimization by Extremum Seeking Control. New York, NY, USA: John Wiley & Sons, Inc., 2003. [17] M. Rotea, “Analysis of multivariable extremum seeking algorithms,” in American Control Conference, 2000. Proceedings of the 2000, vol. 1, no. 6, Sep 2000, pp. 433–437. [18] M. Krstic and H.-H. Wang, “Stability of extremum seeking feedback for general nonlinear dynamic systems,” Automatica, vol. 36. [19] A. R. Teel and D. Popovic, “Solving smooth and nonsmooth multivariable extremum seeking problems by the methods of nonlinear programming,” in American Control Conference, 2001. Proceedings of the 2001, vol. 3. IEEE, 2001, pp. 2394–2399. [20] N. Srinivas, A. Krause, S. M. Kakade, and M. Seeger, “Gaussian process optimization in the bandit setting: No regret and experimental design,” in Proceedings of the 27th International Conference on Machine Learning (ICML), 2010. [21] P. Haghi and K. Ariyur, “Adpative feedback linearization of nonlinear MIMO systems using ES-MRAC,” in American Control Conference, 2013, pp. 1828–1833. [22] M. Benosman and G. Atinc, “Model-based learning control,” Mitsubishi Electric Research Laboratories (MERL), Patent 20130304236, May 2012. [23] M. Benosman, Control Theory: Perspectives, Applications and Developments, 2015, ch. Extremum Seeking-based Indirect Adaptive Control and Feedback Gains Auto-Tuning for Nonlinear Systems. [24] H. Khalil, Nonlinear Systems, 3rd ed. Prentice Hall, 2002. [25] M. Malisoff and F. Mazenc, “Further remarks on strict input-to-state stable lyapunov functions for time-varying systems,” Automatica, vol. 41, no. 11, pp. 1973 – 1978, 2005. [26] M. Benosman, F. Liao, K.-Y. Lum, and J. L. Wang, “Nonlinear control allocation for non-minimum phase systems,” Control Systems Technology, IEEE Transactions on, vol. 17, no. 2, pp. 394–404, March 2009. [27] H. Elmali and N. Olgac, “Robust output tracking control of nonlinear mimo systems via sliding mode technique,” Automatica, vol. 28, no. 1, pp. 145–151, 1992. [28] M. Benosman and G. Atinc, “Nonlinear backstepping learning-based adaptive control of electromagnetic actuators,” International Journal of Control, vol. 88, no. 3, pp. 517–530, 2014. [29] N. Srinivas, A. Krause, S. M. Kakade, and M. Seeger, “Information-theoretic regret bounds for gaussian process optimization in the bandit setting,” IEEE Transactions on Information Theory, vol. 58, no. 5, pp. 3250–3265, 2012. [30] E. Brochu, V. M. Cora, and N. de Freitas, “A tutorial on bayesian optimization of expensive cost functions, with application to active user modeling and hierarchical reinforcement learning,” arXiv:1012.2599, 2010. [31] P. Auer, N. Cesa-Bianchi, and P. Fischer, “Finite-time analysis of the multiarmed bandit problem,” Machine learning, vol. 47, no. 2-3, pp. 235–256, 2002. [32] S. Bubeck, R. Munos, G. Stoltz, and Cs. Szepesvári, “X-armed bandits,” Journal of Machine Learning Research (JMLR), vol. 12, no. 1655–1695, 2011. [33] S. Bubeck and N. Cesa-Bianchi, “Regret analysis of stochastic and nonstochastic multi-armed bandit problems,” Foundations and Trends in Machine Learning, vol. 5, no. 1, pp. 1–122, 2012. [34] R. Munos, “From bandits to Monte-Carlo Tree Search: The optimistic principle applied to optimization and planning,” Foundations and Trends in Machine Learning, vol. 7(1), pp. 1–130, 2014. [35] C. E. Rasmussen and C. K. I. Williams, Gaussian Processes for Machine Learning. MIT Press, 2006. [36] M. Benosman, “Nonlinear learning-based adaptive control for electromagnetic actuators,” in IEEE European Control Conference, 2013, pp. 2904–2909. [37] M. Krstic, I. Kanellakopoulos, and P. V. Kokotovic, Nonlinear and adaptive control design. Wiley, 1995. [38] M. W. Spong, “On the robust control of robot manipulators,” Automatic Control, IEEE Transactions on, vol. 37, no. 11, pp. 1782– 2786, 1992.
3cs.SY
Noname manuscript No. (will be inserted by the editor) Adaptive group LASSO selection in quantile models arXiv:1601.08065v2 [math.ST] 13 Jul 2016 GABRIELA CIUPERCA Received: date / Accepted: date Abstract The paper considers a linear model with grouped explanatory variables. If the model errors are not with zero mean and bounded variance or if model contains outliers, then the least squares framework is not appropriate. Thus, the quantile regression is an interesting alternative. In order to automatically select the relevant variable groups, we propose and study here the adaptive group LASSO quantile estimator. We establish the sparsity and asymptotic normality of the proposed estimator in two cases: fixed number and divergent number of variable groups. Numerical study by Monte Carlo simulations confirms the theoretical results and illustrates the performance of the proposed estimator. Keywords group selection · quantile model · adaptive LASSO · selection consistency · oracle properties. Mathematics Subject Classification (2010) 62J05 · 62J07 1 Introduction Classically, for the regression model, the errors are assumed to be independent, of mean zero and bounded variance. Then, the model is estimated by the least squares (LS) method, eventually with a penalty of LASSO type when automatic detection of significant variables is performed. If the assumptions on the first two moments of the model error are not satisfied, then the LS framework breaks down. In this case, an alternative is to consider the quantile regression with a LASSO type penalty. This is one of the interests of this paper. The quantile regression is robust and allows relaxation of the two first moment conditions of the model error. Often enough in practice, for example in the variance analysis case, are considered the regression linear models with grouped variables. For models with grouped explanatory variables it is more meaningful to identify relevant variable groups instead of individual variables. If the errors have GABRIELA CIUPERCA Université de Lyon, Université Lyon 1, CNRS, UMR 5208, Institut Camille Jordan, Bat. Braconnier, 43, blvd du 11 novembre 1918, F - 69622 Villeurbanne Cedex, France, E-mail: [email protected] tel: 33(0)4.26.23.45.57, fax: 33(0)4.72.43.16.87 2 GABRIELA CIUPERCA Normal distribution, then for detecting the relevant variable groups, the F-statistic test is used. If the errors are not Gaussian and if more the number of groups is large, then the F-statistic test is inappropriate. From where, another interest of this paper: we consider the quantile process with LASSO type penalty in order to automatically detect the irrelevant variable groups. The automatic selection method of the grouped variables using the LASSO penalties was introduced by Yuan and Lin (2008) for gaussian errors, by proposing the LASSO group penalty for the process of the error squares sum. Several recent papers have considered group selection using LASSO type penalties. For fixed parameter space and mean zero, finite second moment i.i.d. model errors, Nardi and Rinaldo (2008) established the model selection consistency and asymptotic normality of nonzero group LASSO estimator. The same estimator is studied by Nardi and Rinaldo (2008) when number of covariates is larger, for particular case of normal errors. For gaussian errors, Xu and Ghosh (2015) realize a Bayesian variable selection by penalization of the error squares sum with Bayesian group LASSO. For this estimation method, the posterior median estimator satisfies the sparsity property. The adaptive group LASSO estimators, when the number p of groups is fixed, was studied by Wang and Leng (2008). For high-dimensional model, Wei and Huang (2010) studied the selection and estimation properties of the adaptive group LASSO, but under assumption that the errors are gaussian. Still for the error squares sum penalized with adaptive LASSO penalty, Zhang and Xiang (2015) consider the case of the number of groups pn converges to infinity when n → ∞, for i.i.d. errors ε such that IE[ε] = 0 and V ar[ε] < ∞. The consistency and asymptotic normality of the parameter estimator are established. A paper that doesn’t consider the LS penalized process, but a process associated to a twice differentiable convex function, with LASSO penalty, for the case p large and small n was considered by Wang et al. (2015). When the number of groups can grow at a certain polynomial rate, the automatic selection property of variable groups for a LS process with SCAD penalty has been proven in Guo et al. (2015). Automatic selection of the relevant variable groups, when p converges to infinity, has also considered by Zou and Zhang (2009) penalizing the LS process with adaptive elastic-net penalty. For a review of group selection methods and several applications of these methods the reader can see Huang et al. (2012). In this paper we consider the model selection problem and the estimation in a linear model with p groups of explanatory variables. We propose and study the asymptotic properties of the adaptive group LASSO quantile estimator in two cases: p fixed and p → ∞ as n → ∞. This estimator is the minimizer of the quantile process penalized by an adaptive group LASSO penalty. The oracle properties, i.e. the automatic selection of significant variables groups and their asymptotic distribution, are proved. The remainder of the paper is organized as follows. In Section 2 we present the model and introduce some notations used throughout in this paper. Oracle properties for the adaptive group LASSO quantile estimator are proved for p fixed in Section 3 and for p → ∞ as n → ∞ in Section 4. Section 5 reports some simulation results which illustrate the method interest. We compare the adaptive group LASSO quantile estimation performance with the adaptive group LASSO least squares estimations, proposed by Zhang and Xiang (2015). All proofs are given in Section 6. 2 Model and notations In this section, we present the statistical model and we also introduce some notations used throughout in the paper. We begin by introducing some general notations. All vectors and matrices are denoted by bold symbols and all vectors are written as column vectors. For a vector v, we denote by vt its transposed Adaptive group LASSO selection in quantile models L 3 P and by kvk its Euclidean norm. Notations −→ , −→ represent the convergence in distribution and n→∞ n→∞ in probability, respectively, as n → ∞. For a positive definite matrix M, we denote by λmin (M) and λmax (M) its the smallest and largest eigenvalues, respectively. We will also use the following notations: if Vn and Un are random variable sequences, Vn = oIP (Un ) means that limn→∞ IP [|Un /Vn | > e] = 0 for any e > 0, Vn = OIP (Un ) means that there exists a finite C > 0 such that IP [|Un /Vn | > C] < e for any n and e. If Vn and Un are deterministic sequences, Vn = o(Un ) means that the sequence Vn /Un → 0 for n → ∞, Vn = O(Un ) means that the sequence Vn /Un is bounded for sufficiently large n. Throughout this paper, C will denote generic constant; not depending on size n which may take different values in different formula or even in different parts of the same formula. The value of C is not of interest. We will also use the notation 0k for the zero k-vector. We consider the following linear model with p groups of explanatory variables: Yi = p X Xtij β j + εi = Xti β + εi , j=1 i = 1, · · · , n, (1) with Yi , εi random variables. For each group j = 1, · · · , p, the vector of the parameters is βj ≡ (βj1 , · · · , βjdj ) ∈ Rdj and the design for observation i is Xij , a column vector of size dj . The vector with all coefficients is β ≡ (β 1 , · · · , βp ) and for observation i, the vector with all explanatory 0 0 variables is Xi = (Xi1 , · · · , Xip ). Denote by β0j = (βj1 , · · · , βjd ) the true value (unknown) of the j parameter β j . For observation i, we denote by Xij,k the kth variable of the jth group. We emphasize that for the ith sample, we observe (Yi , Xi ), i = 1, · · · , n. The relevant groups of explanatory variables correspond to the nonzero vectors. Without loss of generality, on suppose that the first p0 (p0 ≤ p) groups of explanatory variables are relevant: kβ0j k 6= 0, for all j ≤ p0 and kβ0j k = 0, for all j > p0 , P where k.k is the Euclidean norm. Let r be the total number of explanatory variables, so r = pj=1 dj . P 0 We denote by r0 = pj=1 dj . So, p0 is the number of nonzero true parameter vectors and r0 is the total number of parameters in these nonzero true vectors. The multi-factor ANOVA model is an example of this model. We introduce now the quantile framework. For a fixed quantile index τ ∈ (0, 1), the check function ρτ (.) : R → R+ is defined by ρτ (u) = u(τ − 11u<0 ). The quantile estimator of β, is the minimizer of the quantile process associated to model (1): e ≡ arg min β n β∈Rr n X i=1 ρτ (Yi − Xti β). (2) For the particular case τ = 1/2 we obtain the median regression and (2) becomes the least absolute deviations estimator. A great advantage of the quantile framework is that, compared to classical estimation methods that are sensitive to outliers, the quantile method provides more robust estimators. Moreover, the required assumptions to the error moments are relaxed. e = (β e ,β e ,··· ,β e ) has as dj -subvector β e The estimator β n n;1 n;2 n;p n;j for each group j = 1, · · · , p. The quantile estimation method doesn’t perform automatic variable selection. For finding the zero 4 GABRIELA CIUPERCA vectors, i.e. the irrelevant groups of variables, hypothesis tests are required. However when model (1) has a large group number p, it is useful to estimate simultaneously the parameter groups and to eliminate the irrelevant groups without crossing every time by a hypothesis test. The adaptive LASSO penalties have the advantage of automatic selection and of parameter estimation (see for example Zhang and Xiang (2015), Wei and Huang (2010), Wang and Leng (2008)). In order to introduce and study the adaptive LASSO estimator, we consider the following index set A ≡ {j; kβ0j k 6= 0} = {1, · · · , p0 } and Ac ≡ {j; kβ0j k = 0} = {p0 + 1, · · · , p} its complementary set. The set A contains the index set corresponding to groups with nonzero true parameters. For β a r-vector of parameters, we denote by βA the r0 -subvector of β which contains βj , for j = 1, · · · , p0 . Similarly, the (r − r0 )-vector β Ac contains βj for j = p0 + 1, · · · , p. In practice, the set A is unknown. Then, we must find the set A and estimate the corresponding parameters. b ∗ , which minimizes the quantile In Sections 3 and 4 we will introduce an estimator, denoted β n process penalized with an adaptive group LASSO penalty, for two cases: p fixed and p → ∞ as n → ∞. We generalize the adaptive LASSO quantile estimator proposed by Ciuperca (2016) for individual variable selection to the case of group selection. We call this estimator, adaptive group LASSO quantile (ag LASSO Q ) estimator. b ∗ satisfies the oracle properties if: We say that β n √ b∗ 0 (i) asymptotic normality: n(β n − β )A converges in law to a centred Normal distribution. b ∗ k 6= 0d }] = 1. (ii) sparsity property: limn→∞ P[A = {j = 1, · · · , p; kβ j n;j 3 Fixed p case In this section we propose and study the asymptotic properties of the ag LASSO Q estimator for the parameter β of model (1) when the group number p is fixed. We define the ag LASSO Q estimator by: b ∗ ≡ arg min Q(β), β n β∈Rr where Q(β) is the penalized quantile process with the adaptive group LASSO penalty: Q(β) ≡ n X i=1 ρτ (Yi − p X j=1 Xtij β j ) + µn p X j=1 ω bn;j kβj k, (3) e k−γ , γ > 0. The estimator β b ∗ is written as β b ∗ = (β b∗ , · · · , β b ∗ ) and with the weight ω bn;j ≡ kβ n;j n n n;1 n;p b ∗ is a subvector of size dj , for j = 1, · · · , p. β n;j For a particular case of a quantile model with non-grouped variables, dj = 1 for all j = 1, · · · , p, we obtain the adaptive LASSO quantile estimator proposed and studied by Ciuperca (2016). Adaptive group LASSO selection in quantile models 5 b ∗ in the fixed p case, we give the required assumptions. Before presenting the main results for β n The tuning parameter µn and the constant γ are such that, for n → ∞, µn µn → ∞, √ → 0, n(γ−1)/2 µn → ∞. (4) n For the design (Xi )16i6n we consider theP following assumption: n (A1) n−1 max1≤i≤n Xti Xi −→ 0 and n−1 i=1 Xi Xti −→ Υ, with Υ a r × r positive definite matrix. n→∞ n→∞ For the errors εi we suppose that: (A2) (εi )16i6n are independent, identically distributed, with F : B → [0, 1] the distribution function and a continuous positive density f in a neighborhood of 0. The τ th quantile of εi is zero: τ = F (0). Moreover, for every e ∈ int(B), 1r ∈ Rr we have n Z xti 1r X √ √ 1 n[F (e + v/ n) − F (e)]dv = f (e)1tr Υ1r , (5) lim n−1 n→∞ 2 i=1 0 where 1r is the r-vector with all components 1. The set B is a real set, with 0 ∈ B. Assumption (A1) is standard for LASSO methods and (A2) is classic for quantile regression (see Ciuperca (2016), Koenker (2005), Zou and Yuan (2008), Wu and Liu (2009)). Assumption (A1) requests that the design matrix has a reasonable good behaviour. For the tuning parameter µn , the same conditions on (4) are required in Ciuperca (2016) for adaptive LASSO quantile model but with ungrouped explanatory variables. We make the remark that for ANOVA model, since in the analysis of variance there is a constraint for each level of a factor, we consider as constraint that the effect of this level is zero. Then this zero level is not considered in the model in order that assumption (A1) is satisfied. b ∗ , let us consider the index set In order to study the asymptotic properties of the estimator β n of the groups selected by the adaptive group LASSO quantile method: b∗c its complementary set. and A n b ∗ k 6= 0} Ab∗n ≡ {j ∈ {1, · · · , p}; kβ n;j The following Theorem shows that the ag LASSO Q estimators with the index in the set A are asymptotically Gaussian. Then, the estimators of the nonzero parameter vectors have the same asymptotic distribution they would have if the zero parameter vectors were known. √ b∗ L 0 Theorem 1 Under assumptions (A1), (A2) and condition (4), we have n(β n − β )A −→ n→∞  −1 N 0r0 , τ (1 − τ )f −2 (0)ΥA , with P ΥA the submatrix of Υ with the row and column indices in p0 dj }. {1, · · · , d1 , d1 + 1, · · · , d1 + d2 , · · · , j=1 We give now the Karush-Kuhn-Tucker(KKT) optimality conditions, needed to prove the sparsity b∗ . property for β n For all j ∈ Ab∗n , we have, with probability one, the following dj equalities τ n X i=1 Xij − n X i=1 Xij 11Yi <Xt βb ∗ i n b∗ µn ω bn;j β n;j = . ∗ b k kβ n;j (6) 6 GABRIELA CIUPERCA For all j 6∈ Ab∗n , for all k = 1, · · · , dj we have, with probability one, the following inequality τ n X i=1 Xij,k − n X i=1 Xij,k 11Yi <Xt βb ∗ ≤ µn ω bn;j . i n (7) The following theorem shows the sparsity property of the ag LASSO Q estimator. This result states that the adaptive group LASSO quantile estimators of the nonzero parameter vectors are exactly nonzero with a probability converging to one when n diverges to infinity. Theorem 2 Under the assumptions of Theorem 1 and under the condition nγ/2−1 λn → ∞, as n → ∞, we have limn→∞ P[Ab∗n = A] = 1. Theorem 1 and Theorem 2 establish the asymptotic normality and the sparsity of the ag LASSO Q estimator, which means that this estimator still share the oracle properties in the case of fixed p. Remark 1 For the weight ω bn;j associated to the jth group, we considered the quantile estimator norm to the power −γ. In view of the proofs of Theorem 1 and Theorem 2, these two theorems −1/2 e remain true also when β , under n;j is replaced by any estimator of β j , with convergence rate n assumptions (A1), (A2). 4 The case of p depending on n Consider now same model (1) with grouped variables, but with the number p of groups depending on n: p = pn and pn → ∞ as n → ∞. More precisely, we consider pn = O(nc ), with the P constant c ∈ (0, 1). For readability, we keep the notation p instead of pn . Similarly, we have r = pj=1 dj , with r depending on n. Always for simplicity of notation, for the design Xi , for the parameter β, ever if their dimension depends on n, we do not put subscript n. f of β. Afterwards, we will We will first find the convergence rate of the quantile estimator β n propose for β an adaptive group LASSO quantile estimator. Even though the number p diverges as n → ∞, this estimator keeps the oracle properties. Since the design size depends on n, we need reconsider the assumptions on Xi . Then, let us consider the following assumptions for the errors (εi ), design (Xi ) and for the number p of groups: (A3) (εi )1≤i≤n are i.i.d. Let F be the distribution function and f be the density function of (εi ). The density function f is continuously, strictly positive in a neighbourhood of zero and has a bounded first derivative in the neighbourhood of 0. The τ th quantile of εi is zero: τ = F (0). P (A4) There constants 0 < m0 ≤ M0 < ∞, such that m0 ≤ λmin (n−1 ni=1 Xi Xti ) ≤ Pnexist two −1 t λmax (n i=1 Xi Xi ) ≤ M0 . 1/2 (A5) (p/n) max16i6n kXi k → 0, as n → ∞. (A6) p is such that p = O(nc ), with 0 < c < 1. Since p → ∞, condition (5) of assumption (A2) for the case p fixed is now replaced by f ′ bounded in the neighborhood of 0. This assumption also been considered for always high-dimensional quantile model, with seamless L0 penalty by Ciuperca (2015). In Ciuperca (2015), assumptions (A4) and (A5) are also required. Assumption (A6) was considered by Zhang and Xiang (2015) for an highdimensional linear model where the objective function is the error squares sum, penalized with Adaptive group LASSO selection in quantile models 7 an adaptive group LASSO penalty. Assumptions (A4), (A5), (A6) are also required for an highdimensional linear model by Zou and Zhang (2009), which penalize the LS process with adaptive elastic-net penalty. In respect to the case p fixed, assumptions (A4) and (A5) are the similar of (A1). We will start by finding the convergence rate of quantile estimator (2) in the case p → ∞ as n → ∞. For this, consider the quantile process: Gn (β) ≡ n X i=1 ρτ (Yi − Xti β). For the quantile estimator existence, we assume that the total number r of parameters is strictly less than n. e is of We recall that in the case p fixed, the convergence rate of the quantile estimator β n −1/2 order n (see for example Koenker (2005)). We will show that, the quantile estimator has the convergence of order (p/n)1/2 , when the explanatory group variable number diverges with the e depends only of p and sample size. In view of the proof of Lemma 1, the convergence rate of β n not of total number r of parameters, thanks to assumption (A5). One needs the convergence rate of the quantile estimator is necessary for studying the asymptotic behaviour of the penalty which intervenes in adaptive group LASSO quantile process. pp e − β 0 k = OP Lemma 1 Under assumptions (A3)-(A6), we have kβ n n . Consider now the following adaptive group LASSO quantile (ag LASSO Q ) estimator:   p X ∗ 1 b ≡ arg min  Gn (β) + λn ω bn;j kβj k , β n n β∈Rd j=1 where λn is a tuning parameter (positive) and the weights of the LASSO penalty are ω bn;j ≡ e k−γ , with γ > 0. The relation between the tuning parameter µn of relation (3) for the case kβ n;j p fixed and λn for the case p depending on n is λn = µn /n. We prefer to consider these forms as tuning parameter and as objective process, for having a similarity with the adaptive group LASSO LS (ag LASSO LS ) case considered by Zhang and Xiang (2015). b ∗ we need to impose an additional condition on In order to study the asymptotic normality of β n the total number of nonzero parameters. More precisely, r0 it is assumed to be the same order as p0 . This is for controlling the penalty, so that it is smaller than the quantile process. Concerning the size of the nonzero parameter vectors, we take the following assumption: (A7) r0 = O(p0 ). For the smallest nonzero vector norm and on constant c of assumption (A6) we assume: (A8) Let us denote h0 ≡ min16j6p0 kβ0j k. There exists a constant M > 0 such that M ≤ n−α h0 and α > (c − 1)/2. These two assumptions were also found in the paper Zhang and Xiang (2015), for ag LASSO LS method in high-dimensional linear model, but with a supplementary condition for r: r = O(p). Here, we do not need this requirement, since assumption (A5) is imposed. On the other hand, in 8 GABRIELA CIUPERCA Zhang and Xiang (2015), instead of assumption (A5) the condition n−1/2 max16i6n kXi,A k2 → 0, as n → ∞, is required. The following theorem gives the convergence rate of the ag LASSO Q estimator when p → ∞. We obtain the same convergence rate that of quantile estimator when group number diverges. This convergence rate is also obtained by Zhang and Xiang (2015) for the ag LASSO LS estimator, but for errors (ε)16i6n with mean zero and bounded variance. Theorem 3 Under assumptions (A3)-(A6), (A8) and the tuning parameter (λn )n∈N satisfying pp b ∗ − β 0 k = OP λn n(1+c)/2−αγ → 0, as n → ∞, we have kβ n n . The following theorem shows the oracle properties for ag LASSO Q estimator when the number p of groups diverges. We denote by Xi,A a r0 -vector which contains the sub-vectors Xi,j , for j ∈ {1, · · · , p0 }. Theorem 4 Suppose that assumptions (A3)-(A6), (A8) are satisfied and also that the tuning pa(1−c)(1+γ)/2 rameter → ∞, λn n(c+1)/2−αγ → 0, as n → ∞. Then: h satisfies i λn n ∗ (i) P Abn = A → 1, for n → ∞. (ii) If moreover assumption (A7) holds, then, for any vector u of size r0 such that kuk = 1, with Pn ∗ √ L −1/2 t b notation Υn,A ≡ n−1 i=1 Xi,A Xti,A , we have n(ut Υ−1 u (β n − β0 )A −→ N 0, τ (1 − n,A u) n→∞  τ )f −2 (0) . For the tuning parameter λn , the same conditions are required in Zhang and Xiang (2015) such that, the ag LASSO LS estimator in an high-dimensional linear model satisfies the oracle properties. e k−γ , with β e Remark 2 As for the case p fixed, we considered the weight ω bn;j = kβ n;j n;j the quantile estimator of the dj -vector β j , for any j = 1, · · · , p. In view of the proof of Theorem 4, the oracle 1/2 e properties for ag LASSO Q estimator remain true also when β n;j is replaced by any (p/n) estimator of β j , under assumptions (A3)-(A6). Remark 3 If h0 , defined in assumption (A8), doesn’t depend on n, then α = 0. In this case, the conditions required on (λn )n∈N in Theorem 3 imply γ > 2c/(1 − c), and then γ can take values in the interval (0, ∞). The value of γ increase with that of c ∈ (0, 1). For example, if c = 1/2 then γ > 2. 5 Simulations In order to evaluate the performance of the proposed estimation method, Monte Carlo simulations are realized in this section. To assess this performance we compare the ag LASSO Q and ag LASSO LS estimation methods. The design Xi is generated in the same way as in paper Wei and Huang (2010): X = (X1 , · · · , Xp ), with the group explanatory variables Xj = (X5(j−1)+1 , · · · , X5j ), for all j = 1, · · · , p. We first generate r = 5p independent random variables R1 , · · · , Rr of standard normal distribution. We Adaptive group LASSO selection in quantile models 9 also generate the variables Zj of multivariate normal distribution with mean zero and covariance Cov(Zj1 , Zj2 ) = 0.9|j1 −j2 | . Finally, the variables X1 , · · · , Xr are generated as: X5(j−1)+k = Zj + R5(j−1)+k √ , 2 1 ≤ j ≤ p, 1 ≤ k ≤ 5. Two model errors are considered: Normal N (0, 32 ) and Cauchy C(0, 32 ). For the parameters we take: β01 = (0.5, 1, 1.5, 1, 0.5), β02 = (1, 1, 1, 1, 1), β03 = (−1, 0, 1, 2, 1.5), β04 = (−1.5, 1, 0.5, 0.5, 0.5) and all other parameters are zero vectors. The nonzero vectors were also considered in Example 2 of Wei and Huang (2010) for errors N (0, 32 ), p = 10, when the parameters were estimated by LS method with adaptive group LASSO penalty. The constant c of assumption (A6) is c = 0.43. Then, we will consider the following value couples for n and p: (30, 5), (60, 5), (60, 10), (100, 10), (200, 10), (400, 15), (1000, 25) and (1000, 100). On hand, p0 will always be equal to 4. The response variable Y is generated as: Yi = Pp the tother 0 j=1 Xij β j + εi , for i = 1, · · · , n. We will compare the obtained results by the adaptive group LASSO quantile method, proposed in this paper, with those obtained by the adaptive group LASSO LS method, proposed by Wei and Huang (2010), Zhang and Xiang (2015). For simulations, we used the R language. After a scale transformation, we can use the group LASSO methods instead of the adaptive LASSO group methods. Then, in order to calculate the adaptive group LASSO LS estimations we have used the function grpreg of package grpreg, the tuning parameter being chosen on a value grid, using the AIC criterion. In order to calculate the adaptive group LASSO quantile estimations, we have used the function groupQICD of package rqPen and the tuning parameter varies on a value grid. For each considered case, 1000 Monte Carlo replications was made. In Table 1 we give how the two estimation methods identify the parameter vectors (zero or nonzero), for the part that contains the four nonzero parameter vectors β0j , j = 1, · · · , 4, and for the part with p − 4 zero vectors. We present the minimum, three quartiles (Q1, median, Q3), the mean and the maximum of the number of nonzero vectors (j = 1, · · · , 4), respectively, zero (j = 5, · · · , p), found by the two estimation methods. For n large (equal to 100, 200, 400, 1000), we observe that for errors of N (0, 32 ) law, the two estimation methods well identify the zero and nonzero parameter vectors. However, for Cauchy errors, the ag LASSO LS method poorly identifies nonzero vectors (the group of the four significant variables). The zero vectors are very well identified by the two methods. For n small (equal to 30 or 60), the two estimation methods well identify the four relevant variable groups, that errors are Normal or Cauchy (except for ag LASSO Q, in the case n = 60, p = 5, ε ∼ C(0, 32 )). However, the (p − 4) irrelevant variable groups are not well identified by the ag LASSO LS method. Conclusion For gaussian errors, the ag LASSO LS method identifies well the two (relevant and irrelevant) variable groups for n large. For n small, the irrelevant variable groups are not well identified. For Cauchy errors, this method, either does not identify the relevant variable groups or irrelevant variable groups, regardless of the value n. Then, for Cauchy errors, the ag LASSO LS estimations do not have the sparsity property. 10 GABRIELA CIUPERCA The ag LASSO Q method, for the two types of errors, identifies the two variable groups (significant and irrelevant), the precision increasing with n. Then, the ag LASSO Q estimations have the sparsity property. We conclude then that the simulations confirm the theoretical results for the ag LASSO Q estimators. 6 Proofs In this section we provide the proofs of all results presented in Sections 3 and 4. 6.1 Proofs for results of Section 3 Proof of Theorem 1. The proof is similar to that of Theorem 4.1 of Zou and Yuan (2008). √ b∗ √ 0 b n , and in general n(β − β 0 ) ≡ u ≡ (u1 , · · · , up ), with uj = We denote n(β n − β ) ≡ u (uj,1 , · · · , uj,dj ), for j = 1, · · · , p. Since Yi = Xti β 0 + εi , then Yi − Xti β = Xti u √ n + εi . Let us consider the following random variables Di ≡ (1 − τ )11εi <0 − τ 11εi ≥0 , n 1 X Di , vn ≡ √ n i=1 √ n Z Xti u/ n X Bn (u) ≡ [11εi <t − 11εi <0 ]dt i=1 and the random vector (8) 0 n 1 X Xi Di . zn ≡ √ n i=1 Obviously, IE[Di ] = 0 et IE[zn ] = 0r . By the CLT, using assumptions (A1) and (A2), we have L zn −→ N (0r , τ (1 − τ )Υ), n→∞ L vn −→ N (0, τ (1 − τ )). n→∞ (9) b n is the minimizer of the following random process: The vector u Ln (u) ≡ p n X X     Xt u  uj ρτ εi − √i − ρτ (εi ) + µn ω bn;j β0j + √ − kβ 0j k , n n i=1 j=1 which can be written under the following form: Ln (u) = [ztn u + Bn (u)] + µn p X j=1 ω bn;j  √  n uj β 0j + √ − kβ0j k √ . n n (10) We first study the last sum of the right hand side of (10). For all j ≤ p0 (thus kβ0j k 6= 0) we have, since the quantile estimators are consistent: P ω bn;j −→ kβ0j k−γ 6= 0 n→∞ (11) 30 5 60 5 60 10 100 10 200 10 400 15 1000 25 100 ε C N C N C N C N C N C N C N C N min LS Q 0 0 4 3 0 1 4 3 0 0 4 3 0 3 4 3 0 3 4 3 0 3 4 3 0 4 4 4 0 3 4 3 Q1 LS 4 4 0 4 4 4 0 4 0 4 0 4 0 4 0 4 nonzero true parameter vectors Q2 mean Q3 Q LS Q LS Q LS 3 4 3 3.5 3.3 4 4 4 4 4 3.8 4 3 1 4 1.3 3.6 4 4 4 4 4 3.9 4 3 4 4 3.4 3.5 4 4 4 4 4 3.9 4 4 0 4 0.9 3.9 1 4 4 4 4 3.9 4 3 0 4 0.5 3.7 1 4 4 4 4 3.9 4 3 0 4 0.4 3.6 11 4 4 4 4 3.99 4 4 0 4 0.5 4 1 4 4 4 4 4 4 3 0 4 0.3 3.5 0 4 4 4 4 3.98 4 Q 4 4 4 4 4 4 4 4 4 4 0 4 4 4 4 4 max LS Q 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 3 4 4 4 true 1 1 1 1 6 6 6 6 6 6 4 11 21 21 96 96 min LS Q 0 0 0 0 0 0 0 0 0 2 0 1 0 2 0 1 0 2 0 3 8 10 0 9 19 19 17 20 94 96 92 95 Q1 LS 0 0 0 0 0 0 5 0 6 0 11 9 21 20 96 95 zero true parameter vectors Q2 mean Q LS Q LS Q 0 0 1 0.1 0.7 0 0 1 0.01 0.5 1 1 1 0.7 0.8 0 0 1 0.1 0.7 5 0 5 0.8 5.2 4 0 4 0.06 4.3 4 6 5 5 5 4 0 5 2 4.4 6 6 6 5.7 5.7 5 4 6 3.1 5.5 11 11 11 10.8 10.9 11 10 11 9.3 10.8 21 21 21 20.8 20.7 21 21 21 20.3 20.9 96 96 96 95.8 96 96 96 96 95.4 96 Q3 LS 0 0 1 0 0 0 6 5 6 6 11 11 21 21 96 96 Q 1 1 1 1 6 5 6 5 6 6 11 11 21 21 96 96 max LS Q 1 1 1 1 1 1 1 1 6 6 6 6 6 6 6 6 6 6 6 6 11 11 11 11 21 21 21 21 96 96 96 96 Adaptive group LASSO selection in quantile models p 11 Table 1 Model selection results by ag LASSO Q and ag LASSO LS methods for p0 = 4, c = 0.43, errors N (0, 32 ) or C(0, 32 ). n 12 GABRIELA CIUPERCA and by elementary calculus  utj β 0j √  0 n kβ j + n−1/2 uj k − kβ 0j k −→ . n→∞ kβ 0 k j (12) Then, using condition µn n−1/2 → 0, when n → ∞, taking into account relations (11) and (12), by Slutsky’s Lemma, we have: µn p0 X j=1   P ω bn;j kβ0j + n−1/2 uj k − kβ0j k −→ 0. For j > p0 , we have β 0j = 0dj . Then: assumption n (γ−1)/2 (13) n→∞  √  0 P n kβj + n−1/2 uj k − kβ0j k = kuj k. Since ω bn;j −→ ∞, by µn → ∞, we have n n→∞ −1/2 P µn ω bn;j −→ ∞. Thus n→∞  √  P n 0, if uj = 0dj µn ω bn,j √ kβ0j + n−1/2 uj k − kβ0j k −→ ∞, if kuj k = 6 0. n→∞ n (14) Then, taking into account relations (13) and (14), we have the following result for the third term of the right hand side of (10): µn p X j=1 with ω bn;j  √ p  n P X uj W (β0j , u), − kβ0j k √ −→ β 0j + √ n n n→∞ j=1 (15)  0  0, if β j 6= 0dj W (β 0j , u) ≡ 0, if β 0j = 0dj and uj = 0dj  ∞, if β 0j = 0dj and uj 6= 0dj . On the other hand, by the two results of (9), we have for the first two terms of the right hand side of (10), with z a random d-vector of law N (0d , τ (1 − τ )Υ), that L ztn u −→ zt u, n→∞ P Bn (u) −→ n→∞ 1 f (0)ut Υu. 2 Taking into account these last two results and relation (15), then, Ln (u) of relation (10) has an asymptotic distribution: p X 1 L W (β 0j , u). Ln (u) −→ zt u + f (0)ut Υu + n→∞ 2 j=1 b n = (b b 2n ), where u b 1n Let us denote u =P (u1 , u2 ) with u1 of size r0 , u2 of size r − r0 and u u1n , u p0 0 b n = arg minu∈Rr Ln (u), we obtain that contains the first j=1 dj = r elements of u. Since u P L b 1n −→ N (0r0 , τ (1 − τ )f −2 (0)Υ−1 b 2n −→ 0r−r0 et u u A ). n→∞ n→∞  Adaptive group LASSO selection in quantile models 13 √ b∗ L 0 Proof of Theorem 2. By Theorem 1, for all j ∈ A we have that n(β n;j − β j ) −→ N (0dj , τ (1 − −2 τ )f (0)ΥAj ) as n → ∞. The square matrix ΥAj of size dj × dj is the submatrix of Υ with the row and column indices in {dj−1 + 1, dj−1 + 2, · · · , dj }, with d0 = 0. Since β0j 6= 0dj , then lim P[A ⊆ Ab∗n ] = 1. (16) n→∞ To finish the proof we show that for all j 6∈ A we have P[j ∈ Ab∗n ] → 0 as n → ∞. Since j 6∈ A, then β 0j = 0dj . Considering the Eucildean norm for equalities (6) we have with probability one, since we suppose j ∈ Ab∗n , that: µn ω bn;j < 2k n X i=1 Xij k ≤ 2 n X i=1 kXij k = 2 n X i=1   dj X k=1 1/2 2  Xij,k . By the Cauchy-Schwarz inequality, we have that,   1/2  1/2 dj dj n n X X X X 1 1 2  2   Xij,k Xij,k ≤ = n n i=1 i=1 k=1 k=1 n 1X kXij k2 n i=1 !1/2 . Then, taking into account assumption (A1), there exists a bounded constant C1 > 0 such that 1 µn ω bn;j < 2 n n 1X kXij k2 n i=1 !1/2 ≤ C1 < ∞. (17) On the other hand, left-hand side of inequality (17), can be written: µn ω bn;j µn nγ/2 = . e kγ n n nγ/2 kβ n;j Since we have supposed that j ∈ Ab∗n and j 6∈ A, we have that for all ǫ > 0, there exists ηǫ > 0 e k−1 > ηǫ ] > 1 − ǫ. The last two relations, together with the supposition such that P[n−1/2 kβ n;j γ/2−1 n µn → ∞, imply, for all constant A > 0, lim P n→∞   µn ω bn;j > A = 1. n (18) Then, relations (17) and (18) are in contradiction. Thus lim P[j ∈ Ac ∩ Ab∗n ] = 0. n→∞ The theorem follows from relations (16) and (19). (19)  14 GABRIELA CIUPERCA 6.2 Proofs for results of Section 4 Proof of Lemma 1. We show that for all ǫ > 0, there exists a constant Bǫ > 0 (without loss of generality, we consider Bǫ > 0, otherwise we take |Bǫ |) large enough such that for n large enough: r     p 0 0 P inf Gn β + Bǫ u > Gn (β ) ≥ 1 − ǫ. (20) n kuk=1 For this, we consider for some constant C > 0, the expectation of the difference: r r       X   n p p t IE ρτ εi − C IE Gn β 0 + C u − Gn (β 0 ) = Xi u − ρτ (εi ) n n i=1 = n X IE i=1 "Z C √p # t n Xi u 110<εi <t dt = 0 n Z X i=1 0 C √p t n Xi u [F (t) − F (0)] dt. (21) p By assumption (A6) we have p/n → 0. Moreover, by assumption (A5), we have that np Xti u = o(1), for kuk = 1. Thus, by mean value theorem and since the density f has a bounded first derivative in the neighbourhood of 0, relation (21) becomes: ! n n pX t t f (0) 2 p X t 2 (X u) + o u (Xi Xi )u . C = 2 n i=1 i n i=1 Then, taking into account assumption (A4), r     n X p 1 0 0 2 f (0) p 1 (Xt u)2 (1 + o(1)). IE Gn β + C u − Gn (β ) = C n n 2 n n i=1 i (22) Let be the following random variable r r   p t p Xi u − ρτ (εi ) − C Di Xti u Ri ≡ ρτ εi − C n n and the following random vector Wn ≡ C r n pX Di Xti , n i=1 with the random variable Di defined by (8). The vector Wn is the similar of the vector zn when p was fixed. Then, the process Gn can be written: r  r      n X p p [Ri − IE[Ri ]]. Gn β 0 + C u − Gn (β 0 ) = IE Gn β 0 + C u − Gn (β 0 ) + Wn u + n n i=1 (23) First all, remark that n kuk2 λmin   1 1X t 1 u Xi Xti u ≤ kuk2 λmax Xi Xti . Xi Xti ≤ n n i=1 n (24) Adaptive group LASSO selection in quantile models 15 Since the errors (εi )16i6n are independent, using also |Ri | < C with assumption (A5), we obtain pp n |Xti u| 11|εi |<C √ p |Xt u| , together n i r r i h p p √ kXi k ≤ C max kXi k = o(1), IE 11|εi |<C p |Xt u| ≤ C i n n n 16i6n which imply, since (εi )16i6n are i.i.d., " n X [Ri − IE[Ri ]] IE i=1 #2 = n X i=1 IE[Ri − IE[Ri ]]2 ≤ n X IE[R2i ] i=1 and by assumptions (A3), (A5) together with relation (24), we have i pX t 2 h ≤C |Xi u| IE 11|εi |<C √ p |Xt u| = o i n n i=1 n 2 n pX t u Xi Xti u n i=1 ! = o(p). (25) For the last relation we have used assumption (A4).P Let be the following random variable Un ≡ p−1/2 ni=1 [Ri − IE[Ri ]]. Then, relation (25) implies IE[Un2 ] = o(1). This, together with IE[Un ] = 0, imply, by the Bienaymé-Tchebychev inequality, that P P Un −→ 0. Thus ni=1 [Ri − IE[Ri ]] = oP (p1/2 ). Then, relation (23) becomes n→∞ r  r      p p 0 0 0 u − Gn (β ) = IE Gn β + C u − Gn (β 0 ) + Wn u + oP (p1/2 ) Gn β + C n n which is equal to, using (22): " f (0) = C2 p 2 n 1X t u Xi Xti u n i=1 ! n X Di Xti √ +C p n i=1 √ (26) ! # u (1 + oP (1)) + oP (p1/2 ). Since P IE[Di ] = 0, V ar[Di Xti u] = τ (1 − τ )ut Xi Xti u and kuk = 1, then, using (24), we have that n −1/2 t n i=1 Di Xi u converges in law to a centred Gaussian distribution. Taking into account assumptions (A4) and (A6), for B large enough, we obtain ! r   n X 1 p Gn β 0 + B ut Xi Xti u (1 + oP (1)) > 0, (27) u − Gn (β 0 ) = B 2 f (0)p n n i=1 for n large enough. Thus, relation (20) follows taking into account assumptions (A3) and (A4).  Proof of Theorem 3. We have the following inequality, with probability 1, for the quantile e : estimator β n;j e − β 0 k + min kβ e k. min kβ0j k ≤ max kβ n;j j n;j j∈A j∈A j∈A e − β 0 k = OP ((p/n)1/2 )) = OP (n(c−1)/2 ). On the other By Lemma 1, we have that maxj∈A kβ n;j j hand, we denoted in assumption (A8), h0 = minj∈A kβ0j k. Then, we have with probability one, 16 GABRIELA CIUPERCA e k and taking into account assumption (A8): M ≤ h0 n−α ≤ OP (n(c−1)/2−α ) + n−α minj∈A kβ n;j e k. Hence: oP (1) + n−α minj∈A kβ n;j   M nα e lim P min kβn;j k > = 1. n→∞ j∈A 2 (28) We consider the r-vector u such that kuk = 1. Similarly to Theorem 2.1 of Zhang and Xiang (2015), we have, for a constant B, p X j=1 e k kβ n;j −γ r r p0 r   X   p0 p p pX e 0 0 0 0 −γ e kβj + B kβn;j k kβn;j k−γ kuj k. uj k − kβj k ≥ uj k − kβj k ≥ −B kβj + B n n n j=1 j=1 Since kuk = 1, taking into account relation (28), applying the Cauchy-Schwarz inequality, we obtain − r p0 p X e kβ k−γ kuj k ≥ − λn n j=1 n;j r p0 X  p e k−2γ 1/2 kuk ≥ − kβ λn n;j n j=1 r and by assumption λn n(1+c)/2−αγ −→ 0, we obtain: n→∞ = OP p n r √ √ λn p0 p p λn p0 γ ≥ − α γ e k n minj∈A kβ n Mn n;j 2 . (29) The Theorem is proved if we have the similar of inequality (20) for r r  r      p X p p p 1 1 0 0 0 0 0 λn ω bn;j kβj + Gn β + B u − Gn (β )+ Buj k − kβj k ≡ Qn β + B u −Qn (β 0 ). n n n n n j=1 We show that for all ǫ > 0 there exists Bǫ large enough, such that, for any n large enough r     p 0 0 u > Qn (β ) > 1 − ǫ. P inf Qn β + Bǫ n kuk=1 (30) By the definition of Qn , we have for all constant B > 0, that r  r  r     p X p p p 1 1 Qn β 0 + B λn ω bn,j kβ0j + u −Qn (β 0 ) = Gn β 0 + B u − Gn (β 0 )+ Buj k − kβ0j k n n n n n j=1 and using relations (27) and (29) p > B f (0) n 2 ! n p 1X t t u Xi Xi u (1 + oP (1)) − BOP . n i=1 n Relation (30) follows from the last relation, for n and B large enough and using assumption (A4).  b ∗ belongs, with a probability converging Proof of Theorem 4. (i) By Theorem 3, we have that β n  p to one, to the set: Vp (β 0 ) ≡ β; kβ − β 0 k ≤ B np , with B > 0 large enough as in relation (30). Adaptive group LASSO selection in quantile models 17 For p > p0 , we show that for all β = (β A , β Ac ) ∈ Vp (β 0 ) such that kβA − β 0A k = O all constant C ∈ (0, B), we have Qn (β A , 0p−p0 ) = pp n min √ Qn (βA , βAc ), kβ Ac k≤C and for (31) p n with a probability tending to one, as sample  size n → ∞. Let us consider the parameter set Wn ≡ β ∈ Vp (β 0 ); kβAc k > 0 . b ∗ ∈ Wn ] → 0, as n → ∞. For this, we firstly consider two parameter vectors We show that P[β n (1) (1) (1) (1) β = (β A , βAc ) ∈ Wn and β(1) = (β A , β Ac ) ∈ Vp (β 0 ), such that βA = β A and β Ac = 0d−d0 . Let us take the difference of the objective random process for the two parameter vectors. We denote this difference Dn (β, β (1) ): Dn (β, β (1) ) ≡ Qn (β) − Qhn (β (1) ) i P Pn p bn;j kβ j k. = n−1 i=1 ρτ (Yi − Xti β) − ρτ (Yi − Xti β(1) ) + j=p0 +1 λn ω (32) From Knight (1998), we have the following identity, for any x, y ∈ R: Z y (11x≤t − 11x≤0 )dt. ρτ (x − y) − ρτ (x) = y(11x≤0 − τ ) + 0 Using this relation for the first sum of (32), we obtain: n n X  1 1 X Xi [11Yi −Xti β(1) ≤0 − τ ] ρτ (Yi − Xti β) − ρτ (Yi − Xti β (1) ) = (β − β (1) )t n i=1 n i=1 (1) n Z t 1 X Xi (β−β ) + [11Yi −Xti β(1) ≤t − 11Yi −Xti β(1) ≤0 ]dt ≡ T1n + T2n . n i=1 0 (33) For T1n , since the density f is bounded in a neighbourhood of 0, we have, by assumption (A5), that: n IE[T1n ] = (β−β(1) )t n f (0) X 1X Xi [F (Xti (β (1) −β0 ))−F (0)] = (β−β (1) )t Xi Xti (β 0 −β(1) )(1+o(1)). n i=1 n i=1 Pn Then, |IE[T1n ]| ≤ kβ − β (1) k · n−1 i=1 Xi Xti · kβ0 − β(1) kf (0)(1 + o(1)). Since P the matrix P n n n−1 i=1 Xi Xti is Hermitian, we have, taking into account assumption (A4), that n−1 k i=1 Xi Xti k Pn (1) 0 (1) −1 t = λmax (n k·kβ −β k. Therefore i=1 Xi Xi ) ≤ M0 . Hence, we have |IE[T1n ]| ≤ M0 f (0)kβ−β (1) 2 IE[T1n ] = O(kβ − β k ). By calculations analogous to IE[T1n ], using independence of (εi )16i6n , 2 2 we have that IE[T1n ] = Cn−1 kβ − β(1) k3 → 0, for n → ∞. Since V ar[T1n ] ≤ IE[T1n ], using the Bienaymé-Tchebychev inequality, we have: e 2 (1 + oP (1)). T1n = Ckβ − βk (34) Consider now T2n of relation (33), which can be written as: T2n = n −1 n Z X i=1 0 Xti (β−β(1) ) [11εi ≤t−Xt (β0 −β(1) ) − 11εi ≤−Xt (β0 −β(1) ) ]dt. i i 18 GABRIELA CIUPERCA Taking into account that β ∈ Vp (β 0n ), together with assumptions (A3), (A5), we get IE[T2n ] = Pn R Xt (β−β(1) ) Pn R Xt (β−β(1) ) n−1 i=1 0 i [F (t−Xti (β 0 −β(1) ))−F (−Xti (β 0 −β(1) ))]dt = n−1 i=1 0 i [tf (Xti (β (1) 0 −β )) + o(t)]dt. By the proof of Lemma 1, assumptions (A3), (A5), we obtain that f (Xti (β (1) − β 0 )) P is bounded by a constant C > 0. Thus, as for T1n , using assumption (A4) and the fact that n−1 ni=1 kXi k2 −  P P P tr n−1 ni=1 Xi Xti −→ 0, we have |IE[T2n ]| ≤ Cn−1 ni=1 kXi k2 kβ−β(1) k·kβ(1) −β0 k+o n−1 ni=1 n→∞  2 Xti (β − β(1) ) = Ckβ − β (1) k2 . We show similarly that IE[T2n ] = Cn−1 kβ − β(1) k3 . Then, by the Bienaymé-Tchebychev inequality, we get: T2n = Ckβ − β(1) k2 (1 + oP (1)). (35) Hence, by relations (34), (35), we obtain T1n + T2n = Ckβ − β(1) k2 (1 + oP (1)). (36) This last relation together with relations (33), (36), give for relation (32): Dn (β, β (1) ) = Ckβ − β (1) 2 k (1 + oP (1)) + p X j=p0 +1 On the other hand, by Lemma 1, we have ω bn;j = 1 e kγ kβ n;j = λn ω bn;j kβj k.    p −γ/2 = OP n − β 0j kγ 1 e kβ n;j and moreover for all j ≥ p0 + 1, since β ∈ Wn ⊆ Vp (β 0 ) we have 0 < kβj k = O p X j=p0 +1 Thus Dn (β, β(1) ) kβ − β (1) k λn ω bn;j kβj k = p X λn OP j=p0 +1 ≥ Ckβ − β (1) k(1 + oP (1)) +    p (1−γ)/2 . n p X λn OP j=p0 +1 pp n . Then    p −γ/2 n .    1/2 We have that kβ−β(1) k = O np . Since p/n = O(nc−1 ), under the assumption that λn n(1−c)(1+γ)/2 → ∞, as n → ∞, and p > p0 , we have Dn (β, β (1) ) kβ − β(1) k   ≥ λn OP nγ(1−c)/2 . (37) To finish the proof of relation (31), consider now other two parameter vectors: β 0 the true value (1) (1) (1) (1) and β(1) a parameter such that β (1) ≡ (β A , βAc ), β A = βA , βAc = β 0Ac = 0d−d0 . We obtain as for (36) that: Dn (β 0 , β(1) ) = n−1 n h i X ρτ (Yi − Xti β 0 ) − ρτ (Yi − Xti β (1) ) = Ck(β 0 − β (1) )A k2 (1 + oP (1)). i=1 Adaptive group LASSO selection in quantile models 19 Then Dn (β 0 , β(1) ) kβ 0 − β(1) k 0 = Ck(β − β (1) )A k(1 + oP (1)) = OP    p 1/2 n   = OP n(c−1)/2 . (38) Since λn n(1−c)(1+γ)/2 → ∞ as n → ∞, we have that (37) is much bigger than (38), for n large enough. Then, relation (31) follows. To finish the proof of (i), we will show that   b ∗ k > 0 = 1. lim P min kβ (39) n;j n→∞ j∈A b ∗ −β0 k. By Theorem b ∗ k ≥ minj∈A kβ0 k−maxj∈A kβ With probability 1, we have that: minj∈A kβ n;j j n;j j 3 and assumption (A8), we have,   ∗ M −α b lim P n min kβn;j k ≥ = 1, n→∞ j∈A 2 which implies   b ∗ k > 0 = 1, lim P n−α min kβ n;j n→∞ j∈A from which relation (39) follows. Relations (39) and (31) imply (i). b ∗ can be written with a (ii) Taking into account claim (i) and assumption (A7), the estimator β n p ∗ b = β 0 + p δ, with δ = (δ A , δ Ac ), δ Ac = 0r−r0 , kδ A k ≤ C. Then probability converging to 1 as β n n r r       n 1X p p ρτ Yi − Xti (β 0 + Qn β 0 + δ − Qn (β 0 ) = δ) − ρτ (εi ) + P, (40) n n i=1 n   λn ω bn;j kβ j k − kβ0j k . p b ∗ k − kβ0 k = C p δ t β0 , with a probability converging to 1. For all j ∈ {1, · · · , p0 } we have kβ n;j j n j j with P ≡ Pp0 j=1 On the other hand, using assumption (A8) and Lemma 1 we have for the quantile estimators r      p e k = kβ 0 k + OP kβ ≥ h0 + OP n−(1−c)/2 = O(nα ) + OP n−(1−c)/2 = O(nα ). n;j j n Thus, we have ω bn;j ≤ OP (n−αγ ), for all j ∈ A. Then, for the the second term on the right hand side of (40), we have with a probability converging to one: r r p0 p0 X X p p t 0 0 0 −αγ λn ω bn;j kβj + |P| = λn δ j k − kβj k ≤ Cn δ j βj n n j=1 j=1 r r p0 p X p 0 0 −αγ kδ j k · kβ j k ≤ C λn r λn n−αγ = Cr0 λn n(c−1)/2−αγ . (41) ≤ Cn n j=1 n We study now the first term of the right hand side of (40), which can be written as: r     n  1X p 0 t ρτ Yi − Xi β + δ − ρτ (εi ) n i=1 n 20 GABRIELA CIUPERCA 1 = n r n n pX t 1X Xi δ[11ε≤0 − τ ] + n i=1 n i=1 Z √ np Xti δ 0 [11εi ≤t − 11εi ≤0 ]dt ≡ J1 + J2 . Since IE[J1 ] = 0, using assumption (A5) and the Cauchy-Schwarz inequality, we have: V ar[J1 ] ≤ IE[J12 ] = n n X X p p 1 p t 2 kXi,A k2 kδ A k2 ≤ C 3 n max kXi,A k2 −→ 0. (X δ) ≤ τ (1−τ ) τ (1−τ ) i 2 3 n→∞ n n n n 1≤i≤n i=1 i=1 Using assumption (A2), we have for the expectation of J2 : Z √ np Xti δ n 1 f (0) p t 1 X Xi Xti δ(1 + o(1)). IE[J2 ] = δ (tf (0) + o(t2 ))dt = n 0 2 n n i=1 (42) Using assumption (A4) and relation (24), we have that f (0)pn−1 kδk22 λmin n−1 n X i=1 Taking into account the fact that n X   Xi Xti . Xi Xti ≤ IE[J2 ] ≤ f (0)pn−1 kδk22 λmax n−1 i=1 kδk22 kδ A k22 ≤ C, we have: p IE[J2 ] = Cf (0) . n   p 3/2 → 0, as n → ∞. n = (43)  Similarly we obtain V ar[J2 ] = O n1  But IE[J2 ] = O nc−1 and by assumption (A7), together with relation (41), we have |P| ≤    |P| = OP λn n(c+1)/2−αγ → 0 and thus OP λn nc n(c−1)/2−αγ = OP λn n(3c−1)/2−αγ . Then IE[J 2] IE[J2 ] ≫ |P|. p Hence, minimizing (40) amounts to minimizing J1 + J2 , with respect to np δ. Using relation (42), we obtain: pp n r n X p f (0) p t 1X 0 t n δ))− ρτ (εi )] = δ Υn,A δ A (1 + oP (1)). [ρτ (Yi − Xi (β n + Xti,A δ A [11εi <0 − τ ]+ n i=1 n n i=1 2 n A The minimizer of the right hand side of the last equation is: r n X  p 1 1 Xi,A (11εi ≤0 − τ ) . δA = − Υ−1 n,A n n f (0) i=1 (44) For studying (44), let us consider the following independent random variable sequence, for i = 1, · · · , n, Wi ≡ (f (0))−1 ut Υ−1 n,A XiA (11εi ≤0 − τ ), Pn 0 with u a vector of dimension r , such that kuk2 = 1. We have that IE[Wi ] = 0 and i=1 V ar[Wi ] = nτ (1 − τ )(f (0))−2 ut Υ−1 n,A u. Then, by CLT for independent random variable sequences (Wi )16i6n , we have b − β0 ) √ ut (β L A A −→ N (0, 1). (45) nf (0) q n→∞ −1 t τ (1 − τ )(u Υn,A u) p b − β 0 = p δ A , together with relations Claim (ii) results by taking into account of the fact that β A A n (44), (45).  Adaptive group LASSO selection in quantile models 21 References Ciuperca, G., (2015). Model selection in high-dimensional quantile regression with seamless L0 penalty. Statistics and Probability Letters, 107, 313-323. Ciuperca, G., (2016). Adaptive LASSO model selection in a multiphase quantile regression. Statistics, DOI: 10.1080/02331888.2016.1151427. Guo, X., Zhang, H., Wang, Y., Wu, J.L., (2015). Model selection and estimation in high dimensional regression models with group SCAD. Statistics and Probability Letters, 103, 86-92. Huang, J., Breheny, P., Ma, S., (2012). A selective review of group selection in high-dimensional models. Statistical Science, 27, No. 4, 481-499. Knight, K., (1998). Limiting distributions for L1 regression estimators under general conditions. The Annals of Statistics, 26, 755-770. Koenker, R., (2005). Quantile Regression. Cambridge University Press. Nardi, Y., Rinaldo, A., (2008). On the asymptotic properties of the group lasso estimator for linear models. Electronic Journal of Statistics, 2, 605-633. Xu, X., Ghosh, M., (2015). Bayesian variable selection and estimation for group Lasso. Bayesian Analysis, 10(4), 909-936. Yuan, M., Lin, Y., (2006). Model selection and estimation in regression with grouped variables. J. R. Statist. Soc. B, 68(1), 49-67. Zhang, C., Xiang, Y., (2015). On the oracle property of adaptive group LASSO in high-dimensional linear models. Statistical Papers, 57(1), 249-265. Zou, H., Yuan, M., (2008). Composite quantile regression and the oracle model selection theory. The Annals of Statistics, 36(3), 1108-1126. Zou, H., Zhang, H.H., (2009). On the adaptive elastic-net with a diverging number of parameters. The Annals of Statistics, 37(4), 1733-1751. Wang, H., Leng, C., (2008). A note on adaptive group lasso. Computational Statistics and Data Analysis, 52, 5277-5286. Wang, L., You, Y., Lian, H., (2015). Convergence and sparsity of Lasso and group Lasso in high-dimensional generalized linear models. Statistical Papers, 56, No. 3, 819-828. Wei, F., Huang, J., (2010). Consistent group selection in high-dimensional linear model. Bernoulli, 16(4), 1369-1384. Wu, Y., Liu, Y., (2009). Variable selection in quantile regression. Statistica Sinica, 19, 801-817.
10math.ST
arXiv:1705.06390v2 [cs.AI] 24 Oct 2017 Scalable Exact Parent Sets Identification in Bayesian Networks Learning with Apache Spark Subhadeep Karan Jaroslaw Zola Department of Computer Science and Engineering University at Buffalo Buffalo, NY, USA Email: [email protected] Department of Computer Science and Engineering Department of Biomedical Informatics University at Buffalo Buffalo, NY, USA Email: [email protected] Abstract—In Machine Learning, the parent set identification problem is to find a set of random variables that best explain selected variable given the data and some predefined scoring function. This problem is a critical component to structure learning of Bayesian networks and Markov blankets discovery, and thus has many practical applications, ranging from fraud detection to clinical decision support. In this paper, we introduce a new distributed memory approach to the exact parent sets assignment problem. To achieve scalability, we derive theoretical bounds to constraint the search space when MDL scoring function is used, and we reorganize the underlying dynamic programming such that the computational density is increased and fine-grain synchronization is eliminated. We then design efficient realization of our approach in the Apache Spark platform. Through experimental results, we demonstrate that the method maintains strong scalability on a 500-core standalone Spark cluster, and it can be used to efficiently process data sets with 70 variables, far beyond the reach of the currently available solutions. 1. Introduction In Machine Learning, the parent set assignment problem is to find a set of random variables that best explain a selected variable given input data and some predefined scoring criterion [1]. It is a precursor to Bayesian networks structure learning, where it is solved for each variable to produce a list of potential predecessors of that variable in a final network, which reduces the number of structures that have to be considered [2], [3], [4]. It is also closely related to the feature selection problem, since it directly translates into Markov blankets discovery [5]. Because of these connections, the problem has many practical applications spanning clinical decision support systems, risk assessment, strategic planning, fraud detection and many others [6], [7], [8], [9]. In all these applications, random variables model attributes of interest, their realizations are observed from data, and a model obtained by solving the parent set assignment provides insights into how different attributes depend on each other, including conditional dependencies. While the parent set identification is critical to building models like Bayesian networks, it is known to be formally hard for the most commonly used scoring functions. For instance, it is N P -complete for the Normalized Maximum Likelihood (NML) criterion [1]. Consequently, the current approaches, which we briefly review in Section 5, either depend on heuristics or deliver exact solutions but are limited in how large instances they can solve. In fact, the largest problems solved by exact algorithms do not contain more than 40 variables [10]. In contrast, the real-world systems that strongly depend on the high quality Bayesian networks often involve hundreds of variables. The available heuristics that can solve instances of that size, e.g. [3], do not provide any guarantees on the quality of the solutions they find. This significantly impacts their usefulness, since the inherent uncertainty of the model due to the input data and the scoring function, cannot be separated from the deficiencies of the learning algorithm [11]. Consequently, there is a gap between the quality and the size of the models that depend on the exact parent set identification and that can be efficiently learned from the data. Responding to the above challenges, in this paper, we propose a new distributed memory algorithm for the exact parent sets identification problem. Our goal is to push the limit on the scale of instances that can be solved in acceptable time limits on a modestly sized parallel cluster. To this end, we make the following specific contributions: 1) we propose a new strategy to constraint and reorganize dynamic programming computations in the parent set assignment problem such that computational grain is improved and finegrained synchronization is avoided, 2) we define a simple mechanism that we use to change the mode of computations from BFS to DFS such that the main memory is preserved. To validate our approach, we provide an efficient implementation on the Apache Spark platform [12], and demonstrate its strong scalability across different ML test sets. We then show that on a 500-core cluster with 25 nodes, our system can process HEPAR II test data [13] in slightly over 20 hours. With 70 variables and small variability, this data set is one of the most challenging benchmarks for Bayesian networks structure learning, and it has no exact results available to date. The paper is organized following the common practice. In Section 2, we provide basic definitions and formally state the problem. In Section 3, we introduce our proposed method, and we describe its experimental validation in Section 4. We summarize related work in Section 5, and conclude the paper in Section 6. 2. Preliminaries Consider a set of n random variables X = {X1 , . . . , Xn }, and suppose that we are given a complete input data table D = {D1 , . . . , Dn }, where Di is a vector of m observations of Xi . Let s(Xi , P a(Xi )) be a scoring function that quantifies how well Xi is explained by a set of variables P a(Xi ) ⊆ X − {Xi } given the data D. We will call P a(Xi ) a parent set, or simply parents, of Xi . We are assuming that s is given. For example, it could be one of the several available functions, such as information theoretic MDL [14] and AIC [15] or the BD family implementing Bayesian scoring criteria [16], [17]. In this work, we mostly focus on the MDL scoring function, but our results can be generalized to other scoring criteria. Moreover, we do not consider details of how s is computed, except that it has to access the data in D, and the cost of computations is not negligible as it grows with the size of P a(Xi ) and the number of observations m. The parent set assignment problem is to find a subset P a(Xi ) ⊆ X − {Xi } such that s(Xi , P a(Xi )) is minimized. Let d(Xi , U ), U ⊆ X − {Xi }, be the score of selecting optimal parent set of Xi from among variables in U , that is d(Xi , U ) = min s(Xi , P a(Xi )). We can efficiently P a(Xi )⊆U express d via the following recursion: ( s(Xi , U ), d(Xi , U ) = min min d(X , U − {X }). i j (1) Xj ∈U To find an optimal parent set assignment of Xi we could solve the recursion in Eq. (1) for U = X − {Xi } while recording the choice of parents we made in the process. However, in the majority of practical applications, especially in the context of Bayesian networks structure learning, it is necessary to consider a slightly broader version of the problem. We will say that U ⊆ X − {Xi } is a maximal parent set of Xi if d(Xi , U ) = s(Xi , U ). From Eq. (1) we have that if U is a maximal parent set then no subset of U has score better than d(Xi , U ), i.e. ∀U 0 ⊂U d(Xi , U ) < d(Xi , U 0 ). Hence, by identifying all maximal parent sets of Xi and memoizing their corresponding scores s, we can efficiently answer queries about any optimal parent set of Xi . Specifically, to answer query d(Xi , U 0 ) for any U 0 it is sufficient to check if U 0 is one of the maximal parent sets of Xi . If it is, then all we have to do is to return the memoized score s of that maximal parent set. Otherwise, d(Xi , U 0 ) must be equal to the smallest s among all maximal parent sets of Xi for which U 0 is a superset. The above property of maximal parent sets has important practical implications. For example, to compute the score Q(X ) of an optimal Bayesian network over X , and thus find the network itself, we have to solve recursion of the form Q(U ) = min (d(Xi , U − {Xi }) + Q(U − {Xi })). Even Xi ∈U with the efficient algorithms such as [2], [4] this requires large and hard to predict number of queries for optimal parent sets, owing to the component d(Xi , U − {Xi }) in the recursion. Because for a single variable Xi there are 2n−1 optimal parent sets, memoizing them all is impractical and often infeasible. In contrast, the set of all maximal parent sets is usually many orders of magnitude smaller, and hence using it instead, in the way we explained before, is the desired and viable alternative [2], [4], [3]. From the computational point of view, identifying maximal parent sets of Xi is the same as selecting its optimal parent set from X −{Xi }. The only difference are extra steps required to test and store subsets that correspond to maximal parent sets. In practical settings, we wish to enumerate all maximal parent sets for all variables in X , and this is the problem we are considering in this paper. 3. Proposed Approach Given a set of variables X , database of observations D, and a scoring function s, our goal is to enumerate all maximal parent sets for all Xi ∈ X . If we consider a single variable Xi , then we can directly apply recursion in Eq. (1) and starting from the empty set we can consider parent sets of growing size. This process can be though of as a top-down traversal of the dynamic programming lattice with n levels formed by the partial order “set inclusion” on the power set of X −{Xi } (see Figure 1a). At the level l = 0 of the lattice we have empty set. Two nodes in the lattice, U 0 and U , are connected only if U 0 ⊂ U and |U | = |U 0 |+1. Here we use U to denote both a subset of X − {Xi } and the corresponding node in the lattice. A node U represents a parent set of Xi . When it is discovered, we compute s(Xi , U ), compare it with scores d passed by its predecessors to obtain d(Xi , U ), and if U is a maximal parent set we store or report a tuple (Xi , U, s(Xi , U )). While the above strategy is clearly guaranteed to enumerate all maximal parent sets, it is both computationally and memory challenging. The computational complexity is due to the Θ(2n ) invocations of s, and memory complexity is driven by how the dynamic programming lattice is traversed. For example, one way is to assume BFS traversal induced by the precedence constraints in the lattice. In such case, maximal parent sets are enumerated layerby-layer with a synchronization point between any two consecutive layers. This strategy requires that both layers  space are stored in the memory, which implies O nn 2 complexity, irrespective of which parallel BFS realization we assume [18]. Another approach is to use some variant of DFS. With DFS we can benefit from techniques like hypercube pipelining, similar to [19], but this strategy requires that we store partial results and update them each time a node is discovered before its all predecessors are processed. As a result, the space complexity is O(2n ) and we have s(X1,∅) X1 ∅ X2 X3 X2,X3 X2,X4 X3 X2 ∅ X4 X1 X3,X4 X1,X3 X2,X3,X4 s(X4,∅) X4 ∅ X3 X4 X1,X4 X1 X3,X4 X1,X2 X1,X3,X4 X2 X1,X4 X1 ∅ X4 X1 X2,X4 X1,X2 X1,X2,X4 ∅ X2 X3 X2 X3 X1,X3 X2,X3 X2,X3 X2,X4 X3 X2 ∅ X4 X1 X4 ∅ X3 X4 X3,X4 X1,X3 X1 X2 X1,X2 X1,X4 X1,X2,X3 ∅ X4 X1 X2,X4 X1,X2 X2 X3 X1,X3 X2,X3 X1,X2,X4 s(X1,{X2,X3,X4}) (a) (b) X={X1,X2,X3,X4} | U=∅ X={X1,X2,X3,X4} | U=∅ s(X2,{X1}), s(X3,{X1}), s(X4,{X1}) X2,X3,X4 | X1 X3,X4 | X1,X2 X2,X4 | X1,X3 X1,X3,X4 | X2 X1,X2,X4 | X3 X3 | X1,X4 X1,X4 | X2,X3 X2,X3,X4 | X1 X1,X2,X3 | X4 X1,X3 | X2,X4 X1 | X3,X4 X3,X4 | X1,X2 X2,X4 | X1,X3 X1,X3,X4 | X2 X1,X2,X4 | X3 X3 | X1,X4 X1,X4 | X2,X3 X1,X2,X3 | X4 X1,X3 | X2,X4 X1 | X3,X4 s(X3,{X1,X2}), s(X4,{X1,X2}) X3 | X1,X2,X4 X3 | X1,X2,X4 (c) (d) Figure 1: (a) Example of the dynamic programming lattices for X = {X1 , X2 , X3 , X4 }. Processing node U in a lattice for variable Xi requires computing s(Xi , U ) and access to d(Xi , U 0 ) for each predecessor U 0 of U . (b) Example constrained lattices, and (c) their corresponding “folded” representation. A node U in the compacted lattice requires that s is evaluated for several variables that share candidate parents U . This improves efficiency of computing s, decreases memory requirements and increases computational density. (d) Precedence constraints after eliminating fine-grain synchronization within every layer of the lattice in (c). Nodes processed by the same task if the DFS mode is initiated at layer l = 1 are outlined. Note that following how input variables are ordered, the nodes in the larger tasks are more likely to be pruned. to maintain potentially irregular memory updates to detect new maximal parent sets. Finally, while all variables in X can be processed independently, the resulting embarrassing parallelism is highly limited. This is because the computational cost for a single variable is exponential in n, which effectively constraints the total number of variables we may hope to process. For example, if we assume n = 48 then the estimated memory requirements to process a single lattice, with O(2n ) nodes and 16 B per node, is 4 PB with a modest 48-way parallelism. 3.1. Constraining the Search Space To achieve a scalable strategy, we start from constraining the search space. This is necessary since the exponential cost of considering all optimal parent sets is prohibitive for realistic problem instances, irrespective of how efficient is our parallel exploration algorithm. For every variable Xi it is reasonable to expect that its optimal parent set will not contain all other variables. In other words, there is a limit on the depth to which we should be exploring the dynamic programming lattice of Xi . To maintain exactness guarantees, we have to ensure that the bound on the depth of exploration is no smaller than the unknown size of the optimal parent set. Here we provide such a bound for the information-theoretic MDL scoring function. We note that similar bounds can be derived for other functions, and in fact a significant work in this direction has been done, for example in [20]. The MDL score is defined as: s(Xi , U ) = m · H(Xi |U ) + N C(Xi , U ), (2) 1 · log2 (m) · qi · (ri − 1) 2 (3) where N C(Xi , U ) = is a network complexity term, H(Xi |U ) is the estimated conditional entropy of Xi given Y U , and ri > 1 is the number of states of Xi , and qi = rj is the number of states j,Xj ∈U that variables in U can assume (qi = 1 if U = ∅). The parameters ri and qi as well as the conditional entropy are directly assessed from D. In short, the MDL score of a pair (Xi , U ) is the number of bits required to encode information about Xi and its parents U if we were to use Huffmann coding of D. To derive the bound we exploit the following observation. When U is empty, we have the maximal conditional entropy H(Xi |∅) = H(Xi ) and the minimal network complexity N C(Xi , ∅) = 0.5·log2 (m)·(ri −1). By increasing the size of U we can decrease conditional entropy of Xi , which has the theoretical limit of 0, at the expense of increasing network complexity. This follows from the basic properties of entropy and the definition of the network complexity term. Once the network complexity N C(Xi , U ) is greater or equal to s(Xi , ∅) = m · H(Xi ) + N C(Xi , ∅), irrespective of which variables we add to U , the score s(Xi , U ) will always increase. This is the point at which network complexity outweighs any gains from the decreasing entropy of Xi . Consequently, if U satisfies Condition 1: N C(Xi , U ) ≥ s(Xi , ∅), then any superset of U can be excluded from further consideration, since it will not admit new optimal or maximal parent sets for Xi . The efficiency of Condition 1 depends on the input data D. Nevertheless, it works extremely well in practice. For example, in our experiments, reported in Section 4, we found that for real-world data with n = 70 we never considered nodes with more than nine variables. We can further extend our pruning strategy by using the following observation [21]. The lowest entropy we can achieve for Xi is H(Xi , X −{Xi }). Now consider the score d(Xi , U ). Here we have that if Condition 2: d(Xi , U ) ≤ m·H(Xi , X −{Xi })+N C(Xi , U ) holds, then no superset of U can improve the score d(Xi , U ). This is because any superset of U has higher network complexity, and hence ∀U 0 ⊃U m · H(Xi , X − {Xi }) + N C(Xi , U ) ≤ H(Xi , X − {Xi }) + N C(Xi , U 0 ). As previously, if U satisfies the condition we can exclude it from further considerations, since it will not admit new optimal or maximal parent sets. The example effect of applying our pruning conditions is shown in Figure 1b. Although both conditions achieve the same goal of pruning the search space, they differ in which information they require. To test Condition 1, we use only network complexity, which can be computed for any pair Xi and U independently of other U 0 ⊂ U , i.e. independently of predecessors of U in the dynamic programming lattice. On the other hand, Condition 2 provides a tighter bound but depends on the score d(Xi , U ), which, as we explained earlier, requires access to the maximal parent sets of Xi . 3.2. Parallel Exploration Because of the memory and computational complexity, which remains challenging even when our pruning conditions are applied, we focus our parallel strategy on the distributed memory systems, with the Apache Spark platform [12] serving as an execution vehicle. Recall that our goal is to traverse in the top-down fashion the dynamic programming lattices for all Xi . A node U in a lattice corresponds to a computational task that evaluates s(Xi , U ), tests if U is a maximal parent set, and checks if supersets of U can admit new maximal parent sets. These tests are the source of precedence constraints between the tasks. The main idea of our parallel approach is as follows. We onthe-fly generate and “fold” the dynamic programming lattices for different Xi into a single lattice with lower memory requirement and denser computational load. We explore the resulting lattice in parallel, initially in the BFS mode, and switch to DFS when memory becomes a bottleneck. To store and access maximal parent sets discovered in the process, we maintain a global state, which is synchronized via reduction between the layers. Finally, we reorder computations within each layer to eliminate fine-grain synchronization between the tasks, that otherwise would be necessary to effectuate our pruning conditions. Below, we explain each element of our approach. 3.2.1. Folding Lattices. If we consider the dynamic programming lattice for variable Xi , then until our pruning  conditions become effective we have to manage n−1 tasks l at the level l of the lattice. Consequently, the memory required to represent the entire layer l is bounded by B1 = c1 · n · n−1 , assuming cost c1 to store a task. l This easily becomes problematic for larger problems as soon as l > 2. The problem persists even when pruning takes place, since initially only some of the tasks are removed from consideration. However, we can “fold” the dynamic programming lattices such that the tasks sharing the same set U across different lattices are represented by a single task (see Figure 1c). Let the memory taken by such combined task be c2 . The memory requirement of the new lattice is  c1 B1 = · (n − l) reduction in B2 = c2 · nl . This gives us B2 c2 memory complexity. To store a task we can use a bitmap, where i-th bit indicates whether element i is in a set. In such case, c2 = 2 · c1 , since in the compacted lattice we require one bitmap to represent all Xi for a task, and one bitmap to represent the actual U (v.s. storing only U in the original lattice). By using bitmaps we additionally reduce memory overhead, and we can realize basic operations, like testing set inclusion, with only few hardware instructions. The memory reduction becomes less significant as l increases. However, this is acceptable, since we expect that thanks to the pruning conditions the search process will terminate early, which we confirm via experimental results. The main advantage of our “folding” step is significantly increased computational density. To process a single task in the “folded” lattice, we have to perform multiple evaluations of s with the same parent set U . Without explaining details of how s is computed from D, we note that by having the same parents in the consecutive invocations of s, we can precompute statistics about D induced by U , and reuse them from one invocation to another. Consequently, the cost of processing a task in the “folded” lattice is higher than the cost of processing an individual corresponding task in the original lattice, but it is lower than the total cost of processing all corresponding tasks from the original lattices, i.e. if X is a set of random variables sharing U we have P that T (s(X, U )) < Xi ∈X T (s(Xi , U )), where T is the processing cost. By “folding” the lattices, we limit parallelism in the first two stages of the lattice. However, this has a negligible effect on the scalability, since even for large n the cost of processing these layers is minimal compared to the total processing time. Alternatively, we may decide to “fold” the lattices only after the desired level of parallelism is achieved. Finally, the computational cost of individual tasks becomes non-uniform, but this is addressed by the dynamic scheduling at the run-time. 3.2.2. Limiting Synchronization. Consider the task for node U at the layer l, and suppose that Condition 1 or Condition 2 holds for U . In such case, no task that corresponds to a superset of U should be generated and included in the layer l + 1, as it will not contribute new maximal parent sets. In other words, at given layer we should see only those tasks whose predecessors all did not satisfy the pruning conditions. However, to enforce this requirement we would need either complex synchronization between all tasks within the same layer, or a reduction operation on all possible tasks for the next layer, which effectively would defy the purpose of pruning. To address this problem, we can change the way in which tasks for the next layer are enumerated, such that synchronization is bypassed at the small cost of considering a few unnecessary tasks in the next layer. We first order variables in X by the decreasing number of states they have in D, i.e. for any Xi and Xj , if i < j then ri ≥ rj , and we maintain this ordering for every node U . If two variables have the same number of states, we use H(Xi , X − {Xi }) < H(Xj , X − {Xj }) as a secondary condition. Then, when deciding whether a task should be considered in the next layer, instead of checking if any of its predecessors satisfied pruning condition, which would require synchronization, we check only one selected predecessor. Specifically, let Xj ∈ U be the maximal element in U . To enumerate descendants of U , we consider only U 0 = U ∪ {Xk } for all k > j . Thus, node U becomes a predecessor to n − j nodes (see Figure 1d). At the same time, from Eq. (3) and Conditions 1 and 2, it follows that smaller the j the higher the probability that U will satisfy pruning conditions. To see why, observe that the network complexity term grows as the product of the number of states that variables in U can assume. Because variables are ordered by the decreasing number of their states and the increasing entropy, we have that if |U | = |U 00 | and j < j 00 , where Xj is the maximal element in U and Xj 00 is the maximal element in U 00 , then N C(Xi , U ) ≥ N C(Xi , U 00 ). Consequently, nodes that are predecessors to the largest number of nodes in the next layer are most likely to meet the pruning conditions. While this approach does not guarantee that all tasks that should be pruned will not be generated, it works very well in practice. In fact, in our experiments we found that we remove no less than 97% of all tasks that should be pruned. The remaining 3% constitute an extra work of processing nodes that do not contribute maximal parent sets. Note that these nodes once processed never create successors and thus the extra work overhead does not propagate. To decide whether node U at layer l is a maximal parent set for Xi , we require optimal parent set scores, d(Xi , U 0 ), for all subsets U 0 ⊂ U from the layer l − 1. As we explained earlier, instead of maintaining a complete list of all optimal parent sets, to retrieve d(Xi , U ) we depend only on the previously enumerated maximal parent sets. For each variable Xi , we store a list L(Xi ) of its maximal parent sets represented by tuples (U, s(Xi , U )), and sorted by the score s(Xi , U ). Then to extract all optimal parent set scores for Xi and U we require O(|L(Xi )|) scan of L(Xi ). This is affordable, since even complete L(Xi ) is very small for a typical input data (see Table 1 in Section 4). Each task at layer l may contribute a new maximal parent set that must be available to all tasks for Xi in the subsequent layers. Consequently, we maintain all L(Xi ) as a global state that is updated via all-to-all reduction, with list merging as an operator, after given layer is entirely processed. This step can be efficiently executed considering a small size of L(Xi ). 3.2.3. Changing Exploration Mode. While our pruning conditions significantly constrain the search space, for large problems the number of the tasks generated in the later stages of the execution may still exceed the available main memory. This in turn would lead to the undesired out-ofcore execution. After processing all tasks at layer l, we can estimate the number of tasks that layer l + 2 will have in the worst case. If that number exceeds the total available memory, it is reasonable to conclude that we have sufficient parallelism, and instead of creating new tasks we can change the mode of execution into a memory preserving DFS. Specifically, for each node U at layer l + 1, instead of considering all supersets of U independently, we can process them sequentially following the DFS order (see Figure 1d). However, in such case we cannot assume that the global list of all maximal parent sets is consistent between different tasks. As a result, some tasks could end up generating incorrect maximal parent sets or could perform extra work because without the access to the complete list of maximal parent sets Condition 2 could unnecessarily fail. To mitigate this situation, we flag all maximal parent sets generated in the DFS mode that potentially could not be maximal in the global sense, i.e. when maximal parent sets from other tasks are taken into the account. These are maximal parent sets U whose at least one strict subset U 0 ⊂ U has been processed in a different task. Once all tasks are processed, we perform reduction to obtain the final global state for all L(Xi ). Then, we proceed with checking if the flagged maximal parent sets remain maximal in the merged L(Xi ). Let zf (Xi ) be the total number of maximal parent sets flagged when running in the DFS mode. The cost of verifying these maximal parent sets is O(zf (Xi ) · |L(xi )|). This is because, in the worst case, for every flagged maximal parent set U , we have to check if none of the remaining elements in L(Xi ) is a subset of U with a better score. However, it turns out that in the practical settings zf (Xi ) is a very small number, and in fact frequently we have that zf (Xi ) = 0. To understand why, consider the following. The memory requirements due to BFS grow exponentially with the depth of the dynamic programming lattice. At the same time, because the network complexity term, N C , grows exponentially as well, the probability of enumerating new maximal parent sets decreases as we progress to the higher layers of the lattice. In our experiments, for all tested data sets we did not enumerate new maximal parent sets beyond layer l = 6. At the same time, if the available main memory is limited, and we are forced to switch to the DFS mode early, then we can expect that the majority of the maximal parent sets tested by a single task will not be depending on the maximal parent sets discovered in other tasks. This is a direct consequence of the precedence constraints within the lattice. When switching to the DFS mode, we can expect an increased computational imbalance between the tasks. However, the largest tasks which could be the source of the most significant imbalance are the ones which are the most likely to be pruned. At the same time, the number of the DFS tasks will remain sufficient to provide room for load balancing at the run-time, which we confirm by experiments. 3.3. Apache Spark Implementation We implemented our parallel approach using the Apache Spark platform. The reason we use Spark is purely pragmatic: the platform supports locality-aware dynamic task scheduling, which we directly benefit from, since our computational tasks can be heterogeneous owing to the lattice “folding” and the potential use of the DFS mode. Additionally, Spark API makes expressing iterative BSP-style programs extremely productive. While it is clear that using one of the traditional HPC models, e.g. MPI or UPC, we could probably achieve faster implementation, we believe that the scalability would remain comparable. The high level exploration components of our method are implemented in Python, and the computationally intensive parts, specifically evaluations of function s, are offloaded to the efficient, SIMD-parallel C++ kernel derived from our SABNA package [4], [22]. Apache Spark is usually regarded as a platform for the data intensive computing. In our case, the input data is typically very small (i.e. at the order of MB), however, it quickly generates massive new data representing individual tasks of the dynamic programming lattice. Below we provide details of the implementation assuming that reader is familiar with the basics of the Apache Spark interface [23]. We follow the standard BSP model realized via iterative transformations on a sequence of Spark Resilient Distributed Datasets (RDDs), where RDDi represents layer i of the compacted dynamic programming lattice. To represent a node in the lattice, RDD stores a tuple (X, U ), where both X and U are expressed via bitmaps, and X keeps variables that share U . To obtain RDDi , we initialize and parallelize RDD0 on Spark driver, since this is very inexpensive operation. Then, we iteratively apply the following transformations: RDDi = RDDi−1 .repartition(p).mapP artitions(M ), where p is a small multiple, usually four (as suggested in several Apache Spark best practices), of the total number of cores that Spark executors can use, and M is the mapping function that: 1) evaluates function s for all variables in X , and identifies potential maximal parent sets, 2) checks the conditions to constraint the search space, and 3) accordingly yields nodes for the next layer to explore. The repartitioning transformation is to ensure good load balancing between executors since the number of tasks grows from one RDD to the next. Here we depend on the default Spark scheduler. We use mapP artitions, instead of a more natural map, to enable indexing of the data D when map M is initialized. By indexing D we significantly accelerate computations of s, and by doing so only once per partition we avoid unnecessary overheads. At the end of every iteration we materialize RDD by invoking Spark’s count action. Based on the resulting size of RDD, we assess the memory requirement for the subsequent iterations, and decide whether we should be switching to the DFS mode. Finally, at any point of the execution we make sure that the last two RDDs are cached and remain in the main memory to avoid expensive RDD recomputing or restoring from the secondary storage. The mapping function M makes use of the information about maximal parent sets from previous iterations, i.e. L(Xi ) for all Xi . To maintain this global state we use a combination of Spark accumulator and broadcast variables, since the memory cost of representing maximal parent sets is very small. In a given iteration, newly discovered maximal parent sets are added by each executor to a customized Spark accumulator to form an update to the global list of all maximal parent sets. As this could lead to potential duplicate entries in L(Xi ) when a task fails or speculative execution is enabled, we make sure that only unique entries are considered. After the count action at the end of the iteration is performed, the accumulator is reduced an the global list managed by the Spark driver is updated and broadcast back to the executors. Together with the count and repartition step, these operations represent communication and synchronization stages in the BSP model. In the DFS mode, instead of generating RDD for the next layer, which would exceed the available main memory, we apply another transformation to the current RDD, where we explore each partition as described in Section 3.2.3. As we explained earlier, this increases the computational cost of every task and makes tasks more heterogeneous. However, at this stage the number of RDD partitions and the distribution of their computational load is such that the Spark run-time can easily maintain load balance. 4. Experimental Results To understand performance characteristics of our approach, we performed a set of experiments on a standalone Apache Spark cluster with 25 nodes and GbE interconnect. TABLE 1: Data sets used in experiments. Name AL-4K AL-10K HF-10K USCD HEPAR II n 37 37 56 56 70 m 4,000 10,000 10,000 10,000 4,000 ri min/max z 2/4 2/4 2/11 2/18 2/4 2,654 5,636 3,941 44,804 1,714 |L(Xi )| min/max 1/281 1/648 4/353 3/3857 1/381 TABLE 2: Execution time in minutes. Compute Nodes 12 16 Name 2 4 8 AL-4K AL-10K HF-10K USCD 27.1 241.4 425.4 995.7 14.3 123.4 214 496.5 7 61 107.5 249.2 4.8 41.5 71.8 167.6 4.8 31.3 54.2 127.1 20 24 3.1 25.11 43.4 101.8 2.9 20.9 36.6 85.4 TABLE 3: Effect of reorganizing the search space. 4.1. Scalability Tests In the first set of experiments, we analyzed scalability of the platform depending on the number of input variables n and the number of observations m. We executed our Spark software on the varying number of nodes and we recorded wall time, as well as: lmax – the deepest processed layer in the dynamic programming lattice, lz – the last layer at which we found new maximal parent sets, and the amount of extra work we had to perform due to removed synchronization (Section 3.2.2). The results of this experiment are summarized in Tables 2-3 and Figure 2. Here we report only relative speedup computed with respect to the time obtained on two nodes, since, except of AL-4K, we were not able to process the test data sets using sequential software. We start the analysis by first looking at the execution time and the speedup of our method. From Table 2 and Figure 2 we can see that, with the exception of AL-4K, the software achieves very good scalability on up to 24 nodes lmax Name AL-4K AL-10K HF-10K USCD 9 10 7 8 lz Nodes processed 4 5 4 6 107 4.6 × 1.6 × 108 3.1 × 107 2.1 × 108 Extra work 1.68% 1.72% 3.2% 1.23% (480 cores). In all test cases, the required main memory never exceeds 84 GB, which enables us to run completely in the BFS mode. The slightly weaker scalability for AL4K can be attributed to the overall size of the problem. With small n and relatively small number of observations the problem can be solved in a few minutes on 12 nodes. Beyond that point, the overhead of synchronization between layers becomes significant compared to the optimized compute time on the collapsed dynamic programming lattice. As the number of observations for this data set increases (data set AL-10K), computational time increases and expectedly scalability improves. Because of the relatively small size, we were able to process AL-4K using a sequential code in 2,435 minutes. The sequential code is written entirely in C++, is optimized for memory usage and provides the same lattice constraining techniques as the parallel version. It also uses the same computational kernel to compute s. While this result suggests outstanding super-linear performance of our parallel code, we should keep in mind that the comparison is not completely fair, since the sequential version has significant overheads due to memory management (to avoid enumerating unnecessary tasks). Nevertheless, the result shows that even “small” problems can take more than a day to process 12 Relative Speedup Each node in the cluster is equipped with 20-core dualsocket Intel Xeon E5v3 2.3 GHz processor, 64 GB of RAM and a standard SATA hard drive. The shared file system is run under GPFS, however, this is of minor importance considering that the input data is very small, even for the largest considered problems, and it is accessed only once at the very beginning of the computations. In all tests, Spark driver runs with the default parameters, and since it is a very light-weight process, it is collocated with one of the executors. We allocate one Spark executor per node using the default configuration for the number of cores, i.e. each executor uses all available cores in a node. All executors are configured to use 58GB out of the available 64GB, with the remaining memory available to the operating system and Python interpreter. We note that we tested different configurations of executor-to-core ratios, across different data sets, without noticeable difference in performance. We used several popular benchmark data sets from the UCI Machine Learning Repository [24], including Alarm (AL), Hail Finder (HF), the US Census Data (UCSD) and HEPAR II. These are commonly considered too challenging to be solved exactly using sequential techniques, and are among the most demanding tests for the parent set assignment. The properties of all data sets are provided in Table 1, including: ri – the number of states (arity) that the variables in the set can assume, z – the total number of generated maximal parent sets, and the properties of the output collection of the maximal parent sets L(Xi ). 10 8 Linear AL-4K AL-10K HF-10K USCD 6 4 2 4 8 12 16 20 24 Compute Nodes Figure 2: Relative speedup computed with respect to the execution time on two nodes. sequentially, and this time can be easily reduced to minutes by using a cluster with a few nodes. Next we consider the effectiveness of our approach in terms of removing synchronization and constraining the search space. Table 3 shows that in the worst case we have to perform only 3.2% of extra work compared to the completely synchronized version in which no unnecessary tasks are generated. At the same time, the total number of processed nodes is a small fraction of what we would have to process without constraining the search space. For example, for the USCD benchmark the total number of tasks up to layer lmax = 8 is 1,689,096,333 when no pruning is applied, and it is reduced to approximately 12% of that when the pruning is enabled. Even then however, the total number of tasks to process is of the order of 108 , which demonstrates complexity of the problem and the need for parallel approach. The same pattern holds true for other tested data sets. The last layer at which we enumerate new maximal parent sets, lz , is always much smaller than lmax . This suggests that there is a room to tighten the pruning conditions. At the same time, it confirms that switching to the DFS at the higher levels of the dynamic programming lattice will not trigger any significant work due to how we manage the global state with all maximal parent sets. Finally, by looking at the results for AL-4 and AL-10 data sets, we can see that both lmax and lz are increasing when the number of observations increases. This is because with the growing m the network complexity term increases logarithmically for any variable Xi , but s(Xi , ∅) grows linearly. Consequently, the effectiveness of the pruning conditions decreases. Nevertheless, the overall performance of the method remains reasonable. 4.2. HEPAR II Test In our second experiment, we focused on the HEPAR II test data. This benchmark comes from one of the early clinical decision support systems for multiple-disorder diagnosis of liver that involved a complex Bayesian network [13]. As we already mentioned, the parent set assignment problem plays a critical role in the exact Bayesian networks learning, and hence directly translates into our ability to build high quality models for critical applications. This makes the benchmark interesting from the practical point of view. The benchmark is also challenging as it contains 70 variables, and all variables assume only few states, making it hard to identify variables that should be pruned. To process HEPAR II we used all 25 nodes of our cluster. The experiment took 20 hours and 17 minutes to complete, with lmax = 8 and lz = 4. To the best of our knowledge, this is the first time exact results for HEPAR II are reported. The peak memory consumption was 327 GB, and the execution involved the total of 10,770,519,474 tasks. Because the total memory available in our cluster is 1.6 TB, we again were able to process this benchmark completely in the BFS mode. However, to see how turning into the DFS mode affects the performance, we limited the available memory to 4 GB per node or 100 GB total memory. In this case, at layer l = 7 we had to switch to the DFS mode to process the remaining 9,427,586,763 tasks. This had the minor impact on the performance, and we were able to complete the entire execution in 20 hours and 28 minutes. Here we should keep in mind that because lz = 4 there were no new maximal parent sets discovered when running in the DFS mode. However, we believe that even with new parent sets discovered the performance would not be drastically changed. 5. Related Work Because of its importance, the parent assignment problem has been considered as a standalone question [1], [3] and in the relation to the structure learning of Bayesian networks [2], [4]. In [1], Koivisto provides several hardness results that suggest that the parent assignment for a single variable most likely has no polynomial-time solution. This motivates our parallel approach as there is a practical need to push the size of the problems that can be solved exactly in realistic time limits. In [2], [4], multiple authors discuss the application of maximal parent sets in exact Bayesian networks structure learning. However, in each case maximal parent sets are assumed to be given and no details of how that is achieved are provided. In this paper, we provide the actual scalable algorithm for maximal parent sets enumeration, which in fact can be combined with any Bayesian network structure learning strategy. There is a significant body of work on solving maximal parent sets enumeration while discovering Bayesian network structure [25], [26], [27], including parallel algorithms [19], [28]. However, when both problems are coupled many optimizations specific to the parent sets enumeration become infeasible. As a result, these combined approaches do not scale and are limited to the instances with 30 to 40 variables, even when using thousands of cores and provably optimal MPIbased realizations [19], [28]. Finally, recently Scanagatta et al. [3] proposed a greedy heuristic that depends on a fast approximation of the actual scoring function to constraint the number of explored parent sets. While this approach can be used to solve problems larger than what we report, it does not provide any quality guarantees. In contrast, our method is guaranteed to provide the exact solution. 6. Conclusion The exact parent set identification is a challenging problem with important applications in the exact structure learning of Bayesian networks. In this paper, we proposed a new scalable distributed memory approach to the problem, and we used it to efficiently process HEPAR II data set. This experiment clearly demonstrated that our method can handle even the most challenging data sets and using only limited hardware resources. This in turn opens new possibilities for exact learning of large Bayesian networks, as with some effort our method can be combined with the already existing solvers, e.g. [4]. Our approach is scalable and we believe can be generalized to other popular scoring functions including AIC and BDeu. Since the efficiency of constraining the search space for these functions is currently unclear, the ability of our solution to adopt to heavy workloads provides a significant advantage. Acknowledgments Authors wish to acknowledge hardware and technical support provided by the Center for Computational Research at the University at Buffalo. References [1] M. Koivisto, “Parent assignment is hard for the MDL, AIC, and NML costs,” in International Conference on Computational Learning Theory, 2006, pp. 289–303. [2] C. Yuan, B. Malone, and X. Wu, “Learning optimal Bayesian networks using A* search,” in International Joint Conference on Artificial Intelligence, 2011, pp. 2186–2191. [3] M. Scanagatta, C. de Campos, G. Corani, and M. Zaffalon, “Learning Bayesian networks with thousands of variables,” in Neural Information Processing Systems, 2015, pp. 1864–1872. [4] [5] [6] S. Karan and J. Zola, “Exact structure learning of Bayesian networks by optimal path extension,” in IEEE International Conference on Big Data, 2016, pp. 48–55. I. Tsamardinos, C. Aliferis, A. Statnikov, and E. Statnikov, “Algorithms for large scale Markov blanket discovery.” in FLAIRS Conference, vol. 2, 2003, pp. 376–380. G. Kong, D.-L. Xu, and J.-B. Yang, “Clinical Decision Support Systems: A review on knowledge representation and inference under uncertainties,” International Journal of Computational Intelligence Systems, vol. 1, no. 2, pp. 159–167, 2008. [7] N. Fenton and M. Neil, “Comparing risks of alternative medical diagnosis using Bayesian arguments,” Journal of Biomedical Informatics, vol. 43, no. 4, pp. 485–495, 2010. [8] L. Mukhanov, “Using Bayesian belief networks for credit card fraud detection,” in International Conference on Artificial Intelligence and Applications, 2008, pp. 221–225. [9] N. Friedman, M. Linial, I. Nachman, and D. Pe’er, “Using Bayesian networks to analyze expression data,” Journal of Computational Biology, vol. 7, no. 3-4, pp. 601–620, 2000. [10] X. Fan and Y. Changhe, “An improved lower bound for Bayesian Network structure learning,” in Association for the Advancement of Artificial Intelligence, 2015. [11] D. Koller and N. Friedman, Probabilistic Graphical Models: Principles and Techniques. MIT Press, 2009. [12] M. Zaharia, M. Franklin, A. Ghodsi, J. Gonzalez, S. Shenker, I. Stoica, R. Xin, P. Wendell, T. Das, M. Armbrust, A. Dave, X. Meng, J. Rosen, and S. Venkataraman, “Apache Spark: a unified engine for big data processing,” Communication of the ACM, vol. 59, no. 11, pp. 56–65, 2016. [13] A. Onisko, M. Druzdezel, and H. Wasyluk, Extension of the HEPAR II Model to Multiple-Disorder Diagnosis, 2000. [14] G. Schwarz, “Estimating the dimension of a model,” The Annals of Statistics, vol. 6, pp. 461–464, 1978. [15] H. Akaike, “Information theory and an extension of the maximum likelihood principle,” in Second International Symposium on Information Theory, 1973, pp. 267–281. [16] G. Cooper and E. Herskovits, “A Bayesian method for the induction of probabilistic networks from data,” Machine Learning, vol. 9, pp. 309–347, 1992. [17] D. Heckerman, “A tutorial on learning with Bayesian networks,” 1995. [Online]. Available: http://tinyurl.com/j939ua3 [18] C. Leiserson and T. Schardl, “A work-efficient parallel breadthfirst search algorithm (or how to cope with the nondeterminism of reducers),” in ACM Symposium on Parallelism in Algorithms and Architectures, 2010, pp. 303–314. [19] O. Nikolova, J. Zola, and S. Aluru, “Parallel globally optimal structure learning of Bayesian networks,” Journal of Parallel and Distributed Computing, vol. 73, pp. 1039–1048, 2013. [20] C. de Campos and Q. Ji, “Efficient structure learning of Bayesian networks using constraints,” Journal of Machine Learning Research, pp. 663–689, 2011. [21] J. Tian, “A branch-and-bound algorithm for MDL learning Bayesian networks,” in Conference on Uncertainty in Artificial Intelligence, 2000, pp. 580–588. [22] “SABNA – Scalable Accelerated Bayesian Network Analytics,” https: //gitlab.com/SCoRe-Group/SABNA. [23] “Spark programming guide,” https://spark.apache.org/docs/latest/programming-guide.html. [24] “UC Irvine Machine Learning Repository,” https://archive.ics.uci.edu/ml/. [25] S. Ott, S. Imoto, and S. Miyano, “Finding optimal models for small gene networks,” in Pacific Symposium on Biocomputing, 2004, pp. 557–567. [26] M. Koivisto and K. Sood, “Exact Bayesian structure discovery in Bayesian networks,” Journal of Machine Learning Research, vol. 5, pp. 549–573, 2004. [27] A. Singh and A. Moore, “Finding optimal Bayesian networks by dynamic programming,” Carnegie Mellon University, Tech. Rep., 2005. [28] Y. Tamada, S. Imoto, and S. Miyano, “Parallel algorithm for learning optimal Bayesian network structure,” Journal of Machine Learning Research, vol. 12, pp. 2437–2459, 2011.
2cs.AI
THE ARITHMETICAL RANK OF THE EDGE IDEALS OF GRAPHS WITH WHISKERS arXiv:1307.1652v1 [math.AC] 5 Jul 2013 ANTONIO MACCHIA Abstract. We consider the edge ideals of large classes of graphs with whiskers and for these ideals we prove that the arithmetical rank is equal to the big height. Then we extend these results to other classes of squarefree monomial ideals, generated in any degree, proving that the same equality holds. Mathematics Subject Classification (2010): 13A15, 13F55, 14M10, 05C05, 05C38. Keywords: Set-theoretic complete intersection ideals, arithmetical rank, edge ideals, whiskers, facet ideals. 1. Introduction Given a Noetherian commutative ring with identity R, the arithmetical rank (ara) of a proper ideal I of R is defined as the smallest integer s for which there exist s elements a1 , . . . , as of R such that the ideal (a1 , . . . , as ) has the same radical as I. In this case we will say that a1 , . . . , as generate I up to radical. In general ht I ≤ ara I. If equality holds, I is called a set-theoretic complete intersection. As a consequence of the Auslander-Buchsbaum formula, whenever an ideal of R = k[x1 , . . . , xn ] generated by squarefree monomials is a set-theoretic complete intersection, it is a Cohen-Macaulay ideal. The converse is not always true. We consider the case where R is a polynomial ring over a field K and I is the so-called edge ideal of a graph whose vertices are the indeterminates. Its set of generators is formed by the products of the pairs of indeterminates that form the edges of the graph. Thus I is generated by squarefree monomials of degree 2, and is therefore a radical ideal. Large classes of graphs whose edge ideals are Cohen-Macaulay were described by Villarreal [16]. The arithmetical rank of edge ideals has recently been studied by several authors (see e.g. Kummini [12]) and explicitly determined for some special types of graphs. According to a well-known result by Lyubeznik [13], if I is a squarefree monomial ideal, the projective dimension of the quotient ring R/I, denoted pdR R/I, provides a lower bound for the arithmetical rank of I. We define the big height of I, denoted bight I, as the maximum height of the minimal prime ideals of I. In general, we have ht I ≤ bight I ≤ pdR R/I ≤ ara I. If I is not unmixed, then I is not a set-theoretic complete intersection, but it could still be true that bight I = pdR R/I = ara I. This equality has been established for the edge ideals of acyclic graphs (the so-called forests) by Kimura and Terai [11] (extending a result by Barile [1]). A weaker condition is the equality between the arithmetical rank and the projective dimension. This is the case for lexsegment edge ideals (see Ene, Olteanu, Terai [6]), for the graphs formed by one or two cycles connected through a path (cyclic and bicyclic graphs, see Barile, Kiani, Mohammadi and Yassemi [2]) and for the graphs consisting of paths and cycles with a common vertex (see Kiani and Mohammadi [9]). In all these cases, the arithmetical rank is independent of the field K. As a consequence of what we said above, the classes of Cohen-Macaulay monomial ideals are candidate to be set-theoretic complete intersections. We consider the family of whisker graphs, obtained by adding a whisker to each vertex of a given graph, i.e., by attaching a terminal edge to all its vertices. More in general, we can define the fully clique-whiskered graphs in the following way: given a graph G, a subset C of the vertex set V (G) is a 1 2 clique if it induces a complete subgraph of G. If we partition V (G) in cliques W1 , . . . , Wt and add a new vertex wi for every clique and the edges vwi for every v ∈ Wi , then we call the resulting graph a fully clique-whiskered graph. Cook and Nagel [4] proved that the edge ideals of the fully clique-whiskered graphs are Cohen-Macaulay. In Section 3 we prove that the big height and the arithmetical rank are equal for a larger class of graphs with whiskers and, as a consequence, we will deduce that the edge ideals of the fully clique-whiskered graphs are set-theoretic complete intersections. The notion of whisker graph can be generalized in another direction. First we can consider a simplicial complex ∆ on the vertex set formed by the indeterminates, instead of a graph, and define the facet ideal as the ideal generated by the squarefree monomials corresponding to the facets of ∆. Then we can add a simplex to each vertex of ∆ and suppose that these simplices are pairwise disjoint. Faridi proved in [8] that the facet ideals obtained in this way are Cohen-Macaulay. In Section 4 we strengthen this result by showing that they are also set-theoretic complete intersections. Finally, we will add an arbitrary number of simplices to each vertex of ∆ and prove that the big height of the facet ideal of the simplicial complex obtained in this way equals the arithmetical rank. All the results presented in this paper are independent of the field K. 2. Preliminaries A useful technique that provides an upper bound for the arithmetical rank of ideals is the following result due to Schmitt and Vogel. Lemma 2.1. ([15], p. 249) Let R be a commutative ring with identity and P be a finite subset of elements of R. Let P0 , . . . , Pr be subsets of P such that S (i) ri=0 Pi = P ; (ii) P0 has exactly one element; (iii) if p and p′ are different elements of Pi (0 < i < r), there is an integer i′ , with 0 ≤ i′ < i, and an element in Pi′ which divides pp′ . P We set qi = p∈Pi pe(p) , where e(p) ≥ 1 are arbitrary integers. We will write (P ) for the ideal of R generated by the elements of P . Then p p (P ) = (q0 , . . . , qr ). Another method to estimate the arithmetical rank of monomial ideals involves the Lyubeznik resolutions and was developed by Kimura in [10]. Let R = k[x1 , . . . , xn ] and I a monomial ideal of R with minimal set of generators {u1 , . . . , uµ }, where µ = µ(I) is the minimum number of generators of I. The Taylor resolution of I is dµ where T0 = Re∅ , Ts = dµ−1 d 1 T• : 0 → Tµ −→ Tµ−1 −→ · · · −→ T0 → R/I → 0, M Rei1 ···is and ei1 ···is are free basis elements of Ts , with 1≤i1 <···<is ≤µ deg ei1 ···is = deg lcm(ui1 , . . . , uis ). The differentials are defined by s X (−1)j−1 ds (ei1 ···is ) = j=1 lcm(ui1 , . . . , uis ) ei1 ···ibj ···is . lcm(ui1 , . . . , uc ij , . . . , uis ) A Lyubeznik resolution is a graded free resolution of R/I which is a subcomplex of the Taylor resolution of I. 3 Definition 2.2. ([14]) For every 1 ≤ i1 < · · · < is ≤ µ, the symbol ei1 ···is is called L-admissible if uq does not divide lcm(uit , uit+1 , . . . , uis ) for all 1 ≤ t < s and for all 1 ≤ q < it . The Lyubeznik resolution of I is the subcomplex of the Taylor resolution of I generated by all L-admissible symbols. In the following we will identify the symbol ei1 ···is with the sequence of monomials ui1 , . . . , uis . A Lyubeznik resolution of I depends on the order of the generators u1 , u2 , . . . , uµ . Definition 2.3. The L-length λ of I is the minimum length of the Lyubeznik resolutions of I. While the Taylor resolution of I is far from being a minimal graded free resolution of I, a Lyubeznik resolution of I often is minimal. Theorem 2.4. ([10], Theorem 1) Let I a monomial ideal of R = k[x1 , . . . , xn ], then ara I ≤ λ. In the following we will consider squarefree monomial ideals arising from graphs, the so-called edge ideals. Definition 2.5. Let G be a graph with vertex set V (G) = {x1 , . . . , xn }, with n ∈ N, n ≥ 1, and whose edge set is E(G). Suppose that x1 , . . . , xn are indeterminates over the field K. The edge ideal of G in the polynomial ring R = K [x1 , . . . , xn ] is the squarefree monomial ideal   I(G) = xi xj {xi , xj } ∈ E(G) . For the sake of simplicity, we will use the same notation xi xj for the monomial and for the corresponding edge. Let G be a graph and x a vertex of G. Adding a whisker to the vertex x of G means adding a new vertex y and the edge connecting x and y. Definition 2.6. A subset C of V (G) is a clique if it induces a complete subgraph of G. A clique vertex-partition of G is a set π = {W1 , . . . , Wt } of disjoint (possibly empty) cliques of G whose union is V (G). Notice that G may admit many different clique vertex-partitions, and every graph has at least one clique vertex-partition, namely the trivial partition τ = {{x1 }, . . . , {xn }}. Definition 2.7. Given a clique W of G, a clique-whiskering of W is given by adding a new vertex w and connecting w to every vertex in W . Let π = {W1 , . . . , Wt } be a clique vertex-partition of G. Consider the cliquewhiskering of every clique of π obtained by adding the vertex wi to Wi (where wi 6= wj if i 6= j). We call the graph Gπ obtained in this way fully clique-whiskered. This graph has vertex set V (G) ∪ {w1 , . . . , wt } and edge set E(G) ∪ {vwi | v ∈ Wi }. If τ is the trivial partition, we call the Gτ the whisker graph on G. Note that empty cliques produce isolated vertices. Example 2.8. Let G be the three-cycle C3 on the vertex set {x1 , x2 , x3 }. There are three distinct clique vertexpartitions of G (without empty cliques): the trivial partition τ = {{x1 }, {x2 }, {x3 }}, π = {{x1 , x2 }, {x3 }} and ρ = {{x1 , x2 , x3 }}. These partitions produce the following fully clique-whiskered graphs: 4 y3 b y2 b τ Gρ π G G b x3 x3 b x3 b b x1 y1 b b b y1 x2 x1 b b b x2 x1 b b x2 y2 b y1 Figure 1. Clique-whiskerings of the three-cycle Cook and Nagel [4] have shown the following result: Theorem 2.9. ([4], Corollary 3.5) Let π be a clique vertex-partition of a graph G and let Gπ be the fully cliquewhiskering graph of G on π. Then the ideal I(Gπ ) is Cohen-Macaulay. Remark 2.10. Suppose that |V (G)| = n. Then ht I(Gπ ) = n because I(Gπ ) is pure (see Bruns-Herzog [3], Cor. 5.1.5) and the ideal generated by the vertices of G is a minimal prime ideal of I(Gπ ). Theorem 2.9 had previously been proven by Dochtermann and Engström [5] for whisker graphs, which is also a special case of [8], Theorem 8.2. In the same way as squarefree monomial ideals generated in degree two can be attached to graphs, squarefree monomial ideals with generators of any degree can, more in general, be attached to simplicial complexes. This gives rise to the notion of facet ideal, which has been extensively studied by Faridi in [7] and [8]. Definition 2.11. Let ∆ be a simplicial complex with vertex set V (∆) and facets F1 , . . . , Fq . A vertex cover for ∆ is a subset A of V (∆), with the property that for every facet Fi there is a vertex v ∈ A such that v ∈ Fi . A minimal vertex cover of ∆ is a subset A of V (∆) such that A is a vertex cover and no proper subset of A is a vertex cover for ∆. Definition 2.12. Let ∆ be a simplicial complex on the vertex set V (∆) = {x1 , . . . , xn }. The facet ideal of ∆ is the ideal I(∆) in k[x1 , . . . , xn ] generated by all squarefree monomials xi1 · · · xis , such that {xi1 , . . . , xis } is a facet of ∆. Proposition 2.13. ([7], Proposition 1) Let ∆ be a simplicial complex over n vertices. Consider the facet ideal I(∆) in the polynomial ring R = k[x1 , . . . , xn ]. Then an ideal P = (xi1 , . . . , xis ) of R is a minimal prime of I(∆) if and only if {xi1 , . . . , xis } is a minimal vertex cover for ∆. Let us consider a simplicial complex ∆ on the vertex set V (∆) = {x1 , . . . , xn }. For every vertex xi , we add a facet Fi of dimension ≥ 1 such that • Fi ∩ V (∆) = {xi }, for every i = 1, . . . , n, • Fi ∩ Fj = ∅ if i 6= j, for every i, j = 1, . . . , n. We will call ∆′ the simplicial complex obtained in this way. Theorem 2.14. ([8], Theorem 8.2) With respect to the above notations, the facet ideal I(∆′ ) is Cohen-Macaulay. 5 Remark 2.15. We have that ht I(∆′ ) = n because I(∆′ ) is pure (see Bruns, Herzog [3], Cor. 5.1.5) and, in view of Proposition 2.13, the ideal generated by the vertices of ∆ is a minimal prime ideal of I(∆′ ). 3. The arithmetical rank of the edge ideals of graphs with whiskers In this section we prove the equality between the arithmetical rank and the (big) height for the edge ideals of some classes of graphs obtained by adding one or more whiskers to every vertex of a given graph. We provide explicit formulas and examine the special case where the graph is a cycle. Proposition 3.1. Let G be a graph on the vertex set V (G) = {x1 , . . . , xn }. Consider a partition {W1 , . . . , Wt } of V (G). For all i = 1, . . . , t, and for every xj ∈ Wi add a new vertex yi and the whisker xj yi . Let G′ be the graph obtained in this way. Then bight I(G′ ) = ara I(G′ ) = n. In particular, every fully clique-whiskered graph is a set-theoretic complete intersection. Proof. Suppose that W1 = {x1 , . . . , xm1 }, W2 = {xm1 +1 , . . . , xm2 }, . . . , Wt = {xmt−1 +1 , . . . , xmt = xn }. First we show that bight I(G′ ) ≥ n. The set A = {x1 , . . . , xn } is a minimal vertex cover since one of the vertices of each edge of G′ belongs to A. The vertex cover A is minimal because removing a vertex xj ∈ Wi , for some i, j, would leave the whisker xj yi uncovered. Hence bight I(G′ ) ≥ n. Next, we prove that ara I(G′ ) ≤ n. Let us consider the following ordering of the quadratic monomials: x1 x2 x1 x3 .. . ··· ··· x1 xn .. . x1 y 1 .. . xm1 xm1 +1 xm1 +1 xm1 +2 .. . ··· ··· xm1 xn xm1 +1 xn .. . xm1 y1 xm1 +1 y2 .. . xmt−1 +1 xmt−1 +2 · · · xmt−1 +1 xn xmt−1 +1 yt .. .. . . xn y t and arrange the generators of I(G′ ) according to the induced ordering. Let u be an admissible symbol for I(G′ ). We want to show, by induction on n, that u has length at most n. The claim is true for n = 2, because the symbol consisting of x1 x2 , x1 y1 , x2 yi is not admissible if i = 1 or i = 2. Let n > 2 and suppose that there are exactly r monomials in u containing the variable x1 (these are monomials appearing in the first row of the above table), and precisely x 1 x i1 , x 1 x i2 , . . . , x 1 x ir , or x1 xi1 , x1 xi2 , . . . , x1 xir−1 , x1 y1 . In both cases, every other monomial in u cannot contain any of the variables xi1 , xi2 , . . . , xir−1 , because x1 xij divides x1 xir xij and x1 y1 xij for all j = 1, . . . , r − 1. Thus, the remaining monomials in u form an admissible  symbol for a graph of the same type of G′ on a vertex set W ⊂ {x2 , . . . , xn } r {xi1 , . . . , xir−1 } ∪ {y1 , . . . , yt }. By induction, this symbol has length at most n−1−(r−1) = n−r. Therefore u has length at most r+n−r = n. It follows, from Theorem 2.4, that ara I(G′ ) ≤ n. Hence bight I(G′ ) = ara I(G′ ) = n.  The second part of the statement follows from Remark 2.10. 6 If G is the whisker graph on a cycle graph Cn , using Lemma 2.1 we can find n polynomials that generate I(G) up to radical and whose expressions are simpler than those obtained using the technique due to Kimura (compare what follows with the proof of Theorem 1 in [10]). Given a cycle Cn on the vertex set V (Cn ) = {x1 , . . . , xn }, we consider the n-sunlet graph Sn on Cn , obtained by adding to each vertex xi of Cn a whisker, whose terminal vertex is yi , for all i = 1, . . . , n. Example 3.2. For each n ∈ N, n ≥ 3, the edge ideal of the n-sunlet graph Sn is a set-theoretic complete intersection, namely ara I(Sn ) = ht I(Sn ) = |V (Cn )| = n. We distinguish the following cases. If n = 3, consider the following sums of monomials q 0 = x1 x2 q 1 = x1 x3 + x2 x3 q 2 = x1 y 1 + x2 y 2 + x3 y 3 . If n = 4, set q 0 = x1 x2 q 1 = x1 x4 + x2 x3 q 2 = x1 y 1 + x2 y 2 + x3 x4 q 3 = x3 y 3 + x4 y 4 . Finally, for n = 5, set q 0 = x1 x2 q 1 = x1 x5 + x2 x3 q 2 = x1 y 1 + x4 x5 q 3 = x2 y 2 + x3 x4 + x3 y 3 x5 y 5 q 4 = x3 y 3 + x4 y 4 + x5 y 5 . Now suppose that n ≥ 6. In this case set q 0 = x1 x2 q 1 = x1 xn + x2 x3 q 2 = x2 y 2 + x3 x4 .. . qn−4 = xn−4 yn−4 + xn−3 xn−2 qn−3 = x1 y1 + xn−1 xn qn−2 = xn−3 yn−3 + xn−2 xn−1 + xn−2 yn−2 xn yn qn−1 = xn−2 yn−2 + xn−1 yn−1 + xn yn . 7 p Then, in any case, we have I(Sn ) = (q0 , . . . , qn−1 ) by Lemma 2.1. We show that its assumptions are fulfilled by the sets P0 , . . . , Pn−1 , where, for all i = 0, . . . , n − 1, Pi is the set of monomials appearing in qi . It is straightforward to verify that conditions (i) and (ii) are satisfied. Evidently condition (iii) is true if n ∈ {3, 4, 5}. We prove it for n ≥ 6. The product of the monomials in P1 is x1 xn · x2 x3 , which is a multiple of x1 x2 ∈ P0 . For i = 2, . . . , n − 4, the product of the monomials of Pi is xi yi · xi+1 xi+2 , which is a multiple of xi xi+1 ∈ Pi−1 . The product of the monomials of Pn−3 is x1 y1 · xn−1 xn , a multiple of x1 xn ∈ P1 . In Pn−2 , we can form three products: xn−3 yn−3 · xn−2 xn−1 and xn−3 yn−3 · xn−2 yn−2 xn yn , which are multiples of xn−3 xn−2 ∈ Pn−4 , and xn−2 xn−1 · xn−2 yn−2 xn yn , which is a multiple of xn−1 xn ∈ Pn−3 . As for Pn−1 , we have xn−2 yn−2 · xn−1 yn−1 , which is a multiple of xn−2 xn−1 ∈ Pn−2 , xn−2 yn−2 · xn yn , which is an element of Pn−2 , and xn−1 yn−1 · xn yn which is a multiple of xn−1 xn ∈ Pn−3 . This completes the proof. Example 3.2 can be generalized as follows. Example 3.3. Let Cn be a cycle graph with vertex set {x1 , . . . , xn } and add k whiskers to each vertex of Cn . Let G be the graph obtained in this way and yi,1 , . . . , yi,k be the terminal vertices of the whiskers on xi . Then lnm jnk + k. bight I(G) = ara I(G) = 2 2 First we define a minimal vertex cover of G. We choose the vertices lnm jnk x2j−1 for all j = 1, . . . , and y2j,1 , . . . , y2j,k for all j = 1, . . . , . 2 2 Thus bight I(G) ≥ lnm 2 + jnk 2 k. Now we define the same number of polynomials generating I(G) up to radical. We distinguish three cases: • if n = 3, we set q 0 = x1 x2 q 1 = x1 x3 + x2 x3 qj+1 = x1 y1,j + x2 y2,j + x3 y3,j     for j ∈ {1, . . . , k}. Thus, by Lemma 2.1, ara I(G) ≤ 2 + k = 32 + 32 k. • if n is even, let q0 , . . . , qn−1 be as in Example 3.2, with yj replaced by yj,1 for all j = 1, . . . , n. Then set qn+ n2 (j−2) = x1 y1,j + x2 y2,j qn+ n2 (j−2)+1 = x3 y3,j + x4 y4,j .. . qn+ n2 (j−2)+ n2 −1 = xn−1 yn−1,j + xn yn,j for j ∈ {2, . . . , k}. According to Lemma 2.1, the polynomials q0 , . . . , qn+ n2 (k−1)−1 generate I(G) up to     radical. Hence ara I(G) ≤ n + n2 (k − 1) = n2 + n2 k. 8 • if n is odd, let q0 , . . . , qn−1 be as in Example 3.2, with yj replaced by yj,1 for all j = 1, . . . , n. Then set qn+⌊ n ⌋(j−2) = x1 y1,j + x2 y2,j + xn yn,j x3 y3,j 2 qn+⌊ n ⌋(j−2)+1 = x3 y3,j + x4 y4,j + xn yn,j x5 y5,j 2 .. . qn+⌊ n ⌋(j−2)+⌊ n ⌋−2 = xn−4 yn−4,j + xn−3 yn−3,j + xn yn,j xn−2 yn−2,j 2 2 qn+⌊ n ⌋(j−2)+⌊ n ⌋−1 = xn−2 yn−2,j + xn−1 yn−1,j + xn yn,j 2 2       for j ∈ {2, . . . , k}. By Lemma 2.1, ara I(G) ≤ n + n2 (k − 1) = n2 + n2 k. Therefore bight I(G) = ara I(G) = lnm 2 + jnk 2 k. 4. The arithmetical rank of some facet ideals In this section we prove the equality between the arithmetical rank and the (big) height for the facet ideals of some classes of simplicial complexes obtained by adding one or more facets to every vertex of a given simplicial complex. Again, we provide explicit formulas. The simplicial complexes considered in the following proposition are a special case of the so-called grafted simplicial complexes considered by Faridi in [8]. Proposition 4.1. Let ∆ be a simplicial complex on the vertex set V (∆) = {x1 , . . . , xn }. For every vertex xi , we add a facet Fi of dimension ≥ 1 such that • Fi ∩ V (∆) = {xi }, for every i = 1, . . . , n, • Fi ∩ Fj = ∅ if i 6= j, for every i, j = 1, . . . , n. Let ∆′ be the simplicial complex obtained in this way. Then ht I(∆′ ) = ara I(∆′ ) = n, thus I(∆′ ) is a set-theoretic complete intersection. Proof. From Remark 2.15, it follows that ht I(∆′ ) = n. we show that ara I(∆′ ) ≤ n by proving that the Llengthnof I(∆′ ) is at most o n. For every facet Fi , we denote by uFi the monomial corresponding to Fi and set (i) (i) Fi = xi , y1 , . . . , ypi . Let us consider the lexicographic ordering of the monomial generators of I(∆′ ), with (1) (1) (n) x1 < x2 < · · · < xn < y 1 < · · · < y p 1 < · · · < y 1 (n) < · · · < ypn : u1,1 u1,2 · · · u2,1 · · · u1,s1 u2,s2 .. . uF1 uF2 .. . uFn Let α be an admissible symbol for ∆′ consisting of the monomials α1 , . . . , αm , for some m ≥ 1. We want to show, by induction on n, that α has length at most n. The claim is true for n = 2, because the symbol consisting of x1 x2 , uF1 , uF2 is not admissible. Let n > 2 and suppose that there are exactly r monomials in α containing the variable x1 (these are monomials appearing in the If r = 0, o n first row of the above table). (i) (i) then α is an admissible symbol on the vertex set {x2 , . . . , xn } ∪ y1 , . . . , ypi i = 2, . . . , n , so the claim 9 follows by induction. If r = 1, then the monomials α2 , . . . , αm form an admissible symbol β on the vertex set o n (i) (i) {x2 , . . . , xn }∪ y1 , . . . , ypi i = 2, . . . , n and, by induction, |β| ≤ n−1. Hence |α| = 1+|β| ≤ 1+n−1 = n. Now suppose that r ≥ 2 and that the monomials of α containing the variable x1 are precisely α1 = u1,i1 , α2 = u1,i2 , . . . , αr−1 = u1,ir−1 , and αr = u1,ir or αr = uF1 . We set Vi = {xj | xj divides αi , xj 6= x1 } for every i = 1, . . . , r (if αr = uF1 , then Vr = ∅). Consider, for every i = 1, . . . , r − 1, the set Vi r Wi , where Wi = Vi+1 ∪ · · · ∪ Vr . The following two properties hold: 1) Vi r Wi 6= ∅, for every i = 1, . . . , r − 1, 2) (Vi r Wi ) ∩ Vj = ∅, for every 1 ≤ i < j ≤ r − 1. For the first property, suppose for a contradiction that Vi r Wi = ∅ for some i. Then Vi ⊂ Wi = Vi+1 ∪ · · · ∪ Vr and this implies that αi divides lcm(αi+1 , . . . , αr ), against the assumption that α is admissible. The second property is true because Vj ⊂ Wi if 1 ≤ i < j ≤ r − 1. Note that the indeterminates in Vi ∩ Wi appear both in αi and in some of the monomials αi+1 , . . . , αr . Therefore, for the symbol α to be admissible, at least one indeterminate in Vi r Wi must not appear in the monomials αr+1 , . . . , αm (otherwise αi divides lcm(αi+1 , . . . , αm )). By virtue of 2), for every j = 1, . . . , r − 1, we can thus choose an indeterminate xij that appears in αj and does not appear in the monomials αr+1 , . . . , αm , in such a way that xi1 , . . . , xir−1 are pairwise distinct. It follows that n the monomials αr+1 , . . . , αm form an admissible o  (i) (i) symbol β on the vertex set {x2 , . . . , xn } r {xi1 , . . . , xir−1 } ∪ y1 , . . . , ypi i ∈ {2, . . . , n} r {i1 , . . . , ir−1 } . By induction, |β| ≤ n − 1 − (r − 1) = n − r. Then |α| = r + |β| ≤ r + n − r = n.  Corollary 4.2. Let ∆ be a simplicial complex on the vertex set {x1 , . . . , xn }. For every vertex xi , we add mi ≥ 1 facets Fi,1 , . . . , Fi,mi of dimension ≥ 1 such that • Fi,j ∩ V (∆) = {xi }, for every i = 1, . . . , n and j = 1, . . . , mi , • Fi,j ∩ Fi,k = {xi }, for every i = 1, . . . , n and j, k = 1, . . . , mi , j 6= k, • Fi,j ∩ Fh,k = ∅ if i 6= h, for every i, h = 1, . . . , n, j = 1, . . . , mi and k = 1, . . . , mh . Call ∆′ the simplicial complex obtained in this way. Then bight I(∆′ ) = ara I(∆′ ). Proof. For every facet Fi,j , we denote by uFi,j the monomial corresponding to Fi,j and suppose that n o (i,j) (i,j) Fi,j = xi , y1 , . . . , yp(i,j) . Let us consider the lexicographic ordering of the monomial generators of I(∆′ ), with (1,1) x1 < x2 < · · · < xn < y 1 (1,m1 ) < · · · < yp(1,1) < · · · < y1 (1,1) u1,1 u1,2 · · · u2,1 · · · .. . u1,s1 u2,s2 .. . (n,mn ) 1) < · · · < yp(1,m < · · · < y1 (1,m ) 1 uF1,1 uF2,1 .. . xn−1 xn uFn−1,1 uFn,1 ··· ··· uF1,m1 uF2,m2 .. . ··· ··· uFn−1,mn−1 uFn,mn n) < · · · < yp(n,m : (n,mn ) Let α be an admissible symbol for ∆′ with maximal length and call Γ the simplicial complex ∆ ∪ hF1,1 i ∪ · · · ∪ hFn,1 i, where hF i is the simplex spanned by F . Note that, if uFi,j ∈ α, then uFi,h ∈ α for every h ∈ {1, . . . , mi }, 10 otherwise α does not have maximal length. In fact, if uFi,j ∈ α, but uFi,h ∈ / α for some h 6= j, then the symbol β obtained by adding uFi,h to α is admissible and |β| > |α|. Now suppose that α consists of the monomials: uh1 ,j1 , . . . , uhs ,js and uFi1 ,1 , . . . , uFi1 ,mi , . . . , uFik ,1 , . . . , uFik ,mi , 1 k ordered as above. We define the set n o (ih ,mih ) (i ,1) A = y1 h , . . . , y1 h = 1, . . . , k ∪ {xi | i ∈ {1, . . . , n} r {i1 , . . . , ik }} . (i ,1) (ih ,mi ) h Then A is a minimal vertex cover for ∆′ . First note that, for every h ∈ {1, . . . , n}, xh ∈ A or y1 h , . . . , y1 ∈ (j1 ,1) (jt ,1) ∈ A, with j1 , . . . , jt A. Hence one of the vertices of each Fi,j belongs to A. Moreover, if y1 , . . . , y1 pairwise distinct, then xj1 · · · xjt ∈ / ∆. Otherwise, the monomial xj1 · · · xjt would precede the monomials uF(j1 ,1) , . . . , uF(jt ,1) in the above ordering. Since xj1 · · · xjt divides uF(j1 ,1) · · · uF(jt ,1) , this would imply that α is not admissible, against our assumption. This shows that one of the vertices of each facet of ∆ belongs to A. (i,j) Therefore A is a vertex cover for ∆′ . It is minimal, because removing a vertex y1 or a vertex xi would leave the facet Fi,j uncovered. Finally, we prove that the length of α is less than or equal to |A|. Consider the symbol β formed by the monomials uh1 ,j1 , . . . , uhs ,js and uFi1 ,1 , . . . , uFik ,1 . n o (n,1) (n,1) (1,1) (1,1) This is an admissible symbol on the vertex set x1 , . . . , xn , y1 , . . . , yp(1,1) , . . . , y1 , . . . , yp(n,1) for the simplicial complex Γ. Hence, by Proposition 4.1, s + k ≤ n and it follows that |α| = s + m1 + · · · + mk ≤ m1 + · · · + mk + n − k = |A|. Therefore, bight I(∆′ ) ≤ ara I(∆′ ) ≤ |α| ≤ |A| ≤ bight I(∆′ ), where the second inequality follows from Theorem 2.4.  Remark 4.3. Let G be a graph and add mi ≥ 1 whiskers to each vertex of G. Let us call the graph G′ obtained in this way a multiwhisker graph on G. Then, from Corollary 4.2, it follows that bight I(G′ ) = ara I(G′ ). Example 3.3 provides an explicit formula when G = Cn and mi = k for every i. References [1] M. Barile, On the arithmetical rank of the edge ideals of forests. Comm. Algebra 36 (2008), 12, 4678-4703. [2] M. Barile, D. Kiani, F. Mohammadi and S. Yassemi, Arithmetical rank of the cyclic and bicyclic graphs. J. Algebra Appl. 11 (2012), 2, 14 pp. [3] W. Bruns and J. Herzog, Cohen-Macaulay Rings. Cambridge University Press, Cambridge, 1996. [4] D. Cook and U. Nagel, Cohen-Macaulay graphs and face vectors of flag complexes. SIAM J. Discrete Math. 26 (2012), 1, 89-101. [5] A. Dochtermann and A. Engström, Algebraic properties of edge ideals via combinatorial topology. Electron. J. Combin 16 (2009), 2, 24 pp. [6] V. Ene, O. Olteanu and N. Terai, Arithmetical rank of lexsegment edge ideals. Bull. Mat. Soc. Sci. Mat. Roumanie (N.S.) 53 (2010), 101, 315-327. [7] S. Faridi, The facet ideal of a simplicial complex. Manuscripta Math. 109 (2002), 159-174. [8] S. Faridi, Cohen-Macaulay properties of square-free monomial ideals. J. Combin. Theory Ser. A 109 (2005), 2, 299-329. [9] D. Kiani and F. Mohammadi, On the arithmetical rank of the edge ideals of some graphs. Alg. Coll. 19 (2012), 1, 797-806. [10] K. Kimura, Lyubeznik resolutions and the arithmetical rank of monomial ideals. Proc. Amer. Math. Soc. 137 (2009), 11, 3627-3635. 11 [11] K. Kimura and N. Terai, Binomial arithmetical rank of edge ideals of forests. Proc. Amer. Math. Soc. 141 (2013), 19251932. [12] M. Kummini, Regularity, depth and arithmetic rank of bipartite edge ideals. J. Algebraic Combin. 30 (2009), 4, 429-445. [13] G. Lyubeznik, On the local cohomology modules Hai (R) for ideals a generated by monomials in an R-sequence. In Complete Intersections, Acireale 1983, Lecture Notes in Math., vol.1092, Springer-Verlag, Berlin, 1984, pp. 214-220. [14] G. Lyubeznik, A new explicit finite free resolution of ideals generated by monomials in an R-sequence. J. Pure Appl. Algebra 51 (1988), 1-2, 193-195. [15] T. Schmitt and W. Vogel, Note on set-theoretic intersections of subvarieties of projective space. Math. Ann. 245 (1979), 3, 247-253. [16] R.H. Villarreal, Cohen-Macaulay graphs. Manuscripta Math. 66 (1990), 3, 277-293. Antonio Macchia, Dipartimento di Matematica, Università degli Studi di Bari “Aldo Moro”, Via Orabona 4, 70125 Bari, Italy E-mail address: [email protected]
0math.AC
Towards Practical File Packetizations in Wireless Device-to-Device Caching Networks Nicholas Woolsey, Student Member, IEEE, Rong-Rong Chen, Member, IEEE, arXiv:1712.07221v1 [cs.IT] 19 Dec 2017 and Mingyue Ji, Member, IEEE Abstract We consider wireless device-to-device (D2D) caching networks with single-hop transmissions. Previous work has demonstrated that caching and coded multicasting can significantly increase per user throughput. However, the state-of-the-art coded caching schemes for D2D networks are generally impractical because content files are partitioned into an exponential number of packets with respect to the number of users if both library and memory sizes are fixed. In this paper, we present two novel combinatorial approaches to coded caching design in D2D networks with the goal of reducing the required packetization while keeping the desired throughput gain compared to the conventional uncoded unicasting. The first proposed approach is based on a novel “hypercube” design, where each user caches a “hyperplane” in this hypercube and the intersections of “hyperplanes” lead to coded multicasting codewords. In addition, we also extend this centralized scheme to a decentralized design. The second approach uses the RuzsaSzeméredi graph to define the cache placement and disjoint matchings on this graph represent coded multicasting opportunities. Both approaches yield an exponential reduction of packetizations with respect to the number of users while providing a per-user throughput that is comparable to the state-of-the-art designs in the literature. Furthermore, by using the spatial reuse in D2D networks, besides further reducing the required packetizations, we demonstrate that the per user throughput can be improved significantly for some parameter regimes. Index Terms Coded Caching, Device-to-Device Communication, Packetization, Spatial Reuse I. I NTRODUCTION Wireless caching is a promising approach to significantly improve the user throughput and simultaneously accommodate a large number of user demands in future generations of wireless networks [1]–[13]. In The authors are with the Department of Electrical Engineering, University of Utah, Salt Lake City, UT 84112, USA. (e-mail: [email protected], [email protected] and [email protected]) 2 this paper, we investigate achievable coded caching schemes in device-to-device (D2D) caching networks, where users strategically cache packets of content files to enable coded multicasting opportunities which serve distinct content to multiple users simultaneously. Different from the seminal shared link caching networks [1], where one source node (base station) with access to the entire library serves all the users over a multicast channel, in D2D networks, users receive requested packets from other users. For such a network consisting of n users, each caching an equivalent M files out of a library of m files, previous work demonstrates that when spatial reuse is not allowed, and when M n ≥ m and m ≥ n, meaning that any transmission can be successfully received by any users in the network, the transmission rate  m (i.e., normalized traffic load) is Θ M , which is not a function of n. Hence, the aggregate throughput of the network is scalable [14].1 This surprising result shows that the transmission rate of the shared link caching scheme in [1] and D2D caching scheme in [14] are identical for a large number of users.2 D2D caching networks have the potential to provide some unique advantages. For example, D2D caching networks have a greater flexibility to implement spatial reuse in comparison to shared link caching networks. The authors in [14] demonstrate that users in a D2D network can be grouped into clusters based on proximity. These clusters can perform the coded multicasting delivery simultaneously and surprisingly, the order-optimal traffic load in each cluster is identical to the traffic load when no clustering is enabled (e.g., consider the entire network as a single cluster). Nevertheless, clustering may improve per user throughput since the link rate (bits/second/Hz) in each cluster may increase as the size of each cluster decreases. The promised gain in per user throughput of the state-of-the-art coded D2D caching schemes relies on a large amount of file packetization which makes the networks impractical to implement. In particular, if  n + no spatial reuse is considered, let t = nM m ∈ Z , the required number of packets per file, K = t t , which grows exponentially as the number of users, n, increases. Moreover, a recent study which implements a shared link caching network with hardware demonstrates that a header packet, labeling the content of the multicast, must be included with every transmission under some scenarios [15]. The size of this header will become large as the number of packets per file increases. Spatial reuse in D2D caching networks partially solves this issue by forming many small user clusters where the number of file partitions decreases 1 Note that when no spatial reuse is allowed, the per user throughput is inversely proportional to the traffic load in the network. 2 We will use the following standard “order” notation: given two functions f and g, we say that: 1) f (n) = O (g(n)) if there exists a constant c and integer N such that f (n) ≤ cg(n) for n > N . 2) f (n) = o (g(n)) if limn→∞ f (n) g(n) = 0. 3) f (n) = Ω (g(n)) if g(n) = O (f (n)). 4) f (n) = ω (g(n)) if g(n) = o (f (n)). 5) f (n) = Θ (g(n)) if f (n) = O (g(n)) and g(n) = O (f (n)). 3 as the number of clusters increases [14]. However, spatial reuse alone may not be able to reduce the packetization sufficiently since the number of clusters in the network can be limited. In this paper, we aim to propose achievable coded caching schemes in D2D networks such that the packetization of each file is significantly reduced without sacrificing much throughput of the currently proposed D2D caching schemes. In particular, we propose two combinatorial approaches to design centralized D2D caching networks. The first approach uses a hypercube to define the cache placement and we demonstrate how the geometry of this hypercube relates to coded multicasting opportunities for delivery. The hypercube approach is optimized specifically for D2D caching networks as opposed to adapting an already studied shared link scheme. In addition, by adopting the idea recently proposed in [16], we extend this approach to a decentralized coded D2D caching scheme, which allows a much more flexible design for given network parameters. Meanwhile, the advantage of the reduced packetization of the hypercube approach still remains in the decentralized D2D caching networks. The second approach is based on an application of the Ruzsa-Szeméredi graph [17], [18], which is first used for shared link caching in [19]. In this paper, we extend the use of Ruzsa-Szeméredi graph to D2D caching networks. For both approaches, while sustaining the significant throughput gain compared to conventional uncoded unicast [20], the required packetizations are reduced exponentially with respect to the number of users n while keeping the library size m and memory size M fixed. Finally, we study the impact of enabling spatial reuse in these caching networks. Besides further reducing the required packetizations, we also demonstrate that spatial reuse can improve the per user throughput significantly for some parameter regimes. The outline of this paper is as follows. In section II, we introduce the D2D network model and problem formulation. In Section III, we present the hypercube based coded caching approach and analyze its performance. We also show that this centralized scheme can be used to design a decentralized D2D caching network. Section IV introduces the Ruzsa-Szeméredi graph based coded caching approach and analyzes its performance. In Section V, we show how the proposed schemes can take advantage of spatial reuse. Finally, we conclude the paper in Section VI. II. N ETWORK M ODEL AND P ROBLEM F ORMULATION We consider a wireless D2D network with single-hop transmissions formed by the set of users U = √ {0, . . . , n − 1}. The users are uniformly distributed on a unit grid with a minimum distance of 1/ n as shown in Fig. 1(a). Each user u ∈ U makes a request fu ∈ F , where F = {1, · · · , m} is a file library of m independently generated messages {W0 , ..., Wm−1 } with entropy F bits each. We denote 4 the demand vector as f = (f0 , · · · , fn−1 ). The file library, F , is generated once and kept unchanged during subsequent network operations. In addition, we assume m ≥ n and users request distinct files. ∆ Each user locally caches the equivalent of M files, or M F bits. Furthermore, define t = nM/m ≥ 1, as the number of times the library is cached collectively among the users. Users have active links between one another based on the protocol model [21] described as follows. A communication link, consisting of user u transmitting to user v , will be successful if and only if the distance between user u and v is less than or equal to r and user v is at least a distance of (1 + ∆)r from all transmitting users other than user u. The parameters r, ∆ > 0 are given by the protocol model. We assume that any r > 0 is possible and r dictates a constant data rate, Cr , in the unit of bits/s/Hz.3 The protocol model allows for spatial reuse as shown in Fig. 1(a). Four users, one in each green cluster, are transmitting to four other local users who are at most a distance of r away. The users receiving the transmission are at least a distance of (1 + ∆)r from the other three transmitting users. The users of Fig. 1(a) may be part of a larger network of users as shown in Fig. 1(b) which depicts active clusters (involved in a successful communication link) in green and non-active clusters (neither receiving or transmitting) in red. The set of active clusters highlighted in green is one of K sets. K is defined as the reuse factor or the number of cluster sets such that, for any given set, each cluster of that set can be active without interference and the K cluster sets collectively include all clusters. A D2D caching scheme consists of three phases: the cache placement phase, the coded delivery phase, and the transmission phase. These are defined as follows. Definition 1: (Cache Placement Phase) The cache placement phase maps the file library F onto the caches of all users u ∈ U . Every file in F is split into K equally sized packets and each user caches M K F packets or equivalently M F bits. For u ∈ U , the function φu : FmF → FM generates cache content 2 2 Zu , φu (Wf : f ∈ F), which are stored in user caches at the beginning, and kept fixed throughout ♦ subsequent operations. Definition 2: (Coded Delivery Phase) The coded delivery phase is defined by two sets of functions: the node encoding functions, denoted by {ψu : u ∈ U}, and the node decoding functions, denoted by {λu : u ∈ U}. Let RuT denote the number of coded bits transmitted by node u to satisfy the demand vector f . The transmission rate of node u is defined by Ru = T Ru F . F The function ψu : FM × F n → FF2 Ru 2 generates the transmitted message Xu,f , ψu (Zu , f) of node u as a function of its cache content Zu and 3 Note that in practice, Cr can be a function of the transmission range r. However, the protocol model does not capture this relationship. 5 Fig. 1. a) Representation of 81 users on a square grid. Users are divided into 9 equally sized clusters of 9 users based on user proximity. The clusters highlighted in green represent clusters which can be simultaneously active assuming that cluster highlighted in red are not active. b) A larger network which includes the 81 users of Fig. 1(a) where the clusters highlighted in green can be simultaneously active. The reuse factor is K = 4. the demand vector f .4 Let Du denote the set of users whose transmit messages are received by user u (according to some F transmission policy in Definition 3). The function λu : F2 P v∈Du Rv F × FM × F n → FF2 decodes the 2 request of user u from the received messages and its own cache, i.e., we have Ŵu,f , λu ({Xv,f : v ∈ Du }, Zu , f). ♦ Since users make arbitrary requests, similar to [1], [14], we focus on the worst-case error probability defined as   Pe = maxn max P Ŵu,f 6= Wfu . f∈F u∈U For a given number of users n and library size m, letting the transmission rate R = P u∈U Ru , we say that the cache-rate pair (M, R) is achievable if ∀ ε > 0 there exists a sequence indexed by the file size F → ∞ of cache encoding functions {φu }, delivery functions {ψu } and decoding functions {λu }, with (F ) rate R(F ) and probability of error Pe (F ) such that lim supF →∞ R(F ) ≤ R and lim supF →∞ Pe ≤ ε. Note that RF gives the achievable total traffic load transmitted in the whole network. Definition 3: (Transmission Phase) The transmission policy Π is a rule to activate D2D links in the network. Let L denote the set of all directed links. Let A ⊆ 2L denote the set of all possible feasible 4 We also refer the transmission rate to traffic load in this paper. 6 subsets of links (this is a subset of the power set of L, formed by all sets of links forming independent sets in the network interference graph induced by the protocol model). Let At ⊂ A denote a feasible set of simultaneously active links at time t. A feasible transmission policy Π consists of a sequence of activation sets, i.e., sets of active transmission links, {At : t = 1, 2, 3, . . .}, such that at each time t the ♦ active links in At do not violate the protocol model. Different from the shared link network model [1], the performance of D2D caching networks cannot be completely characterized by the transmission rate, R, because of spatial reuse under protocol model. Hence, we define the per user throughput as follows, ∆ T = F , D (1) where D is the number of channel uses required to satisfy all user requests. We say that the pair (M, T ) is achievable if RF is achievable and there exists a transmission policy Π such that the RF encoded bits can be delivered to their destinations in D ≤ F/T channel uses. Then, the optimal achievable throughput is defined as T ∗ (M ) , sup{T : (M, T ) is achievable}. Remark 1: Note that, when considering clustering and assuming that the transmission rate of each cluster is exactly Rc , we can obtain D = Rc F K Cr . Therefore, the per user throughput for a clustering scheme is Tc = Cr . Rc K (2) In the following, we will compare the per user throughput of clustering and non-clustering schemes. III. H YPERCUBE C ODED C ACHING A PPROACH √ In this section, we consider the case when the transmission range r ≥ 2. In other words, a transmission from any node can be received by the rest of the nodes in the network and there is no user clustering. We first introduce two motivating examples of the proposed hypercube coded caching approach and then present the general achievable scheme and transmission rate. A. 2-Dimension Example In this example, we propose a cache placement and a delivery scheme based on a d = 2 dimensional hypercube (a plane) lattice. We consider a D2D network with n = 4 users, m M = 2, and t = nM m = 2. Assume that each user requests a distinct file, i.e., user i requests file fi . The 2-dimensional lattice is 7 constructed where the size of each dimension is m M = 2. Each lattice point represents a set of m packets, each from a different file in F . For instance, in Fig. 2(a), each lattice point represents {Wi,(j,k) , i ∈ F} where Wi,(j,k) is a packet from file i ∈ F and the subscript (j, k) represents the corresponding position on the lattice. Hence, the total number of lattice points equals the number of packets per file. Since in m t m d this case we have t = d = 2, there are K = ( M ) = (M ) = 22 = 4 points in this 2-dimensional lattice, corresponding to 4 partitions of each file. The number of users equals t times the number of lattice points on each dimension, i.e., n = m Mt = m Md = 2 · 2 = 4. For the cache placement, each user caches a line on the lattice as shown in Fig. 2(a). For instance, user 0 caches Wi,(0,0) and Wi,(0,1) for all i ∈ F . The intersection of two lines represents a set of packets cached by two users. Each user requests two packets (from its demanded file) each of which is in the cache of two other users. In the delivery phase, each user unicasts two requested packets to the appropriate users. In this example, the number of user groups is equivalent to the number of packets per file and m t ) = 22 = 4 user groups, each with a size of t = 2, i.e., we pick one user from each there are K = ( M dimension. User 0 is involved in two user groups, {0, 2} and {0, 3}. Hence, user 0 will send Wf2 ,(0,1) to user 2 and send Wf3 ,(0,0) to user 3. Therefore, R = 2 since the rate simply equals the number of packets that the users are missing normalized by the file size. Note that, in this simple example there is a coded multicasting opportunity. Each user can include their transmitted packets into a single coded multicast. For instance, user 0 can transmit Wf3 ,(0,0) ⊕ Wf2 ,(0,1) to users 2 and 3, who can decode Wf2 ,(0,1) and Wf3 ,(0,0) successfully. However, as we will see later, this pattern will not hold for larger values of n and t. The multicasting opportunities which scale with n and t consist of users transmitting requested packets to a set of t − 1 users whose cache “planes” are aligned along different dimensions. This will be shown in the following example. B. 3-Dimension Example Mn m = 3 and each  m t = 3 lattice points. Hence, the number of packets per file is K = M = 27. We consider a 3-dimensional hypercube (cube in this case), where d = t = m dimension consists of M  m m 2 Let n = M t= M = 9 and user i request file i. Similar to the 2-dimensional lattice, each lattice point on the cube represents a set of m packets, each from a different Wi , i ∈ F (see Fig. 2(b)). For the cache placement, each user caches all packet sets represented by a plane of lattice points of the cube. In Fig. 2(b), we show the cache of 3 users, u0 , u1 and u2 , depicted by the red, green and blue planes which are orthogonal (let users u0 = 2, u1 = 4 and u2 = 8). Given this 3-tuple of orthogonal planes, first consider the packet set {Wi,(2,1,2) , ∀i ∈ F} which lies on the intersection of all three planes and therefore 8 (a) (b) Fig. 2. a) An example of the proposed scheme in a D2D network with n = 4, M/m = 1/2 and K = 4. Each point on the lattice represents a set of packets. Each user’s cache is represented by a line, where the user caches the points on the lattice which intersect that line. b) Each point on the 3D-lattice represents a set of packets. Each user’s cache is represented by a plane of lattice points. The right figure represents a multicasting group, or a collection of 3 planes, where any two are orthogonal. The points on the intersection of two or more of these planes are highlighted. Every two users in this group share two packets that are requested by the third user. cached by all 3 users. Any packet from this set does not need to be transmitted among these 3 users. Next, consider packets which are cached by exactly 2 of the 3 users. This is analogous to the points which lie on the intersection of exactly 2 out of the 3 planes. The intersection of the red and green planes yields the points representing the packets Wi,(2,1,0) and Wi,(2,1,1) for all i ∈ F . These packets are cached at both users u0 and u1 , but not user u2 . It can be seen that Wf8 ,(2,1,0) and Wf8 ,(2,1,1) are requested by user u2 = 8, and are available at user u0 and u1 . In general, each user among this 3-tuple requests two packets which are cached at the other two users. Equivalently, this shows a coding opportunity for multicasting from one user to the other two users within this 3-tuple, which will be shown in the following. In this delivery phase, each user will multicast the coded packets based on the observations discussed above. In particular, every 3-tuple of orthogonal planes on the cube (representing the cache content of 3 users) represents a coded multicasting group, where each user multicasts one codeword to the other two users. For example, in Fig. 2(b), for the depicted 3-tuple of planes (red, blue, green), user u0 transmits Wf4 ,(2,2,2) ⊕ Wf8 ,(2,1,1) to u1 and u2 ; user u1 transmits Wf2 ,(1,1,2) ⊕ Wf8 ,(2,1,0) to u0 and u2 ; user u2 transmits Wf2 ,(0,1,2) ⊕Wf4 ,(2,0,2) to u0 and u1 . By using the cached packets, each user within this multicast group can decode the requested packets. In this case, 3 coded multicasting packets are transmitted and will result in a traffic load of 3 27 = 19 . In general, each user needs packets which are associated with all lines orthogonal to the plane representing that user’s cache. These lines are formed by the intersections of 9 all planes which are orthogonal to each other and orthogonal to the plane representing the user’s cache. In other words, each user will receive all requested packets by forming multicasting groups with all pairs of users for which all three users cache a plane orthogonal to each other. The total number of 3-tuples, or multicasting groups, is equivalent to the number of lattice points, K . The transmission rate is equal  m t to the product of the number of multicasting groups, K = M = 27, the number of transmissions per  t m 1 group, t = 3, and the size of each transmission, 1/ M = 27 . Therefore, R = 3. m 2 C. General Achievable Scheme for n = ( M ) We build a hypercube lattice with t dimensions and each dimension has m M lattice points in length. Each lattice point represents a set of m packets, each from a different i ∈ F . Each user caches packets represented by the lattice points of a distinct (t − 1)-dimensional hyperplane of the hypercube by holding one dimension constant and allowing other dimensions to vary. In the delivery phase, each multicast group comprises of users, each of which caches a hyperplane that is “orthogonal” to the cached hyperplanes of every other user in the group. Within these groups, users multicast a set of coded packets requested by other users in the group. Formally, the cache placement and delivery phase are as follows:  m t • Cache Placement Phase: For all Wi ∈ F , partition file Wi into M packets of equal size labeled m as Wi,(`0 ,...,`t−1 ) where `j ∈ {0, . . . , M − 1} for all j ∈ {0, . . . , t − 1}. Let user u ∈ U cache a set of packets {Wi,(`0 ,...,`t−1 ) , i = 1, · · · , m} such that `j = (u mod m M ), m where j = bu/ M c, and m m t−1 `i ∈ {0, . . . , M − 1} for any i 6= j . Hence, each user caches ( M ) packets from each file i ∈ F .5 • Delivery Phase: Consider all sets of users S = {u0 , . . . , ut−1 } ⊂ {0, . . . , n − 1} such that  m buj / M c = j for all j ∈ {0, . . . , t − 1} and |S| = t. Each user ui ∈ S transmits ⊕s∈{0,...,t−1}\i Wfus ,(a0 ,...,at−1 ) (3) where aq =    (us + s − i) mod   uq mod m M, m M, if q = s (4) if q 6= s The correctness of the proposed scheme is shown in Appendix A. To illustrate the notations of the general scheme, we re-state the 3-dimensional example discussed in Section III-B as follows. 5 Throughout this paper, we use the following definition for the modulo operation: a mod b = a − ba/bc. It follows that if a ∈ Z and b ∈ Z+ , then a mod b is a non-negative integer in the range of [0, b − 1]. 10 m 2 1) An Example Using General Scheme for n = ( M ) : In Fig. 2(b), the selected multicast group is a set of three users: S = {2, 4, 8}. We relabel these users so that u0 = 2, u1 = 4 and u2 = 8.  m This satisfies the condition that j = buj / M c for j ∈ {0, . . . , t − 1}, which ensures that these 3 users cache planes orthogonal to each other. Moreover, S ⊂ {0, . . . , n − 1} and |S| = t. Using (3) and (4), user u0 (user 2) includes a packet in a multicast for all s ∈ {0, 1, 2} \ 0. Those packets are Wfu1 ,(u0 mod m M ,(u1 +1) mod values of u0 , u1 , u2 and m M m M ,u2 mod m M ) and Wfu2 ,(u0 mod m M ,u1 mod m M ,(u2 +2) mod m M ). Substituting the yields packets Wf4 ,(2,2,2) and Wf8 ,(2,1,1) which match the packets u0 transmits in Fig. 2(b). In the cache placement phase, user 2 caches all packets Wi,(2,`1 ,`2 ) for i ∈ {0, ..., m − 1} and `1 , `2 ∈ {0, 1, 2}. Both packets transmitted by user 2 satisfy these conditions. Furthermore, user 4 only caches packets {Wi,(`0 ,1,`2 ) }, and user 8 only caches packets {Wi,(`0 ,`1 ,2) }. Hence, we recognize that Wf4 ,(2,2,2) is in user 8’s cache, but not in user 4’s cache and the opposite is true for Wf8 ,(2,1,1) . Therefore, both user 4 and 8 can decode the requested packet as they have the other packet of the coded multicast cached. A similar argument will show the coded multicasts from users 4 and 8 follow (3) and (4) can effectively deliver the requested packets to users {2, 8} and {2, 4}, respectively. D. Achievable Rate and Packetization The achievable rate using the proposed hypercube based approach is given by the following theorem. Theorem 1: Let m, n, M be the library size, number of users and the cache size per user, respectively. √  m 2 m , M ∈ Z+ and t ≥ 2, the following rate is achievable: For r ≥ 2, n = M Rhc (M ) = with the requirement of K = K hc = √ √ n n m M (5) . Proof: The number of packets per file is equal to  m t  m nM/m √ √ n K hc = = = n , M M m M, or the number of lattice points of each dimension, (6) raised to the power equal to the number of dimensions, t. The multicast groups consist of all possible user sets such that one user is selected from t (number  m t m of dimensions) sets of M (number of lattice points per dimension) users. Therefore, there are M  m t multicast groups for which each of t users transmits a codeword with a length of 1/ M F . The rate is then hc R (M ) =  m t M ·t· F 1 t m (M ) F =t= nM m = m M (7) 11 where n =  m 2 M . The throughput achieved by the proposed achievable scheme is given as follows. m M Corollary 1: Let Cr be the constant link rate under the protocol model. For r ≥ √ 2, n =  m 2 M , ∈ Z+ and t ≥ 2, the throughput achieved by the proposed scheme is: T hc (M ) = Cr hc R (M ) = M Cr m (8) Proof: Following (1), in order to deliver F Rhc (M ) coded bits without spatial reuse (at most one active link transmitting at any time), we need D = F Rhc (M )/Cr channel uses. Therefore, we obtain (8). E. Extension of the achievability to n ≤  m 2 M From the construction of the hypercube scheme, we see that within each multicasting group, each user  m m 2 m us ∈ S needs to receive M − 1 packets from t − 1 users. When n = M − 1, , we have t − 1 = M meaning that each of the t − 1 users in S \ us sends c = 1 packet to user us . This guarantees a symmetric multicasting group, where every user transmits the same number of coded packets. The work of [14] demonstrated that a caching scheme with symmetric multicasting groups generally results in an overall smaller transmission rate than that of a caching network with asymmetric multicasting groups. A more general condition that makes the multicasting groups symmetric is c(t − 1) = m − 1, M (9) where c ∈ Z+ . In this case, for a multicasting group, each user requests c(t − 1) packets that the rest of the t − 1 users have cached. Each user transmits c packets that a user requests. Note that these c packets cannot be included in a single coded multicast because the receiving user cannot decode more than one unknown packet and therefore cannot recover the requested packets. Hence, for each multicasting group, each user will transmit c coded multicast messages. In this case, the required number of packets per file  m t m K = Kghc = M is identical to K hc . By substituting c = ( M − 1)/(t − 1), the transmission rate is given by  M . (10) M M m  m 2 We note that an exact description of the extension to the case of n ≤ M requires a modification of  2 m the delivery phase shown in Section III-C for n = M and its correctness follows from a modified Rghc (M ) =  m t  m −t ct = t m t−1M  1− version of the proof in Appendix A. These are omitted due to space limitation. 12 F. Comparison to State-of-the-Art D2D Caching Networks As was proposed in [14], the achievable rate and packetization pair is         m n m n M 0 0 (R , K ) = 1− ,t = − 1, t . M m t M t Implementing Stirling’s formula demonstrates that   s m M m M n M K0 = t ∼ eln n+n( m ln M +(1− m ) ln m−M ) , t 2π(m − M ) (11) (12) as n → ∞. We are interested by what factor the hypercube approach has reduced the necessary packetizations in comparison to the scheme in [14]: s M m K0 M ∼ eln n+n(1− m ) ln m−M , hc 2π(m − M ) Kg (13) which grows exponentially as n → ∞. Furthermore, we are interested in comparing R0 and R achieved by the scheme in [14] and the proposed hypercube based approach. Hence, we obtain R0 (M ) t−1 m = =1− , t nM Rghc (M ) (14) It is clear that, given a constant m and M , K0 = ∞, n→∞ Kghc (15) R0 (M ) = 1. hc (M ) n→∞ Rg (16) lim and lim The hypercube approach demonstrates a significant decrease in the number of packetizations, especially as the number of users becomes large. Furthermore, the rate only increases slightly, and for a large number of users the rate of the two schemes are essentially equivalent. G. Decentralized Coded Caching using Proposed Schemes Using the idea of [16], we will now explore the use of centralized D2D caching schemes to design decentralized coded D2D caching networks. A decentralized network consists of n users, randomly caches √ 2. A centralized cache a M m fraction of content files. In the following, we focus on the case that r ≥ placement phase defines sets of packets from which users randomly cache one of these sets independently of other users’ cache. Then, a modified delivery phase is used to serve the user requests. More specifically, we consider the file partition and cache placement of the proposed D2D caching scheme designed for n0 (dummy) users such that each of them caches a M m fraction of the content files, 13 where n0  n.6 This means that we partition each file into K 0 = cache placement proposed in Section III-C and III-E, where t0 = 0 m t M n0 M m . packets defined by the centralized Then, we have n0 sets of packets and each of which is designed to be cached by one of the n0 dummy users. Each of the n users in the decentralized network randomly caches one of the n0 packet sets defined by the centralized scheme. The probability of caching any packet set is 1 n0 . The coded multicasting opportunities become clear as we consider subsets of users in the network who have collectively cached all of the n0 packet sets exactly once. In this case, these users can have their requests satisfied by performing the corresponding delivery phase defined by the centralized scheme. This process is repeated until the remaining unsatisfied users do not collectively cache all packet sets. These remaining users are served with a slightly modified delivery phase. The following example demonstrates this process for the hypercube approach. 1) An Example: In this example, a decentralized network of n = 32 users and each user caches of the library. Let n0 = 6 and t0 = n0 M m M m = 1 3 = 2. There are 6 packet sets defined by a 2-dimensional hypercube described in Section III-E. As shown in Fig. 3, there are m M = 3 lattice points on each dimension of the 0 m t ) = 9. hypercube. The number of packets per file for this decentralized network is K 0 = Kghc = ( M The packet sets, corresponding to each row or column of the hypercube, are labeled as Zi,j where m i ∈ {0, . . . , t0 − 1} and j ∈ {0, . . . , M − 1}. Each of the 32 users caches one of these sets at random using a uniform distribution, independently of other users, such that each set has an equal probability of being cached at any given user. A possible outcome of the random caching is shown in Fig. 3. Let the random variable Xi,j be the number of users that cache Zi,j and xi.j be the realization of Xi,j . In this case, we have x0,0 = 6, x0,1 = 3, x0,2 = 6, x1,0 = 7, x1,1 = 6 and x1,2 = 4. For instance, 6 users cache the 0-th row of packets, Z0,0 , and 4 users cache the 2nd column of packets, Z1,2 . To satisfy the 32 distinct user requests, there are multiple delivery phases. First, observe that we can choose min{x0,0 , x0,1 , x0,2 , x1,0 , x1,1 , x1,2 } = 3 non-overlapping user sets each consisting of 6 users who collectively cache the 6 packet sets (see Fig. 3(a)). These 3 user sets can perform the delivery phases as if they were centralized networks. After this, there are 32 − 3 · 6 = 14 remaining users with unsatisfied requests as shown in Fig. 3(b). Of these remaining users, we consider a set of 5 users who collectively cache every packet set except Z0,1 . These 5 users can perform a centralized delivery scheme by including one previously satisfied user who caches Z0,1 .7 In the third phase, as shown in Fig. 3(c), of the remaining 14 − 1 · 5 = 9 unsatisfied users, we consider 2 sets of 4 users who collectively cache the packet sets Z0,0 , 6 Note that n0 is only a dummy variable to define the packet sets for the n users in the decentralized network to cache. 7 We can simply let a satisfied user request empty packets. 14 user group not considered 6 3 2 -- 3 -- -- -- 6 3 2 -- # of 7 6 users 3 delivery phases (a) 4 4 3 1 1 delivery phase (b) 3 2 -- 2 delivery phases (8 of 9 user groups) (c) 1 -- -- 1 delivery phase (3 of 9 user groups) (d) Fig. 3. A depiction of the caching and delivery phases using the hypercube approach to design decentralized D2D caching networks. The lattice structure represents the file packetization and the numbers to the left and bottom of the lattice are the number of remaining unsatisfied users who cache the rows and columns respectively. The red “X”s represent pairs of users that are not considered in the delivery phase. Z0,2 , Z1,0 and Z1,1 . These user sets can perform the delivery phases by including previously satisfied users that cache Z0,1 and Z1,2 . Note that the points of the 3 by 3 lattice not only represent a packet for every file in the library, but also represent all multicasting groups in the delivery phase. In this particular example, there is one multicasting group marked by the red “X” in Fig. 3(c) that does not need to be considered since both users in this multicasting group are satisfied. Similarly, after the delivery shown in Fig. 3(c), we are left with a single user (but forming 3 multicast groups) who can obtain the requested packets from the 3 users caching these packets. The transmission rate of this example is given by   1 220 8 0 Rghc = . (17) R = 3+1+2· +3· 9 9 9 This decentralized scheme does not require any additional packetization. Interestingly, note that the  transmission rate of this scheme is even larger than that of conventional unicasting with Ru = n 1 − M m = 64 3 . This occurs because there is only unicasting for the 2-dimensional hypercube approach and we assume every user transmits in every applicable user pair (multicasting group), which allows unnecessary transmissions as users would be transmitting to users with previously satisfied requests (e.g., in Fig. 3(b), we assume users still serve users caching the packet sets of the middle row). We want to emphasize that this example is just for the purpose of illustration and this effect on the overestimation of the rate diminishes for a larger values n and t0 (see Fig. 4). 2) General Decentralized Algorithm: In this subsection, we describe a general algorithm for using the hypercube scheme for the design of decentralized coded D2D caching networks. The cache placement 15 and delivery phases are defined as follows: 0 • Cache Placement Phase: Define n0  n such that t0 = nmM ∈ Z+ . For all k ∈ F , split file 0 m t m k into M packets of equal size labeled as Wk,(`0 ,...,`t0 −1 ) where `q ∈ {0, . . . , M − 1} for all m q ∈ {0, . . . , t0 − 1}. For all i ∈ {0, . . . , t0 − 1} and j ∈ {0, . . . , M − 1}, define packet set Zi,j to include all packets Wk,(`0 ,...,`t0 −1 ) such that `i = j . Let every user u ∈ {0, . . . , n − 1} uniformly caches one of the n0 packets sets at random with probability • Delivery Phase: Define X as a t0 × m M 1 n0 . matrix where element xi,j equals the number of users who cache the packet set Zi,j . While X has non-zero elements, we do the following. 1) let Xi∗ be the P 0 −1 ∗ number of zero elements in the i-th row of X ; let X̂ ∗ = ti=0 Xi . 2) let x be the minimum non-zero element of X . 3) let user sets {S1 , . . . , Sx } be disjoint sets each of which contains n0 −X̂ ∗ unsatisfied users. Each of this user set collectively caches every packet set Zi,j that satisfies xi,j 6= 0; 4) define user sets {S10 , . . . , Sx0 } such that each user set has size X̂ ∗ and collectively caches every packet set Zi,j that satisfies xi,j = 0. Note that Sk ∩ Sk0 = ∅. 5) for each k ∈ {1, . . . , x}, let users in Sk ∪ Sk0 Q 0 −1 ∗ perform a centralized hypercube D2D delivery phase while ignoring the ti=1 Xi multicasting groups which contain only previously satisfied users; 6) update xi,j as xi,j = max(0, xi,j − x). 7) go back to step 1) until all elements in X are zero. 3) Performance: Performance of the decentralized design is given in the following theorem. Theorem 2: Let m, n, M be the library size, number of users and the cache size per user, respectively. √ 0 m m − 1, where ( M , c) ∈ Z+ , t0 = nmM ≥ 2, and the required number Assume that r ≥ 2, c(t0 − 1) = M 0 m t of packets per file K 0 = M . Furthermore, if n ≥ βn0 log n0 for some β > 1, then all the packet sets can be cached in the network with probability 1 − n0 1−β , and the following transmission rate is achieved with probability 1 − o(1) as n, n0 → ∞, Rdhc (M ) t0 m ≤ kα 0 t −1M  M 1− m  , (18) where kα =               n n0  0 m (dβ − 1 + α) log n0 t0t−1 M 1− M m , q   0  n 2n t m M 0 + α log n n0 n0 t0 −1 M 1 − m , q   0 2n log n0 t m 1 log log n0 + 1 − α 2 log n0 n0 t0 −1 M 1 − if n = βn0 log n0 , if ω (n0 log n0 ) = n ≤ n · polylog(n),    3 M , if n = ω n (log n) . m (19) Here, α > 1, dβ is a number depending only on β and polylog(n) denotes the class of functions  S k k≥1 O (log n) . 16 Proof: First, we show that with probability 1 − n0 1−β , all the packet sets can be cached in the D2D network. Since each packet set is uniformly selected by each user at random, it can be observed that it is a famous “bin-ball” problem, where the packet sets are the n0 bins and users are the n balls. Hence, we need to characterize the probability that no bin is empty. Let Yk demote the event that the k bin is empty, then we can compute  P (Yk ) = 1 1− 0 n n 0 ≤ e−n/n . (20) Hence P ∩k Yk  X  0 = P ∪k Yk = 1 − P (∪k Yk ) ≥ 1 − P (Yk ) ≥ 1 − n0 e−n/n k 0 −βn0 log n0 /n0 ≥ 1−ne =1−n 0 1−β . (21) Second, we will show (18) holds with probability 1 − o(1). Let L denote the maximum number of users that cache the same packet sets, or equivalently, the maximum number of balls in each bin. This problem   is to find kα such that the tail estimate P {L ≥ kα } ∩ ∩k Yk = 1 − o(1). Hence, by using (10), we   0 m t0 m M can obtain Rdhc (M ) ≤ L t0t−1 M 1− M m ≤ kα t0 −1 M 1 − m with probability 1 − o(1). From Theorem 1 in [22], we can show that if kα , α > 1 satisfies (19), then we must have P ({L ≥ kα }) = 1 − o(1). Furthermore, since   P ({L ≥ kα }) = P {L ≥ kα } ∩ ∩k Yk + P ({L ≥ kα } ∩ {∪k Yk })   = P {L ≥ kα } ∩ ∩k Yk + P ({∪k Yk }) P ({L ≥ kα } | {∪k Yk })   1−β , ≤ P {L ≥ kα } ∩ ∩k Yk + n0 (22)   we obtain P {L ≥ kα } ∩ ∩k Yk ≥ P ({L ≥ kα }) − n0 1−β = 1 − o(1). This completes the proof. 4) Simulation Methods and Results: Decentralized networks are simulated with the number of users, n, equals to 1000 and 10000 users, respectively. For these networks we simulate a decentralized cache scheme for all parameter pairs, n0 , t0 ∈ Z+ , such that t0 ≥ 3, n0 ≤ 64 for the network of 1000 users and n0 ≤ 500 for the network of 10000 users, and c (t0 − 1) = m M − 1 holds, where c ∈ Z+ and t0 = n0 M m . For each parameter pair, 104 decentralized cache placement and delivery phases are simulated. Given that n0  n in all cases, there were no instances of a simulated decentralized network where a packet set was not cached at least once. The mean and standard deviation of the rate, µR and σ , respectively, are depicted in Fig. 4. From these results, we can see that the decentralized hypercube scheme outperforms the uncoded scheme. On both plots, the set of points with a fixed t0 is highlighted. As t0 increases, the rate comes 17 1 0.8 0.6 0.4 0.2 0 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Results of the hypercube approach decentralized D2D caching network simulations for n = 1000 users   (left plot) and n = 10000 users (right plot). The mean rate µR = E Rdhc (M ) plus or minus 3 times the standard Fig. 4. deviation, µR ± 3σ, for a variety of hypercube constructions are compared to the uncoded rate and centralized rate. closer to the centralized coded rate. However, the number of packets per file, K 0 , increases exponentially. This exciting result demonstrates that there is a trade-off in designing decentralized D2D caching networks using the hypercube approach. Specifically, we can increase the number of packets to reduce the rate and vice versa. This may provide the flexibility to yield a practical amount of packetization while having limited impact on the transmission rate. Furthermore, we can see that the decentralized approach yields more realizable constructions of the hypercube. In fact, as shown in Fig. 4, the number of realizable hypercube schemes for 1000 and 10000 users are 2 and 3 respectively (t = 4, 10 for n = 1000 and t = 4, 10, 100 for n = 10000). In comparison, the decentralized network design provides many more possibilities. IV. RUZSA -S ZEM ÉREDI GRAPH C ODED C ACHING A PPROACH While the hypercube approach requires significantly (in fact, exponentially) less number of packets per file compared to [14], the hypercube approach still yields an exponential number of packets relative to n if m and M are fixed. While the hypercube approach certainly increases the domain for which a D2D caching network is implementable, it is still an open question as to whether there exists a coded D2D √ caching network scheme without spatial reuse (r > 2) with a sub-exponential number of packets per file. Motivated by [19], in this section we propose a coded D2D caching scheme based on Ruzsa-Szeméredi graphs which requires only a sub-quadratic packetization. 18 A. Ruzsa-Szeméredi Graphs In this section, we focus on a specific Ruzsa-Szeméredi graph design, which was first introduced in [17] and used in a novel manner in [19] to construct a cache placement and coded multicasting scheme for a shared link caching network. Let G(V, E) be an undirected graph, where V is the vertex set and E is the edge set. We introduce the following definitions [18], [19]. Definition 4: Given a graph G(V, E), a matching M in G is a set of pairwise non-adjacent edges; that is, no two edges share a common vertex. ♦ Definition 5: The set of edges M ∈ E is an induced matching if for the set S of all the vertices incident on the edges in M, the induced graph GS contains no other edges apart from those in the matching M. ♦ Definition 6: A disjoint matching M is a matching such that any pair of the edges in M are not adjacent to any third edge in E . ♦ Definition 7: A graph G(V, E) is called an (γ, τ )−Ruzsa-Szeméredi (RS) Graph if its set of edges consists of τ pairwise disjoint induced matching, each of size γ . ♦ An example of RS graph is shown in Fig. 5(a), which is also used in [19]. We will apply RuzsaSzeméredi graph to construct a cache placement and a coded multicasting scheme in wireless D2D caching networks. In this section, we will focus on the case that a transmission from any node can be √ received and successfully decoded by all nodes in the network (e.g., r ≥ 2). In the remainder of this section, we will first introduce a motivating example and then present the general achievable scheme. B. An Example Similar to [19], our proposed scheme is based on RS Graphs. In this example, let m = n = 6 and M = 4. Each file is partitioned into 4K packets with F/K bits each. Without loss of generality, we let user u request file u. To find the cache placement and the coded multicasting scheme, we build a (2, 3)-Ruzsa-Szeméredi graph G with 6 vertices as shown in Fig. 5(a) where each vertex is represented by 3 packets. In our proposed achievable scheme, we partition each file into n(2γ − 1) = 18 packets and denote the j th packet from file i by Wi,j , i ∈ {1, · · · 6}, j ∈ {1, · · · , 18}. The cache placement and coded multicasting scheme are shown in Fig. 5(b), where each vertex represents a user and his cached packets are shown inside each vertex. For instance, the most left vertex, vertex 1, represents user 1 and his cached packets, which are Wi,j , where i ∈ {1, · · · , 6} and j ∈ {1, 2, 3, 7, 8, 9, 10, 11, 12, 13, 14, 15}. Note that these exclude the packets represented by its neighboring vertices, vertex 2 and vertex 6, which are shown in Fig. 5(b). 19 Vertex 2 Vertex 3 User 2 Wi,4 , Wi,5 , Wi,6 Wi,7 , Wi,8 , Wi,9 Wi,j j 2 {4, 5, 6, 10, 11, 12 13, 14, 15, 16, 17, 18} Vertex 1 Vertex 4 Wi,10 , Wi,11 , Wi,12 Wi,1 , Wi,2 , Wi,3 Wi,13 , Wi,14 , Wi,15 Vertex 6 Vertex 5 W1,4 W3,4 W4,14 W5,16 W5,11 W2,7 W5,17 W6,13 W1,16 W4,8 W2,1 W4,13 W5,10 W1,17 W6,14 W6,2 User 1 User 4 Wi,j j 2 {1, 2, 3, 7, 8, 9 10, 11, 12, 13, 14, 15} Wi,16 , Wi,17 , Wi,18 User 3 Wi,j j 2 {1, 2, 3, 7, 8, 9 13, 14, 15, 16, 17, 18} W3,10 W4,7 W6,1 W2,9 W1,18 W3,6 W5,18 W1,6 W3,12 W4,9 W2,8 Wi,j W1,5 W3,11 W6,3 W2,2 W5,12 W2,3 W3,5 W4,15 W6,15 j 2 {4, 5, 6, 7, 8, 9 10, 11, 12, 16, 17, 18} Wi,j j 2 {1, 2, 3, 4, 5, 6 7, 8, 9, 13, 14, 15} User 6 User 5 (a) Wi,j j 2 {1, 2, 3, 4, 5, 6 10, 11, 12, 16, 17, 18} (b) Fig. 5. a) A (2, 3)-Ruzsa-Sezmeredi graph with 6 vertices which represents a coded caching scheme where n = 6, M/m = 2/3, and K = n(2γ − 1) = 3n = 18. The graph can be split into τ = 3 induced pairwise disjoint matchings denoted by different colors in the graph, which cover all edges of the original graph. b) An example of the proposed scheme in a D2D network with n = m = 6, K = 18 and M = 4. Each vertex represents a user. The content of each rectangle represents cached packets. The coded multicast packets are shown in the center of the figure. The coded multicasting scheme is shown in the center of Fig. 5(b). For example, user 1 transmits W2,1 ⊕ W4,13 ⊕ W5,10 , which are used by users 2, 4, 5 to decode packets W2,1 , W4,13 , W5,10 , respectively. In particular, it can be seen that user 2 has W4,13 and W5,10 such that he can decode W2,1 . Similarly, user 4 and 5 can also decode the corresponding packet in a similar manner. In this example, if we use the   achievable scheme proposed in [14], each file is split into t nt = 4 64 = 60 packets and the transmission rate is given by m M −1 = 6 4 − 1 = 12 . While using the proposed scheme, the transmission rate is 12 18 = 23 . Therefore, the proposed scheme requires K = 18 instead of K = 60 as the scheme in [14], and the achievable transmission rate of the proposed scheme is 2 3 instead of 1 2 achived by the scheme in [14]. Hence, we observe that while sacrificing the transmission rate by ( 23 − 21 )/ 12 = scheme reduces the number of packets needed per file by 60−18 60 = 7 10 1 3 = 33%, the proposed = 70%. C. General Achievable Scheme In this section, we generalize the deterministic caching and coded delivery scheme illustrated in Section IV-B to the general case of m, n and M . 20 • Building the Ruzsa-Szeméredi graph: We build a Ruzsa-Szeméredi graph with n vertices, each with a degree of n − t. This graph consists of τ pairwise disjoint induced matchings and each has γ edges. • Cache Placement Phase: The cache placement scheme is closely related to the scheme in [19] and is designed according to the Ruzsa-Szeméredi graph. Each file is divided into K = n(2γ − 1) packets, labeled by {Wi,j , i = 1, · · · , m, j = 1, · · · , K}. Each vertex in the RS graph represents 2γ − 1 distinct packets. Node u caches packets corresponding to those vertices that are not adjacent to itself and packets corresponding to the vertex itself. • Delivery Phase: As a consequence of the caching scheme described above, any subset of 2γ − 1 nodes belonging to a disjoint matching of size γ in U = {1, . . . , n} has the property that they share 2γ − 1 packets from each file. Consider one such subset. For any file requested by the remaining (2γ)-th node, by construction, there are 2γ − 1 packets shared by the other 2γ − 1 nodes and needed by the (2γ)-th node. Therefore, each node in every disjoint matching has 2γ − 1 packets that are useful for the remaining 2γ −1 nodes. Furthermore, such sets of packets are disjoint (empty pairwise intersections). For delivery, in each disjoint matching, each node computes the XOR of its 2γ − 1 useful packets and multicasts it to all other nodes in this disjoint matching. In this way, for every multicast transmission exactly 2γ −1 nodes will be able to decode a useful packet using “interference cancellation” based on their cached content. The achievable rate is given in the following. Theorem 3: Let m, n, M be the library size, number of users and the cache size per user, respectively. √ For r ≥ 2, n = Λz , where Λ is any positive integer such that z ≥ 2Λ, and 1 M = 2mn− 2Λ4 ln Λ , and let t = nM m (23) ∈ Z+ , the following rate is achievable: RRS (M ) = with the requirement that K = K RS = (2γ − 1)n. τ 2γ n 2γ − 1 (24)  Proof: Theorem 1 is proved in Appendix B. When we consider the asymptotic regime as n becomes large, we obtain the following corollary. √  Corollary 2: For r ≥ 2, when n → ∞, K = O n2−δ and M = 2mn−c1 δ exp(−c2 /8) , where c1 , c2 are some positive constants, let t = nM m ∈ Z+ , the following rate is achievable: RRS (M ) ≤ nδ + o(nδ ), (25) 21 where δ = 2 ln 10.5 ln Λ .  Corollary 2 can be proved using the value of τ given in Appendix B and the relation γ = O (n/τ ). From Corollary 2, we can see that when Λ is large enough, or equivalently, n is large enough, δ can be arbitrarily small. In other words, it can be computed from (25) that RRS (M ) = (10.5)2 logΛ n . The throughput achieved by the proposed achievable scheme is given as follows. Corollary 3: Let Cr be the constant link rate under the protocol model. For r ≥ √ 2, the per user throughput is given by T RS (M ) = Cr RRS (M )   = C√2 · n−δ + o n−δ , n→∞ where RRS (M ) and δ are given by (24) or (25), is achievable. (26)  Proof: This corollary can be proved by using the same procedure as the proof of Corollary 1. D. Comparison to Other Schemes Due to the sub-quadratic packetization with the number of users n, which is significantly lower than that of the hypercube based approach proposed in Section III, the achievable rate of the RS graph based √ design given by (5) and (25) for r ≥ 2 is obviously worse than the achievable rate of the hypercube based design given in (10) and the original design [14], when n increases and m and M are fixed. However, there is still a significant gain in terms of transmission rate compared to the conventional uncoded unicasting scheme in some parameter regimes. In the following, we compare the transmission rates of the uncoded scheme, Ru , and the RS Graph scheme, RRS where m, M and n are the same for both schemes. By solving (23) for n we obtain  m 2Λ4 ln Λ n= 2 M (27) which better defines the constraint relating n to M/m for the this scheme based on the proposed RS graph design. For the purposes of comparison, (27) holds for both the uncoded and RS schemes. The transmission rate for the uncoded scheme is      M m 2Λ4 ln Λ M u R =n 1− = 2 1− . m M m Furthermore, the transmission rate of the RS scheme given by (5) is 2γ 2γ  m 4Λ4 ln 10.5 RRS = nδ = 2 2γ − 1 2γ − 1 M (28) (29) Then we obtain   M Ru 2γ − 1  m 2Λ4 (ln Λ−2 ln 10.5) = 2 1− . RRS 2γ M m (30) 22 Notice that, (30) is only dependent on M , m and Λ and not dependent on z . This occurs because z is a  m function of M , m and Λ and for these derivations z is essentially substituted with z = 2Λ4 ln 2 M / ln Λ. 2Λ4 ln(2 m ) 2 ln 10.5 M This result demonstrates that for a fixed m/M and Λ > 10.52 , by using τ = Λ ln Λ (1+ ln Λ +o(1)) (see Appendix B), we have8 Ru Ru = lim = ∞, n→∞ RRS Λ→∞ RRS lim (31) which shows a significant gain in terms of transmission rate of the RS graph approach compared to uncoded unicasting scheme. Remark 2: It can be seen that the idea of designing the decentralized coded caching approach discussed in Section III-G can also be extended to the RS graph coded caching methods. The major difference is that the packet sets, each of which will be randomly and uniformly cached by users, are constructed based on the RS graph. The delivery procedure is similar to that in Section III-G. V. ACHIEVABILITY WITH S PATIAL R EUSE In this section, we choose (e.g., reduce) the transmission range r in order to have localized D2D √ communication such that some spatial reuse is allowed. In contrast to the regime where r ≥ 2, in this case, we also need to design a non-trivial transmission policy to schedule concurrent active D2D transmissions. Similar to the scheduling schemes in [14], the proposed policy is based on clustering: the network is divided into clusters of equal size gc users. Users are allowed to receive messages only from nodes in the same cluster.9 Therefore, each cluster is treated as a smaller network compared to the entire network. Assuming that gc M ≥ m,10 the total cache size of each cluster is sufficient to store the entire file library. Under this assumption, the cache placement and delivery schemes introduced in Sections III-C and IV-C can be applied to each cluster. Hence, it can been seen that the transmission rate in each cluster is given by either Rchc (M ) 8 tc m = tc − 1 M  M 1− m  , (32) Note that the RS graph based approach cannot perform worse than the uncoded unicasting by the construction. The reason we need the condition that Λ > 10.54 is due to the fact that the τ obtained from [18], [19] and used in (5) is a sufficient condition and may not be necessary. 9 Note that this condition can be relaxed by using the similar communication scheme base on ITLinQ [23]. 10 If the condition gc M ≥ m is not satisfied, we can choose a larger transmission range such that this condition is feasible. 23 ∆ where we define tc = gc M/m, or RcRS (M ) = τ 2γ gc 2γ − 1 gc →∞ = gcδ + o(gcδ ), (33) where tc = gc M/m, gc = Λz and τ , γ and δ are given in Theorem 3. As mentioned in Remark 1, a straightforward achievable transmission policy consists of grouping the set of clusters into K spatial reuse sets such that the clusters of the same reuse set do not interfere and can be activated simultaneously.11 In each active cluster, a single transmitter is active per time-slot and it is received by all nodes in the cluster, as in classical time-frequency reuse schemes with reuse factor K that are currently used in cellular networks [24, Ch. 17]. An example of a reuse set is shown in Fig. 1. In particular, we can pick √  2 K= 2(1 + ∆) + 1 [21]. In [14], we observe that there is potentially no order gains as n → ∞ by using spatial reuse. The benefit of spatial reuse is completely determined by the value of link rate Cr and reuse factor K. In the newly proposed schemes, since the transmission rate in each cluster is a function of the number of users, spatial reuse may achieve a higher gain in terms of throughput. Note that from the achievability point of view, reducing the transmission range r is equivalent to reducing gc . We consider the use of the hypercube and RS graph approaches separately as we investigate clustering in D2D caching networks. A. Clustering with the Hypercube Caching Approach The multiplicative gap between the transmission rate of Rchc and Rghc is given by Ghc R = Rchc gc t − 1 = . hc n tc − 1 Rg (34) From (34), we can see that the transmission rate of each cluster decreases as gc decreases. Furthermore, the achievable throughput of the hypercube approach with clustering is given by the following theorem. Theorem 4: Let m, n, M be the library size, number of users and the cache size per user, respectively. √ m m − 1 and M , tc , c ∈ Z+ , the following per user throughput For r ≤ 2, tc = gcmM ≥ 2, c(tc − 1) = M Tchc (M ) is achievable: Tchc (M ) = with the requirement of K = Kchc = 11  m tc . M Cr M t c − 1 K m − M tc (35) Note that the interference management in this paper is based on protocol model. However, similar scheme can be designed for AWGN or fading channel model based on the condition that treating interference as noise is optimal (ITLinQ [23]). 24 Proof: By using (2), we can obtain Tchc (M ) = where Rchc (M ) is given by (32). 1 Cr M t c − 1 Cr = , hc K Rc (M ) K m − M tc (36) Using (6) and replacing t by tc , we get Kchc =  m tc M (37) The multiplicative gap of Tghc and Tchc throughput is given by Ghc T = Cr 1 Cr n t c − 1 Tchc = √ = √ C 2 K Ghc C Tghc 2 K gc t − 1 R (38) Remark 3: Note that the throughput has increased by using the clustering scheme compared to the √ scheme for r ≥ 2 if Ghc T > 1 or in other words Cr C√ 2 K > gc t − 1 . n tc − 1 (39) This relationship can be further simplified if gc M  m and clustering will improve the throughput if Cr /K > C√2 . This provides a similar result to that was shown in [14]. The exact relationship between link rate, Cr , and transmission range, r, depends on the physical channel model and wireless network design. However, Cr may not decrease as r decreases. Hence, clustering has the potential to increase throughput. In addition, from (37), clustering can also be used for the purpose of reducing the number of file partitions as also shown in [14]. For a cluster with gc users, the number of file partitions is  m tc  m gc M/m = , (40) Kchc = M M and the ratio of the number of file partitions with and without clustering is (n−gc ) Kghc  m  M m , (41) = M Kchc √ where Kghc given in (6) is the number of file partitions when r ≥ 2 such that no clustering is used. As the cluster size gc becomes smaller, an exponential decrease in the number of file partitions is observed. 25 B. Clustering with the RS Graph Caching Approach In this section we first discuss the throughput of the RS graph coded caching approach with clustering. We then consider two ways of reducing gc based on the construction in [18], [19] and study their impact on throughput and cache size requirement. The RS graph scheme achieves the following throughput: Theorem 5: Let m, n, M be the library size, number of users and the cache size per user, respectively. √ For r < 2, K = (2γ − 1)gc , gc = Λz , where Λ is any positive integer such that z ≥ 2Λ, and − 2Λ41ln Λ M = 2mgc , let tc = gc M m ∈ Z+ , the per user throughput is given by: TcRS (M ) = Cr gc 2γ − 1 . K τ 2γ (42)  We have the following corollary for the asymptotic regime. √  −c δ exp(−c2 /8) , where Corollary 4: For r < 2, when gc → ∞, K = O gc2−δ , tc ≥ 2, and M = 2mgc 1 where δ = gc M m ∈ Z+ , the throughput is given by:   Cr −δ Cr −δ RS Tc (M ) = g +o g , K c K c c1 , c2 are some positive constants, let tc = 2 ln 10.5 ln Λ . (43)  Since the proofs of Theorem 5 and Corollary 4 are similar to that of Theorem 4 by using Theorem 1 and Corollary 2, the proofs are omitted due to space limitation. 0 1) Decreasing gc by reducing z 0 while keeping Λ the same: Let n = Λz and gc = Λz , where z 0 < z . From (25) and (33), the multiplicative gap between the transmission rate of RcRS (M ) and RRS (M ) is given by GRS = R     RcRS (M ) gcδ + o(gcδ ) 2(z 0 −z) 2(z 0 −z) δ(z 0 −z) δ(z 0 −z) . (44) = = 10.5 + o 10.5 = Λ + o Λ RRS (M ) nδ + o(nδ ) From (44), we can observe that by clustering the D2D network, the transmission rate (traffic load) can be reduced significantly. For example, if z − z 0 = 2, e.g., the network is partitioned into Λ2 clusters, −4 < 10−4 . Nevertheless, due to the spatial reuse gain, by using Corollary 1 and 4, the GRS R = 10.5 multiplicative gap between TcRS (M ) and T RS (M ) is given by GRS T = (a) =  Cr −δ Cr −δ TcRS (M ) K gc + o K gc  = √ −δ T RS (M ) C 2 n + o C√2 n−δ   Cr 1 2(z−z 0 ) 2(z−z 0 ) 10.5 , 10.5 + o C√2 K where (a) is obtained by repeating the same procedure as (44). From (45), we can see that if (45) Cr 1 C√2 K and Λ are positive constants, then by increasing z − z 0 , e.g., increasing the number of clusters, the multiplicative 26 RS RS (M ) can grow to infinity, which means that the gain by using the gap GRS T between Tc (M ) and T spatial reuse in D2D network can be infinite. In practice, even for finite z − z 0 , it is possible to achieve gains by using spatial reuse. For example, if z − z 0 = 2, then from (45), we can see that GRS T = Cr 1 10.54 , C√2 K (46) which can be much larger than 1. This surprising result demonstrates that spatial reuse provides significant gain in throughput even when the reuse factor K is relatively large and there is little increase in the link capacity from decreasing the transmission range. As clustering is performed, the required cache capacity M increases. For this specific clustering scheme, from Theorem 1 and Theorem 5, the following condition for cache capacity M (gc ) must hold M (gc ) = − 1 2mgc 2Λ4 ln Λ − 2Λ41ln Λ = 2mn   z − z0 = M (n) exp . 2Λ4 − 2Λ41ln Λ gc 1 n− 2Λ4 ln Λ (47) Note that by using (47), to achieve the promised throughput, it needs M (gc ) ≥ M (n) exp example, if z − z 0 = 2, it requires M (n/Λ2 ) = M (n)e 1 Λ4 z−z 0 2Λ4  . For . This demonstrates that if the network is 1 divided into Λ2 clusters, the lower bound of M increases by a factor of e Λ4 , which is insignificant for reasonablely large values of Λ. 2) Decrease gc by reducing Λ while keeping z unchanged: Let n = Λz and gc = (Λ0 )z , where Λ0 < Λ. From Corollary 2 and (32), the multiplicative gap between the transmission rate of RcRS (M ) and RRS (M ) is given by 0 GRS R 0 2 ln 10.5 RRS (M ) g δ + o(gcδ ) (Λ0 ) ln Λ0 z = cRS = cδ = +o 2 ln 10.5 R (M ) n + o(nδ ) Λ ln Λ z (Λ0 ) Λ 2 ln 10.5 ln Λ0 2 ln 10.5 ln Λ z ! z = 1 + o (1) . (48) From (48), interestingly, we can see that in this case by clustering the D2D network, the transmission rate is almost unchanged. It follows from Corollary 1 and 4 that the multiplicative gap between TcRS (M ) and T RS (M ) is given by GRS T = = 0 Cr −δ 0 + o CKr gc−δ TcRS (M ) K gc  = √ −δ T RS (M ) C 2 n + o C√2 n−δ ! Cr 1 Cr 1 +o . C√2 K C√2 K (49) From (49), we can see that similar to [14], there is no fundamental cumulative gain by using both spatial reuse and coded multicasting. Under our assumptions, spatial reuse may or may not be advantageous, depending on whether Cr K is larger or smaller than C√2 . In addition, this also depends on how the link 27 rate varies as a function of communication range. This aspect is not captured by the protocol model, and the answer may depend on the operating frequency and appropriate channel model of the underlying wireless network physical layer [20]. VI. C ONCLUSION This work aims to find D2D coded caching network designs which require a more practical amount of packetization as compared to the state-of-the-art coded D2D caching schemes in [14]. We propose two new network design approaches, which are hypercube approach and Ruzsa-Szeméredi graph approach. In particular, the hypercube approach has been designed specifically for D2D and not based off a shared link scheme as that in [14]. The hypercube approach requires exponentially less packetization as compared to coded caching scheme in [14] and yields nearly the same per user throughput for a large number of users. The RS Graph approach was expanded from a previously studied shared link network design [19] and modified for the design of D2D networks. It requires only subquadratic packetization in terms of the number of users and achieves a near constant per user throughput. The dramatic decrease in packetization resulted from the RS Graph approach comes at the cost of a significant increase in throughtput compared to [14]. In addition, we demonstrate how the hypercube scheme can be expanded to design decentralized networks and discovered a clear trade-off between transmission rate and packetization. Furthermore, we explore how breaking up larger networks into smaller networks can utilize spatial reuse and increase per user throughput. This work represents a major step forward towards practical file packetization in D2D coded caching networks. Future work may yield other RS graph constructions with more general packetization requirements and a trade-off between packetization and transmission rate. A PPENDIX A P ROOF OF THE C ORRECTNESS OF THE G ENERAL H YPERCUBE S CHEME In this section, we demonstrate the correctness of the proposed scheme by verifying that all users: 1) locally cache at most M F bits; 2) only transmit content that is locally cached; 3) decode requested packets from received coded multicasts; and 4) recover the entire requested file. m t−1 For 1), each user caches a set of ( M ) packets of size F (m/M )t total number of bits cached locally at each user is  m t−1 F · t · m = M F m M M which satisfies the local memory constraint for each user. bits for all m files in the library. The (50) 28 For 2), for each packet, Wfus ,(a0 ,...,at−1 ) , included in a multicast from user ui , notice that ai = ui mod m M, m which follows from (3) and (4), and bui / M c = i as defined for a user in a set S in the delivery phase. This precisely matches the definition for a packet that user ui cached during the placement phase, and therefore each user ui ∈ S is guaranteed to have the packets cached that it is about to transmit. For 3), first notice that, for any user set, S , as defined in the delivery phase, a user uj ∈ S will receive a requested packet from all users in S \ uj . To prove this consider any user ui ∈ S \ uj . Notice that (j − i) mod m M m 6= 0 because i 6= j and i, j ∈ {0, . . . , M − 1}. Furthermore, by (3) and (4), the multicast from user ui will include a packet Wfuj ,(a0 ,...,at−1 ) such that aj = (uj + j − i) mod m m 6= uj mod . M M (51) This precisely defines a packet which is part of user uj ’s request and is not included in user uj ’s cache. Next, consider every other packet, Wfuk ,(a0 ,...,at−1 ) , included in a multicast from the user ui and notice that aj = uj mod m M which follows from (3) and (4) where k 6= i, j . This means user uj has these packets cached and is able to decode the uncached, requested packet from the received multicast from user ui . For 4), first consider the following useful property {(a + b) mod c : b ∈ {−x, . . . , c − 1 − x} \ 0} = {0, . . . , c − 1} \ a mod c (52) where x ∈ Z and 0 ≤ x ≤ c − 1. This property holds because {b mod c} = {1, . . . , c − 1}. Now consider a user group, S , as defined by the delivery phase. By (3) and (4), user uj ∈ S will receive every packet, Wfuj ,(a0 ,...,at−1 ) , such that aq equals some constant if q 6= j and aj ∈ {(uj + j − i) mod m : i ∈ {0, ..., t − 1} \ j}. M (53) Furthermore, recognizing that i − j ∈ {−j, ..., t − 1 − j} \ 0 and t = m/M demonstrates that aj ∈ {0, . . . , m m − 1} \ aj mod . M M (54) In other words, user uj collectively receives a “line” of packets from users S \ uj for which t − 1 dimensions of the “hypercube” are held constant and one dimension varies the length of the “hypercube”. The only exception is the packet which user uj already has cached. Moreover, the constants, {a0 , . . . , at−1 } \ aj , are defined as aq = uq mod m M. Therefore, for user uj to receive any packet, Wfuj ,(a0 ,...,at−1 ) , not already cached, user uj can form a multicast group with the set of users S 0 = {aq + q( m ) : q ∈ {0, . . . , t − 1} \ j} M (55) 29 m Given that, aq ∈ {0, . . . , M − 1} for all q ∈ {0, ..., t − 1}, recognize that S 0 ∪ uj ⊂ U . Also, |S 0 ∪ uj | = t m m c = k for all k ∈ {0, . . . , M − 1}. Therefore, S 0 ∪ uj and there exists a user uk ∈ S 0 ∪ uj such that buk / M meets the requirements for a group, S , as defined by the delivery phase. This proves that by forming all user sets as defined in the delivery phase, all users will recover all packets of the requested file that were not already cached. A PPENDIX B P ROOF OF T HEOREM 1 To prove Theorem 1, we first introduce the following construction of RS Graph from [18], [19]. Definition 8: (Graph Construction) A graph, G(V, E), is defined such that V = [Λ]z where Λ ∈ Z+ , z is even, and z ≥ 2Λ. Let µ = Ex,y [||x − y||22 ], where x and y are sampled uniformly from V . For a pair of vertices, u, v ∈ V , (u, v) ∈ V if and only if | ||u − v||22 − µ| ≤ z . ♦ Given this construction, the graph consists of τ = nf edge disjoint induced matchings and misses at most nk edges such that f = 1 + 2 lnln10.5 Λ + o(1), and k = 2 − 1 2Λ4 ln Λ + o(1). Furthermore, given a vertex, x ∈ V , the degree of x, defined as d, is bounded by [19]   1 d = |y ∈ V : (x, y) ∈ E| ≥ n 1 − 2n− 2Λ4 ln Λ . (56) The degree of any vertex defines the number of packets that a user does not cache. Therefore, if the following holds, 1 dlb M ≥1− = 2n− 2Λ4 ln Λ , m n where dlb is the lower bound of d, then the graph construction can be used as a cache placement scheme.  1 + Hence, we can pick M = 2mn− 2Λ4 ln Λ . Since d ≥ dlb = n 1 − M m = n − t, we have t ∈ Z . By the construction of the proposed scheme described in Section IV-C, each file is partitioned into n(2γ − 1) packets, and each contains F/K bits. Moreover, for each disjoint matching in the constructed RS graph, there are 2γ transmissions, and each has size F n(2γ−1) bits. Since the number of disjoint matching is τ , there are 2γ · τ transmissions. R(M ) = 2γ · τ · Hence, we finish the proof. F 1 τ 2γ · = . n(2γ − 1) F n 2γ − 1 (57) 30 R EFERENCES [1] M. A. Maddah-Ali and U. Niesen, “Fundamental limits of caching,” Information Theory, IEEE Transactions on, vol. 60, no. 5, pp. 2856–2867, 2014. [2] E. Bastug, M. Bennis, and M. Debbah, “Living on the edge: The role of proactive caching in 5g wireless networks,” Communications Magazine, IEEE, vol. 52, no. 8, pp. 82–89, 2014. [3] 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. [4] D. Liu, B. Chen, C. Yang, and A. F. Molisch, “Caching at the wireless edge: design aspects, challenges, and future directions,” IEEE Communications Magazine, vol. 54, no. 9, pp. 22–28, September 2016. [5] K. Shanmugam, M. Ji, A. M. Tulino, J. Llorca, and A. G. Dimakis, “Finite length analysis of caching-aided coded multicasting,” in Communication, Control, and Computing (Allerton), 2014 52nd Annual Allerton Conference on. IEEE, 2014, pp. 914–920. [6] K. Wan, D. Tuninetti, and P. Piantanida, “On caching with more users than files,” in 2016 IEEE International Symposium on Information Theory (ISIT), July 2016, pp. 135–139. [7] K. Wan, D. Tuninetti, and P. Piantanida, “On the optimality of uncoded cache placement,” in 2016 IEEE Information Theory Workshop (ITW), Sept 2016, pp. 161–165. [8] Q. Yu, M. A. Maddah-Ali, and A. S. Avestimehr, “Characterizing the rate-memory tradeoff in cache networks within a factor of 2,” arXiv preprint arXiv:1702.04563, 2017. [9] N. Karamchandani, U. Niesen, M. A. Maddah-Ali, and S. Diggavi, “Hierarchical coded caching,” IEEE Transactions on Information Theory, vol. PP, no. 99, pp. 1–1, 2016. [10] A. Sengupta and R. Tandon, “Improved approximation of storage-rate tradeoff for caching with multiple demands,” IEEE Transactions on Communications, vol. 65, no. 5, pp. 1940–1955, May 2017. [11] S. W. Jeon, S. N. Hong, M. Ji, G. Caire, and A. F. Molisch, “Wireless multihop device-to-device caching networks,” IEEE Transactions on Information Theory, vol. 63, no. 3, pp. 1662–1676, March 2017. [12] A. Liu, V. Lau, and G. Caire, “Cache-induced hierarchical cooperation in wireless device-to-device caching networks,” arXiv preprint arXiv:1612.07417, 2016. [13] S. P. Shariatpanahi, G. Caire, and B. H. Khalaj, “Physical-layer schemes for wireless coded caching,” arXiv preprint arXiv:1711.05969, 2017. [14] 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. [15] Y. Fadlallah, A. M. Tulino, D. Barone, G. Vettigli, J. Llorca, and J.-M. Gorce, “Coding for caching in 5g networks,” IEEE Communications Magazine, vol. 55, no. 2, pp. 106–113, 2017. [16] S. Jin, Y. Cui, H. Liu, and G. Caire, “New order-optimal decentralized coded caching schemes with good performance in the finite file size regime,” arXiv preprint arXiv:1604.07648, 2016. [17] I. Ruzsa and E. Szemerédi, “Triple systems with no six points carrying three triangles,” Combinatorics (Keszthely, 1976), Coll. Math. Soc. J. Bolyai, vol. 18, pp. 939–945, 1978. [18] N. Alon, A. Moitra, and B. Sudakov, “Nearly complete graphs decomposable into large induced matchings and their applications,” in Proceedings of the 44th annual ACM symposium on Theory of computing. ACM, 2012, pp. 1079–1090. [19] K. Shanmugam, A. M. Tulino, and A. G. Dimakis, “Coded caching with linear subpacketization is possible using ruzsaszeméredi graphs,” arXiv preprint arXiv:1701.07115, 2017. 31 [20] M. Ji, G. Caire, and A. F. Molisch, “Wireless device-to-device caching networks: Basic principles and system performance,” IEEE Journal on Selected Areas in Communications, vol. 34, no. 1, pp. 176–189, Jan 2016. [21] F. Xue and PR Kumar, Scaling laws for ad hoc wireless networks: an information theoretic approach, Now Pub, 2006. [22] M. Raab and A. Steger, “‘balls into bin’–a simple and tight analysis,” Randomization and Approximation Techniques in Computer Science, pp. 159–170, 1998. [23] N. Naderializadeh, D. T. H. Kao, and A. S. Avestimehr, “How to utilize caching to improve spectral efficiency in deviceto-device wireless networks,” in 2014 52nd Annual Allerton Conference on Communication, Control, and Computing (Allerton), Sept 2014, pp. 415–422. [24] A.F. Molisch, Wireless communications, 2nd edition, IEEE Press - Wiley, 2011.
7cs.IT
arXiv:1711.10301v1 [cs.PL] 28 Nov 2017 The Maximal MAM, a Reasonable Implementation of the Maximal Strategy Beniamino Accattoli INRIA, UMR 7161, LIX, École Polytechnique, France 1 Introduction This note is about a reasonable abstract machine, called Maximal MAM, implementing the maximal strategy of the λ-calculus, that is, the strategy that always produces a longest evaluation sequence. The abstract machine is a minor variation over the Useful MAM of [Acc16], that is a reasonable implementation of the leftmost-outermost strategy. Here reasonable is a technical term: an abstract machine M implementing a strategy → is reasonable when its overhead on a given term t is polynomial with respect to the size of t and the number of →-steps necessary to evaluate t. The result of this note is discussed and put in context in the author’s (In)Efficiency and Reasonable Cost Models [Acc17]. Essentially, the maximal strategy is a peculiar case-study, for the following reasons: • Non-trivial reasonable implementation: it is the most inefficient strategy ever, and yet implementing it with a reasonable overhead requires the whole heavy machinery, namely useful sharing, needed for the leftmostoutermost strategy, the other only strong strategy known to be reasonable. • Unreasonable cost model : it is reasonably implementable—that usually is the tricky part in the study of cost models—but its number of steps does not provide a reasonable cost model. Indeed the strategy is so inefficient that it cannot even simulate Turing machines, that usually is the easy part in the study of cost models. To be precise, there are no proofs of such impossibility, but the known encodings of Turing machines do not work when the evaluation strategy in the λ-calculus is the maximal one. We first define the strategy, and then show how to implement it via the Max MAM. The technical details follow closely those in [Acc16] for the Useful MAM. In turn, the Useful MAM is a refinement of the Strong MAM, an unreasonable abstract machine for the leftmost-outermost strategy studied in [ABM15], that in turn is a simplification of Cregut’s machine [Cré90, Cré07, GNM13]. The literature about abstract machines for strong evaluation is extremely limited, we essentially already cited all existing papers on the subject. A few further papers [GL02, AC15, AG17] deal with abstract machines for weak evaluation 1 with open terms, that is an intermediate framework between the one of weak evaluation with closed terms, to which the almost totality of the literature is devoted, and the almost inexistent one of strong evaluation. 2 λ-Calculus and Maximal Evaluation The syntax of the ordinary λ-calculus is given by the following grammar for terms: λ-Terms t, u, r, s ::= x | λx.t | tu. We use t{x u} for the usual (meta-level) notion of substitution. An abstraction λx.t binds x in t, and we silently work modulo α-equivalence of bound variables, e.g. (λy.(xy)){x y} = λz.(yz). We use fv(t) for the set of free variables of t. β-reduction. We define β-reduction →β as follows: Contexts C ::= h·i | λx.C | Ct | tC Rule at top level (λx.t)u 7→β t{x u} Contextual closure Chti →β Chui if t 7→β u A context C is applicative if C = Dhh·iui for some D and u. A term t is a normal form, or simply normal, if there is no u such that t →β u, and it is neutral if it is normal and it is not of the form λx.u (i.e. it is not an abstraction). The position of a β-redex Chti →β Chui is the context C in which it takes place. To ease the language, we will identify a redex with its position. A derivation d : t →k u is a finite, possibly empty, sequence of reduction steps. We write |t| for the size of t and |d| for the length of d. Maximal Evaluation. The maximal strategy is the variation over leftmostoutermost (LO) evaluation in which, when the LO redex (λx.t)u is erasing (that is, when x ∈ / fv(t)), the strategy first evaluates (maximally) u to u′ , and then fires the erasing redex (λx.t)u′ →β t, to avoid the erasure of the β-redexes of u before being reduced. Of course, if u diverges than the maximal strategy diverges, while the LO strategy would not (or, at least, not because of u). The LO strategy is inefficient but it has the key property of being normalizing, i.e. it reaches a normal form whenever it exists. The maximal strategy, dually, is perpetual, that is, it diverges whenever possible. See van Raamsdonk at al.’s [vRSSX99] for more about perpetual and maximal strategies. We define the maximal strategy by first defining the notion of maximal context, that is a context in which a maximal redex can appear (and not a context that cannot be extended). Definition 2.1 (Max Context). Maximal (or max) contexts are defined by induction as follows: 2 h·i is Max (ax) C is Max (λ) λx.C is Max C is Max C 6= λx.D (@l) Ct is Max x∈ / fv(t) C is Max (gc) (λx.t)C is Max t is neutral C is Max (@r) tC is Max We define the maximal β-reduction strategy →Maxβ as follows: Rule at top level (λx.t)u 7→Maxβ t{x u} if x ∈ fv(t) or u is normal Contextual closure Chti →Maxβ Chui if t 7→Maxβ u As expected, Lemma 2.2 (Basic Properties of the Maximal Strategy, Proof at page 13). Let t be a λ-term that is not normal. Then 1. Completeness: there exists u such that t →Maxβ u. 2. Determinism: moreover, such a u is unique. Let us point out that we talk about the maximal strategy despite the fact that there are many maximal strategies, that can be obtained from our definition by adding some more freedom in the choice of the redex. A typical example is given by xtu: our strategy first reduces t and then (if t terminates) it evaluates u, while one can interleave the evaluations of t and u and still be maximal (because t cannot act on u in xtu). We refer it as the maximal strategy, because it is the leftmost maximal strategy, i.e. it mostly behaves as the leftmost strategy, it only changes its behavior on erasing redexes (and the leftmost strategy is a sort of canonical strategy). 3 Preliminaries on Abstract Machines We study two abstract machines, the Maximal Milner Abstract Machine (Max MAM) (Fig. 4) and an auxiliary machine called the Checking AM (Fig. 2). The Max MAM is a reasonable implementation of the maximal strategy resting on labeled environments to implement useful sharing, and on the Checking AM to produce these labels. The Max MAM is meant to implement the maximal strategy via a decoding function · mapping machine states to λ-terms. Machine states s are given by a code t, that is a λ-term t not considered up to α-equivalence (which is why it is over-lined), and some data-structures like stacks, frames, and environments. The data-structures are used to implement the search for the next maximal redex and a form of micro-steps substitution, and they decode to evaluation contexts for →Maxβ . Every state s decodes to a term s, having the shape Cs hti, where t is the code currently under evaluation and Cs is the evaluation context given by the data-structures. The Checking AM uses the same states and data-structures of the Max MAM. 3 The Data-Structures. First of all, our machines are executed on wellnamed terms, that are those α-representants where all variables (both bound and free) have distinct names. Then, the data-structures used by the machines are defined in Fig. 1, namely: 1. Stack π: it contains the arguments of the current code; 2. Frame F : a second stack, that together with π is used to walk through the term and search for the next redex to reduce. The items φ of a frame are of three kinds: 1. Variables: a variable x is pushed on the frame F whenever the machines starts evaluating under an abstraction λx. 2. Head argument contexts: t♦π is pushed on F every time evaluation enters in the right subterm u of an application tu. The entry saves the left part t of the application and the current stack π, to restore them when the evaluation of the right subterm u is over. 3. Erasing Contexts: λx.tπ is pushed on F every time evaluation finds an erasing redex (λx.t)u (that is, a redex for which x ∈ / fv(t)). In this case evaluation enters in the argument u to normalize it (or, possibly, to diverge) before erasing it. 4. Global Environment E: it is used to implement micro-step substitution (i.e. on a variable occurrence at the time), storing the arguments of β-redexes that have been encountered so far. Most of the literature on abstract machines uses local environments and closures. Having just one global environment E (used only in a minority of works [FS09, SGM02, DZ13, ABM14, AC15, ABM15, Acc16, AG17], and discussed at length in [AB17]) removes the need for closures and simplifies the machine. On the other hand, it forces to use α explicit α-renamings (the operation t in ered and eabs in Fig. 4), but this does not affect the overall complexity, as it speeds up other operations, see [AB17]. The entries of E are of the form [x t]l , i.e. they carry a label l used to implement usefulness, to be explained later on in this section. We write E(x) = [x t]l when E contains [x t]l and E(x) = ⊥ when in E there are no entries of the form [x t]l . →→ The Decoding. Every state s decodes to a term s (see Fig. 3) of shape Cs ht E i, where 1. t E is a λ-term, roughly obtained by applying to the code the substitution induced by the global environment E. More precisely, the operation t E is called unfolding and it is properly defined at the end of this section. 2. Cs is a context, that will be shown to be a max context, obtained by decoding the stack π and the dump D and applying the unfolding. Note that, to improve readability, π is decoded in postfix notation for plugging. → The Transitions. According to the distillation approach of [ABM14] (related to Danvy and Nielsen’s refocusing [DN04]) we distinguish different kinds of transitions, whose names reflect a proof-theoretical view, as transitions can be seen as cut-elimination steps [ABS09, ABM14]: 1. Multiplicatives m : they correspond to the firing of a β-redex (λx.t)u, except that if the argument u is not a variable and the redex is not erasing (that happens when x ∈ fv(t)) then u is not substituted but added to the environment; 2. Exponentials e : they perform a clashing-avoiding substitution from the 4 ✓ Frames Frame Items Labels ✒ F φ l ::= ::= ::= ǫ | F :: φ x | t♦π | λx.tπ abs | (red, n ∈ N) | neu Stacks π ::= Phases ϕ ::= Environments E ::= Figure 1: Grammars. → environment on the single variable occurrence represented by the current code. They implement micro-step substitution. 3. Commutatives c : they locate and expose the next redex according to the maximal strategy, by rearranging the data-structures. Both exponential and commutative transitions are invisible on the λ-calculus. Garbage collection of environment entries that are no longer necessary is here simply ignored, or, more precisely, it is encapsulated at the meta-level, in the decoding function. Labels for Useful Sharing A label l for a code in the environment can be of three kinds. Roughly, they are: 1. Neutral, or l = neu: it marks a neutral term, that is always useless as it is β-normal and its substitution cannot create a redex, because it is not an abstraction; 2. Abstraction, or l = abs: it marks an abstraction, that is a term that is at times useful to substitute. If the variable that it is meant to replace is applied, indeed, the substitution of the abstraction creates a β-redex. But if it is not applied, it is useless. 3. Redex, or l = red: it marks a term that contains a β-redex. It is always useful to substitute these terms. Actually, the explanation we just gave is oversimplified, but it provides a first intuition about labels. In fact in an environment [x t]l :: E it is not really t that has the property mentioned by its label, rather the term t E obtained by unfolding the rest of the environment on t. The idea is that [x t]red states that it is useful to substitute t to later on obtain a redex inside it (by potential further substitutions on its variables coming from E). The precise meaning of the labels will be given by Definition 4.2, and the properties they encode will be made explicit by Lemma 6.11 in the Appendix (page 31). A further subtlety is that the label red for redexes is refined as a pair (red, n), where n is the number of substitutions in E that are needed to obtain the maximal redex in t E . Our machines never inspect these numbers, they are only used for the complexity analysis of Sect. 6. → Grafting and Unfoldings The unfolding of the environment E on a code t is defined as the recursive capture-allowing substitution (called grafting) of the entries of E on t. For lack of space, the precise definition has been moved to the Appendix (page 13). 4 The Checking Abstract Machine The Checking Abstract Machine (Checking AM) is defined in Fig. 2 and it is a variation over the very similar auxiliary checking machine for the Useful MAM in [Acc16]. The difference between the two is in the two new transitions ⇀c7 5 ǫ | t :: π H|N ǫ | [x t]l :: E ✏ ✑ ✬ Frame F F Code tu λx.t Stack Env π E u :: π E Ph H ⇀Hc1 H ⇀o1 Frame Code t F output (red, 1) F λx.t u :: π H F :: λx.tπ F F λx.t x F x F x F :: x F :: t♦π F :: λx.tπ F ǫ ǫ t u u t tu λx.t F :: x t ǫ output (red, n + 1) if E(x) = [x t](red,n) u :: π E H ⇀o3 output (red, 2) if E(x) = [x t]abs π E H ⇀Hc3 x π E N F if E(x) = ⊥ or E(x) = [x t]neu or (E(x) = [x t]abs and π = ǫ) F ǫ E N ⇀Nc4 λx.t ǫ E N F ǫ E N ⇀Nc5 tu π E N ǫ E N ⇀o6 output (red, 1) u :: π E N ⇀Nc6 u ǫ E H F :: t♦π ǫ E N ⇀o4 output neu ǫ E N ⇀o5 output abs ✫ E E Hc7 u ⇀Hc2 ⇀o2 H H ǫ Figure 2: The Checking Abstract Machine (Checking AM). h·i πhh·iui Dhπhth·iii Dhπh(λx.t)h·iii F :: x := Dhλx.h·ii Cs := Dhπi E s := Dhπhtii E = Cs ht where s = (F, t, π, E) Ei Figure 3: Decoding. and ⇀o6 (that is also why in Fig. 2 they are misplaced with respect to the progressing numbering), plus the side condition if x ∈ fv(t) in ⇀o1 . The Checking AM starts executions on states of the form (ǫ, t, ǫ, E, H), with the aim of checking the usefulness of t with respect to the environment E, i.e. it walks through t and whenever it encounters a variable x it looks up its usefulness in E. The Checking AM has seven commutative transitions, noted ⇀ci with i = 1, .., 7, used to walk through the term, and six output transitions, noted ⇀oj with j = 1, .., 6, that produce the value of the test for usefulness, to be later used by the Max MAM. The exploration is done in two alternating phases, evaluation H and backtracking N. Evaluation explores the current code (morally towards the head, except when it encounters an erasing redex, that is when it first explores the right subterm) storing in the stack and in the frame the parts of the code that it leaves behind. Backtracking comes back to an argument that was stored in the frame, when the current head has already been checked. Note that the Checking AM never modifies the environment, it only looks it up, nor it erases or duplicates any piece of code, it only walks through the data structures. Let us explain the transitions. First the commutative ones: • ⇀Hc1 : the code is an application tu and the machine starts exploring the left subterm t, storing u on top of the stack π. 6 ✩ ✪ ✘ → := := := := → ǫ u :: π F :: t♦π F :: λx.tπ ✚ Ph H if x ∈ fv(t) E H if x ∈ / fv(t) E H → ✛ ǫ π E Stack Env u :: π E ✙ • ⇀Hc7 : the code λx.t and the first argument u on the stack form an erasing redex (by hypothesis x ∈ / fv(t)). The machine has found a β-redex but it cannot output yet, because it does not know what number n to associate to the label l = (red, n). Indeed, (λx.t)u is the next β-redex to reduce only if u is normal, otherwise the next one will be in u and obtaining it may require many substitution steps. Therefore, the machine stores λx.t and the current stack π on the frame F and starts checking u (with an empty stack). • ⇀Hc2 : the code is an abstraction λx.t and the machine goes under the abstraction, storing x on top of the frame F . • ⇀Hc3 : the machine finds a variable x that either has no associated entry in the environment (if E(x) = ⊥) or its associated entry [x t]l in the environment is useless. This can happen if either l = neu, i.e. substituting t would only lead to a neutral term, or l = abs, i.e. substituting t would provide an abstraction, but the stack is empty, and so it is useless to substitute the abstraction because no β-redexes will be obtained. Thus the machine switches to the backtracking phase (N), whose aim is to undo the frame to obtain a new subterm to explore. • ⇀Nc4 : it is the inverse of ⇀Hc2 , it puts back on the code an abstraction that was previously stored in the frame. • ⇀Nc5 : backtracking from the evaluation of an argument u, it restores the application tu and the stack π that were previously stored in the frame. • ⇀Nc6 : backtracking from the evaluation of the left subterm t of an application tu, the machine starts evaluating the right subterm (by switching to the evaluation phase H) with an empty stack ǫ, storing on the frame the pair t♦π of the left subterm and the previous stack π. Then the output transitions: • ⇀o1 : the machine finds a non-erasing β-redex, namely (λx.t)u (by hypothesis x ∈ fv(t), and thus outputs a label saying that it requires only one substitution step (namely substituting the term the machine was executed on) to eventually find a β-redex. • ⇀o2 : the machine finds a variable x whose associated entry [x t](red,n) in the environment is labeled with (red, n), and so outputs a label saying that it takes n + 1 substitution steps to eventually find a β-redex (n plus 1 for the term the machine was executed on). • ⇀o3 : the machine finds a variable x whose associated entry [x t]abs in the environment is labeled with abs, so t is an abstraction, and the stack is non-empty. Since substituting the abstraction will create a β-redex, the machine outputs a label saying that it takes two substitution steps to obtain a β-redex, one for the term the machine was executed on and one for the abstraction t. • ⇀o6 : the machine went through the whole code u and found no redexes. Then u is normal and together with the erasing abstraction λx.t in the 7 frame it forms an erasing redex ready to fire, and so the output is a label saying that it requires only one substitution step (namely substituting the term the machine was executed on) to eventually find a β-redex. • ⇀o4 : the machine went through the whole term, that is an application, and found no redex, nor any redex that can be obtained by substituting from the environment. Thus that term is neutral and so the machine outputs the corresponding label. • ⇀o5 : as for the previous transition, except that the term is an abstraction, and so the output is the abs label. The fact that commutative transitions only walk through the code, without changing anything, is formalized by the following lemma, that is crucial for the proof of correctness of the Checking AM (forthcoming Theorem 4.3). Lemma 4.1 (Commutative Transparency, Proof at P. 14). Let s = (F, t, π, E, ϕ) ′ (F ′ , t , π ′ , E, ϕ′ ) = s′ . Then ′ 1. Decoding Without Unfolding: F hhtiπi = F ′ hht iπ ′ i, and 2. Decoding With Unfolding: s = s′ . For the analysis of the properties of the Checking AM we need a notion of well-labeled environment, i.e. of environment where the labels are consistent with their intended meaning. It is a technical notion also providing enough information to perform the complexity analysis, later on. Moreover, it includes two structural properties of environments: 1) in [x t]l the code t cannot be a variable, and 2) there cannot be two entries associated to the same variables. Definition 4.2 (Well-Labeled Environments). Well-labeled environments E are defined by 1. Empty: ǫ is well-labeled; 2. Inductive: [x t]l :: E ′ is well-labeled if E ′ is well-labeled, x is fresh with respect to t and E ′ , and → (a) Abstractions: if l = abs then t and t E′ are normal abstractions; → → (b) Neutral Terms: if l = neu then t is an application and t E′ is neutral. (c) Redexes: if l = (red, n) then t is not a variable, t E ′ contains a β-redex. Moreover, there is a Max-context C such that t = Chui and • if n = 1 then u is a 7→Maxβ -redex, • if n > 1 then u = x and E ′ = E ′′ :: [y u]l :: E ′′′ with – if n > 2 then l = (red, n − 1) – if n = 2 then l = (red, 1) or (l = abs and C is applicative). The study of the Checking AM requires some technical invariants proved in the appendix (page 15). The next theorem provides the main properties of the Checking AM, i.e. that when executed on t and E it provides a label l to extend E with a consistent entry for t (i.e. such that [x t]l :: E is well-labeled), and that such an execution takes time linear in the size of t. 8 c1,2,3,4,5,6,7 Let us explain an important point about the complexity of the machine transition. Variables are meant to be implemented as memory locations and variable occurrences as pointers to those location. Therefore, the global environment E is a store and can be accessed randomly, that is, with no need to go through it sequentially. With this hypothesis on the representation of terms, see [AB17] for an actual implementation, all the transitions of the Checking AM but ⇀Hc7 / fv(t) in ⇀Hc7 and ⇀o1 can be implemented in constant time. The check x ∈ / ∈ and ⇀o1 at first sight requires time proportional to the size of the initial term, but in fact it can be implemented in O(1) if one assumes a stronger hypothesis on the representation of terms: a variable is a data-type with a memory location plus pointers to its occurrences. Then all transitions can be implemented in O(1). Anyway, this hypothesis is not essential for the implementation to be reasonable. If dropped, the subterm property (Lemma 6.9.1) guarantees that the size of terms does not explode and that the check x ∈ / ∈ / fv(t) can be done in reasonable time. The hypothesis, however, simplifies considerably the analysis. Theorem 4.3 (Checking AM Properties, Proof at Page 18). Let t be a code and E a global environment. 1. Determinism and Progress: the Checking AM is deterministic and there always is a transition that applies; 2. Termination and Complexity: the execution of the Checking AM on t and E always terminates, taking O(|t|) steps, moreover 3. Correctness: if E is well-labeled, x is fresh with respect to E and t, and l is the output then [x t]l :: E is well-labeled. 5 The Maximal Milner Abstract Machine The Maximal Milner Abstract Machine, or Max MAM, is defined in Fig. 4 and it is a small variation over the Useful MAM of [Acc16] (as for the Checking AM, the difference is in the two new transitions, Hc7 and m3 , plus the side condition if x ∈ fv(t) in m2 ). It is very similar to the Checking AM, in particular it has exactly the same commutative transitions, and the same organization in evaluating and backtracking phases. The difference with respect to the Checking AM is that the output transitions are replaced by micro-step computational rules that reduce β-redexes and implement useful substitutions. Let us explain them: • Multiplicative Transition m1 : when the argument of the β-redex (λx.t)y is a variable y then it is immediately substituted in t. This happens because 1) such substitution are not costly (by the subterm invariant, Lemma 6.9 in the Appendix, their cost is bound by the size of t that is bound by the size of the initial term); 2) because in this way the environment stays compact; 3) because in this way the labels for useful sharing are slightly simpler. • Multiplicative Transition m2 : since the argument u is not a variable and the redex is not erasing (x ∈ fv(t) by hypothesis) then the redex is fired by adding the entry [x u]l to the environment, with l obtained by running the Checking AM on u and E. 9 ✬ Frame Code Stack Env F tu π E F λx.t y :: π E F λx.t u :: π E if x ∈ fv(t) and u is not a F λx.t u :: π E F F λx.t x ǫ π E E F x u :: π E F x π E F :: x F :: t♦π F :: λx.tπ F t u u t ǫ ǫ ǫ u :: π E E E E if ✫ α t Ph Frame Code Stack Env Ph F H t u :: π E H Hc1 H t{x y} π E H F m1 H t π [x u]l :: E H F m2 variable and l is the output of the Checking AM on u and E F :: λx.tπ H u ǫ E H Hc7 if x ∈ / fv(t) and u is not a variable F :: x H t ǫ E H Hc2 α H F t π E H ered if E(x) = [x t](red,n) α H F t u :: π E H eabs if E(x) = [x t]abs H x π E N F Hc3 E(x) = ⊥ or E(x) = [x t]neu or (E(x) = [x t]abs and π = ǫ) N λx.t ǫ E N F Nc4 N tu π E N F Nc5 N t π E H F m3 F :: t♦π N u ǫ E H Nc6 is any code α-equivalent to t such that it is well-named and its bound names are fresh with respect to those in the other machine components. Figure 4: The Maximum (Useful) Milner Abstract Machine (Max MAM). • Multiplicative Transition m3 : an invariant of the machine is that when it backtracks (phase N) the code is normal (see Lemma 6.6.2a in the Appendix, page 20). Moreover, every abstraction λx.t in an erasing redex entry λx.tπ in the frame is such that x ∈ / fv(t) (Lemma 6.6.4). Then in m3 the code u is normal and together with λx.t it forms an erasing 7→Maxβ redex. Correctly, the machine throws away u and switches to evaluating t (note the change of phase from N to H). • Exponential Transition ered : the environment entry associated to x is labeled with (red, n) thus it is useful to substitute t. The idea is that in at most n additional substitution steps (shuffled with commutative steps) a βredex will be obtained. To avoid variable clashes the substitution α-renames t. • Exponential Transition eabs : the environment associates an abstraction to x and the stack is non empty, so it is useful to substitute the abstraction (again, α-renaming to avoid variable clashes). Note that if the stack is empty the machine rather backtracks using Hc3 . The Max MAM starts executions on initial states of the form (ǫ, t, ǫ, ǫ, H), where t is such that any two variables (bound or free) have distinct names, and any other component is empty. A state s is reachable if there are an initial state s′ and a Max MAM execution ρ : s′ ∗ s, and it is final if no transitions apply. The theorem of correctness and completeness of the machine with respect to →Maxβ follows. It rests on a technical development that is in the appendix, starting at page 20. The bisimulation is weak because transitions other than m are invisible on the λ-calculus. For a machine execution ρ we denote with |ρ| (resp. |ρ|x ) the number of transitions (resp. x-transitions for x ∈ {m, e, c, . . .}) in ρ. 10 ✩ ✪ Theorem 5.1 (Weak Bisimulation, Proof at Page 25). Let s be an initial Max MAM state of code t. 1. Simulation: for every execution ρ : s d : s →∗Maxβ s′ such that |d| = |ρ|m ; ∗ s′ there exists a derivation 2. Reverse Simulation: for every derivation d : t →∗Maxβ u there is an execution ρ : s ∗ s′ such that s′ = u and |d| = |ρ|m . 6 Quantitative Analysis The complexity analysis of the Max MAM is omitted because it follows exactly, by changing only minimal details, the one for the Useful MAM in [Acc16]. All the details can be found in the Appendix, starting from page 25. Let us anyway provide the schema of the analysis. First of all one proves a subterm invariant, proving that most codes in the state of the Max MAM are subcodes of the initial code. Then the proof of the polynomial bound of the overhead is in three steps. 1. Exponential vs Multiplicative Transitions: we bound the number |ρ|e of exponential transitions of an execution ρ using the number |ρ|m of multiplicative transitions of ρ, that by Theorem 5.1 corresponds to the number of maximal β-steps on the λ-calculus. The bound is quadratic. 2. Commutative vs Exponential Transitions: we bound the number |ρ|c of commutative transitions of ρ by using the number of exponential transitions and the size of the initial term. The bound is linear in both quantities. 3. Global bound : we multiply the number of each kind of transition for the cost of that kind (everything is constant time but for exponential transitions, that are linear in the size of the initial term), and then sum over the kind of transitions. Concretely, one obtains the following theorem. Theorem 6.1 (Max MAM Overhead Bound, Proof at Page 34). Let d : t →∗Maxβ u be a maximal derivation and ρ be the Max MAM execution simulating d given by Theorem 5.1.2. Then: 1. Length: |ρ| = O((1 + |d|2 ) · |t|). 2. Cost: ρ is implementable on RAM in O((1 + |d|2 ) · |t|) steps. References [AB17] Beniamino Accattoli and Bruno Barras. Environments and the complexity of abstract machines. In PPDP 2017, pages 4–16, 2017. [ABM14] Beniamino Accattoli, Pablo Barenbaum, and Damiano Mazza. Distilling abstract machines. In ICFP 2014, pages 363–376, 2014. [ABM15] Beniamino Accattoli, Pablo Barenbaum, and Damiano Mazza. A strong distillery. In APLAS 2015, pages 231–250, 2015. 11 [ABS09] Zena M. Ariola, Aaron Bohannon, and Amr Sabry. Sequent calculi and abstract machines. ACM Trans. Program. Lang. Syst., 31(4), 2009. [AC15] Beniamino Accattoli and Claudio Sacerdoti Coen. On the relative usefulness of fireballs. In LICS 2015, pages 141–155, 2015. [Acc16] Beniamino Accattoli. The Useful MAM, a Reasonable Implementation of the Strong λ-Calculus. In WoLLIC 2016, pages 1–21, 2016. [Acc17] Beniamino Accattoli. (In)Efficiency and Reasonable Cost Models. In LSFA 2017, 2017. [AG17] Beniamino Accattoli and Giulio Guerrieri. Implementing open callby-value. In FSEN 2017, Tehran, Iran, April 26-28, 2017, Revised Selected Papers, pages 1–19, 2017. [AL16] Beniamino Accattoli and Ugo Dal Lago. (Leftmost-Outermost) Beta-Reduction is Invariant, Indeed. LMCS, 12(1), 2016. [Cré90] Pierre Crégut. An abstract machine for lambda-terms normalization. In LISP and Functional Programming, pages 333–340, 1990. [Cré07] Pierre Crégut. Strongly reducing variants of the Krivine abstract machine. Higher-Order and Symbolic Computation, 20(3):209–230, 2007. [DN04] Olivier Danvy and Lasse R. Nielsen. Refocusing in reduction semantics. Technical Report RS-04-26, BRICS, 2004. [DZ13] Olivier Danvy and Ian Zerny. A synthetic operational account of call-by-need evaluation. In PPDP, pages 97–108, 2013. [FGSW07] Daniel P. Friedman, Abdulaziz Ghuloum, Jeremy G. Siek, and Onnie Lynn Winebarger. Improving the lazy Krivine machine. HigherOrder and Symbolic Computation, 20(3):271–293, 2007. [FS09] Maribel Fernández and Nikolaos Siafakas. New developments in environment machines. Electr. Notes Theor. Comput. Sci., 237:57– 73, 2009. [GL02] Benjamin Grégoire and Xavier Leroy. A compiled implementation of strong reduction. In (ICFP ’02)., pages 235–246, 2002. [GNM13] Álvaro Garcı́a-Pérez, Pablo Nogueira, and Juan José MorenoNavarro. Deriving the full-reducing krivine machine from the smallstep operational semantics of normal order. In PPDP, pages 85–96, 2013. [Ses97] Peter Sestoft. Deriving a lazy abstract machine. J. Funct. Program., 7(3):231–264, 1997. [SGM02] David Sands, Jörgen Gustavsson, and Andrew Moran. Lambda calculi and linear speedups. In The Essence of Computation, pages 60–84, 2002. 12 [vRSSX99] Femke van Raamsdonk, Paula Severi, Morten Heine Sørensen, and Hongwei Xi. Perpetual reductions in lambda-calculus. Inf. Comput., 149(2):173–225, 1999. [Wan07] Mitchell Wand. On the correctness of the krivine machine. HigherOrder and Symbolic Computation, 20(3):231–235, 2007. Proof Appendix 6.1 Proof of the properties of the Maximal Strategy (L.2.2, p. 3) Proof. By induction on t. Cases: • Variable, i.e. t = x. Then t is normal, absurd. • Abstraction, i.e. t = λx.r. Then by i.h. there exists s such that r →Maxβ s. By rule (λ), t = λx.r →Maxβ λx.s, i.e. just take u := λx.s. Determinism: it follows from the i.h. • Application, i.e. t = rs. Two cases: – r is an abstraction, i.e. r = λx.p. Two sub-cases: ∗ x ∈ r or s is normal. Then t = (λx.p)s 7→Maxβ p{x s}. Determinism: the rules for Max contexts do not allow to evaluate in r, because λz.r is applied, nor to evaluate in s (if it is not normal) because then x ∈ r and so rule (gc) cannot be applied. ∗ x∈ / r and s is not normal. By i.h. there exists a unique q such that s →Maxβ q, that is, there is a perpetual context C such that s = Chs′ i →Maxβ Chq ′ i with s′ 7→Maxβ q ′ . By rule (gc), (λx.p)C is a Max-context and t = (λx.p)Chs′ i →Maxβ (λx.p)Chq ′ i. Clearly, there cannot be any →Maxβ redex in r, so determinism holds. – r is not an abstraction. Two sub-cases: ∗ r is not normal. Then by i.h. there exists unique p such that r →Maxβ p, By rule (@l), t = rs →Maxβ ps. Since r reduces, it is not neutral and so there cannot be →Maxβ redexes in s (because rule (gc)does not apply). ∗ r is normal and thus neutral. Then s is not normal (otherwise t is normal, absurd). By i.h. there exists unique p such that s →Maxβ p. By rule (@r), t = rs →Maxβ rp, and since r is neutral this is the unique →Maxβ redex of t. 6.2 Definition of Grafting and Unfolding, and their Properties The unfolding of the environment E on a code t is defined as the recursive capture-allowing substitution (called grafting) of the entries of E on t. 13 Definition 6.2 (Grafting and Environment Unfolding). The operation of grafting t{|x u|} is defined by (rs){|x u|} x{|x u|} := r{|x u|}s{|x u|} := u (λy.r){|x u|} := y{|x u|} := λy.r{|x u|} y Given an environment E we define the unfolding of E on a code t as follows: [x u]l ::E u Er E λx.u E x x [x u]l ::E ′ t{|x u|} := → t ǫ → t := → t E or equivalently as: u x E′ x := → [y u]l ::E ′ := := →→ →→ E := := →→ E → →→ (ur) (λx.u) E′ ǫ → For instance, (λx.y) [y xx]neu = λx.(xx). The unfolding is extended to contexts as expected (i.e. recursively propagating the unfolding and setting h·i E = E). Let us explain the need for grafting. In [ABM15], the Strong MAM is decoded to the LSC, that is a calculus with explicit substitutions, i.e. a calculus able to represent the environment of the Strong MAM. Matching the representation of the environment on the Strong MAM and on the LSC does not need grafting but it is, however, a quite technical affair. Useful sharing adds many further complications in establishing such a matching, because useful evaluation computes a shared representation of the normal form and forces some of the explicit substitutions to stay under abstractions. The difficulty is such, in fact, that we found much easier to decode directly to the λ-calculus rather than to the LSC. Such an alternative solution, however, has to push the substitution induced by the environment through abstractions, which is why we use grafting. The following easy properties will be used to prove the correctness of the machine (in Lemma 6.7). → Lemma 6.3 (Properties of Grafting and Unfolding). 1. If the bound names of t do not appear free in u then t{x u} = t{|x u|}. E} = t{x u} E. → 6.3 u → E {x → 2. If moreover they do not appear free in E then t Proof of the Commutative Transparency Lemma (L.4.1, p. 8) 1. Transitions: • Case (F, tu, π, E, H) Dhhtiu :: πi. Hc1 (F, t, u :: π, E, H). We have Dhπhtuii = • Case (F, λx.t, u :: π, E, H) Hc7 (F :: λx.tπ, u, ǫ, E, H). We have Dhhλx.tiu :: πi = Dhπh(λx.t)uii = (F :: λx.tπ)hui. • Case (F, λx.t, ǫ, E, H) F :: xhti. • Case (F, x, π, E, H) Hc2 Hc3 • Case (F :: x, t, ǫ, E, N) (F :: x, t, ǫ, E, H). We have F hλx.ti = (F, x, π, E, N). Nothing to prove. Nc4 (F, λx.t, ǫ, E, N). Exactly as 14 Hc2 . x • Case (F :: t♦π, u, ǫ, E, N) Dhπhtuii. Nc5 (F, tu, π, E, N). We have (F :: t♦π)hui = • Case (F, t, u :: π, E, N) Nc6 (F :: t♦π, u, ǫ, E, H). We have Dhhtiu :: πi = Dhπhtuii = (F :: t♦π)hui. 6.4 E ′ =P.1 F ′ hht iπ ′ i = s′ . → → 2. We have s = F hhtiπi E The Checking AM Invariants Lemma (L.6.5, p. 15) Before the invariants we need a lemma to be used in the proof of the decoding invariant. Lemma 6.4. Let C be a context. 1. Right Extension: Ch·i is Max iff Chh·iui is Max; 2. Left Neutral Extension: Ch·i is Max and u is neutral iff Chuh·ii is Max; 3. Abstraction Extension: Ch·i is Max and not applicative iff Chλx.h·ii is Max. 4. Erasing Redexes Extension: Ch·i is Max and x ∈ / fv(t) iff Ch(λx.t)h·ii is Max. → 5. Unfolding Removal: if C E is Max then C is Max. Proof. By induction on the predicate C is Max (Definition 2.1, page 2). Now, some terminology: • A state s is initial if it is of the form (ǫ, t, ǫ, E, H) with E well-labeled, t well-named and such that the variables abstracted in t do not occur in E. • A state s is reachable if there are an initial state s′ and a Checking AM execution ρ : s′ ⇀∗ s. Finally: Lemma 6.5 (Checking AM Invariants, Proof at P. 15). Let F | u | π | E | ϕ be a Checking AM state reachable from an initial state of code t0 . Then 1. Normal Form: → (a) Backtracking Code: if ϕ = N, then u empty, then u E is neutral; E is normal, and if π is non- → → (b) Frame: if F = F ′ :: r♦π ′ :: F ′′ , then r E is neutral. 2. Subterm: (a) Evaluating Code: if ϕ = H, then u is a subterm of t0 ; (b) Stack: any code in the stack π is a subterm of t0 ; (c) Frame: i. Head Contexts: if F = F ′ :: r♦π ′ :: F ′′ , then any code in π ′ is a subterm of t0 ; 15 ii. Erasing Redexes: if F = F ′ :: λx.rπ ′ :: F ′′ , then λx.r and any code in π ′ are subterms of t0 ; → 3. Erasing Redexes: if F = F ′ :: λx.rπ ′ :: F ′′ then x does not occur in E, x∈ / fv(r), and x ∈ / fv(r E ). 4. Decoding: Cs is a Max context. Proof. 1. Normal Form: the invariant trivially holds for an initial state ǫ | t | ǫ | E | H. For a non-empty evaluation sequence we list the cases for the last transition. We omit Hc1 because it follows immediately from the i.h. • Case (F, λx.t, ǫ, E, H) Hc2 (F :: x, t, ǫ, E, H). (a) Backtracking Code: trivial since ϕ 6= N. (b) Frame: it follows by the i.h., since the transition only extends F with an item that is not a head context. • Case (F, λx.t, u :: π, E, H) fv(t). Hc7 / (F :: λx.tπ, u, ǫ, E, H) with x ∈ (a) Backtracking Code: trivial since ϕ 6= N. (b) Frame: it follows by the i.h., since the transition only extends F with an item that is not a head context. • Case (F, x, π, E, H) Hc3 (F, x, π, E, N) with E(x) = ⊥ or E(x) = [x u]neu or (E(x) = [x u]abs and π = ǫ). → (a) Backtracking Code: three cases depending on E: i. E(x) = ⊥: then x E = x, that is both a normal and a neutral term. ii. E(x) = [x u]neu : more precisely E = E1 :: [x u]neu :: E2 . Then we have x E = x E1 ::[x u]neu ::E2 = x [x u]neu ::E2 = u E2 that is a neutral term because E is well-labeled. Note that E1 cannot bound x because of the freshness requirements in the definition of well-labeled environment. iii. E(x) = [x u]abs and π = ǫ: similarly to the previous case we obtain that x E is a normal abstraction. (b) Frame: it follows from the i.h., as F is unchanged. → → → → → • Case (F :: x, t, ǫ, E, N) (F, λx.t, ǫ, E, N). Nc4 → (a) Backtracking Code: by i.h. we know that t E is a normal term. Then (λx.t) E = λx.t E is a normal term. The stack is empty, so we conclude. (b) Frame: it follows from the i.h., as F is unchanged. → → • Case (F :: t♦π, u, ǫ, E, N) Nc5 (F, tu, π, E, N). → (a) Backtracking Code: by i.h. we have that u E is a normal term while by Point 1b of the i.h. t E is a neutral term. Therefore (tu) E = t E u E is a neutral term. (b) Frame: it follows from the i.h., as F is unchanged. → → → → • Case (F, t, u :: π, E, N) Nc6 (F :: t♦π, u, ǫ, E, H). 16 → (a) Backtracking Code: trivial since ϕ 6= N. (b) Frame: t E is a neutral term by Point 1a of the i.h., the rest follows from the i.h. 2. Subterm: This is a special case of the more refined subterm invariant of the Max MAM (Lemma 6.9.1, page 26). → 3. Erasing Redexes: the invariant trivially holds for an initial state ǫ | t | ǫ | E | H. For a non-empty evaluation sequence, for all transitions but Hc7 the statement follows immediately from the i.h. because they all leave untouched the erasing redex items in the frame. So consider (F, λx.r, u :: π, E, H) Hc7 (F :: λx.rπ, u, π, E, H). By the hypothesis on the transition, we have x ∈ / fv(r). By the subterm invariant (Lemma 6.5.2a), λx.r is a subterm of the initial term and so, by the hypotheses on initial states, x does not occur in E. Last, since x does not occur in E nor in r, clearly it does not occur in r E . → 4. Decoding: the invariant trivially holds for an initial state ǫ | t | ǫ | E | H. For a non-empty evaluation sequence we list the cases for the last transition. To simplify the reasoning in the following case analysis we let implicit that the unfolding spreads on all the subterms, i.e. that Dhhtiπi E = F E hht E iπ E i. Cases: → → → → → • Case s′ = (F, tu, π, E, H) Hc1 (F, t, u :: π, E, H) = s. By Lemma 6.4.1, Cs = Dhh·iu :: πi E is Max iff Cs′ = Dhh·iπi E is Max, and Cs′ is Max by i.h. → → → → / • Case (F, λx.r, u :: π, E, H) Hc7 (F :: λx.rπ, u, ǫ, E, H) with x ∈ fv(t). By i.h., Cs′ = F hh·iu :: πi E = F E hh·iu E :: π E i is Max, and by Lemma 6.4.1 F E hh·iπ E i is Max. By the erasing redexes invariant (Lemma 6.5.3), we have x ∈ / fv(r E ). Then by Lemma 6.4.4 F E hh(λx.r E )h·iiπ E i = F hh(λx.r)h·iiπi E = Cs′ is Max. → → → → → → → → → • Case s′ = (F, λx.t, ǫ, E, H) Hc2 (F :: x, t, ǫ, E, H) = s. We have Cs = Dhλx.h·ii E and by i.h. we know that Dh·i E = Cs′ is Max. Note that by definition the decoding of frames cannot be applicative. Then Cs is Max by Lemma 6.4.3. → • Case s′ = (F, x, π, E, H) Hc3 (F, x, π, E, N) = s with E(x) = ⊥ or E(x) = [x u]neu or (E(x) = [x u]abs and π = ǫ). We have Cs = Dhh·iπi E = Cs′ , and so the statement follows immediately from the i.h. → → • Case s′ = (F :: x, t, ǫ, E, N) Nc4 (F, λx.t, ǫ, E, N) = s. We have Cs = Dh·i E and by i.h. we know that Dhλx.h·ii is Max. Then Cs is Max by Lemma 6.4.3. E = Cs′ → → • Case s′ = (F :: t♦π, u, ǫ, E, N) Nc5 (F, tu, π, E, N) = s. By i.h. Cs′ = Dhhth·iiπi E is Max, and so by Lemma 6.4.2 Dhh·iπi E = Cs is Max. 17 → → → • Case s′ = (F, t, u :: π, E, N) Nc6 (F :: t♦π, u, ǫ, E, H) = s. By i.h. Cs′ = Dhh·iπi E = F E hh·iπ E i is Max, and by Lemma 6.5.1a → applied to s′ we obtain that t E is neutral (because the stack is nonempty). So by Lemma 6.4.2 F E hht E h·iiπ E i = F hhth·iiπi E = Cs is Max. → → → → 6.5 Proof of the Checking AM Properties Theorem (Thm 4.3, p. 9) Proof. 1. An inspection of the transition rules shows that there always is one and exactly one transition of the Checking AM that applies: for each phase (H and N) consider each case of the code (application, abstraction, variable) and the various combinations stack/frame. 2. By the previous point, the executions of the Checking AM are sequences of commutative steps that either diverge or are followed by an output transition. We now introduce a measure and prove that the sequence of commutative steps is always finite. In particular, it is bounded by the size of the initial term. Consider the following notion of size for stacks, frames, and states: |ǫ| := |t :: π| := |(F, t, π, E, H)| := 0 |t| + |π| |F | + |π| + |t| |F :: x| |F :: t♦π| |F :: λx.tπ| |(F, t, π, E, N)| := := := := |F | |π| + |F | |t| + |π| + |F | |F | + |π| The proof of the bound is in 3 steps: (a) Evaluation Commutative Steps Are Bound by the Size of the Initial Term. By direct inspection of the rules of the machine it can be checked that: ′ • Evaluation Commutative Rules Decrease the Size: if s a s with a ∈ {Hc1 , Hc2 , Hc3 , Hc7 } then |s′ | < |s|; • Backtracking Transitions do not Change the Size: if s a s′ with a ∈ {Nc4 , Nc5 , Nc6 } then |s′ | = |s|. Then a straightforward induction on the length of an execution ρ shows that |s′ | ≤ |s| − |ρ|Hc i.e. that |ρ|Hc ≤ |s| − |s′ | ≤ |s| = |(ǫ, t, ǫ, E, H)| = |t|. (b) Backtracking Commutative Steps Are Bound by the Evaluation Ones. We have to estimate |ρ|Nc = |ρ|Nc4 + |ρ|Nc5 + |ρ|Nc6 . Note that i. |ρ|Nc4 ≤ |ρ|Hc2 , as Nc4 ; ii. |ρ|Nc5 ≤ |ρ|Nc6 , as Nc6 ; Nc4 pops variables from F , pushed only by Nc5 pops pairs t♦π from F , pushed only by 18 iii. |ρ|Nc6 ≤ |ρ|Hc3 , as by Hc3 . ends backtracking phases, started only Nc6 Then |ρ|Nc ≤ |ρ|Hc2 + 2|ρ|Hc3 ≤ 2|ρ|Hc . (c) Bounding All Commutative Steps by the Size of the Intial Term. We have |ρ|c = |ρ|Hc + |ρ|Nc ≤P.2 = |ρ|Hc + 2|ρ|Hc ≤P.1 3 · |t|. → 3. By the previous points executions of the Checking AM are sequences of commutative transitions followed by an output transition, i.e. they have the form s ⇀∗c s′ ⇀o l where l is the output label of the machine. The initial state by hypothesis is s := (ǫ, t, , E, H). Since commutative transitions do not change the decoding (Lemma 4.1), we have s′ = s = t E . To prove that [x t]l :: E is well-labeled—that requires to prove properties of t E —we will then look at s′ and at the various possible output transitions. Five cases: → • s′ = (F, λy.r, u :: π, E, H) ⇀o1 (red, 1) with y ∈ fv(r). Then E hh(λy.r E )u E iπ E i → that has a β-redex. Now, we show that t decomposes as a 7→Maxβ -redex in a Max context. By Lemma 6.5.4, F hh·iu :: πi E = Cs′ is a Max context. By Lemma 6.4.5, F hh·iu :: πi is also Max. Then F hh·iπi is Max by Lemma 6.4.1. Moreover, (λy.r)u is a 7→Maxβ redex because y ∈ fv(r) by hypothesis. Finally, t = F hh(λy.r)uiπi by Lemma 4.1.1. The Checking AM is executed only on terms that are not variables, and so [x t](red,1) :: E is well-labeled. • s′ = (F, y, π, E, H) ⇀o2 (red, n + 1) with E(y) = [y u](red,n) . Then =F E hhy E iπ E i → E → = s′ = F hhyiπi → E → → t → Since E is well-labeled and E(y) = [y u](red,n) we have that y E contains a β-redex, and so does t E . Now, we show that t decomposes as a variable in a Max context. By Lemma 6.5.4, F hh·iπi E = Cs′ is a Max context. By Lemma 6.4.5, F hh·iπi is also Max. Finally, t = F hhyiπi by Lemma 4.1.1. Therefore [x t](red,n+1) :: E is well-labeled. → → • s′ = (F, y, u :: π, E, H) ⇀o3 (red, 2) with E(y) = [y u]abs . Then =F E hhy E u E iπ E i → E → = F hhyuiπi → E → = s′ = F hhyiu :: πi → E → → t → Since E is well-labeled and E(y) = [x u]abs we have that y E is an abstraction and so t E contains the β-redex y E u E . Now, we show that t decomposes as a variable in an applicative Max context. By Lemma 6.5.4, F hh·iu :: πi E = Cs′ is a Max context. By Lemma 6.4.5, F hh·iu :: πi is also Max. Additionally, it is applicative. Finally, t = F hhyiu :: πi by Lemma 4.1.1. Therefore [x t](red,2) :: E is well-labeled. → → → → 19 → =F E → = F hh(λy.r)uiπi → E → = s′ = F hhλy.riu :: πi → E → → t →→ → →→ • s′ = (ǫ, ur, ǫ, E, N) ⇀o4 neu. Then t = ur by the commutative transparency lemma (Lemma 4.1.1), and so t is an application. By the normal form invariant (Lemma 6.5.1a), t E = (ur) E is normal. Moreover, it is an application, because (ur) E = u E r E , and so it is neutral. Then [x t]neu :: E is well-labeled. → → • s′ = (ǫ, λy.u, ǫ, E, N) ⇀o5 abs. Then t = λy.u by the commutative transparency lemma (Lemma 4.1.1), and so t is an abstraction. By the normal form invariant (Lemma 6.5.1a), t E = (λy.u) E is normal. Moreover, it is an abstraction, because (λy.u) E = λy.u E . Then [x t]abs :: E is well-labeled. → → • s′ = (F :: λy.rπ, u, ǫ, E, N) ⇀o6 (red, 1). Then → E hh(λy.r E )u E iπ E i =F → E → = s′ = F hh(λy.r)uiπi → E → → t → that has a β-redex. Now, we show that t decomposes as a 7→Maxβ -redex in a Max context. By Lemma 6.5.4, F hh(λy.r)h·iiπi E = Cs′ is a Max context. By Lemma 6.4.5, F hh(λy.r)h·iiπi is also Max. Then F hh·iπi is Max by Lemma 6.4.1. Moreover, by the normal form invariant (Lemma 6.5.1a) u is normal and by the erasing redexes invariant (Lemma 6.5.3) y does not occur in r. Then (λy.r)u is a 7→Maxβ redex. Finally, t = F hh(λy.r)uiπi by Lemma 4.1.1. The Checking AM is executed only on terms that are not variables, and so [x t](red,1) :: E is well-labeled. 6.6 Useful MAM Qualitative Study (L.6.6, p. 20) Four invariants are required. The normal form and decoding invariants are exactly those of the Checking AM (and the proof for the commutative transitions is the same). The environment labels invariant follows from the correctness of the Checking AM (Theorem 4.3.2). The name invariant is used in the proof of Lemma 6.7. Lemma 6.6 (Max MAM Qualitative Invariants, Proof at Page 20). Let s = F | u | π | E | ϕ be a state reachable from an initial term t0 . Then: 1. Environment Labels: E is well-labeled. 2. Normal Form: → (a) Backtracking Code: if ϕ = N, then u empty, then u E is neutral; E is normal, and if π is non- → → (b) Frame: if F = F ′ :: r♦π ′ :: F ′′ , then r E is neutral. 3. Name: (a) Substitutions: if E = E ′ :: [x t] :: E ′′ then x is fresh wrt t and E ′′ ; (b) Abstractions and Evaluation: if ϕ = H and λx.t is a subterm of u, π, or π ′ (if F = F ′ :: r♦π ′ :: F ′′ ) or of a erasing redex item in F then x may occur only in t; 20 (c) Abstractions and Backtracking: if ϕ = N and λx.t is a subterm of π or π ′ (if F = F ′ :: r♦π ′ :: F ′′ ) or of a erasing redex item in F then x may occur only in t. E. → / r and x ∈ /r 4. Erasing Redexes: if F = F ′ :: λx.rπ ′ :: F ′′ , then x ∈ 5. Decoding: Cs is a Max context. Proof. 1. Environment Labels: the only transition that extends the environment is m2 , and it preserves well-labeledness by Theorem 4.3.3. 2. Normal Form: for the commutative transitions the proof is exactly as for the Checking AM, see Lemma 6.5.1 whose proof is at page 15. For the multiplicative and exponential transitions the invariant holds trivially: the backtracking code part because these transition cannot happen during backtracking (note that m3 may happen during backtracking but it ends in a evaluating state, for which then nothing has to be proven), and the frame part because they do not touch the head context items in the frame. 3. Name: the invariant trivially holds for an initial state ǫ | t | ǫ | ǫ | H. For a non-empty evaluation sequence we list the cases for the last transition. • Principal Cases: – Case s′ = (F, λx.t, y :: π, E, H) m1 (F, t{x y}, π, E, H) = s. (a) Substitution: it follows from the i.h. (b) Abstractions and Evaluation: it follows from the i.h. – Case s′ = (F, λx.t, u :: π, E, H) m2 (F, t, π, [x u]l :: E, H) = s with u not a variable and x ∈ fv(t). (a) Substitution: it follows from the i.h. for abstractions in the evaluation phase (Point 3b). (b) Abstractions and Evaluation: it follows from the i.h. α – Case s′ = (F, x, π, E, H) ered (F, t , π, E, H) = s with E(x) = [x u](red,n) . (a) Substitution: it follows from the i.h. (b) Abstractions and Evaluation: it follows by the i.h. and the α fact that in t the abstracted variables are renamed (wrt t) with fresh names. α – Case s′ = (F, x, u :: π, E, H) eabs (F, t , u :: π, E, H) = s with abs E(x) = [x u] . (a) Substitution: it follows from the i.h. (b) Abstractions and Evaluation: it follows by the i.h. and the α fact that in t the abstracted variables are renamed (wrt t) with fresh names. – Case (F :: λx.tπ, u, ǫ, E, N) m3 (F, t, π, E, H). (a) Substitution: it follows from the i.h. (b) Abstractions and Evaluation: it follows by the i.h. • Commutative Cases: 21 – Case s′ = (F, tu, π, E, H) Hc1 (F, t, u :: π, E, H) = s. (a) Substitution: it follows from the i.h. (b) Abstractions and Evaluation: it follows from the i.h. – Case (F, λx.r, u :: π, E, H) Hc7 (F :: λx.rπ, u, ǫ, E, H) with x∈ / fv(t). (a) Substitution: it follows from the i.h. (b) Abstractions and Evaluation: it follows from the i.h. – Case s′ = (F, λx.t, ǫ, E, H) Hc2 (F :: x, t, ǫ, E, H) = s. (a) Substitution: it follows from the i.h. (b) Abstractions and Evaluation: it follows from the i.h. – Case s′ = (F, x, π, E, H) Hc3 (F, x, π, E, N) = s with E(x) = ⊥ or E(x) = [x u]neu or (E(x) = [x u]abs and π = ǫ) . (a) Substitution: it follows from the i.h. 3. Abstractions and Backtracking: it follows from the i.h. of Abstraction and Evaluation (Point 3b). – Case s′ = (F :: x, t, ǫ, E, N) Nc4 (F, λx.t, ǫ, E, N) = s. (a) Substitution: it follows from the i.h. 3. Abstractions and Backtracking: it follows from the i.h. – Case s′ = (F :: t♦π, u, ǫ, E, N) Nc5 (F, tu, π, E, N) = s. (a) Substitution: it follows from the i.h. 3. Abstractions and Backtracking: it follows from the i.h. – Case s′ = (F, t, u :: π, E, N) Nc6 (F :: t♦π, u, ǫ, E, H) = s. (a) Substitution: it follows from the i.h. (b) Abstractions and Evaluation: it follows from the i.h. for Abstractions and Backtracking (Point 3c) → 4. Erasing: the invariant trivially holds for an initial state ǫ | t | ǫ | ǫ | H. For a non-empty evaluation sequence, for all transitions but Hc7 the statement follows immediately from the i.h. because they all leave untouched the erasing redex items in the frame (but for m3 that, however, simply removes one such entry and so trivially preserves the invariant). So consider (F, λx.r, u :: π, E, H) Hc7 (F :: λx.rπ, u, π, E, H). By the hypothesis on the transition, we have x ∈ / fv(r). By the name invariant (Lemma 6.6.3b), x does not occur in E. Last, since x does not occur in E nor in r, clearly it does not occur in r E . → 5. Decoding: the invariant trivially holds for an initial state ǫ | t | ǫ | ǫ | H. For a non-empty evaluation sequence we list the cases for the last transition. To simplify the reasoning in the following case analysis we let implicit that the unfolding spreads on all the subterms, i.e. that Dhhtiπi E = F E hht E iπ E i. → → → • Principal Cases: 22 → → – Case s′ = (F, λx.t, y :: π, E, H) m1 (F, t{x y}, π, E, H) = s. By Lemma 6.4.1, Cs = Dhh·iπi E is Max iff Cs′ = Dhh·iy :: πi is Max, and Cs′ is Max by i.h. E → – Case s′ = (F, λx.t, u :: π, E, H) m2 (F, t, π, [x u]l :: E, H) = s with x ∈ fv(t). We have to prove that Cs′ = Dhh·iπi [x u]l ::E is Max. By the name invariant for abstractions (Lemma 6.6.3b) we have that x does not occur in F nor π, and so Dhh·iπi [x u]l ::E = Dhh·iπi E . Now, by Lemma 6.4.1 Dhh·iπi E is Max iff Dhh·iu :: πi E is Max, that holds by i.h., because this is exactly Cs′ . α – Case s′ = (F, x, π, E, H) ered (F, t , π, E, H) = s with E(x) = [x u](red,n) . We have Cs = Dhh·iπi E = Cs′ , and so the statement follows immediately from the i.h. α – Case s′ = (F, x, u :: π, E, H) eabs (F, t , u :: π, E, H) = s with abs E(x) = [x u] . We have Cs = Dhh·iπi E = Cs′ , and so the statement follows immediately from the i.h. – Case s′ = (F :: λx.tπ, u, ǫ, E, N) m3 (F, t, π, E, H) = s. We have Cs = Dhh·iπi E = F E hht E iπ E i. By the erasing redexes invariant (Lemma 6.6.4), x ∈ / r E . Then, by Lemma 6.4.4 Cs is Max if and only if F E hh(λx.r E )h·iiπ E i = F hh(λy.r)h·iiπi Cs′ is Max, that holds by i.h. → → → → → → → → → → → → → → → E = • Commutative Cases: exactly as in the proof of Lemma 6.5.4. We can now show how every single transition projects on the λ-calculus, and in particular that multiplicative transitions project to Max β-steps. Lemma 6.7 (One-Step Weak Simulation). Let s be a reachable state. 1. Commutative: if s c1,2,3,4,5,6,7 2. Exponential: if s eabs,red 3. Multiplicative: if s m1,2,3 s′ then s = s′ ; s′ then s = s′ ; s′ then s →Maxβ s′ . Proof. 1. Commutative: the proof is exactly as the one for the Checking AM (Lemma 4.1.2), that can be found at page 15. 2. Exponential : α • Case s = (F, x, π, E, H) ered (F, t , π, E, H) = s′ with E(x) = [x t](red,n) . Then E = E ′ :: [x t](red,n) :: E ′′ for some environments E ′ , and E ′′ . Remember that terms are considered up to αequivalence. Ei = Cs′ ht E ′′ i = Cs′ ht Ei → Cs′ hx → = → s = s′ α → → In the chain of equalities we can replace t E ′′ with t E because by well-labeledness the variables bound by E ′ are fresh with respect to t. • Case s = (F, x, u :: π, E, H) eabs (F, t , u :: π, E, H) = s′ with E(x) = [x t]abs . The proof that s = s′ is exactly as in the previous case. 23 3. Multiplicative: → • Case s = (F, λx.t, y :: π, E, H) m1 (F, t{x y}, π, E, H) = s′ . Note that Cs′ = Dhπi E is Max by the decoding invariant (Lemma 6.6.5). Note also that by the name invariant (Lemma 6.6.3b) x can only occur in t. Then: (F, λx.t, y :: π, E, H) = = = →Maxβ =L.6.6.3b&L.6.3.2 = → F hhλx.tiy :: πi E F hh(λx.t)yiπi E Cs′ h(λx.t E )y E i Cs′ ht E {x y E }i Cs′ ht{x y} E i (F, t{x y}, π, E, H) →→→ → → → → → l ′ • Case s = (F, λx.t, u :: π, E, H) m2 (F, t, π, [x u] :: E, H) = s with u not a variable. By the name invariant (Lemma 6.6.3b) x can only occur in t and so Cs′ = Dhh·iπi [x u]l ::E = Dhh·iπi E = F E hh·iπ E i. Moreover, such a context is Max by the decoding invariant (Lemma 6.6.5). Then: → → = = = →Maxβ =L.6.6.3b&L.6.3.2 = =L.6.6.3b&L.6.3.1 =L.6.6.3b = = F hhλx.tiu :: πi E F hh(λx.t)uiπi E F E hh(λx.t E )u E iπ E i F E hht E {x u E }iπ E i F E hht{x u} E iπ E i F hht{x u}iπi E F hht{|x u|}iπi E F hhtiπi{|x u|} E F hhtiπi [x u]l ::E (F, t, π, [x u]l :: E, H) →→ (F, λx.t, u :: π, E, H) →→ →→ → → → →→→ → →→→ → → F hh(λx.t)uiπi E F E hh(λx.t E )u F E hht E iπ E i Dhhtiπi E → E iπ E i → →→ →→ →→ (F :: λx.tπ, u, ǫ, E, N) = = →Maxβ = → → → • Case s = (F :: λx.tπ, u, ǫ, E, N) m3 (F, t, π, E, H) = s′ . Note that Cs′ = Dhh·iπi E = F E hh·iπ E i is Max by the decoding invariant (Lemma 6.6.5). Then: = (F, t, π, E, H) We also need to show that the Max MAM computes β-normal forms. Lemma 6.8 (Progress). Let s be a reachable final state. Then s is β-normal. → Proof. A simple inspection of the machine transitions shows that final states have the form (ǫ, t, ǫ, E, N). Then by the normal form invariant (Lemma 6.6.2a) s = t E is β-normal. 24 6.7 Proof of the Weak Bisimulation Theorem (Thm 5.1, p. 10) Proof. 1. By induction on the length |ρ| of ρ, using the one-step weak simulation lemma (Lemma 6.7). If ρ is empty then the empty derivation satisfies the statement. If ρ is given by σ : s ∗ s′′ followed by s′′ s′ then by i.h. ∗ ′′ ′′ ′ there exists e : s →Maxβ s s.t. |e| = |σ|m . Cases of s s: (a) Commutative or Exponential. Then s′′ = s′ by Lemma 6.7.1 and Lemma 6.7.2, and the statement holds taking d := e because |d| = |e| =i.h. |σ|m = |ρ|m . (b) Multiplicative. Then s′′ →Maxβ s′ by Lemma 6.7.3 and defining d as e followed by such a step we obtain |d| = |e| + 1 =i.h. |σ|m + 1 = |ρ|m . 2. We use nfec (s) to denote the normal form of s with respect to exponential and commutative transitions, that exists and is unique because c ∪ e terminates (termination is given by forthcoming Theorem 6.12 and Theorem 6.14, that are postponed because they actually give precise complexity bounds, not just termination) and the machine is deterministic (as it can be seen by an easy inspection of the transitions). The proof is by induction on the length of d. If d is empty then the empty execution satisfies the statement. If d is given by e : t →∗Maxβ r followed by r →Maxβ u then by i.h. there is an execution σ : s ∗ s′′ s.t. r = s′′ and |σ|m = |e|. Note that since exponential and commutative transitions are mapped on equalities, σ can be extended as σ ′ : s ∗ s′′ ∗ered ,eabs ,c1,2,3,4,5,6 nfec (s′′ ) with nfec (s′′ ) = r and |σ ′ |m = |e|. By the progress property (Lemma 6.8) nfec (s′′ ) cannot be a final state, otherwise r = nfec (s′′ ) could not reduce. Then nfec (s′′ ) m s′ (the transition is necessarily multiplicative because nfec (s′′ ) is normal with respect to the other transitions). By the one-step weak simulation lemma (Lemma 6.7.3) nfec (s′′ ) = r →Maxβ s′ and by determinism of →Maxβ (Lemma 2.2.2) s′ = u. Then the execution ρ defined as σ ′ followed by nfec (s′′ ) m s′ satisfy the statement, as |ρ|m = |σ ′ |m + 1 = |σ|m + 1 = |e| + 1 = |d|. 6.8 Quantitative Analysis The complexity analyses of this section rely on two additional invariants of the Max MAM, the subterm and the environment size invariants. The subterm invariant bounds the size of the duplicated subterms and it is crucial. For us, u is a subterm of t if it does so up to variable names, both free and bound. More precisely: define t− as t in which all variables (including those appearing in binders) are replaced by a fixed symbol ∗. Then, we will consider u to be a subterm of t whenever u− is a subterm of t− in the usual sense. The key property ensured by this definition is that the size |u| of u is bounded by |t|. 25 Lemma 6.9 (Max MAM Quantitative Invariants). Let s = F | u | π | E | ϕ be a state reachable by the execution ρ from the initial code t0 . 1. Subterm: (a) Evaluating Code: if ϕ = H, then u is a subterm of t0 ; (b) Stack: any code in the stack π is a subterm of t0 ; (c) Frame: i. Head Contexts: if F = F ′ :: r♦π ′ :: F ′′ , then any code in π ′ is a subterm of t0 ; ii. Erasing Redexes: if F = F ′ :: λx.rπ ′ :: F ′′ , then λx.r and any code in π ′ are subterms of t0 ; (d) Global Environment: if E = E ′ :: [x r]l :: E ′′ , then r is a subterm of t0 ; 2. Environment Size: the length of the global environment E is bound by |ρ|m . Proof. 1. Subterm: the invariant trivially holds for the initial state ǫ | t0 | ǫ | ǫ | H. In the inductive case we look at the last transition: • Principal Cases: – Case s′ = (F, λx.t, y :: π, E, H) m1 (F, t{x y}, π, E, H) = s. (a) Evaluating Code: note that according to our definition of subterm t{x y} is a subterm of λx.t. (b) Stack : note that any piece code in π is also in u :: π. (c) Frame: it follows from the i.h., since F is not modified. (d) Environment : it follows from the i.h., since E is not modified. – Case s′ = (F, λx.t, u :: π, E, H) m2 (F, t, π, [x u]l :: E, H) = s with u not a variable. (a) (b) (c) (d) Evaluating Code: note that t is a subterm of λx.t. Stack : note that any piece code in π is also in u :: π. Frame: it follows from the i.h., since F is not modified. Environment : the new environment is of the form [x u]l :: E. Pieces of code in E are subterms of t0 by i.h.. Moreover u is the top of the stack u :: π so it is also a subterm of t0 . α – Case s′ = (F, x, π, E, H) ered (F, t , π, E, H) = s with E(x) = (red,n) [x u] . (a) Evaluating Code: note that t is bound by E. By i.h., it is a α subterm of t0 . So t is also a subterm of t0 . (b) Stack : it follows from the i.h., since the stack π is unchanged. (c) Frame: it follows from the i.h., since the frame F is unchanged. (d) Environment : it follows from the i.h., since the environment E is unchanged. α – Case s′ = (F, x, u :: π, E, H) eabs (F, t , u :: π, E, H) = s with abs E(x) = [x u] . 26 (a) Evaluating Code: note that t is bound by E. By i.h., it is a α subterm of t0 . So t is also a subterm of t0 . (b) Stack : it follows from the i.h., since the stack u :: π is unchanged. (c) Frame: it follows from the i.h., since the frame F is unchanged. (d) Environment : it follows from the i.h., since the environment E is unchanged. – Case s = (F :: λx.tπ, u, ǫ, E, N) m3 (F, t, π, E, H) = s′ . (a) Evaluating Code: by the frame part of the i.h. λx.t is a α subterm of t0 , and so is t. So t is also a subterm of t0 . (b) Stack : by the frame part of the i.h. the codes in π are subterms of t0 . (c) Frame: it follows from the i.h. (d) Environment : it follows from the i.h., since the environment E is unchanged. • Commutative Cases: – Case s′ = (F, tu, π, E, H) Hc1 (F, t, u :: π, E, H) = s. (a) Evaluating Code: by i.h., tu is a subterm of t0 , so t is also a subterm of t0 . (b) Stack : by i.h., tu is a subterm of t0 , so u is also a subterm of t0 . Moreover, any piece of code in π is a subterm of t0 by i.h.. (c) Frame: it follows from the i.h., since the frame F is unchanged. (d) Environment : it follows from the i.h., since the environment E is unchanged. – Case s′ = (F, λx.t, u :: π, E, H) s. Hc7 (F :: λx.tπ, u, ǫ, E, H) = (a) Evaluating Code: by i.h., λx.t is a subterm of t0 , so t is also a subterm of t0 . (b) Stack : nothing to prove. (c) Frame: for all entries in F it follows from the i.h., for the new entry it follows by the evaluating code and stack part of the i.h. (d) Environment : it follows from the i.h., since the environment E is unchanged. – Case s′ = (F, λx.t, ǫ, E, H) Hc2 (F :: x, t, ǫ, E, H) = s. (a) Evaluating Code: note that t is a subterm of λx.t which is in turn a subterm of t0 by i.h.. (b) Stack : trivial since the stack π is empty. (c) Frame: any pair of the form u♦π ′ or λx.uπ ′ in the frame x :: F is also already present in F , so it follows by the i.h. (d) Environment : it follows from the i.h., since the environment E is unchanged. 27 – Case s′ = (F, x, π, E, H) Hc3 (F, x, π, E, N) = s with E(x) = ⊥ or E(x) = [x u]neu or (E(x) = [x u]abs and π = ǫ) . (a) Evaluating Code: trivial since ϕ 6= H. (b) Stack : it follows from the i.h., since the stack π is unchanged. (c) Frame: it follows from the i.h., since the frame F is unchanged. (d) Environment : it follows from the i.h., since the environment E is unchanged. – Case s′ = (F :: x, t, ǫ, E, N) Nc4 (F, λx.t, ǫ, E, N) = s. (a) Evaluating Code: trivial since ϕ 6= H. (b) Stack : trivial since the stack is empty. (c) Frame: any pair of the form u♦π or λx.uπ ′ in the frame F is also in the frame x :: F , so it follows from the i.h.. (d) Environment : any substitution of the form [y u] in the environment Nx :: E is also in the environment E, so u is a subterm of t0 by i.h.. – Case s′ = (F :: t♦π, u, ǫ, E, N) Nc5 (F, tu, π, E, N) = s. (a) Evaluating Code: trivial since ϕ 6= H. (b) Stack : the stack π occurs at the left-hand side in the frame t♦π :: F , so by i.h. we know that any piece of code in π is a subterm of t0 . (c) Frame: any pair r♦π or λx.uπ ′ in the frame F is also in the frame t♦π :: F , so it follows from the i.h. (d) Environment : it follows from the i.h., since the environment E is unchanged. – Case s′ = (F, t, u :: π, E, N) Nc6 (F :: t♦π, u, ǫ, E, H) = s. (a) Evaluating Code: note that u is an element of the stack at the left-hand side of the transition, so by i.h. u is a subterm of t0 . (b) Stack : trivial since the stack is empty. (c) Frame: any pair in the frame t♦π :: F or λx.uπ ′ is also in the frame F except for t♦π. Consider a piece of code s in the stack π. It is trivially also a piece of code in the stack u :: π, so by the second point of the i.h. we have that s is a subterm of t0 . (d) Environment : it follows from the i.h., since the environment E is unchanged. 2. Environment Size: simply note that the only transition that extends the environment is m2 . The proof of the polynomial bound of the overhead is in three steps. First, we bound the number |ρ|e of exponential transitions of an execution ρ using the number |ρ|m of multiplicative transitions of ρ, that by Theorem 5.1 corresponds to the number of Max β-steps on the λ-calculus. Second, we bound the number |ρ|c of commutative transitions of ρ by using the number of exponential transitions and the size of the initial term. Third, we put everything together. 28 Multiplicative vs Exponential Analysis This step requires two auxiliary lemmas. The first one essentially states that commutative transitions eat normal and neutral terms, as well as Max contexts. Lemma 6.10. Let s = F | t | π | E | H be a state and E be well-labeled. Then E is a normal term and π = ǫ then s 2. If t E is a neutral term then s → → 1. If t ∗ c ∗ c F | t | π | E | N. F | t | π | E | N. → 3. If t = Chui with C E a Max context then there exist F ′ and π ′ such that s ∗c F ′ | u | π ′ | E | H. Moreover, if C is applicative then π ′ is non-empty. The first two points rest on the following inductive mutually inductive definition of normal and neutral terms: x is neutral t is neutral u is normal tu is neutral t is neutral t is normal t is normal λx.t is normal And the following two immediate properties: E is normal then t is normal; 2. If t E is neutral then t is neutral. → → 1. If t Now we can proceed with the proof. Proof. → 1. If t E is normal then t is normal. By induction on the derivation of t is normal. Cases: → • Neutral, i.e. t is neutral. If t E is neutral then it follows by Point 2. Otherwise t = x and t E is an abstraction, i.e. E = E ′ :: [x u]abs :: E ′′ . Then: F | x | ǫ | E | H Hc3 F | x | ǫ | E | N → → → • Abstraction, i.e. t = λx.u with u normal. Since t E = λx.u E is normal then u E is normal and we can use the i.h. on it. Then → F | λx.u | ǫ | E | H (i.h.) F :: x | u | ǫ | E | H F :: x | u | ǫ | E | N Hc2 ∗ c Hc2 F | λx.u | ǫ | E | N → 2. If t E is neutral then t is neutral. By induction on the derivation of t is neutral. Cases: → • Variable, i.e. t = x. If t E is neutral then either E(x) = ⊥ or E = E ′ :: [x u]neu :: E ′′ . In both cases: F |x|π|E|H 29 Hc3 F |x|π|E|N → • Application, i.e. t = ur with u neutral and r normal. Since ur E is neutral, u E is neutral and r E is normal, so that we can use Point 1 and the i.h. on them. Then → → F | ur | π | E | H (i.h.) Hc1 ∗ c (Point 1) Nc6 ∗ c | u | r :: π | E | H | u | r :: π | E | N :: u♦π | r | ǫ | E | H :: u♦π | r | ǫ | E | N F F F F F | ur | π | E | N Nc5 → 3. If C E is a Max context then C is a Max context by Lemma 6.4.5. By induction on C being Max (Definition Definition 2.1, page 2). If C is empty then it is immediate. The other cases: → → → → • Application Left (rule (@l)), i.e. C = Dr with D Max and D 6= λx.E. Since C E = D E r E , we have that D E is a Max context and we can apply the i.h. to it. Then: s = F | Dhuir | π | E | H F | Dhui | r :: π | E | H Hc1 Now, if D is empty then C is applicative, the stack is non-empty, and the statement is proved. Otherwise, it follows from the i.h.: F | Dhui | r :: π | E | H ∗ c |{z} F ′ | u | π′ | E | H i.h. • Abstraction (rule (λ)), i.e. C = λx.D with D Max. As in the previous case, it is immediately seen that we can apply the i.h. to D. s = F | λx.Dhui | π | E | H Hc1 F :: x | Dhui | π | E | H ∗ c |{z} F ′ | u | π′ | E | H i.h. → →→ → The moreover part follows from the i.h. • Application Right (rule (@r)), i.e. C = rD with D Max and r neutral. Since C E = r E D E , we have that r is neutral (and so we can apply point 2) and D E is a Max context and so we can use the i.h. on it. s = F | rDhui | π | E | H (Point 2) Hc1 ∗ c Nc6 F | r | Dhui :: π | E | H F | r | Dhui :: π | E | N F :: r♦π | Dhui | ǫ | E | H ∗ c |{z} F ′ | u | π′ | E | H (i.h.) Hc1 Hc7 ∗ c |{z} (i.h.) 30 → s = F | (λx.r)Dhui | π | E | H → → → The moreover part follows from the i.h. • Erasing Redex (rule (gc)), i.e. C = (λx.r)D with D Max and x∈ / fv(r). Since C E = (λx.r E )D E we have that D E is a Max context and so we can use the i.h. on it. F | λx.r | Dhui :: π | E | H F :: λx.rπ | Dhui | π | E | H F ′ | u | π′ | E | H The moreover part follows from the i.h. The second lemma uses Lemma 6.10 and the environment labels invariant (Lemma 6.6.1) to show that the exponential transitions of the Max MAM are indeed useful, as they head towards a multiplicative transition, that is towards β-redexes. Lemma 6.11 (Useful Exponentials Lead to Multiplicatives). Let s be a reachable state such that s e(red,n) s′ . 1. If n = 1 then s′ ∗ c m s′′ ; 2. If n = 2 then s′ ∗ c eabs 3. If n > 1 then s′ ∗ c e(red,n−1) ∗ c m s′′ or s′ ∗ c e(red,1) s′′ ; s′′ . α Proof. We have (F, x, π, E, H) ered (F, t , π, E, H) with E(x) = [x t](red,n) . By the labeled environment invariant (Lemma 6.6.1), E is well-labeled. Then α t = Chui with C Max context. By Lemma 6.10.3 we obtain s′ = F | Chui | π | E | H ∗ c F ′ | u | π′ | E | H Three cases: 1. n = 1) then by well-labeledness u is a 7→Maxβ -redex (λx.r)s, that is, either x∈ / fv(r) or s is normal. First, we have F ′ | (λx.r)s | π ′ | E | H F ′ | (λx.r) | s :: π ′ | E | H Hc1 m s′′ Then there are 3 possible cases: (a) s is a variable. Then (b) x ∈ fv(r). Then m2 m1 applies. applies. (c) x ∈ / fv(r) and s is normal and not a variable. Then: F ′ | (λx.r) | s :: π ′ | E | H m s′′ Hc7 ∗ c F :: λx.rπ | s | ǫ | E | H F :: λx.rπ | s | ǫ | E | N |{z} (L.6.10.1) m3 F |r|π|E|N 2. n = 2, E ′ = E ′′ :: [y r]l :: E ′′′ with l = abs, and C is applicative) By well-labeledness u is a variable y and r = λz.s. Then: s e(red,2) F | Chyi | π | E | H ∗ c |{z} (L.6.10.3) F ′ | y | π′ | E | H ′ Always by Lemma 6.10.3, the stack π ′ is non-empty, say π ′ = t :: π ′′ . Then we continue with: ′ eabs F | λz.s | t :: π ′′ | E | H 31 Now we repeat the resoning for the case n = 1 completing the execution with ∗c m . 3. n > 1 and E ′ = E ′′ :: [y r]l :: E ′′′ with l = (red, n − 1)) By welllabeledness u is a variable y. Then: s e(red,n) F | Chyi | π | E | H ∗ c |{z} (L.6.10.3) F ′ | y | π′ | E | H e(red,n−1) Finally, using the environment size invariant (Lemma 6.9.2) we obtain the local boundedness property, that is used to infer a quadratic bound via a standard reasoning (already employed in [AL16]). Theorem 6.12 (Exponentials vs Multiplicatives). Let s be an initial Max MAM state and ρ : s ∗ s′ . 1. Local Boundedness: if σ : s′ ∗ s′′ and |σ|m = 0 then |σ|e ≤ |ρ|m ; 2. Exponentials are Quadratic in the Multiplicatives: |ρ|e ∈ O(|ρ|2m ). Remark 6.13. In the following proof we use the fact that in from the definition of well-labeled environment (Definition 4.2, page 8) it immediately follows that if E = E ′ :: [x t](red,n) :: E ′′ is well-labeled then the length of E ′′ , and thus of E, is at least n. Proof. 1. We prove that |σ|e ≤ |E|. The statement follows from the environment size invariant (Lemma 6.9.2), for which |E| ≤ |ρ|m . If |σ|e = 0 it is immediate. Then assume |σ|e > 0, so that there is a first exponential transition in σ, i.e. σ has a prefix s′ ∗c e s′′′ followed by an execution τ : s′′′ ∗ s′′ such that |τ |m = 0. Cases of the first exponential transition e : • Case eabs : the next transition is necessarily multiplicative, and so τ is empty. Then |σ|e = 1. Since the environment is non-empty (otherwise eabs could not apply), |σ|e ≤ |E| holds. • Case e(red,n) : we prove by induction on n that |σ|e ≤ n, that gives what we want because n ≤ |E| by Remark 6.13. Cases: – n = 1) Then τ has the form s′′′ ∗c s′′ by Lemma 6.11.1, and so |σ|e = 1. – n = 2) Then τ is a prefix of ∗c eabs ∗c or ∗c e(red,1) by Lemma 6.11.2. In both cases |σ|e ≤ 2. – n > 2) Then by Lemma 6.11.3 τ is either shorter or equal to ∗ ∗ e(red,n−1) , e(red,n−1) , and so |σ|e ≤ 2, or it is longer than c c ′ ∗ i.e. it writes as c followed by an execution τ starting with ′ e(red,n−1) . By i.h. |τ | ≤ n − 1 and so |σ| ≤ n. 32 F ′ | r | π′ | E | H 2. This is a standard reasoning: since by local boundedness (the previous point) m-free sequences have a number of e-transitions that are bound by the number of preceding m-transitions, the sum of all e-transitions is bound by the square of m-transitions. It is analogous to the proof of Theorem 7.2.3 in [AL16]. Commutative vs Exponential Analysis The second step is to bound the number of commutative transitions. Since the commutative part of the Max MAM is essentially the same as the commutative part of the Strong MAM of [ABM15], the proof of such bound is essentially the same as in [ABM15]. It relies on the subterm invariant (Lemma 6.9.1). Theorem 6.14 (Commutatives vs Exponentials). Let ρ : s MAM execution from an initial state of code t. Then: ∗ s′ be a Max 1. Commutative Evaluation Steps are Bilinear: |ρ|Hc ≤ (1 + |ρ|e ) · |t|. 2. Commutative Evaluation Bounds Backtracking: |ρ|Nc ≤ 2 · |ρ|Hc . 3. Commutative Transitions are Bilinear: |ρ|c ≤ 3 · (1 + |ρ|e ) · |t|. Proof. 1. We use the following notion of size for stacks/frames/states: |ǫ| := |t :: π| := |(F, t, π, E, H)| := 0 |t| + |π| |F | + |π| + |t| |F :: x| |F :: t♦π| |F :: λx.tπ| |(F, t, π, E, N)| := := := := |F | |π| + |F | |t| + |π| + |F | |F | + |π| By direct inspection of the rules of the machine it can be checked that: • Exponentials Increase the Size: if s e s′ is an exponential transition, then |s′ | ≤ |s| + |t| where |t| is the size of the initial term; this is a consequence of the fact that exponential steps retrieve a piece of code from the environment, which is a subterm of the initial term by Lemma 6.9.1; • Commutative Evaluation Transitions Decrease the Size: if s a s′ with a ∈ {Hc1 , Hc2 , Hc3 , Hc7 } then |s′ | < |s| (for Hc3 because the transition switches to backtracking, and thus the size of the code is no longer taken into account); • Multiplicative Transitions and Backtracking Transitions Decrease or do not Change the Size: if s a s′ with a ∈ {m1 , m2 , m3 , Nc4 , Nc5 , Nc6 } then |s′ | ≤ |s|. Then a straightforward induction on |ρ| shows that |s′ | ≤ |s| + |ρ|e · |t| − |ρ|Hc i.e. that |ρ|Hc ≤ |s| + |ρ|e · |t| − |s′ |. 33 Now note that | · | is always non-negative and that since s is initial we have |s| = |t|. We can then conclude with |ρ|Hc ≤ |s| + |ρ|e · |t| − |s′ | ≤ |s| + |ρ|e · |t| = |t| + |ρ|e · |t| = (1 + |ρ|e ) · |t| 2. We have to estimate |ρ|Nc = |ρ|Nc4 + |ρ|Nc5 + |ρ|Nc6 . Note that (a) |ρ|Nc4 ≤ |ρ|Hc2 , as (b) |ρ|Nc5 ≤ |ρ|Nc6 , as Nc6 ; (c) |ρ|Nc6 ≤ |ρ|Hc3 , as Hc3 . Nc4 pops variables from F , pushed only by pops pairs t♦π from F , pushed only by Nc5 Nc6 Hc2 ; ends backtracking phases, started only by Then |ρ|Nc ≤ |ρ|Hc2 + 2|ρ|Hc3 ≤ 2|ρ|Hc . 3. We have |ρ|c = |ρ|Hc +|ρ|Nc ≤P.2 |ρ|Hc +2|ρ|Hc = 3|ρ|Hc ≤P.1 3·(1+|ρ|e )·|t|. The Main Theorem Putting together the matching between Max β-steps and multiplicative transitions (Theorem 5.1), the quadratic bound on the exponentials via the multiplicatives (Theorem 6.12.2) and the bilinear bound on the commutatives (Theorem 6.14.3) we obtain that the number of the Max MAM transitions to implement a Max β-derivation d is at most quadratic in the length of d and linear in the size of t. Moreover, the subterm invariant (Lemma 6.9.1) and the analysis of the Checking AM (Theorem 4.3.2) allow to bound the cost of implementing the execution on RAM. Theorem (Max MAM Overhead Bound). Let d : t →∗Maxβ u be a maximal derivation and ρ be the Max MAM execution simulating d given by Theorem 5.1.2. Then: 1. Length: |ρ| = O((1 + |d|2 ) · |t|). 2. Cost: ρ is implementable on RAM in O((1 + |d|2 ) · |t|) steps. Proof. 1. By definition, the length of the execution ρ simulating d is given by |ρ| = |ρ|m + |ρ|e + |ρ|c . Now, by Theorem 6.12.2 we have |ρ|e = O(|ρ|2m ) and by Theorem 6.14.3 we have |ρ|c = O((1 + |ρ|e ) · |t|) = O((1 + |ρ|2m ) · |t|). Therefore, |ρ| = O((1 + |ρ|e ) · |t|) = O((1 + |ρ|2m ) · |t|). By Theorem 5.1.2 |ρ|m = |d|, and so |ρ| = O((1 + |d|2 ) · |t|). 2. The cost of implementing ρ is the sum of the costs of implementing the multiplicative, exponential, and commutative transitions. Remember that the idea is that variables are implemented as references, so that environment can be accessed in constant time (i.e. they do not need to be accessed sequentially). Moreover, we assuming the strong hypothesis on the representation of terms explained in the paragraph before Theorem 4.3 (page / fv(t) in m2 and Hc7 can be done 9), so that the tests x ∈ fv(t) and x ∈ in constant time: 34 (a) Commutative: every commutative transition takes constant time. At the previous point we bounded their number with O((1 + |d|2 ) · |t|), which is then also the cost of all the commutative transitions together. (b) Multiplicative: • a m1 transition costs O(|t|) because it requires to rename the current code, whose size is bound by the size of the initial term by the subterm invariant (Lemma 6.9.1a). • A m2 transition costs O(|t|) because checking x ∈ fv(t) can be done in constant time and executing the Checking AM on u takes O(|u|) commutative steps (Theorem 4.3.2), commutative steps take constant time, and the size of u is bound by |t| by the subterm invariant (Lemma 6.9.1b). • A m2 transition takes constant time. Therefore, all together the multiplicative transitions cost O(|d| · |t|). (c) Exponential : At the previous point we bounded their number with |ρ|e = O(|d|2 ). Each exponential step copies a term from the environment, that by the subterm invariant (Lemma 6.9.1d) costs at 2 most O(|t|), and so their full cost is O((1 + |d|) · |t| ) (note that this is exactly the cost of the commutative transitions, but it is obtained in a different way). 2 Then implementing ρ on RAM takes O((1 + |d|) · |t| ) steps. Remark 6.15. Our bound is quadratic in the number of the Max β-steps but we believe that it is not tight. In fact, our transition m1 is a standard optimisation, used for instance in Wand’s [Wan07] (section 2), Friedman et al.’s [FGSW07] (section 4), and Sestoft’s [Ses97] (section 4), and motivated as an optimization about space. In Sands, Gustavsson, and Moran’s [SGM02], however, it is shown that it lowers the overhead for time from quadratic to linear (with respect to the number of β-steps) for call-by-name evaluation in a weak setting. Unfortunately, the simple proof used in [SGM02] does not scale up to our setting, nor we have an alternative proof that the overhead is linear. We conjecture, however, that it does. 35
6cs.PL
A divide and conquer method for symbolic regression ✩ Changtong Luoa,∗, Chen Chena,b , Zonglin Jianga,b arXiv:1705.08061v2 [cs.NE] 27 Jun 2017 a State Key Laboratory of High Temperature Gas Dynamics, Institute of Mechanics, Chinese Academy of Sciences, Beijing 100190, China b School of Engineering Sciences, University of Chinese Academy of Sciences, Beijing, 100049, China Abstract Symbolic regression aims to find a function that best explains the relationship between independent variables and the objective value based on a given set of sample data. Genetic programming (GP) is usually considered as an appropriate method for the problem since it can optimize functional structure and coefficients simultaneously. However, the convergence speed of GP might be too slow for large scale problems that involve a large number of variables. Fortunately, in many applications, the target function is separable or partially separable. This feature motivated us to develop a new method, divide and conquer (D&C), for symbolic regression, in which the target function is divided into a number of sub-functions and the sub-functions are then determined by any of a GP algorithm. The separability is probed by a new proposed technique, Bi-Correlation test (BiCT). D&C powered GP has been tested on some real-world applications, and the study shows that D&C can help GP to get the target function much more rapidly. Keywords: Mathematical modeling, Genetic programming, Symbolic regression, Artificial intelligence, Divide and conquer This work has been supported by the National Natural Science Foundation of China (Grant No. 11532014). ∗ Corresponding author Email addresses: [email protected] (Changtong Luo), [email protected] (Chen Chen), [email protected] (Zonglin Jiang) ✩ Preprint submitted to Expert Systems with Applications June 28, 2017 1. Introduction Symbolic regression (SR) is a data-driven modeling method which aims to find a function that best explains the relationship between independent variables and the objective value based on a given set of sample data (Schmidt and Lipson, 2009). Genetic programming (GP) is usually considered as a good candidate for SR since it does not impose a priori assumptions and can optimize function structure and coefficients simultaneously. However, the convergence speed of GP might be too slow for large scale problems that involve a large number of variables. Many efforts have been devoted trying to improve the original GP (Koza, 2008) in several ways. Some works suggest replacing its tree-based method, with an integer string (Grammar Evolution) (O’Neill and Ryan, 2001), or a parse matrix (Parse-Matrix Evolution) (Luo and Zhang, 2012). These techniques can simplify the coding and decoding process but help little on improving the convergence speed. Some other works suggest confining its search space to generalized linear space, for example, Fast Function eXtraction (McConaghy, 2011), and Elite Bases Regression (Chen et al., 2017). These techniques can accelerate the convergence speed of GP, even by orders of magnitude. However, the speed is gained at the sacrifice of losing the generality, that is, the result might be only a linear approximation of the target function. Fortunately, in many applications, the target function is separable or partially separable (see section 2 for definitions). For example, in gas dynamics (Anderson, 2006), the heat flux coefficient St of a flat plate could be formulated as p p St = 2.274 sin(θ) cos(θ)/ Rex , (1) and the heat flux qs at the stagnation point of a sphere as p qs = 1.83 × 10−4 v 3 ρ/R(1 − hw /hs ). (2) In equation (1), the two independent variables, θ and Rex , are both separable. In equation (2), the first three variables v, ρ, and R are all separable, and the last two variables, hw and hs , are not separable, but their combination (hw , hs ) is separable. The function in equation (2) is considered partially separable in this paper. The feature of separability will be used in this paper to accelerate the optimization process of symbolic regression. Some basic concepts on function separability are defined in Section 2. Section 3 describes the overall 2 work flow of the proposed method, divide and conquer. Section 4 presents a special technique, bi-correlation test (BiCT), to determine the separability of a function. Numerical results are given in Section 5, and the concluding remarks are drawn in Section 6. 2. Basic concepts The proposed method in this paper is based on a new concept referred to as partial separability. It has something in common with existing separability definitions such as reference (Berenguel et al., 2013) and (d’Avezac et al., 2011), but is not exactly the same. To make it clear and easy to understand, we begin with some illustrative examples. The functions as follows could all be regarded as partially separable: z = 0.8 + 0.6 ∗ ( u2 + cos(u) ) + sin(v + w) ∗ (v − w) ; (3) z = 0.8 + 0.6 ∗ ( u2 + cos(u) ) − sin(v + w) ∗ (v − w) ; (4) z = 0.8 + 0.6 ∗ ( u2 + cos(u) ) ∗ sin(v + w) ∗ (v − w) ; (5) where the boxed frames are used to indicate sub-functions, u is separable with respect to z, while v and w themselves are not separable, but their combination (v, w) is considered separable. A simple example of non-separable function is f (x) = sin(x1 + x2 + x3 ). More precisely, the separability could be defined as follows. Definition 1. A scalar function with n continuous variables f (x) (f : Rn 7→ R, x ∈ Rn ) is said to be partially separable if and only if it can be rewritten as f (x) = c0 ⊗1 ϕ1 (I1 x) ⊗2 ϕ2 (I2 x) ⊗3 · · · ⊗m ϕm (Im x) (6) where the binary operator ⊗i could be plus (+), minus (−), times(×). Ii is a sub-matrix of the identity matrix, and Ii ∈ Rni ×n . The set { I1 , I2 , · · · , Im } m P is a partition of the identity matrix I ∈ Rn×n , ni = n. The sub-function i=1 ϕi is a scalar function such that ϕi : Rni 7→ R. Otherwise the function is said to be non-separable. 3 In this definition, the binary operator, division (/), is not included in ⊗ for simplicity. However, this does not affect much of its generality, since the sub-functions are not preset, and can be transformed as ϕ̃i (·)= 1/ϕi (·) if only ϕi (·) 6= 0. A special case is that all variables are separable, which could be defined as follows. Definition 2. A scalar function with n continuous variables f (x) (f : Rn 7→ R, x ∈ Rn ) is said to be completely separable if and only if it can be rewritten as equation (6) and ni = 1 for all i = 1, 2, · · · , m. 3. Divide and conquer method As above mentioned, many practical problems have the feature of separability. To make use of this feature to accelerate the optimization process of genetic programming, a new method, divide and conquer (D&C), is proposed. It works as follows. First, a separability detection process is carried out to find out whether the concerned problem is separable (at least partial separable) or not. The variables are identified one by one, and then their combinations. Once it (or the variable combination) is identified as separable, a sub-function ϕi (xi ) (or ϕi (Ii x) for variable combinations) will be assigned. In this way, the structure of target function f (x) could be divided into a set of sub-functions based on the separability information: ϕi (Ii x), i = 1, 2, · · · , m. Then, the sub-functions ϕi (Ii x) (i = 1, 2, · · · , m) are optimized and determined one by one, using any of genetic programming algorithms, including classical GP, Grammatical Evolution (O’Neill and Ryan, 2001) and Parse-Matrix Evolution (Luo and Zhang, 2012). When optimizing one subfunction, variables not involved ((I − Ii )x) are fixed as constants. That is, only a small number of variables (Ii x, which is only a subset of {x1 , x2 , · · · , xn }) need be considered. This means the sub-function determination should be much easier than evolving the target function f (x) directly. For example, in Equation (3), Equation (4), or Equation (5), the sub-function ϕ1 (u) = u2 + cos(u) (or ϕ2 (v, w) = sin(v + w) ∗ (v − w)) has less number of variables and complexity than the original function. Thus, optimizing them one by one is much easier for GP. Finally, these sub-functions are properly combined to form the target function, which is referred to as a function recover process. This process 4 Separability Detection Function Division Sub−Function Determination Function Recover Figure 1: Work flow of divide and conquer for symbolic regression is rather simple, and all traditional regression algorithms are qualified to accomplish this mission. The work flow of D&C could be described in Figure 1. 4. Bi-correlation test 4.1. Description The main idea of the proposed divide and conquer (D&C) method is to make use of the separability feature to simplify the search process. Therefore, the most important and fundamental step (the separability detection process in Fig. 1) is to determine whether the concerned problem is separable (at least partial separable) or not. To fulfill this task, a special technique, Bicorrelation test (BiCT), is provided in this section. Consider independent variables x1 , x2 , · · · , xn and the dependent f as n+1 random variables, and the known data as sample points. Recall that the linear relation and correlation coefficient of two random variables has the following relations. Lemma 1. The two random variables ξ and η are linearly related with correlation coefficient 1 (i.e., ρξη = 1) if and only if there exists two constants a, b (b 6= 0), such that P {η = a + bξ} = 1. The correlation coefficient ρ could be estimated by the sample correlation 5 coefficient r, which is defined as follows. N ¯ (ηi − η̄) 1 X (ξi − ξ) r= · n − 1 i=1 σξ ση P where N is the number of observations in the sample set, is the summation ¯ symbol, ξi is the ξ value for observation i, ξ is the sample mean of ξ, ηi is the η value for observation i, η̄ is the sample mean of η, σξ is the sample standard deviation of ξ, and ση is the sample standard deviation of η. Only continuous model functions are considered in this paper. As a result, the conclusion of Lemma 1 could be simplified as follows. • The two random variables f A and f B are linearly related (f B = a + bf A ) if and only if the sample correlation coefficient r = 1 for any given sample set. Studies shows that the functional separability defined in the above section (See equation 6) could be observed with random sampling and linear correlation techniques. Without the loss of generality, a simple function with three variables (f (x) = f (x1 , x2 , x3 ), xi ∈ [ai , bi ], i = 1, 2, 3) is considered to illustrate the implementation of the bi-correlation test. To find out whether the first variable x1 is separable, two correlation tests are needed. The first correlation test is carried out as follows. A set of random sample points in [a1 , b1 ] are generated, then these points are extended to three dimensional space with the rest variables (x2 and x3 ) fixed to a point A. We get a vector of function values f (A) = f (x1 , A) = (f1A , f2A , · · · , fNA ), where N is the number of sample points. Then these points are extended to three dimensional space with fixed x2 and x3 to another point B, We get another vector f (B) = f (x1 , B) = (f1B , f2B , · · · , fNB ). It is obviously that the two vectors f (A) and f (B) will be linearly related if x1 is separable. However, it is easy to show that this linear relation could NOT ensure its separability. Then it comes to the second correlation test. Another set of random sample points in [a2 , b2 ]×[a3 , b3 ] are generated, then these points are extended to three dimensional space with the rest variable(s) (x1 in this case) fixed to a point C, and get a vector f (C) = f (C, x2 , x3 ). Similarly, another vector f (D) = f (D, x2 , x3 ) is obtained. Again, the two vectors f (C) and f (D) needs to be linearly related to ensure the separability of x1 . 6 4.2. Proposition Without the loss of generality, suppose we have a scalar function f (x) with n continuous variables (f : Rn 7→ R, x ∈ Ω ⊂ Rn , and Ω = [a1 , b1 ] × [a2 , b2 ] × · · · × [an , bn ]), and need to find out whether the first m variable combination (x1 , x2 , · · · , xm ) are separable. Let the matrix X1 be a set of N random sample points from the subset [a1 , b1 ] × [a2 , b2 ] × · · · × [am , bm ] ⊂ Rm , and   (1) (1) (1) x1 x2 · · · xm  (2) (2) (2)   x x2 · · · xm  X1 =  1 .  ··· ··· ··· ···  (N ) (N ) (N ) x1 x2 · · · xm The rest variables xm+1 , xm+2 , · · · , xn are fixed to two given points A and B in the subset [am+1 , bm+1 ] × [am+2 , bm+2 ] × · · · × [an , bn ] ⊂ Rn−m , i.e., (A) (B) (B) (B) xA = (xm+1 (A) , xm+2 (A) ,  ··· ,x n ), xB = (xm+1 , xm+2 , · · · , xn ). 1 xm+1 (A) xm+2 (A) · · · xn (A) 1   xm+1 (A) xm+2 (A) · · · xn (A)    , and Let the matrix X2 (A) =   xA =   ··· ··· ··· ···   · · · xm+1 (A) xm+2 (A) · · · xn (A) 1   1 1    X2 (B) =   xB .  · · · 1     Let the extended matrix XA = X1 X2 (A) , and XB = X1 X2 (B) . Let f A be the vector of which the i-th element is the function value of the i-th row of matrix XA , i.e., f A = f (XA ), and f B is similarly defined, f B = f (XB ). Lemma 2. The two vectors f A and f B are linearly related if the function f (x) is separable with respect to the first m variable combination (x1 , x2 , · · · , xm ). Proof. Since the first m variable combination (x1 , x2 , · · · , xm ) are separable, from definition 1, we have f (x) = ϕ1 (x1 , x2 , · · · , xm )⊗ϕ2 (xm+1 , xm+2 , · · · , xn ). Accordingly, the vector f A = f (XA ) = ϕ1 (X1 ) ⊗ ϕ2 (X2A ) = ϕ1 (X1 ) ⊗ kA , where ⊗ is a component-wise binary operation, and kA = ϕ2 (xA ) is a scalar. 7 Similarly, the vector f B = ϕ1 (X1 ) ⊗ kB . As a result,  if ⊗ is times  kA /kB · f B fA = kA − kB + f B if ⊗ is plus  kB − kA + f B if ⊗ is minus which means the two vectors f A and f B are linearly related. On the other hand, if the first m variables are fixed to two given points C and D, and the rest of n − m variables are randomly sampled. A similar proposition  could  be concluded as follows. Let  1 x1 (C) x2 (C) · · · xm (C) 1    x1 (C) x2 (C) · · · xm (C)    , X1 (C) =   x1 (C) x2 (C) · · · xm (C) =   ··· ··· ··· ···   · · · x1 (C) x2 (C) · · · xm (C) 1   1 1     X1 (D) =   x1 (D) x2 (D) · · · xm (D) ,  · · ·   1 (1) (1) (1) xm+1 xm+2 · · · xn  (2) (2)     xm+1 x(2) · · · xn  m+2 X2 =   , the N × n matrix XC = X1 (C) X2 , ··· ··· ···   ··· (N ) (N ) (N ) xm+1 xm+2 · · · xn   and XD = X1 (D) X2 . Let f C be the vector of which the i-th element is the function value of the i-th row of matrix XC , i.e., f C = f (XC ), and f D is similarly defined, f D = f (XD ). Lemma 3. The two vectors f C and f D are linearly related if the function f (x) is separable with respect to the first m variable combination (x1 , x2 , · · · , xm ). Proof. Since the first m variable combination (x1 , x2 , · · · , xm ) are separable, from definition 1, we have f (x) = ϕ1 (x1 , x2 , · · · , xm )⊗ϕ2 (xm+1 , xm+2 , · · · , xn ). Accordingly, the vector f C = f (XC ) = ϕ1 (X1C ) ⊗ ϕ2 (X2 ) = kC ⊗ ϕ2 (X2 ), where ⊗ is a component-wise binary operation, and the scalar kC = ϕ1 (xC ). Similarly, the vector f D = kD ⊗ ϕ2 (X2 ). As a result,  kC /kD · f D if ⊗ is times fC = kC − kD + f D if ⊗ is plus or minus which means the two vectors f C and f D are linearly related. 8 The above lemmas show that two function-value vectors must be linearly related if the target function has the separability feature, while the separable variables (or their complement variables) are fixed. These are necessary conditions for the separability identification of target function. The sufficient and necessary conditions are given as follows. Theorem 1. The function f (x) is separable with respect to the first m variable combination (x1 , x2 , · · · , xm ) if and only if both of the flowing statements are true. (1) Any two function-value vectors with fixed (x1 , x2 , · · · , xm ) are linearly related; (2) Any two function-value vectors with fixed (xm+1 , xm+2 , · · · , xn ) are linearly related. Proof. From Lemma 2, and Lemma 3, we can conclude that the necessary conditions of the theorem hold. The sufficient conditions can be proved by contradiction. Suppose the separable form f (x) = ϕ1 (x1 , x2 , · · · , xm ) ⊗ ϕ2 (xm+1 , xm+2 · · · , xn ) can not be derived from the above two conditions. Thus, there is at least one non-separable variable presented in both subfunctions, ϕ1 and ϕ2 . Without loss of generality, we assume xm to be this non-separable variable. That is, f (x) = ϕ1 (x1 , x2 , · · · , xm ) ⊗ ϕ2 (xm , xm+1 , xm+2 · · · , xn ) . (7) Similarly, the process of sampling for the first correlation test can be given as  (1) (1) (1)  x1 x2 · · · xm  x(2) x(2) · · · x(2)  m   2 , (8) X1 =  1. . ..  ..  .. .  (N ) (N ) (N ) x1 x2 · · · xm  (1) (A) (A) (A)  xm xm+1 xm+2 · · · xn  x(2) x(A) x(A) · · · x(A)  m   m (A) m+1 m+2 X̃2 =  . , (9) . . ..  . . .  . . . .  (N ) xm (A) (A) (A) xm+1 xm+2 · · · xm 9 and (B) (B) (B)  xm+1 xm+2 · · · xn (B) (B) (B)  xm+1 xm+2 · · · xm    (B) (10) X̃2 =  . . . . . . .  . . .  (N ) (B) (B) (B) xm xm+1 xm+2 · · · xm h i h i (A) (B) ′ ′ Let the extended matrix XA = X1 X̃2 , and XB = X1 X̃2 . Thus,   (A) f ′A = f (X ′ A ) = ϕ1 (X1 ) ⊗ ϕ2 X̃2 = ϕ1 (X1 ) ⊗ α, (11)  (1) xm (2) xm .. . and f ′B ′ = f (X B ) = ϕ1 (X1 ) ⊗ ϕ2  (B) X̃2  = ϕ1 (X1 ) ⊗ β (12)   (A) and are defined, where α and β are function-value vectors of ϕ2 X̃2   (B) ϕ2 X̃2 respectively. As a result, f ′A  ′  γ·f B α − β + f ′B =  β − α + f ′B if ⊗ is times if ⊗ is plus if ⊗ is minus (13) where γ = (α1 /β1 , α2 /β2 , · · · , αN /βN ). From the lemmas, we know that, two vectors f ′A and f ′ B are linearly related if they are in the relation of f ′A = k1 ·f ′ B +k2 , where k1 and k2 are constant scalars, k1 6= 0. But, from the above discussion, the components of all the three vectors, γ, α − β and β − α, are  (1) (2) (N ) not constant, due to the randomness of sample points xm , xm , · · · , xm . This contradicts the supposition that the two vectors f ′A and f ′ B are linearly related, and so Equation (7) cannot hold. 4.3. Notes on BiCT The proposed technique is called bi-correlation test (BiCT) since two complementary correlation tests are simultaneously carried out to determine whether a variable or a variable-combination is separable. The above process is illustrated with two sub-functions, and it could be extended to determine the separability of a function with more sub-functions. However, if the binary operators ⊗1 , ⊗2 , · · · , ⊗m in equation (6) are mutually different with mixed times and plus or minus, the extension might be a little 10 difficult. This issue will be left for the future work. Hereafter, we assume that the binary operators in equation (6) are the same, i.e, ⊗i = times or ⊗i = plus or minus for all i = 1, 2, · · · , m, for simplicity. In this case, the extension process is very easy and omitted here. To enhance the stability and efficiency of the algorithm, the distribution of sample points should be as uniform as possible. Therefore, controlled sampling methods such as Latin hypercube sampling (Beachkofski and Grandhi, 2002) and orthogonal sampling (Steinberg and Lin, 2006) are preferred for sample generation. For the correlation test, any of correlation methods could be used. That is, Pearson’s r method, Spearman’s rank order correlation, and Kendall’s τ correlation are all effective for BiCT. Take the function f (x) = 0.8 + 0.6 ∗ (x21 + cos(x1 )) ∗ sin(x2 + x3 ) ∗ (x2 − x3 ), x ∈ [−3, 3]3 , as an example, the first sample set consists of 13 uniformly distributed points in [−3, 3], and the second sample set consists of 169 uniformly distributed points in [−3, 3]2 . The correlation tests could be illustrated as in Fig. 2. As can be seen that the function-value vectors f A and f B are linearly related (Fig. 2(b)), in which the variable x2 and x3 are fixed when considering the first variable x1 (Fig. 2(a)). Similarly, to find out the separability of variable combination (x2 , x3 ), the first variable x1 is fixed (Fig. 2(c)). The corresponding function-value vectors f C and f D are linearly related (Fig. 2(d)) The D&C method with BiCT technique is described with functions of explicit expressions. While in practical applications, no explicit expression is available. In this case, some modifications need to adapt for D&C method. In fact, for data-driven modeling problems, a surrogate model of black-box type could be established as the underlying target function (Forrester et al., 2008) in advance. Then the rest steps are the same as above discussions. 5. Numerical results 5.1. Analysis on Computing time The computing time (t) of a genetic programming with the proposed divide and conquer (D&C) method consists three parts: t = t1 + t2 + t3 (14) where t1 is for the separability detection, t2 for sub-function determination, and t3 for function recover. Note that both the separability detection and 11 6 A 1 f B 4 f 0 −1 f B 0 −2 −2 −3 −4 −4 −2 −1 0 x1 1 2 −5 3 1 2 3 4 5 6 fA (b) f A ↔ f B (a) (x2 , x3 ) are fixed 150 100 50 D −6 −3 f f 2 0 −50 −100 −150 −100 −50 0 C f (d) f C ↔ f D (c) x1 are fixed Figure 2: Demo of separability detection process of BiCT 12 50 100 Table 1: A mapping table for parse-matrix evolution a·1 T a·2 , a·3 expr a·4 f → fk -5 √ · -5 λ2 -1 skip -4 ln -4 λ1 0 f1 -3 -2 cos / -3 -2 f f2 1 f2 -1 -1 f1 0 skip 0 1.0 1 + 1 x1 2 * 2 x2 3 sin ··· ··· 4 exp d xd 5 (·)2 function recover processes are double-precision operations and thus cost much less time than the sub-function determination process. That is, t ≈ t2 . It is obviously that the CPU time for determining all sub-functions (t2 ) is much less than that of determining the target function directly (td ). Next, a typical genetic programming, parse matrix evolution (PME), is taken as the optimization driver (other GP algorithms should also work) to show the performance of D&C. Suppose that the dimension of the target function is d, the height of the parse-matrix h, and the mapping Table as in Table 1, then the parsematrix entries a·1 ∈ −5, −4, ..., 4, 5, a·j ∈ −5, −4, · · · , d, (j = 1, 2), and a·4 ∈ −1, 0, 1. Thus the parse-matrix (aij )h×4 have as many as (11 ∗ (6 + d) ∗ (6 + d) ∗ 3)h possible combinations. Thus the CPU time of determining the target function directly satisfies td ∼ (11 ∗ (6 + d) ∗ (6 + d) ∗ 3)h . (15) This means that the searching time of determining a target function will increase exponentially with model complexity. Using D&C, only the subfunctions are needed to determinate, and each sub-function has less dimension d and less complexity h. Therefore, it will cost much less CPU time. In fact, by D&C powered GP, the CPU time will increase only linearly with dimensions, provided that the target function is completely separable. Take equation (2) in Section 1 as an example. Without D&C, to search directly, the control parameters of PME should be set as follows: d = 5, h ≥ 9. From equation (15), the order of required CPU time td = O(2.58·1032). Using D&C powered PME, the required CPU time will be much less. In fact, after the separation detection, the function is divided into for subfunctions as follows. √ √ qs = 1.83 × 10−4 v 3 · ρ · 1/ R · (1 − hw /hs ) 13 √ For the sub-function v 3 , 1/ R, and 1 − hw /hs , the control parameters of √ PME should be set as d = 1, h ≥ 2. For the sub-function ρ, d = 1, h ≥ 1. As a result, t2 ≈ 4∗O(2.61·106) = O(107) by equation (15), which means the D&C method could reduce the computational effort by orders of magnitude. 5.2. Program timing Next, two illustrative examples are presented to show how much time the D&C technique could save in practical applications. Again, equation (1) and equation (2) are set as the target function, respectively. For equation (1), the sample set consists 100 observations uniformly distributed in [1,10] degree and [1000, 10000] (i.e., θ=1:10; Rex = 1000:1000:10000). The angle θ is fixed to 5 degree while detecting the subfunction f1 (Rex ), and the Renold number Rex is fixed to 5000 while detecting the sub-function f2 (θ). For equation (2), the sample set consists 30000 observations uniformly distributed in a box in R5 (i.e., v = 500 : 100 : 1000; ρ = 0.0001 : 0.0001 : 0.001; R = 0.01 : 0.01 : 0.1; hw = 10000 : 10000 : 50000; hs = 100000 : 100000 : 1000000). The velocity of free-stream v, density of air ρ, radius of nose R, Wall enthalpy hw , and total enthalpy hs are fixed to 800 m/s2 , 0.0005 kg/m3 , 0.05 m, 20000 J/kg, and 200000 J/kg, respectively, while detecting the sub-functions. In both tests, the program stops when the current model is believed good can be regarded as the enough: 1 − R2 < 1.0 · 10−10 , where R2 = 1 − SSE SST fraction of the total sum of squares that has ‘explained by’ the model. To suppress the affect of randomness of PME, 10 runs are carried out for each target function, and the averaged CPU time on a PC using a single CPU core (Intel(R) Core (TM) i7-4790 CPU @3.60GHz) is recorded to show its performance. The test results (see Table 2, and Table 3) show that D&C technique can save CPU time remarkably. For equation (1), PME needs about 12 minutes and 26 seconds to get an alternative of the target function without D&C technique, while the D&C powered PME needs only about 11.2 seconds, which is much faster than the original algorithm. Similar conclusion could also seen from the test results of equation (2) (see Table 3). Note that the total time of D&C powered PME includes t1 , t2 and t3 (See Equ. 14), and t1 + t3 ≈ 0.2 for Equ. (1), 0.3 for Equ. (2). 14 Table 2: Performance of PME on detecting Equ. (1) (with and without D&C) Target Function CPU time For D&C powered PME f1 (Rex ) 3s f2 (θ) 8s∗ Total time 11.2s PME without D&C f (Rex , θ) 12m26s∗ Total time 746s Result Expression √ St = 0.1978/ Rex St = 0.03215 ∗ θ − 0.01319 ∗ θ3 √ St = 2.274 ∗ θ ∗ cos(0.9116 ∗ θ)/ Rex PME failed to get the exact result, but always result in an alternative function with fitting error of zero in double precision (i.e., 1 − R2 = 0.0). ∗ Table 3: Performance of PME on detecting target Equ. (2)(with and without D&C) Target Function CPU time For D&C powered PME f1 (v) 3s f2 (ρ) 2s f3 (R) 4s f4 (hw , hs ) 9s Total time 18.3s PME without D&C f (v, ρ, R, hw, hs) 85m43s Total time 5143s Result Expression qs qs qs qs = 1.647 · 10−5 ∗ v 3 √ = 3.77 · 105 ∗ pρ = 6.49 · 103 ∗ 0.08442/R = 9370 − 9370 ∗ hw /hs qs = 0.000183 ∗ v 3 ∗ 15 p ρ/R ∗ (1 − hw /hs ) 6. Conclusion The divide and conquer (D&C) method for symbolic regression has been presented. The main idea is to make use of the separability feature of the underling target function to simplify the search process. In D&C, the target function is divided into a number of sub-functions based on the information of separability detection, and the sub-functions are then determined by any of a genetic programming (GP) algorithms. The most important and fundamental step in D&C is to identify the separability feather of the concerned system. To fulfill this task, a special algorithm, bi-correlation test (BiCT), is also provided for separability detection in this paper. The study shows that D&C can accelerate the convergence speed of GP by orders of magnitude without losing the generality, provided that the target function has the feature of separability, which is usually the case in practical engineering applications. References References Anderson, J., 2006. Hypersonic and High-Temperature Gas Dynamics (2nd ed.). American Institute of Aeronautics and Astronautics, Inc., Virginia. Beachkofski, B., Grandhi, R., APRL 2002. Improved distributed hypercube sampling. In: 43rd AIAA/ASME/ASCE/AHS/ASC Structures, Structural Dynamics, and Materials Conference, Structures, Structural Dynamics, and Materials and Co-located Conferences. AIAA paper no. 2002-1274. Denver, Colorado. URL https://doi.org/10.2514/6.2002-1274 Berenguel, L., Casado, L. G., Garca, I., Hendrix, E. M. T., Messine, F., 2013. On interval branch-and-bound for additively separable functions with common variables. Journal of Global Optimization 56 (3), 1101–1121. Chen, C., Luo, C., Jiang, Z., 2017. Elite bases regression: A real-time algorithm for symbolic regression. URL https://arxiv.org/abs/1704.07313 16 d’Avezac, M., Botts, R., Mohlenkamp, M. J., Zunger, A., 2011. Learning to predict physical properties using sums of separable functions. SIAM Journal on Scientific Computing 33 (6), 3381–3401. Forrester, A., Sobester, A., Keane, A., 2008. Engineering design via surrogate modelling: a practical guide. John Wiley & Sons, Hoboken, New Jersey. Koza, J. R., 2008. Genetic programming: on the programming of computers by means of natural selection. MIT Press, Cambridge, MA. Luo, C., Zhang, S.-L., 2012. Parse-matrix evolution for symbolic regression. Engineering Applications of Artificial Intelligence 25 (6), 1182–1193. McConaghy, T., 2011. FFX: Fast, Scalable, Deterministic Symbolic Regression Technology. Springer New York, New York, NY, pp. 235–260. O’Neill, M., Ryan, C., Aug. 2001. Grammatical evolution. IEEE Trans. Evol. Comp 5 (4), 349–358. URL http://dx.doi.org/10.1109/4235.942529 Schmidt, M., Lipson, H., 2009. Distilling free-form natural laws from experimental data. Science 324 (59236), 81–85. Steinberg, D. M., Lin, D. K. J., 2006. A construction method for orthogonal latin hypercube designs. Biometrika 93 (2), 279–288. 17
9cs.NE
arXiv:1110.1708v1 [cs.CE] 8 Oct 2011 Advancing Nuclear Physics Through TOPS Solvers and Tools E Ng1 , J Sarich2 , S M Wild2 , T Munson2 , H Aktulga1 , C Yang1 , P Maris3 , J P Vary3 , N Schunck4 , M G Bertolli5 , M Kortelainen5,6 , W Nazarewicz5,6 , T Papenbrock5,6 , M V Stoitsov5,6 1 2 3 4 5 6 Computational Research Division, Lawrence Berkeley National Laboratory, Berkeley, CA 94720, USA Mathematics and Computer Science Division, Argonne National Laboratory, Argonne, IL 60439, USA Department of Physics, Iowa State University, Ames, IA 50011, USA Physics Division, Lawrence Livermore National Laboratory, Livermore, CA 94551, USA Department of Physics and Astronomy, University of Tennessee, Knoxville, TN 37996, USA Physics Division, Oak Ridge National Laboratory, Oak Ridge, TN 37831, USA E-mail: [email protected] Abstract. At the heart of many scientific applications is the solution of algebraic systems, such as linear systems of equations, eigenvalue problems, and optimization problems, to name a few. TOPS, which stands for Towards Optimal Petascale Simulations, is a SciDAC applied math center focused on the development of solvers for tackling these algebraic systems, as well as the deployment of such technologies in large-scale scientific applications of interest to the U.S. Department of Energy. In this paper, we highlight some of the solver technologies we have developed in optimization and matrix computations. We also describe some accomplishments achieved using these technologies in UNEDF, a SciDAC application project on nuclear physics. 1. Introduction Over the last couple of decades, simulation science has become as important as theoretical and experimental science. The success of simulation science hinges on the ability to perform the calculations efficiently. The inner most kernel in these calculations is often the solution of algebraic systems, including, but not limited to, systems of linear and nonlinear equations, eigenvalue problems, optimization problems, and sensitivity analysis. TOPS, which stands for Towards Optimal Petascale Simulations, is a multi-institutional SciDAC applied math center that focuses on the development of solvers for tackling these algebraic systems, as well as the deployment of such technologies in large-scale scientific applications, particularly those of interest to the U.S. Department of Energy. In this paper, we highlight two specific areas of TOPS: eigenvalue calculations and optimization. In particular, we highlight some accomplishments we have achieved in collaboration with computational physicists in UNEDF. The goal of the UNEDF SciDAC application project [1] is to obtain a comprehensive understanding of nuclei and their reactions based on the most accurate knowledge of the strong nuclear interaction. Eigenvalue calculations come up in the solution of the nuclear Schrödinger equation [2, 3]. The eigenvalues and the eigenvectors correspond to the energy states and wave functions. Numerical optimization techniques are needed in building the next generation of nuclear energy functionals, which will provide nuclear physicists better tools for predicting the properties and behavior of atomic nuclei over the entire nuclear table. 2. Eigenvalue Calculations In nuclear configuration interaction calculation, it is sometimes necessary to investigate, among others, nuclear level densities as a function of the total angular momentum J and excitation energy, and to evaluate scattering amplitudes as a function of J [4]. We will refer to this as a total-J calculation in this paper. In this type of calculation, we are interested in computing a relatively large number of states with a prescribed J value. One brute-force approach to a total-J calculation is to simply compute a large number of eigenvalues and wave functions of a nuclear many-body Hamiltonian, for example in an Mscheme basis (good angular momentum projection along the z-axis), and select, among these wave functions, the ones that have a prescribed J value. This approach is appropriate when the number of desired energy states and wave functions is small (e.g., ten to twenty states). When that is not true, or when certain properties of a nucleus pertaining to a fixed J are to be calculated, the brute-force approach may require computing a very large number of wave functions, and the computational cost for performing this type of calculation may be prohibitively high. Furthermore, even if we can afford to perform this type of calculation, this may not be an efficient use of resources because we compute a large number of wave functions only to throw away most of them because they do not have the desired J value. We have developed an alternative approach where we construct an invariant subspace Z that contains all wave functions associated with a fixed J value in advance and project the nuclear many-body Hamiltonian into this subspace to produce a projected Hamiltonian with the minimum dimension consistent with that chosen J. A sparse matrix diagonalization procedure [5, 6, 7] is then applied to this projected Hamiltonian to obtain the desired energy states and their corresponding wave functions. To construct Z, we need to work with the total angular momentum square operator Jˆ2 and compute the null space of Jˆ2 − λI, where λ = J(J + 1) is a known eigenvalue of Jˆ2 . When the many-body basis states associated with the configuration space are properly ordered and grouped, Jˆ2 becomes block diagonal: Jˆ2 = diag(Jˆ12 , Jˆ22 , ..., Jˆn2g ). Therefore, the task of computing the desired null space of Jˆ2 − λI reduces to that of computing the desired null spaces of Jˆi2 − λI, for i = 1, 2, ..., ng . However, because the dimensions of the Jˆi2 ’s vary over a wide range (e.g., from 1 to more than 36,000 for 12 C, Nmax = 6), it is difficult to maintain a good load balance in the null space calculation. Here, Nmax is a parameter limiting the total number of oscillator quanta allowed in the many-body states. We developed a multi-level task and data distribution scheme to achieve optimal parallel performance in the null space calculation by (i) Limiting the granularity of the parallelism; that is, we try to divide the overall task into many small tasks of limited sizes so that good load balance arises from distributing these small tasks evenly among different processors. (ii) Limiting the communication overhead incurred in the null space calculation so that the overall time of the computation can be minimized. To achieve these inherently conflicting goals, we classified Jˆi2 blocks into small, medium and large groups based on the estimated computational loads associated with computing the desired null space of Jˆi2 − λI, and the estimated ratio of communication volume to floating point operations count. The small Jˆi2 blocks are distributed among all processors based on their computational load by a greedy algorithm. The null spaces of these matrices are computed by a sequential LAPACK rank-revealing QR subroutine. No communication is involved in these calculations. Each one of the medium-sized Jˆi2 blocks is assigned to a subgroup of processors by the same greedy algorithm. The null space calculation for such a block is parallelized among processors within the same subgroup, which will incur some communication overhead. Finally, the desired null space calculation for a large Jˆi2 block is carried out in parallel on all processors. We implemented three different algorithms for computing the null space of Jˆi2 −λI for medium and large blocks. (i) Randomized rank-revealing QR (RQR). The algorithm performs two standard QR factorizations of dense matrices without pivoting. Although we do not take advantage of the sparsity of Jˆi2 in this approach, it is more efficient than other approaches when the dimension of the desired null space is relatively large (e.g. larger than 10% of the dimension of Jˆi2 ). (ii) Shift-invert Lanczos (SIL), which requires solutions of sparse linear systems. (iii) Polynomial accelerated subspace iteration (PASI). We apply a standard subspace iteration [8] to the matrix p(Jˆi2 ), where p(ω) is a polynomial that assumes the value of 1 at ω = λ, and has a much smaller magnitude (than 1) in other parts of the spectrum of Jˆi2 . Table 1 shows that our load balance scheme is much better than a brute-force approach of distributing Jˆi2 in a cyclic fashion to different processors. Table 2 shows that PASI is more efficient when J=0. The randomized QR algorithm appears to be more efficient for larger J values. However, when J becomes very large, which typically results in smaller dimension of the null space, PASI becomes more efficient again. Table 1. A comparison between the greedy load balancing algorithm with a parallel algorithm based on a cyclic distribution of Jˆi2 blocks in terms of wall clock time (in seconds). (np is the number of processors.) core 6 Li 12 C 12 C 6 Li 12 C 12 C Nmax 12 4 6 12 4 6 alg PASI PASI PASI RQR RQR RQR np 120 120 496 120 120 496 time (secs) cyclic greedy 131 132 6.1 5.2 608 295 233 193 18.7 17.0 1220 900 Table 2. RQR decomposition vs PASI for different J values. Both methods use the greedy load balancing technique. Times are in seconds. core 6 Li 6 Li 6 Li 12 C 12 C 12 C (Nmax ,J) (12, 0) (12, 1) (12, 12) (6, 0) (6, 1) (6, 12) np 120 120 496 496 496 496 time (secs) RQR PASI 193 132 195 464 140 95 900 295 890 > 1, 800 840 105 3. Optimization Optimization plays a central role in the building of next-generation nuclear energy functionals, including functionals based on density functional theory (DFT) and/or ab initio calculations. In the case of DFT-based functionals, for example, a primary computational bottleneck is determining parameter values so that the functional agrees with data on a set of observables such as binding energies, radii, and odd-even staggering [9]. Mathematically, we need to solve the optimization problem ( )  o  X di − s(θi ; x) 2 min f (x) = : lj ≤ xj ≤ uj , j = 1, . . . , n , (1) x σi i=1 4 10 POUNDER POUNDER warm POUNDERS POUNDERS warm −9 10 3 Relative Noise Best f value found 10 2 10 −11 10 −13 10 1 10 200 400 600 800 1000 Number of Evaluations 1200 1400 Figure 1. Exploiting structure in parameter estimation problems substantially reduces the number of required simulation evaluations. 50 100 150 200 250 Mass Number, A=N+Z Figure 2. Quantifying the computational noise for a deterministic simulator across 2,049 nuclei. where n parameter values must be determined from a set of data of o observables. Challenges in solving this problem include the computational expense of, and the noise resulting from, the iterative calculations performed when simulating the theoretical observable s(θi ; x), and the fact that derivatives of some simulated observables with respect to certain parameters xj may not be available (or even exist) for use by an optimization algorithm. As part of SciDAC efforts, we have developed POUNDERS (Practical Optimization Using No DERivatives for Sums of squares), an algorithm for derivative-free optimization of nonlinear least-squares problems such as (1). A key benefit of POUNDERS is that it works with the individual residuals (di − s(θi ; x))/σi rather than the aggregated fit function f (x). As a result, POUNDERS can take advantage of the availability of the derivatives of some observables (e.g., binding energies) and can approximate nonlinearities in f using simulations at fewer x values. As part of the TOPS collaboration, POUNDERS is now available through the open-source Toolkit for Advanced Optimization (TAO) [10]. Figure 1 quantifies the computational savings in this ability to exploit the sums of squares structure in (1) for a fit to 2,049 binding energies. By working with the residuals, the POUNDERS variants obtain far better fits in far fewer evaluations than the analogous variants of POUNDER, a similar algorithm that does not have access to the residuals. The warm variants illustrate the benefit of using external simulations, done as part of an initial experimental design, to warm start the optimization. The savings in Figure 1 can be substantial. For the more complex functional optimized in [11], each evaluation of f requires 14.4 CPU hours. The resulting parameterization is then used to perform a simulation of nuclei across the nuclear table in a calculation requiring 9,000 processors for more than half a day [9]. Mathematical work has also contributed to the sensitivity analysis of nuclear energy functionals. Though the simulations are typically deterministic, the aforementioned computational noise can obfuscate the number of reliable digits in computed functional properties. The ECNoise algorithm described in [12] estimates a standard deviation-like quantity using only a few simulations. Figure 2 illustrates the relative noise in the computed binding energies for 2,049 nuclei with the parameterization obtained from the POUNDERS optimization in Figure 1. Estimates of the noise can, for example, reveal limitations on the predictability of computed functional observables and can enable stable approximations of the noisy derivatives needed for sensitivity analysis. 4. Conclusions Our work on eigenvalue calculations has made several impacts on nuclear structure calculations. Earlier collaborations with nuclear physicists led to significant improvements to an eigensolver for configuration interaction calculation, which was subsequently used in predicting the properties of 14 F before the isotope was observed experimentally. The work described in this paper takes configuration interaction calculation one step further. It enables our physics collaborators to efficiently compute energy states of a nuclei with a prescribed total angular momentum instead of computing many energy states and identifying those corresponding to the prescribed total angular momentum. The optimal parameters we have delivered to our physics collaborators have resulted in realistic functionals that are now being explored by a variety of groups outside of the UNEDF collaboration (as evidenced in the most recent JUSTIPEN conference (http://massexplorer. org/justipen/index.php)). For example, our current results show remarkable power for predicting fission barrier heights, which is a first step toward a microscopic understanding of fission. These results are a consequence of including a richer set of experimental data and more free parameters, resulting in problems that can be solved only by an efficient, state-of-the-art optimization algorithm. Acknowledgments The work under TOPS at ANL and LBNL was supported by the Office of Advanced Scientific Computing Research of the U.S. Department of Energy under contracts DE-AC02-06CH11357 (ANL), and DE-AC0205CH11231 (LBNL). The UNEDF SciDAC collaboration was supported by the U.S. Department of Energy under grant numbers DE-FC02-09ER41582. This work was also supported by the Office of Nuclear Physics of the U.S. Department of Energy under grant numbers DE-FG02-87ER40371 (Iowa State), DE-FG02-07ER41529 (Univ. of Tennessee) and DE-FG02-96ER40963 (Univ. of Tennessee). Computational resources were provided through an INCITE award (James Vary, PI) at ORNL and ANL, and by the Laboratory Computing Resource Center (LCRC) at ANL, the National Energy Research Scientific Computing Center (NERSC) at LBNL, and the National Center for Computational Sciences at ORNL. References [1] http://www.unedf.org. [2] J.P. Vary, P. Maris, E. Ng, C. Yang and M. Sosonkina. Ab initio nuclear structure – the large sparse matrix eigenvalue problem. Journal of Physics: Conference Series, 180:012083, 2009. [3] P. Sternberg, E.G. Ng, C. Yang, P. Maris, J.P. Vary, M. Sosonkina, and H.V. Le. Accelerating Configuration Interaction Calculations for Nuclear Structure. In Proceedings of the 2008 ACM/IEEE Conference on Supercomputing (Austin, Texas, November 15 - 21, 2008). Conference on High Performance Networking and Computing. IEEE Press, Piscataway, NJ, 1-12. [4] A.M. Shirokov, A.I. Mazur, S.A. Zaytsev, J.P. Vary and T.A. Weber. Nucleon-nucleon interaction in the Jmatrix inverse scattering approach and few-nucleon systems. Phys. Rev. C , 70:044005-1–044005-23, 2004. [5] R.B. Lehoucq, D.C. Sorensen, P. Vu, and C. Yang. ARPACK: An implementation of the Implicitly Re-started Arnoldi Iteration that computes some of the eigenvalues and eigenvectors of a large sparse matrix , 1995. Available from ftp.caam.rice.edu under the directory pub/software/ARPACK. [6] R.B. Lehoucq, D.C. Sorensen, and C. Yang. ARPACK USERS GUIDE: Solution of Large Scale Eigenvalue Problems by Implicitly Restarted Arnoldi Methods. SIAM, Philadelphia, PA, 1998. [7] D.C. Sorensen. Implicit application of polynomial filters in a k-step Arnoldi method. SIAM Journal on Matrix Analysis and Applications, 13(1):357–385, January 1992. [8] B.N. Parlett. The Symmetric Eigenvalue Problem. Prentice-Hall, 1980. [9] M. Stoitsov, J. Moré, W. Nazarewicz, J.C. Pei, J. Sarich, N. Schunck, A. Staszczak, and S. Wild. Towards the Universal Nuclear Energy Density Functional. Journal of Physics: Conference Series, 180:012082, 2009. [10] S. Benson, L. Curfman McInnes, J. Moré, T. Munson, and J. Sarich. Toolkit for Advanced Optimization, http://www.mcs.anl.gov/tao. [11] M. Kortelainen, T. Lesinski, J. Moré, W. Nazarewicz, J. Sarich, N. Schunck, M.V. Stoitsov, and S. Wild. Nuclear Energy Density Optimization. Phys. Rev. C , 82:024313, 2010. [12] J. Moré and S. Wild. 2011. Estimating Computational Noise SIAM J. Sci. Comput. to appear.
5cs.CE
arXiv:1612.06912v2 [math.GR] 29 Nov 2017 ON ANDREWS-CURTIS CONJECTURES FOR SOLUBLE GROUPS LUC GUYOT Abstract. The Andrews-Curtis conjecture claims that every normally generating n-tuple of a free group Fn of rank n ≥ 2 can be reduced to a basis by means of Nielsen transformations and arbitrary conjugations. Replacing Fn by an arbitrary finitely generated group yields natural generalizations whose study may help disprove the original and unsettled conjecture. We prove that every finitely generated soluble group satisfies the generalized Andrews-Curtis conjecture in the sense of Borovik, Lubotzky and Myasnikov. In contrast, we show that some soluble Baumslag-Solitar groups do not satisfy the generalized Andrews-Curtis conjecture in the sense of Burns and Macedońska. 1. Introduction The Andrews-Curtis conjecture (AC conjecture) is a long-standing open problem in combinatorial group theory with a tight link to open problems in low-dimensional topology [34, 1, 32]. The conjecture asserts that any n-tuple whose components normally generate a free group of finite rank n ≥ 2 can be transitioned to a basis by means of Nielsen transformations and arbitrary conjugations. This article, which is only concerned with algebraic aspects, addresses two generalizations of this conjecture to finitely generated soluble groups. Our main results are Theorem 1.3, Theorem 1.9 and Corollary 1.10 below. Theorem 1.3 elaborates on results of [20, 8] to settle the generalized Andrews conjecture in the sense of [4] for soluble groups. Theorem 1.9 and Corollary 1.10 solve [8, Open Problem] and show in particular that the metabelian Baumslag-Solitar group a, b aba−1 = b11 does not satisfy the generalized Andrews conjecture in the sense of [7]. Before we can state the AC conjecture with precise terms, we need to introduce some definitions. Date: December 1, 2017. 2010 Mathematics Subject Classification. Primary 20F05, Secondary 20F16. Key words and phrases. Andrews-Curtis conjecture; Nielsen equivalence; recalcitrance; coessential abelianization; metabelian groups; Baumslag-Solitar groups; N-Frattini subgroup. 1 2 LUC GUYOT Let G be a finitely generated group. We denote by rk(G) the rank of G, i.e., the minimal number of elements which generate G. For n ≥ rk(G), we define a generating n-vector of G as an ordered n-tuple whose components generate G. An elementary Nielsen transformation of Gk for k ≥ 1, is a transformation which replaces for some i the component gi of g = (g1 , . . . , gk ) ∈ Gk by either gj gi for some j 6= i or by gi−1 and leaves the other components unchanged. We call Nielsen transformation the composition of any finite number of elementary Nielsen transformations. The Nielsen transformations of Gn for n ≥ rk(G) clearly preserve the set of generating n-vectors of G. Two such vectors are said to be Nielsen equivalent if they can be related by a Nielsen transformation. We say that a set {g1 , . . . , gn } of elements of a group G normally generates G if the normal subgroup hg1 , . . . , gn iG generated by these elements is G. We denote by w(G) the weight of G, i.e., the minimal number of elements which normally generate G. For n ≥ w(G), we define a normally generating n-vector of G as an ordered n-tuple whose components normally generate G. The elementary transformations of Andrews and Curtis [2], are the elementary Nielsen transformations supplemented by the transformations replacing a component gi by any of its conjugates gig + g −1gi g with g ∈ G, and leaving the other components unchanged. We refer to these transformations as the elementary AC-transformations. We call AC-transformation the composition of any finite number of elementary AC-transformations The AC-transformations of Gn for n ≥ w(G) clearly preserve the set of normally generating n-vectors of G. Two such vectors are said to be AC-equivalent if they can be related by an AC-transformation. The AC conjecture claims that Andrews-Curtis conjecture ([1], [2]). Every normally generating n-vector of a free group Fn of rank n ≥ 2 is AC-equivalent to some basis of Fn . Since any two bases of Fn are Nielsen equivalent [19, Proposition 4.1], the conjecture can be rephrased saying that any two normally generating nvectors of Fn are AC-equivalent. We observe that, for every n ≥ 1, an ACtransformation of Gn induces an AC-transformation on Qn for any quotient Q of G. Thus the existence of non-AC-equivalent vectors in some quotient of Fn would disprove the AC conjecture, provided these vectors can be lifted to Fn . This never holds for Abelian quotients: Proposition 1.1. Let Fn be a free group of rank n ≥ 1 and π : Fn ։ G an epimorphism onto an Abelian group G. Then the images under π of any two normally generating n-vectors of Fn are AC-equivalent. In a finitely generated Abelian group, AC-transformations and Nielsen transformations coincide and define hence the same equivalence relation. Therefore the proposition holds if it is established for G = Zn , which is well-known [19, ON ANDREWS-CURTIS CONJECTURES FOR SOLUBLE GROUPS 3 Proposition 4.4]. As a by-product, we obtain that the minimal number of ACtransformations needed to turn one image vector into the other is bounded above by a constant which depends only on n. Because of Proposition 1.1, none of the potential counterexamples to the Andrews-Curtis conjecture (see, e.g., [14]) can be verified using Abelian quotients, even though finitely generated Abelian groups do have in general Nielsen non-equivalent generating vectors (consider Z/5Z and see Theorem 1.12 below for a complete treatment). Borovik, Lubotzky and Myasnikov [4] formulated a generalization of the AC conjecture which takes into account false positives occuring in abelianization, i.e., pairs of normally generating vectors whose images under abelianization are not AC-equivalent. Let [G, G] be the commutator subgroup of G and let πab : G ։ Gab = G/[G, G] be the abelianization homomorphism. Generalized Andrews-Curtis conjecture 1 (GACC 1). A finitely generated group G is said to satisfy the generalized Andrews-Curtis conjecture in the sense of [4] if the following holds for every n ≥ max(w(G), 2): any two normally generating n-vectors of G are AC-equivalent if and only if their images under abelianization are AC-equivalent. The question as to whether there is a finitely generated group which does not satisfy GACC 1 remains open. The class of groups satisfying GACC 1 comprises finite groups [4, Theorem 1.1], finitely generated groups whose maximal subgroups are normal [22, Theorem 1.5] and finitely generated groups of the form S1 × · · · × Sk where each factor is a non-Abelian simple group [4, Inspection of Theorem 2.1’s proof]. It also comprises finitely generated free soluble groups [20, Corollary 1], and more generally, finitely generated soluble groups G whose abelianization homomorphism is coessential, i.e., such that every generating n-vector of Gab lifts to an n-generating vector of G for every n ≥ rk(G) [8, Theorem 3.1]. Any of the two latter results easily implies Proposition 1.2. Let Fn be a free group of rank n ≥ 1 and π : Fn ։ G an epimorphism onto a soluble group G. Then the images under π of any two normally generating n-vectors of Fn are AC-equivalent. We shall establish with Corollary 1.10 below that there exist finitely generated soluble groups with non-coessential abelianization homomorphisms. Therefore the aforementioned results do not fully settle GACC 1 in the variety of soluble groups. Elaborating on the techniques of [8, Theorem 3.1], we are able to settle this conjecture for all soluble groups: Theorem 1.3. Every finitely generated soluble group G satisfies GACC 1: for every n ≥ max(w(G), 2), any two normally generating n-vectors of G are ACequivalent if and only if their images under abelianization are AC-equivalent. 4 LUC GUYOT If we restrict to the case n > w(G), then the conclusion of Theorem 1.3 is actually valid for a class of groups which is larger than the union of all classes mentioned earlier. The definition of this class involves the N-Frattini subgroup W (G) of a group G. The group W (G) is the intersection of all maximal normal subgroups of G if such exist, the group G otherwise. This is obviously a characteristic subgroup of G and it is straightforward to check that W (G/W (G)) = 1. In addition, the group W (G) coincides with the set of elements which can be omitted from every normal generating subset of G, that is, if hX, giG = G for some subset X of G and an element g ∈ W (G), then hXiG = G (see [3, Satz 3.1] or [4, Lemma 4.1.(1)]). As a result, we have w(G) = w(G/W (G)) whenever G 6= W (G). If every simple quotient of G has a maximal subgroup, then W (G) contains the Frattini subgroup Φ(G) of G, that is the intersection of all maximal subgroups of G if such exist, the group G otherwise [10, Lemma 4]. Thus the inclusion Φ(G) ⊂ W (G) holds in particular if G is finitely generated or soluble. But if G is a simple group without maximal subgroups, e.g., one of those constructed in [28] or [25, Theorem 35.3], then Φ(G) = G whereas W (G) = 1, so that Φ(G) 6⊂ W (G). The quotient G/W (G) is, by construction, a subdirect product of an unrestricted product of simple groups. Since simple soluble groups are Abelian, the following is immediate: Lemma 1.4. [3, Folgerung 2.10]. If G is a finitely generated soluble group then G/W (G) is Abelian. We say that G satisfies GACC 1n>w if for every n > w(G), any two normally generating n-vectors of G are AC-equivalent. As finitely generated Abelian groups satisfy GACC 1n>w by Theorem 1.12, the case n > w(G) of Theorem 1.3 is a direct consequence of the following more general result Proposition 1.5. Let G be a finitely generated group such that G/W (G) satisfies GACC 1n>w , then so does G. We have already observed, thanks to Theorem 1.12, that GACC 1 implies GACC 1n>w , but the question as to whether the converse holds is open. Proposition 1.5 naturally leads to the following definition. Let W be the class of the groups G such that G/W (G) is finite, or Abelian, or of the form S1 × · · · × Sk where each factor is non-Abelian and simple. Then we have the following Corollary 1.6. Let G be a finitely generated group in W. Then G satisfies GACC 1n>w . By construction, the class W contains all the groups which were shown to satisfy GACC 1. Let MN be the class of groups whose maximal subgroups are normal. The subclass of W which consists of the finitely generated groups ON ANDREWS-CURTIS CONJECTURES FOR SOLUBLE GROUPS 5 G such that G/W (G) is Abelian naturally generalizes the class of finitely generated groups lying in MN . Indeed MN coincides with the class of groups G such that G/Φ(G) is Abelian [21, Theorem A]. Furthermore, the class W contains finitely generated group which don’t sit in MN since a finitely generated soluble group in MN must be nilpotent. The class W also contains those Sunic groups of intermediate growth that don’t belong to MN [11]. In the formulation of GACC 1, the case n = w(G) = 1 is purposely ignored. Indeed, the original AC conjecture is only concerned with n ≥ 2 since w(Fn ) = n and it is trivial to address the case of F1 . Moreover, no non-trivial perfect group can satisfy the specialization to n = 1 of GACC 1 (see, e.g., [31, Lemma 4.2]) whereas all finite groups satisfy it when n ≥ 2. Still, understanding AC-equivalence in the class of finitely generated weight one groups, which encompasses the long-studied class of n-knot groups, is a problem on its own (see, e.g., [27, 29]). We call g ∈ G a weight element of G if g normally generates G, i.e., G = hgiG . We say that G satisfies GACC 1n=1 if w(G) = 1 and if two weight elements of G are AC-equivalent whenever their images under abelianization are AC-equivalent. Note that GACC 1n=1 is, by definition, independent of GACC 1. In the class of finitely generated soluble groups, the following results can be established: Proposition 1.7. The following hold: (i) A finitely generated soluble group is normally generated by a single element if and only if its abelianization is cyclic. (ii) A finitely generated metabelian group with cyclic abelianization satisfies GACC 1n=1 . (iii) There exists a three-generated polycyclic group of solubility length 3 with infinitely many non-AC-equivalent weight elements. (iv) The wreath product of finitely many finite cyclic groups with pairwise coprime orders satisfies GACC 1n=1. The assertion (i) of Proposition 1.7 is a straightforward corollary of Lemma 1.4, while assertions (ii) and (iii) are respectively [15, Theorem 14.1.(4)] and [16, Theorem 9.1]. Our contribution is assertion (iv) which shows that GACC 1n=1 can be satisfied by groups with arbitrary solubility lengths. Here are three examples of non-cyclic metabelian groups which satisfy GACC 1n=1 : • the dihedral group of order 2p with p an odd integer; • the group of the invertible affine transformations x 7→ ax + b of a finite field; • the metabelian Baumslag-Solitar group BS(1, 2) = ha, b | aba−1 = b2 i. Because of statements like Proposition 1.2 and the analogous [4, Corollary 1.3] for finite groups, it is sometimes asserted that a computation in a 6 LUC GUYOT group which satisfies GACC 1 cannot lead to a counterexample to the classical AC conjecture. This is only true if one disregards strategies based on the complexity of the reduction. Indeed, if reducing the image of a potential counterexample in a group G to the image of a fixed basis requires arbitrarily many AC-moves when G varies is some suitable class, then the AC conjecture is disproved. Complexity measures tightly related to the minimal number of required AC-moves were studied in [5, 18]. A coarser complexity measure, termed recalcitrance, was studied in [8, 6, 7] with a view to disprove the classical AC conjecture using reductions in free soluble groups with arbitrary soluble lengths. We shall define the recalcitrance of a finitely generated group in the sense of [6] and present then a new generalized Andrews-Curtis conjecture based on this definition. In [7, Proposition 1] it was shown that the result of any finite sequence of successive AC-transformations can be achieved by means of a sequence of transformations of the form (s1 , . . . , sn ) → (s1 , . . . , si w, . . . , sn ), w ∈ hs1 , . . . , si−1 , si+1 , . . . , sn iG perhaps followed by a permutation of the n-vector, and conversely. Such a transformation is called an M-transformation (M for “modulo” since si is replaced by any element congruent to it modulo the other sj ). We take the M-transformations as our “elementary moves” and define the recalcitrance of a normally generating n-vector of a group G of rank n to be the least number of M-transformations needed to transition from that n-vector into a generating n-vector of G. If such a transition is impossible, the recalcitrance is infinite. The recalcitrance rec(G) of the group G is defined as the supremum of the recalcitrances of all of its normally generating n-vectors. The classical AC conjecture can now be rephrased in asserting that every finitely generated free group has finite recalcitrance. This leads to Generalized Andrews-Curtis conjecture 2 (GACC 2). A finitely generated group of rank n is said to satisfy the generalized Andrews-Curtis conjecture in the sense of [7] if every normally generating n-tuple of G has finite recalcitrance. A group G of rank n has recalcitrance zero if every normally generating n-vector of G is a generating n-vector. Finitely generated groups with recalcitrance zero have been characterized in the following ways Theorem 1.8. [6, Theorem 1], [21, Theorem A]. Let G be a finitely generated group. Then the following are equivalent: (i) rec(G) = 0. (ii) The Frattini subgroup of G contains the derived subgroup of G. ON ANDREWS-CURTIS CONJECTURES FOR SOLUBLE GROUPS 7 (iii) Every maximal subgroup of G is normal. In particular, finitely generated nilpotent groups have recalcitrance zero while finitely generated soluble and linear groups with zero recalcitrance must be nilpotent (see [6, 21]). As noted in [21], the first Grigorchuk group and the Gupta-Sidki p-groups are examples of non-linear groups with recalcitrance zero. The infinite dihedral group is an example of group with recalcitrance one [6, Examples 3.1] . By [8, Theorem 2.1], the recalcitrance of a finite group of rank n is bounded by 2n−1, provided that n is greater than the abelianization rank. By [8, Theorem 3.1], the recalcitrance of a soluble group G of rank n is bounded by 2n − 1 if its abelianization homomorphism is coessential. The authors ask in [8, Open Problem] whether the latter condition is necessary. We answer this question in the positive and exhibit subsequently a two-generated metabelian group with infinite recalcitrance. Theorem 1.9 (Lemma 3.1 and Theorem 3.1 of [8]). Let G be a finitely generated soluble group of rank n. Then G satisfies GACC 2 if and only if its abelianization homomorphism is coessential. If G satisfies GACC 2 then we have, furthermore, rec(G) ≤ 2n − 1. Using results of [13], we are able to prove with Proposition 3.3 below that the abelianization homomorphism of the Baumslag-Solitar group BS(1, 11) = a, b aba−1 = b11 is not coessential. Corollary 1.10 (Proposition 3.3 and Corollary 3.4). The metabelian BaumslagSolitar group BS(1, 11) has some normally generating pairs of infinite recalcitrance. In particular, this group does not satisfy GACC 2. Eventually, we present a graph which encodes the complexity of the reduction of normally generating vectors via M-transformations. For n ≥ w(G), we denote by M-graph Mn (G) of G, that is the graph whose vertices are the normally generating n-vectors of G and such that two vertices are connected by an edge if an M-transformation, or the inversion of one component, turns one vertex into the other. Note that swapping two components of an n-vector can be carried out using three elementary Nielsen transformations followed by the inversion of a component. Therefore, replacing inversions by swaps in the definition of Mn (G) would result in a quasi-isometric graph with the same connected components. We denote by diam(Γ) the diameter, possibly infinite, of a connected graph Γ. We set dn (G) = sup diam(C) C where C ranges over the set of connected components of Mn (G). Thanks to [8, Theorem 3.1] and to a careful inspection of the proofs of Proposition 1.5 and Theorem 1.3, we obtain 8 LUC GUYOT Corollary 1.11. Let G be a finitely generated group in W, e.g., G is a finitely generated soluble group. Then the following hold. (1) If n > w(G), then Mn (G) is connected and we have: diam(Mn (Gab )) ≤ diam(Mn (G)) ≤ diam(Mn (G/W (G))) + n + w(G). (2) If n = w(G) > 1 and G is moreover soluble, then the following hold. (i) The abelianization homomorphism G ։ Gab = G/[G, G] induces bijection between the sets of connected components of Mn (G) and Mn (Gab ). (ii) We have dn (Gab ) ≤ dn (G) ≤ 2dn (Gab ) + 8(n − 1). (iii) [8, Theorem 3.1] If the abelianization homomorphism of G is coessential, then a normally generating n-vector is a t distance at most 2n − 1 from a generating n-vector. If G is a finitely generated Abelian group, then Mn (G) is the Nielsen graph Γn (G) depicted in [22], also known as the extended product replacement graph Γ̃n (G) [26, Section 2.2]. In this case, the connected components of Mn (G) can be described using the following Theorem 1.12. [23, Theorem 1.1] Let G be a finitely generated Abelian group whose invariant factor decomposition is Zd1 × · · · × Zdk with 1 6= d1 , di divides di+1 and where Zdi stands for Z/di Z with di ≥ 0 (in particular Z0 = Z). Then every generating n-vector g with n ≥ k is Nielsen equivalent to (δe1 , e2 , . . . , ek , 0, . . . , 0) for some δ ∈ (Zd1 )× and where ei ∈ G is defined by (ei )i = 1 ∈ Zdi and (ei )j = 0 for j 6= i. • If n > k, then we can take δ = 1. • If n = k then δ must be ± det(g) where det(g) is the determinant of the matrix whose rows are the images of the components of g under the natural epimorphism G ։ (Zd1 )n . In particular G has only one Nielsen equivalence class of generating n-vectors for n > k while it has max(ϕ(d1 )/2, 1) Nielsen equivalence classes of generating k-vectors where ϕ denotes the Euler totient function extended by ϕ(0) = 2. Under the hypotheses of Theorem 1.12, the diagonal action of the automorphism group of G on Gn induces a transitive action on the set of connected components of Mn (G), which are therefore isometric. Moreover, the diameter dn (G) of any connected component of Mn (G) is finite if and only if G is finite. The understanding of dn (G) for a finite Abelian group G seems to be rather limited. As an example, d2 (Z/pZ) = diam(M2 (Z/pZ)) is of order log(p) [9, Remark 3.3], a result which generalizes to all finite groups [26, Theorem 2.2.3]. ON ANDREWS-CURTIS CONJECTURES FOR SOLUBLE GROUPS 9 The paper is organized as follows. Section 2 is dedicated to the proofs Theorem 1.3 and Proposition 1.7. Section 3 is dedicated to the proofs of Theorem 1.9 and Corollary 1.10. The following notation will be used throughout the article. Given a group homomorphism π : G → Q and g ∈ Gk , we denote by π(g) ∈ Qk the k-vector obtained by componentwise application of π to g. We will denote by πW the natural epimorphism G ։ G/W (G). Recall that the following are equivalent: • g normally generates G, • πW (g) normally generates G/W (G). 2. The generalized Andrews-Curtis conjecture in the sense of [4] In this section we shall establish first Theorem 1.3, with its assumption n ≥ max(w(G), 2). At the end of this section we shall consider the more exotic case n = w(G) = 1. We start by handling the easiest range for n, that is n > w(G). Our results for such values of n, i.e., Proposition 1.5 and Corollary 1.6, apply to a class wider than the class of soluble groups, namely the class W defined in the introduction. Proof of Proposition 1.5. Let n > w(G) and let us fix a normally generating n-vector g = (g1 , . . . , gn ) of G. Since G/W (G) satisfies GACC 1n>w by hypothesis, the vector πW (g) is AC-equivalent to a normally generating n-vector whose index i component is trivial for all i > w(G). Replacing g by an ACequivalent vector if needed, we can hence assume that gi ∈ W (G) for every i > w(G). Consider now another normally generating n-vector h = (h1 , . . . , hn ) of G. We shall show that h is AC-equivalent to g. By hypothesis, the vectors πW (g) and πW (h) are AC-equivalent. Replacing h by an AC-equivalent vector if needed, we can therefore assume that hi = gi wi with wi ∈ W (G) for every i. Let i ∈ {1, . . . , w(G)}. As the vector (h1 , . . . , hw(G) ) normally generates G, we can turn the component of h with index w(G) + 1 into wi by means of an M-transformation. Subsequently we can turn the i-th component, namely hi , into gi , using an evident Nielsen transformation. Thus we obtain a normally generating n-tuple h′ which is AC-equivalent to h and such that h′i = gi for 1 ≤ i ≤ w(G) and h′i ∈ W (G) for w(G) ≤ i ≤ n. Since (g1 , . . . , gw(G) ) normally generates G, we can replace h′i by gi for every w(G) < i ≤ n by means of M-transformations, which yields g.  Proof of Corollary 1.6. Let G be a finitely generated group in W and let H = G/W (G). By Proposition 1.5, it suffices to show that the conclusion holds for H. If H is Abelian, the result follows from Theorem 1.12. If H is finite, it 10 LUC GUYOT follows from [4, Theorem 1.1]. If H is a direct product of finitely many simple non-Abelian groups, the result follows from [4, Proof of Theorem 2.1].  Because the proof Theorem 1.3 is essentially the same when G is twogenerated, we shall address this case first and indicate later on how to generalize to arbitrary finite ranks. In the two-generated case, the theorem can be rephrased as follows. Proposition 2.1. Let G be a soluble group of rank 2 and let (a, b) be a normally generating pair of G. Then (ac, bd) is AC-equivalent to (a, b) for every c, d ∈ [G, G]. Proposition 2.1 can in turn be reduced to the following Proposition 2.2. Let G be a soluble group of rank 2. Let (a, b) be a generating pair of G and let k ∈ Z be such that (a, bk ) normally generates G. Then (ac, bk d) is AC-equivalent to (a, bk ) for every c, d ∈ [G, G]. Let us postpone the proof of Proposition 2.2 to the end of this section. Taking this proposition for granted, we can now prove Theorem 1.3 provided n = 2. Proof of Theorem 1.3: the case n = 2. Consider two normally generating pairs g and h. Since each AC-move on G2 induces a Nielsen transformation on G2ab , the generating pairs πab (g) and πab (h) are Nielsen equivalent if g and h are AC-equivalent. Let us show that Proposition 2.1 implies the converse. To this end, assume that πab (g) and πab (h) are Nielsen equivalent and write g = (a, b). Applying to h a Nielsen transformation taking πab (h) to πab (g), we obtain a normally generating pair h′ of the form (ac, bd) with c, d ∈ [G, G]. By Proposition 2.1, the pair h′ , and hence h, is AC-equivalent to g. Let us now prove that Proposition 2.1 follows from Proposition 2.2. To do so, consider two normally generating pairs h = (x, y), h′ = (xc, yd) of G with c, d ∈ [G, G]. By Theorem 1.12, there is a generating pair g = (a, b) of G and k ∈ Z such that πab (h) is Nielsen equivalent to πab (a, bk ). Applying a suitable Nielsen transformation to h, we obtain an AC-equivalent pair of the form (ac1 , bk d1 ) with c1 , d1 ∈ [G, G]. Applying the same Nielsen transformation to h′ , we obtain an AC-equivalent pair of the form (ac2 , bk d2 ) with c2 , d2 ∈ [G, G]. By Proposition 2.2, the latter two pairs are both Nielsen equivalent to (a, bk ). As a result, the pairs h and h′ are AC-equivalent.  The next definitions and preliminary results will enable us to present the proof of Proposition 2.2 and the general case of Theorem 1.3. Our proofs will follow closely the lines of [8, Theorem 3.2]’s proof. First we need to generalize the concept of weighted commutators used by the latter. Recall that [G, G] ON ANDREWS-CURTIS CONJECTURES FOR SOLUBLE GROUPS 11 denotes the commutator subgroup of G, that is the subgroup generated by the commutators [x, y] + x−1 y −1xy for x, y ∈ G. Let a and b be arbitrary elements of a group G. Commutators of weight w in a and b are defined inductively as follows. For w = 1, these are taken to be a±1 and b±1 . A commutator of weight w > 1 in a and b is then defined to be an element of G expressible as [c1 , c2 ] where c1 and c2 are respectively commutators of weights w1 , w2 < w in a and b, such that w1 + w2 = w. We define similarly commutators of weight w in conjugates of a and b, these being just the conjugates of a±1 and b±1 if w = 1. It is easy to prove, using the standard group identities [xy, z] = [x, z][[x, z], y][y, z] [x, yz] = [x, z][x, y][[x, y], z] that every element of the commutator subgroup of ha, bi (resp. of the commutator subgroup of ha, biG ) can be expressed as a product of finitely many commutators of weights ≥ 2 in a and b (resp. commutators in conjugates of a and b). The proofs of [8, Lemmas 3.1 and 3.2] can be used almost verbatim to demonstrate the following Lemma 2.3. Let G be a soluble group such that w(G) = 2 and let a, b, c ∈ G. Then the following assertions hold. (i) [8, Lemma 3.1] If c is expressible as a weighted commutator in conjugates of a and b involving a±1 , and g is any element of G(i) , the i-th term of the derived series of G, then the result ĉ of replacing every occurrences of a in c by g, is also in G(i) . (ii) [8, Lemma 3.2] If G = ha, bi (resp. G = ha, biG ) and if c is expressible as a product c1 · · · cn of weighted commutators ci in a and b (resp. in conjugates of a and b), of arbitrary weights ≥ 2, each involving a±1 at least twice, then haciG contains a. We are now in position to prove Proposition 2.2. Proof of Proposition 2.2. Let (a, b) be a generating pair of G and let k ∈ Z such that ha, bk iG = G. Let g = (ac, bk d) with c, d ∈ [G, G]. We can assume that d is a product of non-trivial weighted commutators of a and b, so that each of these commutators involves a±1 at least once. We shall assume first that c is expressible as a product of weighted commutators in conjugates of a and bk , each involving a±1 at least twice. By Lemma 2.3.2, we have a ∈ haciG . Since G = ha, bi, we deduce that [G, G] ⊂ haiG . Therefore we can turn g into (ac, bk c) by means of a single M-transformation. Using a subsequent Nielsen move, we get (ab−k , bk c). As [G, G] ⊂ hab−k iG , we obtain (ab−k , bk ) by applying another M-transformation. Applying a last Nielsen transformation yields (a, bk ), which proves the result in this case. 12 LUC GUYOT If not all of the commutator factors cj of c involve a±1 at least twice, we replace every occurrence of b±k in all of them by d∓1 and expand the result as a product cj1 cj2 · · · cjk of commutators in a and b using the above group identities. Since d is a product of commutators in a and b involving each at least one occurrence of a±1 , this procedure must produce additional occurrences of a±1 , that is, all commutators cjr will have at least two occurrences of a±1 . We thus obtain, via a single M-transformation, a pair (ac′ , bk d) where c′ is a product of commutators in a and b all of which involve a±1 at least twice. Lemma 2.3.1.ii applies and proceeding now as in the earlier case, we have that at most two more M-transformations to get to (a, bk ).  We will prove now Theorem 1.3 in full generality. The definition of commutators of weight k in (conjugates of ) x1 , . . . , xn is a straightforward generalization of the definition in the case n = 2 given above. The following generalization of Lemma 2.3 is immediate. Lemma 2.4. Let G be a soluble group such that w(G) = n and let x1 , . . . , xn , c be elements of G. Then the following assertions hold. (i) [8, Lemma 3.1′ ] If c is expressible as a weighted commutator in conju(i) gates of x1 , . . . , xn , each involving x±1 1 , and g is any element of G , the i-th term of the derived series of G, then the result ĉ of replacing every occurrences of x1 in c by g, is also in G(i) . (ii) [8, Lemma 3.2′ ] If G = hx1 , . . . , xn i (resp. G = hx1 , . . . , xn iG ) and if c is expressible as a product c1 · · · cn of commutators ci in x1 , . . . , xn (resp. in conjugates of x1 , . . . , xn ), of arbitrary weights ≥ 2, each involving G x±1 1 at least twice, then hx1 ci contains x1 . Proof of Theorem 1.3: the general case. By Corollary 1.6, we can assume that n = w(G) ≥ 2. Let g and h be two normally generating n-vectors. Since each AC-move on Gn induces a Nielsen transformation on Gnab , the generating pairs πab (g) and πab (h) are Nielsen equivalent if g and h are AC-equivalent. We shall prove now the converse. To this end, assume that πab (g) and πab (h) are Nielsen equivalent. Reasoning as in the case n = 2, we can find a generating n-vector (a1 , . . . , an−1 , b) of G and k ∈ Z such that πab (g) and πab (h) are both Nielsen equivalent to πab (a1 , . . . , an−1 , bk ). Therefore it suffices to show that (a1 c1 , . . . , an−1 cn−1 , bk d) is AC-equivalent to (a1 , . . . , an−1 , bk ) for every c1 , . . . , cn−1 , d ∈ [G, G]. If in the expression of ci as a product of weighted commutators in conjugates of a1 , . . . , an−1 , bk , some of the factors do not involve a±1 at least twice, i then we replace the occurrences of bk and aj (j 6= i) appearing in those factors with d∓1 (since bk ≡ d−1 mod hbk diG ) and the corresponding c∓1 (since j −1 G aj ≡ cj mod haj cj i ), and repeat this until the factors contain at least two ON ANDREWS-CURTIS CONJECTURES FOR SOLUBLE GROUPS 13 occurrences of ai , or they become trivial (as elements of G(k) , where k is the solubility length of G), which will occur if a±1 fails to appear, or appears just i once, in the course of this iteration. Thus, performing at most n − 1 Mtransformations if needed, we can assume that ci is expressible as a product of commutators in a1 , . . . , an−1 , bk , of arbitrary weights ≥ 2, each involving a±1 at least twice. Since ha1 c1 , . . . , an−1 cn−1 iG coincides with ha1 , . . . , an−1 iG i by Lemma 2.4.ii, it contains [G, G]. Hence a subsequent M-transformation can be used to obtain the vector (a1 c1 , . . . , an−1 cn−1 , bk c1 ). By means of a single Nielsen move, we get (a1 b−k , . . . , an−1 cn−1 , bk c1 ). As ha1 b−k , . . . , an−1 cn−1 iG still contains [G, G], we can iterate this procedure until we obtain a vector of the form (a1 b−k , . . . , an−1 b−k , bk ). Eventually, n − 1 additional Nielsen transformations yield (a1 , . . . , an−1 , bk ).  We conclude this section with the proof of Proposition 1.7 which deals with finitely generated groups of weight one. Finitely generated groups of weight at most one have been characterized as the homomorphic images of knot groups, while groups of weight at most k are the homomorphic images of k-complement link groups [12]. A knot group can have infinitely many non-AC equivalent elements, each of which normally generates the whole group [27, 29]. By contrast, Proposition 1.7 shows that the study of AC-equivalence is trivial for all weight one metabelian groups and also some groups with arbitrary solubility lengths. Proof of Proposition 1.7. (i). Let G be a finitely generated soluble group. By Lemma 1.4, we have w(G) = w(Gab ) = w(G/W (G)), a result originally proved by Baer [3, Folgerung 2.10 and Satz 6.4]. Therefore w(G) = 1 if and only if Gab is cyclic. (ii). Let G be a finitely generated metabelian group with cyclic abelianization C = hci. Let a be a lift of c in G. Every weight element of G which is also a lift of c must be of the form ad for some d ∈ [G, G]. Therefore, it suffices to show that every d ∈ [G, G] is of the form [a, e(d)] for some e(d) ∈ [G, G]. By k k setting g c + g a for g ∈ [G, G] and k ∈ Z, we define an action of C on [G, G]. Extending linearly this action to Z[C], the integral group ring of C, we turn [G, G] into a module over Z[C]. For every k, l ∈ Z and every d, e ∈ [G, G], k l the following identity holds: [ak d, al e] = e1−c d−(1−c ) . Since 1 − c divides both 1 − ck and 1 − cl in Z[C], we have [ak d, al e] ∈ [G, G]1−c . As G = hai[G, G], we deduce that [G, G] = [G, G]1−c , which proves the result. (iii). See [16, Theorem 9.1]. (iv). Let us consider finite cyclic groups C1 , . . . , Ck . We set G1 = C1 and Gi = C1 ≀ · · · ≀ Ci for every 1 < i ≤ k, so that Gi = Gi−1 ≀ Ci if i > 1. It is easily checked that (Gi )ab = C1 × · · · × Ci , and the latter group is cyclic for every 14 LUC GUYOT i since the orders |Ci | of the cyclic groups Ci are pairwise coprime integers. By the above assertion (1), we have w(Gi ) = 1 and every weight element of Gi is a lift of a generator of (Gi )ab . For every i, we pick a generator ci of Ci and define a lift xi of (c1 , . . . , ci ) ∈ (Gi )ab in Gi in the following way. We set i x1 = c1 and xi = fi ci where fi ∈ GC i−1 is defined by fi (1) = xi−1 and for i > 1 we set fi (c) = 1 for c 6= 1. We shall prove by induction on k that the order of xk coincides with the order of (Gk )ab and that xk is self-centralizing in Gk , i.e., the centralizer of xk in Gk is the cyclic subgroup hxk i generated by xk . |C | k If k = 1, this is obvious. If k > 1, then gk−1 + xk k belongs to GC k−1 and is defined by gk−1 (c) = xk−1 for every c ∈ Ck . Since the order of xk−1 is the order (Gk−1 )ab by induction hypothesis, we infer that the order of xk is the order of (Gk )ab . As xk−1 is self-centralizing in Gk−1 by induction hypothesis and ck is self-centralizing in Ck , we deduce from [17, Theorem 1.(5)] that xk is self-centralizing in Gk , which proves the claim. Eventually, we shall prove that every lift of (c1 , . . . , ck ) in Gk is a conjugate of xk , hence the result. Every such lift is of the form xk d for some d ∈ [Gk , Gk ]. Therefore the result is established if the conjugacy class of xk has as many elements as [Gk , Gk ], that is |Gk |/|(Gk )ab | elements. This is indeed verified since the centralizer of xk is hxk i and has |(Gk )ab | elements.  3. The Andrews-Curtis conjecture in the sense of [8] This section is dedicated to the proofs of Theorem 1.9 and Corollary 1.10. We shall use the following definition in a preliminary result. An homomorphism π : G → Q is termed normally coessential if every normally generating vector of Q lifts to a normally generating vector of G. Theorem 1.9 is a straightforward consequence of [8, Theorem 3.1] and the following Lemma 3.1. Let G be a finitely generated group of rank n and let πab : G ։ Gab be its abelianization homomorphism. (i) Assume that G is soluble. Let g ∈ Gk with k ≥ n. Then g normally generates G if and only if πab (g) generates Gab . In particular πab is normally coessential. (ii) If every normally generating n-vector of G has finite recalcitrance and πab is normally coessential then πab is coessential. Proof. (i). Apply Lemma 1.4. (ii). Let g be a generating k-vector of Gab with k ≥ n. By hypothesis there is a lift g of g in Gk which normally generates G. Since g can be transitioned to a generating k-vector h of G by means of finitely many M-transformations, there is a Nielsen transformation which takes ON ANDREWS-CURTIS CONJECTURES FOR SOLUBLE GROUPS 15 g to πab (h). The inverse transformation takes h to a generating k-vector of G  which is also a lift of g in Gk . Therefore πab is coessential. We define now a class of metabelian groups whose abelianization homomorphisms can be studied by elementary ring-theoretic means. Let C = hai be a cyclic group, finite or infinite, given with a generator a. Let R be a quotient ring of Z[C], the integral group ring of C. We denote by α the image of a in R via the quotient map; thus α ∈ R× . Let G = R ⋊α C be the semi-direct product of the additive group of R with C, where a acts on R via multiplication by α. We identify R and C with their natural images in G, i.e., we have G = RC and R ∩ C = 1. The commutator subgroup of G is easily seen to be (1 − α)R. Then we have Gab = RC × C where RC + R/(1 − α)R is a homomorphic image of Z. Moreover the abelianization homomorphism πab : G ։ Gab splits as πab = πC × IdC where πC : R ։ RC is the natural map and IdC denotes the identity endomorphism of C. Proposition 3.2. Let G = R ⋊α C be as above. Then the following are equivalent: (i) The abelianization homomorphism G ։ Gab is coessential. (ii) The natural group homomorphism R× → RC× is surjective. Proof. Since G is two-generated, the introductory remark of [24] implies that πab is coessential if and only if every generating pair of Gab lifts to a generating pair of G. Let g be a generating pair of Gab . By [13, Corollary 1], there is a generating pair h which is Nielsen equivalent to g and of the form (u, ak ) for some u ∈ RC× and some k ∈ Z such that C = hak i. Clearly g lifts to a generating pair of G if and only if h does. By [13, Lemma 7], the pair h lifts to a generating pair of G if and only if u lifts to a unit of R.  Thus the abelianization homomorphism of R ⋊α C is certainly coessential if RC ≃ Z/nZ with n ∈ {0, 1, 2, 3, 4, 6}. This also clearly holds if 1 − α is a nilpotent element of R, i.e., (1 − α)n = 0 for some n > 0, which means that G is nilpotent. If G is nilpotent then the result is actually well-known and generalizes as follows: a group G with zero recalcitrance has a coessential abelianization homomorphism [22, Proposition 2.2]. Proposition 3.3. Let R and RC be as above. Then the natural group homomorphism R× → RC× is surjective in the following cases: (i) R is finite. (ii) R = Zm [X ±1 ], the ring of Laurent polynomials over Zm + Z/mZ and α = X. 2iπ (iii) R = Z[ζn ] where α = ζn = e n and n > 0. 16 LUC GUYOT Proof. (i). Apply Justin Chen’s lemma, see [13, Lemma 16] or [33]. (ii). Any u ∈ (Zm )× is the image of the corresponding constant Laurent polynomial which is clearly invertible in Zm [X ±1 ]. (iii). If n has more than one prime divisor, then 1 − ζn is a unit of Z[ζn ] by [30, Proposition 7.6.2.ii] and hence RC is trivial. So we can assume that n is a n a power of a prime. In this case ξa = 1−ζ is a unit for every a ∈ Z coprime 1−ζn with n by [30, Proposition 7.6.2.ii]. We have RC = Z/Φn (1)Z where Φn is the n-th cyclotomic polynomial and we know that Φn (1) divides n. As ξa ≡ a mod (1 − ζn )Z[ζn ], the result follows.  Corollary 3.4. The Baumslag-Solitar group BS(1, n) = a, b aba−1 = bn has infinite recalcitrance if n = pd with p prime, d ≥ 1 and n ≥ 11. Proof. It is well-known that BS(1, n) ≃ R ⋊α C with R = Z[1/n], C = Z and α = n. We have RC = R/(n − 1)R ≃ Z/(n − 1)Z. The unit group of R is the multiplicative subgroup of Q∗ generated by −1 and the prime divisors of n. If n = pd then this group maps onto a cyclic subgroup of RC× of order at most 2d. For n ≥ 11, the group RC× has strictly more than 2d elements, so that R× → RC× is not surjective. The result now follows from Theorem 3.2  Acknowledgements. The author is grateful to Tatiana Smirnova-Nagnibeda for pointing out that some Sunic groups of intermediate growth sit in the class W defined in the introduction. The author is also thankful to Wolfgang Pitsch, Pierre de la Harpe, Yves de Cornulier, Daniel Oancea and Robert Geoffrey Burns for their helpful comments and their encouragements. References 1. J. J. Andrews and M. L. Curtis. Free groups and handlebodies. Proc. Amer. Math. Soc., 16:192–195, 1965. 2. J. J. Andrews and M. L. Curtis. Extended Nielsen operations in free groups. Amer. Math. Monthly, 73:21–28, 1966. 3. R. Baer. Der reduzierte Rang einer Gruppe. J. Reine Angew. Math., 214/215:146–173, 1964. 4. A. V. Borovik, A. Lubotzky, and A. G. Myasnikov. The finitary Andrews-Curtis conjecture. In Infinite groups: geometric, combinatorial and dynamical aspects, volume 248 of Progr. Math., pages 15–30. Birkhäuser, Basel, 2005. 5. M. Bridson. The complexity of balanced presentations and the Andrews-Curtis conjecture. arXiv:1504.04187 [math.GR], April 2015. 6. R. G. Burns, W. N. Herfort, S.-M. Kam, O. Macedońska, and P. A. Zalesskii. Recalcitrance in groups. Bull. Austral. Math. Soc., 60(2):245–251, 1999. 7. R. G. Burns and O. Macedońska. Balanced presentations of the trivial group. Bull. London Math. Soc., 25(6):513–526, 1993. 8. R. G. Burns and D. Oancea. Recalcitrance in groups II. J. Group Theory, 15(1):101–117, 2012. ON ANDREWS-CURTIS CONJECTURES FOR SOLUBLE GROUPS 17 9. P. Diaconis and R. Graham. The graph of generating sets of an abelian group. Colloq. Math., 80(1):31–38, 1999. 10. V. Dlab and V. Kořı́nek. The Frattini subgroup of a direct product of groups. Czechoslovak Math. J., 10 (85):350–358, 1960. 11. D. Francoeur and A. Garrido. Maximal subgroups of groups of intermediate growth. arXiv:1611.01216 [math.GR], November 2016. 12. F. González-Acuna. Homomorphs of knot groups. Ann. of Math. (2), 102(2):373–377, 1975. 13. L. Guyot. Generators of split extensions of Abelian groups by cyclic groups. Preprint, arXiv: [math.GR], April 2016. 14. G. Havas and C. Ramsay. Breadth-first search and the Andrews-Curtis conjecture. Internat. J. Algebra Comput., 13(1):61–68, 2003. 15. J. A. Hillman. Four-manifolds, geometries and knots, volume 5 of Geometry & Topology Monographs. Geometry & Topology Publications, Coventry, 2002. 16. J. A. Hillman. 2-knots with solvable groups. J. Knot Theory Ramifications, 20(7):977– 994, 2011. 17. W. P. Kappe and D. B. Parker. Elements with trivial centralizer in wreath products. Trans. Amer. Math. Soc., 150:201–212, 1970. 18. B. Lishak. Balanced finite presentations of the trivial group. arXiv:1504.00418 [math.GR], April 2015. 19. R. Lyndon and P. Schupp. Combinatorial group theory. Springer-Verlag, Berlin, 1977. Ergebnisse der Mathematik und ihrer Grenzgebiete, Band 89. 20. A. G. Myasnikov. Extended Nielsen transformations and the trivial group. Mat. Zametki, 35(4):491–495, 1984. 21. A. Myropolska. The class MN of groups in which all maximal subgroups are normal. arXiv:1509.08090 [math.GR], 2015. 22. A. Myropolska. Andrews-Curtis and Nielsen equivalence relations on some infinite groups. J. Group Theory, 19(1):161–178, 2016. 23. D. Oancea. A note on Nielsen equivalence in finitely generated abelian groups. Bull. Aust. Math. Soc., 84(1):127–136, 2011. 24. D. Oancea. Coessential abelianization morphisms in the category of groups. Canad. Math. Bull., 56(2):395–399, 2013. 25. A. Y. Ol′ shanskiı̆. Geometry of defining relations in groups, volume 70 of Mathematics and its Applications (Soviet Series). Kluwer Academic Publishers Group, Dordrecht, 1991. Translated from the 1989 Russian original by Yu. A. Bakhturin. 26. I. Pak. What do we know about the product replacement algorithm? In Groups and computation, III (Columbus, OH, 1999), volume 8 of Ohio State Univ. Math. Res. Inst. Publ., pages 301–347. de Gruyter, Berlin, 2001. 27. S. P. Plotnick. Infinitely many disk knots with the same exterior. Math. Proc. Cambridge Philos. Soc., 93(1):67–72, 1983. 28. S. Shelah. On a problem of Kurosh, Jónsson groups, and applications. In Word problems, II (Conf. on Decision Problems in Algebra, Oxford, 1976), volume 95 of Stud. Logic Foundations Math., pages 373–394. North-Holland, Amsterdam-New York, 1980. 29. D. S. Silver, W. Whitten, and S. G. Williams. Knot groups with many killers. Bull. Aust. Math. Soc., 81(3):507–513, 2010. 30. E. Weiss. Algebraic number theory. Dover Publications, Inc., Mineola, NY, 1998. Reprint of the 1963 original. 18 LUC GUYOT 31. J. Wiegold and J. S. Wilson. Growth sequences of finitely generated groups. Arch. Math. (Basel), 30(4):337–343, 1978. 32. P. Wright. Group presentations and formal deformations. Trans. Amer. Math. Soc., 208:161–169, 1975. 33. zcn (http://mathoverflow.net/users/44201/zcn). When does a ring surjection imply a surjection of the group of units? MathOverflow. URL:http://mathoverflow.net/q/153526 (version: 2014-01-03). 34. E. C. Zeeman. On the dunce hat. Topology, 2:341–358, 1964. EPFL ENT CBS BBP/HBP. Campus Biotech. B1 Building, Chemin des mines, 9, Geneva 1202, Switzerland E-mail address: [email protected]
4math.GR
arXiv:1601.04150v1 [cs.CE] 16 Jan 2016 Selection of Most Effective Control Variables for Solving Optimal Power Flow Using Sensitivity Analysis in Particle Swarm Algorithm Mohamed Abuella Constantine J. Hatziadoniu Departmtent of Electrical and Computer Engineering University of North Carolina at Charlotte Charlotte, USA Email: [email protected] Department of Electrical and Computer Engineering Southern Illinois University Carbondale, USA Email: [email protected] Abstract—Solving the optimal power flow problem is one of the main objectives in electrical power systems analysis and design. The modern optimization algorithms such as the evolutionary algorithms are also adopted to solve this problem, especially when the intermittency nature of generation resources are included, as in wind and solar energy resources, where the models are stochastic and non-linear. This paper uses the particle swarm optimization algorithm for solving the optimal power flow for IEEE-30 bus system. In addition to selection of the most effective control variables based on sensitivity analysis to alleviate the violations and return the system back to its normal state. This adopted strategy would decrease the optimal power flow calculation burden by particle swarm optimization algorithm, especially with large systems. Keywords— Optimal power flow; Particle swarm; Sensitivity analysis. I. I NTRODUCTION Optimal power flow (OPF) is a major tool that has been extensively researched since it has introduced. It deals with the minimum cost of power production in electrical power systems with certain constraints [1], [2]. The studies about OPF methods can be traced back to the 1960s when Carpentier and Siroux firstly discussed the OPF problem, and then Domme and Tinney presented a simplified derivative algorithm which is the first practicable algorithm for OPF problem [3]. But in this algorithm the vibration phenomenon is appearing closing to the optimum. Since then, various kinds of mathematical programming approaches, based on linear and nonlinear programming were proposed in succession, including Newton method, quadratic programming, and interior-point method [3]. The aforementioned methods utilize first or second derivative in essence. By this way, it is apt to fall into local optima. Furthermore, there is a difficulty of applying derivative-based optimization techniques to solve OPF for systems that including variable generations. Therefore, various non-classical optimization methods have emerged to cope with some of these shortcomings [4]. The main modern optimization techniques are genetic algorithm (GA), evolutionary programming (EP), artificial neural network (ANN), simulated annealing (SA), ant colony optimization (ACO), and particle swarm optimization (PSO). They have been successfully applied to wide range of optimization problems in which global solutions are more preferred than local ones [5], [6]. Kennedy and Eberhart introduced PSO as a new heuristic method [7]. Different PSO applications in power systems are covered in [6]. Abido introduced PSO to solve the OPF problem [8]. References [9], [10] have the mechanism of implementing PSO for solving OPF. The sensitivity analysis of OPF is applied to deduce the sensitivity matrices of the voltage and the current states. The fundamentals of sensitivity analysis of OPF can be found with details in [11], [12], and [13]. The sensitivity analysis is applied in power systems for voltage stability studies as a fast indication of the voltage collapse and a safe voltage margin [14], [15], [16], and [17]. The rest of the paper is organized as follows. Section II gives a description of the optimal power flow problem. Section III introduces the mathematical derivation of the sensitivity analysis. Section IV particle swarm optimization (PSO) algorithm is introduced with its parameters and its mechanism is also explained. In Section V implementation of PSO and the sensitivity analysis to find the OPF solution for several study cases are presented and the discussion of the results is included as well. Finally, Section VI gives the conclusions. II. O PTIMAL P OWER F LOW The optimal power flow is an optimization problem to find the optimal allocation of output power among the available generators with given constraints without violations of the operation and the security constraints of the system. The optimal allocation depends on various factors, such as operating cost, system security (or risk) and CO2 emissions, in general they are called cost factors. The objective function of the optimization problem in this paper is to minimize the operating cost of real power generation, while keeping the electrical system in normal and secure operation condition. The objective function and the constraints are mostly nonlinear and many methods and algorithms have been developed on the basis of cost factors; generation source type, conventional or renewable; uncertainty treatment (i.e. deterministic or stochastic). For instance, Lagrangian relaxation, direct search method, evolution programming, particle swarm optimization, genetic algorithms, and simulated annealing are some of the solution methods for the optimal power flow problem [18]. In mathematical terms, the optimal power flow (OPF) is an optimization problem set up to minimize an objective function subject to equality and inequality constraints. The equality constraints are the power flow equations, while the inequality constraints are the limits on control variables and the operating limits of power system dependent (state) variables. The control variables include the generator real power, the generator bus voltages, the transformer tap settings, and the reactive power of switchable VAR sources. On the other hand, the dependent or state variables include the load bus voltages, the generator reactive powers, and the line flows. Generally, the OPF problem is a large-scale highly constrained nonlinear non-convex optimization problem. Mathematically, the OPF problem can be formulated as follow: M in J(x,u) u is the vector of independent (control) variables consisting of generator voltages VG , generator real power outputs PG except the slack bus PG1 , transformer tap settings T, and shunt VAR compensations QC . Hence, u can be expressed as: uT = [VG1 ...VGN G , PG2 ...PGN G , T1 ...TN T , QC1 ...QCN C ] (7) Where indices NT and NC are the number of the regulating transformers and shunt compensators respectively. • Generating constraints: Generator voltages, real power outputs, and reactive power outputs are restricted by their lower and upper limits as follows: • h(x,u) ≤ 0 (3) Where J is the objective function to be minimized, it could be the cost of real power of thermal units, wind-powered units, or mix of them. g is the equality constraints represent the power flow equations. h is the inequality constraints that represent the operating limits of the system. Where g(x,u) = 0 are the balanced power flow equations as following: Pi − Vi n X Vj Yij cos(δi − δj − θij ) = 0 Qi − Vi Vj Yij sin(δi − δj − θij ) = 0 , ≤ PGi ≤ PGmax PGmin i i i = 1, ..., N G (9) (5) j=1 Where Pi is the specified real power at bus i, and it equals to the difference between the generation and demand real power (PGi -PDi ) at bus i, and the same for Qi . Yij is the admittance between buses i and j. Vi is the voltage magnitude of bus i and δi is the phase angle of the voltage at bus i. In equations (1-3), x is the vector of dependent (state) variables consisting of slack bus power PG1 , load bus voltages VL , generator reactive power output QG , and transmission line ratings (loadings) Sline . Here x can be expressed as: xT = [PG1 , VL1 ...VLN L , QG1 ...QGN G , Sline1 ...Slinenl ] (6) Where the indices NL, NG, and nl are number of load buses, number of generators, and number of transmission lines respectively. i = 1, ..., N G Timin ≤ Ti ≤ Timax , • max Qmin Ci ≤ QCi ≤ QCi , • (10) i = 1, ..., N T (11) Shunt VAR constraints: Shunt VAR compensations are restricted by their limits as follows: i = 1, ..., N C (12) Security constraints: These include the constraint of voltages at load buses and the transmission line loadings as follows: , ≤ VLi ≤ VLmax VLmin i i max , Slinei ≤ Sline i (4) j=1 n X (8) Transformer constraints: Transformer tap settings are bounded as follows: Subject to: (2) i = 1, ..., N G max Qmin Gi ≤ QGi ≤ QGi , (1) g(x,u) = 0 , ≤ VGi ≤ VGmax VGmin i i i = 1, ..., N L (13) i = 1, ..., nl (14) It is worth to mention that the control variables are selfconstrained. The hard inequalities of PG1 , VL , QG , and Sline can be incorporated in the objective function as quadratic penalty terms (penalty functions). Therefore, the objective function in equation (1) can be augmented as follows: )2 + λV Jaug = J + λP (PG1 − PGlim 1 NL X )2 (VLi − VLlim i i=1 +λQ NG X i=1 2 (QGi − Qlim Gi ) + λS nl X max 2 ) (Slinei − Sline i i=1 (15) Where λP , λV , λQ , and λS are penalty factors and xlim is the limit value of the dependent variable x given as:  max x ; (x > xmax ) xlim = (16) min x ; (x < xmin ) III. S ENSITIVITY A NALYSIS FOR O PTIMAL P OWER F LOW Earlier research on the application of sensitivity analysis in power system belongs to Peschon et al [11]. They introduced two methods. First one can be applicable to normal power flow problems for small changes in the variables such as active generation, and the second method considers the minimization of objective function satisfying some constraints such as power flow equation. Similaresearch was carried out by Gribik et al [12]. where p1 , p2 ,...,p2N are the elements of p. When changes are small, solution for ∆x will be: A. Mathematical Formulation If p variables are not changed then (24) can be rewritten as: The method of calculating the sensitivities of voltages and currents are determined simultaneously, which are further used to determine the changes in power flows [13]. Considering the generalized equations of the form: g(x,u,p) = 0 (17) where g is 2N dimensional vector, and N is number of buses. The variables mentioned in equation (17) can be categorized as: (x) are dependent (state) variables, these are the controlled variables and they are unknown. x is a 2N dimensional vector. (u) are independent control variables, these are the operating variables or imposed variables of the system. u is an M dimensional vector. (p) are parameter variables, these are uncontrollable variables and are normally specified in the power flow problem such as the admittance and the loads. Depending on the variables to be determined, the variables in the power flow problem can be selected as x, u, and p. One might be interested in controlling M variables out of the 2N variables. If x0 , u0 , and p0 are the initial state vectors, rewriting equation (17) as: g(x0 , u0 , p0 ) = 0 (18) The changes ∆x corresponding to small changes ∆u and ∆p, will satisfy the new equations: g(x0 + ∆x, u0 + ∆u, p0 + ∆p) = 0 (19) Expanding (19) by Taylor’s series and neglecting higher order terms, g(x0 +∆x, u0 +∆u, p0 +∆p) = g(x0 , u0 , p0 )+gx ∆x+gu ∆u+gp ∆p (20) where, gx , gu and gp are the partial derivatives of g with respect to x, u and p respectively and are given by: gx = ∂(g1 , g2 , ..., g2N ) ∂(x1 , x2 , ..., x2N ) ∂(g1 , g2 , ..., g2N ) ∂(u1 , u2 , ..., uM ) (22) ∂(g1 , g2 , ..., g2N ) ∂(p1 , p2 , ..., p2N ) Su = −gx −1 gu (25) Sp = −gx −1 gp (26) ∆x = Su ∆u (27) The set of dependent and independent variables can be chosen as the system requirements and the problem formulation. Some of the parameters of a type may belong to the set of dependent whereas remaining parameters of same type may belong to the set of independent variables. for instance, as bus voltages they might be considered as independent variables when they are at generator buses while they are considered dependent at load buses. B. Determination of Voltage Sensitivities at Buses Power flow equations are comprising of 6 variables namely P, Q, V, δ ,Y and θ. All the variables can be assumed to be obtained or specified at the base condition. The variables Y and θ are normally specified and are constant. The other variables are not always constant and they are either specified or determined, depending upon the type of buses. The variables for which changes are specified are grouped as independent variables and the variables which are determined against these changes are grouped as dependent variables [13]. For the slack bus, V and δ are specified and P and Q are subjected to change. For generator bus, P and V are specified and Q and δ are subjected to change. For load buses, P and Q are specified and V and δ are changed. Now consider the power system of N buses and B branches. Power flow equations can be described by (4, 5). There are 2N set of equations and a set of 2N variables can be selected as state variables (x) and remaining as control variables (u). Consider that only M control variables are changed and for these changes, it is desired to obtain the changes in the real and reactive power at slack buses, reactive power and angles at generator buses and voltages and angles at load buses. Then, the power flow equations can be written as following: (28) Let Psl , PG , PL ∈ Pi Qsl , QG , QL ∈ Qi Vsl , VG , VL ∈ Vi Grouping the variables of (28) as: where u1 , u2 ,...,uM are the elements of u. gp = (24) where Su and Sp are the sensitivities of x with respect to u and p respectively and are obtained as: g(Vi , Vj , δi , δj , Pi , Qi , Yij , θij ) = 0 (21) where x1 , x2 ,...,x2N are the elements of x. gu = ∆x = Su ∆u + Sp ∆p (23) x = [Psl , Qsl , QG , δG , VL , δL ] (29) u = [Vsl , δsl , PG , VG , PL , QL ] (30) p = Yij , θij (31) From (27), the changes in dependent variables can be obtained [∆Psl , ∆Qsl , ∆QG , ∆δG , ∆VL , ∆δL ] = S[∆Vsl , ∆δsl , ∆PG , ∆VG , ∆PL , ∆QL ] (32) where S is the sensitivity matrix of order 2Nx2N and can be obtained as given by (25). For slack bus and generator buses following substitution can be made in (32): ∆Vsl = ∆VG = ∆δsl = 0 (33) After determining the changes in the load bus voltages, load bus angles and generator bus angles from (32) and with the substitutions from (33) all the bus voltages and angles can be arranged as: [∆V, ∆δ] = [∆Vsl , ∆VG , ∆VL , ∆δsl , ∆δG , ∆δL ] (34) C. Determination of Current Sensitivities in the Lines It is well known that the changes in voltage angles and voltage magnitudes will cause changes in branch currents [13]. These currents in complex form can be expressed as: Iij = Yij [Vi (cosδi + jsinδi ) − Vj (cosδj + jsinδj )] (35) Where Yij = |Yij |∠θij and Iij ∈ B, since B is the number of branches. Equation (35) can be written in the form: gij (Iij , Yij , θij , Vi , Vj , δi , δj ) = 0 (36) Grouping the variables of (36) as x = Iij u = Vi , Vj , δi , δj (i.e. V and δ variables at all buses) p = |Yij |, θij . Sensitivities of Iij for the changes in Vi , Vj , δi , δj can be obtained from (27) as: ∆Iij = R[∆V, ∆δ] (37) where R is sensitivity matrix obtained by (25) which is given as: −1 R = −gijx giju (38) With gijx is Jacobian of gij with respect to x (i.e. Iij ). While giju is Jacobian of gij with respect to u (i.e. Vi , Vj , δi , δj ) Substituting from (34) and (38), the equation (37) can be rewritten as: A. Standard Algorithm PSO, as an optimization tool, provides a swarm-based search procedure in which particles change their positions with time. In a PSO system, particles fly around in a multidimensional search space. During flight, each particle adjusts its position according to its own experience, and the experience of neighboring particles, making use of the best position encountered by itself and its neighbors. When improved positions are being discovered these will then come to guide the movements of the swarm. The process is repeated and by doing so it is hoped, but not guaranteed, that a satisfactory solution will eventually be discovered [10]. The following is the conventional terminology of the parameters in PSO: Let x and v denote a particle coordinates (position) and its corresponding flight speed (velocity) in a search space, respectively. Therefore, the ith particle is represented as xi = [xi1 , xi2 , ...., xim ]. Since m is the last dimension or coordinate of the position of the the ith particle in the search space and so that d = 1, 2, ..., m. The best previous position of the ith particle is recorded and represented as, pbesti = [pbesti1 , pbesti2 , ...., pbestim ]. The position of the best particle among all the particles in the group is represented by the gbest. In a particular dimension d there is a group best position which is gbestd. The velocity for the ith particle is represented as, vi = [vi1 , vi2 , ...., vid ]. The modified velocity and position of each particle can be calculated by using the following formulas: k+1 k vid = w∗vid +c1 ∗U ∗(pbestkid −xkid )+c2 ∗U ∗(gbestkd −xkid ) (40) k+1 k xk+1 = x + v (41) id id id i = 1, 2, ...., n; d = 1, 2, ..., m Where n number of particles in a group; m number of members in a particle; k pointer of iterations (generations); w inertia weight factor; c1 , c2 acceleration factors; U uniform random number in the range [0,1]; k xkid ,vid the position and velocity of the ith particle in the dth dimension at iteration k; The search mechanism of the PSO using the modified velocity and position of individual based on (40) and (42) is illustrated in Fig. 1. [∆Iij ]B×1 = [R]B×2N [∆Vsl , ∆VG , ∆VL ∆δsl , ∆δG , ∆δL ]2N×1 (39) Where ∆Vsl = ∆VG = ∆δsl = 0. IV. PARTICLE S WARM O PTIMIZATION A LGORITHM The original PSO suggested by Kennedy and Eberhart is based on the analogy of swarm of bird and school of fish [7]. The algorithm was simplified and it was observed to be performing a solution to an optimization problem. Fig. 1. PSO search mechanism In the above procedures, the velocity should between vdmin ≤ vid ≤ vdmax If vdmax is too high, particles might fly past good solutions. If vdmax is too small, particles may not explore sufficiently beyond local solutions. In many experiences with PSO, it is often set at 10 - 20% of the dynamic range of the variable on each dimension [10]. The constants c1 and c2 represent the weighting of the stochastic acceleration terms that pull each particle toward the pbest and gbest positions. Low values allow particles to move far from the target regions before being dragged back. On the other hand, high values result in sudden movement toward, or past, target regions. Hence, the acceleration constants c1 and c2 are often set to be 2 according to empirical experience [10]. Suitable selection of inertia weight w in (40) provides a balance between global and local explorations, to find a sufficiently optimal solution. As originally developed w, often decreases linearly from about 0.9 to 0.4 during the run. In general, the inertia weight is set according to the following equation: w = wmax − (wmax − wmin ) × iter itermax (42) Where itermax is the maximum number of iterations (generations), and iter is the current number of iterations. Start Initialize particles with random position and velocity vectors For each particle’s position (x) evaluate objective function (J) If J(x) better than J(pbest) then pbest = x Set best of pbest as gbest Update vi = ω vi + c1 U (pbesti-xi) + c2U (gbest-xi) x i = x i + vi o Is Iter.=maxiter? Is adequate objective function reached? Yes Stop: giving gbest, optimal solution M in J(x,u) (43) g(x,u) = 0 (44) h(x,u) ≤ 0 (45) u∈U (46) x = [PG1 , VL , QG , Sline ] (47) u = [PG , VG , T, QC ] (48) subject to: Where: The equality constraint in (44) are the nonlinear power flow equations as in (4 and 5) The inequality constraints (45) are the functional operating constraints, such as transmission line limits, load bus voltage magnitude limits, generator reactive capabilities, and slack bus active power output limits. Constraints (46) define the feasibility region of the control variables of the problem such as the active power output limits of the generators (except the generator at the slack bus), generation bus voltage magnitude limits, transformer-tap setting limits, and bus shunt admittance limits. Each particle in PSO is a vector containing the control variables u, suggesting a possible solution to the OPF problem. Then the position of the ith particle xi can be represented as xi = ui = (ui1 , ui2 , ..., uim ), where m is the number of dimensions and it is also represented the number of control max variables, d ∈ [1, m], uid ∈ [umin id , uid ]. min max uid , and uid are the lower and upper bounds of uid . The particles are moving in an m dimensional space. For consistency’s sake, the general definition of the swarm particle is which used in the rest of the paper, as in equations (40 and 42). Therefore, the ith particle is represented as xi = [xi1 , xi2 , ...., xim ] instead of ui . Each particle attempts to minimize the following objective function: # " NS NG X X µi ∗ hi (x,u) (49) Fi (PGi ) + λ Jaug = µi = Fig. 2. PSO algorithm flowchart B. Implementation of PSO for OPF Problem The primary objective of the OPF problem is to determine the optimal combination of power outputs of all generating units so as to meet the required load demand at minimum operating cost while satisfying system equality and inequality constraints. The formulation of OPF for applying PSO is done by separating the problem variables to state variables, x, and control variables, u, as it was described in equations (1, 2, and 3), they also mentioned here as follows: i=1 i=1 Since:  1; 0; hi (x,u) > 0 hi (x,u) ≤ 0 (50) Here the objective function becomes unconstrained or augmented objective function by using the classical penalty functions principle. All inequality constraints in equation (45) replaced by penalty terms. While the power balance equations (44), which are the equality constraints, is solved for each particle and in every iteration by Newton-Raphson power flow algorithm, therefore no need to use a penalty function for this equality constraint in equation (49). Jarg is the penalized objective function and Fi (PGi ) is the cost of the real power from the generator PGi while λ is the penalty factor for operating constraints. µi is an indicator of occurring any violations and work outside the feasibility region of the solution. It has only two values as in equation (50), it is either 1 when a violation of the limits occurred in the corresponding constraint or 0 when there is no violation. The penalty terms that have been used are quadratic penalty functions as those in equation (15). Whereas N G is the number or generators while N S is the number of the state variables to be bounded within their limits. The penalty factor λ is used to penalize the cost proportional to the amount of constraint violations, the suitable value of the penalty factor is chosen after some runs of the algorithm [19]. According to the equations (40 and 42) in every iteration each particle of the swarm updates its position coordinates (dimensions) until the termination condition of the algorithm is met. V. S TUDY C ASES AND S IMULATION R ESULTS For analysis and investigation aim, the PSO is applied to find the optimal power flow for the standard IEEE 30-bus system, besides the implementation of the sensitivity analysis to find the most effective control variables for solving the OPF by PSO but in this case within a reduced space of dimensions. The simulation is performed by MATLAB software, the flowcharts of the main parts of simulation codes can be found in [20] . A. The Data of The System The system is shown in Fig. 3 and the data of the buses, lines, and generators are given in Appendix (A). It consists of six conventional thermal generators at buses 1, 2, 5, 8, 11, and 13, and 41 branches, four of them are transformers with off-nominal tap ratios in branches 6-9, 6-10, 4-12, and 28-27. In addition, the buses 10, 12, 15, 17, 20, 21, 23, 24, and 29 are equipped with shunt VAR compensators. The limits of control variables are indicated in table (I). For the other operating (state) variables such as voltages at load buses, the limits are [0.95-1.1]. The limits of reactive power of generators QG and the transmission lines ratings are both indicated in generator data and line data tables respectively in Appendix (A). TABLE I C ONTROL VARIABLES AND THEIR LIMITS The control variable PG1 (MW) PG2 (MW) PG3 (MW) PG4 (MW) PG5 (MW) PG6 (MW) VGs The upper limit The lower limit 200 50 80 20 50 15 35 10 30 10 40 12 0.95 1.1 (pu) Ts Qshs (MVAR) 0.9 1.1 0 5 Ts: transformer tap ratio; VGs: voltage at generator bus; Qsh: VAR compensation. B. The PSO Algorithm and Its Parameters for Solving OPF The skeleton of PSO algorithm is taken form these references [21], [22] after it has been modified for solving OPF. Initially several runs are carried out besides to the helpful information from [8], [9], [10] to select the suitable parameters for PSO algorithm. The inertia weight is decreasing linearly with iterations from its initial value at 0.9 to its ultimate value at 0.4, while the acceleration factors C1 and C2 are equal to 2 and the number of particles is 10. The termination condition occurs when the 5 significant digits after the decimal point of the optimal solution have not changed for last 50 iterations, the algorithm will then consider this as an optimal solution. In Fig. 3. Single-line diagram of IEEE 30-bus test system [8] addition, the maximum number of iterations after which the algorithm also terminates is 500. C. The Objective Function The objective function is to minimize the operating cost of the system as in equation (49) which is used in PSO algorithm and its constraints are represented by (50). The penalty functions are quadratic penalty functions as those in equation (15) and its constraints as (16). D. Study of Base Case The running power flow of the initial operating point, which is the base case of loading and it is given in bus data table in Appendix (A), yielding violations in the lower limit of voltage at load buses 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 29, 30. There is no violation for bus 28 although it is also far from generators, that because this bus is fed by two branches and one of them directly from generator at bus 8. Furthermore, there is a rating violation of the transmission line which connects the buses 1 and 2. Let’s first apply PSO algorithm with all of control variables (i.e. PGs , VGs , Ts , and Qshs ) for solving the optimal power flow (OPF) of this base case of loading (283.4M W ) . For sure, in this case all the violations can be easily alleviated and the voltage at load buses and the transmission lines rating within their limits as they are shown in Fig. 4. The cost of the real output power of generators is minimized to 798.43 $/hr as it is illustrated in table (II). By adjusting the voltages at both ends of the transmission line within their limits, the rating constraint of the transmission line 1-2 is alleviated as well for this branch. TABLE II G ENERATORS OUTPUTS OF BASE CASE (283.4 M W ) combination is done in PSO for adjusting the violations in operating constraints of the power system by using less number of dimensions. When control variables increase the PG1 (MW) PG2 (MW) PG3 (MW) PG4 (MW) PG5 (MW) PG6 (MW) Losses (MW) Cost ($/hr) 176.94 48.71 21.27 21.09 11.83 12.00 8.4382 798.43 TABLE III R ANKED CONTROL VARIABLES FOR VIOLATED VOLTAGES OF LOAD BUSES AT B ASE C ASE 1.15 Upper limit 1.1 P.U. 1.05 1 Lower limit 0.95 0.9 VL3 VL4 VL6 VL7 VL9 VL10 VL12 VL14 VL15 VL16 VL17 VL18 VL19 VL20 VL21 VL22 VL23 VL24 VL25 VL26 VL27 VL28 VL29 VL30 Load Bus Voltages Fig. 4.  Voltage levels at load buses for base case of IEEE 30-bus system VL19 V8 V2 V1 V5 V11 T9 T27 V13 T12 Qsh23 Qsh29 T10 Qsh24 Qsh12 Qsh15 Qsh20 Qsh17 Qsh21 Qsh10 VL20 T27 V5 V8 V2 V1 V11 T9 V13 T12 T10 Qsh29 Qsh24 Qsh23 Qsh17 Qsh21 Qsh10 Qsh12 Qsh20 Qsh15 VL21 V2 V8 V1 V5 T27 V11 T9 V13 T12 Qsh29 Qsh23 T10 Qsh15 Qsh12 Qsh20 Qsh17 Qsh24 Qsh10 Qsh21 VL22 T27 V1 V2 V5 V8 V13 T12 V11 T9 Qsh29 Qsh23 T10 Qsh15 Qsh12 Qsh24 Qsh21 Qsh20 Qsh17 Qsh10 VL23 V1 V2 V8 V5 T27 Qsh29 V11 T9 V13 T12 T10 Qsh20 Qsh21 Qsh17 Qsh12 Qsh10 Qsh24 Qsh15 Qsh23 VL24 V8 V5 V2 V1 V11 T9 T27 T10 V13 T12 Qsh15 Qsh17 Qsh20 Qsh29 Qsh12 Qsh23 Qsh10 Qsh21 Qsh24 VL25 V1 V5 V2 V13 T12 V8 V11 T9 T10 Qsh20 Qsh15 T27 Qsh12 Qsh17 Qsh23 Qsh29 Qsh24 Qsh21 Qsh10 VL26 V8 V2 V5 V1 V13 T12 T10 V11 T9 Qsh15 Qsh23 T27 Qsh12 Qsh17 Qsh20 Qsh24 Qsh21 Qsh29 Qsh10 VL27 T27 V13 T12 Qsh23 Qsh29 Qsh24 V1 V2 V8 V5 T10 Qsh15 V11 T9 Qsh12 Qsh20 Qsh17 Qsh21 Qsh10 VL29 V8 V1 V2 V5 V13 T12 Qsh23 V11 T9 T10 Qsh15 T27 Qsh24 Qsh12 Qsh17 Qsh20 Qsh29 Qsh21 Qsh10 VL30 V8 V1 V2 V5 V13 T12 V11 T9 T10 Qsh15 T27 Qsh29 Qsh12 Qsh23 Qsh24 Qsh20 Qsh17 Qsh21 Qsh10  E. Implementation of Sensitivity Analysis With PSO Firstly, the sensitivity analysis of optimal power flow is conducted for the base case to find the sensitivity matrices of the voltage and the current and to select the most effective control variables to adjust the violations in the OPF at the base case within a less-dimensions space of PSO algorithm. The mathematical approaches of calculating the sensitivity matrices of voltage Su and current R are discussed in (III-B and III-C), the resulting rank of state and control variables, in addition to the visualized sparsity pattern of elements in matrices Su and R are shown in Fig. 5a and Fig. 5b respectively. The sensitivity analysis of voltages  Ěϭϰ Ěϭϱ Ěϭϲ Ěϭϳ Ěϭϴ Ěϭϵ ĚϮϬ ĚϮϭ ĚϮϮ ĚϮϯ ĚϮϰ ĚϮϱ ĚϮϲ ĚϮϳ ĚϮϴ ĚϮϵ ĚϯϬ sϯ sϰ     The sensitivity analysis of Currents Su=-Jx-1Ju ∆x   WŐϭ YŐϭ YŐϮ YŐϱ YŐϴ YŐϭϭ YŐϭϯ ĚϮ Ěϯ Ěϰ Ěϱ Ěϲ Ěϳ Ěϴ Ěϵ ĚϭϬ Ěϭϭ ĚϭϮ Ěϭϯ   sϲ sϳ sϭϰ sϭϱ sϭϲ sϭϳ sϭϴ sϭϵ sϮϬ sϮϭ sϮϮ sϮϯ sϮϰ sϮϱ sϮϲ sϮϴ sϮϵ sϯϬ ∆u WŐϮ WŐϱ WŐϴ WŐϭϭ WŐϭϯ sŐϭ sŐϮ sŐϱ sŐϴ sŐϭϭ sŐϭϯ dϵ dϭϬ dϭϮ dϮϳ YƐŚϭϬ YƐŚϭϮ YƐŚϭϱ YƐŚϭϳ YƐŚϮϬ YƐŚϮϭ YƐŚϮϯ YƐŚϮϰ YƐŚϮϵ 0 10 20 30 40 50 0 5 10 15 nz = 1344 20 25 R=-Jx-1Ju ∆x  I16_17 I15_18 I18_19 I19_20 I10_20 I10_17 I10_21 I10_22 I21_22 I15_23 I22_24 I23_24 I24_25 I25_26 I25_27 I28_27 I27_29 I27_30 I29_30 I8_28 I6_28 I1_2 I1_3 I2_4 I3_4 I2_5 I2_6 I4_6 I5_7 I6_7 I6_8 I6_9 I6_10 I9_11 I9_10 I4_12 I12_13 I12_14 I12_15 I12_16 I14_15 ∆u 0 5 10 15 20 25 30 35 40 0 10 20 30 nz = 164 40 50 60 V1 . . . . . . . V30 d1 . . . . . . . . d30  Where d stands for phase-angle of bus voltage (į).  (a) Voltage sensitivity matrix Su Where I1-2 stands for the power flow in the branch (1-2).  (b) Current sensitivity matrix R Fig. 5. Sensitivity matrices and their state ∆x and control ∆u variables at base case 283.4M W dimensions of the particles in PSO algorithm also increase and that can cause a complexity for manipulating the dimensions of the particles [9]. Thereby, finding and using the most effective control variables to adjust and correct the violations can decrease the dimensions in PSO and enhance its performance. F. PSO Solution for Base Case Using Most Effective Control Variables Now let’s using only the most effective control variables to adjust the violations in initial operating point of IEEE 30-bus system. Several combinations of dominant control variables (as they are ranked in table (III)) can be chosen, some of them are sufficient combination to bring back the violations in the voltage at load buses within their limits for base case of 283.4 M W loading level. The PSO’s results with the combinations of most effective control variables are listed in table (IV). As it is shown in table (IV), except TABLE IV PSO RESULT OF COMBINATIONS OF MOST EFFECTIVE CONTROL VARIABLES AT BASE CASE Table (III) presents the most dominant control variables for every violated bus voltage are ranked from top to down at base case. Notice that the real power of generators Pgs are not listed in Table (III) because they are also used in the OPF solution search by PSO algorithm to find the minimum cost, although Pgs are effectively contributing in adjusting the violations since the constraints are augmented with the main objective function of OPF as in (49). This order of control variables are achieved by sensitivity analysis between the voltage sensitivity matrix Su and its corresponding column vectors of state and control variables. Once the control variables that have most effect on state variables are determined and ranked from the most powerful to the less. Next to that, the selection of these control variable Case 283.4MW 283.4MW 283.4MW 283.4MW 283.4MW 283.4MW 283.4MW Violation VL18…30, Sline1 VL18…30, Sline1 VL18…30, Sline1 VL18…30, Sline1 VL18…30, Sline1 VL18…30, Sline1 VL18…30, Sline1 * Control variables (**Pgs ), (Vg1, Vg5, Vg8) (Pgs ), (Vg1, Vg2, Vg8) (Pgs ), (Vg1, Vg2, Vg5, Vg8, Vg13) (Pgs ), (Vg1, Vg2, Vg8), (T27) (Pgs ), (Vg1, Vg2, Vg5, Vg8) (Pgs ), (Vgs) All (i.e. Pgs, Vgs, Ts, Qshs) Still exist violations VL26, VL30, Sline10 VL30, Sline10 VL30 ----------------- Cost 818.92 805.51 800.17 802.41 800.22 799.86 798.43 * VL18…30 stands for violations at buses 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 29, 30. ** Pgs stands for all real power of generators except the first generator at slack bus. the case of using all control variables, it’s obvious that the control variables combination of Pgs and Vgs is the most effective with minimized cost 799.86 $/hr. While for other less number of control variables, the combination of most effective control variables of Pgs , Vg1 , Vg2 , Vg5 and Vg8 and the other of Pgs , Vg1 , Vg2 , Vg8 and T27 succeed to adjust all violations, but the former combination produces lower cost 800.22 $/hr. G. PSO Solution for Different Loading Levels For IEEE 30-bus test system with other cases of loading, higher and lower than the base case, PSO is used with only the most effective control variables to adjust the violations, if they exist. The results are shown in table (V). ϮϱDt dŚĞŐĞŶĞƌĂƚŽƌŽƵƚƉƵƚƐƐĞƚĂƚƚŚĞŝƌůŽǁĞƌůŝŵŝƚƐсϭϭϳDt TABLE V PSO RESULT FOR SEVERAL LOADING CASES OF IEEE 30- BUS TEST SYSTEM Total loading Violation Control variables Cost 125MW ---- (*Pgs ) 309.060 150MW VL30 (Pgs ), Vg1, Vg2, Vg8 374.577 200MW VL26, VL29, VL30 (Pgs ), Vg1, Vg2, Vg5, Vg8 517.827 250MW ---- (Pgs ) 681.602 275MW Sline1 (Pgs ), Vg1, Vg2 769.947 300MW Sline1 (Pgs ), Vg1, Vg2 861.65 325MW VL26, VL30, Sline1 (Pgs ), Vg1, Vg2, Vg5, Vg8, Vg13 956.922 VL26, VL29, VL30, Sline1 (Pgs ), Vg1, Vg2, Vg5, Vg8, Vg11, Vg13, T9, T10, T12, Qsh15 1058.605 350MW effort is needed for PSO algorithm and enhancing its performance, especially for large systems including many stochastic generation resources. The following could be included for further work: PSO algorithm needs some work on selecting proper parameters and it also needs more accurate mathematical description for its convergence. PSO can be applied in wind power bid marketing between electric power operators. In addition to operating cost, the environment effects and security or risk of wind power penetration can be included by using multi-objective models. Using singular value decomposition and pseudo-inverse techniques could be considered for further study to find the effective control variables. A PPENDIX A. The Data for IEEE 30-Bus Test System The data for IEEE 30-bus test system as following [23]: * Pgs stands for Pg2, Pg5, Pg8, Pg11, and Pg13.  Note: Every OPF solution of the previous loading case is considered an initial operating point for the following Ϯϴϯ͘ϰDt asŽƐƚсϴϬϬ loading case. for example, if the OPF of the loading case 125 M W has been solved then the OPF of the successive loading EŽŐƵĂƌĂŶƚĞĞŽĨǁŚŝĐŚƐĞůĞĐƚŝŽŶƚŚĂƚǁŽƵůĚǁŽƌŬĂƐŝŶĐĂƐĞϯϬϬDtƚŚĞĨŽůůŽǁŝŶŐĐŽŵďŝŶĂƚŝŽŶŚĂǀĞ ďĞĞŶƐĞůĞĐƚĞĚ; Vg1, W Vg2, Vg5, Vg8Ϳ΀ďƵƚƚŚĞǀŝŽůĂƚŝŽŶƐǁĞƌĞŶŽƚĐŽƌƌĞĐƚĞĚ΁; Vg2, Vg5, Vg8, Vg13) Žƌ case 150 M considers the solution of theVg1, previous loading Vg1, Vg2, Vg5, Vg8,Vg13, T12ͿŽƌ;Vg1, Vg2, Vg5, Vg8, Vg11, Vg13, T12) case 125 M W as its initial point and so on. VzŽƵŬŶŽǁǁŚŝĐŚĞůĞŵĞŶƚŚĂƐƚŚĞŵŽƐƚĞĨĨĞĐƚďƵƚƵĐĂŶŶŽƚŬŶŽǁǁŚŝĐŚĐŽŵďŝŶĂƚŝŽŶƚŚĂƚǁŝůůǁŽƌŬ͊ L26 , VL29 , and VL30 are the weakest buses in the system that are susceptible to violations more than other buses. While the transmission line that connect bus 1 and bus 2 is the weakest transmission line and it suffers from violation of its rating for several loading cases. In the last case 350 M W a variety of control variables are needed to keep the system in secure operation, but they are still less than using all control variables. Bus No. Bus Code* 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 1 2 0 0 2 0 0 2 0 0 2 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 DATA OF TABLE VI IEEE 30- BUS TEST SYSTEM Voltage Angle PL QL PG# Q G# Q G_low Q G_high Q sh (pu) (pu) (MW) (MVAR) (MW) (MVAR) (MVAR) (MVAR) (MVAR) 1.05 1.04 1 1 1.01 1 1 1.01 1 1 1.05 1 1.05 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 21.7 2.4 7.6 94.2 0 22.8 30 0 5.8 0 11.2 0 6.2 8.2 3.5 9 3.2 9.5 2.2 17.5 0 3.2 8.7 0 3.5 0 0 2.4 10.6 0 12.7 1.2 1.6 19 0 10.9 30 0 2 0 7.5 0 1.6 2.5 1.8 5.8 0.9 3.4 0.7 11.2 0 1.6 6.7 0 2.3 0 0 0.9 1.9 0 80 0 0 50 0 0 20 0 0 20 0 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -20 -20 0 0 -15 0 0 -15 0 0 -10 0 -15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 250 100 0 0 80 0 0 60 0 0 50 0 60 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 * Bus code: 1 for slack bus; 2 for PV bus; 0 for Load bus. #These generators' Data are an initial guess. 376.2 376 961 375.8 960 375.6 959 375.4 Cost Cost B US 375.2 TABLE VII G ENERATORS DATA OF IEEE 30- BUS TEST SYSTEM 958 957 375 956 374.8 955 374.6 374.4 Gen. No. 954 0 100 200 300 400 500 20 40 Iterations 80 100 120 140 160 Iterations (a) 150 M W Fig. 6. 60 (b) 325 M W Cost vs. iterations of two loading cases 1 2 5 8 11 13 a b ($/MW^2.Hr) ($/MW.Hr) 0.00375 0.0175 0.0625 0.00834 0.025 0.025 2 1.75 1 3.25 3 3 c 0 0 0 0 0 0 PG_low PG_high (MW) (MW) 50 20 15 10 10 12 200 80 50 35 30 40 VI. C ONCLUSION The implementation of PSO algorithm to solve the OPF problem is useful and worth of investigation. Moreover, PSO algorithm is easy to apply and simple since it has fewer number of parameters to deal with, comparing to other modern optimization algorithms. In addition, PSO algorithm is appropriate for solving the optimal power flow for systems that include variable generation resources. Using most effective control variables by applying sensitivity analysis reducing the space dimensions of PSO and hence improving the computing R EFERENCES [1] A. J. Wood and B. F. Wollenberg, Power Generation, Operation and Control. New York: Wiley, 2nd ed., 1996. [2] X.-F. Wang, Y.-H. Song, and M. Irving, Modern Power Systems Analysis. Springer, 2008. [3] C.-R. Wang, H.-J. Yuan, Z.-Q. Huang, J.-W. Zhang, and C.-J. Sun, “A modified particle swarm optimization algorithm and its application in optimal power flow problem,” in Proc. Int Machine Learning and Cybernetics Conf, vol. 5, pp. 2885–2889, 2005. TABLE VIII L INE DATA OF IEEE 30- BUS TEST SYSTEM Branch o. From Bus To Bus 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 1 1 2 3 2 2 4 5 6 6 6 6 9 9 4 12 12 12 12 14 16 15 18 19 10 10 10 10 21 15 22 23 24 25 25 28 27 27 29 8 6 2 3 4 4 5 6 6 7 7 8 9 10 11 10 12 13 14 15 16 15 17 18 19 20 20 17 21 22 22 23 24 24 25 26 27 27 29 30 30 28 28 B Transformer Ratings (pu) (pu) (pu) (turnns ratio) (MVA) 0.0192 0.0452 0.057 0.0132 0.0472 0.0581 0.0119 0.046 0.0267 0.012 0 0 0 0 0 0 0.1231 0.0662 0.0945 0.221 0.0824 0.1073 0.0639 0.034 0.0936 0.0324 0.0348 0.0727 0.0116 0.1 0.115 0.132 0.1885 0.2544 0.1093 0 0.2198 0.3202 0.2399 0.0636 0.0169 0.0575 0.1852 0.1737 0.0379 0.1983 0.1763 0.0414 0.116 0.082 0.042 0.208 0.556 0.208 0.11 0.256 0.14 0.2559 0.1304 0.1987 0.1997 0.1923 0.2185 0.1292 0.068 0.209 0.0845 0.0749 0.1499 0.0236 0.202 0.179 0.27 0.3292 0.38 0.2087 0.396 0.4153 0.6027 0.4533 0.2 0.0599 0.0264 0.0204 0.0184 0.0042 0.0209 0.0187 0.0045 0.0102 0.0085 0.0045 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0214 0.0065 1 1 1 1 1 1 1 1 1 1 1.078 1.069 1 1 1.032 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.068 1 1 1 1 1 130 130 65 130 130 65 90 70 130 32 65 32 65 65 65 65 32 32 32 16 16 16 16 32 32 32 32 32 32 16 16 16 16 16 16 65 16 16 16 32 32 R X [4] J. Hetzer, D. C. Yu, and K. Bhattarai, “An economic dispatch model incorporating wind power,” vol. 23, no. 2, pp. 603–611, 2008. [5] J. G. Vlachogiannis and K. Y. Lee, “Economic load dispatch—a comparative study on heuristic optimization techniques with an improved coordinated aggregation-based pso,” vol. 24, no. 2, pp. 991–1001, 2009. [6] M. R. AlRashidi, M. F. AlHajri, and M. E. El-Hawary, “Enhanced particle swarm optimization approach for solving the non-convex optimal power flow,” World Academy of Science, Engineering and Technology, vol. 62, pp. 651–655, 2010. [7] J. Kennedy and R. Eberhart, “Particle swarm optimization,” in Proc. Conf. IEEE Int Neural Networks, vol. 4, pp. 1942–1948, 1995. [8] M. A. Abido, “Optimal power flow using particle swarm optimization,” International Journal of Electrical Power Energy Systems, vol. 24, no. 7, pp. 563–571, 2002. [9] P. N. Biskas, N. P. Ziogos, A. Tellidou, C. E. Zoumas, A. G. Bakirtzis, V. Petridis, and A. Tsakoumis, “Comparison of two metaheuristics with mathematical programming methods for the solution of opf,” in Proc. 13th Int Intelligent Systems Application to Power Systems Conf, 2005. [10] Z.-L. Gaing, “Particle swarm optimization to solving the economic dispatch considering the generator constraints,” vol. 18, no. 3, pp. 1187– 1195, 2003. [11] J. Peschon, D. S. Piercy, W. F. Tinney, and O. J. Tveit, “Sensitivity in power systems,” no. 8, pp. 1687–1696, 1968. [12] P. R. Gribik, D. Shirmohammadi, S. Hao, and C. L. Thomas, “Optimal power flow sensitivity analysis,” vol. 5, no. 3, pp. 969–976, 1990. [13] N. D. Ghawghawe and K. L. Thakre, “Application of power flow sensitivity analysis and ptdf for determination of atc,” in Proc. Int. Conf. Power Electronics, Drives and Energy Systems PEDES ’06, pp. 1–7, 2006. [14] Y. Tamura, H. Mori, and S. Iwamoto, “Relationship between voltage instability and multiple load flow solutions in electric power systems,” Power Apparatus and Systems, IEEE Transactions on, no. 5, pp. 1115– 1125, 1983. [15] C. L. DeMarco and T. J. Overbye, “An energy based security measure for assessing vulnerability to voltage collapse,” Power Systems, IEEE Transactions on, vol. 5, no. 2, pp. 419–427, 1990. [16] P. Löf, T. Smed, G. Andersson, and D. Hill, “Fast calculation of a voltage stability index,” Power Systems, IEEE Transactions on, vol. 7, no. 1, pp. 54–64, 1992. [17] B. Gao, G. Morison, and P. Kundur, “Voltage stability evaluation using modal analysis,” Power Systems, IEEE Transactions on, vol. 7, no. 4, pp. 1529–1542, 1992. [18] X. Wei, Y. Liu, and D. Zhao, “Review of dynamic dispatch research considering intermittent power generation,” in Proc. Asia-Pacific Power and Energy Engineering Conf. (APPEEC), pp. 1–5, 2011. [19] A. I. Selvakumar and K. Thanushkodi, “A new particle swarm optimization solution to nonconvex economic dispatch problems,” vol. 22, no. 1, pp. 42–51, 2007. [20] M. A. Abuella, “Study of particle swarm for optimal power flow in ieee benchmark systems including wind power generators,” 2012. [21] W.-N. Lee, Y.-W. Jeong, J.-B. Park, J.-R. Shin, and K. Y. Lee, “Development of an educational simulator for particle swarm optimization and economic dispatch applications,” in Proc. Int. Conf. Intelligent Systems Applications to Power Systems ISAP 2007Lee2007, pp. 1–6, 2007. [22] B. Birge, “Psot - a particle swarm optimization toolbox for use with matlab,” in Swarm Intelligence Symposium, 2003. SIS ’03. Proceedings of the 2003 IEEE, pp. 182 – 186, april 2003. [23] O. Alsac and B. Stott, “Optimal load flow with steady-state security,” Power Apparatus and Systems, IEEE Transactions on, vol. PAS-93, pp. 745 –751, may 1974. BIOGRAPHIES Mohamed A. Abuella (IEEE student member). He is a PhD student at University of North Carolina at Charlotte. He received his Bachelor’s degree from College of industrial Technology, Misurata, Libya in 2008, and MSc degree from Southern Illinois University Carbondale in 2012. His research interests are in planning and operations of power systems. C.J. Hatziadoniu (IEEE M’87, SM’06). He is a professor of electrical and computer engineering at Southern Illinois University Carbondale. His research interests include power systems control and protection and application of power electronics to power systems.
3cs.SY
Register Allocation By Model Transformer Semantics by Yin Wang, R. Kent Dybvig Indiana University Abstract Register allocation has long been formulated as a graph coloring problem, coloring the conflict graph with physical registers. Such a formulation does not fully capture the goal of the allocation, which is to minimize the traffic between registers and memory. Linear scan has been proposed as an alternative to graph coloring, but in essence, it can be viewed as a greedy algorithm for graph coloring: coloring the vertices not in the order of their degrees, but in the order of their occurence in the program. Thus it suffers from almost the same constraints as graph coloring. In this article, I propose a new method of register allocation based on the ideas of model transformer semantics (MTS) and static cache replacement (SCR). Model transformer semantics captures the semantics of registers and the stack. Static cache replacement relaxes the assumptions made by graph coloring and linear scan, aiming directly at reducing register-memory traffic. The method explores a much larger solution space than that of graph coloring and linear scan, thus providing more opportunities of optimization. It seamlessly performs live range splitting, an optimization found in extensions to graph coloring and linear scan. Also, it simplifies the compiler, and its semantics-based approach provides possibilities of simplifying the formal verification of compilers. 1 Introduction Register allocation is a central problem of compiler construction and a profittable optimization in a compiler. The quality of the code generated by register allocation has a huge impact on the runtime performance. Thus a major part of compiler research has been devoted to this problem. Since Chaitin’s seminal paper [2], register allocation has been identified with graph coloring [3], a famous NP-Complete problem. Since then, researches have been mainly to improve and extend graph coloring algorithms, without questioning the assumptions it makes. This trend has only recently been challenged by linear scan [5], which is supposedly more efficient than graph coloring in compilation speed, and thus attracted much attention because of the rise of JIT (just-in-time) compilers. However, the original linear scan algorithm [5] generates slower code than graph coloring. Only with extensions such as live range splitting [7] can linear scan outperform the vanilla graph coloring algorithm. Linear scan is not very different from graph coloring. In fact, it can be viewed as a particular graph coloring algorithm. Instead of looking at the vertices in the order of their degrees as in Chaitin’s heauristics, linear scan looks at the vertices in the order of their occurrences in the input program. This explains why linear scan (without extensions) does not outperform graph coloring. In this article, I propose a method for register allocation that sets itself apart from graph coloring and linear scan. The goal is to provide another practical method and at the same time relate the major register allocation methods together in a principled 1 2 Section 2 way—explaining and predicting their advantages and drawbacks not by benchmarks, but by reasoning. The method is based on the so-called model transformer semantics (MTS) and static cache replacement (SCR). The two aspects of the method are indispensible with respect to each other and work in a seamless fashion. For convenience, in the rest of this article, we will call these two aspects of the method collectively “the MTS method” or just “MTS”. In short, a model is an abstract representation of the physical machine. For example, a model may specify that at a certain program point the variable x must be located in register r2. A model transformer is a rule that specifies how the models relate to each other. For example, a model transformer may specify that after the instruction x 6 y + 1, the variable y, wherever it had been located, will be loaded into some register that is not occupied by any other variable. A model transformer semantics is thus a set of model transformers dispatched by the syntax of the intermediate language. In essence, it is an abstract interpreter of the intermediate language. It is also a special kind of logic (similar to Hoare Logic and linear logic), but instead of having a syntax and inference rules, it encodes the logic formulas directly into data structures (models) which entail the static properties of the machine. As long as the models faithfully reflect the machine configurations at every program point in an actual run, the model transformer semantics is said to be “sound”. This has essentially the same meaning as the soundness of a logic. A crucial feature of the MTS method is that it has access to a larger solution space—it can generate correct code which graph coloring and linear scan will never consider, thus opens the door to further optimizations. This improvement is mainly due to the use of static cache replacement. In fact, graph coloring and linear scan are making overly restrictive assumptions about the generated code, thus limiting their solution space. One example is that they assume that once a variable is allocated to a register, it stays in that register for its whole life. But actually a variable may stay in a register for a while, then be saved to the stack, and later be loaded back into a (possibly different) register. Thus the assumptions made by graph coloring and linear scan unnecessarily limit the possible forms of generated code. Also, they prevent an important optimization, live range splitting, from being naturally included into the register allocator. As we shall see in this article, MTS is based on fewer assumptions, and can thus generate more flexible code. Moreover, it includes live range splitting in the same pass as register allocation in a seamless fashion. This not only makes the compiler simple, but also makes live range splitting “online”. In contrast, most of the live range splitting extensions to graph coloring and linear scan are “offline”—done in a separate pass. 2 The Big Picture The high-level theme of the MTS method is to treat the register file as a “cache” for the stack. The traffic between registers and memory is thus analogous to cache replacement. Both the registers and stack locations may contain variables, but access to the registers is more efficient and is often required by the instruction set architecture. So the goal is to keep variables in registers as long as possible, place them in the stack when necessary, and try to minimize register-memory traffic. 3 The Big Picture Meanwhile, the static information contained in the models is used to generate instructions to move variables into and out of registers. Bacause these instructions are computed at compile time, this is called static cache replacement , as opposed to dynamic cache replacement that is used by the processor’s memory cache. 2.1 The Input Language The input language (named UIL) is very simple but expressive enough for most imperative programming constructs. Program → letrec (Definition ∗ ) Statement ∗ Definition → f : λxyz. Statement ∗ Statement → s1; Statement ∗ | x← y | x← y +z | x ← [y + z] | [x + y] ← z | if t then Statement ∗ else Statement ∗ | f (x, y, z) | v A program consists of a list of definitions and a list of statements. Definitions are procedures which may take zero or more arguments and return a value. A statement may be an assignment, an arithmetic operation, a memory read, a memory write, a branching statement, or a procedure call. Note that this language is basically the first-order language one would get from a functional language after a closure conversion and a CPS (or A-normal form) transformation, where no nested expressions and definitions are involved. 2.2 Two Pass Register Allocation The register allocator contains only two passes, a backward liveness analysis which uncovers live range endings, and a forward abstract interpretation pass which performs model transformations and static cache replacement at the same time, and rewrites the code into its final register form. Unlike liveness analysis for graph coloring or linear scan, we do not need to build an inference graph, thus the liveness analysis pass only has to mark the endings of the live ranges. An example output from the liveness analysis looks like: x y z ← 0, {} ← x + 1, {} ← y + 2, {y } fxz, {f , x, z } 4 Section 3 For each statement, the variables whose live range ends are included in the ending set. For example, the ending set of z ← y + 2 is {y }, because y will no longer be used after this statement. The ending set ressembles the ending scoping delimiter such as “(let ...)” in a functional language. It enables the abstract interpreter to remove the variable bindings from the environment. 2.3 Names The whole allocation process can be thought of as a game of allocating registers to names in the intermediate language program. This is because names and registers are essentially the same: they bind to values and carry them at runtime. But because we have limited number of registers, we must reuse them if we are going to “simulate” the names with registers. MTS does not require the input to be in the SSA form, because the allocation pass will implicitly perform single assignment renaming: when a variable is assigned, its old binding in the allocation will be removed, and new binding created. The following statements will then be rewritten using the new binding, effectively does a renaming. Also unlike the SSA form, the same name can be assigned in both branches of a branching statement, for example, if x > 0 then y ← 1 z←2 else z←1 y←2 If the two branches result in different allocations, a sequence of shuffling instructions must be inserted under one of the branches in order to bring the two different allocations together. Although the shuffling code can be short, we may want to eliminate it by passing a map of “preferred allocations” for variables already allocated from one branch, so that we can try allocating them to the same registers in another branch. 3 Model The general defintion of a model is an abstract representation of the real world. Usually, a model only represents a few aspects of the real world, but faithfully. As an alternative point of view, a type in a modern type system can be thought of as a model—a model which reflects the possible domain of values of an expression. In the context of this article, a model is an abstraction of the physical processor, a data structure whose contents reflects the actual machine configuration when the code executes on a physical processor. An example of such a model looks like {x: r1, y : r2}{z : fv0}. 5 Model This is essentially an environment in an abstract interpreter where each variable has a binding to a location. This particular model says that variable x is located in register r1, variable y is located in register r2, and variable z is located in stack location fv0. (We use the convention fvi to denote the stack location which is at offset i from the stack pointer.) This is basically a map between variables and locations, but notice that this map is split into two parts that models the register file and the stack separately. This splitting is important because a variable may be located both in a register and a stack location at the same time. For example, x can live in both register r1 and stack location fv0, as in the following model. {x: r1, y : r2}{x: fv0, z : fv1} The purpose of having the variables multi-homing is that we can optimize away some saves when the variable is already saved in the stack. A model is currently represented in the prototype compiler as an association list, but other pure mapping data structure such balanced trees can also be used for efficiency purposes. Note that a model is a shared structure and should not be destructively modified. 3.1 Initial Model The allocation process is on a procedure-by-procedure basis, so one may wonder how we get an initial model to start the allocation process. The answer is calling conventions. There are many kinds of calling conventions for various languages. Here we discuss just the one implemented in the prototype compiler, which turns out to be quite general. Basically, we can think of each UIL procedure as a procedure that takes one additional argument, the return address. We will see that this high-level view simplifies the problem of setting up calls. The initial model tells us where the arguments (including the return address) are located. It is generated on a procedure-by-procedure basis by a helper function. First of all, we put as many arguments as possible into registers. The rest go into stack locations. There is a special name in the initial model, RET, which denotates the return address. Initially it is bound to the return address register, but may be rebound later. An example initial model looks like {x: r1, y : r2, z : fv0, RET : r0}, where r0 is assumed to be a dedicated return address register. An advantage of treating the return address uniformly with other arguments is that the register used by the return address may be evacuated for other purposes when we run out of registers. An alternative would be to save the return address into the stack, and then restore it to the return address register just before the procedure returns. But we are wasting our time saving and restore the return address if we have enough registers in the procedure. Treating the return address as a normal variable can naturally eliminate this overhead when possible. 6 Section 4 4 Model Transformers Model transformers relate models to each other. They may take arguments in addition to the model itself. The arguments may contain directions as how to transform the model. All model transformers are of similar types: (Model, ExtraArgs, ) → (Model, [Inst], ). That is, a transformer takes as input a model and some extra arguments, and it produces a new model and a list of necessary instructions for transforming the model. The list of instructions may contain arbitrary machine instructions such as SAVE, LOAD or MOVE, which can essentially perform live range splitting at appropriet places, as we shall see later on. 4.1 Primitive Model Transformers There are two kinds of model transformers, primitive transoformers and compound transformers. Primitive transformers are basically helpers for the compound transformers. The compound transformers dispatch on the syntax of the intermediate language. There are only three primitive model transformers: save, load, and shuffle. save : : (Model, [Var]) → (Model, [Inst]) load : : (Model, [Var]) → (Model, [Inst]) shuffle : : (Model, [(Loc, Loc)]) → (Model, [Inst]) The similarity in these three operations is that they all do something “in parallel” on multiple elements (variables or locations), so care must be taken when there are data dependencies between the source and the destination. The functionalities of the first two primitives are almost obvious, but they also contain optimizations for reducing memory traffic. • save. Save a list of variables into stack. Try to find each variable in the stack first. If the variable is already in the stack, skip the saving (emitting no instructions) and return the model intact. Otherwise, find an unoccupied stack location and bind the variable to that location. Leave the orginal binding of the variable with the register alone. After saving, the variable lives in both the register and the stack. • load. Load a list of variables into registers. If a variable is in a register, do nothing but passing on the model. Otherwise the variable is in stack. Emit instructions to load the variable into an unoccupied register, return the updated model which binds the variable to both a register and a stack location. If we run out of registers, some variable must be chosen as an victim to be evicted from registers. We save the victim to a stack location and load the new variable into the victim’s home. Note that care must be taken when loading multiple variables in order to prevent the variables in the list to evict each other. The way we choose victims is a crucial decision which has impact on the register-memory traffic. This is similar to the different cache replacing policies in the processor’s memory cache. We delay the discussion of this topic to a later section. 7 Model Transformers • shuffle. Take a mapping of locations, for example {r0 → r1, r1 → r2, r2 → r0, r3 → r4, r4 → r5}, and generate a list of instructions that accomplishes the moves simultaneously. There may be data dependencies between the locations that need shuffling, the example above shows such a situation where the locations form a loop (r0 → r1 → r2 → r0). First of all, the moves are broken down into either paths or loops, then code for appropriete categories are generated. For example, the above mapping contains a loop (r0 → r1 → r2 → r0) and a path (r3 → r4 → r5). The number of instructions generated for a loop shuffle is n + l, where n is the number of variables involved, and l is the number of loops. This additional l is because we need a temporary location and an extra instruction to store the entry point value of each loop. 4.2 Compound Model Transformers The compound model transformers dispatch on the syntax of the intermediate language. They are basically the branches of an abstract interpreter which analyzes and transforms the input code. Each branch of it is of the type (Exp, Model, Ctx) → ([Inst], Value, Model). The input type signifies that the transformer dispatches on Exp, the type of the syntax tree node of the intermediate language. It takes a model and a context (Ctx), and returns a list of instructions, a value, and a new model. This is basically an effect-value system, where the instruction list ([Inst]) contains the effects and the value contains a pure value. The effect can be combined with a sequence of other effects, but only the value can be plugged into a context where a value is expected (for example, an operand of a binary operation). The Ctx parameter is a “context type” specifying the outer context (e.g., tail context). The model transformers can then look at the context type and decide whether to generate code for a tail call or a non-tail call. Because the complexity of the compound transformers, they will not be displayed here. The interested reader is referred to the actual code for more information. Here we just briefly discuss the cases one by one. • x ← y {end*}. The assignment. First, recursively allocate registers for y and get a new model model1. Notice that y here can match either a variable, a value or a binary operation such as a + b. After that, delete end* from model1, use this model to allocate a register to x, and get model2. The generated instructions are thus concatenated and returned, together with the rewritten assignment and model2. • If t then c else a. Allocate registers for t, get model1. Then use model1 to allocate for c and a, get model2 and model3, respectively. Then generate the “shuffle instructions” that unites model2 into model3, resulting in model4. Finally, combine the code from the recursive call, insert shuffle instructions into the “then” branch. Output the rewritten if-statement and model4. • fxyz ◦ , {end*}. The case for a call is more involved. First, a list of call-live variables are found by deleting end* from the input model. If we are in tail context, there will be no call-lives. 8 Section 5 ◦ Then we generate a new map, map1 by binding the call-lives to their destinations. In short, map1 specifies the moves we need to make in order to set up the call. ◦ A frame pointer (stack pointer) adjustment is computed from the number of call-live variables. ◦ The list of parameters are bound according to the calling convention in map1. ◦ If we are in tail context, the special variable RET is bound to the return address register in map1. Otherwise we generate a new label lab1, and have it bound to the return address register in map1. ◦ Shuffling code is generated from map1. ◦ The call is rewritten as a list of shuffling code, an adjustment to the frame pointer, a jump, and a reverse adjustment to the frame pointer. • s1, s2, . The sequence. First, the head of the sequence is recursively allocated by passing nontail as the Ctx parameter, getting model1. Then using model1, the rest of the sequence is recursively allocated by passing the input Ctx parameter as the context. • [x + y] ← z. The memory mutation operation. First we use the primitive model transformer load to allocate for x, y and z, getting model1. Then we rewrite the statement using model1. • x + y. Binary operations are similar to memory mutation, thus omitted here. 5 Online Live Range Splitting Live range splitting can be found in several extensions to graph coloring and linear scan. Most of them require a separate pass to split the live ranges, and use the split live ranges to compute the register allocations. MTS does live range splitting in a seamless and implicit manner. You don’t see explicit code for it, but it is implicit in the generated instructions. A simple example should clarify this point. x ← 1, {} y ← 2, {} z ← y + 1, {} w ← x + y, {x} Figure 1. Example program with two registers. In this example, we have only two registers r1 and r2. After x and y taking r1 and r2, we run out of registers when we try to find a register for z. A graph coloring algorithm would report a failure here unless a live range splitting pass first segments the live ranges of the variables. It is easy to see that the interference graph would contain a strongly connected component here, making the graph uncolorable. 9 Cache Replacement Policies It is interesting to see how MTS splits the live ranges in this situation. It just swaps x out into a stack location, say fv2, then takes its register as the home for z. The generated code would look like r1 r2 fv2 r1 ← ← ← ← 1 2 r1 ; store r2 + 1 r1 ← fv2 ; load r1 ← r1 + r2 Figure 2. Generated code containing splitted ranges. The instruction fv2 ← r1 is generated in such a manner that as if x goes out of range at that point. After that, r1 starts to represent z, and reverts back to x after we load fv2 into r1 again. Notice that we load x back into r1 just by coincidence here. It may be loaded into any other unoccupied register. If we were to do live range splitting first, we would have to split the live range of x into three segments, at points delimited by the store and load instructions. After that, the second segment would be “spilled” by graph coloring or linear scan, i.e., the variable x would be in the stack within this range. 6 Cache Replacement Policies At program points where we run out of registers, we must choose a “victim” to be placed into the stack. The question is which variable to pick. This is an important question, because it affects the number of register-memory moves. For example, a particularly bad strategy is “last in, first out” (LIFO): swapping out a variable which just recently came into its live range. This strategy is bad because a recent variable is likely be used very soon. Doing so would cause it to be loaded into a register again, possibly causing another variable to be swapped out. An arguably good strategy is to pick a variable that will not be used soon. This can be implemented as follows. When doing the liveness analysis, we record where each variable is referenced. The register allocation pass can then know the NEXT-USE-POS of each variable at each program point. When we need to pick a victim, we just choose the one with highest NEXT-USE-POS. Now we argue that this strategy generates the least register-memory traffic. Suppose we did not pick x, the variable with the highest NEXT-USE-POS. We picked another variable y. Then y will be referenced earlier than x, because its NEXT-USE-POS must be less than x’s. So when y is referenced, it must be loaded into a register. Because we are likely to be under register pressure, we have to swap another variable (possibly x) into stack. The question is, why don’t we swap x into stack in the first place? By doing so, we delay the need for a load at our best. 10 Section 8 7 Related Work Related work has been mostly graph coloring and linear scan and their extensions, with a few isolated works. Chaitin [2] proposed formulating register allocation as graph coloring. As we have discussed in the introduction, this formulation puts restrictions on the generated code, thus limiting the possibilities of reducing register-memory traffic. Linear scan [5] has been proposed as an alternative to graph coloring, but in essence, it can also be viewed as a greedy algorithm for graph coloring: coloring the graph vertices in the order of the program. Thus it suffers from almost the same constraints. Agat [1] proposed a type theory for register allocation, but the main focus of this work is on purely functional languages. It uses a similar method as model transformation semantics (because it is a type theory), but it doesn’t aim at reducing registermemory traffic, thus many optimizations are omitted. For example, it doesn’t try to efficiently reuse stack locations at all. Pereira and Palsberg [6] proposed register allocation by puzzle solving. Although their result is comparable with other state-of-the-art algorithms, their method does not do live range splitting, an important way to open up the door to more optimizations. None of these works do live-range splitting by default. They all need extensions that does the splitting in a separate pass. For example, the live range splitting extension to linear scan is discussed in [7]. 8 Implications to Verified Compilers In the context of verified compiler construction, a register allocation pass is usually not deductively verified, as is the case for other parts of the compiler. This is largely due to the complexity involved in the math of the graph coloring algorithm. For exmaple, the certified C compiler CompCert [4] uses a “validation pass” after each compilation in order to check the consistency of the graph coloring. This essentially is a dynamic check in the compiler’s run time (also called “compile time”). The validation must be run after each compilation of the user program, instead of just running once when the compiler is constructed. Actually most parts of a verified compiler can be verified by a logic system, because they are semantics-based. For example, the CPS transformation and the data representation are rather straightforward to verify by “statically analyzing” the compiler. Static analysis is easy when the program fits into an abstract interpretation framework, but rather hard if it is derived from another branch of mathematics, such as graph theory or group theory. The MTS method is largely semantics-based—it operates as an abstract interpreter. Thus it is possible that it will lead to a formally verified register allocation pass, where it is certified once and for all when the compiler is constructed. Bibliography 11 9 Future Directions Currently the register allocation assumes a RISC-like architecture. All operands must be loaded into registers before they are operated on. A possibly fruitful future work is to extend this method to architectures that allow and encourage memory operands and irregular instruction formats. The current MTS does not do backtracking, thus shuffling code length may not be optimal. Limited backtracking may be added to the method, leading to further reduction to register-memory traffic. Also the current implementation compacts the stack before each call. This will induce quite some memory-memory traffic because the call-live variables may not be saved into the same stack locations across calls. An optimization would be to pre-assign stack locations to call-live variables, so that their locations are fixed. Once a variable is saved, it will not be saved again or moved to another stack location. A backward scan is necessary to collect the call-live information. Also the current work lacks experimental results. Comparing by using benchmarks is the next topic on the agenda. 10 Conclusion This article has presented a semantics-based method (MTS) for register allocation. The main ideas are model transformer semantics and static cache replacement. Relationships with graph coloring and linear scan are made clear by careful reasoning about their behavior. MTS has been shown to have the advantages of exploring a larger solution space than naive graph coloring and linear scan, and thus possibly leads to optimizations by the other two methods. Live range splitting, an important optimization which is found as an extension to graph coloring and linear scan, is included into MTS seamlessly, without increasing the complexity of the implementation. The semantics-based approach also opens the door to the simplifications of a verified register allocation pass. Acknowledgements The authors would like to thank Andy Keep and Oleg Kiselyov for their insightful discussions. Bibliography [1] Johan Agat. Types for register allocation. In Lecture Notes in Computer Science, pages 92–111. Springer-Verlag, 1998. [2] Gregory Chaitin. Register allocation and spilling via graph coloring. SIGPLAN Not., 39:66–74, April 2004. [3] Michael R. Garey and David S. Johnson. Computers and Intractability; A Guide to the Theory of NP-Completeness. W. H. Freeman & Co., New York, NY, USA, 1990. 12 Section [4] Xavier Leroy. Formal verification of a realistic compiler. Commun. ACM, 52:107–115, July 2009. [5] Massimiliano Poletto and Vivek Sarkar. Linear scan register allocation. ACM Transactions on Programming Languages and Systems, 21:895–913, 1999. [6] Fernando Magno Quintão Pereira and Jens Palsberg. Register allocation by puzzle solving. SIGPLAN Not., 43:216–226, June 2008. [7] Christian Wimmer and Hanspeter Mössenböck. Optimized interval splitting in a linear scan register allocator. In Proceedings of the 1st ACM/USENIX international conference on Virtual execution environments, VEE ’05, pages 132–141, New York, NY, USA, 2005. ACM.
6cs.PL
Statistical Inference for Ergodic Point Processes and Application to Limit Order Book Simon Clinet and Nakahiro Yoshida Graduate School of Mathematical Sciences, University of Tokyo ∗ arXiv:1512.01899v3 [math.ST] 27 Sep 2016 CREST, Japan Science and Technology Agency September 28, 2016 Abstract We construct a general procedure for the Quasi Likelihood Analysis applied to a multivariate point process on the real half line in an ergodic framework. More precisely, we assume that the stochastic intensity of the underlying model belongs to a family of processes indexed by a finite dimensional parameter. When a particular family of laws of large numbers applies to those processes, we establish the consistency, the asymptotic normality and the convergence of moments of both the Quasi Maximum Likelihood estimator and the Quasi Bayesian estimator. In addition, we illustrate our main results by showing how they can be applied to various Limit Order Book models existing in the literature. In particular, we address the fundamental cases of Markovian models and exponential Hawkes process-based models. Keywords : Multivariate point process, ergodicity, Hawkes process, inferential statistics, Quasi Likelihood Analysis, Limit Order Book. 1 Introduction Most financial transactions take place nowadays in electronic markets. In the so-called continuous-time double auctions system, traders can freely send buying or selling orders at any price level. As the matching process of those asynchronous orders is rather complex, every submission is centralized in an Electronic Limit Order Book (also denoted by LOB), waiting to be executed according to its price and time priority. An LOB is thus a multidimensional queuing system, that gathers the total volume of non-executed orders for every price level. Essentially, market agents interact with this dynamical system via three elementary rules. They may submit a buying (resp. selling) limit order that will increase the size of one queue on the bid (resp. ask) side of the LOB. They also may send a buying (resp. selling) market order that will immediately consume the corresponding liquidity at the best available price. Finally they can submit cancellation orders to remove one of their latent limit order in the LOB. Driven by these simple mechanisms, the characteristics of the Order Book, such as its mid price, its shape, or the number of orders submitted in a given time window are subject to random fluctuations as time passes. As the macroscopic price movements of an asset are determined by the evolution of its Order Book through time, understanding the stochastic structure of this object is a fundamental issue. It is also a way to describe ∗ Graduate School of Mathematical Sciences, University of Tokyo: 3-8-1 Komaba, Meguro-ku, Tokyo 153-8914, Japan. e-mail: [email protected], [email protected] 1 in a high-dimensional context the microstructure phenomena related to the stock price movements. Indeed, phenomena such as the Epps effect, traditionally represented by an unknown noise process in many studies that confine themselves to one-dimensional price models, are captured when the whole Limit Order Book is taken into account. While the availability of high-frequency financial data has made in-depth analysis of LOB dynamics accessible, it is now possible to use statistical tools in order to highlight either empirical facts about their shapes and their evolution [26, 9], or to design and select models that are able to reproduce some of those stylized facts. For the latter, modelling the stochastic behavior of Limit Order Books has been the subject of an intense research over the last decade, the simplest approaches being zero-intelligence models, in which interarrival times of orders are exponentially distributed. The seminal work about this basic representation [34] has been followed by many extensions, see e.g. [1, 11, 13, 12, 27]. Despite their mathematical tractability, such models are too simple to be entirely satisfactory, essentially because of the absence of any structure of dependence in the order submission process. Lately more complex dynamics have been proposed, including Markovian models [16], Hawkes process driven bid-ask prices [5, 40], or even Hawkes processes-based LOB models [2, 35, 6], the latter being reputed to efficiently capture the time clustering property of orders, and the cross-dependences in the order flow. The fact that an LOB is mechanically driven by the orders submitted over time has encouraged many authors to see Order Books through the stochastic structure of their interarrival times (∆T0 , ∆T1 , ...) between two successive events. Accordingly, it seems appropriate to describe a Limit Order Book as a high-dimensional point process, that is a process N whose components Ntα − Ntα′ count the number of orders of same type, and ′ at the same price level, that have been successively submitted in a time interval [t, t ]. In a parametric context, estimating the true parameter θ∗ of the model based on the observations is therefore a very general and crucial issue that may take place in (at least) two distinct asymptotics. As, for liquid stocks, a tremendously large number of events happen during short periods of times, the heavy traffic limit (very large number of events on a fixed time window) offers a favorable framework for the construction of consistent estimators. In [30], a sequence of multivariate point processes is thus assumed to be observable on a time interval [T0 , T1 ]. Under suitable assumptions on the sequence of stochastic intensities itself, it is shown that even in this non-ergodic context it is possible to conduct the so-called Quasi Likelihood Analysis procedure (QLA). In particular, both the Quasi Maximum Likelihood estimator (QMLE) and the Quasi Bayesian estimator (QBE) are consistent, asymptotically mixed normal, and their moments converge. In this work, instead, we focus on the long run characteristics of the LOB seen as a point process. While the time parameter T tends to infinity, assuming that the LOB satisfies a suitable ergodicity assumption, we make use of this property to derive the asymptotic properties of the QMLE and the QBE. This problematic is by no means new since the consistency and the asymptotic normality of the Maximum Likelihood estimator (MLE) for ergodic stationary point processes were established a few decades ago in [29] and [33]. [37] has also suggested a different approach based on parameter estimation for the spectral density of the process. In the non-stationary regime, the inhomogeneous Poisson process case has been deeply investigated in [22], and conditions for the convergence of moments of the MLE and the Bayesian estimator (BE) of a general point process have been stated in [21] (see Theorems 4.5.5 and 4.5.6). Furthermore, Maximum Likelihood estimations have been empirically conducted for the abovementioned models, but the fact that such procedure is consistent is sometimes unclear. As a matter of fact, the term ergodicity itself can be subject to various definitions according to the underlying structure of the process (stationarity, Markovian property, ...). However, all those structures share an essential property, namely a family of laws of large numbers (LLN). Indeed, denoting by λ(t, θ) the stochastic intensity of the point process, we have in many cases 1 T Z 0 T f (λ(s, θ))ds →P π(f, θ), (1.1) those convergences being the crucial assumptions to determine the asymptotic properties of both the QMLE and the QBE, regardless of the nature of the operator π. We therefore consider (1.1) as a general definition of ergodicity in the present paper. We sometimes need to consider slightly more general processes than the simple vector λ(t, θ) in (1.1) for technical considerations, although this is not necessary in many cases. Needless to 2 say that this almost model-free representation covers thus a wide range of examples, and our main result is the derivation of the full Quasi Likelihood Analysis for point processes in this unified context. Under suitable assumptions that are given in this paper, both the QMLE and the QBE satisfy the following asymptotic properties : θT →P √ T (θT − θ∗ ) →d √ E[f ( T (θT − θ∗ ))] → θ∗ , Γ − 21 (1.2) ξ, E[f (Γ − 12 (1.3) ξ)], ξ ∼ N , (1.4) where Γ is the Fisher information, N is the standard normal distribution, and f is any continuous function of polynomial growth. Here →P and →d respectively stand for the convergence in probability and the convergence in distribution. Let us give a few comments on the latter result. The convergence (1.4) is essentially a consequence of the local asymptotic normality (LAN) of our statistical model at point θ∗ , along with some deviation inequality on the Quasi Likelihood random field. It is also well-known that if those properties hold true uniformly in θ∗ , then our estimators are asymptotically efficient in the sense of the Hájek-Le Cam bound. In other words, they attain the minimum of an asymptotic minimax bound for the risk associated to any loss function of polynomial growth. We refer the reader to [14] and [18], Sections II.11-12 and III.1-2 for precise statements of these results. Finally, let us mention that the convergence of moments is very often needed in order to identify the bias correction term for the construction of information criteria. A presentation of information criterion-based model selection can be found in the introduction of [38]. From a practical point of view, such general framework provides solid results on two very popular estimators that are commonly used in empirical works. Despite the fact that their properties were partially known in various cases, we believe that this unified view will both consolidate those results by systematically ensuring (1.2)-(1.4) and help the practitioner to easily validate the theoretic properties of her estimators when she is confronted with point process regression. Indeed, the central condition for our result is the LLN (1.1), which can often be naturally derived from the underlying structure of the model she is willing to use. On the other hand, the question of the choice of the model, that also arises in practice is more complex. Consequently, further considerations, such as model selection, mispecification, or inference for more general processes are beyond the scope of this paper but are quickly mentioned in the conclusion. We finally insist on the fact that such general QLA procedure is applicable to any context involving an ergodic point process. Accordingly, the range of applications does not reduce to finance, but extends to diverse fields such as seismology and optics (see the introduction of [22]), or neurobiology (see Examples 2 and 3 in [10]) to name a few. The paper is organized as follows. We introduce a general ergodic multivariate point process model in Section 2. Section 3 is devoted to show, under a classical approach first, the consistency and the asymptotic normality of the QMLE under suitable regularity conditions. These results are then generalized to the convergence of moments of both the QMLE and the QBE under stronger assumptions. We give some applications and examples that are picked from the literature on Limit Order Books and that satisfy those general conditions in Section 4, and we conclude this paper in Section 5. Finally, we gather some annex proofs and lemmas in Section 6. 3 2 Multivariate point process We first introduce the general framework for a parametrized multivariate point process. Let B = (Ω, F , F, P), F = (Ft )t∈R+ be a stochastic basis, and assume that we are given a multidimensional point process Nt = (Ntα )α∈I , I = {1, ..., d} that is adapted to F. For example, each Ntα can be thought as the number of limit (resp. cancellation, market) orders at some given price level pα that have been submitted in the time interval [0, t]. The general definition of a Limit Order Book and the multivariate point process associated to it will be given in Section 4, since no Limit Order Book knowledge is needed to understand this statistical part. The filtration F = (Ft )tR+ is generated by the collection of observable processes involved in the structure of N . In the most basic case F is generated solely by N itself and is thus the so-called canonical filtration of the point process, as is the case for the self-exciting Hawkes process as defined in Section 4.2. On the other hand, Examples 3.3, 3.4 and 3.6 along with the LOB models described in Examples 4.2 and 4.3 include additional observed explanatory processes. For the sake of simplicity N is assumed to be defined on R+ , N = (Nt )t∈R+ , N0 = 0, and its components N α have Rno common jumps. N can also be seen as an integer measure if we write for any Borel subset A, N (A) = A dNs . In particular Nt = N ([0, t]). Understanding the dynamic of a point process on R+ can be done, as usual, by studying its underlying stochastic intensity. We recall that if we write Λt the Ft -compensator of Nt , we call λ the (predictable) Ft -stochastic intensity of N , that is the unique (predictable) process such that Λt = Z t λ(s)ds 0 if such representation exists. Intuitively speaking, λ(t)dt is, conditionally to Ft , the average (multivariate) number of jumps dNt , or in an informal way, E [dNt |Ft ] = λ(t)dt. Since λ determines the law of the process N , the choice of the form of λ is an important question. In a parametric context, it is common to allow the stochastic intensity itself to depend on a parameter θ as follows : for some finite dimensional relatively compact open space Θ ⊂ Rn , n ≥ 1, we consider the family of adapted (and Rt thus observable) processes Λt (θ) = 0 λ(s, θ)ds. We assume that there exists an unknown true value θ∗ ∈ Θ such that λ(t, θ∗ ) is the actual Ft -intensity of Nt . The process Ñt = Nt − Λt (θ∗ ) is thus a local martingale. Let us introduce a few the paper, if x designates a real number, a vecP terms and notations. All nalong ⊗2 stands for the product of x and its transpose : tor or a matrix, |x| = i |x|i . For a vector x ∈ R , x 1 x⊗2 = x.xT ∈ Rn×n . If X is a random variable, kXkp = E [|X|p ] p . If aT and bT are sequences of random aT variables, aT = oP (bT ) stands for bT 1{bT 6=0} →P 0. We also write aT = OP (bT ) to say that abTT 1{bT 6=0} is stochastically bounded. For a process X, FtX = σ{Xs , 0 ≤ s ≤ t} designates the canonical filtration of X. Finally, for a Borel space (E, B(E)), Cb (E, R) is the set of continuous, bounded functions from the space E to R, equipped with their underlying topologies. We will work with the following two fundamental conditions on the family (λ(t, θ))t∈R+ ,θ∈Θ : [A1 ] The mapping λ : Ω × R+ × Θ → R+ is F ⊗ B(R+ ) ⊗ B(Θ)-measurable. Moreover, almost surely, (i) for any θ ∈ Θ, s → λ(s, θ) is left continuous. (ii) for any s ∈ R+ , θ → λ(s, θ) is in C 3 (Θ), and admits a continuous extension to Θ. [A2 ] The intensity processes and their first derivatives satisfy P3 (i) for any p > 1, supt∈R+ i=0 supθ∈Θ ∂θi λ(t, θ) p < +∞. (ii) for any p > 1, for any α ∈ I, supt∈R+ supθ∈Θ λα (t, θ)−1 1{λα (t,θ)6=0} 4 p < +∞. (iii) For any θ ∈ Θ, for any α ∈ I, λα (t, θ) = 0 if and only if λα (t, θ∗ ) = 0. Remark 1. The processes supθ∈Θ ∂θi λ(., θ) are F ⊗ B(R+ )-measurable mappings. Indeed, the continuity in θ of λ ensures that the sup can be taken over a countable dense subset {θi |i ∈ N} ⊂ Θ. Note also that allowing intensities to vanish in [A2] is necessary in an LOB framework since in practice cancellation orders can occur at some level α ∈ I only if the corresponding limit is not empty. We introduce the Quasi-Log Likelihood process as lT (θ) = XZ α∈I T 0 log(λα (s, θ))dNsα − XZ α∈I T λα (s, θ)ds. Note that although λα (s, θ) may vanish, (2.1) is well defined as the non-negative process verifies E "Z 0 T # 1{λα (s,θ)=0} dNsα = E "Z 0 T (2.1) 0 # 1{λα (s,θ∗ )=0} λα (s, θ∗ )ds = 0. RT 0 1{λα (s,θ)=0} dNsα (2.2) α Writing ∆Nsα for Nsα − Ns− , we notice that P-a.s., thanks to (2.2), for any s ∈ R+ , 1{λα (s,θ)=0} ∆Nsα = 0. The previous equality entails the finiteness of log(λα (s, θ)) whenever a jump occurs, and therefore the integral in dNsα of the Quasi-Log Likelihood process is well-defined. In most situations, this process is indeed the real Log Likelihood process up to a constant term, as is the case when Ft = FtN is the canonical filtration of N (see Theorem 5.45, Chapter III in [19]). Finally we say that a statistic θ̂T is an asymptotic Quasi-Maximum Likelihood estimator if it asymptotically maximizes the rescaled Quasi-Log Likelihood process in the following sense : lT (θ) lT (θ̂T ) ≥ sup − oP T θ∈Θ T  1 √ T  . (2.3) We also call QMLE or exact QMLE the estimator that maximizes the rescaled Quasi-Log Likelihood. In section 3 we give a general ergodicity assumption, and prove the consistency and the asymptotic normality of any asymptotic QMLE. We finally derive the convergence of moments of both the exact QMLE and the QBE under a stronger version of the ergodicity assumption. A summary of the asymptotic properties of the estimators and the related assumptions can be found in Table 1. 3 3.1 Quasi Likelihood Analysis The ergodicity assumption We make an extensive use of the law of large numbers in our proofs. In particular the Fisher information matrix and the asymptotic Quasi-Log Likelihood can be expressed as such time average limits. In the sequel, we refer to the following general definition when we consider ergodic processes : Definition 3.1. Let (E, B(E)) be a Borel space, and X : Ω × R+ → E a stochastic process. We say that X is ergodic if there exists a mapping π : Cb (E, R) → R such that for any ψ ∈ Cb (E, R) 1 T Z 0 T ψ(Xs )ds →P π(ψ). 5 The main assumption that is at the core of our results is the following ergodicity condition on the processes (λα (., θ∗ ), λα (., θ), ∂θ λα (., θ)) taking values in E = R+ × R+ × Rn : [A3 ] For any α ∈ I, θ ∈ Θ, the triplet (λα (., θ∗ ), λα (., θ), ∂θ λα (., θ)) is ergodic in the sense of Definition 3.1. In other words, there exists a mapping πα : Cb (E, R) × Θ → R such that for any (ψ, θ) ∈ Cb (E, R) × Θ, the following convergence holds : 1 T Z 0 T ψ(λα (s, θ∗ ), λα (s, θ), ∂θ λα (s, θ))ds →P πα (ψ, θ). Every component of the process (λ(., θ∗ ), λ(., θ), ∂θ λ(., θ)) is therefore assumed to be ergodic. Before we turn to the statement of our main results, let us raise a few examples to illustrate this property in various situations. Example 3.2. Assume that N is a univariate inhomogeneous Poisson process, that is a point process whose intensity is Ra deterministic function. If t → λ(t, θ) is periodic of period τ ∈ R+ − {0}, then [A3] holds with τ π(f, θ) = τ1 0 f (λ(s, θ∗ ), λ(s, θ), ∂θ λ(s, θ))ds. [A3] also holds if for i ∈ {0, 1}, ∂θi λ(t, θ) → ∂θi λ∞ (θ) as t → ∞ with π(f, θ) = f (λ∞ (θ∗ ), λ∞ (θ), ∂θ λ∞ (θ)). Example 3.3. Assume that N counts the jumps of an observable Pure Jump-Type Markovian process Y on a discrete state space (see [20], chapter 12). It is a straightforward consequence of the definition of Y and N that the FtY -stochastic intensity has the representation λ(t, θ) = g(Yt− , θ) for some function g. Let us assume further that Y is ergodic (see [23] for a presentation of ergodicity R for Markovian processes). If Y takes values in Y and has invariant probability π Y , [A3] holds with π(f, θ) = Y f (g(y, θ∗ ), g(y, θ), ∂θ g(y, θ))π Y (dy). Example 3.4. Let us assume that N is a univariate Cox process directed by some observable left-continuous ergodic Markovian process Y (a rigourous definition of a Cox process can be found in [20], chapter 12). Ac(N,Y ) cordingly, assume that the Ft -intensity has the form λ(t, θ) = g(Yt , θ) for some continuous function g. The same conclusion as in Example 3.3 holds. Example 3.5. Consider a univariate stationary point process N , that is a point process such that for any r ∈ N and any bounded Borel subsets A1 , ..., Ar , the distribution of (N (A1 + t), ..., N (Ar + t)) does not depend on t. The FtN -intensity of N is thus automatically a stationary process. Let us assume that N is stationary ergodic, meaning that its invariant σ-field is trivial. It is straightforward to see that [A3] holds with π(f, θ) = E [f (λ(0, θ∗ ), λ(0, θ), ∂θ λ(0, θ))], by virtue of Birkhoff ’s ergodic Theorem. Example 3.6. Take the same representation as in Example 3.4, but instead of the Markovian property, assume that the process (Yt )t has continuous paths and enjoys the regenerative property (see [4] chapter VI). Call τ1 , τ2 , ... the (random) regenerative Rtimes of Y and assume that µ = E[τ1 ] < ∞. Then the ergodicity condition [A3] is τ satisfied with π(f, θ) = µ1 E 0 1 f (g(Ys , θ∗ ), g(Ys , θ), ∂θ g(Ys , θ))ds. We will present examples that are directly related to LOB modelling in Section 4. Before we turn to the classical approach, let us state a few useful results about the mapping π and the class of functions that satisfy [A3]. Such extension is necessary because variables of interest such as the Fisher information are of the form π(f, θ) for unbounded functions f that have singularities when one of their argument vanishes. Using [A2], it is indeed possible to extend the range of functions for which [A3] holds, and show that each πα (ψ, θ) can be seen as the integral of ψ with respect to an actual probability measure παθ on E. Definition 3.7. Recall that E = R+ ×R+ ×Rd . We write C↑ (E, R) the set of functions ψ : (u, v, w) → ψ(u, v, w) from E to R that satisfy : • ψ is continuous on (R+ − {0}) × (R+ − {0}) × Rd . • ψ is of polynomial growth in (u, v, w, 1{u>0} 1{v>0} , v ). u • For any (u, v, w) ∈ E, ψ(0, v, w) = ψ(u, 0, w) = 0. Proposition 3.8. For a measure µ, let L1 (µ) be the space of functions that are integrable with respect to µ. Then for any θ ∈ Θ and for any α ∈ I, the following properties hold. 6 (i) The law of large numbers stated in [A3] still holds for any ψ ∈ C↑ (E, R). In particular, the mapping πα (., θ) can be extended to C↑ (E, R). Moreover, for any ψ ∈ C↑ (E, R) the convergence is uniform in θ. R (ii) There exists a probability measure παθ on (E, B(E)) such that for any ψ ∈ C↑ (E, R), πα (ψ, θ) = E ψ(x)παθ (dx). In particular, C↑ (E, R) ⊂ L1 (παθ ). We are now ready to investigate the asymptotic properties of our estimators. 3.2 A classical approach for the QMLE From now on we adopt a martingale approach to derive the consistency and the asymptotic normality of any asymptotic QMLE θ̂T . The main results are stated in Theorem 3.9 and Theorem 3.11. Consider YT (θ) = 1 (lT (θ) − lT (θ∗ )) T and the asymptotic rescaled Quasi-Log Likelihood n v o XZ Y(θ) = 1{u>0,v>0} log u − (v − u) παθ (du, dv, dw). u (u,v,w)∈E (3.1) α∈I As we shall see in this section, Y(θ) is the limit of YT (θ) uniformly in θ ∈ Θ. The non-degeneracy of Y is as usual a crucial point to derive the consistency of our estimator. One possible formulation is the following : [A4 ] For any θ ∈ Θ − {θ∗ }, Y(θ) 6= 0. Theorem 3.9. Under [A1]-[A4], any asymptotic QMLE θ̂T is consistent. θ̂T →P θ∗ . We first deal with the uniform convergence of YT to Y. Lemma 3.10. Under [A1]-[A3], sup |YT (θ) − Y(θ)| →P 0. θ∈Θ Proof. Define as previously the following local martingale : Z t λα (s, θ∗ )ds. Ñtα = Ntα − 0 We rewrite YT (θ) as YT (θ) = − Z λα (s, θ) 1X T 1 α ∗ dÑsα log α ∗ ) {λ (s,θ )6=0} T λ (s, θ α∈I 0  Z T X 1 λα (s, θ) α ∗ α α ∗ λ (s, θ ) 1{λα (s,θ∗ )6=0} ds, λ (s, θ) − λ (s, θ ) − log α T λ (s, θ∗ ) 0 α∈I and for α ∈ I we put MTα (θ) = and Z 0 T log λα (s, θ) 1{λα (s,θ∗ )6=0} dÑsα λα (s, θ∗ ) 7 VTα (θ) = − 1 T Z T 0  λα (s, θ) − λα (s, θ∗ ) − log  λα (s, θ) α ∗ λ (s, θ ) 1{λα (s,θ∗ )6=0} ds. λα (s, θ∗ ) Let us first show that the martingale term MTα (θ) tends to zero uniformly in θ. Thanks to [A2], MTα (θ) is a well-defined Lp integrable martingale. We apply Sobolev’s inequality (see e.g. [20], Theorem 4.2, Part I, case A, with j = 0, m = 1, and any p > n). We thus take some integer p > n and some constant K(Θ, p) such that M α (θ) E sup T T θ∈Θ p ≤ K(Θ, p) Tp Z Θ p dθE |MTα (θ)| + Z Θ p dθE |∂θ MTα (θ)|  . Now, applying successively Davis-Burkholder-Gundy’s inequality, Jensen’s inequality and assumption [A2] it is straighforward to see that for some constant C > 0 E[(MTα (θ))p ] ! p2  2 λα (s, θ) α ∗ CE log α λ (s, θ )1{λα (s,θ∗ )6=0} ds λ (s, θ∗ ) 0 p Z T p p λα (s, θ) log α CT 2 −1 E (λα (s, θ∗ )) 2 1{λα (s,θ∗ )6=0} ds ∗ λ (s, θ )  p 0 O T2 , Z ≤ ≤ = and E[(∂θ MTα (θ))p ] ≤ ≤ = T ! p2 2 ∂θ λα (s, θ) λα (s, θ∗ )1{λα (s,θ∗ )6=0} ds CE λα (s, θ) 0 p Z T p p ∂θ λα (s, θ) −1 2 E CT (λα (s, θ∗ )) 2 1{λα (s,θ∗ )6=0} ds α (s, θ) λ  p 0 O T2 , Z T  p RT Mα where the permutation of the symbol ∂θ and 0 is permitted by Lemma 6.1. Hence E supθ∈Θ TT → 0. P α Finally, thanks to Proposition 3.8, VT (θ) = α∈I VT (θ) converges in probability to Y(θ) uniformly in θ. Thus sup |YT (θ) − Y(θ)| →P 0. θ∈Θ Remark 2. The Sobolev’s inequality depends on regularity properties of the domain Θ, usually expressed as geometric conditions. Such conditions can be found in [3]. We will assume the following sufficient condition that is used in [30] as well : inf θ∈Θ Leb(B(θ, ǫ) ∩ Θ) ≥ a0 (ǫn ∧ 1) for any ǫ > 0, where a0 is some positive constant, B(θ, ǫ) is the open ball centered on θ with diameter ǫ, and Leb is the Lebesgue measure. Finally the consistency easily follows : Proof of Theorem 3.9. from the expression o n v XZ u − (v − u) παθ (du, dv, dw), Y(θ) = 1{u>0,v>0} log u (u,v,w)∈E α∈I we immediately deduce that Y ≤ 0 and Y(θ∗ ) = 0. By [A4], θ∗ is thus a global maximum of Y, and by the previous lemma this ensures the consistency of any asymptotic QMLE. 8 We now turn to the asymptotic normality of θ̂T . Using again [A2] and a variant of Lemma 6.1, we define for any θ ∈ Θ, ∂θ lT (θ) T XZ = α∈I 0 λα (s, θ)−1 ∂θ λα (s, θ)1{λα (s,θ∗ )6=0} dNsα − XZ α∈I T ∂θ λα (s, θ)ds, 0 which, evaluated at point θ∗ , has the form ∂θ lT (θ∗ ) = XZ T 0 α∈I λα (s, θ∗ )−1 ∂θ λα (s, θ∗ )1{λα (s,θ∗ )6=0} dÑsα , and ∂θ2 lT (θ) T XZ = 0 α∈I T XZ − 0 α∈I XZ + T 0 α∈I  ∂θ λα (s, θ)−1 ∂θ λα (s, θ) 1{λα (s,θ∗ )6=0} dÑtα (∂θ λα )⊗2 (s, θ)λα (s, θ)−2 λα (s, θ∗ )1{λα (s,θ∗ )6=0} ds ∂θ2 λα (s, θ)λα (s, θ)−1 (λα (s, θ) − λα (s, θ∗ ))1{λα (s,θ∗ )6=0} ds. Finally consider the Fisher information matrix XZ 1{u>0} θ∗ πα (du, dv, dw) ∈ Rn×n . Γ= w⊗2 u (u,v,w)∈E (3.2) α∈I If Γ is not singular, the asymptotic normality holds : Theorem 3.11. Let θ̂T be an asymptotic QMLE and assume that Γ is positive definite. We have √ 1 T (θ̂T − θ∗ ) →d Γ− 2 ξ, where ξ follows a standard normal distribution. We have divided the proof of this result into the next two lemmas. Lemma 3.12. Under [A1]-[A3], if VT is a ball centered on θ∗ shrinking to {θ∗ }, then sup |T −1 ∂θ2 lT (θ) + Γ| →P 0. θ∈VT Proof. We first deal with We can easily see that the processes  the martingale part as for the consistency.  ∂θ λα (s, θ)−1 ∂θ λα (s, θ) 1{λα (s,θ∗ )6=0} and ∂θ2 λα (s, θ)−1 ∂θ λα (s, θ) 1{λα (s,θ∗ )6=0} are dominated by polynoms in ∂θi λα (t, θ) and λα (t, θ)−1 1{λα (s,θ∗ )6=0} for i ∈ {0, 1, 2, 3}, and thus by an immediate application of Sobolev’s inequality and [A2], we get for any p > n 1 E sup θ∈Θ T Z p T α ∂θ λ (s, θ) 0 thus X 1 sup T θ∈Θ α∈I For θ ∈ VT , we have −1 Z T 0 α  ∂θ λ (s, θ) 1{λα (s,θ∗ )6=0} dÑtα  p = O T−2 ,  ∂θ λα (s, θ)−1 ∂θ λα (s, θ) 1{λα (s,θ∗ )6=0} dÑtα →P 0. 9 1 T Z T ∂θ2 λα (s, θ)λα (s, θ)−1 (λα (s, θ) − λα (s, θ∗ ))1{λα (s,θ∗ )6=0} ds 0 Z |θ − θ∗ | T sup ∂θ2 λα (s, θ)λα (s, θ)−1 sup |∂θ λα (s, θ)|1{λα (s,θ∗ )6=0} ds T θ∈Θ 0 θ∈Θ = OP (|θ − θ∗ |) = OP (diam[VT ]), ≤ therefore Z 1 X T 2 α sup ∂θ λ (s, θ)λα (s, θ)−1 (λα (s, θ) − λα (s, θ∗ ))1{λα (s,θ∗ )6=0} ds →P 0. θ∈VT T 0 α∈I For the middle term, consider the process UTα (θ) 1 = T Z T 0 (∂θ λα )⊗2 (s, θ)λα (s, θ)−2 λα (s, θ∗ )1{λα (s,θ∗ )6=0} ds, which, evaluated at point θ∗ equals UTα (θ∗ ) 1 = T |θ − θ∗ | T Z Z T 0 (∂θ λα )⊗2 (s, θ∗ )λα (s, θ∗ )−1 1{λα (s,θ∗ )6=0} ds. For θ ∈ VT , |UTα (θ) − UTα (θ∗ )| ≤ ≤ = T  (∂θ λα )⊗2 (s, θ) λα (s, θ∗ )ds ∂θ λα (s, θ)2 0   Z |∂θ λα (s, θ)||∂θ2 λα (s, θ)| |∂θ λα (s, θ)|2 |∂θ2 λα (s, θ)| |θ − θ∗ | T λα (s, θ∗ )ds + 2 sup α (s, θ)|2 α (s, θ)|3 T |λ |λ θ∈Θ 0 OP (diam[VT ]).  Finally, apply Proposition 3.8 to UTα (θ∗ ) and write Γ ∈ Rn×n the limit of Lemma 3.13. We have :   1 1 ∗ √ ∂θ luT (θ ) →d Γ 2 (Wu )u∈[0,1] , T u∈[0,1] P α∈I UTα (θ∗ ) to conclude. where W is a standard Brownian motion (where the convergence happens in the Skorokhod space D([0, 1])). Proof. We consider the process SuT = XZ α∈I uT 0 1 √ λα (s, θ∗ )−1 ∂θ λα (s, θ∗ )1{λα (s,θ∗ )6=0} dÑsα , T and show a functional central limit theorem when T → ∞. Indeed, as ∆N α1 ∆N α2 = 0 almost surely for α1 6= α2 , we have hS T , S T iu = u XZ α∈I 0 uT 1 α λ (s, θ∗ )−1 ∂θ λα (s, θ∗ )2 1{λα (s,θ∗ )6=0} ds, uT and by ergodicity we deduce that 10 hS T , S T iu →P uΓ. We now check Lindenberg’s condition. For any a > 0, E X (∆SsT )2 1{|∆SsT |>a} s≤u 1X |∆SsT |3 a s≤u Z 3 1 X uT λα (s, θ∗ )−1 ∂θ λα (s, θ∗ ) √ dNsα E a T 0 α∈I Z uT X 1 1 3 E λα (s, θ∗ )−1 ∂θ λα (s, θ∗ ) λα (s, θ∗ )ds 3 a 2 T 0 α∈I  X 1 Z uT  α ∗ −1 α ∗ 3 α ∗ E sup λ (s, θ ) ∂θ λ (s, θ ) λ (s, θ ) ds 3 T2 0 θ∈Θ α∈I   1 → 0. O √ T ≤ E = = ≤ = The conclusion then holds applying 3.24, chapter VIII, in [19]. We finally establish the asymptotic normality from the previous lemmas : Proof of Theorem 3.11. Let θ̄T be the value that maximizes θ → lT (θ). Thanks to [A2], we put ζT1 ∈ [θ̄T , θ̂T ] and ζT2 ∈ [θ∗ , θ̂T ] such that ∂θ lT (θ̂T ) = ∂θ2 lT (ζT1 )(θ̂T − θ̄T ) = oP on one hand, and √  T ∂θ lT (θ̂T ) = ∂θ lT (θ∗ ) + ∂θ2 lT (ζT2 )(θ̂T − θ∗ ) √ on the other hand. This yields, after scaling by T , − ∂θ lT (θ∗ ) ∂ 2 lT (ζT2 ) √ √ T (θ̂T − θ∗ ). + oP (1) = θ T T We then multiply by −Γ−1 on both sides and use Lemma 3.12 and Lemma 3.13, and the asymptotic normality follows. 3.3 The general QLA We slightly strengthen assumptions about ergodicity and derivability of the intensity process in order to apply the general Quasi Likelihood Analysis. In particular, this yields the convergence of moments of the QMLE as well as the convergence of moments for the QBE. From now on, we will be only interested in the exact QMLE, that is the estimator that maximizes the Quasi Log Likelihood θ → lT (θ). [B1 ] The mapping λ : Ω × R+ × Θ → R+ is F ⊗ B(R+ ) ⊗ B(Θ)-measurable. Moreover, almost surely, (i) for any θ ∈ Θ, s → λ(s, θ) is left continuous. (ii) for any s ∈ R+ , θ → λ(s, θ) is in C 4 (Θ), and admits a continuous extension to Θ. [B2 ] The intensity processes and their first derivatives satisfy 11 (i) for any p > 1, supt∈R+ P4 i=0 supθ∈Θ ∂θi λ(t, θ) p < +∞. (ii) for any p > 1, for any α ∈ I, supt∈R+ supθ∈Θ λα (t, θ)−1 1{λα (t,θ)6=0} p < +∞. (iii) For any θ ∈ Θ, for any α ∈ I, λα (t, θ) = 0 if and only if λα (t, θ∗ ) = 0. The ergodicity assumption needs to be strengthened as well. The key point in the following assumption is to postulate the existence of a rate of convergence for the LLN. Let D↑ (E, R) be the set of functions ψ that are of class C 1 on (R+ − {0}) × (R+ − {0}) × Rn and such that ψ, |∇ψ| ∈ C↑ (E, R). [B3 ] For any α ∈ I, there exists a mapping πα : D↑ (E, R) × Θ → R and there exists 0 < γ < any (ψ, θ) ∈ D↑ (E, R) × Θ and for every p > 1 the following convergence holds : sup T γ θ∈Θ 1 T T Z 0 ψ(λα (s, θ∗ ), λα (s, θ), ∂θ λα (s, θ))ds − πα (ψ, θ) p 1 2 such that for → 0. [B4 ] Define χ0 as: χ0 = inf θ∈Θ\{θ ∗ } − Y(θ) . |θ − θ∗ |2 We assume that χ0 > 0. For a given prior density p on the space Θ, we define the Quasi-Bayesian Estimator as follows: θ̃T = Z Θ exp(lT (θ))p(θ)dθ −1 Z θexp(lT (θ))p(θ)dθ. Θ We are going to apply results from [39] about Quasi Likelihood Analysis based on polynomial type large deviations. This approach follows techniques that have been developed in [18] to prove the asymptotic properties of the MLE and the BE in a general context. In particular, the convergence of moments of those estimators is obtained as a consequence of the convergence in distribution of the Likelihood random field along with a polynomial type large deviation inequality similar to the one stated in Theorem 3.14. In our case, we adopt the notations of [39] and represent the Quasi Likelihood process as follows. For any u ∈ UT = {u ∈ Rn |θ + T −1/2 u ∈ Θ}, we write θu = θ + T −1/2 u and define the Quasi Likelihood random field ZT (u) = exp{lT (θu ) − lT (θ∗ )}. The next theorem gives a large deviation inequality on ZT , which in turn is widely used to establish the convergence of moments of the estimators. Theorem 3.14. Under [B1]-[B4], the two following results hold: Polynomial type large deviation inequality for every L > 0, there exists CL such that : # " CL P sup ZT (u) ≥ e−r ≤ L . r u∈UT ,|u|>r Convergence of moments If θ̂T is the QMLE and θ̃T the QBE, we have : i h √ 1 E f ( T (θ̂T − θ∗ )) → E[f (Γ− 2 ξ)], i h √ 1 E f ( T (θ̃T − θ∗ )) → E[f (Γ− 2 ξ)], for any continuous f of polynomial growth, and such that ξ follows a standard normal distribution. 12 To prove this result, and in order to highlight the LAN property (at point θ∗ ) of the model, we rewrite ZT (u) as   1 ZT (u) = exp ∆T [u] − ΓT [u, u] + rT [u] , 2 (3.3) with ∆T [u] = u √ ∂θ lT (θ∗ ) T and ΓT [u, u] = −∂θ2 lT (θ∗ )   u⊗2 . T Finally rT [u] is defined as the following residual in the Taylor formula : 1 lT (θu ) = lT (θ∗ ) + ∆T [u] − ΓT [u, u] + rT [u]. 2 The following technical lemma is proved in the appendix : Lemma 3.15. Under [B1]-[B3], for every p > 1, sup k∆T kp < ∞, (3.4) T ∈R+ T γ sup |YT (θ) − Y(θ)| sup θ∈Θ T ∈R+ p < ∞, sup kT γ |ΓT − Γ|kp < ∞, (3.5) (3.6) T ∈R+ sup T ∈R+ T −1 sup |∂θ3 lT (θ)| θ∈Θ p < ∞. (3.7) Let us deal with the proof of Theorem 3.14. Proof of Theorem 3.14. We first show the polynomial type large deviation inequality. We apply Theorem 3 in ′′ 2γ α , 1−α }[, Conditions (A1 ), [39]. Setting β1 = γ, β2 = 12 − γ, ρ = 2, ρ2 ∈]0, 2γ[, α ∈]0, ρ22 [, and ρ1 ∈]0, min{1, 1−α ′ (A4 ), (A6) in [39] are satisfied thanks to Lemma 3.15, as well as (B1), (B2) thanks to the non-degeneracy assumption [B4] above. We now make use of Theorem 4 in [39] to show the convergence of moments for the QMLE. We first extend the definition of ZT (u) to any u ∈ Rn by taking ZT (u) continuously decreasing to zero outside UT . We need to show that the finite dimensional distribution of ZT are convergent, and then that logZT is tight in T , seen as a family of processes in u ∈ K for any compact set K of Rn . Because we have the majoration     1 3 3 − 32 E [|rT [u]|] ≤ T E sup |∂θ lT (θ)||u| = O √ → 0, T θ∈Θ the finite dimensional convergence, and thus the LAN property, is a direct consequence of the classical approach given the expressions of ∆T and ΓT . 13 Take then an arbitrary compact set K, and put wT (δ) = sup|u2 −u1 |≤δ |logZT (u2 ) − logZT (u1 )| where the supremum is taken over the set K. We need to prove that for every ǫ > 0, lim sup P[wT (δ) ≥ ǫ] = 0. δ→0 T Using Markov’s inequality we first have for amy p > n ǫ−p E|wT (δ)|p p ǫ−p E sup |lT (θu2 ) − lT (θu1 )| . P[wT (δ) ≥ ǫ] ≤ ≤ |u2 −u1 |≤δ We have lT (θu2 ) − lT (θu1 ) = T XZ 0 α∈I λα (s, θu2 ) log α dÑ α − λ (s, θu1 ) s Z T 0   λα (s, θu2 ) λα (s, θu2 ) − λα (s, θu1 ) λα (s, θ∗ )ds, log α − λ (s, θu1 ) λα (s, θ∗ ) that we bound from above in two steps. Defining MTα (θu ) = and p > n, sup E |u2 −u1 |≤δ Z T log 0 λα (s, θu2 ) dÑ α λα (s, θu1 ) s RT logλα (s, θu )dÑsα , we first write for some α ∈ I 0 p = E sup |u2 −u1 |≤δ |MTα (θu2 ) − MTα (θu1 )| p ≤ δ T − 2 E sup |∂θ MTα (θu )| p p p u∈K ≤ K1 δ p where we have applied Sobolev’s inequality and Davis-Burkholder-Gundy’s inequality at the last step. One can check that the same holds for the integral with respect to Lebesgue measure: E sup |u2 −u1 |≤δ Z 0 T   λα (s, θu2 ) λα (s, θu2 ) − λα (s, θu1 ) log α λα (s, θ∗ )ds − λ (s, θu1 ) λα (s, θ∗ ) p ≤ K2 δ p . This shows that sup P[wT (δ) ≥ ǫ] ≤ T ∈R+ Kδ p → 0, δ → 0. ǫp Finally, thanks to the polynomial type large deviation inequality and Lemma 2 in [39], for some δ > 0 we have  !−1  Z  < ∞. sup E  ZT (u)du T ∈R+ u:|u|≤δ The convergence of moments of the QBE is then a direct consequence of Theorem 8 in [39]. 3.4 Mixing criteria for ergodicity We conclude this theoretical part by giving two mixing criteria that respectively imply the ergodicity conditions [A3] and [B3]. As we shall see in the sequel, it is sometimes easier to check such condition, as is the case for the Hawkes processes. In order to match with our definition 3.1, we say that a process (Xt )t∈R+ taking values in some state space E is C-mixing, for some set of functions C from E to R, if for any φ, ψ ∈ C, the following convergence holds ρu = sup Cov[φ(Xs ), ψ(Xs+u )] → 0, |u| → +∞ s∈R+ 14 [M1 ] The following two properties hold : Mixing For any α ∈ I, (λα (t, θ∗ ), λα (t, θ), ∂θ λα (t, θ))t∈R+ is Cb (E, R)-mixing. Stability For any α ∈ I, there exists λ̄α such that for any θ ∈ Θ, (λα (t, θ∗ ), λα (t, θ), ∂θ λα (t, θ)) →d (λ̄α (θ∗ ), λ̄α (θ), ∂θ λ̄α (θ)). Note that in the stationary case with C = {1A |A ∈ B(R)}, the above condition is nothing more than a mixing assumption in the classical sense (see e.g. [8]) which is a well-known sufficient condition for the ergodicity of the invariant measure. In the same spirit of [B3], we also reformulate [M1] with a minimal rate of convergence in the mixing and the stability equations. [M2 ] There exists 0 < γ < 1 2 such that : Mixing For any α ∈ I, (λα (t, θ∗ ), λα (t, θ), ∂θ λα (t, θ))t∈R+ is D↑ (E, R)-mixing uniformly in θ ∈ Θ. Moreover the rate ρ verifies : 2γ ρu = o(u−ǫ ) for some ǫ > . 1 − 2γ Stability There exists λ̄α such that for any ψ ∈ D↑ (E, R), sup tγ E[ψ(λα (t, θ∗ ), λα (t, θ), ∂θ λα (t, θ))] − E[ψ(λ̄α (θ∗ ), λ̄α (θ), ∂θ λ̄α (θ))] → 0. θ∈Θ The next lemma links the above mixing criteria to the ergodicity assumptions [A3] and [B3] and specifies the nature of the operator π in those cases. Lemma 3.16. If [M1], [A1] and [A2] (resp. [M2], [B1] and [B2]) are satisfied, then so is the ergodicity condition [A3] (resp. [B3]), and moreover the mapping πα writes: πα (ψ, θ) = E[ψ(λ̄α (θ∗ ), λ̄α (θ), ∂θ λ̄α (θ))]. Estimator Definition Asymptotic QMLE √ lT (θT ) ≥ supθ∈Θ lT (θ) − oP ( T ) Exact QMLE lT (θT ) = supθ∈Θ lT (θ) QBE θT = R θexp(lT (θ))p(θ)dθ RΘ exp(lT (θ))p(θ)dθ Θ Regularity Assumptions [A1], [A2] and [A4] [B1], [B2] and [B4] Ergodicity Assumption [A3] or [M1] √ 1 E[f ( T (θT − θ∗ ))] → E[f (Γ− 2 ξ)] [B3] or [M2] √ 1 E[f ( T (θT − θ∗ ))] → E[f (Γ− 2 ξ)] Property ∀f ∈ Cb (Rn , R) ∀f ∈ Cp (Rn , R) Table 1: Summary of the asymptotic properties of the three estimators presented in Section 3. In each definition, θT represents the estimator itself. Cb (Rn , R) (resp. Cp (Rn , R)) is the set of functions from Rn to R which are continuous and bounded (resp. continuous and of polynomial growth) . 4 Applications As mentioned in the introduction, a fruitful approach to Limit Order Book process modelling consists in focusing on the point process that counts different events of interest occurring over time. More precisely, recall that in a simplified representation of the continuous-time double auction system any agent interacts with the market through three types of orders : 15 • Limit order : Submit a buy (resp. sell) order at a lower (resp. higher) price than the best ask (resp. bid) price. The order is immediately inserted in the corresponding queue (regarding the price level p at which the order has been sent). • Market order : Consume the liquidity at the best ask (resp. bid) price for a buy (resp. sell) order. • Cancellation order : Remove one limit order that is waiting in the LOB. In practice every order is characterized by a volume v that represents the amount of shares one is willing to buy or sell, and a price level p that is constrained to belong to a price grid G ⊂ {k.∆p|k ∈ N}. ∆p is the smallest distance between two price limits and is called the ticksize. Let us then call a (finite dimensional) Limit Order Book a process that is constituted of m ∈ N queues stored in X(t) ∈ Zm . At time t ∈ R+ , Xα t contains the total volume of limit orders that have been submitted through time at a given level and that have not been executed yet. As sellers should always submit limit orders at higher prices than buyers, A Limit Order Book can always be split into two distinct parts : The queues associated to selling limit orders, at higher prices, or the ask side, and the queues at lower prices, that contain buying limit orders, or the bid side. It is also common to call spread the empty zone between the best limits, that is the limits laying between the highest bid and the lowest ask. As the number of queues should be potentially infinite, such modelling is not straightforward, and many representations exist in the literature. Most of those representations can be actually classified into two main families : The absolute LOB’s associate to each price level p ∈ G a label α ∈ N and for the whole life of the process X, Xα will contain the volume of latent limit orders that have been submitted at this price level. It is common to count positively the limit orders on the ask side, and negatively those on the bid side. Such representations only involve a finite price range {k1 ∆p , ..., k2 ∆p }, and are thus satisfactory provided that most events occur in this window. An illustration of this model can be found in [13]. On the other hand, the relative LOB’s are generally centered around a reference price, that is a price that either plays a role for the shape of the LOB itself, or has a good economical interpretation. As an example, the former is often taken as the best ask price or the best bid price, see [1]. The latter can be an underlying unobserved process that is assumed to be the true price, that is the value toward which the market price would tend if, say, the information was perfectly shared. In any case, the relative representation associates a label α to each price level relatively to its position compared to the reference price. The general framework introduced in [17] is based on this representation. Therefore, as such price is typically stochastic, any price movement shifts the labelling to the left or to the right as time passes. Both representations have their pros and cons, that we will not discuss here. In the following we are not concerned with this technical choice since the statistical procedure remains the same. Since any order is characterized by a (random) volume v, the jumps of X need not be of size 1. To conduct the QLA through a point process perspective, it is quite common to simply decompose X through the arrival of orders of different types, and ignore in a first approximation the size of those orders. We thus define • An m-dimensional point process L that counts the limit orders, compensated by ΛL . • An m-dimensional point process C that counts the cancellation orders, compensated by ΛC . • A 2-dimensional point process M that counts the market orders, compensated by ΛM . Note that it is possible to take into account the size of the orders by splitting again every point process according to the volume of the orders. A general approach would therefore consist in constructing a point process that counts the orders of type Y ∈ {C, L, M }, at price level α ∈ {1, ..., m}, and of volume v ∈ {1, ..., v̄} for any triplet (Y, α, v). Such decomposition is done in a Markovian framework in [17]. In practice, v̄ is large and it is thus preferable for dimension considerations to construct K zones for the volume V1 , ..., VK and collect the orders whose volume belongs to a given zone. Other criteria are sometimes taken into account when considering the modelling of an Order Book. In [36], the author shows that aggressiveness of orders is also a very important feature when it comes to describing the stationary distribution of best limits sizes. Basically, an order is said to be aggressive if it is a market order that consumes all the liquidity at one of the best limits, or if it is a limit 16 order placed inside the spread. It is also worth noting that the knowledge of X is sufficient to reconstruct the process L since it counts the jumps that increase the absolute value of the size of one queue. On the other hand, market orders and cancellation orders at best limits cannot be distinguished from the knowledge of X alone. Practically speaking, when working with real data, it is crucial to assume that the events that diminish the size of one queue are labelled in one way or the other so one can distinguish market and cancellation orders. This is possible if for example one has access to the record of trades on the market. Other practical issues, such as hidden liquidity, or cross trades can also make the data analysis difficult. Let us assume from now on that the LOB X and the point process N that gathers the events of interest are constructible, and fully observable. We focus on the parametrization of the intensities along with the ergodicity of the models existing in the literature. 4.1 Markovian models Some models assume the existence of an observable underlying process (Yt )t adapted to the filtration F = (Ft )t∈R+ such that the parametrized intensity process writes λ(t, θ) = h(Yt , θ). Example 4.1. Consider first the very simple following model, inspired of [12]. The LOB (X(t))t is represented in a level-I perspective (best ask and best bid limits only). It is assumed that every time one queue gets empty, it is randomly regenerated. This accounts for the volume that is stored in the new best limit, that is the first non-empty limit after the one that just depleted, and that is inaccessible in this two dimensional representation. The authors postulate that all the intensities are constant, and thus (Lt , Mt , Ct )t is a 6-dimensional Poisson process : λ(t) = λ0 . The multivariate Poisson process being obviously ergodic, this toy model trivially enjoys all the properties derived in Theorem 3.14. Example 4.2. In [1], Abergel and Jedidi define a multidimensional LOB whose cancellation intensities are linear functions of the size of the queues of the LOB itself, and other intensities remain constant. In other words, any intensity at a given level α ∈ I is of the form λL,α (t) = λL,α 0 , λC,α (t) = λC,α 0 |Xα (t−)|, and the market orders intensities on the best limits write λM,Bid (t) = λM,Bid , 0 λM,Ask (t) = λM,Ask . 0 Such model presupposes that market agents are independent, and that every order that has been posted is cancelled after exponential random times. In their paper, Abergel and Jedidi prove that such feedback mechanism > 0 for all α ∈ I are sufficient to show that (Xt )t is a V -geometric Markovian along with the condition λC,α 0 process (see [25, 24] for a deep insight of this notion). 17 The above mentioned models and their variants are reputed for their mathematical tractability. For example, analytical expressions of quantities of interest that quantify the shape of the Limit Order Book are derived in [27]. Needless to say that being able to write closed formulas is generally admitted to be a significant criterion for practical considerations. On the other hand, it is also equally admitted that such Poisson process-based models perform poorly when it comes to closely reproducing most stylized facts observed on the markets, as it is shown in [16]. In particular, the lack of dependency between the successive orders, and between the queues is one of the major drawbacks of those basic models. The following example is a quite general Markovian framework that allows such dependencies. Example 4.3. In [16] and [17], the model described in Example 4.2 is generalized. X is defined as a general Pure Jump-Type Markovian process, as in Example 3.3. Recall that the intensity vector is therefore a pure function of the LOB state : λ(t, θ) = h(X(t−), θ). Whatever the form of h, the authors establish the V -geometric ergodicity of the Markovian process X in the case where cancellation intensities become predominant whenever the size of one limit gets too large. 4.2 Multivariate Hawkes process In this section we are interested in the special case of multivariate Hawkes process with exponential kernel as Hawkes process-based models have been applied to various topics in finance, notably to Limit Order Books. As we shall see in the remaining part of this paper, it turns out that the full QLA is applicable to such class of models. Both computation of the MLE and simulation methods for the exponential Hawkes process can be found in [31]. Those processes were introduced by Hawkes in 1971, see [15] and were extensively used to model earthquakes and their aftershocks. Lately they have been used in finance to model various phenomena such as price variation, market impact, and Limit Order Book mechanisms. [7] provides a very complete summary of the different applications of Hawkes processes in finance. Let us mention in particular the use of Hawkes processes in [35] to model the interaction between liquidity providers and liquidity takers. In this work a level-I LOB is described, in which the point process gathering limit and market orders is modelled as a multivariate Hawkes process. The use of those self-exciting processes highlights the fact that orders seem to trigger each other. It quantifies to what extent self excitations and mutual excitations have an impact on the interarrival time of order submissions, and their relative importance. For example, it is shown in [35] that market orders (and thus liquidity takers) strongly influence limit orders (liquidity providers), but limit orders, in turn, have a negligible impact on market orders. Recently, a more theoretical work by Abergel and Jedidi [2] establishes V -geometric ergodicity and scaling limits in a Hawkes-based Markovian framework applied to a general LOB. It is basically a generalization of Example 4.2, where the Poisson assumption on limit orders and market orders is relaxed. More specifically, keeping the same notations as above, instead of a mere Poisson process, the vector (L, M ) is supposed to form a multivariate Hawkes process while the dynamic of C remains unchanged. Motivated by those examples whose detailed descriptions can be found in the abovementioned papers, we turn to the definition of a general Hawkes process. Let Nt = (Ntα )α∈I , I = {1, ..., d}, N0 = 0, be a multidimensional point process and write FN = (FtN )t∈R+ , where we recall that FtN = σ{Ns |0 ≤ s ≤ t} is the canonical filtration of N . We say that N is a linear Hawkes process or Hawkes’ self-exciting process starting from 0 if there exist h : R+ → Rd×d and ν ∈ (R∗+ )d such that + N the Ft -intensity λ(t) of N writes α λ (t) = να + XZ β∈I 0 t− hαβ (t − s)dNsβ , α ∈ I. (4.1) The baseline intensities να ’s represent the rate of spontaneous occurences of events, while the kernels hαβ ’s model self-interaction in the system. Indeed, if a shock occurs at time t0 on the covariate N β , an aftershock 18 will happen on the covariate N α around time t1 with high probability if hαβ (t1 − t0 ) is large. When hαβ = 0, the covariate N β has no influence on the chain of events related to N α . For example, in the model from [2], and in accordance with the empirical results found in [35], the mutual excitation structure of the process (L, M ) is assumed to be of the form “MM-LL-LM”, i.e market orders excite both market orders and limit orders, whereas limit orders only trigger themselves. Let us define the matrix Φ = [φαβ ]αβ where φαβ = Z +∞ hαβ (s)ds, 0 and write ρ(Φ) its spectral radius. We also define the elementary excitations as Z t− hαβ (t − s)dNsβ , ǫαβ (t) = 0   that we gather in the matrix E(t) = ǫαβ(t) αβ . Finally, given A = [aαβ ]αβ and C = [cαβ ]αβ ∈ Rd×d + , we say that N is an exponential Hawkes process if the kernel functions hαβ are of the form hαβ (s) = cαβ e−aαβ s . h i c Note that the matrix Φ has the representation Φ = aαβ in that case. We now recall a few results about αβ αβ the Hawkes process and its exponential form. Proposition 4.4. Let N be a multivariate Hawkes process, and assume that ρ(Φ) < 1. Then : ′ ′ ′ ′ ′ (i) There exists a probability space (Ω , F , P ) and two point processes N and N̄ defined on Ω and on the ′ whole real line such that N|R+ is distributed as N , and N̄ is a stationary point process whose FtN̄ -intensity λ̄ verifies : X Z t− α λ̄ (t) = να + hαβ (t − s)dN̄sβ . β∈I −∞ (ii) Let S be the shift operator, meaning that for any t ∈ R+ , St N = (Ns+t )s∈R+ . Then N is stable in the following sense : St N →D N̄|R+ , where D designates the weak convergence associated to the vague topology on integer valued measures. (iii) If N is an exponential Hawkes process, there exist q > 0 and A > 0 such that, for any α ∈ I, for any t ∈ R+ , λα (t) − λ̄α (t) 1 ≤ Ae−qt . See [10] for deeper explanations about this mode of convergence. The first two points of Proposition 4.4 are immediate consequences of Theorem 1 and Lemma 4 in [10] along with the assumption on ρ(Φ). Note that they do not require N to be exponential. In practice, the first point allows us to assume the existence of a stationary version of N on the same probability space, and the second assertion states that N tends in distribution to N̄ for a certain topology. Finally, the last point states that in the exponential case, the L1 deviation of the transient intensity from its stationary version is, not surprisingly, exponentially decreasing. As is well known, The process E is Markovian if the kernel are of exponential form. It also enjoys a very strong ergodicity property, that is introduced in the next proposition. Following the definitions in [24], we say 19 that a continuous time Markovian Process X is V -geometrically ergodic if, denoting by P its transition kernel, there exists some norm-like function V on the state space of X, B < +∞, and r < 1 such that : P t (x, .) − P X̄ ≤ V B(V (x) + 1)rt , (4.2) for any initial state x, and any t ∈ R+ , where P X̄ is the stationary law of X̄t . Here, k.kV designates the V -variation norm (See [25]), that is, for any measure µ on a measured space (S, S), Z kµkV = sup ψ(s)µ(ds) . (4.3) ψ|ψ≤V S Proposition 4.5. Assume that ρ(Φ) < 1. Then : (i) The elementary excitation process E is a Markovian process taking values in Rd×d + . (ii) E is V -geometrically ergodic, and moreover V : Rd×d → R+ can be chosen as V (ǫ) = ehM,ǫi for some + P d×d M = [mαβ ]αβ ∈ R+ and with hM, ǫi = α,β∈I mαβ ǫαβ . By virtue of the Markovian property and the expression (4.3), (4.2) thus writes for any 0 ≤ s ≤ t, sup ψ|ψ≤V     E ψ(Et )|FsE − E ψ(Ē) ≤ B(V (Es ) + 1)rt−s (4.4) where Ē follows the stationary distribution of the process E. We now consider an exponential Hawkes process as a model parametrized by the triplet (ν, C, A) ∈ Rd+ × d×d d × Rd×d × Rd×d + . More precisely we consider a relatively compact open parameter state Θ ⊂ R+ × R+ + such that for any triplet θ = (ν, C, A) ∈ Θ, for any α, β ∈ I, Rd×d + 0 < 0 < 0 < ν ≤ να ≤ ν̄ < +∞, c ≤ cαβ ≤ c̄ < +∞, a ≤ aαβ ≤ ā < +∞. In particular, we assume for the sake of identifiability that the cαβ are positive. Let us assume, in the spirit of the first part, that there exists θ∗ = (ν ∗ , C ∗ , A∗ ) ∈ Θ, such that θ∗ is the real parameter that drives the dynamic of N . We are now ready to state the main result of this section. Theorem 4.6. The exponential Hawkes model verifies the conditions [B1], [B2], [M2], and [B4]. In particular, by virtue of Theorem 3.14 and Lemma 3.16, if θ̂T = (ν̂T , ĈT , ÂT ) is the QMLE and θ̃T = (ν̃T , C̃T , ÃT ) the QBE of the model, we have h √ i 1 E f ( T (θ̂T − θ∗ )) → E[f (Γ− 2 ξ)], i h √ 1 E f ( T (θ̃T − θ∗ )) → E[f (Γ− 2 ξ)], where Γ is the Fisher information, f is any continuous function of polynomial growth, and ξ follows a standard normal distribution. [B1] is immediate given the explicit expression of the intensity function. Unfortunately, the ergodicity condition [B3] is not a direct consequence of the V -geometric ergodicity of the process E. This is due to the fact that the vector (λ(t, θ∗ ), λ(t, θ), ∂θ λ(t, θ)) cannot be expressed as a pure function of the marginal E(t). On the other hand, since the stochastic structure of the process (λ(., θ∗ ), λ(., θ), ∂θ λ(., θ)) is globally driven by E, the exponential rates in (4.4) and in Proposition 4.4 (iii) are strong enough to ensure the mixing assumption [M2]. The detailed proofs can be found in the appendix. 20 5 Conclusion We have introduced in this paper a general ergodic framework for point process regression models, in which we were able to derive general asymptotic properties of both the Quasi Maximum Likelihood estimator and the Quasi Bayesian estimator. Because such formulation of ergodicity covers a wide range of models, we have shown that the Quasi Likelihood Analysis approach is robust in the sense that it applies to various contexts, provided that they encompass a family of laws of large numbers on the parametric stochastic intensity. Since, in practice, for Limit Order Books, parameters (and other variables of interest) are often estimated via such time average limits, we have decided to focus on various point process models that are directly involved in the modelling of the dynamics of LOB’s. In particular, we have seen that Markovian models, self-exciting exponential Hawkes processes, and their mixtures that can be found in the literature are examples of applications of the QLA. It is also important to know the limits of such procedure. Parametric estimations are undoubtebly powerfull when it comes to calibrating on real data a model that looks well suited to, say, the reproduction of stylized facts observed in practice. Nevertheless, in many cases the choice of a parametric model is quite arbitrary although it should be investigated with the help of mathematical tools. Information criteria (AIC, BIC), sparsity (e.g. LASSO type estimations), and hypothesis testing, are examples of model selection methods that can quantify in some sense to what extent models perform well (this last statement being deliberately vague here), even in mispecified contexts. Another approach consists in checking the validity of a model by testing the constancy of the parameters over time. In the same spirit as in [32], but in a different asymptotic though, empirical tests could be conducted to investigate the stability of parameters. Should they fail, the choice of an ergodic model itself would have to be reconsidered. Although such considerations are beyond the scope of the present paper, they should be investigated in the future. Let us conclude this work by pointing out that in the litterature there is virtually no LOB model that allows random volumes of orders, except slight generalizations, either to the simple I.I.D case (see e.g. [27]), or in a theoretic Markovian framework [17]. The lack of such model extensions is probably due to the fact that the very rich and complex structure of Order Books is still poorly understood. The QLA could be generalized to more intricate models for Limit Order Books in order to address the most general structure between random time events Ti and random order sizes Vi . Accordingly, statistical inferences for marked point processes should thus be the subject of a further work as well. Along with the abovementioned model selection machinery, applications to real data analysis would certainly shed light on these little-known mechanisms. Acknowledgement This work was in part supported by CREST Japan Science and Technology Agency, Japan Society for the Promotion of Science : Grants-in-Aid for Scientific Research No. 24340015 (Scientific Research), No. 26540011 (Challenging Exploratory Research); NS Solutions Corporation; and by a Cooperative Research Program of the Institute of Statistical Mathematics. 6 6.1 Appendix Proofs of Section 3 Proof of Proposition 3.8. Let us start with the identification of the mapping πα (., θ) on Cb (E, R). For the sake of simplicity we write Xsα (θ) = (λα (s, θ∗ ), λα (s, θ), ∂θ λα (s, θ)), and we consider the sequence of probability measures on E defined for any Borel subset A ⊂ E : θ πT,α (A) = 1 T Z 0 T P[Xsα (θ) ∈ A]ds. 21 For any ψ ∈ Cb (E, R), an immediate application of the dominated convergence theorem and [A3] shows that θ θ ψ(x)π T,α (dx) → πα (ψ, θ). On the other hand, it is straightforward to see that the family (πT,α )T ∈R+ is tight E θ α since the family (Xt (θ))t∈R+ is tight itself. Thus along a subsequence (πT,α )T ∈R+ converges weakly to some R παθ , and for any ψ ∈ Cb (E, R), πα (ψ, θ) = E ψ(x)παθ (dx) which determines uniquely παθ . R Let us now show (i). Let ψ ∈ C↑ (E, R). Because we can separate ψ as usual ψ = ψ+ − ψ− , where ψ+ and ψ− are respectively the positive and negative parts of ψ, it is not restrictive to assume that ψ is non-negative. Consider first the case where ψ is continuous on the whole set E. Put then δ > 0, and consider for T ∈ R+ VTα (θ) = 1 T Z 1 T Z T T 0 ψ(Xsα (θ))ds and VTδ,α (θ) = 0 (ψ(Xsα (θ)) ∧ δ) ds, so E VTα (θ) − VTδ,α (θ) "Z T ≤ 1 E T "Z T ≤ 1 E T ≤ ≤ 0 1 E Tδ Q , δ 0 Z 0 T (ψ(Xsα (θ)) − δ) 1{ψ(Xsα (θ))≥δ} ds ψ(Xsα (θ))1{ψ(Xsα (θ))≥δ} ds # # ψ(Xsα (θ))2 ds ′ where Q = supt∈R+ E supθ∈Θ ψ(Xtα (θ))2 . Now taking T and T positive real numbers, we get : E|VTα (θ) − VTα′ (θ)| α,δ α ≤ E|VTα (θ) − VTα,δ (θ)| + E|VTα,δ (θ) − VTα,δ ′ (θ)| + E|V ′ (θ) − V ′ (θ)| T T ≤ 2 Q + E|VTα,δ (θ) − VTα,δ ′ (θ)|. δ Note that the second term can be controlled since the ergodicity assumption [A3] and the boundedness of moments of VTα,δ (θ) also imply the convergence in Lp of the LLN for any p ≥ 1. For any ǫ > 0, taking large ′ δ and sufficiently large T and T we can thus conclude that E|VTα (θ) − VTα′ (θ)| ≤ ǫ, showing that VTα (θ) is a Cauchy sequence in T , and thus converges to a finite value πα (ψ, θ). In particular, thanks to the monotone convergenceR theorem applied to the family ψ ∧ δ and the measure παθ we have also shown that the identity πα (ψ, θ) = E ψ(x)παθ (dx) holds. This shows that πα (., θ) can be extended to C↑ (E, R). In the case where ψ has singularities at points of the form (0, v, w) and (u, 0, w), first construct a sequence of function ψη ∈ Cb (E, R) such that ψη ↑ ψ when η → 0 and such that for any (u, v, w) ∈ E, ψη (u, v, w) = 0 whenever u ≤ η or v ≤ η, and ψη (u, v, w) = ψη (u, v, w) whenever u ≥ 2η and v ≥ 2η . Such construction is possible because ψ is lower semi-continuous. It is then straightforward to show that VTα (θ) is again a Cauchy sequence in L1 as previously. We now turn to the uniform convergence in θ. Once again, assume first for the sake of simplicity that ψ is continuous on E. As Θ is compact, it is sufficient to show that the family (θ → VTα (θ))T ∈R+ is equicontinuous for, say, the L1 norm. Since supt∈R+ E[supθ∈Θ |Xtα (θ)|] < ∞, the family (Xtα (θ))t∈R+ ,θ∈Θ is tight. Consider 22 thus ǫ > 0 and a compact K ∈ E such that P[Xtα (θ) ∈ / K] < ǫ for all t and θ. Let ψ̃ be a C 1 function with compact support such that kψ − ψ̃k∞,K < ǫ and ψ̃ ≤ 2ψ outside K, where k.k∞,K is the infinite norm over K. In particular ψ̃ is k-Lipschitzian for some k > 0. Then ′ ′ E|ψ(Xtα (θ)) − ψ(Xtα (θ ))| ≤ ′ E|(ψ − ψ̃)(Xtα (θ))| + E|(ψ − ψ̃)(Xtα (θ ))| + E|ψ̃(Xtα (θ)) − ψ̃(Xtα (θ ))|, but E|(ψ − ψ̃)(Xtα (θ))| ≤ ≤ ≤ ǫ + E|(ψ − ψ̃)(Xtα (θ))1{Xtα (θ)∈K} | /   12 2 1 ǫ + E (ψ − ψ̃)(Xtα (θ)) P[Xtα (θ) ∈ / K] 2 1 ǫ + Mǫ2 , where M = 3 supt∈R+ k supθ∈Θ ψ(Xtα (θ))k2 . On the other hand, ′ ′ E|ψ̃(Xtα (θ)) − ψ̃(Xtα (θ ))| ≤ kE|Xtα (θ) − Xtα (θ )| ′ k|θ − θ | sup E sup |∂θ Xtα (θ)| . ≤ t∈R+ θ∈Θ ′ Thus we deduce that by taking θ sufficiently close to θ , ′ 1 E|VTα (θ) − VTα (θ )| ≤ 3ǫ + M ǫ 2 , the bound being independent of T . Such equicontinuity along with the pointwise convergence ensures the uniform convergence.  The case where ψ has singularities is treated similarly using the tightness of the family  1{λα (t,θ)6=0} α . Xt (θ), λα (t,θ) t∈R+ ,θ∈Θ RT The following lemma is a verification of the permutation rule of the symbols ∂θ and 0 . RT Lemma 6.1. The process 0 log(λα (s, θ))dÑsα is well defined and admits a derivative for any θ ∈ Θ and we have : Z Z T ∂θ 0 log(λα (s, θ))dÑsα = T 0 ∂θ log(λα (s, θ))dÑsα . RT Proof of Lemma 6.1. For the 0 ...dNs part the result is immediate since for almost any ω the integral is RT simply a finite sum of terms that are differentiable in θ. For the 0 ...ds part, we first need to show that RT log(λα (s, θ))λα (s, θ∗ )ds is well defined a.s., but we have : 0 E Z 0 using the majoration |log(x)| ≤ Z 0 1 x T |log(λα (s, θ))λα (s, θ∗ )| ds < +∞, + |x − 1| and [A2]. With a similar argument we can easily show that T |∂θ log(λα (s, θ))λα (s, θ∗ )| ds ≤ Z 0 T sup ∂θ log(λα (s, θ)) λα (s, θ∗ )ds < +∞ P-a.s.. θ∈Θ Now, for a given ω such that these random variables are finite, we can conclude by applying the dominated α α (s,θ0 )[ω] when θ → θ0 , with respect to the measure convergence theorem to the function s → λ (s,θ)[ω]−λ θ−θ0 α ∗ λ (s, θ )[ω]ds. 23 The following lemma is useful to prove the Lp boundedness of stochastic integrals with respect to the processes N α or Ñ α . Lemma 6.2. let ft be a predictable process and consider the martingale Ñt = Nt − Λt (θ∗ ). Then for any p ≥ 1, α ∈ I, we have the following majoration for some constant Cp :     "Z # 2p 2p−1 Z T Z T T p . E fs dÑsα  ≤ Cp E fs2 λα (s, θ∗ )ds + Cp E  fs2 λα (s, θ∗ )ds 0 0 0 whenever the expectations are well defined. Proof of Lemma 6.2. For p = 1 it is sufficient to notice that we have :   "Z # 2 Z T T α 2 α ∗ E fs dÑs  = E fs λ (s, θ )ds 0 0 For p > 1, notice that by the Burkholder-Davis-Gundy inequality, one can write :  E Z 2p T fs dÑsα 0    ≤ Dp E  fs2 dNsα 0  2p−1 Dp E  ≤ 2p−1 T Z Z   2p−1 T fs2 dÑsα 0   + 2p−1 Dp E  And by induction, one gets for some constant Qp :   2p Z T Z p X E fs dÑsα  ≤ Qp E 0  T 0 q=1 Z T 0 2p−1 fs2 λα (s, θ∗ )ds   2p−q q ft2 λα (t, θ∗ )dt . Now we show that for any q ∈ {1, ..., p}, T Z 0 If RT 0 q ft2 λα (t, θ∗ )dt !2p−q ≤ max   Z T 0  !2p−1 Z 2 α ∗ ft λ (t, θ )dt , T 0 ft2 λα (t, θ∗ )dt = 0, we trivially get 0 ≤ 0. On the other hand, assuming gt =  RT 0 Then µ(dt) = Z 0 gt2 λα (t, θ∗ )dt T q RT ft2 λα (t, θ∗ )dt  12 . RT 0 ft2 λα (t, θ∗ )dt > 0, put !2p−q = Z T 0 q gt2 −2 µ(dt) !2p−q ≤ Z T 0 p Z 0 T q gt2 λα (t, θ∗ )dt !2p−q ( Z ≤ max 1, 0 And from the expression of g we finally get the overall result. 24 T p gt2 λα (t, θ∗ )dt −2−q ! 2p−1 p−1 2 p gt2 λα (t, θ∗ )dt gt2 λα (t, θ∗ )dt ≥ 1 or not, we can conclude 0 .  is a probability measure on [0, T ]. We thus have, by Jensen’s inequality : gt2 λα (t, θ∗ )dt Depending on whether ft p ft2 λα (t, θ∗ )dt   ) . −1 . Proof of Lemma 3.15. Without loss of generality we can assume that p is of the form p = 2q > n. For (3.4), it is sufficient to apply Lemma 6.2 to fs = λα (s, θ∗ )−1 ∂θ λα (s, θ∗ )1{λα (s,θ∗ )6=0} , along with [B2]. Following the same reasoning as for the classical approach, to get (3.5) it is sufficient to show that : MTα (θ) T θ∈Θ T γ sup p → 0, and T γ sup |VT (θ) − Y(θ)| θ∈Θ p → 0. For the first part, once again it is sufficient to apply Sobolev’s inequality and then Lemma 6.2 to get the convergence for any p > n. For the second part, we wish to use Sobolev’s inequality once again, but we need first to show that Y is of class C 1 on Θ. This is ensured by the fact that supθ∈Θ |∂θ VT (θ) − U(θ)| →P 0 for some U thanks to [B3]. Thus Y is C 1 and ∂θ Y = U. Now, using Sobolev’s inequality, there exists some constant A(Θ, p) such that : T γp  E sup |VT (θ) − Y(θ)| θ∈Θ p  ≤ A(Θ, p)T γp Z Θ p E [|VT (θ) − Y(θ)| ] dθ + Z Θ p  E [|∂θ VT (θ) − ∂θ Y(θ)| ] dθ . for any p > n. Because of the ergodicity assumption we have : T γp sup E [|VT (θ) − Y(θ)|p ] + T γp sup E [|∂θ VT (θ) − ∂θ Y(θ)|p ] → 0, θ∈Θ θ∈Θ which finally shows (3.5). (3.6) is a simple application of [B3], and finally (3.7) is a straightforward consequence of Sobolev’s inequality and Burkholder-Davis-Gundy inequality. Proof of Lemma 3.16. We first show the implication [M1] =⇒ [A3]. For T ∈ R+ , (ψ, θ) ∈ Cb (E, R) × Θ, we write Xtα (θ) = (λα (t, θ∗ ), λα (t, θ), ∂θ λα (t, θ)), and Z 1 T ψ(Xtα (θ))dt. = T 0 Define πα as above and then, evaluating the mean square error, we get VTα (θ) 2 E[(VTα (θ) − π(ψ, θ))2 ] = Var[VTα (θ)] + (E[VTα (θ) − πα (ψ, θ)]) Z ZZ 1 1 T α α ≤ Cov[ψ(Xt (θ)), ψ(Xs (θ))]dsdt + (E[ψ(Xtα (θ)) − πα (ψ, θ)])2 dt. T2 T 0 [0,T ]2 Now, using the mixing property for the first term of the right hand side leads to 1 T2 ZZ [0,T ]2 Cov[ψ(Xtα (θ)), ψ(Xsα (θ))]dsdt ≤ ≤ ZZ 1 ρ|t−s| dsdt T2 [0,T ]2 ZZ ZZ supu∈R+ ρu 1 √ ρ 1 1{|t−s|≤√T } dsdt. dsdt + {|t−s|≥ T } |t−s| T2 T2 [0,T ]2 [0,T ]2   The first term tends to 0 thanks to the mixing property, and the second term is of order O √1T . The covariance term thus tends to 0 as T → +∞. The convergence of the bias term to 0 is immediate given the convergence in distribution of the argument of ψ. 25 It remains to show [M2] =⇒ [B3]. It is sufficient to prove the L2 convergence since the convergence in Lp for any p ≥ 1 will be a straightforward consequence of the boundedness of moments of the intensity. Write the rescaled bias-variance decomposition E[T 2γ (VTα (θ) − π(ψ, θ))2 ] = ≤ ≤ 2 T 2γ Var[VTα (θ)] + T 2γ (E[VTα (θ) − πα (ψ, θ)]) ZZ Z T 2γ−2 Cov[ψ(Xtα (θ), ψ(Xsα (θ)]dsdt + T 2γ−1 [0,T ]2 T 0 2 (E[ψ(Xtα (θ) − πα (ψ, θ)]) dt A1 (T, θ) + A2 (T, θ). Thanks to [M2], we have uniformly in θ ∈ Θ that E[ψ(Xtα (θ) − πα (ψ, θ)] = o(t−γ ), and thus the fact that supθ∈Θ A2 (T, θ) → 0 is clear. For A1 (T, θ), take some 0 < δ < 1 to be defined later and write A1 (T, θ) ≤ T ≤ T 2γ−2 ZZ [0,T ]2 2γ−2 ZZ [0,T ]2 ρ|t−s| dsdt 1{|t−s|≥T δ } ρ|t−s| dsdt + T 2γ−2 ZZ sup ρu u∈R+ [0,T ]2 1{|t−s|≤T δ } dsdt. A short computation leads to the two following dominations (uniformly in θ ∈ Θ) : ZZ  T 2γ−2 1{|t−s|≥T δ } ρ|t−s| dsdt = o T 2γ−ǫδ , [0,T ]2 ZZ  T 2γ−2 sup ρu 1{|t−s|≤T δ } dsdt = O T 2γ+δ−1 , u∈R+ [0,T ]2 and consequently both terms can be controlled if there exists δ such that 2γ − ǫδ ≤ 0 and 2γ + δ − 1 < 0, that is, if 2γ ǫ < 1 − 2γ. But this is exactly the above-stated condition on ǫ. 6.2 Proofs of Section 4 Proof of Proposition 4.4. Only the third point remains to be proved. We first notice that, for α ∈ I, α α E|λ (t) − λ̄ (t)| = E XZ t− 0 β∈I  XZ  ≤ E β∈I 0 hαβ (t − t− s)dNsβ − XZ β∈I t− hαβ (t − s)dN̄sβ −∞ hαβ (t − s)d N β − N̄ β s   XZ  +E 0 −∞ β∈I    XZ t XZ β β    ≤ E hαβ (t − s) λ (s) − λ̄ (s) ds + E β∈I 0 β∈I where N β − N̄ β is the counting measure such that ∆ N β − N̄ β that the expression of its compensator is λβ (s) − λ̄β (s) . Let ftα s λα (t) − λ̄α (t) = rtα = β∈I 0 −∞ 1  hαβ (t − s)λ̄β (s)ds . 26 hαβ (t − s)λ̄β (s)ds 0 −∞  hαβ (t − s)λ̄β (s)ds , = ∆Nsβ − ∆N̄sβ . In [10], the authors show and  XZ  E  Finally we define the convolution product between two functions as Z t φ ∗ ψ(t) = φ(t − s)ψ(s)ds 0 and the convolution product between two multidimensional applications U : R+ → Rm,n and V : R+ → Rn,q as U ∗ V : R+ → Rm,q such that n X (U ∗ V )i,j (t) = Ui,k ∗ Vk,j (t). k=1 The above equation can thus be rewritten in the following vector form : ≤ rt + h ∗ f (t), ft and by an immediate induction one gets for any n ∈ N that ft n X ≤ k=0 h∗k ∗ r(t) + h∗(n+1) ∗ f (t). Now, for a multidimensional application U : R+ → Rm,n , write the norm kU k1,Leb m X n Z X = i=1 j=1 0 +∞ |Ui,j (t)|dt. Since all f α ’s are bounded, say, by some Kf ∈ R+ , it is immediate to see that |h∗n ∗ f (t)| ≤ Kf kh∗n k1,Leb ≤ Kf |Φn | → 0 as ρ(Φ) < 1. Thus we can define the process R +∞ X = k=0 h∗k ∗ r and notice that, first, ft ≤ Rt , and that R is a solution to the Markov renewal equation R = r + h ∗ R. This type of equations is deeply studied in [4], chapter VII. Let us define Φq as Φq = Z +∞ eqt h(t)dt. 0 It is shown in Theorem 4.6 of [4], chapter VII, that if Φ0 = Φ is irreducible, and if there exists a real q such that ρ(Φq ) = 1, then for every α ∈ I  ftα ≤ Rα (t) = O e−qt . h i c Φ is obviously irreducible since all its coefficients are positive. Now, as for q sufficiently small Φq = aαβαβ−q , the application q → ρ(Φq ) is continuous, ρ(Φ0 ) < 1 and ρ(Φq ) → +∞ as q → +∞ and thus Theorem 4.6 from [4] applies. 27 Proof of Proposition 4.5. The Markovian property of the elementary excitations is a well-known result, see [28]. The V -geometric ergodicity has also been proved for a linear V , see [2]. The case of an exponential V follows a very similar procedure. As in [2], we need to apply Theorem 6.1 from [24]. Define L the infinitesimal generator of E. If for some V , c > 0, and f < ∞, the following drift criterion holds −cV (ǫ) + f , ǫ ∈ Rd×d + , LV (ǫ) ≤ and if every compact set is petite (see [25]), then Theorem 6.1 of [24] applies and E is V -geometrically ergodic. We first show the drift condition, and postpone the second property to Lemma 6.3 below. Let us take some M ∈ Rd×d to be fixed later. It is not hard to see that the infinitesimal generator of E has the following + representation X Lf (ǫ) = α∈I λα (f (ǫ + C̃α ) − f (ǫ)) − X aαβ ∂ǫαβ f (ǫ)ǫαβ , α,β∈I P with the obvious notation λβ = νβ + γ∈I ǫβγ , and where C̃α is the matrix whose elements are all zeros except for the α-th column wich is the α-th column of C. Applied to the V of the proposition, we get LV (ǫ) V (ǫ) = X λβ (e P α∈I mαβ cαβ β∈I − 1) − X aαβ mαβ ǫαβ . α,β∈I Consider now some continuous function ξ such that ξ(x) = o(x) on a vicinity of 0 and such that the following Taylor expansion holds : X P e α∈I mαβ cαβ − 1 ≤ mαβ cαβ + ξ(|M |). α∈I We thus get LV (ǫ) V (ǫ) ≤ X νβ β∈I X α∈I (mαβ cαβ + ξ(|M |)) + X ǫβγ X α∈I β,γ∈I (mαβ cαβ + ξ(|M |)) − X aαβ mαβ ǫαβ . α,β∈I Consider now κ ∈ (R+ )d an eigenvector of ΦT , the transposed matrix of Φ, associated to ρ(Φ), and put for any α, β ∈ I mαβ = κα . aαβ Such eigenvector exists thanks to Perron-Frobenius theorem. It is easy to see that we have then LV (ǫ) V (ǫ) ≤ (ρ(Φ) − 1) X (κβ + dξ(|κ|))ǫβγ + β,γ∈I X νβ (κβ + dξ(|κ|)). β∈I Let us fix c > 0. Consider the set K =    2 ǫ ∈ Rd+ (ρ(Φ) − 1) X (κβ + ξ(|κ|))ǫβγ + β,γ∈I X β∈I Since ρ(Φ) − 1 < 0, K is a compact set. We have thus : 28 νβ (κβ + dξ(|κ|)) ≥ −c    . LV (ǫ) ≤ −cV (ǫ) + sup |LV (y)| + c sup V (y), y∈K y∈K which is the desired drift condition. We now show in the following lemma that E is a ψ-irreducible T-chain. See [25], Chapters 4 and 6, for more information about this concept. Lemma 6.3. For t ∈ R+ , let Qt be the transition kernel associated to E(t), i.e. for any ǫ ∈ Rd×d and + d×d A ∈ B(R+ ), Qt (ǫ, A) = P[E(t) ∈ A|E(0) = ǫ]. E verifies the following properties : (i) E is a T-chain, i.e. there exists a non-trivial kernel T such that for any A ∈ B(Rd×d + ), T(., A) is lower semi-continuous, and Q(., A) ≥ T(., A). (ii) E is ψ-irreducible. Every compact set is thus a petite set. We denote by (Tn )n∈N the stopping times associated to the jumps of N . In other words, Tk represents the time of the k-th jump of N , and we arbitrarily define T0 = 0. We also write ∆Tn = Tn − Tn−1 and finally Kn for the label in I for which the jump has occured, i.e. Kn is a random variable that takes values in I and that is the only β ∈ I such that ∆NTβn = 1. The following result is well-known : P P Lemma 6.4. for an initial state E(0) = ǫ, write µα (t, ǫ) = να + β∈I ǫαβ e−aαβ t , and µ(t, ǫ) = α∈I µα (t, ǫ). Then : (i) ∆T1 has the distribution density (with respect to Lebesgue measure) f ∆T1 (t|E(0) = ǫ) = f (t, ǫ) = µ(t, ǫ)e− (ii) Moreover, conditionnally to ∆T1 , K1 has the distribution P[K1 = β|∆T1 , E(0) = ǫ] = Rt 0 µ(s,ǫ)ds β µ (∆T1 ,ǫ) µ(∆T1 ,ǫ) . Proof of Lemma 6.3. By an immediate application of the strong Markovian property and Lemma 6.4, we easily get that for any j ≥ 1, f ∆Tj (t|E(Tj−1 )) = f (t, E(Tj−1 )), and P[Kj = β|∆Tj , E(Tj−1 )] = µβ (∆Tj , E(Tj−1 )) , µ(∆Tj , E(Tj−1 )) and thus, the joint density of (∆T1 , K1 , ..., ∆Tn , Kn ) given E(0) = ǫ can be written as f (∆T1 ,K1 ,...,∆Tn,Kn ) (t1 , k1 , ..., tn , kn |ǫ) = µkn (tn , ǭ(t1 , k1 , ..., tn−1 , kn−1 |ǫ)) f (tn , ǭ(t1 , ..., tn−1 , kn−1 |ǫ)) × ... µ(tn , ǭ(t1 , k1 , ..., tn |ǫ)) ... × µk1 (t1 , ǫ) f (t1 , ǫ), µ(t1 , ǫ) where ǭ(t1 , k1 , ..., tj , kj |ǫ) is the value of E(Tj ) when (∆T1 , K1 , ..., ∆Tn , Kn ) = (t1 , k1 , ..., tj , kj ), i.e. 29 . ǭαβ (t1 , k1 , ..., tj , kj |ǫ) = e−(t1 +...+tj ) ǫαβ + X cαβ e−aαβ (ti+1 +...+tj ) . i≤j|ki =β Note that in particular both ǭ(t1 , k1 , ..., tj , kj |ǫ) and f (∆T1 ,K1 ...,∆Tn,Kn ) are C ∞ in (t1 , ..., tn ) and in ǫ. We now show that Qt has a lower semi-continuous component T. To do this, consider first the following domination, for ǫ ∈ Rd×d and A ∈ B(Rd×d + + ) : Qt (ǫ, A) = P[E(t) ∈ A|E(0) = ǫ]  ≥ P {E(t) ∈ A} ∩ {#{j|Tj ≤ t} = d2 } ∩ \n ∆NTβ(β−1)d+i β∈I  o = 1, i ≤ d |E(0) = ǫ . We thus select only events for which there are exactly d2 jumps before t, and the first d jumps occur on N , the next d ones occur on N 2 , and so on. In that case, the value of E(t) is completely determined by (t, T1 , ..., Td2 ), and has the form 1 ǭαβ (t, T1 , ..., Td2 |ǫ) = ǫαβ e−aαβ t + X cαβ e−aαβ (t−T1 +...+Ti ) . (β−1)d≤i≤βd−1 2 Again, ǫ → ǭ(t, t1 , ..., td |ǫ) is C ∞ in ǫ. For conciseness, we write φn (t1 , ..., tn |ǫ) for f (∆T1 ,K1 ,...,∆Tn,Kn ) (t1 , k1 , ..., tn , kn |ǫ) with each ki equal to the unique β such that (β − 1)d ≤ i ≤ βd − 1 and kd2 +1 is any arbitrary β (it plays no role). We have thus Qt (ǫ, A) ≥ Z ··· Z 2 +1 d R+ 1{ǭ(t,t1 ,...,td2 |ǫ)∈A} 1{t1 +...+td2 <t}∩{t1 +...+td2 +1 >t} φd2 +1 (t1 , ..., td2 |ǫ)dt1 ..dtd2 +1 . Since the indicator 1{ǭ(t,t1 ,...,td2 |ǫ)∈A} is not lower semi-continous in ǫ whenever A is not open, we need to remove the dependency of this term in ǫ by a change of variable. Consider the transformation Ψǫ : (t1 , ..., td2 ) → Ψǫ (t1 , ..., td2 ) = ǫ(t, t1 , ..., td2 |ǫ). Ψǫ is clearly C ∞ in its argument and in ǫ. We write JΨǫ (t1 , ..., tn ) = |det∇Ψǫ (t1 , ..., tn )| the determinant of the Jacobian matrix of Ψǫ at the point (t1 , ..., tn ). Tedious but straightforward computation leads to the following representation of the Jacobian : ∗ ··· ∗ M2 (t1 , ..., t2d ) · · · .. .. . . ∗ .. . M1 (t1 , ..., td ) 0 .. . JΨǫ (t1 , ..., td2 ) = ··· 0 = Y ··· Md (t1 , ..., td2 ) Ji (t1 , ..., tid ), i∈I where Jk (t1 , ..., tkd ) = detMk (t1 , ..., tkd ). Note that in particular it does not depend on ǫ. Thus it is sufficient to show that under some conditions, each Jk 6= 0. Again, after elementary linear operations on the Mk ’s, it is possible to represent |Jk | as follows : 30 1 Jk (t1 , ..., tkd ) = Y e cik aik e−aik (t−t1 −...−t1+(k−1)d ) a1k t2+(k−1)d .. . i∈I ea1k (t2+(k−1)d +...+tdk ) ··· ··· ··· .. . ··· .. . ··· ··· 1 e adk t2+(k−1)d .. . . ea1k (t2+(k−1)d +...+tdk ) Telling if Jk 6= 0 is not easy for general (t1 , ..., td2 ). On the other hand, if there exists k ∈ I and two indices i, j ∈ I such that aik = ajk , two columns of the determinant are equal and thus Jk = 0. Jk also vanishes if one cij = 0. For now let’s assume for simplicity that for any k ∈ I, for any i, j ∈ I, aik 6= ajk , and cij 6= 0. Note that if t1 = ... = td2 = t0 > 0, each Jk is a Vandermonde determinant, and thus Jk (t0 , ..., t0 ) = Y cik aik e−aik (t−(1+(k−1)d)t0 ) i∈I Y (e−alk t0 − e−ajk t0 ) 6= 0. j≥l By continuity, if all the ti ’s are close enough to each other, say, belong to some interval ]t0 − η, t0 + η[ for η small enough and such that t0 − η > 0, we have JΨǫ 6= 0. Writing B(t1 , ..., td2 +1 ) = {(t1 , ..., td2 ) ∈]t0 − η, t0 + η[} ∩ {t1 + ... + td2 < t} ∩ {t1 + ... + td2 +1 > t}, we have by change of variable Qt (ǫ, A) ≥ = Z Z ··· ··· Z 2 +1 d R+ Z 1{ǭ(t,t1 ,...,td2 |ǫ)∈A} 1{B(t1 ,...,td2+1 )} φd2 +1 (t1 , ..., td2 +1 |ǫ)dt1 ...dtd2 +1 2 Ψǫ (Rd + )×R+ 1{(y1 ,...,yd2 )∈A} 1{B(Ψ−1 ǫ (y1 ,...,y d2 ),td2 +1 )} ···  −1 · · · φd2 +1 Ψ−1 (y1 , ..., yd2 ), td2 +1 |ǫ JΨǫ Ψ−1 dy1 ...dyd2 dtd2 +1 . ǫ (y1 , ..., yd2 ) Finally, it is easy to see that B(Ψǫ−1 (y1 , ..., yd2 ), td2 +1 ) is a countable union of open intervals whose boundaries −1 depend continuously on ǫ, and 1B(Ψ−1 and ) is thus lower semi-continuous in ǫ. Because φd2 +1 , Ψ ǫ (y1 ,...,y 2 ),t 2 d d +1 JΨ are continuous in their component and in ǫ, this finally shows that Qt has a non-trivial lower semi-continuous component T, and E is a T-chain. Since 0 is trivially a reachable point for E, Proposition 6.2.1 in [25] implies that E is ψ-irreducible. Thus Theorem 6.2.5 (ii) in [25] implies that every compact set is petite, and we are done. Remark 3. If there exists k, i, j ∈ I such that aik = ajk = a the kernel of E is degenerate. On the other hand, one can easily see that, if cjk 6= 0, Z t cik ǫjk (t). ǫik (t) = cik e−a(t−s) dNsk = cjk 0 Thus by reducing the dimension of the state space of E, i.e. putting Ẽ = [ǫαβ ]αβ∈I2 −(i,k) , we see that Ẽ is obviously still Markovian. We can also do this operation whenever some cij is null. E˜ is then still a Markovian process but verifies the non-degeneracy conditions on A and C. In practice we can therefore assume the non-degeneracy condition, since the ergodicity of the reduced process implies obviously the ergodicity of E. We finally turn to the verification of [B2], [M2], and [B4] to complete the proof of Theorem 4.6. 31 Lemma 6.5. The parametric exponential Hawkes model verifies [B2]. Proof. Points (ii) and (iii) are immediate since for any t ∈ R+ and α ∈ I we have λα (t, θ) ≥ ν > 0. Before showing (i), note that any component of ∂θi λ(t, θ), (i ≤ 3) can be expressed as a linear combination of the following terms : ≤ ν̄, Z t− ≤ c̄(t − s)j e−a(t−s) dNsβ , 0 Z t− (t − s)j e−a(t−s) dNsβ , ≤ να Z t− cαβ (t − s)j e−aαβ (t−s) dNsβ 0 t− Z 0 (t − s)j e−aαβ (t−s) dNsβ 0 for j ≤ 3. It is thus sufficient to show that for any p > 0, α, β ∈ I, sup E t∈R+ p t− Z (t − s)j e−a(t−s) dNsβ 0 < +∞. Without loss of generality we may assume that p = 2k , k ≥ 1. Using Lemma 6.2 again, we have for some constant B depending on k only, E Z 0 2k t− j −a(t−s) (t − s) e dNsβ ≤ BE t− Z (t − s) 0 + BE Z ∗ λ (s, θ )ds + BE e Z 0 2k t− j −a(t−s) β (t − s) e 0 = 2k j −2k a(t−s) β 2k−1 t− 2j −2a(t−s) β (t − s) e λ (s, θ )ds ∗ λ (s, θ )ds I + II + III. Since for any q ∈ N, E[λ(s, θ∗ )q ] converges to a finite value whenever s → +∞ (it is an immediate consequence of the V -geometric ergodicity shown in Proposition 4.5), for all β ∈ I, we bound from above E[λβ (s, θ∗ )q ] by R +∞ some common value mq . We also write M (m, r) = 0 um e−ru du < +∞ for every m ∈ N and r > 0. To control I, write : I ≤ Bm1 Z t 0 k k (t − s)2 j e−2 a(t−s) ds ≤ Bm1 M (2k j, 2k a). To deal with II, put q = 2k−1 . If t = 0, we trivially have II = 0. When t > 0, by Jensen’s inequality applied 2as to the probability measure µ(ds) = R et e2asdsds on [0, t], we have 0 II = E Z ≤ Z ≤ Z ≤ t− 0 t e q (t − s)2j e−2a(t−s) λβ (s, θ∗ )ds 2as ds 0 t e 2as ds 0 q E q−1 Z 0 e t− q (t − s)2qj e−2aqt λβ (s, θ∗ ) µ(ds) −2a(q−1)t 1 M (2qj, 2a)mq . (2a)q−1 E Z 0 Finally III is dominated as II. 32 t− q (t − s)2qj e−2a(t−s) λβ (s, θ∗ ) ds ∗ Lemma 6.6. The parametric exponential Hawkes model verifies [M2]. Proof of Lemma 6.6. Let us deal with the mixing condition first. Consider two elements φ, ψ of D↑ (E, R). Note that since the exponential Hawkes process intensities are bounded from below it is sufficient to consider the case where φ, ψ and their derivatives are of polynomial growth in their arguments. Define thus for α ∈ I, X α (t, θ) (λα (t, θ∗ ), λα (t, θ), ∂θ λα (t, θ)), = and its truncation at s ≤ t : X̃ α (s, t, θ)  λα (t, θ∗ ), = XZ β∈I s t hαβ (t − u, θ)dNuβ , XZ β∈I We then write, for some s ≤ t − u, |Cov[φ(X(t, θ)), ψ(X(t + u, θ))]| ≤ + s t  ∂θ hαβ (t − u, θ)dNuβ  . Cov[φ(X(t, θ)), ψ(X̃(t + s, t + u, θ))] h  i Cov φ(X(t, θ)), ∇ψ(ξ(t + s, t + u, θ)) X(t + u, θ) − X̃(t + s, t + u, θ) = A1 (θ) + A2 (θ), h i where ξ(t + s, t + u, θ) ∈ X̃(t + s, t + u, θ), X(t + u, θ) . It is easy to see that, given the exponential kernel of the intensities, there exists ã, such that for any m ≥ 1, sup E X(t + u, θ) − X̃(t + s, t + u, θ) 2 = O(e−ã(u−s) ). θ∈Θ Therefore, as ψ, ∇ψ and φ are of polynomial growth, this leads to sup A2 (θ) = O(e−ã(u−s) ) θ∈Θ For a random variable φ(Z), we now write φ̂(Z) for φ(Z) − E[φ(Z)]. We thus have A1 (θ) = = = h i E φ̂(X(t, θ))ψ̂(X̃(t + s, t + u, θ)) h h ii E E φ̂(X(t, θ))E ψ̂(X̃(t + s, t + u, θ)) | Ft+s h ii h E φ̂(X(t, θ))E ψ̂(X̃(t + s, t + u, θ)) | Et+s , where we have applied the strong Markovian property to thehprocess ψ̂(X̃(t + s, t + u, θ)) i which is measurable with respect to the σ-algebra σ{Ev |t + s ≤ v ≤ t + u}. As E ψ̂(X̃(t + s, t + u, θ)) | Et+s is a function of Et+s , u − s and θ, we denote it by F (Et+s , u − s, θ). Note that F (Et+s , u − s, θ) is centered. We thus get A1 (θ) = = = h i E φ̂(X(t, θ))F (Et+s , u − s, θ) h i  E φ̂(X(t, θ))E F (Et+s , u − s, θ)|FtE i h E φ̂(X(t, θ))E [F (Et+s , u − s, θ)|Et ] , 33 using once again the strong Markovian property. Again, because of the poynomial growth of ψ and the uniform boundedness of the moments of Ev in v ∈ R+ , one can easily check that F (Et+s , u − s, θ) can be bounded from above uniformly of u − s and θ, and √ in u − s and θ by some measurable random variable F (Et+s ) independent √ dominated by V up to a multiplication by a constant factor. Finally, as E is also V -geometrically ergodic (see [25], lemma 15.2.5), we have that, since F (Et+s , u − s, θ) is centered, |E [F (Et+s , u − s, θ)|Et ]| ≤ Rrs From here, we can conclude for A1 (θ) that A1 (θ) ≤ p V (Et ). i h p Rrs E φ̂(X(t, θ)) V (Et ) and thus, using Cauchy-Schwarz inequality and the uniform boundedness of E [V (Et )], (it is an easy consequence of Dynkin’s formula, see e.g. [24]), we get that s sup A1 (θ) ≤ Rr sup E θ∈Θ θ∈Θ  φ̂(X(t, θ)) 2  21 1 E[V (Et )] 2 , thus A1 (θ) = O(rs ). Setting s = u2 , we finally get that there exists some r̃ < 1 such that sup |Cov[φ(X(t, θ)), ψ(X(t + u, θ))]| = O(r̃u ), θ∈Θ which shows the mixing condition with an exponential rate. We now turn to the stability condition. As in [M2], for a process Y , Ȳ designates its stationary version if it exists. We have   tγ E φ(X(t, θ)) − φ(X̄(t, θ))   ≤ tγ E |∇φ(ξ(t, θ))| X(t, θ) − X̄(t, θ) for some ξ(t, θ) ∈ [X(t, θ), X̄(t, θ)]. The right hand side can be split as follows :   tγ E |∇φ(ξ(t))| X(t, θ) − X̄(t, θ) ≤ ≤    tγ E |∇φ(ξ(t))| 1{∇φ(ξ(t))≤t1+γ } + 1{∇φ(ξ(t))>t1+γ } X(t, θ) − X̄(t, θ) i h 3 t1+2γ |X(t, θ) − X̄(t, θ)| 1 + t−1 E |∇φ(ξ(t))| X(t, θ) − X̄(t, θ) . Finally, thanks to Proposition 4.4 (iii), and because each X α (t, θ) − X̄ α (t, θ) can be represented as a sum of integrals with respect to the measures dN β − dN̄ β for β ∈ I, |X(t, θ) − X̄(t, θ)| 1 is exponentially decreasing uniformly in θ and thus the first term on the right hand side tends to zero. For the second term, it is sufficient to notice that the expectation is uniformly bounded in t and θ. Lemma 6.7. The exponential Hawkes model statisfies the non-degeneracy condition [B4]. Proof. We first show that whenever θ 6= θ∗ , Y(θ) 6= 0. consider thus θ ∈ Θ and assume that Y(θ) = 0. As  X  λ̄α (t, θ) α α α ∗ ∗ −Y(θ) = E λ̄ (t, θ) − λ̄ (t, θ ) − log α λ̄ (t, θ ) , λ̄ (t, θ∗ ) α∈I 34 and, for any α ∈ I, λ̄α (t, θ) − λ̄α (t, θ∗ ) − log λ̄α (t, θ) α λ̄ (t, θ∗ ) ≥ λ̄α (t, θ∗ ) 0, we thus have λ̄α (t, θ) − λ̄α (t, θ∗ ) − log λ̄α (t, θ) α λ̄ (t, θ∗ ) λ̄α (t, θ∗ ) = 0 P-a.s., and it is easy to see that this in turn implies that for any t ∈ R+ , and any α ∈ I, λ̄α (t, θ) = λ̄α (t, θ∗ ) P-a.s. Now, as the trajectories of λ(., θ) are left continuous for any θ ∈ Θ, we can conclude that P-a.s., the whole trajectories of λ(., θ) and λ(., θ∗ ) coincide. We have thus, P-a.s., να − να∗ XZ = β∈I t −∞   ∗ c∗αβ e−aαβ (t−s) − cαβ e−aαβ (t−s) dN̄sβ , (6.1) but as the left hand side is constant, the right hand side, which is a jump process, must have jumps of size zero, and thus C = C ∗ . It is then easy to see that the right hand side is now C 1 in the variable t, and its derivative must be zero. Taking the derivative on both side this gives 0 = XZ β∈I t −∞   ∗ c∗αβ a∗αβ e−aαβ (t−s) − cαβ aαβ e−aαβ (t−s) dN̄sβ . Provided that the cαβ are non zeros, we get that A = A∗ . Finally the right side of (6.1) vanishes and ν = ν ∗ . We now turn h to the proof of the second part i of the lemma. [B4] holds true if the Fisher information P 1 α ∗ T α ∗ matrix Γ = α∈I E λ̄α (t,θ∗ ) ∂θ λ̄ (t, θ )∂θ λ̄ (t, θ ) is positive definite. Let us rewrite the elements of θ in the   following order : First a11 · · · a1d c11 · · · c1d ν1 , the parameters involved in the writing of λ̄1 (., θ∗ ),   2d+1 d ) , such that then those involved in the writing of λ̄2 (., θ∗ ) and so on. Fix thus x = x1 · · · xd ∈ (R+ xT Γx = 0, and let us show that x = 0. As the expression of Γ is a block diagonal matrix, we have for any t ∈ R+ that 0 = xT Γx  X = xTα E  1 α ∗ T α ∗ ∂θ λ̄ (t, θ )∂θ λ̄ (t, θ ) xα λ̄α (t, θ∗ ) α∈I  X  2 1 α ∗ = E α ∂θ λ̄ (t, θ )xα . λ̄ (t, θ∗ ) α∈I As for the first part of the proof, it implies that for any α ∈ I the following process is null almost surely : ∂θ λ̄α (., θ∗ )xα = 0 P-a.s. In particular it admits derivatives and those derivatives have no jumps. Writing xα = (xα,a , xα,c , xα,ν ), by an immediate induction we get for any n ≥ 1 and any α, β ∈ I 35 n−1 β ncαβ aαβ xα,a − anαβ xβα,c = 0, and thus cαβ xβα,a − aαβ β x n α,c = 0. Taking n → +∞, we get xβα,a = 0 and thus xβα,c = 0. Finally, this implies that 0 = ∂θ λ̄α (., θ∗ )xα = xα,ν , and thus xα = 0. References [1] F. Abergel and A. Jedidi. A mathematical approach to order book modeling. International Journal of Theoretical and Applied Finance, 16(05):1350025, 2013. [2] F. Abergel and A. Jedidi. Long time behaviour of a hawkes process-based limit order book. Available at SSRN 2575498, 2015. [3] R. A. Adams and J. J. Fournier. Sobolev spaces, volume 140. Academic press, 2003. [4] S. Asmussen. Applied probability and queues, volume 51. Springer Science & Business Media, 2008. [5] E. Bacry, S. Delattre, M. Hoffmann, and J.-F. Muzy. Modelling microstructure noise with mutually exciting point processes. Quantitative Finance, 13(1):65–77, 2013. [6] E. Bacry, T. Jaisson, and J.-F. Muzy. Estimation of slowly decreasing hawkes kernels: Application to high frequency order book modelling. arXiv preprint arXiv:1412.7096, 2014. [7] E. Bacry, I. Mastromatteo, and J.-F. Muzy. Hawkes processes in finance. arXiv preprint arXiv:1502.04592, 2015. [8] P. Billingsley. Ergodic theory and information. 1965. [9] J.-P. Bouchaud, J. D. Farmer, and F. Lillo. How markets slowly digest changes in supply and demand. Fabrizio, How Markets Slowly Digest Changes in Supply and Demand (September 11, 2008), 2008. [10] P. Brémaud and L. Massoulié. Stability of nonlinear hawkes processes. The Annals of Probability, pages 1563–1588, 1996. [11] R. Cont and A. De Larrard. Order book dynamics in liquid markets: limit theorems and diffusion approximations. Available at SSRN 1757861, 2012. [12] R. Cont and A. De Larrard. Price dynamics in a markovian limit order market. SIAM Journal on Financial Mathematics, 4(1):1–25, 2013. [13] R. Cont, S. Stoikov, and R. Talreja. A stochastic model for order book dynamics. Operations research, 58(3):549–563, 2010. [14] J. Hájek. Local asymptotic minimax and admissibility in estimation. In Proceedings of the sixth Berkeley symposium on mathematical statistics and probability, volume 1, pages 175–194, 1972. [15] A. G. Hawkes. Point spectra of some mutually exciting point processes. Journal of the Royal Statistical Society. Series B (Methodological), pages 438–443, 1971. 36 [16] W. Huang, C.-A. Lehalle, and M. Rosenbaum. Simulating and analyzing order book data: The queuereactive model. Journal of the American Statistical Association, 110(509):107–122, 2015. [17] W. Huang and M. Rosenbaum. Ergodicity and diffusivity of markovian order book models: a general framework. arXiv preprint arXiv:1505.04936, 2015. [18] I. A. Ibragimov and R. Z. Has’minskii. Statistical estimation: asymptotic theory, volume 16. Springer Science & Business Media, 2013. [19] J. Jacod and A. Shiryaev. Limit theorems for stochastic processes, volume 288. Springer Science & Business Media, 2013. [20] O. Kallenberg. Foundations of modern probability. Springer Science & Business Media, 2006. [21] Y. A. Kutoyants. Parameter estimation for stochastic processes, volume 6. Heldermann, 1984. [22] Y. A. Kutoyants. Statistical inference for spatial Poisson processes, volume 134. Springer Science & Business Media, 2012. [23] S. P. Meyn and R. L. Tweedie. Stability of markovian processes ii: continuous-time processes and sampled chains. Advances in Applied Probability, pages 487–517, 1993. [24] S. P. Meyn and R. L. Tweedie. Stability of markovian processes iii: Foster-lyapunov criteria for continuoustime processes. Advances in Applied Probability, pages 518–548, 1993. [25] S. P. Meyn and R. L. Tweedie. Markov chains and stochastic stability. Springer Science & Business Media, 2012. [26] S. Mike and J. D. Farmer. An empirical behavioral model of liquidity and volatility. Journal of Economic Dynamics and Control, 32(1):200–234, 2008. [27] I. Muni Toke. The order book as a queueing system: average depth and influence of the size of limit orders. Quantitative Finance, 15(5):795–808, 2015. [28] D. Oakes. The markovian self-exciting process. Journal of Applied Probability, pages 69–77, 1975. [29] Y. Ogata. The asymptotic behaviour of maximum likelihood estimators for stationary point processes. Annals of the Institute of Statistical Mathematics, 30(1):243–261, 1978. [30] T. Ogihara and N. Yoshida. Quasi likelihood analysis for point process regression models. preprint, 2015. [31] T. Ozaki. Maximum likelihood estimation of hawkes’ self-exciting point processes. Annals of the Institute of Statistical Mathematics, 31(1):145–155, 1979. [32] Y. Potiron. Estimating the integrated parameter of the locally parametric model in high-frequency data. Working paper, 2015. [33] M. L. Puri and P. D. Tuan. Maximum likelihood estimation for stationary point processes. Proceedings of the National Academy of Sciences, 83(3):541–545, 1986. [34] E. Smith, J. D. Farmer, L. s. Gillemot, S. Krishnamurthy, et al. Statistical theory of the continuous double auction. Quantitative finance, 3(6):481–514, 2003. [35] I. M. Toke. ” market making” behaviour in an order book model and its impact on the bid-ask spread. arXiv preprint arXiv:1003.3796, 2010. [36] I. M. Toke. Stationary distribution of the volume at the best quote in a poisson order book model. arXiv preprint arXiv:1502.03871, 2015. [37] P. D. Tuan. Estimation of the spectral parameters of a stationary point process. The Annals of Statistics, pages 615–627, 1981. 37 [38] M. Uchida and N. Yoshida. Information criteria in model selection for mixing processes. Statistical Inference for Stochastic Processes, 4(1):73–98, 2001. [39] N. Yoshida. Polynomial type large deviation inequalities and quasi-likelihood analysis for stochastic differential equations. Annals of the Institute of Statistical Mathematics, 63(3):431–479, 2011. [40] B. Zheng, F. Roueff, and F. Abergel. Modelling bid and ask prices using constrained hawkes processes: Ergodicity and scaling limit. SIAM Journal on Financial Mathematics, 5(1):99–136, 2014. 38
10math.ST
Half-CNN: A General Framework for Whole-Image Regression Jun Yuan National University of Singapore Singapore 117583 Bingbing Ni Advanced Digital Sciences Center Singapore 138632 Ashraf A.Kassim National University of Singapore Singapore 117583 [email protected] [email protected] [email protected] Abstract The Convolutional Neural Network (CNN) has achieved great success in image classification. The classification model can also be utilized at image or patch level for many other applications, such as object detection and segmentation. In this paper, we propose a whole-image CNN regression model, by removing the full connection layer and training the network with continuous feature maps. This is a generic regression framework that fits many applications. We demonstrate this method through two tasks: simultaneous face detection & segmentation, and scene saliency prediction. The result is comparable with other models in the respective fields, using only a small scale network. Since the regression model is trained on corresponding image / feature map pairs, there are no requirements on uniform input size as opposed to the classification model. Our framework avoids classifier design, a process that may introduce too much manual intervention in model development. Yet, it is highly correlated to the classification network and offers some in-deep review of CNN structures. 1. Introduction Figure 1: Example applications of the CNN regression model. The top two rows demonstrate our model on simultaneous face detection and segmentation, and the bottom two rows demonstrate our model on scene saliency prediction. The columns correspond to the input images, ground truth feature maps, network output and results interpretation. The image classification techniques have evolved vastly in recent years, from Bag-of-Visual-Words (BoVW) [1, 2], Fisher Vector (FV) Encoding [3], to the state-of-the-art Convolutional Neural Network (CNN) [4]. The BoVW and FV models typically consist of a pipeline, with cascading processes of feature description, dictionary building and feature encoding, pooling over image and classification. A linear SVM classifier is used at final stage, and the whole process can be considered as a nonlinear classification model on images. These techniques have been extensively studied in [5, 6]. The CNN classification model consists of several convolution blocks followed by fully connected layers. Each convolution block consists of a convolution layer with a non-linear activation, a pooling layer, and sometimes a local normalization layer [7]. The fully connected layer can be considered as a final pooling layer, which feeds the image feature to the classifier. The CNN model typically uses a softmax classifier at the training stage. After training, the softmax classifier is often replaced by an SVM classifier on the final image representations, for improved classification performance. Sometimes the SVM is directly used in the network training process. The key advance of CNN lies in its ability to learn adaptive features, as opposed to the hand-crafted features like SIFT [8] in BoVW and FV models. These handcrafted features are intuitive for human perception; they can also be considered as a shallow network. The former convolution blocks in CNN perform similar tasks as these feature detectors; however the learned features are more optimized for the given task. Similar statements hold for the encoding process. The linear SVM classifier at output is also a shallow network. Thus the classification pipeline can be treated as a (relatively) shallow network consisting of hand-crafted function blocks, whereas CNN is a deep 1 network consisting of optimized blocks. This explains the great success of CNN in classification tasks. The CNN classification model achieves state-of-the-art performance on classification datasets such as ImageNet ILSVRC [9] and PASCAL VOC challenges [10]. A comprehensive study can be found in [11]. The pre-trained ImageNet model [12, 13, 14] is also successful in generalizing to other image classification datasets. The CNN is also widely applied on non-classification tasks, such as object detection [15, 16] and segmentation [17, 16]. The model can be either applied on image level, or patch level with information aggregation. The ImageNet pre-trained model is also widely used in these applications. However, it seems that CNN is not so widely used in regression tasks, which is also a fundamental problem in machine learning. Regression and classification problems are highly correlated [18], and can be transferred to the other in many scenarios. For example, the softmax classifier is related to the softmax regression [19], and the SVM classifier is based on geometric regression. It is natural to develop a deep CNN model for regression tasks as a counterpart of classification. In this paper, we propose a simple but generic 2D CNN regression model. By removing the fully connected layer(s) in the classification network, we yield a network output that is locally correlated with network input (due to the locality of convolution operation); this is also the key characteristic of local regression models. The final output feature map is generated through a linear combination of convolution channels, which can be considered as a partially connected layer. Thus we can get a 2D local regression network out of the classification network. We also propose an up-sampling layer to reduce the downsampling effects from pooling operations. The relationship between the classification and regression networks is discussed in detail in section 5. The ground truth to train the regression network are feature maps generated from input images. The size of the maps is related with input images, either identical or with a pre-defined down-sampling factor. These two scenarios correspond to the convolution and pooling operations in the neural network. Since there is no fully connected layer, our model does not pose a requirement on identical input size, which can be a problem in the CNN classification model. We apply the above framework to two applications: simultaneous face detection & segmentation and saliency prediction. In the former task, the ground truth feature maps are generated by fitting a 2D Gaussian density function inside the detection window. The trained network can not only recover the position of faces, but also output the segmented face regions on the feature map. The saliency prediction is a natural application of our network, since the ground truth is already given in real-value feature maps. We demonstrate the effectiveness of our work through a small scale regression network. 2. Related Work Face detection is an important task in computer vision. There are various models from the appearance to learning based models [20, 21, 22, 23]. The classical models are extensively studied in [24]. The CNN models are recently developed into this field [25]. This paper uses convolution to generate feature maps, and a SVM classifier to detect face windows. This approach is similar to the part-based model object detection [26]. Some other face detection algorithms are implemented through segmentation [27, 28]; the idea is close to our framework. However, our network does not need to include any specific knowledge for facial features, e.g. skin color, to the detection or segmentation task. The features are fully learned without manual crafting in our network. Face detection can also be combined with simultaneous face landmark localization [29, 30, 31]. Part of our work is based on Y. Sun et al. [31], where a CNN model is applied to detect face landmarks. A three-level cascaded network is used to predict face landmark through a coarse-to-fine localization process. Their network also uses a regression model, but different from ours. In their approach, the network outputs several locations as a fixed-size set of real numbers, which can be considered as a mapping from the 2D real domain to the 1D real domain, i.e. a 2D-1D mapping. The CNN classification model maps images to a fixed finite countable set which can be considered as a 2D0D mapping. A fully connected layer is needed whenever there is dimension reduction from the input to the output. As a comparison, our CNN regression model is a 2D-2D mapping between images and feature maps, where the full connection is avoided. The work [31] can be considered as a bridge between the classification CNN model and our model. We also test the face landmark localization in our framework. However, this task heavily depends on the knowledge of spatial relationship between face landmark points, and a pure texture approach like ours to give independent predictions of landmarks is not ideal. The CNN localization model in Y. Sun et al. [31] also utilizes the spatial relationship of landmarks implicitly through a global-to-local refinement. We shall briefly discuss this point in section 4. Saliency prediction is another important study field, serving as a bridge between computer vision and human perception. The saliency prediction models evolved from Itti [32], GBVS [33], detection / segmentation models [34, 35], and to more recent CNN-based models [36, 37]. An extensive study of classical models can be found in [38]. A comparison of these models can be found in [39]. 2 Input Image Max-Pooling Convolution Convolution Max-Pooling Up-sampling Linear Combination Figure 2: A Schematic of CNN Regression Model. The up-sampling layer is used to maintain the feature size, and the output is produced by a linear combination on convolution channels. These two layers are specific in our framework. There are two types of saliency models: bottom-up and up-to-down saliency model. The former is typically more focused on human perception process and low level image information, whereas the latter is more related to scene knowledge on interest objects. The latter is also highly related to object detection and segmentation; some models explicitly use detection and segmentation techniques to give saliency predictions [34, 35]. The recent CNN models also offer competitive performance in this field. The eDN [37] uses a large number of randomly initialized CNNs, picking those with good performance and aggregates their output feature maps to give predictions. The latter Deep Gaze I [36] uses ImageNet pre-trained network without the full connection layer, and learns a weight on linear combination of convolution channels. This model offers the state-of-the-art performance. Our model has a structure similar to the Deep Gaze model, but trained in a different way without using classification information. Since saliency information is provided as feature maps, this is a natural application fits into our framework. We use the CNN regression model to train the saliency model and give comparative studies in section 4. There is also a detailed discussion in section 5. The above function computes the feature response at location (𝑥, 𝑦) by normalizing the responses at the same location in its 𝑁 neighboring channels. In practice, the normalization layer can offer limited performance gain, and is used only in the first two convolution blocks in our experiments. There is a limit on the amount of pooling layers that can be used in our network, due to the size limitation of the ground truth feature maps. For example, if the feature map is 4× times smaller than the original image, we can only use two max-pooling layers with a down-sampling factor 2. There are several ways to get around this: We can either to use pooling with a stride of 1, or use convolution without pooling in the following blocks. However, these two methods reduce the non-linearity of the network, which is not a desired property. In this paper, we propose an up-sampling layer, to maintain the size of intermediate features in the network. The up-sampling layer follows the pooling layer and restores the size of pooled features, while retaining the non-linearity of the network. The up-sampling function is defined as follows: 𝐴𝑖+1 (𝑝𝑥 − 𝑝 + 1: 𝑝𝑥, 𝑝𝑦 − 𝑝 + 1: 𝑝𝑦) = 𝐴𝑖 (𝑥, 𝑦) 3. Implementation Details where 𝑝 is the down-sampling factor used in the pooling layer, typically of the value 2. The above function copies a value from the pooled features to a 𝑝×𝑝 block in the following up-sampling layer. The back-propagation rule of this layer is just the average-pooling layer in the reverse direction, with a scale of 𝑝2 . Since each block in the upsampling layer consists of the same value, the backpropagation principal of this layer can be simplified as: Our network consists of several convolution blocks and an output layer. The convolution blocks follow structure of [7], and the output layer combines all the feature channels through a linear combination. Convolution blocks. Each convolution block includes a convolution layer, a ReLU activation, and a pooling layer with a down-sampling factor of 2. Max-pooling is used in as the pooling function. A normalization layer introduced in [7] can also be used after the pooling layer, with the local normalization function below: 𝑑𝐴𝑖 (𝑥, 𝑦) = 𝑝2 𝑑𝐴𝑖+1 (𝑝𝑥, 𝑝𝑦) Output Layer. The output layer combines the feature channels from the last convolution block through a linear combination. Then a sigmoid activation function is applied to produce the final output. The layer forward and back propagation rules are shown below: 𝛽 𝑏𝑥,𝑦 = 𝑎𝑥,𝑦 / (𝑘 + 𝛼 ∑ 2 (𝑎𝑥,𝑦 )) 𝑗∈𝑁(𝑗) 3 derivative of the output feature map to ensure correct gradient computation. This technique cannot be applied on the classification network, since the fully connected layer requires proper arrangement of features. Applying masks will interrupt the pre-defined feature sequences. The above padding-masking scheme can also be applied on filters, if a convolution layer includes filters of different sizes. However, this seems to be a relatively rare setup in most of the CNN applications. 𝐴𝑜 = sigm (∑ 𝑤𝑖 𝐴𝑖 + 𝑏) ≜ sigm(𝑍) 𝑖 𝑑𝑍 = (𝑀 ∘ 𝑑𝐴𝑜 ) ∘ 𝐴𝑜 ∘ (1 − 𝐴𝑜 ) = 𝑑𝑤𝑖 = ∑ 𝐴𝑖,𝑥,𝑦 𝑑𝑍𝑥,𝑦 , 𝑑𝑏 = ∑ 𝑑𝑍𝑥,𝑦 𝑥,𝑦 𝑑𝐴𝑖 = 𝑤𝑖 𝑑𝑍 𝑥,𝑦 where 𝐴𝑖 is the convoluted feature channels, 𝑤 and 𝑏 are the weights and bias of the linear combination. 𝑀 is a mask indicating the content in images and feature maps, which is introduced in section 3.1. Also, it is possible to use other type of combinations, such as a max-pooling function among all the convolution channels. However, this function seems to underperform the linear combination in our experiments. Since the feature maps consist of real continuous values (typically ranging from 0 to 1), the network performs a 2D-2D regression task. The structure of our network is shown in Figure 2. 4. Experiments We use the above framework for two applications. One is simultaneous face detection & segmentation on the LFW face dataset [40], the other is saliency prediction on the MIT dataset (1003 images version) [41]. The two networks are both trained on the MatConvNet platform [42], a Matlab toolbox based on the famous CAFFE [13] CNN implementation. 4.1. Face Detection & Segmentation We use 5590 face images from the LFW dataset, with different viewing angles. All images are of identical size 250×250. We use 4151 images for training and the rest for testing. The detection window provided in [31] is used as the ground truth. 3.1. Size considerations in practice The size of ground truth feature map is typically related to the input image. Because there are no fully connected layers in the regression framework, we can bypass the uniform input size requirement in typical classification CNNs. If the input sizes are different in the classification model, the images have to be warped or cropped to the same size. Different image aspect ratio is also a problem. However, our regression model can fundamentally avoid these headaches. The convolution operation does not depend on image size; however the layer input needs to be properly padded according to the filter size, to ensure the correct downsampling factor after pooling. The input and output size of convolution blocks differ by a factor of 2, if pooling without up-sampling is used. When an up-sampling layer is present, the input and output sizes of convolution blocks are identical. In theory, the network can accept input images of all different sizes. The batch gradient can be calculated by averaging all the individual gradients produced by single images in the batch. However, for fast computation, it is recommended that all the images within a batch are identical in size to utilize the advanced data structure in typical CNN implementations. Should the input sizes differ vastly, there is another convenient way to bypass the uniform-size requirement. All the input images in a batch can be padded to the same size, with a mask recording the content of each input. The ground truth feature maps are padded in accordance with corresponding images. The mask is then applied to the Figure 3: Examples of the CNN regression model on simultaneous face detection & segmentation experiment. The columns correspond to the input, ground truth, output features and results interpretation. The network is able to detect and segment multiple faces. 4 ability of our regression network. We also tested our regression model on face landmark localization experiments, based on the work of [31]. The ground truth feature maps are generated by fitting small 2D Gaussian density functions to the face landmark positions. However, our network does not perform well on this application, for that it is a more textural approach, without incorporating any spatial relationship between landmarks. This relationship is crucial in this application, and detecting the landmarks independently through our framework is not ideal. Some sample detection results are shown in Figure 4. The landmark localization network is able to detect more structural regions like eyes, and fails in the less structural regions on noses. This is expected because of the color similarity in nose regions. The structural contents in eyes are most, and moderate in mouths; noses offer the least information in textures. Figure 4: Examples of the CNN regression model on face landmark localization. The network does not perform well because the spatial relationship between facial landmarks is not taken into consideration. We use a simple technique to generate the ground truth feature maps: a 2D Gaussian density function is fit at the center of the detection window, with the diameter (6𝜎𝑥 and 6𝜎𝑦 ) being the window width and height. The size of input images is padded to 256×256 as stated in section 3, and a 4× down-sampling is applied to the generated feature maps. We use 3 convolution blocks in this experiment. The first two blocks consist of 5 filters of size 11×11 and 7×7 respectively, with max-pooling and normalization. The following block consists of 5 filters of size 5×5, with upsampling layer after max-pooling. For numerical stability, the ground truth feature maps are re-normalized to [0.1, 0.9] for the sigmoid activation at the output layer. Also, there is a small 𝐿2 penalty on filter weights and biases of each layer for regularization. This penalty terms can prevent the network from over-fitting and improves generalization ability. Some sample outputs are shown in Figure 3. The output feature map is overlayed on input images for visualization. It can be seen that the output feature maps correspond to the segmentation of faces in the input. The neck area is sometimes included in the feature map; this is natural because of the color similarity between face and neck areas. Increase the network complexity might relieve this problem. The detection window can be retrieved by analyzing the feature maps: get the center and standard deviation of the response, and fit the window as the reverse process of generating Gaussian density functions. The retrieval rate of detection window is greater than 95% in our experiments. Though we train the network with a simple Gaussian density function in the detection window, the network surprisingly provides the ability of both detection and segmentation, with only a small scale network. Moreover, the network can detect and segment multiple faces as shown in Figure 1 and 3. This indicates the generalization 4.2. Saliency Prediction The MIT saliency dataset consists of 1003 indoor and outdoor scene images. The longest dimension of each image is 1024 pixels, and the other edge ranges between 405 and 1024 pixels. The aspect ratio is typically around 4:3. The ground truth of saliency prediction is already provided as feature maps, thus this is an application that naturally fits our regression framework. We pad the images to 256×256, and use a down-sampling factor of 4 for feature maps. We use the same network regularization parameters as in the former face detection & segmentation experiments. We use 4 convolution blocks in this experiment. The first two blocks consist of 10 filters of size 7×7, with maxpooling and local normalization. The following two blocks Figure 5: Examples of the CNN regression model on scene saliency prediction on MIT 1003 dataset. 5 Figure 6: Comparison with classical saliency models, under the AUC and sAUC performance metric. consist of 10 filters of size 5×5, with max-pooling and upsampling. Some experiment results are shown in Figure 5. We can see that the network output is highly correlated with the ground truth saliency map. Some quantitative evaluation and comparison with other methods are shown in Figure 6. Our model outperforms most of the classical saliency prediction methods, while not incorporating any specific knowledge to saliency studies. We have yet to compare our model to the latest work, due to the difference in database and evaluation methods. Additional experiment results can be found at Figure 7 and 8 for both applications. classification model, where the former convolution blocks perform similar feature detection tasks. The regression model can also be applied on non-image applications. The convolution operation is local, and shares similar structure with local regression models, such as the famous non-linear kernel regression. Thus many regression works can be reviewed by the CNN regression model. Limitations. A limitation of our framework is, the network requires a very large training set to perform well; this is the same as other CNN models. For example, the Deep Gaze I [36] uses ImageNet pre-trained models on saliency prediction, and achieves best performance. This amounts to using a large training set in this application. Nevertheless, getting the ground truth feature maps is not as easy as getting classification labels, which aggravates the difficulty in generating training sets. Prevent Over-fitting. Over-fitting is a very common problem in regression. Adding regularization terms on model parameters will prevent over-fitting and achieve better generalization ability on testing sets. In our CNN regression model, a simple 𝐿2 penalty on network is applied as regularization terms. Other types of penalties, such as the 𝐿1 norm, can offer some desired properties like sparsity [46, 47, 48, 49]. However, network with these penalties can be more complex to optimize. Adding regularization terms alleviates over-fitting by reducing the effective degrees of freedom (DoF) of the network [18]. For example, a large network will over-fit on simple tasks like our face detection and segmentation problem; adding penalties can reduce the effective parameters and make the network behave like a small-scale network. Determining the proper DoF or network scale for different applications is very difficult, and often based on test-and-trial. The drop-out technique [50] is a famous way to prevent overfitting in neural networks; it is proved to be an adaptive 𝐿2 regularization [51] on networks, which alleviates the test- Computation Time. Since our regression network is small in scale, the L-BFGS [43] algorithm is used for fast convergence. The network can be trained in 2~3 hours and 5~6 hours respectively for the face detection & segmentation and saliency prediction, with an NVidia K40 graphics card. 5. Discussion Generality. Our CNN regression model is a general framework that can be applied on a variety of applications, where the output is a feature map correlated with input images. For example, other than our simple face detection & segmentation, we can generate feature maps on more complicated segmentation tasks such as the PASCAL VOC challenge [10] and neuron membrane segmentation [44] in medical images, with the segmented object as the ground truth. This is part of our future study on more advanced detection & segmentation applications. Also, our framework provides another view of classical features, such as SIFT and HoG [45]. The output of SIFT and HoG can be re-interpreted as feature maps to fit our regression network. Our network is also a part of the CNN 6 and-trial process on penalty selection. Another way to prevent over-fitting is the data approach. Providing huge training data to the network can also be considered as a regularization process: the training data itself covers the whole space; a network trained on the whole space data will have better generalization ability than those trained on a (small) subspace, since the test example will always lie in the space expanded by training samples. In other words, the testing phase will always be an interpolation process rather than extrapolation process; the latter is known to be much more difficult than the former. The ImageNet pre-trained model is the big data approach, and is proved to have good generalization ability in many other classification tasks. Acquiring large data is sometimes not possible; data augmentation is often applied [11] to alleviate the requirement for training data. Typical data augmentations are geometric transforms on the image dataset. This offers enlarged space (though still limited) spanned by the training images. Relationship with the CNN classification model. The convolution blocks in our network are identical to those in the CNN classification model. The linear combination on convolution channels can be considered as a partially connected layer, compared to the fully connected layer in the classification model. Thus by adding another level of connection over the output feature map, we yield the CNN classification model. The feature maps often correspond to the interested objects, which are also crucial to the classification task. We can consider the CNN classification model as an implicit feature map generating process using image class labels, whereas the regression model uses explicit feature maps generated by other techniques. The convoluted features before fully connected layers can be considered as implicit feature maps corresponding to objects. It might explain why the ImageNet pre-trained classification model is also successful in many non-classification applications. References [1] Sivic, J. and A. Zisserman. Video Google: a text retrieval approach to object matching in videos. in Computer Vision, 2003. Proceedings. Ninth IEEE International Conference on. 2003. [2] G. Csurka, C.B., C. Dance, and L. Fan, Visual categorization with bags of keypoints. Workshop on Statistical Learning in Computer Vision, ECCV, 2004: p. 122. [3] Perronnin, F., J. Sánchez, and T. Mensink, Improving the fisher kernel for large-scale image classification, in Computer Vision–ECCV 2010. 2010, Springer. p. 143-156. [4] LeCun, Y., et al., Backpropagation applied to handwritten zip code recognition. Neural computation, 1989. 1(4): p. 541-551. [5] Chatfield, K., et al., The devil is in the details: an evaluation of recent feature encoding methods. British Machine Vision Conference, 2011. [6] Huang, Y., et al., Feature coding in image classification: a comprehensive study. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2014. 36(3): p. 493-506. [7] Krizhevsky, A., I. Sutskever, and G.E. Hinton, ImageNet Classification with Deep Convolutional Neural Networks, in Advances in Neural Information Processing Systems 25. 2012, Curran Associates, Inc. p. 1097-1105. [8] Lowe, D.G., Distinctive Image Features from ScaleInvariant Keypoints. International Journal of Computer Vision, 2004. 60(2): p. 91-110. [9] Deng, J., et al. Imagenet: A large-scale hierarchical image database. in Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on. 2009. IEEE. [10] Everingham, M., et al., The pascal visual object classes (voc) challenge. International journal of computer vision, 2010. 88(2): p. 303-338. [11] Razavian, A.S., et al., CNN Features off-the-shelf: an Astounding Baseline for Recognition. arXiv preprint arXiv:1403.6382, 2014. [12] Chatfield, K.a.S., K. and Vedaldi, A. and Zisserman, A., Return of the Devil in the Details: Delving Deep into Convolutional Nets. British Machine Vision Conference, 2014. [13] Jia, Y., et al., Caffe: Convolutional Architecture for Fast Feature Embedding. arXiv preprint arXiv:1408.5093, 2014. [14] Simonyan, K. and A. Zisserman, Very Deep Convolutional Networks for Large-Scale Image Recognition. CoRR, 2014. abs/1409.1556. [15] Szarvas, M., et al. Pedestrian detection with convolutional neural networks. in Intelligent Vehicles Symposium, 2005. Proceedings. IEEE. 2005. IEEE. [16] Girshick, R., et al., Rich feature hierarchies for accurate object detection and semantic segmentation. arXiv preprint arXiv:1311.2524, 2013. [17] Grassi, G., et al., New object-oriented segmentation algorithm based on the CNN paradigm. Circuits and Systems II: Express Briefs, IEEE Transactions on, 2006. 53(4): p. 259-263. [18] Hastie, T., R. Tibshirani, and J.H. Friedman, The elements of statistical learning: data mining, inference, and prediction. 2009, New York: Springer-Verlag New York. 6. Conclusion We propose a CNN-based regression model trained on continuous feature maps. The regression network does not require fully connection layer, and is insensitive to input sizes. We introduce an up-sampling technique for size compatibility, and generate output feature maps through a linear combination on convolution channels. We apply this framework to face detection & segmentation and saliency prediction, and demonstrate its generalization ability in these tasks. Also, this general framework is highly related to the classification model and has the potential to be applied on variety of applications. 7 Figure 7: Additional experiment results on simultaneous face detection & segmentation Figure 8: Additional experiment results on scene saliency prediction [19] Bishop, C.M., Pattern recognition and machine learning. Vol. 1. 2006: springer New York. [20] Turk, M. and A. Pentland, Eigenfaces for recognition. Journal of cognitive neuroscience, 1991. 3(1): p. 71-86. [21] Osuna, E., R. Freund, and F. Girosi. Training support vector machines: an application to face detection. in Computer Vision and Pattern Recognition, 1997. Proceedings., 1997 IEEE Computer Society Conference on. 1997. IEEE. [22] Sung, K.-K. and T. Poggio, Example-based learning for view-based human face detection. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 1998. 20(1): p. 39-51. [23] Viola, P. and M. Jones. Rapid object detection using a boosted cascade of simple features. in Computer Vision and Pattern Recognition. Proceedings of the 2001 IEEE Computer Society Conference on (Volume:1 ). 2001. [24] Li, S.Z., et al., Handbook of face recognition. 2005, New York: Springer-Verlag New York Inc. [25] Yin-Nong, C., et al., A CNN-Based Face Detector with a Simple Feature Map and a Coarse-to-fine Classifier. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 2009. PP(99): p. 1-1. [26] Felzenszwalb, P.F., et al., Object Detection with Discriminatively Trained Part-Based Models. IEEE 8 [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] Transactions on Pattern Analysis and Machine Intelligence, 2010. 29(9): p. 1627-1645. Chai, D. and K.N. Ngan, Face segmentation using skincolor map in videophone applications. Circuits and Systems for Video Technology, IEEE Transactions on, 1999. 9(4): p. 551-564. Idrees, H., et al. Multi-source Multi-scale Counting in Extremely Dense Crowd Images. in Computer Vision and Pattern Recognition (CVPR), 2013 IEEE Conference on. 2013. Cootes, T.F., G.J. Edwards, and C.J. Taylor, Active appearance models. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2001. 23(6): p. 681-685. Zhu, X. and D. Ramanan. Face detection, pose estimation, and landmark localization in the wild. in Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on. 2012. IEEE. Yi, S., W. Xiaogang, and T. Xiaoou. Deep Convolutional Network Cascade for Facial Point Detection. in Computer Vision and Pattern Recognition (CVPR), 2013 IEEE Conference on. 2013. Itti, L. and C. Koch, Computational modelling of visual attention. Nature reviews neuroscience, 2001. 2(3): p. 194203. Harel, J., C. Koch, and P. Perona. Graph-based visual saliency. in Advances in neural information processing systems. 2006. Zhao, Q. and C. Koch, Learning visual saliency by combining feature maps in a nonlinear manner using AdaBoost. Journal of Vision, 2012. 12(6): p. 22. Xu, J., et al., Predicting human gaze beyond pixels. Journal of vision, 2014. 14(1): p. 28. Kümmerer, M., L. Theis, and M. Bethge, Deep Gaze I: Boosting Saliency Prediction with Feature Maps Trained on ImageNet. arXiv preprint arXiv:1411.1045, 2014. Vig, E., M. Dorr, and D. Cox. Large-Scale Optimization of Hierarchical Features for Saliency Prediction in Natural Images. in Computer Vision and Pattern Recognition (CVPR), 2014 IEEE Conference on. 2014. [38] Duncan, K. and S. Sarkar, Saliency in images and video: a brief survey. Computer Vision, IET, 2012. 6(6): p. 514-523. [39] Bylinskii, Z., et al. MIT Saliency Benchmark. [40] Huang, G.B., et al. Labeled faces in the wild: A database forstudying face recognition in unconstrained environments. in Workshop on Faces in'Real-Life'Images: Detection, Alignment, and Recognition. 2008. [41] Judd, T., et al. Learning to predict where humans look. in Computer Vision, 2009 IEEE 12th international conference on. 2009. IEEE. [42] http://www.vlfeat.org/matconvnet/. [43] Liu, D.C. and J. Nocedal, On the limited memory BFGS method for large scale optimization. Mathematical programming, 1989. 45(1-3): p. 503-528. [44] Ciresan, D., et al. Deep neural networks segment neuronal membranes in electron microscopy images. in Advances in neural information processing systems. 2012. [45] Dalal, N. and B. Triggs. Histograms of oriented gradients for human detection. in Computer Vision and Pattern Recognition. Proceedings of the 2005IEEE Computer Society Conference on (Volume:1 ). 2005. IEEE Conference Proceedings. [46] Tibshirani, R., Regression Shrinkage and Selection via the Lasso. Journal of the Royal Statistical Society.Series B (Methodological), 1996. 58(1): p. 267-288. [47] Zou, H. and T. Hastie, Regularization and Variable Selection via the Elastic Net. Journal of the Royal Statistical Society.Series B (Statistical Methodology), 2005. 67(2): p. 301-320. [48] Clemmensen, L., et al., Sparse Discriminant Analysis. Technometrics, 2011. 53(4): p. 406. [49] Jun, Y. and A.A. Kassim. A sparse sampling model for 3D face recognition. in Image Processing (ICIP), 2013 20th IEEE International Conference on. 2013. [50] Hinton, G.E., et al., Improving neural networks by preventing co-adaptation of feature detectors. CoRR, 2012. abs/1207.0580. [51] Wager, S., S. Wang, and P. Liang, Dropout Training as Adaptive Regularization. ArXiv e-prints, 2013. 9
9cs.NE
arXiv:1611.06455v4 [cs.LG] 14 Dec 2016 Time Series Classification from Scratch with Deep Neural Networks: A Strong Baseline Zhiguang Wang, Weizhong Yan Tim Oates GE Global Research {zhiguang.wang, yan}@ge.com Computer Science and Electric Engineering University of Maryland Baltimore County [email protected] Abstract—We propose a simple but strong baseline for time series classification from scratch with deep neural networks. Our proposed baseline models are pure end-to-end without any heavy preprocessing on the raw data or feature crafting. The proposed Fully Convolutional Network (FCN) achieves premium performance to other state-of-the-art approaches and our exploration of the very deep neural networks with the ResNet structure is also competitive. The global average pooling in our convolutional model enables the exploitation of the Class Activation Map (CAM) to find out the contributing region in the raw data for the specific labels. Our models provides a simple choice for the real world application and a good starting point for the future research. An overall analysis is provided to discuss the generalization capability of our models, learned features, network structures and the classification semantics. I. I NTRODUCTION Time series data is ubiquitous. Both human activities and nature produces time series everyday and everywhere, like weather readings, financial recordings, physiological signals and industrial observations. As the simplest type of time series data, univariate time series provides a reasonably good starting point to study such temporal signals. The representation learning and classification research has found many potential application in the fields like finance, industry, and health care. However, learning representations and classifying time series are still attracting much attention. As the earliest baseline, distance-based methods work directly on raw time series with some pre-defined similarity measures such as Euclidean distance or Dynamic time warping (DTW) [1] to perform classification. The combination of DTW and the k-nearestneighbors classifier is known to be a very efficient approach as a golden standard in the last decade. Feature-based methods suppose to extract a set of features that are able to represent the global/local time series patterns. Commonly, these features are quantized to form a Bag-ofWords (BoW), then given to the classifiers [2]. Feature-based approaches mostly differ in the extracted features. To name a few recent benchmarks, The bag-of-features framework (TSBF) [3] extracts the interval features with different scales from each interval to form an instance, and each time series forms a bag. A supervised codebook is built with the random forest for classifying the time series. Bag-of-SFA-Symbols (BOSS) [4] proposes a distance based on the histograms of symbolic Fourier approximation words. Its extension, the BOSSVS method [5] combines the BOSS model with the vector space model to reduce the time complexity and improve the performance by ensembling the models with difference window size. The final classification is performed with the One-Nearest-Neighbor classifier. Ensemble based approaches combine different classifiers together to achieve a higher accuracy. Different ensemble paradigms integrate various feature sets or classifiers. The Elastic Ensemble (PROP) [6] combines 11 classifiers based on elastic distance measures with a weighted ensemble scheme. Shapelet ensemble (SE) [7] produces the classifiers through the shapelet transform in conjunction with a heterogeneous ensemble. The flat collective of transform-based ensembles (COTE) is an ensemble of 35 different classifiers based on the features extracted from both the time and frequency domains. All the above approaches need heavy crafting on data preprocessing and feature engineering. Recently, some effort has been spent to exploit the deep neural network, especially convolutional neural networks (CNN) for end-to-end time series classification. In [8], a multi-channel CNN (MC-CNN) is proposed for multivariate time series classification. The filters are applied on each single channel and the features are flattened across channels as the input to a fully connected layer. The authors applied sliding windows to enhance the data. They only evaluate this approach on two multivariate time series datasets, where there is no published benchmark for comparison. In [9], the author proposed a multi-scale CNN approach (MCNN) for univariate time series classification. Down sampling, skip sampling and sliding windows are used for preprocessing the data to manually prepare for the multiscale settings. Although this approach claims the state-of-theart performance on 44 UCR time series datasets [10], the heavy preprocessing efforts and a large set of hyperparameters make it complicated to deploy. The proposed window slicing method for data augmentation seems to be ad-hoc. We provide a standard baseline to exploit deep neural networks for end-to-end time series classification without any crafting in feature engineering and data preprocessing. The deep multilayer perceptrons (MLP), fully convolutional networks (FCN) and the residual networks (ResNet) are evaluated on the same 44 benchmark datasets with other benchmarks. Through a pure end-to-end training on the raw time series data , the ResNet and FCN achieve comparable or better performance than COTE and MCNN. The global average pooling in our convolutional model enables the exploitation of 64 Global Pooling Softmax 128 128 128 128 Global Pooling Softmax 128 BN + ReLU BN + ReLU BN + ReLU BN + ReLU BN + ReLU BN + ReLU 64 BN + ReLU + + BN + ReLU Input BN + ReLU + 64 Softmax BN + ReLU 128 256 128 (C)ResNet 0.3 BN + ReLU 0.2 500 ReLU 0.2 500 ReLU Input 500 ReLU Input (b)FCN 0.1 BN + ReLU (a)MLP 128 Fig. 1. The network structure of three tested neural networks. Dash line indicates the operation of dropout. the Class Activation Map (CAM) to find out the contributing region in the raw data for the specific labels. II. N ETWORK A RCHITECTURES B. Fully Convolutional Networks We tested three deep neural network architectures to provide a fully comprehensive baseline. A. Multilayer Perceptrons Our plain baselines are basic MLP by stacking three fullyconnected layers. The fully-connected layers each has 500 neurons following two design rules: (i) using dropout [11] at each layer’s input to improve the generalization capability ; and (ii) the non-linearity is fulfilled by the rectified linear unit (ReLU)[12] as the activation function to prevent saturation of the gradient when the network is deep. The network ends with a softmax layer. A basic layer block is formalized as x̃ = fdropout,p (x) FCN has shown compelling quality and efficiency for semantic segmentation on images [14]. Each output pixel is a classifier corresponding to the receptive field and the networks can thus be trained pixel-to-pixel given the category-wise semantic segmentation annotation. In our problem settings, the FCN is performed as a feature extractor. Its final output still comes from the softmax layer. The basic block is a convolutional layer followed by a batch normalization layer [15] and a ReLU activation layer. The convolution operation is fulfilled by three 1-D kernels with the sizes {8, 5, 3} without striding. The basic convolution block is y =W⊗x+b y = W · x̃ + b h = ReLU (y) input layer, hidden layers and the softmax layer are {0.1, 0.2, 0.3}, respectively (Figure 1(a)). (1) s = BN (y) h = ReLU (s) This architecture is mostly distinguished from the seminal MLP decades ago by the utilization of ReLU and dropout. ReLU helps to stack the networks deeper and dropout largely prevent the co-adaption of the neurons to help the model generalizes well especially on some small datasets. However, if the network is too deep, most neuron will hibernate as the ReLU totally halve the negative part. The Leaky ReLU [13] might help, but we only use three layers MLP with the ReLU to provide a fundamental baselines. The dropout rates at the (2) ⊗ is the convolution operator. We build the final networks by stacking three convolution blocks with the filter sizes {128, 256, 128} in each block. Unlike the MCNN and MC-CNN, We exclude any pooling operation. This strategy is also adopted in the ResNet [16] as to prevent overfitting. Batch normalization is applied to speed up the convergence speed and help improve generalization. After the convolution blocks, the features are fed into a global average pooling layer [17] instead of a fully connected layer, which largely reduces the number of weights. The final label is produced by a softmax layer (Figure 1(b)). the complexity for training and deploying the deep learning models. 1 C. Residual Network B. Evaluation ResNet extends the neural networks to a very deep structures by adding the shortcut connection in each residual block to enable the gradient flow directly through the bottom layers. It achieves the state-of-the-art performance in object detection and other vision related tasks [16]. We explore the ResNet structure since we are really interested to see how the very deep neural networks perform on the time series data. Obviously, the ResNet overfits the training data much easier because the datasets in UCR is comparatively small and lack of enough variants to learn the complex structures with such deep networks, but it is still a good practice to import the much deeper model and analyze the pros and cons. We reuse the convolutional blocks in Equation 2 to build each residual block. Let Blockk denotes the convolutional block with the number of filters k, the residual block is formalized as Table I shows the results and a comprehensive comparison with eight other best benchmark methods. We report the test error rate from the best model trained with the minimum crossentropy loss and the number of dataset on which it achieved the best performance. Some literature (like [9], [5]) also report the ranks and other ranking-based statistics to evaluate the performance and make the comparison, so we also provide the average rankings. However, neither the number of best-performed dataset or the ranking based statistics is an unbiased measurement to compare the performance. The number of best-performed dataset focuses on the top performance and is highly skewed. The ranking based statistics is highly sensitive to the model pools. ”Better than” as a comparative measurement is also skewed as the input models might arbitrarily changed. All those evaluation measures wipe out the factor of number of classes. We propose a simple evaluation measure, Mean Per-Class Error (MPCE) to evaluate the classification performance of the specific models on multiple datasets. For a given model M = {mi }, a dataset pool D = {dk } with the number of class label C = {ck } and the corresponding error rate E = {ek }, h1 = Blockk1 (x) h2 = Blockk2 (h1 ) h3 = Blockk3 (h2 ) y = h3 + x ĥ = ReLU (y) (3) The number of filters ki = {64, 128, 128}. The final ResNet stacks three residual blocks and followed by a global average pooling layer and a softmax layer. As this setting simply reuses the structures of the FCN, certainly there are better structures for the problem, but our given structures are adequate to provide a qualified demonstration as a baseline (Figure 1(c)). III. E XPERIMENTS AND R ESULTS A. Experiment Settings We test our proposed neural networks on the same subset of the UCR time series repository, which includes 44 distinct time series datasets, to compare with other benchmarks. All the dataset has been split into training and testing by default. The only preprocessing in our experiment is z-normalization on both training and test split with the mean and standard deviation of the training part for each dataset. The MLP is trained with Adadelta [18] with learning rate 0.1, ρ = 0.95 and  = 1e − 8. The FCN and ResNet are trained with Adam [19] with the learning rate 0.001, β1 = 0.9, β2 = 0.999 and  = 1e−8. The loss function for all tested model is categorical cross entropy. We choose the best model that achieves the lowest training loss and report its performance on the test set. While this training setting tends to give us a overfitted configuration and most likely to generalize poorly on the test set, we can see that our proposed networks generalize quite well. Unlike other benchmarks, our experiment excludes the hyperparameter tuning and cross validation to provide a most unbiased baseline. Such settings also largely reduce P CEk = M P CEi = ek ck 1 X P CEk K (4) k refers to each dataset and i denotes to each model. The intuition behind MPCE is simple: the expected error rate for a single class across all the datasets. By considering the number of classes, MPCE is more robust as a baseline criterion. A paired T-test on PCE identifies if the differences of the MPCE are significant across different models. C. Results and Analysis We select seven existing best methods2 that claim the stateof-the-art results and published within recent three years: time series based on a bag-offeatures (TSBF), Elastic Ensemble (PROP), 1-NN Bag-Of-SFA-Symbols (BOSS) in Vector Space (BOSSVS), the Shapelet Ensemble (SE1) model, flat-COTE (COTE) and multi-scale CNN (MCNN). Note that COTE is an ensemble model which combines the weighted votes over 35 different classifiers. BOSSVS is an ensemble of multiple BOSS models with different window length. 1NN-DTW is also included as a simple standard baseline. The training and deploying complexity of our models are small like 1NN-DTW 1 The codes are available at https://github.com/cauchyturing/ UCR Time Series Classification Deep Learning Baseline [20]. 2 ’Best’ means the overall performance is competitive and the model should achieve the best performance on at least 4 datasets (10% of the all the 44 datasets). TABLE I T ESTING ERROR AND THE MEAN PER - CLASS ERROR (MPCE) ON 44 UCR TIME SERIES DATASET Err Rate DTW COTE MCNN BOSSVS PROP BOSS SE1 TSBF MLP FCN ResNet Adiac Beef CBF ChlorineCon CinCECGTorso Coffee CricketX CricketY CricketZ DiatomSizeR ECGFiveDays FaceAll FaceFour FacesUCR 50words fish GunPoint Haptics InlineSkate ItalyPower Lightning2 Lightning7 MALLAT MedicalImages MoteStrain NonInvThorax1 NonInvThorax2 OliveOil OSULeaf SonyAIBORobot SonyAIBORobotII StarLightCurves SwedishLeaf Symbols SyntheticControl Trace TwoLeadECG TwoPatterns UWaveX UWaveY UWaveZ wafer WordSynonyms yoga 0.396 0.367 0.003 0.352 0.349 0 0.246 0.256 0.246 0.033 0.232 0.192 0.17 0.095 0.31 0.177 0.093 0.623 0.616 0.05 0.131 0.274 0.066 0.263 0.165 0.21 0.135 0.167 0.409 0.275 0.169 0.093 0.208 0.05 0.007 0 0 0.096 0.272 0.366 0.342 0.02 0.351 0.164 0.233 0.133 0.001 0.314 0.064 0 0.154 0.167 0.128 0.082 0 0.105 0.091 0.057 0.191 0.029 0.007 0.488 0.551 0.036 0.164 0.247 0.036 0.258 0.085 0.093 0.073 0.1 0.145 0.146 0.076 0.031 0.046 0.046 0 0.01 0.015 0 0.196 0.267 0.265 0.001 0.266 0.113 0.231 0.367 0.002 0.203 0.058 0.036 0.182 0.154 0.142 0.023 0 0.235 0 0.063 0.19 0.051 0 0.53 0.618 0.03 0.164 0.219 0.057 0.26 0.079 0.064 0.06 0.133 0.271 0.23 0.07 0.023 0.066 0.049 0.003 0 0.001 0.002 0.18 0.268 0.232 0.002 0.276 0.112 0.302 0.267 0.001 0.345 0.13 0.036 0.346 0.328 0.313 0.036 0 0.241 0.034 0.103 0.367 0.017 0 0.584 0.573 0.086 0.262 0.288 0.064 0.474 0.115 0.169 0.118 0.133 0.074 0.265 0.188 0.096 0.141 0.029 0.04 0 0.015 0.001 0.27 0.364 0.336 0.001 0.439 0.169 0.353 0.367 0.002 0.36 0.062 0 0.203 0.156 0.156 0.059 0.178 0.152 0.091 0.063 0.18 0.034 0.007 0.584 0.567 0.039 0.115 0.233 0.05 0.245 0.114 0.178 0.112 0.133 0.194 0.293 0.124 0.079 0.085 0.049 0.01 0.01 0 0.067 0.199 0.283 0.29 0.003 0.226 0.121 0.22 0.2 0 0.34 0.125 0 0.259 0.208 0.246 0.046 0 0.21 0 0.042 0.301 0.011 0 0.536 0.511 0.053 0.148 0.342 0.058 0.288 0.073 0.161 0.101 0.1 0.012 0.321 0.098 0.021 0.072 0.032 0.03 0 0.004 0.016 0.241 0.313 0.312 0.001 0.345 0.081 0.373 0.133 0.01 0.312 0.021 0 0.297 0.326 0.277 0.069 0.055 0.247 0.034 0.079 0.288 0.057 0.06 0.607 0.653 0.053 0.098 0.274 0.092 0.305 0.113 0.174 0.118 0.133 0.273 0.238 0.066 0.093 0.12 0.083 0.033 0.05 0.029 0.048 0.248 0.322 0.346 0.002 0.357 0.159 0.245 0.287 0.009 0.336 0.262 0.004 0.278 0.259 0.263 0.126 0.183 0.234 0.051 0.09 0.209 0.08 0.011 0.488 0.603 0.096 0.257 0.262 0.037 0.269 0.135 0.138 0.13 0.09 0.329 0.175 0.196 0.022 0.075 0.034 0.008 0.02 0.001 0.046 0.164 0.249 0.217 0.004 0.302 0.149 0.248 0.167 0.14 0.128 0.158 0 0.431 0.405 0.408 0.036 0.03 0.115 0.17 0.185 0.288 0.126 0.067 0.539 0.649 0.034 0.279 0.356 0.064 0.271 0.131 0.058 0.057 0.60 0.43 0.273 0.161 0.043 0.107 0.147 0.05 0.18 0.147 0.114 0.232 0.297 0.295 0.004 0.406 0.145 0.143 0.25 0 0.157 0.187 0 0.185 0.208 0.187 0.07 0.015 0.071 0.068 0.052 0.321 0.029 0 0.449 0.589 0.03 0.197 0.137 0.02 0.208 0.05 0.039 0.045 0.167 0.012 0.032 0.038 0.033 0.034 0.038 0.01 0 0 0.103 0.246 0.275 0.271 0.003 0.42 0.155 0.174 0.233 0.006 0.172 0.229 0 0.179 0.195 0.187 0.069 0.045 0.166 0.068 0.042 0.273 0.011 0.007 0.495 0.635 0.04 0.246 0.164 0.021 0.228 0.105 0.052 0.049 0.133 0.021 0.015 0.038 0.029 0.042 0.128 0 0 0 0 0.213 0.332 0.245 0.003 0.368 0.142 Win AVG Arithmetic ranking AVG geometric ranking MPCE 3 8.205 7.160 0.0397 8 3.682 3.054 0.0226 7 3.932 3.249 0.0241 5 7.318 5.997 0.0330 4 5.545 4.744 0.0304 13 4.614 3.388 0.0256 4 7.455 6.431 0.0302 4 6.614 5.598 0.0335 2 7.909 6.941 0.0407 18 3.977 2.780 0.0219 8 4.386 3.481 0.0231 as their pipeline is all from scratch without any heavy preprocessing and data augmentations, while our baselines do not need feature crafting. In Table I, we provide four metrics to fully evaluate different approaches. FCN indicates the best performance on three metrics at the first sight, while ResNet is also competitive on the MPCE score and rankings. In [9], [5], the authors proposed to validate the effectiveness of their models by Wilcoxon signed-rank test on the error rates. Instead, we choose the Wilcoxon rank-sum test as it can deal with the tie conditions among the error rates with the tie correction (Appenix Table II). The p-values in our case are quite different with the results reported by [9]. Except for MLP and DTW, all other approaches are ’linked’ together based on the p-value. It possibly because the model pool we choose are different and the ranking based statistics is very sensitive to the model pool and its size. The MPCE score is reported in the last row. FCN and MLP have the best and worse MPCE score respectively. The ResNet ranks 3rd among all the 11 models, just a little worse than COTE. A paired T-test of mean on the PCE score is performed to tell if the difference of MPCE is significant (Appendix Table III). Interestingly, we found the difference of MPCE among COTE, MCNN, BOSS, FCN and ResNet are not significant. These five approaches are clustered in the best group. Analogously, the rest approaches are grouped into Fig. 2. Models grouping by the paired T-test of means on the normalized PCE scores. two clusters based on the T-test results of the MPCE scores (Figure 2). In the best group, BOSS and COTE are all ensemble based models. MCNN exploit convolutional networks but requires heavy preprocessing in data transformation, downsampling and window slicing. Our proposed FCN and ResNet are able to classify time series from scratch and achieves the premium performance. Compared to FCN, ResNet tends to overfit the data much easier, but is still clustered in the first group without significant difference to other four best models. We also note that the proposed three-layer MLP achieves comparable results to 1NN-DTW without significant difference. Recent advances on ReLU and dropout work quite well in our experiments to help the MLP gain the similar performance with the previous baseline. IV. L OCALIZE THE C ONTRIBUTING R EGIONS WITH C LASS ACTIVATION M AP Another benefit of FCN with the global average pooling layer is its natural extension, the class activation map (CAM) to interpret the class-specific region in the data [23]. For a given time series, let Sk (x) represent the activation of filter k in the last convolutional layer at temporal location x. For filter k, theP output of the following global average pooling layer is fk = x Sk (x). Let wkc indicate the weight of the final softmax function for the output from filter k and the class c, then the input of the final softmax function is In Figure 3, we show two examples of the CAMs output using the above approach. We can see that the discriminative regions of the time series for the right classes are highlighted. We also highlight the differences in the CAMs for the different labels. The contributing regions for different categories are different. On the ’CBF’ dataset, label 0 is determined mostly by the region where the sharp drop occurs. Sequences with label 1 have the signature pattern of a sharp rise followed by a smoothly down trending. For label 2, the neural network is address more attention on the long plateau occurs around the middle. The similar analysis is also applied to the contributing region on the ’StarLightCurve’ dataset. However, the label 0 and label 1 are quite similar in shapes, so the contributing map of label 1 focus less on the smooth trends of drop down while label 0 attract the uniform attention as the signal is much smoother. The CAM provides a natural way to find out the contributing region in the raw data for the specific labels. This enables classification-trained convolutional networks to learn to localize without any extra effort. Class activation maps also allow us to visualize the predicted class scores on any given time series, highlighting the discriminative subsequences detected by the convolutional networks. CAM also provide a way to find a possible explanation on how the convolutional networks work for the setting of classification. V. D ISCUSSION gc = = X wkc X k X X k Sk (x) x wkc Sk (x) x We can define Mc as the class activation map for class c, where each temporal element is given by Mc = X wkc Sk (x) k Hence Mc (x, y) directly indicates the importance of the activation at temporal location xi leading to the classification of a sequence of time series to class c. If the output of the last convolutional layer is not the same as the input, we can still identify the contributing regions most relevant to the particular category by simply upsampling the class activation map to the length of the input time series. A. Overfitting and Generalization Neural networks is a strong universal approximator which is known to overfit easily due to the large number of parameters. In our experiments, the overfitting was expected to be significant since the UCR time series data is small and we have no validation/test settings, only choose the model with the lowest training loss for test. However, our models generalize quite well given that the training accuracy are almost all 100%. Dropout improves the generalization capability of MLP by a large margin. For the family of convolutional networks, batch normalization is known to help improve both the training speed and generalization. Another important reason is we replace the fully-connected layer by the global average pooling layer before the softmax layer, which greatly reduces the amount of parameters. Thus, starting with the basic network structures without any data transformation and ensemble, our three Label 0: 0.984 Label 1: 0.999 Label 2: 0.985 high Label 0: 0.822 Label 1: 0.987 Label 2: 0.999 Low Fig. 3. The class activation mapping (CAM) technique allows the classification-trained FCN to both classify the time series and localize class-specific regions in a single forward-pass. The plots give examples of the contributing regions of the ground truth label in the raw data on the ’CBF’ (above) and ’StarLightCurve’ (below) dataset. The number indicates the likelihood of the corresponding label. models provide very simple but strong baseline for time series classification with the state-of-the-art performance. Another nuance of our results is that, deep neural networks work potentially quite well on small dataset as we expand their generalization by recent advances in the network structures and other technical tricks. B. Feature Visualization and Analysis We adopt the Gramian Angular Summation Field (GASF) [21] to visualize the filters/weights in the neural networks. Given a series X = {x1 , x2 , ..., xn }, we rescale X so that all values fall in the interval [0, 1] x̃i0 = xi − min(X) max(X) − min(X) (5) Then we can easily exploit the angular perspective by considering the trigonometric summation between each point to identify the correlation within different time intervals. The GASF are defined as  cos(φi + φj ) p 0 p = X̃ 0 · X̃ − I − X̃ 2 · I − X̃ 2 G =  (6) (7) I is the unit row vector√[1, 1, ..., 1]. p By defining the inner 2· product < x, y >= x · y − 1 − x 1 − y 2 and < x, y >= p √ 2 2 1 − x · y − x · 1 − y ,GASF are actually quasi-Gramian matrices [< x˜1 , x˜1 >]. We choose GASF because it provides an intuitive way to interpret the multi-scale correlation in 1-D space. G(i,j||i−j|=k) encodes the cosine summation over the points with the striding step k . The main diagonal Gi,i is the special case when k = 0 which contains the original values. Figure 4 provides a visual demonstration of the filters in three tested models. The weights from the second and the last layer in MLP are very similar with clear structures and very little degradation occurring. The weights in the first layer, generally, have the higher values than the following layers. The filters in FCN and ResNet are very similar. The convolution extracts the local features in the temporal axis, essentially like a weighted moving average that enhances several receptive fields with the nonlinear transformations by the ReLU. The sliding filters consider the dependencies among different time intervals and frequencies. The filters learned in the deeper layers are similar with their preceding layers. This suggests the local patterns across multiple convolutional layers are seemingly homogeneous. Both the visualization and classification performance indicates the effectiveness of the 1D convolution. C. Deep and Shallow The exploration on the very deep architecture is interesting and informative. The ResNet model has 11 layers but still holds the premium performance. There are two factors that impact the performance of the ResNet. With shortcut connections, the gradients can flow directly through the bottom (a)MLP (b)FCN (C)ResNet Fig. 4. Visualization of the filters learned in MLP, FCN and ResNet on the Adiac dataset. For ResNet, the three visualized filters are from the first, second and third convolution layers in each residual blocks. layers in the ResNet, which largely improve the interpretability of the model to learn some highly complex patterns in the data. Meanwhile, the much deeper models tend to overfit much easier, requiring more effort in regularizing the model to improve its generalization ability. In our experiments, the batch normalization and global average pooling have largely improved the performance in test data but still tend to overfit, as the patterns in the UCR dataset are comparably not so complex to catch. As a result, the test performance of the ResNet is not as good as FCN. When the data is larger and more complex, we encourage the exploration of the ResNet structure since it is more likely to find a good trade-off between the strong interpretability and generalization. D. Classification Semantics The benchmark approaches for time series classification could be categorized into three groups: distance based, feature based and neural neural network based. The combination of distance and feature based approaches are also commonly explored to improve the performance. We are curious about the classification behavior of different models as if they all perform similarly on the same dataset, or their feature space and learned classifier are diverged. The semantics of different models are evaluated based on their PCE scores. We choose PCA to reduce the dimension because this simple linear transformation is able to preserves large pairwise distances. In Figure 5, the distance between three baseline models with other benchmarks are comparatively large. which indicates the feature and classification criterion learned in our models are good complement to other models. It is natural to see that FCN and ResNet are quite close with each other. The embedding of MLP is isolated into a single category, meaning its classification behavior is quite different with other approaches. This inspires us that a synthesis of the feature learned by MLP and convolutional networks through a deep-and-wide model [22] might also improve the performance. VI. C ONCLUSIONS We provide a simple and strong baseline for time series classification from scratch with deep neural networks. Our proposed baseline models are pure end-to-end without any Fig. 5. The PCE distribution of different approaches after dimension reduction through PCA. heavy preprocessing on the raw data or feature crafting. The FCN achieves premium performance to other state-of-theart approaches. Our exploration on the much deeper neural networks with the ResNet structure also gets competitive performance under the same experiment settings. The global average pooling in our convolutional model enables the exploitation of the Class Activation Map (CAM) to find out the contributing region in the raw data for the specific labels. A simple MLP is found to be identical to the 1NN-DTW as the previous golden baseline. An overall analysis is provided to discuss the generalization of our models, learned features, network structures and the classification semantics. Rather than ranking based criterion, MPCE is proposed as an unbiased measurement to evaluate the performance of multiple models on multiple datasets. Many research focus on time series classification and recent effort is more and more lying on the deep learning approach for the related tasks. Our baseline, with simple protocol and small complexity for building and deploying, provides a default choice for the real world application and a good starting point for the future research. R EFERENCES [1] E. Keogh and C. A. Ratanamahatana, “Exact indexing of dynamic time warping,” Knowledge and information systems, vol. 7, no. 3, pp. 358– 386, 2005. [2] J. Lin, E. Keogh, L. Wei, and S. Lonardi, “Experiencing sax: a novel symbolic representation of time series,” Data Mining and knowledge discovery, vol. 15, no. 2, pp. 107–144, 2007. TABLE II A PPENDIX : T HE P - VALUES OF W ILCOXON RANK - SUM TEST BETWEEN OUR BASELINE MODELS WITH OTHER APPROACHES . DTW COTE MCNN BOSSVS PROP BOSS SE1 TSBF MLP FCN ResNet MLP FCN ResNet 0.7575 0.0040 0.0049 0.1385 0.0616 0.0076 0.1299 0.1634 / 0.0051 0.0049 0.0203 0.8445 0.9834 0.1660 0.2529 0.8905 0.0604 0.0715 0.0051 / 0.9169 0.0245 0.8347 0.9468 0.1887 0.2360 0.8740 0.0576 0.0811 0.0049 0.9169 / [3] M. G. Baydogan, G. Runger, and E. Tuv, “A bag-of-features framework to classify time series,” IEEE transactions on pattern analysis and machine intelligence, vol. 35, no. 11, pp. 2796–2802, 2013. [4] P. Schäfer, “The boss is concerned with time series classification in the presence of noise,” Data Mining and Knowledge Discovery, vol. 29, no. 6, pp. 1505–1530, 2015. [5] P. Schafer, “Scalable time series classification,” Data Mining and Knowledge Discovery, pp. 1–26, 2015. [6] J. Lines and A. Bagnall, “Time series classification with ensembles of elastic distance measures,” Data Mining and Knowledge Discovery, vol. 29, no. 3, pp. 565–592, 2015. [7] A. Bagnall, J. Lines, J. Hills, and A. Bostrom, “Time-series classification with cote: the collective of transformation-based ensembles,” IEEE Transactions on Knowledge and Data Engineering, vol. 27, no. 9, pp. 2522–2535, 2015. [8] Y. Zheng, Q. Liu, E. Chen, Y. Ge, and J. L. Zhao, “Exploiting multichannels deep convolutional neural networks for multivariate time series TABLE III A PPENDIX : T HE P - VALUES OF THE PAIRED T- TEST OF THE MEANS FOR THE MPCE SCORE ON 11 BENCHMARK MODELS . DTW DTW COTE MCNN BOSSVS PROP BOSS SE1 TSBF MLP FCN ResNet [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] COTE MCNN BOSSVS PROP BOSS SE1 TSBF MLP FCN ResNet 2.056E-05 5.699E-05 2.287E-01 5.141E-02 3.721E-05 3.652E-04 4.832E-05 5.911E-03 1.354E-02 2.140E-01 2.760E-04 1.033E-01 2.497E-01 6.404E-04 3.739E-02 3.040E-03 1.208E-04 3.634E-03 1.763E-01 4.654E-01 2.871E-02 1.311E-02 3.528E-04 3.360E-03 4.335E-01 1.440E-01 1.759E-02 1.770E-01 4.234E-01 5.240E-05 8.023E-05 4.628E-02 2.061E-02 1.049E-03 9.901E-03 7.088E-02 1.451E-04 3.978E-01 2.495E-01 2.983E-03 2.673E-02 1.879E-01 1.208E-02 1.510E-03 6.832E-05 3.427E-04 4.351E-01 3.757E-01 5.067E-03 4.241E-02 2.751E-01 3.251E-02 1.640E-03 3.045E-04 2.508E-01 classification,” Frontiers of Computer Science, vol. 10, no. 1, pp. 96– 112, 2016. Z. Cui, W. Chen, and Y. Chen, “Multi-scale convolutional neural networks for time series classification,” arXiv preprint arXiv:1603.06995, 2016. Y. Chen, E. Keogh, B. Hu, N. Begum, A. Bagnall, A. Mueen, and G. Batista, “The ucr time series classification archive (2015),” 2016. N. Srivastava, G. E. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov, “Dropout: a simple way to prevent neural networks from overfitting.” Journal of Machine Learning Research, vol. 15, no. 1, pp. 1929–1958, 2014. V. Nair and G. E. Hinton, “Rectified linear units improve restricted boltzmann machines,” in Proceedings of the 27th International Conference on Machine Learning (ICML-10), 2010, pp. 807–814. B. Xu, N. Wang, T. Chen, and M. Li, “Empirical evaluation of rectified activations in convolutional network,” arXiv preprint arXiv:1505.00853, 2015. J. Long, E. Shelhamer, and T. Darrell, “Fully convolutional networks for semantic segmentation,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2015, pp. 3431–3440. S. Ioffe and C. Szegedy, “Batch normalization: Accelerating deep network training by reducing internal covariate shift,” arXiv preprint arXiv:1502.03167, 2015. K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,” arXiv preprint arXiv:1512.03385, 2015. M. Lin, Q. Chen, and S. Yan, “Network in network,” arXiv preprint arXiv:1312.4400, 2013. M. D. Zeiler, “Adadelta: an adaptive learning rate method,” arXiv preprint arXiv:1212.5701, 2012. D. Kingma and J. Ba, “Adam: A method for stochastic optimization,” arXiv preprint arXiv:1412.6980, 2014. F. Chollet, “Keras,” https://github.com/fchollet/keras, 2015. Z. Wang and T. Oates, “Imaging time-series to improve classification and imputation,” arXiv preprint arXiv:1506.00327, 2015. H.-T. Cheng, L. Koc, J. Harmsen, T. Shaked, T. Chandra, H. Aradhye, G. Anderson, G. Corrado, W. Chai, M. Ispir et al., “Wide & deep learning for recommender systems,” in Proceedings of the 1st Workshop on Deep Learning for Recommender Systems. ACM, 2016, pp. 7–10. B. Zhou, A. Khosla, A. Lapedriza, A. Oliva, and A. Torralba, “Learning deep features for discriminative localization,” arXiv preprint arXiv:1512.04150, 2015.
9cs.NE
Past, Present, Future: A Computational Investigation of the Typology of Tense in 1000 Languages Ehsaneddin Asgari1,2 and Hinrich Schütze1 1 2 Center for Information and Language Processing, LMU Munich, Germany Applied Science and Technology, University of California, Berkeley, CA, USA, [email protected] arXiv:1704.08914v2 [cs.CL] 14 Sep 2017 Abstract We present SuperPivot, an analysis method for low-resource languages that occur in a superparallel corpus, i.e., in a corpus that contains an order of magnitude more languages than parallel corpora currently in use. We show that SuperPivot performs well for the crosslingual analysis of the linguistic phenomenon of tense. We produce analysis results for more than 1000 languages, conducting – to the best of our knowledge – the largest crosslingual computational study performed to date. We extend existing methodology for leveraging parallel corpora for typological analysis by overcoming a limiting assumption of earlier work: We only require that a linguistic feature is overtly marked in a few of thousands of languages as opposed to requiring that it be marked in all languages under investigation. 1 Introduction Significant linguistic resources such as machinereadable lexicons and part-of-speech (POS) taggers are available for at most a few hundred languages. This means that the majority of the languages of the world are low-resource. Lowresource languages like Fulani are spoken by tens of millions of people and are politically and economically important; e.g., to manage a sudden refugee crisis, NLP tools would be of great benefit. Even “small” languages are important for the preservation of the common heritage of humankind that includes natural remedies and linguistic and cultural diversity that can potentially enrich everybody. Thus, developing analysis methods for low-resource languages is one of the most important challenges of NLP today. We address this challenge by proposing a new method for analyzing what we call superparallel corpora, corpora that are by an order of magnitude more parallel than corpora that have been available in NLP to date. The corpus we work with in this paper is the Parallel Bible Corpus (PBC) that consists of translations of the New Testament in 1169 languages. Given that no NLP analysis tools are available for most of these 1169 languages, how can we extract the rich information that is potentially hidden in such superparallel corpora? The method we propose is based on two hypotheses. H1 Existence of overt encoding. For any important linguistic distinction f that is frequently encoded across languages in the world, there are a few languages that encode f overtly on the surface. H2 Overt-to-overt and overt-tonon-overt projection. For a language l that encodes f , a projection of f from the “overt languages” to l in the superparallel corpus will identify the encoding that l uses for f , both in cases in which the encoding that l uses is overt and in cases in which the encoding that l uses is nonovert. Based on these two hypotheses, our method proceeds in 5 steps. 1. Selection of a linguistic feature. We select a linguistic feature f of interest. Running example: We select past tense as feature f . 2. Heuristic search for head pivot. Through a heuristic search, we find a language lh that contains a head pivot ph that is highly correlated with the linguistic feature of interest. Running example: ”ti” in Seychelles Creole (CRS). CRS “ti” meets our requirements for a head pivot well as will be verified empirically in §3. First, ”ti” is a surface marker: it is easily identifable through whitespace tokenization and it is not ambiguous, e.g., it does not have a second meaning apart from being a grammatical marker. Second, ”ti” is a good marker for past tense in terms of both “precision” and “recall”. CRS has mandatory past tense marking (as opposed to languages in which tense marking is facultative) and ”ti” is highly correlated with the general notion of past tense. This does not mean that every clause that a linguist would regard as past tense is marked with ”ti” in CRS. For example, some tense-aspect configurations that are similar to English present perfect are marked with ”in” in CRS, not with ”ti” (e.g., ENG “has commanded” is translated as “in ordonn”). Our goal is not to find a head language and a head pivot that is a perfect marker of f . Such a head pivot probably does not exist; or, more precisely, linguistic features are not completely rigorously defined. In a sense, one of the significant contributions of this work is that we provide more rigorous definitions of past tense across languages; e.g., ”ti” in CRS is one such rigorous definition of past tense and it automatically extends (through projection) to 1000 languages in the superparallel corpus. 3. Projection of head pivot to larger pivot set. Based on an alignment of the head language to the other languages in the superparallel corpus, we project the head pivot to all other languages and search for highly correlated surface markers, i.e., we search for additional pivots in other languages. This projection to more pivots achieves three goals. First, it makes the method more robust. Relying on a single pivot would result in many errors due to the inherent noisiness of linguistic data and because several components we use (e.g., alignment of the languages in the superparallel corpus) are imperfect. Second, as we discussed above, the head pivot does not necessarily have high “recall”; our example was that CRS “ti” is not applied to certain clauses that would be translated using present perfect in English. Thus, moving to a larger pivot set increases recall. Third, as we will see below, the pivot set can be leveraged to create a fine-grained map of the linguistic feature. Consider clauses referring to eventualities in the past that English speakers would render in past progressive, present perfect and simple past tense. Our hope is that the pivot set will cover these distinctions, i.e., one of the pivots marks past progressive, but not present prefect and simple past, another pivot marks present perfect, but not the other two and so on. It is beyond the scope of this paper to verify that we can produce such an analysis for all linguistic features, but a promising example of this type of map, including distinctions like progressive and perfective aspect, is given in §4. Running example: We compute the correlation of “ti” with words in other languages and select the 100 highest correlated words as pivots. Examples of pivots we find this way are Torres Strait Creole “bin” (from English “been”) and Tzotzil “laj”. “laj” is a perfective marker, e.g., “Laj meltzaj -uk” ‘LAJ be-made subj’ means “It’s done being built” (Aissen, 1987). 4. Projection of pivot set to all languages. Now that we have a large pivot set, we project the pivots to all other languages to search for linguistic devices that express the linguistic feature f . Up to this point, we have made the assumption that it is easy to segment text in all languages into pieces of a size that is not too small (individual characters of the Latin alphabet would be too small) and not too large (entire sentences as tokens would be too large). Segmentation on standard delimiters is a good approximation for the majority of languages – but not for all: it undersegments some (e.g., the polysynthetic language Inuit) and oversegments others (e.g., languages that use punctuation marks as regular characters). For this reason, we do not employ tokenization in this step. Rather we search for character ngrams (2 ≤ n ≤ 6) to find linguistic devices that express f . This implementation of the search procedure is a limitation – there are many linguistic devices that cannot be found using it, e.g., templates in templatic morphology. We leave addressing this for future work (§7). Running example: We find “-ed” for English and “-te” for German as surface features that are highly correlated with the 100 past tense pivots. 5. Linguistic analysis. The result of the previous steps is a superparallel corpus that is richly annotated with information about linguistic feature f . This structure can be exploited for the analysis of a single language li that may be the focus of a linguistic investigation. Starting with the character n-grams that were found in the step “projection of pivot set to all languages”, we can explore their use and function, e.g, for the mined n-gram “-ed” in English (assuming English is the language li and it is unfamiliar to us). Many of the other 1000 languages provide annotations of linguistic feature f for li : both the languages that are part of the pivot set (e.g., Tzotzil “laj”) and the mined ngrams in other languages that we may have some knowledge of (e.g., “-te” in German). We can also use the structure we have generated for typological analysis across languages following the work of Michael Cysouw. He has pioneered a new methodology for typology ((Cysouw, 2014), §5). We do not contribute any innovations to typology in this paper, but our method is a significant advancement computationally over Cysouw’s work because we overcome many of his limiting assumptions. Most importantly, our method scales to thousands of languages as we demonstrate below whereas Cysouw worked on a few dozen. Running example: We sketch the type of analysis that our new method makes possible in §4. The above steps “1. heuristic search for head pivot” and “2. projection of head pivot to larger pivot set” are based on H1: we assume the existence of overt coding in a subset of languages. The above steps “2. projection of head pivot to larger pivot set” and “3. projection of pivot set to all languages” are based on H2: we assume that overt-to-overt and overt-to-non-overt projection is possible. In the rest of the paper, we will refer to the method that consists of steps 1 to 5 as SuperPivot: “linguistic analysis of SUPERparallel corpora using surface PIVOTs”. We make three contributions. (i) Our basic hypotheses are H1 and H2. (H1) For an important linguistic feature, there exist a few languages that mark it overtly and easily recognizably. (H2) It is possible to project overt markers to overt and non-overt markers in other languages. Based on these two hypotheses we design SuperPivot, a new method for analyzing highly parallel corpora, and show that it performs well for the crosslingual analysis of the linguistic phenomenon of tense. (ii) Given a superparallel corpus, SuperPivot can be used for the analysis of any low-resource language represented in that corpus. In the supplementary material, we present results of our analysis for three tenses (past, present, future) for 11631 languages. An evaluation of accuracy is presented in Table 3.2. (iii) We extend Michael Cysouw’s pioneering work on typological analysis using paral- 1. Selection of a linguistic feature. The linguistic feature of interest f is selected by the person who performs a SuperPivot analysis, i.e., by a linguist, NLP researcher or data scientist. Henceforth, we will refer to this person as the linguist. In this paper, f ∈ F = {past, present, future}. 2. Heuristic search for head pivot. There are several ways for finding the head language and the head pivot. Perhaps the linguist knows a language that has a good head pivot. Or she is a trained typologist and can find the head pivot by consulting the typological literature. In this paper, we use our knowledge of English and an alignment from English to all other languages to find head pivots. (See below for details on alignment.) We define a “query” in English and search for words that are highly correlated to the query in other languages. For future tense, the query is simply the word “will”, so we search for words in other languages that are highly correlated with “will”. For present tense, the query is the union of “is”, “are” and “am”. So we search for words in other languages that are highly correlated with the “merger” of these three words. For past tense, we POS tag the English part of PBC and merge all words tagged as past tense into one past tense word.2 We then search for words in other languages that are highly correlated with this artificial past tense word. As an additional constraint, we do not select the most highly correlated word as the head pivot, but the most highly correlated word in a Creole language. Our rationale is that Creole languages are more regular than other languages because they are young and have not accumulated “historical baggage” that may make computational analysis more difficult. Table 1 lists the three head pivots for F . 3. Projection of head pivot to larger pivot set. We first use fast align (Dyer et al., 2013) to align 1 We exclude six of the 1169 languages because they do not share enough verses with the rest. 2 Past tense is defined as tags BED, BED*, BEDZ, BEDZ*, DOD*, VBD, DOD. We use NLTK (Bird, 2006). lel corpora by overcoming several limiting factors. The most important is that Cysouw’s method is only applicable if markers of the relevant linguistic feature are recognizable on the surface in all languages. In contrast, we only assume that markers of the relevant linguistic feature are recognizable on the surface in a small number of languages. 2 SuperPivot: Description of method the head language to all other languages in the corpus. This alignment is on the word level. We compute a score for each word in each language based on the number of times it is aligned to the head pivot, the number of times it is aligned to another word and the total frequencies of head pivot and word. We use χ2 (Casella and Berger, 2008) as the score throughout this paper. Finally, we select the k words as pivots that have the highest association score with the head pivot. We impose the constraint that we only select one pivot per language. So as we go down the list, we skip pivots from languages for which we already have found a pivot. We set k = 100 in this paper. Table 1 gives the top 10 pivots. 4. Projection of pivot set to all languages. As discussed above, the process so far has been based on tokenization. To be able to find markers that cannot be easily detected on the surface (like “-ed” in English), we identify non-tokenizationbased character n-gram features in step 4. The immediate challenge is that without tokens, we have no alignment between the languages anymore. We could simply assume that the occurrence of a pivot has scope over the entire verse. But this is clearly inadequate, e.g., for the sentence “I arrived yesterday, I’m staying today, and I will leave tomorrow”, it is incorrect to say that it is marked as past tense (or future tense) in its entirety. Fortunately, the verses in the New Testament mostly have a simple structure that limits the variation in where a particular piece of content occurs in the verse. We therefore make the assumption that a particular relative position in language l1 (e.g., the character at relative position 0.62) is aligned with the same relative position in l2 (i.e., the character at relative position 0.62). This is likely to work for a simple example like “I arrived yesterday, I’m staying today, and I will leave tomorrow” across languages. In our analysis of errors, we found many cases where this assumption breaks down. A wellknown problematic phenomenon for our method is the difference between, say, VSO and SOV languages: the first class puts the verb at the beginning, the second at the end. However, keep in mind that we accumulate evidence over k = 100 pivots and then compute aggregate statistics over the entire corpus. As our evaluation below shows, the “linear alignment” assumption does not seem to do much harm given the general robustness of our method. One design element that increases robustness is that we find the two positions in each verse that are most highly (resp. least highly) correlated with the linguistic feature f . Specifically, we compute the relative position x of each pivot that occurs in the verse and apply a Gaussian filter (σ = 6 where the unit of length is the character), i.e., we set p(x) ≈ 0.066 (0.066 is the density of a Gaussian with σ = 6 at x = 0) and center a bell curve around x. The total score for a position x is then the sum of the filter values at x summed over all occurring pivots. Finally, we select the positions xmin and xmax with lowest and highest values for each verse. χ2 is then computed based on the number of times a character n-gram occurs in a window of size w around xmax (positive count) and in a window of size w around xmin (negative count). Verses in which no pivot occurs are used for the negative count in their entirety. The top-ranked character ngrams are then output for analysis by the linguist. We set w = 20. 5. Linguistic analysis. We now have created a structure that contains rich information about the linguistic feature: for each verse we have relative positions of pivots that can be projected across languages. We also have maximum positions within a verse that allow us to pinpoint the most likely place in the vicinity of which linguistic feature f is marked in all languages. This structure can be used for the analysis of individual low-resource languages as well as for typological analysis. We will give an example of such an analysis in §4. 6. Hierarchical clusterings of markers and languages. As an additional evaluation, we worked on hierarchical clusterings of past, present and future pivots. As detailed in §2.4, we represent each verse by a vector of length 100 showing which pivot markers are used to express this verse. The other way of looking at these data is that for each marker we have an occurrence distribution over verses and we may exploit these data to demonstrate the distance between markers. For the purpose of comparing two markers, we propose calculation of the Jensen-Shannon divergence between the normalized occurrence distribution over verses: Dmpi ,mpj = JSD(mˆpi , mˆpj ), where mˆpi and mˆpi , are the normalized occurrence distributions over verses. We compare the obtained distance between markers with genetic distance of their corresponding languages using WALS information (Dryer et al., 2005). For visualization purposes, we perform Unweighted Pair Group Method with Arithmetic Mean (UPGMA) hierarchical clustering on the pairwise distance matrix of the marker for each tense separately (Johnson, 1967). In addition to clustering of pivot markers for each tense separately, we performed the same comparison for all top markers of 1107 languages3 and take the average distances of languages in past, present, and future marking. This allows us to compare the average tense behavior of languages. 1 Dli ,lj = (JSDpast +JSDpresent +JSDf uture ), 3 3 Data, experiments and results 3.1 Data We use a New Testament subset of the Parallel Bible Corpus (PBS) (Mayer and Cysouw, 2014) that consists of 1556 translations of the the Bible in 1169 unique languages. We consider two languages to be different if they have different ISO 639-3 codes. The translations are aligned on the verse level. However, many translations do not have complete coverage, so that most verses are not present in at least one translation. One reason for this is that sometimes several consecutive verses are merged, so that one verse contains material that is in reality not part of it and the merged verses may then be missing from the translation. Thus, there is a trade-off between number of parallel translations and number of verses they have in common. Although some preprocessing was done by the authors of the resource, many translations are not preprocessed. For example, Japanese is not tokenized. We also observed some incorrectness and sparseness in the metadata. One example is that one Fijian translation (see §4) is tagged fij hindi, but it is Fijian, not Fiji Hindi. We use the 7958 verses with the best coverage across languages. 3.2 Experiments 1. Selection of a linguistic feature. We conduct three experiments for the linguistic features past tense, present tense and future tense. 3 We exclude languages that have fewer than 7000 verses in common with the pivot language to ensure quality of marker. 2. Heuristic search for head pivot. We use the queries described in §2 for finding the following three head pivots. (i) Past tense head pivot: “ti” in Seychellois Creole (CRS) (McWhorter, 2005). (ii) Present tense head pivot: “ta” in Papiamentu (PAP) (Andersen, 1990). (iii) Future tense head pivot: “bai” in Tok Pisin (TPI) (Traugott, 1978; Sankoff, 1990). 3. Projection of head pivot to larger pivot set. Using the method described in §2, we project each head pivot to a set of k = 100 pivots. Table 1 gives the top 10 pivots for each tense. 4. Projection of pivot set to all languages. Using the method described in §2, we compute highly correlated character n-gram features, 2 ≤ n ≤ 6, for all 1163 languages. See §4 for the last step of SuperPivot: 5. Linguistic analysis. 3.3 Evaluation We rank n-gram features and retain the top 10, for each linguistic feature, for each language and for each n-gram size. We process 1556 translations. Thus, in total, we extract 1556 × 5 × 10 n-grams. Table 3.2 shows Mean Reciprocal Rank (MRR) for 10 languages. The rank for a particular ranking of n-grams is the first n-gram that is highly correlated with the relevant tense; e.g., character subsequences of the name “Paulus” are evaluated as incorrect, the subsequence “-ed” in English as correct for past. MRR is averaged over all n-gram sizes, 2 ≤ n ≤ 6. Chinese has consistent tense marking only for future, so results are poor. Russian and Polish perform poorly because their central grammatical category is aspect, not tense. The poor performance on Arabic is due to the limits of character n-gram features for a “templatic” language. During this evaluation, we noticed a surprising amount of variation within translations of one language; e.g., top-ranked n-grams for some German translations include names like “Paulus”. We suspect that for literal translations, linear alignment (§2) yields good n-grams. But many translations are free, e.g., they change the sequence of clauses. This deteriorates mined n-grams. See §7. Hierarchical clusterings of markers. Hierarchical clusterings of past, present and future pivots using JSD between the normalized occurrence distribution over verses are shown in Figure 1, Figure 2, and Figure 3 for past, present, and future head pivots past code language pivot CRS Seychelles C. ti GUX Gourmanchéma den MAW Mampruli daa GFK Patpatar ga YAL Yalunka yi TOH Gitonga di DGI Northern Dagara tι BUM Bulu (Cameroon) nga TCS Torres Strait C. bin NDZ Ndogo giὶ present code language pivot PAP Papiamentu ta NOB Norwegian Bokmål er HIF Fiji Hindi hei AFR Afrikaans is DAN Danish er SWE Swedish är EPO Esperanto estas ELL Greek ίναι HIN Hindi haai NAQ Khoekhoe ra future code language pivot TPI Tok Pisin bai LID Nyindrou kameh GUL Sea Island C. gwine TGP Tangoa pa BUK Bugawac oc BIS Bislama bambae PIS Pijin bae APE Bukiyip eke HWC Hawaiian C. goin NHR Nharo gha Table 1: Top ten past, present, and future tense pivots extracted from 1163 languages. C. = Creole language Arabic Chinese English French German Italian Persian Polish Russian Spanish all past 1.00 0.00 1.00 1.00 1.00 1.00 0.77 1.00 0.90 1.00 0.88 present 0.39 0.00 1.00 1.00 1.00 1.00 1.00 1.00 0.50 1.00 0.79 future 0.77 0.87 1.00 1.00 1.00 1.00 1.00 0.58 0.62 1.00 0.88 all 0.72 0.29 1.00 1.00 1.00 1.00 0.92 0.86 0.67 1.00 0.85 Table 2: MRR results for step 4. See text for details. tenses respectively. In addition to markers clusterings, the average tense behavior clustering of 1107 languages is depicted in Figure 4. In these figures languages are colored based on their language families using WALS (Dryer et al., 2005), languages without family information on WALS are uncolored. We observed that most of pivot past and future markers belong to Niger Congo family and present markers are mostly within IndoEuropean family. It can be seen that in many cases languages with the same family behave accordingly in tense marking. For instance, in past tense marking Oto-Manguean languages use almost the same marker of ni with small writing variations (Figure 1). Although Tezoatlán Mixtec did not have a record on WALS, since its marker is the same as other Oto-Manguean languages and works almost identical to ni in Oto-Manguean languages, we may guess this language is also OtoManguean, which turned out to be true when we performed further searches.4 There were many of such cases for which we could guess the family of language based on their tense marking similarities in Figure 1, Figure 2 and Figure 3. We use normalized JSD (0 ≤ JSD ≤ 1) 4 https://www.ethnologue.com/language/mxb for comparison of each pair of languages/markers; this allows us to investigate whether a simple threshold of 0.5 accurately predicts whether two languages are genetically related or not. The results are summarized in Table 3.3. Although the average tense marking divergence has a low recall, it expresses a high precision of 0.36, where 1 the random chance is 103 ≈ 0.01. Thus, it means that if divergence of tense marking is low the languages are very likely to be genetically related. This conclusion is supported by Figure 4 where many small clusters of nodes have the same color. This suggests that our method may help in completion of WALS. 4 A map of past tense To illustrate the potential of our method we select five out of the 100 past tense pivots that give rise to large clusters of distinct combinations. Starting with CRS, we find other pivots that “split” the set of verses that contain the CRS past tense pivot “ti” into two parts that have about the same size. This gives us two sets. We now look for a pivot that splits one of these two sets about evenly and so on. After iterating four times, we arrive at five pivots: CRS “ti”, Fijian (FIJ) “qai”, Hawaiian Creole (HWC) “wen”, Torres Strait Creole (TCS) “bin” and Tzotzil (TZO) “laj”. Figure 5 shows a t-SNE (Maaten and Hinton, 2008) visualization of the large clusters of combinations that are found for these five languages, including one cluster of verses that do not contain any of the five pivots. This figure is a map of past tense for all 1163 languages, not just for CRS, FIJ, HWC, TCS and TZO: once the interpretation of a particular cluster has been established based on CRS, FIJ, HWC, TCS and TZO, we can investigate this cluster in the 1164 other languages by looking at the verses accuracy precision recall TNR avg tense 696 ( 1107 lang. - 103 fam.) 0.93 0.36 0.01 0.99 past 55 ( 100 lang. - 15 fam.) 0.55 0.18 0.59 0.55 present 70 ( 100 lang. - 17 fam.) 0.81 0.75 0.37 0.96 Arawakan Oto-Manguean future 44Mayan ( 100 lang. - 16 fam.) Niger-Congo 0.58unknown 0.16Indo-European Khoe-Kwadi 0.61Mande 0.58Tupian Algic Austronesian Table 3: Language family similarity prediction results based on coordinated marking of verses. Only Guaicuruan Misumalpan languages with records on WALS are included in this evaluation. TNR: true negative rate. Eastern Sudanic ne > e i ge cu > k > ya > s a a en > n N uer eha w a am okw N N awa al S a > io > te D n tr a m g o a ) Ce any nai > gand K w a k a o (U y a N ng a > ala La ang g > k Kw unga > qai ogi ën T ian > >h Fij onquin ccan a Alg aram ka S > ri o i M a ba > s kon Yoru > ka in > io Kwa rian Pidg Nige we > Igbo í > so Mocov > oko Kumam ga > i³ Madak zatec > qu Huautla Ma Kuranko > ya Urdu > ‫ﻧﮯ‬ Hindi > ne Chol > tsi Tzotzil > laj Lacandon > caj Sirionó > que Kriol > bin Konni > die Tezoat lá Atatlá n Mixtec > ni Yoso huca Mixte n c > ni d úa Peño les M Mixtec > ni San ixtec > ní Oco Miguel So tepec El Gra nde Mix A uthe Mixte tec Ch frikaan rn Pue > nī c> ava bla ni s> Mix het N a can tec o m >y >n Bu a ( a ì N lu a To m (C Ma rres ame ibia) G m p S tra ro o > g e S our ruli it Cr n) > n e P es m a > g Ya atp elw nch daa ole > a a a é l bin N u W o n ta r C r m a C es rthe ka > > g eole > d h u te r a e F y n n j > rn re D i nc ix K a a g h> nj ar ob a ti al > t ɩ > jix Eskimo-Aleut ax m a l> k ya 'a > > ob e da nj ra'a e Di 'a a Q Kw > v ué ú e m d o l Ixi cob a > li > Yo aka h Fa n M u t > to > fu So opi lma i d Ch am pu a > g T on nọ ehm Git Ika > k > k ju ma E ka em > w Kas uri > ra a Tup u > nax Sus > giì yaa go Ndo hana) > i > bi (G m Buli taro Oto > bi bi Queré ital Otomi tomi > Mezqu de México O Estado dgin > wen Pi i'i wa Ha beè Gokana > Naro > kò Tzeltal > la North Alaskan Inupiatun > tavra fC o ng o) > ma Tikar > ɓe Ozumacín Chinantec > maˊ Tektiteko > tuq Mazatlán Mix e > najty Dyula > tun Ba mb Luo (K ara > tun en Moris ya and Tanz yen > ania) > S ti ne o u th Mob ern Bobo M ada Ba a > din ré > m ane Fare fut > lɛ fa Krio re > d Ja > bin aa Na maic a w S ra d m n C re Sa nan > da ole En in T glis M Hait t Lu ong h> did M aya ian cian o > b n C a M y a g n a re o C re e n ole > le M on ng F re B o a n o (D n a > d a i > te nc g h> K kob se em dai té G on a ng oc ar ko ru > > m ratic if u m Re na ba ben a pu > > le bli áb co a ne > e i ge cu > k > ya > s a a en > n N uer eha w a am okw N N awa al S a > io > te D ntr am go a) Ce any nai > gand w a K ak o (U ya N ng a > ala a g L an g > k Kw unga > qai ogi ën T ian > >h Fij onquin ccan a Alg aram ka S > ori Ma ba > si ru kon Yo o > ka in > Kwai ian Pidg Niger we > Igbo ví > so Moco > oko Kumam ga > Madak atec > qui³ Huautla Maz Kuranko > ya Urdu > ‫ﻧﮯ‬ Hindi > ne Chol > tsi Tzotzil > laj Lacandon > caj Sirionó > que Kriol > bin Konni > die Tezoatlán Mixtec Atatláh > ni Yoso uca Mixte Peño ndúa Mixt c > ni ec > le ni San s Mixte c > ní M Oco iguel Sou tepec El Gra nde Mix the A Mixte tec Ch frikaan rn Pue > nī c> av bla ni s Mix N a acan > het te c> Bu ma (N o > y nì To lu (C am a Ma rres ame ibia) > S ro m G ge o p tra Se ourm ruli it Cre n) > n > P s g a Ya atp elw nch daa ole > a a a é bin W No lun tar Cre ma C es rthe ka > > g ole > d hu te r a Fre en j > rn n D y i nc ix Ka ag h> njo ar a ti ba > l > tɩ jix Arawakan Oto-Manguean Mayan Niger-Congo unknown Indo-European Khoe-Kwadi Mande Tupian Algic Austronesian Guaicuruan Misumalpan Eastern Sudanic Eskimo-Aleut Figure 1: Clustering of 100 pivot past tense markers. Each node is colored based on its family information. Languages with no record on WALS remained white. This clustering is based on JSD of markers in marking 5960 verses in bible. We observed that most of pivot past and future markers belong to Niger Congo family and present markers are mostly within Indo-European family. It can be seen that in many cases languages with the same family behave accordingly in tense marking. For instance, in past tense marking Oto-Manguean languages use almost the same marker of ni with small writing variations (Figure 1). Although Tezoatlán Mixtec did not have a record on WALS, since its marker is the same as other Oto-Manguean languages and works almost identical to ni in Oto-Manguean languages, we may guess this language is also Oto-Manguean, which turned out to be true when we performed further searches. Tikar > ɓe Ozumacín Chinantec > maˊ Tektiteko > tuq Mazatlán Mixe > najty Dyula > tun Bambar Luo (Ke a > tun nya and Tan Moris zania) yen > > ne Sout hern ti Mob Bobo Madar Baf a > din é>m Far ut > lɛ ane ef Kri are > da o a Ja > bin Na maica w Sra dm n Cre Sa nan > da ole En in T glis M Ha t L on h> g it u did Ma ayan ian C cian o > b M ya gna reo Cre en ole > le M on ng Fre Bo an o (D na > dai > te nc g h> K kob se em dai té G onk aru ng > ocra ar o ifu m > b ma tic R na ba en ep > u b lic áb le of a Co ng o) > ma > that are members of this cluster. This methodology supports the empirical investigation of questions like “how is progressive past tense expressed in0.93language X”? We just need to look up the cluster(s) that correspond to progressive past tense, look up the verses that are members and retrieve the text of these verses in language X. 0.93 To give the reader a flavor of the distinctions that are reflected in these clusters, we now list phenomena that are characteristic of verses that contain only one of the five pivots; these phenomena identify properties of one language that the other four do not have. CRS “ti”. CRS has a set of markers that can be systematically combined, in particular, a progressive marker “pe” that can be combined with the ax m a l> >k ya > b'a e a njo a'a Did 'a ar e Q Kw > v ué ú e m d o Ixil cob a > li > Yo aka Fa n M uth > to > fu So opi lma i d Ch am pu a > T ong nọ ehm Git Ika > k > k ju ma a k E m> w Kaseuri > ra Tup u > naxa Sus > giì yaa go Ndo hana) > i > bi (G Buli étaro Otom > bi omi Quer mi > bi uital Ot Mezq de México Oto Estado gin > wen Pid Hawai'i beè Gokana > Naro > kò Tzeltal > la North Alaskan Inupiatun > tavra past tense marker “ti”. As a result, past progressive sentences in CRS are generally marked with “ti”. Example: “43004031 Meanwhile, the disciples were urging Jesus, ‘Rabbi, eat something.”’ “crs bible 43004031 Pandan sa letan, bann disip ti pe sipliy Zezi, ‘Met! Manz en pe.”’ The other four languages do not consistently use the pivot for marking the past progressive; e.g., HWC uses “was begging” in 43004031 (instead of “wen”) and TCS uses “kip tok strongwan” ‘keep talking strongly’ in 43004031 (instead of “bin”). FIJ “qai”. This pivot means “and then”. It is highly correlated with past tense in the New Testament because most sequential descriptions of events are descriptions of past events. But there are also some non-past sequences. Example: ll ne ua > yi id s a > n d iv a k in au H u n jo ili ( i > m h se V a Dil > Sw tun wẹ ole Te n > Cre Gu itian wh h a aw Ha > m >m n a W ra u k > m a Pa ana ezali y > a a W gala >d Lin que ው s >ነ Ba aric h ndi Am ani > i >n w M nde o o k Ma > nd olo Pog i > ni ni d da > Run rwan es Kinya dietsch > Plaut er > dic Icelan > on Finnish > on Estonian Sami > lea Northern Polish > jest Latin > est Czech > je Gheg Albanian > është English > is Modern Greek (1453 -) > είναι Slovak > je Romania n > este Albanian > është Low Sa xon > es Germ an > is t Weste rn Fris Faro ian > ese is > er Fren c Mid h > est Fle dle En glis Spa mish h (1 > 100 is Vale nish > -150 0) > Ru ncian es is s >é Old sian s An Sla > ес ть vo cie nic Ira nt G > re e ес As nian Vla syria Per k (to ть 14 St x R n N sian eo > ‫ ت‬53) L and om >ε M atvia ard ani -Ara ‫اﺳ‬ στ ma ιν B u a la y n > L a > s ic i tvia l > N u (C (ma ir n or > w a m c ro l ir eg e a ia r o o n g u n N n) > age yn or ne ) > a sk da > er g an ua ge )> ni Indo-European Khoe-Kwadi Mande Uralic Central Sudanic Austro-Asiatic Austronesian Chibchan Afro-Asiatic er > ål is k m > o ns n B a a i a er r r ik e g A f o rw h > ä as n N nis h > est ɗo Da edis to > e> Sw eran ndï ulfuld p y> aF s a E ba aw ĕ >k M am n > g ch ren Ad enia le F ‫ﭤو‬ ú m reo Ar hi > p > k nC ey d d te ia in c u > S K Lu in idg int Sa nP eria > ta Nig ano ) > là vac a Cha (Nigeri a > da M ad glish > in le En Mam nd Creo la Is a Se ko > ra Naro ibia) > (Nam Nama ‫ﻣﯽ‬ Dari > be Dyula > > bɛ Bambara Zarma > ga Yucateco > ku Sango > yeke Ch M ni )> ge ua ng l la ne ua > yi a n divid k s > n a au H unjo ili (i i > m se V ah Dil > Sw tun wẹ ole Te n > Cre Gu itian wh wh a Ha > m ma n > a W rauk > ma Pa ana ezali y > a Wa gala >d Lin que ው s >ነ Ba aric h ndi Am ani > > ni Mw onde Mak > ndo olo Pog > ni ni di Run wanda > ar ny h > es Ki ietsc Plautd er dic > Icelan > on h nis Fin n > on Estonia Sami > lea Northern Polish > jest Latin > est Czech > je Gheg Albanian > është English > is Modern Greek (1453-) > είναι Slovak > je Romania n > este Albania n > ësh të Low Sa xon > es Germ an Wester > ist n Frisi Faro an > es is Fren e > er ch > Mid est Fle dle Eng lish Spa mish (110 > is 0-15 Vale nish > 00) es n cia > is Ru n> s és Old sian An Sla > ес ть v c Ira ient onic As nian Gree > есть s k Vla yri Pers (to 14 Sta x R an N ian 5 3) eo >‫ت‬ nd om L >ε M atvia ard ani -Ara ‫اﺳ‬ στι ma ν Bu alay n > La > s ic lu (m ir tvia i > N n o r (C a a c > ro w ir la eg m e ia roo ngu n n a ) N yn > n ge) > or e ad sk a > er Sino-Tibetan Cariban Arawakan Mayan Basque Songhay Niger-Congo unknown Indo-European Khoe-Kwadi Mande Uralic Central Sudanic Austro-Asiatic Austronesian Chibchan Afro-Asiatic in es e > sī tlhIngan-Hol > oh Cameroon Mam bila > né Rinconada Bikol > do Batak To ba > do Batak Simalun gu Maith n > do ili > अ छ Carib bean Hindu Urdu stani > ‫ﮨﮯ‬ > hai Hind i>h aai Ma ra Djim thi > आ ह ini S Ve e n n g o o> ufo Wa >y ima lùu ɛn H > ir Ca i Motu hano na > P a béca re c r > be ís rä Vie > aty J a tn a m o G o ra i > e s e Ikw urm jing > là Ig e r a n Tu bo e > ché pu > b bụ m a ri > u tie Na > d iñ n in Papiamento > ta Fiji Hindi > hei Figure 2: Clustering of 100 pivot present tense markers. Each node is colored based on its family information. Languages with no record on WALS remained white. This clustering is based on JSD of markers in marking 6590 verses in bible. It can be seen that in many cases languages with the same family behave accordingly in tense marking. tlhIngan-Hol > oh Cameroon Mamb ila > né Rinconad a Bikol > do Batak Tob a > do Batak Simalu ngun > Maith do ili > अछ Carib bean Hind Urdu ustan > i > ha Hindi ‫ﮨﮯ‬ i > ha Mar ai at Djim hi > आ Ven ini Sen ह go oufo > Wa > yɛ ima lùu n Hir > Ca i Motu hano na > P a béca rec r > be ís rä Vie > aty Ja tnam o Go rai > ese Ikw urm jing > là Ig ere anc hé Tu bo > ma p uri > bu bụ > tie Na > d iñ n Ch in es e > sī in a tense-marked clause in HWC. While preparing this analysis, we realized that HWC “wen” unfortunately does not meet one of the criteria we set out for pivots: it is not unambiguous. In addition to being a past tense marker (derived from standard English “went”), it can also be a conjunction, derived from “when”. This ambiguity is the cause for some noise in the clusters marked for presence of HWC “wen” in the figure. TCS “bin”. Conditionals is one pattern we found in verses that are marked with TCS “bin”, but are not marked for past tense in the other four languages. Example: “tcs bible 46015046 Wanem i bin kam pas i da nomal bodi ane den da spiritbodi i bin kam apta.” ‘what came first is the normal body and then the spirit body came after’, “eng newliving 46015046 What comes first is the natural body, then the spiritual body comes later.” Apparently, “bin” also has a modal aspect in TCS: generic statements that do not refer to specific events are rendered using “bin” in TCS whereas the other four languages (and also English) use the default unmarked tense, i.e., present tense. TZO “laj”. This pivot indicates perfective aspect. The other four past tense pivots are not perfective markers, so that there are verses that are marked with “laj”, but not marked with the past tense pivots of the other four languages. Example: “tzo huixtan 40010042 . . . ja’ch-ac’bat ben- Papiamento > ta Fiji Hindi > hei 0.39 M “eng newliving 44009016 And I will show him how much he must suffer for my name’s sake.” “fij hindi 44009016 Au na qai vakatakila vua na levu ni ka e na sota kaya e na vukuqu.” This verse is future tense, but it continues a temporal sequence (it starts in the preceding verse) and therefore FIJ uses “qai”. The pivots of the other four languages are not general markers of temporal sequentiality, so they are not used for the future. 0.39 HWC “wen”. HWC is less explicit than the other four languages in some respects and more explicit in others. It is less explicit in that not all sentences in a sequence of past tense sentences need to be marked explicitly with “wen”, resulting in some sentences that are indistinguishable from present tense. On the other hand, we found many cases of noun phrases in the other four languages that refer implicitly to the past, but are translated as a verb with explicit past tense marking in HWC. Examples: “hwc 2000 40026046 Da guy who wen set me up . . . ” ‘the guy who WEN set me up’, “eng newliving 40026046 . . . my betrayer . . . ”; “hwc 2000 43008005 . . . Moses wen tell us in da Rules . . . ” ‘Moses WEN tell us in the rules’, “eng newliving 43008005 The law of Moses says . . . ”; “hwc 2000 47006012 We wen give you guys our love . . . ”, “eng newliving 47006012 There is no lack of love on our part . . . ”. In these cases, the other four languages (and English too) use a noun phrase with no tense marking that is translated as er > ål is km > s Bo an ian ika eg er r s Afr orw h > ä n N nis h > esta ɗo Da edis to > e> Sw eran ndï ulfuld > F p Es bay awa gĕ > ka M am n > nch Ad enia Fre ‫ﭤو‬ ú ole Arm hi > p > k Cre d an dey Sin Kute t Luci gin > id in Sa ian P er > ta no Nig ) > là vaca Cha (Nigeria da a sh > Mad Engli > in eole Mam d Cr Islan a Se > ko ra Naro ibia) > (Nam Nama ‫ﻣ‬ ‫ﯽ‬ > Dari be Dyula > > bɛ Bambara Zarma > ga Yucateco > ku Sango > yeke si > o an n i nk n a ra i > > n k e ba K u o n n r u li b a h a> K m p > na ém k a M a ju s i > n c h E k M o s rm a ta a > u >g ŋ G o nga ba ʋn > ja m w o Ts nko re > isaala o a S K re f ng ɩ a lu F a >s mu v > ta Tu saal > pa yua inea) a Pa ngoa Daw > Gu ew Ta ng o aN Hm (Papu u o Kara yen > p > lə ) s Mori (Nigeria > go a in Mad an Pidg ri Nige go > ya Arhe > kpelaKrio -O North wahn Ivbie glish > Kriol En e liz Be e Lote > lap > zi Tampulma > cua orado Mixtec San Juan Col Huastec > ne Chuj > ol Tsimané > ra Quiché > na Tabasco Chontal > xe Kamwe > dzə gə Naro > gh a Chayuc o Mixte c > cua Sio > m a Hiri M otu > do Vlax Rom a Iraya ni > ka Sea > batay Is Sain land C Tha t Lucia reole En n i glish Cre G e > จะ > gw ole n> Fre ine nch Sa la > ka s y M a ak > Sta 'anya gen Ce nda n > sag rd B n tr M Ind iatah al Ma alay ar >a En one Bid lay Bu glis sian ayuh > ka kan lg a h > > > P a ri re ak w a a ill B p ia n n V aba m e > щ J a ie t n M a n t o е r a a m la > i> e y lo > s či e > nan s ẽ ti Khoe-Kwadi Torricelli Mande Tai-Kadai Austro-Asiatic Austronesian Afro-Asiatic Hmong-Mien Lashi > wa Achang > das Zaiwa > râ Mün Chin > khai Tedim Ch in > ding Siyin Ch in > tu Zo u > di Mak (N ng Hakh igeria) > di ng a Ch in Fala > lai Ng m Chin Tum awn Ch > ding in > a-Iru tuk Sua m u > a Ce u > ab pi Ng rma > o ka Ma iemb oo la Iw y (m n > g a a e Ar l > a crola o ng K u p -L to b ua ge K ot oke )> Bw uw > eb p > aka ole n W an aa > a es ab v W M a t-C w a e S o est ske ent na > ra u e ly t h e rn K n e s l L i k a n rn a n > m b i B o jo d e r a > ba eh kɔ l ŋ > ad oj ar é > na i se li > Di u n a k ta k t Te > t > ḓo > ќе k > a W arau da nian P Ven edo c ta ɛ M a ko > > ny ge K a enya > pa ng D h u a tu ru ll K a an > ska a > s h Ne dish iga > e y Sw th Giz o > a e n u a a o c S mb ava > ba h C a lam > bae h is B am e Pijin rou > k d i Nyin in > ba Pis k o T > tem Malê ac > oc Bugaw > eke Bukiyip > la Mengen nch > pou Creole Fre Seselwa > goin Hawai'i Pidgin sal > Afrikaans Bekwarra > ba bo si > o an in nk n a ra i > > n k e ba Ku onn ruli bah a> K m p > na ém k a M aju si > nch Ek Mos rma ta a > u >g ŋ G o nga ba ʋn > ja m w o Ts nko re > isaala Ko refa g S n Fa ulu > sɩ a m v > ta Tu saal > pa yua a a nea) > a P go Gui aw Tan ng D New o Hm (Papua u a po ar > K n ) > lə isye Mor (Nigeria > go a in Mad Pidg rian Nige go > ya -Arhe > Krio -Okpela North wahn Ivbie glish > Kriol En Belize e Lote > lap a > zi pulm cua Tam ado Mixtec > San Juan Color Huastec > ne Chuj > ol Tsimané > ra Quiché > na Tabasco Chontal > xe Kamwe > dzəgə Naro > gha Chayuc o Mixtec > cua Sio > ma Hiri Mo tu > do Vlax Rom ani > Iraya ka Sea > batay Is Saint land C reol Luci Tha an C e Englis Ge i > จะ reol h> n> gwin e Fre e nch Sa la > ka s y M a ak > Sta 'any gen Ce nda an > Bia ntra rd M saga r Ind tah l Ma alay En one Bid lay > > ak an ka Bu glis sian ayuh lg h Pa ari > w > ak > re an ill B pia an V aba m e > щ Ja ietn Ma nto е ra am la > i> e y lo či se > na > sẽ nti Sino-Tibetan Oto-Manguean Mayan Mosetenan Niger-Congo unknown Kuot Indo-European Khoe-Kwadi Torricelli Mande Tai-Kadai Austro-Asiatic Austronesian Afro-Asiatic Hmong-Mien M Figure 3: Clustering of 100 pivot future tense markers. Each node is colored based on its family information. Languages with no record on WALS remained white. This clustering is based on JSD of markers in marking 5733 verses in bible. It can be seen that in many cases languages with the same family behave accordingly in tense marking. 5 Related work Our work is inspired by (Cysouw, 2014; Cysouw and Wälchli, 2007); see also (Dahl, 2007; Wälchli, 2010). Cysouw creates maps like Figure 5 by manually identifying occurrences of the proper noun “Bible” in a parallel corpus of Jehovah’s Witnesses’ texts. Areas of the map correspond to semantic roles, e.g., the Bible as actor (it tells you to do something) or as object (it was printed). This is a definition of semantic roles that is complementary to and different from prior typological research because it is empirically grounded in real language use across a large number of languages. It allows typologists to investigate traditional questions from a radically new perspective. The field of typology is important for both theoretical (Greenberg, 1960; Whaley, 1996; Croft, 2002) and computational (Heiden et al., 2000; Santaholma, 2007; Bender, 2009, 2011) linguis0.31 Lashi > wa Achang > das Zaiwa > râ Mün Chin > khai Tedim Chin > ding Siyin Chi n > tu Zou > din Mak (N g Hakh igeria) > din a Ch in > lai g Fala Nga m Chin Tum wn Chi > ding n a-Ir umu > tuk Sua > ap i Ce u > ab Ng rma > o ka Ma iemb oo la Iwa y (ma n > g e Aro l > a crola ng Ku p-L tob ua ge K ot oke )> Bw uw > eb p > aka ole n W an aa > a es ab w ve W Ma tC a So este ske entr na > uth rn lyn al ka er Ka es > Lim ni n b Bo njo der a > bo bal eh kɔ ŋ M >o ad j ar é > na dición yu’un hech laj spas . . . ” (literally “a blessing . . . LAJ make”), “eng newliving 40010042 . . . you will surely be rewarded.” Perfective aspect and past are correlated in the real world since most events that are viewed as simple wholes are in the past. But future events can also be viewed this way as the example shows. Similar maps for present and future tenses are 0.31 presented in the Figure 6 and Figure 7. i se i> Dil n k tu k Te > ta > ta ḓo > ќе a uk > W ara da nian P Ven edo c ta ɛ M a ko > > ny ge K a enya > pa ng D hua turu ll K a an > ska a > s h Ne dish iga > e y Sw th Giz o > a e n u So vaca bamba a Ch ma > e la Bis ijin > ba kameh > P rou i nd yi N > ba Pisin Tok > tem Malê oc wac > Buga > eke ip kiy Bu > la Mengen ch > pou Creole Fren Seselwa n > goin Hawai'i Pidgi Afrikaans > sal Bekwarra > ba tics. Typology is concerned with all areas of linguistics: morphology (Song, 2014), syntax (Comrie, 1989; Croft, 2001; Croft and Poole, 2008; Song, 2014), semantic roles (Hartmann et al., 2014; Cysouw, 2014), semantics (KoptjevskajaTamm et al., 2007; Dahl, 2014; Wälchli and Cysouw, 2012; Sharma, 2009) etc. Typological information is important for many NLP tasks including discourse analysis (Myhill and Myhill, 1992), information retrieval (Pirkola, 2001), POS tagging (Bohnet and Nivre, 2012), parsing (Bohnet and Nivre, 2012; McDonald et al., 2013), machine translation (Hajič et al., 2000; Kunchukuttan and Bhattacharyya, 2016) and morphology (Bohnet et al., 2013). Tense is a central phenomenon in linguistics and the languages of the world differ greatly in whether and how they express tense (Traugott, 1978; Bybee and Dahl, 1989; Dahl, 2000, 1985; Santos, 2004; Dahl, 2007; Santos, 2004; Dahl, 2014). Low resource. Even resources with the widest coverage like World Atlas of Linguistic Structures (WALS) (Dryer et al., 2005) have little information for hundreds of languages. Many researchers have taken advantage of parallel information for extracting linguistic knowledge in low-resource settings (Resnik et al., 1997; Resnik, 2004; Mihalcea and Simard, 2005; Mayer and Cysouw, 2014; 107 Language based on their average divergence in past, present, and future markings Ce Piapoco Kobon Kalam Tai Kaqchikel Turkish Minica Huitoto Caquinte Kein Northern Puebla Nahuatl Cotabato Manobo Central Tunebo Muinane Gofa Cashibo-Cacataibo Avaric Kuman (Papua New Guinea) Highland Oaxaca Chontal Daga Saniyo-Hiy Border Kunaewe Northern Adamawa Pastaza Quichua Tezoatlán Fulfulde Mixtec Peñoles Mixtec Limos Kalinga San Blas Kuna Mbay Yuracar Central e Highlan Aymara Western d Puebla Nahuat Bolivia Coptic n Guaranl í Pisaflo Karam res Tepehua ojong Jola-Fonyi San Migue l El Grand Atatlá e Mixte Jamilt huca Mixte c Karka epec Mixte c c Akha r-Yuri Saram accan Diuxi-Tila Pwo North ntong o Mixte Easte ern Karen c Chic rn Bru Tzot hicapan Zapo tec Cabé zil car Mos Mey kona Mara ah Ama thi tlán Sant Zapo Coa a María tec Russ tecas AltaQuiegola s Zapo ni Zapo Old ian Slav tec tec Slov onic Mad enian Wuv ak Yag ulu-Aua Siri ua Pila onó Mü gá Mat n Chin Kac u Chi Lea hin n Ma lao Chi Aka cushi nantec wai San o Car Juan Iba ibbeanAtzing Jav o Pop Cho n ane olo l se Me ca Cer ngen Ne ma Lan han Ku go (Ug Yuc mam and a) Lac ateco Sap andon Ce osa Mo ntral Ten cov Sama Ma ang í Easte ori o Oto mi Mo rn Ur ose Highla Fij du Cree nd Oto Tu ian mi Hindngag Ly i Ka élé So pin Fo utherngamara Sa n Nu ng ni i Sa n Ma Bu ngo rtín Itu Ge glere ny Ya n oso M be Tri qu Bu aposm i M gawa Bu Qu alê c ang Bu ich Bu kiy é Ivb mb ip Am ie Noita Ar ba M rth apesh -O To angg i kp Ac l a Bu ela Po hi -A an rhe Ub qomc g Ar ir hi' Ch ifa Ku am ma Nd ke ac -M Ira o le oco iniafi a Bo ya Ch lin M am ao Ko or or Sa re o ro Ta rang an No gaba an i M Su an rther wa Man ob Sa lka darin n Kh o W te Ch mer A ip ré-M in K pi i es aw e A wai nayé é M lgon o w H Daw ag qu Sa ua aw ha in Ya nu utla a vul N no má M az Ze do m atec H m ng ám an ba a i un oo Southern Rincon Zapotec Zacatlán-Ahuacatlán-Tepetzintla Nahuatl Tena Lowland Quichua Guahibo Tuyuca Kafa Nalca Samberigi Matsés Yongkom Guerrero Amuzgo Camsá Aruamu Yatee Zapotec Muna Wiru Angor Ewage-Notu Makasar Iduna Kumyk Popoloca Tlalcoyalco Inga San Marcos Wayuu Bargam Murui Huitoto Mian Dawro Wolaytta Nahuatl Huasteca Nahuatl Western a Central Huastec a Nahuatl HuastecKagayanen Eastern ca d Popolu Highlan Bimin Bora ) New Guinea ahua Awa (Papua Cashin apra shi-Sh Cando Biangai min Oksap biano Guam rn Kayah Weste Quechua ui Ancash Salt-Y hucos sheq Tama ano ern Conc South Kam uer Cuaiq Awa- ahuita ia Chay Wask le Ame hua Tepe n uetla Goli a t Tann e hwes Sout Koreguajeo Cub a ueng atsig Nom Ngalumga urun Surs Patep Hueh Iamalele Olo r aapo bú-K Uru Bedjond rinã Apu n iatu Inup Fasu skan ha aata th Ala Nor Ang chua i Que oran Wa ran Martín assa San Tab -Kasa i Jola gga s Ban Nia fian Mu ama Bun yle Kab ra Keapaiba Cu tsa bak Rik Chin a ung lim Zot Mo teco an Uspan l Bla an ada Bla ion ron nik Ko angani Ma ona c Sar Pam abi Ar ní an ara adi Gu Tabo Ch ayan potec ac agu rí ZaTotonberá Par i uie -Q rez Em dib ani Juá ern Da ec uit zat a ioq c De rth aw Qu epe No la Ma aut 'Auhelichʼin lí Xicot Ay Gw xaka er Ma Carri ay ern isn tec uth Gü po So tés Za tec e po am Lh ncón a Za Alun eo chí Ri Taba Mekarik a Wi M aiv ok Or potectec n Za po ní tlá Za ua ec Guaranasi ara tep Miaholo livian Ka um cana rah Oz Bo Ta Ta veharo rn al ina ste ntr M Ka nob ec Ea Ce tak Ba NoboMixt ec ixt bu c pe M Sa m se o ote úa Ka or yo Oc sond ug Yo na ya Si Do asauun m Ka upiat hua o In ec ob a ka Qu ác ár l as o Ch biku Ho ai Al uc m ne st án Na ga Thines e es ili rn tlhIn o Hu a Chnam D i uthe kk et tun Jara jin So Ha Vi Te Pi in Ch in é lam n Ch an h Fa Siyi im yu c Ts da ste ir Bi ua ng ju H Sa ga ay N al k atah sa Bi lM ra Sa nt we rth na No Pa St an da rd Bu M Nam gi al To ne ay Bw a (N Ta Tb belo se an am ba oli ab ib ru w ia N an ) Ala U apu a Ea ng ma cis ste To an k Pi Iw co rn al Ha León Tawb Ku sin wa Zo ui ot i'i qu d Pi W Ti dg e es Ni tern Q'an Nacunain ge Ka jo ro ria nj b'a n Pi ob l To No Mad Gi Tz dgin al rre rth a elt s St ern (Nigekyod al rai Da ria e t Cr ga ) ra Ka Patpa eole ing tar Qa ang Plap Ta Es Kr qe tad o Krmpulm iol t o de um Nd en a M Méx og Se Qu ezqu ico sel eré ita Ot Ixi o wa tar l Ot om l Cr o eo Ot omi i le om Ch Fr av en i ac Ta anoch ng oa Gi Chuj ton Kw Chopga ara i Djim 'ae ini Ma Ika Seno kaa ufo San Ba ba Igb Jua Ma o n Co Yo lay lor Ma rub Go ado mp a urm Mi rul anc xte i Bu lu (CaAfrik hém c me aans a roo Ko n) Ek nni Ku ajuk ran Bu Mandi ko li (Gh nka Yal ana) unk Sus a Hir Tupuriu i Mo YocUrak Law tu obo ué Didoi' Zai a Las wa Ma hi Kah ru Sou ua ther Hau n Pue South sa bla Fal Mix i tec Tim ugo Konso n Yan Murut Kan esha kan ' Nya aey nko Nyo le Southea Kut ro Sho u stern na Pueb la NahLenje Trin uatl Igna itario cian Mac o higu enga Sout zulu Huam Nort h Ndebele alíes h Ndeb Marg -Dos de ele os-Yarow Mayo Gusi ilca-L Huánuco Tharakai South auricocha Quechua North Bolivian Quechua Quec Boliv Huall aga Huán ian Quec hua North uco Quec hua Junín Quec hua Kamb hua aata Tatar Bashk Kara-Kalpa ir Karachay-B k alkar Uzbek Chuva sh Easter Southe n Mari rn Altai South Azerba Azerba ijani ijani Fr c te an in qw Ch e Ira sila U uo nzim K oo o Kisi K enger rn atin N ue he o d Ch N ut inya So gr k e atin an Ti du uy a Ch ighl U um al H M op rn ese tal on N ste ur e Ea ad es o Ch M lin sc ra Ba ba faan jára in Ta Na aja Ch ta Gu wm ese Ba rm tak n Ag Bu lan irí ya ga Ba ka Ba oreo l Ca Ay ntra a an Ce ac M g an De mo arí Sa um nte o Pa vá ga Xa lan a ay Ba an e Gb Us on st No m we Ki rth a No wa Ku ossi gam M an l Ng saa al Ku asa Pa cham Nt mobaarra Bi kw Be zi tho Lo ko ern So Ka uth So pedi a Se an Tsw ula ngo Dy mbara axa Ba asong n glish En Xa meniayen nch ole Ar ris Fre Cre Mo io ole nd Kr Isla n Cre Sea fut cia Ba nt Lu ål Sai km sk te Vu ar n Bo nor Tik rwegia n Ny No rwegia No nish Da glish mani En x Ro Vla edish ) 0) Sw anian anian (1453- 150 Alb eg Alb ek (1100Gh dern Gre lish Mo dle Eng ole lish Midtian Creol Eng Hai ize Kri Bel ba Mo efare Far da Ven iamento Pap ndrou p Nyi p-Loke Aro am Mananyan r Ma' u-Gudu Mof we Irig abí yah Kay au Ken bila Wah imba Tsik eroon Mam Cam a Zarm Suau o Ninz rib Dog aré Iu Mien Mad Lobi hern Bobo Sout a Hang Zou (Nigeria) Mak Chin Tedimngkabau Mina anu Term a Chin Hakh krou Adiou Hdi Jur ModoChinese Min Nan g Daw Hmon Gun Wa ge) Parauk (macrolangua Malay se Javane se Achine Senoufo ic of Congo) ratic Republ Supyire Mono (Democ ng Mangse Koorete Galibi Carib Cheroke e Arabela Ossetic Russia Buriat Oirat Khakas Chimborazo Lelemi Highland Cañar Highland Quichua Quichua Ayacucho Quechua Cusco Quechua Ajyíninka Apurucayali Ucayali-Yurúa Ashéninka Pichis Ashéninka Huichol Ama (Papua New Guinea) Chachi Woun Meu Alamblak Mayo Gwahatike Gumuz Northern Paiute Naasioi Southern Pastaza Quechua Telugu Kamula Fore Mountain Koiali Kwoma Lambayeque Quechua Sharanahua Yaminahua Northern Oaxaca Nahuatl Sukuma Achuar-Shiwiar Chuave Asháninka Awiyaana Kosena Páez Eastern Tamang Kyrgyz Shuar Kazakh Quechua Huaylas Ancash Quechua Ancash Quechua Northern Conchucos Eastern Apurímac Quechua Huaylla Wanca Imbongu Bo-Ung gu Umbu-Un Kube iawari Somba-S Borong Mape Rawa amane Guhu-S Nabak Korafe-Yegha Yareba uha Yawey t Selepe m Aekyo Yipma g Henen Angal Punjabi bisa Huam o Yopn Haya tec chi Zapo tec Yatza Zapo ocho Iatmul Zoog gana Keya Kaili Ledo neña Cavi ufa Usar tec Zapo a YalálagAguarun i Bauz o Gam wa Ojib eta kwe Mar Limbu nal ka Pajo énin Tepehuane Ash n Mix NortherJuquila Yaqui wa Ojib a Severn Tepehuan ilco ehu Tep hich Tlac stern Zapoteca ey Kew thea Sou a Vall West Kewa t olul Eas niboa Tlac -Co Cor tern a Wes esa Shipibo ta Ter ar Corga San El Nay pan a Pam ann er-B Boo Ham ian Zyr a w Komi-Durum Hebre o ong Ko saaba Ma dhi Sin ayo -M í san Apala ú Yes ruk ndu ka Mu Din ri estern Laaifor thw Bir u Sou lba Buam na Ma Ba ng nya re Ke äbe Ng tonac To Yele tla ga too ri Papan Da kae 'di ara at Am Ma alé ng ec Da zat fán Ma Co ís az rec Dí Pa arim De nh Te Bomuer apa rri Jal Ca gon Do no So Tucabiyè r ro Ka me To Kh a al echuren ntr Ce a Qu Ka lian arc aw go he jam S'g Mon Apacomo se Ca lh n Ha ester rn OrAkoo ese gu lde W ste Ea rtu lfu pi Po n Fu Ho lee ria Se tec i ge po arh Ni a Za sg ge itl tti ra do M Chha t Gu lora hua t Be CoQuec rnta a ba ra ar a d Se an Ar m ay wl n hu ala Lo ester Tara t Gb ng ya po W and hwes Li Seco atl a hu hu a Na wl ut Lo So n Na na an n cá pa ay ria n oa Ca W ga lia ne Ita Bi a ich Hun ss M Bi turu u ul i NyaKag an w de M an ba N Su an ni c ai bi n kr ra ia U A rg rd eo da G an St Lahu Achang na Peñasco Mixtec Magdale Kouya Miyobe Mbyá Guaraní Eastern Karaboro Waama Mündü Nigeria Mambila Konkomba Kamwe Tojolabal Obo Manobo Nakanai Dan Kara (Papua New Guinea) Guinea Kpelle Baatonum Tsonga Romanian Croatian Kutep Japanese da an aní Pisaflore Karamojos Tepehua Jola-Fon ng San Mig yi Atatláhu uel El Gra Jamiltep ca Mixtec nde Mixtec Karkar- ec Mixtec Akha Yuri Sarama Diuxi-Tccan Pwo Norilantongo Eastern thern Kar Mixtec en Chichi Bru Tzotzil capan Zap otec Cabéca Mosko r Meyah na Marath Amatlá i n Zap San Co ta María otec Russiatecas Alt Quieg as Za olani Za Old an potec potec Sla Slovenvonic Madak ian Wuvu Yagu lu-Au a Siriona Pilag ó Mün á Matu Chin Kach Chin Leala in Mac o Ch Akawushi inante c San aio Ca Juan IbanribbeanAtzingo Java Po Ch nese poloc Menol a Ce gen Ne rma Langhan Ku o (U Yu mam gand a) Lacacateco Sa nd Centposa on M ral Te ocov Sama M nang í Ea aori o Oto mi M stern Urdoose Highl Fijia u Cree and Oto Tu n mi Hin ngag Ly di K élé So apinga Fo uthe mar rn Sa n Nun angi Sa n Mar i Bugngo tín Itun Gen lere yo Yab so Triq M em Bug apos ui M aw B Q alê ac uang B uich B ukiy é Iv um ip Ambie Nbita A M ba orth rape -O sh T anggi kp Achol aB el a-A P ua i ng U oqom rhe A bir ch i' C rifa K ham m N uk ac a-M Iray do ele oco inia fia B a Ch olin M am ao K o o S ore ro rro Tagaran an No ab gan aw i Su Man rther a Man ob S lka darin n K o W ater Ch hmer A ip éin K pin i Maw es A w ay e é M lgo aio é w n H Daw ag qu S ua aw h in Ya anu utla a avu l N n m M Z d om á az ate H em ong ám an ba a i c un oo St Sta nd ard Bu M g a To ine lay Bw a (N T Tb belo se an am aba oli ab ib ru w ia Nap an ) Ala U u a Eas ng m a sc tern Tok Iw an o P al HawLeó Taw Ku isin n ai'i Zo buid ot P qu Tic idg e Q'a u in n N na an job'aaro jo idg bal l ltalin de Nam Mansaka Ata Manobo Botolan Sambal Namiae Barai Tereno Tlahuitoltepec Mixe Texmelucan Zapotec Totontepec Mixe Batad Ifugao Teutila Cuicatec Kyaka Karajá Nepali (individual language) Chipaya Southern Rincon Zapotec Zacatlán-Ahuacatlán-Tepetzintla Nahuatl Tena Lowland Quichua Guahibo Tuyuca Kafa Nalca Samberigi Matsés Yongkom Guerrero Amuzgo Camsá Aruamu Yatee Zapotec Muna Wiru Angor Ewage-Notu Makasar Iduna Kumyk Popoloca Tlalcoyalco Inga San Marcos Wayuu Bargam o Murui Huitot Mian Dawro Wolaytta Nahuatl Huasteca Nahuatl Western teca Central Huas teca Nahuatl n Huas Kagayane Eastern Popolucain Highland Bim Bora Guinea) ua New inahua Cash apra Awa (Pap i-Sh Candosh Biangai in Oksapm ano Guambi ah Kay WesternQuechua i Ancash Salt-Yueq chucos Tamashano n Con Souther Kam r uaique Awa-C yahuita Cha Waskia Amelea ehu etla Tep lin Go Huehu na est Tanuaje Southw reg Ko Cubeo ga tsiguen m Noma Ngalurunga SursuPatep le IamaleOlo aapor ú-K nd Urub Bedjo nã Apuri piatun su an Inu Fa Alask ataha North Anga echua i ran ín Qu Wao ran Mart ssa San Tabala-Kasa i Jo ngga Ba Nias an Mufi ma Bunabyle Ka ara Keap iba Cu aktsa Rikb China ng im Zotu Mol teco an n Usp Blaa n al aa onad i Bl ion Kor ranganManik ona Sa Pamrabic A raní dian GuaTabo c Chaayan pote nac gu í Za to rá Para uier To be i -Q árez Em ib tani e Ju thern Dadatec a oqui ec D Nor Mazelaw Qui otep utla uh hʼin í Xic Aya 'A Gwic akal er MaxCarri ay rn üisn ec uthe s G ot So mté n Zapapotecne Lha có Z lu hí Rin baa A ekeoik Ta M Wic Mar iva ka ec Oroapot ec n Z apot ní atlá c Z ra i hu tepe n GuaKanas ara Miazolo ivia um a ah acan a O Bol Tar T aveh o in ar tern tral M ak Konob c Eas te Cen Bat Nob Mix tec u ix c M ab tepedúa S asemro K go o Oco on au yay Yos Sin Do asau n tu a Kamupia hu obo a ec a In Qu Chác uár ol bik -H hai lask uco an e t A uán NamIng Tines e i wes H h es il ern tlh C rth ao am D i uth ka ietn un ra No Pan So Ja ijin Hak V Tet P in Ch hin am C ané h Fal iyin sim ayu ec S T id st gir B ua an aju tah H S Ng alay k Bia M asa al S ntr Ce 0.02 Gilbertese Bariai Tamil Sio Burarra Tinputz Bambam Kono (Sierra Leone) Pinotep Toraja- a Nacional Mixtec Ngawn Sa'dan Tachel Chin hit Ambulas Merey Chortí Timne Tawal South a Ramoern Samo aaina Kekc Chuu hí Kuan kese Serbi ua Mars an Mbu hallese Juku ko Kuw n Takum Chumaataay Shill burung Silac uk Lach ayoapan Isthm ixío Zapo Mixtec Izer us Zapo tec tec Gud e Wes e Mun tern Pen an Dii dani May Gap oyao Kim apaiwa Ifugao Mo ré Sou tu Anu thern Biri Mu fo for Cac yang Me ua Comlpa Gok altepec Chi Kupanana nan Hel tec ong g Malay Tob Pop a Kw ti' Ny anyam We abwa a Ka stern Ga diwéu Bukid non Ag ro Ma Tak uacate nob co o Tep ia Ma eux Ya m ila Cu ica Bu wa tec Ch hid Muiquitan o Ka rle Es daz Öm e Ejj an Du sun Me ie a Ce nta Mo ntral wai Up pán Bonto Ta per Ma k Go laa Ne ya Tu ron ndig caxa To Do wa talo ton Ga bu li Ifu ac gao Zu rifun Qu lgo a Ad iot -Gem Bo ele epec ze Ch k Bu koba ina Ka sa ru nte Sa mb c Ar n M era os ate Ka i o De M ya lM Pa anggpó ar Th rkwa ara Hu i Ab ad av Ro au o Ch e De tok in Sa lo as Iy r Iy ojwa W o'w 'ja Ow ol uj Ch Di a of wa or Ch ot M tam or e M as m ote La am ana ari Be m ar Ve te- a (T a Se Be no og ng Na W wd o ndi o) ufo Ch ap m Nor ay ish an In Lush theauco a M Si do N ss ne ai stern ixte Ep gi ala sia Din c n W en em ka D ar a boon U en is W ab Mya es et t-C o en tra l Li m ba n fia be ia ala Ba m edonian sa Be ac ar Si sh g di M lg a Bu gl ulun a Kur ni Va m monern sta Tu ta du Pa orth ola N dh thili di Hin ia) A ai Hin an an M ji be nz Fi rib ito d Ta a Ca ísk M ri angngna ya an Da ay an en e o tec M ay (K nd ng M o aa To inan ) ish Lu m an No an iteko an Chixe voireEngl Sr kt iap M e d'I le Te ch us ôt eo c So hm a (C Cr ria Ist ur an Sy abic To maic al Ar ni Ja assictian ma Cl yp Ro Eg c ixe hi M Sintead h nte ina Aw els atlán aic W az ati ín Ch ram M jar ac o-A Gu um Oz sh n Ne Iri syria ba no As lam ati Ni wo d Ch Lu e lan gh atino Ew golo Po sque rn Hi Ch asy tut Ba ste tepec lag kti We tal u Ma n Inu Ta tea a Pla hé alam nadia ech rep Ac lay rn Ca Ma ste a d Pu a ghlan Ea mb Ko repech Hi dham Pu stern O'o We no ho To masa tl Ma e Es jam Nahua An errero Gu 'kmaq Mi nnada c Ka ghur ona Uy wol Tot Fai hland c Hig efol Tel no Zapote Da os nya Cajon nka Ma rlpiri Wa Au una Yuc Nii i na Tw rth Tan No ne a Sia anakain onac Um utla Tot tec Coy ya nan Erz ana Chi Lal ite Kan ke-Yate Ino toat Wan auz Gag pele Sek rayu Guinea) Gua tujil ua New Tz'u de (Pap Mensa Xho it atec Itaw aan Maz Mab u-Yalanji Tecóatl ) Kuk uage Jerónimo San ali al lang Benga (individu Oriy wake Mau ave Ank e ea) Guin Terib New nga Kwa a (Papua Maiw lona Atta Pamp (Ethiopia) Male a Girawpan Zapotec Choa ya Nkon li Soma ia Saam cian Valen lynes Maske Grebo c c Northern Zapote adas Zapote go Albarr Mixtepec Santo Domin Bribri Zapotec Ocotláni Naga Angam n Cheche Triqui Copala Amanab Chinantec Palantla ala-Rano-Atchin Uripiv-Wa Tumbuk Waima Matal Iyo Amuzgos Amuzgo San Pedro Pele-Ata Siona Yine Keley-I Kallahan Sabaot Lhomi Te te lc in A go Ira Es N mha ni pe ah ric Lo an Pe ra uatl nt Pl Ic w Sa rsia o W au el xo n es an tern Fatdie di n ro tsc c Fl Frisi es h G em an e Sw er ish M ab man rd La altese ian tv Es Latv ian to Li Fi ni ian thua nn an ish Po nian Cz lish Sl ec Ba ov h Co An va atl Fr ria ak cie án en n Sw nt Gr ah Ny Mix ch ili ee k (to Sp anja e (in an div No 14 ish idu rth al ern La 53) lan Sa tin gu mi ag Ki gir Digoe) Go yama go Ku VuPular ps njo Ki Ki ab Malanyarw ku iny yu wi anda Se Ca Ru na sig Be ura mb Po Kw ndi n Du a ko ere ma (Zam mo gat bia Ag ) Ma asi Ma Ilo ta na ko Fu kond lfu e Ina He lde bak he no Ki n Rin Ba Seim sar con tak ada To at We Ma Bik ba ste cha ol Me rn Nig me Tep nde (Si er Mochi Fulfu eto err tutl a Cha Leonelde ina nte ) Efi c Alu k r Ga Mb Teso Coa Par unda ana tzospa Gu n n Mix lay Sw tec Yam ati Bro oke Bim ba 's Poi nt PalMaran a awa ao Eas Pangas no tern Boninan Pili tok Tag pino Mongo alog Ceb ndow Hili uano War Kin gaynon Mat ay (Phi aray-A igsa lipp ines lug Cen Manobo) tral Mas Biko bate l Agu san Mannyo Agu obo tayn Wichí Lham Caluyanuen Bata tés Noc n Piapoco k Sima lung ten Bata Kobon k Ang un Bata kola k Dair Kalam Mapudun i Ngam gun NyakTai yusa-Ngobay Kaqchikel nde Obol Turkish Ikwereo WaffHuitoto Minica a Agarabi Caquinte Tuma Huli -Irum Kein Benab u ena Aleka Northern Anggu no Puebla Nahuatl ruk Yali Cotabato Manobo Sirian Desan o Central Guana o Tunebo Muinane Piratap no Barasana-Eduuyo Gofa ria Carapa na Cashibo-C Kire acataibo Waimah Avaric a Macuna Yau (Morob Kuman (Papua e Provinc Numang e) New Guinea) gang Highlan d Oaxaca Chontal Siroi Daga Koya Sinhalese Saniyo Dedua -Hiyewe Border Suena Kuna Zia Northe Tatuyo rn Pastaz Adam Timbe Imbabura Highland awa Fulful a Quichua Quichua Tezoa tlán Mixte de Hanga Hundi Peñol Binumarien es Mixtec c Kunimaipa Limo Aneme s Kalinga Wake San Safeyoka Blas South Tairora Kuna Mbay North Tairora Yurac Guayabero are Weri Central Urarina Aymara Highland Mag-antsi Ayta Pueb WestKandawo ern Boli la Nahuatl Chiquihuitlán Mazatec vian Guar CopticFolopa Luang Bola Avokaya Wandala Sundanese Kenga Kaiwá Galela Nadëb Mbula Sepik Iwam Halia Mokole Lukpa Wè Northern Lote South Giziga Lampung Api Bislama Gumatj Djambarrpuyngu Central Mazahua Duri Barbacoan Sino-Tibetan Quechuan Cariban Mangrida Arawakan Altaic Lower Sepik-Ramu Oto-Manguean Jivaroan Nadahup Yele Mayan Basque Songhay Cahuapanan Matacoan Na-Dene Camsá Teberan-Pawaian Tacanan Urarina Mixe-Zoque Macro-Ge Zaparoan Mosetenan Niger-Congo Tarascan Awin-Pare Waorani unknown Karkar-Yuri Kuot Left May Peba-Yaguan Tol Trans-New Guinea Guahiban Huitotoan West Bougainville Yanomam Nakh-Daghestanian Huavean Uru-Chipaya Indo-European East Bird's Head Tucanoan Baining-Taulil Khoe-Kwadi Oksapmin Totonacan Choco Torricelli Mande Tai-Kadai Tupian Uralic Ticuna Araucanian Candoshi Kordofanian Ok Arauan Sepik Yawa Central Sudanic Yuracare Pama-Nyungan Yareban Austro-Asiatic Cofán Gumuz Algic Austronesian Guaicuruan Senagi Tequistlatecan Paezan Iroquoian Chibchan Korean Zamucoan Japanese Kartvelian Sulka Border Harakmbet Dravidian West Papuan Misumalpan Uto-Aztecan Panoan East Bougainville Nambikuaran Dagan Chiquito Eastern Sudanic Afro-Asiatic Dogon East Geelvink Bay Hmong-Mien Cacua-Nukak Eskimo-Aleut Figure 4: Clustering of 1107 languages based on the average Jensen-Shannon divergence in past, present, and future marking of their respective top markers. Each node is colored based on its family information. Languages with no record on WALS remained white. It can be seen that many small clusters of nodes have the same color, which together with our quantitative evaluation supports that if divergence of tense marking is low the languages are very likely to be genetically related. Christodouloupoulos and Steedman, 2015; Lison and Tiedemann, 2016). 5.1 Parallel corpora and annotation projection In general, parallel corpora are a resource of immense importance in natural language processing at least since Brown et al. (1993)’s work on machine translation and they are widely used. In addition to machine translation, other applications include typology (Asgari and Mofrad, 2016; Malaviya et al., 2017) and paraphrase mining (Bannard and Callison-Burch, 2005). Annotation projection is a specific use of paral- c te an hin qw C e Ira sila o im i U u nz K oo ge o Kis in n K en hat N uer ther a o dC N ou ny S ri k ye hatin lan Tig du mu a C igh U u al H M op rn se tal N aste ure e hon E ad es C M alin co nra a B abas aa ár hin T Naf ajaj C u m e ta G aw es k Ag B urm ta an B alan rí B akai o agay B ore al C Ay entr C aca M n Deg oa arí Samaum te o P aván ga X alan ya ba B san ne U oo tG N im wes K orth aa N uw K ossi am M gang l N usaa l K asaa m Pa tcha a N ob ra Bim war ek B i tho Lozako rn So K uthe So pedi a Se wan Ts yula ra ango ba ax D h Bam songian glis En Xaa en yen ch ole Armoris Fren Cre M ole nd Krioa Isla Cre Se afut cian B int Lu ål Sa km sk te Vu kar ian Bo ynor Ti weg ian N Nor weg Nor ish Dan glish mani En x Ro Vla edish 3-) 00) Sw banian banian (145 15 Al eg Al eek (1100Gh ern Gr glish lel corpora: a set of labels that is available for L1 is projected to L2 via alignment links within the parallel corpus. L1 labels can either be obtained through manual annotation or through an analysis module that may be available for L1 , but not for L2 . We interpret label here broadly, including, e.g., part of speech labels, morphological tags and segmentation boundaries, sense labels, mood labels, event labels, syntactic analysis and coreference. We can only cite a small subset of papers using annotation projection published in the last two decades: McEnery and Xiao (1999), Ide (2000), Yarowsky et al. (2001), Xiao and McEnery (2002), Diab and Resnik (2002), Hwa et al. (2005), Muk- Mod dle En eole glish Mid an Cr iol En Haitilize Kr Be a Mob are Farefnda Ve mento Papiaindrou ep Ny -Lok Arop am Man nyan r Ma'a Gudu Mofu-e Irigwyabí ah Ka hau Keny Wa ba mbila Tsikimroon Ma Came a Zarm Suauzo Nin b Dogri en é Iu Mi Madar Lobi rn Bobo the Sou Hanga Zou (Nigeria) Mak Chin Tedim kabau Minangu Terman Chin Hakha rou Adiouk Hdi do Jur Mo Chinese Min NanDaw Hmong Gun Wa e) Parauk (macrolanguag Malay Javanese o) AchineseSenoufo blic of Cong Supyire ocratic Repu Mono (Dem Mangseng Lahu c Achang Peñasco Mixte Magdalena Kouya Miyobe ní Mbyá Guara ro Eastern Karabo Waama Mündü a Nigeria Mambil Konkomba Kamwe Tojolabal Obo Manobo Nakanai Dan Kara (Papua New Guinea) Guinea Kpelle Baatonum Tsonga Romanian Croatian Kutep Japanese Luang Bola Avokaya Wandala Sundanese Kenga Kaiwá Galela Nadëb Mbula Sepik Iwam Halia Mokole Lukpa Wè Northern Lote South Giziga Lampung Api Bislama Gumatj Djambarrpuyn Central Mazah gu ua Duri Gilbertese Bariai Tamil Sio Burarra Tinputz Bambam Kono (Sier Pinotepa ra Leone) Toraja-SaNacional Mixt ec Ngawn 'dan TachelhitChin Ambulas Merey Chortí Timne Tawala Souther n Ramoaa Samo Kekchí ina Chuuke Kuanua se Serbia Marsh n Mbukoallese Jukun Kuwa Takum Chum ataay Shillukburung Silaca Lachi yoapan Isthmuxío ZapotMixtec Izere s Zapot ec ec Gude Weste rn Pe Mund ani nan Di Ma i Gapayoyao Kimr paiwa Ifugao Motu é South Anu ern Verses marked in CRS Verses marked in FIJ crs:ti hwc:wen tcs:bin crs:ti fij:qai tcs:bin tzo:laj crs:ti tcs:bin crs:ti hwc:wen tcs:bin tzo:laj crs:ti fij:qai hwc:wen tcs:bin tzo:laj crs:ti fij:qai tcs:bin no_marker Verses marked in HWC crs:ti hwc:wen tcs:bin crs:ti fij:qai tcs:bin tzo:laj crs:ti tcs:bin crs:ti hwc:wen tcs:bin tzo:laj crs:ti fij:qai hwc:wen tcs:bin tzo:laj crs:ti fij:qai tcs:bin no_marker Verses marked in TCS crs:ti hwc:wen tcs:bin crs:ti fij:qai tcs:bin tzo:laj crs:ti tcs:bin crs:ti hwc:wen tcs:bin tzo:laj crs:ti fij:qai hwc:wen tcs:bin tzo:laj crs:ti fij:qai tcs:bin no_marker Verses marked in TZO crs:ti hwc:wen tcs:bin crs:ti fij:qai tcs:bin tzo:laj crs:ti tcs:bin crs:ti hwc:wen tcs:bin tzo:laj crs:ti fij:qai hwc:wen tcs:bin tzo:laj crs:ti fij:qai tcs:bin no_marker Verses not marked in neither of languages crs:ti hwc:wen tcs:bin crs:ti fij:qai tcs:bin tzo:laj crs:ti tcs:bin crs:ti hwc:wen tcs:bin tzo:laj crs:ti fij:qai hwc:wen tcs:bin tzo:laj crs:ti fij:qai tcs:bin no_marker crs:ti hwc:wen tcs:bin crs:ti fij:qai tcs:bin tzo:laj crs:ti tcs:bin crs:ti hwc:wen tcs:bin tzo:laj crs:ti fij:qai hwc:wen tcs:bin tzo:laj crs:ti fij:qai tcs:bin no_marker Figure 5: A map of past tense based on the largest clusters of verses with particular combinations of the past tense pivots from Seychellois Creole (CRS), Fijian (FIJ), Hawaiian Creole (HWC), Torres Strait Creole (TCS) and Tzotzil (TZO). For each of the five languages, we present a subfigure that highlights the subset of verse clusters that are marked by the pivot of that language. The sixth subfigure highlights verses not marked by any of the five pivots. Verses marked in AFR Verses marked in ISL pap:ta rro:hanona pap:ta rro:hanona afr:is isl:er pap:ta rro:hanona urd: urd: afr:is pap:ta rro:hanona no_marker Verses marked in PAP pap:ta rro:hanona pap:ta rro:hanona afr:is isl:er pap:ta rro:hanona urd: urd: afr:is pap:ta rro:hanona no_marker Verses marked in RRO pap:ta rro:hanona pap:ta rro:hanona afr:is isl:er pap:ta rro:hanona urd: urd: afr:is pap:ta rro:hanona no_marker Verses marked in URD pap:ta rro:hanona pap:ta rro:hanona afr:is isl:er pap:ta rro:hanona urd: urd: afr:is pap:ta rro:hanona no_marker Unmarked Verses pap:ta rro:hanona pap:ta rro:hanona afr:is isl:er pap:ta rro:hanona urd: urd: afr:is pap:ta rro:hanona no_marker pap:ta rro:hanona pap:ta rro:hanona afr:is isl:er pap:ta rro:hanona urd: urd: afr:is pap:ta rro:hanona no_marker Figure 6: A map of present tense based on the largest clusters of verses with particular combinations of the past tense pivots from Papiamento (PAP), Waima (RRO), Afrikaans (ARF), Urdu (URD) and Icelandic (ISL). For each of the five languages, we present a subfigure that highlights the subset of verse clusters that are marked by the pivot of that language. The sixth subfigure highlights verses not marked by any of the five pivots. Verses marked in KLV msa:akan quc:na tpi:bai tte:kani klv:dereh msa:akan quc:na tpi:bai tte:kani quc:na tpi:bai no_marker Verses marked in QUC msa:akan quc:na tpi:bai tte:kani klv:dereh msa:akan quc:na tpi:bai tte:kani quc:na tpi:bai no_marker Verses marked in TTE msa:akan quc:na tpi:bai tte:kani klv:dereh msa:akan quc:na tpi:bai tte:kani quc:na tpi:bai no_marker Verses marked in MSA msa:akan quc:na tpi:bai tte:kani klv:dereh msa:akan quc:na tpi:bai tte:kani quc:na tpi:bai no_marker Verses marked in TPI msa:akan quc:na tpi:bai tte:kani klv:dereh msa:akan quc:na tpi:bai tte:kani quc:na tpi:bai no_marker Unmarked Verses msa:akan quc:na tpi:bai tte:kani klv:dereh msa:akan quc:na tpi:bai tte:kani quc:na tpi:bai no_marker Figure 7: A map of future tense based on the largest clusters of verses with particular combinations of the past tense pivots from Bwanabwana (TTE), Tok Pisin (TPI), Quiché (QUC), Malay (MSA) and Maskelynes (KLV). For each of the five languages, we present a subfigure that highlights the subset of verse clusters that are marked by the pivot of that language. The sixth subfigure highlights verses not marked by any of the five pivots. erjee et al. (2006), Padó and Lapata (2009), Das and Petrov (2011), de Souza and Orăsan (2011), Nordrum (2015), Marasović and Frank (2016) and Agić et al. (2016). Of particular relevance is work that projects tense: Spreyer and Frank (2008), Xue et al. (2013), Loaiciga et al. (2014), Zhang and Xue (2014) and Friedrich and Gateva (2017). In contrast to this previous work, the labels we project in this paper are not the result of human annotation nor the result of the annotation computed by an NLP analysis module. Instead we interpret words in L1 as annotation labels (words like CRS “ti” and TZO “laj”) and project these word annotation labels to another language L2 . allel corpus, i.e., in a corpus that contains an order of magnitude more languages than parallel corpora currently in use. We showed that SuperPivot performs well for the crosslingual analysis of the linguistic phenomenon of tense. We produced analysis results for more than 1000 languages, conducting – to the best of our knowledge – the largest crosslingual computational study performed to date. We extended existing methodology for leveraging parallel corpora for typological analysis by overcoming a limiting assumption of earlier work. We only require that a linguistic feature is overtly marked in a few of thousands of languages as opposed to requiring that it be marked in all languages under investigation. 6 8 Discussion Our motivation is not to develop a method that can then be applied to many other corpora. Rather, our motivation is that many of the more than 1000 languages in the Parallel Bible Corpus are lowresource and that providing a method for creating the first richly annotated corpus (through the projection of annotation we propose) for many of these languages is a significant contribution. The original motivation for our approach is provided by the work of the typologist Michael Cysouw. He created the same type of annotation as we, but he produced it manually whereas we use automatic methods. But the structure of the annotation and its use in linguistic analysis is the same as what we provide. The basic idea of the utility of the final outcome of SuperPivot is that the 1163 languages all richly annotate each other. As long as there are a few among the 1163 languages that have a clear marker for linguistic feature f , then this marker can be projected to all other languages to richly annotate them. For any linguistic feature, there is a good chance that a few languages clearly mark it. Of course, this small subset of languages will be different for every linguistic feature. Thus, even for extremely resource-poor languages for which at present no annotated resources exist, SuperPivot will make available richly annotated corpora that should advance linguistic research on these languages. 7 Conclusion We presented SuperPivot, an analysis method for low-resource languages that occur in a superpar- Future directions There are at least two future directions that seem promising to us. • Creating a common map of tense along the lines of Figure 5, but unifying the three tenses • Addressing shortcomings of the way we compute alignments: (i) generalizing character n-grams to more general features, so that templates in templatic morphology, reduplication and other more complex manifestations of linguistic features can be captured; (ii) use n-gram features of different lengths to account for differences among languages, e.g., shorter ones for Chinese, longer ones for English; (iii) segmenting verses into clauses and performing alignment not on the verse level (which caused many errors in our experiments), but on the clause level instead; (iv) using global information more effectively, e.g., by extracting alignment features from automatically induced bi- or multilingual lexicons. Acknowledgments We gratefully acknowledge financial support from Volkswagenstiftung and fruitful discussions with Fabienne Braune, Michael Cysouw, Alexander Fraser, Annemarie Friedrich, Mohsen Mahdavi Mazdeh, Mohammad R.K. Mofrad, Yadollah Yaghoobzadeh, and Benjamin Roth. We are indebted to Michael Cysouw for the Parallel Bible Corpus. References Željko Agić, Anders Johannsen, Barbara Plank, Héctor Alonso Martı́nez, Natalie Schluter, and Anders Søgaard. 2016. Multilingual projection for parsing truly low-resource languages. Transactions of the Association for Computational Linguistics 4:301–312. Judith L. Aissen. 1987. Springer. Tzotzil Clause Structure. Joan L Bybee and Östen Dahl. 1989. The creation of tense and aspect systems in the languages of the world. John Benjamins Amsterdam. George Casella and Roger L. Berger. 2008. Statistical Inference. Thomson. Christos Christodouloupoulos and Mark Steedman. 2015. A massively parallel corpus: the bible in 100 languages. Language resources and evaluation 49(2):375–395. Roger W Andersen. 1990. Papiamentu tense-aspect, with special attention to discourse. Pidgin and creole tense-mood-aspect systems pages 59–96. Bernard Comrie. 1989. Language universals and linguistic typology: Syntax and morphology. University of Chicago press. Ehsaneddin Asgari and Mohammad R. K. Mofrad. 2016. Comparing fifty natural languages and twelve genetic languages using word embedding language divergence (WELD) as a quantitative measure of language distance. In Workshop on Multilingual and Cross-lingual Methods in NLP. pages 65–74. William Croft. 2001. Radical construction grammar: Syntactic theory in typological perspective. Oxford University Press on Demand. Colin Bannard and Chris Callison-Burch. 2005. Paraphrasing with bilingual parallel corpora. In Proceedings of the 43rd Annual Meeting on Association for Computational Linguistics. Association for Computational Linguistics, pages 597–604. Emily M Bender. 2009. Linguistically naı̈ve!= language independent: why nlp needs linguistic typology. In Proceedings of the EACL 2009 Workshop on the Interaction between Linguistics and Computational Linguistics: Virtuous, Vicious or Vacuous?. Association for Computational Linguistics, pages 26–32. Emily M Bender. 2011. On achieving and evaluating language-independence in nlp. Linguistic Issues in Language Technology 6(3):1–26. Steven Bird. 2006. Nltk: the natural language toolkit. In Proceedings of the COLING/ACL on Interactive presentation sessions. Association for Computational Linguistics, pages 69–72. Bernd Bohnet and Joakim Nivre. 2012. A transitionbased system for joint part-of-speech tagging and labeled non-projective dependency parsing. In Proceedings of the 2012 Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning. Association for Computational Linguistics, pages 1455–1465. Bernd Bohnet, Joakim Nivre, Igor Boguslavsky, Richárd Farkas, Filip Ginter, and Jan Hajič. 2013. Joint morphological and syntactic analysis for richly inflected languages. Transactions of the Association for Computational Linguistics 1:415–428. Peter F Brown, Vincent J Della Pietra, Stephen A Della Pietra, and Robert L Mercer. 1993. The mathematics of statistical machine translation: Parameter estimation. Computational linguistics 19(2):263–311. William Croft. 2002. Typology and universals. Cambridge University Press. William Croft and Keith T Poole. 2008. Inferring universals from grammatical variation: Multidimensional scaling for typological analysis. Theoretical linguistics 34(1):1–37. Michael Cysouw. 2014. Inducing semantic roles. Perspectives on semantic roles pages 23–68. Michael Cysouw and Bernhard Wälchli. 2007. Parallel texts: using translational equivalents in linguistic typology. STUF-Sprachtypologie und Universalienforschung 60(2):95–99. Östen Dahl. 1985. Tense and aspect systems. Basil Blackwell. Östen Dahl. 2000. Tense and Aspect in the Languages of Europe. Walter de Gruyter. Östen Dahl. 2007. From questionnaires to parallel corpora in typology. STUF-Sprachtypologie und Universalienforschung 60(2):172–181. Östen Dahl. 2014. The perfect map: Investigating the cross-linguistic distribution of tame categories in a parallel corpus. Aggregating Dialectology, Typology, and Register Contents Analysis. Linguistic Variation in Text and Speech. Linguae & litterae 28:268– 289. Dipanjan Das and Slav Petrov. 2011. Unsupervised part-of-speech tagging with bilingual graph-based projections. In The 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, Proceedings of the Conference, 19-24 June, 2011, Portland, Oregon, USA. pages 600–609. José Guilherme Camargo de Souza and Constantin Orăsan. 2011. Can projected chains in parallel corpora help coreference resolution? In Discourse Anaphora and Anaphor Resolution Colloquium. Springer, pages 59–69. Mona T. Diab and Philip Resnik. 2002. An unsupervised method for word sense tagging using parallel corpora. In Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics, July 6-12, 2002, Philadelphia, PA, USA.. pages 255–262. Matthew S Dryer, David Gil, Bernard Comrie, Hagen Jung, Claudia Schmidt, et al. 2005. The world atlas of language structures. Oxford University Press. Chris Dyer, Victor Chahuneau, and Noah A. Smith. 2013. A simple, fast, and effective reparameterization of IBM model 2. In Human Language Technologies: Conference of the North American Chapter of the Association of Computational Linguistics, Proceedings, June 9-14, 2013, Westin Peachtree Plaza Hotel, Atlanta, Georgia, USA. pages 644–648. Annemarie Friedrich and Damyana Gateva. 2017. Classification of telicity using cross-linguistic annotation projection. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing. Association for Computational Linguistics, Copenhagen, Denmark, pages 2549–2555. Maria Koptjevskaja-Tamm, Martine Vanhove, and Peter Koch. 2007. Typological approaches to lexical semantics. Linguistic typology 11(1):159–185. Anoop Kunchukuttan and Pushpak Bhattacharyya. 2016. Faster decoding for subword level phrasebased smt between related languages. arXiv preprint arXiv:1611.00354 . Pierre Lison and Jörg Tiedemann. 2016. Opensubtitles2016: Extracting large parallel corpora from movie and tv subtitles. In Proceedings of the 10th International Conference on Language Resources and Evaluation. Sharid Loaiciga, Thomas Meyer, and Andrei PopescuBelis. 2014. English-french verb phrase alignment in europarl for tense translation modeling. In The Ninth Language Resources and Evaluation Conference. EPFL-CONF-198442. Laurens van der Maaten and Geoffrey Hinton. 2008. Visualizing data using t-sne. Journal of Machine Learning Research 9(Nov):2579–2605. Joseph H Greenberg. 1960. A quantitative approach to the morphological typology of language. International journal of American linguistics 26(3):178– 194. Chaitanya Malaviya, Graham Neubig, and Patrick Littell. 2017. Learning language representations for typology prediction. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing. Association for Computational Linguistics, Copenhagen, Denmark, pages 2519–2525. Jan Hajič, Jan Hric, and Vladislav Kuboň. 2000. Machine translation of very close languages. In Proceedings of the sixth conference on Applied natural language processing. Association for Computational Linguistics, pages 7–12. Ana Marasović and Anette Frank. 2016. Multilingual modal sense classification using a convolutional neural network. In Workshop on Representation Learning for NLP. pages 111–120. Iren Hartmann, Martin Haspelmath, and Michael Cysouw. 2014. Identifying semantic role clusters and alignment types via microrole coexpression tendencies. Studies in Language. International Journal sponsored by the Foundation ?Foundations of Language? 38(3):463–484. Serge Heiden, Sophie Prévost, Benoit Habert, Helka Folch, Serge Fleury, Gabriel Illouz, Pierre Lafon, and Julien Nioche. 2000. Typtex: Inductive typological text classification by multivariate statistical analysis for nlp systems tuning/evaluation. In Maria Gavrilidou, George Carayannis, Stella Markantonatou, Stelios Piperidis, Gregory Stainhaouer (éds) Second International Conference on Language Resources and Evaluation. pages p–141. Rebecca Hwa, Philip Resnik, Amy Weinberg, Clara Cabezas, and Okan Kolak. 2005. Bootstrapping parsers via syntactic projection across parallel texts. Natural language engineering 11(03):311–325. Nancy Ide. 2000. Cross-lingual sense determination: Can it work? Computers and the Humanities 34(1):223–234. Stephen C Johnson. 1967. Hierarchical clustering schemes. Psychometrika 32(3):241–254. Thomas Mayer and Michael Cysouw. 2014. Creating a massively parallel bible corpus. Oceania 135(273):40. Ryan T McDonald, Joakim Nivre, Yvonne QuirmbachBrundage, Yoav Goldberg, Dipanjan Das, Kuzman Ganchev, Keith B Hall, Slav Petrov, Hao Zhang, Oscar Täckström, et al. 2013. Universal dependency annotation for multilingual parsing. In ACL (2). pages 92–97. Tony McEnery and Richard Xiao. 1999. Domains, text types, aspect marking and english-chinese translation. Languages in Contrast 2(2):211–229. John H McWhorter. 2005. Defining creole. Oxford University Press. Rada Mihalcea and Michel Simard. 2005. Parallel texts. Natural Language Engineering 11(03):239– 246. Amitabha Mukerjee, Ankit Soni, and Achla M Raina. 2006. Detecting complex predicates in hindi using pos projection across parallel corpora. In Proceedings of the Workshop on Multiword Expressions: Identifying and Exploiting Underlying Properties. Association for Computational Linguistics, pages 28–35. John Myhill and Myhill. 1992. Typological discourse analysis: Quantitative approaches to the study of linguistic function. Blackwell Oxford. Lene Nordrum. 2015. Exploring spontaneous-event marking though parallel corpora: Translating english ergative intransitive constructions into norwegian and swedish. Languages in Contrast 15(2):230–250. Sebastian Padó and Mirella Lapata. 2009. Crosslingual annotation projection for semantic roles. J. Artif. Intell. Res. 36:307–340. https://doi.org/10.1613/jair.2863. Ari Pirkola. 2001. Morphological typology of languages for ir. Journal of Documentation 57(3):330– 348. Philip Resnik. 2004. Exploiting hidden meanings: Using bilingual text for monolingual annotation. Computational Linguistics and Intelligent Text Processing pages 283–299. Philip Resnik, Mari Broman Olsen, and Mona Diab. 1997. Creating a parallel corpus from the book of 2000 tongues. In Proceedings of the Text Encoding Initiative 10th Anniversary User Conference (TEI10). Citeseer. Gillian Sankoff. 1990. The grammaticalization of tense and aspect in tok pisin and sranan. Language Variation and Change 2(03):295–312. Marianne Elina Santaholma. 2007. Grammar sharing techniques for rule-based multilingual nlp systems. Proceedings of the 16th Nordic Conference of Computational Linguistics (NODALIDA) . Diana Santos. 2004. Translation-based corpus studies: Contrasting English and Portuguese tense and aspect systems. 50. Rodopi. Devyani Sharma. 2009. Typological diversity in new englishes. English World-Wide 30(2):170–195. Jae Jung Song. 2014. Linguistic typology: Morphology and syntax. Routledge. Kathrin Spreyer and Anette Frank. 2008. Projectionbased acquisition of a temporal labeller. In IJCNLP. pages 489–496. Elizabeth Closs Traugott. 1978. On the expression of spatio-temporal relations in language. Universals of human language 3:369–400. Bernhard Wälchli. 2010. The consonant template in synchrony and diachrony. Baltic linguistics 1. Bernhard Wälchli and Michael Cysouw. 2012. Lexical typology through similarity semantics: Toward a semantic map of motion verbs. Linguistics 50(3):671– 710. Lindsay J Whaley. 1996. Introduction to typology: the unity and diversity of language. Sage Publications. RZ Xiao and AM McEnery. 2002. A corpus-based approach to tense and aspect in english-chinese translation. In The 1st International Symposium on Contrastive and Translation Studies between Chinese and English. Nianwen Xue, Yuchen Zhang, and Yaqin Yang. 2013. Distant annotation of chinese tense and modality. In Workshop on Annotation of Modal Meaning in Natural Language (WAMM). Association for Computational Linguistics, pages 47–55. http://aclanthology.coli.unisaarland.de/pdf/W/W13/W13-0307.pdf. David Yarowsky, Grace Ngai, and Richard Wicentowski. 2001. Inducing multilingual text analysis tools via robust projection across aligned corpora. In Proceedings of the first international conference on Human language technology research. Association for Computational Linguistics, pages 1–8. Yuchen Zhang and Nianwen Xue. 2014. Automatic inference of the tense of chinese events using implicit linguistic information. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP). Association for Computational Linguistics, Doha, Qatar, pages 1902– 1911. http://www.aclweb.org/anthology/D14-1204.
2cs.AI
1 Nonsubsampled Graph Filter Banks and Distributed Implementation Junzheng Jiang, Cheng Cheng, and Qiyu Sun arXiv:1709.04107v1 [cs.IT] 13 Sep 2017 Abstract In this paper, we consider nonsubsampled graph filter banks (NSGFBs) to process data on a graph in a distributed manner. Given an analysis filter bank with small bandwidth, we propose algebraic and optimization methods of constructing synthesis filter banks such that the corresponding NSGFBs provide a perfect signal reconstruction in the noiseless setting. Moreover, we prove that the proposed NSGFBs can control the resonance effect in the presence of bounded noise and they can limit the influence of shot noise primarily to a small neighborhood of its location on the graph. For an NSGFB on a graph of large size, a distributed implementation has a significant advantage, since data processing and communication demands for the agent at each vertex depend mainly on its neighboring topology. In this paper, we propose an iterative distributed algorithm to implement the proposed NSGFBs. Based on NSGFBs, we also develop a distributed denoising technique which is demonstrated to have satisfactory performance on noise suppression. Keywords: Graph signal processing, Graph filter bank, Distributed algorithm, Noise suppression, Random geometric graph, Laplacian matrix. I. Introduction Spatially distributed networks (SDNs) have an agent at each location equipped with some data processing and communication abilities, and they have been widely used in wireless sensor networks, power grids and many real world applications ([1]–[5]). Data collected by an SDN resides naturally on vertices of a graph. Graph signal processing provides an innovative framework to process data on graphs. Many concepts, such as the Fourier transform, wavelet transform and filter banks, in classical signal processing, have been extended to graph settings in recent years. However there are still lots of fundamental problems unexplored or not completely answered ([6]–[11]). The wavelet transform is one of the most prominent techniques to process signals in regular domains ([12]–[14]). During the past decades, graph wavelet transforms have been introduced and some of them are designed using the eigenvalue and eigenspace information of the graph Laplacian matrix ([15]–[19]). Graph wavelet transform is under the same theoretical structure with graph filter banks and the corresponding wavelet filter bank carries a down and up-sampling procedure ([7], [8], [20]–[27]). Several forms of the down and up-sampling procedure have been defined by the partitioned graph coloring in [20], the maximum spanning tree structure of the graph in [25], and the SVD decomposition of the graph Laplacian matrix in [26]. A proper definition of the down and up-sampling procedure is not obvious especially when the residing graph is of large size and complicated topological structure. This motivates us to consider a nonsubsampled graph filter bank (NSGFB) that contains an analysis filter bank (H0 , H1 ) and a synthesis filter bank (G0 , G1 ), see Figure 1 for its block diagram. The analysis filter bank decomposes a graph signal into two components carrying different frequency information. The nonsubsampled structure in an NSGFB greatly simplifies the design of analysis filter banks for spectral decomposition and synthesis filter banks for signal reconstruction. Jiang is with the School of Information and Communication, Guilin University of Electronic Technology, Guilin 541004, China; Cheng is with the Department of Mathematics, Duke University, and Statistical and Applied Mathematical Sciences Institute (SAMSI), Durham, NC 27708; and Sun is with the Department of Mathematics, University of Central Florida, Orlando, Florida 32816. Emails: [email protected]; [email protected]; [email protected]. This work is partially supported by the National Natural Science Foundation of China (Grant No. 61761011), SAMSI under the National Science Foundation (DMS-1638521), and the National Science Foundation (DMS-1412413). 2 Fig. 1. Block diagram of an NSGFB with analysis filter bank (H0 , H1 ) and synthesis filter bank (G0 , G1 ), where x is the input of the NSGFB and x̃ is its output. Filter banks can be implemented either in a centralized system or a cooperative decentralized (distributed) system. In a centralized system, a central facility receives data from agents at vertices, performs designed data processing and sends the processed data back to agents at vertices. In a decentralized system, the agent at each vertex has certain data processing ability to perform designed data processing, and data collected from an agent at each vertex is shared only with neighboring vertices. Most filter banks on graphs are designed for centralized processing, however for the implementation of filter banks on a graph of large size, a centralized system may suffer from high computational burden and call for significant efforts to create a data exchange network. For signal processing on an SDN or a graph of large size, a distributed implementation provides an indispensable tool. It has been used for signal sampling and reconstruction on an SDN in [5], graph signal inpainting in [28] and economic dispatch in power networks [29]. The reader may refer to [5], [28]–[34] and references therein on distributed implementation of signal processing on graphs. In a distributed implementation of the analysis and synthesis procedures of an NSGFB, signal information on each vertex is transmitted only to neighboring vertices, which dramatically reduces the computational cost and calls for low energy consumption. In this paper, we study NSGFBs on a cooperative decentralized system from design to distributed implementation, and then to distributed signal denoising. A. Main contributions An important concept for an NSGFB is the perfect reconstruction condition, i.e., the output x̃ in Figure 1 is always the same as the input x, which can be characterized by the following matrix equation, G0 H0 + G1 H1 = I, (I.1) where (H0 , H1 ) and (G0 , G1 ) are its analysis and synthesis filter bank respectively. Given an analysis filter bank, the existence of synthesis filter banks is theoretically guaranteed so that the corresponding NSGFB satisfies the perfect reconstruction condition (I.1) ([13], [14]). The first contribution of this paper is that we introduce two methods to construct localized synthesis filter banks. In the first approach, the synthesis filter bank is obtained by solving a Bezout identity for polynomials. Its bandwidth could be no larger than the bandwidth of the analysis filter bank. In the second approach, the synthesis filter bank is the solution of a constrained optimization problem. It does not necessarily have small bandwidth, however it has an exponential off-diagonal decay. Consequently, the output of the corresponding localized NSGFB suffers primarily in a small neighborhood of vertices where agents lose data processing ability and/or communication capability. In some real world applications of an NSGFB, the input x is the original signal xo corrupted by an additive noise  . In addition, the subband signals z0 = H0 x and z1 = H1 x are usually processed via some (non)linear procedure, such as hard/soft thresholding and quantization. Then the output x̃ = G0 Ψ0 (H0 (xo +  )) + G1 Ψ1 (H1 (xo +  )) (I.2) of the NSGFB is no longer the original signal xo , where  is the input noise, and Ψ0 , Ψ1 are subband processing operators. The robustness of an NSGFB is of paramount importance. For an SDN, an agent at each vertex operates almost independently and the noise that arises at each vertex of the graph is usually contained in some range [5]. So we may use a bounded determinstic/random noise model for NSGFBs on a distributed system. A reasonable fidelity measure to assess the robustness of an NSGFB is the bounded 3 difference kx̃ − xo k∞ , instead of the conventional least squares error kx̃ − xo k2 , between the original signal xo and the output signal x̃ ([5], [35], [36]). Here for 1 ≤ p ≤ ∞, `p is the space of all p-summable sequences with norm k · kp . The second contribution of this paper is that for the NSGFB with analysis filter bank having small bandwidth and synthesis filter banks obtained from our approaches, we establish a quantitative estimate on the bounded difference kx̃ − xo k∞ , which is independent on the size of the graph G. This indicates that the proposed NSGFB can control the resonance effect in the presence of bounded additive noises. For an NSGFB on a graph of large size, a distributed implementation may provide an indispensable tool. The third contribution of this paper is that we propose an iterative distributed algorithm to implement the synthesis procedure of an NSGFB rather than finding the synthesis filter bank explicitly. The keys behind the algorithm are the decomposition (II.1) that splits the whole residing graph into a family of overlapping subgraphs of appropriate size, and an observation that solutions of some global optimization problem can be locally approximated by solutions of local optimization problems, when the objective function and constraints are well localized [5]. As an application of NSGFBs, we develop a distributed denoising technique that has satisfactory performance on noise suppression. B. Organization In Section II, we briefly review some fundamental concepts of graphs and introduce an overlapping graph decomposition (II.1). In Section III, we introduce the concept of graph filters on `p , 1 ≤ p ≤ ∞, and show that bounded filters with finite bandwidth are graph filters on `p , see Definition III.1 and Proposition III.3. In Section IV, we discuss the analysis filter bank (H0 , H1 ) of an NSGFB which are required to have small bandwidth, to pass/block the normalized constant signal, and to have stability on `2 , see Assumptions IV.1, IV.2 and IV.4. We show that analysis filter banks have stability on `p for all 1 ≤ p ≤ ∞, with an estimate on their lower and upper `p -stability bounds independent on the size of the graph, see Theorem IV.6. In Section V, we propose an algebraic design of synthesis filter banks (G0 , G1 ) when analysis filters H0 and H1 are polynomials of the symmetric normalized Laplacian on the graph, see Theorem V.1. In Section VI, we consider the construction of synthesis filter banks (G0 , G1 ) by solving the constrained optimization problem (VI.1) and (VI.2) with the objective function consisting of Frobenius norms of G0 and G1 , see (VI.4) and Theorem VI.1. In Section VII, we propose an exponentially convergent iterative algorithm (VII.9) and (VII.10) to implement the synthesis procedure, where each iteration can be implemented in a distributed manner, see Theorem VII.2 and Algorithm VII.1. In Section VIII, we create a distributed denoising technique associated with spline NSGFBs, see Figure 5, and demonstrate its performance for signal denoising on graphs of large size. All proofs are collected in the appendices. C. Notation We use the common convention of representing matrices and vectors with bold letters and scalars with normal letters. For a matrix A, denote its transpose, trace, Frobenius norm and operator norm on `p , 1 ≤ p ≤ ∞, by AT , tr(A), kAkF and kAkBp respectively. For a graph G, denote its adjacency matrix and degree matrix by AG and DG respectively, and define its Laplacian matrix by LG := DG − AG and −1/2 −1/2 its symmetric normalized Laplacian matrix by Lsym := DG LG DG . For a scalar t, let sgn(t), btc G and t+ be its sign, integral part and positive part respectively, and t be the vector of appropriate size with all entries taking value t. For a set F , denote its cardinality and indicator function by #F and χF respectively. II. P RELIMINARIES ON GRAPHS Let G := (V, E) be a graph, where V = {1, 2, · · · , N } is the set of vertices and E is the set of edges ([5], [6]). For the distributed implementation of an NSGFB, we require that the residing graph G has certain global features. 4 Assumption II.1. Throughout the paper, we consider simple graphs G, i.e., they are undirected and unweighted, and they do not contain self-loops and multiple edges. Take r ≥ 0. For a graph G = (V, E) satisfying Assumption II.1, we define the r-neighborhood and  the r-neighboring subgraph of i ∈ V by B(i, r) := j ∈ V : ρ(i, j) ≤ r and Gi,r := B(i, r), E(i, r) respectively, where E(i, r) contains all edges of the graph G with endpoints in B(i, r), and ρ(i, j) is the geodesic distance between vertices i and j in V . Then for r ≥ 1, we can decompose the graph G into a family of overlapping subgraphs Gi,r , i ∈ V , of diameters at most 2r, G = ∪i∈V Gi,r . (II.1) For distributed implementation for an NSGFB, we presume that numbers of vertices in the r-neighborhood of any vertex are dominated by a polynomial about r. Assumption II.2. Throughout the paper, we consider graphs G with the counting measure µ having polynomial growth, i.e., there exist positive constants D1 (G) and d such that µ(B(i, r)) ≤ D1 (G)(r + 1)d (II.2) for all i ∈ V and r ≥ 0, where µ(F ) := #F for all F ⊂ V . The minimal constants d and D1 (G) in (II.2) are called as Beurling dimension and density of the graph G respectively [5]. The decomposition (II.1) plays a crucial role in the proposed distributed implementation for an NSGFB, and the selection of the radius parameter r in (II.1) depends on Beurling dimension d and density D1 (G) of the graph G, see Theorem VII.2. Accordingly, we expect that the Beurling dimension d and density D1 (G) of the graph G are much smaller than (or even independent on) the size of the graph, which implies that the graph G should be sparse. Shown in Figure 2 are two representative graphs that satisfy Assumptions II.1 and II.2: • The Minnesota traffic graph with 2642 vertices, where each vertex represents a spatial location in the state of Minnesota equipped with a traffic monitoring sensor and each edge denotes a direct communication link between monitoring sensors ([20], [21]). • The random geometric graph RGGN with N vertices randomly deployed in the√ region [0, 1]2 and an edge existing between two vertices if their physical distance is not larger than 2N −1/2 ([26], [37], [38]). Fig. 2. Plotted on the left is the Minnesota traffic graph that has Beurling dimension 2 and density 2.1378. On the right is a random geometric graph with N = 4096, which has Beurling dimension 2 and density 3.0775. 5 III. G RAPH SIGNAL AND FILTERING Let G = (V, E) satisfy Assumptions II.1 and II.2. A signal x residing on the graph G is a vector (xi )i∈V , where xi refers to the signal value at vertex i ∈ V . In SDNs and many real world applications, data collected belongs to some sequence space `p , 1 ≤ p ≤ ∞ ([5], [35], [36]). A filter A on the graph G is a linear transformation from one signal x on G to another signal y = Ax on G, which is usually represented by a matrix A = (a(i, j))i,j∈V . A filter A is expected to map a signal with finite energy to another signal with finite energy and a bounded signal to another bounded signal. A quantitative description of the above filtering procedure is kAxkp ≤ Ckxkp for all x ∈ `p , (III.1) where 1 ≤ p ≤ ∞ and C is a positive constant. Definition III.1. Let 1 ≤ p ≤ ∞. We say that A is a graph filter on `p if (III.1) is satisfied, and we call the minimal constant C for (III.1) to hold, denoted by kAkBp , the filter bound on `p . In some P practical applications ([8], [20], [21], [22], [26], [39]), a graph filter A is a polynomial P (t) := Ll=0 pl tl of the symmetric normalized Laplacian Lsym on G, i.e., G A= P (Lsym G ) = p0 I + L X l pl (Lsym G ). (III.2) l=1 Let 0 ≤ λ1 ≤ λ2 ≤ · · · ≤ λN ≤ 2 be eigenvalues of the symmetric normalized Laplacian Lsym and write G Lsym = UT Λ U, G (III.3) where UT = [u1 , . . . , uN ] is an orthogonal matrix and Λ = diag(λ1 , . . . , λN ) is a diagonal matrix. Then Λ)U, A = UT P (Λ (III.4) and the filter bound kAkB2 can be evaluated explicitly, kAkB2 = sup |P (λn )| ≤ sup |P (t)|. (III.5) 0≤t≤2 1≤n≤N To estimate kAkBp , p 6= 2, of a graph filter A = (a(i, j))i,j∈V , we define the bound of A by kAk∞ = sup |a(i, j)|. (III.6) i,j∈V A graph filter A on `p , 1 ≤ p ≤ ∞, has bounded entries and kAk∞ ≤ sup kAej kp ≤ kAkBp , 1 ≤ p ≤ ∞, (III.7) j∈V where the last inequality is obtained from (III.1) by replacing x by the standard unit vector ej with j-th component taking value one while all others are zero. For the distributed implementation for an NSGFB, bounded filters with finite bandwidth will be used as analysis filters, see Assumption IV.1. Definition III.2. The bandwidth σ := σ(A) of a graph filter A = (a(i, j))i,j∈V is the minimal nonnegative integer such that a(i, j) = 0 for all i, j ∈ V with ρ(i, j) > σ. For a filter pair (A, B), we define its bandwidth σ := σ(A, B) by max(σ(A), σ(B)). In the following proposition, we show that a bounded filter with finite bandwidth is a graph filter on `p , 1 ≤ p ≤ ∞, with filter bound dominated by some constant, independent of the size of the graph G. 6 Proposition III.3. Let 1 ≤ p ≤ ∞, and G be a graph satisfying Assumptions II.1 and II.2. Then for any bounded graph filter A with bandwidth σ, we have kAk∞ ≤ kAkBp ≤ D1 (G)(σ + 1)d kAk∞ , (III.8) where d and D1 (G) are the Beurling dimension and density of the graph G respectively. spln For n ≥ 1, we define spline filters Hspln 0,n and H1,n of order n by n 1  1 sym n spln sym spln and H1,n = L , H0,n = I − LG 2 2 G (III.9) spln see [39] in circulant graph setting. Spline filters Hspln 0,n and H1,n , n ≥ 1, have bandwidth n and their filter bounds on `2 dominated by one, i.e., kHspln l,n kB2 ≤ 1, l = 0, 1. (III.10) For p 6= 2, we obtain from Proposition III.3 that spln n spln d n kHspln l,n kBp ≤ kHl,1 kBp ≤ 2 D1 (G)kHl,1 k∞ ) = 2d−1 D1 (G))n , l = 0, 1, (III.11) where d and D1 (G) are the Beurling dimension and density of the graph G respectively. Therefore our spln p representative spline filters Hspln 0,n and H1,n , n ≥ 1, are graph filters on ` , 1 ≤ p ≤ ∞, with filter bounds dominated by some constants independent of the size of the graph G. IV. A NALYSIS FILTER BANKS The analysis filter bank decomposes the input signal on a graph into two components carrying frequency information. In this section, we design the analysis filter bank (H0 , H1 ) of an NSGFB to have small bandwidth, to pass/block the normalized constant signal, and to have stability on `2 , see Assumptions IV.1, IV.2 and IV.4. In this section, we also show that analysis filter banks have stability on `p for all 1 ≤ p ≤ ∞, with an estimate on their lower and upper `p -stability bounds independent of the size of the graph, see Theorem IV.6. Let G = (V, E) be a graph satisfying Assumptions II.1 and II.2, and (H0 , H1 ) be the analysis filter bank of an NSGFB. For the distributed implementation of an NSGFB, we make the following assumption for its analysis filter bank (H0 , H1 ). Assumption IV.1. The analysis filter bank (H0 , H1 ) has bandwidth σ ≥ 1. Given an input graph signal x = (xi )i∈V , outputs of analysis procedure are z0 = H0 x and z1 = H1 x. (IV.1) Write zl = (zl (i))i∈V and Hl = (hl (i, j))i,j∈V , l = 0, 1. Then it follows from (IV.1) and Assumption IV.1 that component values of the outputs z0 and z1 at each vertex k ∈ V are weighted sums of values of the input x in a σ-neighborhood of k, X zl (k) = hl (k, i)x(i), i ∈ V. (IV.2) ρ(i,k)≤σ Thus the analysis procedure of an NSGFB can be implemented in a distributed manner. To apply an NSGFB to some real world applications, such as noise suppression and abnormal phenomenon detection, its analysis filter bank should constitute certain spectral decomposition ([20], [21], [23], [45]). Throughout the paper, we also make the following assumption for the analysis filter bank (H0 , H1 ). 7 1/2 Assumption IV.2. The filter H0 passes the normalized constant signal DG 1, and the filter H1 blocks 1/2 the normalized constant signal DG 1, i.e., 1/2 1/2 1/2 H0 DG 1 = DG 1 and H1 DG 1 = 0. (IV.3) The frequency partition of an analysis filter bank on an arbitrary graph G is not as obvious as that in classical setting. For the case that sym H0 = P0 (Lsym G ) and H1 = P1 (LG ) (IV.4) for some polynomials P0 and P1 , one may verify that Assumption IV.2 is satisfied if and only if P0 (0) = 1 and P1 (0) = 0. (IV.5) 1/2 The above equivalence follows from the fact that DG 1 is an eigenvector of the symmetric normalized Laplacian Lsym associated with eigenvalue zero. G spln n The spline filter banks (Hspln 0,n , H1,n ), n ≥ 1, are of the form (IV.4) with P0 (t) = (1 − t/2) and P1 (t) = (t/2)n , and they satisfy Assumption IV.2 by (IV.5), i.e., 1/2 1/2 1/2 spln Hspln 0,n DG 1 = DG 1 and H1,n DG 1 = 0. (IV.6) Spline filter banks in the circulant graph setting are known in [39] as graph-spline wavelet transform. spln Shown in Figure 3 is local smoothing/blocking phenomenon of the spline filter bank (Hspln 0,2 , H1,2 ) to a blockwise constant signal on the Minnesota traffic graph and a blockwise smooth signal on the random geometric graph RGG4096 in Figure 2. It is observed that the lowpass filtered signal is very close to the original signal except near the boundary between different blocks, and that the highpass filtered signal essentially vanishes except around the region where the original signal exhibits sharp local variation. Fig. 3. Plotted on the top (resp. at the bottom), from left to right, are the original signal x on the Minnesota traffic graph (resp. on the spln random geometric graph RGG4096 in Figure 2), the lowpass filtered signal Hspln 0,2 x and the highpass filtered signal H1,2 x. The signal x on the top is a blockwise constant function that has only two values ±1 on three blocks with one block only containing a vertex ([20], [21]), and the signal x at the bottom is a blockwise polynomial consisting of four strips and imposing the polynomial 0.5 − 2cx on the first and third diagonal strips and 0.5 + c2x + c2y on the second and fourth strips respectively, where (cx , cy ) are the coordinates of vertices ([26]). Robustness is a fundamental requirement in the context of filter bank to control the signal dynamic range and to regulate the input noise. For the robustness of an NSGFB on `p , 1 ≤ p ≤ ∞, we introduce stability of a graph filter pair on `p . Definition IV.3. Let 1 ≤ p ≤ ∞. We say that (H0 , H1 ) is stable on `p if there are two positive constants Cp and Dp such that 1/p Cp kxkp ≤ kH0 xkpp + kH1 xkpp ≤ Dp kxkp (IV.7) 8 hold for all x ∈ `p if 1 ≤ p < ∞, and  C∞ kxk∞ ≤ max(kH0 xk∞ , kH1 xk∞ ≤ D∞ kxk∞ (IV.8) hold for all x ∈ `∞ if p = ∞. The optimal constants Cp and Dp for the inequalities in (IV.7) and (IV.8) to hold are called as lower and upper stability bounds of the graph filter bank (H0 , H1 ) on `p respectively. Given an NSGFB with the analysis filter bank (H0 , H1 ) and synthesis filter bank (G0 , G1 ) such that the perfect reconstruction condition (I.1) holds, we have that (kG0 k2B2 + kG1 k2B2 )−1 kxk22 ≤ kH0 xk22 + kH1 xk22 ≤ (kH0 k2B2 + kH1 k2B2 )kxk22 hold for all x ∈ `2 . So throughout the paper, we assume that the analysis procedure is stable on `2 . Assumption IV.4. The analysis filter bank (H0 , H1 ) is stable on `2 . For any x ∈ `2 , direct calculation leads to  kH0 xk22 + kH1 xk22 = xT (HT0 H0 + HT1 H1 x. (IV.9) Thus we have the following characterization to Assumption IV.4. Proposition IV.5. Let G satisfy Assumptions II.1 and II.2. Then (H0 , H1 ) satisfies Assumption IV.4 if and only if H := HT0 H0 + HT1 H1 is positive definite. Moreover, the optimal constants C2 and D2 for (IV.7) to hold can be evaluated by C22 = (kH−1 kB2 )−1 and D22 = kHkB2 . For graph filters H0 and H1 of the form (IV.4), we obtain from (III.3) that  Λ))2 + (P1 (Λ Λ))2 U. HT0 H0 + HT1 H1 = UT (P0 (Λ (IV.10) (IV.11) Hence we can evaluate the optimal constants C2 and D2 for (IV.7) to hold explicitly: inf (P0 (λm ))2 + (P1 (λm ))2 1≤m≤N = inf kH0 xk22 + kH1 xk22 ≤ sup kH0 xk22 + kH1 xk22 kxk2 =1 2 kxk2 =1 2 = sup (P0 (λm )) + (Q0 (λm )) . (IV.12) 1≤m≤N Set Rn (t) = (1 − t/2)2n + (t/2)2n , n ≥ 1. Then inf Rn (t) = 2−2n+1 and sup Rn (t) = 1. 0≤t≤2 (IV.13) 0≤t≤2 Taking P0 (t) = (1 − t/2)n and P1 (t) = (t/2)n in (IV.12) and applying (IV.13), we get  spln spln T spln T 2−2n+1 kxk22 ≤ xT (Hspln ) H + (H ) H 0,n 0,n 1,n 1,n x spln 2 2 2 = kHspln 0,n xk2 + kH1,n xk2 ≤ kxk2 (IV.14) spln for all x ∈ `2 . Therefore spline filter banks (Hspln 0,n , H1,n ) of order n ≥ 1 satisfy Assumption IV.4 with lower bound 2−n+1/2 and upper bound 1 by (IV.12) and (IV.14). Filters in a stable filter bank on `p are graph filters on `p , 1 ≤ p ≤ ∞. In the following theorem, we show that analysis filter banks are stable on `p , 1 ≤ p ≤ ∞, with quantitative estimates on their lower and upper stability bounds by some constants independent of the size of the graph. 9 Theorem IV.6. Let G be a graph satisfying Assumptions II.1 and II.2, H0 and H1 have bandwidth σ ≥ 1, and set H := HT0 H0 + HT1 H1 . If (H0 , H1 ) is stable on `2 , then it is stable on `p for all 1 ≤ p ≤ ∞. Moreover, we have the following estimates for its lower and upper stability bounds Cp and Dp : 1/2 kHkB2 Cp ≥ d+1 d!2 (D1 (G))2 (σ + 1)2d κd+2 and 1/2 Dp ≤ 2D1 (G)(σ + 1)d kHkB2 , (IV.15) (IV.16) where d and D1 (G) are the Beurling dimension and density of the graph G respectively, and κ = kH−1 kB2 kHkB2 (IV.17) is the condition number of the matrix H. spln p Combining (IV.14) and Theorem IV.6, the spline filter banks (Hspln 0,n , H1,n ), n ≥ 1, are stable on ` , 1 ≤ p ≤ ∞, and their lower and upper stability bounds Cp and Dp satisfy 22(d+2)n−1 d!(n 1 ≤ Cp ≤ Dp + 1)2d (D1 (G))2 ≤ 2D1 (G)(n + 1)d+1 . We finish this section with a remark on stability bounds of a graph filter bank on the space `2 and on the spaces `p , p 6= 2. Remark IV.7. For a finite graph G = (V, E), a stable filter bank (H0 , H1 ) on `2 is also stable on `p , 1 ≤ p ≤ ∞, and the lower stability bounds C2 and Cp satisfy N −|1/p−1/2| ≤ C2 ≤ N |1/p−1/2| , Cp (IV.18) where N = #V is the size of the graph G. The above estimation is unfavorable when the graph G has large size, however it cannot be improved if there is no restriction on the filter bank (H0 , H1 ). As our analysis filter bank (H0 , H1 ) has small bandwidth σ, we obtain the following estimate independent of the size N of the graph G from Proposition IV.5 and Theorem IV.6, 1 C2 ≤ ≤ d!2d+1 (D1 (G))2 (σ + 1)2d κd+3/2 , d 1/2 2D1 (G)(σ + 1) κ Cp (IV.19) where κ is given in (IV.17). The reader may refer to [5] and [40]–[44] for historical remarks and various estimates on the ratio between stability bounds on `p and `q , 1 ≤ p, q ≤ ∞, for matrices with certain off-diagonal decay. V. S YNTHESIS FILTER BANKS AND B EZOUT IDENTITY Let G = (V, E) be a graph satisfying Assumptions II.1 and II.2, and (H0 , H1 ) be a graph filter bank satisfying Assumptions IV.1, IV.2 and IV.4. In this section, we propose an algebraic method to construct graph filters G0 and G1 so that the NSGFB with the analysis filter bank (H0 , H1 ) and synthesis filter bank (G0 , G1 ) satisfies the perfect reconstruction condition (I.1) and the bandwidth of synthesis filter bank (G0 , G1 ) is no larger than the bandwidth of the analysis filter bank (H0 , H1 ). The proposed approach applies for filter banks (H0 , H1 ) being polynomials of the symmetric normalized Laplacian on the graph G, i.e., sym H0 = P0 (Lsym (V.1) G ) and H1 = P1 (LG ) for some polynomials P0 and P1 . 10 Theorem V.1. Let G be a graph satisfying Assumptions II.1 and II.2, (H0 , H1 ) be a graph filter bank satisfying Assumptions IV.1, IV.2 and IV.4 and being of the form (V.1), and let 0 ≤ λ1 ≤ λ2 ≤ · · · ≤ λN ≤ 2 be eigenvalues of the symmetric normalized Laplacian Lsym G . If polynomials Q0 and Q1 satisfy P0 (λm )Q0 (λm ) + P1 (λm )Q1 (λm ) = 1, 1 ≤ m ≤ N, (V.2) then the NSGFB with the analysis filter bank (H0 , H1 ) and synthesis filter bank (G0 , G1 ) satisfies the perfect reconstruction condition (I.1), where sym G0 = Q0 (Lsym G ) and G1 = Q1 (LG ). 1/2 (V.3) 1/2 1/2 The filter G0 in (V.3) passes the normalized constant signal DG 1, since G0 DG 1 = Q0 (0)DG 1 = 1/2 DG 1, where the last equation follows from (IV.5) and (V.2). However, the filter G1 in (V.3) may not 1/2 1/2 block the normalized constant signal, as G1 DG 1 = Q1 (0)DG 1 is not necessarily a zero signal. In this case, we can construct a new synthesis filter bank by lifting, e 0 = G0 + Q1 (0)H1 and G e 1 = G1 − Q1 (0)H0 , G (V.4) e 0 D1/2 1 = D1/2 1 and G e 1 D1/2 1 = 0. which satisfies G G G G A strong version of (V.2) is the Bezout identity P0 (z)Q0 (z) + P1 (z)Q1 (z) = 1, z ∈ C (V.5) for polynomials P0 , P1 , Q0 and Q1 . In the circulant graph setting, the above approach of constructing synthesis filter banks via solving Bezout identity (V.5) was discussed in [39]. Comparing with the Bezout identity (V.2) on the eigenvalue set of the symmetric normalized Laplacian matrix Lsym G , the advantage of the approach (V.5) provides a tool to design synthesis filter banks without a priori knowledge of global topology of the residing graph and then it simplifies the design of synthesis filter banks for signal reconstruction. It is well known that the Bezout identity (V.5) is solvable if and only if polynomials P0 and P1 have no common root. Moreover, there is a unique solution pair (Q0,B , Q1,B ) to the Bezout identity (V.5) such that Q0,B (0) = 1, Q1,B (0) = 0 and the degree of Q0,B (resp. Q1,B ) is no larger than the degree of P1 (resp. P0 ). Define sym G0,B = Q0,B (Lsym (V.6) G ) and G1,B = Q1,B (LG ). Then the bandwidth of the synthesis filter bank (G0,B , G1,B ) is no larger than bandwidth of the analysis filter bank (H0 , H1 ). Moreover, for any synthesis filter bank (G0 , G1 ) there exists a polynomial R such that sym G0 = G0,B + R(Lsym (V.7) G )H1 and G1 = G1,B − R(LG )H0 satisfies the perfect reconstruction condition (I.1). We remark that the above polynomials R could be appropriately chosen for real world applications of an NSFGB. of order n ≥ 1 by Following (V.6), we define synthesis spline filters GB,spln and GB,spln 0,n 1,n B,spln B,spln (Lsym = Q1,n (Lsym GB,spln = QB,spln 0,n 0,n G ) and G1,n G ), where QB,spln (t) 0,n  n−1  X 2n − 1  t n−1−l  t l = 1− 2 2 l l=0    2n − 1 t n + n−1 2 (V.8) 11 and QB,spln (t) 1,n =  n−1  X 2n − 1  t n−1−l  l 2   2n − 1 t n . − 1− 2 n−1 l=0 1− t l 2 1/2 blocks the passes the normalized constant signal DG 1, the filter GB,spln For n ≥ 1, the filter GB,spln 1,n 0,n 1/2 spln normalized constant signal DG 1, and the NSGFB with the analysis spline bank (H0,n , Hspln 1,n ) and B,spln B,spln synthesis filter bank (G0,n , G1,n ) satisfies the perfect reconstruction condition (I.1). The first two B,spln results follow from QB,spln (0) = 1 and Q1,n (0) = 0, while the perfect reconstruction conclusion holds 0,n since   t n t n B,spln B,spln 1− Q0,n (t) + Q1,n (t) 2 2  n−1  X 2n − 1 = (1 − u)2n−1−l ul l l=0  n−1  X 2n − 1 + (1 − u)l u2n−1−l l l=0 = ((1 − u) + u)2n−1 = 1, where u = t/2. In real world applications of an NSGFB such as the proposed distributed denoising in Section VIII, the subband signals z0 and z1 in (IV.1) are processed via some (non)linear procedure, such as hard/soft thresholding and quantization. In this case, the reconstructed signal x̃ is not necessarily the same as the original signal x. In the following theorem, we show that the difference is mainly dominated by the error caused by the subband processing. Proposition V.2. Let the graph G, the analysis filter bank (H0 , H1 ) and the synthesis filter bank (G0 , G1 ) be as in Theorem V.1. Assume that the error caused by the subband processing Ψl on subband signals zl = Hl x, l = 0, 1, is dominated by  for any input signal x ∈ `p , i.e., kzl − Ψl (zl )kp ≤ , l = 0, 1, (V.9) where  ≥ 0 and 1 ≤ p ≤ ∞. For the input signal x ∈ `p , the reconstructed signal x̃ = G0 Ψ0 (z0 ) + G1 Ψ1 (z1 ) via the corresponding NSGFB belongs to `p as well. Moreover kx̃ − xkp ≤ D1 (G)(σ̃ + 1)d (kG0 k∞ + |G1 k∞ ), (V.10) where d and D1 (G) are the Beurling dimension and density of the graph G respectively, and σ̃ is the bandwidth of the synthesis filter bank (G0 , G1 ). We finish this section with a distributed implementation of the NSGFB with analysis/synthesis filter banks selected in Theorem V.1. Write Gl = (gl (i, j))i,j∈V , l = 0, 1. As the synthesis filters G0 and G1 have finite bandwidth σ̃, the synthesis procedure can be implemented in a distributed manner, X x̃k = (g0 (k, j)z̃0 (j) + g1 (k, j)z̃1 (j)), k ∈ V, (V.11) ρ(j,k)≤σ̃ where x̃ = (x̃i )i∈V is the reconstructed signal and Ψl (zl ) = (z̃l (i))i∈V , l = 0, 1, are outputs of subband processing. Hence values of the reconstructed signals x̃ at each vertex k ∈ V are weighted sums of values of the subband processed outputs Ψ0 (z0 ) and Ψ1 (z1 ) in a σ̃-neighborhood of k ∈ V , cf. (IV.2) for distributed implementation of the analysis procedure. 12 Our representative subband processing procedures Ψ are hard(soft) thresholding and uniform quantization. For those cases, the subband processing Ψ is of the form Ψ(z) = (ψ(zi ))i∈V for z = (zi )i∈V , where ψ is the hard(soft) thresholding and uniform quantization function. Thus the subband processing can be implemented in a distributed manner and the error resulted are bounded (i.e., (V.9) holds for p = ∞) by the hard(soft) thresholding and quantization level. This together with (IV.2) and (V.11) implies that the NSGFB with analysis/synthesis filter banks in Theorem V.1 can be implemented in a distributed manner too, provided that the subband processing can be. VI. S YNTHESIS FILTER BANK AND OPTIMIZATION Let G = (V, E) be a graph satisfying Assumptions II.1 and II.2, and (H0 , H1 ) be a graph filter bank satisfying Assumptions IV.1, IV.2 and IV.4. In this section, we consider the construction of synthesis filter banks (G0 , G1 ) of an NSGFB by solving the minimization problem: minimize kG0 k2F + kG1 k2F (VI.1) G0 ,G1 subject to the perfect reconstruction condition G0 H0 + G1 H1 = I. (VI.2) Define the Lagrange function L of the constrained optimization problem (VI.1) and (VI.2) by L(G0 , G1 , Θ ) = kG0 k2F + kG1 k2F  ΘT . − tr (G0 H0 + G1 H1 − I)Θ By direct calculation, we have    ∂L = 2G0 − Θ HT0 ∂G0 ∂L = 2G1 − Θ HT1 ∂G1 ∂L = G0 H0 + G1 H1 ∂Θ (VI.3) − I. Set H = HT0 H0 + HT1 H1 . Solving ∂L ∂L ∂L = = =0 Θ ∂G0 ∂G1 ∂Θ leads to the unique solution of the constrained optimization problem (VI.1) and (VI.2), G0,L = H−1 HT0 and G1,L = H−1 HT1 . (VI.4) The synthesis filter bank (G0,L , G1,L ) in (VI.4) satisfies G0,L H0 + G1,L H1 = I, 1/2 and the filter G0,L passes the normalized constant signal DG 1, since 1/2 1/2 1/2 G0,L DG 1 = H−1 (HT0 H0 + HT1 H1 )DG 1 = DG 1. 1/2 We remark that G1,L may not block the normalized constant signal DG 1. For the case that H is a diagonal matrix, the synthesis filter bank (G0,L , G1,L ) in (VI.4) has the same bandwidth as the analysis filter bank (H0 , H1 ), and  kH−1 kB2 kHl k∞ if ρ(i, j) ≤ σ |gl,L (i, j)| ≤ (VI.5) 0 otherwise, where Gl,L := gl,L (i, j))i,j∈V , l = 0, 1. Let κ be the condition number of the matrix H in (IV.17). It is well known that κ > 1 when H is not a diagonal matrix. For κ > 1, the synthesis filter bank (G0,L , G1,L ) in (VI.4) does not necessarily have a small bandwidth, however it always has an exponential off-diagonal decay. 13 Theorem VI.1. Let G = (V, E) be a graph satisfying Assumptions II.1 and II.2, (H0 , H1 ) be a graph filter bank satisfying Assumptions IV.1, IV.2 and IV.4, κ be the condition number of the matrix H := HT0 H0 + HT1 H1 , and let Gl,L := gl,L (i, j))i,j∈V , l = 0, 1, be as in (VI.4). Assume that κ > 1, then |gl,L (i, j)| ≤ D1 (G)(σ + 1)d (1 − 1/κ)−1/2   θ ρ(i, j) (VI.6) ×kH−1 kB2 kHl k∞ exp − 2σ hold for all i, j ∈ V and l = 0, 1, where θ = ln(κ/(κ − 1)), σ ≥ 1 is the bandwidth of the analysis filter bank (H0 , H1 ), and d and D1 (G) are the Beurling dimension and density of the graph G respectively. Remark VI.2. Agents located at some vertices may lose data processing ability and/or communication capability. In that case, outputs of the analysis procedure of an NSGFB can be considered as being corrupted by shot noise. The exponential off-diagonal decay property in Theorem VI.1 implies that the reconstructed signal suffers mainly in their neighborhood of limited size. This means that the proposed NSGFB can limit the influence of shot noise essentially to their small neighborhoods on the graph. Remark VI.3. By the exponential off-diagonal decay property in Theorem VI.1, the synthesis filters (G0,L , G1,L ) are filters on `p , 1 ≤ p ≤ ∞, kGl,L kBp ≤ d!2d (D1 (G))2 (σ + 1)2d κd+1 (1 − 1/κ)−1/2 ×kH−1 kB2 kHl k∞ , l = 0, 1. (VI.7) The above conclusion with p = ∞ indicates that the NSGFB does not have a resonance effect. Applying similar argument used in the proof of Proposition V.2, we have Corollary VI.4. Let G, (H0 , H1 ), (G0,L , G1,L ) be as in Theorem VI.1, and let p, Ψ0 , Ψ1 ,  be as in Proposition V.2. Assume that the input signal x of the corresponding NSGFB belongs to `p , then the reconstructed signal x̃ = G0,L Ψ0 (H0 x) + G1,L Ψ1 (H1 x) via the NSGFB belongs to `p and kx̃ − xkp ≤ d!2d (D1 (G))2 (σ + 1)2d κd+1 kH−1 kB2 ×(1 − 1/κ)−1/2 kH0 k∞ + kH1 k∞ ). (VI.8) Solving the constrainted optimization program (VI.1) and (VI.2) associated with the analysis spline spln L,spln L,spln filter banks (Hspln 0,n , H1,n ), we obtain the synthesis spline filter bank (G0,n , G1,n ), n ≥ 1, where    −1 spln L,spln spln 2 spln 2 Gl,n = H0,n + H1,n Hl,n , l = 0, 1. (VI.9) L,spln The synthesis spline filters GL,spln and G1,n , n ≥ 1, have full bandwidth, however they have exponential 0,n L,spln (i, j))i,j∈V , l = 0, 1. By (VI.6) and Theorem VI.1, we obtain off-diagonal decay. Write GL,spln = (g l,n l,n that L,spln |gl,n (i, j)| ≤ 23n−3/2 (22n−1 − 1)−1/2 (n + 1)d D1 (G)   ln(22n−1 /(22n−1 − 1)) ρ(i, j) × exp − 2n hold for all i, j ∈ V and l = 0, 1. λ) to describe frequency response of a filter A = P (Lsym By (III.4), we may use P (λ G ) of the form (III.2), where the vector λ = (λ1 , . . . , λN ) is composed of eigenvalues 0 ≤ λ1 ≤ λ2 ≤ · · · ≤ λN ≤ 2 of the symmetric normalized Laplacian Lsym G . Shown in Figure 4 are frequency responses of the analysis spln spln spline filter banks (H0,n , H1,n ) of order n, the synthesis spline filter banks (GB,spln , GB,spln ) in (V.8), 0,n 1,n L,spln L,spln and the synthesis spline filter banks (G0,n , G1,n ) just constructed, where n = 1, 2. It is observed spln that the frequency responses of analysis spline filter banks (Hspln 0,n , H1,n ) and synthesis spline filter L,spln L,spln banks (G0,n , G1,n ) have certain complementary property, while the synthesis spline filter banks (GB,spln , GB,spln ) constructed via solving a Bezout identity do not. 0,n 1,n 14 Fig. 4. Plotted on the top (resp. at the bottom) are the frequency responses of analysis/synthesis spline filters of order n on the Minnesota traffic graph (resp. on the random geoemetric graph RGG4096 in Figure 2), where n = 1 for the left figure and n = 2 for the right figure. VII. I TERATIVE DISTRIBUTED ALGORITHM FOR SYNTHESIS PROCEDURE For the NSGFB with synthesis filter banks in Theorem V.1, the distributed implementation of the corresponding synthesis procedure has been discussed in (V.11). For the NSGFB with the analysis filter bank (H0 , H1 ) and synthesis filter bank (G0,L , G1,L ) obtained from solving the constrained optimization problem (VI.1) and (VI.2), output x̃ of the synthesis procedure is x̃ = G0,L z̃0 + G1,L z̃1 , (VII.1) where z̃0 and z̃1 be outputs of subband processing. As filters G0,L and G1,L may have full bandwidth, it is infeasible to evaluate G0,L z̃0 and G1,L z̃1 directly in a distributed manner. In this paper, we do not intend to find synthesis filters G0,L and G1,L explicitly, instead we propose an iterative distributed algorithm to implement the synthesis procedure (VII.1). The proposed iterative distributed algorithm is based on two pivoting observations. The first observation is that the output signal x̃ in (VII.1) is the unique solution of the following global least squares problem: min kH0 x − z̃0 k22 + kH1 x − z̃1 k22 , x (VII.2) which follows from (VI.4). To solve the global optimization problem (VII.2) in a distributed manner, we introduce a family of local least squares problems, 2 2r 2 min kH0 χ2r k x − z̃0 k2 + kH1 χk x − z̃1 k2 , k ∈ V, x (VII.3) where χrk , k ∈ V , are truncation operators defined by  χrk : (x(i))i∈V 7−→ x(i)χB(k,r) (i) i∈V , (VII.4) and r ≥ 1 is a radius parameter to be determined later [5]. One may verify that given any k ∈ V , the unique solution of the local optimization problem (VII.3) is given by  2r 2r −1 2r vk,r = χ2r χk (HT0 z̃0 + HT1 z̃1 ), (VII.5) k χk Hχk where H = HT0 H0 + HT1 H1 . The second crucial observation is that the unique solution vk,r of the local least squares problem (VII.3) in the (2r)-neighborhood of the vertex k provides a local approximation 15 to the solution x̃ of the global least squares problem (VII.2) in a r-neighborhood of the vertex k ∈ V . Therefore we can patch vk,r , k ∈ V , together X −1 X r vr = χk0 χrk vk,r (VII.6) k0 ∈V k∈V to generate an approximation to the solution x̃ of the global least squares problem (VII.2) in `p norm, i.e., there exists δr,σ ∈ (0, 1) such that kvr − x̃kp ≤ δr,σ kx̃kp when the radius parameter r ≥ 1 is chosen appropriately. Set X −1 X r 2r −1 2r J= χk 0 χrk (χ2r k Hχk ) χk . k0 ∈V (VII.7) (VII.8) k∈V Based on (VII.5), (VII.6) and (VII.7), we propose the following iterative distributed algorithm with initials z̃0 , z̃1 ∈ `p :  (m−1) (m−1)  v(m) = J(HT0 z̃0 + HT1 z̃1 )    (m) (m−1) (m) z̃0 = z̃0 − H0 v (VII.9) (m) (m−1)  z̃1 = z̃1 − H1 v(m)    x(m) = x(m−1) + v(m) for m ≥ 1, where (0) (0) x(0) = 0, z̃0 = z̃0 , z̃1 = z̃1 . (VII.10) Remark VII.1. Decompose H = D + R into a diagonal component D and the remainder R. Then the classical Jacobi method to solve the linear system Hx = HT0 z̃0 + HT1 z̃1 is x(m) = D−1 (HT0 z̃0 + HT1 z̃1 − Rx(m−1) ), m ≥ 1. (VII.11) The above iterative method converges when H is diagonally dominated, which is not necessarily true for the case in our setting. We observe that for r = 0, the matrix J in (VII.8) is equal to D−1 . Hence the sequence x(m) , m ≥ 0, in the proposed algorithm (VII.9) and (VII.10) with r = 0 is the same as the one in the Jacobi method (VII.11) with initial x(0) = 0. Write Hl = (hl (i, j))i,j∈V and z̃l = (z̃l (i))i∈V , l = 0, 1. For the distributed implementation of the iterative algorithm (VII.9) and (VII.10), each agent k ∈ V is required to transmit information to its neighboring vertices in B(k, 2r + 2σ), and to store the number mk = µ(B(k, r)) of its neighboring vertices in B(k, r) e l,k = (hl (i, j))i∈B(k,2r+σ),j∈B(k,2r+2σ) , l = 0, 1. and four matrices Hl,k = (hl (i, j))i∈B(k,2r+σ),j∈B(k,2r) and H Shown in Algorithm VII.1 is a distributed implementation of the iterative algorithm (VII.9) and (VII.10), where every vertex k ∈ V is required to store data of size O((r + σ)2d ), to perform O((r + σ)2d ) algebraic manipulations in each iteration, and to transmit data to its (2r + 2σ)-neighborhood twice in each iteration. In the next theorem, we further show that the iterative algorithm (VII.9) and (VII.10) converges exponentially when r is appropriately selected. Theorem VII.2. Let 1 ≤ p ≤ ∞, G be a graph satisfying Assumptions II.1 and II.2, (H0 , H1 ) be a graph filter bank satisfying Assumptions IV.1, IV.2 and IV.4, κ > 1 be as (IV.17), the condition number of the matrix H := HT0 H0 + HT1 H1 , and let (G0,L , G1,L ) be as in (VI.4). Set  θ  (D1 (G))2 (2σ + 1)d κ2 exp − r (3r + 2σ + 1)d , (VII.12) δr,σ := κ−1 2σ 16 Algorithm VII.1 Iterative Distributed Reconstruction Algorithm Inputs: stop criterion ε and observations z̃l,k = (z̃l (i))i∈B(k,2r+σ) for l = 0, 1. Operation: Compute Fk = HT0,k H0,k + HT1,k H1,k , find its inverse (Fk )−1 , and then compute Gl,L;k := (Fk )−1 HTl,k , l = 0, 1. (0) (0) (0) Initialization: xk = 0, z̃0,k = z̃0,k and z̃1,k = z̃1,k . Iteration: (m) (m) 1) uk = G0,L;k z̃0,k + G1,L;k z̃1,k and write uk = (uk (i))i∈B(k,2r) . 2) Communicate to all P vertices i ∈ B(k, r)\{k} to send data uk (i) and receive data ui (k). 3) Produce v(k) = m1k i∈B(k,r) ui (k). 4) Communicate to all vertices i ∈ B(k, 2r + 2σ)\{k} to send data v(k) and receive data v(i), and then generate a vector vk = (v(i))i∈B(k,2r+2σ) . (m+1) (m) (m+1) (m) e l,k vk , l = 0, 1. 5) Update xk = xk + vk and z̃l,k = z̃l,k − H (m+1) 6) Evaluate kvk k∞ ≤ ε. If yes, terminate the iteration and output xk . Otherwise, set m = m + 1. (m+1) Outputs: xk . where θ = ln(κ/(κ − 1)), σ ≥ 1 is the bandwidth of the analysis filter bank (H0 , H1 ), and d and D1 (G) are the Beurling dimension and density of the graph G respectively. Take z̃0 , z̃1 ∈ `p , and let x(m) , m ≥ 0, be as in (VII.9) and (VII.10). If the radius parameter r is so chosen that δr,σ ∈ (0, 1), (VII.13) then x(m) , m ≥ 0, converges to the least squares solution x̃ in (VII.1) exponentially, kx(m) − x̃kp ≤ (δr,σ )m kx̃kp , m ≥ 0. (VII.14) Remark VII.3. For l = 0, 1, we can apply (VII.9) to prove by induction on m that (m) z̃l − (z̃l − Hl x̃) = −H0 (x(m) − x̃), m ≥ 0. (m) This together with Theorem VII.2 implies that z̃l , m ≥ 1, in the iterative algorithm (VII.9) and (VII.10) converges to z̃l − Hl x̃ exponentially, where l = 0, 1. By (VII.12) and (VII.14) in Theorem VII.2, the iterative distributed algorithm (VII.9) and (VII.10) has fast convergence rate when a large radius parameter r is chosen. In that case, heavier burden arises at each iteration, which implies that each vertex in the graph G should have more data storages, better computing abilities and stronger communication capacities in real world applications. Shown in Tables I and II are the average Em,r of kx(m) − xk∞ /kxk∞ over 50 trials versus the number m ≥ 1 of iterations and the spln radius parameter r ≥ 0, where (Hspln 0,n , H1,n ), n = 1, 2 are used as analysis filter banks, the signal x in Tables I and II is randomly selected on the Minnesota traffic graph and on the random geometric graph RGG4096 in Figure 2 respectively. This demonstrates that the iterative distributed algorithm (VII.9) and (VII.10) converges faster for larger radius r, and the original signal can be well approximated in one step when a large radius r is chosen, see Tables I and II. By (VII.12) and Theorem VII.2, there is a radius parameter r0 such that the iterative distributed algorithm (VII.9) and (VII.10) converges exponentially whenever r ≥ r0 . We can select the above radius parameter r0 to be independent of the size of the graph G. Our simulation indicates that the iterative distributed algorithm (VII.9) and (VII.10) with r = 0, i.e. the Jacobi iterative method by Remark VII.1, diverges for some bounded inputs on the Minnesota traffic graph and on some random geometric graphs, see the first column of Tables I and II. 17 TABLE I P ERFORMANCE OF THE ITERATIVE DISTRIBUTED RECONSTRUCTION ALGORITHM TO RECOVER SIGNALS ON THE M INNESOTA TRAFFIC GRAPH n=1 Em,r r m 1 2 3 4 5 10 Em,r r m 1 2 3 4 5 7 10 14 0 .4155 .1355 .0547 .0226 .0098 .0002 1 .2220 .0238 .0039 .0006 .0000 .0000 n=2 2 3 4 6 .0375 .0007 .0000 .0000 .0000 .0000 .0160 .0001 .0000 .0000 .0000 .0000 .0033 .0000 .0000 .0000 .0000 .0000 .0003 .0000 .0000 .0000 .0000 .0000 0 1 2 3 4 6 1.1988 1.1662 1.4550 1.4697 2.5386 4.7083 12.7921 52.4168 .6563 .2315 .1162 .0567 .0296 .0082 .0013 .0001 .3187 .0518 .0125 .0026 .0006 .0000 .0000 .0000 .1523 .0136 .0017 .0002 .0000 .0000 .0000 .0000 .0725 .0029 .0002 .0000 .0000 .0000 .0000 .0000 .0178 .0002 .0000 .0000 .0000 .0000 .0000 .0000 TABLE II P ERFORMANCE OF THE ITERATIVE DISTRIBUTED RECONSTRUCTION ALGORITHM TO RECOVER SIGNALS ON THE RANDOM GEOMETRIC GRAPH RGG4096 IN F IGURE 2 n=1 Em,r r m 1 2 3 4 10 19 Em,r r m 1 2 3 4 5 8 0 .4182 .1963 .1143 .0699 .0050 .0001 1 .1301 .0083 .0008 .0000 .0000 .0000 n=2 2 3 4 5 .0156 .0002 .0000 .0000 .0000 .0000 .0035 .0000 .0000 .0000 .0000 .0000 .0006 .0000 .0000 .0000 .0000 .0000 .0001 .0000 .0000 .0000 .0000 .0000 0 1 2 3 4 5 1.5267 2.8586 6.6794 16.4089 40.9430 672.8632 .4674 .1098 .0374 .0121 .0041 .0002 .1487 .0120 .0014 .0002 .0000 .0000 .0437 .0011 .0000 .0000 .0000 .0000 .0159 .0001 .0000 .0000 .0000 .0000 .0049 .0000 .0000 .0000 .0000 .0000 VIII. D ISTRIBUTED DENOISING Given an NSGFB with analysis filter bank (H0 , H1 ) and synthesis filter bank (G0 , G1 ), we propose a denoising technique with hard thresholding operator Tτ applied to the high-pass subband signal, where Tτ (t) = sgn(t)(|t| − τ )+ is the hard thresholding function with threshold value τ ≥ 0, cf. [26], [27], [45], [46]. Presented in Figure 5 is the block diagram of the proposed denoising procedure. In this section, we demonstrate the performance of the proposal denoising procedure associated with spline NSGFBs, which can be implemented in a distributed manner. 18 Fig. 5. Block diagram of the proposed denoising procedure, where x is the noisy input and x̃ is the denoised output. TABLE III D ENOISING PERFORMANCE ON THE M INNESOTA TRAFFIC GRAPH MEASURED WITH THE STANDARD `2 -SNR η Input `2 -SNR graphBior OSGFB PRT NSGFB-B1 NSGFB-B2 NSGFB-L1 NSGFB-L2 1/32 34.89 34.43 38.25 35.31 37.50 37.25 38.49 37.25 1/16 28.85 28.91 32.59 29.41 31.45 30.74 32.44 30.67 1/8 22.83 24.06 24.44 23.74 25.43 24.95 26.42 24.91 1/4 16.82 18.21 16.70 18.46 18.91 18.53 19.25 18.16 1/2 10.81 12.79 12.54 15.45 13.18 13.32 13.82 13.33 1 4.75 7.39 4.69 12.77 7.39 7.68 8.34 7.88 In the simulations, the noisy input is x = xo +  , (VIII.1) where xo = (xo,i )i∈V is the original graph signal and the noise  = (i )i∈V has value i at vertex i ∈ V spln randomly selected in the range [−η, η]. The spline NSGFBs have analysis spline filter banks (Hspln 0,n , H1,n ) L,spln in (III.9) and synthesis spline filter banks being either (GB,spln , GB,spln ) in (V.8) or (G0,n , GL,spln 0,n 1,n 1,n ) in (VI.9), where n ≥ 1. They are abbreviated by NSGFB-Bn and NSGFB-Ln respectively. The denoising procedure is performed by retaining the low-pass subband signal z0 = Hspln 0,n x and applying the hard threshspln olding operation Tτ to the high-pass subband signal z1 = H1,n x, where τ > 0 is chosen appropriately. Thus the denoised output is x̃ = GB,spln z0 + GB,spln Tτ (z1 ) 0,n 1,n for NSGFB-Bn, and L,spln x̃ = GL,spln 0,n z0 + G1,n Tτ (z1 ) for NSGFB-Ln respectively, where n ≥ 1. For the above denoising procedure, we use 20 log10 kxo kp /kx− xo kp to measure the input `p -signal-to-noise ratio (`p -SNR) in dB, and 20 log10 kxo kp /kx̃−xo kp to measure the output `p -SNR in dB, where 1 ≤ p ≤ ∞. The Minnesota traffic graph is a test bed for various techniques in signal processing on graphs of medium size ([8], [20], [22], [26]). The denoising performance of the proposed spline NSGFBs on the Minnesota graph is presented in Table III, where the original signal xo is the blockwise constant function in Figure 3, the threshold value τ is selected to be 3η, and the input and output `2 -SNRs are the average values over 50 trials. Shown also in Table III are the performance comparison with the biorthogonal graph filter bank (graphBior) in [21], the M -channel oversampled graph filter bank (OSGFB) in [22], and the pyramid transform (PRT) in [26], where the corresponding output `2 -SNRs are calculated from the accompanying codes in these references. It indicates that the spline NSGFBs and the OSGFB outperform other two methods in the small noise scenario, the spline NSGFBs have the best performance in the moderate noise environment, and the PRT stands out from the rest in the strong noisy case. Presented in Tables IV and V are the denoising performance of spline NSGFBs and the performance comparision with the graphBior in [21], the OSGFB in [22], and the PRT in [26] on the random geometric graph RGGN , where N = 4096, the original signal xo is the blockwise polynomial in Figure 3, the threshold value τ is selected to be 3η, and the input and output `2 -SNRs in Table IV and the input and 19 TABLE IV D ENOISING PERFORMANCE ON THE RANDOM GEOMETRIC GRAPH RGG4096 η Input `2 -SNR graphBior OSGFB PRT NSGFB-B1 NSGFB-B2 NSGFB-L1 NSGFB-L2 1/32 35.06 33.82 31.69 32.89 37.43 36.65 38.86 36.08 1/16 29.04 28.61 26.37 27.51 31.40 30.63 32.87 29.97 1/8 23.02 23.27 20.79 22.44 25.34 24.89 26.61 24.27 1/4 17.01 18.20 16.40 17.70 19.31 19.37 20.45 19.16 MEASURED WITH THE STANDARD 1/2 10.97 13.21 13.40 14.21 13.47 13.80 14.91 13.92 TABLE V D ENOISING PERFORMANCE ON THE RANDOM GEOMETRIC GRAPH RGG4096 η Input `∞ -SNR graphBior OSGFB PRT NSGFB-B1 NSGFB-B2 NSGFB-L1 NSGFB-L2 1/32 34.90 23.45 20.59 23.24 31.84 26.86 29.28 24.66 1/16 28.88 17.28 14.32 17.25 25.16 20.34 22.70 17.91 1/8 22.85 11.12 6.83 11.27 18.71 14.67 16.19 12.27 1/4 16.83 5.34 0.99 5.43 11.05 8.32 9.28 6.72 1 4.95 8.34 11.13 11.81 7.62 8.25 9.40 9.05 MEASURED WITH THE 1/2 10.81 0.32 −1.99 0.39 6.55 3.55 4.08 0.48 `2 -SNR `∞ -SNR 1 4.79 −4.00 −2.71 −2.15 2.60 1.67 0.35 −0.52 output `∞ -SNRs in Table V are the average values over 50 trials. It is observed that the spline NSGFBs proposed in this paper outperform the graphBior, OSBFB and PRT in small and moderate noise scenario, and that the spline NSGFBs have comparable performance with the rest in the strong noisy case. Also from Tables IV and V, we see that the differences between the input and output `p -SNRs for p = 2, ∞ are in some range. This confirms the conclusions in Proposition V.2 and Corollary VI.4 that the output noise is dominated by a multiple of the input noise. Shown in Figure 6 is the input noise  with η = 1/16 and differences between the original signal xo and the denoised signal x̃ via the graphBior, OSGFB, PRT and spline NSGFBs, where a random geometric graph RGG4096 , original signal xo and noise  are the same as in Tables IV and V. It indicates that all denoising techniques have satisfactory performance inside the same strip where the signal has small variation, and that the spline NSGFBs proposed in this paper achieve better performance visually on noise suppression than the other three methods do near the boundary of two adjacency strips where the signal has large variation. The proposed NSGFBs can be implemented in a distributed manner and they are beneficial to (local) noise suppression on graphs of very large scale. Our simulations indicate that for random geometric graphs RGGN with large size N and 1 ≤ p ≤ ∞, the output `p -SNRs of spline NSGFBs have invisible change for the same input noise level when the graph size N increases. A PPENDIX A. Proof of Proposition III.3 The first inequality follows from (III.7). Now we prove the second inequality. Write A = (a(i, j))i,j∈V , and define its Schur norm by   X X |a(i, j)|, sup |a(i, j)| . kAkS = max sup i∈V j∈V j∈V i∈V 20 Fig. 6. Plotted on the top from left to right are the input noise  , differences between the original signal xo and the denoised signal x̃ obtained by the graphBior, OSGFB and PRT. Shown at the bottom from left to right are differences between the original signal xo and the denoised signal x̃ obtained by NSGFB-B1, NSGFB-B2, NSGFB-L1 and NSGFB-L2. It is well known that the filter bound kAkBp , 1 ≤ p ≤ ∞, of a graph filter A is dominated by its Schur norm, (A.1) kAkBp ≤ kAkS for all 1 ≤ p ≤ ∞. Then it suffices to prove kAkS ≤ D1 (G)(σ + 1)d kAk∞ . (A.2) For any i ∈ V , we obtain X |a(i, j)| = j∈V X |a(i, j)| ≤ kAk∞ ρ(i,j)≤σ X 1 ρ(i,j)≤σ ≤ D1 (G)(σ + 1)d kAk∞ , where the second inequality follows from (II.2). Similarly for any j ∈ V , we have X |a(i, j)| ≤ D1 (G)(σ + 1)d kAk∞ . (A.3) (A.4) i∈V Combining (A.3) and (A.4) completes the proof. B. Proof of Theorem IV.6 The upper bound estimate (IV.16) follows directly from Proposition III.3 and the observation that 1/2 kH0 kB2 + kH1 kB2 ≤ 2kHkB2 . (A.5) Now we prove the lower bound estimate (IV.15). Set B=I− H . kHkB2 (A.6) Then B has bandwidth 2σ, kBkB2 ≤ (κ − 1)/κ, and H −1 = (kHkB2 ) −1 ∞ X n=0 Bn . (A.7) (A.8) 21 Write H−1 = (g(i, j))i,j∈V . For κ = 1, we have H−1 = (kHkB2 )−1 I. (A.9) Now we consider the case that κ > 1. Set θ = ln(κ/(κ − 1)), and for i, j ∈ V let n0 (i, j) be the minimal integer such that 2n0 (i, j) ≥ ρ(i, j)/σ. Then ∞ X |g(i, j)| ≤ (kHkB2 )−1 ≤ (kHkB2 )−1 kBn k∞ n=n0 (i,j) ∞ X kBknB2 n=n0 (i,j) −1 ≤ (kHkB2 ) κ(1 − κ−1 )n0 (i,j)   θ ≤ kH−1 kB2 exp − ρ(i, j) , (A.10) 2σ where the first inequality follows from (A.8) and the observation that Bn have bandwidth 2nσ, the second one is true by (III.7), and the third one holds by (III.8) and (A.7). From (A.9) we immediately get kH−1 kBp = kH−1 kB2 (A.11) if κ = 1, and by (A.1) and (A.10), we have kH−1 kBp ≤ kH−1 kB2 × ∞ X sup ≤ ≤ X  θ  exp − ρ(i, j) 2σ i∈V n=0 2nσ≤ρ(i,j)<2(n+1)σ ∞  X −1 kH kB2 sup e−nθ µ B i∈V n=0 ∞ X (n (2σ)d D1 (G)kH−1 kB2 n=0  i, 2(n + 1)σ − 1 + 1)d (1 − κ−1 )n  1 (d) 1−t d d+1 −1 ≤ d!(2σ) D1 (G)κ kH kB2 ≤ (2σ)d D1 (G)kH−1 kB2  t=1−κ−1 (A.12) if κ > 1. Then kxkp ≤ kH−1 kBp kHT0 kBp kH0 xkp + kHT1 kBp kH1 xkp  ≤ d!(2σ)d D1 (G)κd+1 kH−1 kB2  × kHT0 kBp kH0 xkp + kHT1 kBp kH1 xkp ≤ d!2d (σ + 1)2d (D1 (G))2 κd+1 kH−1 kB2  × kH0 kB2 kH0 xkp + kH1 kB2 kH1 xkp −1/2 ≤ d!2d+1 (σ + 1)2d (D1 (G))2 κd+2 kHkB2  × max kH0 xkp , kH1 xkp , −1/2 ≤ d!2d+1 (σ + 1)2d (D1 (G))2 κd+2 kHkB2 1 × kH0 xkpp + kH1 xkpp p , (A.13) where the second inequality follows from (A.11) and (A.12), the third holds by Proposition III.3, and the fourth one is true by (A.5) and (IV.17). This proves (IV.15) and completes the proof. 22 C. Proof of Theorem V.1 By (III.3), (V.1), (V.2) and (V.3), we obtain G0 H0 + G1 H1 sym sym sym = Q0 (Lsym G )P0 (LG ) + Q1 (LG )Q1 (LG ) Λ)P0 (Λ Λ) + Q1 (Λ Λ)P1 (Λ Λ))U = UT U = I. = UT (Q0 (Λ This completes the proof. D. Proof of Proposition V.2 Set z0 = H0 x and z1 = H1 x. Then kx̃ − xkp ≤ kG0 (z0 − Ψ0 (z0 ))kp + kG1 (z1 − Ψ1 (z1 ))kp ≤ (kG0 kBp + kG1 kBp ) ≤ D1 (G)(σ̃ + 1)d (kG0 k∞ + kG1 k∞ ), (A.14) where the first inequality follows from the perfect reconstruction condition (I.1) for the NSGFB constructed in Theorem V.1, the second one holds by (V.9), and the last estimate is true by Proposition III.3. E. Proof of Theorem VI.1 By (VI.4) and (A.10), we have |gl,L (i, j)| ≤ kH−1 kB2 kHl k∞ X ρ(k,j)≤σ   θ ρ(i, k) exp − 2σ −1 ≤ D1 (G)kH kB2 kHl k∞ (σ + 1)d  θ θ ρ(i, j) + , i, j ∈ V, × exp − 2σ 2 where l = 0, 1. This proves (VI.6). F. Proof of Theorem VII.2 Set y(m) = x̃ − x(m) and write y(m) = (y (m) (i))i∈V , m ≥ 0. We claim that (m) y(m) = H−1 (HT0 z̃0 (m) + HT1 z̃1 ), m ≥ 0. (A.15) The above claim holds for m = 0, since (0) (0)  y(0) = x̃ = H−1 (HT0 z̃0 + HT1 z̃1 ) = H−1 HT0 z̃0 + HT1 z̃1 by (VII.1) and (VII.10). Inductively for m ≥ 1, we have y(m) = y(m−1) − v(m) (m−1) (m−1)  = H−1 HT0 z̃0 + HT1 z̃1 − v(m)  (m) (m) = H−1 HT0 z̃0 + HT1 z̃1 where the first and third equalities follow from (VII.9) and the second equality holds by the inductive hypothesis. This completes the proof of Claim A.15. 2r −1 Write (χ2r = (gk (i, j))i,j∈B(k,2r) and k Hχk ) 2r+2σ 2r −1 2r χrk (χ2r − χ2r k ) = (g̃k (i, j))i,j∈V , k ∈ V. k Hχk ) χk H(χk (A.16) 23 Following the argument used to prove (A.10), we have   θ −1 ρ(i, j) |gk (i, j)| ≤ kH kB2 exp − 2σ for all i, j ∈ B(k, 2r). By (III.7), (A.16) and (A.17), we obtain g̃k (i, j) = 0 where either i 6∈ B(k, r) or j 6∈ B(k, 2r + 2σ)\B(k, 2r), and   X θ |g̃k (i, j)| ≤ kH−1 kB2 kHk∞ exp − ρ(i, l) 2σ l∈B(j,2σ)   θ ≤ D1 (G)(2σ + 1)d κ exp − r+θ 2σ where i ∈ B(k, r) and j ∈ B(k, 2r + 2σ)\B(k, 2r). (m) (m) Write vk = (vk (i))i∈V , m ≥ 1, k ∈ V . By (VII.9), (A.15), we have (m) χrk (vk (A.17) (A.18) (A.19) 2r −1 2r − y(m−1) ) = χrk (χ2r k Hχk ) χk (m−1) ×H(χ2r+2σ − χ2r . k )y k Combining the above equation with (A.18) and (A.19), we get X (m) |vk (i) − y (m−1) (i)| = g̃k (i, j)y (m−1) (j) j∈B(k,2r+2σ)  θ r+θ ≤ D1 (G)(2σ + 1) κ exp −  2σ X × |y (m−1) (j)| , i ∈ B(k, r). d  (A.20) j∈B(i,3r+2σ) This together with (VII.9) implies that |y (m) (i)| = |v (m) (i) − y (m−1) (i)| X 1 (m) ≤ |vk (i) − y (m−1) (i)| µ(B(i, r)) k∈B(i,r)   θ ≤ D1 (G)(2σ + 1)d κ exp − r+θ  2σ X (m−1) × |y (j)| (A.21) j∈B(i,3r+2σ) for all i ∈ V and m ≥ 1. Using the above componentwise estimate, we obtain ky(m+1) kp ≤ δr,σ ky(m) kp , m ≥ 0. Iteratively applying the above estimate proves (VII.14). (A.22) 24 R EFERENCES [1] I. F. Akyildiz, W. Su, Y. Sankarasubramaniam, and E. Cayirci, “Wireless sensor networks: a survey,” Comput. Netw., vol. 38, pp. 393-422, Mar. 2002. [2] C. Chong and S. Kumar, “Sensor networks: evolution, opportunities, and challenges,” Proc. IEEE, vol. 91, pp. 1247-1256, Aug. 2003. [3] J. Yick, B. Mukherjee, and D. Ghosal, “Wireless sensor network survey,” Comput. Netw., vol. 52, pp. 2292-2330, Aug. 2008. [4] R. Hebner, “The power grid in 2030,” IEEE Spectr., vol. 54, pp. 51-55, Apr. 2017. [5] C. Cheng, Y. Jiang, and Q. Sun, “Spatially distributed sampling and reconstruction,” Appl. Comput. Harmon. Anal., to be published. [6] F. Chung and L. Lu, Complex Graphs and Networks (CBMS Regional Conference Series in Mathematics 107), American Mathematical Society, 2006. [7] R. Coifman and M. Maggioni, “Diffusion Wavelets,” Appl. Comput. Harmon. Anal., vol. 26, pp. 53-94, July 2006. [8] D. I. Shuman, S. K. Narang, P. Frossard, A. Ortega, and P. Vandergheynst, “The emerging field of signal processing on graphs: Extending high-dimensional data analysis to networks and other irregular domains,” IEEE Signal Process. Mag., vol. 30, pp. 83-98, May 2013. [9] A. Sandryhaila and J. M. F. Moura, “Big data analysis with signal processing on graphs: Representation and processing of massive data sets with irregular structure,” IEEE Signal Process. Mag., vol. 31, pp. 80-90, Sept. 2014. [10] A. Sandryhaila and J. M. F. Moura, “Discrete signal processing on graphs,” IEEE Trans. Signal Process., vol. 61, pp. 1644-1656, Apr. 2013. [11] A. Sandryhaila and J. M. F. Moura, “Discrete signal processing on graphs: frequency analysis,” IEEE Trans. Signal Process., vol. 62, pp. 3042-3054, June 2014. [12] I. Daubechies, Ten Lectures on Wavelets (CBMS-NSF Regional Conference Series in Applied Mathematics 61), SIAM, 1992. [13] S. Mallat, A wavelet tour of signal processing: the sparse way, Academic Press, 2009. [14] M. Vetterli and J. Kovacevic, Wavelets and Subband Coding, Prentice Hall PTR, 1995. [15] M. Crovella and E. Kolaczyk, “Graph wavelets for spatial traffic analysis,” in Twenty-Second Annual Joint Conf. of the IEEE Computer and Communications ( INFOCOM 2003), IEEE, vol. 3, San Francisco, USA, 2003, pp. 1848-1857. [16] M. Gavish, B. Nader, and R. R. Coifman, “Multiscale wavelets on trees, graphs and high dimensional data: Theory and applications to semi supervised learning,” in Proc. of the 27th Int. Conf. on Machine Learning, Haifa, Israel, 2010, pp. 367-374. [17] G. Shen and A. Ortega, “Transform-based distributed data gathering,” IEEE Trans. Signal Process., vol. 58, pp. 3802-3815, July 2010. [18] W. Wang and K. Ramchandran, “Random multiresolution representations for arbitrary sensor network graphs,” in Proc. of 2006 IEEE Int. Conf. on Acoustics Speech and Signal Processing (ICASSP), IEEE, vol. 4, Toulouse, France, 2006, pp. 161-164. [19] D. K. Hammod, P. Vandergheynst, and R. Gribonval, “Wavelets on graphs via spectral graph theory,” Appl. Comput. Harmon. Anal., vol. 30, pp. 129-150, Mar. 2011. [20] S. K. Narang and A. Ortega, “Perfect reconstruction two-channel wavelet filter banks for graph structured data,” IEEE Trans. Signal Process., vol. 60, pp. 2786-2799, June 2012. [21] S. K. Narang and A. Ortega, “Compact support biorthogonal wavelet filterbanks for arbitrary undirected graphs,” IEEE Trans. Signal Process., vol. 61, pp. 4673-4685, Oct. 2013. [22] Y. Tanaka and A. Sakiyama, “M-Channel Oversampled Graph Filter Banks,” IEEE Trans. Signal Process., vol. 62, pp. 3578-3590, July 2014. [23] V. N. Ekambaram, G. C. Fanti, B. Ayazifar, and K. Ramchandran, “Spline-like wavelet filterbanks for multiresolution analysis of graph-structured data,” IEEE Trans. Signal Inf. Process. Netw., vol. 1, pp. 268-278, Dec. 2015. [24] R. M. Karp, “Reducibility among combinatorial problems,” in Complexity of Computer Computations, R.E. Miller, J. W. Thatcher, J. D. Bohlinger, Ed., 1972, pp. 85-103. [25] H. Q. Nguyen, and M. N. Do, “Downsampling of signals on graphs via maximum spanning trees,” IEEE Trans. Signal Process., vol. 63, pp. 182-191, Jan. 2015. [26] D. I. Shuman, M. J. Faraji, and P. Vandergheynst, “A Multiscale Pyramid Transform for Graph Signals,” IEEE Trans. Signal Process., vol. 64, pp. 2119-2134, Apr. 2016. [27] N. Tremblay and P. Borgnat, “Subgraph-based filterbanks for graph signals,” IEEE Trans. Signal Process., vol. 64, pp. 3827-3840, Aug. 2016. [28] S. Chen, A. Sandryhaila, and J. Kovačević, “Distributed algorithm for graph signal inpainting,” in 2015 IEEE Int. Conf. on Acoustics, Speech and Signal Processing (ICASSP), IEEE, Brisbane, Australia, 2015, pp. 3731-3735. [29] T. T. Doan and L. B. Carolyn, “Distributed primal dual methods for economic dispatch in power networks,” arXiv preprint, arXiv: 1609.06287, Sept. 2016. [30] D. Baker and A. Ephremides, “The architectural organization of a mobile radio network via a distributed algorithm,” IEEE Trans. on Commun., vol. 29, pp. 1694-1701, Nov. 1981. [31] K. Hwang and Z. Xu, “Scalable parallel computers for real-time signal processing,” IEEE Signal Process. Mag., vol. 13, pp. 50-66, July 1996. [32] J. Vazquez and C. Malcolm, “Distributed multirobot exploration maintaining a mobile network,” in Proc. of Second IEEE Int. Conf. on Intelligent Systems, IEEE, Varna, Bulgaria, 2004, pp. 113-118. [33] Q. Shi, H. Chen, H. Chen, and L. Jiang, “Distributed wireless sensor network localization via sequential greedy optimization algorithm,” IEEE Trans. Signal Process., vol. 58, pp. 3328-3340, June 2010. [34] Y. Zhang, T. Cao, S. Li, X. Tian, L. Yuan, H. Jia, and A. V. Vasilakos, “Parallel Processing Systems for Big Data: A Survey,” Proc. IEEE, vol. 104, pp. 2114-2136, Nov. 2016. [35] Z. Wang and A. C. Bovik, “Mean squared error: love it or leave it?- A new look at signal fidelity measures,” IEEE Signal Processing Mag., vol. 98, pp. 98-117, Jan. 2009. [36] Q. Sun, “Localized nonlinear functional equations and two sampling problems in signal processing,” Adv. Comput. Math., vol. 40, pp. 415-458, Apr. 2014. 25 [37] D. I. Shuman, B. Ricaud, and P. Vandergheynst, “Vertex-frequency analysis on graphs,” Appl. Comput. Harmon. Anal., vol. 40, pp. 260-291, Mar. 2016. [38] M. Penrose, Random Geometric Graphs (Oxford Studies in Probability 5), Oxford University Press, 2003. [39] M. S. Kotzagiannidis and P. L. Dragotti, “Sampling and Reconstruction of Sparse Signals on Circulant Graphs - An Introduction to Graph-FRI,” arXiv preprint, arXiv: 1606.08085, June 2016. [40] A. Aldroubi, A. Baskakov, and I. Krishtal, “Slanted matrices, Banach frames, and sampling,” J. Funct. Anal., vol. 255, pp. 1667-1691, Oct. 2008. [41] C. E. Shin and Q. Sun, “Stability of localized operators,” J. Funct. Anal., vol. 256, pp. 2417-2439, Apr. 2009. [42] R. Tessera, “Left inverses of matrices with polynomial decay,” J. Funct. Anal., vol. 259, pp. 2793-2813, Dec. 2010. [43] Q. Sun, “Wiener’s lemma for infinite matrices II,” Constr. Approx., vol. 34, pp. 209-235, Oct. 2011. [44] C. E. Shin and Q. Sun, “Polynomial control on stability, inversion and powers of matrices on simple graphs,” arXiv preprint, arXiv: 1705.07385, May 2017. [45] A. Sakiyama and Y. Tanaka. “Oversampled graph Laplacian matrix for graph filter banks,” IEEE Trans. Signal Process., vol. 62, pp. 6425-6437, Dec. 2014. [46] A. Sakiyama, K. Watanabe, and Y. Tanaka, “Spectral graph wavelets and filter banks With low approximation error,” IEEE Trans. Signal Inf. Process. Netw., vol. 2, pp. 230-245, Sept. 2016.
7cs.IT
1 Throughput Maximization for Decode-and-Forward Relay Channels with Non-Ideal Circuit Power arXiv:1606.04661v2 [cs.IT] 19 Jun 2017 Hengjing Liang, Chuan Huang, Member, IEEE, Zhi Chen, Member, IEEE, and Shaoqian Li, Fellow, IEEE Abstract—This paper studies the throughput maximization problem for a three-node relay channel with non-ideal circuit power. In particular, the relay operates in a half-duplex manner, and the decode-and-forward (DF) relaying scheme is adopted. Considering the extra power consumption by the circuits, the optimal power allocation to maximize the throughput of the considered system over an infinite time horizon is investigated. First, two special scenarios, i.e., the direct link transmission (only use the direct link to transmit) and the relay assisted transmission (the source and the relay transmit with equal probability), are studied, and the corresponding optimal power allocations are obtained. By transforming two non-convex problems into quasiconcave ones, the closed-form solutions show that the source and the relay transmit with certain probability, which is determined by the average power budgets, circuit power consumptions, and channel gains. Next, based on the above results, the optimal power allocation for both the cases with and without direct link is derived, which is shown to be a mixed transmission scheme between the direct link transmission and the relay assisted transmission. Index Terms—Green communication, relay channel, throughput maximization, optimal power allocation, decode-and-forward (DF). I. I NTRODUCTION Green communication has drawn great attention during the past years. It is reported that more than 1 million gallons of diesel are consumed by Vodafone, for example, to power their cellular networks [1], and the consumption will still go up in the future. The growing cost of fossil fuel energy calls for both environmental and economical demands and motivations for the design of green communications [2]. Circuit energy consumption amounts for a significant part of the total energy consumption [3], [4]. In order to reduce circuit energy consumption for a fixed amount of data transmission, increasing throughput and reducing transmission time are the key targets. Thus, green communication associated with non-ideal circuit power needs to be designed both energy and spectrum efficiently. A generic energy efficiency (EE) maximization problem considering circuit power consumption was summarized in [5]. In [6], a link adaptation scheme that balances circuit power consumption and transmission power This paper was presented in part at IEEE Wireless Communications and Networking Conference 2017, San Francisco, CA, USA, March 2017. This work was supported in part by the High-Tech Research and Development (863) Program of China under Grant 2015AA01A707 and the National Natural Science Foundation of China under Grant 61501093. The authors are with the National Key Laboratory of Science and Technology on Communications, University of Electronic Science and Technology of China, Chengdu 610054, China (e-mail: [email protected]; {huangch, chenzhi, lsq}@uestc.edu.cn). Corresponding author: C. Huang. was proposed in frequency-selective channels. EE maximization problems with circuit energy consumption were also considered in orthogonal frequency division multiple access (OFDMA) [7] and wireless sensor networks [8]. A throughput optimal policy considering circuit power was proposed for point-to-point channels with energy harvesting transmitter [9]. Relaying has been considered as a promising technique to mitigate fading and extend coverage in wireless networks, which was introduced in [10] and comprehensively studied in [11]. Decode-and-forward (DF) relaying was studied in [12]– [15]. The capacity of a classical three-node relay channel, consisting of a source, a destination, and a single halfduplex DF relay, was investigated in [16], and the capacity analysis is extended to a parallel fading relay channel in [17]. Resource allocation problems maximizing spectral efficiency (SE) for relay networks under different scenarios have been investigated in [18]–[23]. Green communication problems in relay networks were discussed in [24]–[31]. In [24], minimum energy required to transmit one information bit was studied in amplify-and-forward (AF) and DF. In [25] and [26], energy minimization problems considering channel state information acquiring energy and signaling overhead were investigated in single relay selection scheme, respectively. In [27] and [28], non-ideal circuit power consumption, i.e., non-zero circuit power consumption during transmission, was considered for total energy minimization problems in multihop relay channels. In [29], sum rate maximization problem with non-ideal circuit power was studied under holistic power constraints for the multiple-input multiple-output two-way AF relay channels. In [30], circuit power consumption was considered for the secure EE maximization of AF relay channels. In [31], sleep mode was further introduced to save energy in a one-dimension cellular network, where the relay placement and the relay sleep probability were jointly optimized. In [32], throughput maximization problems with non-ideal circuit power consumption were studied in a three-node relay channel with direct link. In this paper, throughput maximization for a three-node half-duplex Gaussian relay channels considering non-ideal circuit power is studied over an infinite time horizon. The transceiver circuitry consumes a constant amount of power in the active mode and negligible power in the sleep mode. Under this setup, the optimal power allocations for the throughput maximization of the relay channel with and without direct link are both investigated. The main contributions of this paper are summarized as follows. • First, the throughput maximization problems for two special scenarios are investigated. For the direct link 2 transmission (DLT), where only direct link is used for transmission, the optimal power allocation shows that the source transmits either at a certain portion of time slots or constantly according to different average power budgets, circuit power consumptions, and channel power gains. Then, the average throughput for DLT is obtained. For the relay assisted transmission with direct link (RATDL), where the source and the relay transmit with equal probability, the optimal power allocation has a similar transmission structure as DLT. By solving a max-min problem, the average throughput for RAT-DL is obtained. • Then, with the two special power allocation cases (DLT and RAT-DL) and the characteristics of their average throughputs, the optimal power allocation for the throughput maximization of the relay channel with the direct link, where the source and the relay are not constrained to transmit with equal probability, is studied. The optimal solutions obtained by graphic method are shown to be either a single type of transmission (DLT or RAT-DL) or a time sharing of both transmissions. Whether to choose RAT-DL depends on the average power budget and the maximum EE of DLT and RAT-DL. • Furthermore, the optimal power allocation for the relay assisted transmission without direct link (RAT-WDL), where the source and the relay transmit with equal probability and the direct link is inactive, is analyzed. Asymptotic analysis is given for DLT, RAT-DL together with RAT-WDL at the low signal-to-noise ratio (SNR) and high SNR regimes afterwards. At last, simulation results show that the optimal power allocation scheme outperforms other conventional schemes. The rest of this paper is organized as follows. Section II introduces the system model and the main assumptions of this paper. Section III studies two special scenarios. Section IV investigates the optimal power allocation scheme for the case with direct link and asymptotic performances. Section V analyzes RAT-WDL and Section VI evaluates the throughput performances by simulations. Finally, Section VII concludes the paper. Notation: C (x) = log2 (1 + x) denotes the capacity of the additive white Gaussian noise (AWGN) channel, where x is the SNR of the channel. II. S YSTEM M ODEL This paper considers a three-node relay channel as shown in Fig. 1, which consists of a source, a destination, and a halfduplex relay. The source sends information to the destination with the help of the relay. Slotted transmission scheme is adopted, and each time slot is with duration T . A. Signal Model In this subsection, channel input and output relationship of the considered relay channel is introduced. Denote the channel coefficients of the source-destination, source-relay, and relaydestination links as gSD , gSR , and gRD , respectively, and then the channel power gains of the three links are given by 2 hSD = |gSD | , 2 hSR = |gSR | , 2 hRD = |gRD | , (1) Relay gSR gRD gSD Source Destination Fig. 1. A three-node relay channel. which are all constants across the time slots. If the relay is not selected to help the source transmission, the received signal at the destination in time slot i is given as yD (i) = gSD x (i) + nD (i) , (2) where x (i) is the source transmitted signal with power PS (i), and nD (i) is the independent and identically distributed (i.i.d.) circularly symmetric complex Gaussian (CSCG) noise with zero mean and unit variance. When the DF relaying scheme is adopted to help the source transmission, it operates in a half-duplex manner (one time slot is then divided into two phases), and the information encoding and decoding processes are described as follows: 1) In the first phase of time slot i, the source broadcasts x (i) to both the relay and the destination with power PS (i); 2) Then, the received signal at the relay during the first phase of time slot i is given as yR (i) = gSR x (i) + nR (i) , (3) where nR (i) is i.i.d. CSCG noise with zero mean and unit variance. Next, the relay decodes the source message, reencodes it into a new signal x̃ (i), and forwards x̃ (i) to the destination with power PR (i). 3) Finally, the destination receives the signals over the whole time slot, and the received signals yD1 (i) and yD2 (i) in the two phases are given as yD1 (i) = gSD x (i) + n1D (i) , (4) yD2 (5) (i) = gRD x̃ (i) + n2D (i) , respectively, where n1D (i) and n2D (i) are i.i.d. CSCG noise with zero mean and unit variance. For the purpose of exposition, consider the case that the two phases in one time slot are with equal length. Thus, the transmission rate for the DF relaying scheme at time slot i is given as [16] 1 RB (i) = min {C (PS (i) hSR ) , 2 C (PS (i) hSD ) + C (PR (i) hRD )} . (6) It is well known that the DF relaying scheme can work only when hSR ≥ 2hSD [16]; otherwise, DLT without the help of relay achieves a larger rate. B. Power Consumption Model In this subsection, power consumption model considering the non-ideal circuit power is discussed. The transceiver cir- 3 cuitry works in two modes: when a signal is transmitting, all circuits work in the active mode; and when there is no signal to transmit, they work in the sleep mode. 1) Active mode: the consumed power is mainly comprised of the transmission power and the circuit power. The transmission power is determined by the power allocation PS (i) and PR (i). The circuit power consists of the following two parts: the transmitting circuit power Pct comes from the power consumed by the mixer, frequency synthesizer, active filter, and digital-to-analog converter [4]; and the receiving circuit power Pcr is composed of the power consumption of the mixer, frequency synthesizer, low noise amplifier, intermediate frequency amplifier, active filter, and analog-to-digital converter [4]. Constant circuit power model is considered in this paper, i.e., Pct and Pcr are constants [4]. In the sequel, superscripts “S”, “R”, and “D” are added to Pct and Pcr to distinguish the power consumed at the source, relay, and destination, respectively. 2) Sleep mode: it has been shown that the power consumption Psp in the sleep mode is dominated by the leaking current of the switching transistors and is usually much smaller than that in the active mode [4]. Therefore, the power consumption in the sleep mode is set as Psp = 0. It is worth pointing out that the results of this paper can be readily extended to the case of Psp 6= 0 by deducting Psp from the average power budget and the power consumption in the active mode. In general, the circuit power consumed in the active mode is larger than that in the sleep mode, i.e., Pcr > Pct > Psp . (7) Thus, smartly operating between the two modes can potentially save a significant amount of energy. Based on the power model discussed above, the power consumptions for both DLT and RAT-DL are computed as follows. 1) DLT: Denote αA as the total circuit power consumption in the active mode for DLT, and it is the sum of the transmitting circuit power at the source and the receiving circuit power at the destination, i.e., αA = PctS + PcrD . With the defined αA and Psp = consumption at time slot i for DLT ( 0 A Ptotal (i) = PS (i) + αA (8) 0, the total power is thus given as PS (i) = 0 PS (i) > 0. (9) Then, the average power constraint for DLT is defined over N time slots, as N goes to infinity, i.e., N 1 X A Ptotal (i) ≤ PA , N →∞ N i=1 lim (10) where PA ≥ 0 is the power budget. 2) RAT-DL: Denote αB as the total circuit power consumption in the active mode for the transmission with the help of a relay, and it is the sum of the transmitting circuit power at the source and the relay, the receiving circuit power at the relay and the destination, i.e.,  1  1 αB = PctS + PcrR + PcrD + PctR + PcrD , (11) 2 2 where the 12 penalty is due to the half-duplex constraint for the considered relaying scheme. With the defined αB and Psp = 0, the total power consumption at time slot i for RAT-DL is given as ( 0 PS (i) = 0, PR (i) = 0 B Ptotal (i) = PS (i)+PR (i) + αB PS (i) > 0, PR (i) > 0, 2 (12) where the 21 penalty is also due to the half-duplex constraint for the considered relaying scheme. Then, the average power constraint for RAT-DL is defined over N time slots, as N goes to infinity, i.e., N 1 X B Ptotal (i) ≤ PB , N →∞ N i=1 lim (13) where PB ≥ 0 is the power budget. III. A C LOSER L OOK AT T WO S PECIAL C ASES In this section, the throughput maximization problems for two special scenarios are firstly studied, DLT and RAT-DL, and the corresponding optimal power allocations are obtained for these throughput maximization problems under the two scenarios. A. Direct Link Transmission In this scenario, the source directly transmits to the destination in one whole time slot and the relay is always inactive. Thus the transmission rate for DLT at time slot i is given as R (i) = C (PS (i) hSD ) . (14) The goal is to determine {PS (i)} such that the long term average throughput subject to the average power constraint defined in (10) is maximized over N time slots as N → ∞, i.e., solve the following optimization problem N 1 X CA (PA ) = max lim C (PS (i) hSD ) {PS (i)} N →∞ N i=1 s.t. (10), PS (i) ≥ 0. (15) Similar problem has been studied in [9]. As the objective function of problem (15) is nonnegative and concave, its solution is of the same structure as that in [9], which is summarized as the following lemma. Lemma 1: The optimal power allocation for problem (15) is given as: Transmit with power value PS∗ = max (Pee1 , PA − αA ) over p∗ portion of time slots and keep S hSD ) silent for the rest of the slots, where Pee1 , arg max C(P PS +αA PS >0 A . and p∗ = P ∗P+α A S Remark 1: From Lemma 1, it is observed that when the average power budget PA is relatively small, i.e., PA ≤ Pee1 +αA , 4 the optimal transmission strategy is with an “on-off” structure. It is due to that the scarce average power budget cannot support the constant transmission with non-zero power consumption for the circuits. Under this circumstance, transmission with A portion of time slots achieves the power Pee1 over Pee1P+α A maximum transmission throughput. When the average power budget is large enough, i.e., PA > Pee1 + αA , the optimal transmission strategy follows a constant transmission with the power value PA − αA . With the obtained optimal transmission power PS∗ and probability p∗ in Lemma 1, the relationship between the average throughput CA (PA ) defined in (15) and the average power budget PA is summarized in the following proposition. Proposition 1: The average throughput CA (PA ) defined in (15) is given as ( C(Pee1 hSD ) 0 ≤ PA ≤ Pee1 + αA Pee1 +αA · PA CA (PA ) = C ((PA − αA ) hSD ) PA > Pee1 + αA , (16) which is continuous, differentiable, and concave over PA ≥ 0. Proof: Please see Appendix A. Remark 2: From Proposition 1, it is observed that the average throughput CA (PA ) is a linear function of the average power budget PA when PA is small, i.e., PA ≤ Pee1 +αA . Since S hSD ) Pee1 , arg max C(P PS +αA , it suggests that the transmission PS >0 scheme given in Lemma 1 achieves the maximum EE for the case of DLT [9]. When the average power budget is large enough, i.e., PA > Pee1 + αA , the source transmits constantly to achieve the maximum SE. B. Relay Assisted Transmission with Direct Link The optimal power allocation for RAT-DL is studied in this subsection. In this scenario, the relay works following the DF relaying scheme described above: The source and the relay transmit in each half of the time slot, i.e., the transmission probabilities of the source and the relay are the same. 1) Problem Formulation: The goal is to determine {PS (i)} and {PR (i)} such that the long term average throughput subject to the average power constraint defined in (13) is maximized over N time slots as N → ∞, i.e., solve the following optimization problem CB (PB ) = N 1 X RB (i) {PS (i)},{PR (i)} N →∞ N i=1 max s.t. lim (13), PS (i) ≥ 0, PR (i) ≥ 0, (17) where RB (i) is given in (6). Since the objective function of problem (17) is nonnegative and concave [33], it can be checked [9] that the optimal power allocation of problem (17) is given as: Transmit with power PS (i) = PS > 0 and PR (i) = PR > 0 over p portion of time slots and keep silent for the rest of the slots, where PS and PR are constants. As a result, problem (17) can be reformulated as p CB (PB ) = max min {C (PS hSR ) , {PS ,PR ,p} 2 C (PS hSD ) + C (PR hRD )} (18) PR PR = PS ( hSR - hSD ) hRD (1 + PS hSD ) 2 1 4 3 PS + PR = 2 PB - 2a R PS Fig. 2. An illustration of the four disjoint feasible subsets defined in (26)– (28). s.t.  1 1 PS + PR + αB · p ≤ PB , 2 2 0 ≤ p ≤ 1, PS ≥ 0, PR ≥ 0,  (19) (20) where (19) is obtained from (13). It is easy to check that to achieve the optimal value of problem (18)–(20), constraint (19) must be satisfied with equality. Thus it follows that the optimal transmission probB ability p∗ = PS +P2PR +2α . Hence, problem (18)–(20) can be B simplified as CB (PB ) = PB min {C (PS hSR ) , C (PS hSD ) + C (PR hRD )} max {PS ,PR } PS + PR + 2αB s.t. PS + PR ≥ 2PB − 2αB , PS ≥ 0, PR ≥ 0, (21) (22) (23) where (22) is obtained by substituting p∗ into the constraint 0 ≤ p ≤ 1. Recall that hSR ≥ 2hSD must be satisfied for RAT-DL. It can be checked that C (PS hSR ) ≥ C (PS hSD ) + C (PR hRD ) ; (24) otherwise, reducing the relay transmit power and increasing the source transmit power can boost the average throughput. Therefore, by substituting (24) into (21), problem (21)–(23) can be rewritten as C (PS hSD ) + C (PR hRD ) · PB (25) CB (PB ) = max PS + PR + 2αB {PS ,PR } s.t. PS + PR ≥ 2PB − 2αB , (26) PS (hSR − hSD ) , (27) PR ≤ hRD (1 + PS hSD ) PS ≥ 0, PR ≥ 0, (28) where (27) is obtained from (24). The characterization of the objective function (25) is analyzed in the following lemma. )+C(PR hRD ) Lemma 2: C(PSPhSSD is quasiconcave over PS ≥ 0, +PR +2αB PR ≥ 0, and there exists a unique global maximum point. Furthermore, it is first strictly increasing and then strictly decreasing over PS and PR , respectively [6]. 2) Optimal Point: Next, the optimal point of problem (25)– (28) is derived. By considering the combinations of the cases 5 that the equalities in (26) and (27) are achieved or not, divide the feasible set defined by constraints (26)–(28) into four disjoint parts {Ri } , i = 1, 2, 3, 4, as shown in Fig. 2, where {Ri } are rigorously defined as follows:  R1 , (PS , PR ) |PS + PR > 2PB − 2αB ,  PS (hSR − hSD ) , PS ≥ 0, PR ≥ 0 , (29) PR < hRD (1 + PS hSD )  R2 , (PS , PR ) |PS + PR > 2PB − 2αB ,  PS (hSR − hSD ) PR = , PS ≥ 0, PR ≥ 0 , (30) hRD (1 + PS hSD )  R3 , (PS , PR ) |PS + PR = 2PB − 2αB ,  PS (hSR − hSD ) , PS ≥ 0, PR ≥ 0 , (31) PR < hRD (1 + PS hSD )  R4 , (PS , PR ) |PS + PR = 2PB − 2αB ,  PS (hSR − hSD ) , PS ≥ 0, PR ≥ 0 . (32) PR = hRD (1 + PS hSD ) Suppose that (PS∗ , PR∗ ) is the optimal point to problem (25)– (28), this point belongs to only one 1 of the four sets defined in (29)–(32). Thus, the following four cases are studied: 1) Case 1: (PS∗ , PR∗ ) ∈ R1 . In this case, both the constraints (26) and (27) are inactive, and thus a candidate solution of problem (25)– (28) is given by maximizing its objective constraint and ignoring the constraints, i.e.,  PS1 , PR1 = (Pee2 , Pee3 ) , C (PS hSD ) + C (PR hRD ) arg max . (33) {PS ≥0,PR ≥0} PS + PR + 2αB After obtain (Pee2 , Pee3 ), the feasibility condition (Pee2 , Pee3 ) ∈ R1 needs to be doubly checked: If it is not satisfied, (Pee2 , Pee3 ) cannot be claimed as a solution candidate for Case 1. 2) Case 2: (PS∗ , PR∗ ) ∈ R2 . In this case, constraint (26) is inactive and constraint (27) is active. Since the equality in (27) is achieved, it follows ∗ (hSR −hSD ) , with which problem (25)–(28) can PR ∗ = hPRDS (1+P ∗ S hSD ) be simplified as CB (PB ) = PB (1 + PS hSD ) hRD C (PS hSR ) max PS ≥0 hSD hRD P 2 + (U + 2hSD hRD PB ) PS + 2αB hRD S (34) s.t. hSD hRD PS2 + U PS + 2αB hRD − 2hRD PB > 0, (35) where U is defined as U , hSR + hRD − hSD + 2αB hSD hRD − 2hSD hRD PB . (36) 1 The uniqueness of the solution of problem (25)–(28) can be proved by contradiction with the property of the strictly quasiconcave function. To solve problem (34)–(35), first consider the case without constraint (35). Since (25) is quasiconcave over PS SR −hSD ) and PR , and PR = hPRDS (h (1+PS hSD ) is nondecreasing over PR , (34) is also quasiconcave over PS ≥ 0 [33]. Moreover, it is easy to verify that: As PS → 0+ , the objective function (34) approaches 0; as PS increases, (34) is always positive; and when PS → ∞, (34) approaches 0 again. Therefore, it is concluded that (34) owns a global maximum point over PS ≥ 0. Define Pee4 , arg max PS ≥0 (1 + PS hSD ) hRD C (PS hSR ) , hSD hRD PS2 + (U + 2hSD hRD PB ) PS + 2αB hRD (37) which achieves the maximum value of (34) without considering constraint (35). Then, doubly check the feasibility condition (35): If PS = Pee4 satisfies constraint (35), the solution candidate of problem (25)–(28) in Case 2 is given as    Pee4 (hSR − hSD ) , (38) PS2 , PR2 = Pee4 , hRD (1 + Pee4 hSD ) (hSR −hSD ) where PR2 = hPRDee4(1+P is obtained with conee4 hSD ) straint (27) achieving its equality and PS2 = Pee4 ; 2 and  if PS = Pee4 does not satisfy constraint (35), Pee4 (hSR −hSD ) Pee4 , hRD (1+Pee4 hSD ) is not the optimal point of problem (25)–(28). Under the circumstance, the optimal solution must be on the boundary of the feasible set, i.e., constraint (35) must be satisfied with equality, and this implies that the optimal point belongs to Case 4. 3) Case 3: (PS∗ , PR∗ ) ∈ R3 . In this case, constraint (26) is active and constraint (27) is inactive. Since equality in (26) is achieved, it follows PR = 2PB − 2αB − PS , with which problem (25)–(28) can be simplified as CB (PB ) = max C −hSD hRD PS 2 + (hSR − U ) PS PS ≥0 + (2PB − 2αB ) hRD ) s.t. hSD hRD PS2 (39) + U PS + 2αB hRD − 2hRD PB > 0. (40) As (39) is a composition of a logarithmic function and a quadratic function, the maximum point of (39) without considering constraint (40) is achieved by PS = hSD − hRD + PB − αB . 2hSD hRD (41) Then, doubly check the feasibility condition (40): If (41) satisfies constraint (40), the solution candidate of problem (25)–(28) in Case 3 is then given as  (42) PS3 , PR3 = (F, G) , where PR3 = G is obtained with constraint (26) achieving its equality and PS3 = F , and F , G are defined as F , hSD − hRD + PB − αB , 2hSD hRD (43) 6 G, hRD − hSD + PB − αB ; 2hSD hRD (44) and if (41) does not satisfy constraint (40), (F, G) is not the optimal point of problem (25)–(28). Under the circumstance, the optimal solution must be on the boundary of the feasible set, i.e., constraint (40) must be satisfied with equality, and this implies that the optimal point belongs to Case 4. 4) Case 4: (PS∗ , PR∗ ) ∈ R4 . In this case, both the constraints (26) and (27) are active. SR −hSD ) Thus, they lead to PR = hPRDS (h (1+PS hSD ) and PS + PR = 2PB − 2αB , which imply hSD hRD PS2 + U PS − 2 (PB − αB ) hRD = 0, (45) where U is defined in (36). The solution can be readily obtained within PS ≥ 0. Denote V as the positive solution of (45), i.e., q −U + U 2 + 8 (PB − αB ) hSD hRD 2 V , . (46) 2hSD hRD The solution candidate of problem (25)–(28) in Case 4 is given as  (47) PS4 , PR4 = (V, 2PB − 2αB − V ) , where PR4 = 2PB − 2αB − V is obtained with constraint (26) reaching equality and PS4 = V . Remark 3: After problem (25)–(28) is solved under the above four cases, the one achieves the largest optimal value among the four solution candidates is the optimal solution of problem (25)–(28). 3) Optimal Value: With four optimal solution candidates obtained, the corresponding necessary and sufficient conditions that allow each case to happen are studied, and the average throughput for RAT-DL is derived. 1) If the candidate solution (Pee2 , Pee3 ) obtained in (33) is the solution to problem (25)–(28), according to Lemma 2 and Remark 3, the necessary and sufficient condition that Case 1 happens is given as S1 ∩ S2 , where S1 , {PB |Pee2 + Pee3 > 2PB − 2αB } , (48) ( (hSR −hSD ) R+ if Pee3 < hPRDee2(1+P ee2 hSD ) S2 , (49) ∅ otherwise.   (hSR −hSD ) obtained 2) If the candidate solution Pee4 , hPRDee4(1+P ee4 hSD ) in (38) is the solution to problem (25)–(28), according to Lemma 2 and Remark 3, the necessary and sufficient condition that Case 2 happens is given as S2c ∩ S3 , where S2c is the complementary set of S2 and   Pee4 (hSR − hSD ) S3 , PB Pee4 + > 2PB − 2αB . hRD (1 + Pee4 hSD ) (50) 3) If the candidate solution (F, G) obtained in (42) is the solution to problem (25)–(28), according to Lemma 2 and Remark 3, the necessary and sufficient condition that Case 3 happens is given as S1c ∩ S2 ∩ S4 , where S1c is the complementary set of S1 and   F (hSR − hSD ) . S4 , PB G < hRD (1 + F hSD ) (51) 4) If the candidate solution (V, 2PB − 2αB − V ) obtained in (47) is the solution to problem (25)–(28), according to Lemma 2 and Remark 3, the necessary and sufficient condition that Case 4 happens is given as (S1c ∩ S2 ∩ S4c ) ∪ (S2c ∩ S3c ), where S3c and S4c are the complementary sets of S3 and S4 , respectively. Based on the above discussions, the optimal solutions of problem (17) are summarized. The average throughput defined in (17) for RAT-DL is also given in the following proposition. Proposition 2: The optimal power allocation for problem (17) is given as: Transmit with power value (PS∗ , PR∗ ) over p∗ portion of time slots and keep silent for the rest of slots, where   (Pee2 , Pee3 )    PB ∈ S1 ∩ S2    P , Pee4 (hSR −hSD ) PB ∈ S2c ∩ S3 ee4 hRD (1+Pee4 hSD ) (PS∗ , PR∗ ) =  PB ∈ S1c ∩ S2 ∩ S4 (F, G)    (V, 2PB − 2αB − V ) otherwise, (52) 2PB and p∗ = P ∗ +P ∗ +2α . With the optimal power allocation, the B S R average throughput CB (PB ) defined in (17) is given as  JPB PB ∈ S1 ∩ S2    M P PB ∈ S2c ∩ S3 B CB (PB ) = 1 1  C (F hSD ) + 2 C (GhRD ) PB ∈ S1c ∩ S2 ∩ S4    12 otherwise, 2 C (V hSR ) (53) which is continuous, differentiable, and concave over the hSD )+C(Pee3 hRD ) and M , domain, where J , C(Pee2 Pee2 +Pee3 +2αB (1+Pee4 hSD )hRD C(Pee4 hSR ) hSD hRD P 2 +(U+2hSD hRD PB )Pee4 +2αB hRD . ee4 Proof: Please see Appendix B. Remark 4: Based on Proposition 2, it is worth noting that the transmission scheme given in Proposition 2 is similar to DLT, which transmits with an on-off structure when the average power budget PB is small to maximize the EE for the case of RAT-DL, and transmits constantly when the average power budget PB is large to maximize the SE. It is also worth noticing that Pee2 , Pee3 , and Pee4 can be efficiently obtained by a simple bisection search. IV. O PTIMAL P OWER A LLOCATION FOR D IRECT L INK THE C ASE WITH Based on the two special scenarios studied in the previous section, the optimal power allocation for the case with direct link between the source and the destination is investigated. A. Optimal Power Allocation for the Mixed Transmission It is worth pointing out that the considered system can only work in one of three modes for each time slot: DLT, RATDL, or keeping silence. Thus, the optimal power allocation over an infinite time horizon can only be the combination of the above three modes. Moreover, by the analysis in the previous section, it is shown that the mode of keeping silence 7 can be incorporated into any one of the first two modes, since there is no transmission in portion of the time slots in these two modes. Therefore, the optimal power allocation for the throughput maximization of the relay channel with direct link is a mixed transmission (MT) scheme, i.e., transmit with the schemes of DLT and RAT-DL discussed in the previous section. In other words, to solve the optimal power allocation for MT is equivalent to find the average power budgets PA and PB for DLT and RAT-DL to maximize the throughput of the considered relay system, subject to the average power constraint P0 . Then, the following proposition is easily obtained. Proposition 3: The throughput maximization problem for the relay channel with direct link and non-ideal circuit power is formulated as max θCA (PA ) + (1 − θ) CB (PB ) {PA ,PB ,θ} s.t. θPA + (1 − θ) PB = P0 , 0 ≤ θ ≤ 1, PA ≥ 0, PB ≥ 0, C P (a) C (54) P (55) (56) (b) where θ stands for θ portion of time slots for DLT and 1 − θ stands for 1 − θ portion of time slots for RAT-DL. Before the optimal solutions of problem (54)–(56) are given, the relationship between the average throughput for DLT CA (P ) and RAT-DL CB (P ) is discussed. From (16) and (53), it can be inferred that CA (P ) and CB (P ) are both increasing and concave functions, which start from the origin point, increase linearly, and then turn to logarithmic functions after some points. Their relationship falls into the following three cases (the categorization is discussed later in Remark 6 and Remark 7): C b1 (c) C 1) Case 1: the linear parts of CA (P ) and CB (P ) coincide, and CA (P ) > CB (P ) after a specific point. 2) Case 2: CA (P ) > CB (P ) for any P > 0, i.e., CA (P ) > CB (P ) have no intersection point for P > 0. 3) Case 3: CA (P ) and CB (P ) have one or more intersection points for P > 0, and CA (P ) > CB (P ) when P is large enough. In Case 3, suppose there are K > 0 intersection points, and there exist K straight lines tangent to both CA (P ) and CB (P ). Denote the x-coordinates of the tangent points on CA (P ) and CB (P ) as ai and bi , i = 1, 2, ···, K, respectively. The relationship between ai and bi is b1 < a1 < a2 < b2 < ··· < bK < aK if K is odd, or a1 < b1 < b2 < a2 < · · · < bK < aK if K is even. Examples are shown in Fig. 3. It is worth noting that with the average throughput CA (PA ) and CB (PB ) given in (16) and (53), the x-coordinates ai and bi of the tangent points can be obtained by the following lemma. Lemma 3: The x-coordinates a and b of the the tangent points (a, CA (a)) and (b, CB (b)) on the same tangent line can be obtained by solving the following two equations ′ ′ CA (a) = CB (b) , (57) ′ CA (a) − CB (b) . (58) CA (a) = a−b If there are infinite solutions, Case 1 satisfies. If there is no solution, Case 2 satisfies. If there are finite solutions, Case 3 P a1 a1 b1 b2 a2 P (d) Fig. 3. Examples of relationships between CA (P ) and CB (P ): (a) the linear parts of CA (P ) and CB (P ) coincide; (b) CA (P ) > CB (P ) for any P > 0; (c) CA (P ) and CB (P ) have only one intersection point for P > 0; (d) CA (P ) and CB (P ) have two intersection points for P > 0. satisfies. With the x-coordinates of the tangent points obtained by Lemma 3, the optimal power allocation for problem (54)–(56) is given as the following proposition. Proposition 4: The optimal power allocation for problem (54)–(56) is given as 1) For Case 1 and Case 2, (PA∗ , PB∗ , θ∗ ) = (P0 , 0, 1) , (59) 8 2) For Case 3, if K is odd,   P0 ∈ Ω1  (P0 , 0, 1) ∗ ∗ ∗ (PA , PB , θ ) = (0,  P0 , 0)  P0 ∈ Ω2    ai , bi , P0 −bi P0 ∈ Ω3 , ai −bi (60) if K is even,   P0 ∈ Ω4  (P0 , 0, 1) ∗ ∗ ∗ (0, P , 0) (PA , PB , θ ) =  0  P0 ∈ Ω5   P −b  ai , b i , 0 i P0 ∈ Ω6 , ai −bi Remark 6: The optimal transmission for MT chooses the one with higher EE to transmit when P0 is small, where the corresponding EE are the scaling factors of (62) and (63). 2) High SNR Regime: Based on the results in (16) and (53), as PA → ∞ and PB → ∞, the average throughput for DLT and RAT-DL at the high SNR regime are asymptotically given as CA (PA ) ≈ log2 ((PA − αA ) hSD ) , (64) (61) CB (PB ) ≈ 1 log (V hSR ) . 2 2 (65) Note that V defined in (46) is a polynomial of PB with maximum exponent of 1. Besides, it is obviously obtained in (65) that the multiplexing gain of RAT-DL is 12 , which is due to the half-duplex penalty. However, the power gain of RAT-DL does not reach the square of PB and can not compensate the (K+1)/2 (K+1)/2 [ [ loss in multiplexing gain, which results in a lower throughput (b2i−2 , b2i−1 ) , (a2i−1 , a2i ) , Ω2 , Ω1 , performance at the high SNR regime compared to that of i=1 i=1 DLT. It is also in accordance with the observed four cases (K+1)/2 (K−1)/2 [ [ of relationships between CA (P ) and CB (P ) in Section IV. (b2i−1 , a2i−1 ) , (a2i , b2i ) ∪ Ω3 , Remark 7: The optimal transmission for MT always chooses i=1 i=1 K/2 K/2 DLT when P0 is large due to its higher throughput perfor[ [ mance at the high SNR regime. (b2i−1 , b2i ) , (a2i , a2i+1 ) , Ω5 , Ω4 , where a0 , b0 , and aK+1 are defined as a0 = b0 , 0 and aK+1 , +∞ for the purpose of exposition, and Ωi , i = 1, 2, · · ·, 6 are defined as Ω6 , i=1 i=0 K/2 K/2 [ [ (a2i−1 , b2i−1 ) ∪ (b2i , a2i ) . V. R ELAY A SSISTED T RANSMISSION L INK i=1 i=1 Proof: Please see Appendix C. Remark 5: It is observed that in Case 1, Case 2, and some situations in Case 3, the optimal power allocation scheme only chooses DLT or RAT-DL, while in other situations in Case 3, a time sharing of both transmissions is applied. The transmission types, on-off transmission or constant transmission, are decided according to DLT average power budget PA∗ and RAT-DL average power budget PB∗ , respectively. B. Asymptotic Analysis In this subsection, throughput performances for DLT and RAT-DL at the low SNR and high SNR regimes are investigated to further illustrate the optimal transmission scheme. 1) Low SNR Regime: As PA → 0 and PB → 0, the average throughput for DLT and RAT-DL at the low SNR regime are given in (16) and (53): CA (PA ) = C (Pee1 hSD ) · PA , Pee1 + αA (62) ( C(Pee2 hSD )+C(Pee3 hRD ) · PB Pee2 +Pee3 +2αB (1+Pee4 hSD )hRD C(Pee4 hSR ) hSD hRD P 2 +(U+2hSD hRD PB )Pee4 +2αB hRD S2 · PB S2c . ee4 (63) It is interesting to note that both CA (PA ) and CB (PB ) are linear functions of the average power budgets PA and PB respectively at the low ee1 hSD ) and SNR regime. The scaling factors C(P Pee1 +αA   CB (PB ) = C(Pee2 hSD )+C(Pee3 hRD ) Pee2 +Pee3 +2αB ee4 hSD )hRD C(Pee4 hSR ) or hSD hRD P(1+P 2 +(U+2h h P )P +2α h SD RD B ee4 B RD ee4 are the maximum EE for the case of DLT and RAT-DL, respectively. WITHOUT D IRECT In this section, the optimal power allocation and throughput performance of RAT-WDL are studied as a comparison. A. Optimal Power Allocation for RAT-WDL In this subsection, the optimal power allocation and average throughput for RAT-WDL are obtained. For RAT-WDL, the direct link between the source and the destination is inactive, i.e., the destination can only receive signals from the relay. With the signal model described in Section II-A without considering the direct link, the transmission rate for RAT-WDL at time slot i is given as 1 min {C (PS (i) hSR ) , C (PR (i) hRD )} . (66) 2 Denote αC as the total circuit power consumption in the active mode for RAT-WDL, and it is the same as αB in (11) without considering 12 PcrD in the first parentheses. The total power C B consumption Ptotal (i) at time slot i is the same as Ptotal (i) in (12) with αB replaced by αC . Then, the average total power consumption for RAT-WDL is defined over N time slots, as N goes to infinity, i.e., RC (i) = N 1 X C Ptotal (i) ≤ PC , N →∞ N i=1 lim (67) where PC ≥ 0 is the power budget. The goal is to determine {PS (i)} and {PR (i)} such that the long term average throughput subject to the average power 9 PR∗ = constraint defined in (67) is maximized over N time slots as N → ∞, i.e., solve the following optimization problem N 1 X RC (i) CC (PC ) = max lim {PS (i)},{PR (i)} N →∞ N i=1 s.t. (68) (67), PS (i) ≥ 0, PR (i) ≥ 0. (69) Since objective function (68) is nonnegative and concave, it is easy to check [9] that the optimal power allocation of problem (68)–(69) is given as: Transmit with power PS (i) = PS > 0 and PR (i) = PR > 0 over p portion of time slots and keep silent for the rest of the slots, where PS and PR are constants. As a result, problem (68)–(69) can be reformulated as p CC (PC ) = max min {C (PS hSR ) , C (PR hRD )} (70) {PS ,PR ,p} 2   1 1 s.t. PS + PR + αC · p ≤ PC , (71) 2 2 0 ≤ p ≤ 1, PS ≥ 0, PR ≥ 0, (72) where (71) is obtained from (67). It is easy to check that to achieve the optimal value of problem (70)–(72), constraint (71) must be satisfied with equality. Thus it follows that the optimal transmission probC . Hence, problem (70)–(72) can be ability p∗ = PS +P2PR +2α C simplified as min {C (PS hSR ) , C (PR hRD )} · PC PS + PR + 2αC s.t. PS + PR ≥ 2PC − 2αC , CC (PC ) = max {PS ,PR } PS ≥ 0, PR ≥ 0, (73) (74) (75) where (74) is obtained by substituting p∗ into the constraint 0 ≤ p ≤ 1. Since objective function (73) is a concave function divided by a linear function, it is quasiconcave over PS and PR . The maximum value is achieved when C (PS hSR ) = C (PR hRD ) due to the characteristics of quasiconcave functions. Thus, substituting PR = PhS hRDSR into (73) and (74), problem (73)–(75) can be rewritten as hRD C (PS hSR ) · PC (76) CC (PC ) = max PS ≥0 (hSR + hRD ) PS + 2hRD αC s.t. (hSR + hRD ) PS ≥ 2hRD (PC − αC ) . (77) Define Pee5 , arg max PS ≥0 PC hRD C (PS hSR ) , (hSR + hRD ) PS + 2hRD αC (78) which achieves the maximum value of (76) without considering constraint (77). Then, the optimal power allocation of problem (68)–(69) and the average throughput for RAT-WDL are given in the following proposition. Proposition 5: The optimal power allocation for problem (68)–(69) is given as: Transmit with power value (PS∗ , PR∗ ) over p∗ portion of time slots and keep silent for the rest of slots, where   2hRD PS∗ = max Pee5 , (PC − αC ) , (79) hSR + hRD hSR ∗ P , hRD S (80) 2PC and p∗ = P ∗ +P . With the optimal power allocation, the ∗ S R +2αC average throughput CC (PC ) defined in (68) for RAT-WDL is given as  C hRD C(Pee5 hSR ) SR +hRD )  (h P+h 0 ≤ PC ≤ PS (h2h + αC αC RD )Pee5 +2hRD RD SR 2h h CC (PC ) = C SR RD (PC −αC )  hSR +hRD SR +hRD ) PC > PS (h2h + αC . 2 RD (81) Proof: Please see Appendix D. B. Asymptotic Analysis In this subsection, the asymptotic performance for RATWDL is analyzed. 1) Low SNR Regime: As PC → 0, the average throughput for RAT-WDL at the low SNR regime is given in (81): CC (PC ) = hRD C (Pee5 hSR ) · PC . (hSR + hRD ) Pee5 + 2hRD αC (82) It is interesting to note that CC (PC ) is also a linear function of the average power budget PC at the low SNR regime. The hRD C(Pee5 hSR ) scaling factors (hSR +h is the maximum EE for RD )Pee5 +2hRD αC the case of RAT-WDL. 2) High SNR Regime: Based on the results in (81), as PC → ∞, the average throughput for RAT-WDL at the high SNR regime is asymptotically given as   2hSR hRD 1 (PC − αC ) . (83) CC (PC ) ≈ log2 2 hSR + hRD SR hRD (PC − αC ) is a linear function of PC . The Note that h2h SR +hRD reciprocals of CC (PC ) and CB (PB ) are infinitesimal of the same order when the average power budgets approach infinity. Furthermore, it is obvious that the multiplexing gain of RATWDL is also 21 . Thus, RAT-WDL and RAT-DL are of similar performances at the high SNR regime. VI. N UMERICAL R ESULTS In this section, simulations are performed to compare the performances of the proposed optimal power allocation and various suboptimal schemes. • DLT: denotes direct link transmission, discussed in Section III-A, whose power allocation is given in Lemma 1. • RAT-DL: denotes for relay assisted transmission with direct link, discussed in Section III-B, whose optimal power allocation is given in Proposition 2. • MT: denotes mixed transmission, discussed in Section IV-A, whose optimal power allocation is given in Proposition 4. • RAT-WDL: denotes relay assisted transmission without direct link, discussed in Section V-A, whose optimal power allocation is given in Proposition 5. • CDLT: denotes continuous direct link transmission, which transmits only with the direct link every time slot. The power allocation for CDLT is given as ( P0 − αA P0 > αA ∗ PS = (84) 0 otherwise. 10 6 1.1 4 3 DLT RAT-DL MT RAT-WDL CDLT CRAT-DL 4.2 2 4 1 3.8 0 a R=0.16 W 1.05 Throughput (b/s/Hz) Throughput (b/s/Hz) 5 a R=0.12 W 0 14 10 16 18 20 30 40 a R=0.2 W a R=0.24 W 1 a R=0.28 W 0.95 0.9 0.85 0.8 1 1.5 P0 (W) 2.5 3 a R=0.16 W 1.05 Throughput (b/s/Hz) Throughput (b/s/Hz) 0.8 3 a R=0.12 W 1.1 DLT RAT-DL MT RAT-WDL CDLT CRAT-DL 1 2.5 (a) (a) 1.2 2 hSR 50 0.6 a R=0.2 W a R=0.24 W 1 a R=0.28 W 0.95 0.9 0.4 0.85 0.2 0.8 0 0 0.2 0.4 0.6 0.8 1 P0 (W) (b) Fig. 4. Average power budget vs. throughputs in: (a) high SNR regime; (b) low SNR regime. • CRAT-DL: denotes continuous relay assisted transmission with direct link, where the source transmits with the help of the relay every time slot. The power allocation for CRAT-DL is given as ( (V, 2PB − 2αB − V ) P0 > αB ∗ ∗ (PS , PR ) = (85) (0, 0) otherwise, 1 1.5 2 hRD (b) Fig. 5. Channel gains vs. mixed transmission throughputs: (a) hSR vs. mixed transmission throughput; (b) hRD vs. mixed transmission throughput. DLT, RAT-DL, and RAT-WDL. At the low SNR regime, when P0 = 0.5 W, throughput performance of RAT-DL/MT is about 0.3 b/s/Hz larger than that of DLT. Moreover, the performance gap enlarges as P0 increases. RAT-DL, which coincides with MT, outperforms other transmission schemes. It suggests that RAT-DL is more energy efficient than DLT and RAT-WDL at the low SNR regime. where V is given in (46). B. Channel Gains vs. Mixed Transmission Throughputs A. Average Power Budgets vs. Throughputs Fig. 4 compares the performances of several transmission schemes at both high and low SNR regimes. The circuit power consumptions are set as αA = 0.2 W, αB = 0.24 W, αC = 0.18 W. The channel gains are set as hSD = 1, hSR = 10, hRD = 3. It is easy to see that MT always outperforms other transmission schemes. In Fig. 4(a), when the average power budget P0 is small, throughput curves of MT and RAT-DL coincide; when P0 gets larger, throughput curves of MT, DLT and CDLT coincide. At the high SNR regime, DLT and CDLT outperform RAT-DL and CRAT-DL, which is due to the multiplexing gain. Besides, the performance slope of RAT-DL and RAT-WDL are similar, which proves our analysis in Section V-B. Fig. 4(b) depicts the linear parts of CA (PA ), CB (PB ), and CC (PC ) in In this subsection, MT throughputs are compared with different channel gains. The channel gains are set as hSD = 1, hRD = 2 for Fig. 5(a), and hSR = 2 for Fig. 5(b). The average power budget is set as P0 = 1 W. The circuit power consumptions are set as αA = 0.2 W, and αB = 0.12, 0.16, 0.2, 0.24, 0.28 W, respectively. Fig. 5 shows that the increase in hSR and hRD leads the optimal transmission type changing from the DLT to firstly MT, and then RAT-DL. It is due to that the throughput of RATDL improves as hSR and hRD increases. The MT range is too short to be seen in the figures, which is located near the turning point. Besides, it can be concluded from the figures that as αB increases, larger channel gains hSR or hRD are required for the optimal transmission scheme to choose RAT-DL. Furthermore, 11 0.3 3 0.29 2.5 0.27 hRD Throughput (b/s/Hz) RAT-DL 0.28 0.26 2 h =1 0.25 SR h =1.25 SR 0.24 0.23 hSR=1.5 MT DLT 1.5 hSR=1.75 h =2 SR 0.22 0.1 0.15 0.2 0.25 0.3 1 0.35 a D (W) 1 1.5 2 2.5 3 h SR (a) (a) 0.36 3 hSR=1 hSR=1.25 0.34 2.5 SR RAT-DL MT h =1.75 SR 0.32 hSR=2 hRD Throughput (b/s/Hz) h =1.5 0.3 2 0.28 DLT 1.5 0.26 0.1 0.15 0.2 0.25 0.3 0.35 a R (W) 1 1 1.5 2 2.5 3 h SR (b) (b) Fig. 6. Circuit power consumptions vs. mixed transmission throughputs: (a) αA vs. mixed transmission throughput; (b) αB vs. mixed transmission throughput. Fig. 7. Optimal transmission regions with different P0 : (a) P0 = 1 W; (b) P0 = 2 W. the unit throughput improvement by hSR is larger than hRD when the optimal transmission type is RAT-DL. C. Circuit Power Consumptions vs. Mixed Transmission Throughputs In this subsection, MT throughputs are compared with different circuit power consumptions. The channel gains are set as hSD = 1, hRD = 2, and hSR = 1, 1.25, 1.5, 1.75, 2, respectively. The average power budget is set as P0 = 0.3 W. Fig. 6(a) shows that the increase in αA leads the optimal transmission type changing from the DLT to firstly the MT, and then RAT-DL. It is due to that the throughput of DLT deteriorates as αA increases. Fig. 6(b) shows that the increase in αB leads the optimal transmission type changing from RATDL to firstly MT, and then DLT. It is due to that the throughput of RAT-DL deteriorates as αB increases. The MT range is too short to be seen in the figures, which is located near the turning point. Besides, it can be concluded from the figures that as hSR increases, the optimal transmission type will change to RATDL with fewer circuit power consumption αA for Fig. 6(a), and the optimal transmission type will change to DLT with larger circuit power consumption αB for Fig. 6(b). D. Optimal Transmission Regions In this subsection, the optimal transmission regions are compared with different average power budgets P0 = 1 W and P0 = 2 W. The circuit power consumptions are set as αA = 0.2 W, αB = 0.24 W. The channel gain for the direct link is set as hSD = 1. Fig. 7 shows that as P0 increases, the regions of DLT and MT expand, while the region of RAT-DL shrinks. It is due to the multiplexing gain loss of RAT-DL at the high SNR regime, which proves our analysis in Section IV-B. VII. C ONCLUSION In this paper, the throughput optimal power allocation for a basic three-node relay channel with non-ideal circuit power was studied. Two special scenarios for DLT and RAT-DL were firstly investigated, and their corresponding average throughputs and characteristics were derived. Then, with the results from these two special cases, the optimal power allocation for the case with direct link was studied, which turns out to be either a single type of transmission (DLT or RAT-DL) or a time sharing of both transmissions according to specific average power budget. Asymptotic analysis was also given to support the results. At last, the optimal power allocation for RAT-WDL 12 was analyzed. Numerical results showed that the proposed optimal power allocation outperforms other suboptimal schemes. A PPENDIX A P ROOF OF P ROPOSITION 1 First, the average throughput CA (PA ) is obtained by taking A PS∗ = max (Pee1 , PA − αA ) and p∗ = P ∗P+α into the objecA S tive function of problem (15). Next, it is easy to prove that CA (PA ) in (16) is continuous over PA ≥ 0 by definition in terms of limits of functions. Then, examine the differentiability of CA (PA ). Since CA (PA ) in (16) is obviously differentiable except for the breakpoint PA = Pee1 + αA , only the differentiability at the breakpoint PA = Pee1 + αA needs to be discussed. It is easy to check that CA (Pee1 + αA + a) − CA (Pee1 + αA ) lim − a a→0 ′ C (Pee1 hSD ) , (86) = lim− CA (Pee1 + αA + a) = Pee1 + αA a→0 CA (Pee1 + αA + a) − CA (Pee1 + αA ) lim a a→0+ ′ hSD . (87) = lim CA (Pee1 + αA + a) = ln 2 (1 + Pee1 hSD ) a→0+ hSD ee1 hSD ) According to (86) and (87), C(P Pee1 +αA = ln 2(1+Pee1 hSD ) has to hold for differentiability at the breakpoint PA = Pee1 + αA . S hSD ) Since Pee1 , max C(P PS +αA , it is easy to obtain PS >0   d C (PS hSD ) dPS PS + αA = 0, (88) PS =Pee1 which is equivalent to hSD C (Pee1 hSD ) . = ln 2 (1 + Pee1 hSD ) Pee1 + αA (89) Next, the continuity and differentiability of CB (PB ) is examined. Note that CB (PB ) in (53) is continuous and differentiable except for the breakpoints  Pee4 (hSR − hSD ) Pee4 Pee2 + Pee3 + αB , + + αB , PB = 2 hRD (1 + Pee4 hSD ) 2  hSD V 2 UV (91) + αB , + 2 hRD where U and V are given in (36) and (46), respectively. First, examine the continuity at the breakpoint PB = + αB . It is easy to check that Pee2 +Pee3 2 lim  − P +P PB → ee2 2 ee3 +αB lim  + P +P PB → ee2 2 ee3 +αB CB (PB )    Pee2 + Pee3 hSD 1 hSD − + = C 2 2h 2  RD   1 Pee2 + Pee3 hRD + C + hRD − 2 2hSD 2  1 2  1 . 2 (93) (94) To check the continuity of CB (PB ) at the breakpoints PB = + αB , the right-hand sides of (92) and (93) must be )+C(PR hRD ) for purpose of equal. Denote f (PS , PR ) = C(PSPhSSD +PR +2αB exposition. Since (Pee2 , Pee3 ) = max f (PS , PR ), it is Pee2 +Pee3 2 {PS >0,PR >0} ′ ′ easy to obtain that fPS (Pee2 , Pee3 ) = 0 and fPR (Pee2 , Pee3 ) = 0, which are equivalent to hSD (Pee2 + Pee3 + 2αB ) = C (Pee2 hSD ) + C (Pee3 hRD ) , (95) ln 2 (1 + Pee2 hSD ) hRD (Pee2 + Pee3 + 2αB ) = C (Pee2 hSD ) + C (Pee3 hRD ) . (96) ln 2 (1 + Pee3 hRD ) Substituting (95) into (96) leads to hRD hSD = , 1 + Pee3 hRD 1 + Pee2 hSD (97) which is equivalent to (90) and it follows that CA (PA ) is differentiable at the breakpoint PA = Pee1 +αA . Thus, CA (PA ) is differentiable when PA ≥ 0. At last, examine the concavity of CA (PA ). Since CA (PA ) is continuous and differentiable over PA ≥ 0, and first-order condition is satisfied by the definition of CA (PA ) in (16), it is a concave function [33]. Based on the above analysis, Proposition 1 is proved. P ROOF C (Pee2 hSD ) + C (Pee3 hRD ) , 2 (92) Substituting (89) into (87) leads to CA (Pee1 + αA + a) − CA (Pee1 + αA ) lim− a a→0 CA (Pee1 + αA + a) − CA (Pee1 + αA ) , = lim a a→0+ CB (PB ) = A PPENDIX B OF P ROPOSITION 2 First, the average throughput CB (PB ) is obtained. By taking the optimal solutions given in (52) into (25), the average throughput CB (PB ) can be obtained as shown in Proposition 2. hRD + Pee2 hSD hRD = hSD + Pee3 hSD hRD . (98) It is easy to obtain the following two equations from (98):   1 Pee2 + Pee3 hSD hSD − = Pee2 hSD , + (99) 2hRD 2 2   1 Pee2 + Pee3 hRD hRD − = Pee3 hRD . + (100) 2hSD 2 2 Substituting (99)(100) into (93) leads to lim  − P +P PB → ee2 2 ee3 +αB =CB  CB (PB ) =  Pee2 + Pee3 + αB , 2 lim +  P +P PB → ee2 2 ee3 +αB CB (PB ) (101) and it follows that CB (PB ) is continuous at the breakpoint ee3 PB = Pee2 +P + αB . 2 Next examine the differentiability of CB (PB ) at the break- 13 point PB = Pee2 +Pee3 2 + αB . It is easy to check that   ee3 + αB + a − CB Pee2 +P + αB CB 2 lim a  a→0−  ′ Pee2 + Pee3 = lim CR + αB + a 2 a→0− C (Pee2 hSD ) + C (Pee3 hRD ) , (102) = Pee2 + Pee3 + 2αB Pee2 +Pee3 2 Pee2 +Pee3 2 CB  + αB + a − CB a   ′ Pee2 + Pee3 + αB + a = lim CR 2 a→0+ lim a→0+ = 1 2 ln 2 + 1 2 + hSD 2hRD hSD  ee3 + Pee2 +P hSD 2 ! hRD 1 2 + hRD 2hSD + Pee2 +Pee3 2 Pee2 +Pee3 2  hRD + αB  (103) . Substituting (95)(96)(99)(100) into (103) leads to   ee3 ee3 CB Pee2 +P + αB + a − CB Pee2 +P + αB 2 2 lim a a→0−   Pee2 +Pee3 ee3 + αB + a − CB Pee2 +P + αB CB 2 2 , = lim a a→0+ (104) and it follows that CB (PB ) is differentiable at the breakpoint ee3 PB = Pee2 +P + αB . 2 The continuity and differentiability at the other two breakpoints can be examined in similar ways, the proof is omitted due to space limitations. Based on the above analysis, CB (PB ) is continuous and differentiable when PB ≥ 0. Besides, since first-order condition is satisfied by the definition of CB (PB ), it is a concave function [33]. Thus, Proposition 2 is proved. P ROOF A PPENDIX C OF P ROPOSITION 4 It is worth to note that the objective function (54) is θCA (PA )+(1 − θ) CB (PB ), which stands for any line segments between any two points on line CA (P ) and CB (P ). Constraint (55) gives the relationship between P0 and {PA , PB , θ}. Thus, the optimization problem can be interpreted as finding the maximum value of any line segments between any two points on line CA (P ) and CB (P ) with specific x-coordinate P0 . In Case 1 and Case 2, CA (P ) ≥ CB (P ) over P > 0, i.e., the line segments are upper bounded by CA (P ). Thus, it is obvious in these cases that (PA∗ , PB∗ ) = (P0 , 0). Besides, θ∗ can be obtained by substituting (PA∗ , PB∗ ) into (55). In Case 3, as illustrated in Fig. 3, the domain is divided into several intervals by the x-coordinates of the tangent points. When P0 falls into the interval where the line segments are upper bounded by CA (P ), the power should all be allocated to DLT; When P0 falls into the interval where the line segments are upper bounded by CB (P ), the power should all be allocated to RAT; When P0 falls into the interval where the line segments are upper bounded by the tangent line of CA (P ) and CB (P ), the power value allocated for DLT and RAT are the corresponding x-coordinates of the tangent points on CA (P ) and CB (P ), respectively. With the above results, the optimal power allocation can be easily obtained according to P0 as shown in Proposition 4, and thus, Proposition 4 is proved. A PPENDIX D P ROOF OF P ROPOSITION 5 It is easy to check that objective function (76) is quasiconcave over PS , since it is a concave function divided by a linear function [33]. It is increasing if 0 ≤ PC ≤ hSR +hRD RD > hSR2h+h PS +αC . Thus, 2hRD PS +α RD  C and decreasing if PC  RD (PC − αC ) achieves the maximum PS∗ = max Pee5 , hSR2h+h RD SR PS∗ is obtained from value of problem (76)–(77). PR∗ = hhRD ∗ PS hSR = PR hRD . Substituting PS and PR∗ into objective function (76), the average throughput CC (PC ) for RAT-WDL is obtained as (81). Thus, Proposition 5 is proved. R EFERENCES [1] C. Han, T. Harrold, S. Armour, I. Krikidis, S. Videv, P. M. Grant, H. Haas, J. S. Thompson, I. Ku, C. Wang, T. A. Le, M. R. Nakhai, J. Zhang, and L. Hanzo, “Green radio: radio techniques to enable energyefficient wireless networks,” IEEE Wireless Commun. Mag., vol. 49, no. 6, pp. 46–54, Jun. 2011. [2] G. Y. Li, Z. Xu, C. Xiong, C. Yang, S. Zhang, Y. Chen, and S. Xu, “Energy-efficient wireless communications: tutorial, survey, and open issues,” IEEE Wireless Commun. Mag., vol. 18, no. 6, pp. 28–35, Dec. 2011. [3] S. Cui, A. J. Goldsmith, and A. Bahai, “Energy-efficiency of MIMO and cooperative MIMO techniques in sensor networks,” IEEE J. Sel. Areas Commun., vol. 22, no. 6, pp. 1089–1098, Aug. 2004. [4] ——, “Energy-constrained modulation optimization,” IEEE Trans. Wireless Commun., vol. 4, no. 5, pp. 2349–2360, Sep. 2005. [5] C. Isheden, Z. Chong, E. Jorswieck, and G. Fettweis, “Framework for link-level energy efficiency optimization with informed transmitter,” IEEE Trans. Wireless Commun., vol. 11, no. 8, pp. 2946–2957, Aug. 2012. [6] G. Miao, N. Himayat, and G. Y. Li, “Energy-efficient link adaptation in frequency-selective channels,” IEEE Trans. Commun., vol. 58, no. 2, pp. 545–554, Feb. 2010. [7] C. Xiong, G. Y. Li, S. Zhang, Y. Chen, and S. Xu, “Energy- and spectral-efficiency tradeoff in downlink OFDMA networks,” IEEE Trans. Wireless Commun., vol. 10, no. 11, pp. 3874–3886, Sep. 2011. [8] S. K. Jayaweera, “Virtual MIMO-based cooperative communication for energy-constrained wireless sensor networks,” IEEE Trans. Wireless Commun., vol. 5, no. 5, pp. 984–989, May 2006. [9] J. Xu and R. Zhang, “Throughput optimal policies for energy harvesting wireless transmitters with non-ideal circuit power,” IEEE J. Sel. Areas Commun., vol. 32, no. 2, pp. 322–332, Feb. 2014. [10] E. C. van der Meulen, “Three-terminal communication channels,” Adv. Appl. Probab., vol. 3, pp. 120–154, 1971. [11] T. M. Cover and A. A. E. Gamal, “Capacity theorems for the relay channel,” IEEE Trans. Inf. Theory, vol. IT-25, no. 5, pp. 572–584, Sep. 1979. [12] J. N. Laneman, D. N. C. Tse, and G. W. Wornell, “Cooperative diversity in wireless networks: Efficient protocols and outage behavior,” IEEE Trans. Inf. Theory, vol. 50, no. 12, pp. 3062–3080, Dec. 2004. [13] R. Pabst, B. H. Walke, D. C. Schultz, P. Herhold, H. Yanikomeroglu, S. Mukherjeee, H. Viswanathan, M. Lott, W. Zirwas, M. Dohler, H. Aghvami, D. D. Falconer, and G. P. Fettweis, “Relay-based deployment concepts for wireless and mobile broadband radio,” IEEE Commun. Mag., vol. 42, no. 9, pp. 88–89, Sep. 2004. [14] A. Nosratinia and A. Hedayat, “Cooperative communication in wireless networks,” IEEE Commun. Mag., vol. 42, no. 10, pp. 74–80, Oct. 2004. [15] G. Kramer, M. Gastpar, and P. Gupta, “Cooperative strategies and capacity theorems for relay networks,” IEEE Trans. Inf. Theory, vol. 51, no. 9, pp. 3037–3063, Sep. 2005. 14 [16] A. Høst-Madsen and J. Zhang, “Capacity bounds and power allocation for wireless relay channels,” IEEE Trans. Inf. Theory, vol. 51, no. 6, pp. 2020–2040, Jun. 2005. [17] Y. Liang, V. V. Veeravalli, and H. V. Poor, “Resource allocation for wireless fading relay channels: Max-min solution,” IEEE Trans. Inf. Theory, vol. 53, no. 10, pp. 3432–3453, Oct. 2007. [18] T. C. Y. Ng and W. Yu, “Joint optimization of relay strategies and resource allocations in cooperative cellular networks,” IEEE J. Sel. Areas Commun., vol. 25, no. 2, pp. 328–339, Feb. 2007. [19] B. Rankov and A. Wittneben, “Spectral efficient protocols for halfduplex fading relay channels,” IEEE J. Sel. Areas Commun., vol. 25, no. 2, pp. 379–389, Feb. 2007. [20] J. Tang and X. Zhang, “Cross-layer resource allocation over wireless relay networks for quality of service provisioning,” IEEE J. Sel. Areas Commun., vol. 25, no. 4, pp. 645–656, May 2007. [21] O. Simeone, Y. Bar-Ness, and U. Spagnolini, “Stable throughput of cognitive radios with and without relaying capability,” IEEE Trans. Commun., vol. 55, no. 12, pp. 2351–2360, Dec. 2007. [22] K. Jitvanichphaibool, R. Zhang, and Y. Liang, “Optimal resource allocation for two-way relay-assisted OFDMA,” IEEE Trans. Veh. Technol., vol. 58, no. 7, pp. 3311–3321, Sep. 2009. [23] C. Huang, R. Zhang, and S. Cui, “Throughput maximization for the gaussian relay channel with energy harvesting constraints,” IEEE J. Sel. Areas Commun., vol. 31, no. 8, pp. 1469–1479, Aug. 2013. [24] Y. Yao, X. Cai, and G. B. Giannakis, “On energy efficiency and optimum resource allocation of relay transmissions in the low-power regime,” IEEE Trans. Wireless Commun., vol. 4, no. 6, pp. 2917–2927, Nov. 2005. [25] R. Madan, N. B. Mehta, A. F. Molisch, and J. Zhang, “Energy-efficient cooperative relaying over fading channels with simple relay selection,” IEEE Trans. Wireless Commun., vol. 7, no. 8, pp. 3013–3025, Aug. 2008. [26] Z. Zhou, S. Zhou, J. Cui, and S. Cui, “Energy-efficient cooperative communication based on power control and selective single-relay in wireless sensor networks,” IEEE Trans. Wireless Commun., vol. 7, no. 8, pp. 3066–3078, Aug. 2008. [27] G. Brante, M. T. Kakitani, and R. D. Souza, “Energy efficiency analysis of some cooperative and non-cooperative transmission schemes in wireless sensor networks,” IEEE Trans. Commun., vol. 59, no. 10, pp. 2671–2677, Jul. 2011. [28] C. Bae and W. E. Stark, “End-to-end energy-bandwidth tradeoff in multihop wireless networks,” IEEE Trans. Inf. Theory, vol. 55, no. 9, pp. 4051–4066, Sep. 2009. [29] X. Zhou, B. Bai, and W. Chen, “Greedy relay antenna selection for sum rate maximization in amplify-and-forward MIMO two-way relay channels under a holistic power model,” IEEE Commun. Lett., vol. 19, no. 9, pp. 1648–1651, Sep. 2015. [30] D. Wang, B. Bai, W. Chen, and Z. Han, “Achieving high energy efficiency and physical-layer security in AF relaying,” IEEE Trans. Wireless Commun., vol. 15, no. 1, pp. 740–752, Jan. 2016. [31] S. Zhou, A. J. Goldsmith, and Z. Niu, “On optimal relay placement and sleep control to improve energy efficiency in cellular networks,” in Proc. IEEE Int. Conf. Commun. (ICC), Kyoto, Japan, Jun. 5–9, 2011, pp. 1–6. [32] H. Liang, C. Huang, Z. Chen, and S. Li, “Throughput maximization for decode-and-forward relay channels with non-ideal circuit power,” in Proc. IEEE Wireless Commun. and Networking Conf. (WCNC), San Francisco, USA, Mar. 19–22, 2017, pp. 1–6. [33] S. Boyd and L. Vandenberghe, Convex Optimization. Cambridge Univ. Press, 2004.
7cs.IT
BECK’S CONJECTURE FOR MULTIPLICATIVE LATTICES arXiv:1310.4594v1 [math.AC] 17 Oct 2013 VINAYAK JOSHI AND SACHIN SARODE Abstract. In this paper, we introduce the zero divisor graph of a multiplicative lattice. We provide a counter-example to Beck’s conjecture for multiplicative lattices. Further, we prove that Beck’s conjecture is true for reduced multiplicative lattice which extends the result of Behboodi and Rakeei [7] and Aalipour et. al. [1]. Keywords Zero-divisor graph, reduced multiplicative lattice, minimal prime element. 1. Introduction In recent years lot of attention have been given to the study of zero divisor graphs of algebraic structures and ordered structures. The idea of a zero divisor graph of a commutative ring with unity was introduced by Beck [5]. He was particularly interested in the coloring of commutative rings with unity. Many mathematicians like Anderson et.al. [3], F. DeMeyer, T. McKenzie and K. Schneider [8], Maimani, Pournaki and Yassemi [20], Redmond [22] and Samei [23] investigated the interplay between properties of the algebraic structure and graph theoretic properties. The zero divisor graphs of ordered structures are well studied by Halaš and Jukl [11], Halaš and Länger [12], Joshi [13], Joshi et.al. [14, 15, 18, 19], Nimbhorkar et.al [21] etc. In ring theory, the structure of a ring R is closely related to ideal’s behavior more than elements. Hence Behboodi and Rakeei [6, 7] introduced the concept of annihilating ideal-graph AG(R) of a commutative ring R with unity where the vertex set V (AG(R)) is the set of nonzero ideals with non-zero annihilator, that is, for a non-zero ideal I of R, I ∈ V (AG(R)) if and only if there exists a non-zero ideal J of R such that IJ = (0) and two distinct vertices I and J are adjacent if and only if IJ = (0) and studied the properties of rings and its annihilating ideal-graphs. In [7], Behboodi and Rakeei raised the following conjecture. Conjecture 1.1. For every commutative ring R with unity, χ(AG(R)) = Clique(AG(R)). It is interesting to observe that the set Id(R) of all ideals of a commutative ring R with unity forms a modular compactly generated 1-compact multiplicative lattice in which product of two compact element is compact (see Definition 1.2) and the annihilating ideal-graph of a commutative ring R with unity is nothing but the zero divisor graph of the multiplicative lattice of all ideals of R where the vertex set is the set of non-zero zero divisors and vertices a and b are adjacent if and only if ab = 0. Hence to study the annihilating ideal-graphs of commutative ring with unity, a multiplicative lattice becomes a tool. This motivate us to define and study Date: October 12, 2013. 2010 Mathematics Subject Classification. Primary 05C15, Secondary 06A12. 1 2 VINAYAK JOSHI AND SACHIN SARODE the zero divisor graph of a multiplicative lattice. It is natural to ask the following question and the affirmative answer to this question solves Conjecture 1.1. of Behboodi and Rakeei [7]. m Question: Is Beck’s Conjecture, that is, χ(Γm i (L)) = Clique(Γi (L)) true for the zero divisor graphs of a multiplicative lattice L with respect to an element i of L? In this paper, we introduce the zero divisor graph of a multiplicative lattice. We provide a counter-example to Beck’s conjecture for multiplicative lattices, particularly, a non-reduced multiplicative lattice. Further, we prove that Beck’s conjecture is true for reduced multiplicative lattice which extend the result of Behboodi and Rakeei [7] and Aalipour et. al. [1]. Now, we begin with necessary concepts and terminology. Definition 1.2. A non-empty subset I of a lattice L is said to be semi-ideal, if x ≤ a ∈ I implies that x ∈ I. A semi-ideal I of L is said to be an ideal if for a, b ∈ I, a ∨ b ∈ I. A proper ideal (semi-ideal) I of a lattice L is said to be prime if a ∧ b ∈ I implies a ∈ I or b ∈ I. Dually, we have concept of prime filter (semi-filter). A prime ideal (semi-ideal) I is a minimal prime ideal (semi-ideal) if there is no prime ideal (semi-ideal) Q such that {0} $ Q $ I. A filter is said to be maximal if it is a maximal element of the poset of filter. For a ∈ L, the set (a] = {x ∈ L | x ≤ a} is called the principal ideal generated by a. Dually, we have a concept of a principal filter [a) generated by a. A lattice L is said to be complete, if for any subset S of L, we have W S, V S ∈ L. A complete lattice L is said to be a multiplicative lattice, if there is defined a binary operation “ · ” called multiplication on L satisfying the following conditions: (1) a · b = b · a, for all a, b ∈ L, (2) a · (b · c) = (a · b) · c, for all a, b, c ∈ L, (3) a · (∨α bα ) = ∨α (a · bα ), for all a, bα ∈ L, (4) a · b ≤ a ∧ b for all a, b ∈ L, (5) a · 1 = a, for all a ∈ L. W An element c of a complete lattice L is said to be compact, if c ≤ α aα implies that Wn c ≤ i=1 aαi , where n ∈ Z+ . The set of all compact elements of a lattice L is denoted by L∗ . A lattice L is said to be compactly generated or algebraic, if for every x ∈ L, there exist xα ∈ L∗ , α ∈ Λ such that x = ∨α xα , that is, every element is a join of compact elements. A multiplicative lattice L is said to be 1-compact if 1 is a compact element of L. A multiplicative lattice L is said to be compact if every element is a compact element of L. An element p 6= 1 of a multiplicative lattice L is said to be prime if a · b ≤ p implies either a ≤ p or b ≤ p. Equivalently, an element p 6= 1 of a 1-compact, compactly generated lattice L is said to be prime if a · b ≤ p for a, b ∈ L∗ implies either a ≤ p or b ≤ p. A nonempty subset S of L∗ in 1-compact, compactly generated lattice is said to be multiplicatively closed if s1 , s2 ∈ S, then s1 · s2 ∈ S. BECK’S CONJECTURE FOR MULTIPLICATIVE LATTICES 3 As L is a complete lattice, it follows that L admits residuals: for every pair a, b ∈ L, there W exists an element (a : b) = {x | x · b ≤ a} ∈ L such that for any x ∈ L , x · b ≤ a ⇔ x ≤ (a : b). Clearly, a ≤ (a : b) for all a, b ∈ L. In a multiplicative lattice L, an element a ∈ L is said to be nilpotent, if an = 0, for some n ∈ Z+ and L is said to be reduced, if the only nilpotent element is 0. W Let a be an element of a multiplicative lattice then we define a∗ = {x ∈ L | an · x = 0} and W if L is reduced, then a∗ = {x ∈ L | x · a = 0}. A lattice L with 0 is said to be 0-distributive if a ∧ b = 0 = a ∧ c then a ∧ (b ∨ c) = 0; see Varlet [24]. The concept of 0-distributive poset can be found in [17, 16]. 2. Zero-divisor graph of a multiplicative lattice Joshi [13] introduced the zero-divisor graph of a poset with respect to an ideal I. We mentioned this definition, when a poset is a lattice. Definition 2.1. Let I be an ideal of a lattice L. We associate an undirected and simple graph, called the zero-divisor graph of L with respect to I, denoted by ΓI (L) in which the set of vertices is {x 6∈ I | x ∧ y ∈ I for some y 6∈ I} and two distinct vertices a, b are adjacent if and only if a ∧ b ∈ I. We illustrate this concept with an example. Example 2.2. The lattice L and its zero divisor graph Γ{0} (L) (in the sense of Joshi [13]) is shown below. 1 ❡ d❡ ✡ ❡ b✡ ❡c a ❢ ❢b c ❡ d❡ a ❡ ❡ 0 L (a) ❢ c Γ{0} (L) ❡ ❡ a m b Γ (L) (b) Figure 2 (c) Now, we introduced the zero-divisor graph Γm (L) of a multiplicative lattice L and illustrate with an example. Definition 2.3. Let L be a multiplicative lattice and let i ∈ L. We associate an undirected and simple graph, called the zero-divisor graph of L with respect to an element i, denoted by Γm i (L) in which the set of vertices is {x( i) ∈ L | x · y ≤ i for some y( i) ∈ L} and two distinct vertices a, b are adjacent if and only if a · b ≤ i. Whenever i = 0, we denote Γm i (L) by simply Γm (L). 4 VINAYAK JOSHI AND SACHIN SARODE Example 2.4. Consider the same lattice L shown in Figure 2(a) with the trivial multiplication x · y = 0 = y · x, for each x 6= 1 6= y and x · 1 = x = 1 · x for every x ∈ L. Then it is easy to see that L is a multiplicative lattice. Further, it’s zero divisor graph Γm (L) (in the multiplicative lattice sense) is shown in Figure 2(c). It is interesting to note that if 1 is completely joinW irreducible(i.e. 1 = xi ⇒ 1 = xi for some i) then any lattice with this trivial multiplication is a multiplicative lattice. Definition 2.5. The chromatic number of G is denoted by χ(G). Thus, χ(G) is the minimum number of colors which can be assigned to the elements of G such that adjacent elements receive different colors. A clique of a graph G is a complete subgraph and the supremum of the sizes of clique in G, denoted by ω(G), is called the clique number of G. For undefined concepts in lattices and graphs, see Grätzer [9] and Harary [10] respectively. It is known that Beck’s Conjecture, that is, χ(ΓI (P )) = Clique(ΓI (P )) is true for the zero divisor graph of a poset P (with 0) with respect to an ideal I of P ; see [13, Theorem 2.9] (when I = {0}); see also [11, Theorem 2.13]). Hence it is natural to ask the following question. m Question: Is Beck’s Conjecture, that is, χ(Γm i (L)) = Clique(Γi (L)) true for the zero divisor graphs of a multiplicative lattice L with respect to an element i of L? We answer this question negatively in the following example. Example 2.6. Consider the lattice L depicted in the Figure 3(a). Define a multiplication on L as follows. It is not very difficult to prove that L is a multiplicative lattice. Moreover, f 2 = 0 for f 6= 0 shows that L is non-reduced. Now consider the zero divisor graph Γm (L) of L depicted in Figure 3(b). It is easy to see that 4 = χ(Γm (L)) > Clique(Γm (L)) = 3. Thus Beck’s Conjecture is not true in the case of multiplicative lattices. ❞1 b ∨ e(W) tt t a ∨ d(R) t a∨c t a t a∨d ❞ b ❞ b∨d c b∨e c∨e ❞ ❞ ❏ ❏ ❏ ❞ d ❏❞ ❞ e (G) a (R) t b (W) t (B) t t f a ∨ c(R) c ∨ e(R) e t t t t t c(R) d(W) t t(R) tb ∨ d(W) tf Γm (L) ❞ 0 (R)-Red, (B)-Blue,(G)-Green, (W)-White L (a) (b) Figure 3 BECK’S CONJECTURE FOR MULTIPLICATIVE LATTICES • 0 a b c d e f (a ∨ c) (a ∨ d) (b ∨ e) (c ∨ e) (b ∨ d) t 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a 0 f 0 f f 0 0 f f 0 f f f a b 0 0 f 0 f f 0 0 f f f f f b c 0 f 0 f 0 f 0 f f f f 0 f c d 0 f f 0 f 0 0 f f f 0 f f d e 0 0 f f 0 f 0 f 0 f f f f e f 0 0 0 0 0 0 0 0 0 0 0 0 0 f (a ∨ c) (a ∨ d) (b ∨ e) (c ∨ e) (b ∨ d) 0 0 0 0 0 f f 0 f f 0 f f f f f f f f 0 f f f 0 f f 0 f f f 0 0 0 0 0 f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f (a ∨ c) (a ∨ d) (b ∨ e) (c ∨ e) (b ∨ d) 5 t 0 f f f f f 0 f f f f f f t 1 0 a b c d e f (a ∨ c) (a ∨ d) (b ∨ e) (c ∨ e) (b ∨ d) t 1 Remark 2.7. If R is a commutative ring with unity, then it is well known that the ideal lattice Id(R) of R is 1-compact, compactly generated modular multiplicative lattice; see Anderson [2]. Further, it is easy to observe that if R is reduced then Id(R) is a reduced multiplicative lattice. The lattice depicted in Figure 3(a) is a non-modular lattice (as it contains a nonmodular sublattice shown in dark black circles) and hence it can not be an ideal lattice of any commutative ring unity. Therefore the above conjecture remains open though Beck’s conjecture fails in the case of non-reduced multiplicative lattices. We have more pleasant situation when a multiplicative lattice is reduced. For this, we need Theorem 2.9 of [13]. Note that the notion of prime semi-ideals mentioned in [13] coincides with the corresponding notions in lattices. Hence we quote essentially Theorem 2.9 of [13], when a poset is a lattice and an ideal I = {0}. Theorem 2.8 (Joshi [13]). Let L be a lattice. If Clique(Γ(L)) < ∞ then L has a finite number of minimal prime semi-ideals and if n is this number then χ(Γ(L)) = Clique(Γ(L)) = n. Lemma 2.9. Let L be a reduced multiplicative lattice. Then L is 0-distributive. Proof. Let a ∧ b = 0 = a ∧ c for a, b, c ∈ L. Since a · b ≤ a ∧ b and L is a multiplicative lattice, we have a · (b ∨ c) = 0. Further, L is reduced, we have a · b = 0 implies a ∧ b = 0. This together with a · (b ∨ c) = 0 proves that L is 0-distributive.  It is proved in Joshi and Mundlik [16] that every prime semi-ideal in a 0-distributive poset is a prime ideal of a 0-distributive poset. But for the sake of completeness, we provide the proof of the same in the following result which is essential for the proof of the Beck’s Conjecture. Theorem 2.10. Let L be a reduced multiplicative lattice and let Clique(Γm (L)) < ∞. Then L has a finite number of minimal prime ideals and if n is this number then Beck’s Conjecture is true, that is, χ(Γm (L)) = Clique(Γm (L)) = n. Proof. Suppose L is a reduced multiplicative lattice. Then one can easily prove that whenever a · b = 0 then a ∧ b = 0 and conversely for a, b ∈ L. By Lemma 2.9, L is 0-distributive. 6 VINAYAK JOSHI AND SACHIN SARODE Now, we prove that every minimal prime semi-ideal of L is a minimal prime ideal of L. Let I be a minimal prime semi-ideal of L. To prove I is an ideal, it is enough to show that for a, b ∈ I, a ∨ b ∈ I. Let a, b ∈ I. Since I is a minimal prime semi-ideal of L, it is easy to observe that L \ I is a maximal filter of L. Further, a, b 6∈ L \ I, we have [a) ∨ (L \ I) = [b) ∨ (L \ I) = L = [0). Hence there exists t ∈ L \ I such that t ∧ a = 0 = t ∧ b. By Lemma 2.9, we have t ∧ (a ∨ b) = 0. This proves that a ∨ b ∈ I, otherwise 0 = t ∧ (a ∨ b) ∈ L \ I, a contradiction to maximality of L \ I. This proves that every minimal prime semi-ideal is a minimal prime ideal. In view of the observation whenever a · b = 0 then a ∧ b = 0 and conversely for a, b ∈ L, the zero divisor graph Γ(L) of the lattice L (in the lattice sense) is isomorphic to the zero divisor graph Γm (L) of the reduced multiplicative lattice L. Since Clique(Γm (L)) < ∞, we have Clique(Γ(L)) < ∞. Hence by Theorem 2.8, Beck’s Conjecture is true for general lattices (in fact for posets); hence it is true for reduced multiplicative lattice, that is, χ(Γm (L)) = Clique(Γm (L)) = n, where n is the number of minimal prime ideals of L.  Remark 2.11. It is obvious that the prime ideals in a commutative ring R with unity are nothing but the prime elements of the Id(R). In view of this observation and the fact that the annihilating ideal-graph AG(R) of a commutative ring R with 1 is nothing but the zero divisor graph of a multiplicative lattice Id(R) of all ideals of a commutative ring R with 1, Theorem 2.10 extend Corollary 2.11 of Behboodi and Rakeei [7] but not completely Theorem 8 of Aalipour et. al. [1]. In order to extend Theorem 8 of Aalipour et. al. [1], we have to prove that χ(Γm (L)) = Clique(Γm (L)) = n, where n is the number of minimal prime elements of a reduced multiplicative lattice L. We achieve this result in sequel. Before proceeding further, we provide an example of a reduced multiplicative lattice which has prime ideals but not have any prime element. It should be noted that a reduced multiplicative lattice always has a prime ideal but need not have a prime element. Let N be the set of natural numbers. Let L = {X ⊆ N | |X| < ∞} ∪ {N}. Then it is easy to see that L is a reduced multiplicative lattice with multiplication as the meet. One can prove that the set {n}⊥ = {A ⊆ N | A ∩ {n} = ∅ and |A| < ∞} is a minimal prime ideal of L for every n ∈ N. But L does not contain any prime element. Lemma 2.12. Let L be reduced 1-compact, compactly generated lattice and x ∈ L if x∗ is maximal among {a∗ | a ∈ L, a∗ 6= 1}, then x∗ is a prime element of L Proof. Suppose that a · b ≤ x∗ and a  x∗ . Then (x · a · b) = 0. Let (0 6= y) ≤ (x · a). Then (b · y) ≤ (x · a · b) = 0. Thus b ≤ y ∗ . As y ≤ x implies x∗ ≤ y ∗ and y ∗ 6= 1 due to y 6= 0. By maximality of x∗ , we deduced that y ∗ = x∗ , hence b ≤ x∗ . This proves that x∗ is prime.  Lemma 2.13. Let L be reduced 1-compact, compactly generated lattice. If x∗ , y ∗ are distinct prime elements of L, then x · y = 0. Proof. Assume contrary that x · y 6= 0, that is x  y ∗ and y  x∗ . Consider a compact element t ≤ x∗ . Then x · t = 0. As y ∗ is prime and x · t ≤ y ∗ . Since L is compactly generated and every compact element t ≤ x∗ is also ≤ y ∗ , we have t ≤ y ∗ and hence x∗ ≤ y ∗ . Similarly we can show y ∗ ≤ x∗ . Hence y ∗ = x∗ , a contradiction.  BECK’S CONJECTURE FOR MULTIPLICATIVE LATTICES 7 Lemma 2.14. Let L be reduced 1-compact, compactly generated lattice with Clique(Γm(L)) < ∞, then the set {x∗ | x ∈ L, x 6= 0} satisfies the ascending chain condition. Proof. Suppose a∗1 < a∗2 < a∗3 < a∗4 · · · ·. Let xj ≤ a∗j and xj  a∗j−1 , j = 2, 3, · · ·. If we let yn = (xn · an−1 ), n = 2, 3, · · ·, then yn 6= 0. For i < j, we have xi ≤ a∗i ≤ a∗j−1 . Thus (xi · aj−1 ) = 0, consequently, (yi · yj ) = 0 for all i 6= j. Thus the set {yn | n = 2, 3, · · ·} is an infinite clique, a contradiction.  Lemma 2.15. Let L be reduced 1-compact, compactly generated lattice with Clique(Γm(L)) < ∞, then the set of all distinct maximal annihilator elements of L is finite. Proof. Let A = {x∗i | x∗i is maximal} be the set of all maximal annihilator elements of L. Clearly, xi 6= 0 for all i and x∗i 6= x∗j whenever i 6= j. By Lemma 2.12, all the elements of A are prime. Then by Lemma 2.13, xi · xj = 0 for all i 6= j. This shows Clique(L) ≥ |A|, which according to Clique(L) < ∞ yields the finiteness of A.  Lemma 2.16. Let L be reduced 1-compact, compactly generated lattice with L∗ multiplicatively closed set and Clique(Γm (L)) < ∞, then 0 is the meet of a finite number of minimal prime elements of L. Proof. According to Lemma 2.15, let {x∗i | 1 ≤ i ≤ n} be the set of all maximal annihilator elements of L. By Lemma 2.12, all these elements are prime. Further, due to Lemma 2.13, V xi ·xj = 0 for all i 6= j. Assume that there is (0 6=)a ≤ 1≤i≤n x∗i . Then a·xi = 0 for all i. Thus xi ≤ a∗ for all i. But by Lemma 2.14, a∗ ≤ x∗i for some i. However, this gives xi ≤ a∗ ≤ x∗i , V that is, x2i = 0, a contradiction to reduced lattice. Thus we have, 0 = 1≤i≤n x∗i . Now, we show that x∗i = pi are minimal prime elements of L. Since pi are assumed to be maximal annihilator elements, we may suppose that none of pi contains pj for all i 6= j. Indeed, if pj were not minimal for some j, then there exists a minimal prime element q with q < pj . Vn Now i=1 x∗i ≤ q and q is prime implies that x∗i ≤ q for some i. But then x∗i = pi ≤ q ≤ pj , a Vn contradiction. Thus i=1 pi = 0.  Lemma 2.17. Let L be reduced 1-compact, compactly generated lattice with with L∗ multiplicatively closed set and Clique(Γm(L)) < ∞, then every minimal prime element p of L is of the form x∗ for some x ∈ L. Proof. Let p be a minimal prime element of L. For x  p, we have x∗ ≤ p. By Lemma 2.14, there are maximal annihilator elements among A = {x∗ | x  p}. In fact, we prove that there is a greatest one. Let y1∗ , y2∗ be two maximal elements of A. We have y1 · y2  p, since p is prime and y1 , y2  p. Thus there is (0 6= y) = (y1 · y2 ) with y  p. Clearly, y1∗ , y2∗ ≤ y ∗ and as both y1∗ , y2∗ are maximal in A, we conclude that y1∗ = y2∗ = y ∗ . This shows that A has the greatest element say z ∗ . By Lemma 2.12, z ∗ is prime. We prove that z ∗ ≤ p. If not then there is a compact element g ≤ z ∗ such that g  p. Then z ≤ z ∗∗ ≤ g ∗ ∈ A. Hence we have z ≤ g ∗ ≤ z ∗ , a contradiction 8 VINAYAK JOSHI AND SACHIN SARODE to the fact that L is reduced. Thus z ∗ ≤ p and p is a minimal prime element of L, we have p = z ∗.  Now, we prove Beck’s conjecture for reduced lattice L. Theorem 2.18. Let L be a reduced 1-compact, compactly generated lattice with with L∗ multiplicatively closed set and Clique(Γm(L)) < ∞. Then the number of minimal prime elements of L is finite, say n and χ(Γm (L)) = Clique(Γm (L)) = n Proof. By the Lemma 2.16, we have 0 = ∧1≤i≤n pi for pi being minimal prime elements of L and by Lemma 2.17, pi = x∗i for some xi 6= 0, hence 0 = ∧1≤i≤n x∗i . By Lemma 2.13, {xi | 1 ≤ i ≤ n} is a clique in L and thus Clique(L) ≥ n. Define a coloring of L as f (x) = min{i | x  pi }. If x, y are adjacent vertices, then x · y = 0. If f (x) = k + 1, then x ≤ pi for 1 ≤ i ≤ k and x  pk+1 . So we conclude that y ≤ pk+1 , since x · y = 0 ≤ pk+1 and x  pk+1 . This show that f (y) 6= k + 1 and thus f (x) 6= f (y). Hence f is coloring of L. This yields χ(Γm (L)) ≤ n, and finally n ≤ Clique(Γm (L)) ≤ χ(Γm (L)) ≤ n. In conclusion, we have χ(Γm (L)) = Clique(Γm (L)) = n.  Corollary 2.19. Let R be a reduced commutative ring with unity such that Clique(AG(R)) < ∞. Then χ(AG(R)) = Clique(AG(R)) = |M in(R)|. References [1] G. Aalipour, S. Akbari, R. Nikandish, M.J. Nikmehrb and F. Shaveisi, On the coloring of the annihilatingideal graph of a commutative ring, Discrete Math. 312 (2012), 2620-2626. [2] D. D. Anderson, Abstract commutative ideal theory without chain condition, Algebra Universalis 6 (1976), 131-145. [3] D. D. Anderson and M. Naseer, Beck’s Coloring of a Commutative Ring, J. Algebra 159 (1993), 500-514. [4] D. F. Anderson and P. Livingstone, The zero-divisor graph of a commutative ring, J. Algebra 217(1999), 434-447. [5] I. Beck, Coloring of a commutative ring, J. Algebra 116 (1988), 208-226. [6] M. Behboodi and Z. Rakeei, The annihilating-ideal graph of commutative rings I, J. Algebra Appl. 10(4) (2011), 727-739. [7] M. Behboodi and Z. Rakeei, The annihilating-ideal graph of commutative rings II, J. Algebra Appl. 10(4) (2011), 741-753. [8] F. DeMeyer, T. McKenzie and K. Schneider, The zero-divisor graph of a commutative semigroup, Semigroup Forum 65 (2002), 206-214. [9] G. Grätzer, General Lattice Theory, Birkhauser, Basel (1998). [10] F. Harary, Graph Theory, Narosa, New Delhi (1988). [11] R. Halaš and M. Jukl, On Beck’s coloring of posets, Discrete Math. 309 (2009), 4584-4589. [12] R. Halaš and H. Länger, The zero divisor graph of a qoset, Order DOI 10.1007/s11083-009-9120-1. [13] V. V. Joshi, Zero divisor graph of a poset with respect to an ideal, Order 29 (2012), 499-506. [14] V. V. Joshi and A. U. Khiste, On the zero divisor graphs of pm-lattices, Discrete Math. 312 (2012), 2076-2082. [15] V. V. Joshi and A. U. Khiste, On the zero divisor graph of a Boolean poset, Math. Slovaca (to appear). [16] V. V. Joshi and N. D. Mundlik, Prime ideals in 0-distributive posts, Cent. Eur. J. Math. DOI 10.2478/s11533-013-0206-z. [17] V. V. Joshi and B. N. Waphare, Characterizations of 0-distributive posets, Math. Bohem. (1)130 (2005), 73-80. BECK’S CONJECTURE FOR MULTIPLICATIVE LATTICES 9 [18] V. V. Joshi, B. N. Waphare and H. Y. Pourali Zero divisor graphs of lattices and primal ideals, AsianEuropean J. Math. 5(3) (2012), 1250037 (9 pages). [19] V. V. Joshi, B. N. Waphare and H. Y. Pourali On generalized zero divisor graphs of posets, Discrete Appl. Math. 161 (2013), 1490-1495. [20] H. R. Maimani, M. R. Pournaki and S. Yassemi, Zero-divisor graphs with respect to an ideal, Comm. Algebra 34 (2006), 923-929. [21] S. K. Nimbhorkar, M. P. Wasadikar, Lisa DeMeyer, Coloring of semilattices, Ars Comb. 12 (2007), 97-104. [22] S. P. Redmond, An ideal based zero-divisor graph of a commutative ring, Comm. Algebra 31 (2003), 44254423. [23] K. Samei, The zero-divisor graph of a reduced ring , J. Pure and Appl. Algebra, 209 (2007), 813-821 . [24] J. Varlet, A generalization of notion of pseudo-complementness, Bull. Soc. Roy. Sci. Liége 36 (1968), 149-158. Department of Mathematics, University of Pune, Pune-411007, India. E-mail address: [email protected], [email protected]
0math.AC
QUASILINEAR QUADRATIC FORMS AND FUNCTION FIELDS OF QUADRICS arXiv:1710.09692v1 [math.AC] 26 Oct 2017 STEPHEN SCULLY Abstract. Let p and q be anisotropic quadratic forms of dimension ≥ 2 over a field F . In a recent article, we formulated a conjecture describing the general constraints which the dimensions of p and q impose on the isotropy index of q after scalar extension to the function field of p. This can be viewed as a generalization of Hoffmann’s Separation Theorem which simultaneously incorporates and refines some well-known classical results on the Witt kernels of function fields of quadrics. Using algebro-geometric methods, it was shown that large parts of this conjecture hold in the case where the characteristic of F is not 2. In the present article, we prove similar (in fact, slightly stronger) results in the case where F has characteristic 2 and q is a so-called quasilinear form. In contrast to the situation where char(F ) 6= 2, the methods used to treat this case are purely algebraic. 1. Introduction Let F be a field, let p and q be a pair of anisotropic quadratic forms of dimension ≥ 2 over F , and let F (p) be the function field of the integral projective F -quadric defined by the vanishing of p. The problem of understanding the isotropy behaviour of q after scalar extension to the field F (p) is one which lies at the heart of many of the central problems in the algebraic theory of quadratic forms. Let i0 (qF (p) ) denote the isotropy index (i.e., the maximal dimension of a totally isotropic subspace) of q extended to F (p). In [Scu17], we formulated following conjecture which aims to describe the general constraints which the dimensions of p and q impose on the integer i0 (qF (p) ): Conjecture 1.1. Let p and q be anisotropic quadratic forms of dimension ≥ 2 over a field F , and let s be the unique non-negative integer such that 2s < dim(p) ≤ 2s+1 . Set k = dim(q) − 2i0 (qF (p) ). Then k ≥ 0 and dim(q) = a2s+1 + ǫ for some non-negative integer a and integer −k ≤ ǫ ≤ k. Remarks 1.2. (1) Note that we do not impose any assumption on the characteristic of F , and we permit p and q to be degenerate in the characteristic 2 case. (2) The assertion is trivially true if k ≥ 2s − 1, so we are interested in the case where k ≤ 2s − 2. (3) If q is non-degenerate, then i0 (qF (p) ) is equal to the Witt index of qF (p), i.e., half the dimension of its hyperbolic part. For degenerate forms, however, one has to distinguish between the isotropy index and Witt index. The reader is warned that our notation differs from [EKM08], where i0 is used to denote the Witt index. (4) If q is non-degenerate, then the integer k is just the dimension of the anisotropic part of qF (p) . If q is degenerate (in which case char(F ) = 2), this need not be true. Nevertheless, it is easy to check that k ≥ 0 in all cases (see Lemma 3.2 below). 2010 Mathematics Subject Classification. 11E04, 14E05. Key words and phrases. Quasilinear quadratic forms, function fields of quadrics, isotropy indices. 1 2 STEPHEN SCULLY It is not hard to see that Conjecture 1.1 is optimal, to the extent that there can be no further gaps in the possible values of dim(q) determined by i0 (qF (p) ) and dim(p) alone. Simple examples are given in [Scu17, Ex. 1.5] and Example 4.5 below. From one point of view, the rough content of the conjecture is the following: The more isotropic q becomes over the field F (p), the closer dim(q) should be to being divisible by 2s+1 . This does not capture the whole story, however; for example, when dim(q) ≤ 2s , the conjecture asserts that q remains anisotropic over F (p), which is precisely the statement of the fundamental Separation Theorem originally discovered by Hoffmann in [Hof95]. When char(F ) 6= 2, it was shown in [Scu17] that Conjecture 1.1 holds if any of the following conditions are satisfied: (1) (2) (3) (4) (5) k < 2s−1 ; 2s+1 − 2 ≤ dim p ≤ 2s+1 ; p is a Pfister neighbour; dim p ≤ 16; dim q ≤ 2s+2 + 2s−1 . Perhaps most interesting here is the case where k = 0, which tells us that if q represents an element in the kernel of the natural restriction homomorphism W (F ) → W (F (p)) on Witt groups, then dim(q) is divisible by 2s+1 . This new observation can be refined rather further ([Scu16b]), and perhaps raises some questions concerning the structure of the former kernel (about which very little is known in general). The results of [Scu17] are proved using methods from the theory of algebraic cycles, with the decisive tool being the action of Steenrod operations on the mod-2 Chow rings of certain smooth projective varieties. While the same ideas should, in principle, permit to produce analogous results in the case where char(F ) = 2 and p and q are non-degenerate, the absence of the mod-2 Steenrod operations in this setting renders this approach impractical at the present time. In fact, we currently have no practical approach to Conjecture 1.1 or other problems of its ilk for non-degenerate forms in characteristic 2.1 The purpose of the present article is therefore to deal with a special class of degenerate forms in characteristic 2 known as quasilinear quadratic forms. Recall here that a quasilinear quadratic form over a field of characteristic 2 is one which is diagonalizable, i.e., isometric to a form of the shape a1 x21 + a2 x22 + · · · + an x2n , the ai being scalars in the field of definition. In characteristic 2, the projective quadric defined by the vanishing of such a form is totally singular, in the sense that it has no smooth points at all. Nevertheless, it was shown by Hoffmann and Laghribi (see, e.g., [HL04], [HL06], [Hof04]) that many aspects of the classical algebraic theory of quadratic forms can be extended to the study of quasilinear quadratic forms in characteristic 2. This was elaborated upon in work of Totaro ([Tot08]) and the author ([Scu16a, Scu16b, Scu16c]), where quasilinear analogues of various non-trivial results of Karpenko, Merkurjev, Vishik and others on discrete invariants of quadratic forms in characteristic 6= 2 were studied, and proved in many cases. The methods employed here are of a rather different and more direct nature, and it is unclear to what extent they can be adapted to treat other cases. In fact, the quasilinear case is the only case in characteristic 2 where some of these results are known.2 In the present work, we continue this theme by proving the following result towards the characteristic 2 case of Conjecture 1.1: 1All recent advances in the characteristic 6= 2 which rely on the use of Steeenrod operations or algebraic cobordism theory remain open for non-degenerate forms in characteristic 2. 2For example, the analogue of Karpenko’s theorem on the values of the first Witt index – see [Scu16b]. QUASILINEAR QUADRATIC FORMS AND FUNCTION FIELDS OF QUADRICS 3 Theorem 1.3. Assume, in the situation of Conjecture 1.1, that char(F ) = 2 and q is quasilinear. Then, the statement of the conjecture holds in the following cases: (1) k ≤ 2s−1 . (2) 2s+1 − 2s−2 − 3 ≤ dim(p) ≤ 2s+1 . (3) p is a quasi-Pfister neighbour. (4) dim(p) ≤ 8. (5) 2N ≤ dim(q) ≤ 2N + 2s+1 for some non-negative integer N . (6) dim(q) ≤ 2s+2 + 2s+1 . The reader will note that the results proved here are very similar (in fact, slightly stronger) than those proved in characteristic 6= 2 using completely different methods ([Scu17]). The proofs for the first three cases are given in §5 below, and for the last three in §6. In all cases, the basic tool is [Scu16c, Thm. 6.6], which seems to have many interesting applications to the study of quasilinear quadratic forms (see [Scu16c, §6]). Before proceeding, we make the following important remark: Remark 1.4. Suppose that char(F ) = 2. If, in the situation of Conjecture 1.1, q is quasilinear, then we can assume that p is quasilinear as well. Indeed, if p is not quasilinear, then the quadric {p = 0} is generically smooth, and so the extendion F (p)/F is separably generated. By [Hof04, Prop. 5.3], it follows that q remains anisotropic over F (p), and so the statement of the conjecture holds trivially. When we speak of the quasilinear case of Conjecture 1.1, we shall therefore mean the case where both p and q are quasilinear. Conventions. All quadratic forms considered in this paper are finite-dimensional. Nondegeneracy and regularity of quadratic forms are defined as in [EKM08, pp. 42-43]. 2. Recollections on quasilinear quadratic forms For the rest of the paper, we fix an arbitrary field F of characteristic 2. Let ϕ be a quasilinear quadratic form over F . The F -vector space on which ϕ is defined will be denoted Vϕ . Given a field extension L/F , we write ϕL for the unique quasilinear quadratic form on Vϕ ⊗F L which restricts to ϕ on Vϕ . If ψ is another quasilinear quadratic form over F , then we say that ψ is a subform of (resp. is isomorphic to) ϕ if there exists an injective (resp. bijective) F -linear map f : Vψ → Vϕ such that ϕ f (v) = ψ(v) for all v ∈ Vψ ; in this case, we write ψ ⊂ ϕ (resp. ψ ≃ ϕ). If ψ ≃ aψ for some a ∈ F ∗ , then we say that ψ and ϕ are similar. The orthogonal sum ψ ⊥ ϕ and tensor product ψ ⊗ ϕ are defined in the obvious way. We say that ϕ is divisible by ψ if it is isomorphic to the tensor product of ψ and another quasilinear quadratic form over F . If a1 , . . . , an ∈ F , then we write ha1 , . . . , an i for the quasilinear quadratic form a1 x21 + · · · + an x2n on the F -vector space F ⊕n . Every quasilinear quadratic form over F is isomorphic to one of this type. From now on, the terms “quasilinear quadratic form” and “form” will be used interchangeably. For the reader’s convenience, we now quickly review some basic concepts and results which will be needed in the main part of the paper. Detailed introductions to the theory of quasilinear quadratic forms may be found in [Hof04] and [Scu16b], and the unfamiliar reader is referred to these articles for further information. 2.A. Isotropic decomposition. Let ϕ be as above, and let W ⊂ Vϕ be the set of all isotropic vectors in Vϕ , i.e., the set of all vectors v ∈ Vϕ such that ϕ(v) = 0. Since ϕ is quasilinear, W is an F -linear subspace of Vϕ . Its dimension is the precisely the isotropy index i0 (ϕ) described in §1. The restriction of ϕ to the quotient space Vϕ /W is called the anisotropic part of ϕ, and is denoted ϕan . Note that we have dim(ϕan ) = dim(ϕ) − i0 (ϕ) 4 STEPHEN SCULLY (as opposed to the more familiar formula dim(ϕan ) = dim(ϕ) − 2i0 (ϕ) from the theory of non-degenerate quadratic forms). 2.B. The representation theorem. We write D(ϕ) for the set {ϕ(v) | v ∈ Vϕ } of all elements of F which are represented by ϕ. In this setting, the Cassels-Pfister representation theorem ([EKM08, Thm. 17.12]) can be restated as follows: Proposition 2.1 (see [Hof04, Prop. 2.6]). Let ψ and ϕ be quasilinear quadratic forms over F . Then ψan ⊂ ϕan if and only if D(ψ) ⊂ D(ϕ). In particular, ψan ≃ ϕan if and only if D(ψ) = D(ϕ). 2.C. Quasi-Pfister forms and quasi-Pfister neighbours. Let n N be a positive integer. We say that ϕ is an n-fold quasi-Pfister form if ϕ ≃ hha1 , . . . , an ii := ni=1 h1, ai i for some a1 , . . . , an ∈ F . In this case, we have dim(ϕ) = 2n . For completeness, a 0-fold quasi-Pfister form is a 1-dimensional form isomorphic to h1i. We say that ϕ is a quasi-Pfister neighbour if ϕ is similar to a subform of a quasi-Pfister form π with dim(π) < 2dim(ϕ). 2.D. The norm form and norm degree. If ϕ is non-zero, then the norm field of ϕ, denoted N (ϕ), is the smallest subfield of F containing the set {ab | a, b ∈ D(ϕ)}. Explicitly, if ϕ ≃ ha0 , a1 , . . . , an i with a0 6= 0, then N (ϕ) = F 2 (a0 ai | 1 ≤ i ≤ n). In particular, N (ϕ) is a finite extension of F 2 . The degree of this extension is called the norm degree of ϕ, and is denoted ndeg(ϕ). Clearly ndeg(ϕ) is a power of 2, and we write  lndeg(ϕ) for the integer log2 ndeg(ϕ) . Up to isometry, there exists a unique anisotropic quasilinear quadratic form ϕnor over F such that D(ϕnor ) = N (ϕ) (existence is clear; uniqueness holds by Proposition 2.1). The form ϕnor is called the norm form of ϕ, and it is easy to see that ϕnor is in fact a quasi-Pfister form of dimension 2lndeg(ϕ) . If ϕ is anisotropic, then it is similar to a subform of ϕnor by Proposition 2.1. In fact, in this case, an anisotropic quasi-Pfister form over F contains a subform similar to ϕ if and only if it contains a subform isomorphic to ϕnor . This readily implies the following basic result: Lemma 2.2 (see [Scu16b, Cor. 3.11]). Let ϕ be an anisotropic quasilinear quadratic form of dimension ≥ 1 over F , and let s ≥ −1 be the unique integer such that 2s < dim(ϕ) ≤ 2s+1 . Then lndeg(ϕ) ≥ s+1, and equality holds if and only if ϕ is a quasi-Pfister neighbour. 2.E. Similarity factors. We write G(ϕ)∗ for the set {a ∈ F ∗ | aϕ ≃ ϕ} of all similarity factors of ϕ. The basic result on similarity factors in the quasilinear setting is the following: Proposition 2.3 (see [Hof04, Lem. 6.3]). Let ϕ be an anisotropic quasilinear quadratic form over F and let a ∈ F \ F 2 . Then the following are equivalent: (1) a ∈ G(ϕ)∗ . (2) aD(ϕ) ⊂ D(ϕ). (3) ϕ is divisible by hhaii. . (4) i0 (ϕF (√a) ) = dim(ϕ) 2 2.F. Function fields of quasilinear quadrics. We say that ϕ is split if dim(ϕan ) ≤ 1. If ϕ is not split, then the projective F -quadric {ϕ = 0} is integral (see [Hof04, Lem. 7.1]), and we write F (ϕ) for its function field. In this case, we also write F [ϕ] for the function field of the affine F -quadric of the same equation. Clearly F [ϕ] is F -isomorphic to a degree-1 purely transcendental extension of F (ϕ). Explicitly, if ϕ ≃ ha0 , a1 , . . . , an i with a0 6= 0, then we have an F -isomorphism  q −1 2 2 a0 (a1 X1 + · · · + an Xn ) , F [ϕ] ≃ F (X) QUASILINEAR QUADRATIC FORMS AND FUNCTION FIELDS OF QUADRICS 5 where X = (X1 , . . . , Xn ) is an n-tuple of algebraically independent variables over F . The form ϕ is evidently isotropic after scalar extension to F (ϕ) (or F [ϕ]). 2.G. The Knebusch splitting tower. We adapt an important construction of Knebusch (see [EKM08, §25]) to the quasilinear setting: Let F0 = F , ϕ0 = ϕan , and inductively define • Fr = Fr−1 (ϕr−1 ) (provided ϕr−1 is not split), and • ϕr = (ϕFr )an (provided Fr is defined). Since the dimensions of the ϕr become progressively smaller, this is a finite process, terminating at the first integer h(ϕ) for which ϕh(ϕ) is split; h(ϕ) is called the height of ϕ, and the tower of fields F = F0 ⊂ F1 ⊂ · · · ⊂ Fh(ϕ) is called the Knebusch splitting tower of ϕ. This construction can be used to characterize quasi-Pfister neighbours as follows: Lemma 2.4 (see [HL04, §8] or [Scu16b, Cor. 3.11]). Let ϕ be an anisotropic quasilinear quadratic form of dimension ≥ 2 over F . Then ϕ is a quasi-Pfister neighbour if and only if ϕ1 is similar to a quasi-Pfister form. If ϕ is not split, then for each 1 ≤ r ≤ h(ϕ), we set ir (ϕ) = i0 (ϕFr ) − i0 (ϕFr−1 ); ir (ϕ) is called the r-th higher isotropy index of ϕ. If ϕ is anisotropic and s is the unique nonnegative integer such that 2s < dim(ϕ) ≤ 2s+1 , then it is known that i1 (ϕ) ≤ dim(ϕ) − 2s (see [HL06, Lem. 4.1] or Theorem 2.8 below). If equality holds here, then we say that ϕ has maximal splitting. By Lemma 2.4, anisotropic quasi-Pfister neighbours have maximal splitting. The converse is not true, but we have the following assertion, the analogue of which is still open for non-degenerate quadratic forms (even in characteristic 6= 2): Theorem 2.5 (see [Scu16a, Thm. 9.6]). Let ϕ be an anisotropic quasilinear quadratic form of dimension ≥ 2 over F and let s be the unique non-negative integer such that 2s < dim(ϕ) ≤ 2s+1 . If ϕ has maximal splitting and dim(ϕ) > 2s + 2s−2 , then ϕ is a quasi-Pfister neighbour. Finally, we will need to recall the evolution of the norm degree of a given form as one runs over its Knebusch splitting tower: Lemma 2.6 (see [Hof04, Lem. 7.12]). Let ϕ be a non-split quasilinear quadratic form over F . Then lndeg(ϕ1 ) = lndeg(ϕ) − 1. 2.H. Divisibility indices. If ϕ is non-zero, then the divisibility index of ϕ is defined as the largest integer d0 (ϕ) such that ϕ is divisible by an anisotropic quasi-Pfister form of dimension 2d0 (ϕ) . We will need the following lemma, which is analogous to a well-known fact from the non-degenerate theory (cf. [Kah08, Cor. 2.1.11]): Lemma 2.7. Let ϕ and σ be quasilinear quadratic forms over F . If ϕ is divisible by σ, then d0 ((ϕ)an ) ≥ d0 (σ). Proof. Let π be an anisotropic quasi-Pfister form which divides σ. Then π also divides ϕ, and hence ϕan by [Hof04, Prop. 4.19].  If ϕ is not split, then for each 1 ≤ r ≤ h(ϕ), we set dr (ϕ) = d0 (ϕr ); dr (ϕ) is called the rth higher divisibility index of ϕ. The fundamental result concerning the higher divisibility indices of quasilinear quadratic forms is the first part of the following theorem: Theorem 2.8 (see [Scu16b, Thm. 6.1]). Let ϕ be an anisotropic quasilinear quadratic form of dimension ≥ 2 over F and let 1 ≤ r ≤ h(ϕ). Then (1) ir (ϕ) ≤ 2dr (ϕ) . (2) If ϕr−1 is not similar to a quasi-Pfister form, then ir (ϕ) is divisible by 2dr−1 (ϕ) . 6 STEPHEN SCULLY Remark 2.9. Theorem 2.8 effectively determines all possible values of the Knebusch splitting pattern for quasilinear quadratic forms – see [Scu16b, §6]. In particular, it includes the quasilinear analogue of Karpenko’s theorem on the possible values of i1 (−) ([Kar03]). Note that the problem of determining the possible values of the Knebusch splitting pattern for non-degenerate quadratic forms is wide open (even in characteristic 6= 2). 3. The invariant d(−) Our approach to the quasilinear case of Conjecture 1.1 will be based on a certain procedure which permits to lower not only the value of dim(p), but also the value of k. In this section, we state and prove a technical lemma which will be needed to meet the second purpose. In order to improve the readability of what follows, it will be convenient to introduce notation which allows us to explicitly express the integer k as a function of the pair (p, q). With this in mind, we make the following definition: Definition 3.1. Given a quadratic form ϕ over a field (of any characteristic), we set d(ϕ) = dim(ϕ) − 2i0 (ϕ). Observe that if ϕ is non-degenerate (or even regular), then d(ϕ) is nothing else but the dimension of the anisotropic part of ϕ. In general, however, this need not be the case. For example, if ϕ is quasilinear, then the statement only holds in the trivial case where ϕ is already anisotropic. In fact, d(−) can take negative values for sufficiently degenerate forms. We do, however, have the following basic observation: Lemma 3.2. If ψ and ϕ are anisotropic quadratic forms of dimension ≥ 2 over a field K, then d(ϕK(ψ) ) ≥ 0. . By [EKM08, Prop. 7.29 and Prop. 7.31], we Proof. The claim is that i0 (ϕK(ψ) ) ≤ dim(ϕ) 2 ′ have an orthogonal decomposition ϕ ≃ ϕ ⊥ ϕ′′ in which ϕ′ is non-degenerate and ϕ′′ is quasilinear (if char(K) 6= 2, this means that ϕ′′ = 0). Moreover, it follows from [EKM08, Lem. 8.10] that dim(ϕ′ ) + i0 (ϕ′′K(ψ) ). i0 (ϕK(ψ) ) ≤ 2 The problem is therefore reduced to the case where ϕ is quasilinear. If ψ is also quasilinear, then a proof of the needed claim can be found in [Scu16b, Lem. 2.31 (1)]. If ψ is not quasilinear, then K(ψ)/K is a separably generated extension (i.e., the quadric defined by the vanishing of ψ is generically smooth). In particular, we have i0 (ϕK(ψ) ) = 0 by [Hof04, Prop. 5.3], and so the statement holds trivially in this case.  Remark 3.3. Note that, in the statement of Conjecture 1.1, the integer k is nothing else but d(qF (p) ). The lemma therefore confirms that k ≥ 0. We now specialize to the quasilinear setting. As alluded to in the proof of Lemma 3.2, anisotropic quasilinear quadratic forms remain anisotropic under separably generated field extensions ([Hof04, Prop. 5.3]). In particular, we have: Lemma 3.4. Let ϕ be a quasilinear quadratic form over F . If L is a separably generated field extension of F , then d(ϕL ) = d(ϕ). For later use, we will also need to observe the following interaction between d(−) and the divisibility index invariant d0 (−) (see §2.H above): Lemma 3.5. Let ϕ and ψ be anisotropic quasilinear quadratic forms of dimension ≥ 2 over F . Then d(ϕF (ψ) ) is divisible by 2d0 (ϕ) . QUASILINEAR QUADRATIC FORMS AND FUNCTION FIELDS OF QUADRICS 7 Proof. Let ϕ ≃ π ⊗ σ, with π a quasi-Pfister form. We need to show that dim(π) divides d(ϕF (ψ) ). There are two cases to consider: Case 1. If πF (ψ) is isotropic, then (since π is a quasi-Pfister form) we have i0 (πF (ψ) ) = dim(π) 2 (see [Hof04, Cor. 7.9]). In particular, we have dim(ϕ) dim(π) dim(σ) = . 2 2 By Lemma 3.2, it follows that d(ϕF (ψ) ) = 0, and so the statement holds trivially. i0 (ϕF (ψ) ) ≥ Case 2. If πF (ψ) is anisotropic, then it is also a divisor of (ϕF (ψ) )an by [Hof04, Prop. 4.19]. Since d(ϕF (ψ) ) = dim(ϕ) − 2i0 (ϕF (ψ) )  = 2dim (ϕF (ψ) )an − dim(ϕ), (recall that dim(ηan ) = dim(η)−i0 (η) in the quasilinear setting) the claim again holds.  Our goal now is to prove Lemma 3.8 below. We first make two simple observations: Lemma 3.6. Let σ, τ and φ be quasilinear quadratic forms over F such that σ ⊂ τ ⊂ ϕ. Let a = dim(τ ) − dim(σ) and b = dim(ϕ) − dim(τ ). Then (1) d(σ) ≤ d(τ ) + a, and (2) d(ϕ) ≤ d(τ ) + b. Proof. (1) Since σ is a codimension-a subform of τ , i0 (σ) ≥ i0 (τ )−a (intersect the subspace of all isotropic vectors in Vτ with the image of Vσ under the embedding σ ⊂ τ ). Thus: d(σ) = = ≤ = = dim(σ) − 2i0 (σ) dim(τ ) − a − 2i0 (σ) dim(τ ) − a − 2(i0 (τ ) − a)  dim(τ ) − 2i0 (τ ) + a d(τ ) + a. (2) Since τ is a subform of ϕ, we obviously have i0 (ϕ) ≥ i0 (τ ). Hence d(ϕ) = = ≤ = = dim(ϕ) − 2i0 (ϕ) dim(τ ) + b − 2i0 (ϕ) dim(τ ) + b − 2(i0 (τ ))  dim(τ ) − 2i0 (τ ) + b d(τ ) + b, as claimed.  Lemma 3.7. Let σ and ν be anisotropic quasilinear quadratic forms over F and let ϕ = (σ ⊗ ν)an . (1) If a ∈ D(σ) is non-zero, then aν ⊂ ϕ. (2) If b ∈ D(ν) is non-zero, then bσ ⊂ ϕ. Proof. By symmetry, it suffices to prove (1). But if a is a non-zero element of D(σ), then D(aν) = aD(ν) ⊂ D(σ ⊗ ν) = D(ϕ), so the claim follows from Proposition 2.1.  8 STEPHEN SCULLY We can now prove the following: Lemma 3.8. Let σ and ν be anisotropic quasilinear quadratic forms over F with dim(ν) ≥ 2, let ϕ = (σ ⊗ ν)an and let l = dim(ϕ) − dim(σ). Then l ≥ 0, and there exists an integer 0 ≤ i ≤ l such that (1) d(σF (ν) ) ≤ i, and (2) d(ϕF (ν) ) ≤ l − i. Proof. Multiplying ν by a scalar if necessary, we can assume that 1 ∈ D(ν). We can then write ν ≃ h1, a1 , . . . , an i for some a1 , . . . , an ∈ F . Let X = (X1 , . . . , Xn ) be an pn-tuple of algebraically independent variables over F , and set K = F (X) and L = K( ν ′ (X)), where ν ′ (X) = a1 X12 + · · · + an Xn2 . The field L is F -isomorphic to the function field F [ν] of the affine quadric defined by the vanishing of ν (see §2.F above). Now, since 1 ∈ D(ν), we have σ ⊂ ϕ by Lemma 3.7 (2). In particular, we have l ≥ 0. We now claim that there exists a form τ over K such that σK ⊂ τ ⊂ ϕK and d(τL ) = 0. If true, this implies (via Lemma 3.6) that (1’) d(σL ) ≤ i, and (2’) d(ϕL ) ≤ l − i for some 0 ≤ i ≤ l. This is equivalent to the assertion of the lemma, since (a) L is F isomorphic to F [ν], (b) F [ν] is F -isomorphic to a degree-1 purely transcendental extension of F (ν), and (c) d(−) is invariant under purely transcendental base change (Lemma 3.4). It thus remains to prove the existence of the form τ . Let σK ⊂ τ ⊂ ϕK . By definition, ) we have d(τL ) = 0 if and only if i0 (τL ) = dim(τ 2 . Now τ is anisotropic (because ϕK is), p and we have L = K( ν ′ (X)). Thus, by Proposition 2.3, our task is to show that τ can be chosen so that ν ′ (X)D(τ ) ⊂ D(τ ). We do this as follows: Consider the set S of all subforms η of ϕK which contain σK as a subform and which have the property that ν ′ (X)D(η) ⊂ D(ϕK ). This set is non-empty, since it contains σK by the definition of ϕ. We take τ to be an element of maximal dimension in S. It now remains to show that ν ′ (X)D(τ ) ⊂ D(τ ) for this choice of τ . Suppose, for the sake of contradiction, that this is not the case. Then there exists a ∈ D(τ ) such that ν ′ (X)a ∈ / D(τ ). Let τ ′ = τ ⊥ hν ′ (X)ai. ′ We will show that τ ∈ S, thus contradicting the maximality of τ . Note first that since ν ′ (X)a ∈ / D(τ ), τ ′ is anisotropic. Moreover, since ν ′ (X)a ∈ D(ϕK ), we have D(τ ′ ) = D(τ ) + K 2 ν ′ (X)a ⊂ D(ϕK ), so that τ ′ ⊂ ϕK by Proposition 2.1. Now τ ′ obviously contains σK as a subform (since τ does), and so the final step is to check that ν ′ (X)D(τ ′ ) ⊂ D(ϕK ). But ν ′ (X)D(τ ′ ) = ν ′ (X)D(τ ) + K 2 ν ′ (X)2 a = ν ′ (X)D(τ ) + K 2 a, and since both ν ′ (X)D(τ ) and K 2 a lie in D(ϕK ) (the former since τ ∈ S, and the latter because a ∈ D(τ )), the claim is proved.  4. A refinement of the main conjecture in the quasilinear case The quasilinear case of Conjecture 1.1 is known to hold in the extreme case where k = 0. In fact, rather more is true in this situation. Recall from §2.D above that to any anisotropic quasilinear quadratic form p over F , we can associate an anisotropic quasiPfister form pnor  which contains a subform similar to p. We write lndeg(p) for the integer log2 dim(pnor ) . The following result is due (independently) to Hoffmann and Laghribi: QUASILINEAR QUADRATIC FORMS AND FUNCTION FIELDS OF QUADRICS 9 Proposition 4.1 (see [Lag04, Thm. 1.5], [Hof04, Thm. 7.7]). Let p and q be anisotropic quasilinear quadratic forms of dimension ≥ 2 over F . If i0 (qF (p) ) = dim(q) 2 , then q is divisible by pnor . In particular dim(q) is divisible by 2lndeg(p) . If s is the unique non-negative integer such that 2s < dim(p) ≤ 2s+1 , then lndeg(p) ≥ s+1, with equality holding if and only if p is a quasi-Pfister neighbour (Lemma 2.2 above). The integer lndeg(p) thus measures how far p is from being a quasi-Pfister neighbour. If p is “generic”, for example, lndeg(p) takes its largest possible value of dim(p) − 1: Example 4.2. Consider the form p = hX0 , X1 , . . . , Xn i over the rational function field F (X0 , X1 , . . . , Xn ). Then lndeg(p) = n. Indeed, pnor is isomorphic to the (evidently anisotropic) quasi-Pfister form hhX0 X1 , X0 X2 , . . . , X0 Xn ii in this case. Motivated by Proposition 4.1, we consider the following modification of our problem: Problem 4.3. Let p and q be anisotropic quasilinear quadratic forms of dimension ≥ 2 over F , and let k = dim(q) − 2i0 (qF (p) ). Is is true that dim(q) = a2lndeg(p) + ǫ for some non-negative integer a and integer −k ≤ ǫ ≤ k? In view of the above discussion, a positive answer to this problem for the pair (p, q) immediately implies that Conjecture 1.1 holds for the same pair of forms. Unlike Conjecture 1.1, however, one can only expect a positive answer to Problem 4.3 in certain situations. This is already clear from consideration of the case where q = p: Lemma 4.4. The q = p case of Problem 4.3 has a positive answer if and only if p is a quasi-Pfister neighbour. Proof. Suppose first that dim(p) = a2lndeg(p) + ǫ for integers a ≥ 0 and −k ≤ ǫ ≤ k. Since q = p, we have k = dim(p) − 2i1 (p) < dim(p). This implies that a ≥ 1, so that dim(p) ≥ 2lndeg(p) − k > 2lndeg(p) − dim(p). In other words, we have dim(p) > 2lndeg(p)−1 . By Lemma 2.2, this is exactly what it means for p to be a quasi-Pfister neighbour. Conversely, if p is a quasi-Pfister neighbour, then p has maximal splitting (see §2.G above). The reader will readily observe that this simply means that dim(p) = 2lndeg(p) − k.  Nevertheless, we can still hope for a positive answer in many interesting cases. In particular, our main result (Theorem 5.7) is that if 2s < dim(p) ≤ 2s−1 , then Problem 4.3 has a positive answer as long as k ≤ 2s−1 . Taking Lemma 4.4 into account, we might expect that this can be improved to k < 2s−1 + 2s−2 (but not further3) An improvement which takes into account the precise value of dim(p) is given in Theorem 6.1 below. We now give an example which shows that, in the quasilinear case, the statement of Conjecture 1.1 is in some sense optimal. We work here with the norm degree invariant to indicate that the same applies to all our results in the direction of Problem 4.3. 3When q = p, the inequality k < 2s−1 + 2s−2 implies that p is a Pfister neighbour (Theorem 2.5). This need not hold, however, if k = 2s−1 + 2s−2 ; see [Hof04, Ex. 7.31]. 10 STEPHEN SCULLY Example 4.5. Let p be an anisotropic quasilinear quadratic form of dimension ≥ 2 over a field E of characteristic 2. Let ϕ be the anisotropic part of pnor over E(p). By [Hof04, Cor. 4.10 and Cor. 7.9], ϕ is a quasi-Pfister form of dimension 2lndeg(p)−1 . Moreover, there exists a subform τ ⊂ pnor such that ϕ ≃ τE(p) by [Hof04, Lemma 5.1]. Choose a non-negative integer a, a non-negative integer k < 2lndeg(p) and let ǫ = k − 2l for some integer 0 ≤ l ≤ k/2. Note that we have ǫ + l ≥ 0. Let X = (X1 , . . . , Xa+ǫ+l ) be an (a + ǫ + l)-tuple of algebraically independent variables over E and let F = E(X). Let σ be a codimension-l subform of pnor which contains τ , and consider q = (pnor )F ⊗ hX1 , . . . , Xa−1 i ⊥ Xa σF ⊥ hXa+1 , . . . , Xa+ǫ+l i. Since F/E is a purely transcendental extension, (pnor )F is anisotropic. It is then clear that q is also anisotropic. Note that we have dim(q) = a2lndeg(p) + ǫ. We claim that dim(q) − 2i0 (qF (p) ) = k (here we write F (p) for F (pF )). Recall that ϕ denotes the anisotropic part of (pnor )E(p) . By construction, ϕ is also the anisotropic part of σE(p) . Indeed, since τ ⊂ σ ⊂ pnor , Proposition 2.1 implies that ϕ ≃ τE(p) ⊂ (σE(p) )an ⊂ (pnor E(p) )an = ϕ, whence the claim. Now, the form η = (ϕF (p) ⊗ hX1 , . . . , Xa i) ⊥ hXa+1 , . . . , Xa+ǫ+l i is obviously anisotropic, and is therefore equal to (qF (p) )an by the preceding discussion. In particular, we have dim(q) − 2i0 (qF (p) ) = 2dim(η) − dim(q) = 2(a2lndeg(p)−1 + ǫ + l) − (a2lndeg(p) + ǫ) = ǫ + 2l = k, as desired. Observe now that because F is a purely transcendental extension of E, replacing p by pF neither changes lndeg(p) nor the fact that p is anisotropic ([Hof04, Prop. 5.3]). Moreover, the initial pair (E, p) can be chosen so that lndeg(p) takes any prescribed  value ≥ log2 dim(p) . The example therefore shows that as far as the quasilinear case of Conjecture 1.1 is concerned, the integers i0 (qF (p) ) and dim(p) cannot by themselves determine any further gaps in the possible values of dim(q). In what follows, we will mainly consider the statement formulated in Problem 4.3, as opposed to the statement of Conjecture 1.1. Before proceeding to the proofs of our main results, it will be useful to record the following trivial reformulation of the former: Lemma 4.6. Problem 4.3 admits a positive answer if and only if there exists a nonnegative integer a such that i0 (qF (p) ) ≤ a2lndeg(p)−1 ≤ dim(q) − i0 (qF (p) ). Proof. For any integer a, we have −k ≤ dim(q) − a2ndeg(p) ≤ k ⇔ −dim(q) + 2i0 (qF (p) ) ≤ dim(q) − a2ndeg(p) ≤ dim(q) − 2i0 (qF (p) ) ⇔ 2i0 (qF (p) ) ≤ 2(dim(q) − a2ndeg(p)−1 ) ≤ 2(dim(q) − i0 (qF (p) )) ⇔ i0 (qF (p) ) ≤ a2lndeg(p)−1 ≤ dim(q) − i0 (qF (p) ), whence the claim.  QUASILINEAR QUADRATIC FORMS AND FUNCTION FIELDS OF QUADRICS 11 Remarks 4.7. (1) By Lemma 2.6, the integer lndeg(p) − 1 appearing as the exponent of the 2-power here is equal to lndeg(p1 ). We will use this fact in the sequel. (2) It follows from [Hof04, Prop. 5.3] that the answer to Problem 4.3 is invariant under replacing F with a separably generated (e.g., purely transcendental) extension of itself. 5. Main results We are now ready to prove our main results towards the quasilinear case of Conjecture 1.1. Our approach rests on the following key result from [Scu16c]: Theorem 5.1 ([Scu16c, Thm. 6.6]). Let ψ and ϕ be anisotropic quasilinear quadratic forms of dimension ≥ 2 over F such that ϕF (ψ) is isotropic. Then, after possibly replacing F with a purely transcendental extension of itself F , there exists an anisotropic quasilinear quadratic form τ over F such that (τ ⊗ ψ1 )an ⊂ (ϕF (ψ) )an and dim(τ ) ≥ i0 (ϕF (ψ) ). As shown in [Scu16c, §6], Theorem 5.1 has many applications in the theory of quasilinear quadratic forms. The present article represents another demonstration of its range. First, we observe that it immediately implies the following: Proposition 5.2. Problem 4.3 has a positive answer if p is a quasi-Pfister neighbour. In particular, the quasilinear case of Conjecture 1.1 holds when p is a quasi-Pfister neighbour. Proof. Let s be the unique non-negative integer such that 2s < dim(p) ≤ 2s+1 . Since p is a quasi-Pfister neighbour, we have lndeg(ϕ) = s + 1. If qF (p) is anisotropic then conjecture holds trivially, so let us suppose otherwise. By Theorem 5.1 and Remark 4.7 (2), we may then assume that there exists an anisotropic form τ over F (p) such that dim(τ ) = i0 (qF (p) ) and (τ ⊗ p1 )an ⊂ (qF (p) )an . On the other hand, τ is similar to a subform of (τ ⊗ p1 )an by Lemma 3.7 (2). We therefore have inequalities   dim(τ ) ≤ dim (τ ⊗ p1 )an ≤ dim (qF (p) )an , or, in other words,  i0 (qF (p) ) ≤ dim (τ ⊗ p1 )an ≤ dim(q) − i0 (qF (p) ). Now, since p is a quasi-Pfister neighbour, p1 is similar to an s-fold Pfister form (Lemma 2.4 above). By [Hof04, Prop. 4.19], it follows that (τ ⊗ p1 )an is divisible by p1 . In particular,  dim (τ ⊗ p1 )an is divisible by 2s . Thus, by the preceding discussion, there exists a positive integer a such that i0 (qF (p) ) ≤ a2s ≤ dim(q) − i0 (qF (p) ). By Lemma 4.6 and the fact that lndeg(p) = s + 1, this is exactly what we wanted.  Now, while the general case seems to be more complicated, Theorem 5.1 at least permits us to set up an inductive approach to Problem 4.3. The basic step is the following lemma: Lemma 5.3. Let ψ be an anisotropic quasilinear quadratic form of dimension ≥ 2 over a field L of characteristic 2, let 0 < m < 2lndeg(ψ)−2 , and let m′ be the largest integer strictly less than m which is divisible by 2d1 (ψ) . If Problem 4.3 has a positive answer when F = L(ψ), p = ψ1 and k ≤ m′ , then it also has a positive answer when F = L, p = ψ and k ≤ m. Remark 5.4. We remind the reader that d1 (ψ) denotes the largest integer r such that ψ1 is divisible by an anisotropic r-fold quasi-Pfister form (see §2.H above). 12 STEPHEN SCULLY Proof. To simplify the notation, let L1 = L(ψ). We make the stated assumption regarding Problem 4.3 in the case where F = L1 and p = ψ1 . Let q be an anisotropic quasilinear quadratic form of dimension ≥ 2 over L such that k = d(qL1 ) ≤ m. Our aim is to show that dim(q) = a2lndeg(p) +ǫ for some integers a ≥ 0 and −k ≤ ǫ ≤ k. In view of Proposition 4.1, we can assume that k > 0. If qL1 is anisotropic, then the statement holds trivially. If not, then Theorem 5.1 and Remark 4.7 (2) allow us to assume that there exists an anisotropic form τ over L1 such that dim(τ ) = i0 (qL1 ) and (τ ⊗ ψ1 )an ⊂ (qL1 )an . Now, by Lemma 4.6 and Remark 4.7 (1), proving our assertion amounts to showing that i0 (qL1 ) ≤ a2lndeg(ψ1 ) ≤ dim(q) − i0 (qL1 ) for some non-negative integer a, or, equivalently, that dim(τ ) ≤ a2lndeg(ψ1 ) ≤ dim((qL1 )an ) (5.1) for some non-negative integer a. We will work with the latter formulation. Let ϕ = (τ ⊗ ψ1 )an and let l = dim(ϕ) − dim(τ ). By Lemma 3.8, we have that (1) d(τL1 (ψ1 ) ) ≤ i, and (2) d(ϕL1 (ψ1 ) ) ≤ l − i for some integer 0 ≤ i ≤ l (recall here that l ≥ 0 because τ is similar to a subform of ϕ). We now have three cases to consider: Case 1. If i = 0, then Proposition 4.1 tells us that dim(τ ) is divisible by 2lndeg(ψ1 ) . Thus, (5.1) certainly holds for some positive integer a in this case. Case 2. If i = l, then Proposition 4.1 tells us that dim(ϕ) is divisible by 2lndeg(ψ1 ) . Since dim(τ ) ≤ dim(ϕ) ≤ dim((qL1 )an ), (5.1) also holds for some positive integer a in this case. Case 3. Suppose now that 0 < i < l. We claim that d(τL1 (ψ1 ) ) and d(ϕL1 (ψ1 ) ) are both ≤ m′ (recall that m′ is the largest integer < m which is divisible by 2d1 (ψ) ). First, we have l = ≤ = = dim(ϕ) − dim(τ ) dim((qL1 )an ) − i0 (qL1 ) dim(q) − 2i0 (qL1 ) k In particular, since i > 0, we have that d(ϕL1 (ψ1 ) ) < l ≤ k ≤ m. On the other hand d(ϕL1 (ψ1 ) ) is divisible by 2d0 (ϕ) by Lemma 3.5. Since d0 (ϕ) ≥ d0 (ψ1 ) = d1 (ψ) (Lemma 2.7), we conclude that d(ϕL1 (ψ1 ) ) is divisible by 2d1 (ψ) , and is therefore ≤ m′ . This argument also proves the claim about d(τL1 (ψ1 ) ) = i. Indeed, if i > m′ , then l − i < 2d1 (ψ) by the definition of m′ and the fact that l ≤ m. Since d(ϕL1 (ψ1 ) ) = l − i is divisible by 2d1 (ψ) , this implies that l − i = 0, contradicting our assumption. Now, since d(τL1 (ψ1 ) ) and d(ϕL1 (ψ1 ) ) are both ≤ m′ , we can invoke our initial hypothesis to get that dim(τ ) = b2lndeg(ψ1 ) + ǫ1 and dim(ϕ) = c2lndeg(ψ1 ) + ǫ2 QUASILINEAR QUADRATIC FORMS AND FUNCTION FIELDS OF QUADRICS 13 for some non-negative integers b, c and some integers −i ≤ ǫ1 ≤ i and i − l ≤ ǫ2 ≤ l − i. If ǫ1 ≤ 0, then dim(τ ) ≤ ≤ ≤ = ≤ b2lndeg(ψ1 ) dim(τ ) + i dim(τ ) + l dim(ϕ) dim((qL1 )an ), and so (5.1) holds with a = b. Similarly, if ǫ2 ≥ 0, then one immediately checks that (5.1) holds with a = c. Finally, suppose that ǫ1 > 0 and ǫ2 < 0. Since dim(ϕ) ≥ dim(τ ), we then have that c > b. In particular, 2lndeg(ψ1 ) ≤ (c − b)2lndeg(ψ1 )  = dim(ϕ) − dim(τ ) + (ǫ1 − ǫ2 )  ≤ l + i + (l − i) = 2l. This is impossible, however. Indeed, we noted above that l ≤ m, and since m < 2lndeg(ψ)−2 , we have (using Lemma 2.6) that 2l < 2lndeg(ψ)−1 = 2lndeg(ψ1 ) . We conclude that this case cannot occur, and so the lemma is proved.  Recall from [Scu16b, §2.K] that the quasi-Pfister height of a quasilinear quadratic form ϕ is defined as the smallest non-negative integer hqp (ϕ) such that ϕhqp (ϕ) is similar to a quasi-Pfister form. The previous lemma now implies: Proposition 5.5. Problem 4.3 has a positive answer in the case where k < dim(phqp (p) ). Proof. Let r = hqp (p). We argue by induction on r. If r ≤ 1, then p is a quasi-Pfister neighbour (Lemma 2.4) and the statement holds by Proposition 5.2. Assume now that r ≥ 2. Then lndeg(p) ≥ lndeg(pr ) + 2 by Lemma 2.6. In particular, since pr is a quasiPfister form, we have k < dim(pr ) = 2lndeg(pr ) ≤ 2lndeg(p)−2 . In particular, by applying Lemma 5.3 in the case where L = F and ψ = p, we can achieve a reduction in r without changing the assumption on k (the exchange p → p1 does not change dim(phqp (p) )). The result follows.  The idea now is to examine Problem 4.3 by repeatedly applying Lemma 5.3 over the Knebusch splitting tower of p. In order to get something concrete out of this, however, we require some non-trivial information concerning the possible evolution of p as we pass over this tower. Fortunately, such information is available in the form of Theorems 2.5 and 2.8, and this leads us to the following observation: Proposition 5.6. Let s be a positive integer and let 0 ≤ m < 2s . Suppose that Problem 4.3 has a positive answer whenever k < m. Then it also has a positive answer in the situation where 2s < dim(p) ≤ 2s+1 and k ≤ min(m + dim(p) − 2s − 2s−2 , 2s − 1). Proof. Suppose that 2s < dim(p) ≤ 2s+1 and let k ≤ min(m + dim(p) − 2s − 2s−2 , 2s − 1). By the discussion in §2.G, there exists an integer 0 < r < h(p) such that dim(pr ) = 2s . If pr is a quasi-Pfister form, then dim(phqp (p) ) ≥ 2s . Since k < 2s , the statement follows 14 STEPHEN SCULLY from Proposition 5.5 in this case. Suppose now that pr is not a quasi-Pfister form. Then lndeg(pr ) ≥ s + 1. In particular, if 0 ≤ i < r, then we have 2lndeg(pi )−2 ≥ 2s+2−2 = 2s > k (see Lemma 2.6). Thus, repeatedly applying Lemma 5.3 over the Knebusch splitting tower (Fi ) of p (specifically, consider the sequence (F, p) → (F1 , p1 ) → (F2 , p2 ) → · · · → (Fr−1 , pr−1 )), there exists a descending sequence of integers m1 > m2 > · · · > mr such that (1) m1 < k. (2) For each 1 ≤ i ≤ r, mi is divisible by 2di (p) . (3) If Problem 4.3 has a positive answer for the triple (Fr , pr , mr ), then it also has a positive answer for the triple (F, p, k). In view of our initial hypothesis, it now only remains to show that mr < m. Note first that dj+1 (p) ≥ dj (p) for each 1 ≤ j < r (see Theorem 2.8). In particular, (2) implies that, for each such j, mj − mj−1 is a positive integer divisible by 2dj (p) . Together with (1), we therefore have r−1 r−1 X X 2dj (p) . (mj − mj+1 ) < k − mr = m1 − j=1 We now invoke Theorem 2.8 (1), which tells us that particular, we have mr < k − r−1 X j=1 2dj (p) ≥ ij (p) for all j < r. In ij (p) j=1  = k − dim(p) − dim(pr−1 ) ≤ m + dim(p) − 2s − 2s−2 − dim(p) + dim(pr−1 ) = m + dim(pr−1 ) − 2s − 2s−2 Thus, to complete the proof, it suffices to show that dim(pr−1 ) ≤ 2s + 2s−2 . To see that this is indeed true, note first that pr−1 has maximal splitting (see §2.G above) by the very definition of r. On the other hand, since pr is not similar to a quasi-Pfister form, pr−1 is not a quasi-Pfister neighbour by Lemma 2.4. The needed conclusion therefore follows from Theorem 2.5.  An easy induction now yields our main result: Theorem 5.7. Let p and q be anisotropic quasilinear quadratic forms of dimension ≥ 2 over F , let s be the unique non-negative integer such that 2s < dim(p) ≤ 2s+1 , and let k = dim(q) − 2i0 (qF (p) ). If k ≤ 2s−1 , then dim(q) = a2lndeg(p) + ǫ for some non-negative integer a and integer −k ≤ ǫ ≤ k. In particular, the quasilinear case of Conjecture 1.1 holds when k ≤ 2s−1 . Proof. We argue by induction on dim(p). If dim(p) ≤ 2, then the statement holds by Proposition 4.1. Assume now that dim(p) ≥ 3. If lndeg(p) = s + 1, then p is a quasiPfister neighbour (Lemma 2.2) and we can invoke Proposition 5.2. We can therefore assume that lndeg(p) ≥ s + 2 (again, see Lemma 2.2). In particular, we have k ≤ 2s−1 < 2lndeg(p)−2 . QUASILINEAR QUADRATIC FORMS AND FUNCTION FIELDS OF QUADRICS 15 Thus, by Lemma 5.3, it suffices to prove the following: If ϕ is an anisotropic quasilinear quadratic form over L = F (p), and k′ = dim(ϕ) − 2i0 (ϕL(p1 ) ) < 2s−1 , then dim(ϕ) = b2lndeg(p1 ) + ǫ′ for some non-negative integer b and some integer −k′ ≤ ǫ′ ≤ k′ . Now, by the discussion of §2.G, we have dim(p1 ) ≥ 2s . If this inequality is strict, then we are done by the induction hypothesis. If dim(p1 ) = 2s , the induction hypothesis at least tells us that the claim holds when k′ ≤ 2s−2 . But, by Proposition 5.6, the claim then holds when k′ ≤ min(2s−2 + 1 + dim(p) − 2s−1 − 2s−3 , 2s−1 − 1) = min(2s−2 + 1 + dim(2s ) − 2s−1 − 2s−3 , 2s−1 − 1) = min(2s−1 + 2s−3 + 1, 2s−1 − 1) = 2s−1 − 1, and so the theorem is proved.  Feeding this back into Proposition 5.6 now gives the following additional result in the direction of our conjecture: Corollary 5.8. Let p and q be anisotropic quasilinear quadratic forms of dimension ≥ 2 over F , let s be the unique non-negative integer such that 2s < dim(p) ≤ 2s+1 , and let k = dim(q) − 2i0 (qF (p) ). If k ≤ min(dim(p) − 2s−1 − 2s−2 + 1, 2s − 1), then dim(q) = a2lndeg(p) + ǫ for some non-negative integer a and integer −k ≤ ǫ ≤ k. In particular, the quasilinear case of Conjecture 1.1 holds when k ≤ min(dim(p) − 2s−1 − 2s−2 + 1, 2s − 1). Proof. By Theorem 5.7, the result holds if k < 2s−1 + 1. Since 2s−1 + 1 + dim(p) − 2s − 2s−2 = dim(p) − 2s−1 − 2s−2 + 1, the claim now follows from Proposition 5.6.  In particular, we get that the quasilinear case of Conjecture 1.1 holds when dim(p) is close enough to 2s+1 : Corollary 5.9. The quasilinear case of Conjecture 1.1 holds when 2s+1 − 2s−2 − 3 ≤ dim(p) ≤ 2s+1 . Proof. It is enough to show that the statement of the conjecture holds when k ≤ 2s − 2 (Remark 1.2 (2)). But if dim(p) ≥ 2s+1 − 2s−2 − 3, then dim(p) − 2s−2 − 2s−2 + 1 ≥ 2s − 2, and since lndeg(p) ≥ s + 1, the claim follows from Corollary 5.8.  Corollary 5.10. The quasilinear case of Conjecture 1.1 holds when dim(p) ≤ 8. Proof. The dimension condition of the previous corollary clearly holds if s ≤ 3.  6. Beyond the main result The quasilinear case of Conjecture 1.1 remains open in the situation where 2s−1 < k < Corollaries 5.8, 5.9 and 5.10 give some partial results in this direction. In this last section, we show that one can eliminate infinitely bad values of dim(q) without imposing any assumption on k. More precisely, we prove the following: 2s . 16 STEPHEN SCULLY Theorem 6.1. The quasilinear case of Conjecture 1.1 holds if 2N ≤ dim(q) ≤ 2N + 2s+1 for some positive integer N . The proof is similar to that of Theorem 5.7, but we will now also use the fact that Conjecture 1.1 is known to be true when dim(q) ≤ 2s . In other words, we will use (the quasilinear case of) the Separation Theorem ([Hof95],[HL06]). The following lemma is a trivial extension of the latter result: Lemma 6.2. Let p and q be anisotropic quasilinear quadratic forms over dimension ≥ 2 over F and let s be the unique non-negative integer such that 2s < dim(p) ≤ 2s+1 . Then i0 (qF (p) ) ≤ max(0, dim(q) − 2s ). Proof. Let r = max(0, dim(q) − 2s ) and let ϕ be a codimension r subform of q. To prove the lemma, it suffices to show that ϕF (p) is anisotropic (see Lemma 3.6 (1) above). But dim(ϕ) ≤ 2s < dim(p), so this holds by the Separation Theorem ([HL06, Thm. 1.1]).  As a consequence, we have: Lemma 6.3. The quasilinear case of Conjecture 1.1 holds if dim(q) ≤ 2s+1 + k. Proof. It suffices to consider the case where dim(q) < 2s+1 − k. In this case, however, we have 1 (dim(q) − k) i0 (qF (p) ) = 2  1 > 2dim(q) − 2s+1 2 = dim(q) − 2s , so that i0 (qF (p) ) = 0 by Lemma 6.2. Since the statement of the conjecture holds vacuously in this case, the lemma is proved.  We also need the following fact which follows from standard specialization arguments: Lemma 6.4. To prove Conjecture 1.1, it suffices to treat the case where dim(p) = 2s + 1. Proof. Let σ ⊂ p be a subform of dimension 2s + 1. We claim that the substitution p → σ does not increase the value of k. In other words, we claim that i0 (qF (σ) ) ≥ i0 (qF (p) ). By [Scu16a, Lem. 3.4], it suffices to show that there exists an F -place from F (p) to F (σ). Let Xσ and Xp be the projective quadrics defined by σ and p, respectively. The inclusion σ ⊂ p gives a regular embedding Xσ ֒→ Xp . The quadric Xp is then regular at the generic point of Xσ . The existence of the desired F -place then follows from [Scu16a, Lem. A.4].  We are now ready to give the proof of Theorem 6.1; Proof of Theorem 6.1. By Lemmas 6.4 and 6.3, we can assume that (1) dim(p) = 2s + 1, and (2) dim(q) > 2s+1 + k. By (2), we then have that N ≥ s + 1. If dim(q) ≤ 2N + k, there is nothing to prove, so suppose now that 2N + k < dim(q) ≤ 2N + 2s+1 . By Lemma 3.2 and the definition of k, we then have that 2s ≤ 2N −1 < i0 (qF (p) ) ≤ 2N −1 + 2s . QUASILINEAR QUADRATIC FORMS AND FUNCTION FIELDS OF QUADRICS 17 In particular, qF (p) is isotropic. Thus, by Theorem 5.1 and Remark 4.7 (2), we can assume that there exists an anisotropic form τ over F (p) such that dim(τ ) = i0 (qF (p) ) and (τ ⊗ p1 )an ⊂ (qF (p))an . Let ϕ = (τ ⊗ p1 )an . As in the proof of Lemma 5.3, we then have i0 (qF (p) ) ≤ dim(ϕ) ≤ dim(q) − i0 (qF (p) ). Since i0 (qF (p) ) ≤ 2N −1 + 2s , it follows from Lemma 4.6 that it will be sufficient to show that dim(ϕ) ≥ 2N −1 +2s . Similar to the arguments of §5, the main point is to observe that ϕ becomes isotropic to a considerable extent over the function field of τ . More precisely, let L = F (p)(τ ). As dim(p) = 2s +1, we have dim(p1 ) = 2s . Since dim(τ ) = i0 (qF (p) ) > 2s , the Separation Theorem (see Lemma 6.2 above) implies that p1 remains anisotropic over L. In particular, d (p1 )L = 2s . By Lemma 3.8, we therefore have that d(ϕL ) ≤ dim(ϕ) − 2s − 2s = dim(ϕ) − 2s+1 . Rearranging, we get 1 (dim(ϕ) − d(ϕL )) 2 1 s+1 (2 ) ≥ 2 = 2s . i0 (ϕL ) = Now, since dim(q) > 2N + k, we have dim(τ ) = i0 (qF (p) ) = 1 1 (dim(q) − k) > (2N ) = 2N −1 . 2 2 By Lemma 6.2, it follows that i0 (ϕL ) ≤ max(0, dim(ϕ) − 2N −1 ). Since i0 (ϕL ) ≥ 2s , this implies that dim(ϕ) ≥ 2N −1 + 2s , as desired.  Corollary 6.5. The quasilinear case of Conjecture 1.1 is true when dim(q) ≤ 2s+2 + 2s+1 . Proof. In this range, we can write dim(q) = 2N + a for some non-negative integer N and some integer a ≤ 2s+1 .  Acknowledgements. The author gratefully acknowledges the support of a PIMS postdoctoral fellowship and NSERC discovery grant during the period in which this research was carried out. References [EKM08] R. Elman, N. Karpenko, and A. Merkurjev. The algebraic and geometric theory of quadratic forms. AMS Colloquium Publications 56, American Mathematical Society, 2008. [Hof95] D.W. Hoffmann. Isotropy of quadratic forms over the function field of a quadric. Math. Z. 220 (1995), no. 3, 461–476. , Diagonal forms of degree p in characteristic p, Algebraic and arith[Hof04] metic theory of quadratic forms, Contemp. Math., 344, Amer. Math. Soc., 2004, pp. 135–183. [HL04] D.W. Hoffmann and A. Laghribi. Quadratic forms and Pfister neighbors in characteristic 2. Trans. Amer. Math. Soc., 356 (2004), no. 10, 4019–4053. [HL06] D.W. Hoffmann and A. Laghribi. Isotropy of quadratic forms over the function field of a quadric in characteristic 2. J. Algebra, 295 (2006), no. 2, 362–386. 18 STEPHEN SCULLY [Kah08] Bruno Kahn. Formes quadratiques sur un corps. Cours Spécialisés, 15. Société Mathématique de France, Paris, 2008. [Kar03] N.A. Karpenko. On the first Witt index of quadratic forms. Invent. Math., 153 (2003), no.2, 455–462. [Lag04] A. Laghribi. Quasi-hyperbolicity of totally singular quadratic forms. Algebraic and arithmetic theory of quadratic forms, 237–248, Contemp. Math., 344, Amer. Math. Soc., 2004. [Scu16a] S. Scully. On the splitting of quasilinear p-forms. J. Reine Angew. Math., 713 (2016), 49–83. [Scu16b] S. Scully, Hoffmann’s conjecture for totally singular forms of prime degree, Algebra Number Theory 10 (2016), no. 5, 1091–1132. [Scu16c] S. Scully. A bound for the index of a quadratic form after scalar extension to the function field of a quadric. Preprint, 2016, arXiv:1607.07529v1. [Scu17] S. Scully. Hyperbolicity and near hyperbolicity of quadratic forms over function fields of quadrics. Preprint, 2017, arXiv:1609.07100v2. [Tot08] B. Totaro. Birational geometry of quadrics in characteristic 2. J. Algebraic Geom., 17 (2008), no. 3, 577–597. Department of Mathematical and Statistical Sciences, University of Alberta, Edmonton AB T6G 2G1, Canada E-mail address: [email protected]
0math.AC
Predicting Runtime Distributions using Deep Neural Networks Katharina Eggensperger and Marius Lindauer and Frank Hutter arXiv:1709.07615v2 [cs.AI] 24 Oct 2017 University of Freiburg {eggenspk, lindauer, fh}@cs.uni-freiburg.de Abstract Many state-of-the-art algorithms for solving hard combinatorial problems include elements of stochasticity that lead to high variations in runtime, even for a fixed problem instance, across runs with different pseudo-random number seeds. Knowledge about the runtime distributions (RTDs) of algorithms on given problem instances can be exploited in various meta-algorithmic procedures, such as algorithm selection, portfolios, and randomized restarts. Previous work has shown that machine learning can be used to individually predict mean, median and variance of RTDs. To establish a new state-of-the-art in predicting RTDs, we demonstrate that the parameters of an RTD should be learned jointly and that neural networks can do this well by directly optimizing the likelihood of an RTD given runtime observations. In an empirical study involving four algorithms for SAT solving and AI planning, we show that our neural networks predict the true RTDs of unseen instances better than previous methods. As an exemplary application of RTD predictions, we show that our RTD models also yield good predictions of running these algorithms in parallel. Introduction Algorithms for solving hard combinatorial problems often rely on random choices and decisions to improve their performances. For example, randomization helps to escape local optima, enforces stronger exploration and diversifies the search strategy by not only relying on heuristic information. In particular, most local search algorithms are randomized (Hoos and Stützle 2004), but structured search (such as tree-based algorithms) can also benefit from randomization (Gomes et al. 2000). The runtimes of randomized algorithms for hard combinatorial problems are well-known to vary substantially, often by orders of magnitude, even when running the same algorithm multiple times on the same instance (Gomes et al. 2000; Hoos and Stützle 2004; Hurley and O’Sullivan 2015). Hence, the central object of interest in the analysis of a randomized algorithm on an instance is its runtime distribution (RTD), in contrast to a single scalar for deterministic algorithms. Knowing these RTDs is important in many practical applications, such as computing optimal restart strategies (Luby, Sinclair, and Zuckerman 1993), optimal algorithm portfolios (Gomes and Selman 2001) and the speedups obtained by executing multiple independent runs of randomized algorithms (Hoos and Stützle 2004). It is trivial to measure an algorithm’s empirical RTD on an instance by running it many times to completion, but for new instances that one would like to solve, this is of course not practical. Instead, one would like to estimate the RTD for a new instance without running the algorithm on it. There is a rich history in artificial intelligence that shows that the runtime of algorithms for solving hard combinatorial problems can indeed be predicted to a certain degree (Brewer 1995; Roberts and Howe 2007; Fink 1998; Leyton-Brown, Nudelman, and Shoham 2009; Hutter et al. 2014). These runtime predictions have enabled a wide range of meta-algorithmic procedures, such as algorithm selection (Xu et al. 2008), model-based algorithm configuration (Hutter, Hoos, and Leyton-Brown 2011), generating hard benchmarks (Leyton-Brown, Nudelman, and Shoham 2009), gaining insights into instance hardness (Smith-Miles and Lopes 2012) and algorithm performance (Hutter, Hoos, and Leyton-Brown 2013), and creating cheap-to-evaluate surrogate benchmarks (Eggensperger et al. 2017). Given a method for predicting RTDs of randomized algorithms, all of these applications could be extended by an additional dimension. Indeed, predictions of RTDs have already enabled dynamic algorithm portfolios (Gagliolo and Schmidhuber 2006b), adaptive restart strategies (Gagliolo and Schmidhuber 2006a; Haim and Walsh 2009), and predictions of the runtime of parallelized algorithms (Arbelaez, Truchet, and O’Sullivan 2016), and many more applications are possible given effective methods for RTD prediction. To advance the underlying foundation of all these applications, in this paper we focus on better methods for predicting RTDs. Specifically, our contributions are as follows: 1. We propose a principled pipeline to build RTD predictors for new problem instances based on observed runtimes on a set of training instances. 2. We compare different ways of predicting RTDs and demonstrate that neural networks (NN) can jointly predict all parameters of various parametric RTDs, yielding RTD predictions that are superior to those of previous approaches that predict the RTD’s parameters independently. 3. We propose DistNet, a practical NN for predicting RTDs, and discuss the bells and whistles that make it work. 4. To illustrate the use of our NN-based RTD predictions in an application, we demonstrate that they can effectively predict the performance that can be obtained by running multiple independent copies of a randomized algorithm in parallel (Arbelaez, Truchet, and O’Sullivan 2016). Related Work The rich history in predicting algorithm runtimes mentioned in the introduction focuses on predicting mean runtimes, with only a few exceptions. Hutter et al. (2006) predicted the single distribution parameter of an exponential RTD and Arbelaez, Truchet, and O’Sullivan (2016) predicted the two parameters of log-normal and shifted exponential RTDs with independent models. In contrast, we jointly predict multiple RTD parameters (and also show that the resulting predictions are better than those by independent models). The work most closely related to ours is by Gagliolo and Schmidhuber (2005), who proposed to use NNs to learn a distribution of the time left until an algorithm solves a problem based on features describing the algorithm’s current state and the problem to be solved; they used these predictions to dynamically assign time slots to algorithms. In contrast, we use NNs to predict RTDs for unseen problem instances. A final related field of study on predicting distributions uses non-parametric estimators. Very recently, Eggensperger et al. (2017) used quantile regression forests (Meinshausen 2006) as a non-parametric model that enables sampling from predicted runtime distributions. Also very recently, Ambrogioni et al. (2017) showed that NNs can be used as a nonparametric estimator for arbitrary conditional distributions. In contrast to that, we focus on a parametric approach, using NNs to predict distribution parameters for non-Gaussian distributed target values. All existing methods for predicting runtime on unseen instances base their predictions on instance features that numerically characterize problem instances. In particular in the context of algorithm selection, these instance features have been proposed for many domains of hard-combinatorial problems, such as propositional satisfiability (Nudelman et al. 2004), AI planning (Fawcett et al. 2014), mixed integer programming (Xu et al. 2011) and answer set programming (Hoos, Lindauer, and Schaub 2014). To avoid this manual step of feature construction, Loreggia et al. (2016) proposed to directly use the text format of an instance as the input to a neural network to obtain a numerical representation of the instance. Since this approach performed a bit worse than manually constructed features, in this work we use traditional features, but our framework will work with any type of features. A Pipeline for Predicting RTDs The problem we address in this work can be formally described as follows: Problem Statement (Predicting RTDs). Given • a randomized algorithm A • a set of instances Πtrain = {π1 , . . . , πn } • for each instance πj ∈ Πtrain : – m instance features f (πj ) = [f (πj )1 , . . . , f (πj )m ] Distribution Param. Normal (N) µ, σ Lognormal (LOG) s, σ Exponential (EXP) β PDF (x−µ)2 Inverse Gaussian (INV) µ, λ − √ 1 e 2σ2 2πσ 2  log(x)−log(s) 2 1 −2 1 σ √ e σx 2π   x −β 1 e β   λ 2πx3  12 e −λ(x−µ)2 2xµ2 Table 1: Considered RTD families – runtime observations t(πj ) = ht(πj )1 , . . . , t(πj )kj i obtained by executing A on πj with kj different seeds, the goal is to learn a model that can predict A’s RTD well for unseen instances πn+1 with given features f (πn+1 ). Following the typical approach in the literature (Hutter et al. 2006; Arbelaez, Truchet, and O’Sullivan 2016), we address this problem in two steps: 1. Determine a parametric family D of RTDs with parameters θ that fits well across training instances; 2. Fit a machine learning model that, given a new instance and its features, predict D’s parameters θ on that instance. Figure 1 illustrates the pipeline we use for training these RTD predictors and using them on new instances. In the following, we first discuss the various RTD families we considered; explain how we measure the goodness of our RTD fits (i.e., our loss function); and finally discuss different ways of predicting RTDs, including our new approach of jointly learning RTD parameters using NNs. Parametric Families of RTDs We considered a set of 4 parametric continuous probability distributions (shown in Table 1 with exemplary instantiations shown in Figure 2), most of which have been widely studied to describe the RTDs of combinatorial problem solvers (Frost, Rish, and Vila 1997; Gagliolo and Schmidhuber 2006a; Hutter et al. 2006). As a baseline we consider the normal (aka Gaussian) distribution, due to its widespread use throughout in the sciences; assumptions of Gaussian observation noise also underlie many machine learning methods, such as Gaussian processes. Since the runtimes of hard combinatorial solvers often vary on an exponential scale (likely due to the N P-hardness of the problems studied), a much better fit of empirical RTDs is typically achieved by a lognormal distribution; this distribution is attained if the logarithm of the runtimes is Gaussiandistributed and has been shown to fit empirical RTDs well in previous work (Frost, Rish, and Vila 1997). Another popular parametric family from the literature on RTDs is the exponential distribution, which tends to describe the RTDs of many well-behaved stochastic local search algorithms well (Hoos and Stützle 2004). It is the unique family with the property that the probability of finding a solution in the next time interval (conditional on not having found one yet) remains constant over time. This distribution, like the lognormal distribution, can therefore model the relatively long Algorithm A Run A kj times on each πj ∈ Πtrain Training instances πj ∈ Πtrain Compute instance features f (πj ) for each πj ∈ Πtrain Data: hf (πj ), t(πj ){1...kj } i Estimate RTD family D Fit RTD model m̂ : f (π) 7→ θ New instance πn+1 Compute features f (πn+1 ) Use m̂ to predict D’s parameters θ for πn+1 Figure 1: Our pipeline for predicting runtime distributions. Upper part: training; lower part: test. −logLD (θ | t(π)1 , . . . , t(π)k ) = − k X log pD (t(π)i |θ). (2) i=1 Since each instance π ∈ Π results in an RTD, we measure the quality of a parametric family of RTDs for a given instance set by averaging over the negative log-likelihoods of all instances. To obtain comparable likelihoods across the instances, we normalize them by multiplying the likelihoods with the maximal observed runtime of each instance:2 Figure 2: Different RTD families. tails of typical RTDs of randomized combinatorial problem solvers quite well. By empirically studying a variety of alternative parametric families, we also found that an inverse Gaussian distribution (INV) tends to fit RTDs very well.1 Like the lognormal and exponential distribution, this flexible distribution can also model long tails well. By setting its λ parameter close to infinity, it can also be made to resemble a normal distribution. Quantifying the Quality of RTDs To measure how well a parametric distribution D with parameters θ fits our empirical runtime observations t(π) = ht(π)1 , . . . , t(π)k i (the empirical RTD), we use the likelihood of parameters θ given all observations t(π), which is equal to the probability of the observations under distribution D with parameters θ: LD (θ | t(π)1 , . . . , t(π)k ) = k Y pD (t(π)i | θ). (1) i=1 Consequently, when estimating the parameters of a given empirical RTD, we use a maximum-likelihood fit. For numerical reasons, as is common in machine learning, we use the negative log-likelihood as a loss function to be minimized: 1 The name of the inverse Gaussian distribution can be misleading in the sense that it is not the inverse of a Gaussian distribution.   1 X − log LD (θ | t(π)1 , . . . , t(π)k ) · max t(π)i (3) |Π| i∈{1...k} π∈Π ! n 1 X X log pD (t(π)i |θ) + log max t(π)i (4) =− |Π| i∈{1...n} i=1 π∈Π An alternative is to use a goodness of fit statistical test, such as the Kolmogorov-Smirnov (KS) test. The KS-statistic is based on the maximal distance between an empirical distribution and the cumulative distribution function of a reference distribution. To aggregate the test results across instances, we count the number of times for which the KS-test rejected the null-hypothesis that our measured t(π)i are drawn from a reference RTD. Predicting RTDs Having selected a parametric family of distributions, the last part of our pipeline is to fit an RTD predictor to efficiently obtain RTDs for new instances. Formally, the problem is to find a predictive model that maps from instance features f (π) to the parameters θ of the selected RTD family. In the following, we briefly discuss how traditional regression models have been used for this problem, and why this optimizes the wrong loss function. We then show how to obtain better predictions with neural networks and introduce our practical DistNet for this task. 2 When this is not done, easy instances are weighted more heavily: if two RTDs “look” the same but differ in scale by a factor of 10 due to one instance being 10 times harder, the pdf for the easier instance is 10 times larger (in order to still integrate to 1); our normalization removes this bias towards fitting easy instances better. Input Layer Hidden Layer #1 Hidden Layer #n Output Layer θ1πi f (πi )1 ... ... f (πi )m ... θpπi Figure 3: Deep neural network used to model RTDs. Generalizing from Training RTDs A straightforward approach for predicting parametric RTDs based on standard regression models is to fit the RTD’s parameters θ(π) for each training instance π, and to then train a regression model on data points hf (π), θ(π)iπ∈Πtrain that directly maps from instance features to RTD parameters. This approach has been used before based on Gaussian processes (Hutter et al. 2006) and random forests (Arbelaez, Truchet, and O’Sullivan 2016). There are two variants to extend these approaches to the problem of predicting multiple parameters of RTDs governed by p > 1 parameters: (1) fitting p independent regression models, or (2) fitting a multi-output model with p outputs. Since random forests have been shown to perform very well for standard runtime prediction tasks (Hutter et al. 2014; Hurley and O’Sullivan 2015), we experimented with them in variant (1), but also in variant (2), using the multi-output random forest implementation in scikit-learn (Pedregosa et al. 2011) (which learns the mapping jointly by minimizing the errors across the p output variables). However, we note that this multi-output variant, although in principle more powerful than p independent models, does not optimize the loss function from Equation 2 we care about. We also note that both variants require fitting RTDs on each training instance, making the approach inapplicable if we, e.g., only have access to one run for each of a million instances. Now, we show how neural networks can be used to solve both of these problems. Joint Predictions with Neural Networks Neural networks have recently been shown to achieve stateof-the-art performance for many supervised machine learning problems as large data sets became available, e.g., in image classification and segmentation, speech processing and natural language processing. For a thorough introduction, we refer the interested reader to Goodfellow, Bengio, and Courville (2016). Here, we apply NNs to RTD prediction. Background on Neural Networks. NNs can approximate arbitrary functions by defining a mapping y = f (x; W ) where W are the weights to be learnt during training to approximate the function. In this work we use a fully-connected feedforward network, which can be described as an acyclic graph that connects nonlinear transformations g in a chain, from layer to layer. For example, a NN with two hidden layers that predicts y for some input x can be written as:3       y = g out g (2) g (1) xW (1) W (2) W (3) , (5) with W (j) denoting trainable network weights and g (j) (the so-called activation function) being a nonlinear transformation applied to the weighted outputs of the j-th layer. The last activation function, g (out) is special, and in our case is exp(·) to constrain all outputs to be positive. NNs are usually trained with stochastic gradient descent (SGD) methods using backpropagation to effectively obtain gradients of a task-specific loss function for each weight. Neural Networks for predicting RTDs. Figure 3 shows the general architecture of our NNs for the joint prediction of multiple RTD parameters. We have one input neuron for each instance feature f (π)j , and we have one output neuron for each distribution parameter θk . To this end, we assume that we know the best-fitting distribution family from the previous step of our pipeline. In contrast to RFs, we train our networks to directly minimize the negative log-likelihood of the predicted distribution parameters given our observed runtimes. Formally, for a given set of observed runtimes t(π)j and instance features f (π)j , we minimize the following loss function in an end-to-end fashion: J(W ) = − kj X X logLD (θW |f (πj ), t(πj )i ) (6) πj ∈Πtrain i=1 Here, θW denotes the values of the distribution parameters obtained in the output layer given an instantiation W of the NN’s weights. This optimization process, which targets exactly our loss function of interest (Equation 2), allows to effectively predict all p distribution parameters jointly. Since predicted combinations are judged directly by their resulting negative log-likelihood, the optimization process is driven to find combinations that work well together (rather than penalizing distance from a prescribed ground truth as was the case with the random variants (1) and (2) above). This end-to-end optimization process is also more general as it removes the need of fitting an RTD on each training instance and thereby enables using an arbitrary set of algorithm performance data for fitting the model. DistNet: RTD predictions with NNs in practice. Unfortunately, training an accurate NN in practice can be tricky and requires manual attention to many details, including the 3 We ignore bias terms for simplicity of exposition. network architecture, training procedure, and other hyperparameter settings.4 We call the resulting neural network with the following considerations DistNet. To preprocess our runtime data hf (πi ), t(πi ){1...k} i, we performed the following steps: 1. We removed all (close to be) constant features. 2. For each instance feature type, we imputed missing values (e.g., because of resource limitations during feature computation) by the median of the known instance features. 3. We normalized each feature f (π)j to mean 0 and standard deviation 1 because the weights of a neural network are typically initialized by random samples from a normal distribution with mean 0 and standard deviation 1. 4. We scaled the observed runtimes in a range of [0, 1] by dividing it by the maximal observed runtime across all instances. This also helps the neural network training to converge faster. For training DistNet, we considered the following aspects: 1. Our first networks tended to overfit the training data if the training data set was too small and the network too large. Therefore, we recommend to use a sufficiently large number of instances and runtime observations, and we chose a fairly small neural network with two hidden layers each with 16 neurons. We believe that far better performance could be achieved with larger and deeper networks when more training instances are available. 2. We considered each runtime observation as an individual data sample. Hence, we increased the number of training samples to the number of instances |Π| times the number of observations k—the training set size for the random forest equals the number of instances. 3. We shuffled the runtime observations (as opposed to, e.g., using only data points from a single instance in each batch) and use a fairly small batch size to reduce the correlation of the training data points in each batch. 4. Our loss function can have very large gradients because slightly suboptimal RTD parameters can lead to likelihoods close to zero (or a very large negative log-likelihood). Therefore, we used a fairly small initial learning rate and used gradient clipping (Pascanu, Mikolov, and Bengio 2013) on top of it with an exponentially decaying learning rate. Table 2 shows all architectural choices and hyperparameters of DistNet. Experiments In our experiments, we study the following research questions: Q1 Which of the parametric RTD families we considered best describe the empirical RTDs of our algorithms and instances? 4 Automated machine learning tools, such as AutoNet (Mendoza et al. 2016), can help with this process, but AutoNet so far does not support distributions; we aim to contribute this feature to it in the future. parameter value # hidden layers # neurons per layer batch size activation function output act. function 2 16 16 tanh exp parameter value optimization algo. init. learn. rate final learn. rate batch normalization L2-regularization gradient clipping SGD 1e-3 1e-5 True 1e-4 1e-2 Table 2: Configuration of DistNet. Scenario Saps-CV-VAR LPG-Zenotravel ProbSAT-7SAT Clasp-K5 #instances #features 10011 3999 242 550 46 165 94 83 Table 3: Characteristics of the used data sets. Q2 How do DistNet’s joint predictions of RTD parameters compare to those of popular random forest models? Q3 Can DistNet be used to predict the runtime achieved by multiple-independent-run parallelization? Experimental Setup We focus on 4 well-studied algorithms, each evaluated on a different set of problem instances from two different domains: Saps-CV-VAR is based on the dynamic local search SAT solver Saps (Hutter, Tompkins, and Hoos 2002). The SAT instances are randomly generated with a varying clausevariable ratio (CV-VAR). LPG-Zenotravel is based on the local search AI-planning solver LPG (Gerevini and Serina 2002). The instances are from the zenotravel planning domain (Penberthy and Weld 1994), which arise in a version of route planning. ProbSAT-7SAT is based on the local search SAT solver ProbSAT (Balint and Schöning 2012). We ran this on 7SAT random instances. Clasp-K5 is based on the tree-based CDCL solver Clasp (Gebser, Kaufmann, and Schaub 2012). In our experiments, Clasp is randomized by using a randomly-selected split variable with a probability of 5%. The instances are randomly generated unsatisfiable SAT instances. The sizes of our instance sets are shown in Table 3. To gather training data, we ran each algorithm with 100 different seeds on each instance. All runs were performed on a compute cluster with nodes equipped with two Intel Xeon E5-2630v4 and 128GB memory running CentOS 7. We used the opensource neural network library keras (Chollet and others 2015) for our neural networks, scikit-learn (Pedregosa et al. 2011) for the RF implementation and scipy (Jones et al. 2001) for fitting the distributions. Q1: Best RTD Families Figure 4 shows some exemplary CDFs of our empirical RTDs; each line is the RTD on one of the instances. The Saps-CV-VAR LPG-Zenotravel ProbSAT-7SAT Clasp-K5 Figure 4: Empirical CDFs observed when running the default configuration of an algorithms 100 times. Blue indicates satisfiable instances, red indicates unsatisfiable instances. −logLD (θ | t(π)) LOG -0.88 LOG LPG-Zenotravel -0.90 EXP ProbSAT-7SAT -0.58 INV Clasp-K5 -1.36 Saps-CV-VAR INV -0.88 INV -0.90 LOG -0.50 LOG -1.36 N -0.75 N -0.62 N -0.20 N -1.36 EXP 0.26 EXP -0.08 INV -0.19 EXP 0.81 KS: (%p) ≤ 0.01 LOG 0.1 LOG 12.7 EXP 0.0 INV 0.0 INV 4.0 INV 20.2 LOG 0.8 LOG 0.0 N 20.1 N 79.2 N 59.1 N 0.0 EXP 87.5 EXP 100.0 INV 93.4 EXP 100.0 Table 4: Results for fitted distributions: average negative log-likelihood across instances and percentage of rejected distributions according to a KS-test (α = 0.1 without multiple testing correction). For each scenario, we report result for the top-3 distributions ranked by the negative log-likelihood. For both metrics, smaller numbers are better. Scenario dist LOG Saps-CV-VAR INV LOG LPG-Zenotravel INV EXP ProbSAT-7SAT LOG INV Clasp-K5 LOG different algorithms’ RTDs show different characteristics. On Saps-CV-VAR, most RTDs are very similar and have short right tails. On LPG-Zenotravel, the RTDs have a long right tail and a short left tail. In contrast, the RTDs of ProbSAT7SAT have a very long right tail and no left tail. On Clasp-K5, the RTDs are nearly symmetric. Table 4 shows a quantitative evaluation of the different RTD families we considered (see Section Quantifying the Quality of RTDs). Overall, our fitted distributions closely resembled the true empirical RTDs, with a rejection rate of the KS test for the best fitting distribution of at most 12.7%. Hence, on most instances our best distributions were not statistically significantly different from the observed ones. Not surprisingly, different parametric RTD families performed best on each scenario, with LOG and INV showing overall good performance, followed by N. EXP performed worst in 3 out of 4 cases, but best for ProbSAT-7SAT. On LPG-Zenotravel the KS-test showed the most statistically significant differences for the best fitting distribution since the CDFs start with a small shift (see Figure 4) and therefore cannot be approximated perfectly by our distributions. Still, these distributions achieved good negative log-likelihood values. On Clasp-K5 all distributions except EXP achieved good results. Q2: Predicting RTDs Next, we turn to the empirical evaluation of our models, comparing the predictive negative log-likelihood obtained by DistNet, a multi-output random forest (RF) and fitting fitted RF iRFs DistNet train test train test -0.88 0.84 -0.69 -0.88 1.05 -0.30 -0.88 -0.58 -0.36 -0.88 -0.07 0.04 -0.59 -0.59 -0.53 -0.52 train test train test -0.90 -0.90 -0.90 -0.90 -0.88 -0.85 -0.87 -0.79 -0.89 -0.84 -0.83 -0.77 -0.85 -0.85 -0.84 -0.84 train test train test -0.58 -0.58 -0.50 -0.50 -0.53 -0.46 -0.47 -0.39 -0.55 -0.45 -0.45 -0.39 -0.57 -0.41 -0.48 -0.33 train test train test -1.36 -1.36 -1.36 -1.36 -0.98 -0.71 -1.32 -1.15 -1.24 -1.00 -1.28 -1.15 -1.34 -1.17 -1.34 -1.18 Table 5: Averaged negative log-likelihood achieved for predicting RTDs for unseen instances. We report the average across a 10-fold cross-validation with the first line for each dataset being the performance on the training data and the second line being the performance on the test data. For each scenario, we picked the two best-fitting RTD families (according to negative log-likelihood; see Table 4) and highlight the best predictions. multiple independent RFs, one for each distribution parameter (iRFs). For DistNet, we used the settings as described in Table 2 and limit the training to take at most 1h or 1000 epochs, whichever was less. As a gold standard, we report the negative log-likelihood obtained by a maximum likelihood fit to the empirical RTD. Table 5 shows the negative log-likelihood achieved using a 10-fold cross-validation, i.e., we split the instances into ten disjoint sets, train our models on all but one subset and measure the test performance on the left out subset. We report the average performance on train and test data across all splits for the two best fitting distributions according to Table 4. Overall our results show that it is possible to predict RTD parameters for unseen instances, and that DistNet performed best. For three out of four scenarios, our models achieved a negative log-likelihood close to the gold standard of fitting the RTDs to the observed data. Also, for most scenarios both distribution families were similarly easy to predict for all ProbSAT-7SAT Clasp-K5 LPG-Zenotravel Saps-CV-VAR Figure 5: Estimated runtime for running algorithms in parallel. We compare the true runtime based on collected data to the estimated runtime obtained with fitted distributions and based on DistNet. models. For the RF-based model, we observed slight overfitting for Saps-CV-VAR, LPG-Zenotravel, and Clasp-K5. For DistNet, we only observed this on the smallest data sets, ProbSAT-7SAT and Clasp-K5. On Saps-CV-VAR, the multi-output RF yielded very poor predictions for the LOG distribution; we believe this is due to the fact that the ranges of its two distribution parameters obtained by fitting the distributions vary greatly. This affects the loss function the RF uses to fit the data (i.e., the sum of the losses for all parameters). This does not happen when fitting two RFs individually (as can be seen by the better negative log-likelihood values obtained by iRFs), but it underlines the importance of optimizing the right loss function as we do in DistNet. On ProbSAT-7SAT, the models basically only needed to fit a single parameter: EXP only has a single parameter (β), and although LOG has two parameters (µ and σ), only µ was important for ProbSAT-7SAT since σ was almost constant. Thus, in this case, the difference between RF and iRFs was due to noise and DistNet could not profit from its joint model. Overall, DistNet clearly yielded the most robust results. It achieved the best test set predictions in 6/8 cases, sometimes with substantial improvements over the RF baselines, and only performed slightly worse for the smallest ProbSAT7SAT benchmark (for which also only one RTD parameter was relevant). Q3: DistNet for Parallel RTD prediction Finally, we evaluate DistNet on a typical application: predicting the estimated runtime of a simple parallelization scheme. In this setting, an algorithm is trivially parallelized by running multiple independent copies with different random seeds in parallel. Because of the randomization, one of the runs will solve the instance faster than the others, at which point all other runs can be terminated. Knowing in advance how many parallel ressources are required to reach a certain speed-up allows for efficient trade-offs between computational resources and the time needed to solve an instance. Here, we approximate the runtime of n parallel runs by drawing n samples from the sequential algorithm’s RTD 1000 times, and obtain the expected parallel runtime by taking the average of the best out of n samples across all simulated parallel runs. We simulate running n = 1, 2, 4, 8, 16, 32 copies of the same algorithm in parallel and compare the expected parallel runtime based on our empirical RTDs and based on the predicted RTDs of DistNet. To aggregate the results, we used the average estimated runtime across all problem instances (by concatenating the results on all 10 test folds). Figure 5 shows the expected runtime depending on the number of parallel runs. For ProbSAT-7SAT and Clasp-K5, we obtained estimated runtimes close to the true distribution. For LPG-Zenotravel, the KS-test already indicated that LOG is not a perfectly-fitting distribution, and hence the estimated runtimes of parallel algorithm runs obtained by fitting distributions do not line up with the true parallel runtimes. Nevertheless, our DistNet perfectly matched the gold standard of the fitted distribution. Finally, on Saps-CV-VAR, DistNet overestimated the left tail of the RTD slightly, causing it to also underestimate the runtime of a parallel portfolio. Nevertheless, the overall trend was predicted correctly. Overall, from these experiments, we conclude that the predictions obtained with DistNet are suitable to estimate the runtime of parallel algorithm runs. Conclusion and Future Work In this paper we showed that neural networks can be used to jointly learn distribution parameters to predict runtime distributions (RTDs). In contrast to previous random forest models, we train our model on individual runtime observations, removing the need to fit RTDs on all training instances. More importantly, our neural network – which we dub DistNet – directly optimizes the loss function of interest in an end-to-end fashion, and by doing so obtains better predictive performance than previously-used random forests models that do not directly optimize this loss function. One way to extend our work and increase the amount of available training data would be to also consider censored observations in the loss function of our neural network as proposed by Gagliolo and Schmidhuber (2006a). Furthermore, so far, we only studied problems with either only satisfiable or only unsatisfiable instances. In practice, we may face instances of both types, and each may follow a different RTD family. We expect that using a mixture of models (Jacobs et al. 1991) to learn different distribution families could alleviate this problem. While in this paper we only briefly illustrated the suitability of RTD predictions on one simple application, we note that our methodology allows for better RTD predictions in general and therefore may pave the way for improving many exciting applications that currently rely on mean predictions only, such as, e.g., algorithm selection (Xu et al. 2008) and modelbased algorithm configuration (Hutter, Hoos, and LeytonBrown 2011). Acknowledgements The authors acknowledge funding by the DFG (German Research Foundation) under Emmy Noether grant HU 1900/2-1. K. Eggensperger additionally acknowledges funding by the State Graduate Funding Program of Baden-Württemberg. Furthermore, the authors acknowledge support by the state of Baden-Württemberg through bwHPC and the DFG through grant no INST 39/963-1 FUGG. References [Ambrogioni et al. 2017] Ambrogioni, L.; Güçlü, U.; van Gerven, M.; and Maris, E. 2017. The kernel mixture network: A nonparametric method for conditional density estimation of continuous random variables. arXiv [stat.ml] 1705.07111. [Arbelaez, Truchet, and O’Sullivan 2016] Arbelaez, A.; Truchet, C.; and O’Sullivan, B. 2016. Learning sequential and parallel runtime distributions for randomized algorithms. In Proc. of ICTAI’16. [Balint and Schöning 2012] Balint, A., and Schöning, U. 2012. Choosing probability distributions for stochastic local search and the role of make versus break. In Proc. of SAT’12, 16–29. [Brewer 1995] Brewer, E. A. 1995. High-level optimization via automated statistical modeling. In ACM SIGPLAN Notices, 80–91. [Chollet and others 2015] Chollet, F., et al. 2015. Keras. https: //github.com/fchollet/keras. [Eggensperger et al. 2017] Eggensperger, K.; Lindauer, M.; Hoos, H.; Hutter, F.; and Leyton-Brown, K. 2017. Efficient benchmarking of algorithm configuration procedures via model-based surrogates. arXiv [cs.AI] 1703.10342v1:1–27. [Fawcett et al. 2014] Fawcett, C.; Vallati, M.; Hutter, F.; Hoffmann, J.; Hoos, H.; and Leyton-Brown, K. 2014. Improved features for runtime prediction of domain-independent planners. In Proc. of ICAPS’14. AAAI. [Fink 1998] Fink, E. 1998. How to solve it automatically: Selection among problem-solving methods. In Proc. of ICANN’08, 128–136. AAAI Press. [Frost, Rish, and Vila 1997] Frost, D.; Rish, I.; and Vila, L. 1997. Summarizing CSP hardness with continuous probability distributions. In Proc. of AAAI’97, 327–333. [Gagliolo and Schmidhuber 2005] Gagliolo, M., and Schmidhuber, J. 2005. A neural network model for inter-problem adaptive online time allocation. In Proc. of ICANN’05, 752–752. [Gagliolo and Schmidhuber 2006a] Gagliolo, M., and Schmidhuber, J. 2006a. Impact of censored sampling on the performance of restart strategies. In Proc. of CP’06, volume 4204, 167–181. [Gagliolo and Schmidhuber 2006b] Gagliolo, M., and Schmidhuber, J. 2006b. Learning dynamic algorithm portfolios. AMAI 47(34):295–328. [Gebser, Kaufmann, and Schaub 2012] Gebser, M.; Kaufmann, B.; and Schaub, T. 2012. Conflict-driven answer set solving: From theory to practice. AI 187-188:52–89. [Gerevini and Serina 2002] Gerevini, A., and Serina, I. 2002. LPG: A planner based on local search for planning graphs with action costs. In Proc. of AIPS’02, 13–22. [Gomes and Selman 2001] Gomes, C., and Selman, B. 2001. Algorithm portfolios. AIJ 126(1-2):43–62. [Gomes et al. 2000] Gomes, C.; Selman, B.; Crato, N.; and Kautz, H. 2000. Heavy-tailed phenomena in satisfiability and constraint satisfaction problems. Journal of Automated Reasoning 24:67–100. [Goodfellow, Bengio, and Courville 2016] Goodfellow, I.; Bengio, Y.; and Courville, A. 2016. Deep Learning. MIT Press. [Haim and Walsh 2009] Haim, S., and Walsh, T. 2009. Restart strategy selection using machine learning techniques. In Proc. of SAT’09. [Hoos and Stützle 2004] Hoos, H., and Stützle, T. 2004. Stochastic Local Search: Foundations & Applications. Morgan Kaufmann Publishers Inc. [Hoos, Lindauer, and Schaub 2014] Hoos, H.; Lindauer, M.; and Schaub, T. 2014. claspfolio 2: Advances in algorithm selection for answer set programming. TPLP 14:569–585. [Hurley and O’Sullivan 2015] Hurley, B., and O’Sullivan, B. 2015. Statistical regimes and runtime prediction. In Proc. of IJCAI’15, 318–324. [Hutter et al. 2006] Hutter, F.; Hamadi, Y.; Hoos, H. H.; and LeytonBrown, K. 2006. Performance prediction and automated tuning of randomized and parametric algorithms. In Proc. of CP’06, 213–228. [Hutter et al. 2014] Hutter, F.; Xu, L.; Hoos, H.; and Leyton-Brown, K. 2014. Algorithm runtime prediction: Methods and evaluation. AIJ 206:79–111. [Hutter, Hoos, and Leyton-Brown 2011] Hutter, F.; Hoos, H.; and Leyton-Brown, K. 2011. Sequential model-based optimization for general algorithm configuration. In Proc. of LION’11, 507–523. [Hutter, Hoos, and Leyton-Brown 2013] Hutter, F.; Hoos, H.; and Leyton-Brown, K. 2013. Identifying key algorithm parameters and instance features using forward selection. In Proc. of LION’13. 364–381. [Hutter, Tompkins, and Hoos 2002] Hutter, F.; Tompkins, D.; and Hoos, H. 2002. Scaling and probabilistic smoothing: Efficient dynamic local search for SAT. In Proc.of CP’02, 233–248. [Jacobs et al. 1991] Jacobs, R.; Jordan, M.; Nowlan, S.; and Hinton, G. 1991. Adaptive mixtures of local experts. Neural Computation 3(1):79–87. [Jones et al. 2001] Jones, E.; Oliphant, T.; Peterson, P.; et al. 2001. SciPy: Open source scientific tools for Python. http://www. scipy.org/. [Leyton-Brown, Nudelman, and Shoham 2009] Leyton-Brown, K.; Nudelman, E.; and Shoham, Y. 2009. Empirical hardness models: Methodology and a case study on combinatorial auctions. Journal of ACM 56(4). [Loreggia et al. 2016] Loreggia, A.; Malitsky, Y.; Samulowitz, H.; and Saraswat, V. 2016. Deep learning for algorithm portfolios. In Proc. of AAAI’16, 1280–1286. [Luby, Sinclair, and Zuckerman 1993] Luby, M.; Sinclair, A.; and Zuckerman, D. 1993. Optimal speedup of las vegas algorithms. Inf. Process. Lett. 47(4):173–180. [Meinshausen 2006] Meinshausen, N. 2006. Quantile regression forests. JMLR 7:983–999. [Mendoza et al. 2016] Mendoza, H.; Klein, A.; Feurer, M.; Springenberg, J.; and Hutter, F. 2016. Towards automatically-tuned neural networks. In ICML 2016 AutoML Workshop. [Nudelman et al. 2004] Nudelman, E.; Leyton-Brown, K.; Devkar, A.; Shoham, Y.; and Hoos, H. 2004. Understanding random SAT: Beyond the clauses-to-variables ratio. In Proc. of CP’04, 438–452. [Pascanu, Mikolov, and Bengio 2013] Pascanu, R.; Mikolov, T.; and Bengio, Y. 2013. On the difficulty of training recurrent neural networks. In Proc. of ICML’13, 1310–1318. [Pedregosa et al. 2011] Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Prettenhofer, P.; Weiss, R.; Dubourg, V.; Vanderplas, J.; Passos, A.; Cournapeau, D.; Brucher, M.; Perrot, M.; and Duchesnay, E. 2011. Scikit-learn: Machine learning in Python. JMLR 12:2825–2830. [Penberthy and Weld 1994] Penberthy, J., and Weld, D. 1994. Temporal planning with continuous change. In Proc. of AAAI’94, 1010– 1015. [Roberts and Howe 2007] Roberts, M., and Howe, A. 2007. Learned models of performance for many planners. In ICAPS 2007 Workshop AI Planning and Learning. [Smith-Miles and Lopes 2012] Smith-Miles, K., and Lopes, L. 2012. Measuring instance difficulty for combinatorial optimization problems. Computers and Operations Research 39(5):875–889. [Xu et al. 2008] Xu, L.; Hutter, F.; Hoos, H.; and Leyton-Brown, K. 2008. SATzilla: Portfolio-based algorithm selection for SAT. JAIR 32:565–606. [Xu et al. 2011] Xu, L.; Hutter, F.; Hoos, H.; and Leyton-Brown, K. 2011. Hydra-MIP: Automated algorithm configuration and selection for mixed integer programming. In Proc. of RCRA workshop at IJCAI.
2cs.AI
Enabling Bio-Plausible Multi-level STDP using CMOS Neurons with Dendrites and Bistable RRAMs Xinyu Wu Vishal Saxena Boise, ID, USA [email protected] Department of Electrical and Computer Engineering University of Idaho Moscow, ID, USA [email protected] Stochastic I. INTRODUCTION Human brain is capable of processing unstructured information sensed from the environment, and performing realtime pattern discovering and recognition tasks in a remarkably fast, accurate, robust, and energy-efficient manner. Thanks to a half century of advances in semiconductor technology, modern computers can perform such tasks but still require orders of magnitude higher energy, as well as specialized programming. Massive parallelism, event-driven spike-based communication and in-situ synaptic plasticity are believed to be responsible for brain’s effective and energy-efficient information processing. Recently, brain-inspired neuromorphic hardware have demonstrated impressive ultra-low power performance in implementing convolutional neural networks [1]. However, it is not amenable to accommodate a huge number of synapses and cannot adjust the synaptic weights while in operation. In the past decade, the discovery of spike-timing-dependentplasticity (STDP) and emerging of nanoscale resistive randomaccess memory (RRAM) devices has opened new avenues towards the realization of brain-inspired computing. Many RRAMs have demonstrated small feature size (4F2), ultraenergy-efficiency (pJ/switch), CMOS compatible and 3D integration capability, and exhibit bio-plausible STDP characteristics [2], [3]. Studies also suggested STDP can be used to train spiking neural networks (SNNs) with RRAM synapses in-situ without trading-off their parallelism [4], [5]. A densely-integrated CMOS-RRAM spiking neural network, with non-volatile analog-like weights, is ideal for such realization [4], [7]. However, neuromorphic circuit community is facing challenges in practical realization of these implementations, where a major roadblock is the bistable and probabilistic switching behavior of RRAM [9]–[12]. A majority of small-size RRAMs exhibits abrupt switching nature, which in consequence limits stable synaptic resolution to 1-bit (or binary, bistable); furthermore, their switching probability and switching time are typically depends on the voltage applied to the device, as well as the duration of the voltage pulse. Fig. 1 illustrated the abrupt resistance decrease (SET) and the corresponding switching dependence on the voltage in a HfOx RRAM device [13]. To circumvent these issues, compound memristive synapse with multiple bistable devices in parallel was recently proposed to emulate analog weights [12]–[14]. Moreover, a standard pattern classification application has shown that least 4-bit of synaptic resolution is needed to achieve reasonable recognition performance [15]. However, simply placing multiple bistable RRAM in parallel doesn’t result in the expected exponentially shaped learning A B 1M 100k Probability Density (%) Keywords—Neuromorphic; Resistive Memory; Computing; Spike-Timing Dependent Plasticity Consequently, it is natural to envision hybrid CMOS-RRAM very-large-scale integrated (VLSI) circuits to achieve dense integration of CMOS neurons and RRAM synapses to build neural-inspired computing chips by leveraging the nanometer scale silicon processing technology. Recently, mixed-signal chips with spiking neurons that can interface with RRAM devices, and learning algorithms and circuits built using these neural motifs have been demonstrated by the authors [6]–[8]. Resistance (Ω) Abstract— Large-scale integration of emerging nanoscale non-volatile memory devices, e.g. resistive random-access memory (RRAM), can enable a new generation of neuromorphic computers that can solve a wide range of machine learning problems. Such hybrid CMOS-RRAM neuromorphic architectures will result in several orders of magnitude reduction in energy consumption at a very small form factor, and herald autonomous learning machines capable of self-adapting to their environment. However, the progress in this area has been impeded from the realization that the actual memory devices fall well short of their expected behavior. In this work, we discuss the challenges associated with these memory devices and their use in neuromorphic computing circuits, and propose pathways to overcome these limitations by introducing ‘dendritic learning’. Abrupt SET 10k 1k 25 20 Measured from One device for 100 cycles 15 10 5 Repetitive Pulse +1.7V / 10ns 100 0 5 10 Pulse Number 15 20 0 1.0 1.2 1.4 1.6 1.8 2.0 2.2 2.4 2 .6 SET Pulse Threshold (V) Fig.1. Binary stochastic switching and the STDP in RRAM. (A) Abrupt SET transition starting from the off-state by repetitive SET pulses. (B) Measured statistical distribution of pulse amplitude required for triggering the SET switching from the off-state (adapted from [13]). A Vpre B Vpre RRAMs C Vleaky Δt < 0 Foreward spikes Vpost Vrefr Cmem SW1 t t Vnet = Vpost - Vpre Vnet = Vpost - Vpre Pre-synaptic neuron Vpost Veff Vth- Av Vth+ Vth+ t Vth- t Vthr Mleaky Фd=1 SW2 t t Δt > 0 Vpost Compound Synapse Backward spike Veff Spike Generator Vrest Vpd,0 Vpd,1 α1 1 Vpd,2 Фf=0 Фd=0 Vpre α2 1 SW3 Vcpr Vmem Фd Фi Phase Ф1 Controller Ф2 Post-synaptic neurons Фf Bus Фc αn Dendritic Processing Vtch Vmode Vrst Interface Vwtab Fig.2. The proposed with CMOS neural network with dendritic processing. (A) A pair of spikes are applied across a synapse to create relative-timing dependent net potential Vnet, of which the over-threshold portion (Veff ) may cause the RRAM resistance to switch. (B) A single layer of spiking neural network with RRAM synapses organized in crossbar architecture. Post-synaptic neuron connects with a pre-synaptic neuron with several RRAM synapses in parallel. Back-propagated spikes after dendritic processing modulate RRAM in-situ under STDP learning rule. (C) Schematic diagram of the proposed CMOS neuron with dendritic processing architecture. Parallel attenuators (αi) reduce voltage amplitude of backward spikes for parallel RRAM devices when CMOS soma fires. During nonfire (integration) mode, all parallel RRAM devices are connected to same current summing point. window that appears in biological STDP, which has been found critical for guaranteeing computing stability and efficiency in theoretical analyses [16]–[18]. The fundamental contribution of this work is that we propose a new concept where “dendritic processing” is added to the compound synapse. This is an important step where bistable switching devices, which have been practically realized, be researchers, can be employed in stochastic regime to realize synapses with multi-bit resolution and lead to practical realization of large-scale spiking neural networks on chip. Leveraging the bistable probabilistic switching, we specifically demonstrate that the proposed compound synapse with dendritic processing can realize high-resolution plasticity with the much desired exponentially-shaped STDP learning window. are reduced in these branches depending on their attributes. Since the synaptic devices’ switching depends on the voltage and duration applied on their two terminals, these postdendritic spike waveforms after dendritic processing produce several different voltage amplitudes and cause the synaptic devices to switch with different probabilities (assuming same pulse duration): the greater of the post-dendritic spike amplitude, the higher probability to switch; the lower of the post-dendritic spike amplitude, the less probability to switch. Thus, from statistical standpoint, the average conductance of the compound synapse with n binary RRAM devices in parallel under a given voltage Vi can be written in mathematical formula as 𝑛 ̅̅̅̅ 𝐺𝑐𝑠 (𝑉) = ∑ 𝑝𝑖 (𝑉𝑖 ) 𝑖=1 II. REALIZING MULTIBIT SYNAPSES USING BISTABLE RRAMS In pair-wise STDP learning, spikes sent from pre- and postsynaptic have their voltage amplitudes below the positive and negative switching thresholds (Vth+ and Vth-) of a bipolar RRAM device. RRAM switching events may occur only if this spike pair overlaps and creates a net potential (Vnet) greater than the switch threshold, as illustrated in Fig.2A. When several bistable RRAM devices are combined in parallel in a crossbar configuration to realize a compound synapse with multi-bit resolution, all the RRAMs in parallel will have a same switching probability as a function of applied voltage, if they are simply connected between two terminals. To enable RRAM in the compound synapse with spiketiming-dependent switching probability, dendritic processing is applied to the pre-synaptic neuron output as shown in Fig. 3B. Here, a single-layer neural network is implemented in the crossbar architecture with a RRAM device, as an electrical synapse, connects pre- and post-synaptic neurons at each crosspoint. The original spike waveform from the pre-synaptic neuron runs through multiple dendritic branches before reaching the binary synaptic devices, and the spike amplitudes 1 𝑅𝑂𝑁,𝑖 𝑛 + ∑(1 − 𝑝𝑖 (𝑉𝑖 )) 𝑖=1 1 , 𝑅𝑂𝐹𝐹,𝑖 (1) where pi is the SET switching probability of the ith device, and RON and ROFF are the RRAM resistance at ON and OFF state respectively. Generally, ROFF is greater than RON by several orders of magnitude [19], and thus, can be neglected in overall conductance. For simplicity, assuming RON of all devices is same 1 and normalizing it to one, the probability of the compound synapse equals the normalized conductance value 𝑔 is 𝑛 ̅̅̅̅ 𝑝(𝐺 𝑐𝑠 (𝑉) = 𝑔) = ∑ 𝑝𝑖 (𝑉𝑖 ). (2) 𝑖=1 Above formula shows the synergy effect of parallel RRAMs could approximate a nonlinear function if pi and Vi are not linear at the same time. So, the proposed dendritic processing provides a new dimension to manage the amplitude and timing of spikes, the overall STDP learning curve now can be designed to a desired shape more easily. This is enabled by the key fact that the devices are operated in probabilistic switching regime, and each device switches differently with respect to the 1 RON of a real RRAM could be stochastic as well. See an example in [19]. A B C D E F Fig. 3. STDP learning window created by compound binary resistive synapses with dendritic processing. (A) Pre-synaptic spike waveforms: Dendritic processing attenuates the voltage amplitude of spike with factors from 0.5 to 1, and creates 16 parallel spikes. (B) Effective potential Veff over parallel devices versus the relative arrival timing of post- and pre-synaptic spikes. 16 levels are created over Vth+ and Vth-. (C) The compound synapse shows an equivalent of 4-bit (16 levels) weight STDP leaning. Each dot represents a possible resistance value. (D) STDP window with dot density presenting the probability (with noise and jitter). The double exponential curves fit well to the maximum values of probability. (E) Switching probability for the 16 devices versus the relative pre/post timing (Δt). The asymmetric shape is created by dendritic processing on the pre-synaptic neuron only. (F) Probability as a function of relative timing of the compound synapse at each of its conductance state. The state probability curves are spaced with each other in an increasing exponential manner. time difference between the pre- and post-spikes (Δt) 𝑉𝑖 = 𝑓(∆𝑡). (3) In term of circuit realization, each dendritic branch is implemented by adding an attenuator to the CMOS soma output in a compact circuitry as shown in Fig. 3B. One of several possible realizations is a resistor ladder followed by source follower buffers. In detailed, noting the spike waveform generated by the spike generator as Va+ and Va-, then the dendritic processing generates n post- dendritic spikes + 𝑉𝑝𝑑,𝑖 = 𝛼𝑖 𝑉𝑎+ { − , 𝑉𝑝𝑑,𝑖 = 𝛼𝑖 𝑉𝑎− 𝑖 = 1,2, ⋯ , 𝑛 (4) where Vpd,i+ and Vpd,i- is the positive and negative amplitudes of the ith post- dendritic spike, and αi is the attenuation factor of the ith dendritic branch. The CMOS soma could be implemented in an integrateand-fire circuits and winner-takes-all (WTA) mechanism in a reconfigurable architecture based on single opamp, as presented in [6]–[8]. In one configuration, the CMOS soma is designed to provide a constant voltage at the neuron’s current summing input, and then, allows reliable and linear spatiotemporal spike integration by charging membrane capacitor with the flow-in currents converted by passive and resistive synaptic devices. In another configuration, the CMOS soma generates STDP- compatible spike and drives the spikes propagating in both forward and backward directions with high energy-efficiency. In the third configuration, this soma circuitry supports local learning with many neurons organized in a group and becomes selective to the input patterns through competition and lateral inhibition with a shared WTA bus [7]. III. EXPIRIMENTAL RESULTS The architecture is implemented and simulated in Python 2.7, and 10,000 epochs were performed for stochastic simulation. The stochastic switching of the RRAM synapse is modeled by the cumulative probability of a Gaussian distribution as experimentally demonstrated in [13] 𝑝(𝑉𝑛𝑒𝑡 ) = ∫ 𝑉𝑛𝑒𝑡 0 1 √2𝜎 2 𝜋 𝑒 −(𝑥−𝑉𝑡ℎ )2 2𝜎 2 𝑑𝑥, (5) where p(Vnet) is the SET or RESET switching probability under net potential Vnet applied across the two terminals of the RRAM; Vth is the average threshold voltage, and σ is the A B C E D F E Fig. 4. STDP learning window created by compound binary resistive synapses without dendritic processing. (A) Pre-synaptic spike waveform. (B) Effective potential Veff over parallel devices versus the relative arrival timing of post- and pre-synaptic spikes. (C) Equivalent 4-bit STDP leaning window. (D) STDP window with dot density presenting the probability. The double linear curves fit to the maximum values of probability. (E) Switching probability of the 16 devices versus the Δt. (F) Probability of the compound synapse at each conductance state. standard deviation of the distribution. Here, for demonstration purpose we choose Vth+ = 1V and Vth- = -1V for the positive and negative thresholds respectively, with σ = 0.1. In simulation, a hardware-friendly spike waveform [4], [7] is selected. This spike waveform has a constant positive shape and a linearly rising negative tail, and has been demonstrated on a CMOS neuron chip by the authors [6]. With a normalized timescale, the positive tail has 0.9V amplitude and spans 1 time unit; the negative tail has a peak amplitude of 0.4V and spans 5 time units. Attenuating factors (αi) of the dendritic attenuators were set to values linearly spanning from 0.6 to 1. Using these dendrites, 16 parallel spikes were generated as shown in Fig. 3A. These pre-synaptic spikes yield 16 positive and 16 negative levels in the STDP learning function that spans from 5 to 5 time units, as shown in Fig.3B. Simulation results in Fig.3C shows the STDP learning windows with normalized conductance changes, 𝑔, where each dot represents a possible state of the synapse. It clearly demonstrates an equivalent of 4-bits weight with 16 levels both on the positive as well as negative sides of the STDP window. Using each dot to represent the probability density of the state, Fig.3D depicts the maximum likelihood state of the conductance change under STDP learning, and now a double exponential curve fits well to the simulated results. Here, each dot represents the state of the conductance compound synapse in the stochastic simulation. Mimicking the biological measurements, Gaussian noise and jitters were added to the synaptic change. The STDP learning shows a plateau when Δt in the range of 0 to 1 because the switching probabilities of the parallel devices are easier to saturate when only a portion of the pre-synaptic spike’s tall positive tail overlaps with the postsynaptic spike’s negative tail. Ideally, this plateau can be eliminated by using a very narrow positive tail for the spike waveform which corresponds to faster switching characteristics of the RRAM device. Fig.3E further illustrates the asymmetry of the STDP curves, which plot the individual switching probability of the 16 devices versus Δt. We can observe that the RRAMs’ switching probability curves are dense in the left-hand panel, due to the smaller amplitude of the spike’s negative tail than its positive tail. Dense probability curves yield narrow span of their combined distribution, and are easier to saturate especially when the positive tail of pre-spike partially overlapping with the post-spike and creates a less change than full overlapping to the net potential respecting to the Δt. In this simulation, almost a half of the RRAM devices were saturated from Δt = 0 to 1. Another view is shown in Fig.3F, which depicts the probability of the compound synapse to occupy each of the normalized conductance state. It shows the statewise probability curves are spaced with an increasing exponential manner; while a significant dominating state of 𝑔 = 16 when Δt falls into the range of 0 to 1. To provide a comparison of the proposed dendritic approach with a simple compound synapse, the simulation results of stochastic STDP learning without dendritic processing is illustrated in Fig. 4. Although this achieves 4-bit weight through STDP leaning, however, the STDP learning curves are linear as shown in Fig. 4D due to the same switching probability of all the devices in parallel as shown in Fig. 4E. And the state-wise probability curves are equally spaced as shown in Fig. 4F. [6] [7] [8] [9] IV. CONCLUSION The proposed compound synapse with dendritic processing realizes exponential STDP learning similar to biology, while using practically feasible bistable memory devices. This can potentially enable ultra-low-power and significantly compact machine learning hardware for large-scale spiking neural networks that require plasticity with multibit resolution. Immediate applications will include practical realization ofspike-based convolutional neural networks and restricted Boltzmann machines in a chip-scale form factor. This architectural exploration using the proposed compound probabilistic synapses can help benchmark the expected behavior from the emerging RRAM devices; nanoscale RRAM devices with large resistances will help realize lower power consumption. REFERENCES [1] [2] [3] [4] [5] S. K. Esser et al., “Convolutional Networks for Fast, Energy-Efficient Neuromorphic Computing,” Proc. Natl. Acad. Sci., 2016. S. Saïghi et al., “Plasticity in memristive devices for spiking neural networks,” Front. Neurosci., vol. 9, no. MAR, pp. 1–16, 2015. S. B. Eryilmaz, D. Kuzum, S. Yu, and H. P. S. P. Wong, “Device and system level design considerations for analog-non-volatile-memory based neuromorphic architectures,” in Technical Digest - International Electron Devices Meeting, IEDM, 2015, vol. 2016–Febru, p. 4.1.1-4.1.4. C. Zamarreño-Ramos, L. A. Camuñas-Mesa, J. A. Pérez-Carrasco, T. Masquelier, T. Serrano-Gotarredona, and B. Linares-Barranco, “On spike-timing-dependent-plasticity, memristive devices, and building a self-learning visual cortex,” Front. Neurosci., vol. 5, no. March, p. 26, Jan. 2011. D. Querlioz, W. Zhao, and P. Dollfus, “Bioinspired networks with nanoscale memristive devices that combine the unsupervised and [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] supervised learning approaches,” in International Symposium on Nanoscale Architectures (NANOARCH), 2012, pp. 203–210. X. Wu, V. Saxena, K. Zhu, and S. Balagopal, “A CMOS Spiking Neuron for Brain-Inspired Neural Networks with Resistive Synapses and In-Situ Learning,” IEEE Trans. Circuits Syst. II Express Briefs, vol. 62, no. 11, pp. 1088–1092, 2015. X. Wu, V. Saxena, K. Zhu, S. Member, V. Saxena, and K. Zhu, “Homogeneous Spiking Neuromorphic System for Real-World Pattern Recognition,” IEEE J. Emerg. Sel. Top. Circuits Syst., vol. 5, no. 2, pp. 254–266, 2015. X. Wu, V. Saxena, and K. Zhu, “A CMOS Spiking Neuron for Dense Memristor-Synapse Connectivity for Brain-Inspired Computing,” in International Joint Conference on Neural Networks (IJCNN), 2015. S. H. Jo, K. H. Kim, and W. Lu, “Programmable resistance switching in nanoscale two-terminal devices,” Nano Lett., vol. 9, no. 1, pp. 496–500, 2009. R. Soni et al., “On the stochastic nature of resistive switching in Cu doped Ge 0.3Se0.7 based memory devices,” J. Appl. Phys., vol. 110, no. 5, pp. 0–10, 2011. V. Saxena, “Memory Controlled Circuit System and Apparatus,” US patent application US 2015/0278682, 2015. S. Gaba, P. Sheridan, J. Zhou, S. Choi, and W. Lu, “Stochastic memristive devices for computing and neuromorphic applications,” Nanoscale, vol. 5, pp. 5872–8, 2013. S. Yu, B. Gao, Z. Fang, H. Yu, J. Kang, and H.-S. P. Wong, “Stochastic learning in oxide binary synaptic device for neuromorphic computing,” Front. Neurosci., vol. 7, no. October, p. 186, 2013. A. Singha, B. Muralidharan, and B. Rajendran, “Analog memristive time dependent learning using discrete nanoscale RRAM devices,” in International Joint Conference on Neural Networks (IJCNN), 2014, pp. 2248–2255. J. Bill and R. Legenstein, “A compound memristive synapse model for statistical learning through STDP in spiking neural networks,” Front. Neurosci., vol. 8, no. December, pp. 1–18, 2014. H. Sprekeler, C. Michaelis, and L. Wiskott, “Slowness: an objective for spike-timing-dependent plasticity?,” PLOS Comput. Biol., vol. 3, no. 6, p. e112, Jun. 2007. T. Toyoizumi and J. Pfister, “Spike-timing dependent plasticity and mutual information maximization for a spiking neuron model,” in Advances in Neural Information Processing Systems (NIPS), 2004. B. Nessler, M. Pfeiffer, L. Buesing, and W. Maass, “Bayesian computation emerges in generic cortical microcircuits through spiketiming-dependent plasticity,” PLOS Comput. Biol., vol. 9, no. 4, Apr. 2013. Vishal Saxena, X. Wu, and M. Mitkova, “Addressing Challenges in Neuromorphic Computing with Memristive Synapses,” in Neuromorphic Computing Workshop: Architectures, Models, and Applications, 2016.
9cs.NE
A micromechanics-enhanced finite element formulation for modelling heterogeneous materials Jan Nováka,b,c , Lukasz Kaczmarczyka , Peter Grassla , Jan Zemanb , Chris J. Pearcea,∗ arXiv:1103.5633v2 [cond-mat.mtrl-sci] 15 Jun 2011 a School of Engineering, University of Glasgow, Glasgow G12 8QQ, UK Faculty of Civil Engineering, Czech Technical University in Prague, Thákurova 7, 166 29 Praha 6, Czech Republic c School of Civil and Environmental Engineering, University of New South Wales, NSW 2052, Sydney, Australia b Abstract In the analysis of composite materials with heterogeneous microstructures, full resolution of the heterogeneities using classical numerical approaches can be computationally prohibitive. This paper presents a micromechanics-enhanced finite element formulation that accurately captures the mechanical behaviour of heterogeneous materials in a computationally efficient manner. The strategy exploits analytical solutions derived by Eshelby for ellipsoidal inclusions in order to determine the mechanical perturbation fields as a result of the underlying heterogeneities. Approximation functions for these perturbation fields are then incorporated into a finite element formulation to augment those of the macroscopic fields. A significant feature of this approach is that the finite element mesh does not explicitly resolve the heterogeneities and that no additional degrees of freedom are introduced. In this paper, hybrid-Trefftz stress finite elements are utilised and performance of the proposed formulation is demonstrated with numerical examples. The method is restricted here to elastic particulate composites with ellipsoidal inclusions but it has been designed to be extensible to a wider class of materials comprising arbitrary shaped inclusions. Keywords: Micromechanics; Equivalent inclusion method; Eshelby’s solution; Heterogeneous materials; Hybrid-stress finite elements; Displacement perturbations ∗ Corresponding author. Tel.: +44-141-330-5207 Email addresses: [email protected] (Jan Novák), [email protected] (Lukasz Kaczmarczyk), [email protected] (Peter Grassl), [email protected] (Jan Zeman), [email protected] (Chris J. Pearce) Preprint submitted to Computer Methods in Applied Mechanics and Engineering June 16, 2011 1. Introduction In the analysis of materials with complex microstructures, full resolution of the heterogeneities using classical numerical approaches such as the Finite Element method can be computationally prohibitive. To overcome this, one option is to model the macroscale problem using equivalent properties; however, this can lead to a critical loss of information about the finer scale behaviour and poor understanding of the heterogeneities’ influence on the macroscale response. Numerical approaches such as computational homogenization (often called FE2 ) provide an alternative strategy [1, 2]. These techniques comprise nested Finite Element analyses, where each macroscopic material point response is determined via the numerical solution of an RVE subject to the macroscopic strains. Although such approaches have significant potential for certain classes of problems, they are still computationally demanding and are restricted to situations involving clear separation of scales. The objective of this work is to develop a Finite Element formulation for modelling the macroscopic mechanical problem that is enhanced to capture the influence of the underlying heterogeneities. In our approach, the Finite Element mesh is not required to explicitly resolve the heterogeneities. Closed-form expressions for the perturbation of the mechanical fields due to the presence of the heterogeneities are determined and these are then utilised to enhance the Finite Element formulation. The ability to capture the effect of microstructural features independently of the underlying finite element mesh has been an ongoing challenge in computational mechanics research. Partition of Unity methods [3, 4, 5, 6] provide a potential solution to this problem, without mesh refinement, by extending a given solution space with additional functions and has been successfully applied to problems such as cracks and material interfaces. The application of this approach in the context of the current work will be briefly discussed in this paper, whereby the closed-form solutions derived for the mechanical perturbation fields are used to extend the classical finite element method. However, it will be shown that there are some disadvantages to this approach for the particular problem at hand and an alternative approach, centred on the Hybrid-Trefftz stress element formulation [7], represents the main focus of this paper. This method does not result in additional degrees of freedom, although it does involve an additional, albeit relatively minor, computational overhead. The heterogeneities, although currently restricted to simple shapes (ellipsoids), can be randomly sized and randomly distributed without reference to the finite element mesh. Therefore, the proposed approach has the potential to be applicable to a wide range of composite materials, such as fibre reinforced composites [8], porous media [9, 10], functionally graded materials [11], etc. Moreover, it can be 2 extended to general inclusion shapes by evaluating the perturbation functions numerically [12, 13]. The paper is structured as follows. The methodology of the proposed strategy is described in Section 2. Construction of the perturbation approximation functions for Finite Element Analysis is derived in Section 3. The implementation into the Hybrid-Trefftz stress element formulation containing an arbitrary number of inclusions is presented in Section 4. Section 5 comprises examples demonstrating the model’s performance. Finally we present the conclusions as well as a discussion on future research directions. An appendix is included that highlights some important, but rather technical, aspects of the proposed technique in order to keep the paper self-contained. 2. Micromechanics approach This section outlines the strategy to calculate the perturbation of mechanical fields due to a heterogeneous microstructure, exploiting the Equivalent Inclusion Method [14] in conjunction with analytical micromechanics. Our objective is to convert the heterogeneous problem into an equivalent homogeneous problem and to derive analytical expressions for the perturbations of the stress, strain and displacement fields that we can then utilise within a finite element formulation. Consider a body consisting of clearly distinguishable heterogeneities in a matrix (Fig. 1a) subjected to a displacement u and traction t field. The stiffness of such a u (x) , t (x) Γ Ω C1 (x) 6 C (x) y Ω4 C (x) ≈ Ω3 Ω Ω :C Γ Ω C5 (x) 5 C C0 ε2τ 0 ε4τ Ω2 Ω4 C0 ε τ3 Ω3 C0 Ω5 6 C0 ε τ5 4 0 x ε τ1 C3 (x) Ω , t (x) Ω1 Ω2 C2 (x) 1 6 u (x) C 0 ετ 5 y 0 0 x (a) Ω :C 0 (b) Figure 1: Principle of Equivalent Inclusion Method: a) composite body with inclusions, b) homogeneous reference body with additional equivalent eigenstrains material is decomposed as follows [14, 13] C = C0 + V C∗ 3 (1) P i 0 where C0 is the stiffness tensor of a homogeneous matrix Ω0 and C∗ = N i [C − C ] is due to the presence of N inclusions. C∗ is nonzero only within the domain Ω = Ω1 ∪ · · · ∪ ΩN , so that  0 in Ω0 (2) V = 1 in Ω As a result of the heterogeneities, the mechanical fields (displacement, strains, stresses) experience a perturbation for which we will derive closed-form expressions based on analytical micromechanics. Symbolically, we can express the decomposition of the mechanical fields as follows: u = u0 + u∗ , ε = ε0 + ε∗ , σ = σ 0 + σ ∗ (3) where, the superscript ·0 indicates the macroscopic component of the fields in the absence of heterogeneities and superscript ·∗ indicates the perturbation (or microscopic) component due to the presence of the heterogeneities. It is worth noting that, traditionally, in analytical micromechanics, the macroscopic fields are assumed to be uniform across the domain, e.g. [15, 16]. Here it is assumed that they can be position dependent functions of the Neumann and Dirichlet boundary conditions. The perturbation fields are determined by employing the equivalent inclusion method for a single heterogeneity embedded in a matrix and then extended here for multiple heterogeneities. In the equivalent inclusion method, the heterogeneous solid is replaced by an equivalent homogeneous solid with uniform material stiffness C0 everywhere (Fig. 1a, b) and suitable stress-free eigenstrains ετi applied in the inclusions Ωi so that the homogeneous equivalent solid has the same mechanical fields as the original heterogeneous solid. 2.1. Equivalent inclusion method for single heterogeneity problem Consider first a single heterogeneity embedded in a matrix. Following Eshelby’s fundamental work [17], this problem can be decomposed into two problems of known solution and then assembled back via superposition [14, 17], see Fig. 2. In brief, the solution of the inhomogeneity problem requires the determination of the transformation eigenstrain ετ that induces the identical local mechanical response as the original heterogeneous body. Due to the absence of other inclusions, no strain or stress concentrations are induced and thus ετ remains constant [17]. In the original heterogeneous body, the stress state can be expressed as σ = σ 0 + σ ∗ = C : [ε0 + ε∗ ] 4 (4) u 0(x) ,q0(x) (a) u (x) , t (x) Γ x 8 ετ Ω: C 0 Ω0: C 0 − 8 − u 0(x) ,q0(x) everywhere: C 0 − + y 8 8 − 8 8 Ω0: C 0 − ≡ x u (x) , t (x) Ω: C1 (x) y 8 8 u (x) , t (x) − 8 x u (x) , t (x) u (x) , t (x) Γ y 8 8 8 u (x) , t (x) u 0(x) ,q0(x) u (x) , t (x) u (x) , t (x) (b) u 0(x) ,q0(x) (c) Figure 2: Equivalent Inclusion Method: a) inhomogeneity problem, b) infinite homogeneous body, c) homogeneous inclusion problem In the homogeneous solid, we add a stress-free eigenstrain ετ inside the domain of the inclusion, which has the same material stiffness C0 as the matrix such that σ = C0 : [ε0 + ε∗ − ετ ] (5) It should be noted that ετ = 0 in the matrix. Given that the macroscopic stress is σ 0 = C0 : ε0 , it can be see from equating Eqs. (4) and (5), that the stress perturbation in the homogeneous solid can be expressed as σ ∗ = C0 : [ε∗ − ετ ] (6) Furthermore, equating Eqs. (4) and (5) also results in the following expression: C : [ε0 + ε∗ ] = C0 : [ε0 + ε∗ − ετ ] (7) where the transformation eigenstrain is as yet unknown. Eshelby’s solution of the homogeneous inclusion problem [17], relates the eigenstrain to the perturbation strain as follows ε∗ = S : ετ (8) where S denotes the Eshelby tensor and is a function of the heterogeneity’s geometry and the material stiffness of both the matrix and heterogeneity. Substituting this expression into Eq. (7) and rearranging yields     C − C 0 : ε0 = C 0 : S − C : S − C 0 : ετ (9) This can be recast in a compact form to give an expression for the eigenstrain ετ which depends on the homogeneous strain ε0 , the material stiffness of both the matrix and heterogeneity and the Eshelby tensor as ετ = B : ε0 5 (10) where the tensor B is provided by:  −1 B = − C∗ : S + C0 : C∗ (11) Once the transformation eigenstrain has been determined, the stress perturbation can be computed from Eq. (6) in the form σ ∗ = C0 : [S − I] : B : ε0 (12) It can be seen that the stress perturbation depends on stiffness of the different material phases, the macroscopic strain field and the geometry of the heterogeneity. This closed-form expression for the stress perturbation is at the heart of the proposed finite element enrichment to be discussed later in this paper. It is also useful to derive an expression for the displacement perturbation field as follows u∗ = L : ετ = L : B : ε0 (13) where the operator L is a third order tensor, mapping ετ → u∗ . For the sake of conciseness and to keep the paper self-contained, the detailed derivation of this operator can be found in Appendix Appendix A. 2.2. Self-compatibility algorithm for multiple inclusions In the case of multiple inclusions, the mechanical perturbation fields within individual inclusion domains are no longer uniformly distributed as a result of their mutual interaction. Here, we account for this approximately by assuming that the eigenfields to be piecewice constant within each inclusion. Thus, the perturbations are determined from the Eshelby solution for each individual inclusion, as described above, plus an iterative self-compatibility procedure (Tab. 1) to ensure that the solution correctly reflects the influence of multiple heterogeneities. This procedure iteratively enforces compatibility (see eg. [18] for further reference) between the imposed macroscopic strain and the average eigenstrain inside any given inclusion i, so as to account for the influence of the remaining inclusions N \i. An iterative algorithm has been chosen because a closed form solution for multiple inclusions does not exist and a numerical solution would be prohibitively expensive [18]. First, the eigenstrain ετi for each inclusion i is calculated (Eq. 10) without reference to the other inclusions (Line 2). Next, the associated perturbation strain ε∗i for each inclusion i is evaluated (Eq. 8) at the centre of all other inclusions (Line 3). The mutual interaction of inclusions is then taken into account via a correction of the eigenstrain (∆ετi ). For each inclusion i, this correction is calculated (Line 8) 6 from the inverse of the inclusion’s Eshelby tensor S−1 and the perturbation strains i of all other inclusions, evaluated at the centroid of inclusion i. The perturbation strain resulting from inclusion j at the centre of inclusion i is denoted as ε∗i,j . This is demonstrated in Fig. 3 for a two inclusion problem in 1D. The eigenstrain correction ∆ετi is then used to calculate the correction to the perturbation strains (Line 10). The algorithm continues until a small Euclidean norm between the last two iterations of the total eigenstrains is achieved. At convergence, the corresponding stress and displacement perturbations are recalculated from the corrected transformation eigenstrains. It is worthwhile noting that the algorithm does not depend on a particular sequence of inclusions, as follows from the elastic reciprocity theorem [18, and references therein]. Moreover, since the perturbation fields are calculated for the entire macroscopic domain (no RVE is considered), stress admissibility and strain compatibility, in the sense of macro-micro field relations, are fulfilled a priori. The computational complexity of the Self-compatibility algorithm is O(N 2 ). However, this can be improved by taking into account only those inclusions which have a non-negligible influence to the inclusion of interest i. Preliminary studies have shown this to give a significant computational speed-up and will be reported in a future paper. 1 2 3 4 5 6 7 8 9 10 11 12 Self Compatibility Algorithm (ε0i , Bi , Si , S−1 i , N) For (i ≤ N ) ετi = Bi : ε0i (Eq. 10) ε∗i = Si : ετi (Eq. 8) Set ∆ε∗i = ε∗i EndFor Do For (i ≤ N ) P −1 ∗ (Eq. 8) ∆ετi = N j\i Si : ∆εi,j τ τ τ εi = εi + ∆εi ∆ε∗i = Si : ∆ετi EndFor  PN ∗ While i k∆εi k > η Table 1: Self-compatibility algorithm. Note, that η stands for an acceptable tolerance. 7 Figure 3: Principle of self-compatibility algorithm for double inclusion problem in 1D. 3. Construction of perturbation approximation functions for FEA The above methodology can be utilised to formulate an enhanced Finite Element formulation. The primary task is to determine appropriate approximation functions for the mechanical perturbation fields u∗ , ε∗ and σ ∗ based on the analytical micromechanics developed above and which can then augment the standard macroscopic field approximations. It should be noted that the Voigt-Mandel notation is exclusively used in the forthcoming text. The perturbation field approximation functions are determined a priori as a linear combination of the perturbation fields evaluated analytically for six load cases, with self-equilibrium enforced by means of the self-compatibility algorithm outlined above (Tab. 1). Each load case corresponds to a unit component of the macroscopic strain vector 0i , i = 1, . . . , 6 and the resulting analytically determined stress, strain and displacement perturbation fields are arranged, column-by-column into s∗6×6 , e∗6×6 and u∗3×6 matrices, respectively: s∗ =  1 ∗ σ ... u∗ = 6 ∗ σ   , e∗ = 1 ∗ u  1 ∗  ...  . . . 6 u∗ 6 ∗   (14) (15) where the left superscript refers to a specific load case, 1 to 6. 3.1. Partition of unity method Partition of Unity (PU) Methods (for example the eXtended Finite Element Method) extend the underlying basis functions used for interpolating the displacement field by adding an appropriate set of additional functions. Following [19, 20] it has been shown that the displacement field u(x) within an element can be interpolated by n X  u(x) = Ni (x)ai + Ni Nγ (x)bi (16) i=1 8 where n is the number of nodes per element, Ni (x) = N i (x)I is the standard matrix of element shape functions for node i, I is the identity matrix and ai the standard displacement degrees of freedom at node i. Nγ is a matrix containing the additional basis terms and bi are the associated additional degrees of freedom at node i. It is important to recognise that the element shape functions form a partition of unity, i.e. n X N i (x) = 1 (17) i=1 The six analytically derived displacement perturbation functions contained in u∗ can be used as the additional functions Nγ to augment the standard basis functions. Thus   1 ∗ u1 (x) . . . 6 u∗1 (x) 0 ... 0 0 ... 0 1 ∗  (18) 0 ... 0 0 ... 0 u2 (x) . . . 6 u∗2 (x) Nγ (x) =  1 ∗ 0 ... 0 0 ... 0 u3 (x) . . . 6 u∗3 (x) With this at hand, the PU-based finite element formulation can be derived, see for example [21]. PU methods are particularly useful in problems where the extension of the basis functions is introduced on a node by node basis, so that additional degrees of freedom are only introduced at nodes where the basis is extended. One obvious example of such a local feature that can be modelled in this way is discrete cracks [21]. However, this favourable property is not exploited here because we wish to model a large number of heterogeneities throughout the domain. In 3D problems, there are 3 standard displacement degrees of freedom per node; this would be extended by an additional 18 degrees of freedom per node and per heterogeneity with the proposed approach. It is also worth noting that for standard finite elements, the volume integration of the discrete system of equations is relatively straightforward. However, extension of the basis functions to include the perturbation functions in Eq. (18) makes this process significantly more arduous. For these reasons, an alternative Finite Element approach using Hybrid Trefftz Stress elements [22, 7] is considered where the standard basis function is not extended, as with PU methods, but enhanced such that no additional degrees of freedom are introduced. This is described in the next section. 4. Hybrid-Trefftz stress element formulation In this section a finite element formulation based on an enhancement of a hybridTrefftz stress (HTS) element formulation [7] is presented. 9 t (x) Γe Γσe u3 Ωe z x u1 Γue u(x) u2 y x Figure 4: Elastic body representing HTS element The problem requires a solution to the displacement u and stress σ fields as a result of given boundary displacements u and tractions q on Γeu and Γeσ , respectively. The displacement and stress fields must fulfil the following governing equations: LT σ Lu σ Nσ u =0 = = C =t =u in Ωe in Ωe in Ωe on Γeσ on Γeu . . . Cauchy equilibrium equation . . . strain-displacement relationship . . . constitutive equation . . . static boundary conditions . . . kinematic boundary conditions (19) where σ and  are the column matrix representation of the second order stress and strain tensor, respectively, u represents the displacement vector, C is the matrix representation of fourth order stiffness tensor and finally u and t represent the applied displacements and tractions, respectively. The gradient operator L and the matrix of directional cosines N of the outward normal to element boundary Γe have the following forms [23]   ∂/∂x 0 0  0   ∂/∂y 0    n 0 0 0 n n x z y  0 0 ∂/∂z   , N =  0 ny 0 nz 0 nx  L= (20)  ∂/∂y ∂/∂x 0    0 0 nz ny nx 0  0 ∂/∂z ∂/∂y  ∂/∂z 0 ∂/∂x 4.1. Stress, strain and displacement approximations The macroscopic stress field within the HTS element is approximated as σ 0 = S0v v in Ωe 10 (21) where v is the vector of generalised stress degrees of freedom, S0v denotes the matrix of stress approximation functions chosen so as to automatically satisfy the equilibrium conditions Eq. (19)1,4 . Thus, LT S0v v = 0 in Ωe (22) and t = NS0v v on Γe (23) where t represents the traction vector induced by the macroscopic stress approximation field. The macroscopic strain and displacement fields are expressed analogously to Eq. (21) as (24) 0 = E0v v and u0 = U0v v where E0v and U0v are directly associated with the stress approximation by means of the compatibility equation (19)2 and constitutive equation (19)3 as S0v = C0 E0v = C0 LU0v (25) Since the stress approximation functions S0v are typically polynomial functions, the integration of E0v to get U0v is relatively straightforward. Rather than extend the solution space to capture the influence of the heterogeneities, as was briefly described in Section 3.1, here we enhance the macroscopic approximations to include the influence of the heterogeneities, thereby not increasing the number of unknowns. The total stress (macroscopic plus perturbation) field within the HTS element is approximated, following Eq. (3), as  σ = σ 0 + σ ∗ = S0v + S∗v v in Ωe (26) where S∗v is the perturbation counterpart to S0v . S∗v can be constructed from Eq. (14): σ ∗ = s∗ 0 (27) where s∗ is the set of analytically defined stress perturbations for six load cases, each one representing a unit component of the macroscopic strain Eq. (14). For the purposes of constructing S∗v , we approximate the macroscopic strain field as constant within each finite element and computed as the volume average of the actual macroscopic strain field. From Eq. (24), Z Z 1 1 0,ave 0 e  = e  dΩ = e Ev dΩe v = Eave (28) v v |Ω | Ωe |Ω | Ωe 11 Substituting 0,ave for 0 into Eq. (27) leads to σ ∗ = s∗ Eave v v (29) Thus, the matrix of stress perturbation approximation functions is: S∗v = s∗ Eave v (30) Analogously, the approximation of total strain and displacement fields within the element domain is given by   (31)  = E0v + E∗v v and u = U0v + U∗v v where the perturbation approximation matrices U∗v and E∗v are, as with their macroscopic counterparts, directly associated with the stress approximation as S∗v = C0 E∗v = C0 LU∗v (32) It is worthwhile noting that the stress perturbation fields and the corresponding traction perturbation fields, approximated as σ ∗ = S∗v v and t∗ = NS∗v v, remain in self-equilibrium. 4.2. Static boundary conditions Contrary to general condition in Eq. (19)4 , the equilibrium on the element traction boundary is imposed only in the weighted residual sense as: Z    W1T N σ 0 + σ ∗ − t dΓe = 0 (33) Γeσ along with W1 representing the matrix of weighting functions. Replacing the total stress field in Eq. (33) by its approximation from Eq. (26), the traction boundary condition becomes Z Z  T 0 ∗ e W1 N Sv + Sv v dΓ = W1T t dΓe (34) Γeσ Γeσ 4.3. Kinematic boundary conditions Compatibility inside the element domain Ωe is also enforced in a weighted residual sense, such that: Z  W2T 0 + ∗ − Lu dΩe = 0 (35) Ωe 12 Next, utilising integration by parts and applying Green’s theorem to W2T Lu, Eq. (35) results in Z Z  e ∗ 0 T (LT W2 )T u dΩe W2 Ev + Ev v dΩ + e e Ω Z ZΩ T e (NW2 ) u dΓ = (NW2 )T u dΓe − (36) Γeσ Γeu With the current formulation, it is not necessarily possible to find a solution to both Eqs. (34) & (36) that satisfies both traction and kinematic boundary conditions acting on the element boundary. As a consequence, Eq. (36) is relaxed by introducing an additional and independent approximation of displacements on the element traction boundary: uΓ = UΓ q in Γeσ (37) Here, q stands for the set of displacement unknowns and UΓ is the matrix of boundary displacement approximation functions. Such a formulation of the stress element leads to a hybrid approach [7, 22]. Given the above consideration, introducing Eq. (37) into Eq. (36) results in Z Z  T 0 ∗ e W2 Ev + Ev v dΩ + (LT W2 )T u dΩe e Ωe Z ZΩ T e (NW2 )T u dΓe (NW2 ) uΓ dΓ = − (38) Γeu Γeσ 4.4. Weighting functions In order to achieve an energy-consistent formulation, it is required that all weighted terms within the integrals defined above have the dimension of work. The weighting functions then directly follow from the integrands in Eq. (33) and Eq. (35) representing the increment of internal work of strains within Ωe and external work of tractions on Γeσ , respectively. These functions thus admit the following forms: W2 = S0v W1 = UΓ , (39) First, introducing Eq. (39)2 into Eq. (38) and taking into account condition (22) yields Z Z Z    T 0 T 0 ∗ e 0 T e (40) Sv Ev + Ev v dΩ − NSv UΓ q dΓ = NS0v u dΓe Ωe Γeσ Γeu 13 Second, introducing Eq. (39)1 into the traction boundary condition (34) yields Z Z e ∗ 0 T UTΓ t dΓe UΓ N(Sv + Sv )v dΓ = (41) Γeσ Γeσ Combining Eqs. (40) & (41) results in a coupled system of linear equations that can be expressed in compact form as      F −AT v pu = (42) −(A + A∗ ) 0 q −pσ where the submatrices on the left-hand side follow from Eqs (40, 41) and are given by the following integrals Z Z   T 0  0 T 0 ∗ e Sv Ev + Ev dΩ = N S0v Uv + U∗v dΓe (43) F = e e ZΩ ZΓ UΓ NS0v dΓe and A∗ = UΓ NS∗v dΓe (44) A = Γeσ Γeσ and for the terms on the right-hand side it holds Z Z  0 T e pu = NSv u dΓ , and pσ = Γeu Γeσ UTΓ t dΓe (45) Note that Eq. (43) illustrates that the F matrix can be evaluated via a boundary rather than volume integral. Thus all terms in Eq. (42) can be evaluated using boundary integrals only. The size of the system of equations to be solved simultaneously can be reduced via static condensation, representing a significant reduction in computational effort. First, from the first equation in Eq. (42), the generalised stress degrees of freedom v are expressed in terms of the displacement degrees of freedom q as v = F−1 (pu + AT q) This is then substituted into the second equation of Eq. (42) to yield:   (A + A∗ )F−1 AT q = pσ − (A + A∗ )F−1 pu (46) (47) This sparse system of equations is then solved for the displacement degrees of freedom q. Subsequently, the stress degrees of freedom v can then be calculated on an elementby-element basis. Our implementation of these HTS elements for composite materials (C-HTS elements) utilises displacement degrees of freedom that are associated with element faces rather than vertices. This has the advantage that the bandwidth of the stiffness matrix is minimised, as is interprocessor communication. 14 5. Numerical Examples The performance of the key components of the proposed strategy (micromechanical solution, self-compatibility algorithm, finite element analysis convergence, etc.), in terms of efficiency and accuracy, have been explored through two numerical examples. 5.1. Three ellipsoidal inclusions in matrix This example comprises three ellipsoidal inclusions embedded in a cube of matrix. The geometry of the problem is illustrated in Fig. 5 and details of the ellipsoids are given in Table 2, including the semi-axes’ dimensions, centroid coordinates and Euler angles φ, ν and ψ, which are successive rotations of the semi-axes a1 , a2 and a3 about global coordinate axes z, x and z, respectively. The cube has side lengths of 600. The displacement boundary conditions were prescribed on faces x = 300, y = 300 and z = 300 as ux = 0, uy = 0 and uz = 0, respectively. The remaining faces at x = −300, y = −300 and z = −300 were subject to uniform normal unit tractions. The Young’s modulus for the homogeneous matrix was chosen as E = 1 and for the heterogeneities as E = 2. Poisson’s ratio was chosen as ν = 0.1 for both materials. All units are consistent. It is worthwhile noting that the small contrast in stiffness between the two materials was chosen deliberately to maximise the extent of the perturbation fields emanating from the heterogeneities. Large contrasts in stiffness between the matrix and heterogeneities lead to perturbation fields that decay rapidly with distance from the heterogeneities. The close proximity of the three ellipsoidal heterogeneities to each other was also chosen deliberately in order to demonstrate the ability of the formulation to capture the interaction of multiple heterogeneities. Furthermore, the close proximity of one of the ellipsoids to a traction boundary was chosen to demonstrate the ability of the formulation to capture boundary effects. Incl. 1 2 3 Centroid coordinates x y z -48.07 78.27 14.81 16.45 178.64 -154.51 127.93 -65.94 -27.32 Semiaxes dim. a1 a2 a3 50 75 100 50 100 75 100 75 50 Euler φ 74.21 37.27 46.74 angles of ν 48.44 22.27 11.17 max ai ψ -48.07 -25.51 -26.30 Table 2: Topology and geometry of ellipsoidal inclusions of triple inclusion problem The problem was analysed using two three-dimensional finite element meshes with different densities, comprising C-HTS elements. The coarse mesh comprised 15 z y x Figure 5: Geometry and topology of triple inclusion problem 24 elements and 540 DOFs (Fig. 6a) and the second, refined, mesh comprised 192 elements and 3888 DOFs (Fig. 6b). Results from the two enhanced finite element (a) (b) Figure 6: Triple inclusion task discretization by C-HTS elements: a) Coarse mesh with 24 enhanced elements (540 DOFs) b) Finer mesh with 1,536 enhanced elements (29,376 DOFs) analyses are plotted in the yz-plane (at x = 0). Fig. 7a and Fig. 8a show the two meshes in this plane. The σyy stress component for both analyses are shown in Fig. 7b and Fig. 8b. In addition, a reference finite element analysis of the same problem was undertaken for comparison sake. The reference analysis utilised HTS elements but without the proposed enhancement. Unlike the other two analyses, the reference analysis utilised a mesh that explicitly resolved the three ellipsoidal heterogeneities and comprised 309, 406 tetrahedrons with 5, 596, 776 DOFs (Fig. 9a). The corresponding mesh and stress results of the reference analysis are shown in Fig. 9. Comparison of the stress results from the enhanced formulation and the reference analysis leads to the relative error plots shown in Fig. 7c and Fig. 8c. It can be seen that even the 16 very coarse mesh with the enhanced formulation results in good agreement. Further comparison of the stress results is shown in Fig. 10, where it can been seen that along the traction boundary, the finer mesh of enhanced elements is able to capture the imposed constant stress field more accurately than the very much finer reference mesh. The perturbation fields are based on the assumption of (a) (b) (c) Figure 7: Coarse mesh solution: a) Enhanced finite element mesh in yz plane at x = 0, b) σyy in ref 2 yz plane, c) error calculated as (σyy − σyy )2 /σyy (a) (b) (c) Figure 8: Finer mesh solution: a) Enhanced finite element mesh in yz plane at x = 0, b) σyy in yz ref 2 plane, c) error calculated as (σyy − σyy )2 /σyy a heterogeneity in an infinite medium but the enhanced formulation still exhibits convergence in the regions strongly influenced by the traction boundary. 5.2. L-shaped specimen The proposed modelling strategy is also demonstrated on an example with a large number of inclusion. A 3D L-shaped specimen with fully fixed boundary conditions on the right surface of the right-hand arm and normal traction applied on the top 17 z y x (a) (b) z y (c) (d) Figure 9: Reference analysis: a) discretization of entire body containing 309,406 tetrahedra, b) mesh refinement on surface of heterogeneities, c) Reference finite element mesh in yz plane at x = 0, d) ref in yz plane. σyy (a) (b) Figure 10: Detailed 3D-plots of σyy stress concentrations due to the boundary effects in yz plane at x = 0: Comparison of solution from reference analysis with a) coarse mesh C-HTS solution with 24 enhanced elements b) refined mesh C-HTS solution with 1,536 enhanced elements 18 surface of the left-hand arm is analysed, see Fig. 11. The length of the plate is 300 in both x and y direction, the depth is 150 in z direction. The Young moduli were chosen as E = 1 and E = 2 for matrix and inclusion respectively. Poisson’s ratio was ν = 0.1 for both material phases. The microstructure comprised 2,523 spherical inclusions varying in size between 4 and 8 with a uniform spatial distribution (Fig. 11b). All units are consistent. The solution for three different mesh densities (Fig. 11c, d & e) are compared in Fig. 12. These results are plotted on the x-y mid-plane. Fig. 12(a–d) shows a plot of the σxy stress component for the three different meshes. These results show that the complex stress distribution resulting from the heterogeneities can be captured and that the solution is converging with mesh refinement. Further local mesh refinement near corners and stress concentrations is possible, although this was not undertaken in this case. As an estimate of the computational overhead of the enhanced formulation for this particular problem on 16 processors, we note that the total solution for 30, 007 C-HTS elements was 597s, whereas the problem on the identical mesh of HTS elements for the equivalent homogeneous problem consumed 1.6s of computer time. This represents a large increase of computational time in comparison to the homogenous problem. However, it should be noted that not all aspects of the solution procedure have been parallelised. It should also be noted that it was not possible to obtain the reference solution for this problem by means of conventional FEA due to the excessive number of degrees of freedom associated with a mesh required to resolve all of the heterogeneities. The mesh generation itself was not possible using our currently available software and hardware facilities. Furthermore, comparison with a PUM based solution, was also not undertaken due to the complexity of the problem. 6. Conclusions A new micromechanics-enhanced finite element formulation has been presented for modelling the influence of a large number of heterogeneities in composite materials in a computationally efficient manner. The strategy exploits closed form solutions derived by Eshelby for ellipsoidal inclusions in order to determine the mechanical perturbation fields as a result of the underlying heterogeneities. Approximation functions for these perturbation fields are then incorporated into a finite element formulation to augment those of the macroscopic fields. A significant feature of this approach is that the finite element mesh does not explicitly resolve the heterogeneities, although the resulting solution still explicitly accounts for their presence. In contrast with traditional homogenization approaches, this method does not rely 19 (a) (c) (b) (d) (e) Figure 11: L-shaped specimen a) geometry, b) microstructure comprising 2,523 spherical inclusions, c) coarse mesh comprising 1074 tetrahedral elements, d) medium mesh comprising 8772 elements and e) fine mesh comprising 30007 elements. on separation of scale and does not suffer from loss of information due to averaging or localization. The proposed technique has been implemented into a hybrid-Trefftz stress (HTS) element formulation and it has been shown that the resulting enhanced elements (CHTS) require significantly fewer degrees of freedom to capture the detailed mechanical response compared to standard finite elements. The paper also outlines how the proposed micromechanics approach could be used within a Partition-of-Unity (PoU) formulation, although we conclude that this does not fully exploit the advantages of PoU methods and that the proposed hybrid-Trefftz formulation is most appropriate. A self-compatibility algorithm is used to determine the mutual interactions between inclusions, assuming that the eigenstrain fields are uniform within the domain of each inclusion. It was found that even for topologies exhibiting extremely small distances between the inclusions, this assumption is sufficient. Furthermore, it has 20 (a) (b) (c) (d) Figure 12: Solution of L-shaped specimen on x-y mid-plane. a) microstructure. Plots of σxy resulting from b) coarse mesh, c) medium mesh and d) fine mesh. been shown that boundary effects, that are not accounted for by the classical micromechanical solution due to the assumption of an infinite medium, can be captured through local mesh refinement. 21 We have implemented this formulation into our FE code that is optimized for parallel computing. Additional parallelization of the micromechanical aspects of the formulation needs to be investigated for increased efficiency. Further research is required in order to incorporate other improvements such as nonuniform eigenstrains [14], debonding effects [24] and inclusions of arbitrary shape by evaluating the perturbation functions numerically [12, 13]. Acknowledgements. Funding by the Glasgow Research Partnership in Engineering (GRPE) under project “Multi-scale modelling of fibre reinforced composites” is gratefully acknowledged. This research was partially supported by the Czech Science Foundation through project GAČR 103/09/P490 and by the Ministry of Education, Youth and Sports of the Czech Republic trough project MSM 684077003. All the analyses were performed by means of YAFFEMS FE code. For more details we refer to the code’s homepage at http://code.google.com/p/yaffems. Appendix A. Detailed solution of perturbation displacements The displacement perturbation field in an infinite homogeneous material due to a uniform eigenstrain ετij applied to an ellipsoidal region Ω is provided by the following integral equation [14, Eq. (11.30)] u∗i = 1 [Ψjk,jki − 2νΦkk,i − 4(1 − ν)Φik,k ] 8π(1 − ν) (A.1) where ν denotes the Poisson’s ratio and the elliptic potentials Ψij and Φij are defined as [14, Eq. (11.32)] Z Z 1 τ 0 0 τ τ Ψij = εij |x − x | dx = εij ψ, and Φij = εij dx0 = ετij φ (A.2) 0 Ω Ω |x − x | The integrals φ and ψ in Eq. (A.2) are the harmonic and bi-harmonic potentials respectively. Note that in Eq. (A.1) and thereafter, standard index notation is employed, together with the generalised summation convection due to Mura [14]. Thus, a P repeated index is summed according to the Einstein summation rule (e.g. ai bij = 3i=1 ai bij ), whereas a non-repeated upper-case index equals to the lowerP3 case equivalent (e.g. ai bi cIj = i=1 ai bi cij ). The symbol ajk,i denotes the partial derivative of ajk with respect to the coordinate xi . By combining Eq. (A.1) and Eq. (A.2), we obtain u∗i =   τ 1 εjk ψ,jki − 2νδjk ετjk φ,i − 4(1 − ν)δij ετjk φ,k 8π(1 − ν) 22 (A.3) Similarly to Eshelby’s approach [17], the displacement perturbations are expressed in compact form: u∗i = Lεijk ετjk , Lεijk = 1 [ψ,jki − 2νδjk φ,i − 4(1 − ν)δij φ,k ] 8π(1 − ν) (A.4) where the third-order operator Lijk maps a transformation eigenstrain ετjk to the displacement perturbation field u∗i . It is therefore analogous to the well-known Eshelby tensor [17], which relates a transformation eigenstrain to the strain perturbation field. The operator Lijk can be conveniently expressed in terms of the Ferrers-Dyson elliptic integrals, e.g. [14, Eq. (11.36)] Z ∞ ds I(λ) = 2πa1 a2 a3 , ∆(s) λ Z ∞ ds , Ii (λ) = 2πa1 a2 a3 2 (ai + s)∆(s) λ Z ∞ ds Iij (λ) = 2πa1 a2 a3 (A.5) 2 (ai + s)(a2j + s)∆(s) λ where ai stands for the i-th semi-axis of ellipsoid Ω and ∆(s) is obtained from 3 Y ∆ (s) = (ai + s)2 2 (A.6) i=1 The variable λ is the largest positive root of equation [14, Eq. (11.37)] xi xi =1 (aI + λ)2 (A.7) Notice that λ is generally position dependent and non-zero for the points xi placed outside the inclusion domain Ω, hence called the exterior points. Contrary, λ = 0 for interior points. All integrals in (A.5) admit a closed-form expression in terms of the LegendreJacobi integrals of the first and second kind, defined as a fuction of an auxiliary angle θ, [14, Eq. (12.17)]. It is worth noting that its definition via [14, Eq (11.18)] s a2 θ = sin−1 1 − 32 (A.8) a1 23 is valid for interior points only and not everywhere as stated in [14]. Thus, it needs to be replaced with a general formula: s a21 − a23 (A.9) θ = sin−1 a21 + λ available, e.g. in [25, 26]. Moreover, the following identity [14, Eq. (11.40.4)] [xn xn Ii...jN (λ)],p = 2xp Ii...jP + Ii...j,p (λ) (A.10) will be repeatedly proved useful in the sequel. It follows from Eq. (A.4) that to express operator Lεijk , we need to evaluate the first-order derivatives of the potential φ and the third-order derivatives of ψ. To this end, we start with expressions [14, Eq. (11.38)] and φ(λ) = 12 [I(λ) − xn xn IN (λ)] (A.11) n o ψ,i (λ) = 21 xi 2φ(λ) − a2I [II (λ) − xn xn IIN (λ)] = 12 xi Q(λ) (A.12) Employing Eq. (A.10), the first derivative of φ becomes n o φ,i (λ) = 12 I,i (λ) − [xn xn IN (λ)],i = 12 [I,i (λ) − 2xi II (λ) − I,i (λ)] = −xi II (λ) (A.13) The third derivative of potential ψ is expressed from Eq. (A.12) as ψ,ijk (λ) = 12 [δij Q,k (λ) + δik Q,j (λ) + xi Q,jk (λ)] (A.14) With the help of Eqs. (A.13) and (A.10), the term Q,j can be evaluated from   Q,j (λ) = 2φ,j (λ) − a2I [II (λ) − xn xn IIN (λ)],j = 2xj a2I IIJ (λ) − IJ (λ) (A.15) This provides the second derivatives of Q in the form n    o Q,jk (λ) = 2 δjk a2I IIJ (λ) − IJ (λ) + xj a2I IIJ,k (λ) − IJ,k (λ) (A.16) After utilising the derivatives of Q(λ) and re-ordering the indices, Eq. (A.14) becomes     ψjki (λ) = xi δjk a2J IJI (λ) − II (λ) + xk δji a2J IJK (λ) − IK (λ)     + xj δki a2J IJK (λ) − IK (λ) + xj xk a2J IJK,i (λ) − IK,i (λ) (A.17) 24 with IIJ,k and II,j provided by [14, Eqs. (11.40.1, 11.40)] Ii...jk,p (λ) = λ,p = (a2i −2πa1 a2 a3 λ,p , + λ) . . . (a2j + λ)(a2k + λ)∆(λ) 2xp (a2I + λ)2 a2P + λ xi xi (A.18) Now we are in a position to evaluate Lεijk in terms of the Ferrers-Dyson integrals. Introducing Eqs. (A.13) and (A.17) into Eq. (A.4) gives     [8π(1 − ν)] Lεijk = xi δjk a2J IJI (λ) − II (λ) + (xk δji + xj δki ) a2J IJK (λ) − IK (λ)   + xj xk a2J IJK,i (λ) − IK,i (λ) + 2νδjk xi II (λ) + 4(1 − ν)δij xk IK (λ) (A.19) Since λ = 0 for the points inside the inclusion, recall Eq. (A.7), all derivatives of Ii...j vanish as well. Therefore, Eq. (A.19) yields     [8π(1 − ν)] Lε,int = xi δjk a2J IJI (λ) − II (λ) + (xk δji + xj δki ) a2J IJK (λ) − IK (λ) + νδjk xi II (λ) + 4(1 − ν)δij xk IK (λ) (A.20) and Eq. (A.4) receives its final form Lεijk = Lε,int ijk +   1 xj xk a2J IJK,i (λ) − IK,i (λ) 8π(1 − ν) (A.21) For implementation purposes, it is worth noting that Eq. (A.4) admits the Voigt representation:  τ     ε11  τ   ∗      ε    L111 L122 L133 L112 L123 L113   u1   22 τ  ε ∗ 33 u =  L211 L222 L233 L212 L223 L213  (A.22) 2ετ12   2∗     u3 L311 L322 L333 L312 L323 L313    2ετ23      τ   2ε13 References [1] F. Feyel, J.-L. Chaboche, FE2 multiscale approach for modelling the elastoviscoplastic behaviour of long fibre SiC/Ti composite materials, Computer Methods in Applied Mechanics and Engineering 183 (3-4) (2000) 309 – 330. 25 [2] M. Geers, V. Kouznetsova, W. Brekelmans, Multi-scale computational homogenization: Trends and challenges, Journal of Computational and Applied Mathematics 234 (2010) 2175 – 2182. [3] N. Sukumar, D. Chopp, N. Moës, T. Belytschko, Modeling holes and inclusions by level sets in the extended finite-element method, Computer Methods in Applied Mechanics and Engineering 190 (46–47) (2001) 6183–6200. [4] N. Moës, J. Dolbow, T. Belytschko, A finite element method for crack growth without remeshing, International Journal for Numerical Methods in Engineering 46 (1) (1999) 131–150. [5] N. Moës, M. Cloirec, P. Cartraud, J.-F. Remacle, A computational approach to handle complex microstructure geometries, Computer Methods in Applied Mechanics and Engineering 192 (28–30) (2003) 3163–3177. [6] G. Wells, L. Sluys, R. D. Borst, Simulating the propagation of displacement discontinuities in a regularised strain-softening medium, International Journal for Numerical Methods in Engineering 53 (5) (2002) 1235–1256. [7] L. Kaczmarczyk, C. J. Pearce, A corotational hybrid-Trefftz stress formulation for modelling cohesive cracks, Computer Methods in Applied Mechanics and Engineering 198 (15-16) (2009) 1298 – 1310. doi:DOI:10.1016/j.cma.2008. 11.018. [8] P. Kabele, Multiscale framework for modeling of fracture in high performance fiber reinforced cementitious composites, Engineering Fracture Mechanics 74 (12) (2007) 194 – 209, fracture of Concrete Materials and Structures. doi:DOI: 10.1016/j.engfracmech.2006.01.020. [9] P. Nicolaou, S. Semiatin, A hybrid micromechanical-macroscopic model for the analysis of the tensile behavior of cavitating materials, Metallurgical and Materials Transactions A 35 (13) (2004) 1141–1149. [10] A. Fritsch, C. Hellmich, L. Dormieux, Ductile sliding between mineral crystals followed by rupture of collagen crosslinks: Experimentally supported micromechanical explanation of bone strength, Journal of Theoretical Biology 260 (2) (2009) 230 – 252. doi:DOI:10.1016/j.jtbi.2009.05.021. [11] Z. Sharif-Khodaei, J. Zeman, Microstructure-based modeling of elastic functionally graded materials: One dimensional case, Journal of Mechanics of Materials and Structures 3 (2008) 1773–1796. arXiv:0802.0511. 26 [12] V. Maz’ya, G. Schmidt, Approximate approximations, American Mathematical Society, Providence, RI, 2007. [13] J. Novák, Calculation of elastic stresses and strains inside a medium with multiple isolated inclusions, in: M. Papadrakakis, B. Topping (Eds.), Proceedings of the Sixth International Conference on Engineering Computational Technology, Stirlingshire, UK, 2008, p. 16 pp, paper 127. doi:10.4203/ccp.89.127. [14] T. Mura, Micromechanics of Defects in Solids., Martinus Nijhoff Publishers, P. O. Box 163, 3300 AD Dordrecht, The Netherlands, 1987. 587. [15] J. Vorel, M. Šejnoha, Evaluation of homogenized thermal conductivities of imperfect carbon-carbon textile composites using the mori-tanaka method, Structural Engineering and Mechanics 33 (4) (2009) 429–446. [16] B. Pichler, S. Scheiner, C. Hellmich, From micron-sized needle-shaped hydrates to meter-sized shotcrete tunnel shells: micromechanical upscaling of stiffness and strength of hydrating shotcrete, Acta Geotechnica 3 (4) (2008) 273–294. [17] J. D. Eshelby, The determination of the elastic field of an ellipsoidal inclusion, and related problems, Proceedings of the Royal Society of London. Series A, Mathematical and Physical Sciences 241 (1226) (1957) 376–396. [18] B. Pichler, C. Hellmich, et al., Estimation of influence tensors for eigenstressed multiphase elastic media with nonaligned inclusion phases of arbitrary ellipsoidal shape, Journal of Engineering Mechanics 136 (2010) 1043–1053. [19] J. Melenk, I. Babuška, The partition of unity finite element method: Basic theory and applications, Computer Methods in Applied Mechanics and Engineering 139 (1–4) (1996) 289–314. [20] I. Babuška, J. Melenk, The partition of unity method, International Journal for Numerical Methods in Engineering 40 (4) (1997) 727–758. [21] G. Wells, Discontinuous modelling of strain localisation and failure, Ph.D. thesis, Delft University of Technology (2001). [22] J. Teixeira de Freitas, Formulation of elastostatic hybrid-trefftz stress elements, Computer Methods in Applied Mechanics and Engineering 153 (1998) 127 – 151. 27 [23] Z. Bittnar, J. Šejnoha, Numerical methods in structural mechanics, American Society of Civil Engineers, 1996. [24] J. Ju, Y. Ko, Micromechanical Elastoplastic Damage Modeling of Progressive Interfacial Arc Debonding for Fiber Reinforced Composites, International Journal of Damage Mechanics 17 (4) (2008) 307. [25] J. D. Eshelby, The elastic field outside an ellipsoidal inclusion, Proceedings of the Royal Society of London. Series A, Mathematical and Physical Sciences (1959) 561–569. [26] M. Rahman, On the Newtonian potentials of heterogeneous ellipsoids and elliptical discs, Proceedings: Mathematical, Physical and Engineering Sciences 457 (2013) (2001) 2227–2250. 28
5cs.CE
arXiv:1605.05577v1 [math.CV] 18 May 2016 AN IRREDUCIBILITY CRITERION FOR POWER SERIES GUILLAUME ROND AND BERND SCHOBER Abstract. We prove an irreducibility criterion for polynomials with power series coefficients generalizing previous results given in [GBGP] and [ACLM1]. 1. Introduction The aim of this note is to provide a natural approach to an irreducibility criterion for polynomials with power series coefficients (see Theorem 2.3). The first version of the criterion has been given in [GBGP] and then has been generalized in [ACLM1]. In this note we give a more natural and elementary proof of a general version of this criterion. In particular, our statement holds over any field while the previous ones were only proven for algebraically closed fields of characteristic zero. Moreover, the only hypothesis that we need is that the projection of the Newton polyhedron has exactly one vertex while the previous known versions were involving additional technical conditions. Let us recall that the proof given in [GBGP] uses toric geometry and Zariski Main Theorem while the one provided in [ACLM1] is based on a generalization of the Newton’s method for plane curves. Our proof is essentially based on the following well known version of Hensel’s Lemma: Proposition 1.1 (Hensel’s Lemma). Let (R, m) be a Henselian local ring. A monic polynomial P (Z) ∈ R[Z], that is the product of two monic coprime polynomials modulo mR[Z], is in fact the product of two coprime monic polynomials. We begin by giving some definitions and our main result (Theorem 2.3). In a second part we give an example showing that our main result cannot be extended in a more general setting. Finally, let us mention that this irreducibility criterion is very useful in the study of quasi-ordinary hypersurfaces (see [ACLM2] or [MS]). 2. An irreducibility criterion We denote by k[[x]] the ring of formal power series in n variables x := (x1 , . . . , xn ) over a field k. For any vector β ∈ Zn we set xβ := xβ1 1 · · · xβnn and for any positive integer q xq := xq1 · · · xqn . Let P (Z) ∈ k[[x]][Z] be a monic polynomial with coefficients in k[[x]]. We denote by NP(P ) the Newton polyhedron of P (Z). Let us write X cα,j xα Z j . P (Z) = Z d + α∈Zn ,j<d ≥0 1991 Mathematics Subject Classification. 12E05, 13F25, 14B05, 32S25. G. Rond was partially supported by ANR projects STAAVF (ANR-2011 BS01 009) and SUSI (ANR12-JS01-0002-01). 1 2 GUILLAUME ROND AND BERND SCHOBER In this note we assume that P (Z) 6= Z d . The associated polyhedron of P , denoted by ∆P , is the convex hull of   dα | cα,j 6= 0 + Rn ≥0 . d−j Note that ∆P is the projection of NP(P ) from the point (0, . . . , 0, d) on the subspace given by the first n coordinates. X Definition 2.1. Let ω ∈ Rn bα xα of k[[x]] we set >0 . For a non zero element b = α∈Zn ≥0 νω (b) := min{α · ω = n X i=1 and Inω (b) := αi ωi | bα 6= 0} ∈ R≥0 X bα x α . α|α·ω=νω (b) For such a ω and P (Z) ∈ k[[x]][Z] as before we define ωn+1 ∈ R≥0 by min{v · ω | v ∈ ∆P } ∈ R≥0 . d Then we set ω ′ := (ω, ωn+1 ) and we define ωn+1 := νω′ (P ) := min{α · ω + jωn+1 | cα,j 6= 0} = dωn+1 X cα,j xα Z j . and Inω′ (P ) := Z d + (α,j)|(α,j)·ω ′ =νω′ (P ) This former polynomial is weighted homogeneous for the weights ω1 ,..., ωn , ωn+1 . Definition 2.2. Let P (Z) ∈ k[[x]][Z] be a monic polynomial of degree d in Z. The n polynomial P has an orthant associated polyhedron if ∆P = dγ + Rn ≥0 for some γ ∈ Q≥0 . In this case Inω′ (P ) does not depend on ω and we denote it by PIn , i.e. X PIn (x, Z) := Z d + cα,j xα Z j . α =γ (α,j)| d−j In this case we define P (Z) := PIn (1, Z) = Z d + X cα,j Z j ∈ k[Z]. α =γ (α,j)| d−j If we write γ = β , q where β ∈ Zn ≥0 , q ∈ {1, . . . , d} and gcd(β1 , . . . , βn , q) = 1, we have that xdβ P (Z) = PIn (xq1 , . . . , xqn , xβ Z). Here is a picture of the Newton polyhedron of a polynomial having an orthant associated polyhedron with n = 2 (thick lines represent the edges of the Newton polyhedron) : Z (0, d) (α, j) x2 dγ = x1 dα d−j AN IRREDUCIBILITY CRITERION FOR POWER SERIES 3 Theorem 2.3. Let us assume that P (Z) is irreducible and has an orthant associated polyhedron. Then PIn (x, Z) ∈ k[x, Z] is not the product of two coprime polynomials. Proof. Let us assume that PIn (x, Z) is the product of two coprime polynomials of k[x, Z]. We denote by P1 (x, Z) and P2 (x, Z) these two polynomials, so we have PIn (x, Z) = P1 (x, Z) · P2 (x, Z), and we may assume that they are monic respectively of degree d1 and d2 (with d1 +d2 = d) since PIn (x, Z) is monic. Let us write P i (Z) := Pi (1, Z) for i = 1, 2. Thus we have that P (Z) = P 1 (Z) · P 2 (Z). α j Let M = M (x, Z) := c x Z be a monomial of P (x, Z). We have that M (xq1 , . . . , xqn , xβ Z) = c xqα+jβ Z j and qα + jβ ≥∗ dβ since Thus we have (1) α d−j ≥∗ β q if j < d, where ≥∗ denotes the product order on Rn ≥0 . P (xq1 , . . . , xqn , xβ Z) = xdβ P (Z) + Q(x, Z)  for some Q(x, Z) ∈ (x)k[[x]][Z]. In particular, P (Z) + Q(x, Z) = P 1 (Z)P 2 (Z) modulo (x). Thus by Hensel’s Lemma P (Z) + Q(x, Z) = Pe1 (x, Z) · Pe2 (x, Z), for some monic polynomials Pe1 (x, Z) and Pe2 (x, Z) ∈ k[[x]][Z] equal respectively to P 1 (Z) and P 2 (Z) modulo (x). So we have that     P (xq , xβ Z) = xd1 β Pe1 (x, Z) · xd2 β Pe2 (x, Z) and But we have that i h xdi β Pei (x, Z) In = Pi (xq , xβ Z) for i = 1, 2. xdi β Pei (x, Z) = Ri (x, xβ Z) for some monic polynomials Ri (x, Z) ∈ k[[x]][Z] of degree di . Thus P (xq , Z) = R1 (x, Z) · R2 (x, Z) and RiIn (x, Z) = Pi (xq , Z) ∈ k[xq , Z] for i = 1, 2. Since PIn = Inω′ (P ) and RiIn = q Inω′ (Ri ) for i = 1, 2, for any ω ∈ Rn >0 we can apply Lemma 2.5 for P0 = P (x , Z) to see that R1 (x, Z), R2 (x, Z) ∈ k[[xq ]][Z]. Hence P is not irreducible.  Remark 2.4. The key point in the proof of this theorem is the fact that equation (1) is satisfied when P has an orthant associated polyhedron. Lemma 2.5. Let P0 ∈ k[[xq ]][Z] be a monic polynomial, where q ∈ Z>0 , and let us assume that P0 = R1 R2 , where R1 and R2 are monic polynomials of k[[x]][Z]. Let ω ∈ Rn >0 and let ω ′ be defined as in Definition 2.1. If Inω′ (R1 ), Inω′ (R2 ) ∈ k[xq , Z] and if they are coprime then R1 , R2 ∈ k[[xq ]][Z]. Proof. If char(k) = p > 0 let us write q = pe m with m ∧ p = 1. If char(k) = 0 we set m := q and p := 1. Then we define Y e Q := R1 (ξ1 x1 , . . . , ξn xn , Z)p where (ξ1 , . . . , ξn ) runs over the n-uples of m-th roots of unity in an algebraic closure n e of k. Then Q ∈ k[[xq ]][Z] and Inω′ (Q) = Inω′ (R1 )m p . Thus Inω′ (R2 ) and Inω′ (Q) are coprime. Hence the greatest common divisor of P0 and Q in k((x))[Z] is R1 . But the greatest common divisor does not depend of the base field so R1 is also the greatest 4 GUILLAUME ROND AND BERND SCHOBER common divisor of P0 and Q in k((xq ))[Z] hence R1 ∈ k[[xq ]][Z]. By symmetry we also get R2 ∈ k[[xq ]][Z].  Corollary 2.6. Let us assume that P (Z) = Z d +a1 Z d−1 +. . .+ad ∈ k[[x]][Z] is irreducible. Then we have the following properties: i) If P (Z) has an orthant associated polyhedron the convex hull of Supp(Inω′ (P )) is a segment joining (0, d) to (dγ, 0), and dγ is the initial exponent of ad for the valuation νω . ii) If P (Z) has an orthant associated polyhedron let u ∈ Zn+1 be the primitive vector such that mu = (−dγ, d) for some m ∈ N, and set y := (x, Z). Then we can write PIn (x, Z) = xdγ Q(y u ) where Q(T ) ∈ k[T ] is not the product of two coprime polynomials. In particular, Q(T ) has only one root in an algebraic closure of k. iii) If the Newton polyhedron of P (Z) has no compact face of dimension > 1 then P (Z) has an orthant associated polyhedron and its Newton polyhedron has only one compact face of dimension one which is the segment of i). Proof. If PIn (x, 0) = 0 then Z divides PIn (x, Z). But by Theorem 2.3 PIn (x, Z) is not the product of two coprime polynomials thus PIn (x, Z) = Z d . This contradicts the fact that PIn (x, Z) has a non zero monomial of the form xα Z j for j < d. Hence PIn (x, 0) 6= 0 and i) is proven. We can write PIn (x, Z) = Z d + d−1 X c(d−j)γ,j x(d−j)γ Z j . j=0 So we have that d−1 PIn (x, Z) = x dγ X Zd Zj + c (d−j)γ,j xdγ xjγ j=0 ! . n By i) we have that dγ ∈ Zn ≥0 . This implies that jγ ∈ Z≥0 as soon as c(d−j)γ,j 6= 0. For any such j, let i ≥ 0 be such that (2) iu = (−jγ, j). Then i ∈ Z≥0 since u is primitive. P Thus PIn (x, Z) = xdγ (y mu + i<m ci y iu ), where ci := ciu+(dγ,0) m P ∀i. i We set Q(T ) := T + i<m ci T ∈ k[T ]. If Q(T ) has two distinct roots in an algebraic closure of k then Q(T ) may be factorized as the product of two coprime monic polynomials, let us say Q(T ) = Q1 (T ) · Q2 (T ), where Q1 (T ) and Q2 (T ) ∈ k[T ] are coprime and monic. Let m1 and m2 be the respective degrees of Q1 and Q2 and define di ∈ Z≥0 by (−di γ, di ) = mi u for i = 1, 2. Then we have     PIn (x, Z) = xdγ Q(y u ) = xd1 γ Q1 (y u ) · xd2 γ Q2 (y u ) . Moreover, by (2), a monomial of xd1 γ Q1 (y u ) has the form  j Z d1 γ iu d1 γ cx y = cx = c x(d1 −j)γ Z j , xjγ for 0 ≤ i ≤ m1 , i.e. for 0 ≤ j ≤ d1 . Hence xd1 γ Q1 (y u ) ∈ k[x, Z]. By symmetry we also have that xd2 γ Q2 (y u ) ∈ k[x, Z]. AN IRREDUCIBILITY CRITERION FOR POWER SERIES 5 Then the polynomials P1 (x, Z) := xd1 γ Q1 (y u ) and P2 (x, Z) := xd2 γ Q2 (y u ) are coprime which contradicts Theorem 2.3. Thus ii) is proven. Let us assume that the Newton polyhedron of P (Z) does not have an orthant associated polyhedron. This means that ∆P has at least two distinct vertices denoted by γ1 and γ2 such that the segment [γ1 , γ2 ] is included in the boundary of ∆P . Thus the Newton polyhedron of P has at least three different vertices a := (0, d), b := ( d−j γ1 , j) and d γ2 , k). Since a, b, c are vertices of NP(P ) the triangle delimitated by these three c := ( d−k k points is a face of NP(P ) so the Newton polyhedron of P has at least one face of dimension two.  3. An example concerning compact faces of dimension > 1 Let n = 2 and let us replace the variables (x1 , x2 ) by (x, y) for simplicity. We set P (Z) := Z 2 − (x3 − y 5 )2 + y 11 = (Z − x3 + y 5 )(Z + x3 − y 5 ) + y 11 seen as a polynomial of k[[x, y]][Z] where k is an algebraically closed field of characteristic different from 2. We will show that P does not have an orthant associated polyhedron, since ∆P has two different vertices. On the other hand, we will prove that P (Z) is irreducible while for every ω ∈ R2>0 the polynomial Inω′ (P ) is always the product of two coprime monic polynomials. This shows that Theorem 2.3 cannot be extended to polynomials without an orthant associated polyhedron. The Newton polyhedron of P (Z) is the convex hull of {(6, 0, 0), (0, 10, 0), (0, 0, 2)} + R3≥0 . The associated polyhedron ∆P of P (Z) is the convex hull of {(6, 0), (0, 10)} + R2≥0 and has two vertices v = (6, 0) and u = (0, 10). For ω ∈ R2>0 , if 6ω1 < 10ω2 then Inω′ (P ) = Z 2 − x6 = (Z − x3 )(Z + x3 ). If 6ω1 > 10ω2 then we have that Inω′ (P ) = Z 2 − y 10 = (Z − y 5 )(Z + y 5 ). If 6ω1 = 10ω2 we have that Inω′ (P ) = Z 2 − (x3 − y 5 )2 = (Z − x3 + y 5 )(Z + x3 − y 5 ). Thus in all cases Inω′ (P ) is the product of two coprime polynomials (since char(k) 6= 2). On the other hand, P (Z) is irreducible since (x3 − y 5 )2 − y 11 is not a square in k[[x, y]]. References [ACLM1] E. Artal Bartolo, P. Cassou-Noguès, I. Luengo, A. Melle Hernández, On ν-quasi-ordinary power series: factorization, Newton trees and resultants, Topology of algebraic varieties and singularities (Jaca, 2009), Contemp. Math., vol. 538, Amer. Math. Soc., Providence, RI, 2011, pp. 321-343. [ACLM2] E. Artal Bartolo, P. Cassou-Noguès, I. Luengo, A. Melle Hernández, Quasi-ordinary singularities and Newton trees, Mosc. Math. J., 13, (2013), no. 3, 365-398. [GBGP] E. R. Garcı́a Barroso, P. D. González-Pérez, Decomposition in bunches of the critical locus of a quasi-ordinary map, Compos. Math., 141, (2005), no. 2, 461-486. [MS] H. Mourtada, B. Schober, A polyhedral characterization of quasi-ordinary singularities, arXiv:1512.07507. 6 GUILLAUME ROND AND BERND SCHOBER Guillaume Rond, Aix-Marseille Université, CNRS, Centrale Marseille, I2M, UMR 7373, 13453 Marseille, France E-mail address: [email protected] Bernd Schober, Institut für Algebraische Geometrie, Leibniz Universität Hannover, Welfengarten 1, 30167 Hannover, Germany E-mail address: [email protected]
0math.AC
1 Performance Evaluation of Spatial Complementary Code Keying Modulation in MIMO Systems arXiv:1709.05525v1 [cs.IT] 16 Sep 2017 Amir H. Jafari, Timothy O’Farrell Dept. of Electronic & Electrical Engineering, University of Sheffield, Sheffield, United Kingdom, S1 3JD [email protected] Abstract—Spatial complementary code keying modulation (SCCKM) is proposed as a novel block coding modulation scheme. An input binary sequence is modulated based on the different lengths of complementary code keying (CCK) modulation and then spread across the transmit antennas (spatial domain) in a multiple input multiple output (MIMO) system exploiting orthogonal frequency division multiplexing (OFDM). At the receiver side, zero forcing equalization is applied to the OFDM modulated data to mitigate the effect of the multipath fast fading channel and then followed by maximum likelihood (ML) detection to retrieve the input sequence. The performance of SCCKM in different MIMO systems is compared to that of spatial modulation (SM) as a baseline scheme. Simulation results show that for the same spectral efficiency, SCCKM is able to substantially improve the bit error rate (BER). Index Terms—multiple-inputmultiple-output (MIMO), orthogonal frequency division multiplexing (OFDM), complementary code keying, spatial complementary code keying (SCCK) modulation, spatial modulation (SM). I. INTRODUCTION T He increasing demand for a seamless wireless link with ubiquitous coverage and higher data rate is causing rapid growth of data traffic. Taking into account the limited RF spectrum, such data deluge motives to conduct further research to deliver more robust modulation, forward error coorection (FEC) and equalization techniques that can boost the performance over the physical layer. Significant progress on modulation and coding techniques have been achieved, many of which have been implemented in industry. However, despite of such progress, there is an inevitable need for new coding and modulation techniques that are more invulnerable to the channel impairments and interference. Spatial modulation (SM) [1][2][3] has been proposed as a modulation scheme which aggregates the spectral efficiency and mitigates the interference in a MIMO system. The scheme is based on simultaneous use of modulation symbol and transmit antenna number index as specific combinations to form sets of codes that will be distributed across the antennas [3]. SM maps the data stream to unique combinations of a constellation symbol (according to modulation scheme) and an index number of one transmit antenna as two data units to carry the information, allowing an implicit transmission of n extra bits per OFDM sub-channel where n equals log2 Nt and Nt is the number of transmit antennas. Additional spatial multiplexing gain, no need for transmit antenna synchronization, and avoiding inter channel interference (ICI) are its key achievements. Proposing more robust and spectrally efficient transmission techniques for MIMO systems, spatial complementary code keying modulation (SCCKM) is an appealing scheme by acquiring the characteristics of complementary sequences. Complementary sequences [4] are promising set of codes that profit from impulse response shaped auto-correlation function. Indeed, the summation of the auto-correlation functions of any two complementary sequences for any non-zero shift is zero, enhancing the system’s resistance against inter-symbolinterference (ISI). Complementary sequences establish the basis of complementary code keying (CCK) modulation which was first introduced as an 8-bit (chip) spreading sequence representing one symbol in IEEE802.11b [5][6] offering a chip rate of 11 Mchps, and has been able to increase the data rate to 5.5Mbps and 11Mbps in an spread spectrum system [7]. Fig. 1 shows the correlation properties of both complementary and 8-bit CCK codes. For further study on CCK modulation can refer to [8] [9] [10]. CCK codewords can be of various lengths, however, we only study length two, four and eight, leaving other lengths for future study. We further introduce a novel spatial modulation scheme by applying CCK modulation to the spatial domain known as SCCKM where CCK codewords are embedded across transmit antennas in a MIMO system. The rest of this paper is organized in the following manner. In Section II, we concisely discuss complementary and polyphase complementary sequences and then derive length two, four and eight CCK codes and discuss their properties. In section III, we present SCCKM and illustrate how CCK modulation is applied to a MIMO-OFDM system. In Section IV, the performance of a SCCKM is studied and compared to that of SM. Conclusions are drawn in Section V. II. COMPLEMENTARY CODE KEYING MODULATION A. Complementary and Polyphase Complementary Sequences Complementary sequences [4] as core of CCK modulation, are set of codes for which the sidelobes of auto-correlation functions of any two complementary pair summate to zero. They consist of non-complex elements and are generated based on the following kernel. Considering the two primary sequences M1 and N1 representing 1 and 1, any longer sequence 2 involves three phases. To maintain the symmetrical nature of the modulation, the three phases are evenly distributed in the constellation diagram and are specified as (0, 2π/3, 4π/3). (4) is then used to obtain the 4-bit CCK codewords and demonstrates how the three phases presented in (3), are fundamental to 4-bit CCK modulation.   φ 1 φ1 φ1 φ1 M1 =  φ2 0 φ2 0  (3) φ3 φ3 0 0 16 8−bityCCK IdealyComplementaryyCodes SumyofyAuto−CorrelationySeries 14 12 10 8 6 4 Considering the three phases, there are twenty seven phase combinations and accordingly twenty seven 4-bit CCK codewords computed by (4). i h (4) C1 = ej(φ1 +φ2 +φ3 ) , ej(φ1 +φ3 ) , ej(φ1 +φ2 ) , −ej(φ1 ) 2 0 0 5 10 15 Length Fig. 1: Correlation properties of CCK codes. can be constructed using Mk = Nk−1 Nk−1 and Nk = Mk−1 N̂k−1 where N̂ denotes the complement of the sequence N . Polyphase complementary sequences [11] are similar with the difference that they are made up of complex elements [12]. Elements of a polyphase sequence have unit magnitudes with associated phase of θ and generated as presented by (1). It is worth noting that phase recognition and accordingly (1) play central role in generation of CCK codewords [12]. This will be realized in the sequel as generation of different lengths of CCK modulation are discussed. ( 1 if 0 < t < T x(t) = p(t − kT)ejθ and p(t) = (1) 0 otherwise B. Two Bit CCK Modulation The 2-bit CCK modulation takes a sequence of 2 bits as the input stream. Two bits refer to two phases as shown in matrix (2) and for sake of symmetry, they are determined as (0, π). There are four phase combinations which are exploited by (2) to derive the four 2-bit CCK codewords, noting that each phase combination corresponds to one CCK codeword. Table.I shows the computed 2-bit CCK codwords.  M0 = φ1 φ2 φ1 0  , h i C0 = ej(φ1 +φ2 ) , ej(φ1 ) (2) C. Four Bit CCK Modulation The 4-bit CCK modulation takes 4 bit sequences as the input data stream. The matrix shown in (3) represents the phase arrangement associated with 4-bit CCK codewords which TABLE I: 2-bit CCK Modulation To maintain the one-to-one correspondence between the possible sixteen 4 bit binary input data streams and the generated 4-bit CCK codewords, the optimum subset containing only sixteen 4-bit CCK codewords is specified in three stages. In first stage, an statistically large number of random subsets where each contains sixteen 4-bit CCK codewords are selected. In second stage, the four dimensional Euclidean distance between all sixteen pairs of all subsets are computed. This stage narrows down the number of appropriate subsets by choosing the subsets that maximize the minimum Euclidean distance. In the last stage, the number of times that the specified minimum Euclidean distance exists within all remained subsets is counted and the subset that contains the least number of the specified minimum Euclidean distance between its pairs is selected as the sub-optimum 4-bit CCK codeword as represented in (5).                             1 1 −0.5 + 0.866i −0.5 − 0.866i −0.5 − 0.866i −0.5 − 0.866i −0.5 + 0.866i 1 1 −0.5 + 0.866i −0.5 − 0.866i −0.5 + 0.866i 1 −0.5 + 0.866i −0.5 − 0.866i −0.5 + 0.866i 1 −0.5 + 0.866i −0.5 + 0.886i −0.5 − 0.866i 1 −0.5 + 0.866i −0.5 − 0.866i −0.5 − 0.866i 1 1 −0.5 + 0.866i −0.5 + 0.866i −0.5 − 0.866i −0.5 − 0.866i 1 1 1 −1 −0.5 − 0.866i −1 1 −1 1 −1 −0.5 − 0.866i −1 −0.5 + 0.866i −1 −0.5 − 0.866i −1 −0.5 − 0.866i 0.5 − 0.866i −0.5 + 0.866i 0.5 − 0.866i −0.5 − 0.866i 0.5 − 0.866i −0.5 − 0.866i 0.5 − 0.866i −0.5 + 0.866i 0.5 − 0.866i 1 0.5 + 0.866i −0.5 + 0.866i 0.5 + 0.866i −0.5 + 0.866i 0.5 + 0.866i 1 0.5 + 0.866i (5) Binary Sequence CCK Codeword 00 1,1 01 -1,1 The input data stream will be divided into streams of 4 bits and then arbitrarily modulated to 4-bit CCK codewords presented in (5) which will be spatially distributed across antennas. 10 -1,-1 D. Eight Bit CCK Modulation 11 1,-1 The 8-bit CCK modulation has been previously implemented in IEEE802.11b [6]. The 8-bit CCK modulation splits                             3 TABLE II: Sub-stream phase allocation in 8-bit CCK Modulation Bit Sequence a1 a0 a3 a2 a5 a4 a7 a6 Phase φ1 φ2 φ3 φ4 the 8-bit stream a0 a1 a2 a3 a4 a5 a6 a7 to four 2-bit sub-streams where each sub-stream is allocated a phase as presented in table II. Based on the binary 2-bit sub-stream, the corresponding phase of 2-bit sub-stream varies as shown in table III. The four phases associated with 8-bit sequence are formulated in the matrix shown in (6) which clearly demonstrates how the elements of (7) are constructed [12]. Inspection of (7) demonstrates that each of its elements is indeed an exponent that is powered to the sum of the phases forming columns of the matrix given in (6) [12]. The minus sign of fourth and seventh elements follows the rule discussed in generation of complementary sequences. The 8-bit CCK modulated codewords are shown in table IV.   φ 1 φ1 φ1 φ1 φ1 φ1 φ1 φ1  φ 2 0 φ2 0 φ2 0 φ2 0   (6) M2 =   φ 3 φ3 0 0 φ3 φ3 0 0  φ4 φ4 φ4 φ4 0 0 0 0 h C2 = ej(φ1 +φ2 +φ3 +φ4 ) , ej(φ1 +φ3 +φ4 ) , ej(φ1 +φ2 +φ4 ) , −ej(φ1 +φ4 ) , ej(φ1 +φ2 +φ3 ) , ej(φ1 +φ3 ) , i −ej(φ1 +φ2 ) , ej(φ1 ) (7) 8-bit CCK modulation generates 256 different codewords where 64 codewords are distinctively orthogonal. This orthogonality property results in low cross-correlation and consequently efficient interference mitigation which allows the simultaneous transmission by multiple antennas in a MIMO system. E. Minimum Distance Between Complementary Codes As discussed earlier, in order to minimize the bit error probability, it is required to maximize the Euclidean distance which highly impacts the performance of CCK modulation [12]. In following, the minimum Euclidean distance achieved by different CCK modulations considering their lengths and associated phases are derived. For a complementary code of length N , there will be additional log2 N orthogonal codes together forming a subset of length 1+log2 N . Considering there are M phases associated with each code, the number of bits per codeword will be (1+ log2 N ) × log2 M and hence 1 + N/2 symbols suffice to obtain the 1+log2 N required number of phases through 1+log2 N phase equations where each phase is used TABLE III: Numerical phase allocation in 8-bit CCK Modulation ak+1 aa 00 01 10 11 Phase 0 π π/2 −π/2 TABLE IV: 8-bit CCK Modulation 8-bit Binary Data Stream 00111011 2-bit Sub-Stream 00, 11, 10, 11 Phase Allocation 0, -π/2, π/2, -π/2 8-bit CCK Modulated Codeword -i,1,-1,i,1,i,i,1 in N/2 of phase equations. The minimum Euclidean distance between any two codewords is given in (8) considering that the least phasor rotation between N/2 symbols is 2π/M . Having computated the Euclidean distance for all 2-bit ,4bit and 8-bit CCK codwords, it is perceived that 8-bit CCK modulation profits from maximum Euclidean distance among its corresponding codewords in comparison to 2-bit and 4bit CCK modulations. This considerably lowers the bit error probability which consequently improves the data rate. r N 2π [1 − ej( M ) ] (8) dmin = 2 III. S PATIAL C OMPLEMENTARY C ODE K EYING M ODULATION The matrix B(k) of size m × Nsub denotes the input binary sequence intended for transmission through the channel where m varies according to the order of CCK modulation and Nsub refers to the number of OFDM sub-channels. CCK modulation is applied to the columns of B(k) where each column will be block coded to generate CCK codewords of accordingly desired length (two, four and eight). The generated CCK codewords will be spatially spread across the transmit antennas proposing the SCCKM scheme. The matrix C(k) is the output of SCCKM which is of dimension Nt × Nsub and Nt is the number of transmit antennas. A bank of OFDM modulators are placed at the transmitter side where OFDM is applied to each row of C(k). The OFDM modulated vectors will be simultaneously transmitted by Nt transmit antennas across the time-variant wireless channel where additive white Gaussian noise and fading will degrade the signal. The channel is represented by the block matrix H(τ, t) which is of dimension Nr ×Nt and Nr is the number of receive antennas. Each channel element is a vector of size 1 × p and p represents the number of channel coefficients between each transmit-receive pair.  h1,1 (τ, t) h2,1 (τ, t) .. .   H(τ, t) =   hNr ,1 (τ, t) h1,2 (τ, t) h2,2 (τ, t) .. . hNr ,2 (τ, t)  hm,n (τ, t) = hm,n (τ, t)1 hm,n (τ, t)2 ··· ··· .. . ··· ··· h1,Nt (τ, t) h2,Nt (τ, t) .. .      hNr ,Nt (τ, t) (9)  hm,n (τ, t)p (10) OFDM demodulation will be applied to rows of the received signal matrix R(t) using the Nr demodulators at the receiver. 4 Fig. 2: Spatial complementary code keying modulation block diagram. The output from OFDM demodulation R(k) is a matrix of size Nr × m. To lessen the effect of the channel impairments, the output from OFDM demodulation is equalized in the frequency domain by applying the zero forcing (ZF) equalization to each of its column vectors (More effective equalization techniques like minimum mean square (MMS) are left for future study). Note that k represents the discrete time index. The equalization process is performed on a sub-channel basis which requires the channel corresponding to each subchannel. It should be mentioned that for non-symmetrical MIMO systems, the pseudo-inverse is implemented for ZF equalization. The equalized data stream will be divided into sub-streams received on each sub-channel, and the Euclidean distance between the sub-stream received on each sub-channel and contents of the CCK codebook (which consists of all the generated CCK codewords) will be computed. In this scenario, the CCK codebook consists of L = m2 CCK codewords. The codeword E(k) resulting in minimum Euclidean distance will be opted as desired one. The opted codeword will then be de-mapped to the corresponding data sequence. The cross-correlation properties of CCK codes mitigate the impact of inter-antenna interference and dismiss the need for inter-antenna synchronization. This allows simultaneous transmission by all antennas on each subcarrier and hence achieving spatial multiplexing gain. R(t) = H(τ, t) ⊗ X(t) + N(t) (11) z(k) = H(k)−1 r(k) (12) X(t) and N(t) present the matrix of OFDM symbols and the matrix of the additive white Gaussian noise (AWGN), respectively and ⊗ denotes convolution in time domain. j = 1, 2, ..., L Ei (k) = min(d2i ) We consider different MIMO systems and transmit 1000 frames where each contains 20 OFDM symbols. The channel is assumed to be a time-variant frequency-selective multipath channel with a maximum delay spread of 50 ns. The multipath channels are assumed to be statistically independent. The noise is a temporally and spatially additive white Gaussian one. It is assumed that full knowledge of the channel is available at the receiver with perfect time and frequency synchronization. The normalized signal-to-interference-plus-noise ratio (EbN0) is used. Table. V summarizes the simulation parameters. Fig.3 illustrates the performances of 2-bit SCCKM and SM. The number of transmit antennas is kept at 2 while using 2, 4 and 8 antennas at the receiver. It is realized that spatial diversity at the receiver side has a substantial impact on the performance of both schemes. However, this impact is further boosted in SCCKM. At EbN0 of 10 dB, increasing the number of receive antennas from 2 to 4 and 4 to 8 lowers the BER by ∼ 38.46x and 183.59x in SCCKM and ∼ 12.65x and 51.02x in SM-BPSK. In a 2x8 MIMO, the starting BER of SCCKM is also ∼ 3.52x lower than SM-BPSK. Fig.4 shows that in a 4x4 MIMO (employing the same number of antennas at both transmitter and receiver sides), 4-bit SCCKM outperforms the SM. The SCCKM has a higher spectral efficiency as it transmits 4 bits per sub-channel comparing to SM-BPSK which sends 3 bits. SCCKM and SM4QAM offer the same spectral efficiency. However, at EbN0 of 10 dB, the SCCKM is capable to achieve ∼ 1.6x lower BER than SM-4QAM. As pointed earlier, increasing the number of receive antennas leverages spatial diversity which would improve the performance of both SM and SCCKM schemes. Fig.4 also illustrates the performances of SCCKM and SM in a TABLE V: System Simulation Parameters di 2 (cj , si ) = (cj − si )(c∗j − s∗i ) i = 1, 2, ..., Nsub IV. SIMULATION Parameter (13) (14) d2 (cj , si ) refers to the squared Euclidean distance between the received signal si on each sub-channel and each content of the CCK codebook cj . Ei presents the CCK codeword with minimum Euclidean distance associated with ith sub-channel. Setting Carrier Frequency (GHz) 2 Transmission Bandwidth (MHz) 20 Number of sub-channels 256 Number of Frames 1000 Numer of OFDM symbols 20 Symbol Period (ns) 50 Cyclic Prefix Length 16 Channel Delay Spread (ns) 50 Transmit Power (W) 1 5 0 0 10 10 −1 10 −2 −2 10 Bit Error Rate BitAErrorARate 10 −3 10 2x2ASM−BPSK 2x2ASM−4QAM 2x2A2−bitASCCKM 2x4ASM−BPSK 2x4ASM−4QAM 2x4A2−bitASCCKM 2x8ASM−BPSK 2x8A2−bitASCCKM −4 10 −5 10 −6 10 −6 10 −7 0 2 4 6 8 10 Fig. 3: BER comparison of 2-bit SCCKM and SM. 0 10 −1 10 −2 10 BitCErrorCRate −4 10 −5 Eb/N0A(dB) −3 10 −4 10 4x4CSM−BPSK 4x4CSM−4QAM 4x4C4−bitCSCCKM 4x8CSM−BPSK 4x8CSM−4QAM 4x8C4−bitCSCCKM −5 10 −6 10 −3 10 10 −7 10 8x16 SM−BPSK 8x16 8−bit SCCKM −1 10 0 2 4 6 8 10 Eb/N0C(dB) Fig. 4: BER comparison of 4-bit SCCKM and SM. 4x8 MIMO system. It is clearly seen that at EbN0 of 9 dB, 4bit SCCKM reaches the BER of 0.06 × 10−4 in comparison to BER of 0.07 × 10−2 achieved by SM-BPSK and SM-4QAM. This suggests that while SM offers a lower spectral efficieny (SM-BPSK transmits 3 bits per sub-channel), it yet requires further increase in signal power to reach the same BER. Fig.5 shows the performance of 8-bit SCCKM in a 8x16 MIMO system. Achieving the BER of 10−7 at BER of less than 8 dB clearly demonstrates the unique performance of 8-bit SCCKM. SM-BPSK only achieves the BER of 10−3 at EbN0 of 8 dB. This performance is partly due to spatial diversity at the receiver using 16 antennas, and partly due to the point that 8-bit SCCKM has got the best correlation properties in terms of least cross-correlation comparing to 2-bit and 4-bit SCCKM. The low cross-correlation of CCK codes (and in particular 8-bit CCK), considerably boosts their resistivity to both channel impairments and inter-antenna interference. V. CONCLUSION SCCKM as a novel spatial modulation scheme based on different lengths of CCK modulation was proposed. It was expressed that CCK modulation profits from low crosscorrelation property which enhances its resistance to interference. This particularly mitigates the inter antenna interference and eases antenna synchronization in MIMO systems where all antennas can actively transmit at the same time instant. SCCKM was applied to a MIMO-OFDM system and its per- 10 0 1 2 3 4 Eb/N0 (dB) 5 6 7 8 Fig. 5: BER comparison of 8-bit SCCKM and SM. formance was compared to that of SM. SCCKM outperforms the SM by considerably lowering the BER at the same EbN0. In a MIMO system with more antennas at the receiver side, SCCKM results in notable BER reduction with starting BER being less than 10−1 . The 8-bit SCCKM was also realized as the most promising SSCKM due to its cross-correlation properties. R EFERENCES [1] R. Mesleh, H. Haas, S. Sinanovic, C. W. Ahn, and S. Yun, “Spatial modulation,” Vehicular Technology, IEEE Transactions on, vol. 57, no. 4, pp. 2228–2241, 2008. [2] S. Ganesan, R. Mesleh, H. Haas, C. W. Ahn, and S. Yun, “On the performance of spatial modulation ofdm,” in Signals, Systems and Computers, 2006. ACSSC ’06. Fortieth Asilomar Conference on, pp. 1825–1829, 2006. [3] R. Mesleh, H. Haas, C. W. Ahn, and S. Yun, “Spatial modulation - a new low complexity spectral efficiency enhancing technique,” in Communications and Networking in China, 2006. ChinaCom ’06. First International Conference on, pp. 1–5, 2006. [4] M. J. Golay, “Complementary series,” Information Theory, IRE Transactions on, vol. 7, pp. 82–87, April 1961. [5] “IEEE standard for information technology–telecommunications and information exchange between systems Local and metropolitan area networks–Specific requirements Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications,” IEEE Std 802.11-2012 (Revision of IEEE Std 802.11-2007), pp. 1–2793, March 2012. [6] C. Jonietz, W. Gerstacker, and R. Schober, “Transmission and reception concepts for wlan ieee 802.11b,” Wireless Communications, IEEE Transactions on, vol. 5, no. 12, pp. 3375–3381, 2006. [7] A. Al-Banna, T. R. Lee, J. L. LoCicero, and D. Ucci, “11 mbps cck - modulated 802.11b wi-fi: Spectral signature and interference,” in Electro/information Technology, 2006 IEEE International Conference on, pp. 313–317, 2006. [8] K. Halford, S. Halford, M. Webster, and C. Andren, “Complementary code keying for rake-based indoor wireless communication,” in Circuits and Systems, 1999. ISCAS ’99. Proceedings of the 1999 IEEE International Symposium on, vol. 4, pp. 427–430 vol.4, 1999. [9] S. bo Liu, A. Huang, Z. yang Zhang, and Z. Zhang, “Performance analysis of cck modulation under multipath fading channel,” in Signal Processing Symposium, 2004. NORSIG 2004. Proceedings of the 6th Nordic, pp. 276–279, 2004. [10] J. Mikulka and S. Hanus, “Complementary code keying implementation in the wireless networking,” in Systems, Signals and Image Processing, 2007 and 6th EURASIP Conference focused on Speech and Image Processing, Multimedia Communications and Services. 14th International Workshop on, pp. 315–318, 2007. [11] R. L. Frank, “Polyphase complementary codes,” Information Theory, IEEE Transactions on, vol. 26, no. 6, pp. 641–647, 1980. [12] R. van Nee, “Ofdm codes for peak-to-average power reduction and error correction,” in Global Telecommunications Conference, 1996. GLOBECOM ’96. ’Communications: The Key to Global Prosperity, vol. 1, pp. 740–744 vol.1, 1996.
7cs.IT
Localization of protein aggregation in Escherichia coli is governed by diffusion and nucleoid macromolecular crowding effect Anne-Sophie Coquel1,3,4, Jean-Pascal Jacob5, Mael Primet5, Alice Demarez1, Mariella Dimiccoli5, Thomas Julou6, Lionel Moisan5, Ariel B. Lindner1,2*, Hugues Berry3,4* 1. Institut National de la Santé et de la Recherche Médicale, Unité 1001, 75014 Paris, France 2. Faculty of Medicine, Paris Descartes University, 75014 Paris, France 3. EPI Beagle, INRIA Rhone-Alpes, 69603 Villeurbanne, France. 4. University of Lyon, LIRIS UMR5205 CNRS, 69621 Villeurbanne, France 5. University Paris Descartes, MAP5 - CNRS UMR 8145, 75270 Paris, France 6. Laboratoire de Physique Statistique de l’École Normale Supérieure, UMR 8550 CNRS, 24 rue Lhomond, 75005 Paris, France *Equal contribution; corresponding authors: [email protected]; [email protected] 1 ABSTRACT Aggregates of misfolded proteins are a hallmark of many age-related diseases. Recently, they have been linked to aging of Escherichia coli (E. coli) where protein aggregates accumulate at the old pole region of the aging bacterium. Because of the potential of E. coli as a model organism, elucidating aging and protein aggregation in this bacterium may pave the way to significant advances in our global understanding of aging. A first obstacle along this path is to decipher the mechanisms by which protein aggregates are targeted to specific intercellular locations. Here, using an integrated approach based on individual-based modeling, time-lapse fluorescence microscopy and automated image analysis, we show that the movement of aging-related protein aggregates in E. coli is purely diffusive (Brownian). Using single-particle tracking of protein aggregates in live E. coli cells, we estimated the average size and diffusion constant of the aggregates. Our results evidence that the aggregates passively diffuse within the cell, with diffusion constants that depend on their size in agreement with the Stokes-Einstein law. However, the aggregate displacements along the cell long axis are confined to a region that roughly corresponds to the nucleoid-free space in the cell pole, thus confirming the importance of increased macromolecular crowding in the nucleoids. We thus used 3d individual-based modeling to show that these three ingredients (diffusion, aggregation and diffusion hindrance in the nucleoids) are sufficient and necessary to reproduce the available experimental data on aggregate localization in the cells. Taken together, our results strongly support the hypothesis that the localization of aging-related protein aggregates in the poles of E. coli results from the coupling of passive diffusionaggregation with spatially non-homogeneous macromolecular crowding. They further support the importance of "soft" intracellular structuring (based on macromolecular crowding) in diffusion-based protein localization in E. coli. 2 AUTHOR SUMMARY Localization of proteins to specific positions inside bacteria is crucial to several physiological processes including chromosome organization, chemotaxis or cell division. Since bacterial cells do not possess internal sub-compartments (e.g., cell organelles) nor vesicle-based sorting systems, protein localization in bacteria must rely on alternative mechanisms. In many instances, the nature of these mechanisms remains to be elucidated. In Escherichia coli, the localization of aggregates of misfolded proteins at the poles or the center of the cell has recently been linked to aging. However, the molecular mechanisms governing this localization of the protein aggregates remain controversial. To identify these mechanisms, we have devised an integrated strategy combining innovative experimental and modeling approaches. Our results show the importance of the increased macromolecular crowding in the nucleoids, the regions within the cell where the bacterial chromosome preferentially condensates. They indicate that a purely diffusive pattern of aggregates mobility combined with nucleoid occlusion underlies their accumulation in polar and mid-cell positions. 3 INTRODUCTION While aging is a fundamental characteristic of living systems, its underlying principles are still to be fully deciphered. Recent observations of ageing in unicellular models, in absence of genetic or environmental variability, have paved way to new quantitative experimental systems to address ageing's underlying molecular mechanisms [1,2]. Further, the notion of aging was extended beyond asymmetrically dividing unicellular organisms such as the budding yeast Saccharomyces cerevisiae or the bacterium Caulobacter crescentus -where a clear morphological difference and existence of a juvenile phase distinguishes between the aging mother cell and its daughter cells [3,4]- to symmetrically dividing bacteria. This pushed aging definition to demand functional asymmetry as minimal requirement for a system to age [5]. Specifically, Escherichia coli and Bacillus subtilis were shown to age as observed by loss of fitness at small generation scale (<10) [6-8 (for B. subtilis),9-11] and increased probability of death at larger generation scale (up to 250 generations) [12]. Age in this system was defined as the number of consecutive divisions a cell has inherited the older cellular pole [7]; the sibling that inherits the older cell pole was shown to grow slower than the newer pole sibling. From a cellular viewpoint, aging is arguably due to the accumulation of damage over time that degenerates cellular functions, ultimately affecting the survival of the organism [1,2]. In the case of E. coli, a significant portion of the age-related fitness loss is accounted for by the presence of protein aggregates that accumulate in the bacterial older poles [7,9,10]. Such accumulation is reminiscent of many known age-related protein folding diseases [1]. Preferential sequestration of damaged proteins is also observed in S. cerevisiae between the bud and the mother cell [14-16] and between specific intracellular compartments in yeast and mammalian cell [17,18]. Therefore spatial localization, as non-homogeneous distribution of damaged protein aggregates in the cytoplasm, has been postulated to be an optimized strategy allowing cell populations to maintain large growth rates in the face of the accumulation of damages that accompany metabolism during cell life [15,19,20]. These results suggest that spatial localization of damaged protein aggregates could present an ageing process conserved across different living kingdoms. Given the documented link between protein aggregation and ageing, the short life-span, ease of quantification of large number of individuals, molecular biology and genetics accessibility of E. coli may make this bacterium into a relevant model system to elucidate protein aggregation role in a ageing. A first obstacle along this path is to understand the mechanisms by which cells can localize 4 protein aggregates at specific locations within their intracellular space. Generally, thermal agitation and the resulting diffusion (Brownian movement) of proteins forbid localization in space on long timescale, since diffusion is a mixing process that will render every accessible position equiprobable. Inside eukaryotic cells, active mechanisms such as directed transport or sub-compartmentalization by internal membranes permit to counteract the uniforming effects of diffusion. It is however known since the 1952 seminal paper by Alan Turing [21] that subtle interactions between chemical reactions and diffusion can spontaneously lead to steady states with non-uniform spatial extension. This is also true for bacteria, as exemplified by the spatial oscillations in the minCDE system [22] or in the case of diffusiontrapping coupling [24]. Recently, the importance of precise sub-cellular localization of proteins within bacteria has become apparent [24,25,26]. In absence of a general cytoskeleton-based directed, active transport mechanism nor internal membranes, this would favor diffusion-reaction based localization within bacteria (see however [13,27,28]). Specifically it is still unclear whether for single-cell organisms, preferential localization mechanism of damaged proteins is based on active directed transport or passive Brownian diffusion. In S. cerevisiae, initial reports incriminated a role for active directed transport (actin cytoskeleton) or sub-compartmentalization (membrane tethering) in the segregation of molecular damages (damaged proteins, episomal DNA) in the mother cell [14,29]. Yet, more recent reports contradict the need for directed transport, e.g. on the actin cable, and favor diffusion-based localization [16,30,31]. In E. coli, protein aggregates have consistently been reported to localize in the cell poles and in the middle of the cell [7,9,10]. The number of distinct aggregates per cell seems to depend on the cellular environment. In non-stressed conditions, at most one aggregate per cell is observed with rare cases (<4%) of two foci per cell detected [6]; under heat shock, most cells contain two or three aggregates [8,9]. In heat-shock conditions, Winkler et al. [9] concluded in favor of a Brownian passive motion of the protein aggregates. This study also pointed out that one simple possible passive aggregate localization mechanism may be based on spatially non-homogeneous macromolecular crowding. Indeed, in healthy cells, the bacterial chromosome spontaneously condensates [32] thus delineating a restricted sub-region of the cell called “nucleoid”, where molecular crowding is much larger than in the rest of the cytoplasm [33]. Macromolecular crowding then alternates along the cell long axis between low intensity zones (cytosol) and large intensity ones (nucleoid). Monte-Carlo dynamics modeling suggests that such non-homogeneous spatial distribution of the molecular crowding may be sufficient to localize large proteins to the cell poles [34]. In line with this proposal are experimental reports that the observed aggregates preferentially localize in the 5 nucleoid-free regions of the cell [7,9], i.e. precisely in the regions of alleged lower macromolecular crowding. In spite of these hints though, whether the transport of the agingrelated protein aggregates in E. coli is of a directed active nature or purely passive Brownian origin remains elusive, since contradictory results indicate that this process would include ATP-dependent stages [9]. Here, our aim is to determine whether the movement of aging-related protein aggregates in E. coli is purely diffusive (Brownian) or includes some active process (ATP-dependent, directed transport or membrane tethering). To this aim, we devised an integrated approach combining time-lapse fluorescence microscopy of E. coli cells in vivo, open-source automated image analysis, and individual-based modeling. Our results strongly indicate that purely diffusive pattern of aggregates mobility combined with nucleoid occlusion underlie their accumulation in polar and mid-cell positions. RESULTS Trajectory analysis of single protein aggregates In vivo analysis of individual trajectories of proteins of interest (or aggregates thereof) is a powerful method to determine whether the movement of the target protein is of Brownian nature or additionally exhibits further ingredients (active directed transport, caging or corralling effects, transient trapping, anomalous sub-diffusion) [16,35-40]. Here, we focused on naturally forming protein aggregates tethered with the small heat-shock protein IbpA in E. coli whose spatio-temporal dynamics have been implicated in aging of the bacteria [7,13]. To characterize the motion of IbpA-tethered aggregates in single E. coli cells, we monitored intracellular trajectories of single foci of IbpA-YFP fusion proteins [7,41] in non-stressed conditions (37°C, in LB medium, see Materials and Methods). For the automatic quantification of the resulting time-lapse fluorescence microscopy movies, we developed dedicated image analysis and tracking software tools (see Materials and Methods). This software suite performs automatic segmentation and tracking of the cells (Figure 1A). Moreover, it automatically detects the fluorescence aggregates foci and monitors their movements relative to the cell in which they are located, with sub-pixel resolution. Localization of protein aggregates is non-homogeneous along the cells Detectable protein aggregates (in the form of localized fluorescence foci) were observed in half of the cells monitored (54%; N 6 cells = 1625 recorded in 72 independent movies), in agreement with previous experimental reports [7,13]. No further foci were detected by doubling exposure time (see materials and methods). This suggests that smaller undetected aggregates that may exist either diffuse faster than the acquisition time and are therefore not recorded as “localized”, or alternatively, that they merge into bigger, detectable aggregates before full maturation of the fluorophore (≤ 7.5 min). [42]. Cells in non-stressed conditions tend to exhibit smaller copy numbers of distinct protein aggregates than in heat-shocked conditions (compare e.g. [7] with [9,10]). Accordingly, in our hands, nearly all the focicontaining cells (98.8%) displayed a single fluorescence focus within the imaging time, while the remaining cells had at most two foci. The distribution of the (initial) spatial localization of the aggregates is displayed in Figure 1. As a convention, we denote the long axis of the bacteria cell as its x-axis and the short one as its y-axis (Figure 1B). In this figure, we express the aggregate position relative to the cell center of mass, and rescale to [-1, +1]2 range. Thus the two bacterial poles correspond to x =-1 and x =+1 in this relative scale. The histogram of the location of the aggregate at the starting point of each trajectory is shown in Figure 1C. The distribution is highly non-homogeneous, with most of the aggregates predominantly localized at one of the two poles, and the others mainly around the middle of the cell. This distribution is similar to the results obtained in [7] (Fig 2-E-F in [7]), except that here, since we do not differentiate between old and new poles, the amplitude of the polar modes in Figure 1C are roughly symmetrical. Similar distributions were also obtained in heat-shock conditions [9,10]. The marked localization of the aggregates suggests they might be tethered to the membrane at the poles (and center) at some point of the aggregation process, thus restricting their motion. Figure 1D shows the location of the polar aggregates at first detection (both poles were pooled). Because these experimental results are two-dimensional projections of threedimensional positions, one cannot directly determine whether the aggregates are bound to the cell membrane or spread in the three dimensional cytoplasmic bulk. To this aim, we generated 104 aggregate positions (uniformly) at random in a volume of the same shape and dimensions than the cell pole. Fig. 1E shows the two-dimensional projection of these positions when the proteins were randomly located in the three-dimensional bulk whereas Fig. 1F shows the two-dimensional projections when the proteins were randomly located on the cytoplasmic membrane enclosing the bulk. To quantify these plots, we analyzed the local density of protein positions in the twodimensional projections. Assuming the 2d projection of the pole is a semi-ellipse of radii ax and ay (green dashed shapes in Fig. 1 D-G), its area is 1/2πaxay. The area of the elementary 7 semi-elliptic crescent Ds (gray in Fig. 1G) delimited by the semi-ellipse of radii sax and say (0<s<1) and that of radii (s+ds)ax and (s+ds)ay is thus A(Ds)= πaxay ds(s+ds/2). Varying s between 0 and 1, we counted the number of aggregate positions ns found within the semielliptic disk Ds and computed the corresponding density (correlation function) ρ(s)=ns/ A(Ds). Therefore, when s approaches 1, ρ(s) represents the local density of aggregate positions close to the external boundary of the pole (green dashed shapes in Fig. 1 D-F) whereas for small s values, ρ(s) gives the local density of aggregate positions close to center of the pole (i.e. the center of the semi-ellipse). To validate the approach, we generated random aggregate positions directly in two dimensions (uniform distribution inside the 2D semiellipse) and checked that the density ρ(s) exhibits a constant value with s (Fig. 1H, dotted black line). When ρ(s) was used to quantify the data of Fig. 1E (aggregates in the bulk), the density was roughly constant up to s~0.3 then decayed smoothly for larger values (Fig. 1H, blue line), in agreement with the slight decay of the aggregate density close to the semi-ellipse boundary that is already visible in Fig. 1E. By contrast, with the data shown in Fig. 1F (aggregates in the membrane around the bulk), ρ(s) increased first slowly with increasing s, then very abruptly close to 1 (Fig. 1H, red line), in agreement with the accumulation of aggregate locations close to the semi-ellipse boundary that is already visible in Fig. 1F. Therefore, these simulated data show that the distortions due to the projection in two dimensions are expected to manifest as strongly increasing ρ(s) values close to s=1 if the aggregates are tethered to the membrane versus smoothly decreasing ρ(s) if the aggregates are randomly spread in the 3d bulk. Finally, we used this approach to quantify the experimental data described above (Fig. 1I). The local density ρ(s) exhibits a non-monotonous behavior. Close to the pole boundary, ρ(s) clearly shows an almost linear decay, which is very similar to the behavior observed at large s for bulk simulations (Fig.1H). For small s values however, ρ(s) increases with s, thus indicating a phenomenon that hinders aggregate location close to the cell center. To conclude, these results plead in favor of a 3d bulk distribution of the aggregates in the poles, thus rejecting the hypothesis that they would be tethered or attached at the cell membrane. Polar protein aggregates exhibit Brownian motion We next quantified the displacements of the polar aggregates. To this end we used two temporal regimes in our time-lapse fluorescence microscopy. Low sampling frequency (LF; 0.33 Hz) over long time scale (LT; 5 minutes) was used to assure that we monitor entirely the range of displacements (n=1149), whereas high frequency sampling (HF; 1.67 Hz) was used 8 to increase the temporal resolution of the linear initial regimes observed in mean-squared displacements. These conditions were optimized considering the trade-off between extensive exposure leading to bleaching of the foci and satisfactory temporal resolution. The resulting mean displacements along the x or y-axis are shown in Figure S1. For both sampling frequencies, the mean displacement along the y-axis is roughly stationary and fluctuates around a close-to-zero value. In order to analyze the fluctuations, we rescaled the mean displacement along the y-axis so that it fluctuates around exactly zero. The mean displacement along the x-axis displays a close-to-linear increase with time (Figure S1) with a slope of around 0.05 µm/min, a value that corresponds to the linear approximation of the cell elongation rate under our experimental conditions (doubling time around 30 minutes, during which the cell half-length grows from ≈ 1.0-2.0 to ≈ 2.0-3.5 µm). Therefore, the raw movement of the aggregates along the x-axis is dominated by ballistic displacement toward the pole under the effect of cell elongation. We corrected for this passive transport by subtracting the increase rate of the cell elongation. The corrected mean displacements (Figure 2A) are stationary and slightly fluctuate around zero, for both HF and LF trajectories. This is a typical characteristic of Brownian motion ('random walk'). To confirm this hypothesis one has to study higher-order moments of the displacement, in particular the second one. The resulting mean-squared displacement <(u(t)-u(0))2> is displayed in Figure 2B. The LF and HF data here again are in very good agreement, with the HF data nicely aligned on the LF ones. This agreement is an important test of the coherence and quality of our measurement and analysis methodology. The inset of the figure shows a magnification of the HF data until time t = 30 sec. For the first 10 to 15 seconds, the HF data exhibits a clear linear behavior. As expected from an unbounded Brownian motion the same slope was observed for both the x- and y-axis. The non-zero intercept with the y-axis is typically due to the noise in the experimental determination of the aggregate position [43]. Such a linear dependence of the mean-squared displacement (MSD) is a further indication that the movement of the aggregates is Brownian diffusion, as one expects <(u(t)-u(0))2>=2Dut in the case of a random walk (where Dx or Dy are the diffusion constant in the x- or y-direction, respectively). Using the first 15 seconds of the HF data, our estimates yield Dx ≈ 5.1×10-4 µm2/s and Dy ≈ 4.0×10-4 µm2/s. Note that these values are at best rough estimates since the data are averaged over aggregates of very variable initial sizes (whose mobility is expected to vary accordingly; see below). Nevertheless, the fact that the values for the x- and y-axes are similar is another indication of the isotropy of the Brownian motion that seems to govern the movement of the aggregates. These values are compatible with previous experimental reports of the diffusion constants of large multi-protein 9 assemblies in bacteria, such the origin of replication in E. coli (around 10-4 µm2/s [40]) but are significantly smaller than the values reported for single fluorescent proteins such as mEos2 or GFP (1 to 10 µm2/s [39,44]). Altogether the analysis of the first 15 seconds of the HF data pleads in favor of the hypothesis that the aggregates' motion is due to diffusion, thus excluding directed transport due to some active mechanisms. In order to further quantify the diffusive character of the aggregates at hand, we divided the LF data into 5 classes of increasing initial median fluorescence (table 1), so as to average data over aggregates of more homogeneous size. As depicted in Fig. 3A & B, the initial slope of the MSD vs. Time curves increases when the average intensity in the class decreases. Assuming that the initial median fluorescence is proportional to the initial size of the aggregate, this result further supports a diffusive behavior, for which the diffusion constant is expected to decrease as the molecular size increases. Plotting the data in log-log scale (Fig. 3C & D) evidences initial slopes (i.e. exponents of a possible power law) of 1.04+/-0.14 and 0.83+/-0.08 (on y and x direction respectively; mean slope, excluding the highest fluorescent class, see discussion). Note that the data for the y-direction are expected to be less noisy because they were not subjected to correction for cell growth, unlike the data for the x-direction. Moreover, in the x-direction, the aggregate movements appear to be restricted by a "soft" boundary (i.e. not a membrane, see below), which is expected to hinder interpretations of the MSD curves. Even so, the value of the exponent in the x-direction (0.83) is not significanly smaller than 1.0 (one-tailed t-test, 0.01 significance level). Therefore, we conclude from this data that the MSD at short times (before saturation) evolves linearly with time (MSD ~ tα with α = 1), as expected from a Ficklike normal diffusion. This is in contrast with recent reports where anomalous diffusion was recorded (α in [0.40,0.75]) for RNA-protein assemblies [45,46] and further supports our conclusion favouring passive pure diffusion mechanism of protein aggregates in E. coli. In our results, anomalous diffusion can be excluded except for the largest aggregate class (black circles in fig. 3A-D); however, the movement amplitude of these very large aggregates is too low to allow precise quantification. We further controlled for growth rate and cell-length effects on the diffusion pattern observed. Among the different cells we imaged, the variations in cell growth were very small, whereas cell length varied appreciably. However, the initial slopes showed no significant differences when the data were clustered into sub-classes of cell lengths (Figure S2). Protein aggregates exhibit passive confinement within bacterial polar 10 region Following the short, approximately 15 seconds linear regime, the MSD change with time decelerates (inset, Fig. 2B) and reaches full saturation after about 40 seconds (LF data, Fig. 2B). MSD Saturation occurs in both x- and y-data at values of 0.030 and 0.040 µm2, respectively. This corresponds to a restriction of the movements of the aggregates in a subregion of the bacterial interior, with characteristic size ≈ 400 nm. To understand these results, one has to take into account the size variability of the monitored aggregates. Indeed, when considering the 5 sub-classes of aggregates (Table 1), the observed saturation levels are not constant but clearly decrease when the initial total fluorescence increases. This suggests that the size of the large aggregates is of the same order than the cell dimension, so that the intracellular space available for an aggregate of size r is in fact L-r << L (where L is the cell size). In turn, this enables us to estimate the actual size of the foci, independent of the microscope resolution. To this end, we used the data in Figure 3A and C to obtain reliable estimates of the sizes of the aggregates and that of the intracellular subregion in which they are confined. We used an automatized procedure based on parameter optimization by an evolutionary strategy of the parameters of an individual-based simulation for constrained diffusion (see Materials and Methods for full description). In short, our strategy can be seen as an automatized fit of the values of 12 parameters: the dimensions LX and LY = LZ of the intracellular subregion in which the aggregates are confined and the average radius ri and diffusion constant Di of the aggregates belonging to class i (i =1..5). We start by setting these parameters to initial guess values. We then simulate the confined diffusion of 5,000 spherical molecules per class that are endowed with the corresponding values of ri and Di (i =1..5) and diffuse in a spatial domain which size is given by the initial guess values of LX and LY = LZ. The values of the MSD (averaged over each class) in the x and y directions are then sampled during the simulation at the same frequency (0.33 Hz) as in the LF data of Figure 3A and C. We then compute the distance between the resulting curves for the simulated data and those for the experimental LF data. This distance represents the least-square error between the MSD predicted by the simulations using the initial values of the parameters. To minimize this error automatically, we used an evolutionary strategy called CMA-ES (see [47] and Material and Methods). CMA-ES automatically finds the values of the parameters that yield the smallest distance between experimental and simulation data. Note that because the correction procedure (that removes the effect of cell elongation) for the x-data is strong (i.e. the aggregate motion in this direction is originally dominated by cell elongation), it is difficult to apply this fitting procedure on the experimental MSD data for the x-and y-axis 11 simultaneously. This obliged us to fit the parameters separately on the x and y-data. The numerical values indicated in table 1 represent the average of these two fits (the "±" values indicate the total variation range). The class-averaged MSD corresponding to the optimized parameters are shown in Figure 3A&C as lines and are in agreement with the experimental data. The best-fit values for the cell dimension parameters are LX = 650 nm and LY = LZ = 750 nm. Considering our pixel size (64 nm), we conclude that the value of the space available to the aggregate in the y and z directions is close to the whole space available in this direction (around 900 nm). Therefore the aggregate motion in the y and z directions seems to be constrained only by the inner cell membrane. In strong contrast, while the total intracellular space in the x-direction ranges from 2 to 5 µm (depending on the cell elongation), our fitting procedure indicates that the aggregates do not move beyond 650 nm in this direction. As they are initially located in the cell pole, this shows that the aggregates remain in the pole, where a passive mechanism hinders their free movement and keep them from leaving a subregion spanning ≈ 1/4th to 1/9th of the total cell length. This is coherent with the positioning of the nucleoids, hindering the diffusion of the aggregates (see below). The experimental relation between the aggregate radius and diffusion constant, as determined by the fitting procedure above (listed in table 1), shows a good fit to a StokesEinstein relation: D(r)=C0/r where one expects C0=kT/(6πη) (describing simple sphere diffusion in a liquid of viscosity η) (Fig. 3E). We obtain a remarkable fit to the experimental data with C0 = 47230 nm3/s. Note that a power-law fitting D(r)=C0/rb gives b=0.89+/-0.14 (thus that does not exclude b=1.0) with a similar quality of fit (chi-square values). In the inset of Figure 3E, the experimentally determined values of D are plotted as a function of 1/r. The relation is linear except perhaps for very large values of r, thus emphasizing the very good agreement with the Stokes-Einstein law. These results confirm that some passive mechanism hinders the free movement of the aggregates along the long axis. They also show that the aggregates follow the StokesEinstein law even for large sizes since the diffusion constant of the aggregates simply decays as the inverse of its radius. Simulation of aggregation, Brownian diffusion, and molecular crowding reconstitutes the observed patterns If the spatial dynamics of protein aggregates in E. coli is indeed based exclusively on 12 Brownian motion and aggregation, we should be able to reproduce by computer simulations the observed spatial patterns of the aggregates described here and in previous experimental reports [7,9,10]. In particular, given the relative simplicity of these two ingredients (diffusion + aggregation), individual-based modeling is a very convenient tool in this framework. Here, we used an individual-based model in which proteins diffuse via lattice-free random walks in a 3D domain that has the size of a typical E. coli cell (see Material and Methods and Figure 4A). When two molecules meet along their respective random walks, they form a single aggregate with probability pag. The size of the resulting aggregate is updated according to the size of its constituting molecules and its diffusion constant is updated as a function of the aggregate size using a simple Stokes-Einstein law. In turn, such aggregates can combine to form bigger aggregates. The above experimental finding suggests that the aggregate's Brownian motion is restricted in the x-direction over a distance that is comprised between 1/4th to 1/9th of the cell long axis. These numbers are in agreement with the hypothesis that the physical structures that hinders aggregate diffusion are the nucleoids, i.e. the subregion of the bacterial cytoplasm where the chromosome condensates, thus increasing molecular crowding and diffusional hindrance [33]. In a typical E. coli culture in exponential phase, most cells contain two nucleoids [48] and the free space between each nucleoid and the closest pole end is around 500-600 nm (deduced from [49]). We thus tested the hypothesis (already pointed out in [7] or [10]) that the restriction to the free movement of the obstacles along the long axis of the bacteria is caused by an increased molecular crowding in the nucleoids. To simulate this increased molecular crowding in our individual-based model, we added immobile nonreactive obstacles to represent the densely packed nucleoids (Fig. 4A, see Materials and Methods). Each simulation is initiated by positioning Np single proteins at random inside the cells. The simulation then proceeds by moving the proteins via random walks and letting them aggregate (with resulting update of the aggregate radius and diffusion constant) when they encounter. The initial number of proteins Np was varied in order to account for different experimental conditions. We used Np=100 to emulate experiments in non-stressed conditions (as in this work) where one does not expect the presence of large numbers of proteins in the aggregates. For experiments where aggregation is intensified using for example heat shock treatment [9,10], one generally expects to recover more proteins in the aggregates. In such conditions, the number of proteins in the aggregates was evaluated to be between 2,000 and roughly 20,000 molecules [10]. Here, to account for these data, we used at most a total of Np 13 = 7,000 molecules in the simulations. In the experiments, protein aggregates are detected by fluorescence microscopy when their size is large enough; though we have currently no means to quantify this threshold size, we estimate our detection limit to contain about 10-50 YFP copies, based on the detection of slow mobile particles [50]. Therefore, in the simulations, we had to arbitrarily fix a threshold for the number of proteins per aggregate above which the aggregate is considered large enough to be detected. In non-stressed conditions (Np = 100), we used a detection threshold of 30 proteins per aggregate, whereas with Np = 7,000 total molecules per cell, we varied the detection threshold between 30 and 1750 monomeric proteins per aggregates. We first focused on the distribution of the position of the aggregates at their first detection along the bacterial long axis. The corresponding distribution is shown in Figure 4B. In nonstressed conditions (Np = 100), the distribution of the aggregate position is qualitatively very similar to our experimental results (see Figure 1C): most of the aggregates are located in the poles, the rest being mainly located in the cell center. This result is largely robust to the value of the detection threshold of the aggregates. For very large values of the detection threshold, the distributions of the aggregate location tend to decay inside the nucleoids and to increase in the poles. However, outside such extreme ranges, the spatial distribution of the aggregates is qualitatively robust to the detection threshold. In Fig. 4B, for instance, the full lines correspond to aggregate detection thresholds ranging from to 5 to 50 proteins per aggregate. The resulting spatial distributions are however similar and match all well with the experimental result (dashed line histogram). This robustness is also observed when the initial locations of the proteins are taken inside or immediately around the nucleoids (Figure S3A & C). Importantly, in agreement with experimental reports, the nucleoids in the simulations are not fully impermeable to the aggregates, since the probability to observe large aggregates in the nucleoids is not null. Rather, the presence of the largest molecular crowding in the nucleoids reduces the probability that large aggregates form in the nucleoids. In addition, starting the simulation with a non-homogeneous distribution of proteins, such as confinement to the nucleoid area or just englobing it, does not change the aggregate number per cell and distribution outcome, though a short delay in the accumulation of aggregates in observed (Figure S3, compare e.g. B & D with Fig. 4C & E, respectively). This is dictated by the crowded nucleoid model we adopted with realistic mesh size that does not prohibit diffusion of monomeric proteins within the nucleoid crowded area. Another intriguing experimental result is that the number of aggregates simultaneously 14 present in a cell depends on the experimental conditions. In non-stressed conditions only 1.2% of the observed cells presented more than a single aggregate within the observation time [7] whereas in heat-shocked conditions a majority of the cells present two distinct aggregates, and the rest is roughly equally distributed between one and three protein aggregates per cell. These observations are faithfully reproduced by diffusion-aggregation mechanisms. Indeed, in our simulations emulating non-stressed conditions (100 proteins), a vast majority of the simulations develop a unique detectable aggregate within the simulation time (Fig. 4C). Despite the increase with time of the probability for a simulation to feature two detectable aggregates per cell, the probability to observe only one aggregate remains largely higher, even at the end of the simulations. In simulated heat-shock conditions (see Figure 4D, total of 7,000 proteins) with a very low aggregate detection threshold, virtually all simulations display at least 4 distinct detectable protein aggregates per cell from the very beginning of the simulation. These results are comparable with the experimental data obtained in [7], where the addition of streptomycin was shown to strongly increase the size and number of detected aggregates per cell (to 5 or more). When we increased the aggregate detection threshold (illustrated by a detection threshold of 1750 aggregates in Fig 4E) the simulations showed very different behavior. For short simulation times, we mainly observed cells with a unique detected aggregate. As simulation time increases, the probability to detect a unique aggregate decays in favor of the probability of detect 2 and 3 aggregates simultaneously in the cells. Eventually, most of the simulations (around 60%) display two aggregates, and the others are roughly evenly shared between 1 and 3 detected aggregates per cell, in agreement with the experimental results reported in [10] that employ heat-shock triggered aggregation. These simulations predict that the number of detected aggregates in the cell is crucially dependent on two main factors: the aggregate detection threshold and the total number of aggregation-prone proteins. Therefore they suggest that the discrepancy observed concerning the number of aggregates per cell between non-stressed and heat shock conditions is due to the larger quantity of aggregate-prone proteins resulting from the heat shock. Taken together, our results show that the three basic ingredients we considered in our simulations (passive Brownian motion, aggregation, increased molecular crowding in the nucleoids) are sufficient to reproduce several experimental observations on the spatial distribution and number of protein aggregates in E. coli. Therefore, they confirm the conclusion drawn from our experimental results above that the movement of the chaperone protein aggregates in E. coli is driven by passive diffusion (Brownian motion). They moreover indicate that the observed non-homogeneous spatial distribution is not due to active or 15 directed aggregate movement but is a mere result of the interplay between Brownian diffusion and molecular crowding. 16 DISCUSSION Our objective in this work was to decipher the mechanisms by which protein aggregates in E. coli localize to specific intracellular regions, i.e., cellular poles. Using single-particle tracking of protein aggregates marked with the small heat shock chaperone IbpA (inclusion-proteins Binding Protein A) translationally-fused to the yellow fluorescence protein (YFP), our results indicate that protein aggregate movements are purely diffusive, with coefficient constants of the order of 500 nm2/s, depending on their size. Noteworthy, recent quantification of the movements and polar accumulation in the poles of MS2 multimeric RNA-protein complexes and fluorescently-labelled chromosomal loci concluded a high degree of anomalous diffusion, as reflected by slopes of 0.4-0.75 in log-log plots of time-MSD relationships [45,46]. This suggests that unlike pure protein aggregates, these complexes have further significant interactions with cellular components. Applying evolutionary strategy for parameters estimation under the hypothesis of confined diffusion, we used our experimental data to estimate the average size and diffusion constant of the aggregates and the distances over which their movement is confined. As expected, the aggregate diffusion constant decreases with increasing aggregate sizes, but, more surprisingly, we find that the relation between the aggregate diffusion constant and their size is in very good agreement with the Stokes-Einstein law, thus strengthening the demonstration of pure Brownian motion. The agreement with the Stokes-Einstein law, that predicts a decay of the diffusion constant as the inverse of the radius, D~1/r, was found valid for all the estimated aggregate radii, even as large as 250-270 nm. Recent experimental tests of the validity of this law in E. coli were more ambiguous. Kumar and coworkers [51] quantified the diffusion of a series of 30–250 kDa fusion proteins (some of which contained native cytoplasmic E. coli proteins) in E. coli cytoplasm and found very strong deviation from the Stokes-Einstein law -even for small proteins- with very sharp decay of the diffusion constant D~1/r6. However, using GFP multimers of increasing sizes, Nenninger et al. [52] found very good agreement with Stokes-Einstein law from 20 to 110 kDa, i.e. up to tetramers, while the diffusion constant for pentamers (138 kDa) was found smaller than Stokes-Einstein prediction. Moreover, deviations from the Stokes-Einstein law was suggested an indication of specific interactions of the diffusing protein with other cell components. A tentative interpretation of our observation that even large cytoplasmic protein aggregates in E. coli do follow Stokes-Einstein law, would be that these aggregates actually have limited interactions with other cell components. This hypothesis would match very well 17 with the putative protective function of the aggregates as scavengers of harmful misfolded proteins, allowing their retention within large, stable objects [1]. A second major finding of our study is the demonstration that the Brownian motion of the aggregates is restricted by the cell membrane in the section plane of the cell, while, along the cell long axis, the aggregates are confined to a region that roughly corresponds to the nucleoid-free space in the pole, thus confirming the importance of hindered diffusion in the nucleoids. In further support to this hypothesis, we used 3D individual-based modeling to show that these three ingredients are sufficient to explain the most salient experimental observations. Our simulations exhibit spatial distributions of the aggregates that are similar to those observed in non-stressed as well as heat-shock conditions. They also explain the differences in the number of distinct aggregates per cell as a mere difference in the total number of aggregation-prone (misfolded) proteins. Therefore, our results strongly support the hypothesis that the localization of aging-related protein aggregates in the center and poles of E. coli is due to the coupling of passive diffusion-aggregation with the spatially nonhomogeneous macromolecular crowding resulting from the localization of the nucleoid(s). Our computational approach can be further extended to address asymmetric division of cellular components in dividing cells. Due to computation time limitations inherent to individual-based models, a valid approach to pursue would be to derive a mean-field model of the diffusion-coagulation process, using e.g. integro partial differential equations with position-dependent properties for the diffusion constant or operator (Laplacian) combined with a coagulation operator [53]. This approach would allow to reach simulated times large enough to account for several cell generations and focus on the location of the larger aggregates along the lineage. As a whole, our results emphasize the importance for diffusion-based protein localization of the "soft" intracellular structuring of E. coli along the large axis due to increased macromolecular crowding in the nucleoids. In addition to this implication in the localization of aging-related protein aggregates, the structuring effect of the nucleoids has very recently been evidenced in the accurate and robust positioning of the divisome proteins (that mediate bacterial cytokinesis) [54] or the non-homogeneous spatial distribution of the transcription factor LacI [55]. Wild-type E. coli cells (e.g., without any expression of fluorescent proteins) exhibit qualitatively and quantitatively the same ageing phenotype in terms of gradual fitness as those expressing fluorescent markers (as the IbpA-YFP fusion) [7]. Yet, in previous studies, 18 limited to very few ageing generations (typically less than 8), visible aggregates in wild-type ageing cells were seldomly detected, probably because of the phase contrast detection threshold (typically 500nm) [7]. To ensure that polar accumulation of aggregates is indeed a phenotype of wild-type cells, we used the recently developed 'mother machine' microfluidics system [12] to grow ageing wild-type E. coli through >150 generations. Under these conditions, many of the ageing cells indeed accumulate clearly visible aggregates (Figure S4), pointing to the validity of our approach to use the IbpA-yfp system for better detection [7]. The mechanism described here for IbpA-yfp tethered aggregates can be generalized as ample evidence exist for polar localization of aggregates resulting from heterologous overexpression of proteins, streptomycin treatment [7 and ref therein], large protein assemblies of fluorescently-labelled protein fusions (due to avidity of low multimerization propensity of some fluorescent proteins and independent of the diffusive positioning of the native proteins studied [13]), large RNA-protein assemblies [45,46]. In all cases, given the non-specific nature of hydrophobic interactions governing aggregate assembly, it is unsurprising that colocalization may occur amongst different aggregated polypeptides and chaperones, based on the common diffusive mechanism of polar accumulation described here. Moreover, our recent work demonstrates that large engineered RNA assemblies accumulate as well in the cells' poles [56, (electron microscope images therein)]. Therefore, the polar localization pattern of low diffusive elements in bacteria is not limited to large purely protein assemblies. We propose that it might be a more general process concerning other cell constituents, such as nucleic acids. 19 MATERIALS AND METHODS Bacterial strains. The sequenced wild-type E. coli strain, MG1655 [57] was modified to express an improved version of the YFP fluorescent protein fused to the C terminus of IbpA [35] under the control of the endogenous chromosomal ibpA promoter resulting in the MGAY strain. E. coli strains were grown in Luria-Bertani (LB) broth medium half salt at 37°C. For more information about the cloning, see [7], S.I. Fluorescence time-lapse microscopy setup. After an overnight growth at 37°C, MGAY cultures were diluted 200 times. When the cells reached an absorbance 0.2 (600 nm), they were placed on microscope slide that was layered with a 1.5% agarose pad containing LB half salt medium. The agarose pad was covered with a cover-slide, the boarder of which was then sealed with nail polish oil. Cells were let to recover for 1 hour before observation using Nikon automated microscope (ECLIPSE Ti, Nikon INTENSILIGHT C-HGFIE, 100x objective) and the Metamorph software (Molecular Devices, Roper Scientific), at 37°C. Phase contrast and fluorescence images (25% lamp energy, 1 second illumination LF movies and 600 milliseconds for HF movies) were sampled at two different time-scales. For low-frequency (LF) movies, images were taken every 3 seconds for a total of 5 minutes, while for high-frequency (HF) movies, fluorescence images were taken about very 0.60 seconds for a total of 2 min (and phase contrast images were sampled about every 7 fluorescence images). Fluorescence excitation light energy level used here is 5-fold higher than previously described [7] to allow proportional decrease of exposure time, enabling a higher temporal resolution. Under these conditions, doubling the exposure time did not result in further detection of fluorescent foci yet resulted in accelerated bleaching that prevented consecutive time lapse imaging of the observed foci. Image analysis and aggregate tracking. Phase contrast images were analyzed by customized software “Cellst” [58] for cell segmentation and single cell lineage reconstruction. Phase contrast images were denoised using the flatten background filter of Metamorph software for long movies or a mixed denoising algorithm [58] for fast movies. The mixed denoising algorithm combines two famous image denoising methods: NL-means denoising [59], which is patch-based and Total Variation denoising [60,61], which is used as regularization. The Cellst software was used to automatically segment the cells on most of the images, albeit when necessary, manual 20 corrections were applied. At the end of the whole segmentation and tracking process, Cellst also calculates the lineage of every cell in the movie. The fluorescent protein aggregates were detected by another customized software. Detection of the maximal intensity pixel of each spot was realized using the a contrario methodology based on a circular patch model with a central zone of detection and an external zone of context. The patch radius was then optimized to optimally match the spot. The energy of each spot was computed in the following way: the total image was modeled as a sum of a constant background and 2D circular Gaussian curves, centered on the maximal intensity pixel of the detected spots with a deviation of 3 pixels. The quadratic minimum deviation between the image and the model enabled to calculate the Gaussian coefficients. These coefficients were considered the energy values of each spot. The coordinates of the detected spots were then refined to subpixel resolution. This was achieved by computing a weighted average of the coordinates of the pixels in a circular neighborhood of the detected spot. The weights were given by the intensity values of the pixels to which the local background is subtracted. The local background was then computed as the median value of the pixel intensity in the neighborhood. Only pixels having intensity bigger than the median value were considered in the weighted average. This algorithm has been tested on both synthetic and real image and it shown a precision of 1/10 of a pixel on very poor contrasted spots. After detection and localization, the movements of the fluorescent aggregates were tracked and quantified by a third customized software named “aggtracker” based on the cell lineage and the detected spots. The algorithm uses the lineage and cell information to ensure that an aggregate is consistently tracked through points with points that are inside the same cell. The output of this software are time-series for the coordinates x and y (in pixels) of each fluorescence spot as well as the affiliation of the spot to the cell it is in. The last step consisted in the projection of the coordinates of the fluorescence spot from their initial absolute values in the image (in pixels) to their value along the long and short axes of the 2d image of the cell. To this aim, we used active skeletons. A skeleton represents an object by a median line (the center line in the case of a tubular bacteria). Here we used one active skeleton for the long axis of the cell image and a second one for its short axis. Active skeletons were adapted to bacteria in order to optimize the position of the skeleton in the image of the cell. The coordinates of the fluorescence spots were then expressed as the coordinate of the center of the fluorescence spot in the basis composed of the two active 21 skeletons that localize the cell long and short axes. We exploited the simple shape of the skeleton to estimate the total cell width and length as that of the respective skeleton. As a convention, we refer below to the aggregate coordinate along the long axis as the xcoordinate and that along the short axis as the y-coordinate. In order to improve precision, aggregate trajectories made of less than 10 successive images in the movies were not further taken into account. In total, we obtained 1644 aggregate trajectories. Individual-based modeling of protein aggregation. To simulate the diffusion and aggregation process of proteins in a single cell, we used a 3d individual-based lattice-free model. Each protein p was explicitly modeled as a sphere of radius rp centered at coordinates (xp, yp, zp) in the 3d intracellular space of the cell. We simulated protein diffusion in the cell and aggregation as they encounter using as realistic conditions as possible. In particular, the radius and diffusion coefficient of the protein aggregates explicitly increased as they grow. Moreover, we explicitly modeled the larger molecular crowding in the nucleoids. Details of the simulations are as follows. The bacterial cell was simulated as a 3D square cylinder with width and depth 1.0 µm [62] and length 4.0 µm (chosen to correspond to a bacterial cell just before division) and reflective boundaries. Note that we also ran simulations with more realistic cell shapes (i.e. spherical caps at cell ends) and did not find significant differences compared to square cylinders (except for the much higher computation cost with spherical caps). Within each cells, we also explicitly modeled the larger molecular crowding found in the nucleoids. Indeed, in healthy cells, the bacterial chromosome condensates into a restricted sub-region of the cell called “nucleoid”, where molecular crowding is much larger than in the rest of the cytoplasm [33]. To model this increased molecular crowding in the nucleoids, we placed at random (with uniform probability) 50,000 bulky immobile, impenetrable and unreactive obstacles (radius 10 nm) in the region of the cell where a nucleoid is expected. Because cell cycle and DNA replication in E. coli are not synchronized, roughly 75% of the cells in exponential phase contain two nucleoids [48]. We thus explicitly positioned two nucleoids within the cell. The location and size of the two nucleoids were estimated from DAPI-stained inverted phase contrast images of the nucleoids found in [49]. Both nucleoids were 3d square cylinders of length 1220 nm (along the cell long axis) and width and height 532 nm. Each nucleoid started at 540 nm from each cell pole and was centered on the cell long axis. The volume occupied by the two nuclei area thus formed is about 12%, which is consistent with literature [63,64]. 22 Each simulation was initialized by positioning Np individual IbpA-YFP proteins (monomers) at non-overlapping randomly chosen (with uniform probability) locations in the free intracellular space of the cell (i.e. the whole interior of the cell minus the space occupied by the obstacles in the nucleoids). At each time step, each molecule is independently allowed to diffuse over a distance d that depends on the protein diffusion constant Dp, according to d = (6 Dp Δt)1/2, where Δt is the time step, in agreement with basic Brownian motion. Note that Dp itself depends on the aggregate size rp (see below). The new position of the protein (x’,y’,z’) was then computed by drawing two random real numbers, θ and c, uniformly distributed in [0, 2π] and [-1,1], respectively, and spherical coordinates: x’=x(t)+d sin(acos(c)) cos(θ); y’=y(t)+d sin(acos(c)) sin(θ) and z’=z(t)+d c where (x(t),y(t),z(t)) is the initial position of the protein. If the protein in this new position (x’,y’,z’) overlaps with any of the immobile obstacles (i.e. if there exists at least one obstacle such that the distance between the obstacle center and (x’,y’,z’) is smaller than the sum of their radii) the attempted movement is rejected (x(t+Δt),y(t+Δt),z(t+Δt)) = (x(t),y(t),z(t)). This classical approximation of the aggregate reflection by the static obstacles is not expected to change the simulation results significantly, but it drastically reduces the computation load. If no obstacle overlaps, the movement is accepted, i.e. (x(t+Δt),y(t+Δt),z(t+Δt))= (x’,y’,z’). After each molecule has moved once, the algorithm searches for overlaps between proteins. Two proteins are overlapping whenever the distance between their centers is smaller than the sum of their radii. Each overlapping pair was allowed to aggregate with (uniform) probability pag (irrespective of their size). In our simulations, pag was varied between 0.1 and 1.0 (limited at the lower band by simulation time needed to score enough aggregation events). To model the aggregation from two overlapping proteins, we could not, for computation time reasons, keep track of the shape of the aggregates (i.e. the individual location of each protein in the aggregates). Instead, we used the simplifying hypothesis that all along the simulation, the aggregates maintain a spherical shape with constant internal density. It follows that the radius of an aggregate C, born out of the aggregation of two aggregates A and B of respective size rA and rB is rC = (rA3 + rB3)1/3. Upon aggregation, we thus remove the aggregates A and B from the cell, and add a new aggregate with size rC, centered at the center of mass of the two former aggregates A and B. Finally, to set the diffusion constant of the aggregates, we used the classical Stokes-Einstein relation for a Newtonian fluid, where the diffusion constant is inversely proportional to its radius. In our case, this leads to Dp=D0r0/rp where r0 and D0 are the radius and diffusion 23 constant, respectively, of individual (monomeric) IbpA-YFP molecules. Note that this relation could be violated for large molecules in the cytoplasm of E. coli [52,53]. In a subset of simulations, we used power law relations, such as Dp ∝ rp-6, as suggested in [51], without noticeable change in our results (except that the time needed to reach a given threshold aggregate size was increased). Note that aggregation was considered irreversible in our model (i.e. aggregates do never breakdown into smaller pieces). This is in agreement with our experimental observations, where we never measured decay of foci fluorescence. The diffusion constant of the 26-kDa GFP (radius 2 nm) in E. coli cytoplasm is around 7.0 µm2/s and that of the GFP-MBP fusion (72 kDa) around 2.5 µm2/s [37]. Using this data and the Stokes-Einstein relation combined to our constant spherical hypothesis, led to estimates of the radius and diffusion coefficient of the individual (monomeric) 39 kDa IbpA-YFP fusion of r0= 3 nm and D0=4.4 µm2/s. The value of the time step Δt has to be small enough so that proteins cannot jump over each other during a single time step, meaning that the distance diffused during a single time step is limited by d < 4r0. Using the definition for d above, one then has Δt < 8/3 r02/D0 ≈ 5 µs. Here, we used Δt = 1 µs yielding d= 5 nm for monomeric proteins. Every simulation was run for a total of 2×106 time steps. The translation of this value into real time is hardly possible since we have no indication of the experimental value of the aggregation probability per encounter pag (see above) even less so of its dependence on the aggregate size. A lower bound can be estimated to 2 seconds real time (for 2×106 time steps) if the aggregation is always diffusion limited (i.e. pag=1). On general grounds however, the experimental value of pag can be expected to be smaller, so that the 2×106 simulation time steps would correspond to more than this 2 seconds real time minimal value. For the results to be statistically significant, we ran nrun simulations for each parameter and condition, with different realization of the random processes (initial location, random choice of the positions or of the aggregation events) and averaged the results over these nrun simulations. In the results presented here we used nrun = 103. Fitting procedure for the aggregate radius, diffusion constant and cell dimensions The data from the LF movies were partitioned into 5 classes based on the aggregate fluorescence intensity at the beginning of the measured trajectory, yielding 5 pairs of experimental curves for the mean-squared displacement, <(xiexp(t)-xiexp(0))2>=fx(t) and <(yiexp(t)-yiexp(0))2>=fy(t) where i={1,…,5} indexes the intensity class. Corresponding theoretical values were obtained by individual-based simulations of confined random walks 24 similar to those described above but modified as follows: the cells, of dimensions LX (length), LY = LZ = LYZ (height and width) were devoid of nucleoids or aggregation (aggregation probability pag=0) and we used N=5,000 IbpA-YFP proteins. Each 12-uplet of parameters {LX, LYZ, ri, Di} yields two theoretical curves (<(xithe(t)-xithe(0))2>=gx(t) and <(yithe(t)yithe(0))2>=gy(t)). The aim of the fitting procedure is to minimize the distance between the experimental and theoretical curves, ie to minimize the cost function: where the indices j are over the N time steps. The formulation of this cost function corresponds to the traditional least squares, so that the optimization procedure actually looks for best fits in the least-square sense (minimization of the squared residuals between the theoretical predictions and experimental observations). To minimize automatically the cost function F, thus adjusting the theoretical to the experimental curves, we used the C++ implementation of the state-of-the-art evolutionary strategy algorithm CMA-ES [39] with population size 12 and 400 generations. 25 ACKNOWLEDGEMENTS We thank N. Hansen, for providing the source code of CMA-ES for various programming languages (downloadable at http://www.lri.fr/~hansen/cmaes_inmatlab.html). We also thank the CNRS-IN2P3 Computing Center (cc.in2p3.fr) for providing computer resources. 26 REFERENCES 1. Lindner AB, Demarez A (2009) Protein aggregation as a paradigm of aging. Biochim Biophys Acta 1790(10): 980-96. 2. Nyström T (2011) Spatial protein quality control and the evolution of lineage-specific ageing. Philos Trans R Soc Lond B Biol Sci. 366(1561):71-5. 3. Jazwinski SM (2002) Growing old: Metabolic control and yeast aging. Annu Rev Microbiol 56: 769–792. 4. Ackermann M, Stearns SC, Jenal U (2003) Senescence in a bacterium with asymmetric division. Science 300: 1920. 5. Kirkwood TB (2005) Understanding the odd science of aging. Cell 120(4) :437-47. 6. Stewart EJ, Madden R, Paul G, Taddei F (2005) Aging and death in an organism that reproduces by morphologically symmetric division. PloS Biol 3(2): e45. 7. Lindner AB, Madden R, Demarez A, Stewart EJ, Taddei F (2008) Asymmetric segregation of protein aggregates is associated with cellular aging and rejuvenation. Proc Natl Acad Sci U S A 105(8): 3076-3081. 8. Veening JW, Smits WK, Kuipers OP (2008) Bistability, epigenetics, and bet-hedging in bacteria. Annu Rev Microbiol 62: 193-210. 9. Rokney A, Shagan M, Kessel M, Smith Y, Rosenshine I, et al. (2009) E. coli transports aggregated proteins to the poles by a specific and energy-dependent process. J Mol Biol 392(3): 589-601. 10. Winkler J, Seybert A, König L, Pruggnaller S, Haselmann U, et al. (2010) Quantitative and spatio-temporal features of protein aggregation in Escherichia coli and consequences on protein quality control and cellular ageing. EMBO J 29(5): 910-923. 11. Lele UN, Baig UI, Watve MG (2011) Phenotypic plasticity and effects of selection on 27 cell division symmetry in Escherichia coli. PLoS ONE 6(1): e14516. 12. Wang P, Robert L, Pelletier J, Dang WL, Taddei F, Wright A. Jun S (2010) Robust growth of Escherichia coli. Curr Biol 20(12):1099-103. 13. Landgraf D., Okumus B, Chien P, Baker TA, Paulsson J (2012) Segregation of molecules at cell division reveals native protein localization. Nat Methods 9(5): 480482. 14. Aguilaniu H, Gustafsson L, Rigoulet M, Nyström T (2003) Asymmetric inheritance of oxidatively damaged proteins during cytokinesis. Science. 299(5613): 1751–1753. 15. Erjavec N, Cvijovic M, Klipp E, Nyström T (2008) Selective benefits of damage partitioning in unicellular systems and its effects on aging. Proc Natl Acad Sci U S A 105(48): 18764-18769. 16. Zhou C, Slaughter BD, Unruh JR, Eldakak A, Rubinstein B, et al. (2011) Motility and segregation of Hsp104-associated protein aggregates in budding yeast. Cell 147(5): 1186-1196. 17. Kaganovich D, Kopito R, Frydman J (2008) Misfolded proteins partition between two distinct quality control compartments. Nature 454((7208): 1088–1095. 18. Rujano MA, Bosveld F, Salomons FA, Dijk F, van Waarde MA, et al. (2006) Polarised asymmetric inheritance of accumulated protein damage in higher eukaryotes. PloS Biol 4(12): e417. 19. Watve M, Parab S, Jogdand P, Keni S (2006) Aging may be a conditional strategic choice and not an inevitable outcome for bacteria. Proc Natl Acad Sci U S A 103(40): 14831-14835. 20. Chao L (2010) A model for damage load and its implication for the evolution of bacterial aging. PloS Genet 6(8). 21. Turing AM (1953) The chemical basis of morphogenesis. Bull Math Biol 52(1-2): 153197. 28 22. Kruse K, Howard M, Margolin W (2007) An experimentalist’s guide to computational modelling of the Min system. Mol Microbiol 6(5): 1279-1284. 23. Wang H, Wingreen NS, Mukhopadhyay R (2008) Self-organized periodicity of protein clusters in growing bacteria. Phys Rev Lett 101(21): 218101. 24. Shapiro L, McAdams HH, Losick R (2009) Why and How Bacteria Localize Proteins. Science 326(5957): 1225-1228. 25. Iniesta AA, Hillson NJ, Shapiro L (2010) Cell pole-specific activation of a critical bacterial cell cycle kinase. Proc Natl Acad Sci U S A 107(15): 7012-7017. 26. Ramamurthi KS, Lecuyer S, Stone HA, Losick R (2009) Geometric cue for protein localization in a bacterium. Science 323(5919):1354-7. 27. Sun M, Wartel M, Cascales E, Shaevitz JW, Mignot T (2011) Motor-driven intracellular transport powers bacterial gliding motility. Proc Natl Acad Sci U S A 108(18): 7559-7564. 28. Domínguez-Escobar J, Chastanet A, Crevenna AH, Fromion V, Wedlich-Söldner R, et al. (2011) Processive movement of MreB-Associated cell wall biosynthetic complexes in bacteria. Science 333 (6039): 225-228. 29. Shcheprova Z, Baldi S, Frei SB, Gonnet G, Barrai Y (2008) A mechanism for asymmetric segregation of age during yeast budding. Nature 454(7205): 728–734. 30. Gehlen LR, Nagai S, Shimada K, Meister P, taddei A, et al. (2011) Nuclear geometry and rapid mitosis ensure asymmetric episome segregation in yeast. Curr Biol 21(1): 25–33. 31. Spokoini, R, Moldavski O, Nahimas Y, England JL, Schuldiner M, et al. Confinement to Organelle-Associated Inclusion Structures Mediates Asymmetric Inheritance of Aggregated Protein in Budding Yeast. Cell Rep pii: S2211-1247(12)00264-1. 32. Mondal J, Bratton BP, Li Y, Yethiraj A, Weisshaar JC (2011) Entropy-based mechanism of ribosome-nucleoid segregation in E. coli cells. Biophys J 100(11): 2605-2613. 29 33. Foley L, Wilson DB, Shuler ML (2010) Macromolecular crowding can account for RNase-sensitive constraint of bacterial nucleoid structure. Biochem Biophys Res Commun 395(1): 42-47. 34. Saberi S, Emberly E (2010) Chromosome driven spatial patterning of proteins in bacteria. PloS Comput Biol 6(11): e10000986. 35. Qian H, Sheetz MP, Elson EL (1991) Single particle tracking. Analysis of diffusion and flow in two-dimensional systems. Biophys J 60(4): 910-921. 36. Platani M, Goldberg I, Lamond AI, Swedlow JR (2002) Cajal body dynamics and association with chromatin are ATP-dependent. Nat Cell Biol 4(7): 502-508. 37. Bronstein I, Israel Y, Kepten E, Mai S, Shav-Tal Y, et al. (2009) Transient anomalous diffusion of telomeres in the nucleus of mammalian cells. Phys Rev Lett 103(1): 018102. 38. Bakshi S, Bratton BP, Weisshaar JC (2011) Subdiffraction-limit study of Kaede diffusion and spatial distribution in live Escherichia coli. Biophys J. 101(10): 25352544. 39. English BP, Hauryliuk V, Sanamrad A, Tankov S, Dekker NH, et al. (2011) Singlemolecule investigations of the stringent response machinery in living bacterial cells. Proc Natl Acad Sci U S A 108(31): 365-373. 40. Sliusarenko O, Heinritz J, Emonet T, Jacobs-Wagner C (2011) High-throughput, subpixel precision analysis of bacterial morphogenesis and intracellular spatiotemporal dynamics. Mol Microbiol 80(3): 612-627. 41. Allen SP, Polazzi JO, Gierse JK, Easton AM (1992) Two novel heat shock genes encoding proteins produced in response to heterologous protein expression in Escherichia coli. J Bacteriol 174(21): 6938-6947. 42. Nagai T, Ibata K, Park ES, Kubota M, Mikoshiba K, Miyawaki A (2002) A variant of yellow fluorescent protein with fast and efficient maturation for cell-biological applications. Nat Biotechnol. 20(1):87-90. 30 43. Savin T, Doyle PS (2005) Static and dynamic errors in particle tracking microrheology. Biophys J 88(1): 623-638. 44. Elowitz MB, Surette MG, Wolf PE, Stock JB, Leibler S (1999) Protein mobility in the cytoplasm of Escherichia coli. J Bacteriol 181(1): 197-203. 45. Golding I, Cox EC (2006) Physical nature of bacterial cytoplasm. Phys Rev Lett 96(9):098102. 46. Weber SC, Spakowitz AJ, Theriot JA (2010) Bacterial chromosomal loci move subdiffusively through a viscoelastic cytoplasm. Phys Rev Letter 104(23):238102. 47. Hansen N, Ostermeier A (2001) Completely derandomized delf-adaptation in evolution strategies. Evol Comput 9(2): 159-195. 48. Donachie WD, Begg KJ (1989) Chromosome partition in Escherichia coli requires postreplication protein synthesis. J Bacteriol 171(10): 5405-5409. 49. Zimmerman SB (2006) Shape and compaction of Escherichia coli nucleoids. J Struct Biol 156(2): 255-261. 50. Xie XS (2010) Enzymology and life and the single molecule level. Single Molecule Spectroscopy in Chemistry, Physics and Biology Nobel Symposium. Edited by Astrid Graslund, et al. Springer Series in Chemical Physics, Springer-Verlag Berlin Heidelberg. pp. 435-448. 51. Kumar M, Mommer MS, Sourjik V (2010) Mobility of cytoplasmic membrane, and DNA-binding proteins in Escherichia coli. Biophys J 98(4): 552-559. 52. Nenninger A, Mastroianni G, Mullineaux CW (2010) Size dependence of protein diffusion in the cytoplasm of Escherichia coli. J Bacteriol 192(18): 4535-4540. 53. Laurençot P, Mischler S (2004) On coalescence equations and related models. In Modeling and computational methods for kinetic equations, Model. Simul. Sci. Eng. Technol., pages 321–356. Birkhauser Boston, Boston, MA. 31 54. Männik J, Wu F, Hol FJ, Bisicchia P, Sherratt DJ, et al. (2012) Robustness and accuracy of cell division in Escherichia coli in diverse cell shapes. Proc Natl Acad Sci U S A 109(18): 6957-6962. 55. Kuhlman TE, Cox EC (2012) Gene location and DNA density determine transcription factor distributions in Escherichia coli. Mol Syst Biol 8:610. 56. Delebecque CJ, Lindner AB, Silver PA, Aldaye FA (2011) Organization of intracellular reactions with rationally designed RNA assemblies. Science 333(6041): 470-474. 57. Blattner FR, Plunkett G “rd, Bloch CA, Perna NT, Burland V, et al. (1997) The complete genome sequence of Escherichia coli K-12. Science 277(5331): 1453-1474. 58. Primet M, Demarez A, Taddei F, Lindner AB, Moisan L (2008) Tracking of cells in a sequence of images using a low-dimension image representation. 5th IEEE International Symposium on Biomedical Imaging: From Nano to Macro (ISBI) 995998. 59. Rudin LI, Osher S, Fatemi E (1992) Nonlinear total variation based noise removal algorithms, Physica D 60: 259-268 60. Louchet C, Moisan L (2011) Total Variation as a local filter. SIAM Journal on Imaging Sciences 4 (2): 651-694. 61. Buades A, Coll B, Morel JM (2005) A review of image denoising algorithms, with a new one. SIAM Multiscale Modeling and Simulation. 4(2): 490-530. 62. Volkmer B, Heinemann M (2011) Condition-dependent cell volume and concentration of Escherichia coli to facilitate data conversion for systems biology modeling. PloS One 6(7): e23126. 63. Woldringh CL, Odijk T (1999) Structure of dna within the bacterial cell: physics and physiology. Charlesbos R, ed. Organization for the prokaryotic genome, American Society of Microbiolgy Press.171 p. 64. Odijk T (1998) Osmotic compaction of supercoiled dna into a bacterial nucleoid. 32 Biophys Chem 73(1-2): 23-29. 33 FIGURE LEGENDS Figure 1: Localization of the detected aggregates in the cells (A) In each image on the time-lapse fluorescence movies, the bacterial cells are automatically isolated (each individual cell is given a unique random color). The aggregates appearing during the movie are automatically detected and their trajectory within the cell quantified (internal trajectories). (B) By convention, we referred to the projection of the aggregate location on the long axis of the cell as the x-component and that along the short axis as the y-component. (C) Histogram of the x-component of the initial position of the trajectories (total of 1,644 trajectories). Since the cell length at the start of the trajectory is highly variable, the x-component was rescaled by division by the cell half-length. After this normalization, the cell poles are located at locations -1.0 and 1.0 respectively, for every trajectory. (D) Experimentally measured positions of the aggregates detected in the poles (both poles pooled, n = 9,242 points). The green-dashed curves in (D-F) locate the 2d projection of the 3d semi-ellipsoid that was used to approximate the cell pole. (E) Synthetic data for bulk positions: 10,000 3d positions were drawn uniformly at random in the 3d semiellipsoid pole. The figure shows the corresponding 2d projections. (F) Synthetic data of membranary positions: 10,000 3d positions were drawn uniformly at random in the external boundary (membrane) of the 3d semi-ellipsoid pole. The figure shows the corresponding 2d projections. (G) To quantify figures D-F, the correlation function ρ(s) was computed as the density of positions located within crescent D(s) (gray). See text for more detail. (H-I) Local density of aggregate positions ρ(s) in the synthetic (H) and experimental (I) data shown in E (bulk, blue), F (membranary, red) and D (experimental, orange). The dashed black line shows the local density computed for 10,000 synthetic 2d positions that were drawn uniformly at random in the 2d semi-ellipse resulting from the 2d projection of the 3d pole ellipsoid (green dashed curve in D-F). Figure 2: Single-aggregate tracking analysis inside E. coli cells. Coordinates along the x and y-axis are shown in red and black, respectively. Low frequency sampling trajectories (LF) are displayed using full lines and high frequency ones (HF) using open symbols. Light red and black swaths indicate + and - 95% confidence intervals for the x- and y-axis data, respectively (for clarity, - and + intervals for the x- and y-axis data, respectively, are omitted) (A) Corrected mean displacement <(u(t)-u(0)-uc(t))2> where uc(t) is the applied correction. For the y-component, the correction is the time-average of the ycoordinate. For the x-component, the applied correction is cell growth : ux=(L(t)-L(0))Δt where L(t) is the cell half-length at time t and Δt is the time interval between two consecutive 34 images. (B) Corresponding mean squared displacements MSDc = <(u(t)-u(0)-uc(t))2>. The inset shows a magnification of the HF results and their close-to-linear behavior for the first 10 - 15 seconds (dashed line). Figure 3: Size-dependence of the diffusion constants. Trajectories from the LF movies (Figure 2) were clustered into 5 classes of increasing initial median fluorescence (Table 1) and the corresponding MSD were averaged in each class. Symbols (open circles) show the MSD for the x- (A) and y-directions (B) for each class. Curve colors correspond to the classes from Table 1(with median fluorescence increasing from top to bottom). The corresponding full lines show the results of the fitting procedure for each class (see text and Material and Methods). Panels (C) and (D) show the corresponding log-log plots, to explore for possible anomalous diffusion. The straight lines are linear fits over the initial regimes (first 21 seconds), before movement restriction starts saturating the MSDs. The slopes of these lines are the anomalous exponents as defined by MSD(t) ~ t^α. Each pannel indicates the average (+/- s.d.) of the exponents determined for the 4 smallest aggregates classes (thus excluding the largest class, represented by black circles). The resulting values of the diffusion constant D are plotted against the radius r in (E), keeping the same color code as in (A-D). Full circles indicate the values determined from fitting the MSD in the x-direction, while full squares show the values from the fit in the y-direction. The full line is a fit to a Stock-Einstein law D(r)=C0/r, yielding C0 = 47.23×103 nm3/s. The inset replots these data as a function of 1/r. Figure 4: Individual-based models of chaperone protein diffusion and aggregation (A) Geometry of the 3D model used in individual-based models for E. coli intracellular space. Numbers indicate distances in µm. The blue boxes inside the bacteria locate the nucleoids, where increased molecular crowding is modeled by the insertion of bulk immobile obstacles. (B) Comparison between simulations and experiments of the localization at first detection of the protein aggregates along the long axis (x-axis). The full lines show the spatial distributions extracted from the simulations with different detection thresholds (an aggregate must contain at least 5, 10, 20 or 50 monomeric proteins, respectively, to be detected). Total number of proteins in the simulations Np = 100 . The dashed line is an histogram showing the distribution of the experimental data. (C-E) Time-evolution of the probabilities to observe exactly 1 (red), 2 (green), 3 (blue) or more than for 4 (brown) distinct aggregates simultaneously in the simulations. The simulations emulated non-stressed conditions (C), with Np=100 total proteins and aggregate detection threshold = 30 or heat-shock triggered aggregation, with Np=7,000 total proteins and aggregate detection threshold = 30 (D) or 1750 (E). 35 Supplementary Figure Legends Figure S1: Mean displacements of single-aggregates. The figure shows the time evolution of the mean displacement, u (t ) − u ( 0 ) , where u = x or y (brackets denote averaging over the trajectories). Coordinates along the x and yaxis are shown in red and black, respectively. Low frequency sampling trajectories (LF) are displayed using full lines and high frequency ones (HF) using open symbols. The inset schematizes the increase of the cell half-length during growth that dominates the movement along the x-axis. Figure S2: Diffusion measurements clustered by cell length. Trajectories from the LF movies (Figure 2) were clustered into 4 classes corresponding to the cell size at the time of measurement: L ≤ 3.4 µm (light blue), 3.4 µm < L ≤ 4.0 µm (red), 4.0 µm < L ≤ 4.8 µm (lilac) or L ≥ 4.8 µm (green). The corresponding MSD were averaged in each class for the x- (A) and y-directions (B). Figure S3: Simulation of aggregate formation dynamics and location for protein initializations in or around the nucleoids. The positions of the proteins monomers were initialized (uniformly) at random inside the nucleoids (A-B) or around (i.e. within a layer of 20 nm) around them (C-D). For each initialization type, the graph shows the distribution of the localization at first detection of the protein aggregates along the long axis (x-axis) (A,C) and the time-evolution of the probabilities to observe exactly 1 (red), 2 (green), 3 (blue) or more than for 4 (brown) distinct aggregates simultaneously in the simulations (B,D). In A and C, the different curves correspond to different detection thresholds. For both initial locations inside the nucleoids (A,B), the simulations corresponded to non-stressed conditions (100 proteins, detection threshold = 30) and aggregation probability pag=1. Figure S4: Aggregate formation in ageing wild type E. coli cells. E. coli wild-type K12 MG1655 cells were inoculated into the microfluidics "mother machine" device (see Wang et al. 2010, Curr Biol 20(12):1099-103) and grown at 37°C in LB media. Briefly, the dead-end part of channels maintains the old pole cell (top of images, white arrows); at the opposite side the channels are open to flow that washes away the progeny. Cells were followed by time-lapse phase contrast microscopy for 32 hours. As can be seen, protein aggregates (yellow arrowheads) are formed within the old-pole of the ageing cells. 36 TABLES 37 Table 1. Comparison of the estimated radius and diffusion constants of protein aggregates depending on their initial median fluorescence. Data are averages of the fits on the MSDx- and MSDy-data and +/- values locate min-max. 38 Intensity classes # aggregates r (nm) D (nm2/s) I < 1459 128 54 ± 2 837 ± 38 1459 < I < 2015 115 105 ± 11 550 ± 2 2015 < I < 2905 128 141 ± 33 437 ± 26 2905 < I < 4727 129 174 ± 10 261 ± 4 I > 4727 128 273 ± 12 92 ± 26 B A pole pole y-axis x-axis -1.0 # aggregation foci C 1.0 50 40 30 20 10 0 -1.0 -0.5 0.0 0.5 1.0 relative location along x-axis -1 0.6 0.7 0.8 0.9 1.0 x- position (relative) ay say D(s) ds ax aggregate density ρ(s) H G 0 -1 0.6 0.7 0.8 0.9 1.0 x- position (relative) I 0.20 Synthetic data : 0.15 0.10 F Bulk Uniform 2D Mmbry 3D Bulk 3D 0.05 0.00 0.0 0.2 0.4 0.6 0.8 1.0 length scale s Membranary y - position (relative) 0 1 aggregate density ρ(s) y - position (relative) 1 y - position (relative) E D Experimental 1 0 -1 0.6 0.7 0.8 0.9 1.0 x- position (relative) 4 6x10 Experimental data 4 4x10 4 2x10 4 0x10 0.0 0.2 0.4 0.6 0.8 1.0 length scale s Corrected mean displacement (μm) along x-axis 0.10 along y-axis A 0.05 0.00 0.05 B MSD (μm 2 ) 0.04 0.03 0.02 0.02 0.01 0.01 0.00 0.00 0 50 100 150 time (s) 0 10 200 20 250 30 300 A B 0.06 MSDy (µm2) MSDx (µm2) 0.06 0.04 0.02 0.00 0 40 80 α = 0.83+/-0.08 MSDy (µm2) MSDx (µm2) -2.0 10 -2.5 10 -3.0 α = 1.04+/-0.14 10 -2.0 10 -2.5 10 10 0.5 10 Diffusion Constant D (nm 2 /s) time (s) 120 -3.0 10 1.0 10 1.5 2.0 10 0.5 10 time (s) 10 800 1000 D 400 0 0.00 600 0.01 1/ r 0.02 200 0 80 -1.5 10 0 40 -1.0 10 -1.5 E 0 D -1.0 10 0.02 0.00 120 time (s) C 0.04 100 200 radius r (nm) 300 1.0 10 1.5 10 time (s) 2.0 10 A 4.0 1.0 0.54 1.12 0.68 z x 50 0.12 40 0.08 30 20 0.04 10 0 0.00 -1.0 -0.5 0.0 0.5 # aggregates (exper.) 0.12 B Probability 1st appear. Simulations y 0.76 1.0 1.0 Relative axial position Probability C Probability D Probability E Non-stressed conditions Probability to detect: 1 aggregate 2 aggregates 3 aggregates > 4 aggregates 0.6 0.4 0.2 0.0 Heat Shock - low detection threshold 1.0 0.8 0.6 0.4 0.2 0.0 Heat Shock - high detection threshold 0.8 0.6 0.4 0.2 0.0 0x105 5x105 10x105 15x105 simulation time (a.u.) 20x10 5 Mean displacement (μm) along x-axis along y-axis 0.30 0.25 0.20 L(t) 0.15 ≈ dL(t)/dt 0.10 0.05 0.00 0 50 100 150 time (s) 200 250 300 B 0.03 0.04 MSDy (µm2) MSDx (µm2) A 0.02 0.01 0.00 0 40 80 120 0.03 0.02 0.01 0.00 0 40 80 time (s) time (s) Cell length L (µm): L > 4.8 4.0 < L< 4.8 3.4 < L < 4.0 L < 3.4 120 Probability 1st appear. Simulations A 0.08 0.06 0.04 0.02 -1.0 Probability 0.5 1.0 Probability to detect: 1 aggregate 2 aggregates 3 aggregates > 4 aggregates 0.6 0.4 0.2 0.0 0x105 5x105 10x105 15x105 20x10 5 simulation time (a.u.) C Probability 1st appear. Simulations 0.0 Relative axial position B 0.12 0.08 0.04 0.00 -1.0 -0.5 0.0 0.5 1.0 Relative axial position D Probability -0.5 0.3 0.2 0.1 0.0 0x105 5x105 10x105 15x105 simulation time (a.u.) 20x10 5
5cs.CE
On  the  average  uncertainty  for  systems   with  nonlinear  coupling     Kenric  P.  Nelson 1, 2,  Sabir  R.  Umarov 3,  and  Mark  A.  Kon 1   Abstract     The  increased  uncertainty  and  complexity  of  nonlinear  systems  have  motivated   investigators  to  consider  generalized  approaches  to  defining  an  entropy  function.    New  insights  are   achieved  by  defining  the  average  uncertainty  in  the  probability  domain  as  a  transformation  of   entropy  functions.    The  Shannon  entropy  when  transformed  to  the  probability  domain  is  the   weighted  geometric  mean  of  the  probabilities.    For  the  exponential  and  Gaussian  distributions,  we   show  that  the  weighted  geometric  mean  of  the  distribution  is  equal  to  the  density  of  the  distribution   at  the  location  plus  the  scale  (i.e.  at  the  width  of  the  distribution).    The  average  uncertainty  is   generalized  via  the  weighted  generalized  mean,  in  which  the  moment  is  a  function  of  the  nonlinear   source.    Both  the  Rényi  and  Tsallis  entropies  transform  to  this  definition  of  the  generalized  average   uncertainty  in  the  probability  domain.    For  the  generalized  Pareto  and  Student’s  t-­‐distributions,   which  are  the  maximum  entropy  distributions  for  these  generalized  entropies,  the  appropriate   weighted  generalized  mean  also  equals  the  density  of  the  distribution  at  the  location  plus  scale.    A   coupled  entropy  function  is  proposed,  closely  related  to  the  normalized  Tsallis  entropy,  but   incorporating  a  distinction  between  the  additive  coupling  and  multiplicative  coupling.       Keywords:    complex  systems,  nonlinear  coupling,  non-­‐additive  entropy,  nonextensive  statistical   mechanics   1 Introduction       Entropy  is  the  standard-­‐bearer  for  defining  the  average  uncertainty  of  a   probability  distribution  or  density  function  [1–3].    Boltzmann,  Gibbs,  and  Shannon   (BGS)  demonstrated  that  the  kernel − ln p  is  necessary  to  form  a  weighted  arithmetic   average  of  the  uncertainty  of  a  probability  distribution.    Khinchin  showed  that  the   N entropy  function H = −∑ pi ln pi is  unique  given  the  axioms  that  it  is     i =1   a)  continuous  in  pi,       b)  maximized  at  the  uniform  distribution,       c)  not  changed  by  a  state  with  zero  probability,  and       d)  additive  for  conditionally  independent  probabilities.                                                                                                                         Correspondence:    Kenric  Nelson,  [email protected],  781-­‐645-­‐8564   1  Boston  University,  Boston,  MA   2  Raytheon  Company,  Woburn,  MA   3  University  of  New  Haven,  New  Haven,  CT     Rényi  ,  Tsallis  and  Amari  [4–6]  sought  to  broaden  the  definition  of  average   uncertainty  to  account  for  the  influence  of  nonlinear  dynamics  in  complex  systems.     Generalized  entropy  measures  have  been  applied  to  a  variety  of  nonlinear  systems   such  as  decision  making  under  risk  [7,8],  communication  channel  equalization  [9],   compressive  sensing  [10],  the  edge  of  chaos  [11],  space  plasma  [12,13],  high  energy   physics  [14,15]  and  quantum  entanglement  [16].      Hanel  and  Thurner  [17,18]  have   shown  that  requiring  just  the  first  three  of  Khinchin’s  axioms  leads  to  a  two-­‐ parameter  generalization  of  entropy,  one  of  which  is  the  Tsallis  generalization  and   the  focus  of  this  communication.   The  objective  of  the  paper  is  to  show  the  generalized  average  uncertainty  for   a  nonlinear  system  can  be  defined  in  the  probability  domain  as  the  weighted   generalized  mean.    This  is  derived  as  a  transformation  of  the  generalized  entropy   functions.    New  evidence  for  the  importance  of  generalizing  the  average  uncertainty   is  provided.    For  the  distributions  that  minimize  the  weighted  generalized  mean   (maximum  generalized  entropy)  constrained  by  a  location  and  scale,  the  density  at   the  location  plus  the  scale  is  the  generalized  average  uncertainty.         A  review  of  the  average  uncertainty  for  important  members  of  the   exponential  family  provides  a  helpful  framework  prior  to  introduction  of  the  effects   of  nonlinearity.    The  Boltzmann-­‐Gibbs-­‐Shannon  entropy  transformed  to  the   probability  domain,  is  the  weighted  geometric  mean  of  the  distribution,  that  is   ⎛ N ⎞ N   (1)   Pavg ≡ exp ⎜ +∑ pi ln pi ⎟ = ∏ pipi ,     ⎝ i =1 ⎠ i =1 where  the  weights,  now  as  powers,  are  also  probabilities.    The  average  uncertainty   Pavg  is  the  average  probability  of  being  able  to  determine  the  state  of  the  system.     The  average  uncertainty  ranges  from  certainty  (Pavg  =1)  when  one  of  the  states  is   certain,  to  (Pavg  =1/N)  when  all  states  are  equiprobable.    The  intuition  is  that  the   total  probability  of  the  distribution  is  the  product  of  the  probabilities  and  the   average  is  determined  by  weighting  each  term  by  the  probability.    Assuming  a   continuous  distribution,  the  average  density  for  the  exponential  distribution  is  then   ⎛ ∞ −( x− µ ) ⎛ −( x− µ ) ⎞ ⎞ ⎛ −( x− µ ) ⎞ 1 1 1 σ f avg ⎜ σ e ⎟ = exp ⎜ ∫µ σ e σ ln ⎜ σ e σ ⎟ dx ⎟ ⎜ ⎝ ⎠ ⎝ ⎠ ⎟⎠     ⎝   (2)   1 = σe ! and  for  the  Gaussian  distribution  the  average  density  is     2 2 2 −1⎛ x − µ ⎞ ⎞ −1⎛ x − µ ⎞ −1⎛ x −µ ⎞ ⎞ ⎛ ∞ ⎞ ⎛ ⎛ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ 2⎝ σ ⎠ ⎟ 2⎝ σ ⎠ 2⎝ σ ⎠ ⎟ 1 1 1 ⎜ ⎜ ⎜ favg 2πσ e = exp ∫ 2πσ e ln 2πσ e dx ⎟ ⎜ −∞ ⎜ ⎟ ⎜ ⎟ ⎟ ⎝ ⎠ ⎝ ⎠ ⎠       (3)   ⎝ 1 = . 2π eσ In  both  cases  the  average  density  is  equal  to f ( µ + σ ) .         Rényi  showed  that  information  theory  could  be  broadened  by  considering   the  weighted  generalized  mean  of  probabilities  [19]  as  the  kernel  prior  to  applying   2     the  logarithm  function.    Through  consideration  of  the  statistics  of  a  weighted   distribution   piq ,  Tsallis  showed  that  use  of  both  the  weighted  generalized  mean  and   a  generalization  of  the  logarithm  function  provided  a  model  of  non-­‐additive  entropy.     Because  of  its  role  in  raising  probabilities  to  a  power,  the  parameter  q  can  be   interpreted  as  the  number  of  independent  random  variables  whose  combined   distribution  provides  a  basis  for  determining  generalized  statistical  properties.    This   analysis,  broadly  referred  to  as  nonextensive  statistical  mechanics  [20],  has  been   shown  to  model  a  wide  variety  of  complex  systems.         Section  2  introduces  the  concept  of  nonlinear  statistical  coupling  which  is  an   interpretation  of  nonextensive  statistical  mechanics  focused  on  the  role  of   nonlinearity  in  deforming  statistical  analysis.    From  examination  of  multivariate   distributions,  it  was  shown  that  the  coupling  parameter   κ is  related  to  q  via  the   ακ .         influence  of  the  dimensions  d  and  power α of  the  state  variable  by   q = 1+ 1+ dκ ! Other  approaches  have  been  taken  to  parameterizing  the  Tsallis  statistics,  including   κ ' = 1− q ,  which  was  originally  proposed  as  a  definition  of  nonlinear  statistical   1     1− q which  is  the  translation  to  the  kappa-­‐distribution  used  in  space  physics  [12].    There   are  also  generalizations  of  entropy,  which  use  the  kappa  symbol,  such  as  the  work   by  Kaniadakis[24].         In  Section  3,  the  main  objective  relating  average  uncertainty  and  the  width  of   coupled  exponential  distributions  is  established.    In  Section  4  we  show  that  the   generalized  entropies  of  Renyi  and  Tsallis  along  with  a  modified  normalization  of   the  Tsallis  entropy  denoted  as  the  coupled  entropy,  can  each  be  expressed  as  the   weighted  generalized  mean  of  the  distribution  and  a  transformation  to  the  entropy   scale  using  a  generalized  logarithm  function.   coupling  [21]  and  has  been  utilized  by  other  investigators  [22,23];  and κ '' = 2 Nonlinear  Statistical  Coupling     Fundamental  to  complex  systems  is  the  influence  of  nonlinearity  on   dynamics  [25,26].    As  such  in  modeling  the  statistical  mechanics  of  a  complex   system,  we  choose  the  source  of  nonlinearity  to  define  the  nonlinear  statistical   coupling  (NSC)  κ  [21].    NSC  has  two  contexts,  external  coupling  between  random   variables  and  internal  coupling  between  the  states  of  a  random  variable  [27].    The   role  of  the  coupled  product  function  in  modeling  external  coupling  was  developed  in   [28],  building  upon  the  q-­‐algebra  of  nonextensive  statistical  mechanics  [29].    In  this   paper,  the  focus  is  on  internal  coupling.    The  probability  average  translated  from   BGS  entropy  in  (1)  treats  the  probability  of  each  state  as  independent,  thus   multiplying  the  probabilities  of  the  distribution.    The  dependence  due  to  the   probabilities  summing  to  one  is  incorporated  via  the  power  term.    The  generalized   average  uncertainty  introduced  in  Section  3  will  make  use  of  the  coupled  product  as   3     a  model  of  dependency  between  the  states.    First  we  introduce  the  basic   relationships  of  nonlinear  statistical  coupling.   Positive  coupling   (0 < κ < ∞ )  is  the  domain  of  heavy-­‐tail  statistics  in  which   the  nonlinearity  causes  increased  variation.    Examples  include  multiplicative  noise   [30],  superstatistics  in  which  the  variance  fluctuates  [31,32],  and  the  inverse  of  the   degree  of  freedom  [33–35].    Negative  coupling   ( −1 < κ < 0)  is  the  domain  of   compact-­‐support  statistics  in  which  the  nonlinearity  causes  reduction  in  variation.     The  two  domains  are  related  by  a  conjugate  dual   1−+κκ .    Linear  systems   (κ = 0)  are   the  domain  of  exponential  statistics  and  logarithmic  measures  of  information.       The  fluctuation  of  the  variance,  studied  as  superstatistics  [31,32],  is  a  helpful   example.    For  a  system  governed  by  an  exponential  distribution,     1 −σx ' e ,!!x ≥ 0,       (4)   !σ ' but  with  the  inverse  scale   β ' = 1  fluctuating  according  to  a  gamma  distribution   σ' ! the  modified  statistics  are  governed  by  a  deformed  exponential  distribution,  which   we  will  call  a  coupled-­‐exponential.    The  scale  and  shape  of  the  coupled  exponential   are  defined  by  the  mean  and  relative  variance  of  the  inverse  scale   σ = β'   κ= −1 , 2 β '2 − β ' β' . 2     (5)   ! For  this  mean  and  relative  variance,  the  gamma  distribution  is     ( ) Γ ( )( ) ( ) f β' =   1 κ σ 1 σ 1 −1 β' κ e − σβ ' κ ,     (6)   ! and  the  coupled  exponential  distribution  is     ∞ ⎛1 ⎞ −⎜ +1⎟ 1   (7)   1+ κ x ⎝ κ ⎠ = ∫ f β ' β 'e − β 'x d β ' .     σ 0 !   The  coupled  exponential  function  is  notated  as  an  analog  of  the  exponential   function   ( ( )( ) () ( 1 +1 κ + ) ) () ( ) (8)   exp x ≡ 1+ κ x ,!! a ≡ max 0,a .     + ! κ The  inverse  of  the  exponent  is  a  modified  coupling,  which  will  be  referred  to  as  the   multiplicative  coupling.    For  d  dimensions  [28,36]  the  exponent  generalizes  to   κ −1 ≡ 1 + d ,  but  only  the  one-­‐dimensional  function  will  be  used  in  this  paper.     κ d will   ! d κ ! be  used  to  modify  the  product  function.    The  inverse  of  the  multiplicative  coupling  is     ( ) −κ d−1 ( ) −κ −1 equal  to  the  asymptotic  fractal  dimension   lim 1+ κ x = O x d  of  the  coupled   !x→∞ exponential  distribution  (7);  thus  the  inverse  of  the  coupling  terms  are  summarized   by   4     κ −1 = ν !!!Degree!of!Freedom,       κ d−1 = D!!!Asymptotic!Fractal!Dimension. ! Raising  to  a  power  is  not  identical  to  multiplying  the  argument,  so  an   additional  parameter  definition  is  required  to  show  the  relationships.    In   anticipation  of  its  use  with  distributions,  the  power  used  is   1α     1/α κ exp   1⎛ 1 ⎞ +1 α ⎜⎝ κ ⎟⎠ + ( x ) ≡ (1+κ x ) ( x ) ≡ (1+ ακ x ) , 1⎛ 1 ⎞ +1 α ⎜⎝ κ ⎟⎠ +     (9)   (10)   exp . ! α ,κ These  notational  definitions  are  needed  to  clarify  that  raising  to  a  power  is   equivalent  to  both  multiplying  the  argument  and  dividing  the  nonlinear  coupling   terms   exp1/α x = expα ,κ x / α .       (11)   ! κ     The  nonlinear  statistical  coupling  has  the  effect  of  changing  the  relationship   between  variables  in  the  state  space.    Multiplication  of  independent  coupled   exponential  distributions  results  in  a  combined  variable  of   () ( ( ) ( )( ( ) )) 1+ κ x 1+ κ y = 1+ κ x + y + κ xy .   ! The  nonlinear  term  is  viewed  as  forming  the  coupled  addition  [21,29]     x ⊕ y = x + y + κ xy ,     ! κ which  via  the  coupled  subtraction  is  seen  as  a  dilation  of  the  state  space   x− y   .     x ⊖κ y ≡ 1+ κ y ! The  inverse  of  the  coupled  exponential  for  the  domain   1+ κ x > 0  is  the   coupled  logarithm   ⎞ 1⎛ κ   lnκ x ≡ ⎜ x 1+κ −1⎟ ,!x > 0 .     κ⎝ ⎠ ! Importantly,  the  integral  over  the  unit  interval  is  invariant  to  the  deformation     () 1 ∫ ln κ (12)   (13)   (14)     (15)   ( x )dx = 1 .    This  insures  that  the  coupled  logarithm  deforms  the  measure  of   −1 !0 information  without  modifying  the  “total  information”  over  the  unit  interval.   Incorporating,  the  power   α  the  definition  is   ακ ⎞ 1 1 ⎛ 1+ κ   (16)   lnα ,κ x ≡ lnκ x α ≡ x −1⎟ ,!x > 0     ⎜ α ακ ⎝ ⎠ !   The  role  of  the  coupled  addition  in  modifying  the  state  space  can  now  be   expressed  in  terms  of  the  coupled  exponential  and  logarithm  functions   () ( ) 5     ⎛ N ⎞ N exp x = exp x ∏ κ i ⎜⎝ ∑ ⊕κ i ⎟⎠ ,!! ∑ ⊕κ x i ≡ x1 ⊕κ ....⊕κ x N , i=1 i=1 i=1 ( ) N       (17)   ⎛ N ⎞ N lnκ ⎜ ∏ x i ⎟ = ∑ ⊕ lnκ x i . κ ! ⎝ i=1 ⎠ i=1 The  coupled  product  has  a  complimentary  role,  but  operates  on  the  exponent  of  the   variable.    Thus  not  only  do  the  coupled  sum  and  product  not  form  an  algebra  with  a   distribution  property  [29],  but  are  more  accurately  two  complementary  algebras   [22,37].    The  coupled  product  of  positive-­‐valued  variables  ! f > 0!and!g > 0  is   ( κ1 κ ) 1 κ1 ,  where  the  multiplicative  coupling   κ 1 = 1+κκ  is  the  inverse  of   ! + ! the  exponent  of  the  coupled  exponential  function.      This  definition  extends  to   multiple  variables  and  has  the  following  properties   f ⊗κ g ≡ f 1 + g 1 −1 κ ⎛ N ⎞ 1+κ exp x ≡ exp x i − N −1 ⎟ ∏ ⎜∑ ⊗κ κ i κ ⎝ i=1 ⎠ i=1 1+κ ( ) N ( ) ( ) 1+κ κ ⎛ N ⎞ = expκ ⎜ ∑ x i ⎟ ,!for!expκ x i > 0     ⎝ i=1 ⎠ ( )   (18)   ⎛ N ⎞ N lnκ ⎜ ∏ ⊗ x i ⎟ = ∑ lnκ x i ,!for!x i > 0. ⎝ i=1 1+κκ ⎠ i=1 ! In  [28]  the  formation  of  multivariate  coupled  exponentials  required  the  coupled   product  to  be  defined  such  that  the  output  dimension  was  the  sum  of  the  input   dimensions.    This  paper  is  focused  on  the  coupling  between  states  for  a  single   random  variable  and  as  such  the  dimension  does  not  change.    The  coupled  power   will  also  be  needed,     x !   ⊗κa 1 ( κ1 ( ≡ ax − a −1 )) 1 κ1 + ,!x > 0.     (19)   ⎛ −x α ⎞ Generalization  of  the  stretched  exponential  distributions   f x ∝exp ⎜   α ⎟ ⎝ ασ ⎠ ! utilizes  the  two-­‐parameter  definitions  from  Equation  (10).    Thus  the  coupled   stretched  exponential  is  expressed  as   () 1+κ ⎛ xα ⎞ ⎛ −x α ⎞ ⎛ x α ⎞ −ακ   (20)   expκ α ⎜ α ⎟ = exp−α ,κ ⎜ = 1+ κ .     ⎜ α ⎟ σ α ⎟⎠ + ⎝σ ⎠ ⎝ ασ ⎠ ⎝ ! The  coupled  exponential (α = 1) and  coupled  Gaussian (α = 2) distributions  are  of   −1 particular  interest  given  their  role  as  maximum  generalized  entropy  distributions           6     with  constraints  on  the  scale  of  the  distribution.    These  distributions  [38]  are   defined  as     α −1 ⎛ ⎛ x − µ ⎞ ⎞ 1 α   (21)   ! expκ ⎜ ⎜ ⎟ ,!κ ≥ −1.     ⎜⎝ ⎝ σ ⎟⎠ ⎟⎠ Z κ ,σ ,α ! For   κ ≥ 0  and   α = 1  the  domain  of  the  random  variable  is   x ≥ µ  and   Z (κ ,σ ,α ) = σ .     ( ) For   κ ≥ 0  and!α = 2,! − ∞ < x < ∞  and   Z (κ ,σ ,α ) = κ ( 12+κκ )! πσ (1 + κ ) ( 21κ )! ,  where   x ! ≡ Γ ( x + 1)  is  Euler’s  gamma  function.    The  parameters  of  the  distributions  are  the   location  μ,  the  scale  σ,  and  the  normalization  Z.    One  of  the  benefits  of  this  approach   to  the  definition  is  that  the  source  of  coupling  κ  corresponds  exactly  to  the  shape   parameter  for  the  generalized  Pareto  distribution  and  the  inverse  of  the  degree  of   freedom  for  the  Student’s  t-­‐distribution.    For  the  compact-­‐support  domain,  the   degree  of  freedom  is  negative  and  less  than  -­‐1.         Definition  1  Coupled  Probability/Density    Given  a  discrete  probability   distribution   p = pi ,!i = 1,...,N  the  following  distribution  is  called  the  coupled   ! probability  distribution     { } α ,κ Pi( ) =   1+ pi N ∑p j=1 ακ 1+κ 1+ j ακ 1+κ = ακ N ∏ p1+j κ pi j=1 j≠i N ⎛ ∑ ⎜⎜ pi i=1 ⎝ N ∏p j=1 ακ 1+κ j ⎞ ⎟ ⎟ ⎠ .   (22)   j≠i ! Similarly,  for  a  given  continuous  density   f ( x )    the  coupled  density  function  is   defined  by   () α ,κ f( ) x ≡   f ∞ ∫f 1+ 1+ ακ 1+κ ακ 1+κ ( x ) .     ( x )dx (23)   −∞ ! The  integral  in  (23)  is  assumed  finite.    The  expression  on  the  right  of  Equation  (22)   is  shown  to  make  evident  the  modeling  of  a  coupled  state  of  the  system.    The  Cauchy   ακ distribution   α = 2,!κ = 1  is  an  illustrative  example.    In  this  case  !1+ = 1  and  the   κ ! coupled-­‐probability  is  formed  by  dividing  the  probability   pi  of  state  i  by  the  product   of  all  the  probabilities  of  all  the  other  states  and  then  renormalizing  them.    This   procedure  has  a  direct  connection  with  the  origin  of  the  Cauchy  distribution  as  the   division  of  two  random  variables.   ( ) 7     An  important  result  of  nonextensive  statistical  mechanics  is  the  relationship   between  coupled-­‐moments  and  the  parameters  of  the  coupled-­‐exponential  and   coupled-­‐Gaussian  distributions  [21,39].    Using  the  coupled  algebra  the   generalization  of  the  nth-­‐moment  takes  the  form     N x in   N κ n,κ ≡ ∑ x inPi( ) = i=1 ∑ xinpi i=1 N 1+n ∑p ! i=1 1+n i κ 1+κ κ 1+κ .     (24)   The  α  parameter  is  not  required  because  it  drops  out  from  the  expression n ακ .     !α 1+ κ Lemma  1    Given  either  the  coupled-­‐exponential  or  the  coupled-­‐Gaussian   distribution,  the  generalized  scale  parameter  σ  is  determined  by  the  generalizations   of  the  1st  and  2nd  moments,  respectively:       ⎛1 ⎛ x ⎞⎞ = ∫ x ⎜ expκ−1 ⎜ ⎟ ⎟ σ ⎝σ ⎠⎠ −∞ ⎝ ∞   x ! κ 1+2κ 1+κ ⎛1 ⎞ −1 ⎛ x ⎞ ∫−∞ ⎜⎝ σ expκ ⎜⎝ σ ⎟⎠ ⎟⎠ ∞ dx 1+3κ 1+2κ 1+κ ∞ −1 ⎛ x 2 ⎞ ⎞ 1+κ −1 ⎛ x 2 ⎞ ⎞ ⎛ ⎛1 2 2 1 2 2 x = ∫ x ⎜ expκ ⎜ 2 ⎟ ⎟ dx   ⎜ Z expκ ⎜ 2 ⎟ ⎟ ∫ κ Z σ ⎝ ⎠ ⎝σ ⎠⎠ ⎝ ⎠ −∞ −∞ ⎝ ! See  [39]  for  the  proof  and  [21]  for  the  notation.   ∞ dx = σ ,     1+3κ 1+κ dx = σ 2 .     (25)   (26)   3 The  Coupled  Average  Uncertainty   The  coupled  algebra  provides  a  foundation  for  defining  a  generalization  of   the  average  uncertainty  given  coupling  of  statistical  states  which  is  equal  to  the   weighted  generalized  mean  (or  weighted  p-­‐norm)  [22,27,40].    Equation  (1)  is   generalized  using  the  coupled  exponential  and  coupled  logarithm  functions.     Definition  2  Coupled  Log  Average    Given  a  set  of  weights   {wi ,  i = 1,..N } such  that   N ∑w i =1 i = 1  and  a  set  of  variables   { xi ,  i = 1,..N } ,  the  coupled-­‐log  average  of  the   variables  is   −1 ⎧ N ⎫ expκ α ⎨∑ wi lnκ x i−α ⎬.     ⎩ i=1 ⎭ ! Lemma  2  The  coupled-­‐log  average     (   ) a)  can  be  expressed  equivalently  using  the  coupled  product,  and     b)  is  equal  to  the  weighted  generalized  mean  (or  weighted  p-­‐norm).     8     (27)     Proof  a)  We  have     wi ⊗ − ακ ⎧N ⎫ N −α α   expκ ⎨∑ wi lnκ x i ⎬ = ∏ ⊗ x i 1+κ ,   − ακ ⎩ i=1 ⎭ i=1 1+κ ! where  we  used  the  properties  in  Equations  (18)  and  (19).       b)  We  have   −1 ⎧ N ⎫ expκ α ⎨∑ wi lnκ x i−α ⎬ ⎩ i=1 ⎭ ( −1 ) ( ) ⎛ ⎛ w ⎛ = ⎜ 1+ κ ⎜ ∑ i ⎜ x ⎝ i=1 κ ⎝ ⎝ N   ⎛ = ⎜ ∑ wi x ⎝ ! i=1 N − ακ 1+κ i ⎞ ⎟ ⎠ (28)   − ακ 1+κ i ⎞⎞⎞ −1⎟ ⎟ ⎟ ⎠⎠⎠ 1+κ − ακ     (29)   1+κ − ακ . ακ Given  the  central  role  of  the  parameter   m = for  the  weighted  generalized  mean,   1+ κ ! the  coupled  log  average  is  summarized  as   −1 ⎧N ⎫ ⎛ N ⎞m ακ    .   expκ α ⎨∑ wi lnκ x i−α ⎬ = ⎜ ∑ wi x i−m ⎟ ,!m = 1+ κ ⎝ ⎠ i=1 i=1 ⎩ ⎭ ! The  coupled-­‐log  average  extends  to  continuous  variables  by  the  relationship   −1 ( ) (30)   −1 ⎧∞ ⎫⎪ ⎛ ∞ ⎞m −α −m α ⎪ expκ ⎨ ∫ w x lnκ f x dx ⎬ = ⎜ ∫ w x f x dx ⎟ .       (31)   ⎝ −∞ ⎠ ⎪ ⎪ −∞ ⎩ ⎭ ! Using  the  coupled  probability  as  the  weight  of  the  generalized  mean  we  can   now  define  the  average  uncertainty  of  a  distribution  that  originates  from  a  system   with  nonlinear  coupling.     Definition  3  Coupled  Average  Uncertainty    Given  a  distribution   p = pi ,!i = 1,...,N   ! its  coupled  average  uncertainty  is  defined  by  the  coupled  log  average  with   x i = pi   ! α ,κ ) ( and   wi = Pi   !   −1 () () () () { } 1+κ   ⎛ N (α ,κ ) −1+ακκ ⎞ −ακ Pκ avg ≡ ⎜ ∑ Pi pi ⎟ .     ⎝ i=1 ⎠ ! 9     (32)   Furthermore,  the  coupled  average  uncertainty  simplifies  to  the  weighted   generalized  mean  with  the  distribution  as  the  weight;  thus   −1 ⎛ N 1+m −m ⎞ m 1 ⎜ ∑ pi pi ⎟ N m ⎛ ⎞ ακ ⎟ = ⎜ ∑ pi1+m ⎟ ,!m =   (33)   Pκ avg ≡ ⎜ i=1 N ,     1+ κ ⎝ i=1 ⎠ ⎜ ⎟ 1+m ⎜⎝ ∑ p j ⎟⎠ j=1 ! and  for  a  continuous  distribution   ⎧ ∞ 1+ ακ ⎫ 1 f 1+κ x lnκ f −α x dx ⎪ ⎪ ∞ ∫ m ⎛ ⎞ −1 ⎪ ⎪ 1+m   (34)   fκ avg = expκ α ⎨ −∞ x dx ⎟ .     ⎬=⎜ ∫ f ∞ ακ 1+ ⎝ ⎠ ⎪ ⎪ −∞ ∫−∞ f 1+κ x dx ⎪ ⎪ ⎩ ⎭ !         Applying  the  coupled  average  uncertainty  to  the  coupled  exponential  and   coupled  Gaussian  distributions,  shown  in  Figure  1,  produces  the  main  result   regarding  its  relationship  with  the  location  and  scale  of  the  distribution.   () () () () Theorem  1    The  coupled  average   fκ avg  of  either  the  coupled  exponential   distribution  or  the  coupled  Gaussian  distribution  with  a  weight  defined  by  the   coupled  probability  is  equal  to  the  density  of  the  distribution  evaluated  at   x = µ + σ .   Proof:    Without  loss  of  generality  we  set  !µ = 0.    For  the  coupled  exponential   distribution,  which  corresponds  to  !α = 1  in  Equation  (21),  that  is   ⎛ x⎞ 1 f x = expκ−1 ⎜ ⎟ ,    the  coupled  average  uncertainty  is   σ ⎝σ ⎠ ! () 1 ⎛∞ ⎞m fκ avg = ⎜ ∫ f 1+m x dx ⎟ ! ⎝0 ⎠ () 1+2κ ⎛ ⎞ 1+2κ ∞ −κ ⎛ ⎞ x = σ κ ⎜ ∫ ⎜ 1+ κ ⎟ dx ⎟ ⎜ 0⎝ ⎟ σ⎠ ⎝ ⎠   =σ   ! = 1+2κ κ ( ⎛ 1+ κ ⎝ ) () ( −1 σ⎞ ⎠ 1+κ κ ) 1 −1 e 1 = f µ +σ . σ κ   10   1+κ κ     (35)   Similarly,  for  the  coupled  Gaussian  distribution,  which  corresponds  to  !α = 2  in   ⎛ x2 ⎞ 1 expκ−1/2 ⎜ 2 ⎟ ,  the  coupled  average  uncertainty   Equation  (21),  that  is   f x = Z κ ,σ ,2 ⎝σ ⎠ ! is       () ( ) 1 ⎛∞ ⎞m fκ avg = ⎜ ∫ f 1+m x dx ⎟ ! ⎝ −∞ ⎠ () ( ) ⎞⎟ ( )( )!⎟⎠ ⎛ κ 1+2κκ ! =⎜ ⎜⎝ πσ 1+ κ 21κ 1+3κ 2κ 1+3κ ⎛∞ ⎞ 2 −2κ ⎛ ⎞ ⎜ 1+ κ x ∫ ⎜⎝ σ 2 ⎟⎠ dx ⎟⎟ ⎜ −∞ ⎜⎝ ⎟⎠ ( ) ( ) ( )( ) ( ) ⎛ ⎞ κ ( )! ⎟ (1+ κ ) =⎜ ⎜⎝ πσ (1+ κ )( )! ⎟⎠ 1 = e (1) = f ( µ + σ ) Z (κ ,σ ,2) ⎛ κ 1+2κκ ! =⎜ ⎜⎝ πσ 1+ κ 21κ   1+3κ 2κ ⎞ ⎟ ! ⎟⎠ 1+κ 2κ ⎛ πσ 1 2κ ⎜ 1+ ⎜⎝ κ 2κκ − !⎞ ⎟ ! ⎟⎠ 1+κ 2κ 1+κ 2κ     (36)   1+κ 2κ 1 2κ −1/2 κ !   Figure  1    The  a)  coupled  exponential  and  b)  coupled  Gaussian  distributions  have  the  property  that  the  coupled   average  uncertainty,  equation  (34),  is  equal  to  the  density  at  the  location  plus  the  scale   f ( µ + σ ) .    Several   examples  of  the  distributions  with  coupling  ranging  from   −2 3  to  2  are  shown.     Theorem  1  has  important  implications  for  defining  the  generalized  average   uncertainty.    For   κ → 0  the  weighted  generalized  mean  is  the  weighted  geometric   mean.    Just  as  the  standard  deviation  is  an  expression  of  the  variation  of  the  random   variable,  the  geometric  mean  of  a  distribution  weighted  by  the  distribution  is  an     11   expression  of  average  uncertainty.    For  the  Gaussian  distribution,  one  can  verify  that   the  weighted  geometric  mean  of  the  distribution  is  equal  to  the  density  evaluated  at   x = µ + σ .   The  average  uncertainty  is  generalized  by  using  the  coupled  probability   distribution  for  the  weight  and  taking  the   −ακ (1+κ ) moment.  And  when   f ( x )  is  a   ! member  of  the  coupled  distributions   f µ + σ = fκ avg .  This  relationship  is  shown  in     !     Figure  2  for  the  heavy-­‐tail  domain  of  the  coupled-­‐Gaussian  distribution.    The   coupled  average  uncertainty  versus  the  source  of  coupling  parameter  for  the   distribution  is  plotted  over  the  range   0 ≤ κ ≤ 1 ,  which  includes  the  Gaussian   (κ = 0) ,   ( ) the  boundary  with  infinite  variance   (κ = 0.5)  and  the  Cauchy  distribution   (κ = 1) .     , Four  values  for  the  coupled  average  uncertainty,  called  the  metric  coupling   κ = 1 , 2 , 3 , 4 are  shown.    In  each  case  the  maximum  uncertainty   5 5 5 5   1 −1 corresponds  to   eκ 2 (1 ) . Z     { } AverageUncertainty 0.5 Metric Coupling one fifth two fifths three fifths four fifths 0.4 0.3 g   Z1 eκ−1/2 (1) 0.2 0.1 0.0 0.0 0.2 0.4 0.6 Coupling of Distribution 0.8 1.0 Figure  2    The  coupled  average  uncertainty  as  a  function  of  the  source  of  coupling  is  shown.    The  x-­‐axis  varies  the   coupling  of  a  coupled  Gaussian  distribution  with   σ = 1.  The  four  lines  are  for  metric  coupling  of   { κ = 1 ,2 , 3 ,4 5 5 5 } ,  which  translates  into  weighted  generalized  mean  with  !1+2κκ .    When  the  metric  coupling   5 equals  the  distribution  coupling  the  average  uncertainty  is  minimized  and  equals     12   1 −12 eκ (1) .       Z   4 The  coupled-­‐entropy  function     In  defining  the  coupled  log  average  in  Equation  (27)  the  role  of  the   generalized  entropy  was  implied  but  not  explicitly  expressed.    In  this  section  we   show  that  the  Renyi,  Tsallis,  and  normalized  Tsallis  entropies  can  each  be   interpreted  as  the  weighted  generalized  mean  of  a  distribution  translated  to  an   entropy  scale  by  generalized  logarithms.    Thus  translated  to  the  probability  domain   they  are  each  identical  expressions  of  average  uncertainty.    Use  of  the  coupled   logarithm  leads  to  a  new  definition,  called  the  coupled-­‐entropy.    Its  properties  with   respect  to  the  nonlinear  coupling  are  compared  with  the  Renyi  and  Tsallis   generalizations.     In  information  theory,  the  negative  logarithm  of  a  probability  is  referred  to   as  the  surprisal.    From  Equation  (16),  the  coupled  surprisal  (or  generalized  measure   of  information)  is  then   ⎞ 1 1 ⎛ −1+ακκ −α   (37)   sα ,κ ≡ −ln −α ,κ x ≡ lnκ x = x −1 ⎟ ,!for!x > 0     α ακ ⎜⎝ ⎠ ! An  alternative  definition  is  possible  based  on  the  inverse  of  the  coupled  stretched   exponential  (20)  taking x  as  the  argument     ! σ 1 ⎛ 1 ⎛ −ακ ⎞⎞α 1+κ lnκ x ≡ −α ln −α ,κ x ≡ ⎜ ⎜ x −1⎟ ⎟ ,!for!x > 0 .       (38)   ⎠⎠ ⎝κ ⎝ ! While  not  investigated  here,  the  alternative  definition  is  of  potential  significance  as   an  approach  to  the  two-­‐parameter  generalized  entropy  function  proposed  by  Hanel,   et.  al.  [17,18]  and  related  generalizations  investigated  in  [37].       Definition  4:  Coupled  Entropy    Given  a  discrete  probability  distribution   p = pi ,!i = 1,...,N  or  a  continuous  density f x  and  setting  the  Boltzmann  constant   ! ! to  one,  the  coupled  entropy  is  defined  as   1 −α α ( { ) ( ) 1 α () } 1+κ       Sα ,κ ! Sα ,κ ! N ⎛ N 1+ ακ ⎞ ακ α ,κ p ≡ −ln −α ,κ ⎜ ∑ pi 1+κ ⎟ = − ∑ Pi( ) ln −α ,κ pi ,   ⎝ i=1 ⎠ i=1 () (39)   1+κ ∞ ⎛ ∞ 1+ ακ ⎞ ακ α ,κ 1+κ f x ≡ −ln −α ,κ ⎜ ∫ f x dx ⎟ = − ∫ f ( ) x ln −α ,κ f x dx .   ⎝ −∞ ⎠ −∞   ( ( )) ()   13   () () (40)   The  coupled-­‐entropy  expands  to  the  following  expression   1+κ Sα ,κ ακ ⎛ N 1+1+ ⎞ ακ p = −ln −α ,κ ⎜ ∑ pi κ ⎟ ⎝ i=1 ⎠ () 1+κ − ακ ⎛ N ⎞ ακ ακ 1+κ ⎛ ⎞ 1+ 1 ⎜ = −1⎟     ∑ p 1+κ ⎟⎠ ⎟ ακ ⎜⎜ ⎜⎝ i=1 i ⎟⎠ ⎝   (41)   −1 ⎛ ⎞ ακ ⎞ 1 ⎛ N 1+1+ κ ⎜ ∑p = ⎟ −1⎟⎟ . ακ ⎜⎝ ⎜⎝ i=1 i ⎠ ⎠ ! For  the  two  principal  cases  of  interest,  namely  for   α = 1  and   α = 2, the  coupled-­‐ entropy  becomes     −1 ⎛ ⎛ N (1+2κ ) ⎞ ⎞ 1⎜ 1+κ ) ( ⎜ ∑ pi ⎟ −1⎟ , S1,κ p = ⎜ ⎟ κ ⎜ ⎜ i=1 ⎟⎠ ⎟⎠ ⎝ ⎝       (42)   −1 ⎛ ⎛ N (1+3κ ) ⎞ ⎞ 1 (1+κ ) ⎟ −1⎟ . S2,κ p = ⎜ ⎜ ∑ pi ⎟ 2κ ⎜⎜ ⎜ i=1 ⎟⎠ ⎟⎠ ⎝ ⎝ ! Both  the  Rényi  and  Tsallis  entropies  can  be  expressed  in  terms  of  the  coupled   average  uncertainty  (32).    To  facilitate  the  comparison  between  the  entropy   ακ functions  a  substitution  is  made  for  the  Rényi  order  and  Tsallis  index   q → 1+ 1+ .     κ ! Table  1  summarizes  the  properties  of  the  transformation  from  an  average   uncertainty  to  an  entropy  in  terms  of  the  moment  of  the  average,  and  the  power  and   normalization  associated  with  the  generalized  logarithm,     () () 1   ⎛ N ⎞ Moment −1 S ( p, Norm, Power, Moment ) = GM Power − 1 , GM = ⎜ ∑ piMoment+1 ⎟ .  (43)   Norm ⎝ i=1 ⎠ ( ) For  the  Rényi  entropy  (R)  the  relationship  with  the  coupled  average  uncertainty  is   evident  given  its  use  of  the  natural  logarithm   1+κ     SαR ,κ ! ⎛ N 1+ ακ ⎞ ακ = −ln ⎜ ∑ pi 1+κ ⎟ .     ⎝ i=1 ⎠     14   (44)   Table  1    Comparison  of  Generalized  Entropies    The  generalized  entropy   functions  are  expressed  in  terms  of  three  components,  the  moment  of  the   generalized  mean,  the  power  and  the  normalization  (norm)of  the  generalized   logarithm.     Entropy Moment Power ακ 1+ κ ακ 1+ κ ακ 1+ κ −ακ 1+ κ ακ 1+ κ −ακ 1+ κ ακ 1+ κ lim power→0 Coupled Tsallis Normalized! Tsallis Renyi Shannon −ακ ακ 1+ κ −ακ 1+ κ lim lim moment→0 Norm. power→0 lim norm→0 lim norm→0   !   The  coupled  entropy  is  most  closely  related  to  the  normalized  Tsallis  entropy  (NT).     Expressed  in  terms  of  the  coupled  surprisal  (37)  the  normalized  Tsallis  entropy  is   seen  to  be  the  coupled  entropy  (39)  multiplied  by   1+ κ     ! (   () SαNT,κ p ≡ ( − 1+ κ ) N ∑ pi 1+ i=1 N ακ 1+κ ln −α ,κ pi ακ 1+κ ) 1+κ ⎛ N 1+ ακ ⎞ ακ = − 1+ κ ln −α ,κ ⎜ ∑ pi 1+κ ⎟ .     ⎝ i=1 ⎠ ( ) (45)   ∑ pi i=1 ! Using  the  unnormalized  form  of  Equation  (45)  for  the  Tsallis  entropy   definition,  the  lack  of  normalization  is  shown  to  be  equivalent  to  using  the  opposite   sign  of  the  multiplier  for  the  transformation   1+ 1+κ ακ ⎛ N 1+1+ ⎞ ακ T κ   (46)   Sα ,κ p ≡ − 1+ κ ∑ pi ln −α ,κ pi = 1+ κ lnα ,κ ⎜ ∑ pi ⎟ .   ⎝ i=1 ⎠ i=1 ! Derivation  of  the  right-­‐hand  expression  is  shown  in  Appendix  A.    The  coupled   entropy  (C),  normalized  Tsallis,  and  Tsallis  entropy  have  then  the  following   relationship   SαNT,κ SαT ,κ C S = = .     (47)   α ,κ ακ N 1+ 1+ κ 1+κ 1+ κ ∑ pi i=1 ! Figure  3  and  Figure  4  show  comparisons  of  the  entropy  functions  for  the  coupled   exponential  distribution  and  the  coupled  Gaussian  distribution  respectively.    The   computations  for  the  two  figures  are  summarized  in  Appendix  B.    For  the  coupled   exponential  distribution  (Equation  (21)  with  !α = 1 )  with  the  scale   σ  equal  to  one,   both  the  coupled  and  Tsallis  entropy  are  equal  to  one.    In  this  case,  the  normalized   Tsallis  entropy  is  linear  and  similar  to  the  Shannon  entropy.    As  shown  on  the  right   () ( ) N 1+ ακ 1+κ ( (   15   ) ) of  Figure  3,  even  as  the  scale  varies  the  coupled  entropy  does  not  vary  significantly   with  the  coupling.    This  is  suggestive  that  the  coupled  entropy  represents  a   stabilization  of  the  entropy  as  a  function  of  the  coupling,  in  contrast  to  the  Shannon   and  Renyi  entropies  which  have  close  to  linear  growth  with  the  coupling.    However,   this  property  does  not  hold  for  the  coupled  Gaussian  distribution  (Equation  (21)   with  !α = 2 )  shown  in  Figure  4.    Instead,  the  coupled  entropy  is  quite  sensitive  to   changes  in  both  the  coupling  and  the  scale.    With  scale  equal  to  one,  the  coupled   entropy  is  similar  to  the  Shannon  entropy,  particularly  when  !0 < κ < 0.5 .    For  !κ > 0.5 ,   the  difference  is  more  evident  as  the  coupled  entropy  is  slightly  super-­‐linear  and  the   Shannon  entropy  is  slightly  sub-­‐linear.    For  this  case,  the  normalized  Tsallis  entropy   is  close  to  quadratic  with  the  coupling.    The  Renyi  entropy  has  close  to  linear  growth   for  both  distributions,  but  with  a  slope  that  is  less  than  the  Shannon  entropy.    The   sensitivity  of  the  coupled  entropy  with  !α ≠ 1  would  be  reduced  if  Equation  (38)  is   used  for  the  generalized  logarithm,  since  the  root  with  respect  to   α  is  taken.   5 Conclusion     The  nonlinear  statistical  coupling  of  states  is  defined  in  terms  of  a  source  of   nonlinear  coupling  κ  in  the  system.    Positive  coupling  models  non-­‐stationary   systems  in  which  the  variance  fluctuates.    The  negative  domain  of  κ,  which  has   decreased  variability,  is  limited  to   ( −1,0) ;  and   κ = 0  is  the  linear  domain  with   exponential  distributions.    The  maximum  entropy  distribution  for  these  systems   given  a  constrained  location  and  scale  is  the  coupled-­‐exponential  distributions,   defined  in  Equation  (21).    In  addition  to  the  nonlinear  coupling  these  distributions   − xα depend  on  the  stability  index  of  the  stretched  exponential  !e α .    The  coupled  sum   is  defined  by  the  nonlinear  coupling,  while  the  coupled  product  is  a  function  of  the   −ακ coupling,  the  stability  index  and  the  dimensions   .    In  this  paper  the  one-­‐ !1+ dκ dimensional  case   d = 1  was  examined.       In  this  paper  the  coupled  average  uncertainty  in  the  probability/density   ακ space  is  introduced  as  the  weighted  generalized  mean  with  a  power  equal  to   1+ .     ! κ The  expression  is  derived  from  and  is  expressible  in  terms  of  deformation  of  the   coupled  product  (18)  and  the  coupled  power  (19)  functions         N Pκ avg ≡ ∏ ⊗ pi ακ 1 i=1 ! (− ακ 1 ) P ⊗Ki     16   1+κ ⎛ N 1+ ακ ⎞ ακ = ⎜ ∑ pi 1+κ ⎟ .     ⎝ i=q ⎠ (48)     3.0 Normalized  Tsallis Entropy 2.5 -­‐-­‐    Shannon −    Coupled 3 Shannon 2.0 2 1.5 Renyi 1.0 1 Coupled  and  Tsallis 0.5 0.0 0.0 0 0.5 1.0 1.5 0.5 2.0 Coupling 1.0 1.5 2.0 Coupling Figure  3    Comparison  of  Entropy  Functions  for  Coupled  Exponential  Distribution  Left)    The  entropy  versus   coupling  with  the  scale  equal  to  one.    The  Coupled  and  Tsallis  entropies  are  both  equal  to  1.    The  Shannon  and   Renyi  entropy  have  close  to  linear  growth.    The  Normalized  Tsallis  entropy  is  similar  to  Shannon  entropy.     Right)    Comparison  of  Shannon  (dashed)  and  Coupled  (solid)  entropy  for  !σ = {0.25,0.5,0.75,1,1.25,1.5,1.75,2} .     Both  entropies  increase  with  the  scale  !σ .  The  Coupled  entropy  does  not  vary  significantly  with  the  coupling,   while  the  Shannon  entropy  has  close  to  linear  growth.       Entropy 4 4 Normalized   Coupled Tsallis 3 3 Shannon 2 -­‐-­‐    Shannon −    Coupled 2 Renyi 1 1 Tsallis 0 0.0 0.5 1.0 1.5 Coupling 0 0.0 2.0 0.5 1.0 1.5 Coupling 2.0 Figure  4  Comparison  of  Entropy  Functions  for  Coupled  Gaussian  Distribution    Left)    The  entropy  versus   coupling  with  the  scale  equal  to  one.    The  Coupled  and  Shannon  entropy  are  similar  with  close  to  linear  growth.     The  Renyi  entropy  also  has  close  linear  growth  but  with  a  smaller  slope.    The  Normalized  Tsallis  entropy  has   grow  close  to  the  square  of  the  coupling,  while  the  Tsallis  entropy  decays.      Right)    Comparison  of  Shannon   (dashed)  and  Coupled  (solid)  entropy  for  !σ = {0.25,0.5,0.75,1,1.25,1.5,1.75,2} .    Both  entropies  increase  with  the   scale  !σ .  The  Coupled  entropy  has  increased  sensitivity  with   σ as  the  coupling  increase,  while  the  Shannon   entropy  has  close  to  linear  growth.         17     For κ = 0  this  is  the  weighted  geometric  mean  in  which  each  state  is  treated  as   independent  and  thus  multiplied,  and  the  dependency  from  the  probabilities   summing  to  one  is  contained  in  the  weight  of  each  probability.    When κ ≠ 0  the   coupled  product  models  the  nonlinear  dependency  between  the  probabilities  of  the   distribution  and  the  weights  are  now  the  deformed  coupled  probability.     Importantly,  for  the  coupled  exponential  distributions  the  coupled  average   −1 () probability  is  equal  to  the  density  at  the  location  plus  the  scale Pκ avg = 1Z eκ α 1 .    The   ! coupled  average  probability  has  been  successfully  utilized  in  the  analysis  of   information  fusion  algorithms  [8,41]  and  is  recommended  as  a  simple  approach  to   understanding  the  average  uncertainty  for  nonlinear  systems.   Upon  transformation  to  the  probability  domain  the  Tsallis,  normalized  Tsallis   and  Rényi  entropies  each  fulfill  the  relationship  between  the  coupled  average   uncertainty  and  the  density  at  the  width  of  the  coupled  distributions.    The   potentially  improved  properties  of  the  coupled-­‐entropy  are  achieved  by  requiring   the  coupled  logarithm  with   α = 1  to  have  a  unit  integral.    The  coupled  entropy  is   defined  as  the  transformation  of   Pκ avg  to  the  entropy  scale  by  the  coupled  logarithm,     ! −1 1+κ ⎛ ⎛ N (1+ακ ) ⎞ ⎞ ακ − ακ ⎛ N 1+1+ ⎞ 1 1+ κ ( ) ⎜⎜ p ⎟ −1⎟ .     Sα ,κ p ≡ −ln −α ,κ ⎜ ∑ pi κ ⎟ =   (49)   ∑ ⎟ ακ ⎜⎜ ⎜ i=1 i ⎟ ⎝ i=1 ⎠ ⎟ ⎠ ⎝⎝ ⎠ ! For  the  coupled  exponential  distribution,  the  matching  coupled  entropy  does  not   vary  significantly  with  the  degree  of  coupling.    In  contrast,  for  the  Gaussian   distribution,  the  matching  coupled  entropy  is  sensitive  to  both  the  coupling  and   scale  of  the  distribution.    Further  analysis  and  experimentation  is  recommended  to   determine  how  the  coupled  entropy  can  be  used  to  model  the  effects  of  non-­‐ stationary  uncertainty  in  complex  thermodynamic  and  information  systems.   ()   18   Appendices   A. Derivation  of  coupled  entropy  from  average  uncertainty   The  coupled  algebra  can  be  used  to  derive  the  equivalency  between  the  two   expressions  for  the  coupled  entropy   1+κ ακ ⎛ ⎞ Sα ,κ p ≡ −ln −α ,κ ⎜ ∑ p ⎟ ⎝ i=1 ⎠ ! (α ,κ ) where Pi is  the  coupled  probability  (22)   ! N ()   ακ 1+ 1+κ i 1+ p α ,κ P( ) = i   N α ,κ = − ∑ Pi( ) ln −α ,κ pi     i=1 ακ 1+κ N i ∑p 1+ j     ακ 1+κ j=1 ! Starting  with  the  expression  on  the  right,  the  coupled  power  is  used  to  move  the   coupled  probability  from  a  multiplier  of  the  generalized  logarithm  to  a  power  of  the   ⊗b− ακ argument  using  the  property   bln −α ,κ x = ln −α ,κ x ! N () ⊗ Sα ,κ p = − ∑ ln −α ,κ pi i=1 !   (1+κ ) (   ( − ακ / 1+κ Pi − ακ 1+κ ( ) )) . N N Expanding  the  coupled  power  and  using  the  property   ∑ ln −α ,κ x = ln −α ,κ ∏ ⊗ x ,   − ακ i=1 1+κ ! i=1 ⎛ α ,κ Sα ,κ p = −ln −α ,κ ∏ ⊗ ⎜ Pi( ) p − ακ ⎝ i=1 1+κ ! ()   − ακ 1+κ i N N (( Expanding  the  coupled  product  and  reducing   ∑ Pi ! i=1 ⎛ N α ,κ Sα ,κ p = −ln −α ,κ ⎜ ∑ Pi( ) p ⎝ i=1 − ακ 1+κ i ()   ⎛ = −ln −α ,κ ⎜ ∑ p ⎝ i=1 N   ! ακ 1+ 1+κ i ⎞ ⎟ ⎠ ⎞ ⎟ ⎠ 1+κ ακ .   19   1+κ − ακ ( ) ⎞ α ,κ − Pi( ) −1 ⎟ ⎠ α ,κ 1+κ − ακ .     ) ) −1 = 1− N   ,     ⎛ N ⎜ ∑ pi = −ln −α ,κ ⎜ N i=1 ακ 1+ ⎜ 1+κ ⎜⎝ ∑ pi i=1 ⎞ ⎟ ⎟ ⎟ ⎟⎠ 1+κ − ακ         Since  the  normalized  Tsallis  entropy  is  just  a  multiple  of  the  coupled  entropy,   the  derivation  is  not  repeated.    The  derivation  of  the  Tsallis  entropy  starts  with  the   middle  expression  of  equation  (46)     () ( ) N ακ 1+κ S p ≡ − 1+ κ ∑ pi ln −α ,κ pi .   i=1 ! The  relationship  is  expressed  in  terms  of  the  coupled  product  and  coupled  power     T α ,κ   () ( ) 1+ N ⊗ SαT ,κ p = − 1+ κ ln −α ,κ ∏ ⊗ pi − ακ i=1 1+κ ! Expanding  the  coupled  power  and  the  coupled  power     ακ 1+ pi 1+κ − ακ 1+κ ( ) .     1+κ SαT ,κ   ⎛ N ⎛ ⎞ −ακ ⎛ 1+ ακ ⎞⎞ p = − 1+ κ ln −α ,κ ⎜ ∑ ⎜ pi − ⎜ pi 1+κ −1⎟ ⎟ − N −1 ⎟ .   ⎝ ⎠⎠ ⎝ i=1 ⎝ ⎠ () ( ) ( ) ! Simplifying  and  using  the  relationship   − ln −α ,κ x − b = lnα ,κ x b     1+κ SαT ,κ !   ⎛ N 1+ ακ ⎞ ακ p = 1+ κ lnα ,κ ⎜ ∑ pi 1+κ ⎟ .     ⎝ i=1 ⎠ () ( ) B. Comparison  of  generalized  entropy  functions   The  comparison  of  entropy  functions  for  the  Coupled  Exponential  and  Coupled   Gaussian  distributions  shown  in  Figure  3  and  Figure  4  includes  the  following   computations.    The  distributions  analyzed  are   ) (1+κ ) ( expdistκ x; µ ,σ ≡ !       1 σ x− µ σ ⎛1 ⎞ −⎜ +1⎟ ⎝κ ⎠     (50)   1⎛ 1 ⎞ − ⎜ +1⎟ 2 2⎝ κ ⎠ κ Γ ⎡⎣ 1+2κκ ⎤⎦ ⎛ ⎛ x −µ⎞ ⎞ Gκ x; µ ,σ ≡ .       (51)   ⎜ 1+ κ ⎜ ⎟ ⎝ σ ⎟⎠ ⎟⎠ π Γ ⎡⎣ 21κ ⎤⎦ ⎜⎝ ! The  computations  were  completed  using  MathematicaTM.    For  the  Coupled,  Tsallis,   and  Normalized  Tsallis  entropy  with  matching  coupling,  closed  form  solutions  exist.     The  entropy  functions  of  the  coupled  exponential  with  !σ = 1  reduce  to  a  linear   expression.     a) Coupled  Entropy   (   ) ( )) = ( ( (expdist ( x;µ ,1)) = 1 S1,Cκ expdistκ x; µ ,σ !S1,Cκ ! κ   20   ) κ −1+ 1+ κ σ 1+κ κ     (52)       ( ( S2,Cκ Gκ x; µ ,σ ! ( ( T 1,κ S S1,Tκ !   )( ) ( −κ + 1+ κ κπ = ⎛ Γ ⎜σ ⎝ Γ ( ) ( ) 1 2κ 1+κ 2κ 2κ ⎞ 1+κ ⎟ ⎠ 2κ 2     (53)   b) Tsallis  Entropy         )) 1 κ 1+κ ( ( −κ )) )) 1+ κ − σ 1+κ expdistκ x; µ ,σ =     κ expdistκ x; µ ,1 = 1 S2,Tκ Gκ x; µ ,σ ( ( )) ! ⎛ 1⎜ 1 = ⎜ 1+ − κπ κ 2 κ ⎜⎝ ( ) −1 1+κ (54)   ⎛ σΓ ⎡ ⎤ ⎞ ⎣ ⎦ ⎜ ⎟ 1+κ ⎝ Γ ⎡⎣ 2κ ⎤⎦ ⎠ 1 2κ − 2κ 1+κ ⎞ ⎟ ⎟     ⎟⎠ (55)   c) Normalized  Tsallis       NT 1,κ S S1,NTκ ! ( ( κ ⎛ ⎞ 1+ κ ⎜ −1+ 1+ κ σ 1+κ ⎟ ⎝ ⎠ expdistκ x; µ ,σ =     κ expdistκ x; µ ,1 = 1+ κ   ( ( S2,NTκ Gκ x; µ ,σ ! )) ) ( ⎛ ⎜ 1+ κ ⎜ −κ + 1+ κ κπ κ ⎜⎝ = 2κ 2 (   )) )) ( ( ( ) ( )( ) ) 1 1+κ (56)   2κ ⎞ ⎛ σΓ 21κ ⎞ 1+κ ⎟ ⎜ ⎟ ⎟ 1+κ ⎝ Γ 2κ ⎠ ⎟ ⎠ ( ) ( )     (57)   Closed  form  solutions  do  not  exist  for  the  Shannon  and  Renyi  entropies.    The   numerical  integration  of  the  Shannon  entropy  has  potential  errors  for  a)  small   values  of  κ  when  the  integration  extends  to  regions  where   − ln f ( x ) f (x )  is  undefined   or  b)  large  values  of  κ  when  the  integration  is  truncated  before   − ln f ( x ) f (x ) has   decayed  sufficiently  to  be  excluded.    For  this  reason  the  Shannon  entropy  was   determined  as  a  piecewise  numerical  integration  with  the  following  limits   x !Limit       ! Coupling 100 0.00 < κ < 0.09 1000 0.09 ≤ κ < 0.74     10,000 0.74 ≤ κ < 1.50 15,000 1.50 ≤ κ ≤ 2.00.   21   (58)   References   [1]   T.M.  Cover,  J.A.  Thomas,  Elements  of  information  theory,  John  Wiley  &  Sons,   2012.   [2]   A.I.  Khinchin,  Mathematical  Foundations  of  Statistical  Mechanics,  Courier   Corporation,  1949.   [3]   A.I.  Khinchin,  Mathematical  Foundations  of  Information  Theory,  Courier   Corporation,  1957.   [4]   A.  Rényi,  On  measures  of  entropy  and  information,  Fourth  Berkeley  Symp.   Math.  Stat.  Probab.  1  (1961)  547–561.   [5]   C.  Tsallis,  Possible  generalization  of  Boltzmann-­‐Gibbs  statistics,  J.  Stat.  Phys.   52  (1988)  479–487.   [6]   S.I.  Amari,  H.  Nagaoka,  Methods  of  Information  Geometry,  Oxford  University   Press,  2000.   [7]   C.  Anteneodo,  C.  Tsallis,  A.S.  Martinez,  Risk  aversion  in  trade  transactions,  Eur.   Lett.  59  (2002)  635–641.   [8]   K.P.  Nelson,  B.J.  Scannell,  H.  Landau,  A  Risk  Profile  for  Information  Fusion   Algorithms,  Entropy.  13  (2011)  1518–1532.   [9]   I.  Santamaria,  D.  Erdogmus,  J.C.  Principe,  Entropy  minimization  for  supervised   digital  communications  channel  equalization,  IEEE  Trans.  Signal  Process.  50   (2002)  1184–1192.  doi:10.1109/78.995074.   [10]   W.R.  Carson,  M.  Chen,  M.R.D.  Rodrigues,  R.  Calderbank,  L.  Carin,   Communications-­‐Inspired  Projection  Design  with  Application  to  Compressive   Sensing,  SIAM  J.  Imaging  Sci.  5  (2012)  1185–1212.  doi:10.1137/120878380.   [11]   E.P.  Borges,  C.  Tsallis,  G.F.J.  Ananos,  P.M.C.  de  Oliveira,  Nonequilibrium   probabilistic  dynamics  of  the  logistic  map  at  the  edge  of  chaos,  Phys.  Rev.  Lett.   89  (2002)  254103.   [12]   G.  Livadiotis,  D.J.  McComas,  Beyond  kappa  distributions:  Exploiting  Tsallis   statistical  mechanics  in  space  plasmas,  J.  Geophys.  Res.  114  (2009)  A11105.   doi:10.1029/2009JA014352.   [13]   L.F.  Burlaga,  A.F.  Vinas,  Triangle  for  the  entropic  index  q  of  non-­‐extensive   statistical  mechanics  observed  by  Voyager  1  in  the  distant  heliosphere,  Phys.   A  Stat.  Mech.  Its  Appl.  356  (2005)  375–384.   [14]   S.  Chatrchyan,  V.  Khachatryan,  A.M.  Sirunyan,  A.  Tumasyan,  W.  Adam,  T.   Bergauer,  et  al.,  Charged  particle  transverse  momentum  spectra  in  pp   collisions  at   s = 0.9  and  7  TeV,  J.  High  Energy  Phys.  2011  (2011)  86.   doi:10.1007/JHEP08(2011)086.       22   [15]   V.  Khachatryan,  A.M.  Sirunyan,  A.  Tumasyan,  W.  Adam,  T.  Bergauer,  M.   Dragicevic,  et  al.,  Transverse-­‐momentum  and  pseudorapidity  distributions  of   charged  hadrons  in  pp  collisions  at  square  root  of  s  =  7  TeV.,  Phys.  Rev.  Lett.   105  (2010)  022002.  doi:10.1103/PhysRevLett.105.022002.   [16]   N.  Canosa,  R.  Rossignoli,  Generalized  nonadditive  entropies  and  quantum   entanglement,  Phys.  Rev.  Lett.  88  (2002)  170401.   [17]   R.  Hanel,  S.  Thurner,  M.  Gell-­‐Mann,  Generalized  entropies  and  the   transformation  group  of  superstatistics,  Proc.  Natl.  Acad.  Sci.  108  (2011)   6390.   [18]   R.  Hanel,  S.  Thurner,  A  comprehensive  classification  of  complex  statistical   systems  and  an  axiomatic  derivation  of  their  entropy  and  distribution   functions,  EPL  (Europhysics  Lett.  93  (2011)  20006.   [19]   A.  Rényi,  On  the  Foundations  of  Information  Theory,  Rev.  Int.  Stat.  Inst.  33   (1965)  1–14.   [20]   C.  Tsallis,  Introduction  to  Nonextensive  Statistical  Mechanics:  Approaching  a   Complex  World,  Springer  Verlag,  2009.   [21]   K.P.  Nelson,  S.  Umarov,  Nonlinear  statistical  coupling,  Phys.  A  Stat.  Mech.  Its   Appl.  389  (2010)  2157–2163.   [22]   T.J.  Arruda,  R.S.  González,  C.A.S.  Terçariol,  A.S.  Martinez,  Arithmetical  and   geometrical  means  of  generalized  logarithmic  and  exponential  functions:   generalized  sum  and  product  operators,  Phys.  Lett.  A.  372  (2008)  2578–2582.   [23]   Q.A.  Wang,  L.  Nivanen,  A.  Le  Mehaute,  M.  Pezeril,  On  the  generalized  entropy   pseudoadditivity  for  complex  systems,  J.  Phys.  A.  Math.  Gen.  35  (2002)  7003– 7007.   [24]   G.  Kaniadakis,  M.  Lissia,  A.M.  Scarfone,  Two-­‐parameter  deformations  of   logarithm,  exponential,  and  entropy:  A  consistent  framework  for  generalized   statistical  mechanics,  Phys.  Rev.  E.  71  (2005)  046128.   doi:10.1103/PhysRevE.71.046128.   [25]   K.S.  Narendra,  K.  Parthasarathy,  Identification  and  control  of  dynamical   systems  using  neural  networks.,  IEEE  Trans.  Neural  Netw.  1  (1990)  4–27.   doi:10.1109/72.80202.   [26]   S.H.  Strogatz,  Exploring  complex  networks.,  Nature.  410  (2001)  268–76.   doi:10.1038/35065725.   [27]   T.  Oikonomou,  Tsallis,  Renyi  and  nonextensive  Gaussian  entropy  derived  from   the  respective  multinomial  coefficients,  Phys.  A  Stat.  Mech.  Its  Appl.  386   (2007)  119–134.   [28]   K.P.  Nelson,  A  definition  of  the  coupled-­‐product  for  multivariate  coupled-­‐ exponentials,  Phys.  A  Stat.  Mech.  Its  Appl.  422  (2015)  187–192.   doi:10.1016/j.physa.2014.12.023.     23   [29]   E.P.  Borges,  A  possible  deformed  algebra  and  calculus  inspired  in   nonextensive  thermostatistics,  Phys.  A  Stat.  Mech.  Its  Appl.  340  (2004)  95– 101.   [30]   C.  Anteneodo,  C.  Tsallis,  Multiplicative  noise:  A  mechanism  leading  to   nonextensive  statistical  mechanics,  J.  Math.  Phys.  44  (2003)  5194.   [31]   C.  Beck,  E.G.D.  Cohen,  Superstatistics,  Phys.  A  Stat.  Mech.  Its  Appl.  322  (2003)   267–275.   [32]   G.  Wilk,  Z.  Włodarczyk,  Interpretation  of  the  Nonextensivity  Parameter  q  in   Some  Applications  of  Tsallis  Statistics  and  Lévy  Distributions,  Phys.  Rev.  Lett.   84  (2000)  2770–2773.  doi:10.1103/PhysRevLett.84.2770.   [33]   W.  Gossett,  The  Application  of  the  “Law  of  Error”  to  the  Work  of  the  Brewery,   Dublin,  1904.   [34]   A.  Shah,  A.  Wilson,  Z.  Ghahramani,  Student-­‐t  processes  as  alternatives  to   Gaussian  processes,  arXiv  Prepr.  arXiv1402.4306.  (2014).   [35]   A.C.  de  Souza,  C.  Tsallis,  Student’s  t-­‐  and  r-­‐distributions:  Unified  derivation   from  an  entropic  variational  principle,  Phys.  A  Stat.  Mech.  Its  Appl.  236  (1997)   52–57.  doi:10.1016/S0378-­‐4371(96)00395-­‐0.   [36]   S.  Umarov,  C.  Tsallis,  On  multivariate  generalizations  of  the  q-­‐central  limit   theorem  consistent  with  nonextensive  statistical  mechanics,  AIP  Conf.  Proc.   965  (2007)  34.   [37]   G.  Kaniadakis,  M.  Lissia,  A.M.  Scarfone,  Two-­‐parameter  deformations  of   logarithm,  exponential,  and  entropy:  A  consistent  framework  for  generalized   statistical  mechanics,  Phys.  Rev.  E.  71  (2005)  46128.   [38]   S.  Umarov,  C.  Tsallis,  M.  Gell-­‐Mann,  S.  Steinberg,  Generalization  of  symmetric   alpha-­‐stable  Lévy  distributions  for  q>1.,  J.  Math.  Phys.  51  (2010)  33502.   doi:10.1063/1.3305292.   [39]   C.  Tsallis,  A.R.  Plastino,  R.F.  Alvarez-­‐Estrada,  Escort  mean  values  and  the   characterization  of  power-­‐law-­‐decaying  probability  densities,  J.  Math.  Phys.   50  (2009)  43303.   [40]   C.  Lassner,  R.  Lienhart,  Norm-­‐Induced  Entropies  for  Decision  Forests,  in:  2015   IEEE  Winter  Conf.  Appl.  Comput.  Vis.,  IEEE,  2015:  pp.  968–975.   doi:10.1109/WACV.2015.134.   [41]   K.P.  Nelson,  Reduced  perplexity:  Uncertainty  measures  without  entropy,  in:   Recent  Innov.  Info-­‐Metrics,  Washington,  D.C.,  2014.       24  
10math.ST
Learning Sparse Visual Representations with Leaky Capped Norm Regularizers Jianqiao Wangni∗ arXiv:1711.02857v1 [cs.LG] 8 Nov 2017 Tsinghua University Beijing, China [email protected] Abstract Sparsity inducing regularization is an important part for learning over-complete visual representations. Despite the popularity of `1 regularization, in this paper, we investigate the usage of non-convex regularizations in this problem. Our contribution consists of three parts. First, we propose the leaky capped norm regularization (LCNR), which allows model weights below a certain threshold to be regularized more strongly as opposed to those above, therefore imposes strong sparsity and only introduces controllable estimation bias. We propose a majorization-minimization algorithm to optimize the joint objective function. Second, our study over monocular 3D shape recovery and neural networks with LCNR outperforms `1 and other non-convex regularizations, achieving state-of-the-art performance and faster convergence. Third, we prove a theoretical global convergence speed on the 3D recovery problem. To the best of our knowledge, this is the first convergence analysis of the 3D recovery problem. Introduction The sparse models have been widely applied in machine learning and computer vision tasks. To encourage sparsity, the `1 norm is widely adopted as a regularizer, which can produce reasonable results in various cases. For an example, to analyse the 3D shape of an object, from a monocular 2D camera, one can build a dictionary of 3D shape bases from datasets, and inference the sparse combination weights of the bases (Zhou et al. 2016). Yet, a number of studies suggested that it is not always the optimal choice, non-convex regularizers can often lead to better balance between sparsity and accuracy in practice. Particularly, a number of nonconvex regularizers have been explored in previous work, such as `p norm (Frank et al. 1993), MCP (Zhang 2010a), SCAD (Fan and Li 2011), Logarithm (Friedman 2012), and capped norm (Zhang 2010b)(Zhang and others 2013). However, the studied models are mostly restricted to be convex ones, therefore lack suitability to larger application scope. This is reasonable since, first, the convex problem with non-convex regularizers are already difficult to analyse, the global optima can only be obtained with additional statistical assumptions. The non-convex problem, even without ∗ This work was done when the first author was a visiting research assistant at CUHK. Dahua Lin The Chinese University of Hong Kong Hong Kong, China [email protected] regularizers, is much more difficult to optimize, the solver for non-convex will converges much slower comparing to when it applies to convex ones. In this work, we will concentrate on the learning better sparse models, with considerations on the running time limitation, which commonly exists, especially in testing stage. For an example, the aforementioned 3D shape recovery models have achieved good enough accuracy, but they converge too slow for real-time applications. Although directly enlarging the `1 regularizer will force more small weights to be zeros within limited time, but this will certainly compromise the accuracy since the larger and effective weights are also penalized strongly. In this work, we aim to move beyond the limitations of existing literatures and develop a novel regularizer that can achieve high sparsity and high accuracy in learning sparse representations (like other successful applications based on non-convex regularizers), The key to achieve this goal is to force more smaller weights to zeros by a stronger regularization, but not so far as to leading larger weights deviating from the ground truth. Following this idea, we propose a novel non-convex regularizer, called Leaky Capped Norm, which is a generalization of the capped norms, but enjoys nice mathematical properties and demonstrates higher performance in experiments. We also derive a doubly majorization-minimization algorithm, which is suitable for both convex and nonconvex loss functions. We also take the 3D shape recovery problem for detailed analysis. By relaxing the objective to a convex one, we can apply an ADMM solver and get a theoretical global convergence. We also conducted experiments on sparse neural networks to show the efficiency in compressing kernel weights. Leaky Capped `1 Norm A standard sparse model consists of a loss function L (which we assume to be differentiable but possibly nonconvex) and a regularization part H on the weights c 1 X min L(xn , c) + H(c). (1) c N n where {xn } are data points. A popular choice for H is the `1 norm, due to its convinience for optimization and that it is good surrogate for `0 norm. There are also some literatures suggesting that the `1 norm is in many case inferior to non-convex norms for inducing sparsity. To motivate our new regularizer, we begin with a discussion on the representative capped `1 norm (Zhang 2010b): X H(c) = α min(|ci |, τ ), where α, τ > 0. (2) i As shown in Figure 1, this formulation only regularizes those weights that are below a certain threshold τ . For those beyond this value, they can grow arbitrarily without experiencing penalties. It is noteworthy that it is a generalization of `1 norm. Particularly, it becomes `1 as τ → ∞. Generally, with a finite τ , it approximates `0 better than `1 , and therefore leads to higher sparsity in some real-world applications. The key feature of capped norm is the lack of penalty A representative optimization algorithm for solving convex problems with nonconvex regularizer is the multistage algorithm (Zhang 2010b), it is guaranteed to converge since it is essentially a special case of the majorizationminimization (MM) algorithm (Hunter and Lange 2004). To be more specific, at the (l + 1)-th stage, the surrogate objective is H l+1 (c) = |cT | · λl , where λli = αI(|cli | ≤ τ ) + βI(|cli | > τ ), where cl is the optimal c at the l-th stage, but the surrogate loss remains the same as original one. We set the initialization parameter λ0i = β, so as to begin with a light regularization for all weights. Based on the algorithm, one can see that the parameter selection is simpler - one can first search β for accuracy and then α for sparsity. Monocular 3D Shape Recovery Now we proceed to demonstrating the usage of the proposed regularizer and algorithms for solving a computer vision problem, the 3D shape analysis of visual objects. Driven by the demands arising from real-world applications, 3D Figure 1: Geometric view of three kinds of norms. shape recovery from 2D images has received increasing atfor weights whose magnitudes are greater than τ , this featention from the computer vision community in recent years. ture, however, may become a drawback under some circumA key challenge of this task lies in the fact that different stances. For examples, in our empirical study on 3D shape 3D shapes can be projected to the same 2D image, resultrecovery, which is introduced later, the capped norm leads ing in an ill-posed problem. A commonly adopted approach to unstable optimization procedures and substantially worse is to restrict the recovered 3D shape to be a linear comsolutions, by the multi-stage algorithm introduced later. Anbination of a set predefined shape bases. A representative other difficulty shared by both `1 and capped `1 norms is the model in early ages along this line is the Active Shape Model parameters selection – it is often very tricky to find a good (ASM)(Cootes et al. 1995), which relies on a dense combivalue of τ and α that well balances between accuracy and nation for shape representation. Later advances, like (Hejrati sparsity. From an optimization perspective, the two parameand Ramanan 2012)(Zia et al. 2013)(Wang et al. 2014))(Xiters are both critical to the most common proximal operator, ang and Savarese 2012)(Ramakrishna, Kanade, and Sheikh as 2012)(Lin et al. 2014)however, shows that sparse representation is more effective in real-world applications, of1 arg min ||x − c||2 + H(x) = sign(c) max(|c| − I(c < τ )α, 0), ten demonstrating stronger generalization performance and x 2 higher robustness against adverse conditions. where I(·) is the indicator function that equals to one for The 3D shape, i.e. the 3D locations of p landmarks are truth and zero for false. As implied by theoretical analystacked as S ∈ R3×p , and its corresponding 2D shape is Y ∈ sis and shown in our experiments, larger values of α and τ R2×p . We denote the projection matrix as Π. The Active would yield sparser solutions, but at the same time damage Shape Models (ASM) (Cootes et al. 1995) proposed training the larger weights and consequently compromise the accua group of shape bases {Bi }D i=1 from data by methods like racy. With the analysis above in mind, we propose the Leaky principal component analysis, denoting D = {1, · · · , D} as Capped `1 Norm Regularizer (LCNR) as an improved varia set of subscripts and c as weights of each basis. The 3D-2D ant: shape relation is characterized as X X X H(c) = α min(|ci |, τ ) + β max(|ci |, τ ), (3) S= ci Bi , Y = ΠS, i i where 0 < β < α. As shown in Figure 1, the function of LCNR is piecewise linear and thus is differentiable (except at a few points). The key difference between the proposed formulation and the standard `1 norm and the capped norm is that large weights (i.e. those greater than τ ) are still penalized positively but less heavily. To be more specific, this generalizes the capped `1 norm, with an additional coefficient β to control how much those large weights are regularized. In particular, when β = 0, it reduces to the regular capped norm. where Π =  i∈D ω 0 0 ω  0 , c ∈ RD , Bi ∈ R3×p 0 (4) here ω is a parameter depending on physical factors like focal length and view depth. In the test phase, the 2D shape Y is annotated by regular visual detectors, since the shape bases B are most likely predefined in a different camera setting other than the test setting, the unknown factors including combination weights c, a relative rotation parameter R and a translation parameter T should all be considered in the projection model, X Y = Π(R ci Bi + T ), where R ∈ SO(3), T ∈ R3 (5) i∈D where I3 ∈ R3×3 is an identity matrix and SO(3) = {R ∈ R3×3 | RT R = I3 , det(R) = 1}. In addition, (Zhou et al. 2016) proposed distributing individual rotation matrix Ri ∈ R3×3 to eachPbasis, then the 3D and 2D shapes are represented as = i∈D ci Ri Bi . They substitute the bilinear term composed of Π and R by uniform variables {Mi ∈ R2×3 }i∈D , that Mi = ci ΠRi which implicitly take rotation and projection factors into account. Denoting M as a 3 dimensional tensor stacking {Mi }D i=1 , we rewrite the objective as X 1 min F (M, c) = ||Y − Mi Bi ||2F + H(c), (6) 2 Ri ∈Ω(ci ),c i∈D where Ω(ci ) = {Mi ∈ R2×3 |MiT Mi = c2i I2 }, and H(c) is the regularization and I2 ∈ R2×2 is an identity matrix. In our model of 3D shape recovery, we adopt the linear formulation as Eq.(6) since it is the best baseline up until now and has some attractive properties. Our objective function is same with Eq.(6), H(c) is set to be LCNR as Eq.(3). The objective with a stage-wise surrogate regularizer is X X 1 Mi Bi ||2F + λli |ci |, (7) F l+1 (M, c) = ||Y − 2 i∈D i∈D in the (l + 1)-th stage, where Mi ∈ Ω(ci ). In this optimizer, the regularization part of F (R, c) is convex in each stage, however, the surrogate function is still non-convex since there is an orthogonality constraint on each Mi . To build the upper bounding function, we make a convex relaxation on the constraints. As the spectral-norm ball conv(Ω(ci )) = {X ∈ R2×3 | ||X||2 ≤ ci }, is the tightest convex hull of the Stiefel manifold Ω(ci ) (Zhou et al. 2016) [(Journée et al. 2010), Section 3.4], where || · ||2 represents the spectral norm, which is its largest singular value. Finally, by relaxing the domain Ω to conv(Ω), and the recalibration rule of λi is transferred to λli = αI(||M̂il ||2 ≤ τ ) + βI(||M̂il ||2 > τ ), where M̂il is the optimal Mi in the l-th stage. Since the function is convexified, We employ the alternate direction method of multiplier (ADMM) (Boyd et al. 2011)(Zhou et al. 2016) algorithm to attain high-precision solutions. We introduce a tensor V as a copy of M , U as a dual tensor variable and µ as a stepsize parameter, then rewrite Eq.(7) in its augmented Lagrangian formulation X X 1 Vi Bi ||2F + λli ||Mi ||2 Fµl+1 (M, V, U ) = ||Y − 2 i∈D i∈D X µX T + Ui (Mi − Vi ) + ||Mi − Vi ||2 (8) 2 i∈D i∈D Then the ADMM procedure is applied to solve the subproblem. After the convergence, the multi-stage solver will update the surrogate functions. We denote the inner-iteration superscript as t. Then M t+1 is update based on the proximal operator on spectral norms [(Parikh, Boyd, and others 2014), Section 6.7.2], proxλ (Vi0 ) = P diag[σ − λ0i P1 (σ/λ0i )]QT , (9) where Vi0 = Vit − Uit /µ and λ0i = λli /µ. Denoting the solution as proxλ0i (Vi0 ), Vi0 = P diag(σ)QT is the singular value decomposition of Vi0 , and P1 (·) is the Euclidean projection onto the `1 norm ball. The update on V and U have closed form solutions, Vit+1 = (Y BiT + µMit+1 + Uit+1 )(Bi BiT + µI3 )−1 , (10) Uit+1 = Uit + µ(Mit − Vit ). (11) The convergence property of this algorithm is well studied in (Boyd et al. 2011), additionally, we adopt an adaptive policy for stepsize µ as suggested by [(Boyd et al. 2011), Section 3]. Theoretical Analysis Generally speaking, the convergence of optimization over non-convex function is typical hard to prove without a decreasing step size. When combined with nonconvex regularizers, even convex problems need highly specialized proofs, for each problem. One may see the hardness of by referring to literatures, on the theoretical analysis of capped norm in different applications, e.g., multi-task feature learning (Gong, Ye, and Zhang 2012)(Tang, Nie, and Jain 2016), matrix completion (Gao et al. 2015) and (Jiang, Nie, and Huang 2015)(Sun, Xiang, and Ye 2013)(Han and Zhang 2016)(Zhang 2010b)(Zhang and others 2013). The proof is harder for our problem since the loss function is already nonconvex. In this section, we theoretically prove that with a high probability, the recovery error of our multi-stage algorithm decreases at nearly exponential speed against stages. We assume that the ground truth of the 2D shape Ȳ ∈ R2×p is expressed as a projection P of the combined deformation of 3D shape bases, as Ȳ = i∈D M̄i Bi , where M̄i is the ground truth of deformation matrix Mi , for 0 ≤ i ≤ D. The observation model is Y = Ȳ + δ, where δ ∈ R2×p is a Gaussian noise, i.e. δjk ∼ N (0, σ 2 ). For notational simplicity, we also set γ = α + β. Assumption 1 For any matrix Mi ∈ Rn×m , we assume that there exist a constant κi that κi = min ||Z − Mi Bi ||F /||Mi ||? > 0, Mi ∈R(s) (12) where the restricted set R(s) is defined as R(s) = {X ∈ Rn×m | rank(X) ≤ s}. Remark 1 This is the widely used eigenvalue assumption which can be found in (Lounici et al. 2009). Theorem 2 Following the common setting of sparse dictionary learning, we assume each basis Bi are normalized P that 2 by row `2 norm that k Birk = φ for all i ∈ D, 1 ≤ r ≤ 3, 2×3 where φ is an constant. For the optimal matrix √ M̂i ∈ R in any stage, if we set α, β as (α + β) ≥ φ 3 + e/2, then it holds X X 1 1 ||Ȳ − M̂i Bi ||2F ≤ ||Ȳ − Mi Bi ||2F 2 2 i∈D i∈D X l + (4γ + λi )||Mi − M̂i ||2 , (13) i∈D with the probability of at least 1 − 2D exp(− 12 (e − 3 ln(1 + e/3))), where e is a positive scalar. Proof. Recalling that Y = Ȳ +δ and the property of optimal point M̂i , then we have X X 1 1 ||Ȳ − M̂i Bi ||2F ≤ ||Ȳ − Mi Bi ||2F (14) 2 2 i∈D i∈D X X l + λi ||Mi − M̂i ||2 + tr[(Mi − M̂i )Bi δ T ], (15) i∈D i∈D where we use the triangular inequality of spectral norm ||Mi ||2 − ||M̂i ||2 ≤ ||Mi − M̂i ||2 . (16) We first establish the upper bound of tr[(M̂i − Mi )Bi δ T ]. We denote a set of random events {Aij } and define a set of random variables {vijr } as p Aij = {||BiT δj ||2 ≤ φγ}, vijr 1X Birk δjk , (17) = φ k=1 where Birk is the element in the r-th row and k-th column of Bi . Since Bi is normalized, vijr are i.i.d. Gaussian variables P3 2 following N (0, 1). Then we can verify that r=1 vijr is a chi-squared random variable with d = 3 degree of freedom. By choosing λ according to Theorem 2, we have p 3 X X 1 Birk δjk )2 > 4γ 2 ) P r( ||Bi δjT ||2 > γ) = P r( ( 2 r=1 k=1 ≤ P r( 3 X 1 2 vijr > 3 + e) ≤ exp(− θ(e)), (18) 2 r=1 where θ(e) = e − 3 ln(1 + e/3) and the second inequality is due to the chi-squared distribution (Chen, Zhou, and Ye T D T2 2011). Denoting A = i=1 j=1 Aij , we also denote Ac as its complementary set and |A| as its cardinality, then P r(A) = 1 − D [ 2 [ i=1 j=1 Acij 1 ≥ 1 − 2D exp(− θ(e)). (19) 2 Denoting Mir as the r-th row of Mi , we can derive an upper bound on tr[(M̂i − Mi )Bi δ T ] under the event A, tr[(Mi − M̂i )Bi δ T ] = ≤ 2 X 2 X r=1 j=1 2 X 2 X (Mir − M̂ir )T Bi δjT r=1 j=1 ||Mir − M̂ir ||2 ||Bi δjT ||2 ≤ 4γ||Mi − M̂i ||2 , (20) where we apply the Cauchy-Schwarz inequality and the relation between Frobenius norm and spectral norm. By substituting this back to Eq.(14), we get the proof. Theorem 3 Let M̂il+1 be the optimal solution at the (l + 1)th stage, and M̂il be the one at the l-th stage accordingly. We define Wil = M̄i − M̂il , and a function L on set S ⊆ D. If we choose α, β as in Theorem 1 and choose τ as τ > (α + β)/κ2 , the following inequality stands sX b l Ll+1 (D) ≤ a L0 (D) + , where Ll (S) = ||Wil ||22 , 1−a i∈S with probability of at least 1 − − 3 ln(1 + e/3))), where a = (α + β)/(κ τ ), and b = 5(α + √ 2 β) D/(κ τ ). 2D exp(− 21 (e 2 Proof . We apply Theorem 2 in stage (l+1) and substitute M by its ground truth M̄ , then get X X 1 ||Ȳ − M̂il+1 Bi ||2F ≤ (4γ + λli )||Wil+1 ||2 , (21) 2 i∈D i∈D P where we use Ȳ = i∈D M̄i Bi . We define a set G = {i ∈ D | ||M̂il ||2 ≤ τ } to separate the weights, and αil = αI(i ∈ G), βil = βI(i ∈ G c ), (22) then there is λli = αil + βil . Then we establish a bound by Cauchy-Schwarz inequality, X X (λli + 4γ)||Wil+1 ||2 = (αil + βil + 4γ)||Wil+1 ||2 i∈D i∈D √ ≤ (4γ D + α p p |G| + β |G c |)Ll+1 (D). (23) To further bound this term, we first denote that E = {i ∈ D | ||M̄i ||2 6= 0}, F = {i ∈ D | ||M̄i ||2 ≤ 2τ }, (24) by the rule of set operation and the definition of G and F, |G| = |G ∩ F| + |G ∩ F c |, where |G ∩ F| ≤ |F |, (25) X ||M̄i − M̂il ||22 ≤ L2l (G ∩ F c ); (26) τ 2 |G ∩ F c | ≤ i∈G∩F c by the inequality ||M̄i − M̂il ||2 ≥ ||M̄i ||2 − ||M̂il ||2 ≥ τ . Substituting them back to Eq.(23), we get q X αil ||Wil+1 ||2 ≤ α |F| + L2l (F c )/τ 2 Ll+1 (D) (27) i∈D p α Ll (F c ))Ll+1 (D), (28) τ √ where in the last inequality we use a2 + b2 ≤ a + b for a, b ≥ 0. A similar result holds for another part of Eq.(23) as X p β βil ||Wil+1 ||2 ≤ (β |E| + Ll (E c ))Ll+1 (D). (29) τ ≤ (α |F| + i∈D Substituting them back to Eq.(21), there is X X 1 ||Ȳ − M̂il+1 Bi ||2F ≤ (4γ + λli )||Wil+1 ||2 2 i∈D i∈D p √ 1 ≤ γ(4 D + max(|E|, |F|) + Ll (D))Ll+1 (D), (30) τ Recalling Assumption 1 and substituting Z = M̄i Bi , then 1 ||Wil+1 Bi ||2F , (31) 2 where we use ||X||F ≤ ||X||2 . Denoting κ = mini κi , then X X X 2κ2 ||Wil+1 ||22 ≤ ||Wil+1 Bi ||2F ≤ || Wil+1 Bi ||2F . κ2i ||Wil+1 ||22 ≤ κ2i ||Wil+1 ||2? ≤ i∈D i∈D i∈D Substituting this to Eq.(21) and combining for i ∈ D, there is √ 1 κ2 L2l+1 (D) ≤ (α + β)(5 D + Ll (D))Ll+1 (D). (32) τ where we apply max(|E|, |F|) ≤ D. Recalling the definition of a and b, we obtain 1 − al+1 (33) 1−a by the pre-setting 0 < a < 1, we obtain the main theorem. Ll+1 (D) ≤ aLl (D) + b ≤ al+1 L0 (D) + b Remark 2 Theorem 3 establishes the global convergence property of the estimation error in terms of a sum of spectral norms, and further implies that the value of Ll (D) is decaying exponentially after l stages, and the algorithm is less sensitive to the initial values. Sparse Neural Networks The convolutional neural networks (CNN) are powerful models for learning visual patterns from raw images.Generally speaking, the practical networks have too many parameters to fit in mobile devices or on-chip. The pursuit of neural networks with fewer parameters draw a lot of attentions, dating back to many years ago (LeCun, Denker, and Solla 1990)(Hassibi, Stork, and others 1993). Although recent advances showed that with a trained network as a warm start, a network can be highly compressed. But their experiments are mostly done on networks with large FC layers and many redundant parameters. We will explore the potential of compressing model weights by directly introducing the sparse regularizer to the loss functions, with a small and compact network, without any warm start, purely optimizing a regularized function. For a CNN, denoting an input features map of height h, width w, and channels ci , as I ∈ Rh×w×ci , the convolutional kernel K is in shape size of s and with co output channels, then K ∈ Rs×s×m×co . due to the ReLU layers and max-pooling layers, we can calculate the proximal steps based on the subgradient, which is obtained by back-propagation. Since the weights across different layers are with significantly different statistics, we put separate regularizer on each layer, with independent threshold and coefficient, to induce sparsity of different degrees. For neural networks, the data samples are much more than 3D recovery, for the multi-stage algorithm, the local optimal point can not be accessed assuredly, even with a convex regularizer. Therefore, we proposed a doubly majorizationminimization, which is practical to implement. The algorithm is based on the multi-stage, gradually calibrating the regularizer into regular `1 regularizers in each stage. While in each stage, the solver is not required to reach the local optima. The algorithm builds another (stochastic) upper bounding function g(c, cl,t−1 , St ) for the stage-wise surrogate function L(c) + H l (c), based on the stage-wise initializer point cl,0 and the given subset St . For a smooth objective, g(c, cl,t−1 , St ) can be set to be the following proximal function, 1 X g(c, cl,t−1 , St ) = [L(xn , cl,t−1 ) |St | n∈St + ∇L(xn , cl,t−1 )T (c − cl,t−1 )] + 1 ||c − cl,t−1 ||2 . 2η where St is the selected subset of dataset in the t-th step, and 1/η can be set to the smoothness parameter (if exists). Minimizing the above function can be attained by taking a proximal gradient step, cl,t ← proxH (cl,t−1 − η∇L(xn , cl,t−1 )). Algorithm 1 (Stochastic) Doubly MM Algorithms 0 0 Input {xn }N n=1 . Initialize λi = β, l = 0, H = β|c|. repeat Update λl+1 as Eq.(4), and set l = l + 1. i repeat Solve minc g(c, cl,t−1 , St ) + H l (c) on minibatch Sk using proximal gradient descent. until Converge Experiments Sparse Linear Regression We implement a sparse linear regression model, for testing the effect of LCNR in inducing sparsity. The dataset ci X s X s X is constructed as following, matrix X ∈ RD×N stacks O(y, x, j) = σ[ K(u, v, i, j)I(y + u − 1, x + v − 1)] N = 1000 random variables of D = 256 dimensions, drew u v i from a Gaussian distribution, most elements of ground truth weights w̄ ∈ RD are zero, the others are drew from the where σ is a nonlinear function like ReLU. We use y to repGaussian distribution, the target vector Y ∈ R1×N is obresent the labels, and denote K as the convolution kernels, tained by Y = w̄T X plus a Gaussian noise δ. The objective then the objective function is written as function is to minimize the 12 ||Y − wT X||2F + H(w), where N X 1 X we set H(w) to leaky capped `1 norm, or regular `1 norm as L(F(In , K), yn ) + H(K). (34) min a baseline. We use the multi-stage algorithm, which repeatK N n=1 edly takes gradient descent step and a proximal step. We set where L is the loss function, F(In , K) is the output of netthe maximal inner-iterations to be 20 per stage, and 50 stages work parameterized by K, and H(K) is the LCNR menin total as it converges well. We searched the regularization tioned earlier. Although the objective is mostly non-smooth parameters and stepsize that perform best for problem, while GT GT GT GT GT GT GT GT LCNR LCNR LCNR LCNR LCNR LCNR LCNR LCNR L1 L1 L1 L1 L1 L1 L1 L1 Capped L1 Capped L1 Capped L1 Capped L1 Capped L1 Capped L1 Capped L1 Capped L1 Figure 2: Performance under different measure. Black: β = 100.0, red: β = 10.0, green: β = 1.0, blue: β = 0.1. (1) the distance from current estimation to the ground truth as ||wt − w̄||F , (2) the error of linear regression as ||Y − X T wt ||F , (3) the ratio of `1 /`2 norm, as ||w||1 /||w||2 , (4) the nonzero rate as E[I(wit 6= 0)]. not introducing considerable estimation bias, then, we also test several near parameters by ×1e − 1. For the LCNR, we set α/β = 300. We denote wt as the estimated weights in t-th stage. We measure the performance by four standards. The statistic numbers change against every stage is plotted in Figure.(2). As we see from the figure, the proposed model with LCNR converges to the ground truth with faster speed, achieving higher accuracy, and yields much sparser solutions than the `1 norm. Human 3D Shape Recovery We conducted the expriments to verify the effectiveness of leaky capped `1 regularization in learning sparse weights for 3D shape recovery. Our proposed algorithm is implemented in MATLAB, based on the code generously provided by (Zhou et al. 2016). We use the CMU motion capture dataset (moc ) for both training and testing, thousands of frames of 3D human shapes are contained within the dataset. The shapes are annotated by 3D locations of 15 landmarks, as S ∈ R3×15 , and landmarks are at anatomical joints of human, like head, shoulders, elbows, hips, ankles and etc. The dataset contains various kinds of action. As there are large external variations across actions, we take each single action into analysis, but using the same shape dictionary. We use 300 frames of each action as test set. The rest of frames are used as training set for building shape dictionary. We set D = 128 to construct an over-complete dictionary by common sparse coding algorithm with `1 regularization, and the training data are pre-aligned by the Procrustes method used in (Ramakrishna, Kanade, and Sheikh 2012). The 2D shapes for test set are synthesized from the ground truth 3D shapes at different angles across 360 degrees. The recovery error is measured by the Frobenius norm ||Ŝ − S||F from the recovered 3D shape Ŝ with the ground truth S. We compare our method to state-of-the-art algorithm (Zhou et al. 2016) (which has been extensive compared against other methods in their paper, like Projected Matching Pursuit (Ramakr- Logrithm Logrithm Logrithm Logrithm Logrithm Logrithm Logrithm Logrithm Laplace Laplace Laplace Laplace Laplace Laplace Laplace Laplace Figure 3: Recovery results of different kinds of actions, by using LCNR and other (non)convex regularizations, and the ground truth shape (GT) on the top row. ishna, Kanade, and Sheikh 2012) and the alternating manifold minimization method, and proved superiority, therefore we do not compare others). We conducted experiments comparing the LCNR with other representative (non)convex regularizations, including ell1 norm, capped ell1 norm, logarithm norm, and Laplace norm, as (Convex) `1 : R(c; λ) = λ|c|, capped-`1 : R(c; λ, τ ) = λ min(|c|, τ ), λ logarithm : R(c; γ, λ) = log(γ|c| + 1), log(γ + 1)   |c| Laplace : R(c; λ, γ) = λ 1 − exp(− ) γ We continue to use the doubly MM algorithm to solve the models, and the constraint on dictionary coefficients c is transferred to the spectral norm of 3D shapes {Mi }. The regularization parameters are grid searched for the best final performance. The computation complexity of calibrating τ and λli is considerably smaller than the ADMM parts, the average running time of this part is about 14% of the overall time of each iteration. In Figure.(3), we plot the recovered shapes by LCNR regularized and `1 regularized models, and the ground truth shapes, within a maximum inference iterations of 200. To test the performance against large noise, we also add matrix [σ ∗ mean(abs(S)) ∗ randn(size(S))] to each 3D shape S before generating the 2D observation Y . Due to the limited space, we put the results in appendix. The mean errors for the testing frames of different action types decreasing against stages are shown in Figure.(4). One can see the proposed model reconstruct much more accurate skeletons than state-of-the-art model. By comparing the convergence rate in Figure (4), we see that, the non-convex regularizations generally converge faster than the `1 because they intro- 6.5 6 5.5 5.5 Error Error 6 5 5 4.5 4 0 2 4 6 8 4.5 10 0 2 4 walk 6 8 10 6 8 10 run 6 6 5.5 Error Error 5.5 5 5 4.5 4 0 2 4 6 8 4.5 10 0 2 4 jump climb 6.5 6.5 6 Error Error 6 5.5 5 4.5 5.5 5 0 2 4 6 8 4.5 10 0 2 4 box 6 8 10 dance 6 6.5 Leaky capped L1 capped L1 Logrithm Laplace 6 Error Error 5.5 5.5 5 5 4.5 Figure 5: Statistics changing over data passes, and each column shows result of one setting. Red: LCNR regularized CNN, blue: `1 regularized CNN. 0 2 4 6 8 sit 10 4.5 0 2 4 6 8 10 basketball Figure 4: Convergence of recovery error with different regularizations. (X-axis: stages (for 10 inner iterations) duce less estimation bias, so a larger coefficient λ can be adopted for acceleration. The capped norm induces faster convergence rate within the beginning 30 iterations, however, in the following iterations the estimation error oscillates up and down, indicating an unstable behavior, this indicates that a very sparse solution doesnot benefit the 3D recovery problem. The `1 regularization can achieve good estimation at last, but in the beginning the error decreases very slow, due to the imbalance between accuracy and speed, but it outperforms capped `1 , indicating that a certain degree of regularization is critical to larger weights. We can see for most of the actions, LCNR leads to higher recovery accuracy comparing opponents, achieveing the same accuracy requirement within much lesser time, this improvement is significant especially to test phase, which is most the case since training phase only needs accomplished once. Sparse Neural Networks We implement a convolutional neural networks, with 5 convolutional layers of 5 × 5 × 16 and 3 × 3 × 32, three pooling layers of (2, 2), and a softmax loss layer. We use the CIFAR10 dataset. We compare the proposed LCNR with regular `1 norm regularizer. The training mini-batch size is set to be 128 per iteration, and set the maximum data passes to be 40 rounds. During each data pass, we calculate the nonzero rate of model weights, the pure loss function value without the regularizers, and test the accuracy using the testing set. For the `1 regularizer, we set parameter to be β = λ0 , and the parameter of LCNR is set according to α = λ0 ∗ 2.0 and β = λ0 ∗ 0.1, therefore the penalty on larger weights are sig- nificantly lighter than smaller ones. We grid search λ0 within 10.0 ∗ 2i for i in range from −8 to 0, obtaining the neural networks with different sparsity. We use the Adam solver for optimization. The initial learning rate is set to be 0.02. After each iteration, we additionally perform the proximal gradient steps xl,t = proxηR (xl,t−1 − η∂L(xl,t−1 ), to ensure the sparsity of convolutional filters. The proximal gradient steps are like proxηR (x) = sign(x) max(|x| − ηλ, 0), where is the element-wise product. We plot the loss function values and sparse rates changing over time in Figure.(5) and the statistics in the final data pass in Table.(1). We jointly show the results of two methods in similar sparse rate. We can see that comparing to the `1 regularizer, the proposed LCNR achieves better sparsity, without damaging much on the loss function, and boosting the accuracy by about 2%, for achieving the same sparsity. Table 1: Performance Statistics (each column shows result of one setting). sparse level level-1 level-2 level-3 method LCNR `1 LCNR `1 LCNR `1 accuracy 70.9 68.8 69.2 68.3 55.8 53.2 sparsity 55.2 61.6 24.9 36.2 2.3 2.4 loss 0.40 0.43 67.1 76.0 1.18 1.20 Conclusion In this paper, we present the leaky capped `1 norm regularizer and its multi-stage optimizer. We apply it in monocular 3D shape recovery problem, obtaining an accuracy improvement and acceleration over state-of-the-art algorithm, and prove its global convergence, the first rigorous analysis in relevant literatures and non-convex problems. Auxiliary empirical studies over sparse linear regression and convolutional neural networks show the LCNR improves upon `1 regularization. Appendix 6.5 6 6 5.5 5.5 Error Error To test the performance against large noise, we also add matrix [σ ∗ mean(abs(S)) ∗ randn(size(S))] to each 3D shape S before generating the 2D projection. Due to the limited space, we put the results in Figure 6;7;8;9. 5 5 4.5 4 0 2 4 6 8 4.5 10 0 2 4 walk GT GT GT GT GT LCNR LCNR LCNR LCNR LCNR LCNR 6 6 5.5 5.5 0 2 4 6 8 4.5 10 0 2 4 jump L1 L1 L1 Capped L1 Capped L1 Capped L1 Capped L1 L1 6 Capped L1 Capped L1 Capped L1 Capped L1 Logrithm Logrithm Logrithm Logrithm Logrithm 8 10 5.5 5 5 4.5 4.5 0 2 4 6 8 10 0 2 4 dance 6 Logrithm 6 6 5.5 box Logrithm 10 6.5 Error L1 Error L1 8 climb 6.5 L1 6 5 LCNR 4.5 L1 10 GT 5 LCNR 8 Error GT Error GT 6 run 6.5 Leaky capped L1 capped L1 Logarithm Laplace Logrithm 6 Error Error 5.5 5.5 5 Laplace Laplace Laplace Laplace 5 Laplace Laplace Laplace Laplace 4.5 0 2 4 6 sit Figure 6: Recovery results of different kinds of actions, under noise condition σ = 0.15, by using LCNR and other (non)convex regularizations, and the ground truth shape (GT) on the top row. References [Boyd et al. 2011] Boyd, S.; Parikh, N.; Chu, E.; Peleato, B.; and Eckstein, J. 2011. Distributed optimization and statistical learning via the alternating direction method of multipliers. Foundations and Trends R in Machine Learning 3(1):1– 122. [Chen, Zhou, and Ye 2011] Chen, J.; Zhou, J.; and Ye, J. 2011. Integrating low-rank and group-sparse structures for robust multi-task learning. In Proceedings of the 17th ACM SIGKDD international conference on Knowledge discovery and data mining, 42–50. ACM. [Cootes et al. 1995] Cootes, T. F.; Taylor, C. J.; Cooper, D. H.; and Graham, J. 1995. Active shape models-their training and application. Computer vision and image understanding 61(1):38–59. [Fan and Li 2011] Fan, J., and Li, R. 2011. Variable selection via nonconcave penalized likelihood and its oracle properties. Journal of the American Statistical Association 96(456):1348–1360. [Frank et al. 1993] Frank, I. E.; Friedman, J. H.; Wold, S.; Hastie, T.; and Mallows, C. 1993. A statistical view of some chemometrics regression tools. discussion. author’s reply. Technometrics 35(2):109–148. [Friedman 2012] Friedman, J. H. 2012. Fast sparse regression and classification. International Journal of Forecasting 28(3):722–738. 8 10 4.5 0 2 4 6 8 10 basketball Figure 7: Convergence of recovery error under σ = 0.05 noise, with different regularizations. (X-axis: stages (for 10 inner iterations) [Gao et al. 2015] Gao, H.; Nie, F.; Cai, W.; and Huang, H. 2015. Robust capped norm nonnegative matrix factorization: Capped norm nmf. In Proceedings of the 24th ACM International on Conference on Information and Knowledge Management, 871–880. ACM. [Gong, Ye, and Zhang 2012] Gong, P.; Ye, J.; and Zhang, C.s. 2012. Multi-stage multi-task feature learning. In Advances in Neural Information Processing Systems, 1988– 1996. [Han and Zhang 2016] Han, L., and Zhang, Y. 2016. Multistage multi-task learning with reduced rank. In AAAI, 1638– 1644. [Hassibi, Stork, and others 1993] Hassibi, B.; Stork, D. G.; et al. 1993. Second order derivatives for network pruning: Optimal brain surgeon. Advances in neural information processing systems 164–164. [Hejrati and Ramanan 2012] Hejrati, M., and Ramanan, D. 2012. Analyzing 3d objects in cluttered images. In Advances in Neural Information Processing Systems, 593–601. [Hunter and Lange 2004] Hunter, D. R., and Lange, K. 2004. A tutorial on mm algorithms. The American Statistician 58(1):30–37. [Jiang, Nie, and Huang 2015] Jiang, W.; Nie, F.; and Huang, H. 2015. Robust dictionary learning with capped l1-norm. In IJCAI, 3590–3596. [Journée et al. 2010] Journée, M.; Nesterov, Y.; Richtárik, P.; and Sepulchre, R. 2010. Generalized power method for 6.5 6 6.5 6 5.8 6 5 Error Error 6 Error Error 5.5 5.5 5.5 5 2 4 6 8 4.5 10 0 2 4 walk 6 8 5 10 0 2 4 run 6 Error Error Error 5.5 5 6 8 5 10 5 0 2 4 6 8 10 0 2 4 jump 6 6 5.8 5.8 5.6 5.6 5.4 6 8 5 4 10 6 8 10 6 8 10 6 8 10 5.4 5.2 0 2 4 climb 6.5 2 run 5.2 4.5 0 walk 6 5.5 4.5 5.4 5.2 0 Error 4.5 5.6 6 8 5 10 0 2 4 jump climb 6.5 6.5 6.5 6 6 6 5.5 Error Error Error Error 6 5.5 5.5 5.5 5 2 4 6 8 5 10 0 2 4 box 6 8 5 10 0 2 4 dance 6 6.5 5.5 Error 8 5.5 2 4 6 sit 8 10 4 Leaky capped L1 capped L1 Logarithm Laplace 6 5 0 2 6.2 5 4.5 0 dance 5.5 5 4.5 5 10 6 Leaky capped L1 capped L1 Logarithm Laplace 6 Error 6 box Error 0 Error 4.5 5.8 5.6 5.4 0 2 4 6 8 10 basketball 4.5 0 2 4 6 sit 8 10 5.2 0 2 4 6 8 10 basketball Figure 8: Convergence of recovery error under σ = 0.15 noise, with different regularizations. (X-axis: stages (for 10 inner iterations) Figure 9: Convergence of recovery error under σ = 0.25 noise, with different regularizations. (X-axis: stages (for 10 inner iterations) sparse principal component analysis. Journal of Machine Learning Research 11(Feb):517–553. [LeCun, Denker, and Solla 1990] LeCun, Y.; Denker, J. S.; and Solla, S. A. 1990. Optimal brain damage. In Advances in neural information processing systems, 598–605. [Lin et al. 2014] Lin, Y.-L.; Morariu, V. I.; Hsu, W.; and Davis, L. S. 2014. Jointly optimizing 3d model fitting and fine-grained classification. In European Conference on Computer Vision, 466–480. Springer. [Lounici et al. 2009] Lounici, K.; Pontil, M.; Tsybakov, A. B.; and De Geer, S. V. 2009. Taking advantage of sparsity in multi-task learning. [moc ] Mocap: Carnegie mellon university motion capture database. http://mocap.cs.cmu.edu. [Parikh, Boyd, and others 2014] Parikh, N.; Boyd, S. P.; et al. 2014. Proximal algorithms. Foundations and Trends in optimization 1(3):127–239. [Ramakrishna, Kanade, and Sheikh 2012] Ramakrishna, V.; Kanade, T.; and Sheikh, Y. 2012. Reconstructing 3d human pose from 2d image landmarks. In European Conference on Computer Vision, 573–586. Springer. [Sun, Xiang, and Ye 2013] Sun, Q.; Xiang, S.; and Ye, J. 2013. Robust principal component analysis via capped norms. In Proceedings of the 19th ACM SIGKDD international conference on Knowledge discovery and data mining, 311–319. ACM. [Tang, Nie, and Jain 2016] Tang, M.; Nie, F.; and Jain, R. 2016. Capped lp-norm graph embedding for photo clustering. In Proceedings of the 2016 ACM on Multimedia Conference, 431–435. ACM. [Wang et al. 2014] Wang, C.; Wang, Y.; Lin, Z.; Yuille, A. L.; and Gao, W. 2014. Robust estimation of 3d human poses from a single image. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2361–2368. [Xiang and Savarese 2012] Xiang, Y., and Savarese, S. 2012. Estimating the aspect layout of object categories. In Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on, 3410–3417. IEEE. [Zhang and others 2013] Zhang, T., et al. 2013. Multistage convex relaxation for feature selection. Bernoulli 19(5B):2277–2293. [Zhang 2010a] Zhang, C. 2010a. Nearly unbiased variable selection under minimax concave penalty. Annals of Statistics 38(2):894–942. [Zhang 2010b] Zhang, T. 2010b. Analysis of multi-stage convex relaxation for sparse regularization. Journal of Machine Learning Research 11(Mar):1081–1107. [Zhou et al. 2016] Zhou, X.; Zhu, M.; Leonardos, S.; and Daniilidis, K. 2016. Sparse representation for 3d shape estimation: a convex relaxation approach. IEEE Transactions on Pattern Analysis and Machine Intelligence. [Zia et al. 2013] Zia, M. Z.; Stark, M.; Schiele, B.; and Schindler, K. 2013. Detailed 3d representations for object recognition and modeling. IEEE transactions on pattern analysis and machine intelligence 35(11):2608–2623.
2cs.AI
THE SUBGROUP IDENTIFICATION PROBLEM FOR FINITELY PRESENTED GROUPS arXiv:1109.1792v4 [math.GR] 19 Oct 2016 MAURICE CHIODO Abstract. We introduce the subgroup identification problem, and show that there is a finitely presented group G for which it is unsolvable, and that it is uniformly solvable in the class of finitely presented locally Hopfian groups. This is done as an investigation into the difference between strong and weak effective coherence for finitely presented groups. 1. Introduction Decision problems for finitely presented groups are well-studied, going back to the work of Dehn [8] in 1911. The word problem, of deciding when a word represents the trivial element in a group, was the first of these to be well understood, with the independent work of Boone, Britton and Novikov [3, 5, 17]. A clever adaption of this problem by the independent work of Adian and Rabin [1, 18] gives rise to the impossibility of the isomorphism problem, of deciding if two finite presentations describe isomorphic groups. To list all major results in group-theoretic decision problems would be a substantial undertaking, and we defer to [16] for an excellent introduction and survey of the discipline up to 1992. For the remainder of this section we write X ∗ to denote all finite words on a set X, P to denote the group given by a presentation P , and ⟨w1 , . . . , wn ⟩P to denote the subgroup in P generated by words w1 , . . . , wn (see section 2.1 for a clarification of this notation if required). We introduce the following problem, and give the main result of this work. Definition 1.1. We say that the subgroup identification problem for a finite presentation P = ⟨X∣R⟩ is solvable if there is a partial algorithm that, on input of any finite set of words w1 , . . . , wn ∈ X ∗ , and any finite presentation Q = ⟨Y ∣S⟩, outputs (if the subgroup ⟨w1 , . . . , wn ⟩P ≅ Q) an explicit set map φ from Y to {w1 , . . . , wn }∗ which extends to an isomorphism φ ∶ Q → ⟨w1 , . . . , wn ⟩P . That is, the induced homomorphism φ ∶ Q → P is injective, and Im(φ) = ⟨w1 , . . . , wn ⟩P . Otherwise, we place no conditions on the output, or even whether it halts. Theorem 4.6. There is a finitely presented group with unsolvable subgroup identification problem. 2010 AMS Classification: 20F10, 03D40, 03D80. Keywords: Effectively coherent groups, subgroup identification problem, decidability. The author was supported by: An Australian Postgraduate Award, and a David Hay Postgraduate Writing-Up Award. Date: October 20, 2016. 1 2 MAURICE CHIODO As a consequence of lemma 2.6, having solvable subgroup identification problem depends only on the isomorphism class of a finite presentation. In [9, Definition 1.1] a finitely generated group G is said to be effectively coherent if it is coherent (all of its finitely generated subgroups are finitely presentable) and there is an algorithm for G that, on input of a finite collection of words S, outputs a finite presentation for the subgroup generated by S. This motivates us to make the following two definitions: Definition 1.2. We say a coherent group G = ⟨X∣R⟩ is weakly effectively coherent if there is an algorithm for G that, on input of a finite collection of words S ⊂ X ∗ , outputs a finite presentation for the subgroup ⟨S⟩G generated by S. Definition 1.3. We say a coherent group G = ⟨X∣R⟩ is strongly effectively coherent if there is an algorithm for G that, on input of a finite collection of words S ⊂ X ∗ , outputs a finite presentation P = ⟨Y ∣V ⟩ for the subgroup ⟨S⟩G generated by S, along with a map φ ∶ Y → X ∗ which extends to an injection φ ∶ P → G whose image is ⟨S⟩G . By definition, strongly effectively coherent groups are weakly effectively coherent. Conversely, it is imediate that the notions of strong and weak effective coherence are equivalent in groups with solvable subgroup identification problem. A motivating (unresolved) question for this work is whether strong and weak effective coherence are equivalent notions for all finitely presented groups. The subgroup identification problem was formulated after the author read the proof of [9, Lemma 1.2] and [9, Remark 1.3] where, were it not for a later typographical correction provided in [10, Definition 1.2], it would suggest that the subgroup identification problem is (uniformly) solvable over all finitely presented groups. This would, in turn, imply that weak and strong effective coherence are equivalent notions. The groups encountered in [9] all have solvable subgroup identification problem, as they are all locally Hopfian (see theorem 3.8 below). In addition, for all results shown in [9] all weakly effectively coherent groups are actually proven to be strongly effectively coherent, so combined with the typographical correction from [10, Definition 1.2] this then becomes a moot point. We do not suggest that there are any errors with the main conclusions of [9]. However, [9, Lemma 1.2 and Remark 1.3] do raise an interesting question regarding the connection between strong and weak effective coherence. An application of standard techniques gives the following result, which should be read very carefully as one could misinterpret it as showing that the subgroup identification problem is uniformly solvable for all finitely presented groups. Proposition 3.5. There is a uniform partial algorithm that, on input of: A finite presentation P = ⟨X∣R⟩ of a group, and a finite set of words w1 , . . . , wn ∈ X ∗ such that ⟨w1 , . . . , wn ⟩P is finitely presentable, and Q = ⟨Y ∣S⟩ a finite presentation such that Q ≅ ⟨w1 , . . . , wn ⟩P ; Outputs: A finite set of words c1 , . . . , ck ∈ {w1 , . . . , wn }∗ such that each ci is trivial in P (when viewed as a word in X ∗ ) and ⟨w1 , . . . , wn ∣c1 , . . . , ck ⟩ is isomorphic to Q and hence also to ⟨w1 , . . . , wn ⟩P . THE SUBGROUP IDENTIFICATION PROBLEM FOR FINITELY PRESENTED GROUPS 3 A group G is Hopfian if every surjective endomorphism of G is an isomorphism, and locally Hopfian if every finitely generated subgroup is Hopfian. Theorem 3.8. The subgroup identification problem is uniformly solvable in the class of finitely presented locally Hopfian groups. Hence, in this class of groups, weak effective coherence is equivalent to strong effective coherence. Thus the notions of weak and strong effective coherence are equivalent in the class of locally Hopfian groups, and are so because in this class the subgroup identification problem is uniformly solvable. However, as soon as we start dealing with non-Hopfian groups, the situation is a lot different. The following theorem, and subsequent lemma, are vital to our main result. They show that a solution to the word problem for a finite presentation cannot be uniformly lifted to a solution to the word problem for a recursive presentation isomorphic to that same group (so an isomosphism between the two cannot be constructed). This contrasts the case of having a pair of isomorphic finite presentations, where an isomorphism can be uniformly constructed (lemma 2.6). Theorem 4.1. There is a finite presentation P of a group with solvable word problem (namely, the Baumslag-Solitar group BS(2, 3)) for which there is no partial algorithm that, on input of a recursive presentation Q such that P ≅ Q, outputs a solution to the word problem for Q. Lemma 4.2. There is a finite presentation P = ⟨X∣R⟩ of a group with solvable word problem (namely, BS(2, 3)) for which there is no partial algorithm that, on input of a recursive presentation Q = ⟨Y ∣S⟩ such that P ≅ Q, outputs a set map φ ∶ X → Y ∗ which extends to an isomorphism φ ∶ P → Q. By viewing isomorphisms between groups as Tietze transformations rather than set maps (see [13, §1.5] for a full exposition of this concept), we can reinterpret lemma 4.2 in the following way. Lemma 4.4. There is a finite presentation P of a group with solvable word problem (namely, BS(2, 3)) for which there is no algorithm that, on input of a recursive presentation Q such that P ≅ Q, outputs a recursive enumeration of Tietze transformations of type (T 1) and (T 2) (manipulation of relators), and a finite set of Tietze transformations of type (T 3) and (T 4) (addition and removal of generators), with notation as per [13, §1.5], transforming P to Q. A direct consequence of the Higman embedding theorem [11, Theorem 1] is that any recursively presented group can be uniformly embedded into a finitely presented group. By a careful application of this result, paying special attention to the uniformity in which such a finite presentation is constructed as given in the proof of [20, Theorem 12.18], our main result (theorem 4.6) follows. 4 MAURICE CHIODO Acknowledgements: The author would like to thank Jack Button and Andrew Glass for their general advice, and Chuck Miller for giving general comments and corrections as well as pointing out a more elegant proof of lemma 3.6 and a much more direct proof of theorem 4.6. Thanks also go to Nicholas Touikan for his helpful suggestions for a revised version of this work, and to Daniel Groves and Henry Wilton for explaining their work in [9]. 2. Preliminaries 2.1. Standard notation. With the convention that N contains 0, we take ϕm to be the mth partial recursive function ϕm ∶ N → N, and the mth partial recursive set (r.e. set) Wm as the domain of ϕm . If P = ⟨X∣R⟩ is a group presentation with generating set X and relators R, then we denote by P the group presented by P . A presentation P = ⟨X∣R⟩ is said to be a recursive presentation if X is a finite set and R is a recursive enumeration of relators; P is said to be an infinite recursive presentation if instead X is a recursive enumeration of generators. A group G is said to be finitely presentable if G ≅ P for some finite presentation P . If P, Q are group presentations then we denote their free product presentation by P ∗ Q, given by taking the disjoint union of their generators and relators; this extends to the free product of arbitrary collections of presentations. If X is a set, then we denote by X −1 a set of the same cardinality as X along with a fixed bijection φ ∶ X → X −1 , where we denote x−1 ∶= φ(x). We write X ∗ for the set of finite words on X ∪ X −1 , including the empty word ∅. If g1 , . . . , gn are a collection of elements of a group G, then we write ⟨g1 , . . . , gn ⟩G for the subgroup in G generated by these elements, and ⟪g1 , . . . , gn ⟫G for the normal closure of these elements in G. A group G is Hopfian if every surjective endomorphism of G is an isomorphism, and locally Hopfian if every finitely generated subgroup is Hopfian. Finally, the commutator [x, y] is taken to be xyx−1 y −1 . 2.2. Groups. It is a result by Mihailova [14] that there exists a finitely presented group with solvable word problem for which the subgroup membership problem, of deciding when a word on the generators lies in a given finitely generated subgroup, is unsolvable. We mention this in the context of the following known result about the word problem for HNN extensions of groups. Lemma 2.1. Let H, K ⩽ G be isomorphic finitely generated subgroups of G, each having solvable subgroup membership problem in G. Let ϕ ∶ H → K be an isomorphism. Then the HNN extension G∗ϕ has solvable word problem. Proof. This is immediate from the normal form theorem for HNN extensions (see [12, §IV Theorem 2.1]).  The following group construction from [2] plays an important part in our arguments, as it is an explicit example of a finitely presented non-Hopfian group with solvable word problem. Definition 2.2. The Baumslag-Solitar groups BS(m, n) are defined via the following finite presentations, each an HNN extension of Z: BS(m, n) ∶= ⟨s, t∣s−1 tm s = tn ⟩ THE SUBGROUP IDENTIFICATION PROBLEM FOR FINITELY PRESENTED GROUPS 5 Theorem 2.3 (Baumslag-Solitar [2, Theorem 1]). The group BS(2, 3) is nonHopfian and has solvable word problem. The map f ∶ BS(2, 3) → BS(2, 3) given by extending the map f ∶ {s, t} → {s, t}∗ , f (s) = s, f (t) = t2 , is a non-injective epimorphism. The word [s−1 ts, t] is non-trivial in BS(2, 3) and lies in ker(f ). Proof. That BS(2, 3) has solvable word problem comes from the fact that it is an HNN extension of Z (see lemma 2.1, or alternatively a result by Magnus in [12, § IV Theorem 5.3] that all 1-relator groups have solvable word problem). The remainder of the theorem is proved in [2, Theorem 1].  2.3. Enumerable processes in groups. We note some partial algorithms and recursively enumerable sets, in the context of group presentations. These are standard results, which we state (without proof) for the convenience of any reader not familiar with the area. Lemma 2.4. Let P = ⟨X∣R⟩ be a recursive presentation. Then the words in X ∗ which represent the identity in P are recursively enumerable. Moreover, this algorithm is uniform over all recursive presentations. Lemma 2.5. There is a partial algorithm that, on input of two finite presentations P = ⟨X∣R⟩ and Q = ⟨Y ∣S⟩, and a set map φ ∶ X → Y ∗ , halts if and only if φ extends to a homomorphism φ ∶ P → Q. Lemma 2.6. There is a partial algorithm that, on input of two finite presentations P = ⟨X∣R⟩ and Q = ⟨Y ∣S⟩, halts if and only if P ≅ Q, and outputs an isomorphism between them. It is important to note that lemma 2.6 does not hold if we instead consider recursive presentations. In fact, even if we start with one recursive presentation, and one finite presentation, the lemma does not hold; we show this later as lemma 4.2. Lemma 2.7. Let P = ⟨X∣R⟩ be a finite presentation. Then the set of finite presentations defining groups isomorphic to P is recursively enumerable. Moreover, this enumeration algorithm is uniform over all finite presentations. 3. Initial questions and observations 3.1. The finite presentation problem. Following [4, Definition 1.1], we say that the finite presentation problem for a finitely presented group ⟨X∣R⟩ is solvable if there is a partial algorithm that, on input of a finite set of words w1 , . . . , wn ∈ X ∗ such that ⟨w1 , . . . , wn ⟩P is finitely presentable, outputs a finite presentation Q for ⟨w1 , . . . , wn ⟩P . By definition, a finitely presented weakly effectively coherent group has solvable finite presentation problem. The existence of a finitely presented group with unsolvable word problem immediately gives rise to the following obsevation: Lemma 3.1. There is a finite presentation P = ⟨X∣R⟩ of a group for which the finite presentation problem is unsolvable. 6 MAURICE CHIODO Proof. Take P = ⟨X∣R⟩ to be a finite presentation of a group with unsolvable word problem (see [20, Lemma 12.7]), and suppose this has an algorithm to solve the finite presentation problem. Note that for any word w ∈ X ∗ , we have that ⟨w⟩P is cyclic, and hence finitely presentable. So, on input of a single word w, the algorithm will output a finite presentation Q of the cyclic group ⟨w⟩P . But the isomorphism problem for finitely presented abelian groups is solvable (see [16] p. 31), so we can decide if Q is trivial, and hence if w is trivial in P , which is impossible since P has unsolvable word problem.  Remark. As pointed out to the author by Chuck Miller, the work of Collins in [7] shows that the group in lemma 3.1 can be taken to have solvable word problem. This is because such an algorithm for the finite presentation problem would explicitly solve the order problem, of deciding what the order of an element of the group is, and a direct consequence of [7, Theorem A] is that there is a finitely presented group with solvable word problem and unsolvable order problem. Bridson and Wilton [4] give an in-depth analysis of the finite presentation problem, showing that it is not uniformly solvable in several classes of finitely presented groups [4, Corollary C]. Moreover, they construct a finite presentation of a group with polynomial Dehn function (and hence solvable word problem) which has unsolvable finite presentation problem [4, Theorem E]. Having seen that the finite presentation problem is unsolvable in general, we shift our attention to similar questions. By considering the trivial group, and the fact that the triviality problem is undecidable, one can show that there is no algorithm that, given two finite presentations P, Q, determines if P embeds in Q or not. The following two stronger results were obtained in [6], and are closely related to the subgroup identification problem. Theorem 3.2 (Chiodo [6, Theorem 6.8]). There is a finitely presented group G such that the set of finite presentations of groups which embed into G is not recursively enumerable. Theorem 3.3 (Chiodo [6, Theorem 6.6]). There is no algorithm that, on input of two finite presentations P = ⟨X∣R⟩, Q = ⟨Y ∣S⟩ such that P embeds in Q, outputs an explicit map φ ∶ X → Y ∗ which extends to an embedding φ ∶ P ↪ Q. In the proof of theorem 3.3, as found in [6], we see that the algorithmic problem arises from not definitely knowing a set of target words for an injection from P into Q. Knowing which elements P maps to in Q brings us precisely to the subgroup identification problem. 3.2. The subgroup identification problem for Hopfian groups. The following is a standard result about finitely presentable groups. Lemma 3.4. Let ⟨X∣R⟩ be a recursive presentation of a finitely presentable group. Then there is a finite subset R′ ⊆ R such that ⟨X∣R⟩ ≅ ⟨X∣R′ ⟩ via extention of the identity map on X. That is, there is a finite truncation R′ of R such that all other relations are a consequence of the first R′ . THE SUBGROUP IDENTIFICATION PROBLEM FOR FINITELY PRESENTED GROUPS 7 The following result could lead us to think that all finitely presented groups have solvable subgroup identification problem, and we urge the reader to study this carefully to become convinced that it is not what is proved. Proposition 3.5. There is a uniform partial algorithm that, on input of: A finite presentation P = ⟨X∣R⟩ of a group, and a finite set of words w1 , . . . , wn ∈ X ∗ such that ⟨w1 , . . . , wn ⟩P is finitely presentable, and Q = ⟨Y ∣S⟩ a finite presentation such that Q ≅ ⟨w1 , . . . , wn ⟩P ; Outputs: A finite set of words c1 , . . . , ck ∈ {w1 , . . . , wn }∗ such that each ci is trivial in P (when viewed as a word in X ∗ ) and ⟨w1 , . . . , wn ∣c1 , . . . , ck ⟩ is isomorphic to Q and hence also to ⟨w1 , . . . , wn ⟩P . Proof. Begin an enumeration c1 , c2 , . . . of all words in the {w1 , . . . , wn }∗ which are trivial in P (when viewed as words in X ∗ ); this can be done by repeated application of lemma 2.4. Define the presentation Pl ∶= ⟨w1 , . . . , wn ∣c1 , . . . , cl ⟩. By lemma 3.4, as ⟨w1 , . . . , wn ⟩P is finitely presentable, and T ∶= ⟨w1 , . . . , wn ∣c1 , c2 , . . .⟩ is a recursive presentation of a group isomorphic to ⟨w1 , . . . , wn ⟩P via extension of the map wi ↦ wi , there exists some finite m such that P m ≅ T (again via extension of the map wi ↦ wi ). That is, using lemma 3.4 we can truncate the relations of T at position m (forming Pm ) such that all successive relations are consequences of the first m (note that selecting m is not an algorithmic process; for the moment we merely appeal to the fact that such an m exists). So we have Q ≅ ⟨w1 , . . . , wn ⟩P ≅ T ≅ P m , where Q is our given explicit finite presentation. Now we use lemma 2.6 to begin checking for an isomorphism between Q and P 1 , P 2 , . . . as a parallel process. Eventually this process will stop at some k  (perhaps different from m) such that P k ≅ T ≅ Q. Note that we were very careful to mention that the selection of m in the above proof was existential, but not necessarily recursive. This is very important, as later in corollary 4.3 we construct a class of recursive presentations for which the selection of such an m is provably non-recursive. Remark. With the above proof in mind, one would naively hope that the map from Pk = ⟨w1 , . . . , wn ∣c1 , . . . , ck ⟩ to P = ⟨X∣R⟩ given by extending wi ↦ wi ∈ X ∗ would be an injection onto its image ⟨w1 , . . . , wn ⟩P ; in the case that P k is Hopfian this would indeed be true, as shown later in in lemma 3.7. But theorem 4.6 shows that this is not true in general. The existence of a finitely presented non-Hopfian group, combined with lemma 3.4, immediately gives rise to the following: Lemma 3.6. There exist finite presentations P = ⟨x1 , . . . , xn ∣r1 , . . . , rm ⟩ and Q = ⟨x1 , . . . , xn ∣r1 , . . . , rm , s1 , . . . , sk ⟩, along with a recursive presentation T = ⟨x1 , . . . , xn ∣r1 , r2 , . . .⟩ (where ri are the same in P, Q, T for all i ≤ m) such that: 1. P ≅ Q ≅ T (and hence T is finitely presentable). 2. The quotient maps φ ∶ P → Q and ψ ∶ P → T , each an extension of the map xi ↦ xi , are not isomorphisms. 8 MAURICE CHIODO Observe that the above quotient maps are always isomorphisms in the case of Hopfian groups, by very definition. The point of making the above observation is to stress the following: 1. There may be many ways to truncate the relators of T to get a presentation of a group isomorphic to P . 2. Truncating T to get a finite presentation T ′ with T ′ ≅ T may not give a presentation which is isomorphic to P via the quotient map we have been discussing. Lemma 3.7. Let P , Pk and {w1 , . . . , wn } be as in the proof of proposition 3.5. If ⟨w1 , . . . , wn ⟩P is Hopfian, then the map φ ∶ {w1 , . . . , wn } → X ∗ sending wi (as a generator of Pk ) to wi (as a word in X ∗ ) extends to a monomorphism φ ∶ P k ↪ P , and thus to an isomorphism to its image ⟨w1 , . . . , wn ⟩P . Proof. By the proof of proposition 3.5, we know that φ extends to a surjection φ ∶ P k ↠ ⟨w1 , . . . , wn ⟩P . But P k ≅ ⟨w1 , . . . , wn ⟩P , which is Hopfian. Hence φ must be injective, and thus an isomorphism.  Theorem 3.8. The subgroup identification problem is uniformly solvable in the class of finitely presented locally Hopfian groups. Hence, in this class of groups, weak effective coherence is equivalent to strong effective coherence. Proof. The first part follows from lemma 3.7; the second is then immediate.  4. Main results We begin by making the important observation that a solution to the word problem can’t be algorithmically lifted from a finite presentation of BS(2, 3) to a recursive presentation of BS(2, 3). Theorem 4.1. There is a finite presentation P of a group with solvable word problem (namely, BS(2, 3)) for which there is no partial algorithm that, on input of a recursive presentation Q such that P ≅ Q, outputs a solution to the word problem for Q. Proof. Assume we have such an algorithm. Take P = ⟨X∣R⟩ to be a finite presentation for BS(2, 3). Fix Q = ⟨X∣R∪S⟩ to be a finite presentation of a nontrivial quotient which is isomorphic to P , but not by the extension IdX of the map IdX ∶ X → X (say, instead, by the extension φ of the map φ ∶ X → X ∗ ). Fix a word w ∈ X ∗ such that w lies in the kernel of φ, but is not trivial in BS(2, 3). Given any r.e. set Wi , we form the recursive presentation Pi,j ∶= ⟨X∣R (∪S if j ∈ Wi ) ⟩. That is, Pi,j ∶= ⟨X∣R⟩ if j ∉ Wi , and Pi,j ∶= ⟨X∣R ∪ S⟩ if j ∈ Wi . So Pi,j is a recursive presentation (we add all the relators S to Q if we see j ∈ Wi ). Now use our assumed algorithm that solves the word problem in Pi,j to test if φ(w) = e in P i,j ; this will occur if and only if j ∈ Wi . By taking Wi to be non-recursive, we derive a contradiction.  Note. The above proof is not the original proof as developed by the author, but a simplified version due to Chuck Miller which follows from lemma 3.6 of this work. The author is grateful to Chuck for this simplification. THE SUBGROUP IDENTIFICATION PROBLEM FOR FINITELY PRESENTED GROUPS 9 Lemma 4.2. There is a finite presentation P = ⟨X∣R⟩ of a group with solvable word problem (namely, BS(2, 3)) for which there is no partial algorithm that, on input of a recursive presentation Q = ⟨Y ∣S⟩ such that P ≅ Q, outputs a set map φ ∶ X → Y ∗ which extends to an isomorphism φ ∶ P → Q. Proof. Suppose such an algorithm exists. Given a recursive presentation Q = ⟨Y ∣S⟩ such that P ≅ Q, use our supposed algorithm to output a set map φ ∶ X → Y ∗ which extends to an isomorphism φ ∶ P → Q. But since we have a solution to the word problem for P , we can combine this with the map φ to get a solution to the word problem for Q, thus contradicting theorem 4.1.  Note that, by lemma 3.4, in the above proof there will always be a finite subset S ′ of S such that all other relators are consequences of S ′ , and hence ⟨Y ∣S⟩ ≅ ⟨Y ∣S ′ ⟩. So we have the following immediate corollary: Corollary 4.3. There is a finite presentation P = ⟨X∣R⟩ of a group with solvable word problem (namely, BS(2, 3)) for which there is no partial algorithm that, on input of a recursive presentation Q = ⟨Y ∣S⟩ such that P ≅ Q, outputs a finite subset S ′ ⊆ S such that all other relators S ∖ S ′ are consequences of S ′ . Equivalently, construction of a finite truncation point m of S (with m as in the proof of proposition 3.5) is not algorithmically possible in general. As an aside, if we were instead to view isomorphisms between groups as Tietze transformations rather than set maps (see [13, §1.5] for a full exposition of this concept) then we can interpret lemma 4.2 in the following way. Lemma 4.4. There is a finite presentation P of a group with solvable word problem (namely, BS(2, 3)) for which there is no algorithm that, on input of a recursive presentation Q such that P ≅ Q, outputs a recursive enumeration of Tietze transformations of type (T 1) and (T 2) (manipulation of relators), and a finite set of Tietze transformations of type (T 3) and (T 4) (addition and removal of generators), with notation as per [13, §1.5], transforming P to Q. Remark. It should be pointed out that such a sequence of Tietze transformations as described above will always exist, which follows directly from lemma 3.4; we merely truncate the relators of Q to get a finite presentation Q′ , perform a finite sequence of Tietze transformations which takes P to Q′ (possible by [13, Corollary 1.5]), and then add the rest of the enumeration of relators of Q to Q′ . The point here is that we cannot compute an enumeration of such a sequence in general. Before proceeding to our main result, we note the following lemma which shows that the direction in which we define our isomorphism in lemma 4.2 is inconsequential. Lemma 4.5. Using the notation of lemma 4.2, having an explicit set map φ ∶ X → Y ∗ which extends to an isomorphism φ allows us to construct a set map ψ ∶ Y → X ∗ which extends to the inverse of φ (and hence is an isomorphism). The reverse also holds. 10 MAURICE CHIODO Proof. This follows from the fact that we only deal with recursive presentations, and we can uniformly enumerate all trivial words of such presentations by lemma 2.4.  We now have all the technical machinery required to prove our main result: Theorem 4.6. There is a finitely presented group with unsolvable subgroup identification problem. Note that, by theorem 3.8, such a group cannot be locally Hopfian. Proof. Take a recursive enumeration Pi ∶= ⟨Xi ∣Ri ⟩ of all recursive presentations of groups (fix some countably infinite alphabet A; each Xi is a finite subset of A, and each Ri is a recursive enumeration of words in Xi∗ ). By the Higman embedding theorem (see [20, Theorem 12.18]) we can embed their free product (with presentation P1 ∗P2 ∗. . .) into a finitely presented group with presentation P = ⟨X∣R⟩. Then the group P does not have solvable subgroup identification problem, for if it did then we could use this to contradict lemma 4.2 as follows: By the uniformity of Higman’s result, as described in the proof of [20, Theorem 12.18], there is a uniform procedure that, for any i, outputs a finite set of words Si ⊂ X ∗ in 1-1 correspondence with Xi such that the subgroup ⟨Si ⟩P is isomorphic to P i , and an explicit bijection φi ∶ Xi → Si which extends to an isomorphism φi ∶ Pi → ⟨Si ⟩P . That is, we can keep track of where each P i is sent in this embedding. So, given a recursive presentation Q = ⟨Y ∣S⟩ and a finite presentation H = ⟨Z∣V ⟩ such that H ≅ Q, compute j such that Pj = Q as recursive presentations (that is, number all Turing machines which read alphabet Y , and look for one identical to the description S). We know that H ≅ ⟨Sj ⟩P . So use our algorithm to output a set map ψ ∶ Z → Sj∗ which extends to an isomorphism ψ ∶ H → ⟨Sj ⟩P . But we can compose ψ with φ−1 j to get the ∗ −1 set map φ−1 j ○ ψ ∶ Z → Y which extends to an isomorphism φj ○ ψ ∶ H → Q. But this is impossible by lemma 4.2, so our assumed algorithm can’t exist.  5. Further work The group G constructed in theorem 4.6 contains an embedded copy of every recursively presented group, and so is not coherent, let alone weakly effectively coherent. We ask the question of whether theorem 4.6 can be modified so that G is weakly effectively coherent, or even merely coherent. Either of these would help make the result even more relevant, as we conjecture that strong and weak effective coherence are not equivalent properties for finitely presented groups. References [1] S. I. Adian, Finitely presented groups and algorithms, Dokl. Akad. Nauk SSSR 117, 9–12 (1957). [2] G. Baumslag, D. Solitar, Some two generator one-relator non-Hopfian groups, Bull. Amer. Math. Soc. 68, 199–201 (1962). [3] W. W. Boone, The word problem, Ann. of Math., 70, 207–265 (1959). [4] M. Bridson, H. Wilton, On the difficulty of presenting finitely presentable groups, Groups Geom. Dyn. 5, 301–325 (2011). THE SUBGROUP IDENTIFICATION PROBLEM FOR FINITELY PRESENTED GROUPS11 [5] J. L. Britton, The word problem for groups, Proc. London Math. Soc. (3) 8, 493–506 (1958). [6] M. Chiodo, Finding non-trivial elements and splittings in groups, J. Algebra. 331, 271– 284 (2011). [7] D. J. Collins, The word, power and order problems in finitely presented groups, in Word Problems, eds. Boone, Cannonito, and Lyndon, Amsterdam, North-Holland, 401–420 (1973). [8] M. Dehn, Über unendliche diskontinuerliche Gruppen (German), Math. Ann. 69, 116–144 (1911). [9] D. Groves, H. Wilton, Enumerating limit groups, Groups Geom. Dyn. 3, 389–399 (2009). [10] D. Groves, H. Wilton, Enumerating limit groups: A Corrigendum, arXiv:1112.1223v1 (2011). [11] G. Higman, Subgroups of finitely presented groups, Proc. Royal Soc. London Ser. A 262, 455–475 (1961). [12] R. Lyndon, P. Schupp, Combinatorial Group Theory, Springer (2001). [13] W. Magnus, A. Karrass, D. Solitar, Combinatorial group theory, Dover (2004). [14] K. A. Mihailova, The occurrence problem for direct products of groups, Dokl. Akad. Nauk SSSR 119, 1103–1105 (1958). [15] C. F. Miller III, On group theoretic decision problems and their classification, Annals of Math. Study 68, Princeton University Press, Princeton, NJ (1971). [16] C.F. Miller III, Decision problems for groups-survey and reflections. Algorithms and classification in combinatorial group theory (Berkeley, CA, 1989), Math. Sci. Res. Inst. Publ., 23, Springer, New York, 1–59 (1992). [17] P. S. Novikov, On the algorithmic unsolvability of the word problem in group theory, Trudy Mat. Inst. Steklov 44, 1–143 (1955). [18] M. O. Rabin, Recursive unsolvability of group theoretic problems, Annals of Math. 67, 172–194 (1958). [19] H. Rogers Jr, Theory of recursive functions and effective computability, MIT Press (1987). [20] J. Rotman, An introduction to the theory of groups, Springer-Verlag, New York (1995). Dipartimento di Matematica ‘Federigo Enriques’ Università degli Studi di Milano Via Cesare Saldini 50, Milano, 20133, ITALIA [email protected]
4math.GR
On Improving the Capacity of Solving Large-scale Wireless Network Design Problems by Genetic Algorithms⋆ arXiv:1704.05367v1 [math.OC] 15 Apr 2017 Fabio D’Andreagiovanni Konrad-Zuse-Zentrum für Informationstechnik Berlin (ZIB) Takustrasse 7, 14195 Berlin, Germany [email protected] Abstract. Over the last decade, wireless networks have experienced an impressive growth and now play a main role in many telecommunications systems. As a consequence, scarce radio resources, such as frequencies, became congested and the need for effective and efficient assignment methods arose. In this work, we present a Genetic Algorithm for solving large instances of the Power, Frequency and Modulation Assignment Problem, arising in the design of wireless networks. To our best knowledge, this is the first Genetic Algorithm that is proposed for such problem. Compared to previous works, our approach allows a wider exploration of the set of power solutions, while eliminating sources of numerical problems. The performance of the algorithm is assessed by tests over a set of large realistic instances of a Fixed WiMAX Network. Keywords: Wireless Network Design, Large-scale Optimization, Genetic Algorithms. 1 Introduction During the last years, wireless communications have experienced an explosive growth thus rapidly leading to a dramatic congestion of radio resources. In such complex scenario, the trial-and-error approach commonly adopted by practitioners to design networks has clearly shown its limitations. Telecommunications companies and authorities are thus searching for more effective and efficient design approaches, also looking on Optimization (as shown by the recent call for tenders for developing a Digital Video Broadcasting simulator by the Italian Communications Regulatory Authority [2]). Many models and solution methods have been proposed for solving the problem of designing a wireless network. ⋆ This is the authors’ final version of the paper published in Di Chio C. et al. (Eds): EvoApplications 2011, LNCS 6625, pp. 11-20, 2011. DOI: 10.1007/978-3-642-20520-0 2 . The final publication is available at Springer via http://dx.doi.org/10.1007/978-3-642-20520-0 2 . This work was supported by the German Federal Ministry of Education and Research (BMBF), project ROBUKOM, grant 03MS616E. However, solving to optimality the overall problem is still a big challenge in the case of large instances. In this paper we present a Genetic Algorithm for solving the Power, Frequency and Modulation Assignment Problem, a relevant problem that arises in the design of wireless networks and captures specific features of Next Generation Networks. 2 The Wireless Network Design Problem For modeling purposes, a wireless network can be described as a set of transmitters B that provide for a telecommunication service to a set of receivers T . A receiver t ∈ T is said to be covered or served if it receives the service within a minimum level of quality. Transmitters and receivers are characterized by a location and a number of radio-electrical parameters (e.g., power emission and frequency). The Wireless Network Design Problem (WND) consists in establishing the location and suitable values for the parameters of the transmitters with the goal of maximizing the number of covered receivers or a revenue associated with coverage. In this work we consider a generalization of the so-called Power and Frequency Assignment Problem (PFAP), a version of the WND that is known to be NP-hard [12]. In addition to power emission and frequency, we also consider the transmission scheme (burst profile) as parameter to be established, modeling a feature of Next Generation Networks, such as WiMAX [3,6]. We indicate this generalization of the PFAP by the name Power, Frequency and Modulation Assignment Problem (PFMAP). In the PFMAP two decisions must be taken: (1) establishing the power emission of each transmitter on each available frequency and (2) assigning served receivers to activated transmitters specifying the frequency and the burst profile used to transmit. To model these decisions, as first step we introduce the set F of available frequencies and the set H of available burst profiles. Each frequency f ∈ F has a constant bandwidth D and each burst profile h ∈ H is associated with a spectral efficiency sh , which is the bandwidth required to satisfy one unit of traffic demand generated by a receiver. Then we can introduce two typologies of decision variables, namely: – a continuous power variable pfb ∈ [0, Pmax ] ∀ b ∈ B, f ∈ F representing the power emission of a transmitter b on frequency f ; – a binary service assignment variable xftbh ∈ {0, 1} ∀ t ∈ T, b ∈ B, f ∈ F, h ∈ H defined in the following way:   1 if receiver t ∈ T is served by transmitter b ∈ B on frequency f ∈ F through burst profile h ∈ H xftbh =  0 otherwise Given a frequency f ∈ F , every receiver t ∈ T picks out signals from every transmitter b ∈ B and the power Pbf (t) that t receives from b on f is proportional to the emitted power pfb by a factor atb ∈ [0, 1], i.e. Pbf (t) = atb · pfb . The factor atb is called fading coefficient and summarizes the reduction in power that a signal experiences while propagating from b to t [14]. Among the signals received from transmitters in B, a receiver t can select a reference signal (or server), which is the one carrying the service. All the other signals are interfering. We remark that, since each transmitter in B is associated with a unique signal, in what follows we will also refer to B as the set of signals received by t. A receiver t is regarded as served by the network, specifically by server β ∈ B on frequency f ∈ F through burst profile h ∈ H, if the ratio of the serving power to the sum of the interfering powers (signal-to-interference ratio or SIR) is above a threshold δh (SIR threshold ) whose value depends on the used burst profile h [14]: atβ · pfβ ≥ δh . (1) P N + b∈B\{β} atb · pfb Note that in the denominator we highlight the presence of the system noise N > 0. By simple algebra operations, inequality (1) can be transformed into the following linear inequality, commonly called SIR inequality: X atb · pfb ≥ δh · N . (2) atβ · pfβ − δh b∈B\{β} As we do not know a priori which transmitter b ∈ B will be the server of a receiver t ∈ T and which frequency f ∈ F and burst profile h ∈ H will be used, given a receiver t ∈ T we have one SIR inequality (2) for each potential server β ∈ B and potentially usable frequency f and burst profile h. To ensure that t is covered, at least one of such inequalities must be satisfied. This requirement can be equivalently expressed through the following disjunctive constraint:   _ X atβ · pf − δh atb · pfb ≥ δh · N  . (3) β ∀(β,f,h):β∈B,f ∈F,h∈H b∈B\{β} Adopting a standard approach used in Mixed-Integer Programming (see [13]), the above disjunction can be represented by a family of linear constraints in the p variables by introducing a large positive constant M , the so-called big-M coefficient. Specifically, given a receiver t ∈ T we use the assignment variable xftβh to introduce the following constraint for each potential 3-ple (β, f, h): X atb · pfb + M · (1 − xftβh ) ≥ δh · N . (4) atβ · pfβ − δh b∈B(t)\{β} It is easy to check that if xftβh = 1 then (4) reduces to the simple SIR constraint (2). If instead xftβh = 0 and M is sufficiently large1 , then (4) is satisfied by any feasible power vector p and becomes redundant. 1 For example, we can set M = δh · N + δh P b∈B\{β} atb · Pmax By using constraints (4) and by introducing a parameter rt to denote revenue associated with receiver t ∈ T (e.g., population, number of customers) , we can define the following natural formulation (BM-PFMAP) for the PFMAP [6,7]: XX X X max rt · xftbh (BM − P F M AP ) t∈T b∈B f ∈F h∈H s.t. X atβ · pfβ − δh atb · pfb + M · (1 − xftβh ) ≥ δh · N b∈B\{β} XXX xftbh ≤1 t ∈ T, b ∈ B, f ∈ F, h ∈ H (5) t∈T (6) b ∈ B, f ∈ F (7) b ∈ B, f ∈ F (8) t ∈ T, b ∈ B, f ∈ F, h ∈ H (9) b∈B f ∈F h∈H XX dt · 1 · xf h ≤ D sh tβ t∈T h∈H pfb ∈ [0, Pmax ] xftbh ∈ {0, 1} The objective function is to maximize the total revenue obtained by serving receivers and constraint (6) ensures that each receiver is served at most once. Each receiver generates a traffic demand dt and each frequency has a bandwidth equal to D. Constraint (7) ensures that the sum of traffic demands (re-sized by the spectral efficiency sh of the used burst profile) generated by the receivers served by a transmitter does not exceed the bandwidth of the frequency. Finally, (8) and (9) define the decision variables of the problem. Drawbacks of the natural formulation. The natural formulation (BMPFMAP) expands a basic model that is widely used for the WND in different application contexts, such as DVB, (e.g., [12]), UMTS (e.g., [1,11]) and WiMAX ([6,7]). In principle, such basic model and (BM-PFMAP) can be solved by commercial solvers such as IBM ILOG CPLEX [10]. However, it is well-known (see [7]) that: (i) the fading coefficients may vary in a wide range leading to (very) ill-conditioned coefficient matrices that make the solution process numerically unstable; (ii) the big-M coefficients generate poor quality bounds that dramatically reduce the effectiveness of standard solution approach [13]; (iii) the resulting coverage plans are often unreliable and may contain errors (e.g., [7,11]). In practice, the basic model and (BM-PFMAP) can be solved to optimality only when used for small-sized instances. In the case of large real-life instances, even finding feasible solutions can represent a difficult task, also for state-of-the-art commercial solvers like CPLEX. Though these drawbacks are well-known, it is interesting to note that just a relatively small part of the wide literature devoted to WND has tried to overcome them. We refer the reader to [6] for a review of works that have tried to tackle these drawbacks. 2.1 Contribution of this work and review of related literature In this paper, we develop our original contribution by starting from a recent work, [7], that proposes a family of strong valid inequalities for tackling the drawbacks of (BM-PFMAP) that we have pointed out. The idea at the basis of [7] is to quit modeling emission power as a continuous variable pb and to use instead a set of discrete power levels P = {P1 , . . . , P|P| }, with P1 = 0 (switchedoff value), P|P| = Pmax and Pi > Pi−1 , for i = 2, . . . , |P|. This basic operation allows the authors to define a family of lifted GUB cover inequalities that are used in a solution algorithm that drastically enhances the quality of solutions found. The solution algorithm proposed in [7] is motivated by a trade-off that arises from discretization: larger sets of discrete levels lead in principle to better solutions, but on the other hand the corresponding 0-1 Linear Program gets larger and harder to solve. The computational experience shows that very good solutions can be found by considering small sets with well-spaced power values, but that no improvement is obtained within the time limit when a number of levels higher than six is considered. In the present work, we investigate the possibility of using a Genetic Algorithm (GA) [8] as a fast heuristic to widen the exploration of the discrete power solution space: the aim is to exploit the entire set of discrete power levels and thus to evaluate power configurations with levels not included in the best solutions found in [7]. In particular, our aim is to improve the capacity of solving large realistic instances by finding higher value solutions. We thus design a GA that takes into account the specific features of the PFMAP and we test its performance on the same set of realistic WiMAX instances used in [7]. Heuristics have been extensively used to tackle large instances of different versions of the WND problem. Two relevant cases are provided by [1], where a two-stage Tabu Search algorithm is proposed to solve the base station location and power assignment problem in UMTS networks, and by [12], where a GRASP algorithm is proposed to solve the PFAP arising in the planning of the Italian National DVB network. The use of GA to solve versions of the WND is not a novelty as well and many works can be found in literature. However, to our best knowledge, no GA has been yet developed to solve the PFMAP and the algorithm that we propose is the first for solving this level of generalization of the WND. Until now, GAs were indeed developed to solve just single aspects of the PFMAP: (i) the transmitter location problem (e.g., [4]); (ii) the service assigment problem (e.g., [9]); (iii) the frequency assignment problem (e.g., [5]); (iv) the power assignment problem (e.g., [15]). Moreover, we remark that our algorithm is the first to be designed with the specific aim of improving the capacity of solving instances, while tackling the numerical problems pointed out in Section 2. We now proceed to present our original contributions for the WND. 3 A Genetic Algorithm for the PFMAP A Genetic Algorithm (GA) is a heuristic method for solving optimization problems that resembles the evolution process of a population of individuals (for a comprehensive introduction to the topic we refer the reader to [8]). At any iteration, a GA maintains a population whose individuals represent feasible solutions to the problem. The solution is encoded in a chromosome associated with each individual. The genetic strength of an individual is evaluated by a fitness function that establishes the quality of the corresponding solution to the problem. A GA starts by defining an initial population, that iteration after iteration changes by crossover, mutation and death of individuals, according to a natural selection Darwinistic mechanism. We develop a GA for the PFMAP that presents the following general structure: 1. Creation of the initial population 2. UNTIL the arrest condition is not satisfied DO (a) Selection of individuals who generate the offspring (b) Generation of the offspring by crossover (c) Mutation of part of the population (d) Death of part of the population We now characterize the elements and the phases presented above for the algorithm (GA-PFMAP) that we propose to solve the PFMAP. 3.1 Characterization of the population Individual representation. As we have explained in Section 2.1, our aim is to conduct a wider exploration of the power solution space, trying to obtain solutions with higher value. To this end, we establish that the chromosome of an individual corresponds to a power vector p of size |B| · |F |. Specifically, the chromosome presents one locus for each transmitter b ∈ B and frequency f ∈ F and each locus stores the power pfb emitted by b on f , namely |F | |F | |F | p = (p11 , . . . , p1 , p12 , . . . , p2 , . . . , p|B| ). Such power belongs to the set of discrete power levels P, i.e. pfb ∈ P = {P1 , . . . , P|P| }. We remark that establishing the power emission pfb ∀ b ∈ B, f ∈ F does not completely characterize a solution of the PFMAP. We indeed have to fix the value of the assignment variables xftbh and thus we need to set some assignment rule. |F | First, note that given a power vector p = (p11 , p21 , . . . , p|B| ) and a receiver t ∈ T we can compute the power Pbf (t) that t receives from b on f , ∀b ∈ B, f ∈ F . Through Pbf (t), if we fix the server β ∈ B of t, we can check if there exists a SIR inequality (2) that is satisfied for some frequency f ∈ F and burst profile h ∈ H. We establish the following assignment rule: as server of t we choose the transmitter b that ensures the highest received power Pbf (t) on some f . This in fact ensures the highest serving power. Once that the server β is chosen, we can identify the SIR inequalities (2) that are satisfied by p when t is served by β for some f ∈ F and h ∈ H. If the SIR inequality is satisfied for a multiplicity of frequencies and/or burst profiles, we first choose as serving frequency fˆ the one that ensures the highest value for the left-hand-side of (2) and then we choose as burst profile ĥ the one that ensures the highest spectral efficiency (see Section 2). ˆ Thus for t served by β we have xf ĥ = 1 and xf h = 0 ∀f ∈ F \ {fˆ}, h ∈ H \ {ĥ}. tβ tβ Note that this last rule may assign a receiver t to a transmitter β that violates the capacity constraint (7) of β on the chosen frequency fˆ. If this is the case, we choose the second best couple of frequency and burst profile according to the rule. If this not possible, the third best and so on. In the end, if there is no capacity left for any valid couple (f, h), t is not considered covered by β. Fitness function. As the aim of the WND is to maximize coverage, we adopt a fitness function that evaluates the coverage ensured by an individual. Specifically, the fitness COV (p) of an individual is equal to the number of receivers that are covered when the power vector is p and service assignment is done according to the previously introduced rules. Initial population. Our aim is to consider all the feasible discrete power levels from the beginning. Therefore, the initial population is represented by the power vectors that are obtained by activating a single transmitter b ∈ B on a single frequency f ∈ F at each of the discrete power levels Pl ∈ P. For every b ∈ B, f ∈ F , the corresponding individuals included in the initial population are thus: (0, 0, . . . , pfb = P2 , . . . , 0, 0) · · · (0, 0, . . . , pfb = P|P| , . . . , 0, 0) . Note that we exclude the individual corresponding to all transmitters turned off, i.e. pfb = P1 = 0 ∀b ∈ B, f ∈ F . We thus have |B| · |F | · |L − 1| initial individuals. We denote the set of individuals representing the population at a generic iteration of the algorithm by P . 3.2 Evolution of the population Selection. In order to select the individuals who give birth to the new generation, we adopt a tournament selection approach: given the set P of individuals constituting the current population and a value 0 < α < 1, we first define a number k ∈ Z+ of groups including ⌊α · |P |⌋ individuals who are randomly extracted from P . Then we extract m < ⌊α · |P |⌋ individuals with the best fitness from every group. These are the individuals who generate offspring by crossover. Crossover, mutation and death. The individuals selected for crossover are randomly paired up to constitute ⌊k · m/2⌋ couples. Each couple generates two offspring by mixing its chromosome. Given a couple of parents with power vectors p1, p2, the crossover operation consists in mixing power levels that are in the same position of p1 and p2 to generate two offspring with (possibly) higher fitness power vectors p3, p4. Before presenting the crossover procedure, we need to define a measure that evaluates the impact of crossover on coverage. To this end, let ∆COV(p, pfb = Pl ) ∈ Z denote the variation in the number of covered receivers caused by changing the power value pfb in position (b, f ) of vector p to the value Pl , while maintaining all the other power values unchanged. We can then propose the following crossover procedure, that concentrates the effort of creating a higher fitness individual on p3. At the beginning of the crossover, p3 and p4 have all elements equal to 0. Then, by following this ordering of indices (b, f ) : b ∈, f ∈ F : (1, 1) (1, 2) . . . (1, |F |) (2, 1) . . . (2, |F |) . . . (|B|, 1) . . . (|B|, |F |), each null value inherits the power value in the same position of one of the two parents. We now present the crossover rule for a generic position (β, φ). For indices (b, f ) : b < β, f < φ, the crossover was already executed and thus the offspring vectors p3, p4 present power levels inherited by the parents p1, p2. Power levels of p3, p4 in positions (b, f ) : b ≥ β, f ≥ φ are instead still equal to zero. The rule to establish the power value inherited by p3, p4 in (β, φ) is the following: ( p1φβ if ∆COV(p3, p3φβ = p1φβ ) ≥ ∆COV(p3, p3φβ = p2φβ ) φ p3β = p2φβ otherwise ( p1φβ if ∆COV(p3, p3φβ = p1φβ ) < ∆COV(p3, p3φβ = p2φβ ) φ p4β = p2φβ otherwise This ensures that, at any step of the crossover procedure, offspring p3 inherits the power level of the parent that allows the most favourable variation ∆COV in coverage. In addition to crossover, we also allow to alter the power vector of single individuals by mutation. This introduces new genetic information in the population and helps to widen the solution space exploration and to avoid entrapment in local optima. At any iteration, a number of individuals ⌊γ ·|P |⌋ with 0 < γ < 1 is randomly chosen. Then, still by random selection, |F | power levels corresponding with different frequencies are reduced to the immediately lower power level allowed in P. This mutation rule is set with the aim of defining new power vectors that have lower powers but ensure the same coverage. The reduction in power is generally desirable as a signal that is useful for a receiver may be interfering for a different receiver. Finally, after crossover and mutation, the weakest individuals die and are removed from P . Specifically, we choose to select and remove the 2 · ⌊k · m/2⌋ individuals with the worst fitness function. The size of P is thus maintained constant over all the iterations. 4 Computational experience We test the performance of our GA on a set of 15 realistic instances, developed with the Technical Strategy & Innovations Unit of British Telecom Italia (BT Italia SpA). All the instances refers to a Fixed WiMAX Network [3], deployable in an urban area corresponding to a residential neighborhood of Rome (Italy). The instances consider various scenarios with up to |T | = 529 receivers, |B| = 36 transmitters, |F | = 3 frequencies, |H| = 4 burst profiles (see Table 1). This leads to large formulations (BM-PFMAP) that are very hard to solve. For a detailed description of the instances, we refer the reader to [7]. For each instance, we run the proposed algorithm (GA-PFMAP) 50 times with a time limit of 1 hour by using a machine with a 1.80 GHz Intel Core 2 Duo processor and 2 GB of RAM. Each tournament selection involves k = 20 Table 1. Comparisons between (BM) and WPLAN formulations |T*| ID |T| S1 S2 S3 S4 S5 S6 S7 R1 R2 R3 R4 Q1 Q2 Q3 Q4 100 169 196 225 289 361 400 400 441 484 529 400 441 484 529 |B| |F| |H| 12 12 12 12 12 12 18 18 18 27 27 36 36 36 36 1 1 1 1 1 1 1 3 3 3 3 1 1 1 1 1 1 1 1 1 1 1 4 4 4 4 4 4 4 4 (BM-PFMAP) 63 (78) 99 (100) 108 93 77 154 259 (266) 370 302 (303) 99 (99) 283 (286) 0 191 226 145 (147) WPLAN [7] (GA-PFMAP) 74 70 107 103 113 113 111 115 86 88 170 175 341 319 400 400 441 441 427 434 529 462 67 72 211 222 463 466 491 491 groups that include a fraction α = 0.05 of the population P . The best m = 8 individuals of each group are selected for crossover and, after the generation of the new individuals, mutation affects a fraction γ = 0.1 of the population. In Table 1, we compare the value of the best solution obtained through the three approaches that we consider, namely the direct solution of (BM-PFMAP) by ILOG Cplex 10.1, the solution of the Power-Indexed formulation by the algorithm WPLAN [7] and the solution of (BM-PFMAP) by the proposed algorithm (GA-PFMAP). Results for (BM-PFMAP) and WPLAN are derived from [7]. The presence of two values in some lines of the column of (BM-PFMAP) indicates that the coverage plans returned by Cplex contain errors and some receivers are actually not covered. We remark that (GA-PFMAP) provides solutions that always ensure a higher coverage than (BM-PFMAP) and without coverage errors. Making a comparison with WPLAN, we instead note that (GA-PFMAP), though in some cases finds solutions with lower coverage, for most of the cases is able to find solutions that ensure an equal or higher number of covered receivers than WPLAN. This is particularly evident for instances that seems to be very hard to solve through (BM-PFMAP). The algorithm is thus effective and is worth of further investigations. 5 Conclusion and future work We presented a Genetic Algorithm (GA) to tackle large realistic instances of a relevant problem arising in wireless network design. We showed that a GA helps to improve the value of solutions found through a wider exploration of the power space. A future research path could be represented by the integration of a refined GA into an exact solution method. It is indeed common experience that the combination of fast heuristics with Mixed-Integer Linear Programming leads to a great reduction in the running times w.r.t pure exact optimization methods. A sensitivity analysis of the GA parameters and a study on the impact of different starting conditions and selection strategies would also constitute important subjects of investigations. Acknowledgments. The author thanks Carlo Mannino and Antonella Nardin for fruitful discussions. Thanks go also to the three anonymous referees who provided valuable comments. References 1. Amaldi, E., Belotti, P., Capone, A., Malucelli, F.: Optimizing base station location and configuration in UMTS networks. Ann. Oper. Res. 146 (1), 135–152 (2006) 2. Autoritá per la Garanzia nelle Comunicazioni, Delibera N.269/09/CONS, http://www.agcom.it/default.aspx?DocID=3359 3. Andrews, J.G., Ghosh, A., Muhamed, R.: Fundamentals of WiMAX. Prentice Hall, Upper Saddle River, USA (2007) 4. Choi, Y.S., Kim, K.S., Kim, N.: The Displacement of Base Station in Mobile Communication with Genetic Approach. EURASIP J. Wireless Comm. and Net. Vol. 2008 (2008) 5. Colombo, G.: A Genetic Algorithm for Frequency Assigment with Problem Decomposition. Int. J. Mob. Net. Des. and Innov. 1 (2), 102–112 (2006) 6. D’Andreagiovanni, F.: Pure 0-1 Programming Approaches to Wireless Network Design. Ph.D. Thesis, Sapienza Università di Roma, Rome, Italy, Winner of the 2010 INFORMS Doctoral Dissertation Award for Operations Research in Telecommunications, (2010) 7. D’Andreagiovanni, F., Mannino, C., Sassano, A.: GUB Covers and Power-Indexed Formulations for Wireless Network Design. Technical Report vol. 2 n. 14, Department of Computer and System Sciences, Sapienza Università di Roma, Rome, Italy (2010) 8. Goldberg, D.E.: Genetic Algorithms in Search, Optimization & Machine Learning. Addison-Wesley, Reading, USA (1988) 9. Hu, T., Chen, Y.P., Banzhaf, W.: WiMAX Network Planning Using AdaptivePopulation-Size Genetic Algorithm. In: Di Chio, C., et al. (eds.) EvoApplications 2010. LNCS, vol. 6025, 31–40. Springer, Heidelberg (2010) 10. IBM ILOG CPLEX, http://www-01.ibm.com/software/integration/optimization/cplex-optimizer 11. Kalvenes, J., Kennington, J., Olinick, E.: Base Station Location and Service Assignments in W-CDMA Networks. INFORMS J. Comp. 18 (3), 366–376 (2006). 12. Mannino, C., Rossi, F., Smriglio, S.: The Network Packing Problem in Terrestrial Broadcasting. Oper. Res. 54 (6), 611–626 (2006) 13. Nehmauser, G., Wolsey, L.: Integer and Combinatorial Optimization. John Wiley & Sons, Hoboken, USA (1988) 14. Rappaport, T.S.: Wireless Communications: Principles and Practice, 2nd Edition. Prentice Hall, Upper Saddle River, USA (2001) 15. Song, W.J., et al.: Evolutionary Computation and Power Control for Radio Resource Management in CDMA Cellular Radio Networks. PIMRC 2002, vol. 3, 1417– 1421 (2002)
9cs.NE
arXiv:1801.03996v1 [quant-ph] 11 Jan 2018 Noisy Feedback and Loss Unlimited Private Communication Dawei Ding Saikat Guha Stanford Institute for Theoretical Physics Stanford University Stanford, CA 94305, USA Email: [email protected] College of Optical Sciences University of Arizona Tucson, AZ 85721, USA Email: [email protected] Abstract—Alice is transmitting a private message to Bob across a bosonic wiretap channel with the help of a public feedback channel to which all parties, including the fullyquantum equipped Eve, have completely noiseless access. We find that by altering the model such that Eve’s copy of the initial round of feedback is corrupted by an iota of noise, one step towards physical relevance, the capacity can be increased dramatically. It is known that the private capacity with respect to the original model for a pure-loss bosonic channel is at most − log(1 − η) bits per mode, where η is the transmissivity, in the limit of infinite input photon number. This is a very pessimistic result as there is a finite rate limit even with an arbitrarily large number of input photons. We refer to this as a loss limited rate. However, in our altered model we find that we can achieve a rate of (1/2) log(1 + 4ηNS ) bits per mode, where NS is the input photon number. This rate diverges with NS , in sharp contrast to the result for the original model. This suggests that physical considerations behind the eavesdropping model should be taken more seriously, as they can create strong dependencies of the achievable rates on the model. For by a seemingly inconsequential weakening of Eve, we obtain a loss-unlimited rate. Our protocol also works verbatim for arbitrary i.i.d. noise (not even necessarily Gaussian) injected by Eve in every round, and even if Eve is given access to copies of the initial transmission and noise. The error probability of the protocol decays super-exponentially with the blocklength. I. I NTRODUCTION We consider the task of continuous variable (CV) private communication over a lossy bosonic channel with additive noise, with a quantum-limited adversary. We consider a forward wiretap channel from Alice to Bob with an eavesdropper Eve. There is also a backward public side channel from Bob to Alice. All parties, including Eve, have perfectly noiseless access to communication on this side channel. This immediately presents a problem. All communication channels in reality have a non-zero level of noise. With error-correction the noise can be reduced, but never completely removed. Therefore this model is clearly unphysical. Indeed, most of the information theoretic capacity analyses of private communication and secret-key generation have traditionally assumed such a zeroerror feedback. Admittedly, the process of abstraction that allows a problem to be mathematically analyzed inevitably causes such unphysical features to emerge. However, we will find in this paper that this particular feature can be problematic in that ameliorating it can create a significant difference in achievable rates. More explicitly, we propose a protocol over a lossy bosonic channel and consider an alteration of the feedback-assisted private communication model in which Eve’s copy of the public communication sent by Bob to Alice on just the initial round of the protocol is corrupted by a small amount of noise, a small step towards physical relevance. Eve obtains the remainder of the public communication noiselessly, and is otherwise quantum equipped, i.e., has perfect quantum memories and the ability to make arbitrary collective quantum measurements. We show that with such a seemingly inconsequential weakening of the eavesdropper, Alice and Bob can achieve a rate of 1 1 2 log(1 + 4ηNS ) secure bits per mode using a simple laserlight modulation and homodyne detection, NS being the mean input photon number per mode. This is a loss unlimited rate, in sharp contrast to the loss limited upper bound known for the original model: − log(1 − η) [1], [2]. The exact same protocol also works if the channel has noise in addition to loss. We will argue that the noise can even be non-Gaussian. A closely related classical result 2 was proven in [4]. However, their altered communication model assumes Eve’s copy of the feedback is corrupted by Gaussian additive noise and on every round. Thus this is a more specialized and significant departure from the usual model. They do consider more general correlated noise between the different channels involved, but this can be integrated into our model as well. In addition to the difference in model alteration, in the discussion section we will see that we can slightly strengthen Eve from what is discussed above, by giving her copies of the initial transmission and noise, and still obtain our main result with the same protocol. Note that our results trivially apply to a classical additive white Gaussian noise (AWGN) channel and since adding more noise to Eve’s feedback can only increase the achievable rate, implies the result in [4]. 1 Throughout this paper, logarithms are base 2. that in the classical case the feedback-assisted private capacity of the Gaussian wiretap channel also has a loss limited capacity. This can be seen for instance by upper bounding it by the secret key capacity and upper bounding that via Theorem 4 of [3]. 2 Note II. M AIN R ESULT Alice is to send a message to Bob over a bosonic (quantum) wiretap channel N , which is to be kept private from Eve, by transmitting bosonic states on the forward channel N and using a backward noiseless classical feedback channel. Eve obtains the quantum output of the complement of the isometric extension of N , and can eavesdrop on the feedback channel, but she obtains a noisy version of the classical feedback for the initial round. Denoting the classical feedback system as Y , for this round Eve obtains the output of a classical noisy channel W (Y ). Furthermore, we assume that the capacity of the noisy channel W (Y ) from Bob to Eve, is finite for a finite input power, that is, C(W, P ) ≡ max Y :E[Y 2 ]≤P I(Y ; W ) is finite for finite 3 P . Note that this condition is very mild. For instance, if W (Y ) = Y + S, with S ∼ Gaussian(0, N0 ), is AWGN, N0 can be arbitrarily small as long as it is nonzero. Hence, we only need an iota of noise. We shall refer to this setting as asymmetric feedback-assisted private communication. We say asymmetric because the feedback is noiseless to Alice but noisy to Eve on the initial round. A diagram of the communication model for the initial round is shown in fig. 1. B 0 is some leftover system that Bob keeps. For subsequent rounds no noise is applied to Eve’s copy of Y. E W A B Y B0 Y Y of the message to vanish. We leave open whether we can obtain our result with this stronger privacy criterion. We will consider the case where the forward channel is a single mode thermal bosonic wiretap channel: denoting Alice’s, Bob’s and Eve’s optical modes as â, b̂, and ê, respectively, the channel is described by the Heisenberg evolutions: b̂ = √ ηâ + p 1 − η fˆ; ê = p 1 − ηâ − √ ˆ η f, (1) where fˆ is the optical mode of the environment, which is in a thermal state ρth (0, nth ) with thermal number nth , and η is the transmissivity. A thermal state is given by ρth (α, n̄) ≡ ´ d2 β −|β|2 /n̄ e |α + βi hα + β|. We enforce an average photon C π n̄ number constraint on Alice’s input over the i ∈ [0 : n] rounds: Pn 1 † tr[â âρ A i ] ≤ NS . We now state our main theorem. i=0 n+1 Theorem 1. The rate PH =   1 NS log 1 + 2 , 2 σ (2) 1 + 1−η where σ 2 ≡ 4η 2η nth , is achievable with mean photon per mode NS for asymmetric feedback-assisted private communication over the thermal bosonic wiretap channel, under the aforesaid model. Proof. The rate is achieved by generalizing the SchalkwijkKailath protocol [8] to the quantum setting. √ √ Codebook: Divide the interval [− NS , NS ] into 2nR equal length intervals for some R ∈ R+ . Given a message m ∈ [2nR ], let θ(m) be the midpoint of the m-th interval. The codebook is then given by the coherent states |θ(m)i. Encoding and Decoding: When we say Alice transmits a random variable X on R, we mean she sends the mixed state ˆ ρX ≡ dxpX (x)|xi hx|, R Fig. 1: A diagram of the asymmetric feedback-assisted private communication model for the initial round of communication. The privacy criterion we use is the same as the one used in definitions of private communication in various classic papers [5], [6], [3] and in the classical result [4]; i.e., we assume the message M is uniformly distributed and require: lim k→∞ 1 I(M ; E) = 0, k where k is the number of rounds and E is the aggregation of Eve’s systems after all k rounds. Note that this is in general weaker than the privacy criterion used in quantum Shannon theory analyses, for instance [7], which requires the trace distance between Eve’s states and a constant state independent 3 Note that the capacity is finite at all finite cost constraints iff it is finite at some finite cost constraint. The forward direction is trivial. For the reverse direction, assume for contradiction that there is some finite cost constraint at which the capacity is infinite. Then, by time-sharing we can conclude that is infinite at all finite cost constraints, a contradiction. where |xi is a coherent state. Note that E[X 2 ] = tr[↠âρX ]. Given message m, on round i = 0, Alice sends the constant random variable X0 which takes the value θ(m). √ Bob√receives ρth ( η θ(m), (1 − η)nth )B0 , and Eve receives ρth ( 1 − η θ(m), ηnth )E0 . Bob then performs an x homodyne measurement on his output, to obtain, with appropriate scaling, the output of an induced additive white Gaussian noise (AWGN) channel with input X0 : Y0 ∼ N (θ(m), σ 2 ). Now, on every round, Bob will simply send a copy of his measurement result through the feedback channel. Via the feedback channel Alice receives Y0 , while Eve receives W0 (Y0 ). Denote the random noise that is added in the i-th induced AWGN channel from Alice to Bob by Ni ≡ Yi −Xi . Note that since Alice has access to both Yi and Xi , she can always explicitly compute Ni . For round i ≥ 1, Alice computes the conditional expectation E[N0 |Y i−1 ], where Y i−1 ≡ Y1 . . . Yi−1 , that is, Y0 is not included, and E[N0 |Y 0 ] ≡ E[N0 ] = 0. She then transmits Xi = γi (N0 − E[N0 |Y i−1 ]), where γi are chosen such that E[Xi2 ] = NS . Note that this guarantees that the photon number constraint is satisfied and with equality. Bob receives the state ˆ √ dxpXi (x)ρth ( ηx, (1 − η)nth )Bi , R on which he will do a homodyne x measurement to obtain Yi , while Eve receives ˆ p dxpXi (x)ρth ( 1 − ηx, ηnth )Ei . R At the end of the protocol (i = n), Bob computes Θn ≡ Y0 − E[N0 |Y n ] = θ(m) + (N0 − E[N0 |Y n ]). His guess of the message will then be m̂, where θ(m̂) is closest to Θn . Error Analysis: Note that this protocol is simply the Schalkwijk-Kailath protocol over an induced classical AWGN channel with noise σ 2 . Therefore, by the analysis in [8], [9], the probability of error of this protocol is upper bounded by r   2 pe ≤ exp −22n(PH −R)−1 NS /σ 2 . π Hence, pe −−−−→ 0 if R < PH . For completeness, we n→∞ reproduce this argument in Section A. Privacy Analysis: For round i ≥ 1, the message is no longer involved in the protocol as Alice is simply trying to transmit the noise N0 , which is independent of the message M , to Bob. Hence we can upper bound the mutual information between the message and Eve’s systems as follows: Bob then does a homodyne x measurement, which produces the system Y0 , N0 (None of the parties have posession of N0 .): r ˆ ˆ 2nR 1 X d2 α −|α|2 /nth 2η |mi hm|M ⊗ e dy0 2nR m=1 πn π th C R e −2η(y0 −θ(m)− = I(M ; E0 W0 N0 ) + I(M ; E W |E0 W0 N0 ) = I(M ; E0 W0 N0 ). (3) The inequality follows from monotonicity of mutual information. The last equality follows from our observation that the subsequent transmissions are only about N0 and independent of the message. We explicitly compute the state at the end of round i = 0. We start with a uniformly distributed message: nR 1 2nR 2 X e −2η(n0 − ˆ ⊗ ⊗| R p Alice encodes the message into a coherent state: q 1−η 2 η Re(α)) 2nR 2 X |mi hm|M ⊗ |θ(m)i hθ(m)|A0 . m=1 A0 is then sent into the thermal bosonic wiretap channel: ˆ 2nR 1 X d2 α −|α|2 /nth e |mi hm| ⊗ M 2nR m=1 C πnth p p √ √ | ηθ(m) + 1 − ηαi h ηθ(m) + 1 − ηα|B0 p p √ √ ⊗ | 1 − ηθ(m) − ηαi h 1 − ηθ(m) − ηα|E0 . (4) where pW0 |Y0 is the probability distribution of the output of the noisy feedback channel given input Y0 and we made the substitution n0 ≡ y0 − θ(m). Using (4), we can bound I(M ; E0 W0 N0 ) = I(M ; E0 W0 |N0 ) + I(M ; N0 ) ≤ I(M Y0 ; E0 W0 ) ≤ I(M ; W0 |Y0 ) + I(Y0 ; W0 ) + S(E0 |W0 ) ≤ I(Y0 ; W0 ) + S(E0 ), (5) where we used the facts that M and N0 are independent, N0 = Y0 − X0 , M → Y0 → W0 form a Markov chain, and that S(E0 |M Y0 W0 ) ≥ 0 since the conditioned systems are classical. Now, the first term is simply the mutual information between the input and output of the noisy channel to Eve on the initial round. Hence, it is upper bounded by the capacity C(W, NS + σ 2 ) of feedback channel from Bob to Eve with cost constraint NS + σ 2 = E[(Y0 )2 ]: I(Y0 ; W0 ) ≤ C(W, NS + σ 2 ). (6) This capacity is finite by assumption. We can bound the second term in (5) by observing nR 1 |n0 i hn0 |N0 dw0 pW0 |Y0 (w0 |θ(m) + n0 )|w0 i hw0 |W0 p √ √ 1 − ηθ(m) − ηαi h 1 − ηθ(m) − ηα|E0 , |mi hm|M . m=1 |y0 i hy0 |Y0 Note that |y0 i hy0 |, |y0 − θ(m)i hy0 − θ(m)| are classical states and are not coherent states. Bob sends a noisy copy to Eve to obtain the state: r ˆ ˆ 2nR 2η 1 X d2 α −|α|2 /nth |mi hm|M ⊗ e dn0 nR 2 m=1 π R C πnth ≤ I(M ; E0n W0n N0 ) n 1−η 2 η Re(α)) ⊗ |y0 − θ(m)i hy0 − θ(m)|N0 p p √ √ ⊗ | 1 − ηθ(m) − ηαi h 1 − ηθ(m) − ηα|E0 . I(M ; E0n W0n ) n q 2nR ˆ X d2 α −|α|2 /nth e πnth m=1 C   2 p √ 2 1 − ηθ(m) − η Re(α) + ηIm(α) † tr[(ê ê)ρE0 ] = ≤ 1 2nR 2nR ˆ X m=1 C 1 2nR  d2 α −|α|2 /nth  (1 − η)NS + η|α|2 e πnth = (1 − η)NS + ηnth , where in the inequality the term linear in Re(α) vanishes after integrating over α. Hence, S(E0 ) ≤ g((1 − η)NS + ηnth ) where g(x) ≡ (x + 1) log(x + 1) − x log x [10], [11]. Since both terms of independent of n, we conclude 1 I(M ; E0n W0n ) n+1→∞ n + 1 1 ≤ lim I(M ; E0 W0 N0 ) n+1→∞ n + 1 1 ≤ lim (I(Y0 ; W0 ) + S(E0 )) n+1→∞ n + 1 C(W, NS + σ 2 ) + g((1 − η)NS + ηnth ) ≤ lim n+1→∞ n+1 = 0, lim thereby establishing privacy. III. D ISCUSSION We have proven that with respect to the communication model of asymmetric feedback where Eve obtains a slightly noisy copy of the feedback on the initial round of the protocol, it is possible to achieve a much higher rate of private communication over a lossy thermal-noise bosonic wiretap channel, even one that is loss unlimited (2). It is worthwhile to make some observations about this result, as well as discuss its implications, limitations, and possible extensions. A. Extensions Eq. (2) is achievable with a probability of decoding error that decays doubly exponentially with the number of channel uses. That is, the rate is achievable with an infinite error exponent. Indeed, this was the main thrust of the result in [8] for the setting of feedback-assisted classical communication. It was then extended by [12], where it was shown that we can actually achieve a probability of error that goes as an exponential tower with an order that increases linearly with the blocklength. This was shown to be optimal by a corresponding lower bound on the error probability. This lower bound would also apply in our case since it only concerns the part where Alice reliably sends a message to Bob. The only essential difference between the protocol in [12] and that of Schalkwijk and Kailath is that the former preserves the discrete structure of the message. In particular, in both, only the initial transmission contains information about the message. It is then straightforward to make the same extension to our setting. That is, we can achieve (2) with a block probability of error pe ≤ 1 f (n) e for sufficiently large n, where n a denotes the tetration operation,   5(1 − ϕ−1 (R)) −1 f (n) ≡ n[1 − ϕ (R)] − , PH − R and   ν NS ϕ(ν) ≡ log 1 + 2 . 2 σ ν Note that this expression has minor differences compared to the bound in [12] because we use bits instead of nats. Some simplifications were also made for presentation. Another possible extension follows from observing that the achieved rate (2) is not optimal. This is because it is known that squeezed state encoding can achieve higher rates over the thermal noise lossy bosonic channel with a homodyne receiver [13]. However, the induced classical channel with squeezed states encoding is AWGN, so our argument trivially applies to this case. With optimal squeezed-state encoding, we can achieve a rate [13]:   4NS + 2 − f (η, NS ) + f (η, NS )−1 1 , Psq = log 1 + 2 ((1 − η)/η) + f (η, NS )−1 (7) where    1/2 2(1−η) 1+η η 1+ η −1 2η + 2NS f (η, NS ) ≡ . 1−η When Bob uses a homodyne detection receiver, a squeezed state encoding is conjectured to be the optimal encoding for any Gaussian bosonic channel. If this conjecture is proven true, Eq. (7) would be optimal for asymmetric feedback-assisted private communication assuming that Bob makes a homodyne detection since the private capacity is trivially upper bounded by the classical capacity. B. Non-Gaussian Channels An apparent limitation of our result is that it strongly relies on the induced classical channel from Alice to Bob being an AWGN channel. This fact was heavily used in for instance the error analysis of the Schalkwijk-Kailath protocol. However, as noted in Remark 17.3 of [9], this exact protocol, that is, the protocol with the conditional expectations E[N0 |Y i−1 ] realized in the AWGN case, can be applied for channels with non-Gaussian additive noise. In fact, it would work for any affine channel whose output is given by a(X + N ), (8) where X is the input, N is some general additive noise independent of X, and a 6= 0 is some scaling. The error analysis follows by observing that the estimate Θn is linear in X0 , N0n as shown in [9]. Hence, in the affine channel case the variance of Θn /a has the exact same expression in terms of X0 , N0n as in the AWGN case, and so Var[Θn ] = a2 Var[N ]2−2nC(Var[N ],NS ) , where   1 NS C(Var[N ], NS ) ≡ log 1 + (9) 2 Var[N ] is the capacity of the AWGN channel with the corresponding noise statistics. Then, by Chebyshev’s inequality, n o p pe ≤ Prob |Θn − θ(m)| > NS 2−nR ≤ a2 2−2n(C(Var[N ],NS )−R) Var[N ] . NS This works for general affine channels, albeit at the cost of losing the doubly exponential decay. The privacy analysis can also be generalized since the argument did not make use of Gaussianity. Note that (9) is in general less than the actual capacity of the channel, but it is still loss unlimited. In particular, our result applies to a general lossy bosonic wiretap channel where the additive noise (state of the fˆ mode) can be any state, that is, it does not even need to be Gaussian. This is shown in fig. 2. It is simple to see that the induced classical 𝜌% 𝜌" 𝜌# 𝜌$ Fig. 2: A non-Gaussian channel corresponding to a bosonic wiretap channel where the additive noise ρN is not Gaussian. channel in this case is an affine channel. This subsumes a large class of physical optical channels. However, it would be interesting to extend our result to a general quantum wiretap channel. Unfortunately, there are channels for which it is not possible to induce a classical affine channel via a particular encoding and decoding. A trivial example is the constant channel which outputs a state regardless of the input. Admittedly, such a channel is useless for communication, so it is not surprising that our protocol fails there. For the specific case of coherent encoding and homodyne detection, we can find explicit nontrivial channels for which we do not induce an affine channel. For instance, consider the channel, a unitary self-Kerr interaction, which maps a coherent state to a cat state: |αi 7→ √12 (|αi + |−αi). It is not difficult to see that a homodyne measurement of a cat state will always have an expected value of zero. If the channel is affine: X 7→ a(X + N ), then given E[a(X + N )] = 0, either a = 0 or E[N ] = −E[X]. If a = 0, then the measurement result is always zero, which is clearly wrong. The latter possibility is also impossible since additive noise must be independent of the message. The conclusion follows. Thus, it is not clear whether our protocol can be extended to general quantum channels. C. Communication Model We assumed that Eve can eavesdrop on both the (noisy, quantum) forward and (classical) backward channels, but that her copy of the initial round of classical feedback has some noise. From a physical standpoint, this is a natural assumption since there is always some noise in the physical layer. It might appear unnatural that the feedback error happens on the initial round, but this could be realized by Alice and Bob somehow knowing the time window in which the feedback noise might occur and starting the protocol during that window. Our constraint on feedback noise is reasonable as well, that any physical Eve-to-Bob channel should not have infinite capacity. One might say that in order to make the model more physically relevant, there should be noise in the feedback channel to Alice as well. Indeed, it is this very noiselessness that is key to the result that we obtain. The channel to Alice is a noiseless CV classical channel, which has an infinite capacity, while we constrained the channel to Eve to have finite capacity. It is this infinite difference that allows us to get a loss unlimited rate 4 . Hence, it is unlikely that we can achieve loss unlimited rates if we allow noise in the channel to Alice as well. Indeed, it is known that linear schemes such as Schalkwijk-Kailath cannot achieve any positive rates in this regime [14]. However, this does not undermine our thesis that (2) indicates issues with the usual assumption of noiselessness of the public side channel. The fact that a classical noiseless CV channel has infinite capacity introduces significant unphysical features to the model and makes achievable rates strongly dependent on the model. For by just adding an infinitesimal amount of noise to the eavesdropper’s copy of the initial round, one single step towards physical relevance, we obtain a loss unlimited rate instead of a loss limited one. Now, it is somewhat queer that we can achieve a markedly different rate even if we allow Eve to have noiseless access to the feedback after the initial round. For an intuition for why this works, we observe that the Schalkwijk-Kailath protocol can be summarized as follows: Bob on the initial round receives the message with additive noise N0 and subsequently learns the value of N0 to exquisite precision. Since Eve has additional noise to what Bob received on the initial round, even if Eve can also learn N0 to exquisite precision, the accuracy with which she can recover the message is still limited by the additional noise. Indeed, we can even further alter our communication model so as to give Eve N0 exactly as done by (3), thereby allowing her to completely simulate the protocol for rounds i > 0, and our result would still hold. We can also give her a copy X00 of the quantum system 5 X0 that Alice sends on round i = 0. This would simply replace E0 in the privacy analysis by X00 E0 , whose entropy we can again bound via subadditivity and then by bounds on photon number. Thus, we can alter our communication model so that Eve is strengthened, and our result still holds. This reflects again that our protocol essentially depends on that initial round of feedback where there is an infinite difference in capacities. At first glance the fact that we only need noise on the initial round appears to have implausibly strong implications. One might think our result holds in the usual feedback-assisted private communication model but where Alice and Bob have 4 Note that this is an infinite difference in capacity between the channels from Bob to Alice and Eve, and we are trying to achieve forward private communication from Alice to Bob. Thus it is not clear a priori that this should be possible. 5 Note that this is not the classical random variable that is encoded into the quantum system, but the encoded quantum system itself. a pre-shared secret key which they can use to simulate the noise. For instance, by performing bitwise addition with the pre-shared key, they can simulate an additive noise channel with noise S0 on the initial round of feedback. However, since any reasonable pre-shared key has finite Shannon entropy, S0 is discrete. Then, the capacity of the feedback channel would be infinite, which precludes us from bounding the information leaked to Eve. Hence it does not seem sufficient to have preshared secret key to obtain our result. Lastly, it is worth looking at the closely related communication models of two way private communication, secret key agreement, and quantum key distribution. If we make the same alteration, that is, introduce noise in the classical feedback in the initial round, Bob can simply send an arbitrarily long locally generated random bit string to Alice during that round. Alice will then receive this key noiselessly, while Eve will only receive a noisy copy whose mutual information with the key is finite since the capacity of the noisy feedback channel is finite. Hence, in these models the infinite difference in capacities trivially leads to an infinite rate. This again shows the dependence of the rates to the model considered and suggests that in general we should more seriously address blatant unphysical features in the communication model. Acknowledgements. DD is supported by the Stanford Graduate Fellowship and the National Defense Science and Engineering Graduate Fellowship. SG was supported by the Communications and Networking with Quantum OperationallySecure Technology for Maritime Deployment (CONQUEST) program funded by the Office of Naval Research (ONR) under a Raytheon BBN Technologies prime contract # N00014-16C-2069. We would like to thank Patrick Hayden and Tsachy Weissman for valuable discussions and feedback. DD would like to thank God for all of His provisions. R EFERENCES [1] M. Takeoka, S. Guha, and M. M. Wilde, “Fundamental rate-loss tradeoff for optical quantum key distribution,” Nature communications, vol. 5, p. 5235, 2014. [2] S. Pirandola, R. Laurenza, C. Ottaviani, and L. Banchi, “Fundamental limits of repeaterless quantum communications,” Nature Communications, vol. 8, 2017. [3] U. M. Maurer, “Secret key agreement by public discussion from common information,” IEEE Transactions on Information Theory, vol. 39, no. 3, pp. 733–742, 1993. [4] D. Gunduz, D. R. Brown, and H. V. Poor, “Secret communication with feedback,” in Information Theory and Its Applications, 2008. ISITA 2008. International Symposium on. IEEE, 2008, pp. 1–6. [5] A. D. Wyner, “The wire-tap channel,” Bell Labs Technical Journal, vol. 54, no. 8, pp. 1355–1387, 1975. [6] I. Csiszár and J. Korner, “Broadcast channels with confidential messages,” IEEE Transactions on Information Theory, vol. 24, no. 3, pp. 339–348, 1978. [7] M. M. Wilde, Quantum information theory. Cambridge University Press, 2013. [8] J. Schalkwijk and T. Kailath, “A coding scheme for additive noise channels with feedback–i: No bandwidth constraint,” IEEE Transactions on Information Theory, vol. 12, no. 2, pp. 172–182, 1966. [9] A. El Gamal and Y.-H. Kim, Network information theory. Cambridge University Press, 2011. [10] C. M. Caves and P. D. Drummond, “Quantum limits on bosonic communication rates,” Reviews of Modern Physics, vol. 66, no. 2, p. 481, 1994. [11] J. D. Bekenstein, “Universal upper bound on the entropy-to-energy ratio for bounded systems,” Physical Review D, vol. 23, no. 2, p. 287, 1981. [12] R. G. Gallager and B. Nakiboglu, “Variations on a theme by schalkwijk and kailath,” IEEE Transactions on Information Theory, vol. 56, no. 1, pp. 6–17, 2010. [13] S. Guha, “Classical capacity of the free-space quantum-optical channel,” Master’s thesis, Massachusetts Institute of Technology, 2004. [14] Y.-H. Kim, A. Lapidoth, and T. Weissman, “The gaussian channel with noisy feedback,” in Information Theory, 2007. ISIT 2007. IEEE International Symposium on. IEEE, 2007, pp. 1416–1420. [15] R. Durrett, Probability: theory and examples. Cambridge University Press, 2010. A PPENDIX the capacity of the AWGN channel with power NS and noise σ 2 given in (2). The second way to calculate this gives We reproduce for completeness the explicit error analysis of the Schalkwijk-Kailath protocol [8] as given in [9] but with our notation. Consider the vector N ≡ (N0 , . . . , Nn ). This is clearly jointly Gaussian since Ni are independent and Gaussian. We claim that (N0 , Y1 , . . . , Yn ) is also jointly Gaussian where Y n are mutually independent and Yi ∼ N (0, NS +σ 2 ). I(N0 ; Y n ) = h(N0 ) − h(N0 |Y n ) 1 1 = log(2πe Var[N0 ]) − log(2πe Var[N0 |Y n ]) 2 2 1 Var[N0 |Y n ] , = − log 2 σ2 where the second equality follows from the fact that N0 |Y n = y n is Gaussian with variance independent of y n by the joint Gaussianity of (N0 , Y1 , . . . , Y n ). Note that Var[N0 |Y n ] is a random variable, but since it does not depend on y n , we can identify it with the value it takes on almost surely. We conclude from the two ways to write the mutual information that Var[N0 |Y n ] = σ 2 2−2nPH . Now, Θn = Y0 − E(N0 |Y n ) is Gaussian since it’s linear in Y0n . Furthermore, Proof. We proceed by induction. For the base case, we first note that Y1 = γ1 N0 + N1 , so we obtain (N0 , Y1 , N2 , . . . Nn ) by a linear transformation, so it’s jointly Gaussian with E[Y1 ] = 0. Furthermore, E[Y12 ] = γ12 + σ 2 = NS + σ 2 since N0 , N1 are independent. Now we consider the inductive case. Assume (N0 , Y1 , . . . , Yk , Nk+1 , . . . , Nn ) is jointly Gaussian and Y k are mutually independent and Yi ∼ N (0, NS + σ 2 ). Then, (N0 , Y1 , . . . , Yk ) is jointly Gaussian, so E[N0 |Y k ], which is also the minimum mean squared error (MMSE) estimate, is affine in Y k . Since Y k and N0 both have mean zero, it is actually linear. Thus, Xk+1 = γk+1 (N0 − E[N0 |Y k ]) is linear in N0 , Y k . Hence, (Y1 , . . . , Yk+1 = Xk+1 + Nk+1 ) is jointly Gaussian. By the orthogonality principle for linear MMSE estimates, Xk+1 is independent of Yi for i ∈ [1 : k]. Furthermore, Nk+1 is also independent of Yi . Since Y k are mutually independent, we conclude that (Y1 , . . . , Yk+1 ) is jointly Gaussian and uncorrelated. Thus, they are mutually independent. It is also clear that E[Yk+1 ] = 0. 2 2 Furthermore, E[Yk+1 ] = NS + σ 2 since E[Xk+1 ] = NS by construction and Xk+1 , Nk+1 are independent. Finally, (N0 , Y1 , . . . , Yk+1 , Nk+2 , . . . , Nn ) is jointly Gaussian, so we’re done. We next expand I(N0 ; Y n ) in two different ways. First, I(N0 ; Y n ) = n X I(N0 ; Yi |Y i−1 ) i=1 = n X h(Yi |Y i−1 ) − h(Yi |N0 , Y i−1 ) i=1 = n X h(Yi ) − h(Ni |N0 , Y i−1 ) i=1 = n X h(Yi ) − h(Ni ) i=1   n NS = log 1 + 2 2 σ = nPH where the third equality holds because Y n are mutually independent and Yi is a function of Y i−1 , N0 , and Ni . PH is Var Θn = E[(N0 − E[N0 |Y n ])2 ] = E[E[(N0 − E[N0 |Y n ])2 |Y n ]] = Var[N0 |Y n ], where the second equality follows by the law of iterated expectation. Thus, Θn ∼ N (θ(m), σ 2 2−2nPH ). make a decoding error only pif |Θn − θ(m)| > √ We −nR NS 2 . Hence, pe ≤ 2Q(2n(PH −R) NS /σ 2 ), where ˆ ∞ 2 1 √ e−t /2 dt. Q(x) ≡ 2π x 2 Now, we know that for x ≥ 1, Q(x) ≤ √12π e−x /2 [15], so if R < PH and n is large enough, r  2n(PH −R)  2 2 NS pe ≤ exp − π 2σ 2 Note that we used the channel n + 1 times, so the rate we n achieve is actually n+1 R.
7cs.IT
> REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) < 1 Constrained Extreme Learning Machines: A Study on Classification Cases Wentao Zhu, Jun Miao, and Laiyun Qing Abstract—Extreme learning machine (ELM) is an extremely fast learning method and has a powerful performance for pattern recognition tasks proven by enormous researches and engineers. However, its good generalization ability is built on large numbers of hidden neurons, which is not beneficial to real time response in the test process. In this paper, we proposed new ways, named “constrained extreme learning machines” (CELMs), to randomly select hidden neurons based on sample distribution. Compared to completely random selection of hidden nodes in ELM, the CELMs randomly select hidden nodes from the constrained vector space containing some basic combinations of original sample vectors. The experimental results show that the CELMs have better generalization ability than traditional ELM, SVM and some other related methods. Additionally, the CELMs have a similar fast learning speed as ELM. Index Terms—Feedforward neural networks, extreme learning machine, sample based learning, discriminative feature mapping. I. INTRODUCTION M ANY neural network architectures have been developed over the past several decades. The feedforward neural networks are especially the most popular ones studied all the times. It has been proven that the learning capacity of a multilayer feedforward neural network with non-polynomial activation functions can approximate any continuous function [1]. Single hidden layer feedforward neural networks (SLFNs) was studied and applied extensively by researches because of their model simplicity and relatively high learning and responding speed. The learning capacity of SLFNs is not inferior to that of multilayer feedforward neural networks, as proved in [2, 3]. There are mainly three different ways to train the SLFNs: 1. Gradient based learning methods. The most famous gradient based learning method is back-propagation algorithm [4]. However, these methods may face quite slow learning speed and stack into local minimal. Although many assistant methods were proposed to solve such problems, such as Levenberg-Marquardt This work was supported in part by Natural Science Foundation of China (Nos. 61175115 and 61272320) and President Fund of Graduate University of Chinese Academy of Sciences (No. Y35101CY00). W. Zhu and J. Miao are with the Key Lab of Intelligent Information Processing of Chinese Academy of Sciences (CAS), Institute of Computing Technology, CAS, Beijing 100190, China (e-mail: [email protected]). L. Qing is with School of Computer and Control Engineering, University of Chinese Academy of Sciences, Beijing 100049, China. (LM) method [5], dynamically network construction [6], evolutionary algorithms [7] and generic optimization [8], the enhanced methods require heavy computation or cannot obtain a global optimal solution. 2. Optimization based learning methods. One of the most popular optimization based SLFNs is Support Vector Machine (SVM) [9]. The objective function of SVM is to optimize the weights for maximum margin corresponding to structural risk minimization. The solution of SVM can be obtained by convex optimization methods in the dual problem space and is the global optimal solution. SVM is a very popular method attracting many researchers [10]. 3. Least Mean Square (LMS) based methods, such as Radial Basis Function network [11] and No-Prop network [12] based on LMS algorithm [13]. These methods have quite fast learning speed due to the essence of “No-Prop” and fast learning speed of LMS. In recent years, Huang et al. [14] proposed a novel extremely fast learning model of SLFNs, called Extreme Learning Machine (ELM). One of its salient essences that the weights from the input layer to the hidden layer can be randomly generated was firstly shown by Tamura et al. [2]. Huang et al. [14] further completely proved the random feature mapping theory rigorously. After the random nonlinear feature mapping in the hidden layer, the rest of ELM can be considered as a linear system [15]. Therefore, ELM has a closed form of solution due to the simple network structure and random hidden layer weights. The essence of the linear system used by ELM is to minimize the training error and the norm of connection weights from the hidden layer to the output layer at the same time [16]. Hence ELM has a good generalization performance according to the feedforward neural network theory [12, 17]. As a consequence, ELM has some desirable features, such as that hidden layer parameters need not be tuned, fast learning speed and good generalization performance. Additionally, ELM has a unified framework for classification, regression, semi-supervised, supervised and unsupervised tasks [16, 18]. These advantages lead to the popularity of ELM both for researchers and engineers [19, 20, 21, 22, 54]. However, the random selection of hidden layer parameters makes quite inefficient use of hidden nodes [23]. ELM usually has to randomly generate a great number of hidden nodes to achieve desirable performance. This leads to time consuming in test process, which is not helpful in real applications. Large numbers of hidden nodes also easily make the trained model > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) < stack into over fitting. There are mainly three ways to solve the problem for a more compact model: 1. Use online incremental learning methods to add hidden layer nodes dynamically [23, 24]. These methods randomly generate parts or all of the hidden layer nodes, and then select the candidate hidden nodes one by one or chunk by chunk with fixed or varying chunk size. Whether the hidden layer node is added or not is usually depending on the objective function of the output layer. 2. Use pruning methods to select the candidate hidden layer nodes [25, 26]. These methods start with a large neural network using the traditional ELM, and then apply some metrics, such as statistical criteria and multi-response sparse regression, to rank these hidden nodes. Finally, eliminate those low relevance hidden nodes to form a more compact neural network structure. 3. Use gradient based methods to update the weights from the input layer to the hidden layer in ELM [27]. After randomly initialize the weights from the input layer to the hidden layer and use a close-form least square solution to calculate the weights from the hidden layer to the output layer, these methods use the gradient descending method to update the weights from the input layer to the hidden layer in ELM iteratively. The above methods can overcome the drawbacks of the traditional ELM to some degree. However, they do not solve the problem directly from the essence of hidden nodes. Besides, these methods are somewhat time-consuming. The essence of hidden layer functions is to map the data into a feature space, where the output layer can use a linear classifier to separate the data perfectly. Therefore, the hidden layer should extract discriminative features or some other data representations for classification tasks. LDA [28] is probably the most commonly used method to extract discriminative features. However, traditional LDA has some drawbacks, such as that the number of feature-mapped dimensions is less than the number of classes, “Small Sample Size” (SSS) problem and Gaussian distribution assumption of equal covariance and different means. Su et al. [29] proposed a projection pursuit based LDA method to overcome these problems. The method showed that the difference vectors of between-class samples have a strong discriminative property for classification tasks, but this method is rather complex with many embedded trivial tricks. In this work, to balance the high discriminative feature learning and the fast training speed of the ELM, we propose a novel model, called Constrained difference Extreme Learning Machine (CDELM), which utilizes a random subset of difference vectors of between-class samples to replace the completely random connection weights from the input layer to the hidden layer in ELM. More generally, the linear combination of sample vectors, such as sum vectors of within-class samples, sample vectors of all classes, sum vectors of randomly selected sample vectors and the mixed vectors including difference vectors of between-class samples and sum vectors of within-class samples, as connection weights from the input layer to the hidden layer are validated. We proposed Constrained Sum Extreme Learning Machine (CSELM), 2 Sample Extreme Learning Machine (SELM), Random Sum Extreme Learning Machine (RSELM) and Constrained Mixed Extreme Learning Machine (CMELM) based on these data-driven hidden layer features mapping ways. Experimental results show that, CELMs has better generalization ability than ELM related methods, SVM related methods and the BP neural network, whilst retaining the fast learning characteristics of ELM. We also compared the CELM algorithms with SVM and ELM related algorithms [30, 31] on CIFAR-10 data set [32]. The results show that the CELM algorithms outperform these methods. The remaining part of the paper is organized as follows: in section Ⅱ, we review the traditional ELM algorithm, and then propose the CELMs in section Ⅲ. Experiments are presented in section Ⅳ. Conclusion and discussion are given in section Ⅴ. II. REVIEW OF EXTREME LEARNING MACHINE ELM is a type of SLFNs. The hidden layer parameters, i.e., the connection weights from the input layer to the hidden nodes, are randomly generated in ELM. The output layer is a linear system, where the connection weights from the hidden layer to the output layer are learned by computing the Moore-Penrose generalized inverse [14]. The ELM network has an extreme high learning speed due to the simple network structure and its closed form solution. Additionally, the randomness makes ELM not necessarily tune these hidden layer parameters iteratively. Fig. 1. Illustration of the structure of ELM neural network. Given the training samples and class labels > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) < 1, …, N } , the number of hidden ℵ={(xi ,t i )|xi ∈ R n ,t i ∈ R m , i = nodes L and activation function G (a, b, x) , where x ∈ R n is the input vector, a ∈ R n is the associated connection weight vector and b ∈ R is the bias, the algorithm of ELM network can be summarized as the following three steps: Step 1: Assign the parameters {(a j , b j ) | j = 1, , L} of hidden nodes with randomly generated values. Step 2: Calculate the hidden layer output matrix H for all the training samples:  h(x1 )   G (a1 , b1 , x1 )  G (a L , bL , x1 )   H =       =  h(x N )  G (a1 , b1 , x N )  G (a L , bL , x N )  N × L , where G (ai , bi , x j ) is the activation function of ith hidden node for jth sample. Step 3: Calculate the hidden layer’s output connection weights β by solving the least squares problem: 3 generate a great number of hidden nodes to meet desirable generalization performances. More hidden nodes mean more processing time and more easily over fitting. These problems in ELM should be solved. Although the method [29] is rather complex with many embedded trivial tricks, it shows that the difference vectors of between-class samples are effective to classification tasks. Considering the simplicity and the extreme high learning speed of the ELM, we extend the ELM model to Constrained Difference Extreme Learning Machine (CDELM) by constraining the weight vector parameters {a j | j = 1, , L} of ELM to be randomly drawn from a closed set of difference vectors of between-class samples instead of from the open set of arbitrary vectors to tackle the problem of generation of discriminative hidden nodes. We use a simple case to illustrate the idea of difference vectors of between-class samples. Class1 β =H † T , where H † is the generalized inverse matrix of the matrix H ,  t1T    . and T=    T t N    N ×m However, the condition number of the random projected matrix H may be very large and the above traditional ELM model may encounter ill-posed problems [33]. In practice, regularized term with hidden layer’s output connection weights β is added into the optimization objective to avoid the problem [34, 35, 36]. The solution of regularized ELM can be obtained as I β =HT ( +HHT ) −1T Class 2 (a) λ or β =( I λ +HT H ) −1HT T , where I is the identity matrix and λ is the regularization factor which can be obtained by cross validation in the training process. (b) As analyzed in theory and further verified by the simulation results in [34], ELM for classification tends to achieve better generalization performance than traditional SVM. ELM can also overcome the local minimal problem that BP neural nets faced, due to its convex model structure. The learning speed of ELM is extremely fast at the same time. III. CONSTRAINED EXTREME LEARNING MACHINES In this section, we will introduce the CELMs with the idea of using simple linear combination of sample vectors to generate hidden nodes in the traditional ELM network structure. A. Constrained Difference Extreme Learning Machine The Constrained Difference Extreme Learning Machine (SCELM) attempts to extract discriminative features in the hidden layer. The completely random parameters in the hidden layer of ELM do not always represent discriminative features. Such unconstrained random parameters may make ELM has to (c) Fig. 2. Illustration of difference vectors of between-class samples. How to generate the difference vectors is illustrated in (a). The completely random connection weight vectors from the input layer to the hidden layer of ELM are illustrated in (b). The constrained random weight vectors of CELM are illustrated in (c). The essence of the weight vectors from the input layer to the neurons in the hidden layer is to map the original samples into a discriminative feature space spanned by these vectors, where the samples can be classified. The weight vectors are helpful for classification if the directions of the weight vectors are from > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) < class 1 to class 2 or reversely, as illustrated in Fig. 1(a). The blocks in the figure represent the samples in class 1, and the circles represent the samples in class 2. As a comparison, the weight vectors from the input layer to the hidden nodes in ELM are completely random without constraints, as illustrated in Fig. 1(b). It can be inferred the weight vectors which do not follow the direction from class 1 to class 2 are less discriminative for classification tasks. This is the reason why not all the hidden nodes in ELM are efficient or discriminative for classification tasks. We randomly generate the weight vectors from the input layer to the hidden layer with the differences of between-class samples as illustrated in Fig. 1(a). The difference vectors of between-class samples can map the samples to a higher Algorithm 1: Training of the Constrained Difference Extreme Learning Machine (CDELM) Input: the training n m 1, …, N } , the samples ℵ={(xi ,t i )|xi ∈ R ,t i ∈ R , i = hidden node number L and the activation function G (w, b, x) . Output: the model parameters of CELM, i.e., the W n× L and the bias vector b1× L from the weight matrix input layer to the hidden layer, the weight matrix β L×m from the hidden layer to the output layer. 1) While the number of chosen difference vectors is less than L a) Randomly draw training samples xc1 and xc 2 from any two different classes respectively and generate the difference vector xc 2 − xc1 ; b) Normalize the w= b= difference vector by 2(x c 2 − x c1 ) x c 2 − x c1 , and calculate the corresponding bias (x c1 + x c 2 )T (x c1 − x c 2 ) x c 2 − x c1 2 L2 . W weight matrix n× L and bias vector b1× L . 2) Calculate the hidden layer output matrix H as  G (a1 , b1 , x1 )  G (a L , bL , x1 )         G (a1 , b1 , x N )  G (a L , bL , x N )  N × L . 3) Calculate the hidden layer’s output weight matrix β L×m by solving the least squares problem: β =H † T † 1. α xTc2 (xc 2 − xc1 ) + b = We can obtain that the normalization factor α = c) Use the vector w and bias b to construct the  h(x1 )  = H =   h(x N )  discriminative feature space than ELM. The weight vectors from the input layer to the hidden layer in CDELM are illustrated in Fig. 1(c). The directions of these weight vectors are close to the direction from class 1 to class 2, which are more discriminative for the classification tasks intuitively. We normalize the difference vectors as the weights from the input layer to the hidden layer. The reason why normalize these weights and how to normalize will be introduced in the following discussion. In our originally Constrained Difference Extreme Learning Machine [37], we deleted the difference vectors of small norms and too relevant difference vectors. These pre-processing operations are somewhat time-consuming especially when the number of hidden nodes is large. Although the two processes can improve the performance [38], the improvement is very little in our experiments. In CDELM, the prior information of samples’ class distribution is utilized to generate the weights from the input layer to the hidden layer. The aim is to split different classes’ samples into different areas in the feature space. The ideal case is that, for example, class 1 is mapped into negative semi axis and class 2 is mapped into positive semi axis in the feature space. Hence the bias must be set as the middle point of the two selected samples from the geometric sense intuitively. As a result, the biases to the hidden neurons can be determined by assuming that the samples from one class are mapped to -1 and the samples from another class are mapped 1 respectively. Denote x c1 and x c 2 as the samples drawn from two classes. Then the weight vector w from the input layer to one hidden neuron can be generated with α (x c 2 − x c1 ) , where α is the normalized factor. The original data x is transformed to xT w = + b α xT (x c 2 − x c1 ) + b by feature mapping, where b is the bias with respect to the weight vector w in ELM model. The assumption that x c1 and x c 2 are mapped to -1 and 1 can be written as α xTc1 (x c 2 − xc1 ) + b =−1 , and 2 L2 4 , where H is the generalized inverse matrix  t1T    T=    t TN    N ×m . and and the corresponding bias b = 2 x c 2 − x c1 (x c1 + x c 2 )T (x c1 − x c 2 ) x c 2 − x c1 2 2 L2 by L2 solving the above two equation constraints. The commonly used activation function for hidden neurons 1 . The output layer in is sigmoid function f ( x) = 1 + e− x CDELM is a simple linear system as same as that of ELM. From the above discussion, the training algorithm for CDELM can be concluded in the Algorithm 1. The essence of CDELM is to constrain the hidden neuron’s input connection weights to be consistent with the directions from one class to another class. So the random weights are constrained to be chosen from the set that is composed of the difference vectors of between-class samples. > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) < 5 B. Sample Extreme Learning Machine uniform distribution. The Sample Extreme Learning Machine (SELM) utilizes c) Use the vector w and bias b to construct the weight sample vectors that are randomly drawn from the training set to Wn× L and bias vector b1× L . construct the weights from the input layer to the hidden layer. matrix 2) Calculate the hidden layer output matrix H as The SELM firstly randomly selects a group of sample vectors,  h(x1 )   G (a1 , b1 , x1 )  G (a L , bL , x1 )  xi , where xi is the then normalizes these vectors as =  2 H       = xi L   2 h(x N )  G (a1 , b1 , x N )  G (a L , bL , x N )  N × L . chosen sample vector. After the normalization, the sample itself can be transformed of norm 1 to serve the linear classification in the output layer. The normalized sample vectors are assigned as the weights from the input layer to the hidden layer. The biases used in SELM are randomly generated from uniform distribution as same as that in ELM. The SELM model is a little like kernel based methods. If the activation function is sigmoid function, we can formula the ith hidden node in SELM as 1 (ai , bi , x) G= (xi , bi , x) G= 1 + exp[−(xi x + bi )] , where x is one input vector, xi is the ith hidden node weight, which is selected randomly from sample vectors. Actually, K (xi , = x) xi x + bi is a polynomial kernel function, which can tackle some linearly inseparable cases, such as data sets of quadratic curve. The difference between the kernel used here and SVM kernel is that, the samples in the SVM kernel function is the support vectors. The difference between kernel ELM [16] and our SELM is that ELM kernel uses all the training samples. The sigmoidal activation function used is to stretch the kernel mapped data and helps the linear classification in the output layer. From the above discussion, we can write the SELM algorithm as Algorithm 2. The essence of SELM is to constrain the hidden neuron’s input connection weights to be consistent with the directions of sample vectors. So the original random weights are constrained to be chosen from the training set. Algorithm 2: Training of the Sample Extreme Learning Machine (SELM) Input: the training n m 1, …, N } , the samples ℵ={(xi ,t i )|xi ∈ R ,t i ∈ R , i = hidden node number function G (w, b, x) . L and the activation Output: the model parameters of SELM, i.e., the weight Wn× L and the bias vector b1× L from the input layer matrix to the hidden layer, the weight matrix β L×m from the hidden layer to the output layer. 1) While the number of chosen sample vectors is less than L a) Randomly draw samples xi from the training data; b) Normalize the sample vector by w = xi xi 2 , and L2 draw the corresponding bias b randomly from [0,1] 3) Calculate the hidden layer’s output weight matrix β L×m by solving the least squares problem: β =H † T † where H is the  t1T    T=    t TN    N ×m . and , generalized inverse matrix C. Constrained Sum Extreme Learning Machine The Constrained Sum Extreme Learning Machine (CSELM) utilizes sum vectors of random chosen within-class sample vectors to construct the weights from the input layer to hidden layer. The CSELM firstly randomly selects any two within-class sample vectors x c′ and x c′′ , calculate the sum of the two vectors x c′ + x c′′ , then normalizes the sum vector as x c′ + x c′′ x c′ + x c′′ 2 . The normalized sum sample vectors are L2 assigned as the weights from the input layer to the hidden layer. The biases used in CSELM are also randomly generated from the uniform distribution as same as that in ELM. The constrained sum vectors used here were firstly inspired by the difference vectors of between-class samples. The constrained sum vectors also can be considered as some derivative samples, which can somewhat weaken the affection of noise samples in CSELM. From the above discussion, we can design the SELM algorithm as Algorithm 3. The essence of CSELM is to constrain the hidden neuron’s input connection weights to be consistent with the directions of derivative robust sample vectors. So the random weights are constrained to be chosen from the set that is composed of the sum vectors of within-class sample vectors. Algorithm 3: Training of the Constrained Sum Extreme Learning Machine (CSELM) Input: the training 1, …, N } , the samples ℵ={(xi ,t i )|xi ∈ R ,t i ∈ R , i = hidden node number L and the activation n m function G (w, b, x) . Output: the model parameters of CSELM, i.e., the > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) < W weight matrix n× L and the bias vector b1× L from the input layer to the hidden layer, the weight matrix β L×m from the hidden layer to the output layer. 1) While the number of chosen constrained sum vectors is less than L a) Randomly draw training samples x c′ and xc′′ from the same class respectively and generate the sum vector x c′ + x c′′ ; b) Normalize the sum vector by w = x c′ + x c′′ x c′ + x c′′ 2 , and L2 draw the corresponding bias b randomly from [0,1] uniform distribution. c) Use the vector w and bias b to construct the W weight matrix n× L and bias vector b1× L . 2) Calculate the hidden layer output matrix H as  h(x1 )  H =   = h(x N )  6 Algorithm 4: Training of the Random Sample Extreme Learning Machine (RSELM) Input: the training n m 1, …, N } , the samples ℵ={(xi ,t i )|xi ∈ R ,t i ∈ R , i = hidden node number L and the activation G ( w , b , x ) function . Output: the model parameters of CELM, i.e., the weight Wn× L and the bias vector b1× L from the input layer matrix to the hidden layer, the weight matrix β L×m from the hidden layer to the output layer. 1) While the number of chosen random sum vectors is less than L a) Randomly draw training samples x′ and x′′ from data samples; x′ + x′′ b) Normalize the difference vector by w = , and 2 x′ + x′′ L2  G (a1 , b1 , x1 )  G (a L , bL , x1 )         G (a1 , b1 , x N )  G (a L , bL , x N )  N × L . draw the corresponding bias b randomly from [0,1] uniform distribution. c) Use the vector w and bias b to construct the weight W matrix n× L and bias vector b1× L . 2) Calculate the hidden layer output matrix H as  h(x1 )   G (a1 , b1 , x1 )  G (a L , bL , x1 )   = H =        matrix h(x N )  G (a1 , b1 , x N )  G (a L , bL , x N )  N × L 3) Calculate the hidden layer’s output weight matrix β L×m by solving the least squares problem: β =H † T † , where H is the  t1T    T=    t TN    N ×m . and generalized inverse 3) Calculate the hidden layer’s output weight matrix β L×m by solving the least squares problem: β =H † T D. Random Sum Extreme Learning Machine The Random Sum Extreme Learning Machine (RSELM) utilizes sum vectors of random sample vectors regardless of classes to construct the weights from the input layer to the hidden layer. The RSELM firstly randomly selects any two sample vectors x′ and x′′ , calculate the sum of the two vectors x′ + x′′ 2 x′ + x′′ . The L2 normalized sum vectors are assigned as the weights from input layer to the hidden layer. The biases used in RSELM are also randomly generated from the uniform distribution as same as that in ELM. The sum vectors of random samples used here is to accelerate the speed of hidden layer weights generation. From the above discussion, we can design the RSELM algorithm as Algorithm 4. The essence of RSELM is to constrain the hidden neuron’s input connection weights to be consistent with the sum vectors of random samples. † where H is  t1T    T=    t TN    N ×m . and , x′ + x′′ , then normalizes the sum vector as . the generalized inverse matrix E. Constrained Mixed Extreme Learning Machine The Constrained Mixed Extreme Learning Machine (CMELM) utilizes mixed vectors, containing class-constrained difference vectors and class-constrained sum vectors, to construct the weights from the input layer to the hidden layer. The CMELM firstly generates half numbers of hidden nodes whose weights and biases are constructed with constrained sum vectors, then generates the others whose weights and biases are constructed with constrained difference vectors. The constrained sum vectors are normalized as same as that of CSELM, and the constrained difference vectors are normalized as same as that of CDELM. The normalized sum sample vectors are assigned as the weights from the input layer to the hidden layer. The constrained mixed vectors can be considered > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) < 7 as model average (the average model of CDELM and CSELM)  h(x1 )   G (a1 , b1 , x1 )  G (a L , bL , x1 )   because of the linear property of the output layer. H =       =  From the above discussion, we can design the CMELM h(x N )  G (a1 , b1 , x N )  G (a L , bL , x N )  N × L algorithm as Algorithm 5. . Algorithm 5: Training of the Constrained Mixed Extreme 3) Calculate the hidden layer’s output weight matrix β L×m Learning Machine (CMELM) by solving the least squares problem: Input: the training β =H † T n m ={( , )| , , 1, , } ℵ x t x ∈ R t ∈ R i = … N i i i i † samples , the , where H is the generalized inverse matrix hidden node number L and the activation  t1T  G ( w , b , x )   function . T=    Output: the model parameters of CELM, i.e., the weight t TN    N ×m . W b and n× L and the bias vector 1× L from the input layer matrix to the hidden layer, the weight matrix β L×m from the hidden layer to the output layer. 1) While the number of constrained sum vectors is less than  L / 2  a) Randomly draw training samples x c′ and xc′′ from the same class and generate the sum vector xc′ + xc′′ ; b) Normalize the sum vector by w = x c′ + x c′′ x c′ + x c′′ 2 , and L2 draw the corresponding bias b randomly from [0,1] uniform distribution. c) Use the vector w and bias b to construct the weight matrix Wn×(  L / 2 ) and bias vector b1×(  L / 2 ) . 2) While the number of chose difference vectors is less than L −  L / 2  a) Randomly draw training samples xc1 and xc 2 from any two different classes respectively and generate the difference vector xc 2 − xc1 ; b) Normalize the w= b= difference vector by 2(x c 2 − x c1 ) x c 2 − x c1 2 L2 , and calculate the corresponding bias (x c1 + x c 2 ) (x c1 − x c 2 ) T x c 2 − x c1 2 L2 . c) Use the vector w and bias b to construct the weight matrix Wn×( L −  L / 2 ) and bias vector b1×( L − L / 2 ) . 2) Concatenate the above Wn×(  L / 2 ) and Wn×( L −  L / 2 ) to form the hidden layer nodes weights, and concatenate the b1×(  L / 2 ) and b1×( L − L / 2 ) to form the hidden layer nodes biases. Calculate the hidden layer output matrix H as IV. PERFORMANCE EVALUATION In this section, we evaluate the proposed CELMs and compare it with some classifiers, such as ELM, SVM and some related deep learning methods, on both synthetic and real-world datasets. Ten rounds of experiments are conducted for each data set. In each experiment, the training set and the test set are randomly generated using the samples from synthetic datasets and UCI database [39]. The samples from UCI database are normalized to be of zero mean and unit variance. The performances are recorded with the means and the standard deviations of classification accuracies. In these experiments, we also compare the CELMs with the orthogonal ELM [40], which makes weight vectors orthogonal to each other and biases orthogonal to each other. The aim of this comparison is to compare CELMs with other ELM related methods appeared in literature sufficiently. The code of ELM used in the experiments was downloaded from [14]. In the following figures, the red solid performance curve stands for ELM performance, the green solid curve stands for orthogonal ELM performance, the blue solid curve stands for CDELM performance, the blue dashed curve with triangle markers stands for SELM performance, the brilliant blue solid curve stands for CSELM performance, the brilliant blue dashed curve with triangle markers stands for RSELM performance and the black solid curve stands for CMELM performance. The software used in the experiments is MATLAB R2010a with the Microsoft Windows Serve 2003 operation system. The configuration of hardware is Intel(R) Xeon(R) CPU E5440 @2.83GHz. The total RAM of the server is 32.0 GB, but the experiments cannot take up too much due to other users’ usage. A. Experiments on Synthetic Dataset We first evaluate our CELM algorithms on the synthetic dataset of the spiral data. It is illustrated in Fig. 3. To retain the symmetrical shape of the spiral, we normalize the samples into the range [-1, 1] as same as that in [14]. The total number of such generated spiral data is 5000. Two thirds of data samples are used as training set and the rest are used as test set. These data samples are randomly drawn from original spiral data samples. The two sets are randomly generated in each one of the total ten rounds of experiments. > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) < 8 WDBC 1 0.98 0.96 Testing accuracy 0.5 0 -0.5 0.94 0.92 0.9 ELM Orthogonal ELM CDELM CSELM SELM RSELM CMELM 0.88 0.86 -1 -1 -0.5 0 0.5 1 0.84 0 20 10 Spirals 30 40 The number of hidden nodes 50 60 70 MDD-fac 1 0.95 0.9 0.8 0.7 0.6 0.5 0.4 0 50 100 The number of hidden nodes ELM Orthogonal ELM CDELM CSELM SELM RSELM CMELM 150 Testing accuracy Testing accuracy 0.9 0.85 0.8 ELM Orthogonal ELM CDELM CSELM SELM RSELM CMELM 80 90 100 0.75 0.7 0.65 0 10 20 30 Fig. 3. The spiral synthetic dataset is illustrated at the top side. The performance comparisons are shown at the bottom side. 40 50 60 70 The number of hidden nodes MDD-fou 0.8 0.7 Testing accuracy As shown in Fig. 2, CELMs have a perfect performance when the number of hidden nodes reaches a slight larger than 50, while orthogonal ELM drops when the number of hidden nodes is larger than 50. The drop of orthogonal ELM is probably because the orthogonalization in two vectors of 50 dimensions is of no help, even degrades the information in the random weights. The test accuracy of ELM only reaches 0.8 even when the number of hidden nodes is 150. The test accuracies of CELMs are above those of orthogonal ELM and ELM all the time. The result shows that CELMs have the better generalization abilities than orthogonal ELM and ELM. Besides, the variances of these CELMs are becoming quite small with the increase of hidden nodes number and there is little difference among the performances of these CELMs. Therefore, the difference vectors and sample vectors really work from the performance comparison between CELMs and orthogonal ELM and ELM. 0.75 0.65 0.6 0.55 0.5 ELM Orthogonal ELM CDELM CSELM SELM RSELM CMELM 50 60 0.45 0.4 0.35 0 10 20 30 40 The number of hidden nodes MDD-kar 0.9 0.8 Testing accuracy We compare the performances of CELMs with ELM and orthogonal ELM. The number of hidden nodes is selected from 10 to 150 at a step 10. The performances of these models are illustrated in Fig. 2. 0.7 0.6 0.5 0.4 0.3 0 10 20 30 40 50 The number of hidden nodes 60 ELM Orthogonal ELM CDELM CSELM SELM RSELM CMELM 70 80 > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) < MDD-pix 0.95 Testing accuracy 0.9 0.85 0.8 0.75 0.7 0 20 40 60 140 120 100 80 The number of hidden nodes ELM Orthogonal ELM CDELM CSELM SELM RSELM CMELM 200 180 160 MDD-zer 0.84 0.82 Testing accuracy 0.8 0.78 0.76 0.74 0.72 0.7 0.68 0.66 0 20 40 60 80 100 120 140 The number of hidden nodes ELM Orthogonal ELM CDELM CSELM SELM RSELM CMELM 160 180 200 Fig. 4. Experimental results of ELM, orthogonal ELM and CELMs on the six UCI datasets. B. Experiments on UCI Datasets Six datasets from UCI database [39], including Wisconsin diagnostic breast cancer dataset (WDBC) and digit datasets in five different features (MDD-fac, fou, kar, pix, zer), are used for evaluating the proposed CELMs. CELMs are compared with ELM, orthogonal ELM. In the first experiment, the number of training samples is 2/3 size of the total samples, and the rest is used as test samples. The training and test sets are randomly generated. The comparison of ELM, CELMs and orthogonal ELM in the first experiment is illustrated in Fig. 3. The performances of these models are displayed sufficiently from the trends of the curves in the figure. It can be seen that the test accuracy curves of CELMs are above those of other two methods in the experiment and so the generalization ability of the proposed CELMs is better than other two models on these real world datasets. The samples’ distribution prior we introduced makes the efficient use of hidden nodes in CELMs and really helps the classification tasks. In the second experiment, a benchmark performance evaluation is conducted on the six datasets. The size of the training set is also 2/3 of the total samples and the remaining 9 data is used as the test set. We compare our methods with the regularized ELM, regularized orthogonal ELM, BP network and linear SVM methods. It should be mentioned that the optimization objectives of ELM, orthogonal ELM and CELMs used in the benchmark evaluation are all added a regularized term. Three-fold cross validation is used to select the best regularization factor in log10 space from -8 to 8 with the step 1. The number of hidden nodes used in ELM, orthogonal ELM, CELMs and BP network is from 5 to 200 with the step 5 in five MDD data sets. And in WDBC data set, the number of hidden nodes used is from 5 to 100 with the step 5. The selection of hidden nodes number is based on the Fig. 3. Although it is unfair for those methods that are not converged completely, the aim of the proposed methods is to improve the efficiency of hidden neurons. Due to no kernels used in ELM, the SVM used here is linear SVM. The cost factor used in SVM is selected as same as the regularization factor in ELM. The performances of ten rounds of experiments are recorded. The mean of test accuracies and training times are recorded in Table I. The best test accuracies are represented in bold face. The training method of BP neural network is RPROP [41] due to time and memory problems in the experiments. The liner SVM code used is the MATLAB code obtained from [43]. It can be seen from the Table I that the performances of most CELMs outperform those of other methods. The CELMs improve the performance significantly, whilst retaining the extremely high learning speed of ELM. C. Experiments on Large Scale Datasets We also evaluate the CELMs and ELM on two large size datasets, i.e., MNIST [42] and CIFAR-10 [32]. The MNIST database of handwritten digits contains a training set of 60,000 samples, and a test set of 10,000 samples. It consists of binary images of ten classes and the size of these digits is 28×28 pixels. The samples are normalized before input to the CELMs and ELM. The CIFAR-10 dataset contains 60,000 color images in 10 classes, with 6000 image per class. The training set and the test set consist of 50,000 images and 10,000 images respectively. In CIFAR-10 dataset, the standard evaluation pipeline defined in [43] is adopted. First, extract dense 6 × 6 local patches with ZCA whitening and the stride is 1. Second, use threshold coding with α =0.25 to encode. The codebook is trained with OMP-1 [44] and the codebook size is 50 in the experiment. Third, average-pool the features on a 2 × 2 grid to form the global image representation. The performances of CELMs, ELM and orthogonal ELM are illustrated in Fig. 4. In this experiment, these methods are implemented without regularized terms for the sake of evaluating the efficiency of hidden neurons sufficiently. > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) < 10 From Fig. 4, it can be learned the performances of CELMs are about 8 percentages higher than those of ELM averagely on the two datasets. The efficiency of the sample vectors based weighting adopted by SELM can be evaluated as follows. When the same numbers of vectors are used, the method with higher test accuracy means more efficient. In Fig. 4, the performances of CELMs are higher than that of orthogonal ELM when they are not converged. The gaps between the performances of CELMs and orthogonal ELM show that the sample vector based weighting is effective. The curve of DATASETS ELM Orthogonal ELM Constrained Difference ELM Constrained Sum ELM Sample ELM Random Sum ELM Constrained Mixed ELM BP Linear SVM Test accuracy Training time(s) Test accuracy Training time(s) Test accuracy Training time(s) Test accuracy Training time(s) Test accuracy Training time(s) Test accuracy Training time(s) Test accuracy Training time(s) Test accuracy Training time(s) Test accuracy Training time(s) WDBC MDD-fac MDD-fou MDD-kar MDD-pix MDD-zer 0.974 0.01 0.969 0.01 0.973 0.02 0.975 0.02 0.973 0.02 0.974 0.01 0.974 0.03 0.972 0.97 0.628 0.73 0.958 0.03 0.976 0.07 0.975 0.05 0.977 0.07 0.978 0.04 0.977 0.04 0.977 0.07 0.616 3.69 0.965 12.37 0.805 0.03 0.807 0.04 0.839 0.04 0.84 0.07 0.84 0.03 0.84 0.03 0.84 0.07 0.428 3.80 0.827 0.43 0.923 0.03 0.937 0.05 0.953 0.04 0.964 0.08 0.964 0.03 0.963 0.03 0.963 0.07 0.416 4.27 0.950 0.151 0.934 0.03 0.942 0.08 0.961 0.05 0.973 0.08 0.970 0.04 0.970 0.04 0.971 0.08 0.525 5.33 0.965 2.88 0.809 0.04 0.827 0.04 0.833 0.04 0.838 0.07 0.841 0.03 0.836 0.03 0.836 0.06 0.378 4.98 0.831 1.41 MNIST 0.96 0.94 Testing accuracy 0.92 0.9 0.88 0.86 0.84 0.82 0.8 0 100 200 300 400 500 600 700 The number of hidden nodes ELM Orthogonal ELM CDELM CSELM SELM RSELM CMELM 800 900 1000 (a) CIFAR-10 0.65 Testing accuracy 0.6 0.55 ELM Orthogonal ELM CDELM CSELM SELM RSELM CMELM 0.5 0.45 0.4 0 100 200 400 300 The number of hidden nodes 500 600 (b) Fig. 5. Experimental results of ELM, orthogonal ELM and CELMs on the subsets of MNIST and CIFAR-10 datasets. 700 CELMs’ performance is always above those of orthogonal ELM and ELM in all these datasets, which shows that sample vectors based weighting really helps the efficient use of hidden nodes. Experiments are conducted on MNIST data set to compare CELMs with ELM, orthogonal ELM and Multi-Layer Extreme Learning Machine (ML-ELM) [40]. The ML-ELM is a Stacked Denoising Auto Encoder (SDAE) model [46] based on ELM. The random feature mapping is used as encoder in ELM and the linear system is used as decoder. The original ML-ELM with three layers of hidden nodes 700-700-15000 can outperform other deep learning methods, such as Deep Belief Network (DBN) [48], Deep Boltzmann Machine (DBM) [48], Stacked Auto Encoder (SAE) and SDAE [46]. In our experiment, the network structure of ML-ELM is set to 700-700-1000 due to the limit of our machine capacity. And the number of hidden nodes used in ELM, orthogonal ELM and CELMs is set to 1000 and 2000 for evaluation. In the experiments, regularization term is used for ELM, orthogonal ELM and CELMs. The parameter selection is the same as before. The average performance is recorded in Table Ⅱ. From Table Ⅱ , it can be learned when the number of CELMs’ hidden nodes is 1000, the test accuracies of CELMs are comparable to ML-ELM, but CELMs have much high learning speed. When the number of CELMs’ hidden nodes is 2000, the CELMs outperform the ML-ELM of our implemented version. But the learning speed of CELMs is slower due to the computation complexity of matrix inversion. From the significant performance gap between ELM and CELMs and the similar learning speed of ELM and CELMs, we can conclude the sample based features used in CELMs really help the improvement, whilst retaining fast learning property of > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) < ELM. The CELMs are also compared with SVM related methods, e.g., Linear SVM and R2SVM [30], and deep ELM related method, e.g., DCN [31], on CIFAR-10 dataset. The R2SVM is a deep learning model and its building block is a linear SVM model. The outputs of the previous layers are transformed by a random matrix, and then the transformed outputs are added to the original features. The modified features are input into the next layer after transformed by a sigmoid function. The DCN is also a deep learning model, but its building block is an ELM based model, in which parts of the hidden nodes are built with random projection and the other part of hidden nodes are built with RBM weights [31, 45]. Instead of the way that adds the output of previous layer as a bias to the next layer, the outputs of the previous layers are concatenated with the original features sequentially and are input into the next layer in DCN model. In this experiment, all the 50,000 training samples are used to train the model, and all the 10,000 test samples are used to evaluate the performance. Table Ⅲ shows the performances of ELM, orthogonal ELM, CELMs, linear-SVM, R2SVM [30] and DCN [31] methods. Note the performances of linear SVM, R2SVM and DCN are cited from [30]. And the experimental conditions of ELM, orthogonal ELM and CELMs, such as the features and the number of used training and test sets, are the same with [30]. TABLE I AVERAGE CLASSIFICATION ACCURACIES ON UCI DATASETS TABLE Ⅱ PERFORMANCE ON MNIST DATASET Training Time(s) 1000 nodes 1000 nodes Test accuracy 0.930 0.934 1000 nodes 0.963 34.46 1000 nodes 1000 nodes 1000 nodes 1000 nodes 2000 nodes 2000 nodes 0.964 0.964 0.963 0.964 0.947 0.957 35.47 35.32 35.94 36.46 107.25 110.99 107.51 Algorithms No. of hidden nodes ELM Orthogonal ELM Constrained Difference ELM Constrained Sum ELM Sample ELM Random Sum ELM Constrained Mixed ELM ELM Orthogonal ELM Constrained Difference ELM Constrained Sum ELM Sample ELM Random Sum ELM Constrained Mixed ELM Multi-Layer ELM (ML-ELM) 35.39 37.73 2000 nodes 0.974 2000 nodes 2000 nodes 2000 nodes 2000 nodes 2400 nodes (700-700-1000) 0.973 0.974 0.973 0.976 107.16 106.91 108.16 106.20 0.968 58.23 TABLE Ⅲ PERFORMANCE ON CIFAR-10 DATASET Algorithms Linear SVM R2SVM DCN ELM Orthogonal ELM Constrained Difference ELM Constrained Sum ELM No. of hidden layers /nodes 60 layers Tens to hundreds layers 7000 nodes 7000 nodes Test accuracy 0.647 0.693 0.672 0.645 0.683 7000 nodes 0.720 7000 nodes 0.728 Sample ELM Random Sum ELM Constrained Mixed ELM 7000 nodes 7000 nodes 7000 nodes 11 0.733 0.727 0.723 From the Table Ⅲ, the CELMs can be found to have the better performances than that of linear-SVM, DCN and R2SVM. The CELMs have the test accuracies of at least 8 percentages higher than that of linear SVM. In [30], the R2SVM has 60 layers, and each layer is a linear SVM after random projection and sigmoid transformation. Although R2SVM and DCN have many layers, the CELMs of one hidden layer have the test accuracy of at least 3 percentages higher than that of these discriminative deep learning methods. Besides, the CELMs can train a model at a case of 50,000 training data well, which suggests that the proposed CELMs can tackle large scale data effectively. To further understand the feature mapping of ELM, orthogonal ELM and the CELMs, the last experiment is conducted for the visualization of the hidden layer’s feature mapping of these methods on MNIST data set. The visualization method, t-SNE [49], is used. The t-SNE is a very ideal visualization tool due to preserving local structure and overcoming the “crowding” problem of mapped data. The s-SNE has a much better visualization effect than other methods, such as PCA [38], LLE [50] and Auto Encoder [47], on MNIST data set. In the experiment, the whole 60,000 training data are used as training set and 2000 data are randomly selected from 10,000 test data to be used as the test set in t-SNE. The number of hidden nodes in ELM, orthogonal ELM and CELMs is 10,000. The visualization is illustrated in Fig. 5. Seen from the figure, our CELMs can retain the data structure well with the pre-assigned iteration number. The hidden layer’s feature mapping in CELMs can separate the data of different classes well. However, after the transformation of 10,000 hidden neurons in ELM and orthogonal ELM, the input data do not converge after many iterations in t-SNE visualization. The phenomenon probably reveals the essence that the constrained random mapping hidden neurons may outperform the completely random hidden neurons in traditional ELMs. It also provides new insights into ELM related research that fast generation of meaningful hidden neurons could boost ELM’s performance greatly. > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) < MNIST Test Data 12 MNIST Test Data in Constrained Sum Vectors Feature Space 80 0 1 2 3 4 5 6 7 8 9 60 40 20 0 -20 0 1 2 3 4 5 6 7 8 9 60 40 20 0 -20 -40 -40 -60 -60 -80 -80 -60 -40 -20 0 20 40 60 80 -60 -40 ` -20 0 20 40 60 MNIST Test Data in Sample Vectors Feature Space 0 1 2 3 4 5 6 7 8 9 60 MNIST Test Data in Orthogonal ELM Feature Space 1000 0 1 2 3 4 5 6 7 8 9 800 600 400 200 0 -200 -400 40 20 0 -20 -40 -60 -600 -80 -800 -60 -40 -20 0 20 40 60 -1000 -1000 -800 -600 -400 -200 0 200 400 600 800 1000 MNIST Test Data in Random Sum Vectors Feature Space MNIST Test Data in Constrained Difference Vectors Feature Space 0 1 2 3 4 5 6 7 8 9 60 80 0 1 2 3 4 5 6 7 8 9 60 40 20 0 -20 40 20 0 -20 -40 -40 -60 -60 -80 -80 -60 -40 -20 0 20 40 -60 -40 -20 0 20 40 60 60 MNIST Test Data in Constrained Mixed Vectors Feature Space 80 0 1 2 3 4 5 6 7 8 9 60 40 20 0 -20 -40 -60 -60 -40 -20 0 20 40 60 Fig. 6. ELM, orthogonal ELM and the CELMs hidden layer feature visualization on MNIST dataset. 80 > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) < V. DISCUSSION We have compared CELMs with several ELM based methods, such as normalized ELM [37], orthogonal ELM, and ELM. The main contributions of the CELMs to the ELM study are, 1) we introduce a constrained hidden weights based on sample distributions, 2) we normalized the hidden weights by the square of their l2 norms, other than l2 norm (The normalized ELM is taken the strategy.). Several work have validated the effectiveness of CELMs [53]. From the experiments of CELMs, we observe that when the number of hidden nodes is small, the CELMs are outperform normalized ELM, orthogonal ELM and ELM greatly. However, when the number of hidden nodes is large, the margins between the ELM and normalized ELM are not that big. From the observation, the constrained weights and normalized strategy both work for the success of CELMs. On one hand, when the number of hidden nodes is small, the hidden layer is equivalent to dimension reduction. Thus the directions of hidden weights are quite import since they represent the directions to be retained after the reduction. The weights based on sample distribution work well for the dimension reduction [52]. On the other hand, the normalization of hidden weights is important due to the property of sigmoid activation function. The effective response area of sigmoid function is near the zero. When the weights are not normalized and the dimension of inputs is high, the absolute values of many elements in WX+b are very big. Thus the normalization is quite import. And we strongly recommend the operator will be added in the research of ELM in the future. VI. CONCLUSION To address the inefficient use of hidden nodes in ELM, this paper proposed the novel learning models, CELMs. The CELMs constrain its random weights’ generation from a smaller space compared to that of the ELM, i.e., replacing the completely random weight vectors with ones that are randomly drawn from the set of simple linear combination of sample vectors. The main contribution of CELMs is that it introduces sample distribution prior into the construction of the hidden layer to make a better feature mapping and benefit the next layer’s linear classification. The effective feature mapping greatly contributes the efficient use of hidden nodes in ELM. Extensive comparisons between CELMs and some related methods on both synthetic and real-world datasets showed that CELMs have better performances in almost all the cases. However, the CELMs still have some problems that typical ELM owned. One is that CELMs face the over fitting problem when the number of hidden nodes is very large, although CELMs improve the effective use of discriminative hidden nodes. To our relief, the methods in [34, 35, 51] can tackle the problem effectively. Another problem is that the solving of the weights from the hidden layer to the output layer is time-consuming when the number of hidden nodes is very large. This case is much common in large scale applications. Some 13 gradient based solving methods for linear system can tackle the problem iteratively. The further research will include the study of invariant feature generating for the improvement of CELMs and the experimental verification on CELMs’ application to regression problems. The analyses on what kinds of problems that the CELMs will work with and such related theories are also expected to be studied in the future. ACKNOWLEDGMENT The authors would like to thank Dr. L. L. C. Kasun, Dr. H. Zhou, Prof. G.-B. Huang from Nanyang Technological University, Singapore and Prof. C. M. Vong from University of Macau, Macau for their kindly help with Multi-Layer Extreme Learning Machine (ML-ELM). REFERENCES [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] M. Leshno, V. Ya. Lin, A. Pinkus and S. Schocken, “Multilayer feedforward networks with a nonpolynomial activation function can approximate any function,” Neural Networks, vol. 6(6), pp. 861–867, 1993. S. Tamura and M. Tateishi, “Capabilities of a four-layered feedforward neural network: four layers versus three,” IEEE Trans. Neural Networks, vol. 8(2), pp. 251–255, 1997. G.-B. Huang and H.A. Babri, “Upper bounds on the number of hidden neurons in feedforward networks with arbitrary bounded nonlinear activation functions,” IEEE Trans. Neural Networks, vol. 9(1), pp. 224–229, 1998. P. Werbos, “Beyond regression: new tools for prediction and analysis in the behavioral sciences,” Ph.D. Thesis Harvard University, Cambridge, MA, 1974. J. J. Moré, “The Levenberg-Marquardt algorithm: implementation and theory,” In Numerical analysis, Springer Berlin Heidelberg, pp. 105-116, 1978. E. D. Karnin, “A simple procedure for pruning back-propagation trained neural networks,” IEEE Trans. Neural Networks, vol. 1(2), pp. 239-242, 1990. X. Yao, “Evolving artificial neural networks,” Proceedings of the IEEE, vol. 87(9), pp. 1423-1447, 1999. F. Z. Brill, D. E. Brown and W. N. Martin, “Fast generic selection of features for neural network classifiers,” IEEE Trans. Neural Networks, vol. 3(2), pp. 324-328, 1992. C. Cortes and V. Vapnik, “Support-vector networks,” Machine learning, vol. 20(3), pp. 273-297, 1995. Y. Xia and J. Wang, “A one-layer recurrent neural network for support vector machine learning,” IEEE Trans. Syst., Man, Cybern. B, Cybern., vol. 34, no. 2, pp. 1261–1269, 2004. D. Lowe, “Adaptive radial basis function nonlinearities, and the problem of generalization,” In First IEE International Conference on Artificial Neural Networks (Conf. Publ. No. 313), IET, pp. 171-175, October, 1989. B. Widrow, A. Greenblatt, Y. Kim and D. Park, “The No-Prop algorithm: A new learning algorithm for multilayer neural networks,” Neural Networks, vol. 37, pp. 182-188, 2013. B. Widrow and M. E. Hoff, “Adaptive switching circuits,” In IRE WESCON Convention Record, 1960. G.-B. Huang, Q.-Y. Zhu and C.-K. Siew, “Extreme learning machine: Theory and applications,” Neurocomputing, vol. 70 (1–3), pp. 489–501, Dec. 2006, [Code: http://www.ntu.edu.sg/home/egbhuang/elm_ random_hidden_nodes.html]. G.-B. Huang, Q.-Y. Zhu and C.-K. Siew, “Extreme learning machine: A new learning scheme of feedforward neural networks,” in Proceedings of International Joint Conference on Neural Networks (IJCNN2004), vol. 2, (Budapest, Hungary), pp. 985–990, 25-29 Jul., 2004. G.-B. Huang, H. Zhou, X. Ding and R. Zhang, “Extreme learning machine for regression and multiclass classification,” IEEE Transactions > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) < [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] on Systems, Man, and Cybernetics, Part B: Cybernetics, vol. 42(2), pp. 513-529, 2012. P. L. Bartlett, “The sample complexity of pattern classification with neural networks: the size of the weights is more important than the size of the network,” IEEE Trans. Inf. Theory, vol. 44(2), pp. 525–536, 1998. G. Huang, S. Song, J. N. Gupta and C. Wu, “Semi-supervised and unsupervised extreme learning machines.,” IEEE Trans Cybern, 2014, in press. H.-J. Rong, G.-B. Huang, N. Sundararajan and P. Saratchandran, “Online sequential fuzzy extreme learning machine for function approximation and classification problems,” IEEE Transactions on Systems, Man, and Cybernetics, Part B: Cybernetics, vol. 39(4), pp. 1067-1072, 2009. Z.-L. Sun, K.-F. Au and T.-M. Choi, “A neuro-fuzzy inference system through integration of fuzzy logic and extreme learning machines,” IEEE Transactions on Systems, Man, and Cybernetics, Part B: Cybernetics, vol. 37(5), pp. 1321-1331, 2007. W. Zhu, J. Miao, J. Hu and L. Qing, “Vehicle detection in driving simulation using extreme learning machine,” Neurocomputing, vol. 128, pp. 160-165, 2013. Z. Bai, G.-B. Huang, D. Wang, H. Wang and M. B. Westover, "Sparse Extreme Learning Machine for Classification," IEEE Transactions on Cybernetics, 2014, in press. Q.-Y. Zhu, A.K. Qin, P.N. Suganthan and G.-B. Huang, “Evolutionary extreme learning machine,” Pattern Recognition, vol. 38(10), pp. 1759– 1763, Oct. 2005. L. Yuan, Y. C. Soh, and G.-B. Huang, "A constructive enhancement for online sequential extreme learning machine," in Proceedings of International Joint Conference on Neural Networks (IJCNN2009), pp. 1708–1713, 14-19 Jun., 2009. Y. Miche, A. Sorjamaa, P. Bas, O. Simula, C. Jutten and A. Lendasse, A., “OP-ELM: optimally pruned extreme learning machine,” Neural Networks, IEEE Transactions on, vol. 21(1), pp. 158-162, 2010. H. J. Rong, Y. S. Ong, A. H. Tan and Z. Zhu, “A fast pruned-extreme learning machine for classification problem,” Neurocomputing, vol. 72(1), pp. 359-366, 2008. D. Yu and L. Deng, “Efficient and effective algorithms for training single-hidden-layer neural networks,” Pattern Recognition Letters, vol. 33(5), pp. 554–558, 1 Apr. 2012. K. P. Murphy, “Machine learning: a probabilistic perspective,” The MIT Press, 2012. Y. Su, S. Shan, X. Chen and W. Gao, “Classifiability-based discriminatory projection pursuit,” IEEE Trans. Neural Networks, vol. 22(12), pp. 2050-2061, 2011. O. Vinyals, Y. Jia, L. Deng and T. Darrell, “Learning with recursive perceptual representations,” In Advances in Neural Information Processing Systems, pp. 2834-2842, 2012. L. Deng and D. Yu, “Deep convex net: A scalable architecture for speech pattern classification,” In Proceedings of the Interspeech 2011. A. Krizhevsky and G. Hinton, “Learning multiple layers of features from tiny images,” Master's thesis, Department of Computer Science, University of Toronto, 2009, [http://www.cs.toronto.edu/~kriz/ cifar.html]. N.-Y. Liang, G.-B. Huang, P. Saratchandran and N. Sundararajan, “A fast and accurate online sequential learning algorithm for feedforward networks,” IEEE Transactions on Neural Networks, vol. 17(6), pp. 1411-1423, 2006. G.-B. Huang, X. Ding and H. Zhou, “Optimization method based extreme learning machine for classification,” Neurocomputing, vol. 74(1), pp. 155-163, 2010. W. Zhu, J. Miao and L. Qing, “Robust regression with extreme support vectors,” pattern recognition letters, vol. 45, pp. 205-210, 2014. Q. Liu, Q. He and Z. Shi, “Extreme support vector machine classifier,” In Advances in Knowledge Discovery and Data Mining, Springer Berlin Heidelberg, pp. 222-233, 2008. W. Zhu, J. Miao and L. Qing, “Constrained Extreme Learning Machine: a Novel Highly Discriminative Random Feedforward Neural Network,” in Proceedings of International Joint Conference on Neural Networks (IJCNN2014), pp. 800-807, 2014. C. M. Bishop and N. M. Nasrabadi, “Pattern recognition and machine learning”, New York: springer, 2006. C. L. Blake and C. J. Merz, “UCI Repository of machine learning databases”, 1998, [http://www.ics.uci.edu/~mlearn/MLRepository. html]. Irvine, CA: University of California. Department of Information and Computer Science, 460. 14 [40] L. L. C. Kasun, H. Zhou, G.-B. Huang and C. M. Vong, “Representational Learning with Extreme Learning Machine for Big Data,” IEEE Intelligent Systems, vol. 28, no. 6, pp. 31-34, December 2013. [41] M. Riedmiller and H. Braun, “A direct adaptive method for faster backpropagation learning: The RPROP algorithm,” In IEEE International Conference on Neural Networks, pp. 586-591, 1993. [42] Y. LeCun, L. Bottou, Y. Bengio and P. Haffner, “Gradient-based learning applied to document recognition,” Proceedings of the IEEE, vol. 86(11), pp. 2278-2324, 1998, [Online]. Available: http://yann.lecun.com/exdb/mnist. [43] A. Coates and A. Ng, “The importance of encoding versus training with sparse coding and vector quantization,” In Proceedings of the 28th International Conference on Machine Learning (ICML-11) (pp. 921-928), 2011. [44] T. Blumensath and M. E. Davies, “On the difference between orthogonal matching pursuit and orthogonal least squares,” unpublished manuscript, 2007, [http://www.see.ed.ac.uk/~tblumens/papers/BD OMPvsOLS07.pdf]. [45] G. E. Hinton, S. Osindero and Y. W. Teh, “A fast learning algorithm for deep belief nets,” Neural computation, vol. 18(7), pp. 1527-1554, 2006. [46] P. Vincent, H. Larochelle, I. Lajoie, Y. Bengio and P. A. Manzagol, “Stacked denoising autoencoders: Learning useful representations in a deep network with a local denoising criterion,” The Journal of Machine Learning Research, vol. 11, pp. 3371-3408, 2010. [47] G. E. Hinton and R. R. Salakhutdinov, R. R., “Reducing the dimensionality of data with neural networks,” Science, vol. 313(5786), pp. 504-507, 2006. [48] R. Salakhutdinov and H. Larochelle, “Efficient learning of deep Boltzmann machines,” In International Conference on Artificial Intelligence and Statistics, pp. 693-700, 2010. [49] L. Maaten, “Learning a parametric embedding by preserving local structure,” In International Conference on Artificial Intelligence and Statistics, pp. 384-391, 2009, [Code: http://homepage.tudelft.nl/19j49/t-SNE.html]. [50] S. T. Roweis and L. K. Saul, “Nonlinear dimensionality reduction by locally linear embedding,” Science, vol. 290(5500), pp. 2323-2326, 2000. [51] W. Zhu, J. Miao and L. Qing, “Extreme support vector regression,” in Proceedings of International Conference on Extreme Learning Machines (ELM2013), Beijing, China, Spring-Verlag, 15-17 Oct. 2013. [52] Y. Su, S. Shan, X. Chen and W. Gao, “Classifiability-based discriminatory projection pursuit,” IEEE Trans. Neural Networks, vol. 22(12), pp. 2050-2061, 2011. [53] M. D. McDonnell, M. D. Tissera and A. van Schaik, "Fast, simple and accurate handwritten digit classification using extreme learning machines with shaped input-weights," arXiv preprint arXiv:1412.8307, 2014. [54] Q. Leng, H. Qi, J. Miao, W. Zhu, G. Su, "One-Class Classification with Extreme Learning Machine," Mathematical Problems in Engineering, 2014.
9cs.NE
Artifact reduction for separable non-local means Sanjay Ghosh and Kunal N. Chaudhury1 arXiv:1710.09552v1 [cs.CV] 26 Oct 2017 Department of Electrical Engineering, Indian Institute of Science, Bangalore. Abstract. It was recently demonstrated [J. Electron. Imaging, 25(2), 2016] that one can perform fast non-local means (NLM) denoising of one-dimensional signals using a method called lifting. The cost of lifting is independent of the patch length, which dramatically reduces the run-time for large patches. Unfortunately, it is difficult to directly extend lifting for non-local means denoising of images. To bypass this, the authors proposed a separable approximation in which the image rows and columns are filtered using lifting. The overall algorithm is significantly faster than NLM, and the results are comparable in terms of PSNR. However, the separable processing often produces vertical and horizontal stripes in the image. This problem was previously addressed by using a bilateral filter-based post-smoothing, which was effective in removing some of the stripes. In this letter, we demonstrate that stripes can be mitigated in the first place simply by involving the neighboring rows (or columns) in the filtering. In other words, we use a two-dimensional search (similar to NLM), while still using one-dimensional patches (as in the previous proposal). The novelty is in the observation that one can use lifting for performing two-dimensional searches. The proposed approach produces artifact-free images, whose quality and PSNR are comparable to NLM, while being significantly faster. Keywords: Denoising, non-local means, fast algorithm, lifting, artifact. 1 Introduction We consider the problem of denoising grayscale images corrupted with additive white Gaussian noise. A popular denoising method is the non-local means (NLM) algorithm,1 where image patches are used to perform pixel aggregation. While NLM is no longer the state-of-the-art, it is still used in the image processing community due to its simplicity, decent denoising performance, and the availability of fast implementations. The NLM of an image f = {f (i) : i ∈ Ω}, where  Ω = i = (i1 , i2 ) : 1 ≤ i1 , i2 ≤ N }, is given by1 P j∈S(i) wij f (j) NLM[f ](i) = P (i ∈ Ω). (1) j∈S(i) wij where S(i) = i + [−S, S]2 is a search window around the pixel of interest. The weights wij are set to be  1 X 2  wij = exp − 2 f (i + k) − f (j + k) , (2) α k∈P where α is a smoothing parameter and P = [−K, K]2 is a two-dimensional patch. A direct implementation of (1) has the per-pixel complexity of O(S 2 K 2 ), where S and K are typically in the range [7, 20] and [1, 3].1 Several computational tricks and approximations have been proposed to speedup the direct implementation.2–8 A particular means to speed up NLM is using a separable approximation, which in fact is a standard trick in the image processing literature.9–12 In separable filtering, the rows are processed first followed by the columns (or in the reverse order). Of course, if the original filter is non-separable, then the output of separable filtering is generally different from that of the original filter, since a natural image typically contains diagonal details.12 This is the case with NLM since expression (2) is not separable. The present focus is on a 1 Email: [email protected], [email protected] recent separable approximation of NLM.13 At the core of this proposal is a method called lifting, which computes the NLM of a one-dimensional signal using O(S) operations per sample. In other words, the complexity of lifting is independent of the patch length K. Extending lifting for NLM denoising of images, however, turns out to be a difficult task. Therefore, we proposed a separable approximation, called separable NLM (SNLM),13 in which the rows and columns of the image are independently filtered using lifting. In particular, we separately computed the “rows-then-columns” and “columns-then-rows” filtering, which were then optimally combined. The per-pixel complexity of SNLM is O(S), which is a dramatic reduction compared to the O(S 2 K 2 ) complexity of NLM. A flip side of SNLM (as is the case with other separable formulations14 ) is that often vertical and horizontal stripes are induced in the processed image. The stripes are more prominent along the last filtered dimension.14 In SNLM, this problem was alleviated using the optimal recombination mentioned above followed by a bilateral filter-based post-smoothing. In this work, we demonstrate that the stripes can be mitigated in the first place simply by involving the neighboring rows (or columns) in the filtering. In other words, we use a two-dimensional search (similar to classical NLM1 ), while still using one-dimensional patches (as done previously13 ). The present novelty is in the observation that one can use lifting for performing a two-dimensional search. In particular, the per-pixel complexity of the proposed approach is O(S 2 ), which is higher than our previous proposal, but still substantially lower than that of classical NLM. Importantly, the proposed approach no longer exhibits the visible artifacts that are otherwise obtained using SNLM. The rest of the paper is organized as follows. We recall the SNLM algorithm in Section 2 and its fast implementation using lifting. We also illustrate the artifact problem with an example. The proposed solution is presented in Section 3, along with some algorithmic details. In Section 4, we report the denoising performance of our approach and compare it with classical NLM and SNLM. We end the paper with some concluding remarks in Section 5. 2 Separable Non-Local Means To set up the context, we briefly recall the SNLM algorithm.13 Suppose we have a one-dimensional signal g = {g(i) : 1 ≤ i ≤ N }, corresponding to a row or column. The one-dimensional analogue of (1) is given by P j∈S(i) wij g(j) NLM1D[g](i) = P (1 ≤ i ≤ N ), (3) j∈S(i) wij and  K 2  1 X g(i + k) − g(j + k) , wij = exp − 2 β k=−K (4) where S(i) = i + [−S, S] and β is a smoothing parameter. In other words, both the search window and patch are one-dimensional in this case. It was observed in our previous work that the weights {wij : 1 ≤ i ≤ N, i − S ≤ j ≤ i + S} can be computed using O(1) operations with respect to K. In particular, consider the N × N matrices: F(i, j) = g(i)g(j) and F(i, j) = K X k=−K (1 ≤ i, j ≤ N ), F(i + k, j + k). (5) (6) 3 (a) Clean. (b) Noisy, 20.19. (e) Proposed (RC), 26.67. (f) Proposed (CR), 26.66. (c) 1D search and 1D patch. (d) 2D search and 1D patch. (g) SNLM,13 26.57. (h) NLM,1 26.02. Fig 1 Denoising of Peppers at noise standard deviation σ = 25. We see stripes in (c) in which both the patch and search window are one-dimensional (both are along rows). As seen in (d), the stripes can however be reduced using a two-dimensional search in place of the one-dimensional counterpart (though we still see some noise). The image obtained by further processing (d) using a two-dimensional search and one-dimensional patches (along columns) is shown in (e). The visual quality and PSNR (mentioned below each image) of (e) is comparable to NLM. In (f), we have reversed the order of processing: we first use one-dimensional patches along columns and then along rows (the search is two-dimensional). Notice that the order (RC/CR) has no visible impact on the final output. Also notice that residual stripes can be seen in SNLM. We see see that that F F is is the the smoothed smoothed version version of of F, F, obtained obtained by We by box box filtering filtering F F along along its its sub-diagonals. sub-diagonals. 13 13 The important observation is that we can write The important observation is that we can write K X K 2 X g(i + k) g(j + k)2 = F(i, i) + F(j, j) 2F(i, j). g(i + k) − g(j + k) = F(i, i) + F(j, j) − 2F(i, j). k= K k=−K (7) (7) In particular, using this so-called lifting, we can compute the patch distance using just three In particular, this so-called and lifting, can compute the patch distance using just samples of F,using one multiplication, twowe additions. The computational gain comes fromthree the samples of F, one multiplication, and two additions. The computational gain comes the fact that the box filtering in (6) can be computed using O(1) operations with respect to from K using fact that the13box filtering following in (6) can the be computed using operations with using recursions. Moreover, observation that O(1) not all samples of F respect are usedtoinK(3), an 13 recursions. Moreover, following the observation that not all samples of F are used in (3), an 13 efficient mechanism for computing (and storing) just the required samples was proposed. 13 The efficient forcomputing computing storing) just the to required samples was proposed. The per-pixelmechanism complexity of (3)(and using lifting reduces O(S) from the brute-force complexity per-pixel complexity of computing (3) using lifting reduces to O(S) from thepatches brute-force of O(SK). Unfortunately, extending lifting to handle two-dimensional turnscomplexity out to be of O(SK). Unfortunately, extending lifting to handle two-dimensional patches turns out using to be difficult. Instead, we proposed to use separable filtering, where the rows (columns) are filtered difficult. Instead, we columns proposed(row). to use The separable filtering,outputs where are the rows (columns) combined are filteredto using (3) followed by the two distinct then optimally get (3) followed by the columns (row). The two distinct outputs are then optimally combined to the final image. In fact, the reason behind the averaging was to suppress artifacts in the formget of the final image. In fact, the reason behind the averaging was to suppress artifacts in the form of stripes arising from the separable filtering. This is demonstrated with an example in Fig. 1, where we have compared NLM, SNLM, and the proposed approach. We used bilateral filtering to remove the stripes in SNLM, at an additional cost. However, the final image still has some residual artifacts. 3 Proposed Approach We see less stripes in Fig. 1(d) precisely because we use a two-dimensional search. In other words, we use a cross between classical NLM and SNLM in which we use (8) for the aggregation and (4) for the weights. The two-dimensional search results in the averaging of pixels from across rows (and columns). This does not happen in SNLM, which causes the stripes to appear in Fig. 1(c). v u j = (j1, j2) q = (i1, q2 ) i = (i1, i2) Rows (2 K + 1) (2 S + 1) (2 S + 1) Fig 2 Illustration of the idea behind the proposed method (see text for details). The working of our proposal is explained in Fig 2. The pixel of interest in this case is the pixel at position i = (i1 , i2 ) marked with a red dot. The search window of length 2S + 1 is marked with a green bounding box. Two neighboring pixels at locations j = (j1 , j2 ) and q = (i1 , q2 ) are marked with red dots. The former pixel is on a neighboring row, while the latter is on the same row as the pixel of interest. Similar to SNLM,13 we can consider either horizontal or vertical patches. For our example, the patches (of length 2K + 1) are aligned with the image rows; they are marked with light blue rectangles. For our proposal, the denoising at i = (i1 , i2 ) is performed using the formula: P `∈S(i) wi` f (`) P , (8) `∈S(i) wi` and K  1 X 2  wi` = exp − 2 f (`1 , `2 + k) − f (i1 , i2 + k) , β k=−K (9) where S(i) = i + [−S, S]2 and ` = (`1 , `2 ). To compute (8), we group the neighboring patches into two categories: (i) patches with row index i1 , e.g., patch q in Fig. 2, and (ii) patches with a different row index, e.g., patch j in the figure. Let {u(t) : 1 ≤ t ≤ N } and {v(t) : 1 ≤ t ≤ N } be the i1 -th and j1 -th row, where N is the length of a row (see Fig 2). Similar to (5) and (6), we define the N × N matrices: Fuu (p, q) = u(p)u(q), Fvv (p, q) = v(p)v(q), and Fuv (p, q) = u(p)v(q), (10) and the corresponding matrices Fuu , Fvv , and Fuv , where, for example, Fuu (p, q) = K X k=−K u(p + k)u(q + k) (1 ≤ p, q ≤ N ). (11) As in (7), the (squared) distance between patches centered at i = (i1 , i2 ) and q = (i1 , q2 ) is Fuu (i2 , i2 ) + Fuu (q2 , q2 ) − 2Fuu (i2 , q2 ). (12) On the other hand, the distance between patches centered at i = (i1 , i2 ) and j = (j1 , j2 ) is Fuu (i2 , i2 ) + Fvv (j2 , j2 ) − 2Fuv (i2 , j2 ). (13) In other words, we can compute the distance between patches centered at i and q using Fuu . To compute the distance between patches centered at i and j, we require the matrices Fuu , Fvv , and Fuv . Moreover, using these matrices, we can compute patch distances for different i, j, and q, provided the row index of i and q is i1 , and the row index of j is j1 . Thus, an efficient way of computing (8) is to sequentially process the rows. For each row (fixed u), we compute Fuu , Fvv , and Fuv , where v corresponds to neighboring rows that are separated by at most S. We compute 2S + 1 matrices of the form Fvv and another 2S matrices of the form Fuv . As mentioned in Section 2, we can compute each matrix using O(1) operations with respect to K. Moreover, as per the sum in (3), we only require entries within the diagonal band {1 ≤ i, j ≤ N : |i − j| ≤ S} of each matrix. The cost of computing the banded entries is thus O(N S) for each matrix. The overall cost of processing N rows is O(N 2 S 2 ). The per-pixel complexity of computing (8) using the proposed approach is thus O(S 2 ). We can efficiently compute (and store) the banded entries using the method in Section 2.2 of the original paper.13 The main difference with SNLM is that we require a total of 4S + 1 matrices for processing each row; whereas, just one matrix is required in SNLM. As shown in Fig. 1(d), some residual noise can still be seen after the processing mentioned above. We perform a similar processing once more, except this time we use one-dimensional patches along columns. The visual quality and PSNR of the final image (Fig. 1(e)) are comparable to NLM (Fig. 1(h)). Moreover, we see from Figs. 1(e) and 1(f) that if we first use one-dimensional patches along columns and then along rows, then the outputs are similar. We empirically corroborate these observations in the next section. Therefore, we propose to first process the rows using (8) and then process the columns of the intermediate image using (8). A precise description of the proposed approach for processing the (noisy) image along rows using lifting is provided in Algorithm 1. We then perform column processing on the intermediate image to obtain the final output of our algorithm. That is, we simply apply Algorithm 1 on the intermediate image, where we logically switch the rows and columns in the algorithm. Suppose S1 and S2 are the corresponding search windows for the row-aligned and column-aligned processing. Then we set the search parameter in Algorithm 1 as: S = S1 for the row-aligned processing, and S = S2 for the column-aligned processing. 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 Data: Image f of size M × N , and parameters K, S, β. Result: Row-processed image f˜ of size M × N given by (8). for i1 = 1, . . . , M do % lifting for i2 = 1, . . . , N do u(i2 ) = f (i1 , i2 ); end Compute matrices Fuu and Fuu using (10) and (11); for j1 ∈ { i1 − S, . . . , i1 + S}\{i1 } do for j2 = 1, . . . , N do v(i2 ) = f (j1 , j2 ); end Compute matrices Fvv , Fuv , Fvv and Fuv using (10) and (11); end % weight computation and pixel aggregation for i2 = 1, . . . , N do Set P = 0 and Q = 0; for j1 = i1 do for k2 ∈ {i2 − S, . . . , i2 + S} do Compute weight wi2 k2 using (12) and (9); P = P + wi2 k2 f (j1 , k2 ) ; Q = Q + wi2 k2 ; end end for j1 ∈ { i1 − S, . . . , i1 + S}\{i1 } do for j2 ∈ {i2 − S, . . . , i2 + S} do Compute weight wi2 j2 using (13) and (9); P = P + wi2 j2 f (j1 , j2 ) ; Q = Q + wi2 j2 ; end end f˜(i1 , i2 ) = P/Q. end end Algorithm 1: Proposed processing along rows using lifting. 4 Experiments The denoising performance of the proposed method is compared with NLM and SNLM in Table 1. We have used standard grayscale images from15, 16 for our experiments. The Matlab implementation used to generate the results in this section is publicly available2 . The search windows for the three methods were set as follows. Suppose S be the search window for NLM (which we take as 2 http://in.mathworks.com/matlabcentral/fileexchange/64856 σ Method 5 10 20 30 50 5 10 House (256 × 256) 20 30 50 Montage (256 × 256) Noisy 34.1/83 28.1/60 22.1/34 18.6/22 14.2/12 34.2/83 28.1/61 22.1/36 18.6/25 14.1/15 NLM1 36.9/90 34.1/87 29.7/82 26.8/77 24.0/69 39.1/97 34.3/94 29.6/89 26.5/85 22.2/76 Darbon et al.4 36.1/90 31.4/75 26.1/51 22.8/36 18.6/21 38.4/89 30.9/76 25.8/52 22.6/38 18.6/24 SNLM13 36.6/89 33.6/86 29.4/81 26.5/76 23.7/69 39.3/97 34.6/94 29.7/89 26.7/84 22.5/77 Proposed 36.6/89 34.1/86 30.4/82 27.3/77 24.1/70 39.4/97 34.8/94 30.2/90 27.3/86 23.4/79 BM3D19 38.6/95 34.7/93 31.3/88 29.3/85 26.6/78 41.1/98 37.3/96 33.5/94 31.2/91 27.4/85 Method Boat (512 × 512) Man (1024 × 1024) Noisy 34.1/97 28.1/90 22.1/73 18.6/59 14.2/41 34.1/99 28.1/97 22.1/91 18.6/85 14.1/70 NLM1 35.1/96 30.8/89 26.7/78 24.7/70 23.0/62 35.3/98 31.1/95 27.5/88 25.8/83 24.2/76 Darbon et al.4 34.4/97 30.3/94 25.4/82 22.4/71 18.4/53 35.1/97 30.4/98 25.6/95 22.5/90 18.5/80 SNLM13 35.0/96 30.7/89 26.6/77 24.5/69 22.7/61 35.3/98 31.0/95 27.2/87 25.4/83 23.8/75 Proposed 34.9/96 30.7/89 26.8/77 24.7/70 22.9/62 35.1/98 31.1/95 27.5/88 25.8/ 84 24.2/78 BM3D19 37.3/98 33.9/96 30.8/92 29.0/88 26.7/81 37.3/99 34.1/98 31.2/96 29.5/94 27.4/89 Table 1 Comparison of the denoising performances on various images15 in terms of PSNR/SSIM at various noise standard deviations σ. The PSNRs are rounded to one decimal place, while the SSIMs (in %) are rounded to integer. S 7 Method NLM1 10 12 7 K=2 44 87 10 12 K=3 124 45 88 126 Darbon et al.4 0.33 0.60 0.84 0.33 0.62 0.85 SNLM13 0.31 0.39 0.45 0.32 0.40 0.46 Proposed 1.20 2.30 3.20 1.30 2.40 3.30 Table 2 Comparison of the run-time (in seconds) of the proposed approach with classical NLM for a 256 × 256 image. The computations were performed using Matlab on a 3.40 GHz Intel quad-core machine with 32 GB memory. reference). Following the original proposal,13 the window for SNLM is also set as S. For a fair comparison with NLM, we ensure that equal number of pixel are averaged in both methods. This is achieved if (2S1 + 1)2 + (2S2 + 1)2 = (2S + 1)2 . Moreover, following,14 we set S2 = S1 /2. These equations uniquely determine S1 and S2 (up to an integer rounding). Moreover, we normalize 8 (a) Clean (512 ⇥ 512). (b) Noisy, 18.6/60. (c) NLM,1 25.3/71. (d) SNLM, 25.3/71. (e) SNLM13 (smoothed), 24.9/69. (f) Proposed, 25.4/70. Fig smoothing (d) (d) using using aa bilateral-filter. bilateral-filter. Fig33Denoising Denoisingof ofMan Man1515 at atσ = = 30. 30. Notice Notice that that stripes stripes can be seen in (e) after smoothing The our proposal proposal (f) (f) isis visually visually ThePSNR/SSIM PSNR/SSIMvalues valueswith withreference reference to to the the clean clean image image are also provided. The result from our similar 335, 1.7, 1.7, and and 9.8 9.8 seconds. seconds. similartotoclassical classicalNLM NLM(c). (c). The The runtime runtime for for NLM, NLM, SNLM, and the proposed method are 335, We proposed approximation approximation(f) (f) Weused usedthe theparameter parametersettings settings mentioned mentioned in in the the main main text. The PSNR/SSIM between the proposed andthe theclassical classicalNLM NLM(c) (c)are are40.58/70.22, 40.58/70.22, whereas whereas the the values are 37.96/69.90 for SNLM (d). and (d). proposed approach gives comparable results inthe terms of PSNR comparison the smoothing parameters in (2) and (9) using relation β 2 =and α2SSIM. /(2K 17 +A 1).visual For the results in of the1,denoising is provided and4,4.and Weαcan clearly seenotice somefrom stripes in the images Table we set Kresults = 3, S = 10, S1 in = Fig. 9, S23 = = 10σ. We Table 1 that the 17 obtained approach using SNLM, with andresults without the boxed In contrast, proposed givesboth comparable inpost-processing terms of PSNR (see and SSIM. A areas). visual comparison there is hardly any artifacts present in the denoised image obtained using our method. A images timing of the denoising results is provided in Fig. 3 and 4. We can clearly see some stripes in the comparison is provided in Table While the proposed method(see is slower than areas). SNLM In (this is the obtained using SNLM, both with2.and without post-processing the boxed contrast, price we pay for removing the stripes), it is nevertheless significantly faster than NLM. there is hardly any artifacts present in the denoised image obtained using our method. A timing 4 We noteisthat thoughin Darbon is generally fastermethod than our proposal, its (this denoising comparison provided Table et 2. al. While the proposed is current slower than SNLM is the performance starts deteriorating with the increase in noise variance. This is evident from Table price we pay for removing the stripes), it is nevertheless significantly faster than NLM. 18 1 and Wethough also note that NLM SNLM fall short of our KSVD and BM3D19itsindenoising terms of WeFig. note4.that Darbon et al.4 and is generally faster than current proposal, denoising performance. Nevertheless, NLM continues to be variance. of interest This due toisits decentfrom denoising performance starts deteriorating with the increase in noise evident Table 20–23 18 19 capability, and importantly, the availability of fast approximations. As reported by other 1 and Fig. 4. We also note that NLM and SNLM fall short of KSVD and BM3D in terms of authors,24performance. NLM is quite Nevertheless, effective in preserving fine details, successfully removing noise. denoising NLM continues to bewhile of interest due to its decent denoising 20–23 capability, and importantly, the availability of fast approximations. As reported by other 24 authors, NLM is quite effective in preserving fine details, while successfully removing noise. 9 (a) Clean (512 ⇥ 512). (b) Noisy, 28.1/83. (c) NLM,1 34.7/94. (d) SNLM,13 34.6/94. (e) BM3D,19 37.2/97. (f) KSVD,18 36.9/97. (g) Darbon et al.,4 30.9/91. (h) Proposed, 34.6/94. kodim2316 Fig classical Fig 44 Denoising Denoising of kodim23 at σ = 10. The result obtained through our proposal (h) is visually similar to classical NLM PSNR/SSIM NLM (c). (c). The runtime for NLM, SNLM, and the proposed method are 335, 1.7, and 9.8 seconds. The PSNR/SSIM between 42.4/99.4 between the proposed approximation (h) and the classical NLM (c) are 43.33/99.7, whereas these values are 42.4/99.4 for some for (d) (d) and and 30.85/89.3 for (g). We have zoomed the region around the beak in (c), (d), (g), and (h). We can see some artifacts in (d) and residual noise in (g); the zooms in (c) and (h) are visually indistinguishable. artifacts 5 Conclusion We proposed a method that uses the idea of lifting from previous work13 to perform fast non-local means denoising of images. The proposed method does not give rise to undesirable artifacts (as was the case with the original proposal), and produces images whose denoising quality and PSNR/SSIM are comparable to non-local means. While this comes at the expense of added computation, the proposed method nevertheless is much faster than non-local means. In fact, the speedup is about 40x for practical parameter settings. 6 Acknowledgements The last author was supported by a Startup Grant from IISc and EMR Grant SB/S3/EECE/281/2016 from DST, Government of India. References 1 A. Buades, B. Coll, and J.-M. Morel, “A non-local algorithm for image denoising,” Proc. IEEE Conference on Computer Vision and Pattern Recognition, 2, pp. 60-65 (2005). 2 M. Mahmoudi and G. Sapiro, “Fast image and video denoising via nonlocal means of similar neighborhoods,” IEEE Signal Processing Letters, 12(12), pp. 839-842 (2005). 3 J. Wang, Y. Guo, Y. Ying, Y. Liu, and Q. Peng, “Fast non-local algorithm for image denoising,” Proc. IEEE International Conference on Image Processing, pp. 1429-1432 (2006). 4 J. Darbon, A. Cunha, T. F. Chan, S. Osher, and G. J. Jensen, “Fast nonlocal filtering applied to electron cryomicroscopy,” Proc. IEEE International Symposium on Biomedical Imaging, pp. 1331-1334 (2008). 5 A. Dauwe, B. Goossens, H. Luong, and W. Philips, “A fast non-local image denoising algorithm,” Proc. SPIE Electronic Imaging, 68(12), pp. 1331-1334 (2008). 6 J. Orchard, M. Ebrahimi, and A. Wong, “Efficient nonlocal-means denoising using the SVD,” Proc. IEEE International Conference on Image Processing, pp. 1732-1735 (2008). 7 V. Karnati, M. Uliyar, and S. Dey, “Fast non-local algorithm for image denoising,” Proc. IEEE International Conference on Image Processing, pp. 3873-3876 (2009). 8 L. Condat, “A simple trick to speed up and improve the non-local means,” Research Report, HAL-00512801, (2010). 9 P. M. Narendra, “A separable median filter for image noise smoothing,” IEEE Transactions on Pattern Analysis and Machine Intelligence, 3, pp. 20-29 (1981). 10 N. Fukushima, S. Fujita, and Y. Ishibashi, “Switching dual kernels for separable edge-preserving filtering,” IEEE International Conference on Acoustics, Speech and Signal Processing, (2015). 11 T. Q. Pham and L. J. Van Vliet, “Separable bilateral filtering for fast video preprocessing,” Proc. IEEE International Conference on Multimedia and Expo, (2005). 12 Y. S. Kim, H. Lim, O. Choi, K. Lee, J. D. K. Kim, and C. Kim, “Separable bilateral non-local means,” Proc. IEEE International Conference on Image Processing, pp. 1513-1516 (2011). 13 S. Ghosh and K. N. Chaudhury, “Fast separable nonlocal means,” SPIE Journal of Electronic Imaging, 25(2), 023026 (2016). 14 E. S. Gastal and M. M. Oliveira. “Domain transform for edge-aware image and video processing,” ACM Transactions on Graphics (ToG), 30(4), 69 (2011). 15 BM3D Image Database, http://www.cs.tut.fi/˜foi/GCF-BM3D. 16 KODAK Image Database, http://r0k.us/graphics/kodak/. 17 Z. Wang, A. C. Bovik, H. R. Sheikh, and E. P. Simoncelli, “Image quality assessment: From error visibility to structural similarity,” IEEE Transactions on Image Processing, 13(4), pp. 600-612 (2004). 18 M. Elad and M. Aharon, “Image denoising via sparse and redundant representations over learned dictionaries,” IEEE Transactions on Image Processing, 15(12), pp. 3736-3745 (2006). 19 K. Dabov, A. Foi, V. Katkovnik, and K. Egiazarian, “Image denoising by sparse 3-D transformdomain collaborative filtering,” IEEE Transactions on Image Processing, 16(8), pp. 2080-2095 (2007). 20 J. M. Batikian and M. Liebling, “Multicycle non-local means denoising of cardiac image sequences,” IEEE International Symposium on Biomedical Imaging, pp. 1071-1074 (2014). 21 C. Chan, R. Fulton, R. Barnett, D.D. Feng, and S. Meikle, “Post-reconstruction nonlocal means filtering of whole-body PET with an anatomical prior,” IEEE Transactions on Medical Imaging, 33(3), pp. 636-650 (2014). 22 G. Chen, P. Zhang, Y. Wu, D. Shen, and P.T. Yap, “Collaborative non-local means denoising of magnetic resonance images,” IEEE International Symposium on Biomedical Imaging, pp. 564-567 (2015). 23 D. Zeng, J. Huang, H. Zhang, Z. Bian, S. Niu, Z. Zhang, Q. Feng, W. Chen, and J. Ma, “Spectral CT image restoration via an average image-induced nonlocal means filter,” IEEE Transactions on Biomedical Engineering, 63(5), pp. 1044-1057 (2016). 24 G. Treece, “The bitonic filter: linear filtering in an edge-preserving morphological framework,” IEEE Transactions on Image Processing, 25(11), pp. 5199-5211 (2016).
1cs.CV
arXiv:1803.10801v1 [math.GT] 28 Mar 2018 LENGTH FUNCTIONS ON CURRENTS AND APPLICATIONS TO DYNAMICS AND COUNTING VIVEKA ERLANDSSON AND CAGLAR UYANIK Contents 1. Introduction 2. Background 2.1. Curves on surfaces 2.2. Teichmüller space and the mapping class group 2.3. Measured Laminations 2.4. Geodesic Currents 2.5. Nielsen–Thurston classification 2.6. Length functions and the intersection number 3. Length functions on space of currents 3.1. Length of currents through Liouville currents 3.2. Stable length of currents 3.3. Stable length as a generalization of intersection length 4. Applications to counting curves 4.1. Thurston measure 4.2. Counting with respect to length functions 4.3. Orbits of currents 5. Dynamics of pseudo-Anosov homeomorphisms References 1 3 3 3 4 6 7 7 11 12 16 18 19 21 22 28 29 34 1. Introduction Geodesic currents are measure theoretic generalizations of closed curves on hyperbolic surfaces and they play an important role, among many other things, in the study of the geometry of Teichmüller space (see, for example, [Bon86, Bon88]). The set of all closed curves sits naturally as a subset of the space of currents, and various fundamental notions such as geometric intersection number and length of curves extend to this more general setting of currents. The aim of this (mostly expository) article is twofold. We first explore a variety of length functions on the space of currents, and we survey recent 1 2 V. ERLANDSSON AND C. UYANIK work regarding applications of length functions to counting problems. Secondly, we use length functions to provide a proof of a folklore theorem which states that pseudo-Anosov homeomorphisms of closed hyperbolic surfaces act on the space of projective geodesic currents with uniform north-south dynamics, see Theorem 5.1. More precisely, let S be a closed, orientable, finite type surface of genus g ≥ 2 and denote the space of geodesic currents on S by Curr(S). By a length function on Curr(S) we mean a function that is homogeneous and positive (see Definition 2.2). There are many ways to define a length of a closed curve on S: a Riemannian metric on S naturally induces a notion of length, a generating set of π1 (S) gives the notion of word length of a curve, and given a fixed (filling) curve γ one can consider a combinatorial length given by the curves intersection number with γ. We will see that all these notions of length give rise to continuous length functions on Curr(S). As a first example, in section 2.6, we will see that Bonahon’s intersection form, which is an extension of the geometric intersection number of curves to currents, induces a continuous length function on Curr(S). We also use this intersection form to prove the uniform north-south dynamics result mentioned above (see section 5). In section 3 we explore other notions of length of curves that have continuous extensions to length functions on Curr(S). In section 3.1 we use Liouville currents to extend the length of curves given by any (possibly singular) nonpositively curved Riemannian metric on S to a continuous length function on Curr(S), as well as the word length with respect to so-called simple generating sets of π1 (S) (see Theorem 3.3 and Corollary 3.5). Next, we explore length functions with respect to any Riemannian metric on S (respectively the word length with respect to an arbitrary generating set) and explain why the corresponding stable lengths extend to continuous length functions on Curr(S), see Theorem 3.6. In section 4, we apply the results of section 3 to problems regarding counting curves on surfaces. Mirzakhani proved that the asymptotic growth rate of the number of curves of bounded hyperbolic length, in each mapping class group orbit, is polynomial in the length (see Theorem 4.1 for the precise statement). We explain how to use continuous length functions on Curr(S) to generalize her result to other notions of length of curves, and show that the same asymptotic behavior holds for all lengths discussed above (see Theorem 4.3 and Corollary 4.9). These results appeared in [ES16, Erl16, EPS16] and here we attempt to give a clear outline of the logic behind these proofs. LENGTH FUNCTIONS AND APPLICATIONS TO DYNAMICS AND COUNTING 3 Acknowledgments: We are grateful to David Constantine, Spencer Dowdall, Ilya Kapovich, Chris Leininger, Kasra Rafi, Juan Souto and Weixu Su for interesting conversations throughout this project. We thank Dave Futer for asking a question that led to Corollary 5.6. The first author also thanks the School of Mathematics at Fudan University and Vanderbilt University for their hospitality, and gratefully acknowledges support from the NSF grant DMS-1500180 (A. Olshanskii and M. Sapir). 2. Background 2.1. Curves on surfaces. Throughout this article, we let S be a closed, orientable, finite type surface of genus g ≥ 2. By a curve γ on S we mean a (free) homotopy class of an immersed, essential, closed curve. That is, the homotopy class of the image of an immersion of the unit circle S 1 → S, where the image is not homotopic to a point. We say the curve is simple if the immersion is homotopic to an embedding. We identify a curve with its corresponding conjugacy class, denoted [γ], in the fundamental group π1 (S). Furthermore, we assume curves to be primitive, that is γ , η k for any k > 1 and η ∈ π1 (S). By a multicurve we mean a union of finitely many weighted curves, that is n Ä a i γi i1 where a i > 0 and γi is a curve for each i. We say the multicurve is integral if a i ∈ Z for all i, and that it is simple if the curves γi are simple and pairwise disjoint. 2.2. Teichmüller space and the mapping class group. A hyperbolic structure on a surface S is a collection of charts {(U i , ψ i )} such that (1) {U i } is an open cover of S, (2) the map ψ i : U i → H2 is an orientation preserving homeomorphism onto its image for each i, (3) For each i, j such that U i ∩ U j , ∅ the restriction of ψ j ◦ ψ−1 to each i + 2 component of U i ∩ U j is an element of Isom (H ). The surface S together with a hyperbolic structure is called a hyperbolic surface. Cartan–Hadamard theorem asserts that a closed hyperbolic surface is isometrically diffeomorphic to H2 /Γ where Γ is a torsion free discrete subgroup of Isom+ (H2 ). A marked hyperbolic surface is a pair (X, f ) where (1) X  H2 /Γ is a hyperbolic surface, and (2) f : S → X is an orientation-preserving homeomorphism. 4 V. ERLANDSSON AND C. UYANIK Given a marked hyperbolic surface (X, f ), we can pull back the hyperbolic structure on X by f to one on S. Conversely, given a hyperbolic structure on S, the identity map id : S → S makes (S, id) into a marked hyperbolic surface. The Teichmüller space of S is the set Teich(S)  {(X, f )}/∼ of equivalence classes of marked hyperbolic surfaces, where two hyperbolic surfaces (X, f ) and (Y, g) are equivalent if g ◦ f −1 is homotopic to an isometry from X to Y. The mapping class group Mod(S) of S is the group of isotopy classes of orientation-preserving homeomorphisms of S; in other words, Mod(S)  Homeo+ (S)/Homeo0 (S) where Homeo0 (S) is the connected component of the identity in the orientation preserving homeomorphism group Homeo+ (S). The mapping class group Mod(S) acts on Teich(S) naturally by precomposing the marking map, i.e. for ϕ ∈ Mod(S), and [(X, f )] ∈ Teich(S) choose a lift Φ ∈ Homeo+ (S) of ϕ and define ϕ[(X, f )]  [(X, f ◦ Φ)]. 2.3. Measured Laminations. A geodesic lamination on S is a closed subset L of S that is a union of simple, pairwise disjoint, complete geodesics on S. The geodesics in L are called the leaves of the lamination. A transverse measure λ on L is an assignment of a locally finite Borel (Radon) measure λ |k on each arc k transverse to L so that (1) If k 0 is a subarc of an arc k, then λ |k0 is the restriction to k 0 of λ |k ; (2) Transverse arcs which are transversely isotopic have the same measure. A measured lamination is a pair (L, λ) where L is a geodesic lamination and λ is a transverse measure. In what follows, we will suppress L and write λ for brevity. The set of measured laminations on S is denoted by ML(S), and endowed with the weak-* topology: a sequence λ n ∈ ML(S) converges to λ ∈ ML(S) if and only if ∫ ∫ f dλ n −→ k f dλ k for any compactly supported continuous function f defined on a generic transverse arc k on S. An easy example of a measured geodesic lamination is given by a simple curve γ on S, together with the transverse measure λ γ : for each transverse arc k the transverse measure is the Dirac measure λ γ|k which counts the number of intersections with γ, i.e. for any Borel subset B of k, we have λ γ|k (B)  |B ∩ γ|. The set of measured geodesic laminations coming from LENGTH FUNCTIONS AND APPLICATIONS TO DYNAMICS AND COUNTING 5 weighted simple curves λ γ is dense in ML(S), see [PH92]. We denote the subset of ML(S) coming from simple integral multicurves by MLZ (S). The space of projective measured laminations is defined as the quotient P ML(S)  ML(S)/R+ and the equivalence class of a measured geodesic lamination in P ML(S) is denoted by [λ]. We endow P ML(S) with the quotient topology. The space ML(S) of measured laminations is homeomorphic to R6g−6 and has a Mod(S)-invariant piecewise linear manifold structure (see, for example, [PH92]). This piecewise linear structure is given by train track coordinates. We refer the reader to [Thu80] and [PH92] for a detailed discussion of train tracks and only recall the relevant notions for our purposes. Let τ be a smoothly embedded 1-complex in S, i.e. an embedded complex whose edges are smootly embedded arcs with well-defined tangent lines at the end-points. A complementary region of τ is the metric completion of a connected component of S \ τ. We say τ is a train-track on S if in addition it satisfies the following properties: (1) at each vertex, called switches, the tangent lines to all adjacent edges agree (2) at each vertex the set of adjacent edges can be divided into two sets according to the direction of the tangent line; we require each of these sets to be non-empty at every vertex (3) doubling each complementary region gives a cusped surface with negative Euler characteristic. A train-track is called maximal if the complementary regions to τ are all triangles. A simple closed curve, or more generally a measured lamination (L, λ), is carried by τ if there is a smooth map g : S → S such that (1) g : S → S is isotopic to the identity, (2) the restriction of g to L is an immersion, (3) g(L) ⊂ τ. There is a finite collection of train tracks T  {τ1 , τ2 , . . . , τn } such that for all λ ∈ ML(S) there is a τi ∈ T which λ is carried by. The set of measured laminations carried by a train track is full dimensional if and only if the train track is maximal. Now, each maximal train track τ determines a cone C(τ) in R6g−6 , given by the solutions to the so called switch equations, and we have a homeomorphism between all laminations carried by τ and C(τ). Moreover, the integer points in C(τ) is in one to one correspondence with the integral multicurves in MLZ (S) carried by τ. 6 V. ERLANDSSON AND C. UYANIK 2.4. Geodesic Currents. Consider a hyperbolic metric ρ on S and let S̃ be the universal cover equipped with the pullback metric ρ̃. Let G( ρ̃) denote 1 denote the boundary at infinity of the set of complete geodesics in S̃. Let S∞ S̃. Note that since ρ̃ is hyperbolic, S̃ is isometric to H2 and its boundary is homeomorphic to the unit circle S 1 . Each geodesic is uniquely determined 1 . Hence we can identify the set of geodesics by its pair of endpoints on S∞ with the double boundary 1 1 G(S̃)  S∞ × S∞ \ ∆)/(x, y) ∼ (y, x)  where ∆ denotes the diagonal. That is, G(S̃) consists of unordered pair of distinct boundary points, and we refer to it as the space of geodesics of S̃. Note that G(S̃) is independent of the metric ρ. Indeed, if ρ0 is another geodesic metric on S, then the universal cover S̃ equipped with the pullback metric ρ̃0 is quasi-isometric to H2 and this quasi-isometry extends to a homeomorphism of the boundaries at infinity (see [AL] for the details). Hence G(S̃) is well-defined without a reference to a metric. The fundamental group π1 (S) acts naturally on S̃ by deck transformations, 1 and G(S̃). For any (geodesic) and this action extends continuously to S∞ metric ρ the map ∂ρ : G( ρ̃) → G(S̃) that maps each geodesic to its pair of endpoints is continuous, surjective and π1 (S)-invariant, and a homeomorphism when ρ is negatively curved. A geodesic current on S is a locally finite Borel measure on G(S̃) which is invariant under the action of π1 (S). We denote the set of all geodesic currents on S by Curr(S) and endow it with the weak-* topology: A sequence µ n ∈ Curr(S) of currents converge to µ ∈ Curr(S) if and only if ∫ ∫ f dµ n −→ f dµ for all continuous, compactly supported functions f : G(S̃) → R. As a first example of a geodesic current, consider the preimage under the covering map in S̃ of any closed curve γ on S, which is a collection of complete geodesics in S̃. This defines a discrete subset of G(S̃) which is invariant under the action of π1 (S). The Dirac (counting) measure associated to this set on G(S̃) gives a geodesic current on S. The map from the set of curves on S to Curr(S) that sends each curve to its corresponding geodesic current, as above, is injective. Hence, we view the set of curves on S as a subset of Curr(S). In fact, Bonahon showed that the set of all weighted curves is dense in Curr(S) [Bon86]. We identify a curve γ with the current it defines, and by abuse of notation we denote both by γ. LENGTH FUNCTIONS AND APPLICATIONS TO DYNAMICS AND COUNTING 7 Another important subset of geodesic currents is given by measured laminations. Let (L, λ) be a measured lamination and consider its preimage L̃ in S̃ which is a collection of pairwise disjoint complete geodesics. The lift L̃ is a discrete subset of G(S̃) which is π1 (S)-invariant. Hence the associated Dirac measure on L defines a geodesic current on S. Moreover this measure agrees with the transverse measure λ, see [AL] for the details. Hence we view ML(S) as a subset of Curr(S) as well. A current ν ∈ Curr(S) is called filling if every complete geodesic in S̃ transversely intersects a geodesic in the support of ν in G(S̃). Note that this definition agrees with the classical notion of filling curves: a curve γ defines a filling current if and only if γ is filling as a curve, i.e. S \ γ is a union of topological disks. 2.5. Nielsen–Thurston classification. Thurston discovered a Mod(S)-equivariant compactification of the Teichmüller space by the space of projective measured laminations (see section 2.3 for definitions) and using the action of Mod(S) on Teich(S)  Teich(S) ∪ P ML(S) showed: Theorem 2.1 (Nielsen-Thurston classification). [Thu88, FLP12] Each ϕ ∈ Mod(S) is either periodic, reducible or pseudo-Anosov. Furthermore, pseudoAnosov mapping classes are neither periodic nor reducible. Here ϕ ∈ Mod(S) is called periodic if there exist a k ≥ 0 such that ϕ k is isotopic to the identity. The map ϕ is called reducible if there is a collection C of disjoint simple curves on S such that ϕ(C) is isotopic to C. Finally, ϕ ∈ Mod(S) is called pseudo-Anosov if there exists a filling pair of transverse, measured laminations (L + , λ+ ) and (L − , λ− ), a number α > 1 called the stretch factor, and a representative homeomorphism ϕ0 of ϕ such that ϕ0(L + , λ+ )  (L + , αλ+ ) and 1 λ − ). α The measured laminations (L + , λ+ ) and (L − , λ− ) are called the stable lamination and the unstable lamination respectively. We will suppress the L and write λ + and λ − respectively. ϕ0(L − , λ− )  (L − , 2.6. Length functions and the intersection number. Definition 2.2. A length function on the space of geodesic currents is a map ` : Curr(S) → R which is homogeneous and positive, i.e. `(aµ)  a`(µ) 8 V. ERLANDSSON AND C. UYANIK for any a > 0 and µ ∈ Curr(S), `(µ) ≥ 0 for all µ ∈ Curr(S) and `(µ)  0 iff µ  0. We say that a map ` on the set of curves on S is a length function if it is a positive function, i.e. `(γ) > 0 for all curves γ on S. Note that this agrees with the definition above, when viewing the set of curves as a subset of the space of geodesic currents, since we assume all curves to be primitive and essential. Given two curves γ, η on S, their (geometric) intersection number, denoted i(γ, η), is defined as the minimum number of transverse intersections between all transverse representatives of the homotopy classes of γ and η. That is  i(γ, η)  min |γ0 t η0 | | γ0 ∼ γ, η0 ∼ η where ∼ denotes homotopic. We note that i(γ, γ)  0 if and only if γ is a simple curve. Moreover, an equivalent description of the intersection number of two distinct curves γ and η is the following. Let ρ be a hyperbolic metric on S and S̃ be the universal cover equipped with the pullback metric ρ̃. Let γ̃ be a geodesic representative of a lift of γ to S̃. Let x be a point on γ̃ and consider the bounded segment δ γ of γ̃ between x and γ(x). Consider the set of lifts of η and take their geodesic representatives. Then the intersection number i(γ, η) is exactly the same as the number of the lifts of η that intersect (necessarily transversely) δ γ . This description of the intersection number will be helpful below. Viewing the set of curves as a subspace of the space of geodesic currents, it is natural to ask if the intersection number extends, in a nice way, to Curr(S). Indeed, Bonahon [Bon88] showed that there is a unique continuous extension of the intersection number to the space of geodesic currents: Theorem 2.3. [Bon88, Proposition 4.5] There is a unique continuous, symmetric, bilinear form i(·, ·) : Curr(S) × Curr(S) → R≥0 such that i(γ, η) agrees with the geometric intersection number whenever γ, η are curves on S. Here we give the definition of this intersection form and explain how it induces length functions on Curr(S). For the definition we follow the exposition presented in [AL] and refer to that paper for more details. Let G 2 (S̃) ⊂ G(S̃) × G(S̃) be the subset defined by G 2 (S̃)    {x, y}, {z, w} ∈ G(S̃) × G(S̃) \ ∆ |{x, y}, {c, d} link where ∆ represents the diagonal and we say that {x, y} and {z, w} link if x 1 \ {z, w}. Equivalently, G 2 (S̃) and y belong to different components of S∞ LENGTH FUNCTIONS AND APPLICATIONS TO DYNAMICS AND COUNTING 9 consists of pairs of geodesics in S̃ that intersect transversely. The action of π1 (S) on S̃ induces a free and properly discontinuous action o G 2 (S̃) and hence the quotient map G 2 (S̃) → G 2 (S̃)/π1 (S) is a covering map. We define G 2 (S)  G 2 (S̃)/π1 (S). Now, let µ, ν ∈ Curr(S). Then µ × ν is a product measure on G(S̃) × G(S̃) and hence on G 2 (S̃). This descends to a measure on G 2 (S) by locally pushing forward µ × ν through the covering map, and the intersection of µ and ν is defined as the µ × ν-mass on G(S). That is i(µ, ν)  ∫ dµ × dν. G 2 (S) Let γ be a curve and identify it with the current it defines. Let µ ∈ Curr(S). Then i(γ, µ) can be defined as follows. As above, choose a hyperbolic metric ρ on S and consider the universal cover S̃ equipped with the pullback metric ρ̃. Take a lift of γ and let γ̃ be its geodesic representative. Let x be a point on γ̃ and consider the geodesic segment η γ from x to γ(x). Let G(η γ ) denote the set of geodesics that transversely intersect η γ and ∂ρ G(η γ ) the subset of G(S̃) obtained by identifying each geodesic in G(η γ ) with its pair of endpoints on 1 . Then S∞  i(γ, µ)  µ ∂ρ G(η γ ) , see Figure 1. In particular, we see that when µ is also (the current associated to) a curve on S, then the intersection form agrees with the geometric intersection number of curves on S. We record some useful facts about the intersection form: (1) If ν ∈ Curr(S) is filling, then i(ν, µ) , 0 for all µ ∈ Curr(S) \ {0}. (2) The intersection form is invariant under Mod(S). That is, if g ∈ Mod(S) then i(µ, ν)  i(g(µ), g(ν)) for any µ, ν ∈ Curr(S). (3) i(µ, µ)  0 if and only if µ ∈ ML(S). (4) If ν ∈ Curr(S) is filling and L > 0, then the set {µ ∈ Curr(S) | i(µ, ν) ≤ L} is a compact set. The first two statements follow from the definition of the intersection form, while the last two are results by Bonahon, see [Bon86]. We define the space of projective geodesic currents to be PCurr(S)  (Curr(S) \ {0}) /R+ . 10 V. ERLANDSSON AND C. UYANIK J x •γ̃x • I Figure 1. Intersection of a curve γ with a current µ: i(γ, µ)  µ(I × J). Here η γ is represented by the solid blue segment and ∂ρ G(η γ )  I × J. It follows from (4) above that PCurr(S) is a compact space. Next we show how to obtain continuous length functions on Curr(S) from the intersection form. Fix a filling current ν ∈ Curr(S). Define ` ν (µ)  i(ν, µ) for all µ ∈ Curr(S). By the linearity and continuity of the intersection form, ` ν is continuous and homogenous on Curr(S). Furthermore, since ν is filling, it follows from (1) above that ` ν is positive. Hence the function above defines a continuous length function ` ν : Curr(S) → R. Moreover, this is the unique continuous extension of the length function on the set of curves defined by ` ν (γ)  i(ν, γ) for all curves γ on S. In section 3 we will see that many other notions of lengths of curves have unique continuous extensions to length functions on Curr(S). We end this section by noting that the intersection form can also be defined for geodesic currents of surfaces with boundary, and refer reader to [DLR10] for the definitions. For simplicity of the exposition we assume throughout that S is a closed surface although the results presented here have generalizations that also hold for the case of compact surfaces. In the presence of cusps however, the intersection form (when defined) is no longer continuous unless we restrict our attention to currents with compact support. LENGTH FUNCTIONS AND APPLICATIONS TO DYNAMICS AND COUNTING 11 3. Length functions on space of currents Recall that by a curve on S we mean a free homotopy class of a primitive closed curve, and we view the set of curves on S as a subset of Curr(S). As before, a length function on Curr(S) is a positive, homogenous function, and a length function on the set of curves is any positive function. In section 2.6 we saw that the geometric intersection number on the set of curves extends continuously to a bilinear form on pairs of currents and hence, fixing a filling curve (or current) ν, the length function ` ν (γ)  i(ν, γ) on the set of curves, extends continuously to a length function on currents, defined by ` ν (µ)  i(ν, µ) for all µ ∈ Curr(S). There are many ways to define the length of a curve on a surface and it is natural to ask which other notions of length extends continuously to the space of currents. More concretely, let ρ be a (possibly singular) Riemannian metric on S. Then ρ naturally induces a length function ` ρ (·) on the set of curves where the length of a curve γ is defined to be the ρ-length of a shortest representative of γ. In the case when ρ is a negatively curved metric, this is the length of the unique geodesic representative in the homotopy class of γ. Another natural length function on the set of curves is given by first identifying a curve on S with a conjugacy class in the fundamental group π1 (S) and, then for a fixed a generating set of π1 (S), defining the length of a curve to be the minimal number of generators needed to represent the corresponding conjugacy class. In general, given a geodesic metric space (X, d) on which π1 (S) acts discretely and cocompactly by isometries, one can ask whether the translation length of a curve γ ` X (γ)  inf d(x, γ(x)) x∈X (3.1) extends continuously to a length function on the space of currents. Note that when X is the universal cover of S equipped with a Riemannian metric, or X is the Cayley graph with respect to a generating set of π1 (S), this length agrees with the notions described above. We will see that in many cases such a continuous extension exists. In particular, in section 3.1 below, we explain why it exists for any (possibly singular) non-positively curved Riemannian metric on S, through the use of Liouville currents and their relation to the intersection form on Curr(S). Similar arguments show that the word length with respect to certain (wellchosen) generating sets extends continuously to a length function on the space of currents. 12 V. ERLANDSSON AND C. UYANIK However, such a continuous extension does not always exist. Instead, we will see in section 3.2 that the stable length function defined by 1 ` X (γ n ) n→∞ n always extends continuously to a length function on Curr(S). Finally, in section 3.3, we will see that the two approaches of defining an extension (using intersection with a special current, and considering the stable length) are intimately related. sl X (γ)  lim 3.1. Length of currents through Liouville currents. In this section we explain how the length function of curves with respect to any (possibly singular) non-positively curved Riemannian metric on S can be extended continuously to a length function on the space of currents on S. First, fix a hyperbolic metric ρ on S. The hyperbolic length of a homotopy class of a closed curve γ is defined as the length of the ρ-geodesic representative, and denoted by ` ρ (γ). There exists a current associated with ρ, called its Liouville current and denoted by L ρ , whose intersection form with curves on S determines the length function induced by ρ, that is: i(γ, L ρ )  ` ρ (γ) (3.2) for all curves γ on S. Here we describe two equivalent definitions of the Liouville current and refer reader to [AL, Bon88, HP97, Ota90] for more details. Recall that a current is a π1 (S)-invariant Radon measure on 1 1 G(S̃)  S∞ × S∞ \ ∆ /(x, y) ∼ (y, x).  First we define the Liouville measure L on the hyperbolic plane H2 . Let G(H2 ) denote the set of all bi-infinite geodesics in H2 , which we identify with their endpoints on the unit circle S 1 . Let [a, b] and [c, d] be two non-empty disjoint intervals on S 1 . Define L ([a, b] × [c, d])  log (a − c)(b − d) (a − d)(b − c) (3.3) whenever a, b, c, d are four distinct points, and set L ([a, b] × [c, d])  0 if one of the intervals is a singleton. The map L extends uniquely to a Radon measure on G(H2 ) (see [Bon88]) and is invariant under the action of π1 (S) since the cross-ratio in (3.3) is invariant under this action. In the disk model of H2 we have, using local coordinates (e iα , e iβ ), Lρ  dαdβ |e iα − b iβ | 2 LENGTH FUNCTIONS AND APPLICATIONS TO DYNAMICS AND COUNTING 13 where dαdβ is the Lebesgue measure defined by the Euclidean metric on S1 , and in particular L is absolutely continuous with respect to the Lebesgue measure (see, for example, [AL]). Now, given a hyperbolic metric ρ on S the universal cover S̃ with the pull-back metric ρ̃ is isometric to H2 and the 1 is homeomorphic to S 1 . We define L , the Liouville current boundary S∞ ρ with respect to ρ, to be the pull-back of L through this homeomorphism. Alternatively, one can define the Liouville current in the following way. Let η̃ be a ρ̃-geodesic arc in S̃, parametrized at unit-speed by η̃ : (−a, a) → η̃(t). Let G( η̃) denote the set of all ρ̃-geodesics in S̃ that intersect η̃ transversely. Note that each geodesic in G(η̃) is uniquely determined by its point of intersection η̃(t) with η̃ and its angle of intersection (chosen in an arbitrary but consistent way). This gives rise to a homeomorphism h η : (−a, a) × (0, π) → G(η̃). Consider the measure on (−a, a) × (0, π) defined by 1 ds  sin(θ)dθdt. 2 We push forward this measure through h η to obtain a measure on G( η̃). Lastly, we further push the measure forward through the homeomorphism ∂ρ : G( ρ̃) → G(S̃) which maps each geodesic in G( η̃) to its endpoints. The resulting measure is a Radon measure on G(S̃). Furthermore, since π1 (S) acts by isometries on S̃, the measure is invariant under its action. This measure is the Liouville measure L ρ and agrees with the previous definition. While the closed formula in the first definition makes it easier to state, the construction involved in the latter makes (3.2) more natural to see. Indeed, integrating ds over G( η̃) for a unit-speed parametrized geodesic arc η̃ gives exactly the length of η̃. The existence of Liouville currents for hyperbolic metrics allows us to embed the Teichmüller space of S into the space of geodesics currents, as shown by Bonahon [Bon88]. More precisely, let (X, f ) be a point in the Teichmüller space, and ` X and L X be the corresponding length function on curves and the Liouville current, respectively. Then, we have: Theorem 3.1. [Bon88] The map (X, f ) 7→ L X defines an embedding Teich(S) ,→ Curr(S) satisfying i(γ, L X )  ` X (γ) for all curves γ on S. 14 V. ERLANDSSON AND C. UYANIK Note that, since the intersection form is continuous and bilinear on Curr(S)× Curr(S), as discussed in section 2.6, the hyperbolic length function has a continuous extension to a length function on Curr(S) by setting ` ρ (µ)  i(µ, L ρ ) for all µ ∈ Curr(S). The positivity of this function follows from the fact that the Liouville current is filling and hence i(µ, L ρ )  0 if and only if µ is the 0-current. Moreover, this extension is unique due to the following theorem by Otal [Ota90]. Theorem 3.2. [Ota90] Suppose µ1 , µ2 ∈ Curr(S). If i(µ1 , γ)  i(µ2 , γ) for all curves γ on S, then µ1  µ2 . More generally, let ρ be any metric on S, and let ` ρ (γ) denote the length of a shortest representative in the homotopy class of a curve γ. We say L ρ is a Liouville current for ρ if equation (3.2) holds, that is i(γ, L ρ )  ` ρ (γ) for all curves γ on S. Note that when such a current exists it must be unique and is necessarily a filling current. As explained above, a Liouville current exists for any hyperbolic metric on S. Otal [Ota90] showed the existence of a Liouville current for any (variable) negatively curved metric on S. By work of Duchin-LeiningerRafi [DLR10] and Bankovic-Leininger [BL18] such a current also exists for any non-positively curved Euclidean cone metric on S. Finally, Constantine [Con18] extended these results to any non-positively curved (singular) Riemannian metric, giving the Liouville current associated to any such metric (in fact, also for the larger class of so-called no conjugate points cone metrics, see [Con18] for the definition). We record a consequence of this sequence of results here: Theorem 3.3. [Con18, Proposition 4.4] Let ρ be any (possibly singular) nonpositively curved Riemannian metric on S and let ` ρ (γ) denote the ρ-length of a shortest representative in the homotopy class of γ. Then the length function ` ρ on the set of curves extends continuously to a length function ` ρ : Curr(S) → R. Moreover, this extension is unique. We note that Liouville currents also exist in other settings. Notably, Martone–Zhang proved the existence of such currents in the context of Hitchin and maximal representations, see [MZ16] for details. In another direction, Sasaki proved the existence of a bilinear intersection functional on LENGTH FUNCTIONS AND APPLICATIONS TO DYNAMICS AND COUNTING 15 the space of subsets currents on surfaces, and proved Liouville type equalities, [KN13, Sas17]. We refer interested reader to these papers as they are beyond the scope of this paper. From a more algebraic viewpoint, one can consider the word metric on π1 (S) with respect to a fixed generating set: We choose a base point p on S and identify the elements of π1 (S) with loops based at p. Since this group is finitely generated, we choose a finite, symmetric generating set G  { g1±1 , g 2±1 , . . . , g ±1 n }. Given a conjugacy class [γ] (or, equivalently, a homotopy class of a curve γ) we define the word length of the conjugacy class [γ] with respect to G to be n ` G (γ)  min |k 1 | + |k2 | + · · · |k m | | g ik11 g ik22 ··· g ikmm o ∈ [γ] . Note that this definition is independent of the choice of representative of [γ]. We say a generating set G is simple if the loops g i in G are simple and pairwise disjoint except at the base point p (see Figure 2 for an example). Note that there are many such generating sets, including any one vertex triangulation of S or the standard generating set for a genus g surface {a 1 , b 1 , a 2 , b 2 , . . . a g , b g } with the relation [a 1 , b 1 ] · · · [a g , b g ]  1. η α δ β γ Figure 2. A genus 2 surface S with a simple (non-minimal) generating set G  {α±1 , β±1 , γ±1 , δ±1 , η±1 }. In [Erl16] it is shown that, given a simple generating set G, there exists a collection of curves ν  ν(G), depending only on the generating set, such that the word length of a curve is given exactly by its geometric intersection number with this curve: Theorem 3.4. [Erl16, Theorem 1.2] Let G be a simple generating set for π1 (S). Then there exists a collection of curves ν  ν(G) on S such that ` G (γ)  i(ν, γ) for all curves γ in S. Moreover, ν is unique with this property. 16 V. ERLANDSSON AND C. UYANIK By viewing the set of curves as a subset of Curr(S), if G is a simple generating set for π1 (S), then the above results says that there exists a (unique) Liouville current associated to the corresponding word metric. In particular, it follows that the word length extends continuously to the space of currents: Corollary 3.5. [Erl16, Corollary 1.3] Let G be a simple generating set for π1 (S). Then the word length with respect to G on the set of curves extends continuously to a length function ` G : Curr(S) → R. Moreover, this extension is unique. 3.2. Stable length of currents. There are many notions of lengths not covered by the Liouville currents explained above. Two such occasions are the length of a curve with respect to a Riemannian metric which attains positive curvature values at places, and the word length with respect to a non-simple generating set. In fact, in these settings such currents do not necessarily exist. For instance, if we consider the word metric with respect to a nonsimple generating set then we observe that the length function cannot extend continuously to a length function on the space of geodesic currents. To see this, consider the case where S is the once-punctured torus and let a, b be the standard generators for the free group π1 (S). Then, the word length with respect to the generating set G  {a ±1 , b ±1 , a ±2 }, does not extend to a continuous homogeneous function on Curr(S). Indeed, the sequence of  1 2n currents 2n a b converges to the current a as n → ∞ and hence if such a function ` G existed, continuity would imply that `G   1 2n a b → ` G (a)  1 2n while, on the other hand, homogeneity would imply `G  1 2n 1 n+1 1 a b  ` G (a 2n b)  → 2n 2n 2n 2  as n → ∞, a contradiction. However, as shown in [EPS16], if we consider the stable length of curves instead, which we describe below, this length function always extends continuously to the space of geodesic currents. Let X be any geodesic metric space on which π1 (S) acts discretely and cocompactly by isometries. For a conjugacy class [γ] in π1 (S) (or, equivalently, a curve γ on S), define its translation length ` X (γ) with respect to X as in (3.1). Then the stable length of [γ] is defined to be 1 1 sl X (γ)  lim ` X (γ n )  lim inf d(x, γ n (x)). n→∞ n n→∞ n x∈X LENGTH FUNCTIONS AND APPLICATIONS TO DYNAMICS AND COUNTING 17 Again, this definition is independent of the choice of the representative in the conjugacy class. In [EPS16] it is shown that, with X as above, this notion of length always extends continuously to Curr(S): Theorem 3.6. [EPS16, Theorem 1.5] Let X be a geodesic metric space on which π1 (S) acts discretely and cocompactly by isometries. Then the stable length function sl X on the set of curves extends continuously to a length function sl X : Curr(S) → R. Moreover, this extension is unique. The proof of Theorem 3.6 is rather involved, with the main difficulty being how to define the stable length of a current, and we will not explain it here, but refer reader to [EPS16]. Instead we give some consequences of Theorem 3.6. If we equip S with any Riemannian metric and let X be its universal cover S̃ we immediately get the following corollary: Corollary 3.7. Let ρ be any Riemannian metric on S. For a curve γ, let ` ρ (γ) be the ρ-length of a shortest representative. Then the stable length defined by 1 ` ρ (γ n ) n→∞ n has a unique continuous extension to a length function st ρ (γ)  lim st ρ : Curr(S) → R+ . Similarly, if we let X be the Cayley graph with respect to a finite generating set of π1 (S) we also have: Corollary 3.8. Let G be any finite generating set for π1 (S). Let ` G (γ) denote the shortest word length of a representative in the conjugacy class of γ. Then the stable length defined by 1 st G (γ)  lim ` G (γ n ) n→∞ n has a unique continuous extension to a length function st G : Curr(S) → R+ . We remark that in [EPS16] Theorem 3.6 was proved in a more general setting, namely when the surface group is replaced by any torsion free Gromov hyperbolic group Γ. It is shown that in this setting, the corresponding stable length of a conjugacy class extends to a continuous length function on the space of (oriented) currents on Γ. This space, introduced by Bonahon [Bon91] and denoted Curr(Γ), is defined to be the set of Γ-invariant Radon measures on the double boundary (∂Γ × ∂Γ \ ∆) /∼ 18 V. ERLANDSSON AND C. UYANIK where ∂Γ is the Gromov boundary of Γ and where we identify (γ1 , γ2 ) with (γ2 , γ1 ) (see, for example, [KB02]). Since we will not use this more general setting here we refer to [Bon91] and [EPS16] for the precise definitions. We also remark that Theorem 3.6 was proved by Bonahon [Bon91] in the case when X is "uniquely geodesic at infinity", i.e. any two points on the (Gromov) boundary at infinity of X determine a unique geodesic between them. However, this condition is not satisfied in general for the universal cover of Riemannian metrics, nor for Cayley graphs. Finally we note that, in [Bon91], Bonahon remarks that it should be possible to remove not only the uniquely geodesic hypothesis, which Theorem 3.6 proves, but also the cocompact assumption. The proof of Theorem 3.6 in [EPS16] still requires Γ to act cocompactly on X and it is an interesting question whether it is a necessary condition. Question 3.9. Does Theorem 3.6 still hold for a surface group that acts discretely, but not cocompactly on X? It should be noted that the assumption on the action to be discrete cannot be removed, as shown by Bonahon [Bon91]. 3.3. Stable length as a generalization of intersection length. At first glance, extending length of curves to length functions on currents through the intersection length or by considering the stable length might seem like very different approaches. However, as we will observe below, the two notions can be unified: given a filling current ν one can construct a metric space (X, d) on which π1 (S) acts discretely and cocompactly by isometries, and such that sl X (γ)  i(ν, γ) for all curves γ on S. The basis for our metric is a semi-distance presented by Glorieux in [Glo17], described below. Fix a hyperbolic metric ρ on S and let S̃ be the universal covering equipped with the pull back metric. We define a metric space (X, d) in the following way. As in section 3.1, for a geodesic arc η̃ let G( η̃) denote the set of geodesics in S̃ that intersect η̃ transversely. Let ∂ρ G( η̃) denote the image of G( η̃) under the homeomorphism that maps each geodesic to its pair of endpoints. Let ν be a filling current in Curr(S). For two distinct points x, y ∈ S̃, define d 0(x, y)  ν(∂ρ G( η̃)) where η̃ is the geodesic arc connecting x and y. Set d 0(x, x)  0 for all x ∈ S̃. Note that d 0 is symmetric, i.e. d 0(x, y)  d 0(y, x), and d 0(x, y) ≥ 0 for all x, y ∈ S̃ (although d 0 might not separate points). Furthermore, by definition LENGTH FUNCTIONS AND APPLICATIONS TO DYNAMICS AND COUNTING 19 of the intersection number (see section 2.6), if x lies on the axis of an element γ ∈ π1 (S) then d 0(x, γ(x))  i(ν, γ). (3.4) Moreover, in [Glo17] it is shown that (1) d 0 satisfies the triangle inequality, i.e. d 0(x, y) ≤ d 0(x, z) + d 0(z, y) for all x, y, x ∈ S̃, (2) i(ν, γ) ≤ d 0(x, γ(x)) for all x ∈ S̃ and γ ∈ π1 (S). In particular, d 0 is a semi-distance. In [Glo17] d 0 was used to find the critical exponent for geodesic currents, here we use it to construct our desired metric space. Define X  S̃/∼ 0 where x ∼ y if and only if d (x, y)  0, equipped with the metric d induced by d 0. That is,  d [x], [y]  d 0(x, y) for all [x], [y] ∈ X, where x and y are any representatives of [x] and [y], respectively. Using 2 above and equation (3.4) we see that the stable length with respect to X agrees with the length function defined by intersection with ν: 1 1 sl X (γ)  lim inf d(x, γ n (x))  lim i(ν, γ n )  i(ν, γ) n→∞ n x∈X n→∞ n for any conjugacy class [γ] in π1 (S) (or, equivalently, any curve γ on S). Since ν is π1 (S)-invariant, π1 (S) acts by isometries on (X, d) and, since the action is cocompact on S̃ it is also cocompact on (X, d). Moreover, it is not hard to see that π1 (S) acts discretely on (X, d) since ν is filling: if there exists a sequence (γn ) in π1 (S) and x ∈ S̃ such that d(x, γn (x)) → 0 as n → ∞, then, by 2, i(ν, γn ) → 0 as n → ∞, contradicting the fact that ν is filling. We have the following result: Theorem 3.10. Let ν be any filling current. Then there exists a metric space X on which π1 (S) acts discretely and cocompactly by isometries such that sl X (γ)  i(ν, γ) for all curves γ on S.  4. Applications to counting curves In [Mir08, Mir16] Maryam Mirzakhani gives the asymptotic growth rate of the number of curves of bounded length, in each Mod(S)-orbit, as the length grows. As before, by a curve γ on S we mean a free homotopy class of a closed immersed curve, and its length ` ρ (γ) with respect to a metric ρ is the ρ-length of a shortest representative. If ρ is negatively curved, this 20 V. ERLANDSSON AND C. UYANIK is the ρ-length of the unique geodesic representative in the homotopy class. Given a curve γ0 on S and a hyperbolic metric ρ on S, Mirzakhani showed that the number of curves in the Mod(S)-orbit of γ0 as L grows is asymptotic to a constant multiple of L 6g−6 : Theorem 4.1. [Mir08, Mir16, Theorem 1.1] Let γ0 be a curve on S, and ρ be a hyperbolic metric on S. Then #{γ ∈ Mod(S) · γ0 | ` ρ (γ) ≤ L}  C γ0 · m ρ L 6g−6 for some C γ0 > 0, and m ρ  m Th ({λ ∈ ML(S) | ` ρ (λ) ≤ 1}) where m Th is the Thurston measure on ML(S). lim L→∞ The constant C γ0 in Theorem 4.1 is independent of the hyperbolic metric ρ. In fact, Mirzakhani [Mir08] showed that n γ0 C γ0  mg where n γ0 > 0 depends only on γ0 and mg  ∫ M m ρ dvolWP (4.1) where the integral is taken over the moduli space M  Teich(S)/Mod(S) with respect to the Weil–Petersson volume form. The Thurston measure is the natural Mod(S)-invariant locally finite measure on ML(S) given by the piecewise linear structure coming from train-track coordinates. See section 4.1 for details. The purpose of this section is to discuss a generalization of the theorem of Mirzakhani above, based on the previous section (see Theorem 4.3). We will explain why the same asymptotic behavior as in Theorem 4.1 holds for other metrics on S, in particular for any Riemannian metric. The results presented are contained in [ES16], [Erl16] and [EPS16]. The idea behind the proof of the generalization to other metrics crystallized over the above series of papers, so we provide a unified but brief explanation for the statements and proofs of these results. Remark 4.2. Theorem 4.1, as well as its generalization Theorem 4.3 below, holds for any finite type, orientable surface of negative Euler characteristic (other than the thrice punctured sphere). That is, we can allow S to have n punctures or boundary components, and the same asymptotic behavior holds (where we replace 6g − 6 in the exponent with 6g − 6 + 2n). However, LENGTH FUNCTIONS AND APPLICATIONS TO DYNAMICS AND COUNTING 21 somewhat surprisingly, orientability is a necessary condition. For nonorientable surfaces the theorems fail, see [Gen17, Mag17]. 4.1. Thurston measure. Recall, from section 2.3, that the space ML(S) of measured laminations has a Mod(S)-invariant piecewise linear manifold structure. Moreover, the PL-manifold is equipped with a Mod(S)-invariant symplectic structure, which gives rise to a Mod(S)-invariant measure in the Lebesgue class. This is the Thurston measure m Th . It is infinite, but locally finite, and satisfies m Th (L · U)  L 6g−6 m Th (U) for U ⊂ ML(S) and L > 0 (see [Thu80]). Furthermore, as shown by Masur [Mas85], the Thurston measure m Th is ergodic with respect to the Mod(S)action on ML(S), and is the only (up to scaling) invariant measure in the Lebesgue class. In this section we explain how one can see the Thurston measure (up to scaling) as a limit of a sequence of measures, which gives perhaps a more intuitive feeling of what this measure is. For each L, define a measure on ML(S) by mL  1 L 6g−6 Õ γ∈MLZ (S) δ1γ L where δ x denotes the Dirac measure centered at x and MLZ (S) is the subset of ML(S) corresponding to integral multicurves. We will show that, as L → ∞, these measures converge to a multiple of the Thurston measure, i.e. lim L→∞ 1 L6g−6 Õ δ 1 γ  c · mTh γ∈MLZ (S) L (4.2) for some c > 0. Note that each m L is Mod(S)-invariant, and hence so is any limit. We will show that the limit is moreover in the Lebesgue class and it follows that it must be a multiple of the Thurston measure. Fix a finite collection T of train tracks, giving the piecewise linear structure of ML(S). Let τ ∈ T and consider the homeomorphism f τ that maps the subset of ML(S) consisting of all measured laminations carried by τ to the corresponding cone C(τ) in R6g−6 (i.e. the set of solutions to the switch equations of τ). Now, the image under f τ of the set of all integral multicurves carried by τ corresponds to the integer points in C(τ). Hence pushing the measure m L forward through f τ we get the following measure on (the cone in) R6g−6 : Õ 1 L m τ  6g−6 δ 1 p. L L 6g−6 p∈Z 22 V. ERLANDSSON AND C. UYANIK First we note that the family (m τL )L is precompact in the space of Radon measures on R6g−6 , meaning that any sequence of measures has a subsequence that weakly converges to a measure. To see this, let BR be a (closed) ball of radius R in R6g−6 . We will show that lim sup m τL (BR ) < ∞. (4.3) L→∞ Since the (closed) unit ball is compact in the weak-∗ topology, (4.3) implies precompactness of (m τL )L . Note that m τL (BR )  #{p ∈ Z6g−6 | p ∈ BR·L } (4.4) L 6g−6 and the right hand side converges to the Lebesgue measure of the ball of radius R. Hence (4.3) holds. Now let m be any limit point of (m τL )L . Then, (4.4) also implies that m is a translation invariant Borel measure on R6g−6 and hence must be a multiple of the Lebesgue measure (since this is the unique measure, up to scaling, with this property). We have: For for any (L n )n with L n → ∞ there exists a subsequence (L n k )k such that Lnk mτ  c ·L for some c > 0 as k → ∞, where L denotes the Lebesgue measure. Hence, to prove (4.2) we need to show that c is independent of the subsequence. Note that, as above,  # p ∈ Z6g−6 | p ∈ BL L m τ (B1 )  L 6g−6 and the right hand side converges as L → ∞ to the Lebesque measure of the unit ball B1 . Hence the limit of the right hand side does not depend on the subsequence and (4.2) follows. 4.2. Counting with respect to length functions. Given a hyperbolic metric ρ on S and its corresponding Liouville current L ρ , one can replace the length function ` ρ (·) in Theorem 4.1 with the intersection function i(L ρ , ·). In view of this, one can consider the following generalization of the limit appearing in the mentioned theorem: #{γ ∈ Mod(S) · γ0 | i(ν, γ) ≤ L} lim (4.5) L→∞ L6g−6 where γ0 is a curve on S and ν is any filling current. (Note that we require ν to be filling to guarantee that there are only finitely many curves intersecting ν a bounded number of times). In particular, by letting ν be a Liouville current for another metric, such as a variable negatively curved or Euclidean LENGTH FUNCTIONS AND APPLICATIONS TO DYNAMICS AND COUNTING 23 cone metric, this is equivalent to asking if the limit (4.5) exists with respect to this metric. In [ES16] it was shown that limit (4.5) exists for any filling current ν, and in fact, more generally when the intersection function i(ν, ·) is replaced by any continuous length function `(·) defined on the space of currents. Recall that we say ` is a length function on Curr(S) if it is homogeneous and `(µ) ≥ 0 for all currents µ and `(µ)  0 if and only if µ  0. Theorem 4.3. [ES16] Let ` : Curr(S) → R be any continuous length function and γ0 a curve on S. Then #{γ ∈ Mod(S) · γ0 | `(γ) ≤ L}  C γ0 · m ` L 6g−6 > 0 is the same constant as in Theorem 4.1, and lim L→∞ where C γ0 m `  mTh ({λ ∈ ML(S) | `(λ) ≤ 1}) . Here we give an outline of the arguments involved in proving Theorem 4.3, and refer to [ES16] for the details. The main idea to prove the convergence of the limit #{γ ∈ Mod(S) · γ0 | `(γ) ≤ L} (4.6) L6g−6 is to consider a sequence of measures on Curr(S) analogous to the measures on ML(S) in section 4.1. Let γ0 ∈ S be a curve and define, for each L > 0, a measure on Curr(S) by lim L→∞ m γL0  1 L 6g−6 Õ δ 1 γ. γ∈Mod(S)·γ0 L Note that each m γL0 is locally finite and invariant under the action of Mod(S). In fact, we will see that, as L → ∞ they converge to a Mod(S)-invariant measure on ML(S) that is absolutely continuous with respect to the Thurston measure, and hence, using the ergodicity of m Th , they must converge to a multiple of this measure: Theorem 4.4. [ES16, EPS16, Theorem 5.1] Let γ0 be any curve on S. Then lim m γL0  C γ0 · m Th L→∞ where C γ0 > 0 is the constant in Theorem 4.1. First we explain why Theorem 4.4 implies Theorem 4.3. Fix a continuous length function ` : Curr(S) → R and let B `  {µ ∈ Curr(S) | `(µ) ≤ 1}. 24 V. ERLANDSSON AND C. UYANIK Note that limit (4.6) is equivalent to lim m γL0 (B ` ). L→∞ Note that continuity of ` implies that B ` is a closed set. Also, for any measurable set U satisfying U ∩ L · U  ∅ for any positive L , 1, the scaling properties of the Thurston measure imply that mTh (U)  0. To see this, note that for all L , 1 m(U ∪ L · U)  m(U) + m(L · U)  m(U)(1 + L 6g−6 ) and letting L → 1 we get m Th (U)  2mTh (U), i.e. m Th (U)  0. In particular, mTh (∂B ` )  0. Hence, by the Portmanteau Theorem, see [Bil99], lim m γL0  C γ0 · m Th L→∞ implies that lim m γL0 (B ` )  C γ0 · m Th (B ` ) L→∞ where we view mTh as a measure on Curr(S) with full support on the subspace ML(S). Theorem 4.3 follows. Next we outline the arguments proving Theorem 4.4. In an attempt to aid the reader we first outline the main steps involved in the proof: (1) Let m γ0 be any limit point of the family (m γL0 )L , and note that it is Mod(S)-invariant. (2) We show that m γ0 is supported on ML(S), and (3) that m γ0 is absolutely continuous with respect to the Thurston measure m Th on ML(S). (4) Ergodicity of m Th with respect to Mod(S) together with the steps above, imply that m γ0  C · m Th for some C > 0. (5) Finally, using Mirzakhani’s theorem (Theorem 4.1) we show that the constant C above does not depend on the subsequence and is in fact equal to C γ0 . Hence m γL0 → C γ0 · m Th . We formalize the conclusion of step 4 below: Proposition 4.5. [ES16, Proposition 4.1] Let (L n )n be any sequence of positive numbers such that L n → ∞. Then there is a subsequence (L n k )k such that Ln m γ0 k → C · m Th for some C > 0, as k → ∞. As above, due to the Portmanteau theorem, we get the following consequence: LENGTH FUNCTIONS AND APPLICATIONS TO DYNAMICS AND COUNTING 25 Corollary 4.6. Let ` : Curr(S) → R be a continuous length function and let (L n )n be any sequence of positive numbers such that L n → ∞. Then there is a subsequence (L n k )k such that Ln m γ0 k (B ` ) → C · m Th (B ` ) for some C > 0, as k → ∞. The key idea behind proving Proposition 4.5 is to associate to each (generic) curve in Mod(S) · γ0 a simple multi-curve. Specifically, we define a map π γ 0 : S γ 0 → MLZ (S) where S γ 0 ⊂ Mod(S) · γ0 is a generic subset such that (1 − )`(γ) < `(π γ 0 (γ)) < (1 + )`(γ). (4.7) We say a set S is generic if #S L6g−6 →0 as L → ∞. The existence of such a map results from the following observation, which says that the expected angle of self-intersection of a long curve is arbitrarily small. Theorem 4.7. [ES16, Theorem 1.2] Let ∠ (γ) denote the largest angle among the self-intersection angles of a curve γ. Let γ0 ⊂ S be a curve and ρ a hyperbolic metric. Then #{γ ∈ Mod(S) · γ0 | ` ρ (γ) ≤ L, ∠ (γ) ≥ δ} lim 0 L→∞ L6g−6 for all δ > 0. The proof of Theorem 4.7 is quite involved (see [ES16, Section 3.3]), but the general idea is that large self-intersection angles results in ideal 4-gons on the surface which most of the curves have to avoid. The set of curves on S which do not intersect a 4-gon must live on a proper subsurface and hence the number of these curves of length bounded by L must grow at a slower rate than L 6g−6 . This idea is inspired by the fact that the subspace of ML(S) of measured laminations carried by non-maximal train tracks (i.e. train tracks that have complementary regions larger than triangles) has dimension strictly less than 6g − 6. Armed with Theorem 4.7, we can resolve the self-intersections and end up with a simple multi-curve whose length is close to the length of the original curve (see [ES16, Section 3.4] for details), and this is the idea for the map π γ 0 . In particular, for any  > 0 there is an angle bound δ > 0 such that any curve γ with self-intersection angles less than δ is mapped to a simple multi-curve π γ 0 (γ) satisfying (4.7). These curves are what make up the generic set S γ 0 . 26 V. ERLANDSSON AND C. UYANIK We fix  > 0 and suppress the superscript in π γ 0 for ease of notation. It is clear that π γ0 is finite-to-one, but the main useful property of the map, and the key technical difficulty of the proof (details of which will be omitted here, see [ES16, Section 2.4]) is that it is uniformly bounded-to-1. That is: Lemma 4.8. [ES16, Proposition 3.9] There exists a constant K  K(γ0 ) > 0 such that |π−1 γ0 (λ)| < K (4.8) for all λ ∈ MLZ (S). We note that any limit point m γ0 is locally finite and Mod(S)-invariant since this is true for each m γL0 . We then use Lemma 4.8 to show that any limit point is also uniformly continuous with respect to the Thurston measure. To do so, we first push forward the measure m γL0 via π γ0 resulting in the following measures supported on ML(S): n γL0  1 L6g−6 Õ |π−1 γ0 (λ)|δ 1 λ . L λ∈MLZ (S) It is not difficult to see m γ0 is a limit point of the family (m γL0 )L if an only if it is a limit point of the family (n γL0 )L . In particular, any limit point is supported on ML(S), completing step 2. Now, (4.8) implies that n γL0  1 L 6g−6 Õ λ∈MLZ (S) |π −1 γ0 (λ)|δ 1 λ < K · L 1 L6g−6 Õ λ∈MLZ (S) δ1λ L and the right hand side converges to a multiple of m Th as L → ∞ (see (4.2)). In particular, any limit point of (n γL0 )L , and hence of (m γL0 )L , is absolutely continuous with respect to the Thurston measure, completing step 3. Next, recall that, by a result of Masur [Mas85], the Thurston measure is ergodic with respect to the action of Mod(S) on ML(S). Hence, since any limit m γ0 of (m γL0 )L is invariant under this action and absolutely continuous with respect to the Thurston measure, the only choice for m γ0 is a positive multiple of the Thurston measure. This completes the argument for proving Proposition 4.5 (and hence step 4). Finally, we use Mirzakhani’s result (Theorem 4.1) to complete the outline of the proof of Theorem 4.4. We need to show that the constant C in Proposition 4.5 is independent of the subsequence and that C is in fact equal to the constant C γ0 . LENGTH FUNCTIONS AND APPLICATIONS TO DYNAMICS AND COUNTING 27 Let ρ be a hyperbolic metric on S and L ρ the corresponding Liouville current. Let ` ρ : Curr(S) → R be the length function defined by ` ρ (µ)  i(µ, L ρ ) which agrees with the hyperbolic length on curves. Following the notation above, let B ` ρ  {µ ∈ Curr(S) | i(µ, L ρ ) ≤ 1}. By definition, m γL0 (B ` ρ )  #{γ ∈ Mod(S) · γ0 | ` ρ (γ) ≤ L} L 6g−6 . By Theorem 4.1 we know that the right hand side converges to C γ0 · m Th (B ` ρ ). In particular, m γL0 (B ` ρ ) converges and by Corollary 4.6 it must converge to C · m Th (B ` ρ ) for some C > 0. Hence we have C  C γ0 , completing step 5, and Theorem 4.4 follows. Lastly, we note that Theorem 4.3 together with the statements in section 3 imply that we have the asymptotic growth #{γ ∈ Mod(S) · γ0 | `(γ) ≤ L} ∼ const · L6g−6 for any of the length functions ` discussed there. In particular, it is true for the length induced by any non-positive (singular) Riemannian metric on S as well as for the stable length with respect to a geodesic metric space X on which π1 (S) acts discretely and cocompactly by isometries (see Theorem 3.6). However, in [EPS16] it is shown that it is enough for the stable length to extend to Curr(S) to conclude that the asymptotics above hold for the actual (translation) length. In particular, it holds for any Riemannian metric on S. Corollary 4.9. [EPS16, Corollaries 1.3 and 1.4] Let γ0 be a curve on S. If ρ is any (possibly singular) Riemannian metric on S and ` ρ is the corresponding length function on curves, then lim L→∞ #{γ ∈ Mod(S) · γ0 | ` ρ (γ) ≤ L} L 6g−6 exists and is positive. Similarly, if we replace the length function with the word length with respect to any finite generating set of π1 (S) then the corresponding limit also exists and is positive. 28 V. ERLANDSSON AND C. UYANIK 4.3. Orbits of currents. We end by remarking that one could also ask whether the limit in Theorem 4.3 exists if we look at the Mod(S)-orbit of any current instead of a curve. Rafi-Souto proved that this is indeed the case: Theorem 4.10. [RS17, Main Theorem] Let ` : Curr(S) → R be a continuous length function. For any filling current ν ∈ Curr(S) we have lim #{µ ∈ Mod(S) · ν | `(µ) ≤ L} L 6g−6 where C ν > 0 and m `  m Th ({λ ∈ ML | `(λ) ≤ 1}). L→∞  Cν · m` The constant C ν , as in Theorem 4.1 is independent of ` and can be written as nν mg where m g is the same constant as in (4.1). However, in [RS17] the constant n ν , in the case when ν is filling, is also described: Cν  n ν  m Th ({λ ∈ ML | i(ν, λ) ≤ 1}). The proof of Theorem 4.10 follows a similar logic to the proof of Theorem 4.3 above. However, in order to generalize Proposition 4.5 to hold also when γ0 is a filling current, they combine this proposition together with a deep result of Lindenstrauss-Mirzakhani [LM08] about the classifications of invariant measures on ML(S). We note that Theorem 4.10 holds also for surfaces with boundary, as do Theorems 4.1 and 4.3, but unlike the latter two which also work for surfaces with cusps, Theorem 4.10 requires S to be compact (or alternatively, that ν has compact support). As an application to Theorem 4.10, Rafi-Souto prove the asymptotic growth of lattice points in Teichmüller space with respect to the Thurston metric. As before, for a length function f : Curr(S) → R we let m f denote the constant m f  mTh ({λ ∈ ML(S) | f (λ) ≤ 1}) and we let m X denote the corresponding constant when f  ` X , the hyperbolic length on X ∈ Teich(S). Theorem 4.11. [RS17, Theorem 1.1] Let X, Y ∈ Teich(S). Then lim R→∞ #{ϕ ∈ Mod(S) | dTh (X, ϕ(Y)) ≤ R} e (6g−6)R  m DX m Y mg where dTh denotes the Thurston metric on Teich(S), m g is as above, and i(λ, µ) . λ∈ML(S) ` X (λ) DX (µ)  max LENGTH FUNCTIONS AND APPLICATIONS TO DYNAMICS AND COUNTING 29 The analogous result of Theorem 4.11 when the Thurston metric is replaced by the Teichmüller metric was proved, using different methods, by Athreya-Bufetov-Eskin-Mirzakhani in [ABEM12]. 5. Dynamics of pseudo-Anosov homeomorphisms The purpose of this section is to give a concise proof of a folklore result using Bonahon’s intersection function on the space of currents: pseudoAnosov homeomorphisms of closed hyperbolic surfaces act on the space of projective geodesic currents with uniform north-south dynamics (see Theorem 5.1 below). The idea of the proof is as follows: The set of non-zero currents that has zero intersection with the stable current/lamination is precisely the positive scalar multiples of the stable current/lamination. Similarly, the set of nonzero currents that has zero intersection with the unstable current/lamination is precisely the positive scalar multiples of the unstable current/lamination, see Lemma 5.2. Using Lemma 5.2 we define continuous functions J+ and J− on the space of projective currents which take the value 0 only on [λ + ] and [λ − ] respectively. We then use these functions to construct neighborhoods of [λ + ] and [λ− ] and use the properties of intersection function to get convergence estimates. The proof we present here is motivated by Ivanov’s proof of north-south dynamics in the setting of projective measured laminations [Iva92]. Theorem 5.1. Let S be closed hyperbolic surface and ϕ : S → S be a pseudoAnosov homeomorphism. Then ϕ acts on the space of projective geodesic currents PCurr(S) with uniform north-south dynamics: The action of ϕ on PCurr(S) has exactly two fixed points [λ + ] and [λ − ] and for any open neighborhood U± of [λ ± ] and a compact set K ± ⊂ PCurr(S) \ [λ ∓ ], there exist an exponent M ≥ 1 such that ϕ±n (K± ) ⊂ U± for all n ≥ M. The proof of Theorem 5.1 consists of putting together a series of lemmas, which we first state and prove. Lemma 5.2. Let ϕ : S → S be a pseudo-Anosov homeomorphism on a closed hyperbolic surface and λ + and λ − be the corresponding stable and unstable laminations for ϕ. Then, i(λ ± , µ)  0 if and only if µ  kλ ± for some k ≥ 0. Proof. Here we give a brief idea of the proof and refer reader to proof of [Uya15, Proposition 3.1] for details in the case of non-closed surfaces, where 30 V. ERLANDSSON AND C. UYANIK the proof is more involved. Let λ + be the stable lamination on S corresponding to the pseudo-Anosov homeomorphism f . The proof for λ − is almost identical. We first prove the easy direction of the statement. Namely, let µ  kλ + , and α > 1 be such that ϕ(λ + )  αλ+ . Then, by properties of the intersection number we have i(kλ+ , λ+ )  i(ϕ n (kλ + ), ϕ n (λ + ))  i(α n kλ + , α n λ + )  α2n i(kλ + , λ+ ) which implies i(kλ + , λ+ )  0. For the forward implication, we first cut the surface along the leaves of the stable lamination. The complementary regions are finite sided ideal polygons, [CB88, Proposition 5.3]. Let µ be any current such that i(µ, λ+ )  0. Let ` be any leaf in the support of µ, since the projection of this leaf onto the surface cannot intersect the leaves of the stable lamination transversely, there are two possibilities for this projection. Either ` projects onto a leaf of the lamination λ or it is a complete geodesic that is asymptotic to two different sides of a complementary polygon. In the second case, this leaf cannot support any measure, otherwise the corresponding current would not be locally finite. Hence µ and λ + have the same support, and unique ergodicity of λ + implies that µ  kλ+ .  Fix a filling current ν on S, and consider the following two functions J+ , J− : PCurr(S) → R≥0 defined by J+ ([µ])  i(µ, λ+ ) i(µ, λ− ) , J− [µ]  i(µ, ν) i(µ, ν) where µ is any representative of [µ]. Note that J+ , J− are well defined and continuous since the intersection function is continuous, and the denominator is non-zero by the choice of ν. Lemma 5.3. Let α be the stretch factor for the pseudo-Anosov element ϕ and let ν be a filling current. If K is a compact set in PCurr(S) \ [λ − ], then there exist C > 0 such that 1 C ≤ n n i(ϕ (µ), ν) α i(µ, ν) for all µ such that [µ] ∈ K. LENGTH FUNCTIONS AND APPLICATIONS TO DYNAMICS AND COUNTING 31 Proof. Since PCurr(S) is compact, there exist 0 < C 1 < ∞ such that J− ([µ])  i.e. i(µ, λ− ) ≤ C1 i(µ, ν) i(µ, λ− ) ≤ C 1 i(µ, ν) for all nonzero µ ∈ Curr(S). Furthermore, by Lemma 5.2 the quantity i(µ, λ− ) is non-zero for any µ such that [µ] ∈ PCurr(S) \ [λ − ]. Therefore, by compactness of K, there exist C 2 > 0 such that i(µ, λ− ) ≥ C 2 i(µ, ν) for all µ with [µ] ∈ K. From these two inequalities we obtain, for all µ such that [µ] ∈ K, i(ϕ n (µ), ν) ≥ Setting C  1 1 i(ϕ n (µ), λ− )  i(µ, ϕ−n (λ − )) C1 C1 1 i(µ, α n λ − )  C1 1 n  α i(µ, λ− ) C1 C2 n ≥ α i(µ, ν). C1 C1 , the conclusion of the lemma follows. C2  Lemma 5.4. Let U be an open neighborhood of [λ + ] and K be a compact set in PCurr(S) \ [λ− ]. There exist M1 > 0 such that ϕ n (K) ⊂ U for all n ≥ M1 . Proof. Since i(µ, λ+ )  0 iff [µ]  [λ + ], and PCurr(S) \ U is compact, the function J+ ([µ]) has a positive absolute minimum on the set PCurr(S) \ U, say  > 0. Therefore, it suffices to prove that J+ (ϕ n [µ]) <  for all [µ] ∈ K, and for all large n in order to obtain the conclusion of the lemma. On the other hand, PCurr(S) is compact, so the function J+ ([µ]) has an upper bound, i.e. there exists 0 < D < ∞ such that i(µ, λ+ ) ≤D i(µ, ν) for all µ. 32 V. ERLANDSSON AND C. UYANIK DC <  where α is α2M1 the stretch factor of ϕ and C is the constant given by Lemma 5.3. Then, for all [µ] ∈ K we have Let  > 0 be as above, and choose M1 > 0 such that J+ (ϕ n [µ])  i(ϕ n (µ), λ+ ) i(µ, ϕ−n (λ + ))  i(ϕ n (µ), ν) i(ϕ n (µ), ν) α−n i(µ, λ+ )  i(ϕ n (µ), ν) Cα−n i(µ, λ+ ) ≤ α n i(µ, ν) DC ≤ 2n <  α for all n ≥ M1 .  We are now ready to prove the theorem: Proof of Theorem 5.1. Using an argument symmetric to the one in the proof of Lemma 5.4, we can show that given any compact set K ⊂ PCurr(S)\[λ − ] and an open neighborhood U of [λ − ] there exist M2 > 0 such that ϕ−n (K) ⊂ U for all n ≥ M2 . The theorem now follows by setting M  max{M1 , M2 }.  In fact, we have much more precise information in terms of pointwise dynamics: Theorem 5.5. Let α > 1 be the stretch factor for ϕ. Then, for any [µ] , [λ− ], lim α−n ϕ n (µ)  c µ λ + for some c µ > 0, and for any n→∞ [µ0] , lim α n→∞ for some c µ0 [λ + ] −n ϕ−n (µ0)  c µ0 λ − > 0. Proof. The proof builds on the analogous result in the case of laminations, and nearly identical to the case where S has boundary components, see the proof of [Uya15, Theorem 3.4].  Recall, from section 3.1, that given a hyperbolic metric ρ on S the hyperbolic length extends to a continuous length function ` on Curr(S) given by `(µ)  i(L ρ , µ) LENGTH FUNCTIONS AND APPLICATIONS TO DYNAMICS AND COUNTING 33 for all µ ∈ Curr(S), where L ρ is the Liouville currents associated to ρ. As an application to this we get as a corollary to the north-south dynamics the following generalization, to all curves, of a well known result about simple closed curves: Corollary 5.6. For any pseudo-Anosov homeomorphism ϕ : S → S of a closed, orientable hyperbolic surface S, there exists M > 0 such that for any essential (not necessarily simple) closed curve γ on S, either `(ϕ k γ) > `(γ) or `(ϕ −k γ) > `(γ) for all k ≥ M. Proof. We will show that there exists M > 0 such that for all γ on S, the following holds: `(ϕ k γ) + `(ϕ−k γ) >2 `(γ) for all k ≥ M. Let L ρ be the Liouville current associated to the hyperbolic metric ρ as in section 3.1. That is, `(µ)  i(µ, L ρ ) for all µ ∈ Curr(S). Note that, for all k, `(ϕ k γ)  i(ϕ k γ, L ρ )  i(γ, ϕ−k L ρ ) and `(ϕ−k γ)  i(ϕ−k γ, L ρ )  i(γ, ϕ k L ρ ). Hence it suffices to prove that there exist M > 0 such that i(γ, ϕ k L ρ ) + i(γ, ϕ−k L ρ ) `(γ) >2 (5.1) for all γ and for all k ≥ M. Let α > 1 be the stretch factor for ϕ and λ + and λ − its stable and unstable lamination, respectively. Using the properties of the intersection form we have i(γk , ϕ k L ρ ) + i(γk , ϕ−k L ρ ) `(γk ) γk γk i , ϕk Lρ + i , ϕ−k L ρ `(γk ) `(γk )     γk γk k −k k k −k −k α i , α ϕ Lρ + α i , α ϕ Lρ `(γk ) `(γk )     γk is 1 for all k, they lie in a compact set and hence `(γk ) there exist µ ∈ Curr(S) such that (up to passing to a subsequence) γk lim  µ. k→∞ `(γk ) Since the length of 34 V. ERLANDSSON AND C. UYANIK On the other hand, Theorem 5.5 implies that, for some c0 , c 1 > 0 lim α−k ϕ k L ρ  c0 λ + and lim α−k ϕ−k L ρ  c1 λ − . k→∞ k→∞ Therefore, as k → ∞,     γk γk −k k −k −k i , α ϕ L ρ → c0 i(µ, λ+ ) and i , α ϕ L ρ → c1 i(µ, λ− ). `(γk ) `(γk ) Since {λ + , λ− } is a filling pair of currents, at least one of the quantities i(µ, λ+ ) or i(µ, λ− ) must be positive. Hence, since α k → ∞ as k → ∞, we have i(γk , ϕ k L ρ ) + i(γk , ϕ−k L ρ ) → ∞. `(γk ) In particular, there exists M > 0 such that (5.1) holds for all k ≥ 2.  References [ABEM12] Jayadev Athreya, Alexander Bufetov, Alex Eskin, and Maryam Mirzakhani. Lattice point asymptotics and volume growth on Teichmüller space. Duke Math. J., 161(6):1055–1111, 2012. [AL] J Aramayona and C Leininger. Hyperbolic structures on surfaces and geodesic currents, to appear in algorithms and geometric topics around automorphisms of free groups, advanced courses crm. [Bil99] Patrick Billingsley. Convergence of probability measures. Wiley Series in Probability and Statistics: Probability and Statistics. John Wiley & Sons, Inc., New York, second edition, 1999. A Wiley-Interscience Publication. [BL18] Anja Bankovic and Christopher J. Leininger. Marked-length-spectral rigidity for flat metrics. Trans. Amer. Math. Soc., 370(3):1867–1884, 2018. [Bon86] Francis Bonahon. Bouts des variétés hyperboliques de dimension 3. Ann. of Math. (2), 124(1):71–158, 1986. [Bon88] Francis Bonahon. The geometry of Teichmüller space via geodesic currents. Invent. Math., 92(1):139–162, 1988. [Bon91] Francis Bonahon. Geodesic currents on negatively curved groups. In Arboreal group theory (Berkeley, CA, 1988), volume 19 of Math. Sci. Res. Inst. Publ., pages 143–168. Springer, New York, 1991. [CB88] Andrew J. Casson and Steven A. Bleiler. Automorphisms of surfaces after Nielsen and Thurston, volume 9 of London Mathematical Society Student Texts. Cambridge University Press, Cambridge, 1988. [Con18] David Constantine. Marked length spectrum rigidity in nonpositive curvature with singularities. to appear in Indiana University Mathematics Journal, 2018. [DLR10] Moon Duchin, Christopher J. Leininger, and Kasra Rafi. Length spectra and degeneration of flat metrics. Invent. Math., 182(2):231–277, 2010. [EPS16] Viveka Erlandsson, Hugo Parlier, and Juan Souto. Counting curves, and the stable length of currents. to appear in JEMS, arxiv:1612.05980, 2016. [Erl16] Viveka Erlandsson. A remark on the word length in surface groups. to appear TAMS, arXiv:1608.07436, 2016. LENGTH FUNCTIONS AND APPLICATIONS TO DYNAMICS AND COUNTING [ES16] [FLP12] [Gen17] [Glo17] [HP97] [Iva92] [KB02] [KN13] [LM08] [Mag17] [Mas85] [Mir08] [Mir16] [MZ16] [Ota90] [PH92] [RS17] [Sas17] [Thu80] [Thu88] [Uya15] 35 Viveka Erlandsson and Juan Souto. Counting curves in hyperbolic surfaces. Geom. Funct. Anal., 26(3):729–777, 2016. Albert Fathi, François Laudenbach, and Valentin Poénaru. Thurston’s work on surfaces, volume 48 of Mathematical Notes. Princeton University Press, Princeton, NJ, 2012. Translated from the 1979 French original by Djun M. Kim and Dan Margalit. Matthieu Gendulphe. What’s wrong with the growth of simple closed geodesics on nonorientable hyperbolic surfaces. arXiv:1706.08798, 2017. Olivier Glorieux. Critical exponent for geodesic currents. arXiv:1704.06541, 2017. Sa’ar Hersonsky and Frédéric Paulin. On the rigidity of discrete isometry groups of negatively curved spaces. Comment. Math. Helv., 72(3):349–388, 1997. Nikolai V. Ivanov. Subgroups of Teichmüller modular groups, volume 115 of Translations of Mathematical Monographs. American Mathematical Society, Providence, RI, 1992. Translated from the Russian by E. J. F. Primrose and revised by the author. Ilya Kapovich and Nadia Benakli. Boundaries of hyperbolic groups. In Combinatorial and geometric group theory (New York, 2000/Hoboken, NJ, 2001), volume 296 of Contemp. Math., pages 39–93. Amer. Math. Soc., Providence, RI, 2002. Ilya Kapovich and Tatiana Nagnibeda. Subset currents on free groups. Geometriae Dedicata, 166(1):307–348, 2013. Elon Lindenstrauss and Maryam Mirzakhani. Ergodic theory of the space of measured laminations. Int. Math. Res. Not. IMRN, (4):Art. ID rnm126, 49, 2008. Michael Magee. Counting one sided simple closed geodesics on fuchsian thrice punctured projective planes. arXiv:1705.09377, 2017. Howard Masur. Ergodic actions of the mapping class group. Proceedings of the American Mathematical Society, 94(3):455–459, 1985. Maryam Mirzakhani. Growth of the number of simple closed geodesics on hyperbolic surfaces. Ann. of Math. (2), 168(1):97–125, 2008. Maryam Mirzakhani. Counting mapping class group orbits on hyperbolic surfaces. arXiv:1601.03342, 2016. Giuseppe Martone and Tengren Zhang. Positively ratioed representations. arXiv:1609.01245, 2016. Jean-Pierre Otal. Le spectre marqué des longueurs des surfaces à courbure négative. Ann. of Math. (2), 131(1):151–162, 1990. Robert C Penner and John L Harer. Combinatorics of train tracks. Annals of Mathematics Studies, (125):3–114, 1992. Kasra Rafi and Juan Souto. Geodesics currents and counting problems. arXiv:1709.06834, 2017. Dounnu Sasaki. Subset currents on surfaces. arXiv:1703.05739, 2017. William P. Thurston. The geometry and topology of 3-manifolds. Unpublished notes, 1980. William P. Thurston. On the geometry and dynamics of diffeomorphisms of surfaces. Bull. Amer. Math. Soc. (N.S.), 19(2):417–431, 1988. Caglar Uyanik. Generalized north-south dynamics on the space of geodesic currents. Geom. Dedicata, 177:129–148, 2015. 36 V. ERLANDSSON AND C. UYANIK School of Mathematics, University of Bristol, Howard House, Queen’s Avenue, Bristol BS8 1Sn, UK E-mail address: [email protected] Department of Mathematics, Vanderbilt University, 1326 Stevenson Center, Nashville, TN 37240, USA E-mail address: [email protected]
4math.GR
Under consideration for publication in Theory and Practice of Logic Programming 1 On the interaction between sharing and linearity arXiv:0710.0528v2 [cs.PL] 28 Jul 2009 GIANLUCA AMATO and FRANCESCA SCOZZARI Dipartimento di Science, Università “G. d’Annunzio” di Chieti-Pescara, Pescara, Italy. (e-mail: [email protected], [email protected]) submitted 26 March 2008; revised 3 July 2008, 15 July 2009; accepted 27 July 2009 Abstract In the analysis of logic programs, abstract domains for detecting sharing and linearity information are widely used. Devising abstract unification algorithms for such domains has proved to be rather hard. At the moment, the available algorithms are correct but not optimal, i.e., they cannot fully exploit the information conveyed by the abstract domains. In this paper, we define a new (infinite) domain ShLinω which can be thought of as a general framework from which other domains can be easily derived by abstraction. ShLinω makes the interaction between sharing and linearity explicit. We provide a constructive characterization of the optimal abstract unification operator on ShLinω and we lift it to two well-known abstractions of ShLinω . Namely, to the classical Sharing × Lin abstract domain and to the more precise ShLin2 abstract domain by Andy King. In the case of single binding substitutions, we obtain optimal abstract unification algorithms for such domains. KEYWORDS: Static analysis, abstract interpretation, sharing, linearity, unification. 1 Introduction In the analysis of logic programs, the theory of abstract interpretation (Cousot and Cousot 1979; Cousot and Cousot 1992a) has been widely used to design new analyses and to improve existing ones. Given a concrete semantics working over a concrete domain, an abstract interpretation formalizes an analysis by providing an abstract domain and an abstract semantics (working on the abstract domain), and relating them to their concrete counterparts. An abstract domain is a collection of abstract objects which encode the property to analyze. The concrete and abstract domains are related by means of abstraction and concretization maps, which allow each concrete object to be abstracted into an abstract object which describes it. The abstract semantics, in most cases, is given by a set of abstract operators on the abstract domain, which are the counterparts of the concrete ones. For example, in the case of logic programs, one can individuate in the concrete semantics the main operations (unification, projection, union), and an abstract semantics can be specified by giving the abstract unification, abstract projection and abstract union operations. The theory of abstract interpretation assures us that, for any concrete operator, there exists a best abstract operator, called the optimal operator. It computes the most precise result among all possible correct operators, on a 2 G. Amato and F. Scozzari given abstract domain. Designing the optimal abstract counterpart of each concrete operator is often a very difficult task. In fact, even if the definition of the optimal operator for any abstract domain is known from the theory of abstract interpretation (as a composition of the concrete operator and the abstraction map), the hard task is to provide an explicit definition of the abstract operators and to devise algorithms on the abstract domain which compute them. 1.0.1 The context The property of sharing has been the subject of many papers (Jacobs and Langen 1992; Hans and Winkler 1992; Muthukumar and Hermenegildo 1992; Codish et al. 1999; Bagnara et al. 2002), from the both theoretical and practical point of view. Typical applications of sharing analysis are in the fields of optimization of unification (Søndergaard 1986) and parallelization of logic programs (Hermenegildo and Rossi 1995). The goal of (set) sharing analysis is to detect sets of variables which share a common variable in the answer substitutions. For instance, consider the substitution {x/f (u, v), y/g(u, u, u), z/v}. We say that x and y share the variable u, while x and z share the variable v, and no single variable is shared by x, y and z. Many domains concerning sharing properties also consider linearity in order to improve the precision of the analysis. We say that a term is linear if it does not contain multiple occurrences of the same variable. For instance, the term f (x, f (y, z)) is linear, while f (x, f (y, x)) is not, since x occurs twice. 1.0.2 The problem It is now widely recognized that the original domain proposed for sharing analysis, namely, Sharing (Langen 1990; Jacobs and Langen 1992), is not very precise, so that it is often combined with other domains for handling freeness, linearity, groundness or structural information (see Bagnara et al. 2005 for a comparative evaluation). In particular, adding some kind of linearity information seems to be very profitable, both for the gain in precision and speed which can be obtained, and for the fact that it can be easily and elegantly embedded inside the sharing groups (see King 1994). In the literature, many authors have proposed abstract unification operators (e.g. Codish et al. 1991; Hans and Winkler 1992; Muthukumar and Hermenegildo 1992; King 1994) for domains of sharing properties, encoding different amounts of linearity information. However, optimal operators for combined analysis of sharing and linearity have never been devised, neither for the domain ShLin2 (King 1994), nor for the more broadly adopted Sharing × Lin (Hans and Winkler 1992; Muthukumar and Hermenegildo 1992). With the lack of optimal operators, the analysis loses precision and might even be slower. The latter is typical of sharing analysis, where abstract domains are usually defined in such a way that, the less information we have, the more complex the abstract objects are. This is not the case for other kinds of analyses, such as groundness analysis, where the complexity of abstract objects may grow accordingly to the amount of groundness information they encode. On the interaction between sharing and linearity 3 The lack of optimal operators is due to the fact that the role played by linearity in the unification process has never been fully clarified. The traditional domains which combine sharing and linearity information are too abstract to capture in a clean way the effect of repeated occurrences of a variable in a term and most of the effects of (non-)linearity are obscured by the abstraction process. 1.0.3 The solution We propose an abstract domain ShLinω which is able to encode the amount of nonlinearity, i.e., which keeps track of the exact number of occurrences of the same variable in a term. Consider again the substitution θ = {x/f (u, v), y/g(u, u, u), z/v}. Intuitively, to each variable w in the range of the substitution, we associate the multiset of domain variables which are bound to a term where w occurs, and call it an ω-sharing group. For instance, we associate, to the variable u, the ω-sharing group {x, y, y, y}, to denote that u appears once in θ(x) and three times in θ(y). To the variable v, we associate the ω-sharing group {x, z}, to denote that v appears once in θ(x) and once in θ(z). Then we consider the collection of all the multisets so obtained {{x, y, y, y}, {x, z}}, which describes both the sharing property and the exact amount of non-linearity in the given substitution. The domain we obtain is conceptually simple, but cannot be directly used for static analysis, without a widening operator (Cousot and Cousot 1992c), since it contains infinite ascending chains. However, in this domain the role played by (non-)linearity is manifest, and we can provide a constructive characterization of the optimal abstract unification operator. The cornerstone of the abstract unification is the concept of sharing graph which plays the same role as alternating paths (Søndergaard 1986; King 2000) for pair-sharing analysis. We use sharing graphs to combine different ω-sharing groups during unification. The use of sharing graphs offers a new perspective for looking at variables in the process of unification, and simplifies the proofs of correctness and optimality of the abstract operators. We prove that sharing graphs yield an optimal abstract unification operator for single binding substitutions. We also provide a purely algebraic characterization of the unification process, which should help in implementing the domain through widening operators and in devising abstract operators for further abstractions of ShLinω . 1.0.4 The applications We consider two well-known domains for sharing properties, namely, the reduced product (Cousot and Cousot 1979) Sharing × Lin and the more precise domain ShLin2 by Andy King, and show that they can be immediately obtained as abstractions of ShLinω . By exploiting the unification operator on ShLinω , we provide the optimal abstract unification operators, in the case of single binding substitutions, for both domains. We show that we gain in precision w.r.t. any previous attempt to design an abstract unification operator on these domains. This is the first time 4 G. Amato and F. Scozzari that abstract unification has been provided optimal for a domain including sharing and linearity information. Surprisingly, the optimal abstract operators are able to improve not only aliasing and linearity information, but also groundness. We show that, in certain cases, we improve over Pos (Armstrong et al. 1994). This is mainly due to the fact that our operators exploits the occur-check condition. As far as we know, there is no abstract unification operator in the literature, for a domain dealing with sharing, freeness and linearity, which is more precise than Def for groundness. Unification for multi-binding substitutions is usually computed by considering one binding at a time. For instance, the unification of a substitution θ with {x1 /t1 , x2 /t2 , . . . , xn /tn } is performed by first computing the unification of θ with {x1 /t1 }, and then unifying the result with {x2 /t2 , . . . , xn /tn }. Actually, computing abstract unification one binding at a time is optimal in ShLinω (Amato and Scozzari 2005). We show that this is not the case for ShLin2 and Sharing × Lin. This means that the classical schema of computing unification iteratively on the number of bindings cannot be used when looking for optimality with multi-binding substitutions, at least with these two domains. 1.0.5 Structure of the article In Section 2 we recall some basic notions and the notations about substitutions, multisets and abstract interpretation. In Section 3 we briefly recall the domain of existential substitutions and its operators, which will be used throughout the article. In Section 4 we define the domain ShLinω , together with the unification operator, we show the optimality result and give an alternative algebraic characterization of the unification operator. In Section 5 we exploit our results to devise the optimal unification operators for ShLin2 and Sharing × Lin, in the case of single binding substitutions. Section 6 gives some evidence that there are practical advantages in using the optimal unification operators for ShLin2 and Sharing × Lin. In Section 7 we compare our domains and operators with those known in the literature. We conclude with some open questions for future work. The proofs of the main results of the paper are in Appendix A, and the proofs of the results in Section 5 are in Appendix B. The paper is a substantial expansion of (Amato and Scozzari 2003), which introduces preliminary results of optimality for domains involving sharing and linearity properties. 2 Notation Given a set A, let ℘(A) be the powerset of A and ℘f (A) be the set of finite subsets of A. Given two posets (A, ≤A ) and (B, ≤B ), we denote by A → B the poset of monotonic functions from A to B ordered pointwise. We use ≤A→B to denote the order relation over A → B. When an order for A or B is not specified, we assume the least informative order (x ≤ y ⇐⇒ x = y). We also use A ⊎ B to denote disjoint union and |A| for the cardinality of the set A. On the interaction between sharing and linearity 5 2.1 Terms and substitutions In the following, we fix a first order signature and a denumerable set of variables V. Given a term or other syntactic object o, we denote by vars(o) the set of variables occurring in o and by occ(v, o) the number of occurrences of v in o. When it does not cause ambiguities, we abuse the notation and prefer to use o itself in the place of vars(o). For example, if t is a term and x ∈ V, then x ∈ t should be read as x ∈ vars(t). We denote by ǫ the empty substitution, by {x1 /t1 , . . . , xn /tn } a substitution θ with θ(xi ) = ti 6= xi , by dom(θ) = {x ∈ V | θ(x) 6= x} and rng(θ) = ∪x∈dom(θ) vars(θ(x)) the domain and range of θ respectively. Let vars(θ) be the set dom(θ) ∪ rng(θ) and, given U ∈ ℘f (V), let θ|U be the projection of θ over U , i.e., the unique substitution such that θ|U (x) = θ(x) if x ∈ U and θ|U (x) = x otherwise. Given θ1 and θ2 two substitutions with disjoint domains, we denote by θ1 ⊎ θ2 the substitution θ such that dom(θ) = dom(θ1 ) ∪ dom(θ2 ) and θ(x) = θi (x) if x ∈ dom(θi ), for each i ∈ {1, 2}. The application of a substitution θ to a term t is written as tθ or θ(t). Given two substitutions θ and δ, their composition, denoted by θ ◦ δ, is given by (θ ◦ δ)(x) = θ(δ(x)). A substitution θ is idempotent when θ ◦ θ = θ or, equivalently, when dom(θ) ∩ rng(θ) = ∅. A substitution ρ is called renaming if it is a bijection from V to V (this is equivalent to saying that there exists a substitution ρ−1 such that ρ ◦ ρ−1 = ρ−1 ◦ ρ = ǫ). Instantiation induces a preorder on substitutions: θ is more general than δ, denoted by δ ≤ θ, if there exists σ such that σ ◦ θ = δ. If ≈ is the equivalence relation induced by ≤, we say that σ and θ are equal up to renaming when σ ≈ θ. The sets of substitutions, idempotent substitutions and renamings are denoted by Subst, ISubst and Ren respectively. Given a set of equations E, we write σ = mgu(E) to denote that σ is a most general unifier of E. Any idempotent substitution σ is a most general unifier of the corresponding set of equations Eq(σ) = {x = σ(x) | x ∈ dom(σ)}. In the following, we will abuse the notation and denote by mgu(σ1 , . . . , σn ) the substitution mgu(Eq(σ1 ) ∪ . . . ∪ Eq(σn )), when it exists. In spite of a single binding substitution {x/t} we often use just the binding x/t. In the rest of the paper we assume that a binding x/t is idempotent, namely,that x ∈ / vars(t). A position is a sequence of positive natural numbers. We denote with Ξ the set of all positions and with N+ the set of all positive natural numbers. Given a term t and a position ξ, we define t(ξ) inductively as follows: t(ǫ) = t ( t(i · ξ ′ ) = (where ǫ denotes the empty sequence) ti (ξ ′ ) if t ≡ f (t1 , . . . , tn ) and i ≤ n; undefined otherwise. For any variable x, an occurrence of x in t is a position ξ such that t(ξ) = x. In the rest of the paper, we use: U , V , W to denote finite sets of variables; h, k, u, v, w, x, y, z for variables; t for terms; f, r, s for term symbols; a, b for constants; η, θ, σ, δ for substitutions; ρ for renamings. 6 G. Amato and F. Scozzari 2.2 Multisets A multiset is a set where repetitions are allowed. We denote by {{x1 , . . . , xm }} a multiset, where x1 , . . . , xm is a sequence with (possible) repetitions. We denote by {{}} the empty multiset. We will often use the polynomial notation v1i1 . . . vnin , where v1 , . . . , vn is a sequence without repetitions, to denote a multiset A whose element vj appears ij times. The set {vj | ij > 0} is called the support of A and is denoted by TAU. We also use the functional notation A : {v1 , . . . , vn } → N, where A(vj ) = ij . In this paper, we only consider multisets whose support is finite. We denote with ℘m (X) the set of all the multisets whose support is any finite subset of X. For example, both a2 c4 and a1 b2 c3 are elements of ℘m ({a, b, c}). The cardinality of a P multiset is |A| = v∈TAU A(v). The new fundamental operation for multisets is the sum, defined as A ⊎ B = λv ∈ TAU ∪ TBU.A(v) + B(v) . Multiset sum is associative, commutative and {{}} is the neutral element. Note that we also use ⊎ to denote disjoint union for standard sets. The context will allow us to identify the proper semantics of ⊎. Given a multiset A and X ⊆ TAU, the restriction of A over X, denoted by A|X , is the only multiset B such that TBU = X and B(v) = A(v) for each v ∈ X. Finally, if A ∈ ℘m (X), E[x] is an integer expression and x ∈ X, we define X X A(x) · E[x] . E[x] = x∈A x∈TAU For example, given a multiset A = {{5, 5, 6, 8, 8, 8}} then 3 ∗ 82 = 278. P 2 x∈A x = 2 ∗ 52 + 62 + 2.3 Abstract interpretation Given two sets C and A of concrete and abstract objects respectively, an abstract interpretation (Cousot and Cousot 1992b) is given by an approximation relation 3 ⊆ A × C. When a 3 c holds, this means that a is a correct abstraction of c. In particular, we are interested in the case when (A, ≤A ) is a poset and a ≤A a′ means that a is more precise than a′ . In this case we require that, if a 3 c and a ≤A a′ , then a′ 3 c, too. In more detail, we require what Cousot and Cousot (1992b) call the existence of a best abstract approximation assumption, i.e., the existence of a map α : C → A such that for all a ∈ A, c ∈ C, it holds that a 3 c ⇐⇒ α(c) ≤A a. The map α is called the abstraction function and maps each c to its best approximation in A. Given a (possibly partial) function f : C → C, we say that f˜ : A → A is a correct abstraction of f , and write f˜ 3 f , whenever a 3 c ⇒ f˜(a) 3 f (c) , assuming that f˜(a) 3 f (c) is true whenever f (c) is not defined. We say that f˜ : A → A is the optimal abstraction of f when it is the best correct approximation of On the interaction between sharing and linearity 7 f , i.e., when f˜ 3 f and ∀f ′ : A → A. f ′ 3 f ⇒ f˜ ≤A→A f ′ . In some cases, we prefer to deal with a stronger framework, in which the domain C is also endowed with a partial order ≤C and α : C → A is a left adjoint to γ : A → C, i.e., ∀c ∈ C.∀a ∈ A.α(c) ≤A a ⇐⇒ c ≤C γ(a) . The pair hα, γi is called a Galois connection. In particular, we will only consider the case of Galois insertions, which are Galois connections such that α ◦ γ is the identity map. If hα, γi is a Galois insertion and f : C → C is a monotone map, the optimal abstraction f˜ always exists and it is definable as f˜ = α ◦ f ◦ γ. 3 The domain of existential substitutions The choice of the concrete domain depends on the observable properties we want to analyze. Most of the semantics suited for the analysis of logic programs are based on computed answer substitutions, and most of the domains are expressed as abstractions of sets of substitutions. In general, we are not really interested in the substitutions, but in their quotient-set w.r.t. an appropriate equivalence relation. Let us consider a one-clause program p(x, x), the goal p(x, y), and the following answer substitutions: θ1 = {y/x}, θ2 = {x/y}, θ3 = {x/u, y/u} and θ4 = {x/v, y/v}. Although θ1 and θ2 are equal up to renaming, the same does not hold for θ3 and θ4 . Nonetheless, they essentially represent the same answer, since u and v are just two different variables we chose when renaming apart the clause p(x, x) from the goal p(x, y), and therefore are not relevant to the user. On the other hand, if θ3 and θ4 are answer substitutions for the goal q(x, y, u), then they correspond to computed answers q(u, u, u) and q(v, v, u) and therefore are fundamentally different. As a consequence, the equivalence relation we need to consider must be coarser then renaming, and must take into account the set of variables of interest, i.e., the set of variables which appear in the goal. For these reasons, we think that the best solution is to use a domain of equivalence classes of substitutions. Among the various domains proposed in the literature (e.g. Jacobs and Langen 1992; Marriott et al. 1994; Levi and Spoto 2003), we adopt the domain of existential substitutions (Amato and Scozzari 2009), since it is explicitly defined as a quotient of a set of substitutions, w.r.t. a suitable equivalence relation. Moreover, the domain is equipped with all the necessary operators for defining a denotational semantics, namely, projection, renaming and unification. We briefly recall the basic definitions of the domain and the unification operator. Given θ1 , θ2 ∈ Subst and U ∈ ℘f (V), the preorder U is defined as follows: θ1 U θ2 ⇐⇒ ∃δ ∈ Subst.∀x ∈ U. θ1 (x) = δ(θ2 (x)) . The notation θ1 U θ2 states that θ1 is an instance of θ2 w.r.t. the variables in U . The equivalence relation induced by the preorder U is given by: θ1 ∼U θ2 ⇐⇒ ∃ρ ∈ Ren.∀x ∈ U. θ1 (x) = ρ(θ2 (x)) . 8 G. Amato and F. Scozzari This relation precisely captures the extended notion of renaming which is needed to work with computed answer substitutions. Example 3.1 It is easy to check that {x/w, y/u} ∼{x,y} ǫ by choosing the renaming ρ = {x/w, w/x, y/u, u/y}. Note that ∼U is coarser than the standard equivalence relation ≈: there is no renaming ρ such that ǫ = ρ ◦ {x/w, y/u}. As it happens for , if we enlarge the set of variables of interest, not all equivalences between substitutions are preserved: for instance, {x/w, y/u} 6∼{w,x,y} ǫ. Let ISubst ∼U be the quotient set of ISubst w.r.t. ∼U . The domain ISubst ∼ of existential substitutions is defined as the disjoint union of all the ISubst ∼U for U ∈ ℘f (V), namely: ] ISubst ∼U . ISubst ∼ = U∈℘f (V) In the following we write [θ]U for the equivalence class of θ w.r.t. ∼U . The partial order  over ISubst ∼ is given by: [θ]U  [θ′ ]V ⇐⇒ U ⊇ V ∧ θ V θ′ . Intuitively, [θ]U  [θ′ ]V means that θ is an instance of θ′ w.r.t. the variables in V , provided that they are all variables of interest of θ. To ease notation, we often omit braces from the sets of variables of interest when they are given extensionally. So we write [θ]x,y instead of [θ]{x,y} and ∼x,y,z instead of ∼{x,y,z}. When the set of variables of interest is clear from the context or when it is not relevant, it will be omitted. Finally, we omit the braces which enclose the bindings of a substitution when the latter occurs inside an equivalence class, i.e., we write [x/y]U instead of [{x/y}]U . 3.0.1 Unification Given U, V ∈ ℘f (V), [θ1 ]U , [θ2 ]V ∈ ISubst ∼ , the most general unifier between these two classes is defined as the mgu of suitably chosen representatives, where variables not of interest are renamed apart. In formulas: mgu([θ1 ]U , [θ2 ]V ) = [mgu(θ1′ , θ2′ )]U∪V , (1) where θ1 ∼U θ1′ ∈ ISubst, θ2 ∼V θ2′ ∈ ISubst and (U ∪ vars(θ1′ )) ∩ (V ∪ vars(θ2′ )) ⊆ U ∩ V . The last condition is needed to avoid variable clashes between the chosen representatives θ1′ and θ2′ . Moreover, mgu is the greatest lower bound of ISubst ∼ ordered by . Example 3.2 Let θ1 = {x/a, y/r(v1 , v1 , v2 )} and θ2 = {y/r(a, v2 , v1 ), z/b}. Then mgu([θ1 ]x,y , [θ2 ]y,z ) = [x/a, y/r(a, a, v), z/b]x,y,z , by choosing θ1′ = θ1 and θ2′ = {y/r(a, w, v), z/b}. In this case we have 9 On the interaction between sharing and linearity {x/a, y/r(a, a, v), z/b} ∼x,y,z mgu(θ1′ , θ2′ ) = {x/a, y/r(a, a, v), z/b, v1/a, w/a, v2 /v} . A different version of unification is obtained when one of the two arguments is an existential substitution, and the other one is a standard substitution. In this case, the latter argument may be viewed as an existential substitution where all the variables are of interest: mgu([θ]U , δ) = mgu([θ]U , [δ]vars(δ) ) . (2) Note that deriving the general unification in (1) from the special case in (2) is not possible. This is because there are elements in ISubst ∼ which cannot be obtained as [δ]vars(δ) for any δ ∈ ISubst (see Example 4.10). This is the form of unification which is better suited for analysis of logic programs, where existential substitutions are the denotations of programs while standard substitutions are the result of unification between goals and heads of clauses. Therefore, the rest of the paper will be concerned with the problem of devising optimal abstract operators corresponding to (2), for three different abstract domains. Of course, unification is not the only operator needed to give semantics to logic programs: we also need projection, renaming and union. However, providing optimal abstract counterparts for these operators is generally a trivial task, and will not be considered here. We want to conclude the section with a small remark about our choice of the concrete domain. By adopting existential substitutions and the corresponding notion of unification, we greatly simplify all the semantic definitions which are heavily based on renaming variables apart. This is because all the details concerning renamings are shifted towards the inner level of the semantic domain, where they are more easily managed (Jacobs and Langen 1992; Amato and Scozzari 2009). 4 The abstract domain ShLinω The domain Sharing × Lin is one of the best known domains in the literature which combine sharing and linearity information. The domain Sharing records the information of variable aliasing, by abstracting the substitution θ = {x/f (u, v), y/g(u, u, u), z/v} into the set {uxy, vxz}. The object uxy, called a sharing group, states that θ(u), θ(x) and θ(y) do share some variable (the variable u in this case). Analogously, the sharing group vxz states that θ(v), θ(x) and θ(z) do share (in this case the variable v). One of the simplest way of adding linearity information is to record, in a separate object, the set of variables w such that θ(w) is a linear term. In our example, only θ(y) is not linear. Thus the substitution is abstracted into the pair ({uxy, vxz}, {u, v, x, z}). Another known domain in the literature is ASub whose main difference w.r.t. Sharing × Lin is that it only records sharing information between pairs of variables. Thus, in ASub, each sharing group has at most two elements. Developing optimal unification operators for such abstract domains is a difficult task. In our opinion, this is because the gap between the substitutions and 10 G. Amato and F. Scozzari Sharing×Lin (or ASub) is too wide and the combined effect of aliasing and linearity is difficult to grasp. We solve this problem by defining a new abstract domain ShLinω which can be used to approximate ISubst ∼ . Since ShLinω has infinite ascending chains, in most cases it cannot be directly used for the analysis. It should be thought of as a general framework from which other domains can be easily derived by abstraction. In this sense, ShLinω closes the gap between the concrete domain of substitutions and the abstractions like Sharing × Lin or ASub. The structure of ShLinω has made it possible to develop clean and optimal abstract unification operators. From these, optimal operators for the simpler domains are easy to obtain, at least for single binding substitutions. The idea underlying ShLinω is to count the exact number of occurrences of the same variable in a term. It extends the standard domain Sharing by recording, for each v ∈ V and θ ∈ ISubst, not only the set {w ∈ V | v ∈ θ(w)} but the multiset λw ∈ V.occ(v, θ(w)). Definition 4.1 (ω-Sharing Group) An ω-sharing group is a multiset of variables, i.e., an element of ℘m (V). Example 4.2 Given variables u, v, w, x, y ∈ V, examples of ω-sharing groups are u2 v 3 x19 , xyz and u23 vwx2 y 3 . Definition 4.3 Given a substitution θ and a variable v ∈ V, we define θ−1 (v) = λw. occ(v, θ(w)) . Intuitively, θ−1 (v) is an ω-sharing group which maps each variable w to the number of occurrences of v in θ(w). Example 4.4 Given θ = {x/f (u, u, u), y/g(u, v), z/f (u, v, v)}, we have that θ−1 (u) = ux3 yz, θ−1 (v) = vyz 2 , θ−1 (w) = w, and θ−1 (x) = {{}}. Definition 4.5 (Correct Approximation) Given a set of variables U and a set of ω-sharing groups S (i.e., S ⊆ ℘m (U )), we say that the pair (S, U ) correctly approximates a substitution [θ]W if U = W and for each v ∈ V, θ−1 (v)|W ∈ S. In the following we denote by [S]U the pair (S, U ) and write [S]U 3 [θ]W to mean that [S]U correctly approximates [θ]W . Therefore, [S]U correctly approximates [θ]U when S contains at least all the ωsharing groups which may arise in θ, restricted to the variables U . Note that [θ]U is an equivalence class of substitutions, as defined in Section 3, while [S]U is just a symbol to denote the pair of objects (S, U ). We prefer this notation for the sake of uniformity with substitutions. On the interaction between sharing and linearity 11 Theorem 4.6 The relation 3 is well defined. We can now define the domain ShLinω of ω-sharing groups. Definition 4.7 (ShLinω ) The domain ShLinω is defined as ShLinω = {[S]U | U ∈ ℘f (V), S ⊆ ℘m (U ), S 6= ∅ ⇒ {{}} ∈ S} , and ordered by [S1 ]U1 ≤ω [S2 ]U2 iff U1 = U2 and S1 ⊆ S2 . The order relation corresponds to the approximation ordering, since bigger (w.r.t ≤ω ) elements correctly approximate a larger number of substitutions than smaller elements. The existence of the empty multiset, when S is not empty, is required in order to obtain a Galois insertion, instead of a Galois connection. In order to simplify the notation, in the following we write an object [{{{}}, B1 , . . . , Bn }]U ∈ ShLinω as [B1 , . . . , Bn ]U by omitting the braces and the empty multiset. Moreover, if X ∈ ShLinω , we write B ∈ X in place of X = [S]U ∧ B ∈ S. Definition 4.8 (Abstraction for ShLinω ) We define the abstraction for a substitution [θ]U as αω ([θ]U ) = [{θ−1 (v)|U | v ∈ V}]U . This is the least element of ShLinω which correctly approximates [θ]U . Note that by the proof of Theorem 4.6 it immediately follows that αω is well defined, i.e., it does not depend from the choice of the representative for [θ]U . Example 4.9 Given θ = {x/r(y, u, u), z/y, v/u} and U = {w, x, y, z}, we have θ−1 (u) = x2 vu, θ−1 (y) = xyz, θ−1 (z) = θ−1 (v) = θ−1 (x) = {{}} and θ−1 (s) = s for all the other variables (included w). Projecting over U we obtain αω ([θ]U ) = [x2 , xyz, w]U . Example 4.10 As we have said in Section 3, we show an element of ISubst ∼ , namely the existential substitution [x/r(v, v)]x , which cannot be obtained as [δ]vars(δ) for any substitution δ. In fact, consider any ω-sharing group B = δ −1 (u)|vars(δ) ∈ αω ([δ]vars(δ) ). Then either u ∈ / rng(δ) and B = {{}} or u ∈ rng(δ) and B(u) = 1. However, α([x/r(v, v)]x ) = [x2 ]x and x2 does not contain any variable with multiplicity one. 4.1 Multigraphs In order to define an abstract unification operator over ShLinω , we need to introduce the concept of multigraph. We call (directed) multigraph a graph where multiple distinguished edges are allowed between nodes. We use the definition of multigraph which is customary in category theory (Mac Lane 1988). 12 G. Amato and F. Scozzari Definition 4.11 (Multigraph) A multigraph G is a tuple hNG , EG , srcG , tgtG i where NG 6= ∅ and EG are the sets of nodes and edges respectively, srcG : EG → NG is the source function which maps each edge to its start node, and tgtG : EG → NG is the target function which maps each edge to its end node. A labeled multigraph G is a multigraph equipped with a labelling function lG : NG → LG which maps each node to its label in the given set LG . We write e : n1 → n2 ∈ G to denote the edge e ∈ EG such that srcG (e) = n1 and tgtG (e) = n2 . We also write n1 → n2 ∈ G to denote any edge e ∈ EG such that srcG (e) = n1 and tgtG (e) = n2 . Moreover, with |n1 → n2 ∈ G| we denote the cardinality of the set {e ∈ EG | srcG (e) = n1 ∧ tgtG (e) = n2 }. In the notation above, we omit “∈ G” whenever the multigraph G is clear from the context. We call in-degree (respectively out-degree) of a node n the cardinality of the set {e ∈ EG | tgt(e) = n} (respectively {e ∈ EG | src(e) = n}). Given a multigraph G, a path π is a non-empty sequence of nodes n1 . . . nk such that, for each i ∈ {1, . . . , k − 1}, there is either an edge ni → ni+1 ∈ G or an edge ni+1 → ni ∈ G. Nodes n1 and nk are the endpoints of π, and we say that π connects n1 and nk . A multigraph is connected when all pairs of nodes are connected by at least one path. 4.2 Abstract unification We need to find the abstract counterpart of mgu over ShLinω , i.e., an operation mguω such that, if [S]U 3 [θ]U , then mguω ([S]U , δ) 3 mgu([θ]U , δ) (3) for each δ ∈ ISubst. Note that we are looking for an abstract counterpart to the mixed unification in (2), where one of the two arguments is a plain substitution. In particular, we would like to find an operator which is the minimum element that satisfies the condition in (3), i.e., the optimal abstract counterpart of mgu. Observe that, for a fixed U , the set of all the elements [S]U ∈ ShLinω is a complete lattice w.r.t. ≤ω with the top element given by [℘m (U )]U and the meet operator given by  T V i∈I Si U , ω {[Si ]U | i ∈ I} = for any family {[Si ]U | i ∈ I} of elements of ShLinω . Moreover, the relation 3 is V meet-preserving on the left, since if [Si ]U 3 [θ]U for each i ∈ I, then ω {[Si ]U | i ∈ I} 3 [θ]U . Therefore, we may define the abstract mgu as follows ^  mguω ([S]U , δ) = [S ′ ]U ′ | ∀θ.[S]U 3 [θ]U ⇒ [S ′ ]U ′ 3 mgu([θ]U , δ) , ω where the definitions of 3 and mgu force U ′ to be U ∪ vars(δ). Note that this is just a translation of the general definition of optimal operator in (Cousot and Cousot 1992b) and it satisfies (3). This definition is completely non-constructive. The rest of this section is devoted to providing a constructive characterization for mguω ([S]U , δ). We begin to characterize the operation of abstract unification by means of graph theoretic notions. On the interaction between sharing and linearity 13 Definition 4.12 (Multiplicity of ω-sharing groups) The multiplicity of an ω-sharing group B in a term t is defined as: X X B(v) · occ(v, t) . χ(B, t) = occ(v, t) = v∈B v∈TBU For instance, χ(x3 yz 4 , r(x, y, f (x, y, z))) = 3 · 2 + 1 · 2 + 4 · 1 = 12. The meaning of the map χ is made clear by the following proposition. Proposition 4.13 Given a substitution θ, a variable v and a term t, we have that χ(θ−1 (v), t) = occ(v, θ(t)). Moreover, given a set of variables U , when vars(t) ⊆ U , it holds that χ(θ−1 (v)|U , t) = occ(v, θ(t)). Example 4.14 Let B = xy 2 z 3 and θ = {y/r(x, x), z/r(x, x, x)}, so that θ−1 (x) = {xy 2 z 3 }. Given t ≡ s(x, z) we have occ(x, θ(t)) = occ(x, s(x, r(x, x, x))) = 4 , and χ(B, t) = B(x)occ(x, t) + B(z)occ(z, t) = 1 · 1 + 3 · 1 = 4 . If [S]U 3 [θ]U and we unify [θ]U with δ, some of the ω-sharing groups in S may be glued together to obtain a bigger resultant group. It happens that the gluing of the sharing groups during the unification of [θ]U with a single binding substitution {x/t} may be represented by special labelled multigraphs which we call sharing graphs. Example 4.15 Let S = {x3 , y} and U = {x, y}. We look for a representation of the unification process between any substitution θ approximated by S and the binding x/r(y). We show that multigraphs can be easily used for this purpose. For instance, the substitution θ = {x/r(g(u, u, u))} is approximated by S. By unifying θ with {x/r(y)} we obtain δ = {x/r(g(u, u, u)), y/g(u, u, u)}. Note that any approximation of δ on the variables {x, y} must include the sharing group x3 y 3 generated by the variable u. Thus, any correct approximation of the unification must also contain x3 y 3 . We want to associate to any ω-sharing group B in δ a special multigraph which represents the way the ω-sharing groups in S have been merged in order to obtain B. The nodes of this multigraph are the ω-sharing groups in S (possibly repeated any number of times). The following is a sharing graph for x/r(y) and S: ☎ ✞ 1 y ✝ ✆ ; 0 ww ww w w ww ☎ ☎ ✞ ✞ 0 1 / y x3 ✝ ✆ ✝ ✆ 3GG 0 GG GG GG # ✞ ☎ 1 y ✝ ✆ 0 14 G. Amato and F. Scozzari where pedices and apices on a sharing group B are respectively the values of χ(B, x) and χ(B, r(y)). For instance, since χ(x3 , x) = 3, then we put the pedice 3 on the node x3 to mean that x is bound to a term containing 3 occurrences of the same variable. Symmetrically, since χ(x3 , r(y)) = 0, then we put the apice 0 on the node x3 . The in-degree and the out-degree of the nodes reflect the values of apices and pedices. In this case, we have 3 out-going edges from x3 and no in-going edges. Moreover, the multigraph must be connected, in order to guarantee that we can use a single variable to form the sharing group x3 y 3 . By summing the labels of all the nodes, namely, x3 ⊎ y ⊎ y ⊎ y, we obtain the ω-sharing group x3 y 3 which must appear in any correct approximation of the unification. Given any labelled multigraph G, in the rest of the paper we assume that the codomain of the labelling function lG is ℘m (V), the set of ω-sharing groups. Definition 4.16 (Sharing Graph) A sharing graph for the binding x/t and a set of ω-sharing groups S is a labelled multigraph G such that 1. G is connected; 2. for each node n ∈ NG , lG (n) ∈ S; 3. for each node n ∈ NG , the out-degree of n is equal to χ(lG (n), x) and the in-degree of n is equal to χ(lG (n), t). The resultant ω-sharing group of G is res(G) = ] lG (n) . n∈NG Example 4.17 Let S = {ux2 , xy, vz, wz, xyz}. The following is a sharing graph for x/r(y, z) and S: ✞ ✞ ☎ ☎ ✞ ☎ 0 1 1 / / 2 xy vz ux ✝ ✆ ✝ ✆ ✝ ✆ 2GG 0 1 GG GG GG # ✞ ☎ ☎ ✞ 1 1 / wz xy ✝ ✆ ✝ ✆ 0 1 where pedices and apices on a sharing group B are respectively the value of χ(B, x) and χ(B, r(y, z)). Therefore the resultant sharing group is uvwx4 y 2 z 2 . It is worth noting that, given any set of ω-sharing groups S and binding x/t, there exist many different sharing graphs for x/t and S. Each sharing graph yields a resultant sharing group which must be included in the result of the abstract unification operator. Of course, different sharing graphs may give the same resultant sharing group. The abstract unification operator is defined by collecting all the resultant sharing groups. On the interaction between sharing and linearity 15 Definition 4.18 (Single binding unification) Let U ∈ ℘f (V), S be a set of ω-sharing groups with [S]U ∈ ShLinω , x/t be a binding, and vars(x/t) ⊆ U . The set of resultant ω-sharing groups for x/t and S is mguω (S, x/t) = {res(G) | G is a sharing graph for S and x/t} . We lift mguω to an operation over ShLinω . mguω ([S]U , x/t) = [mgu(S, x/t)]U . This is a particular case of the abstract unification operator, for single binding substitutions and vars(x/t) ⊆ U . Example 4.19 Let S be as in Example 4.17. The following is S: ✞ ☎ 0 ,✞ 2 ux 2 xyz ✝ ✆ ✝ 2 a sharing graph for x/r(y, y, z) and ☎ 3 _ ✆ 1 where pedices and apices on a sharing group B are respectively the value of χ(B, x) and χ(B, r(y, y, z)). Therefore ux3 yz ∈ mguω (S, x/r(y, y, z)). Note that this sharing group can actually be generated by the substitution θ = {x/r(v1 , v1 , v2 ), y/v2 , z/v2 , u/v1 , v/a, w/a} where a is a ground term. Let U = {u, v, w, x, y, z}. It is the case that [S]U 3[θ]U and mgu([θ]U , {x/r(y, y, z)}) performs exactly the variable aliasings depicted by the sharing graph. Actually mgu([θ]U , {x/r(y, y, z)}) = [x/r(v1 , v1 , v1 ), y/v1 , u/v1 , v/a, w/a]U = [η]U and η −1 (v1 )|U = ux3 yz. We give here an intuition of the way sharing graphs work. Assume given a set of ω-sharing groups [S]U and a binding x/t with vars(x/t) ⊆ U . We want to compute [mguω (S, x/t)]U . To this aim, for any substitution θ approximated by [S]U , that is, [S]U 3 [θ]U , we compute αω (mgu([θ]U , {x/t})). For any B1 , B2 ∈ S, assume that there exist v1 , v2 ∈ V such that B1 = θ−1 (v1 )|U and B2 = θ−1 (v2 )|U . When unifying θ with the binding x/t, we use the fact that mgu(Eq(θ) ∪ {x = t}) = mgu({θ(x) = θ(t)}) ◦ θ. By Prop. 4.13, θ(x) contains χ(B1 , x) instances of v1 and χ(B2 , x) instances of v2 . Symmetrically, θ(t) contains χ(B1 , t) instances of v1 and χ(B2 , t) instances of v2 . Assume that θ(x) and θ(t) only differ for the variables occurring in them (and not for the structure of terms). Then, an arrow from the sharing group B1 to B2 represents the fact that, in mgu({θ(x) = θ(t)}), one of the copies of v1 is aliased to one of the copies of v2 , i.e., that there are corresponding positions in θ(x) and θ(t) where the two terms contain the variables v1 and v2 respectively. The third condition for sharing graphs implies that each occurrence of v1 and v2 is aliased to some other variable. The first condition (the sharing graph must be connected) ensures that all the variables corresponding to the ω-sharing groups involved in the sharing graph are aliased to each other. In other words, given any two such variables, they are aliased. Although here we are only considering the case when θ(x) and θ(t) differ for the variables occurring in them, we will show that it is enough to reach correctness and optimality. The next example applies this intuition to a concrete case. 16 G. Amato and F. Scozzari Example 4.20 Consider Example 4.19, where θ = {x/r(v1 , v1 , v2 ), y/v2 , z/v2 , u/v1 , v/a, w/a} and U = {u, v, w, x, y, z}. Let B1 = ux2 and B2 = xyz, thus B1 = θ−1 (v1 )|U and B2 = θ−1 (v2 )|U . When unifying θ with the binding x/r(y, y, z) we have that θ(x) = r(v1 , v1 , v2 ) and θ(r(y, y, z)) = r(v2 , v2 , v2 ). Note that θ(x) contains χ(ux2 , x) = 2 instances of v1 and χ(xyz, x) = 1 instance of v2 . Symmetrically, θ(r(y, y, z)) contains χ(ux2 , r(y, y, z)) = 0 instances of v1 and χ(xyz, r(y, y, z)) = 3 instances of v2 . Moreover, θ(x) and θ(r(y, y, z)) only differ for the variables occurring in them. Thus, the three edges in the sharing graph of Example 4.19 correspond to the following aliasings: θ(r(y, y, z))=r(vO2 , vO 2 , vO 2 ) θ(x) =r(v1 , v1 , v2 ) In particular, the last arrow from v2 to itsself, corresponds to the self-loop in the sharing graph. The unification operator mguω ([S]U , x/t) can be extended to the case vars(x/t) * U . The idea is to enlarge S by including all the singletons in vars(x/t) \ U . Definition 4.21 (Single binding unification with extension) Let U ∈ ℘f (V), S be a set of ω-sharing groups with [S]U ∈ ShLinω and x/t be a binding. mguω ([S]U , x/t) = mguω ([S ∪ {{{v}} | v ∈ vars(x/t) \ U }]U∪vars(x/t) , x/t) . Note that, for a generic abstract domain, the method of extending the abstract object to include all the variables in the concrete substitution δ may result in a non-optimal abstract unification. For example, this is what happens in the case of the domain Sharing, as shown in (Amato and Scozzari 2009). However, we will prove that, in the case of ShLinω , the abstract mgu in Definition 4.21 is optimal. This operator can be extended to multi-binding substitutions in the obvious way, namely by iterating the single binding operator. Definition 4.22 (Multi-binding unification) We define mguω ([S]U , δ) with δ ∈ ISubst and [S]U ∈ ShLinω by induction on the number of bindings: mguω ([S]U , ǫ) = [S]U , mguω ([S]U , {x/t} ⊎ δ) = mguω (mguω ([S]U , x/t), δ) . It is possible to prove that mguω ([S]U , δ) is optimal for multi-binding substitutions (Amato and Scozzari 2005). Since optimality of iterative multi-binding unification is not inherited by the abstractions of ShLinω (as we show in Section 5.3), we will focus on single binding unification. In the rest of the paper, we only consider bindings x/t which are idempotent, namely, such that x ∈ / vars(t). On the interaction between sharing and linearity 17 4.3 Correctness of abstract unification We now show that mguω ([S]U , δ) is correct w.r.t. concrete unification. We show correctness for multi-binding substitutions, since it is a trivial extension of the single binding case. In fact, composition of correct operators is still correct. First of all, we extend the definition of θ−1 to the case when it is applied to a sharing group B. Definition 4.23 Given θ ∈ ISubst and B an ω-sharing group, we define θ−1 (B) = λv ∈ V.χ(B, θ(v)) . In order to prove the correctness of abstract unification, we need the following auxiliary property. Proposition 4.24 Given substitutions θ, η ∈ ISubst and an ω-sharing group B, we have (η ◦ θ)−1 (B) = θ−1 (η −1 (B)) . Theorem 4.25 (Correctness of mguω ) The operation mguω is correct w.r.t. mgu, i.e., ∀[S]U ∈ ShLinω , δ ∈ ISubst. [S]U 3 [θ]U =⇒ mguω ([S]U , δ) 3 mgu([θ]U , δ) . Example 4.26 Let θ = {x/r(s(u, u, u), v, w), y/v ′ , z/w′ }, δ = {x/r(y, y, z)} and U = {x, y, z}. Therefore αω ([θ]U ) = [x3 , x, y, z]U . If we proceed with the concrete unification of [θ]U with δ, we have mgu([θ]U , δ) = [θ′ ]U with θ′ = mgu(θ, δ) = η ◦ θ and η = mgu(θ(x) = θ(r(y, y, z))). This gives the following results: η = {v ′ /s(u, u, u), v/s(u, u, u), w′/w} , θ′ = {x/r(s(u, u, u), s(u, u, u), w), y/s(u, u, u), z/w, v ′/s(u, u, u), w′ /w} , with [θ′ ]U = [θ]U . Now, let η ′ be obtained from η by replacing each occurrence of a variable in rng(η) with a different fresh variable, β = η ′ ◦ θ and ρ be a substitution mapping variables to variables such that ρ(β(x)) = θ′ (x) for each x ∈ U . Note that ρ is not a renaming, since it is not bijective. We have: η = {v/s(u1 , u2 , u3 ), v ′ /s(u4 , u5 , u6 ), w′ /u7 } , β = {x/r(s(u, u, u), s(u1 , u2 , u3 ), w), y/s(u4 , u5 , u6 ), z/u7 , v ′ /s(u4 , u5 , u6 ), w′ /u7 } , ρ = {u1 /u, u2 /u, u3 /u, u4/u, u5 /u, u6 /u, u7/w} . Following the ✞ x3 (u) ✝ proof, we build a multigraph G as follows: ✞ ☎ ☎ ☎ ✞ ✞ 0 0 0 x(u ) x(u ) x(u3 ) 1 2 ✆ ✆ ✝ ✆ ✝ 3FSSSS ✝ 1 1 FF SxSxSS x x FFxx SSSS xx xx x FF xx SSS xxx x x S F #  {xx {xx SSSS {xx ☎ ☎ ☎ )✞ ✞ ✞ ✞ 2 2 2 y(u4 ) y(u5 ) y(u6 ) z(u7 ) ✝ ✆ ✝ ✆ ✝ ✆ ✝ 0 0 0 ☎ 0 ☎ ✞ 0 x(w) ✆ ✝ ✆ 1 1 x x x x xx {xx ☎ 1 ✆ 0 18 G. Amato and F. Scozzari Note that we have chosen to annotate every sharing group with the corresponding variable in vars(β(U )). This is not a sharing graph since it is not connected, but if we take Y = Tρ−1 (u)U = {u, u1 , u2 , u3 , u4 , u5 , u6 }, the restriction of G to the nodes annotated with a variable in Y is a sharing graph whose resultant ω-sharing group is x6 y 3 . 4.4 Optimality of Abstract Unification We now prove that mguω is not only correct, but also optimal for a single binding substitution, i.e., it is the least correct abstraction. This means proving that, given a set of ω-sharing groups [S]U ∈ ShLinω , a binding x/t, and an ω-sharing group B ∈ mguω ([S]U , x/t), there exists a substitution [δ]U such that [S]U 3 [δ]U and B ∈ αω (mgu([δ]U , {x/t})). First of all, we prove optimality of mguω ([S]U , x/t) in the special case of vars(x/t) ⊆ U . Next, we extend this result to the general case. Example 4.27 Consider S = {xu, xv, y} and the binding x/s(y, y). The following is a sharing graph for x/s(y, y) and S whose resultant ω-sharing group is x2 uvy. ☎ ✞ 0 xu ✝ ✆ 1D DD DD DD D" ✞ ✝ y ☎ ✞ 0 xv ✝ ✆ 1 zz z z zz |zz ☎ 2 ✆ 0 We show how to find a substitution [δ]U such that the ω-sharing group x2 uvy ∈ αω (mgu([δ]U , {x/s(y, y)})). Let U = {u, v, x, y}. For each node n of the sharing graph, we consider a different fresh variable wn . Assume that the node labelled with xu in the upper-left corner is node 1, and proceed clockwise to number the other nodes. For each variable z ∈ U \ {x}, we associate to δ(z) a term containing all the variables wi such that the label of the i-th node contains the variable z. Thus, we define δ(u) = r(w1 ) where w1 correspond to the node containing u. Analogously, we define δ(v) = r(w2 ) and δ(y) = r(w3 ). We now define δ(x) in a different way, namely by replacing in s(y, y) each occurrence of the variable y with a term similar to δ(y), with the difference that w3 is replaced with the variables w1 and w2 . The choice of w1 and w2 is obvious by looking at the sharing graph, since the first and second node are the sources of the two edges targeted at the node three. Therefore we obtain δ(x) = s(r(w1 ), r(w2 )). Summing up, we have: δ = {u/r(w1 ), v/r(w2 ), x/s(r(w1 ), r(w2 )), y/r(w3 )} . It is easy to check that [S]U 3 [δ]U and mgu(δ, {x/s(y, y)}) = {u/r(w1 ), v/r(w1 ), x/s(r(w1 ), r(w1 )), y/r(w1 ), w2 /w1 , w3 /w1 } , On the interaction between sharing and linearity 19 hence αω ([mgu(δ, {x/s(y, y)})]U ) = [x2 uvy]U . In the above example we have shown how to find a special substitution such that its fresh variables are unified according to the arrows in a sharing graph. The same idea is exploited in the next theorem for proving the optimality of the abstract unification operator mguω . For any ω-sharing group X ∈ mguω ([S]U , x/t), we provide a substitution δ obtained as in Example 4.27, such that [S]U approximates [δ]U and X ∈ αω (mgu([δ]U , {x/t)}). Theorem 4.28 (Optimality of mguω ) The single binding unification mguω ([S]U , x/t) is optimal w.r.t. mgu, under the assumption that vars(x/t) ⊆ U , i.e., : ∀B ∈ mguω ([S]U , x/t) ∃δ ∈ ISubst. [S]U 3 [δ]U and B ∈ αω (mgu([δ]U , {x/t})) . The previous proof requires that vars(x/t) ⊆ U . However, the same construction also works when this condition does not hold. Example 4.29 Given U = {x, y} and S = {x2 , x2 y}, we want to compute mguω ([S]U , x/s(y, z)). By extending the domain of the variables of interests, we obtain [S ′ ]V = [x2 , x2 y, z]x,y,z . One of the sharing graphs for x/s(y, z) and [S ′ ]V is ☎ 0 2 x ✝ ✆ 2 ✞ ✞ ✝  z ☎ 1 ✆ 0 ✞ ☎ 1 / x2 y ✝ ✆ 2D DD DD DD D"  ✞ ✞ ☎ 1 z z ✝ ✆ ✝ 0 ☎ 1 ✆ 0 Following the proof of the previous theorem, we obtain the substitution δ ′ = {x/s(r(w1 ), r(w1 , w2 , w2 )), y/r(w2 ), z/r(w3 , w4 , w5 )} , where [S ′ ]V 3[δ ′ ]V and x4 yz 3 ∈ αω (mgu([δ ′ ]V , {x/s(y, z)})). However we are looking for a substitution δ such that [S]U 3 [δ]U and x4 yz 3 ∈ αω (mgu([δ]U , {x/s(y, z)})). Nonetheless, we may choose δ = δ ′ (or, if we prefer, δ = δ ′ |x,y ) to get the required substitution. This is not a fortuitous coincidence. We may show that it consistently happens every time we apply Theorem 4.28 to an abstract unification where vars(x/t) * U . Therefore, we can prove the main result of the paper. Theorem 4.30 (Optimality of mguω with extension) The single binding unification mguω with extension is optimal w.r.t. mgu. 4.5 A characterization for resultant sharing groups The domain ShLinω has not been designed to be directly implemented, but some of its abstractions could. Providing a simpler definition for the set of resultant ωsharing groups could help in developing the abstract operators for its abstractions. 20 G. Amato and F. Scozzari We show that given a set S of ω-sharing groups and a binding x/t, the set of resultant ω-sharing groups has an elegant algebraic characterization. By definition of sharing graph, a set of nodes N labelled with ω-sharing groups of S can be turned into a sharing graph for S and x/t if and only if the condition on the out-degree and in-degree is satisfied and the obtained graph is connected. The condition on the degrees says that for each node s labelled with the sharing group Bs , the out-degree of s must be equal to χ(Bs , x). Symmetrically, the in-degree must be equal to χ(Bs , t). As a consequence, the sum of the out-degrees of all the P nodes s∈N χ(Bs , x) must be equal to the sum of the in-degrees of all the nodes P s∈N χ(Bs , t). This is because each edge has a source and a target node. Moreover, in order to be connected, any graph needs at least |N | − 1 edges. Since the number of edges is equal to the sum of in-degrees of all the nodes, it turns out that such a sum must be equal to or greater than |N | − 1. Surprisingly, this is enough to construct a sharing graph from N . Theorem 4.31 Let S be a set of ω-sharing groups and x/t be a binding. Then B ∈ mguω (S, x/t) iff there exist n ∈ N+ , B1 , . . . , Bn ∈ S which satisfy the following conditions: 1. B = ⊎1≤i≤n Bi ; P P 2. 1≤i≤n χ(Bi , t) ≥ n − 1; 1≤i≤n χ(Bi , x) = 3. either n = 1 or ∀1 ≤ i ≤ n. χ(Bi , x) + χ(Bi , t) > 0. Following the above theorem, we can give an algebraic characterization of the abstract unification operator as follows. Corollary 4.32 (Algebraic characterization of mguω ) Given a set of ω-sharing groups S and a binding x/t, we have that mguω (S, x/t) = (S \ rel (S, x, t))∪ ( ⊎R | R ∈ ℘m (rel (S, x, t)), X B∈R χ(B, x) = X ) χ(B, t) ≥ |R| − 1 , B∈R where rel (S, x, t) = {B ∈ S. χ(B, x) + χ(B, t) > 0} = {B ∈ S. TBU ∩ vars(x/t) 6= ∅} . Example 4.33 Consider S = {xa, xb, z 2 , zc} and the equation x = z. Then if we choose R = P P {{xa, xb, z 2 }}, we have B∈R χ(B, x) = 2 = B∈R χ(B, z) ≥ |R| − 1. Therefore P x2 z 2 ab ∈ mguω (S, x/z). If we take R = {{xa, xb, zc, zc}}, although B∈R χ(B, x) = P 2 = B∈R χ(B, z), we have |R| − 1 = 3. This only proves that z 2 c2 x2 ab cannot be obtained by the multiset R. If we check for every possible multiset over S, we have that z 2 c2 x2 ab ∈ / mguω (S, x/z). This characterization of the abstract mgu will be the key point for devising the optimal abstract unification operators on the abstractions of ShLinω . Let α be the abstraction function from ISubst ∼ to an abstract domain A. If we are able to factor On the interaction between sharing and linearity 21 α through a Galois connection hα′ : ShLinω → A, γ ′ : A → ShLinω i as α = α′ ◦ αω , then the optimal abstract unification for α is exactly α′ (mguω (γ ′ (·), ·)). However, this expression is helpful when it may be simplified in order to use only objects in A. Our algebraic characterization makes the simplification feasible, as we show in the following section. 5 Practical domains for program analysis We consider two domains for sharing analysis with linearity information, namely, the domain proposed in (King 1994) and the classical reduced product Sharing × Lin. They are defined as abstractions of ShLinω through Galois insertions. This allows us to design optimal abstract operators for both of them, by exploiting the results introduced so far. By composing each Galois insertion with αω , we get the corresponding abstraction function for substitutions (Cousot and Cousot 1992a, Sect. 4.2.3.1). 5.1 King’s domain for linearity and aliasing We first consider the domain for combined analysis of sharing and linearity in (King 1994). The idea is to enhance the domain Sharing by annotating each sharing group with linearity information on each variable. For instance, the object xy ∞ z represents the sharing group xyz and the information that y may be non-linear (while x and z are definitely linear). The objects in this domain can be easily viewed as abstraction of ω-sharing groups. Intuitively, in order to abstract an ωsharing groups, one simply needs to replace each exponent equal to or greater than 2 with ∞. Let us now formalize the domain as an abstraction of ShLinω . An ω-sharing group (which is a multiset V → N whose support is finite) is abstracted into a map o : V →{0, 1, ∞} such that its support ToU = {v ∈ V | o(v) 6= 0} is finite. We call such a map the 2-sharing group. We use a polynomial notation for 2-sharing groups as for ω-sharing groups. For instance, o = xy ∞ z denotes the 2-sharing group whose support is ToU = {x, y, z}, such that o(x) = o(z) = 1 and o(y) = ∞. We denote with ∅ the 2-sharing group with empty support. Note that in (King 1994) the number 2 is used as an exponent instead of ∞, but we prefer this notation to be coherent with ω-sharing groups. We denote min{o(x), 2} by om (x), where the ordering on N is extended in the obvious way, i.e., for all n ∈ N we have that n < ∞. A 2-sharing group o represents the sets γ2 (o) of ω-sharing group given by: γ2 (o) = {B ∈ ℘m (V) | ToU = TBU ∧ ∀x ∈ ToU.om (x) ≤ B(x) ≤ o(x)} . For instance, the 2-sharing group xy ∞ z represents the set of ω-sharing groups {xy 2 z, xy 3 z, xy 4 z, xy 5 z, . . .}. The idea is to use 2-sharing groups to keep track of linearity: if o(x) = ∞, it means that the variable x is not linear in the 2-sharing group o. In the rest of this section, we use the term “sharing group” as a short form of 2-sharing group, when this does not cause ambiguity. An ω-sharing group B may be abstracted into the 2-sharing group α2 (B) given 22 G. Amato and F. Scozzari by: α2 (B) = λv ∈ TBU. ( 1 if B(x) = 1, ∞ otherwise. The next proposition shows two useful properties of the maps α2 and γ2 . Proposition 5.1 The following properties hold: U U 1. α2 ( R) = α2 (R). 2. rel (γ2 (S), x, t)) = γ2 (rel (S, x, t)). Since we do not want to represent definite non-linearity, we introduce an order relation over sharing groups as follows: o ≤ o′ ⇐⇒ ToU = To′ U ∧ ∀x ∈ ToU. o(x) ≤ o′ (x) , and we restrict our attention to downward closed sets of sharing groups. We denote by Sg 2 (V ) the set of 2-sharing groups whose support is a subset of V . The domain we are interested in is the following:  ShLin2 = [S]U | S ∈ ℘↓ (Sg 2 (U )), U ∈ ℘f (V), S 6= ∅ ⇒ ∅ ∈ S , where ℘↓ (Sg 2 (U )) is the powerset of downward closed subsets of Sg 2 (U ) according to ≤ and [S1 ]U1 ≤2 [S2 ]U2 iff U1 = U2 and S1 ⊆ S2 . For instance, the set {xy ∞ z} is not downward closed, while {xyz, xy ∞ z} is downward closed. There is a Galois insertion of ShLin2 into ShLinω given by the pair of adjoint maps γ2 : ShLin2 → ShLinω and α2 : ShLinω → ShLin2 : h[ i γ2 ([S]U ) = {γ2 (o) | o ∈ S} , U α2 ([S]U ) = [↓{α2 (B) | B ∈ S}]U . With an abuse of notation, we also apply γ2 and α2 to subsets of ω-sharing groups and 2-sharing groups respectively, by ignoring the set of variables of interest. For instance, γ2 ({xyz, xy ∞ z}) = {xyz, xy 2 z, xy 3 z, xy 4 z, xy 5 z, . . .}. Theorem 5.2 The pair hα2 , γ2 i is a Galois insertion. Now we may define the optimal mgu for ShLin2 and single binding substitutions as follows: Definition 5.3 (Unification for ShLin2 ) Given [S]U ∈ ShLin2 and the binding x/t, we define mgu2 ([S]U , x/t) = α2 (mguω (γ2 ([S]U ), x/t)) . By construction, mgu2 is the optimal abstraction of mguω , hence also of mgu. In the case where vars(x/t) ⊆ U , by using additivity of α2 we get: h mgu2 ([S]U , x/t) = α2 (γ2 (S) \ rel (γ2 (S), x, t))∪ On the interaction between sharing and linearity  α2 {⊎R | R ∈ ℘m (rel (γ2 (S), x, t)), i X X χ(B, x) = χ(B, t) ≥ |R| − 1} B∈R U B∈R 23 . (4) Now we want to simplify Eq. 4. In particular we would like to get rid of the abstraction and concretization maps and to express the result using only objects and operators in ShLin2 . Therefore, we need to define operations in ShLin2 which correspond to ⊎ and χ in ShLinω . The operation on 2-sharing groups which corresponds to multiset union on ωsharing groups, is given by o ⊎ o′ = λv ∈ V.o(v) ⊕ o′ (v) , U where 0⊕x = x⊕0 = x and ∞⊕x = x⊕∞ = 1⊕1 = ∞. We will use {{o1 , . . . , on }} for o1 ⊎· · ·⊎on . Given a sharing group o, we also define the delinearization operator: o2 = o ⊎ o . (5) Note that o2 = λx ∈ ToU.∞. The operator is extended pointwise to sets and multisets. A fundamental role is played by the notion of multiplicity of a sharing group in a term. While the multiplicity of an ω-sharing group in a term is a single natural number, every object in ShLin2 represents a set of ω-sharing groups, hence its multiplicity should be a set of natural numbers. Actually, it is enough to consider intervals. We define the minimum χm and maximum χM multiplicity of o in t as follows: X X o(v) · occ(v, t) . om (v) · occ(v, t) χM (o, t) = χm (o, t) = v∈ToU v∈ToU Sum and product on integers are lifted in the obvious way, namely, the sum is ∞ if and only if at least one of the addenda is ∞ and n · ∞ = ∞ · n = ∞ for any n ∈ N+ , while 0 · ∞ = ∞ · 0 = 0. The maximum multiplicity χM (o, t) either is equal to the minimum multiplicity χm (o, t) or it is infinite. Note that, if B is an ω-sharing group represented by o, i.e., B ∈ γ2 (o), then χm (o, t) ≤ χ(B, t) ≤ χM (o, t). Actually, not all the values between χm (o, t) and χM (o, t) may be assumed by χ(B, t). Example 5.4 Let o = x∞ and t = f (x, x). According, to our definition, χ(o, t) = [4, ∞). However, it is obvious that if B ∈ γ2 (o), then χ(B, t) is an even number. According to the above definitions, we define the multiplicity of a multiset of sharing groups as n o X X χ(Y, t) = n ∈ N | χm (o, t) ≤ n ≤ χM (o, t) . o∈Y o∈Y Even if this is a superset of all the possible values which can be obtained by combining the multiplicities of all the sharing groups in Y , this definition is sufficiently accurate to allow us to design the optimal abstract unification. 24 G. Amato and F. Scozzari We extend in the obvious way the definition of rel (see Corollary 4.32) from ω-sharing groups to 2-sharing groups, i.e., rel (S, x, t) = {o ∈ S | ToU ∩ vars(x/t) 6= ∅} , and we prove the following Theorem 5.5 (Characterization of abstract unification for ShLin2 ) Given [S]U ∈ ShLinω and the binding x/t with vars(x/t) ⊆ U , we have that mgu2 ([S]U , x/t) = [(S \ S ′ )∪ ] ↓ Y | Y ∈ ℘m (S ′ ), n ∈ χ(Y, x) ∩ χ(Y, t). n ≥ |Y | − 1 ]U , where S ′ = rel (S, x, t). Example 5.6 Let S = ↓{∅, ux∞ , vx∞ , x∞ y, z ∞ } and Y = {{ux∞ , vx∞ , xy, z ∞ }}. We have that χ(Y, x) = {n | n ≥ 5} and χ(Y, f (z, z)) = {n | n ≥ 4}. Since f (z, z) contains two occurrences of z, the “actual” multiplicity of the sharing group z ∞ in f (z, z) should be a multiple of 2. But we do not need to check this condition and can safely approximate this set with {n | n ≥ 4}. This works because we can always choose a number which is contained in both χ(Y, x) and χ(Y, t) and which is an “actual” multiplicity. For instance, we can take n = 6 ∈ χ(Y, x) ∩ χ(Y, f (z, z)) and U since we have 6 ≥ 3 = |Y | − 1, we get that the sharing group Y = uvx∞ yz ∞ belongs to mgu2 ([S]U , x/f (z, z)). This sharing group can be generated by the substitution {x/f (f (u, u, y), f (v, v, y)), z/f (w, w, w)} when the variables of interest are {u, v, x, y, z}. Theorem 5.5 gives a characterization of the abstract unification over ShLin2 . However, it cannot be directly implemented, since one needs to check a certain condition for each element of ℘m (rel (S, x, t)), which is an infinite set. Nonetheless, this is an important starting point to prove correctness and completeness of the abstract unification algorithm which we are going to introduce. The characterization in Theorem 5.5 may be used even when vars(x/t) * U , if we first enlarge the set of variables of interest in order to include all vars(x/t). Theorem 5.7 (Characterization of abstract unification with extension for ShLin2 ) Given [S]U in ShLin2 and the binding x/t, let V = {v1 , . . . , vn } be vars(x/t) \ U . Then, mgu2 ([S]U , x/t) = mgu2 ([S ∪ {v1 , . . . , vn }]U∪V , x/t) . The previous theorem states that enlarging the set of variables of interest preserves optimality. 5.2 An algorithm for abstract unification in ShLin2 In order to obtain an algorithm from the characterization in Theorem 5.5 we need to avoid the use of ℘m (rel (S, x, t)) and to develop a procedure able to compute On the interaction between sharing and linearity 25 the resultant sharing groups by inspecting subsets (not multisets!) of rel (S, x, t). In general, any X ⊆ rel (S, x, t) yields more than one sharing group, since every element in X may be considered more than once. However, since ShLin2 is downward closed, it is enough to compute the maximal resultant sharing groups. Given X ⊆ rel (S, x, t) and the binding x/t, assume that we are only interested U in those sharing groups whose support is T XU. By joining (multiple copies of) U U the sharing groups in X, any resultant sharing group o is between X and X 2 , U U 2 i.e., X ≤ o ≤ X , where X 2 is the pointwise extension of the delinearization operator (see Eq. 5). Note that, if X is badly chosen, it is possible that we are not able to generate any sharing group with this support. In this computation, the notion of multiplicity of a sharing group in a term plays a major role. U For example, given the binding x/t, if χM (o, x) ≤ 1 for each o ∈ X, then X is a resultant sharing group only if there is a unique sharing group o ∈ X such that vars(t)∩ToU 6= ∅. If there are o1 , o2 ∈ X such that χM (o1 , x) > 1 and χM (o2 , t) > 1 U then X is a resultant sharing group. Moreover, we may join two copies of each U sharing group in X, and therefore also X 2 is a resultant sharing group. Now we can define the notions of linearity and non-linearity on the abstract domain. In addition, we also introduce a new notion of strong non-linearity. Given X ⊆ rel (S, x, t), we partition X in three subsets Xx = {o ∈ X | χM (o, t) = 0}, Xt = {o ∈ X | χM (o, x) = 0} and Xxt = X \ (Xx ∪ Xt ). Definition 5.8 Given a set S of sharing groups and X ⊆ rel(S, x, t), we say that X is: • linear for the term t if for all o ∈ X it holds that χM (o, t) ≤ 1; • non-linear for the term t if there exists o ∈ X such that χM (o, t) > 1; • strongly non-linear for the term t if there exists o ∈ X such that χM (o, t) = ∞ or there exists o ∈ Xxt such that χM (o, t) > 1. Analogously, we define linearity and non-linearity of X for the variable x. Note that, if t is a variable, the non-linear and strongly non-linear cases coincide. We now present the algorithm for computing the abstract unification in ShLin2 . Theorem 5.9 (Abstract unification algorithm for ShLin2 ) Given [S]U ∈ ShLin2 and the binding x/t with vars(x/t) ⊆ U , we have [ mgu2 ([S]U , x/t) = [(S \ S ′ ) ∪ ↓ res(X, x, t)]U , X⊆S ′ where S ′ = rel (S, x, t) and res(X, x, t) is defined as follows: U 1. if X is non-linear for x and t, then res(X, x, t) = { X 2 }; 2. if X is non-linear for x and linear for t, |Xx | ≤ 1 and |Xt | ≥ 1, then we have U U 2 U res(X, x, t) = {( Xx ) ⊎ ( Xxt ) ⊎ ( Xt2 )}; 3. if X is linear for x and strongly non-linear for t, |Xx | ≥ 1 and |Xt | ≤ 1, then U U 2 U we have res(X, x, t) = {( Xx2 ) ⊎ ( Xxt ) ⊎ ( Xt )}; 26 G. Amato and F. Scozzari 4. if X is linear for x and not strongly non-linear for t, |Xt | ≤ 1, then we have ] ] ] 2 res(X, x, t) = {( Z) ⊎ ( Xxt ) ⊎ ( Xt ) | Z ∈ ℘m (Xx ), |Z| = χM (Xt , t) = χm (Xt , t), TZU = Xx } ; 5. otherwise res(X, x, t) = ∅. Example 5.10 Let U = {u, v, x, y} and consider the set of 2-sharing groups S = {∅, xu, x∞ , xy, yv} and consider the binding x/r(y, y). Note that S ′ = {xu, x∞ , xy, yv}. Let us compute res(X, x, r(y, y)) for some X’s, subsets of S ′ . • X = {x∞ , yv}. In this case, χM (x∞ , x) = ∞ and χM (yv, r(y, y) = 2, hence X is non-linear for x and r(y, y). From the first case of Theorem 5.9, we have U U that res(X, x, r(y, y)) = { X 2 } = { {x∞ , y ∞ v ∞ } = {x∞ y ∞ v ∞ }; • X = {xu, xy, yv}. Then X is linear for x and strongly non-linear for r(y, y), since xy ∈ Xxt and χM (xy, r(y, y)) = 2. From the third case, it follows that U U U res(X, x, t) = {( {xu}2 ) ⊎ ( {xy}2 ) ⊎ ( {yv})} = {x∞ y ∞ u∞ v}; • X = {xu, yv}. Then X is linear for x and not strongly non-linear for r(y, y) (note that χM (yv, r(y, y)) = 2 > 1 and yv ∈ Xt , hence X is non-linear for r(y, y) but it is not strongly non-linear). Since χM (Xt , r(y, y)) = 2, we only need to consider those Z ∈ ℘m (Xx ) such that |Z| = 2. There is only one such U set, which is Z = {{xu, xu}}. Therefore res(X, x, r(y, y)) = {( {{xu, xu}}) ⊎ U 2 U ( {} ) ⊎ ( {yv})} = {x∞ yu∞ v}. Note that, given X ⊆ S ′ , if x does not appear in any sharing group of S, then res(X, x, t) ⊆ {∅}. In fact, we can only apply the fourth or fifth case. In the fourth case, we have that Xx = Xxt = ∅, and thus the only Z ∈ ℘m (Xx ) is the empty multiset. Thus, |Z| = 0, which implies that Xt = ∅, and res(X, x, t) = {∅}. In the fifth case, the result is trivially the emptyset. Symmetrically, when none of the variables of t appears in S, again we can apply only the fourth or fifth case, and res(X, x, t) ⊆ {∅}. Example 5.11 Consider S and U as in Example 5.10. We compute mgu2 ([S]U , x/r(y, y)). We show the value of res(X, x, r(y, y)) for every X ⊆ S ′ = rel (S, x, r(y, y)) which contains On the interaction between sharing and linearity 27 both the variables x and y: X res(S, x, r(y, y)) case in Theorem 5.9 x∞ , xy x∞ , yv x∞ , xy, yv x∞ , xu, xy x∞ , xu, yv x∞ , xu, xy, yv xu, xy xu, yv xu, xy, yv x∞ y ∞ x∞ y ∞ v ∞ x∞ y ∞ v ∞ x∞ y ∞ u∞ x∞ y ∞ u∞ v ∞ x∞ y ∞ u∞ v ∞ x∞ y ∞ u∞ x∞ yu∞ v x∞ y ∞ u∞ v 1 1 1 1 1 1 3 4 3 Hence mgu2 ([S]U , x/r(y, y)) = ↓{∅, x∞ y ∞ , x∞ y ∞ v ∞ , x∞ y ∞ u∞ , x∞ y ∞ u∞ v ∞ , x∞ yu∞ v, x∞ y ∞ u∞ v} The main difference between the algorithm in Theorem 5.9 and the characterization in Theorem 5.5 is that in the former X is a subset of S ′ while, in Theorem 5.5, Y is a multiset over S ′ . Since the number of subsets of S ′ is finite, the characterization in Theorem 5.9 is an algorithm. Obviously, a direct implementation of mgu2 would be very slow, so that appropriate data structures and procedures should be developed for a real implementation. Although this is mostly out of the scope of this paper, we show here that the definition of mgu2 ([S]U , x/t) may be modified to consider only maximal subsets of rel (S, x, t). This should help in reducing the computational complexity of the abstract operator. Given [A]U ∈ ShLin2 , let max A be the set of maximal elements of A, i.e., max A = {a ∈ A | ∄b ∈ A.b >2 a}. Given a sharing group o, we define the linearized version of o, denoted by l(o), as ( 1 if v ∈ ToU , l(o)(v) = 0 otherwise . The linearization operator l is extended pointwise to sets of sharing groups. We show that instead of choosing X as a subset of S ′ in the definition of mgu2 , we may only consider those X’s which are subsets of max S ′ . Theorem 5.12 Given [S]U ∈ ShLin2 and the binding x/t with vars(x/t) ⊆ U , we have [ mgu2 ([S]U , x/t) = [(S \ S ′ ) ∪ ↓ (res(X, x, t) ∪ res ′ (X, x, t))]U , X⊆max S ′ where S ′ = rel (S, x, t) and ( U { X 2} res ′ (X, x, t) = ∅ if X = Xxt and l(X) is linear for t , otherwise . 28 G. Amato and F. Scozzari The next examples compare our optimal abstract unification operator to the original one and show the increase in precision. Example 5.13 Let U = {u, v, w, x, y}. Consider the set of 2-sharing groups S = {∅, xu, xv, xw, y}. We compute mgu2 ([S]U , x/r(y, y)). Since rel(S, x, r(y, y)) = S, we need to consider any X ⊆ S. If y ∈ / X then clearly res(X, x, r(y, y)) = ∅. If y ∈ X, since χM (y, r(y, y)) = 2, it follows that X is linear for x and not strongly non-linear for r(y, y). Thus mgu2 ([S]U , x/r(y, y)) = [↓{∅, x∞ u∞ y, x∞ uvy, x2 uwy, x∞ v ∞ y, x∞ vwy, x∞ w∞ y}]U On the other hand, computing with the unification algorithm given in (King 1994), the result is ↓{∅, x∞ u∞ y, x∞ u∞ v ∞ y, x∞ u∞ w∞ y, x∞ v ∞ y, x∞ v ∞ w∞ y, x∞ w∞ y, x∞ u∞ v ∞ w∞ y} . The old algorithm is not able to infer the linearity which arises when combining two distinct sharing groups from {xu, xv, xw} with {y}. Moreover, it does not assert that the variables u, v, w cannot share a common variable. Example 5.14 Let U = {u, x, y, z} and S = {∅, xu, xy, yz}. By computing mgu2 ([S]U , x/r(y)) we obtain ↓{∅, x∞ y ∞ , x∞ uy ∞ z}, which shows that u and z are linear after the unification. This is not the case when computing with the unification algorithm in (King 1994), since we obtain ↓{∅, x∞ y ∞ , x∞ u∞ y ∞ z ∞ , x∞ u∞ y ∞ , x∞ y ∞ z ∞ }. Note that, we also improve the groundness information. In fact, in our result, groundness of u implies groundness of z. Both examples show the increased precision w.r.t. King’s algorithm. In the first example, we obtain optimality thanks to the introduction of the notion of (non-) strong non-linearity. In the second example, we improve the result since we do not need to consider independence between x and t, in order to exploit linearity information. 5.3 Unification for multi-binding substitutions The unification operator on ShLin2 has been defined for single binding substitutions. It is possible to extend this operator to multi-binding substitutions in the obvious way, namely by iterating the single binding operators. mgu2 ([S]U , {x/t} ⊎ θ) = mgu2 (mgu2 ([S]U , x/t), θ) . However, defined in such a way, mgu2 is not optimal. Consider, for example, S = {∅, xz, yw}, U = {x, y, z, w}, and the substitution θ = {x/r(y, y), z/w}. We have that mgu2 ([S]U , x/r(y, y)) = [↓ {∅, x∞ z ∞ yw}]U . Since x∞ zyw ≤2 x∞ z ∞ yw, by applying the third case of mgu2 to Y = {x∞ zyw} we get mgu2 ([↓ {∅, z ∞ x∞ yw}]U , z/w) = [↓ {∅, x∞ y ∞ z ∞ w∞ }]U . On the interaction between sharing and linearity 29 However, α2 (mguω (γ2 ([{∅, xz, yw}]U , θ))) = α2 (mguω ([{xz, yw}]U , θ)) = α2 (mguω ([{wx2 yz 2 }]U , {z/w})) = α2 ([{{}}]U ) = [∅]U , which shows that mgu2 is not optimal. Note that, we do not use optimality of mguω to prove this result, since correctness is enough. The problem is that, to be able to conclude that the unification of S with θ is ground, we need to keep track of the fact that, after the first binding, w is linear and z is definitively non-linear. Since ShLin2 is downward closed, we are not able to state this property. Note that, in the case we have presented here, by changing the order of the bindings we get an optimal result in ShLin2 , but this happens just by accident. Now, consider the substitution θ = {x/r(y, ...., y), z/s(y, ..., y), u/v} with S = {∅, xu, zv, y} and U = {u, v, x, y, z}. Assume that r(y, ...., y) is an n-ary term, s(y, ..., y) is an m-ary term with n 6= m and n, m ≥ 2. We have that: mgu2 ([S]U , x/r(y, ...., y)) = [↓{∅, x∞ u∞ y, zv}]U , mgu2 ([↓{∅, x∞ u∞ y, zv}]U , z/s(y, ..., y)) = [↓{∅, x∞ u∞ z ∞ v ∞ y}]U , mgu2 ([↓{∅, x∞ u∞ z ∞ v ∞ y}]U , u/v) = [↓{∅, x∞ u∞ z ∞ v ∞ y}]U . On the other hand, we have that: α2 (mguω (γ2 ([{∅, xu, zv, y}]U , θ))) = α2 (mguω ([{xu, zv, y}]U , θ)) = α2 (mguω ([{xn un y, zv}]U , {z/s(y, ..., y), u/v})) = α2 (mguω ([{xn un yz m v m }]U , {u/v})) = α2 ([{{}}]U ) = [∅]U . However, if n = m, we have: α2 (mguω (γ2 ([{∅, xu, zv, y}]U , θ))) = α2 ([{{{}}} ∪ {xkn ukn y k z kn v kn | k ∈ N}]U ) = [↓{∅, x∞ u∞ z ∞ v ∞ y}]U . In this case, keeping track of the variables which are definitively non-linear does not help. It seems that, in order to compute abstract unification one binding at a time, we need to work in a domain which is able to keep track of the exact multiplicity of variables in a sharing group. Actually, this is how ShLinω works. Obviously, we could try to develop a different algorithm for unification in ShLin2 which directly works with multi-binding substitutions. However, since the algorithm for single binding substitutions is already quite complex, we think this is not worth the effort. 30 G. Amato and F. Scozzari 5.4 The domain Sharing × Lin The reduced product ShLin = Sharing × Lin has been used for a long time in the analysis of aliasing properties, since it was recognized that the precision of these analyses could be greatly improved by keeping track of the linear variables. Among the papers which consider the domain ShLin, we refer to (Hans and Winkler 1992) and (Hill et al. 2004). Actually, these papers also deal with freeness properties, which we do not consider here, to further improve precision. Although the domain ShLin has been used for many years, the optimal unification operator is as yet unknown, even for a single binding substitution. We provide here a new abstract operator for ShLin, designed from the abstract unification for ShLin2 , and we prove that it is optimal for single binding substitutions. The domain ShLin keeps track of linearity by recording, for each object of Sharing, the set of linear variables. Each element is now a triple: the first component is an object of Sharing, the second component is an object of Lin, that is, the set of variables which are linear in all the sharing groups of the first component, and the third component is the set of variables of interest. It is immediate that ShLin is an abstraction of ShLin2 (and thus of ShLinω ). In the following, we briefly recall the definition of the abstract domain and provide the abstraction function from ShLin2 . ShLin = {[S, L, U ] | S ⊆ ℘(U ), (S 6= ∅ ⇒ ∅ ∈ S), L ⊇ U \ vars(S), U ∈ ℘f (V)} , with the approximation relation ≤sl defined as [S, L, U ] ≤sl [S ′ , L′ , U ′ ] iff U = U ′ , S ⊆ S ′ , L ⊇ L′ . There is a Galois insertion of ShLin into ShLin2 given by the pair of maps: αsl ([S]U ) = [{ToU | o ∈ S}, {x ∈ U | ∀o ∈ S. o(x) ≤ 1}, U ] , γsl ([S, L, U ]) = [{BL | B ∈ S}]U , where BL is the 2-sharing group which has the same support of B, with linear variables dictated by the set L. In formula:   ∞ if B ∈ U \ L,  BL = λv ∈ V. 1 if B ∈ L,   0 otherwise. The functional composition of αω , α2 and αsl gives the standard abstraction map from substitutions to ShLin. We still use the polynomial notation to represent sharing groups, but now all the exponents are fixed to one. Note that the last component U in [S, L, U ] is redundant since it can be retrieved as L ∪ vars(S). This is because the set L contains all the ground variables. 5.5 Abstract unification for Sharing × Lin In order to obtain a correct and optimal abstract unification over ShLin, the trivial way is to directly compute αsl (mgu2 (γsl ([S, L, U ]), x/t)). However, we prefer to give On the interaction between sharing and linearity 31 an unification operator similar to the other operators for ShLin in the literature (Howe and King 2003; Bagnara et al. 2005; Hill et al. 2004). As for the domain ShLin2 , we now provide the notions of multiplicity and linearity over ShLin. Given a set L of linear variables, we define the maximum multiplicity of a sharing group o in a term t as follows: (P v∈o occ(v, t) if o ∩ vars(t) ⊆ L χL M (o, t) = ∞ otherwise According to the similar definition for 2-sharing groups, given [S, L, U ] ∈ ShLin, we say that (S, L) is linear for a term t when for all o ∈ S it holds that χL M (o, t) ≤ 1. Note that, when t is a variable, the definition boils down to check whether t ∈ L. Given X ⊆ rel (S, x, t), we fix the set L of linear variables and partition X in L three subsets Xx = {o ∈ X | χL M (o, t) = 0}, Xt = {o ∈ X | χM (o, x) = 0} and Xxt = X \ (Xx ∪ Xt ). Moreover, we need to define the following subsets of X: Xt=∞ Xt=1 =1 Xxt = {B ∈ Xt | χL M (B, t) = ∞}, = {B ∈ Xt | χL M (B, t) = 1}, = {B ∈ Xxt | χL M (B, t) = 1}, Xt∈N Xt>1 >1 Xxt = {B ∈ Xt | χL M (B, t) ∈ N}, = {B ∈ Xt | χL M (B, t) > 1}, L = {Xxt | χM (B, t) > 1}. Since we do not deal with definite linearity, we need to take into account the sharing groups which can be obtained by linearizing variables. This may be accomplished U by using the set U instead of L when computing the multiplicity. We denote by Xxt the set U Xxt = {B ∈ Xxt | χU M (B, t) = 1} , which corresponds to the linearizable sharing groups. Moreover, given sets A1 , . . . , An with n ≥ 2 we denote by bin(A1 , . . . , An ) the S S set { {a1 , . . . , an } | a1 ∈ A1 , . . . , an ∈ An }, by A∗ the set { B | B ⊆ A} and by S A+ the set { B | B ⊆ A, B 6= ∅}. This notation slightly deviates from most of other literature on Sharing, where A∗ does not include the empty set. We prefer to adopt a double notation, namely, A∗ and A+ , which is more standard in the rest of the research community. Definition 5.15 (Abstract unification algorithm for ShLin) Given [S, L, U ] ∈ ShLin and the binding x/t such that vars(x/t) ⊆ U , we define mgusl ([S, L, U ], x/t) = [(S \ X) ∪ K, U ′ ∪ L′ , U ] , where X = rel (S, x, t) = {B ∈ S | B∩vars(x/t) 6= ∅} and U ′ = U \vars((S\X)∪K). Here, K is the set of new sharing groups created by the unification process and U ′ is the set of variables which do not appear in any sharing group of the result, i.e. the set of ground variables. K is defined as follows: 32 G. Amato and F. Scozzari • If x ∈ L: ∗ K = bin(Xt=∞ , Xx+ , Xxt )∪ >1 ∗ bin(Xt ∪ {∅}, Xxt , Xx+ , Xxt )∪ =1 ∗ bin({{o} ∪ (∪Z) | o ∈ Xt∈N , Z ⊆ Xx , 1 ≤ |Z| ≤ χL M (o, t)}, (Xxt ) )∪ (6) U + (Xxt ) . • If x ∈ / L: >1 K = bin(Xt>1 ∪ Xxt , Xx ∪ Xxt , X ∗ )∪ =1 =1 ∗ bin((Xt=1 )+ , Xx ∪ Xxt , (Xxt ) )∪ =1 + (Xxt ) (7) . Finally, the set L′ of linear variables which are not ground is   L \ (vars(Xx ∪ Xxt ) ∩ vars(Xt ∪ Xxt )) if (S, L) is linear for x and t,    L \ vars(X ∪ X ) otherwise, if (S, L) is linear for x, x xt L′ = (8)  otherwise, if (S, L) is linear for t, L \ vars(Xt ∪ Xxt )    L \ vars(X) otherwise. Theorem 5.16 (Optimality of mgusl ) The operator mgusl in Definition 5.15 is correct and optimal w.r.t. mgu, when vars(x/t) ⊆ U . Example 5.17 Let S = {∅, xv, xy, zw}, L = {v, w, x, y}, U = {v, w, x, y, z} and consider the binding x/f (y, z). It is easy to check that (S, L) is linear for x but not for t. Applying our operator, we obtain mgusl ([S, L, U ], x/f (y, z)) = [S ′ , L′ , U ] with S ′ = {∅, xy, vwxyz, vwxz} and L′ = {w}. This is more precise that the operators for Sharing × Lin in (Hans and Winkler 1992). Actually, even using the optimizations proposed in (Howe and King 2003; Hill et al. 2004), one obtains as result the object [{vxy, vwxz, xy, wxyz, vwxyz}, {w}, U ] . The optimization proposed in (Bagnara et al. 2005) is not applicable as it is, since it requires vars(rel (S, x)) and vars(rel (S, f (y, z))) to be disjoint. Even assuming that this test for independence may be removed as unnecessary, the final result would be the same as above. In both cases, our operator is able to prove that vxy and wxyz are not possible sharing groups. Note that, in a domain for rational trees, the sharing group vxy is needed for correctness, since the unification of {x/f (f (v, y), c), z/w} with the binding x/f (y, z) succeeds with {x/f (f (v, y), c), z/c, w/c, y/f (v, y)}. This means that we are able to exploit the occur-check of the unification in finite trees. As a consequence, our abstract unification operator is not correct w.r.t. a concrete domain of rational substitutions (King 2000). On the interaction between sharing and linearity 33 An alternative would be to compute the abstract unification following Theorem 5.9 with χM and ⊎ replaced by χL M and ∪ respectively (we can obviously ignore the delinearization operator ( )2 since B ∪ B = B). However, we do not pursue further this approach. In the case vars(x/t) * U , we may proceed as for ShLinω and ShLin2 : enlarge the set of variables of interest in order to include all vars(x/t) and compute unification with mgusl . Definition 5.18 (Abstract unification algorithm with extension in ShLin) Given [S, L, U ] ∈ ShLin and the binding x/t, let V = {v1 , . . . , vn } be vars(x/t) \ U . We define: mgusl ([S, L, U ], x/t) = mgusl ([S ∪ {v1 , . . . , vn }, L ∪ V, U ∪ V ], x/t) . Theorem 5.19 (Optimality of mgusl with extension) The operator mgusl in Definition 5.18 is the optimal abstraction of mgu. Although the abstract operator mgusl is optimal for the unification with a single binding, the optimal operator for a multi-binding substitution cannot be obtained by considering one binding at a time. This is a consequence of the fact that the corresponding operator for single binding unification on ShLin2 cannot be extended to an optimal multi-binding operator by simply considering one binding at a time. In fact, all the counterexamples in Section 5.3 are also counterexamples for mgusl , since it is the case that [S]U = γsl (αsl ([S]U )). 6 Optimal unification in practice In this section, we give some evidence that there are practical advantages in using the optimal unification operators for ShLin. It is far beyond the scope of this paper to provide an experimental evaluation of the new algorithms, but the results in (Bagnara et al. 2005) give some hints on its possible outcome. Bagnara et al. (2005) introduce an improvement for Sharing × Lin × Free exploiting some ideas from King’s unification operator for the domain ShLin2 . In this way, they improve precision in a few cases and show that efficiency of the analysis is more likely to be increased than decreased. In fact, even if the final result of the analysis does not change, a more precise operator may reduce the number of sharing groups in the intermediate steps, which helps performance. Hence, we expect the optimal unification for ShLin to further improve the analysis, both in efficiency and precision. This is more evident if we consider that Bagnara et al. (2005) measure precision in terms of the number of independent pairs (as well as definitively ground, free and linear variables) and do not consider set-sharing. However, Bueno and Garcı́a de la Banda (2004) show that set-sharing information may be useful in several application of the analysis, such as parallelization of logic programs. Hence, a greater improvement in precision is to be expected if we consider the full set-sharing property. We now provide a concrete example of a simple program where our abstract operators give better results than the operators known in the literature. 34 G. Amato and F. Scozzari 6.1 An example: difference lists We work with difference lists, an alternative data structure to lists for representing a sequence of elements. A difference list is a term of the kind A \ B where A and B are lists, which represents the list obtained by removing B from the tail of A. For example, using PROLOG notation for lists, [1, 2, 3, 4] \ [3, 4] represents the list [1, 2], while [1, 2, 3|x] \ x and [1, 2, 3] \ [] represent the list [1, 2, 3]. The difference lists whose tail is a variable (such as [1, 2, 3|x] \ x) are mostly useful, since they can be concatenated in constant time. An overview of difference lists may be found in (Sterling and Shapiro 1994). We define the predicate difflist /3, which translates lists to difference lists and vice-versa. The goal ← difflist (l, h, t) succeeds when the difference list h\t represents the standard list l. For example, difflist ([], x, x) and difflist ([1, 2, 3], [1, 2, 3|x], x) succeed without any further instantiation of variables. In order to improve the precision of the analysis, we keep head and tail of difference lists in separate predicate arguments. The code for difflist /3, in head normal form, is the following. difflist (l, h, t) ← l = [], h = t. difflist (l, h, t) ← l = [x|l′ ], h = [x|h′ ], difflist (l′ , h′ , t). where l, l′ (list), h, h′ (head), t (tail) and x are variables. We informally compute the goal-independent analysis of difflist on the domain ShLin, which gives: Jdifflist K0 =[{∅}, {l, h, t}, {l, h, t}] , Jdifflist K1 =[{∅, ht, hl}, {l, h, t}, {l, h, t}] , Jdifflist K2 =Jdifflist K1 . The result of the analysis is not affected by our improved unification operator: the standard mgu for ShLin, as given in (Hans and Winkler 1992), yields exactly the same result. Now, suppose we want to analyze the goal ← difflist (l, h, h). This corresponds to the goal ← difflist (l, h, t), h = t in head normal form. Its semantics may be computed, using our operators, as mgusl ([{∅, ht, hl}, {l, h, t}, {l, h, t}], h/t) = [{∅, ht}, {l}, {l, h, t}] . By projecting over l and h, we get [{∅, h}, {l}, {l, h}]. Hence, the analysis is able to infer that, upon exiting the goal ← difflist (l, h, h), the variable l is ground. By using the standard mgu for ShLin in (Hans and Winkler 1992), we get [{∅, ht, htl}, {l}, {l, h, t}] , (9) hence l is detected to be linear but not ground. The optimizations introduced in (Howe and King 2003; Hill et al. 2004; Bagnara et al. 2005) do not improve this result. This is a consequence of the fact that these optimizations have been developed to be correct also for rational trees. In this case, you cannot infer that l is ground after ← difflist (l, h, h) since the substitution in rational solved form {l/[v], h/[v|h]} is a correct answer for the same goal. If we perform the analysis in ShLin2 , using our operators we have Jdifflist K = [{∅, hl, ht}]lht and the result for the goal ← difflist (l, h, h) is [{∅, h}]lh . However, On the interaction between sharing and linearity 35 by using the original operator in (King 1994), the semantics of difflist does not change, but the result for the goal ← difflist (l, h, h) is [{∅, h∞ , h∞ l∞ }]lh thus l is not proven to be either ground or linear. The fact that optimal operators improve groundness information is somehow surprising. Generally, one expects that groundness affects aliasing analysis, but not vice-versa. In fact, it is well known that Sharing is a refinement (Cortesi et al. 1997) of the domain Def. However, as far as groundness is concerned, the precision of Sharing and Def is the same, i.e., the other objects included in Sharing do not improve groundness analysis (Cortesi et al. 1998). As far as we know, there is no abstract unification operator in the literature, for a domain dealing with sharing, freeness and linearity, which is more precise that Def for groundness. On the contrary, the example above shows that ShLin, endowed with the optimal unification, improves over Def. Amazingly, in this example ShLin is even better than Pos (Armstrong et al. 1994). In the latter, the abstract semantics of difflist is h ↔ (l∧t), i.e., h is ground iff both l and t are ground. The result of the analysis for the goal ← difflist (l, h, h) is ∃t (h ↔ (l ∧ t) ∧ h ↔ t). This is equivalent to h → l which does not imply groundness of l. Actually, h → l is the groundness information which may be inferred by (9). 6.2 Another example for ShLin2 As far as we know, there is no implementation or experimental evaluation of the domain ShLin2 . We think it would be worthwhile to give such an implementation and that there is some evidence that ShLin2 improves over ShLin also in practice. For instance, we show a simple program where King’s domain is more precise than ShLin with optimal operators. We provide a variant of the predicate difflist /3, which we call difflist ′ /2, with only two arguments: head and tail of the difference list are encoded in the second argument as the term head \ tail . difflist ′ (l, d) ← l = [], d = h \ h. difflist ′ (l, d) ← l = [x|l′ ], d = [x|h] \ t, d′ = h \ t, difflist ′ (l′ , d′ ). We informally compute the goal-independent analysis of difflist ′ on the domain ShLin, which gives: Jdifflist ′ K0 =[{∅}, {d, l}, {d, l}] , Jdifflist ′ K1 =[{∅, dl, d}, {l}, {d, l}] , Jdifflist ′ K2 =Jdifflist ′ K1 . The same analysis, computed over ShLin2 , gives Jdifflist ′ K0 =[{∅}]dl , Jdifflist ′ K1 =[{∅, dl, d, d∞ }]dl , Jdifflist ′ K2 =Jdifflist ′ K1 . Now, suppose we want to analyze the goal ← difflist ′ (l, d), d = [x1 , x2 |h] \ t, 36 G. Amato and F. Scozzari which extracts the first two elements from the difference list d. In ShLin we have the following mgusl ([{∅, dl, d}, {l}, {d, l}], d/[x1, x2 |h] \ t) = [{∅} ∪ bin({dl, d}, {x1 , x2 , h, t}∗ ), {l}, {d, l, x1, x2 , h, t}] . Note that the sharing group dlx1 x2 is part of the result. If we repeat the analysis in ShLin2 , we have  mgu2 ([{∅, dl, d, d∞ }]dl , d/[x1 , x2 |h] \ t) = {∅, dlx1 , dlx2 , dlh, dlt} ∪ ]  ∞ ∞ ∞ ∞ ∞ ∞ ↓ X | X ∈ ℘({d∞ x∞ 1 , d x2 , d h , d t }) dlx1 x2 ht . This result does not contain the sharing group dlx1 x2 . Generally speaking, it is easier to analyze the predicate difflist /3 than difflist ′ /2. Codish et al. (2000) propose a method named untupling which is able to automatically recover difflist /3 from difflist ′ /2. 7 Related work In this paper, we work with a concrete domain of substitutions on finite trees. In the literature, some authors deal with rational trees. Since any correct operator for rational trees is also correct for finite trees, we can compare the unification operators for rational trees with ours (of course, this is not entirely fair as far as the precision is concerned). The opposite is not true, since an abstract unification operator for finite trees may be able to exploit the occur-check condition. We have shown in Example 5.17 that our optimal operator can exploit the occur-check condition, and thus it is not correct for rational trees. 7.1 Sharing It is well-known that the abstract unification operator of the domain Sharing alone (i.e., without any freeness or linearity information) is optimal. Cortesi and Filé (1999) give a formal proof of optimality, considering a slightly different unification operator with two abstract objects and a concrete substitution. Since the two abstract objects are renamed apart, it is equivalent to consider a single abstract object. The basic idea underlying the proof is to exhibit, for each sharing group in the result of the unification, a pair of concrete substitutions generating the resulting sharing group. We follow the same constructive schema in the proof of optimality for ShLinω (but we look for a single substitution, due to the different concrete operator). Instead, to prove optimality for ShLin and ShLin2 , we use a direct approach and show that the abstract unification operator corresponds to the best correct abstraction (i.e., α ◦ mguω ◦ γ) of the unification on ShLinω with simple (although tedious) algebraic manipulations. A different unification operator has been proposed in (Amato and Scozzari 2002; Amato and Scozzari 2009) for goal-dependent analysis of Sharing. In this paper, the standard unification operator is splitted into two different operators for forward On the interaction between sharing and linearity 37 and backward unification. Both operators are proved to be optimal and the overall analysis is strictly more precise than the analysis performed on Sharing equipped with the standard operator. As far as we know, these are the only optimality results for domains encoding aliasing properties. 7.2 Sharing × Lin In most of the work combining sharing and linearity, freeness information is included in the abstract domain. In fact, freeness may improve the precision of the aliasing component and it is also interesting by itself, for example in the parallelization of logic programs (Hermenegildo and Rossi 1995). In this comparison, we do not consider the freeness component. The first work which combines set-sharing with linearity is (Langen 1990), followed by (Hans and Winkler 1992). The initial unification algorithm has been improved by Howe and King (2003) and Hill et al. (2004) by removing an independence test. This increases the number of cases when linearity information may be exploited. Bagnara et al. (2005) propose a different improvement, adopting an idea by King (1994) for the domain ShLin2 , which simplifies the unification of a linear term with a non-linear one. Example 5.17 shows that, even adopting all these improvements, we still obtain a strictly more precise operator. Since our operator is optimal, any further improvement is now impossible. Bagnara et al. (2002) show that, if we are only interested in pair-sharing information, Sharing is redundant. They propose a new domain SS ρ which is obtained by discharging redundant sharing groups. A sharing group B in a set S is redundant if |B| > 2 and ∀x, y ∈ B. ∃C ∈ S. {x, y} ⊆ C ⊂ B. Analyses performed with SS ρ are shown to be as precise as those performed with Sharing, if only pair-sharing information is required. Hill et al. (2004) introduce the domain SS ρ × Lin × Free. Example 5.17 shows that our operator is still more precise (of course, without considering the freeness component), because of the sharing group vxy which does not appear in S ′ and is not redundant for SS ρ . In any case, Bueno and Garcı́a de la Banda (2004) have shown that classical applications of sharing analyses, such as parallelization of logic programs, are able to exploit information which is encoded in Sharing × Free but not in SS ρ × Free. An alternative presentation of Sharing × Lin, based on set logic programs, has been introduced by Codish et al. (2000). However, the proposed operators are not optimal, as shown in Hill et al. 2004. The domain ShLin2 is introduced by King (1994), which provides correct operators for abstract unification. However, these operators are not optimal, as Examples 5.13 and 5.14 show. 7.3 ASub An alternative approach to aliasing analysis is to only record sharing between pairs of variables (and possibly linearity and groundness information). The best known 38 G. Amato and F. Scozzari domain of this category is ASub, introduced by Søndergaard (1986) and formalized by Codish et al. (1991). The domain ASub is the reduced product of pair-sharing, Lin and Con (Jones and Søndergaard 1987), which is the simplest domain for definite groundness. Recently, King (2000) reformulated the proofs in order to work with rational trees. Moreover, King’s algorithms are parametric w.r.t. the groundness domain, allowing to replace Con with more precise domains such as Def and Pos. The domain Sharing × Lin is strictly more precise than ASub, since it embeds more groundness information (equivalent to Def) and set-sharing information. Since our operator for Sharing × Lin is optimal, we are sure that the analyses performed in Sharing × Lin are strictly more precise than those in ASub. The following is a counterexample to the optimality of the abstract unification in (King 2000), in the case of finite trees, when pair sharing is equipped with Def or Pos. Example 7.1 Consider the object κ = (x ↔ y, {xy}) where the first component is a formula of Def and Pos and {xy} is the set of pairs of variables which may possibly share. In this domain, linearity information is embedded in the second component in the following way: if v is not linear, then vv must be included in the second component. Thus, both x, y and z are linear in (x ↔ y, {xy}). We want to unify κ with x/f (y, z). By using the algorithm (King 2000), we obtain (y ↔ x∧x → z, {xy, xz, yz, xx, yy}). However, in Sharing × Lin we may represent κ with [S, L, U ] = [{xy, z}, {x, y, z}, {x, y, z}] and mgusl ([S, L, U ], x/f (y, z)) = [{xy}, {z}, {x, y, z}] which proves that z is ground. Actually, King (2000) does not state explicitly how to compute the groundness component of the result, although he says that it must be computed before the linearity and pair-sharing components, in order to improve precision. However, it seems safe to assume that the author’s intention was to compute the groundness component using the abstract operators already known, and therefore independently from the pair sharing component. This is what makes our operator more precise, since linearity information may help in tracking ground variables when working over finite trees. 7.3.1 Alternating paths The domain ASub and its derivatives (King 2000) use the concept of alternating path. Alternating paths may seem the counterparts, for pair-sharing, of sharing graphs. We now investigate this idea, and show to what extent this correspondence is faithful. We call carrier graph a special graph defined by a set of equations E. Each distinct occurrence of a variable in E is a node. Edges in the carrier graphs can be of two types: • edges of type one between two variable occurrences if the occurrences are on opposite sides of a single equation in E, 39 On the interaction between sharing and linearity • edges of type two linking two (distinct) occurrences of the same variable. An alternating path is a sequence of edges of alternating type over the carrier graph. Alternating paths in ASub (and derivatives) are used to prove correctness of the abstract unification operators. For example, they are used to prove Prop. 3.1 in (King 2000). Sharing graphs are used in this paper to prove Theorem 4.31, which is the starting point to prove correctness and optimality of the unification algorithms for ShLin2 and ShLin. However, sharing graphs are also used to compute the abstract unification in ShLinω . Even if alternating paths are not used, in the literature, for computing abstract unification, they could. For any object of pairsharing o, which is a set of pairs of variables, consider any substitution θ in the concretization of o. Then, the object o is an abstraction of the set of alternating paths in θ. More precisely, it represents all the paths which start and end with edges of type one, which we call admissible paths. They are abstracted by considering only the start and end variables. In order to unify o with the binding x/t, we build a carrier graph with all the occurrences of variables in o and x/t. For each pair of variables in o, we add an edge of type one. We add edges of type one and two for the binding x/t, as explained above. Finally, we add all the type two edges between any occurrence in x/t and any occurrence of the same variable in o. We consider all the admissible paths over the graph so obtained. It is not difficult to check that the result of the unification algorithm for pair-sharing in (King 2000), without any additional groundness domain, is the set of all the start and end variables for all these admissible paths. Example 7.2 Let S = {xv} be the set of pairs of variables which share, and consider the binding x/r(y, y). We obtain the carrier graph: y      x? ?? ??1 ?? 1 1 v x 2 2 y which gives origin to several alternating paths. Among them, there is an admissible path from v to v, which proves that v is not linear after the unification. The first difference between alternating paths and sharing graphs is that all the alternating paths are subgraphs of the same carrier graph, while each sharing graph has a different structure, with a different set of nodes. The second difference is that the information coming from the abstract object and the binding is encoded in a different way. For instance, consider the set S = {xy} and the binding x/z. We obtain a carrier graph with 4 nodes x, y, x, z, two edges x 2 1 y and x 1 z x of type two. Therefore, the sharing information of type one, and an edge x coming from the initial pair-sharing and the binding is treated symmetrically, and 40 G. Amato and F. Scozzari is entirely encoded on the edges. Performing unification on the carrier graph boils down to devising the alternating paths on the graph. On the contrary, each sharing graph has a set of nodes labelled by xy, x and z, with suitable multiplicities. The labels of the nodes encode the initial pair-sharing information, while the binding affects the multiplicity of nodes. The process of unification consists of adding the necessary arrows to get a sharing graph. If we consider a single alternating path in a carrier graph and the sharing graph for the same pair-sharing information and the same binding, they are obviously related, although not in a straightforward manner. Consider an admissible path and delete all type two edges, collapsing in a single node their start and end nodes (type two edges are used in the carrier graph to avoid the creation of invalid paths, but in a single alternating path they do not add information). Then, each type one edge coming from the initial pair-sharing information corresponds to a node in the sharing graph, while a type one edge coming from the binding becomes an arrow in the sharing graph. Example 7.3 Consider Example 7.2. We depict the (admissible) alternating path from v to v, its collapsed version and the corresponding sharing graph. v v 1 2 x 1 x x ✞ ☎ 0 xv ✝ ✆ 1 1 y 2 1 y 1 1 y / ✞ ✝ y x ☎ 2 o ✆ 0 2 x 1 v x 1 v ✞ ☎ 0 xv ✝ ✆ 1 Note that, while in the carrier graph, non-linearity of the variable x is handled by duplicating the variable y which occurs twice, in alternating paths without type two nodes, the duplicated variables are x and v, which are connected to y. The same holds in the sharing graph, where we have only one node labeled by y and two nodes labelled by xv. In sharing graphs we also require the multiplicities of a node to be equal to its in- and out-degrees. This makes possible to handle groundness at the same level of sharing and linearity, without requiring a separate domain. Remember that a sharing group S with multiplicity n corresponds, in the concrete domain, to a variable u such that θ−1 (u) = S. If the degree of the node labeled with this sharing group is not n, this means that one of the occurrences of u is bound to a ground term. This would make ground the entire connected component containing S. Hence, in order to correctly and precisely propagate groundness, we just forbid this kind of sharing graphs. On the contrary, the pair-sharing algorithm in (King 2000), which focus on a single path in the carrier graph, is not able to extract groundness information without the help of an auxiliary domain. On the interaction between sharing and linearity 41 7.4 Lagoon and Stuckey’s domain Lagoon and Stuckey (2002) have recently proposed a different approach to pairsharing analysis. The authors use multigraphs, called relation graphs, to represent sharing and linearity information. The nodes of the multigraph are variables, and two of them may share only if there is a traversable path from one variable to the other. Intuitively, each binding generates edges of different types. The definition of traversable paths is very similar to that of alternating paths. A traversable path is a sequence of edges, such that contiguous edges are always of different types. This domain should be coupled with a groundness domain, and operators are parametric w.r.t. the latter one. The authors show that relation graphs, when coupled with the Def groundness domain, are more precise than Sharing and ASub. However, this is not the case for Sharing × Lin, at least in the case of finite trees, since the operators in (Lagoon and Stuckey 2002) are not able to use linearity to improve the precision of the groundness component. Example 7.4 As shown in Example 7.1, if we unify [S, L, U ] = [{xy, z}, {x, y, z}, {x, y, z}] with the binding x/f (y, z), we obtain mgusl ([S, L, U ], x/f (y, z)) = [{xy}, {z}, {x, y, z}], proving that z is ground after the unification. In the domains ΩDef and ΩPos of (Lagoon and Stuckey 2002), the abstract object corresponding to [S, L, U ] is  y ,x ↔ y . µ1 = x Intuitively, the first element of µ1 encodes the sharing information, namely, that x and y may share (while z does not share neither with x nor with y). The second element of µ1 is an element of Pos (and also of Def) and denotes the groundness information that x is ground if and only if y is ground. The unification of µ1 with x/f (y, z) in ΩPos is realized by abstracting the substitution and composing the two abstract object. The abstraction of x/f (y, z) is   y             µ2 =  x @ , x ↔ (y ∧ z) ,  @@    @@   @@ z The first element says that x shares with both y and z, while y and z do not share. The second element says that x is ground if and only if both y and z are ground. The abstract conjunction is   y         , (x ↔ y) ∧ (x → z) , µ1 f µ2 =  x @   @@   @@   @@ z 42 G. Amato and F. Scozzari where edges drawn in different styles are compatible, namely, that they come from different bindings. From this result, it is not possible to infer that z is ground after the unification. In the actual implementation, Lagoon and Stuckey (2002) use another representation for their domain. Each pair of variables is annotated with a formula denoting the groundness models under which the corresponding pair-sharing may occur. For example, a pair uv annotated with the formula ū ∧ v̄ ∧ w̄ ∧ z̄ means that u and v may share only if none of u, v, w, z is ground. We conjecture that this domain may be embedded in King’s ShLin2 . The next example shows how to perform this embedding. Example 7.5 We consider the example in Figure 4 in (Lagoon and Stuckey 2002). The variables of interest are u, v, w, z. uw vz uv wz : : : : ū ∧ w̄ v̄ ∧ z̄ ū ∧ v̄ ∧ w̄ ∧ z̄ w̄ ∧ z̄ uz uu vv vw : : : : ū ∧ z̄ ū ∧ w̄ ∧ z̄ v̄ ∧ w̄ ∧ z̄ v̄ ∧ w̄ For instance, uv : ū ∧ v̄ ∧ w̄ ∧ z̄ means that u and v may share only if u, v, w, z are not ground, while uu : ū ∧ w̄ ∧ z̄ means that u is (possibly) not linear only if u, w, z are not ground. Each of these formulas may be viewed as a condition over 2-sharing groups. For example uv : ū ∧ v̄ ∧ w̄ ∧ z̄ means that every 2-sharing group which contains u and v should also contain w and z, while uu : ū ∧ w̄ ∧ z̄ means that each 2-sharing group where u is non-linear should also contain w and z. In order to find the object of ShLin2 which corresponds to this example, it is enough to collect all the 2-sharing groups which satisfy all the conditions enforced by the formulas. In this case, we get ↓{u∞ v ∞ wz, u∞ wz, v ∞ wz, uw, vz, wz, uz, vw, u, v, w, z}. 7.4.1 Traversable paths The idea behind traversable paths is very similar to the concept of alternating path and relation graphs are quite similar to carrier graphs. From a carrier graph, we can obtain a relation graph by removing type two edges and introducing a different type of edge for each binding. This works because the use of non-linear terms is forbidden: a binding like x/r(y, y) has to be replaced by two bindings x/r(y, z) and y/z. However, the main difference w.r.t. traditional pair-sharing (and also ShLinω ) is that Lagoon and Stuckey (2002) do not abstract traversable paths to set of pairs of variables, but they keep in the abstract object the set of all the edges generated during the unification process. In this way, they are able to record that, in order for two variables x and y to share, the only possible path touches another variable z. Hence, if z is ground, x and y cannot share: in this way they recover pair sharing dependence information which would be lost otherwise. We could follow the same approach and use multilayer sharing graphs (namely, sets of sharing graphs over the same set of nodes, where each layer represents the On the interaction between sharing and linearity 43 unification with a single binding) as abstract objects, without collapsing them to sharing groups. We do not think this would improve precision of the domain very much, since a sharing group is already a much more concrete abstraction of a graph w.r.t. the set of all the connected pairs of variables. In fact, already Sharing can encode the information that, grounding a certain variable z, two variables x and y become independent. Moreover, in the Example 7.5 we have shown that relation graphs may be encoded into ShLin2 . 7.5 Rational trees In the recent years, many authors have studied the behavior of logic programs on rational trees (King 2000; Hill et al. 2004), which formalize the standard implementations of logic languages. We have shown that our operators, which are optimal for finite trees, are not correct for rational trees, since they exploit the occur-check to reduce the sharing groups generated by the abstract unification (see Example 5.17). It would be interesting to adapt our framework to work with rational trees, in order to obtain optimal operators also in this case. Since a rational tree may contain infinite occurrences of a variable, the notion of ω-sharing group needs to be extended in order to allow infinite exponents. Also, we need to consider infinite sharing graphs (or, at least, a representation of them) and find suitable regularity conditions for them, analogously to the regularity conditions on rational trees. Example 7.6 Consider the set of ω-sharing groups S = {xy, z} and the binding x/r(z, y). On rational trees, unifying δ = {x/y} (such that [S]xyz 3 [δ]xyz ) with x/r(z, y) would get the substitution {x/r(z, x), y/r(z, y)} in rational solved form. This, intuitively, corresponds to the sharing group xω y ω z where the exponent ω denotes an infinite number of occurrences. A possible (infinite) sharing graph generating this sharing group is the following: ☎ ✞ ☎ ✞ ☎ ✞ ☎ ✞ 1 1 1 1 / xy / xy / z / xy ··· ✝ ✆ ✝ ✆ ✝ ✆ ✝ ✆ 0 1 1 1 Although the structure of abstract objects and operators for adapting ShLinω to work with rational trees is more complex, we expect the optimal abstract operators for rational trees on ShLin2 and Sharing × Lin to be simpler than those presented here for finite trees. This is because we do not need to worry about the occur-check condition (embedded in our unification operator) and infinite multiplicities. 8 Conclusion and Future Works We summarize the main results of this paper: • We define a new domain ShLinω as a general framework for investigating sharing and linearity properties and provide the optimal unification operator. 44 G. Amato and F. Scozzari • We show that ShLinω is a useful starting point for studying further abstractions. We obtain the optimal operators for single binding abstract unification in Sharing×Lin and ShLin2 , and we show that these are strictly more precise than all the other operators in the literature for the same domains. • We show, for the first time, an optimality result for a domain which combines aliasing and linearity information. Moreover, as a negative result, we prove that the standard schema of the iterative unification algorithm (one binding at a time) does not lead to optimal operators for the domains ShLin2 and Sharing × Lin. As a side result, we show that ShLin and ShLin2 with optimal operators may be more precise than Pos for groundness analysis. Several things remain to be explored: first of all, we need to study the impact on the precision and performance obtained by adopting the new optimal operators and domains. We plan to implement the operators on ShLin2 and Sharing× Lin within the CiaoPP static analyzer (Bueno et al. 1997). Moreover, we plan to analyze the domain SS ρ × Lin (Bagnara et al. 2002) in our framework and, possibly, to devise a variant of ShLin2 which enjoys a similar closure property for redundant sharing groups. This could be of great impact on the efficiency of the analysis. Last but not least, we plan to translate our framework to the case of unification over rational trees. A Proofs of Section 4 In this section we give the proofs of the main results of the paper. Theorem 4.6 The relation 3 is well defined. Proof It is enough to prove that {θ1 −1 (v)|U | v ∈ V} = {θ2 −1 (v)|U | v ∈ V} when θ1 ∼U θ2 . Assume that θ1 ∼U θ2 , then by definition of ∼U there exists a renaming ρ such that ρ(θ1 (u)) = θ2 (u) for each u ∈ U . Given S = θ1−1 (v)|U , if w = ρ(v) we have θ2−1 (w)|U = θ1−1 (v)|U = S. This concludes the proof. Proposition 4.13 Given a substitution θ, a variable v and a term t, we have that χ(θ−1 (v), t) = occ(v, θ(t)). Moreover, given a set of variables U , when vars(t) ⊆ U , it holds that χ(θ−1 (v)|U , t) = occ(v, θ(t)). Proof Let B = θ−1 (v). The proof is by induction on the structure of the term t. If t ≡ a is a constant, then occ(v, θ(a)) = occ(v, a) = 0 which is equal to χ(B, a) since occ(w, a) = 0 for each w ∈ V. If t ≡ w is a variable, then occ(v, θ(w)) = θ−1 (v)(w) = B(w). At the same time, χ(B, t) = B(w) since occ(w, w) = 1 and 45 On the interaction between sharing and linearity occ(y, w) = 0 for y 6≡ w. For the inductive case, if t ≡ f (t1 , . . . , tn ), we have Pn Pn occ(v, t) = i=1 occ(v, ti ) = i=1 χ(B, ti ) by inductive hypothesis. Moreover χ(B, t) = X (B(v) · n X occ(v, ti )) = B(v) · occ(v, ti ) = n X χ(B, ti ) . i=1 i=1 v∈TBU i=1 v∈TBU n X X Let U be a set of variables with vars(t) ⊆ U . By definition, χ(θ−1 (v)|U , t) = P / U it holds that occ(w, t) = 0, w∈θ −1 (v)|U occ(w, t). Since vars(t) ⊆ U , for any w ∈ and thus χ(θ−1 (v)|U , t) = χ(θ−1 (v), t). Proposition 4.24 Given substitutions θ, η ∈ ISubst and an ω-sharing group B, we have (η ◦ θ)−1 (B) = θ−1 (η −1 (B)) . Proof Using the definitions and simple algebraic manipulations, we have θ−1 (η −1 (B)) = =  λw.χ λv.χ(B, η(v)), θ(w) X λw. χ(B, η(y)) · occ(y, θ(w)) y = λw. X X y = λw. X B(x) · occ(x, η(y)) x B(x) · x = λw. X x = λw. X ! X · occ(y, θ(w)) occ(x, η(y)) · occ(y, θ(w)) y B(x) · X η −1 (x)(y) · occ(y, θ(w)) y B(x) · χ(η −1 (x), θ(w)) . x By Prop. 4.13, we have that χ(η −1 (x), θ(w)) = occ(x, η(θ(w)) and therefore θ−1 (η −1 (B)) = (η ◦ θ)−1 (B) . Theorem 4.25 (Correctness of mguω ) The operation mguω is correct w.r.t. mgu, i.e., ∀[S]U ∈ ShLinω , δ ∈ ISubst. [S]U 3 [θ]U =⇒ mguω ([S]U , δ) 3 mgu([θ]U , δ) . Proof Given [S]U 3[θ]U and δ ∈ ISubst, we need to prove that mguω ([S]U , δ)3mgu([θ]U , δ) or the equivalent property αω (mgu([θ]U , δ)) ≤ω mguω ([S]U , δ). Since mguω is defined inductively on the number of bindings in δ, it is enough to prove that mguω ([S]U , x/t) 3 mgu([θ]U , {x/t}) for a single binding x/t. Since composition of correct operators is still correct, it follows that multi-binding unification is correct. 46 G. Amato and F. Scozzari Moreover, when vars(x/t) 6⊆ U , we exploit the identity mgu([θ]U , {x/t}) = mgu(mgu([θ]U , [ǫ]vars(x/t) ), {x/t}). When computing mgu([θ]U , [ǫ]vars(x/t) ) all the variables in vars(x/t) \ U occurring in θ are renamed apart from x/t itself. Therefore each v ∈ vars(x/t) \ U is free (hence linear) in mgu([θ]U , [ǫ]vars(x/t) ), i.e., αω (mgu([θ]U , [ǫ]vars(x/t) )) = [S ∪ {{{v}} | v ∈ vars(x/t) \ U }]U∪vars(x/t) . Therefore, it is enough to prove that mguω ([S]U , x/t) 3 mgu([θ]U , {x/t}) when vars(x/t) ⊆ U . Let B be a sharing group in αω (mgu([θ]U , {x/t})), we prove that B ∈ mguω ([S]U , x/t). If B = {{}}, we consider a multigraph G with only one node labelled by {{}} and no edges. It is easy to check that G is a sharing graph for S (since {{}} ∈ S) and x/t, and that res(G) = {{}}. Therefore, in the following we consider only the case B 6= {{}}. The proof is composed of three parts: first, we look for a (special) substitution β obtained by renaming some variables in θ and such that β is still approximated by S; second, we define a multigraph G exploiting the variables of β; third, we show that we can restrict G to a smaller sharing graph whose resultant ω-sharing group is exactly B. First part. Without loss of generality, we assume that dom(θ) = U (this is always possible since, in any class [θ]U , there exists a substitution whose domain is exactly U ). Let θ′ = mgu(θ, {x/t}) = η ◦ θ with η = mgu({θ(x) = θ(t)}) and we have [θ′ ]U = mgu([θ]U , [x/t]U ). Since dom(θ) = U , we have vars(η) ∩ U = ∅. Consider η ′ obtained from η by replacing each occurrence of a variable in rng(η) with a different fresh variable. This means that there exists ρ ∈ Subst mapping variables to variables such that ρ(η ′ (x)) = η(x) for each x ∈ dom(η). Namely, we have ρ = {v1 /v2 | ∃x ∈ dom(η), ξ ∈ Ξ s.t. η ′ (x)(ξ) = v1 ∧ η(x)(ξ) = v2 } . Note that ρ is not a renaming, since it is not bijective. We now show that β = η ′ ◦ θ has the property that [S]U 3 [β]U . For any C ∈ α([β]U ), we may distinguish three cases: • C = {{}}. In this case C ∈ S by definition of ShLinω ; • C = β −1 (w)|U for w ∈ rng(θ) \ dom(η). In this case occ(w, (η ′ ◦ θ)(v)) = occ(w, θ(v)) for each v ∈ V, therefore β −1 (w)|U = θ−1 (w)|U ∈ S; • C = β −1 (w)|U for w ∈ rng(η ′ ). Hence there exists v ∈ rng(θ) such that occ(w, η ′ (v)) = 1 and occ(w, η ′ (v ′ )) = 0 for each v ′ ∈ / {v ′ , w}. Hence, for each u ∈ U , occ(w, η ′ (θ(u))) = n iff occ(v, θ(u)) = n and this implies C = θ−1 (v)|U ∈ S. Moreover ρ(β(u)) = θ′ (u) for each u ∈ U , therefore θ′ ∼U ρ ◦ β. Second part. Consider the labelled multigraph G such that NG = {v | v ∈ vars(β(U ))}, lG (v) = β −1 (v)|U ∈ S and EG = {ξ | β(x)(ξ) ∈ V}. Note that if β(x)(ξ) ∈ V, then β(t)(ξ) ∈ V, too. Each position ξ in EG is an arrow such that srcG (ξ) = β(x)(ξ) and tgtG (ξ) = β(t)(ξ). Observe that the second condition in the definition of sharing graph for S and x/t is satisfied, since [S]U 3 [β]U . On the interaction between sharing and linearity 47 Let us check the third condition. For each node v ∈ NG , if χ(β −1 (v)|U , x) = n by Prop. 4.13 we have occ(v, β(x)) = n, i.e., there are n positions in β(x) corresponding to v. Therefore the outdegree of v is n. In the same way, we have that χ(β −1 (v)|U , t) is the in-degree of v. Third part. Given B = θ′−1 (u)|U , by Prop. 4.24 we have B = β −1 (ρ−1 (u))|U . Since θ′ U β U θ, then [θ′ ]U = mgu([β]U , {x/t}) = [mgu(β, {x/t})]U . Therefore ρ ◦ β ′ ∼U θ′ = mgu(θ, {x/t}) ∼U mgu(β, {x/t}) = mgu(β(x) = β(t)) ◦ β. We call δ the result of mgu(β(x) = β(t)), and note that β(x) = β(t) is equivalent to the set of equations X = {v1 = v2 | there is a position ξ such that β(x)(ξ) = v1 ∧ β(t)(ξ) = v2 }. The relation ρ ◦ β ∼U δ ◦ β means that, if w1 , w2 ∈ β(U ) and ρ(w1 ) = ρ(w2 ) then δ(w1 ) = δ(w2 ). The latter implies that there are in X equations of the kind x1 = x2 , x2 = x3 , . . . , xn−1 = xn with x1 = w1 and xn = w2 , i.e., that w1 and w2 are connected in the graph G. Therefore, let Y = {w | ρ(w) = u} = Tρ−1 (u)U. This is not empty, since B 6= {{}}. If ξ is an edge such that srcG (ξ) ∈ Y , then tgtG (ξ) ∈ Y , since β(x)(ξ) = β(t)(ξ) ∈ X. The converse also holds. Hence, if we restrict the graph G to the set of nodes Y , U we obtain a sharing graph whose resultant ω-sharing group is w∈Y β −1 (w)|U = β −1 (ρ−1 (u))|U = B. Theorem 4.28 (Optimality of mguω ) The single binding unification mguω ([S]U , x/t) is optimal w.r.t. mgu, under the assumption that vars(x/t) ⊆ U , i.e., : ∀B ∈ mguω ([S]U , x/t) ∃δ ∈ ISubst. [S]U 3 [δ]U and B ∈ αω (mgu([δ]U , {x/t})) . Proof Let X ∈ mguω (S, x/t). By definition of mguω , there exists a sharing graph G such that X ∈ res(G). Let NG = {n1 , . . . , nk }. We want to define a substitution δ such that [S]U 3 [δ]U and X ∈ αω (mgu([δ]U , {x/t})). If X = {{}} this is trivial, hence we assume that X 6= {{}}. The structure of the proof is as follows: first, we define a substitution δ which unifies with x/t; second, we show that δ is approximated by [S]U , namely, [S]U 3 [δ]U ; third, we show that X ∈ αω (mgu([δ]U , {x/t})). First part. We now define a substitution δ which unifies with x/t. For each node n ∈ NG we consider a fresh variable wn and we denote by W the set of all these new variables. P For any y ∈ U \ {x} we define a term ty of arity n∈NG lG (n)(y) as follows: ty = r(wn1 , . . . , wn1 , wn2 , . . . , wn2 , . . . , wnk , . . . , wnk ) {z } | {z } | | {z } lG (n1 )(y) times lG (n2 )(y) times lG (nk )(y) times We know that there exists a map f : EG → V such that, for each variable y and node n, the set of edges targeted at n and labelled with y by f is exactly lG (n)(y) · occ(y, t). Namely, we require |{e ∈ EG | f (e) = y ∧ tgtG (e) = n}| = lG (n)(y) · occ(y, t) . The idea is that each edge targeted at the node n is actually targeted at one of 48 G. Amato and F. Scozzari the specific variables in lG (n). In particular, each variable y ∈ TlG (n)U should have exactly lG (n)(y) · occ(y, t) edges targeted at it, so that the total number of edges P pointing n is y∈U lG (n)(y) · occ(y, t) = χ(lG (n), t), i.e., the in-degree of n. The map f chooses, for each edge targeted at n, a variable in lG (n) according to the previous idea. Now, for each node n and variable y ∈ U , we denote by Mn,y the set of edges pointing at y in n, i.e., Mn,y = {e ∈ EG | tgtG (e) = n ∧ f (e) = y}. Thus Mn,y may be partitioned in occ(y, t) sets of lG (n)(y) elements, denoted by Mn,y,ξ such that ∪{Mn,y,ξ | t(ξ) = y} = Mn,y . We may define some variations of the terms ty by replacing the variables occurring in them with those in the set Mn,y,l . In particular, for y ∈ U \{x} and any occurrence P ξ of a variable y in t, we define the term tyξ of arity n∈NG lG (n)(y) as tyξ = r(w(Mn1 ,y,ξ ), w(Mn2 ,y,ξ ), . . . , w(Mnk ,y,ξ )) , where, if M = {e1 , . . . , eq }, we define w(M ) as the sequence wn′1 , . . . , wn′q where n′j = srcEG (ej ). Note that ty and tyξ have, in corresponding positions, variables related to nodes which are connected through edges. We are now ready to define the substitution δ in the following way: • δ(x) is the same as t with the difference that each occurrence ξ of a variable y ∈ t is replaced by the term tyξ ; • for y ∈ U \ {x} then δ(y) = ty ; • in all the other cases, i.e v ∈ / U , δ(v) = v. Second part. Now we show that [S]U 3[δ]U . We need to consider all the variables v ∈ V and check that δ −1 (v)|U ∈ S. We distinguish several cases. • If we choose the variable wn for some n ∈ N , by construction occ(wn , ty ) = lG (n)(y). Moreover, since G is a sharing graph, there are lG (n)(x) edges in E departing from n and targeted to nodes m such that χ(lG (m), t) 6= 0. Thus P y∈vars(t),m∈NG |{e ∈ Mm,y |srcEG (e) = n}| = lG (n)(x) and occ(δ(x), wn ) = lG (n)(x). Since for each v ∈ U we have that occ(δ(v), wn ) = lG (n)(v), we obtain the required result which is δ −1 (wn )|U = lG (n) ∈ S. • If we choose a variable v ∈ U then v ∈ dom(δ) and δ −1 (v) = {{}} ∈ S. • Finally, if v ∈ / U ∪ W , then δ −1 (v) = {{v}} and δ −1 (v)|U = {{}} ∈ S. Third part. We now show that X ∈ αω (mgu([δ]U , {x/t})). By definition of mgu over ISubst ∼ , we have that mgu([δ]U , {x/t}) = [mgu(δ, {x/t})]U . We obtain: η =mgu(δ, {x/t}) =  {x/t} ◦ mgu {y = ty | y ∈ U \ {x}} ∪ {y = tyξ | t(ξ) = y} = {x/t} ◦ {y/ty | y ∈ U \ {x}} ◦ mgu{ty = tyξ (A1) | t(ξ) = y} . Let F be the set of equations {ty = tyj | t(j) = y}. We show that, for any edge n → m ∈ EG , it follows from F that wn = wm . Since n → m ∈ EG , then for some y ∈ vars(t) it holds that f (n → m) = y. This implies that n → m ∈ Mm,y and 49 On the interaction between sharing and linearity therefore there exists a position ξ such that n → m ∈ Mm,y,ξ . By definition of tyξ , it means that wn ∈ vars(tyξ ), in the same position where wm occurs in ty , hence wn = wm follows from ty = tyξ ∈ F . We know that G is connected, hence for any n, m ∈ NG , the set of equations in F implies wn = wm . We choose a particular node n̄ ∈ NG and, for what we said before, we have mgu(F ) = {wn /wn̄ | n ∈ NG \ {n̄}}. We show that η −1 (wn̄ )|U = X. η −1 (wn̄ )|U = {x/t}−1 ({y/ty | y ∈ U \ {x}}−1 ({{wn1 , . . . , wnk }}))|U X = {x/t}−1 ({{wn1 , . . . , wnk }} ⊎ λy ∈ U \ {x}. lG (n)(y))|U X = λy ∈ U \ {x}. P lG (n)(y) ⊎ {{x y∈V n∈NG P occ(y,t)· n∈NG lG (n)(y) }} n∈NG X = λy ∈ U \ {x}. P lG (n)(y) ⊎ {{x n∈NG χ(lG (n),t) }} . n∈NG Since G is a sharing graph, the total out-degree P total in-degree n∈NG χ(lG (n), x). Hence P n∈NG χ(lG (n), t), is equal to the η −1 (wn̄ )|U = λy ∈ U \ {x}. X P lG (n)(y) ⊎ {{x n∈NG χ(lG (n),x) }} n∈NG = λy ∈ U. X lG (n)(y) n∈NG = res(G) . This concludes the proof. Theorem 4.30 (Optimality of mguω with extension) The single binding unification mguω with extension is optimal w.r.t. mgu. Proof Let S ′ = S ∪ {{{v}} | v ∈ vars(x/t) \ U }, V = U ∪ vars(x/t) and X ∈ mguω (S ′ , x/t). We want to find [δ]U such that [S]U 3 [δ]U and X ∈ αω (mgu([δ]U , {x/t})). Following the previous theorem, we find δ such that X ∈ αω (mgu([δ]V , {x/t})) and [S ′ ]V 3 [δ]V . We want to prove that [S]U 3 [δ]U and αω (mgu([δ]V , {x/t})) ≤ω αω (mgu([δ]U , {x/t})), so that [δ]U is the existential substitutions we are looking for. We first show that [S]U 3 [δ]U . Let v ∈ V. Since [S ′ ]V 3 [δ]V , it follows that −1 δ (v)|V ∈ S ′ . • If δ −1 (v)|V ∈ S, then δ −1 (v)|V = δ −1 (v)|U , since vars(S) ⊆ U , and thus δ −1 (v)|U ∈ S. • If δ −1 (v)|V ∈ / S, then δ −1 (v)|V ∈ {{{v}} | v ∈ vars(x/t) \ U }. Then δ −1 (v)|U = {{}} ∈ S. 50 G. Amato and F. Scozzari Now we distinguish two cases: either x ∈ U or x ∈ / U. If x ∈ U , with the same considerations which led to (A1), we have mgu({x/t}, δ) = mgu({x = t} ∪ Eq(δ|U ) ∪ Eq(δ|V \U )) = = mgu({x = t} ∪ Eq(δ|U ) ∪ {y = ty | y ∈ vars(t) \ U } For each y ∈ vars(t) \ U there exist a position ξy such that t(ξy ) = y and {x/t} ∪ Eq(δ|U ) ∪ {y = ty } is equivalent to {x/t} ∪ Eq(δ|U ) ∪ {tyξy = ty }. Note that, since y ∈ / U , then ty (which is actually δ(y)) is linear and independent from x/t and the other bindings in δ. Therefore mgu({x = t} ∪ Eq(δ|U ) ∪ {y = ty | y ∈ vars(t) \ U } =mgu({x = t} ∪ Eq(δ|U ) ∪ {tyξy = ty | y ∈ vars(t) \ U } =mgu({x = t} ∪ Eq(δ|U )) ⊎ β ′ where β ′ = mgu({tyξy = ty | y ∈ vars(t) \ U }) and dom(β ′ ) = vars({ty | y ∈ vars(t) \ U }). It follows that αω ([mgu({x = t} ∪ Eq(δ|U )) ⊎ β ′ ]V ) =αω ([mgu({x = t} ∪ Eq(δ|U ))]V ) =αω (mgu([δ]U , {x/t})) . If x ∈ / U , then mgu({x/t}, δ) = mgu({x = t} ∪ Eq(δ|U ) ∪ Eq(δ|vars(t)\U ) ∪ Eq(δ|{x} ) =mgu({x = t} ∪ Eq(δ|U ) ∪ {y = ty | y ∈ vars(t) \ U }∪ {ty = tyξ | t(ξ) = y} Note that x appears in S ′ only in the multiset {{x}}. Moreover, if n is a node labelled by {{x}}, there is only one edge which departs from n and there are no edges which arrive in n. This means that • wn does not appear in any ty for y ∈ V \ {x}, • δ(x) is linear since given edges e 6= e′ , we have that srcEG (e) 6= srcEG (e′ ). As a result, δ(x) is linear and does not share variables with x/t or the other bindings in δ. The last formula may be rewritten as mgu({x = t} ∪ Eq(δ|U ) ∪ {y = ty | y ∈ vars(t) \ U }) ⊎ β where β is a substitution such that dom(β) = vars(δ(x)) ⊆ W . It is obvious that αω ([mgu({x = t} ∪ Eq(δ|U ) ∪ {y = ty | y ∈ vars(t) \ U }) ⊎ β]V ) = αω ([mgu({x = t} ∪ Eq(δ|U ) ∪ {y = ty | y ∈ vars(t) \ U })]V ) . since dom(β) ∩ V = ∅. On the interaction between sharing and linearity 51 Let U1 = vars(t) \ U , then mgu({x = t} ∪ Eq(δ|U ) ∪ Eq(δ|U1 )) =δ|U ◦ mgu(δ|U ({x = t} ∪ Eq(δ|U1 ))) =δ|U ◦ mgu({x = δ|U (t)}) ∪ Eq(δ|U1 ))) [since vars(δ|U1 ) ∩ vars(δ|U ) = ∅ and x 6∈ vars(δ|U1 )] =δ|U ◦ {x/δ|U (t)} ◦ δ|U1 [since {x} ∈ / vars(δ|U1 )] Note that δ|U ◦ {x/δ|U (t)} is mgu(δ|U , {x/t}). We call γ = δ|U ◦ {x/δ|U (t)} and we prove that αω ([γ]V ) ≥ω αω ([γ ◦ δ|U1 ]V ). Consider a variable v ∈ V. If v ∈ / vars(δ|U1 ) there is nothing to prove. If v ∈ rng(δ|U1 ) we know that v does not occur anywhere else in δ|U1 and γ. Then (γ ◦ δ|U1 )−1 (v) = γ −1 ({{y, v}}) = γ −1 (y) ⊎ {{v}} for the unique y such that v ∈ / V , the sharing group over V we obtain in vars(δ|U1 (y)). Therefore, since v ∈ γ ◦ δ|U1 from v may be obtained in γ from the variable y. If v ∈ dom(δ|U1 ) then (γ ◦ δ|U1 )−1 (v) = {{}} which occurs in every element of ShLinω . Theorem 4.31 Let S be a set of ω-sharing groups and x/t be a binding. Then B ∈ mguω (S, x/t) iff there exist n ∈ N+ , B1 , . . . , Bn ∈ S which satisfy the following conditions: 1. B = ⊎1≤i≤n Bi , P P 2. 1≤i≤n χ(Bi , t) ≥ n − 1, 1≤i≤n χ(Bi , x) = 3. either n = 1 or ∀1 ≤ i ≤ n. χ(Bi , x) + χ(Bi , t) > 0. Proof We first prove that these conditions are necessary. Assume that B is a resultant sharing group for S and x/t, obtained by the sharing graph G. We show that there exist a finite set I and, for each i ∈ I, a multiset Bi ∈ S, which satisfy the above conditions. Take I = NG and Bi = lG (i) for each i ∈ I, so that B = ⊎i∈I Bi . Since then in-degree of each node is χ(Bi , x), the sum of the in-degrees of all the nodes is P P i∈I χ(Bi , t). Both of them must i∈I χ(Bi , x) and the sum of the out-degree is be equal to the number of edges in EG . Moreover, each connected graph with |I| nodes has at least |I| − 1 edges. Finally, if a connected graph has more than one node, then every node i has an adjacent edge. Therefore, either χ(Bi , x) or χ(Bi , t) is not zero. Now we prove that the conditions are sufficient. Let I = {1, . . . , n}. If n = 1 and χ(Bi , x) + χ(Bi , t) = 0 for the only i ∈ I, simply consider a sharing graph with a single node labelled with Bi and no edges. Otherwise, we partition the set I in three parts: • Nx = {i ∈ I | χ(Bi , x) = 0}; • Nt = {i ∈ I | χ(Bi , t) = 0}; • N = {i ∈ I | χ(Bi , x) 6= 0, χ(Bi , t) 6= 0}; 52 G. Amato and F. Scozzari Note that this is a partition of I since, by hypothesis, ∀i ∈ I. χ(Bi , x)+χ(Bi , t) > 0. Now we define a connected labelled multigraph G whose sets of nodes is I and whose labelling function is λi ∈ I.Bi . In order to define the edges, we distinguish two cases. N 6= ∅: Let N = {b1 , . . . , bm } with m ≥ 1 and consider the set of edges: {a → b1 | a ∈ Nt } ∪ {b1 → c | c ∈ Nx } ∪ {bi → bi+1 | i ∈ {1, . . . , m − 1}} . N = ∅: If Nt = ∅, then also Nx = ∅ and there is nothing to prove. We assume that Nt 6= ∅, and thus Nx 6= ∅. Let ā ∈ Nt , c̄ ∈ Nx and consider the set of edges: {ā → c | c ∈ Nx } ∪ {a → c̄ | a ∈ Nt \ {ā}} . Note that, in both cases, we obtain a multigraph with the following properties: 1. it is connected; 2. it has exactly n − 1 edges, i.e. it is a tree (if we do not consider the direction of edges); 3. there is no edge targeted at a node i with χ(i, t) = 0 and no edge whose source is a node i with χ(i, x) = 0. In the rest of the proof, we call pre-sharing graph a multigraph which satisfies the above properties. If indeg(i) is the in-degree of a node and outdeg(i) the outdegree, we call unbalancement factor of the graph the value: X {outdeg(i) − χ(Bi , x) | i ∈ I, outdeg(i) > χ(Bi , x)}+ X + {indeg(i) − χ(Bi , t) | i ∈ I, indeg(i) > χ(Bi , t)} . We prove that given a pre-sharing graph with unbalancement factor k, we can build another pre-sharing graph with unbalancement factor strictly less then k. As a result, there is a pre-sharing graph with unbalancement factor equal to zero. Assume that the graph has unbalancement factor k. There is at least an unbalanced node. Assume without loss of generality that the unbalanced node is j and P that outdeg(j) > χ(Bj , x). Since i∈I χ(Bi , x) ≥ n − 1, there exists a node l such that outdeg(l) < χ(Bl , x). Let e be the unique edge with source j such that, if we remove e from the graph, l becomes disconnected from j. Since no edge starts from a node i with χ(Bi , x) = 0, then χ(Bj , x) > 0. This means that outdeg(j) > 1 and there is at least another edge starting from j. Assume that it is e′ : j → j ′ . Remove this edge and replace it with an edge l → j ′ . It is obvious that the result is a pre-sharing graph with a smaller unbalancement factor than the original one. The case for indeg(j) > χ(Bj , t) is symmetric. P P Once the unbalancement factor is zero, since i∈I χ(Bi , x) = i∈I χ(Bi , t) we can freely add other edges in such a way to complete the graph w.r.t. the condition on the degree of nodes. We obtain a sharing graph G such that res(G) = B. B Proofs of Section 5 In this section we give the proofs of correctness and optimality for the abstract unification operators mgu2 and mgusl . On the interaction between sharing and linearity 53 Proposition 5.1 The following properties hold: U U 1. α2 ( R) = α2 (R). 2. rel (γ2 (S), x, t)) = γ2 (rel (S, x, t)). Proof We begin by proving the first property. α2 (⊎{{B1 , . . . , Bn }})   [ X = α2 λv ∈ TBi U. Bi (v) 1≤i≤n = λv ∈ [ TBi U. 1≤i≤n 1≤i≤n ( 1 if P 1≤i≤n Bi (v) = 1 ∞ otherwise = ⊎ {{o1 , . . . , on }} where oi = λv ∈ TBi U. ( 1 if Bi (v) = 1 ∞ otherwise = ⊎ {{α2 (B1 ), . . . , α2 (Bn )}} . Now we proceed with the proof of the second property. rel(γ2 (S), x, t)) [ = {γ2 (o) | o ∈ S, Tγ2 (o)U ∩ vars(x = t) 6= ∅} [ = {γ2 (o) | o ∈ S, ToU ∩ vars(x = t) 6= ∅} (since ToU = Tγ2 (o)U) = γ2 (rel (S, x, t))) . Theorem 5.2 hα2 , γ2 i : ShLin2 ⇌ ShLinω is a Galois insertion. Proof It is obvious that α2 and γ2 are monotone functions and that they are both joinmorphisms. Extensionality of γ2 ◦ α2 follows from the fact that, given an ω-sharing group B, we have B ∈ γ2 (α2 (B)). Finally, given a 2-sharing group o, we have α2 (γ2 (o)) = {o}. This implies that α2 ◦ γ2 is the identity. Theorem 5.5 Given [S]U ∈ ShLinω and the binding x/t with vars(x/t) ⊆ U , we have that mgu2 ([S]U , x/t) = [(S \ S ′ )∪ ] ↓ Y | Y ∈ ℘m (S ′ ), n ∈ χ(Y, x) ∩ χ(Y, t). n ≥ |Y | − 1 ]U , where S ′ = rel (S, x, t). 54 G. Amato and F. Scozzari Proof By using Prop. 5.1 point 2, and since o 6= o′ ⇒ γ2 (o) ∩ γ2 (o′ ) = ∅, we get: α2 (γ2 (S) \ rel (γ2 (S), x, t)) = α2 (γ2 (S) \ γ2 (rel (S, x, t))) = α2 (γ2 (S \ rel (S, x, t))) = S \ rel (S, x, t) . Therefore, we get the equality h mgu2 ([S]U , x/t) = S \ rel(S, x, t)∪  i X X χ(B, x) = χ(B, t) ≥ |R| − 1} α2 {⊎R | R ∈ ℘m (rel (γ2 (S), x, t)), B∈R U B∈R Now, with simple algebraic manipulations, we obtain: α2 ({⊎R | R ∈ ℘m (rel (γ2 (S), x, t)), X X χ(B, t) ≥ |R| − 1}) B∈R B∈R = α2 ({⊎R | R ∈ ℘m (γ2 (rel (S, x, t))), X χ(B, x) = X χ(B, x) = χ(B, t) ≥ |R| − 1}) B∈R B∈R = α2 ({⊎{{B1 , . . . , Bk }} | k ∈ N, ∀i.Bi ∈ γ2 (rel (S, x, t)), X χ(Bi , x) = X χ(Bi , t) ≥ k − 1}) 1≤i≤k 1≤i≤k = α2 ({⊎{{B1 , . . . , Bk }} | k ∈ N, {{o1 , . . . , ok }} ∈ ℘m (rel (S, x, t)), X X χ(Bi , t) ≥ k − 1}) χ(Bi , x) = ∀i.Bi ∈ γ2 (oi ), 1≤i≤k 1≤i≤k = α2 ({⊎{{B1 , . . . , Bk }} | k ∈ N, {{o1 , . . . , ok }} ∈ ℘m (rel (S, x, t)), X X χ(Bi , t) ≥ k − 1}) χ(Bi , x) = ∀i.α2 (Bi ) = oi , 1≤i≤k 1≤i≤k (such oi ’s do always exist since rel (S, x, t) is downworld closed) = ↓{α2 (⊎{{B1 , . . . , Bk }}) | k ∈ N, {{o1 , . . . , ok }} ∈ ℘m (rel(S, x, t)), X X χ(Bi , t) ≥ k − 1} χ(Bi , x) = ∀i.α2 (Bi ) = oi , 1≤i≤k 1≤i≤k = ↓{⊎{{α2 (B1 ), . . . , α2 (Bk )}} | k ∈ N, {{o1 , . . . , ok }} ∈ ℘m (rel (S, x, t)), X X χ(Bi , t) ≥ k − 1} χ(Bi , x) = ∀i.α2 (Bi ) = oi , 1≤i≤k 1≤i≤k (by Prop. 5.1 point 1) = ↓{⊎{{o1 , . . . , ok }} | k ∈ N, {{o1 , . . . , ok }} ∈ ℘m (rel (S, x, t)), X X χ(Bi , t) ≥ k − 1}} χ(Bi , x) = ∀i.α2 (Bi ) = oi , 1≤i≤k 1≤i≤k = ↓{⊎{{o1 , . . . , ok }} | k ∈ N, {{o1 , . . . , ok }} ∈ ℘m (rel (S, x, t)), X X χ(Bi′ , t) ≥ k − 1} χ(Bi , x) = ∀i.α2 (Bi ) = oi , ∀i.α2 (Bi′ ) = oi , 1≤i≤k 1≤i≤k (we discuss later why this is faithful) = ↓{⊎{{o1 , . . . , ok }} | k ∈ N, {{o1 , . . . , ok }} ∈ ℘m (rel (S, x, t)), n ≥ k − 1, . On the interaction between sharing and linearity n∈{ X Bi (x) | ∀i.α2 (Bi ) = oi } ∩ { X 55 χ(Bi′ , t) | ∀i.α2 (Bi′ ) = oi }} 1≤i≤k 1≤i≤k = ↓{⊎{{o1 , . . . , ok }} | k ∈ N, {{o1 , . . . , ok }} ∈ ℘m (rel (S, x, t)), n ≥ k − 1 X X X χ(Bi′ , t) | ∀i.α2 (Bi′ ) = oi }} . oi (x)] ∩ { oim (x), n∈[ 1≤i≤k 1≤i≤k 1≤i≤k The move from a single family {Bi }1≤i≤k to different families {Bi }1≤i≤k and {Bi′ }1≤i≤k is possible since, if X X ∀i.α2 (Bi ) = oi and ∀i.α2 (Bi′ ) = oi and χ(Bi , x) = χ(Bi′ , t) ≥ k − 1 , 1≤i≤k 1≤i≤k we may define a family {Ci }1≤i≤k such that Ci (x) = Bi (x) and Ci (v) = B ′ (v) for each v 6= x. It is immediate to check that the Ci ’s satisfy the condition X X ∀i.α2 (Ci ) = oi and χ(Ci , x) = χ(Ci , t) ≥ k − 1 . 1≤i≤k 1≤i≤k P If we denote with c({{o1 , . . . , ok }}, t) the set 1≤i≤k χ(Bi , t) | ∀i.α2 (Bi ) = oi , what remains to prove is that ] ↓{ X | X ∈ ℘m (rel (S, x, t)), n ∈ χ(X, x) ∩ c(X, t).n ≥ |X| − 1} ] = ↓{ X | X ∈ ℘m (rel (S, x, t)), n ∈ χ(X, x) ∩ χ(X, t), n ≥ |X| − 1} , where the only difference is that we replaced c(X, t) with χ(X, t). We begin by examining the relationship between c(X, t) and χ(X, t). First of all, it is obvious that c(X, t) ⊆ χ(X, t), therefore we only need to prove half of the equality. If there exists o ∈ X such that χM (o, t) = ∞, then c(X, t) is an infinite set. We call n its least element. Under the same conditions, χ(X, t) is the interval [n, ∞]. If there is no o ∈ X such that χM (o, t) = ∞, then c(X, t) = χ(X, t) and they are both singletons. In the same way, if there exists some o ∈ X such that o(x) = ∞ then χ(X, x) is an interval of the kind [n, ∞). However, if there is no such o, then χ(X, x) is a singleton, whose unique element is |{o ∈ X | o(x) = 1}|. Assume that we have X ∈ ℘m (rel (S, x, t)) such that there exists n ∈ χ(X, x) ∩ χ(X, t) with n ≥ |X| − 1. We want to prove that we may find a multiset Y ∈ ℘m (rel (S, x, t)) such that there exists m ≥ |Y | − 1 with m ∈ χ(Y, x) ∩ c(Y, t) and U U X ≤ Y . This is enough to complete the proof of the theorem. We distinguish several cases. • χ(X, x) and χ(X, t) are both infinite. In this case, c(X, t) is infinite. Moroever, since χ(X, x) is an interval, there are infinite natural numbers in χ(X, x) ∩ c(X, t). We may take Y = X. • χ(X, t) is infinite and χ(X, x) is a singleton {v}, then v = |{o ∈ X | o(x) = 1}| ≤ k. Since it must be v ≥ k − 1, there are only two choices: either v = k or v = k − 1. We distinguish the two subcases. — v = k − 1. In this case, there exists o ∈ X such that χm (o, t) = 0 and 56 G. Amato and F. Scozzari o(x) = 1, otherwise it is not possible that v ≥ χm (X, t). Since χ(X, t) is infinite, the same holds for c(X, t), hence we may find an n ∈ c(X, t) such that n ≥ v. Consider Y = X ⊎ (n − v) ∗ {{o}}. We have χ(Y, x) = {v + (n − v)} = n, c(Y, t) = c(X, t) and |Y | = |X| + n − v = n + 1. U Therefore n ∈ c(Y, x) ∩ c(Y, t) and n ≥ |Y | − 1. Y is a valid result, U U and X ≤ Y . — v = k. If there is an o ∈ X such that χm (o, t) = 0, the proof proceeds as in the previous case. Otherwise, χm (X, t) ≥ k and since it should be v = k ≥ χm (X, t), we have χm (X, t) = k. Therefore k ∈ c(X, t) too, since min c(X, t) = min χ(X, t), and we may take Y = X. • if χ(X, t) is finite, then χ(X, t) = c(X, t) and we take Y = X. Theorem 5.7 Given [S]U in ShLin2 and the binding x/t, let V = {v1 , . . . , vn } be vars(x/t) \ U . Then, mgu2 ([S]U , x/t) = mgu2 ([S ∪ {v1 , . . . , vn }]U∪V , x/t) . Proof First of all, given a finite set of variables V , let us define the extension operator extV : ShLinω → ShLinω such that extV ([S]U ) = [S ∪ {{{v}} | v ∈ V \ U }]U∪V . Given V = vars(x/t) \ U = {v1 , . . . , vn }, we have that mgu2 ([S]U , x/t) = α2 (mguω (γ2 ([S]U ), x/t)) = α2 (mguω (extV (γ2 ([S]U )), x/t)) . We also know that mgu2 ([S ∪ {v1 , . . . , vn }]U∪V , x/t) = α2 (mguω (γ2 ([S ∪ {v1 , . . . , vn }]U∪V ), x/t)) . Hence, it is enough to prove that extV (γ2 ([S]U )) = γ2 ([S ∪ {v1 , . . . , vn }]U∪V ) . By definition of γ2 , we have that γ2 ([S ∪ {v1 , . . . , vn }]U∪V ) [  = {γ2 (o) | o ∈ S ∪ {v1 , . . . , vn }} U∪V [  = {γ2 (o) | o ∈ S} ∪ {{{v1 }}, . . . , {{vn }}} U∪V = extV (γ2 ([S]U )) , which completes the proof. [since γ2 (vi ) = {{vi }}] On the interaction between sharing and linearity 57 Theorem 5.9 Given [S]U ∈ ShLin2 and the binding x/t with vars(x/t) ⊆ U , we have [ mgu2 ([S]U , x/t) = [(S \ S ′ ) ∪ ↓ res(X, x, t)]U , X⊆S ′ where S ′ = rel (S, x, t) and res(X, x, t) is defined as follows: U 1. if X is non-linear for x and t, then res(X, x, t) = { X 2 }; 2. if X is non-linear for x and linear for t, |Xx | ≤ 1 and |Xt | ≥ 1, then we have U U 2 U res(X, x, t) = {( Xx ) ⊎ ( Xxt ) ⊎ ( Xt2 )}; 3. if X is linear for x and strongly non-linear for t, |Xx | ≥ 1 and |Xt | ≤ 1, then U U 2 U we have res(X, x, t) = {( Xx2 ) ⊎ ( Xxt ) ⊎ ( Xt )}; 4. if X is linear for x and not strongly non-linear for t, |Xt | ≤ 1, then we have ] ] ] 2 ) ⊎ ( Xt ) | Z ∈ ℘m (Xx ), res(X, x, t) = {( Z) ⊎ ( Xxt |Z| = χM (Xt , t) = χm (Xt , t), TZU = Xx } ; 5. otherwise res(X, x, t) = ∅. Proof By Theorem 5.5, we only need to show that: [ ] ↓ Y | Y ∈ ℘m (S ′ ), n ∈ χ(Y, x) ∩ χ(Y, t). n ≥ |Y | − 1 = ↓ res(X, x, t) , X⊆S ′ (B1) where S ′ = rel (S, x, t). We prove the two different inclusions separately. Left to Right Inclusion. Let ō ∈ res(X, x, t) for some X ⊆ rel (S, x, t). We want to prove that there exist Y ∈ ℘m (S ′ ) and n ∈ χ(Y, x) ∩ χ(Y, t) such that n ≥ |Y | − 1 and ⊎Y = ō. We distinguish several cases: • if X is non-linear for x and t, it is ⊎X 2 = ō. We distinguish two subcases: — if χM (X, t) = ∞, it is enough to take Y = X ⊎ X. — if χM (X, t) is finite, since X is non-linear for t, there exists o′ ∈ X such that χm (o′ , t) > 1. Since S ′ is downward closed, consider o ∈ S such that o(x) = min(o′ (x), 1) and o(v) = o′ (v) if v 6= x. We show that there exists a natural number n such that, for Y = X ⊎X ⊎n{{o}}, we have χm (Y, t) ≥ χm (Y, x) and χm (Y, t) ≥ |Y | − 1. Since χm (Y, x) ≤ 2χm (X, x) + n, we need to solve the inequalities 2χm (X, t) + nχm (o, t) ≥ 2χm (X, x) + n and 2χm (X, t) + nχm (o, t) ≥ 2|X| + n. Since χm (o, t) ≥ 2, there always U exists a solution for n. Since χM (X, x) = ∞, we have that Y = ō is in the left hand side of (B1). • if X is non-linear for x and linear for t. We need to find m such that, if we take Y = Xx ⊎ 2Xxt ⊎ 2mXt , we have χm (Y, t) ≥ χm (Y, x). In other words, we need to solve the disequation 2χm (Xxt , t) + 2mχm (Xt , t) ≥ χm (Xx , x) + 2χm (Xxt , x), which is always possible, since |Xt | ≥ 1. Since |Y | ≤ 1 + 2|Xxt |+ 2m|Xt | we have χm (X, t) ≥ |Y | − 1. 58 G. Amato and F. Scozzari • if X is linear for x and strongly non-linear for t, we distinguish two subcases: — χM (X, t) = ∞. Let n = 2χm (Xxt , t) + χm (Xt , t) and consider any number m such that 2m|Xx | + 2|Xxt | ≥ n (such an m always exists since |Xx | ≥ 1). Then, consider the multiset Y = 2mXx ⊎ 2Xxt ⊎ Xt , and we have that χm (Y, x) = χM (Y, x) = 2m|Xx | + 2|Xxt | ≥ χm (Y, t) by construction. Moreover χM (Y, t) = ∞ and |Y | ≤ 2m|Xx | + 2|Xxt | + 1. U Then Y ∈ res(X, x, t) is a valid resultant sharing group. — χM (X, t) is finite. Let o ∈ Xxt be a sharing group such that χM (o, t) > 1 and o′ be a generic sharing group in Xx . We need to find two natural numbers n and m such that, if we take Y = 2Xx ⊎ 2Xxt ⊎ Xt ⊎ m{{o}} ⊎ n{{o′ }}, we obtain χm (Y, x) = χm (Y, t) (from this immediately follows χM (Y, x) = χM (Y, t)) and χm (Y, x) ≥ |Y | − 1. This means we need to solve the equations: 2|Xx | + 2|Xxt | + m + n = 2χm (Xxt , t) + χm (Xt , t) + mχm (o, t) 2|Xx | + 2|Xxt | + m + n ≥ 2|Xx | + 2|Xxt | + |Xt | + m + n − 1 Since |Xt | ≤ 1, the second equation is always satisfied. A solution for the first equation always exists, since the greatest common divisor of χm (o, t) − 1 and 1 is 1. • if X is linear for x and X is not strongly non-linear for t, consider the multiset Y = Z ⊎ Xxt ⊎ Xxt ⊎ Xt . Then χm (Y, x) = χM (Y, x) = |Z| + 2|Xxt | and χm (Y, t) = χM (Y, t) = 2|Xxt | + χm (Xt , t). Since |Z| = χm (Xt , t), we have that χm (Y, x) = χm (Y, t). Moreover, |Y | = |Z| + 2|Xxt | + |Xt | ≤ χm (Xt , t) + 2|Xxt | + 1 = χm (Y, t) + 1. U Right to left inclusion. Let o = X where X ∈ ℘m (S ′ ) and there exists n ≥ |X| − 1 such that n ∈ χ(X, x) ∩ χ(X, t). We show that there exists Y ⊆ S ′ and o′ ∈ res(Y, x, t) such that o′ ≥2 o. Let k = |X|. We partition X in three multisets Xx = X|{o|χM (o,t)=0} , Xt = X|{o|χM (o,x)=0} and X|xt = X|{o|χM (o,t)>0∧χM (o,t)>0} . Note that Xx , Xt and Xxt here are multisets and not ordinary set as in the definition of mgu2 . We distinguish several cases: • if TXU is linear for x and strongly non-linear for t, then χm (X, x) = χM (X, x) = |Xx | + |Xxt | ≤ k. Since χm (X, x) ≥ k − 1, there are two cases: either |Xx | + |Xxt | = k − 1 or |Xx | + |Xxt | = k, which implies that |Xt | ≤ 1. Since TXU is strongly non-linear for t, there exists o′′ ∈ Xt ⊎ Xxt such that χM (o′′ , t) ≥ 2, and thus χm (X, t) ≥ 2. Therefore χm (X, t) > |Xxt |. Since χm (X, x) = χM (X, x) ≥ χm (X, t), we have that |Xx | ≥ 1. It follows that U U U U o = (Xx ⊎ Xxt ⊎ Xt ) ≤2 ( TXx U)2 ⊎ ( TXxt U)2 ⊎ ( TXt U) ∈ res(TXU, x, t). • if TXU is linear for x and not strongly non-linear for t, then, as in the previous case we have |Xt | ≤ 1. Since X is not strongly non-linear for t, χM (X, t) = χm (X, t) = |Xxt |+χM (Xt , t). Moreover, χM (X, x) = χm (X, x) = |Xx |+|Xxt |. By the condition n ∈ χ(X, x) ∩ χ(X, t), we get χM (Xt , t) = |Xx |. Therefore U U U o ≤2 TXx U ⊎ ( TXxt U)2 ⊎ ( Xt ) ∈ res(TXU, x, t). U • if TXU is non-linear for x and t, then o ≤2 ( TXU)2 ∈ res(TXU, x, t). On the interaction between sharing and linearity 59 • if TXU is non-linear for x and linear t, the proof is symmetric to the one of the first case. Theorem 5.12 Given [S]U ∈ ShLin2 and the binding x/t with vars(x/t) ⊆ U , we have [ mgu2 ([S]U , x/t) = [(S \ S ′ ) ∪ ↓ (res(X, x, t) ∪ res ′ (X, x, t))]U , X⊆max S ′ where S ′ = rel (S, x, t) and ( U { X 2} ′ res (X, x, t) = ∅ if X = Xxt and l(X) is linear for t , otherwise . Proof It clearly holds that: mgu2 ([S]U , x/t) ⊇ [(S \ S ′ ) ∪ ↓ [ (res(X, x, t) ∪ res ′ (X, x, t))]U (B2) X⊆max S ′ U since, for each X ⊆ max S ′ , if res ′ (X, x, t) is non-empty then X 2 may be generated by the characterization in Theorem 5.9. It is enough to take X ′ = {l(o) | o ∈ U U X}, hence X ′ = X 2 ∈ res(X ′ , x, t) according to the last case of Theorem 5.9. We prove the opposite inclusion. Let X ⊆ S ′ and assume that X * max S ′ . There exists X ′ ⊆ max S ′ obtained by replacing each a ∈ X with b ∈ max S ′ such that a ≤2 b. We have that |X ′ | ≤ |X| since two different elements in X may be replaced with the same maximal element in X ′ . We want to prove that either res(X, x, t) = ∅, or res(X, x, t) ⊆ ↓res(X ′ , x, t) or res(X, x, t) ⊆ ↓res ′ (X ′ , x, t). Therefore, we assume that res(X, x, t) 6= ∅ and compare the linearity properties (linear, non linear, strongly non-linear) of X ′ w.r.t. those of X. If they coincide, then it follows that res(X, x, t) ⊆ ↓res(X ′ , x, t). This happens because both res(X, x, t) and res(X ′ , x, t) are obtained by the same case of Theorem 5.9. However, note that X ′ may have less elements than X and therefore some variable which is non-linear in res(X, x, t) could be linear in res(X ′ , x, t). Actually, this never happens since the elements in X ′ which are not explicitly delinearized are either elements of the multiset Z in the third case of Theorem 5.9 (and therefore may appear multiple times) or elements of Xt (Xx ) subject to the condition |Xt | ≤ 1 (|Xx | ≤ 1). Assume that the linearity properties of X and X ′ do not coincide. The only interesting case is when X is linear for x and not strongly non-linear for t. In all the other cases, it is immediate from the definition that res(X, x, t) ⊆ ↓res(X ′ , x, t). If X ′ is not linear for x and for t, then it holds res(X, x, t) ⊆ ↓res(X ′ , x, t) by definition. If X ′ is linear for x and strongly non-linear for t, then it is immediate from the definition that res(X, x, t) ⊆ ↓res(X ′ , x, t), provided that |Xx | ≥ 1. Otherwise, it must be |Xt | = 0 and therefore, in order to be res(X, x, t) 6= ∅, we have X = Xxt and χM (X, t) = 1, which means l(X ′ ) = X is linear for t. It follows that U res(X, x, t) = { X 2 } = res ′ (X ′ , x, t). 60 G. Amato and F. Scozzari If X ′ is not linear for x and linear for t, we show that |Xx | ≤ 1. Assume, by contradiction, that |Xx | > 1. Since X ′ is linear for t and |Xt | ≤ 1, then χM (Xt , t) = χm (Xt , t) ≤ 1, while |TZU| = |Xx | > 1, which is a contradiction. Thus it must be U |Xx | ≤ 1. If |Xx | = 0 then |Xt | = 0, hence res(X, x, t) = { X 2 } and res(X, x, t) = res ′ (X, x, t). If |Xx | = 1, since X ′ is linear for t, it follows that |Z| = 1. Thus res(X, x, t) ⊆ ↓res(X ′ , x, t). Theorem 5.16 The operator mgusl in Definition 5.15 is correct and optimal w.r.t. mgu, when vars(x/t) ⊆ U . Proof It is enough to prove that mgusl is correct and optimal w.r.t. mgu2 , namely, that: mgusl ([S, L, U ]), x/t) = αsl (mgu2 (γsl ([S, L, U ]), x/t)) . Let γsl ([S, L, U ]) = [T ]U . By Theorem 5.12, it holds that: αsl (mgu2 (γsl ([S, L, U ]), x/t) [ = αsl ([(T \ T ′ ) ∪ ↓ (res(Y, x, t) ∪ res ′ (Y, x, t)})]U Y ⊆max T ′ G = αsl [T \ T ′ ]U ⊔2 Y ⊆max T ′  ([↓res(Y, x, t)]U ⊔2 [↓res ′ (Y, x, t)}]U ) , where T ′ = rel (T, x, t) and ⊔2 is the lowest upper bound in ShLin2 . By additivity of αsl , this is equivalent to G αsl ([T \ T ′ ]U ) ⊔sl (αsl ([res(Y, x, t)]U ) ⊔sl αsl ([res ′ (Y, x, t)]U )) . (B3) Y ⊆max T ′ ′ ′ Let X, L , U and K as in Definition 5.15, we have that mgusl ([S, L, U ], x/t) is equivalent to [(S \ X) ∪ K, U ′ ∪ L′ , U ] . (B4) We need to prove that equations (B3) and (B4) do coincide. In the rest of the paper, we assume that the result of (B3) is [S ′′ , L′′ , U ]. Sharing. We first prove that the Sharing components of the two equations are equal, i.e. that S ′′ = (S \ X) ∪ K. Given B ∈ S ′′ , there are several cases. If B = ToU with o ∈ T \ T ′ , then B ∈ S \ X. S If B = ToU, for o ∈ res ′ (Y, x, t) with Y ⊆ max T ′ , then B = {ToU | o ∈ Y } with U + Y = Yxt and l(Y ) is linear for t. If x ∈ L then is generated by (Xxt ) , since l(Y ) is linear for t. If x ∈ / L there are two cases: if Y is linear for t then it is generated >1 =1 + ) , otherwise by bin(Xt>1 ∪ Xxt , Xx ∪ Xxt , X ∗ ). Thus B ∈ K. by (Xxt Now, assume that B = ToU with o ∈ res(Y, x, t) and ∅ 6= Y ⊆ max T ′ . Then S B = W where W = {ToU | o ∈ Y }. Since Y is made of maximal elements and [T ]U = γ2 ([S, L, U ]), we have that Y is linear for x iff x ∈ L. For the same reason, Y is linear for t iff (W, L) is linear for t. As a consequence, if Y is non-linear for t, then (X, L) is non-linear for t. We proceed by cases: On the interaction between sharing and linearity 61 U Y non-linear for x and t. Then res(Y, x, t) = { Y 2 }. Since (X, L) is non-linear >1 for x and t, we have Xt>1 ∪ Xxt 6= ∅ and Xx ∪ Xxt 6= ∅. Thus B ∈ bin(Xt>1 ∪ >1 ∗ Xxt , Xx ∪ Xxt , X ) ⊆ K. Y non-linear for x and linear for t. By hypothesis |Yx | ≤ 1 and |Yt | ≥ 1, hence U U 2 U o = ( Yx ) ⊎ ( Yxt ) ⊎ ( Yt2 ) and =1 =1 ∗ B ∈ bin((Xt=1 )+ , Xx ∪ Xxt , (Xxt ) )⊆K . =1 ∗ In particular, B ∈ bin((Xt=1 )+ , Xx , (Xxt ) ) when |Yx | = 1, otherwise B ∈ =1 + =1 =1 ∗ bin((Xt ) , Xxt , (Xxt ) ). Y linear for x and strongly non-linear for t. In this case we have that o = U U 2 U ( Yx2 ) ⊎ ( Yxt ) ⊎ ( Yt ) with |Yx | ≥ 1 and |Yt | ≤ 1. By definition of strong non-linearity, we have two cases: • there exists o ∈ Yxt such that χM (o, t) > 1: in this case >1 ∗ B ∈ bin(Xt ∪ {∅}, Xxt , Xx+ , Xxt )⊆K ; • there exists o ∈ Yt such that χM (o, t) = ∞: in this case ∗ )⊆K . B ∈ bin(Xt=∞ , Xx+ , Xxt Y linear for x and non strongly non-linear for t. In this case ] ] ] 2 o = ( Z ′ ) ⊎ ( Yxt ) ⊎ ( Yt ) , with |Yt | = 1, for some Z ′ ∈ ℘m (Yx ) such that |Z ′ | = χm (Yt , t) and TZ ′ U = Yx . It is obvious that =1 ∗ B ∈ bin({{o} ∪ (∪Z) | o ∈ Xt∈N , Z ⊆ Xx , 1 ≤ |Z| ≤ χL M (o, t)}, (Xxt ) ) ⊆ K , by choosing Z = {ToU | o ∈ Z ′ }. This proves that if B ∈ S ′′ , then B ∈ (S \ X) ∪ K. Now, we need to prove the converse implication. If B ∈ S \ X, then B = ToU for some o ∈ T , and it is obvious that o ∈ T \ T ′ , hence B ∈ S ′′ . Therefore, assume that B ∈ K, and consider the case when x ∈ L and B ∈ ∗ bin(Xt=∞ , Xx+ , Xxt ). We have that B = A ∪ (∪A′ ) ∪ (∪A′′ ) for some A ∈ Xt=∞ , A′ non-empty subset of Xx and A′′ ⊆ Xxt . We may find o′ ∈ max T ′ , Y ′ , Y ′′ ⊆ max T ′ such that To′ U = A, TY ′ U = A′ and TY ′′ U = A′′ . We have that Y ′′′ = {o′ }∪Y ′ ∪Y ′′ is linear for x and strongly non-linear for t (due to the element o′ ), with |Yx′′′ | ≥ 1 and |Yt′′′ | ≤ 1. Therefore, we may apply the definition of res to obtain res(Y ′′′ , x, t) = {o} with ToU = B, hence B ∈ S ′′ . With similar reasonings, we may prove that for every B ∈ K, we have B ∈ S ′′ . In particular: the second line of (6) corresponds to the case we choose a Y ′′′ which ′′′ is linear for x and strongly non-linear for t, due to an element o ∈ Yxt which ′′′ χM (o, t) > 1; the third line of (6) corresponds to the case Y is linear for X and is not strongly non-linear for t; the first line of (7) corresponds to the case Y ′′′ is non-linear for both x and t; the second line of (7) corresponds to the case Y ′′′ is linear for t and non-linear for x. =1 + Finally, if x ∈ / L and B ∈ (Xxt ) , it is possible that B cannot be obtained as 62 G. Amato and F. Scozzari res(Y ′′′ , x, t) for any Y ′′′ ⊆ max T ′ . However, B may be obtained as res ′ (Y ′′′ , x, t), U + choosing Y ′′′ as in the previous cases. The same happens if x ∈ Land B ∈ (Xxt ) . ′′ ′ ′ Linearity. We want to prove that L = L ∪ U . First of all, let us define L′′g = U \ vars(mgu2 ([T ]U , x/t)) the set of ground variables in mgu2 ([T ]U , x/t), hence L′′g ⊆ L′′ . We are going to prove that U ′ = L′′g and L′ \ U ′ = L′′ \ L′′g . The first equality trivially follows from the fact that the sharing component of mgusl is optimal, hence a variable occurs in a sharing group of S \ S ∪ K iff it occurs in a 2-sharing group of mgu2 ([T ]U , x/t). Now, we consider a variable v ∈ U \ U ′ , and prove that v ∈ L′ iff v ∈ L′′ . There are several cases. If we assume that v ∈ / L, by (8) we have v ∈ / L′ . Moreover, if ′ Y ∈ max T and v ∈ TY U, by maximality of Y we have Y (v) = ∞. Hence, by Theorem 5.12, we have v ∈ / L′′ . If we assume that v ∈ / X, by (8) we have v ∈ L′ iff ′′ v ∈ L. Since vars(X) = vars(T ), we also have v ∈ L iff v ∈ L and therefore v ∈ L′ iff v ∈ L′′ . The only case it remains to prove is v ∈ vars(X) ∩ L which, combined with the condition v ∈ / U ′ , gives v ∈ vars(K) ∩ L. First of all, note that if v ∈ vars(Xxt ) ′ then v ∈ / L (by definition of L′ ) and v ∈ / L′′ (since Xxt ) appears delinearized in every 2-sharing group resulting from res or res ′ . If v ∈ / vars(Xxt ), we distinguish four subcases: • x ∈ L and (S, L) linear for t. Given Y ⊆ max T ′ , checking the forth case of Theorem 5.9 when χM (Yt , t) = 1, we have that res(Y, x, t) is not linear for v iff v ∈ vars(Yxt ) or v ∈ vars(Yx ) ∩ vars(Yt ). Note that there exists ′ Y ⊆ max T ′ s.t. v ∈ vars(Yxt ) ∪ (vars(Yx ) ∩ vars(Yt )) iff v ∈ vars(Txt )∪ ′ ′ ′′ ′ ′ (vars(Tx ) ∩ vars (Tt )). Finally v ∈ L iff v ∈ vars(Txt ) ∪ (vars (Tx ) ∩ vars (Tt′ )) iff v ∈ (Xxt ∪ (Xx ∩ Xt )) iff v ∈ L′ . • x ∈ L and (S, L) not linear for t. Given Y ⊆ max T ′ , checking the third and forth cases (when χM (Y, t) > 1) of Theorem 5.9, we have that res(Y, x, t) non-linear for v implies v ∈ vars(Yxt ) or v ∈ vars(Yx ), which is equivalent to v ∈ Xxt ∪ Xx , i.e. v ∈ / L′ . On the other hand, if v ∈ Xx , we distinguish the cases: — (S, L) strongly non-linear for t. There exists o ∈ T ′ such that χM (o, t) = ′ ∞ or o ∈ Txt such that χM (o, t) > 1. Moreover, there exists o′ ∈ Tx′ such that v ∈ To′ U. If we take Y = {o, o′ }, we have that res(Y, x, t) is not linear for v, hence v ∈ / L′′ . — (S, L) is not strongly non-linear for t. There exists o ∈ Tt′ such that 1 < χM (o, t) < ∞. Moreover, there exists o′ ∈ Tx′ such that v ∈ To′ U. If we take Y ′ = {o, o′ }, by the fourth case in the definition of res, we have res(Y, x, t) is not linear for v, i.e. v ∈ / L′′ . • x∈ / L and (S, L) linear for t. If v ∈ / L′′ then v ∈ vars(Yxt ) or v ∈ vars(Yt ). This implies v ∈ Xxt ∪Xt , i.e. v ∈ / L′ . On the other hand, if v ∈ Xt , there exist ′ o ∈ Tx such that χM (o, x) = ∞ and o′ ∈ Tt′ such that v ∈ To′ U. By definition of res, we have that res({o, o′ }, x, y) is not linear for v, hence v ∈ / L′′ . ′ • x∈ / L and (S, L) non-linear for t. Since L = L \ X, it is obvious that v ∈ / L′ . On the interaction between sharing and linearity 63 Moreover, there exist o ∈ T ′ such that χM (o, x) = ∞, o′ ∈ T ′ such that χM (o, t) > 1 and o′′ ∈ T ′ such that v ∈ To′′ U. Note that it is possible that o = o′ = o′′ . By definition, we have res({o, o′ , o′′ }, x, t) is not linear for v, hence v ∈ / L′′ . Theorem 5.19 The operator mgusl in Definition 5.18 is the optimal abstraction of mgu. Proof First of all, given a finite set of variables V , let us define the extension operator extV : ShLin2 → ShLin2 such that extV ([S]U ) = [S ∪ {v | v ∈ V \ U }]U∪V . Given V = vars(x/t) \ U , we have that αsl (mgu2 (γsl ([S, L, U ], x/t)) = αsl (extV (mgu2 (γsl ([S, L, U ])), x/t)) . By Theorem 5.16 we have that mgusl ([S, L, U ], x/t) = mgusl ([S ∪ V, L ∪ V, U ∪ V ], x/t) = αsl (mgu2 (γsl ([S ∪ V, L ∪ V, U ∪ V ], x/t))) . Hence, it is enough to prove that extV (γsl ([S, L, U ]) = γ2 ([S ∪ V, L ∪ V, U ∪ V ]) . By definition of γ2 , we have that γsl ([S ∪ V, L ∪ V, U ∪ V ]) = = [{BL∪V | B ∈ S} ∪ {BL∪V | B ∈ V }]U∪V = [{BL | B ∈ S} ∪ V ]U∪V [since vL∪V = v] = extV (γsl ([S, L, U ]) , which completes the proof. References Amato, G. and Scozzari, F. 2002. Optimality in goal-dependent analysis of sharing. In Proceedings of the Joint Conference on Declarative Programming (AGP’02), J. J. Moreno-Navarro and J. Mariño-Carballo, Eds. Universidad Politécnica de Madrid, Madrid, 189–205. Amato, G. and Scozzari, F. 2003. A general framework for variable aliasing: Towards optimal operators for sharing properties. In Logic Based Program Synthesis and Transformation 12th International Workshop, LOPSTR 2002, Madrid, Spain, September 17–20, 2002. Revised Selected Papers, M. Leuschel, Ed. Lecture Notes in Computer Science, vol. 2664. Springer, Berlin Heidelberg, 52–70. Amato, G. and Scozzari, F. 2005. On abstract unification for variable aliasing. Tech. Rep. TR-05-08, Dipartimento di Informatica, Università di Pisa. Amato, G. and Scozzari, F. 2009. Optimality in goal-dependent analysis of sharing. To appear in Theory and Practice of Logic Programming (TPLP). 64 G. Amato and F. Scozzari Armstrong, T., Marriott, K., Schachte, P., and Søndergaard, H. 1994. Boolean functions for dependency analysis: Algebraic properties and efficient representation. In Static Analysis, First International Static Analysis Symposium, SAS’94 Namur, Belgium, September 28–30, 1994, Proceedings, B. Le Charlier, Ed. Lecture Notes in Computer Science, vol. 864. Springer, Berlin Heidelberg, 266–280. Bagnara, R., Hill, P. M., and Zaffanella, E. 2002. Set-sharing is redundant for pair-sharing. Theoretical Computer Science 277, 1–2 (Apr.), 3–46. Bagnara, R., Zaffanella, E., and Hill, P. M. 2005. Enhanced sharing analysis techniques: A comprehensive evaluation. Theory and Practice of Logic Programming 5, 1–2 (Jan.), 1–43. Bueno, F., Cabeza, D., Carro, M., Hermenegildo, M. V., López-Garcı́a, P., and Puebla, G. 1997. The Ciao Prolog system. reference manual. Tech. Rep. CLIP3/97, School of Computer Science, Technical University of Madrid (UPM). Available from http://www.ciaohome.org/. Last accessed July 14, 2009. Bueno, F. and Garcı́a de la Banda, M. J. 2004. Set-sharing is not always redundant for pair-sharing. In Functional and Logic Programming, 7th International Symposium, FLOPS 2004, Nara, Japan, April 7–9, 2004, Proceedings, Y. Kameyama and P. J. Stuckey, Eds. Lecture Notes in Computer Science, vol. 2998. Springer, Berlin Heidelberg, 117–131. Codish, M., Dams, D., and Yardeni, E. 1991. Derivation and safety of an abstract unification algorithm for groundness and aliasing analysis. In Logic Programming, Proceedings of the Eighth International Conference, K. Furukawa, Ed. Logic Programming. The MIT Press, Cambridge, MA, USA, 79–93. Codish, M., Lagoon, V., and Bueno, F. 2000. An algebraic approach to sharing analysis of logic programs. The Journal of Logic Programming 42, 2 (Feb.), 110–149. Codish, M., Marriott, K., and Taboch, C. 2000. Improving program analyses by structure untupling. The Journal of Logic Programming 43, 3 (June), 251–263. Codish, M., Søndergaard, H., and Stuckey, P. J. 1999. Sharing and groundness dependencies in logic programs. ACM Transactions on Programming Languages and Systems 21, 5 (Sept.), 948–976. Cortesi, A. and Filé, G. 1999. Sharing is optimal. The Journal of Logic Programming 38, 3 (Mar.), 371–386. Cortesi, A., Filé, G., Giacobazzi, R., Palamidessi, C., and Ranzato, F. 1997. Complementation in abstract interpretation. ACM Transactions on Programming Languages and Systems 19, 1 (Jan.), 7–47. Cortesi, A., Filé, G., and Winsborough, W. W. 1998. The quotient of an abstract interpretation. Theoretical Computer Science 202, 1–2 (July), 163–192. Cousot, P. and Cousot, R. 1979. Systematic design of program analysis frameworks. In POPL ’79: Proceedings of the 6th ACM SIGACT-SIGPLAN symposium on Principles of programming languages. ACM Press, New York, NY, USA, 269–282. Cousot, P. and Cousot, R. 1992a. Abstract interpretation and applications to logic programs. The Journal of Logic Programming 13, 2–3 (July), 103–179. Cousot, P. and Cousot, R. 1992b. Abstract interpretation frameworks. Journal of Logic and Computation 2, 4 (Aug.), 511–549. Cousot, P. and Cousot, R. 1992c. Comparing the Galois connection and widening/narrowing approaches to abstract interpretation. In Programming Language Implementation and Logic Programming, 4th International Symposium, PLILP ’92 Leuven, Belgium, August 26–28, 1992, Proceedings, M. Bruynooghe and M. Wirsing, Eds. Lecture Notes in Computer Science, vol. 631. Springer, Berlin Heidelberg, 269–295. Invited paper. On the interaction between sharing and linearity 65 Hans, W. and Winkler, S. 1992. Aliasing and groundness analysis of logic programs through abstract interpretation and its safety. Tech. Rep. 92–27, Technical University of Aachen (RWTH Aachen). Available from http://sunsite.informatik.rwth-aachen.de/Publications/AIB. Last accessed July 10, 2009. Hermenegildo, M. V. and Rossi, F. 1995. Strict and nonstrict independent andparallelism in logic programs: Correctness, efficiency, and compile-time conditions. The Journal of Logic Programming 22, 1 (Jan.), 1–45. Hill, P. M., Zaffanella, E., and Bagnara, R. 2004. A correct, precise and efficient integration of set-sharing, freeness and linearity for the analysis of finite and rational tree languages. Theory and Practice of Logic Programming 4, 3 (May), 289–323. Howe, J. M. and King, A. 2003. Three optimisations for sharing. Theory and Practice of Logic Programming 3, 2 (Jan.), 243–257. Jacobs, D. and Langen, A. 1992. Static analysis of logic programs for independent AND parallelism. The Journal of Logic Programming 13, 2–3 (July), 291–314. Jones, N. D. and Søndergaard, H. 1987. A semantics-based framework for the abstract interpretation of Prolog. In Abstract Interpretation of Declarative Languages, S. Abramsky and C. Hankin, Eds. Ellis Horwood, Chichester, UK, 123–142. King, A. 1994. A synergistic analysis for sharing and groundness which traces linearity. In Programming Languages and Systems — ESOP ’94, 5th European Symposium on Programming Edinburg, U.K., April 11–13, 1994, Proceedings, D. Sannella, Ed. Lecture Notes in Computer Science, vol. 788. Springer, Berlin Heidelberg, 363–378. King, A. 2000. Pair-sharing over rational trees. The Journal of Logic Programming 46, 1– 2 (Nov.–Dec.), 139–155. Lagoon, V. and Stuckey, P. J. 2002. Precise pair-sharing analysis of logic programs. In PPDP ’02: Proceedings of the 4th ACM SIGPLAN international conference on Principles and practice of declarative programming. ACM Press, New York, NY, USA, 99–108. Langen, A. 1990. Static analysis for independent And-parallelism in logic programs. Ph.D. thesis, University of Southern California, Los Angeles, California. Levi, G. and Spoto, F. 2003. Pair-independence and freeness analysis through linear refinement. Information and Computation 182, 1 (Apr.), 14–52. Mac Lane, S. 1988. Categories for the Working Mathematician, Second ed. Graduate Texts in Mathematics, vol. 5. Springer, Berlin Heidelberg. Marriott, K., Søndergaard, H., and Jones, N. D. 1994. Denotational abstract interpretation of logic programs. ACM Transactions on Programming Languages and Systems 16, 3 (May), 607–648. Muthukumar, K. and Hermenegildo, M. V. 1992. Compile-time derivation of variable dependency using abstract interpretation. The Journal of Logic Programming 13, 2–3 (July), 315–347. Søndergaard, H. 1986. An application of abstract interpretation of logic programs: Occur check reduction. In ESOP 86, European Symposium on Programming Saarbrcken, Federal Republic of Germany March 17–19, 1986, Proceedings, B. Robinet and R. Wilhelm, Eds. Lecture Notes in Computer Science, vol. 213. Springer, Berlin Heidelberg, 327–338. Sterling, L. and Shapiro, E. Y. 1994. The Art of Prolog: Advanced Programming Techniques, Second ed. Logic Programming. The MIT Press, Cambridge, MA, USA.
6cs.PL
arXiv:1412.2490v4 [math.RA] 25 Jan 2016 SIMPLE TWISTED GROUP ALGEBRAS OF DIMENSION p4 AND THEIR SEMI-CENTERS OFIR SCHNABEL Abstract. For simple twisted group algebra over a group G, if Gp is Hall subgroup of G then the semi-center is simple. Simple twisted groups algebras correspond to groups of central type. We classify all groups of central type of order p4 where p is prime and use this to show that for odd primes p there exists a unique group G of order p4 such that there exists simple twisted group algebra over G with a commutative semi-center. Moreover, if 1 < |G| < 64, then the semi-center of simple twisted group algebras over G is non-commutative and this bounds are strict. 2010 Mathematics Subject Classification: 16S35, 20C25, 20E99. 1. Introduction Let G be a finite group. A twisted group algebra over C, denoted by Cf G, is an associative algebra with basis {ug }g∈G . The multiplication is defined on basis elements as follows. For any x, y ∈ G (1) ux uy = f (x, y)uxy , and it is extended distributively. Here, f ∈ Z 2 (G, C∗ ). That is, f is a 2-cocycle. By a generalization of Maschke’s theorem, complex twisted group algebras are semisimple [14, Theorem 3.2.10] and therefore, by the Artin-Wedderburn theorem it is isomorphic to a direct sum of matrix algebras. For a non-trivial group G, the group algebra CG is not simple. However, it turns out that 2-cocycles, f ∈ Z 2 (G, C∗ ) may exist such that Cf G is simple. A group G admitting such a phenomenon is called of central type 1, and the 2-cocycle f ∈ Z 2 (G, C∗ ) is called nondegenerate. Evidently, the size of any group of central type is a square. It turns out that twisted group algebras and groups of central type play a major role in the understanding of other algebraic objects, as graded algebras (see [3],[10],[11]), semi-invariants of matrices (see [12]) and twisted category algebras (see [7],[15]). The classification of the abelian groups of central type is well known (see §3). It is much harder to understand non-abelian groups of central type. In fact, their complete classification up to isomorphism looks like an impossible task. In [13] R. Howlett and M. Isaacs proved, using the classification of finite simple groups, that groups of central type are solvable. Another important result is that a cocycle f ∈ Z 2 (G, C∗ ) is nondegenerate if and only if its restriction to any Hall subgroup is nondegenerate (see [8, Corollary 4], [17, Lemma 2.7]). In [11] we classify all the This work has been supported by the Minerva Stiftung. 1 Classically, a group G is said to be of central type if it has a faithful irreducible character χ such that χ(1)2 = |G : Z|, where Z = Z(G). In this paper however we call G/Z (which is sometimes called “Central-type factor group”) of central type. 1 2 OFIR SCHNABEL groups of central type of order n2 where n is a square-free number. Also, in [12, Theorem C] we show that for any group of central type G, Z(G) embeds into Ĝ, where Z(G) is the center of G and Ĝ is the group of 1-dimensional characters of G. In the first part of this paper we classify the groups of central type of order p4 where p is a prime number. In order to do so we use the classification of groups of order p4 [6, p.100-102]. For convenience we change the notations from [6, p.100-102] and rewrite these groups. The corresponding tables are Table 1 for the odd case and Table 2 for the even case. The following two theorems classify the groups of central type of order p4 where p is a prime number. Theorem 1. Let p be an odd prime. Up to isomorphism, the groups of central type of order p4 are exactly the groups G(iii) , G(v) , G(viii) , G(xiv) , G(xv) in Table 1. Theorem 2. Up to isomorphism, the groups of central type of order 16 are exactly the groups G(iii) , G(v) , G(ix) , G(x) in Table 2. In the proof of Theorem 1 and Theorem 2 we are basically using the following three different methods: Let G be a group of order p4 which is not of central type. Using Lemma 2.3, Lemma 2.4 and [12, Theorem C]), which deal with groups of central type of any order, we try to show that G is not a group of central type. If this fails, we show, using alternative definition of nondegeneracy (see Definition 2.2), that for any f ∈ Z 2 (G, C∗ ), the dimension of the center of Cf G is greater than 1. In order to show that a group G of order p4 is of central type we construct a nondegenerate cohomology class [f ] ∈ H 2 (G, C∗ ). We do this by using a construction of crossed product which arises from an action of a group H on a ring R by an automorphism of R. The twisted group algebra Cf G is equipped with a CG-module structure defined by, (2) g(uh ) := ug uh u−1 g . This furnishes Cf G with a G-module algebra structure. For any G-module-algebra A over a field K, a nonzero element a ∈ A is called semi-invariant if there exists λ ∈ Ĝ := Hom(G, K ∗ ) (the weight of a), such that for any g ∈ G, g(a) = λ(g) · a. The subspace spanned by all the semi-invariant elements is a subalgebra of A called the semi-center of A, and denoted by Sz(A) :=SzG (A). Then Sz(A) = ⊕λ∈Ĝ Aλ , where Aλ is the subspace of all the semi-invariant elements in A of weight λ (and zero). This is a natural grading of the semi-center by the group Ĝ of 1-dimensional G-characters. In the second part of this paper we study the semi-center of twisted group algebras under the conjugation action (2). Semi-invariants and the semi-center of module-algebras are investigated mainly with regard to enveloping algebras of finite dimensional Lie algebras, see, e.g. [5, 9, 20], and with regard to group algebras, see, e.g. [18, 21, 22]. In [12] Y. Ginosar and the author generalized a result of D. SIMPLE TWISTED GROUP ALGEBRAS OF DIMENSION p4 3 Passman and P. Wauters (see [18]), by showing that if the Artin-Wedderburn decomposition of Cf G is Cf G = ⊕ri=1 Mni (C), then  Sz Cf G = ⊕ri=1 Cfi Gi , (3) where the Gi ’s are subgroups of Ĝ, and fi ∈ Z 2 (Gi , C∗ ). In particular, if Cf G is simple then its semi-center is a twisted group algebra, that is, ˆ Sz(Cf G) = Cf Ĝ. (4) We study the following problem. Problem 1. Which cocycles f ∈ Z 2 (G, C∗ ) admit (i) A commutative semi-center of Cf G? (ii) A simple semi-center of Cf G? By (3) a necessary condition for affirmative answer to Problem 1(ii) is that f is nondegenerate. Regarding Problem 1(ii) we prove the following Theorem 3. Let Cf G be a simple twisted group algebra. If the restriction of the nondegenerate cocycle f to Gp is also nondegenerate then the semi-center of Cf G is simple. In particular, if Gp is a Hall subgroup of G, then the semi-center of Cf G is simple. Problem 1(i) is particularly interesting when restricting to nondegenerate cocycles. By Theorem 1, the group G(xv) in Table 1 is of central type. In Theorem 5.1 we show that there exist a nondegenerate cocycle f ∈ Z 2 (G(xv) , C∗ ) such that Sz(Cf G(xv) ) is commutative and in Proposition 5.3 we show that if G 6∼ = G(xv) is a 4 group of central type of order p , then for any nondegenerate cocycle f ∈ Z 2 (G, C∗ ), Sz(Cf G) is non-commutative. We get the following theorem. Theorem 4. Let G be a group of central type of order p4 where p is prime. There exists a nondegenerate cocycle f ∈ Z 2 (G, C∗ ) such that Sz(Cf G) is commutative if and only if p is odd and G is isomorphic to the group G(xv) in Table 1 In view of Theorem 4 and Remark 4.1, for any group of central type G, if 1 < |G| < 64, then the semi-center of simple twisted group algebras over G is noncommutative. In the following theorem we present a group G of order 64 such that there exists a commutative semi-center of simple twisted group algebra over G. Theorem 5. Let (5) G = hx1 , x2 , x3 , x4 , x5 , x6 i, such that x1 , x2 , x3 are central and x2i = 1, [x4 , x5 ] = x1 , [x4 , x6 ] = x2 , 2 [x5 , x6 ] = x3 . There exists a nondegenerate cocycle f ∈ Z (G, C ) such that Sz(Cf G) is commutative. ∗ By Theorem 4 and Remark 4.1, the group G described in Theorem 5 is a minimal non-trivial group with the property that the semi-center of a simple twisted group algebra over a group is commutative. 4 OFIR SCHNABEL Acknowledgements. A part of this paper appears in the author’s Ph.D. dissertation under the supervision of Y. Ginosar and the rest of this paper was influated by it. The author is also grateful to F. Cedo, M. Kochetov and S. Koenig for their valuable comments. Lastly, I want to thank the referee for reviewing the first draft of this paper and for his valuable suggestions. 2. preliminaries For any f ∈ Z 2 (G, C∗ ) define an antisymmetric form from the set of commuting pairs in G to C∗ as follows: (6) αf (g1 , g2 ) := f (g1 , g2 )f (g2 , g1 )−1 . If G is abelian group then αf determines the cohomology class of f . By the definition of αf , if [f1 ] = [f2 ] ∈ H 2 (G, C), then for every commuting elements g1 , g2 ∈ G, αf1 (g1 , g2 ) = αf2 (g1 , g2 ). In other words, there is a well-defined function [f ] → αf from H 2 (G, C) to the antisymmetric forms. Throughout this paper we will deal with nondegeneracy of cocycles f using the notion of f -regularity. Definition 2.1. [16, §2] Let f ∈ Z 2 (G, C∗ ). An element g ∈ G is called f -regular if αf (g, h) = 1 for every h ∈ CG (g) (the centralizer of g ∈ G). In other words, an element g ∈ G is f -regular if and only if for every element h ∈ CG (g), ug uh = uh ug (see (1)) in the twisted group algebra Cf G. It is easy to show that regularity is a class property, both cohomological and conjugacy. It is well known that the dimension of the center of Cf G is equal to the number of f -regular conjugacy classes of G (see [16, Theorem 2.4]). This leads to an alternative definition of non-degeneracy of a 2-cocycle f ∈ Z 2 (G, C∗ ). Definition 2.2. A 2-cocycle f ∈ Z 2 (G, C∗ ) is called non-degenerate if 1 ∈ G is the only f -regular element in G. We wish to formulate two known results which we will use in order to show that some groups are not of central type. Lemma 2.3. Let G be a group of central type. Then, CG (g) is non-cyclic for any non-trivial element g ∈ G. Proof. Since for any cocycle f ∈ Z 2 (G, C∗ ) and any h ∈ G, uh commutes with uhi , we conclude that if CG (g) = hhi, then g is f -regular. In particular, in this case, there are no nondegenerate f ∈ Z 2 (G, C∗ ).  By [4, Proposition 1.2] if there p exists a subgroup H of G such that the restriction of f to H is trivial then |H| ≤ |G|. Since the cohomology of cyclic groups is trivial, we obtain following lemma. Lemma 2.4. Let G be a group of central type of order n2 . Then, the order of any element in G is less or equal n. Let G be a group. Denote by ◦(g) the order of g ∈ G. Since C is algebraically closed we may always assume that for any f ∈ Z 2 (G, C∗ ), (7) ug◦(g) = 1 in the corresponding twisted group algebra Cf G. Therefore, since for any f ∈ Z 2 (G, C∗ ) [ug , 1] = 1, SIMPLE TWISTED GROUP ALGEBRAS OF DIMENSION p4 5 in the corresponding twisted group algebra Cf G, the following lemma is clear. Lemma 2.5. Let G be a finite group, let f ∈ Z 2 (G, C∗ ) and let a, b ∈ G be commuting elements such that in the corresponding twisted group algebra Cf G, [ua , ub ] = λ. Then λ is a root of unity of order dividing the greatest common divisor of ◦(a) and ◦(b). The concept of f -regularity is generalized bellow. Definition 2.6. [N. Ben David] Let f ∈ Z 2 (G, C∗ ) and let λ ∈ Ĝ. An element x ∈ G is called (λ, f )-regular if for any g ∈ CG (x), λ(g) = αf (g, x). As before, (λ, f )-regularity is a class property (conjugacy and cohomology). In particular, an element is f -regular if it is (1, f )-regular. Let f ∈ Z 2 (G, C∗ ), λ ∈ Ĝ and let x ∈ G be a (λ, f )-regular element. Assume T = {1, t2 , . . . , tn } is a left transversal of CG (x). Denote (8) S(λ,x) = n X λ−1 (ti )uti ux u−1 ti . i=1 Proposition 2.7 which gives a complete description of the weight spaces (Cf G)λ , and Lemma 2.8 claiming that any central element in G induce a semi-invariant element in Cf G were both proven in [12]. Proposition 2.7. [12, Proposition 6.2] With the above notation, (9) (Cf G)λ = spanC {S(λ,x) | x is (λ, f )-regular}. Lemma 2.8. Let G be a group with center Z(G). For every element x ∈ Z(G) and f ∈ Z 2 (G, C∗ ) the element ux is semi-invariant in Cf G. In particular, for any abelian group G, and any 2-cocycle f ∈ Z 2 (G, C∗ ), Sz(Cf G) = Cf G. We will also use in the sequel the following estimation of the dimension of the semi-center of twisted group algebras. Corollary 2.9. (see [12, Corollary 6.5]) For any f ∈ Z 2 (G, C∗ ), let [ Γ(f ) = Γ(λ, f ) λ∈Ĝ be a set of representatives of the (λ, f )-regular conjugacy classes for all λ ∈ Ĝ. Then X [G : G′ CG (x)]. dimC Sz(Cf G) = x∈Γ(f ) 6 OFIR SCHNABEL 3. Classification of groups of central type of order p4 In this section we prove Theorem 1 and Theorem 2. Throughout this section we will use the classification (and numbering) of groups of order p4 , which can be found in Table 1 for the odd case and Table 2 for the even case. At first we will handle the odd and the even case simultaneously (groups G(i) G(vii) ). However, at some point (from group G(viii) and forward) we will separate between the cases. We start from the well known abelian case. Abelian groups of central type are exactly groups of the form A × A, that is the direct sum of two copies of the same abelian group (see [2, Theorem 5]). In particular, the abelian groups of central type of order p4 are (10) Cp × Cp × Cp × Cp and Cp2 × Cp2 . This shows that from the groups G(i) -G(v) in both Table 1 and Table 2, the groups of central type are G(iii) and G(v) . We now start dealing with the non-abelian case. The group G(vi) (in both tables) admits a cyclic subgroup of order p3 and hence by Lemma 2.4 it is not of central type. In the group G(vii) , the center is hai ∼ = Cp2 and the commutator subgroup of G(vii) is hap i. Therefore, the group of 1-dimensional characters of G(vii) is isomorphic to Cp3 . Hence, there is no embedding of the center of G(vii) in the group of 1dimensional characters of G(vii) . Consequently, by [12, Theorem C] this group is not of central type. It turns out that the group G(viii) is of central type in the odd case and is not of central type in the even case. From now on we will separate between the odd case and the even case. 3.1. p is odd. In this section we complete the proof of Theorem 1. The numbering of the groups in this section is with respect to Table 1. We start by showing that the group G(viii) is of central type. In order to do so we will use a construction of crossed product which arises from an action of a group G on a ring R by an automorphism of R. Theorem 3.1. Let G = ha, bi be a group of order p4 such that 2 2 ap = bp = 1, [a, b] = ap . Then G is a group of central type. Proof. We wish to construct a nondegenerate cohomology class [f ] ∈ H 2 (G, C∗ ). This twisted group algebra Cf G is generated as algebra by ua , ub such that (11) 2 2 upa = upb = 1. We use a construction of crossed product in the following way. Consider the following Cp2 = hbi-action on the commutative group algebra R1 = Chai. ψb :R1 → R1 ua 7→ ζp2 up+1 a where ζp2 is a root of unit of order p2 . By setting ψb (uia ) = ψb (ua )i we ensure that ψb is a homomorphism of R1 . SIMPLE TWISTED GROUP ALGEBRAS OF DIMENSION p4 7 Next, we check that the order of the automorphism ψb is p2 . By induction it is easy to show that (k+p ψbk (ua ) = ζp2 (12) Pk−1 i=1 i) kp+1 ua ) kp+1 (k+ k(k−1)p 2 ua . = ζp2 Then, since ua has order p2 , if (k+ k(k−1)p ) kp+1 2 ψbk (ua ) = ζp2 ua = ua then k ≡ 0(mod p). Assume now that k = ip. If i 6≡ 0(mod p) then k(k − 1)p ip(ip − 1)p = ip + 6≡ 0(mod p2 ). 2 2 Therefore, since ζp2 has order p2 , if ψbk (ua ) = ua then k ≡ 0(mod p2 ). Consequently, the order of ψb is at least p2 . By putting k = p2 in (12) we get k+ 2   2 2 p2 + p (p 2−1)p ψbp (ua ) = ζp2 3 upa +1   2 p2 1+ (p −1)p 2 = ζp2 ua = ua . We conclude that ψb is an automorphism of R1 of order p2 . Since ψb is an automorphism of the ring R1 , the ring R generated by ua , ub is a crossed product of Cp2 = hub i over R1 . In particular it is an associative algebra. Hence the ring R is an associative complex algebra generated by ua , ub with the following relations: 2 2 upa = upb = 1, p ua ub u−1 a = ζp2 ub ua . The associativity of R ensures that there exists a cocycle f ∈ Z 2 (G, C∗ ) which satisfies the above relations. We show that f is nondegenerate by showing that there are no non-trivial f -regular elements in G. Since ψb has order p2 , p p ψbp (ua ) = u−p b ua ub 6= ua ⇒ [ua , ub ] 6= 1. Since bp ∈ CG (a) we conclude that a and bp are not f -regular. On the other hand, p by using the equality ua ub u−1 a = ζp2 ub ua , it is easy to prove by induction that k kp uka ub u−k a = ζp2 ub ua . In particular, for k = p we get 2 p p p p upa ub u−p a = ζp2 ub ua = ζp2 ub 6= ub ⇒ [ua , ub ] 6= 1. Since ap ∈ CG (b) we conclude that b and ap are not f -regular. Now, let x = ai bj ∈ G be an f -regular element. If j 6≡ 0(mod p) then [ux , upa ] 6= 1 while ap ∈ CG (x). Hence we may assume that j ≡ 0(mod p). If j ≡ 0(mod p) and j 6≡ 0(mod p2 ), then [ux , ua ] 6= 1 while a ∈ CG (x). Hence we may assume that j = 0 and x = ai . If i 6≡ 0(mod p) then [ux , upb ] 6= 1 while bp ∈ CG (x). Hence we may assume that i ≡ 0(mod p). But then if i ≡ 0(mod p) and i 6≡ 0(mod p2 ), then [ux , ub ] 6= 1 while b ∈ CG (x) and therefore x is trivial. Consequently, f is nondegenerate and G is a group of central type.  It turns out that the group G(ix) is of central type in the even case and is not of central type in the odd case. The main reason for that is related to the following number-theoretical lemma. 8 OFIR SCHNABEL Lemma 3.2. Let p be a prime number. Then, p3 is a divisor of (p + 1)p − 1 if and only if p = 2. Proof. One direction is clear. Namely, 23 = 32 − 1. Assume now that p is an odd prime. We prove that (p + 1)p − 1 ≡ p2 ( mod p3 ). By the binomial identity p   X p i p p. (p + 1) − 1 = i i=1 Consequently,   p 2 (p + 1) − 1 ≡ p + p2 ( mod p3 ). 2  Since p is odd we conclude that p2 p2 ≡ 0( mod p3 ) and the result follows. p  The following lemma shows that the group G(ix) is not of central type. Lemma 3.3. Let G = ha, b, ci be a group of order p4 such that 2 ap = bp = cp = 1, [a, b] = [b, c] = 1, [a, c] = ap . Then, for any cocycle f ∈ Z 2 (G, C∗ ), the element ap is f -regular. In particular, G is not a group of central type. Proof. Let f ∈ Z 2 (G, C∗ ), and assume that [ua , ub ] = δ, [ub , uc ] = λ, [ua , uc ] = γupa . By Lemma 2.5, δ and λ are both p-th roots of unity. Therefore, [upa , ub ] = δ p = 1. (13) Consequently, if [upa , uc ] = 1, then ap is f -regular and the proof is completed. Using p the equality ua uc u−1 a = γua uc we compute (14) −(k−1) −1 −(k−1) −1 [uka , uc ] = uak−1 ua uc u−1 uc = uak−1 (ua uc u−1 uc = a ua a )ua p k−1 p k−1 uak−1 (γupa uc )u−(k−1) u−1 uc u−(k−1) u−1 , uc ]. a c = γua ua a c = γua [ua Therefore, by induction [uka , uc ] = γ k upk a . (15) In particular, by putting k = p in (21) we get (16) 2 [upa , uc ] = γ p upa = γ p . Now, in order to prove that uap is f -regular we need to show that γ is a p-th root of unity. Since ap and c commutes in G, then by Lemma 2.5, γ is a root of unity of order dividing p2 . By raising both sides of −1 1−p uc ua u−1 ua c =γ to the p + 1 power we get that −1 −(p+1) uc up+1 ua , a uc = γ and therefore p+1 p+1 u−1 ua . c ua uc = γ SIMPLE TWISTED GROUP ALGEBRAS OF DIMENSION p4 9 From here, by induction it is easy to prove that k u−k c ua uc = γ (17) Pk i=1 (p+1) i ((p+1)k ) . ua 2 Since upc = upa = 1, then by putting k = p in (17) we get (18) p ua = u−p c ua uc = γ Pp i=1 (p+1) i ua((p+1) p ) =γ (p+1)[(p+1)p −1] p ua . p −1 and therefore, since p + 1 is prime to By Lemma 3.2, p2 is not a divisor of (p+1) p p, the order of γ is not p2 . We conclude that γ is a p-th root of unity and therefore by (13) and (16) ap is f -regular which completes the proof.  Similarly to the case of group G(ix) , it turns out that the group G(x) is of central type in the even case and is not of central type in the odd case. Lemma 3.4. Let G = ha, b, ci be a group of order p4 such that 2 ap = bp = cp = 1, 2 [a, b] = [b, c] = 1, [a, c] = b. Then, for any cocycle f ∈ Z (G, C ), the element ap is f -regular. In particular, G is not a group of central type. ∗ Proof. Let f ∈ Z 2 (G, C∗ ), and assume that [ua , ub ] = δ and [ub , uc ] = λ. By Lemma 2.5, δ and λ are both p-th roots of unity. Therefore, [upa , ub ] = δ p = 1. (19) Assume now that [ua , uc ] = γub . We show that γ is also a p-th root of unity. We use the equalities −1 −1 uc u−1 a uc = γua ub −1 −1 and ub u−1 uc ub c = λ in order to show the following equality: −1 −(k−1) −1 −(k−1) = = ua uck−1 (uc u−1 [ua , ukc ] = ua uck−1 uc u−1 a uc )uc a uc uc −(k−1) −(k−1) −(k−1) ua uck−1 (γu−1 = γua uck−1 u−1 λ ub = γλ−(k−1) [ua , uck−1 ]ub . a ub )uc a uc Therefore, by induction (20) [ua , ukc ] = γ k λ−( Pk i−1) k ub p uc = 1, i=1 Consequently, since p is odd and since = γ k λ− k(k−1) 2 ukb . by putting k = p in (20) we get 1 = [ua , 1] = [ua , upc ] = γ p λ p(p−1) 2 upb = γ p . We conclude that γ is also a p-th root of unity. Now, using the equalities ua uc u−1 a = γub uc and ua ub = δub ua we compute −(k−1) −1 −(k−1) −1 [uka , uc ] = uak−1 ua uc u−1 uc = uak−1 (ua uc u−1 uc = a ua a )ua k−1 k−1 uak−1 (γub uc )u−(k−1) u−1 ub uak−1 uc u−(k−1) u−1 ub [uak−1 , uc ]. a c = γδ a c = γδ Therefore, by induction (21) [uka , uc ] = γ k δ ( Pk Consequently, since p is odd and since (22) i−1) k ub p ub = 1, i=1 [upa , uc ] = γ p δ p(p−1) 2 = γkδ k(k−1) 2 ukb . by putting k = p in (21) we get upb = 1. 10 OFIR SCHNABEL Hence, by (19) and (22) we conclude that ap is f -regular which completes the proof.  The groups G(xi) , G(xii) , G(xiii) are not of central type. In these groups the element a has the property that CG (a) = hai and therefore by Lemma 2.3 these groups are not of central type. Next, we show that the group G(xiv) is of central type. Theorem 3.5. Let G = ha, b, c, di be a group of order p4 such that ap = bp = cp = dp = 1, [a, b] = [a, c] = [a, d] = [b, c] = [b, d] = 1, [c, d] = a. Then G is a group of central type. Proof. First, notice that Z(G) = ha, bi, CG (c) = ha, b, ci, CG (d) = ha, b, di. We wish to construct a nondegenerate cohomology class [f ] ∈ H 2 (G, C∗ ). This twisted group algebra Cf G is generated as algebra by ua , ub , uc , ud such that (23) upa = upb = upc = upd = 1. We use a construction of crossed product in the following way. Consider the following Cp = hci-action on the commutative group algebra CZ(G). ψc :CZ(G) → CZ(G) ua 7→ ζp ua ub 7→ ub where ζp is a p-th root of unity. Clearly, ψc is an automorphism of order p of the ring CZ(G) and therefore the ring R1 generated by ua , ub , uc is a crossed product of Cp = huc i over CZ(G). In particular it is an associative algebra. Consider the following Cp = hdi-action on R1 . ψd :R1 → R1 ua 7→ ua ub 7→ ζp ub uc 7→ ua uc . We will show that ψd is an automorphism of order p of the ring R1 . We need to check if the following equalities hold: −1 (1) ψd (ub ua u−1 . b ) = ψd (ub )ψd (ua )ψd (ub ) −1 (2) ψd (uc ua uc ) = ψd (uc )ψd (ua )ψd (uc )−1 . −1 (3) ψd (uc ub u−1 . c ) = ψd (uc )ψd (ub )ψd (uc ) Indeed, (1) ψd (ub ua ub−1 ) = ψd (ua ) = ua , and on the other hand, ψd (ub )ψd (ua )ψd (ub )−1 = (ζp ub )ua (ζp ub )−1 = ua . SIMPLE TWISTED GROUP ALGEBRAS OF DIMENSION p4 11 (2) −1 −1 ψd (uc ua u−1 c ) = ψd (ζp ua ) = ζp ua , and on the other hand, −1 −1 −1 −1 ψd (uc )ψd (ua )ψd (uc )−1 = ua uc ua (ua uc )−1 = ua (uc ua u−1 c )ua = ua ζp ua ua = ζp ua . (3) ψd (uc ub u−1 c ) = ψd (ub ) = ζp ub , and on the other hand, −1 −1 ψd (uc )ψd (ub )ψd (uc )−1 = (ua uc )ζp ub (ua uc )−1 = ζp ua (uc ub u−1 c )ua = ζp ua ub ua = ζp ub . We now need to check that ψd has order p. Clearly, ψdp (ua ) = ua and ψdp (ub ) = ub . Notice that ψdk (uc ) = ψdk−1 (ua uc ) = ψdk−1 (ua )ψdk−1 (uc ) = ua ψdk−1 (uc ) = . . . = uka uc . Therefore, ψdp (uc ) = upa uc = uc . Since ψd is an automorphism of the ring R1 we conclude that the ring R generated by ua , ub , uc , ud is a crossed product of Cp = hud i over R1 . In particular it is an associative algebra. Hence the ring R is an associative complex algebra generated by ua , ub , uc , ud with the following relations. upa = upb = upc = upd = 1 [ua , ub ] = [ua , ud ] = [ub , uc ] = 1, [ua , uc ] = ζp , [ub , ud ] = ζp , [uc , ud ] = ua . The associativity of R ensures that there exists a cocycle f ∈ Z 2 (G, C∗ ) which satisfies the above relations. We show that f is nondegenerate by showing that there are no non-trivial f -regular elements in G. Assume that x = ar1 br2 cr3 dr4 ∈ G is an f -regular element. If r4 6= 0 then [ub , ux ] 6= 1 while b ∈ CG (x) and hence we can assume that x = ar1 br2 cr3 . Then, if r3 6= 0 then [ua , ux ] 6= 1 while a ∈ CG (x) and hence we can assume that x = ar1 b r2 . Then, if r2 6= 0 then [ud , ux ] 6= 1 while d ∈ CG (x) and hence we can assume that x = ar1 . But then, if r1 6= 0 then [uc , ux ] 6= 1 while c ∈ CG (x) and hence we get that x is trivial and therefore f is nondegenerate.  Next, we show that the group G(xv) is of central type in the p > 3 case and in the p = 3 case. Theorem 3.6. For prime p ≥ 5, let G be a group of order p4 generated by four elements {a, b, c, d} with the following relations, ap = bp = cp = dp = 1, [a, b] = [a, c] = [a, d] = [b, c] = 1, [d, b] = a, [d, c] = b. And for p = 3, G15 let G be a group of order 81 generated by three elements {a, b, c} with the following relations, a9 = b3 = c3 = 1, [a, b] = 1, cac−1 = ab, cbc−1 = a6 b. Then, the groups G are of central type. 12 OFIR SCHNABEL Proof. We start with the case where p ≥ 5. First, notice that Z(G) = hai and Gp = ha, bi. We wish to construct a nondegenerate cohomology class [f ] ∈ H 2 (G, C∗ ) such that the restriction of [f ] to Gp is trivial. This twisted group algebra Cf G is generated as algebra by ua , ub , uc , ud such that upa = upb = upc = upd = 1. We use a construction of crossed product in the following way. First we define a cohomology class [α] over the subgroup H := ha, b, ci using the following relations. [α] : [ua , ub ] = [ua , uc ] = 1, [uc , ub ] = ζp , where ζp is a p-th root of unit. Consider the following Cp = hdi-action on Cα H. ψd :Cα H → Cα H ua 7→ ζp ua ub → 7 ua ub uc → 7 ub uc . We will show that ψd is an automorphism of order p of the ring Cα H. We need to check if the following equalities hold. −1 (1) ψd (ub ua u−1 . b ) = ψd (ub )ψd (ua )ψd (ub ) −1 (2) ψd (uc ua u−1 ) = ψ (u )ψ (u )ψ (u ) . d c d a d c c −1 ) = ψ (u )ψ (u )ψ (u ) . (3) ψd (uc ub u−1 d c d b d c c Indeed, (1) ψd (ub ua u−1 b ) = ψd (ua ) = ζp ua , and on the other hand, ψd (ub )ψd (ua )ψd (ub )−1 = ua ub ζp ua (ua ub )−1 = ζp ua . (2) ψd (uc ua u−1 c ) = ψd (ua ) = ζp ua , and on the other hand, ψd (uc )ψd (ua )ψd (uc )−1 = ub uc ζp ua (ub uc )−1 = ζp ua . (3) ψd (uc ub u−1 c ) = ψd (ζp ub ) = ζp ua ub , and on the other hand, ψd (uc )ψd (ub )ψd (uc )−1 = ub uc ua ub (ub uc )−1 = ua ub [uc , ub ] = ζp ua ub . We now need to check that ψd has order p. Clearly ψdp (ua ) = ζpp ua = ua . Notice that ψdk (ub ) = ψdk−1 (ua ub ) = ψdk−1 (ua )ψdk−1 (ub ) = . . .   k−1  k−1  Y Y k(k−1) i i ζp ua ub = ζp 2 uka ub . ψd (ua ) ub = = i=0 i=0 Therefore, p(p−1) ψdp (ub ) = ζp 2 upa ub = ub . In order to show that ψdp (uc ) = uc we will use two observations. First, it is easy to prove by induction that for any natural n ≥ 1, (n + 1)n n(n − 1) 2·1 (n + 2)(n + 1)n + + ...+ = . 2 2 2 6 SIMPLE TWISTED GROUP ALGEBRAS OF DIMENSION p4 13 Second, for any prime number p ≥ 5 p(p − 1)(p − 2) 6 is divisible by p. We will also use that ua and ub commute. Now,   p−1 Y p p−1 p−1 p−1 i ψd (ub ) uc = ψd (uc ) = ψd (ub uc ) = ψd (ub )ψd (uc ) = . . . = i=0  p−1 Y i=0 i(i−1) 2 ζp   Pp−1 i(i−1) Pp−1  p(p−1) p(p−1)(p−2) i 6 uia ub uc = ζp i=0 2 ua i=0 upb uc = ζp ua 2 = uc . Since ψd is an automorphism of the ring Cα H we conclude that the ring R generated by ua , ub , uc , ud is a crossed product of Cp over Cα H. In particular it is an associative algebra. Hence the ring R is an associative complex algebra generated by ua , ub , uc , ud with the following relations. (24) [ua , ub ] = [ua , uc ] = 1, [ud , ua ] = ζp , [uc , ub ] = ζp , [ud , ub ] = ua , [ud , uc ] = ub . The associativity of R ensures that there exists a cocycle f ∈ Z 2 (G, C∗ ) which satisfies the above relations. We show that f is nondegenerate by showing that there are no non-trivial f -regular elements in G. Assume that x = ar1 br2 cr3 dr4 ∈ G is an f -regular element. If r4 6= 0 then [ua , ux ] 6= 1 while a ∈ CG (x) and hence we can assume that x = ar1 br2 cr3 . Then, if r3 6= 0 then [ub , ux ] 6= 1 while b ∈ CG (x) and hence we can assume that x = ar1 br2 . Then, if r2 6= 0 then [uc , ux ] 6= 1 while c ∈ CG (x) and hence we can assume that x = ar1 . But then, if r1 6= 0 then [ud , ux ] 6= 1 while d ∈ CG (x) and hence we get that x is trivial and therefore f is nondegenerate. The case p = 3 is done in a similar way. We start by defining a cohomology class [β] over the commutative group H = ha, bi as follows. [β] : [ua , ub ] = ζ3 , where ζ3 is a root of unity of order 3. Then we define a hci-action on Cβ H by ψc :Cα H → Cα H ua 7→ ζ9 ub ua ub 7→ u6a ub , where ζ9 is a root of unity of order 9. We check that indeed ψc is an automorphism of order 3 of the ring Cβ H and consequently we get an associative ring R spanned by ua , ub , uc with the following relations u9a = u3b = u3c = 1, [ua , ub ] = ζ3 , [uc , ua ] = ζ9 ub , [uc , ub ] = u6a . The associativity of R ensures that there exists a cocycle f ∈ Z 2 (G, C∗ ) which satisfies the above relations. We show that f is nondegenerate by showing that there are no non-trivial f -regular elements in G. Notice that CG (a) = CG (b) = ha, bi, CG (c) = hc, a3 i. Assume that x = ai bj ck ∈ G is an f -regular element. If k 6= 0 then [ua3 , ux ] 6= 1 while a3 ∈ CG (x) and hence we can assume that x = ai bj . If j 6= 0 then [ua , ux ] 6= 1 while a ∈ CG (x) and hence we can assume that x = ai . But then, if i 6= 0 then [ub , ux ] 6= 1 while b ∈ CG (x) and hence we get that x is trivial and therefore f is nondegenerate.  14 OFIR SCHNABEL This completes the proof of Theorem 1. 3.2. p is even. In this section we complete the proof of Theorem 2. All the numbering in this section are with correspondence with Table 2. Recall that we already proved that from the groups G(i) -G(vii) , the only groups of central type are G(iii) , G(v) . We start this section by showing that the group G(viii) is not of central type. Lemma 3.7. Let G = ha, bi be a group of order 16 such that a4 = b4 = 1, [a, b] = a2 . Then, for any cocycle f ∈ Z 2 (G, C∗ ), the element b2 is f -regular. In particular, G is not a group of central type. Proof. Let f ∈ Z 2 (G, C∗ ), and assume that [ua , ub ] = δu2a . Then (25) ua ub ua−1 = δu2a ub . Since a2 and b commutes in G, then by Lemma 2.5, δ is a root of unity of order dividing 4. Therefore, using (25) we get (26) 2 2 2 2 2 2 2 2 2 4 ua u2b u−1 a = (δua ub ) = δ ua (ub ua )ub = δ ua (δ ua ub )ub = δ = 1. Therefore, b2 is an f -regular element in G. Moreover, ub is a nontrivial central element in Cf G and hence the group G is not of central type  Next, we show that the group G(xi) is of central type. Theorem 3.8. Let G = ha, b, ci be a group of order 16 such that a4 = b2 = c2 = 1, [a, b] = [b, c] = 1, [a, c] = a2 . Then G is a group of central type. Proof. We wish to construct a nondegenerate cohomology class [f ] ∈ H 2 (G, C∗ ). The corresponding twisted group algebra Cf G is generated as algebra by ua , ub , uc such that (27) u4a = u2b = u2c = 1. We use a construction of crossed product in the following way. We start from the twisted group algebra R1 = Cα ha, bi, where [α] ∈ H 2 (ha, bi, C∗ ) is defined by the relation [ua , ub ] = −1. Consider the following C2 = hci-action on R1 . ψc :R1 → R1 ua 7→ iu3a ub 7→ ub . By setting ψc (uja ) = ψc (ua )j we ensure that ψc is a homomorphism of R1 . Next, we check that the automorphism ψc has order 2. Clearly ψc2 (ub ) = ub . Now, (28) ψc2 (ua ) = ψc (iu3a ) = iψc (ua )3 = i · i3 u9a = ua . SIMPLE TWISTED GROUP ALGEBRAS OF DIMENSION p4 15 We conclude that indeed ψc is an automorphism of order 2 of R1 . Since ψc is an automorphism of the ring R1 , the ring R generated by ua , ub , uc is a crossed product of C2 = huc i over R1 . In particular it is an associative algebra. Hence the ring R is an associative complex algebra generated by ua , ub , uc with the following relations. u4a = u2b = u2c = 1, [ua , ub ] = −1, [uc, ub ] = 1, [uc , ua ] = iu2a . The associativity of R ensures that there exists a cocycle f ∈ Z 2 (G, C∗ ) which satisfies the above relations. We show that f is nondegenerate by showing that there are no non-trivial f -regular elements in G. Let x = at bj ck ∈ G be an f -regular element. If k 6= 0 then [ux , u2a ] 6= 1 while 2 a ∈ CG (x). Hence we may assume that k = 0 and x = at bj . If j 6= 0 then [ux , ua ] 6= 1 while a ∈ CG (x). Hence we may assume that j = 0 and x = at . If t is odd, then [ux , ub ] 6= 1 while b ∈ CG (x). Hence we may assume that t is even. But then, if t ≡ 2(mod 4), then [ux , uc ] 6= 1 while c ∈ CG (x) and therefore x is trivial. We conclude that f is nondegenerate and G is a group of central type.  Next, we show that the group G(x) is of central type. Theorem 3.9. Let G = ha, b, ci be a group of order 16 such that a4 = b2 = c2 = 1, [a, b] = [b, c] = 1, [a, c] = b. Then G is a group of central type. Proof. We wish to construct a nondegenerate cohomology class [f ] ∈ H 2 (G, C∗ ). The corresponding twisted group algebra Cf G is generated as algebra by ua , ub , uc such that u4a = u2b = u2c = 1. (29) We use a construction of crossed product in the following way. We start from the twisted group algebra R1 = Cα ha, bi, where [α] ∈ H 2 (ha, bi, C∗ ) is defined by the relation [α] : [ua , ub ] = −1. Consider the following C2 = hci-action on R1 . ψc :R1 → R1 ua 7→ −ub ua ub 7→ ub , and ψc (uja ) = ψc (ua )j , ψc (ujb ) = ψc (ub )j . We will show that ψc is an automorphism of order 2 of the ring R1 . We need to check if the following equality holds: −1 ψc (ua ub u−1 . a ) = ψc (ua )ψc (ub )ψc (ua ) Indeed, ψc (ua ub u−1 a ) = ψc (−ub ) = −ub , and on the other hand ψc (ua )ψc (ub )ψc (ua )−1 = (−ub ua )(ub )(−u3a ub ) = −ub . 16 OFIR SCHNABEL Next, we check that the automorphism ψc has order 2. Clearly ψc2 (ub ) = ub . Now, (30) ψc2 (ua ) = ψc (−ub ua ) = −ψc (ua )ψc (ub ) = −(−ua ub )(ub ) = ua . We conclude that indeed ψc is an automorphism of order 2 of R1 . Since ψc is an automorphism of the ring R1 , the ring R generated by ua , ub , uc is a crossed product of C2 = huc i over R1 . In particular it is an associative algebra. Hence the ring R is an associative complex algebra generated by ua , ub , uc with the following relations. u4a = u2b = u2c = 1, [ua , ub ] = −1, [uc , ub ] = 1, [uc , ua ] = −ub . The associativity of R ensures that there exists a cocycle f ∈ Z 2 (G, C∗ ) which satisfies the above relations. We show that f is nondegenerate by showing that there are no non-trivial f -regular elements in G. Let x = at bj ck ∈ G be an f -regular element. If k 6= 0 then [ux , u2a ] 6= 1 while 2 a ∈ CG (x). Hence we may assume that k = 0 and x = at bj . If j 6= 0 then [ux , ua ] 6= 1 while a ∈ CG (x). Hence we may assume that j = 0 and x = at . If t is odd, then [ux , ub ] 6= 1 while b ∈ CG (x). Hence we may assume that t is even. But then, if t ≡ 2(mod 4), then [ux , uc ] 6= 1 while c ∈ CG (x) and therefore x is trivial. We conclude that f is nondegenerate and G is a group of central type.  Next, we show that the group G(xi) is not of central type. Lemma 3.10. Let G = ha, b, ci be a group of order 16 such that a4 = c2 = 1, a2 = b 2 , [a, c] = [b, c] = 1, [a, b] = a2 . Then, for any cocycle f ∈ Z 2 (G, C∗ ), the element a2 is f -regular. In particular, G is not a group of central type. Proof. Let f ∈ Z 2 (G, C∗ ) and assume that [ua , uc ] = δ. By Lemma 2.5, δ ∈ {1, −1}. In particular, (31) [ua2 , uc ] = 1. 2 Hence, in order to show that a is f -regular, we need to show that [ua2 , ub ] = 1. Since [a, b] = a2 , there exists a scalar γ such that [ua , ub ] = γu2a , −1 or equivalently, ub u−1 a ub = γua . Therefore, (32) −2 −1 −2 −1 −1 −1 2 2 2 u2a = u2b = u−2 b = ub ub ub = ub ua ub = (ub ua ub ) = γ ua . Consequently, γ ∈ {1, −1}. Hence, (33) −1 2 −1 −1 −1 −1 2 −1 −1 2 [u2a , ub ] = u2a (ub u−2 a ub ) = ua (ub ua ub ub ua ub ) = ua (ub ua ub ) = 1. Therefore, by (31) and (33), a2 is f -regular and hence f is not nondegenerate.  Finally, the groups G(xii) , G(xiii) , G(xiv) admit a cyclic subgroup of order 8 and hence by Lemma 2.4 these groups are not of central type.. This completes the proof of Theorem 2. SIMPLE TWISTED GROUP ALGEBRAS OF DIMENSION p4 17 4. The semi-center of simple twisted group algebra We use the fact that the partition of a group G to conjugacy classes refines the partition of G to cosets of the commutator Gp . Let f ∈ Z 2 (G, C∗ ) be a nondegenerate cocycle. By (4), for every λ ∈ Ĝ, dim((Cf G)λ ) = 1. Hence, the support of any element in (Cf G)λ is a unique conjugacy class of G, say [x]. Define the following group homomorphism. (34) ϕ = ϕ(f ) : Ĝ → G/Gp λ 7→ xGp . Let λ0 ∈ Ĝ. By [12, (25)] it can easily be verified that λ0 (x) = 1 for every x ∈ Γ(f ) (see Corollary 2.9) if and only if λ0 ∈ker(ϕ). Therefore, (35) ˆ Cf ker(ϕ) = Z(Sz(Cf G)). Next, we prove Theorem 3. We show that if Cf G is a simple twisted group algebra and the restriction of f to Gp , which we denote by f p , is also nondegenerate then the semi-center of Cf G is simple. In particular, if Gp is a Hall subgroup of G, then the semi-center of Cf G is simple. Proof of Theorem 3. First, we show that if there are no non-trivial (λ, f )-regular conjugacy classes contained in Gp then the semi-center of Cf G is simple. Notice that in this case, the associated kernel of ϕ (see (34)) is trivial. Hence, by (35) we conclude that the center of Sz(Cf G) is one dimensional and as a consequence the semi-center of (Cf G) is simple. Next, we show that there are no non-trivial (λ, f )-regular conjugacy class contained in Gp . Assume that [g] ⊆ Gp is a (λ, f )-regular conjugacy class. Let x ∈ CGp (g), in particular x ∈ Gp . Therefore, δ(x) = 1 for any δ ∈ Ĝ. Since g is a (λ, f )-regular element in G, αf (g, x) = αf p (g, x) = λ(x) = 1. Hence, g is an f p -regular element. By the nondegeneracy of f p we conclude that g = 1. Therefore, there are no non-trivial (λ, f )-regular conjugacy class contained in Gp . Hence, by the first part the semi-center of is simple. By [8, Corollary 4] the restriction of a nondegenerate cocycle to any Hall subgroup is also nondegenerate. Hence, by the first part, if Gp is a Hall subgroup of G, then the semi-center of Cf G is simple.  Remark 4.1. Let G be a group of central type of order n2 where n is square-free number. In [11] we show that in this case Gp is a Hall subgroup of G. Hence, by Theorem 3 the semi-center of Cf G is simple. Corollaries 4.2, 4.3 deal with two extremes of ker(ϕ) (see (34)). Either ker(ϕ) is trivial or ker(ϕ) = Ĝ. These extremes correspond to the two extremes presented in Problem 1 for nondegenerate cocycles. Corollary 4.2. Let f ∈ Z 2 (G, C∗ ) be a nondegenerate cocycle. With the above notations the following are equivalent. (1) ker(ϕ) is trivial. In other words, there are no non-trivial (λ, f )-regular conjugacy classes contained in Gp . (2) ϕ is an isomorphism. 18 OFIR SCHNABEL ˆ (3) Sz(Cf G) = Cf Ĝ is simple. In other words, fˆ ∈ Z 2 (Ĝ, C∗ ) is a nondegenerate cocycle, and in particular, Ĝ is a group of central type. ∼ G/Gp , ker(ϕ) is trivial if and only if ϕ is an isomorphism. By Proof. Since Ĝ = ˆ equation (35), ker(ϕ) is trivial if and only if the center of Cf Ĝ is one dimensional and hence fˆ is nondegenerate cocycle.  The other extreme is giving as follows. Corollary 4.3. Let f ∈ Z 2 (G, C∗ ) be a nondegenerate cocycle. With the above notations the following are equivalent. (1) ker(ϕ) = Ĝ. In other words, all the (λ, f )-regular conjugacy classes are contained in Gp . (2) fˆ is cohomologically trivial. ˆ (3) Sz(Cf G) = Cf Ĝ is commutative. (4) With the notations of Corollary 2.9, X [G : G′ CG (x)] = |Ĝ|. x∈Γ(f )∩Gp Moreover, if these conditions hold then Z(G) ≤ Gp . Proof. We first show that the second and the third conditions are equivalent. Asˆ sume that Cf Ĝ is commutative. Then, since the order of the cohomology class [f ] ∈ H 2 (G, C∗ ) divides the dimension of each projective f -representation (see [1, p.406, Remark]) fˆ is cohomologically trivial. On the other hand, since Ĝ is comˆ mutative, if fˆ is cohomologically trivial, then Cf Ĝ is commutative. Next, we show that the first and the third conditions are equivalent. Since f is nondegenerate, the dimension of Sz(Cf G) is |Ĝ|. Therefore, by (35), Sz(Cf G) is commutative if and only if ker(ϕ) = Ĝ. The equivalence between the first and the fourth conditions is clear from Corollary 2.9. Finally, since any central element is (λ, f )-regular for some λ ∈ Ĝ (see Lemma 2.8), the last claim is clear from the first condition.  By Lemma 2.8, nondegenerate cocycles f ∈ Z 2 (G, C∗ ) over abelian groups G are natural examples for affirmative answer to Problem 1(ii). However, there exist more sophisticated examples. Corollary 4.4. Let f ∈ H 2 (G, C∗ ) be a nondegenerate cocycle, assume also Z(G) 6⊆ Gp . If Ĝ ∼ = Cp × Cp then Sz(Cf G) ∼ = Mp (C). Proof. By (4), ˆ Sz(Cf G) = Cf (Cp × Cp ). ˆ Now, by Corollary 4.3, since Z(G) 6⊆ Gp , Cf (Cp × Cp ) is non-commutative and hence by Corollary 4.3 [fˆ] is non-trivial. Since any cohomology class of Cp × Cp is either trivial or nondegenerate (see [11, §2]) we get that fˆ is nondegenerate. ˆ Consequently, Cf (Cp × Cp ) is simple.  In Theorem 5, the idea of the construction of the cohomology class [f ] is based on the following lemma. SIMPLE TWISTED GROUP ALGEBRAS OF DIMENSION p4 19 Lemma 4.5. Let f be nondegenerate cocycle and denote by f p the restriction of f to Gp . Then p p Sz(Cf G) ∩ Cf Gp ⊆ Z(Cf Gp ). Proof. By Proposition 2.7, it is enough to show that if x ∈ Gp is a (λ, f )-regular element for some λ ∈ Ĝ, then it is also f p -regular. Assume that x ∈ Gp is a (λ, f )regular element. Let g ∈ CGp (x), in particular g ∈ Gp . Therefore, δ(g) = 1 for any δ ∈ Ĝ. Since x is (λ, f )-regular, [ux , ug ] = λ(x) = 1. Consequently x is f p -regular.  Note that for any normal subgroup N of a group G, a G-conjugacy class splits into [G : N CG (g)], N -conjugacy classes. Let x ∈ Gp be a (λ, f )-regular element. Then, the G-conjugacy class [x] splits into [G : Gp CG (x)] many Gp -conjugacy classes. Consequently, with the notations of Corollary 2.9, (36) [ X {[x]Gp |x is (λ, f )-regular} = [G : G′ CG (x)]. x∈Γ(f )∩Gp λ∈Ĝ From (36) and Corollary 4.3 we get Corollary 4.6. Let f ∈ Z 2 (G, C∗ ) be a nondegenerate cocycle. If the number of Gp conjugacy classes (in Gp ) is smaller than the cardinality of Ĝ, then Sz(Cf G) is not commutative. In particular, if Sz(Cf G) is commutative, then |Gp | ≥ |G/Gp |. In the next section we will deal with the semi-center of simple twisted group algebras Cf G where G is a p-group for a prime number p. We will use the following proposition. Proposition 4.7. Let f ∈ Z 2 (G, C) be a nondegenerate cocycle and assume p that Sz(CfpG) is commutative. Then, |Z(G)| ≤ |G|. In the specific case where |Z(G)| = |G|, then Gp = Z(G) ∼ = Ĝ. Proof. By Corollary 4.3, since Sz(Cf G) is commutative then Z(G) ⊆ Gp . In particular, (37) |Z(G)| ≤ |Gp |. On the other hand, by [12, Theorem C], Z(G) embeds into Ĝ and therefore (38) |Z(G)| ≤ |Ĝ| = |G| . |Gp | p p From (37) and (38) we get |Z(G)| ≤ |G|. In the case where |Z(G)| = |G| we get equalities in both (37) and (38). Since Z(G) and Gp are of the same order and Z(G) ⊆ Gp we have Gp = Z(G). Since Z(G) embeds into Ĝ and they have the same order we have Z(G) ∼  = Ĝ. 20 OFIR SCHNABEL 5. Semi-center of simple twisted group algebras over p-groups. We start this section by proving that the semi-center of the simple twisted group algebras presented in Theorem 3.6, which correspond to the groups G(xv) , is commutative. Then we will show that G(xv) is unique with this properties. In other words, we will show that if G is a group of order p4 , where p now is any prime, and if there exists a nondegenerate cocycle f ∈ Z 2 (G, C∗ ) such that Sz(Cf G) is commutative, then G ∼ = G(xv) . In particular, there is no group G of order 16 which admits a nondegenerate cocycle f ∈ Z 2 (G, C∗ ) such that Sz(Cf G) is commutative. Theorem 5.1. Let G := G(xv) for primes p ≥ 5 and let H := G(xv) for p = 3. The twisted group algebras which correspond to the following cohomology classes [f ] ∈ H 2 (G, C∗ ) and [β] ∈ H 2 (H, C∗ ) admits a commutative semi-center. [f ] : upa = upb = upc = upd = 1[ua , ub ] = [ua , uc ] = 1, [ud, ua ] = ζp , [uc , ub ] = ζp , [ud , ub ] = ua , [ud , uc ] = ub . [β] : u9a = u3b = u3c = 1, [ua , ub ] = ζ3 , [uc , ua ] = ζ9 ub , [uc , ub ] = u6a . Proof. In the proof of Theorem 3.6 it was shown that [f ] and [β] are indeed cohomology classes. We start by showing that Sz(Cf G) is commutative. Since Gp = ha, bi we can identify Ĝ ∼ = Cp × Cp = hλc i × hλd i. Here, λc (a) = λc (b) = λc (d) = 1, λc (c) = ζp , and λd (a) = λd (b) = λd (c) = 1, λd (d) = ζp , where ζp is a primitive p-th root of unity. Since a is central and [ua , uc ] = [ua , ub ] = 1, [ud, ua ] = ζp , we get that a is (λd , f )-regular. Similarly, since CG (b) = ha, b, ci and [ua , ub ] = 1, [uc , ub ] = ζp , we get that b is (λc , f )-regular. Consequently, with the notations of (34), ϕ(λc ) = bGp = Gp and ϕ(λd ) = aGp = Gp . Therefore, ϕ is trivial and hence by Corollary 4.3, Sz(Cf G) is commutative. Next, we show that Sz(Cβ H) is commutative. Since H p = ha3 , bi we can identify Ĥ ∼ = Cp × Cp = hλa i × hλc i. Here, λa (b) = λa (c) = 1, λa (a) = ζ3 , and λc (a) = λc (b) = 1, λc (c) = ζ3 , where ζ3 is a root of unity of order 3. Since a3 is central and [ua3 , ub ] = 1, [ua3 , uc ] = ζ3 , we get that a3 is (λc , β)-regular. Similarly, since CG (b) = ha, bi and [ua , ub ] = ζ3 , SIMPLE TWISTED GROUP ALGEBRAS OF DIMENSION p4 21 we get that b is (λa , β)-regular. Consequently, with the notations of (34), ϕ(λa ) = bGp = Gp and ϕ(λc ) = a3 Gp = Gp . Therefore, ϕ is trivial and hence by Corollary 4.3, Sz(Cf G) is commutative.  Notice that Z(G(xv) ) is a proper subgroup of Gp(xv) of cardinality p. It turns out that this is a necessary condition on a group G of order p4 in order to admit a nondegenerate cocycle f ∈ Z 2 (G, C) such that Sz(Cf G) is commutative. Lemma 5.2. Let G be a group of order p4 where p is prime. Assume that there is a nondegenerate cocycle f ∈ Z 2 (G, C) such that Sz(Cf G) is commutative. Then Z(G) is a proper subgroup of Gp of cardinality p. Proof. The group G admits a normal subgroup of order pi for any 0 ≤ i ≤ 4 (see [19, Exercise 4.2]). In particular, G admits a normal subgroup N of order p2 . Since |G/N | = p2 we conclude that G/N is a abelian. Therefore |Gp | ≤ p2 . If |Gp | < p2 , then by Corollary 4.6, Sz(Cf G) is non-commutative which is a contradiction. We are left with the case in which |Gp | = p2 . By Corollary 4.3, Z(G) ⊆ Gp . There are two possibilities. Either, Z(G) is a proper subgroup of Gp of cardinality p or Z(G) = Gp . We will show that the second possibility never happens. Assume Z(G) = Gp . Then, by Proposition 4.7, Gp = Z(G) ∼ = Ĝ. Obviously, this cannot happen if Z(G) cyclic. Indeed, in this case G/Z(G) is cyclic and hence the group G is abelian which contradicts our assumption that the semi-center is commutative. Assume Z(G) ∼ = Cp × Cp . We get a central extension (39) φ 1 → Gp ∼ → Cp × Cp → 1. = Cp × Cp → G − Let x, y ∈ G such that φ(x), φ(y) generates Im(φ). Then the commutator Gp is the cyclic subgroup of order p generated by [x, y]. This contradicts (39).  We are now ready to prove the uniqueness of G(xv) in the following sense. Proposition 5.3. Let G be group of cardinality p4 where p is prime. If there exists a nondegenerate cocycle f ∈ Z 2 (G, C) such that Sz(Cf G) is commutative then p > 2 and G ∼ = G(xv) . Proof. Clearly, G cannot be abelian. Let G be a group of central type which is not isomorphic to G(xv) from Table 1. Then by Theorem 1, if p is odd then G isomorphic to either G(viii) or G(xiv) from Table 1, and if p = 2 then by Theorem 2, G is isomorphic to either G(ix) or G(x) from Table 2. However, in all these groups the center is not a proper subgroup of the commutator and hence by Lemma 5.2 there is no commutative semi-center of simple twisted group algebras over these groups.  Let Cf G be a simple twisted group algebra. By Remark 4.1 and by Proposition 5.3, if either |G| is cube-free or |G| = 16, then Sz(Cf G) is non-commutative. Hence, if a group G admits a nondegenerate cocycle f ∈ Z 2 (G, C∗ ) such that Sz(Cf G) is commutative, then |G| ≥ 64. Next we prove Theorem 5. Recall that G defined as follows: (40) G = hx1 , x2 , x3 , x4 , x5 , x6 i, such that x1 , x2 , x3 are central and x2i = 1, [x4 , x5 ] = x1 , [x4 , x6 ] = x2 , [x5 , x6 ] = x3 . 22 OFIR SCHNABEL We show that there exists a nondegenerate cocycle f ∈ Z 2 (G, C∗ ) such that Sz(Cf G) is commutative. Proof of Theorem 5. The idea of the construction of G is based on Proposition 4.7. Clearly, Z(G) = hx1 , x2 , x3 i = Gp . Therefore, Ĝ ∼ = Gp = Z(G). The idea of the construction of [f ] ∈ H 2 (G, C∗ ) is based on Lemma 4.5. We wish to construct a nondegenerate cohomology class [f ] ∈ H 2 (G, C∗ ) such that the restriction of [f ] to Gp is trivial. Let ui := uxi . As before, we assume that u2i = 1. We use a construction of crossed product in the following way. Start from the commutative group algebra R1 = CZ(G) and construct a C2 = hx4 i action on R1 in the following way. ψ4 :R1 → R1 u1 → 7 t14 u1 u2 → 7 t24 u2 u3 7→ t34 u3 For any tij = ±1, ψ4 is an automorphism (of order 2) of the ring R1 . Hence, the ring R2 generated by u1 , u2 , u3 , u4 is a crossed product of C2 over R1 . In particular it is an associative algebra. Consider the following C2 = hx5 i-action on R2 . ψ5 :R2 → R2 u1 7→ u1 u2 → 7 t25 u2 u3 → 7 t35 u3 u4 7→ δu1 u4 We show that again, for any tij , δ = ±1, ψ5 is an automorphism (of order 2) of the ring R2 . Clearly, the restriction of ψ5 to R1 is an automorphism. We need to check if the following equality holds for any 1 ≤ i ≤ 3. (41) −1 ψ5 (u4 ui u−1 . 4 ) = ψ5 (u4 )ψ5 (ui )ψ5 (u4 ) Indeed, ψ5 (u4 ui u−1 4 ) = ψ5 (ti4 ui ) = ti4 ti5 ui , and on the other hand, −1 ψ5 (u4 )ψ5 (ui )ψ5 (u4 )−1 = (δu1 u4 )(ti5 ui )(δ −1 u−1 4 u1 ) = ti5 u1 (u4 ui u4−1 )u−1 1 = ti4 ti5 ui . Since ψ5 is an automorphism of the ring R2 we conclude that the ring R3 generated by u1 , u2 , u3 , u4 , u5 is a crossed product of C2 over R2 . In particular it is an associative algebra. Finally, we construct a C2 = hx6 i-action on R3 in the following SIMPLE TWISTED GROUP ALGEBRAS OF DIMENSION p4 23 way. ψ6 :R3 → R3 u1 → 7 t16 u1 u2 → 7 u2 u3 → 7 u3 u4 → 7 γu2 u4 u5 7→ λu3 u5 Now, we search conditions on tij , δ, γ, λ = ±1, such that ψ6 will be an automorphism of the ring R3 . Similarly to the proof that ψ5 is an automorphism of R2 , the restriction of ψ6 to R2 is also an automorphism. We need to check if the following equality holds for any 1 ≤ i ≤ 4. −1 ψ6 (u5 ui u−1 . 5 ) = ψ6 (u5 )ψ6 (ui )ψ6 (u5 ) (42) For 1 ≤ i ≤ 3 we have on one side ψ6 (u5 ui u−1 5 ) = ψ6 (ti5 ui ) = ti5 ti6 ui . And on the other hand −1 −1 ψ6 (u5 )ψ6 (ui )ψ6 (u5 )−1 = λu3 u5 ti6 ui u−1 = ti6 u3 ti5 ui u3−1 = ti5 ti6 ui . 5 u3 λ For i = 4 we get on one side ψ6 (u5 u4 u−1 5 ) = ψ6 (δu1 u4 ) = δt16 u1 γu2 u4 . On the other hand (43) −1 −1 ψ6 (u5 )ψ6 (u4 )ψ6 (u5 )−1 = (λu3 u5 )(γu2 u4 )(u−1 )= 5 u3 λ −1 −1 −1 γu3 u5 u2 (u−1 5 u5 )u4 u5 u3 = γu3 t25 u2 δu1 u4 u3 = (44) γδt25 u1 u2 u3 u4 u−1 3 = γδt25 u1 t34 u1 u2 u4 . Therefore, equality holds if and only if (45) t16 = t25 t34 . For t16 , t25 , t34 ∈ {1, −1} which satisfy (45), ψ6 is an automorphism and then the ring R generated by u1 , u2 , u3 , u4 , u5 , u6 is a crossed product of C2 over R3 . In particular it is an associative algebra. Let t16 = t34 = t24 = t35 = −1 and all the other tij = 1 and λ = γ = δ = 1. Then, the ring R is a complex associative algebra generated by u1 , u2 , u3 , u4 , u5 , u6 with the following relations. (46) [u1 , u6 ] = [u2 , u4 ] = [u3 , u4 ] = [u3 , u5 ] = −1. For all the other 1 ≤ i ≤ 3, 4 ≤ j ≤ 6 we have [ui , uj ] = 1. Also for all 1 ≤ k ≤ 6, [ui , uip ] = 1 for all 1 ≤ i, ip ≤ 3, [u4 , u5 ] = u1 , [u4 , u6 ] = u2 and [u5 , u6 ] = u3 . The associativity of R ensures that there exists a cocycle f ∈ Z 2 (G, C∗ ) which satisfies the above relations. We need to show the cocycle f is nondegenerate. It easy to show that there are no f -regular elements in G and hence f is nondegenerate. Indeed, for g 6∈ Z(G) there exists an element h ∈ Z(G) such that [ug , uh ] 6= 1. On the other hand, for any h ∈ Z(G) there exists an element g 6∈ Z(G) such that [ug , uh ] 6= 1. Since any element in Z(G) is (λ, f )-regular and since |Z(G)| = |Ĝ| we can conclude that all the (λ, f )-regular elements in G are central and hence contained in Gp = Z(G). By Corollary 4.3, Sz(Cf G) is commutative.  24 OFIR SCHNABEL By Proposition 5.3 and Remark 4.1 the group G presented in Theorem 5 is minimal with the property that (Cf G) is simple and Sz(Cf G) is commutative. 6. Problem 1 for general cocycles As already mentioned, if Sz(Cf G) is simple then Cf G is also simple. As for the commutative semi-center, there are many obvious examples. Clearly, if G is an abelian group then Sz(CG) = CG is commutative. Since the cohomology of cyclic groups is trivial, then another family of examples is any cocycle f ∈ Z 2 (G, C∗ ) on a group G such that Ĝ is cyclic. Next, we present an example of a group G of order 8 such that Ĝ is not cyclic, a cocycle f ∈ Z 2 (G, C∗ ) such that Cf G is non-commutative and still Sz(Cf G) is commutative. Example 6.1. Let G = D4 = {σ, τ |σ 4 = 1, τ 2 = 1, τ στ = σ −1 }. Recall that the conjugation classes of D4 are {1}, {σ 2 }, {σ, σ 3 }, {στ, σ 3 τ }, {τ, σ 2 τ }, and Gp = {1, σ 2 }. Let Cf G be the twisted group algebra spanned by the elements {ug }g∈G where (47) uτ uσ u−1 τ = iuσ3 . By (47), [uσ2 , uτ ] = −1. Therefore, σ 2 is not f -regular and in the notations of [12, Corollary 2.3], Γ(1, f ) ∩ Gp = {1}. Hence, by [12, Corollary 2.3] dimC (Sz(Cf G)) = 4. Consequently, Sz(Cf G) it either commutative or simple. Since the semi-center of non-simple twisted group algebra is never simple we conclude that the Sz(Cf G) is commutative. Table 1. Groups of order p4 where p is an odd prime 3 2 ap = bp = 1, aba−1 = bap 2 ap = bp = cp = 1, [a, b] = [a, c] = 1, [b, c] = ap 2 2 ap = bp = 1, [a, b] = ap 2 ap = bp = cp = 1, [a, b] = [b, c] = 1, [a, c] = ap 2 ap = bp = cp = 1, [a, b] = [b, c] = 1, [a, c] = b 2 ap = bp = cp = 1, [b, c] = 1, [a, b] = ap , ac = cab 2 ap = bp = cp = 1, [b, c] = ap , [a, b] = ap , ac = cab 2 ap = bp = cp = 1, [b, c] = aαp , [a, b] = ap , ac = cab, α = any non-residue (mod p) a9 = b3 = c3 = 1, [b, c] = 1, [a, b] = a3 , [a, c] = ba3 a9 = b3 = 1, c3 = a3 , [b, c] = 1, [a, b] = ap , [c, a] = ba3 a9 = b3 = 1, c3 = a6 , [b, c] = 1, [a, b] = ap , [c, a] = ba3 ap = bp = cp = dp = 1, [a, b] = [a, c] = [a, d] = [b, c] = [b, d] = 1, [c, d] = a ap = bp = cp = dp = 1, [a, b] = [a, c] = [a, d] = [b, c] = 1, [d, b] = a, [d, c] = b a9 = b3 = c3 = 1, [a, b] = 1, [a, c] = ba3 , [b, c] = a3 SIMPLE TWISTED GROUP ALGEBRAS OF DIMENSION p4 G(i) Cp4 G(ii) Cp3 × Cp G(iii) Cp2 × Cp2 G(iv) Cp2 × Cp × Cp G(v) Cp4 G(vi) ha, bi G(vii) ha, b, ci G(viii) ha, bi G(ix) ha, b, ci G(x) ha, b, ci G(xi) for p > 3 ha, b, ci G(xii) for p > 3 ha, b, ci G(xiii) for p > 3 ha, b, ci G(xi) for p = 3 ha, b, ci G(xii) for p = 3 ha, b, ci G(xiii) for p = 3 ha, b, ci G(xiv) ha, b, c, di G(xv) for p > 3 ha, b, c, di G(xv) for p = 3 ha, b, ci 25 a8 a4 a4 a4 a4 a4 a8 a8 a8 = b2 = 1, aba−1 = ba4 = b2 = c2 = 1, [a, b] = [a, c] = 1, [b, c] = a2 = b4 = 1, [a, b] = a2 = b2 = c2 = 1, [a, b] = [b, c] = 1, [a, c] = a2 = b2 = c2 = 1, [a, b] = [b, c] = 1, [a, c] = b = c2 = 1, a2 = b2 [a, c] = [b, c] = 1, [a, b] = a2 = b2 = 1, [a, b] = a2 = b2 = 1, [a, b] = a6 = 1, b2 = a4 [a, b] = a6 OFIR SCHNABEL G(i) C16 G(ii) C8 × C2 G(iii) C4 × C4 G(iv) C4 × C2 × C2 G(v) C24 G(vi) ha, bi G(vii) ha, b, ci G(viii) ha, bi G(ix) ha, b, ci G(x) ha, b, ci G(xi) ha, b, ci G(xii) ha, bi G(xiii) ha, bi G(xiv) ha, bi 26 Table 2. Groups of order 16 SIMPLE TWISTED GROUP ALGEBRAS OF DIMENSION p4 27 References [1] E. Aljadeff and Y. Ginosar. On the global dimension of multiplicative Weyl algebras. Arch. Math. (Basel), 62(5):401–407, 1994. [2] Y. A. Bahturin, S. K. Sehgal, and M. V. Zaicev. Group gradings on associative algebras. J. Algebra, 241(2):677–698, 2001. [3] Y. A. Bahturin and M. V. Zaicev. Group gradings on matrix algebras. Canad. Math. Bull., 45(4):499–508, 2002. [4] N. Ben David, Y. Ginosar, and E. Meir. Isotropy in group cohomology. Bull. Lond. Math. Soc., 46(3):587–599, 2014. [5] A. Braun and G. Vernik. On the center and semi-center of enveloping algebras in prime characteristic. J. Algebra, 322(5):1830–1858, 2009. [6] W. Burnside. Theory of groups of finite order. Dover Publications, Inc., New York, 1955. 2nd ed. [7] S. Danz and K. Erdmann. Crossed Products as Twisted Category Algebras. Algebr. Represent. Theory, 18(2):281–296, 2015. [8] F. R. DeMeyer and G. J. Janusz. Finite groups with an irreducible representation of large degree. Math. Z., 108:145–153, 1969. [9] J. Dixmier. Enveloping algebras, grad. stud. math. Amer. Math. Soc, II, 1996. [10] A. Elduque and M. Kochetov. Gradings on simple Lie algebras, volume 189 of Mathematical Surveys and Monographs. American Mathematical Society, Providence, RI; Atlantic Association for Research in the Mathematical Sciences (AARMS), Halifax, NS, 2013. [11] Y. Ginosar and O. Schnabel. Maximal connected gradings and intrinsic fundamental groups of complex semisimple algebras. In preparation. [12] Y. Ginosar and O. Schnabel. Semi-invariant Matrices over Finite Groups. Algebr. Represent. Theory, 17(1):199–212, 2014. [13] R. B. Howlett and I. M. Isaacs. On groups of central type. Math. Z., 179(4):555–569, 1982. [14] G. Karpilovsky. Projective representations of finite groups, volume 94 of Monographs and Textbooks in Pure and Applied Mathematics. Marcel Dekker, Inc., New York, 1985. [15] M. Linckelmann and M. Stolorz. On simple modules over twisted finite category algebras. Proc. Amer. Math. Soc., 140(11):3725–3737, 2012. [16] E. Nauwelaerts and F. Van Oystaeyen. The Brauer splitting theorem and projective representations of finite groups over rings. J. Algebra, 112(1):49–57, 1988. [17] D. S. Passman. Character theory and group rings. In Character theory of finite groups, volume 524 of Contemp. Math., pages 139–148. Amer. Math. Soc., Providence, RI, 2010. [18] D. S. Passman and P. Wauters. Semi-invariants and weights of group algebras of finite groups. Proc. Amer. Math. Soc., 127(5):1323–1329, 1999. [19] J. Rotman. An introduction to the Theory of Groups Fourth Edition. Springer-Verlag, 1995. [20] M. K. Smith. Semi-invariant rings. Comm. Algebra, 13(6):1283–1298, 1985. [21] P. Wauters. The semicentre of a group algebra. Proc. Edinburgh Math. Soc. (2), 42(1):95–111, 1999. [22] P. Wauters. The semicentre of a group algebra. II. Comm. Algebra, 29(11):5179–5190, 2001. Institute of Algebra and Number Theory, Pfaffenwaldring 57, University of Stuttgart, Stuttgart 70569, Germany E-mail address: [email protected]
4math.GR
MULTIPLIER IDEALS IN TWO-DIMENSIONAL LOCAL RINGS WITH RATIONAL SINGULARITIES arXiv:1412.3605v2 [math.AG] 4 May 2016 MARIA ALBERICH-CARRAMIÑANA, JOSEP ÀLVAREZ MONTANER, AND FERRAN DACHS-CADEFAU Abstract. The aim of this paper is to study jumping numbers and multiplier ideals of any ideal in a two-dimensional local ring with a rational singularity. In particular we reveal which information encoded in a multiplier ideal determines the next jumping number. This leads to an algorithm to compute sequentially the jumping numbers and the whole chain of multiplier ideals in any desired range. As a consequence of our method we develop the notion of jumping divisor that allows to describe the jump between two consecutive multiplier ideals. In particular we find a unique minimal jumping divisor that is studied extensively. 1. Introduction Let X be a complex algebraic variety with mild singularities and OX,O the local ring of a point O ∈ X. To any ideal a ⊆ OX,O one may associate a family of multiplier ideals J (aλ ) parametrized by positive rational numbers λ ∈ Q>0 . Indeed, they form a nested sequence of ideals OX,O ! J (aλ1 ) ! J (aλ2 ) ! ... ! J (aλi ) ! ... and the rational numbers 0 < λ1 < λ2 < · · · where the multiplier ideals change are called jumping numbers. The first jumping number λ1 is also known as the log-canonical threshold. Multiplier ideals and their associated jumping numbers have proven to be a powerful tool to understand the geometry of singularities. They are defined using a logresolution of the pair (X, a). In fact, smaller or more dense jumping numbers can be thought to correspond to “worse“ singularities. The aim of this paper is to present a new approach to the understanding of multiplier ideals and jumping numbers of any ideal a in the local ring OX,O of a complex surface X having at worst a rational singularity at O. This is a case, especially when X is smooth, that has received a lot of attention in recent years because of the interesting properties these invariants satisfy (see the works of Favre-Jonsson [8], [9], Lipman-Watanabe[20] or Tucker [24]). This is also one of the few cases where explicit computations have been done. All three authors were partially supported by Generalitat de Catalunya 2014 SGR-634 project and Spanish Ministerio de Economı́a y Competitividad MTM2012-38122-C03-01/FEDER. FDC is also supported by the KU Leuven grant OT/11/069. MAC is also with the Institut de Robòtica i Informàtica Industrial (CSIC-UPC) and the Barcelona Graduate School of Mathematics (BGSMath). 1 2 M. ALBERICH-CARRAMIÑANA, J. ÀLVAREZ MONTANER, AND F. DACHS-CADEFAU For simple complete ideals or irreducible plane curves in a smooth surface, Järviletho [15] and Naie [21] provide a closed formula for the set of jumping numbers in terms of some invariants of the singularity, the Zariski exponents. To give a closed formula for any general ideal is beyond the scope of this work. A formula for the log-canonical threshold already becomes quite complicated as one may see in the papers of Kuwata [16] and Galindo-Hernando-Monserrat [11]. For the case of any ideal in a surface with a rational singularity we must refer to the work of Tucker [25] where he gives a simple algorithm to compute the set of jumping numbers. To such purpose, he developed the notion of divisors that (critically) contribute, building upon previous work of Smith-Thompson [23]. We may interpret jumping numbers as being parametrized by contributing divisors and critical divisors are more economic to detect since the complete ideals they define are very close to their corresponding multiplier ideal. The algorithm he proposes uses a characterization of critical divisors that allows them to be found and consequently allows the corresponding jumping numbers to be computed. A similar strategy is used by Hyry-Järvilehto in [14] where they proved that jumping numbers are parameterized by more general complete ideals1. Moreover, they provide a combinatorial criterion to detect a suitable ideal and its corresponding jumping number. The aim of this paper is to understand the whole change between a multiplier ideal to the next one, and to reveal what information encoded in a multiplier ideal determines the next jumping number. This is done in our main result Theorem 3.5 and it gives rise to an algorithm to compute the ordered sequence of multiplier ideals in any desired range of the real line. The algorithm avoids considering candidates and computes sequentially at each step a jumping number and its associated multiplier ideal. This new algorithm improves in efficiency the computation of jumping numbers when compared with Tucker’s algorithm. Perhaps the most important contribution of our method lies in finding a divisor, that we name the minimal jumping divisor, tightly related to the aforementioned algorithm, which enables one to obtain a multiplier ideal from the previous one, and vice versa. This jumping divisor is studied, in particular its geometric structure on the dual graph, and it is compared with the previously known critically contributing divisors. The structure of this paper is as follows: In Section §2 we introduce the basics of the theory of multiplier ideals and some of the tools in the theory of singularities that we will need in the rest of the paper. We pay special attention to the equivalence between complete ideals and antinef divisors developed by Lipman in [19] since this is the way we will present multiplier ideals. In particular we provide a new method to compute the antinef closure of any given divisor, generalizing previous versions of Casas-Alvero [5] and Reguera [22]. 1Contributing divisors describe complete ideals nested in between consecutive multiplier ideals. The ideals considered in [14] are not necessarily nested. MULTIPLIER IDEALS IN TWO-DIMENSIONAL LOCAL RINGS 3 In Section §3 we present the main result of this paper in Theorem 3.5. It gives a generalization of a well-known formula for the log-canonical threshold and allows us to compute a jumping number from the data given by the preceding a multiplier ideal. This leads to the desired algorithm that computes sequentially the chain of multiplier ideals. In Section §4 we develop the theory of jumping divisors that allows us to describe the whole jump between two consecutive multiplier ideals. Quite surprisingly, the algorithm we develop in Section §3 allows us to construct the unique minimal jumping divisor associated to every jumping number. It is minimal in the sense that no proper subdivisor gives the jump between consecutive multiplier ideals. Moreover, we prove in Theorem 4.11 that minimal jumping divisors are generically invariant with respect to log-resolutions of the ideal and they satisfy some nice geometric properties when viewed in the dual graph. Finally, in Section §5 we present the theory of jumping divisors in a more general framework that we develop using the results of Hyry-Järvilehto [14] and their relation with the theory of contributing divisors of Tucker [25]. The main result of this section is the fact that, among all the contributing divisors associated to a jumping number that give the same ideal, there is a minimal one. For example, critical divisors are of this type. It turns out that these minimal contributing divisors are all contained in the minimal jumping divisor and inherit the same invariance property with respect to log-resolutions of the ideal. Acknowledgments: We wish to thank Vı́ctor González Alonso for uncountable discussions that we had with him during the realization of this work. The authors would also like to thank Pierrette Cassou-Nogués and Wim Veys for the comments received and Manuel González-Villa for a careful reading of a previous version of the manuscript. 2. Preliminaries Let X be a normal surface and O a point where X has at worst a rational singularity. That is, there exists a desingularization π : X ′ → X such that the stalk at O of the higher direct image R1 π∗ OX ′ is zero. This property is then satisfied for any desingularization. The theory of rational singularities was introduced by Artin in [4] and further developed by Lipman in [19]. Another reference that we will follow closely is [22]. Let a ⊆ OX be an ideal sheaf. Denote m = mX,O ⊆ OX,O the maximal ideal of the local ring OX,O at O. Throughout this work we will often consider the case where a ⊆ m is an m-primary ideal, which can be identified with an ideal sheaf that equals OX outside the point O (we will use both languages interchangeably, depending on the context). Recall that a log-resolution of the pair (X, a) (or of a, for short) is a proper birational morphism π : X ′ → X such that i) X ′ is smooth, ii) the preimage of a is locally principal, that is, a · OX ′ = OX ′ (−F ) for some effective Cartier divisor F , and 4 M. ALBERICH-CARRAMIÑANA, J. ÀLVAREZ MONTANER, AND F. DACHS-CADEFAU iii) F + E is a divisor with simple normal crossings support where E = Exc (π) is the exceptional locus. From now on, consider a given log-resolution of a. Since the point O has (at worst) a rational singularity, the exceptional locus E is a tree of smooth rational curves E1 , . . . , Er . Furthermore, the matrix of intersections (Ei · Ej )16i,j6r is negative-definite. P Let Div(X ′ ) be the group of integral divisors in X ′ , i.e. divisors of the form D = i di Ei where the Ei are pairwise different (non necessarily exceptional) prime divisors and di ∈ Z. Among them, we will consider divisors in the lattice Λ := ZE1 ⊕ · · · ⊕ ZEr of exceptional divisors and we will simply refer them as divisors with exceptional support. Any divisor D ∈ Div(X ′ ) has a decomposition D = Dexc + Daff into its exceptional and affine part2 according to its support. Our main example is the divisor F such that a·OX ′ = OX ′ (−F ). In this case we will denote its exceptional and affine part as Fexc = r X ei Ei and i=1 Faff = s X ei Ei i=r+1 where, by definition, the ei are non-negative integers. Whenever a is an m-primary ideal, the divisor F is just supported on the exceptional locus. i.e. F = Fexc . Remark 2.1. Let C : f = 0 be a curve defined by an element f ∈ OX,O . The total transform of C is the pull-back C := π ∗ C and its strict transform C ′ is the closure P of π −1 (C − {O}). The total transform has a presentation C = C ′ + C exc = C ′ + di Ei where the weights vi (f ) := di are the values of the curve C at Ei . Recall that f ∈ a whenever C ′ + C exc > F and f is generic in a if C exc = Fexc and C ′ − Faff has no singular points. More generally, we will also consider Q-divisors in DivQ (X ′ ) = Div(X ′ ) ⊗Z Q or divisors in the Q-vector space ΛQ := QE1 ⊕ · · · ⊕ QEr . The main example will be the relative canonical divisor Kπ . Indeed, the definition of Kπ is quite subtle if O is singular, because at first sight one can only define a canonical divisor KX of X as a Weil divisor. Since rational singularities are in particular Q-factorial, there exists a positive integer m such that mKX is Cartier, which can be pulled back to X ′ and allows to define Kπ = KX ′ − m1 π ∗ (mKX ). Alternatively, r X Kπ = ki Ei i=1 is supported on the exceptional locus E, and must satisfy ! r X (2.1) (Kπ + Ei ) · Ei = kj Ej · Ei + Ei2 = −2 j=1 2We follow the terminology of Lipman-Watanabe [20] MULTIPLIER IDEALS IN TWO-DIMENSIONAL LOCAL RINGS 5 for every exceptional component Ei because of the adjunction formula. This property indeed characterizes Kπ because the intersection form on E is negative-definite, and therefore the system defined by equations (2.1) has a unique solution (k1 , . . . , kr ). However, the ki are not necessarily integral, and can even be negative. In the case that ki > −1 (resp. ki > −1) for all Ei , one says that X has a log-terminal singularity (resp. log-canonical singularity) at O. P For any Q-divisor D = i di Ei ∈ DivQ (X ′ ), we denote its round-down and round-up as X X ⌊D⌋ = ⌊di ⌋ Ei and ⌈D⌉ = ⌈di ⌉ Ei . i i P The fractional part of D is then {D} = D − ⌊D⌋ = i {di } Ei . In the sequel we will denote the value of each component Ei of D as vEi (D) := di . If no confusion arises, we will simply denote the value of the components as vi (D) := vEi (D). 2.1. Dual graph. The combinatorics of the log-resolution of a can be encoded using the so-called dual graph. This is a rooted tree where the vertices represent the irreducible components Ei 6 F and two vertices are joined by an edge if the corresponding divisors intersect. Given any component Ei , we will denote by Adj (Ei ) the set of components Ej , j 6= i, sharing an edge with Ei , i.e. Ei · Ej = 1, and by  a (Ei ) = #Adj (Ei ) = Ei · F red − Ei the number of such components which is the valence of the vertex representing Ei , where F red denotes de reduced divisor with the same support as F . An end of the dual graph is nothing but a vertex with valence 1, i.e. a vertex Ei such that a (Ei ) = 1. More generally, for any effective subdivisor D = Ei1 + · · · + Eim 6 F we define AdjD (Ei ) = {Ej 6 D | Ei · Ej = 1} and aD (Ei ) = #AdjD (Ei ). We denote by vD = m (resp. aD ) the number of components of D (resp. the number of intersections between two components of D). Since the dual graph is a tree it is clear that X aD (Ei ) = 2aD Ei 6D and that vD − aD equals the number of connected components of D. An end of the subgraph associated to D is a vertex with valence 1 or 0. The later meaning that Ei is an isolated component of D. For any exceptional component Ei , we define the excess (of a) at Ei as ρi = −F · Ei . It can be interpreted as the number of branches of the strict transform of a curve defined by a generic element f ∈ a that intersect the component Ei . Indeed, if its total transform is C = C ′ + F then 0 = C · Ei = C ′ · Ei + F · Ei = C ′ · Ei − ρi , which proves the claim. There are two kinds of exceptional divisors that will play a special role: 6 M. ALBERICH-CARRAMIÑANA, J. ÀLVAREZ MONTANER, AND F. DACHS-CADEFAU • A component Ei of E is a rupture component if a (Ei ) > 3, that is, it intersects at least three more components of E (different from Ei ). • We say that Ei is dicritical if ρi > 0. By [19], dicritical components correspond to Rees valuations. We also mention that non-exceptional components also correspond to Rees valuations. P 2.2. Complete ideals and antinef divisors. Given an effective Q-divisor D = di Ei ∈ DivQ (X ′ ) we may consider its associated (sheaf) ideal π∗ OX ′ (−D) := π∗ OX ′ (−⌈D⌉). Its stalk at O is ID := {f ∈ OX,O | vi (f ) > ⌈di ⌉ for all Ei 6 D}. This is a complete ideal of OX,O that is m-primary whenever D has exceptional support, i.e. D ∈ ΛQ . Any two divisors D, D ′ ∈ DivQ (X ′ ) defining the same complete ideal π∗ OX ′ (−D) = π∗ OX ′ (−D ′ ) are called equivalent divisors. In the equivalence class of a given divisor one may find a unique maximal representative. First, recall that an effective divisor with integral coefficients D ∈ Div(X ′ ) is called antinef if −D · Ei > 0, for every exceptional prime divisor Ei . It is worth to point out that the affine part of D = Dexc + Daff satisfies Daff · Ei > 0. Therefore D is antinef whenever −Dexc · Ei > Daff · Ei . In the work of Lipman (see [19, §18]) one may find the following correspondence that we will heavily use throughout this work. Theorem 2.2. There is a one to one correspondence between antinef divisors in Div(X ′ ) and complete ideals in OX,O . In particular, antinef divisors in Λ correspond to m-primary complete ideals. In order to find the representative in the equivalence class of a given divisor D ∈ e The existence of such divisor is DivQ (X ′ ) we will consider its so-called antinef closure D. a consequence of the following results that can be found in [19, §18], but we also refer to [24] and [20] for more insight. Lemma 2.3. For any effective Q-divisor D ∈ DivQ (X ′ ) there exists a unique minimal e ∈ Div(X ′ ) satisfying D e > D that is called the antinef closure integral antinef divisor D e>D of D. In particular, any antinef divisor D ′ such that D ′ > D must satisfy D ′ > D e ∈ Proposition 2.4. An effective Q-divisor D ∈ DivQ (X ′ ) and its antinef closure D ′ Div(X ) are equivalent, i.e. e π∗ OX ′ (−D) = π∗ OX ′ (−D). One of the advantages of working with antinef divisors is that they provide the following characterization for the inclusion (or strict inclusion) of two given complete ideals. Proposition 2.5. Let D1 , D2 be two antinef divisors in Div(X ′ ). Then: i) π∗ OX ′ (−D1 ) ⊇ π∗ OX ′ (−D2 ) if and only if D1 6 D2 . ii) π∗ OX ′ (−D1 ) ! π∗ OX ′ (−D2 ) if and only if D1 < D2 . MULTIPLIER IDEALS IN TWO-DIMENSIONAL LOCAL RINGS 7 For non-antinef divisors we can only claim the following implication: Proposition 2.6. Let D1 , D2 be two divisors in DivQ (X ′ ) such that D1 6 D2 . Then: i) π∗ OX ′ (−D1 ) ⊇ π∗ OX ′ (−D2 ). f1 6 D f2 . ii) D The converses to these results are no longer true. In general, the divisors that will be considered in this work are not antinef. In order to compute their antinef closure we will use an inductive procedure called unloading that was already described in the work of Enriques [7, IV.II.17] (for the case of smooth varieties) and Laufer’s procedure to compute the fundamental cycle [17] (for varieties with rational singularities). Here we will present a new version that is a generalization of both the unloading procedures described by Casas-Alvero [5, §4.6] (for smooth varieties) and Reguera [22] (for varieties with rational singularities). Unloading procedure: Let D ∈ DivQ (X ′ ) be any Q-divisor. Its excess at the exceptional prime divisor Ei is the integer ρi = −⌈D⌉ · Ei . Denote by Θ the set of exceptional components Ei 6 D with negative excesses, i.e. Θ := {Ei 6 Dexc | ρi = −⌈D⌉ · Ei < 0}. To unload values on this set is to consider the new divisor X D ′ = ⌈D⌉ + ni Ei , where ni = l ρi Ei2 m Ei ∈Θ . Notice that ni is the least integer number such that (⌈D⌉ + ni Ei ) · Ei = −ρi + ni Ei2 6 0. Remark 2.7. Casas-Alvero considered at each step just one component with negative excess. Reguera also considered one component with negative excess but in her case she also imposed ni = 1 at each step. In this sense, our approach is more economic from a computational point of view. Furthermore, our procedure allows unloading on divisors with affine part3, which will enable us to treat in a unified way multiplier ideals of both curves and not necessarily m-primary complete ideals. The correctness of the unloading procedure is a consequence of the following results. Proposition 2.8. Let D ′ be the divisor obtained from a divisor D ∈ DivQ (X ′ ) after one single unloading step. Then ID′ = ID . Proof. It is clear from its construction that ID′ ⊆ ID . Pick f ∈ ID and let C = C ′ + C exc be the total transform of the curve C defined by f = 0. We have vi (f ) > vi (⌈D⌉) > vi (D) for all Ei . Consider any exceptional divisor Ei where D has negative excess, from the inequality (C exc − vi (f )Ei ) · Ei > (⌈D⌉ − vi (⌈D⌉)Ei ) · Ei we deduce −vi (f )Ei · Ei > (⌈D⌉ − vi (⌈D⌉)Ei ) · Ei 3Our method also differs from the one considered by Lipman-Watanabe in [20]. 8 M. ALBERICH-CARRAMIÑANA, J. ÀLVAREZ MONTANER, AND F. DACHS-CADEFAU just because C exc · Ei 6 0. Equivalently (⌈D⌉ + (vi (f ) − vi (⌈D⌉))Ei ) · Ei 6 0 so it follows that ni 6 vi (f ) − vi (⌈D⌉). In particular ni + vi (⌈D⌉) 6 vi (f ) and f ∈ ID′ .  e of a divisor D ∈ DivQ (X ′ ) is achieved after Proposition 2.9. The antinef closure D finitely many unloading steps. Proof. We want to show that the divisors in the sequence D 6 D1 = ⌈D⌉ < · · · < Dt < Dt+1 < · · · e then obtained during the unloading procedure are all contained in the antinef closure D, e the result will follow since both D1 and D have integral coefficients and the inequalities e and suppose that Dt 6 D. e Notice in the unloading sequence are strict. Clearly D1 6 D e − Dt ) · Ei 6 −Dt · Ei . that for any component Ei 6 Dt with negative excess we have (D P e − Dt = Then, if we denote D i mi Ei , the previous inequality becomes e − Dt ) · Ei = (mi Ei + P mj Ej ) · Ei (D P j6=i = mi Ei2 + j6=i mj Ej · Ei 6 −Dt · Ei . P Then, using that j6=i mj Ej · Ei > 0, we get   −Dt · Ei mi > , Ei2 e have integer coefficients. It follows that Dt+1 is where we used the fact that Dt and D e also contained in D.  2.3. Multiplier ideals. Let π : X ′ → X be a log-resolution of an ideal a ⊆ OX and let F be the divisor such that a · OX ′ = OX ′ (−F ). The multiplier ideal (sheaf ) associated to a and some rational number λ ∈ Q>0 is defined as4  J aλ = π∗ OX ′ (⌈Kπ − λF ⌉) . For a detailed overview of the theory of multiplier ideals and the properties they satisfy, we must refer to the book of Lazarsfeld [18]. For more details in the case that X has rational singularities we also recommend to take a look at [24] and [25]. The definition of multiplier ideals is independent of the choice of log resolution. For simplicity, we will always fix a given resolution. Multiplier ideals are complete and they are invariants up to integral closure, i.e. J (aλ ) = J (aλ ), therefore, without loss of generality, we may always assume that the ideal a is complete. Moreover, if a is m-primary it follows  that its associated multiplier ideals J aλ are m-primary as well. Some other important properties of multiplier ideals that we will use in this work are: • Local vanishing theorem: Ri π∗ OX ′ (⌈Kπ − λF ⌉) = 0 for all i > 0 and all λ ∈ Q>0 . • Skoda’s theorem: J aλ = a · J aλ−1 for all λ > dim OX,O = 2.  an abuse of notation, we will also denote J aλ its stalk at O so we will omit the word ”sheaf” if no confusion arises. 4By MULTIPLIER IDEALS IN TWO-DIMENSIONAL LOCAL RINGS 9 For the case  of principal ideals there is another version of Skoda’s theorem that states that J aλ = a · J aλ−1 for all λ > 1. In particular, we have peridiocity of jumping numbers. Multiplier ideals come with an attached set of invariants that were studied systematically by Ein-Lazarsfeld-Smith-Varolin in [6]. Clearly ⌈Kπ − λF ⌉ > ⌈Kπ − (λ + ε) F ⌉ for any ε > 0, with equality if ε is small enough. Therefore the multiplier ideals form a discrete nested sequence of ideals OX,O ⊇ J (aλ0 ) ! J (aλ1 ) ! J (aλ2 ) ! ... ! J (aλi ) ! ... indexed by an increasing sequence of rational numbers 0 = λ0 < λ1 < λ2 < . . . such that for any c ∈ [λi , λi+1 ) it holds J (aλi ) = J (ac ) ! J (aλi+1 ). The λi are the so-called jumping numbers of the ideal a and the first jumping number λ1 = lct(a) is the log-canonical threshold of a. 2.4. Contributing divisors. The jumps between multiplier ideals necessarily must occur at rational numbers λ ∈ Q which cause the strict inclusion of divisors ⌈Kπ − λF ⌉ < ⌈Kπ − (λ − ε) F ⌉ for any ε. If we take a close look at F = Fexc + Faff these rational numbers must belong to the set of candidate jumping numbers   ki + m | m ∈ Z>0 ei Notice that for non-exceptional components Ei 6 Faff we have ki = 0 and their correo n m sponding candidates ei | m ∈ Z>0 are indeed jumping numbers. It is easy to check that not every candidate jumping number (coming from the exceptional part) is necessarily a jumping number. To separate the wheat from the chaff, Tucker [25] developed the notion of divisor that contributes to a jumping number, building upon previous work by Smith-Thompson [23]. Definition 2.10. A positive rational number λ is a candidate jumping number for a reduced divisor G 6 F if it satisfies λei − ki ∈ Z>0 for any component Ei 6 G. Definition 2.11. [25, Def. 3.1] A reduced divisor G 6 F for which λ is a candidate jumping number is said to contribute to λ if π∗ OX ′ (⌈Kπ − λF ⌉ + G) ! J (aλ ) Moreover, this contribution is critical if for any divisor 0 6 G′ < G we have π∗ OX ′ (⌈Kπ − λF ⌉ + G′ ) = J (aλ ). 10 M. ALBERICH-CARRAMIÑANA, J. ÀLVAREZ MONTANER, AND F. DACHS-CADEFAU Most often we will simply say that G is just a contributing or a critical divisor associated to λ. Critical divisors define complete ideals very close to a multiplier ideal in a precise sense that will be explained in the forthcoming Corollary 5.5 in Section §5. One may identify critical divisors with exceptional support through the following numerical characterization. Proposition 2.12. [25, Thm. 4.3] Let λ be a candidate jumping number for a reduced divisor G ∈ Λ with connected support. · If G = Ei is prime, then Ei is a critical divisor for λ if and only if (⌈Kπ − λF ⌉ + Ei ) · Ei > 0. · If G is reducible, then G is a critical divisor for λ if and only if (⌈Kπ − λF ⌉ + G) · Ei = 0 for all divisors Ei in the support of G. Moreover, critical divisors with exceptional support satisfy a nice geometric property when viewed in the dual graph. Proposition 2.13. [25, Cor. 4.2 & Thm 5.1] Let G be a critical divisor for a jumping number λ. Then G is a connected chain in the dual graph of the log-resolution of a whose ends must be either rupture or dicritical divisors. Using all these properties, Tucker provides a simple algorithm to compute the set of all jumping numbers (see [25, §6]). It boils down to the following steps: Algorithm 2.14. (Jumping Numbers) Input: A log-resolution of an ideal a ⊆ OX,O . Output: List of Jumping Numbers of a. • Jumping number: · Compute the candidate jumping numbers for Fexc . · Find all possible critical divisors using Prop. 2.13. · Find which candidate jumping numbers can be realized as jumping number associated to these critical divisors using Prop. 2.12. · Plug in those jumping numbers coming from Faff . 3. An algorithm to compute jumping numbers and multiplier ideals The aim of this section is to compute the jumping numbers and their corresponding multiplier ideals of any given ideal a ⊆ OX,O . To such purpose, we fix a log-resolution π : X ′ −→X of our ideal a. The are the Pr main ingredients we will have to deal with ′ relative canonical divisor Kπ = i=1 ki Ei ∈ ΛQ , and the divisor F ∈ Div(X ) such that aOX ′ = OX ′ (−F ). Recall that we have a decomposition s r X X ei Ei + ei Ei F = Fexc + Faff = i=1 i=r+1 MULTIPLIER IDEALS IN TWO-DIMENSIONAL LOCAL RINGS 11 in terms of its exceptional and affine support. We will provide a very simple algorithm that allows one to construct sequentially the chain of multiplier ideals5 OX,O ⊇ J (aλ0 ) ! J (aλ1 ) ! J (aλ2 ) ! ... ! J (aλi ) ! ... When X is a smooth surface, or even when X has a log-terminal singularity at O, the multiplier ideal associated to λ0 = 0 is the whole ring, i.e. OX,O = J (aλ0 ). In general, when X has a rational singularity we may have an strict inclusion OX,O ! J (aλ0 ). The startingP point of our method will be describing this ideal by means of the antinef closure Dλ0 = eλi 0 Ei of ⌊−Kπ ⌋ that we compute using the unloading procedure described in Section §2.2. As a consequence of our main result (see Theorem 3.5), the log-canonical threshold satisfies the following formula6   ki + 1 + eλi 0 . (3.1) λ1 = lct(a) = min i ei Then we describe its associated multiplier ideal J (aλ1 ) just computing the antinef closure Dλ1 of ⌊λ1 F − Kπ ⌋ using the unloading procedure. Once we have the divisor Dλ1 , we use an extension of Formula 3.1 given by Theorem 3.5, that computes the next jumping number λ2 . Then we only have to follow the same strategy: the antinef closure Dλ2 of ⌊λ2 F − Kπ ⌋, i.e. the multiplier ideal J (aλ2 ), will allow us to compute λ3 and so on. The main idea behind our method is a simple comparison between complete ideals. Whenever we have two antinef divisors it is easy to check whether their corresponding complete ideals satisfy a strict inclusion (see Proposition 2.5). To compare the ideals associated to an antinef and a non-antinef divisor is more subtle and this is the situation that we will have to deal with in this section. To address this problem we will need some preliminary technical results. Lemma 3.1. Let D1 , D2 be two divisors in Div(X ′ ) such that D1 6 D2 . Then, they have f1 = D f2 if and only if D f1 > D2 . the same antinef closure D f1 6 D f2 just because D1 6 D2 . Proof. Recall that, by Proposition 2.6, we already have D f1 > D2 then, by the definition of antinef closure (see Lemma 2.3), we also Assume D f1 > D f2 > D2 and thus D f1 = D f2 . On the other hand, assume that D f1 = D f2 . have D 5In fact, we can compute the chain inside any desired fixed range [c, c′ ] ⊆ R: ′ J (ac ) = J (aλ0 ) ! J (aλ1 ) ! ... ! J (aλr ) = J (ac ) . 6When X is smooth, or even when it has log-terminal singularities, we have Dλ0 = 0 so one recovers the well-known formula for the log-canonical threshold. 12 M. ALBERICH-CARRAMIÑANA, J. ÀLVAREZ MONTANER, AND F. DACHS-CADEFAU f1 = D f2 > D2 as Then, since the antinef closure of a divisor always contains it, we have D desired.  f1 < D f2 Corollary 3.2. Let D1 , D2 be two divisors in Div(X ′ ) such that D1 6 D2 . Then, D f1 ) < vi (D2 ) for some Ei . if and only if vi (D f1 6 D f2 also holds. The result then follows from Proof. As D1 6 D2 , the inclusion D Lemma 3.1.  Translated into the language of complete ideals, these results give a characterization of the jump between two nested ideals, which will be a key ingredient in the proof of our results. Proposition 3.3. Let D1 , D2 be two divisors in Div(X ′ ) such that D1 6 D2 . Then: f1 > D2 . i) π∗ OX ′ (−D1 ) = π∗ OX ′ (−D2 ) if and only if D f1 ) < vi (D2 ) for some Ei . ii) π∗ OX ′ (−D1 ) ! π∗ OX ′ (−D2 ) if and only if vi (D For convenience we also present this result in the form we will most commonly use it. P ′ Corollary 3.4. Let λ′ < λ be rational numbers. Let Dλ′ = eλi Ei be the antinef closure of ⌊λ′ F − Kπ ⌋. Then: ′ ′ i) J (aλ ) = J (aλ ) if and only if ⌊λei − ki ⌋ 6 eλi for all Ei . ′ ′ ii) J (aλ ) ! J (aλ ) if and only if ⌊λei − ki ⌋ > eλi for some Ei . With the technical tools stated above we are ready for the main result of this section. P ′ Theorem 3.5. Let a ⊆ OX,O be an ideal and let Dλ′ = eλi Ei be the antinef closure of ⌊λ′ F − Kπ ⌋ for a given λ′ ∈ Q>0 . Then,  ′ ki + 1 + eλi λ = min i ei ′ is the jumping number consecutive to λ . Proof. Let us check first that λ′ < λ. Indeed, by the definition of antinef closure, the ′ ′ integers eλi satisfy ⌊λ′ ei − ki ⌋ 6 eλi for any Ei , and hence: ′ λ′ < ki + 1 + eλi . ei ′ Thus, we have an inclusion of ideals J (aλ ) ⊇ J (aλ ). Notice that for those divisors Ei where the minimum is achieved we have ′ ′ ⌊λei − ki ⌋ = 1 + eλi > eλi so the above inclusion of ideals is strict by Corollary 3.4. To conclude that λ is the jumping number immediately after λ′ , we have to show that for any c ∈ R with λ′ 6 c < λ we ′ ′ have J (aλ ) = J (ac ). Suppose the contrary, i.e., J (aλ ) ! J (ac ). By Corollary 3.4, ′ k +1+eλ ′ this c should satisfy ⌊λei − ki ⌋ > eλi or equivalently c > i ei i for some Ei , and this contradicts the fact that λ is the minimum of these rational numbers.  MULTIPLIER IDEALS IN TWO-DIMENSIONAL LOCAL RINGS 13 The above result for the case λ′ = 0 gives a mild generalization of the well-known formula for the log-canonical threshold in the smooth case. We point out that the antinef closure of ⌊−Kπ ⌋ is 0 whenever X is smooth or, more generally, when it has log-terminal singularities. P λ0 ei Ei be the antinef closure of Corollary 3.6. Let a ⊆ OX,O be an ideal. Let Dλ0 = ⌊−Kπ ⌋. Then,   ki + 1 + eλi 0 lct(a) = min . i ei Another easy application of the results above is the following result that should be well-known to experts. Corollary 3.7. Let λ1 be the log-canonical threshold of an ideal a ⊆ OX,O and assume that X has at most a log-terminal singularity at O. Then J (aλ1 ) = m. Proof. Since X has at most a log-terminal singularity, the log-canonical threshold is   ki + 1 lct(a) = λ1 = min i ei for any divisor Ei and equality is achieved at least for a given so it satisfies λ1 6 kie+1 i divisor. In particular, for all Ei we have ⌊λ1 ei − ki ⌋ 6 1. It follows from Proposition 2.6 that m ⊆ J (aλ1 ) OX,O and we get the desired result.  For non log-terminal singularities we may find examples where the codimension as C-vector spaces of J (aλ0 ) ! J (aλ1 ) might be bigger than 1 (see Example 3.10). Combining Theorem 3.5 and the unloading procedure described in Section §2.2 we can describe a very simple algorithm that allows us to compute the chain of multiplier ideals: Algorithm 3.8. (Jumping Numbers and Multiplier Ideals) Input: A log-resolution of an ideal a ⊆ OX,O . Output: List of Jumping Numbers of a and its corresponding Multiplier Ideals. P Set λ0 = 0 and compute the antinef closure Dλ0 = eλi 0 Ei of ⌊−Kπ ⌋ using the unloading procedure. From j = 1 , incrementing by 1 (Step j) · Jumping number: Compute ) ( λ ki + 1 + ei j−1 λj = min . i ei · Multiplier ideal: Compute the antinef closure Dλj = using the unloading procedure. P λ ei j Ei of ⌊λj F −Kπ ⌋ 14 M. ALBERICH-CARRAMIÑANA, J. ÀLVAREZ MONTANER, AND F. DACHS-CADEFAU Notice that we may also find all the multiplier ideals in any given interval [c′ , c] of the real line. In this case, our starting point would be computing the antinef closure Dc′ of ⌊c′ F − Kπ ⌋. To illustrate this method we consider an easy example in a smooth variety. Example 3.9. Consider the ideal a = (x2 y 2 , x5 , y 5, xy 4 , x4 y) ⊆ C{x, y}. We represent the relative canonical divisor Kπ and the divisor F in the dual graph as follows: E2 E3 E1 E5 Vertex ordering E4 2 4 1 4 2 5 10 4 10 5 Kπ F The blank dots correspond to dicritical divisors and their excesses are represented by broken arrows7. For simplicity we will collect the values of any divisor in a vector. To start with we have Kπ = (1, 2, 4, 2, 4) and F = (4, 5, 10, 5, 10). In the algorithm we will have to perform some unloading steps so we will have to consider the intersection matrix M = (Ei · Ej )16i,j65   −5 0 1 0 1  0 −2 1 0 0    1 −1 0 0  M = .  1  0 0 0 −2 1  1 0 0 1 −1 The algorithm is performed as follows: • We start computing the log-canonical threshold:     ki + 1 1 2 3 5 3 5 λ1 = lct(a) = min = min = . , , , , i i ei 4 5 10 5 10 2 The divisor ⌊ 12 F − Kπ ⌋ = (1, 0, 1, 0, 1) is not antinef since it has excess −1 at E2 and E4 . The first unloading step is to consider the divisor ⌊ 12 F − Kπ ⌋ + E2 + E4 = (1, 1, 1, 1, 1). This divisor has excess −1 at E3 and E5 so we need to perform a second unloading step to obtain the antinef closure Dλ1 = (1, 1, 2, 1, 2). • The second Jumping Number is:     7 2+1 3+1 5+2 3+1 5+2 ki + 1 + eλi 1 λ2 = min = min = . , , , , i i ei 4 5 10 5 10 10 7 Then we get ⌊ 10 F −Kπ ⌋ = (1, 1, 3, 1, 3). It has excess −1 at E1 , E2 and E4 and we obtain the divisor (2, 2, 3, 2, 3) after the first unloading step. This divisor has excess −1 at E3 and E5 and, after a second unloading step, we obtain the antinef closure Dλ2 = (2, 2, 4, 2, 4). 7The broken arrows also represent the branches of the strict transform of a curve defined by a generic f ∈ a. MULTIPLIER IDEALS IN TWO-DIMENSIONAL LOCAL RINGS 15 • The third Jumping Number is:     9 2+2 3+2 5+4 3+2 5+4 ki + 1 + eλi 2 = min = . , , , , λ3 = min i i ei 4 5 10 5 10 10 9 Then we get ⌊ 10 F − Kπ ⌋ = (2, 2, 5, 2, 5) that has excess −1 at E3 and E5 . After a single unloading step we get the antinef closure Dλ3 = (2, 3, 5, 3, 5). • The fourth Jumping Number is:     ki + 1 + eλi 3 2+2 3+3 5+5 3+3 5+5 λ4 = min = min = 1. , , , , i i ei 4 5 10 5 10 Then we get ⌊F − Kπ ⌋ = Dλ4 = (3, 3, 6, 3, 6) since this divisor is antinef. • The fifth Jumping Number is:     11 2+3 3+3 5+6 3+3 5+6 ki + 1 + eλi 4 = min = . λ5 = min , , , , i i ei 4 5 10 5 10 10 F − Kπ ⌋ = (3, 3, 7, 3, 7) and, after a single unloading step, we obtain the Then we get ⌊ 11 10 antinef closure Dλ5 = (3, 4, 7, 4, 7). Now we will compute the chain of multiplier ideals of the plane curve defined by f = (x − y 3)(y 2 − x3 ) ∈ C{x, y}. The product of two cusps sharing the origin O is a generic element of the ideal a = (x2 y 2 , x5 , y 5 , xy 4, x4 y) considered above, so J (f λ ) = J (aλ ) for λ < 1. This example will illustrate how the non-exceptional components affect the unloading procedure and, consequently, the list of jumping numbers for λ > 1. 2 Denote the total transform of the curve defined by f simply as F . We represent the relative canonical divisor Kπ and the divisor F in the dual graph as follows: E6 E2 0 E7 E3 E1 E5 Vertex ordering E4 2 0 4 1 Kπ 4 2 1 5 1 10 4 10 5 F The gray dots will represent here the affine components belonging to the strict transform of the curve. The intersection matrix is now   −5 0 1 0 1 0 0  0 −2 1 0 0 0 0     1 −1 0 0 1 0  M = 1 .  0 0 0 −2 1 0 0  1 0 0 1 −1 0 1 16 M. ALBERICH-CARRAMIÑANA, J. ÀLVAREZ MONTANER, AND F. DACHS-CADEFAU The algorithm is performed as follows: • The log-canonical threshold is:     1 2 3 5 3 5 1 1 ki + 1 = min = . , , , , , , λ1 = lct(a) = min i i ei 4 5 10 5 10 1 1 2 We get ⌊ 12 F − Kπ ⌋ = (1, 0, 1, 0, 1, 0, 0) and, as in the previous example, its antinef closure is Dλ1 = (1, 1, 2, 1, 2, 0, 0). • The second Jumping Number is:     ki + 1 + eλi 1 7 2+1 3+1 5+2 3+1 5+2 1 1 λ2 = min = min = . , , , , , , i i ei 4 5 10 5 10 1 1 10 7 Then we get ⌊ 10 F −Kπ ⌋ = (1, 1, 3, 1, 3, 0, 0) and its antinef closure Dλ2 = (2, 2, 4, 2, 4, 0, 0). • The third Jumping Number is:     9 2+2 3+2 5+4 3+2 5+4 1 1 ki + 1 + eλi 2 = min = . , , , , , , λ3 = min i i ei 4 5 10 5 10 1 1 10 9 Then we get ⌊ 10 F −Kπ ⌋ = (2, 2, 5, 2, 5, 0, 0) and its antinef closure Dλ3 = (2, 3, 5, 3, 5, 0, 0). • The fourth Jumping Number is:     2+2 3+3 5+5 3+3 5+5 1 1 ki + 1 + eλi 3 = min = 1. , , , , , , λ4 = min i i ei 4 5 10 5 10 1 1 Then we get ⌊F − Kπ ⌋ = (3, 3, 6, 3, 6, 1, 1) but this divisor is not antinef because of the non-exceptional components. Namely, we have excess −1 at E3 and E5 . To obtain the antinef closure Dλ4 = (4, 5, 10, 5, 10, 1, 1) we need to perform seven unloading steps with the intermediate divisors: · (3, 3, 7, 3, 7, 1, 1) with excess −1 at E2 and E4 . · (3, 4, 7, 4, 7, 1, 1) with excess −1 at E3 and E5 . · (3, 4, 8, 4, 8, 1, 1) with excess −1 at E1 . · (4, 4, 8, 4, 8, 1, 1) with excess −1 at E3 and E5 . · (4, 4, 9, 4, 9, 1, 1) with excess −1 at E2 and E4 . · (4, 5, 9, 5, 9, 1, 1) with excess −1 at E3 and E5 . If we compare with the m-primary ideal a we should notice that the affine components of ⌊F − Kπ ⌋ force us to add more exceptional components when computing its antinef closure and consequently, this will give a different jumping number in the next step. • The fifth Jumping Number is:     ki + 1 + eλi 4 3 2 + 4 3 + 5 5 + 10 3 + 5 5 + 10 2 2 λ5 = min = min = . , , , , , , i i ei 4 5 10 5 10 1 1 2 Then we get ⌊ 23 F −Kπ ⌋ = (5, 5, 11, 5, 11, 1, 1) and its antinef closure Dλ5 = (5, 6, 12, 6, 12, 1, 1). MULTIPLIER IDEALS IN TWO-DIMENSIONAL LOCAL RINGS 17 Consider a normal surface X with a singularity at O. Given a minimal resolution π : X ′ −→X of X, Artin [4] introduced the fundamental cycle as the unique smallest nonzero effective divisor with exceptional support that is antinef. Moreover he proved that the singularity is rational if and only if the arithmetical genus of the fundamental cycle is zero. We have that π is also a minimal log-resolution of the maximal ideal m ⊆ OX,O and the fundamental cycle is the divisor F such that m · OX ′ = OX ′ (−F ). To compute its )·F arithmetical genus we can use the formula pa (F ) = 1 + (Kπ +F (see [3]). 2 This characterization gives us a good source of examples of surfaces with rational singularities. Example 3.10. Consider a surface X with a rational singularity at O whose minimal resolution π : X ′ −→X has six exceptional components E1 , . . . , E6 with the following dual graph and intersection matrix:        E3 E4 E5 E2 E1 E6 −4 1 1 1 1 1 1 −5 0 0 0 0 1 0 −5 0 0 0 1 0 0 −5 0 0 1 0 0 0 −5 0 1 0 0 0 0 −5        The fundamental cycle is the divisor F = (2, 1, 1, 1, 1, 1) and the relative canonical 14 divisor is Kπ = (− 35 , − 14 , − 14 , − 15 , − 14 , − 14 ) so the singularity is not even log-canonical. 15 15 15 15 The multiplier ideals corresponding to λ0 = 0 and λ1 = lct(m) = 94 are given by the antinef divisors Dλ0 = (2, 1, 1, 1, 1, 1) and Dλ1 = (3, 1, 1, 1, 1, 1). Notice that J (mλ0 ) = m and, using the techniques of [1], we get that the codimension between these multiplier ideals is 4. 3.1. Implementation. We have implemented Algorithm 3.8 in the Computer Algebra system Macaulay 2 [12]. The scripts of the source code as well as the output in full detail of some examples are available at the web page www.pagines.ma1.upc.edu/~jalvz/multiplier.html We implemented Tucker’s Algorithm 2.14 as well in order to compare both approaches. Of course, once we have the list of jumping numbers we may use the unloading procedure of Section §2.2 to describe the corresponding multiplier ideals. We have also implemented this extended version of Tucker’s algorithm and it turns out that our method is much faster. 18 M. ALBERICH-CARRAMIÑANA, J. ÀLVAREZ MONTANER, AND F. DACHS-CADEFAU For example, we have tested the case of an m-primary ideal a whose corresponding dual graph has 35 vertices distributed in three branches only sharing the origin and each branch has three rupture divisors. E3 E1 E5 E2 E4 E6 E8 E22 E23 E25 E27 E9 E10 E11 E7 E26 E28 E16 E29 E24 E31 E30 E32 E15 E14 E13 E17 E19 E21 E18 E34 E33 E35 E12 E20 This example has 56986 jumping numbers in the interval (0, 2]. Using the extended version of Tucker’s algorithm it takes 897.298 seconds to compute the whole list of jumping numbers and their corresponding multiplier ideals. Using our method it only takes 372.165 seconds, i.e. it is roughly 9 minutes faster. The main difference between the two algorithms stems in the fact that Tucker needs to find first all the possible critical divisors. We will see in the next section that our algorithm can be understood as a method to find a unique and very precise contributing divisor. The input that we use in both algorithms, i.e. the log-resolution π : X ′ → X of an ideal a ⊆ OX , is encoded using the intersection matrix and the vector of values for the divisor F such that a · OX ′ = OX ′ (−F ). An algorithm to compute this data from a set of generators of the ideal a has been described in [2]. An implementation in Macaulay 2 will be available soon. For principal ideals this can be done using the Singular [13] package alexpoly.lib. 4. Jumping Divisors The theory of critical divisors developed by Tucker [25] focuses on complete ideals very close to a given multiplier ideal. The aim of this section is to understand the whole jump between two consecutive multiplier ideals. To such purpose we introduce the following natural definition: Definition 4.1. Let λ be a jumping numbers of an ideal a ⊆ OX,O . A reduced divisor G 6 F for which λ is a candidate jumping number is called a jumping divisor for λ if J (aλ−ε ) = π∗ OX ′ (⌈Kπ − λF ⌉ + G), for ε small enough. We say that a jumping divisor is minimal if no proper subdivisor is a jumping divisor for λ, i.e. J (aλ−ε ) ! π∗ OX ′ (⌈Kπ − λF ⌉ + G′ ) MULTIPLIER IDEALS IN TWO-DIMENSIONAL LOCAL RINGS 19 for any 0 6 G′ < G. Remark 4.2. Any reduced divisor G 6 F for which λ is a candidate jumping number defines an ideal nested between two consecutive multiplier ideals J (aλ−ε ) ⊇ π∗ OX ′ (⌈Kπ − λF ⌉ + G) ⊇ J (aλ ). Hence, a jumping divisor for λ is a contributing divisor to λ. In particular, a minimal jumping divisor can be understood as the minimal contribution which defines the preceding multiplier ideal. It is a striking fact that the methods used in the previous section, in particular our main result Theorem 3.5, will allow us to construct the unique minimal jumping divisor associated to a jumping number. In fact, we will see in Corollary 4.7 that the only jumping divisors are those reduced divisors D 6 F satisfying Gλ 6 D 6 Hλ , where Gλ and Hλ are defined as follows: P Definition 4.3. Let λ be a jumping number of an ideal a ⊆ OX,O . Let Dλ−ε = eλ−ε Ei i be the antinef closure of ⌊(λ − ε)F − Kπ ⌋ for ε small enough. Then we define: · Maximal jumping divisor: Is the reduced divisor Hλ 6 F supported on those components Ei for which λei − ki ∈ Z>0 . Equivalently Hλ = ⌈Kπ − (λ − ε)F ⌉ − ⌈Kπ − λF ⌉. · Minimal jumping divisor: Is the reduced divisor Gλ 6 F supported on those components Ei for which ki + 1 + eλ−ε i , ei i.e. supported on those divisors where the minimum considered in Theorem 3.5 is achieved. λ= It is clear that Hλ is a jumping divisor and Gλ 6 Hλ . In fact, any reduced divisor G 6 F that contributes to λ satisfies G 6 Hλ . We will prove next that Gλ deserves the given name. Proposition 4.4. Let λ be a jumping number of an ideal a ⊆ OX,O . The reduced divisor Gλ is a jumping divisor. Proof. Since Gλ 6 Hλ , we have ⌊(λ − ε)F − Kπ ⌋ 6 ⌊λF − Kπ ⌋ − Gλ and therefore J (aλ−ε ) ⊇ π∗ OX ′ (⌈Kπ − λF ⌉ + Gλ ). P For the reverse inclusion, let Dλ−ε = eλ−ε Ei be the antinef closure of ⌊(λ−ε)F −Kπ ⌋. i We want to check that ⌊λF − Kπ ⌋ − Gλ 6 Dλ−ε . To this purpose we only need to consider the following cases: · If Ei 6 Gλ then we have λ = ki +1+eλ−ε i . ei In particular ⌊λei − ki ⌋ − 1 = eλ−ε . i 20 M. ALBERICH-CARRAMIÑANA, J. ÀLVAREZ MONTANER, AND F. DACHS-CADEFAU · If Ei 66 Gλ then we have λ < follows. ki +1+eλ−ε i . ei Thus ⌊λei − ki ⌋ < 1 + eλ−ε and the result i  The unicity of the jumping divisor Gλ is a consequence of the following more general statement Theorem 4.5. Let λ be a jumping number of an ideal a ⊆ OX,O . Any contributing divisor G 6 F associated to λ satisfies either: · J (aλ−ε ) = π∗ OX ′ (⌈Kπ − λF ⌉ + G) ! J (aλ ) if and only if Gλ 6 G, or · J (aλ−ε ) ! π∗ OX ′ (⌈Kπ − λF ⌉ + G) ! J (aλ ) otherwise. Proof. Since G 6 Hλ , we have ⌊(λ − ε)F − Kπ ⌋ 6 ⌊λF − Kπ ⌋ − G and therefore J (aλ−ε ) ⊇ π∗ OX ′ (⌈Kπ − λF ⌉ + G). Now assume Gλ 6 G. Then ⌊λF − Kπ ⌋ − G 6 ⌊λF − Kπ ⌋ − Gλ , and using the fact that Gλ is a jumping divisor we obtain the equality J (aλ−ε ) = π∗ OX ′ (⌈Kπ − λF ⌉ + G). If Gλ 66 G we may consider a component Ei 6 Gλ such that Ei 66 G. Notice that we have vi (Dλ−ε ) = eλ−ε = λei − ki − 1 < λei − ki = vi (⌊λF − Kπ ⌋ − G) P λ−ε i where Dλ−ε = ei Ei is the antinef closure of ⌊(λ − ε)F − Kπ ⌋. Therefore, by Proposition 3.3, we get the strict inclusion J (aλ−ε ) ! π∗ OX ′ (⌈Kπ − λF ⌉ + G).  Corollary 4.6. Let λ be a jumping number of an ideal a ⊆ OX,O . Then Gλ is the unique minimal jumping divisor associated to λ. Notice that Theorem 4.5 also describes all the jumping divisors associated to a given jumping number. Namely, we have Corollary 4.7. Let λ be a jumping number of an ideal a ⊆ OX,O . Then, any reduced divisor in the interval Gλ 6 D 6 Hλ is a jumping divisor. It is clear from its definition that maximal jumping divisors are periodic, i.e. Hλ = Hλ+1 for any jumping number λ. On the other hand, critical divisors do not satisfy any periodicity condition. One may find examples where a divisor G is a critical divisor for the jumping number λ but not for λ + 1 and vice versa. For minimal jumping divisors we have: Proposition 4.8. Let λ be a jumping number of an ideal a ⊆ OX,O and Gλ its associated minimal jumping divisor. Then we have: i) If λ 6 1 then Gλ 6 Gλ+1 . ii) If λ > 1 then Gλ = Gλ+1 . MULTIPLIER IDEALS IN TWO-DIMENSIONAL LOCAL RINGS Proof. Assume that there exists a prime divisor Ei 6 Gλ such that Ei a sufficiently small ε > 0 we have ki + 1 + eλ−ε i λ= ei 21 Gλ+1 . Then, for (λ−ε)+1 and ki + 1 + ei λ+1< ei P λ−ε where Dλ−ε = ei Ei denotes the antinef closure of ⌊(λ − ε)F − Kπ ⌋ and equivalently, P (λ−ε)+1 D(λ−ε)+1 = ei Ei is the antinef closure of ⌊((λ − ε) + 1)F − Kπ ⌋. Therefore (λ−ε)+1 ki + 1 + ei ki + 1 + eλ−ε i +1< ei ei (λ−ε)+1 or equivalently eλ−ε + ei < ei i contradiction. . Then we have a · J (aλ−ε ) 6⊆ J (a(λ−ε)+1 ) so we get a (λ−ε)+1 For λ > 1 we have an equality eλ−ε + ei = ei i result follows. because of Skoda’s theorem so the  Let λ′ < λ be two consecutive jumping numbers of an ideal a ⊆ OX,O . It is quite surprising that the minimal jumping divisor Gλ gives such nice approach to the under′ standing of the jump from J (aλ ) to its preceding multiplier ideal J (aλ ). Taking into account that its construction is based on Theorem 3.5, where λ is obtained from the an′ tinef divisor associated to J (aλ ), it would seem more natural to consider the jump in the ′ other direction. It turns out that the jump from J (aλ ) to J (aλ ) does not behave that nicely. Proposition 4.9. Let λ′ < λ be two consecutive jumping numbers of an ideal a ⊆ OX,O and Dλ′ be the antinef closure of ⌊λ′ F − Kπ ⌋. Then we have: ′ i) J (aλ ) ! π∗ OX ′ (−Dλ′ − Gλ ) = J (aλ ). ′ ii) J (aλ ) ! π∗ OX ′ (⌈Kπ − (λ − ε)F ⌉ − Gλ ) = J (aλ ) P λ′ P λ ei Ei , Dλ = Proof. Let Dλ′ = ei Ei be the antinef closures of ⌊λ′ F − Kπ ⌋ and ⌊λF − Kπ ⌋ respectively. i) Since Gλ is a jumping divisor we have ⌊λF −Kπ ⌋−Gλ 6 Dλ′ , and hence ⌊λF −Kπ ⌋ 6 Dλ′ + Gλ . This gives the inclusion π∗ OX ′ (−Dλ′ − Gλ ) ⊆ J (aλ ). In order to check the reverse inclusion π∗ OX ′ (−Dλ′ − Gλ ) ⊇ J (aλ ), it is enough, using Proposition 3.3, to prove vi (Dλ′ + Gλ ) 6 vi (Dλ ) = eλi for any component Ei . We have ′ ′ eλi 6 eλi just because J (aλ ) ! J (aλ ) and the inequality is strict when Ei 6 Gλ , so the result follows. ii) Let D ′ be the antinef closure of ⌊(λ − ε)F − Kπ ⌋ + Gλ . Since Gλ 6 Hλ we have ⌊(λ − ε)F − Kπ ⌋ + Gλ 6 ⌊λF − Kπ ⌋ 6 Dλ so the inclusion π∗ OX ′ (⌈Kπ −(λ−ε)F ⌉−Gλ ) ⊇ J (aλ )Pholds. In order to prove the reverse inclusion we will introduce an auxiliary divisor D = di Ei ∈ Λ defined as follows: 22 M. ALBERICH-CARRAMIÑANA, J. ÀLVAREZ MONTANER, AND F. DACHS-CADEFAU · di = ⌊(λ − ε)ei − ki ⌋ + 1 if Ei 6 Gλ , ′ · di = eλi if Ei 6 Hλ but Ei 66 Gλ , · di = ⌊(λ − ε)ei − ki ⌋ otherwise. Clearly we have ⌊(λ − ε)F − Kπ ⌋ + Gλ 6 D, but we also have ⌊λF − Kπ ⌋ 6 D. Indeed, · For Ei 6 Gλ we have ⌊λei − ki ⌋ = λei − ki = ⌊(λ − ε)ei − ki ⌋ + 1 = di . ′ · If λ is a candidate for Ei but Ei 66 Gλ , ⌊λei − ki ⌋ = λei − ki < 1 + eλi , hence ′ ⌊λei − ki ⌋ 6 eλi = di . · Otherwise ⌊λei − ki ⌋ = ⌊(λ − ε)ei − ki ⌋ = di . e On the other hand D 6 D ′ . Therefore, taking antinef closures, we have D ′ 6 Dλ 6 D. ′ λ′ ′ Namely, vi (D ) > ei at any Ei because ⌊λ F − Kπ ⌋ 6 ⌊(λ − ε)F − Kπ ⌋ + Gλ . Moreover, vi (D ′ ) > ⌊(λ − ε)ei − ki ⌋ + δiGλ by definition of antinef closure. Here, δiGλ = 1 if Ei 6 Gλ e 6 D ′ , which and zero otherwise. Thus vi (D ′ ) > vi (D) as desired. As a consquence D e gives D e = D ′ = Dλ and the result follows.  together with the previous D ′ 6 Dλ 6 D, Remark 4.10. Contrary to the case of Theorem 4.5, Gλ may not be minimal. In fact, we will see in Example 5.8 a divisor G < Gλ satisfying: ′ J (aλ ) = π∗ OX ′ (−Dλ′ ) ! π∗ OX ′ (−Dλ′ − G) = J (aλ ) . Despite the fact that the antinef closure of both ⌊(λ −ε)F −Kπ ⌋ and ⌊λ′ F −Kπ ⌋ is Dλ′ , it is quite remarkable that the above jumping property does not hold taking ⌊λ′ F − Kπ ⌋, i.e. the equality π∗ OX ′ (⌊λ′ F − Kπ ⌋ − Gλ ) = J (aλ ) is not always true. 4.1. Invariance of the minimal jumping divisor with respect to the log-resolution. Multiplier ideals and jumping numbers are known to be independent of the chosen logresolution of the initial ideal a ⊆ OX,O . The aim of this section is to prove that the minimal jumping divisor is generically independent of the log-resolution in a sense that we will make precise below. As a consequence of Proposition 5.6 and Corollary 5.5 in Section §5, critical divisors will also be generically independent of the log-resolution. This is a remarkable fact since, as it was pointed out by Tucker in [25, Remark 3.4], there is no reason to believe that critical divisors (and by extension minimal jumping divisors) are independent of the resolution since they depend on all the divisorial valuations appearing in F . We start fixing some notation that we will use in this section. Let π ′ : X ′ −→X be the minimal log-resolution of an ideal a ⊆ OX,O . Any other log-resolution π : Y −→X factors through π ′ , i.e. there is a birational morphism g : Y −→X ′ such that π = π ′ ◦ g (see [19, Theorem 4.1]). For a given jumping number λ of a we will denote G′λ the minimal jumping divisor of π ′ and E1′ , . . . , Er′ the exceptional components of E ′ = Exc(π ′ ). If Gλ and E1 , . . . , Es are the minimal jumping divisor and the exceptional components of E = Exc(π) for any other log-resolution π, we will enumerate them setting Ei equal to the strict transform by g of MULTIPLIER IDEALS IN TWO-DIMENSIONAL LOCAL RINGS 23 Ei′ forP1 6 i 6 r. If no confusion arise, we will use Pthe same symbol to denote a divisor D = ri=1 di Ei′ on X ′ or its strict transform D = ri=1 di Ei on Y . Theorem 4.11. With the previous notations, Gλ is independent of the log-resolution π if and only if π does not include any blowing-up at points in the intersection of two components of the minimal jumping divisor G′λ of the minimal log-resolution. Actually, from the proof of this result, we can express the minimal jumping divisor of any resolution. To such purpose we need to fix some notation: A reduced divisor with exceptional support D = Ei1 + · · · + Eim 6 E is a chain with ends Ei1 and Eim if aD (Ei1 ) = aD (Eim ) = 1 and aD (Eik ) = 2 for any other 1 < k < m. Given Ej1 , Ej2 6 E, we say that the chain above connects Ej1 and Ej2 if Ej1 ∈ Adj (Ei1 ) and Ej2 ∈ Adj (Eim ). Observe that if Ej1 and Ej2 are adjacent in E, a chain connecting them will be D = 0. Corollary 4.12. Keeping the above notations we have (4.1) Gλ = G′λ + X Dij E ′ +E ′ 6G′ i j λ Ei′ ·Ej′ =1 where Dij is a chain connecting Ei and Ej . Consider generic log-resolutions as those obtained from a minimal one by further blowing-ups at simple (and hence generic) points on the exceptional components. Then, Theorem 4.11 states that generic log-resolutions have the same minimal jumping divisor. This generictiy may be formulated, when X is smooth, in terms of valuations in the valuative tree V of Favre-Jonsson [8]. Consider the dual graphs Γ and Γ′ of E and E ′ respectively, embedded in the valuative tree V as in [8, Chapter 6] and let νi denote the divisorial valuation centered at Ei . Corollary 4.13. The minimal jumping divisor Gλ of π equals the minimal jumping divisor G′λ if and only if Γ has no vertex inside any segment ]νi , νj [ for which Ei′ and Ej′ are adjacent in E ′ and belong to G′λ . Proof of Theorem 4.11. Let λ′ < λ be two consecutive jumping numbers of a. We will argue by induction on the number of blowing-ups needed to reach Y from a minimal resolution. In order to simplify the notation, we will assume throughout this proof that X ′ also dominates a minimal log-resolution and that Y is obtained from X ′ by one blowingup g : Y −→X ′ at a closed point p ∈ X ′ giving the exceptional component Es . Assume that (4.1) holds on X ′ and let us prove it on Y . Notice that, keeping the notation used in this section, we are in the case r + 1 = s. P P Let F ′ = ri=1 ei Ei′ and F = si=1 ei Ei be the divisors in X ′ and Y respectively such ′ ′ (−F ) and aOY = OY (−F ). ′ We also consider the antinef divisors that aO P PXr =λ′OX ′ ′ ′ ′ Dλ′ = i=1 ei Ei and Dλ′ = si=1 eλi Ei for which J (aλ ) = π∗′ OX ′ (−Dλ′ ′ ) = π∗ OY (−Dλ′ ) 24 M. ALBERICH-CARRAMIÑANA, J. ÀLVAREZ MONTANER, AND F. DACHS-CADEFAU sharing the first r coefficients since multiplier ideals are independent of the log-resolution. Moreover, by Theorem 3.5   ′ ′ ki + 1 + eλi ki + 1 + eλi = min , λ = min 16i6s 16i6r ei ei clearly demonstrating that the strict transform of G′λ is contained in Gλ . In particular, ′ ′ λei − ki = 1 + eλi if and only if Ei 6 Gλ and λei − ki < 1 + eλi otherwise. We distinguish two cases: i) The closed point p lies only on one exceptional divisor Ej′ . Then we have es = ej , ′ ′ ks = kj + 1 and eλs = eλj and thus ′ ′ vs (⌊λF − Kπ ⌋) = ⌊λes − ki ⌋ = ⌊λej − kj ⌋ − 1 6 eλj = eλs . Hence Es can not belong to Gλ . ii) The closed point p lies on the intersection of two exceptional divisors Ej′ 1 and Ej′ 2 . ′ ′ ′ Then we have es = ej1 + ej2 , ks = kj1 + kj2 + 1 and eλs = eλj1 + eλj2 so ′ ′ ′ vs (⌊λF − Kπ ⌋) = ⌊λes − ks ⌋ = ⌊λej1 − kj1 + λej2 − kj2 ⌋ − 1 6 eλj1 + eλj2 + 1 = eλs + 1, and equality holds if and only if Ej′ 1 + Ej′ 2 6 Gλ . In particular, Es does not belong to Gλ whenever none or just one of the components Ej′ 1 , Ej′ 2 belong to G′λ .  4.2. Geometric properties of minimal jumping divisors in the dual graph. Assume that a critical divisor G associated to a jumping number λ has exceptional support. One of the key ingredients in Tucker’s algorithm for the computation of jumping numbers is that G satisfies some nice geometric conditions when viewed in the dual graph: G is a connected chain and its ends must be either rupture or dicritical divisors (see Proposition 2.13). Then, it is natural to ask whether jumping divisors satisfy analogous properties. Throughout this section we will also assume that the minimal jumping divisor Gλ has exceptional support. Then, it may have several connected components in the dual graph and these components are not necessarily chains. However, we can still control the ends of each component. To prove the main result of this section (see Theorem 4.17) we need some preliminary results first. Keep the notations of Section §2. Lemma 4.14. Let λ be a jumping number of an ideal a ⊆ OX,O . For any component Ei of the minimal jumping divisor Gλ we have X (⌈Kπ − λF ⌉ + Gλ ) · Ei = −2 + λρi + {λej − kj } + aGλ (Ei ) . Ej ∈Adj(Ei ) Proof. For any Ei 6 Gλ we have (⌈Kπ − λF ⌉ + Gλ ) · Ei = ((Kπ − λF ) + {−Kπ + λF } + Gλ − Ei + Ei ) · Ei = = (Kπ + Ei ) · Ei − λF · Ei + {λF − Kπ } · Ei + (Gλ − Ei ) · Ei . MULTIPLIER IDEALS IN TWO-DIMENSIONAL LOCAL RINGS 25 Let us now compute each summand separately. Firstly, the adjunction formula gives (Kπ + Ei ) · Ei = −2 because Ei ∼ = P1 . As for the second and fourth terms, the equality −λF · Ei = λρi follows from the definition of the excesses, and clearly aGλ (Ei ) = (Gλ − Ei ) · Ei because Ei 6 Gλ . Therefore it only remains to prove that X (4.2) {λF − Kπ } · Ei = {λej − kj } , Ej ∈Adj(Ei ) which is also quite immediate. Indeed, writing {λF − Kπ } = r X {λej − kj } Ej , j=1 equality (4.2) follows by observing that (for j 6= i), Ej ·Ei = 1 if and only if Ej ∈ Adj (Ei ), and the term corresponding to j = i vanishes because we have λei − ki ∈ Z.  Remark 4.15. It is important to notice that (⌈Kπ − λF ⌉ + Gλ ) · Ei ∈ Z, that is −2 + P Ej ∈Adj(Ei ) {λej − kj } + λρi + aGλ (Ei ) ∈ Z. The following result is an analogue of the numerical conditions that critical divisors satisfy (see Proposition 4.19). Unfortunately it does not provide a characterization of minimal jumping divisors. Proposition 4.16. Let λ be a jumping number of an ideal a ⊆ OX,O . For any component Ei 6 Gλ of the minimal jumping divisor Gλ we have (⌈Kπ − λF ⌉ + Gλ ) · Ei > 0. Proof. Let Gλ be the minimal jumping divisor. Given a prime divisor Ei 6 Gλ we consider the short exact sequence 0 −→ OX ′ (⌈Kπ − λF ⌉ + Gλ − Ei ) −→ OX ′ (⌈Kπ − λF ⌉ + Gλ ) −→ −→ OEi (⌈Kπ − λF ⌉ + Gλ ) −→ 0 Pushing it forward to X we get 0 −→ π∗ OX ′ (⌈Kπ − λF ⌉ + Gλ − Ei ) −→ π∗ OX ′ (⌈Kπ − λF ⌉ + Gλ ) −→ −→ H 0 (Ei , OEi (⌈Kπ − λF ⌉ + Gλ )) ⊗ CO , where CO denotes the skyscraper sheaf supported at O with fibre C. The minimality of Gλ (see Theorem 4.5) implies that π∗ OX ′ (⌈Kπ − λF ⌉ + Gλ − Ei ) 6= π∗ OX ′ (⌈Kπ − λF ⌉ + Gλ ) . Thus H 0 (Ei , OEi (⌈Kπ − λF ⌉ + Gλ )) 6= 0, or equivalently (⌈Kπ − λF ⌉ + Gλ )·Ei > 0.  With the above ingredients we can provide the following geometric property of minimal jumping divisors when viewed in the dual graph. 26 M. ALBERICH-CARRAMIÑANA, J. ÀLVAREZ MONTANER, AND F. DACHS-CADEFAU Theorem 4.17. Let Gλ be the minimal jumping divisor associated to a jumping number λ of an ideal a ⊆ OX,O . Then the ends of a connected component of Gλ must be either rupture or dicritical divisors. Proof. Assume that an end Ei of a connected component of Gλ is neither a rupture nor a dicritical divisor. It means that Ei has no excess, i.e. ρi = 0, and that it has one or two adjacent divisors, say Ej and El , in the dual graph but at most one of them belongs to Gλ . For the case that Ei has two adjacent divisors Ej and El the formula given in lemma 4.14 reduces to (⌈Kπ − λF ⌉ + Gλ ) · Ei = −2 + {λej − kj } + {λel − kl } + λρi + aGλ (Ei ). Then: · If Ei has valence one in Gλ , e.g. El 66 Gλ then (⌈Kπ − λF ⌉ + Gλ ) · Ei = −2 + {λel − kl } + 1 < 0. · If Ei is an isolated component of Gλ , i.e., Ej , El 66 Gλ then (⌈Kπ − λF ⌉ + Gλ ) · Ei = −2 + {λej − kj } + {λel − kl } < 0. If Ei has just one adjacent divisor Ej , i.e. Ei is an end of the dual graph, the formula reduces to (⌈Kπ − λF ⌉ + Gλ ) · Ei = −2 + {λej − kj } + λρi + aGλ (Ei ). Then: · If Ei has valence one in Gλ then (⌈Kπ − λF ⌉ + Gλ ) · Ei = −2 + 1 < 0 · If Ei is an isolated component of Gλ then (⌈Kπ − λF ⌉ + Gλ ) · Ei = −2 + {λej − kj } < 0. In any case we get a contradiction with Proposition 4.16.  Remark 4.18. It follows from [26, Theorem 3.3] that the minimal jumping divisor associated to the log-canonical threshold is connected in the case that X is smooth. As a consequence we may also give the following refinement of Proposition 4.16. Proposition 4.19. Let λ be a jumping number of an m-primary ideal a ⊆ OX,O . If Ei 6 Gλ is neither a rupture nor a dicritical component of the minimal jumping divisor Gλ we have (⌈Kπ − λF ⌉ + Gλ ) · Ei = 0. Proof. Assume that Ei 6 Gλ is neither a rupture or a dicritical component. In particular, it is not the end of a connected component of Gλ . Thus, Ei has exactly two adjacent components Ej and El in Gλ , and its excess is ρi = 0. The formula given in Lemma 4.14 reduces to (⌈Kπ − λF ⌉ + Gλ ) · Ei = −2 + λρi + {λej − kj } + {λel − kl } + aGλ (Ei ) . Notice that aGλ (Ei ) = 2, and also {λej − kj } = {λel − kl } = 0 because Ej and El are components of Gλ , so finally (⌈Kπ − λF ⌉ + Gλ ) · Ei = 0.  MULTIPLIER IDEALS IN TWO-DIMENSIONAL LOCAL RINGS 27 5. Minimal contributing divisors The theory of minimal jumping divisors introduced in Section §4 can be included in a more general framework that we will describe in this section. To such purpose we will give our own perspective of the work of Hyry-Järviletho [14] and its relation with the theory of contributing divisors of Tucker [25]. Let λ be a jumping number of an ideal a ⊆ OX,O . Recall that a reduced divisor G 6 F that contributes to λ defines an ideal nested between two consecutive multiplier ideals J (aλ−ε ) ⊇ π∗ OX ′ (⌈Kπ − λF ⌉ + G) ! J (aλ ). We may interpret that λ is parametrized by the set of nested ideals defined by contributions but this is far from being a one-to-one correspondence. An easy way to detect such a nested ideal is finding a suitable critical divisor using Tucker’s algorithm. The approach given in the previous sections is more economical in the sense that each jumping number is parametrized by its unique minimal jumping divisor Gλ or equivalently, its preceding multiplier ideal. Hyry-Järviletho [14] give a similar approach where jumping numbers are parametrized by general antinef divisors8, or equivalently complete ideals not necessarily nested in the chain of multiplier ideals. We should point out that their results also hold for the case that X has rational singularities since are based on divisorial considerations. P their arguments ′ Given any antinef divisor D = di Ei ∈ Div(X ), they considered the following notions: · Jumping number corresponding to D:   ki + 1 + d i . λD := min i ei · Support of a jumping number corresponding to D:   ki + 1 + d i . SD := i | λD = ei · Contributing divisor associated to D: GD := X Ei . i∈SD Hyry-Järviletho proved in [14, Proposition 1] that all jumping numbers of a can be obtained in this way: as λD for a suitable antinef divisor D ∈ Div(X ′ ) (or equivalently a complete ideal ID ). Moreover, they give in [14, Theorem 1] a combinatorial criterion that detects the existence of such antinef divisors. The simplest parametrizations they used to describe the set of jumping numbers are given by antinef divisors corresponding to critical divisors (see [14, Theorem 2]). 8Hyry-Järviletho only consider the case of m-primary ideals on smooth surfaces and consequently antinef divisors with exceptional support but their ideas also hold in general 28 M. ALBERICH-CARRAMIÑANA, J. ÀLVAREZ MONTANER, AND F. DACHS-CADEFAU In general, the complete ideal ID associated to an antinef divisor D ∈ Div(X ′ ) satisfies J (aλD −ε ) ⊇ ID but does not necessarily contain J (aλD ). However, if ID is nested in between two consecutive multiplier ideals J (aλ−ε ) ⊇ ID ! J (aλ ) then it must satisfy λ = λD . Remark 5.1. One can also interpret this framework through the generalized version of logcanonical thresholds already introduced by Järviletho in [15]. Namely, the log-canonical threshold with respect to any other ideal b ⊆ OX,O is defined as follows: lctb (a) := inf{c ∈ Q>0 | J (ac ) 6⊃ b} Notice that whenever ID is the complete ideal associated to an antinef divisor D ∈ Div(X ′ ), then λD = lctID (a). Hyry-Järviletho [14, Lemma 11] proved that if D ∈ Div(X ′ ) is an antinef divisor then GD is a contributing divisor for λD . In fact, the contributing divisors obtained in this way satisfy some nice properties as we will see next. Proposition 5.2. Let G be a contributing divisor associated to a jumping number λ. Let D be the antinef closure of ⌊λF − Kπ ⌋ − G. Then GD 6 G. P Proof. Let D = di Ei be the antinef closure of ⌊λF − Kπ ⌋ − G. Since ID is a nested ideal in the chain of multiplier ideals, then we have   ki + 1 + d i λ = λD = min . i ei Hence λei − ki 6 1 + di and equality holds if and only if i ∈ SD . In order to prove GD 6 G we will show that Ei 66 G implies Ei 66 GD . Indeed, if Ei 66 G and Ei 6 GD then ⌊λei − ki ⌋ 6 di (just because ⌊λF − Kπ ⌋ − G 6 D by Lemma 2.3) and λei − ki − 1 = di so we get a contradiction.  Proposition 5.3. Let λ = λD′ be a jumping number associated to an antinef divisor D ′ ∈ Div(X ′ ). Let D be the antinef closure of ⌊λF − Kπ ⌋ − GD′ . Then we have D 6 D ′ , λD = λD′ , SD = SD′ and GD = GD′ . Proof. Using the definition of antinef closure (see Lemma 2.3), order to get D 6 D ′ we P in ′ ′ ′ only need to prove that ⌊λF − Kπ ⌋ − GD′ 6 D . Set D = di Ei . By hypothesis   ki + 1 + d′i λ = λD′ = min i ei therefore we have ⌊λei − ki ⌋ 6 d′i if i 6∈ SD′ , whereas ⌊λei − ki ⌋ − 1 = d′i if i ∈ SD′ as desired. Notice then that we have J (aλ−ε ) ⊇ ID ⊇ ID′ so, given the fact that ID′ 6⊆ J (aλ ), we get λD = λ. Now, the inclusion of divisors D 6 D ′ having the same minimum λD = λD′ , gives the inclusion of supports SD ⊇ SD′ and equivalently GD > GD′ . On the other hand, MULTIPLIER IDEALS IN TWO-DIMENSIONAL LOCAL RINGS 29 taking G = GD′ in Proposition 5.2, we get the reverse inequality of divisors GD 6 GD′ so we are done.  The main result of this section is that we can find a minimal contributing divisor among all contributing divisors defining the same nested ideal. Theorem 5.4. Let G be a contributing divisor associated to a jumping number λ. Let D be the antinef closure of ⌊λF − Kπ ⌋ − G, which gives a nested ideal J (aλ−ε ) ⊇ ID = π∗ OX ′ (⌈Kπ − λF ⌉ + G) ! J (aλ ). Then we also have ID = π∗ OX ′ (⌈Kπ − λF ⌉ + GD ). Furthermore, GD is the minimal contributing divisor associated to λ that defines the same ideal ID , that is: · Any contribution G′ to λ defining ID = π∗ OX ′ (⌈Kπ − λF ⌉ + G′ ) must satisfy GD 6 G′ . · Any proper subdivisor G′ < GD defines an strictly included ideal ID ! π∗ OX ′ (⌈Kπ − λF ⌉ + G′ ) . Proof. Let D ′ be the antinef closure of ⌊λF − Kπ ⌋ − GD . We will see first that D = D ′ thus giving the desired equality of ideals ID = π∗ OX ′ (⌈Kπ − λF ⌉ + G) = π∗ OX ′ (⌈Kπ − λF ⌉ + GD ) = ID′ . In virtue of Proposition 5.2, we have GD 6 G so ⌊λF − Kπ ⌋ − G 6 ⌊λF − Kπ ⌋ − GD and D 6 D ′ . The reverse inequality D > D ′ is a consequence of Proposition 5.3. To show that GD is the minimal contributor to the jumping number λ that defines the same ideal ID we will prove the following equivalent result: Claim: Any contributor G′ to λ for which ID ⊇ π∗ OX ′ (⌈Kπ − λF ⌉ + G′ ) also satisfies the reverse inclusion ID ⊆ π∗ OX ′ (⌈Kπ − λF ⌉ + G′ ) if and only if GD 6 G′ . Proof of Claim: Suppose first that GD 6 G′ . Then ⌊λF − Kπ ⌋ − G′ 6 ⌊λF − Kπ ⌋ − GD and hence D ′′ 6 D ′ = D, where D ′′ is the antinef closure of ⌊λF − Kπ ⌋ − G′ . Therefore ID ⊆ ID′′ as wanted. Assume now that GD 66 G′ and pick a component Ei 6 GD such that Ei 66 G′ . By hypothesis ID ⊇ ID′′ and equivalently D 6 D ′′ but in fact D < D ′′ since vi (D) = λei − ki − 1 < λei − ki = vi (⌊λF − Kπ ⌋ − G′ ) 6 vi (D ′′ ). The result follows then from Proposition 3.3.  It turns out that critical divisors are also minimal in the above sense as we can see in the following generalization of [14, Proposition 3]. Corollary 5.5. Let G be a contributing divisor associated to a jumping number λ. Let D be the antinef closure of ⌊λF − Kπ ⌋ − G. Then G is a critical divisor if and only if GD = G and ID and J (aλ ) do not admit strictly nested ideals between them defined by contributors to λ. 30 M. ALBERICH-CARRAMIÑANA, J. ÀLVAREZ MONTANER, AND F. DACHS-CADEFAU Proof. Assume first that GD = G. Then, by Theorem 5.4, any proper subdivisor 0 6 G′ < G defines an ideal strictly included in ID ! π∗ OX ′ (⌈Kπ − λF ⌉ + G′ ) ⊇ J (aλ ). Since ID and J (aλ ) do not admit strictly nested ideals between them coming from contributors, we get π∗ OX ′ (⌈Kπ − λF ⌉ + G′ ) = J (aλ ) so G is a critical divisor. Assume now that G is a critical divisor. By Proposition 5.2 we have GD 6 G. Both divisors define the same ideal by Theorem 5.4 so they must be equal otherwise we would have a contradiction with the fact that G is a critical divisor. Finally we will see that there is no contributing divisor G′ associated to λ defining a strictly nested ideal ID ! π∗ OX ′ (⌈Kπ − λF ⌉ + G′ ) ! J (aλ ). Assume that such G′ exists and let D ′ be the antinef closure of ⌊λF − Kπ ⌋ − G′ . Then the inclusion of divisors D < D ′ having the same minimum λD = λD′ = λ implies SD′ ⊆ SD and GD′ 6 GD . Since G = GD is minimal, applying Theorem 5.4, we must have G = GD = GD′ 6 G′ contradicting the starting hypothesis of inclusion of ideals.  The minimal jumping divisor introduced in Section §4 fits nicely in this theory. Given a jumping number λ of an m-primary ideal a ⊆ OX,O , let Dλ−ε be the antinef closure of ⌊(λ − ε)F − Kπ ⌋ for ε > 0 small enough. Then we have λ = λDλ−ε and the unique minimal jumping divisor is Gλ = GDλ−ε . In general, a divisor G ∈ Λ that contributes to the jumping number λ might not be contained in Gλ . For minimal contributing divisors we have the following: Proposition 5.6. Let λ be a jumping number of an ideal a ⊆ OX,O and Gλ be its associated minimal jumping divisor. Then GD 6 Gλ for any antinef divisor D ∈ Div(X ′ ) such that λ = λD . Proof. Let D ′ be the antinef closure of ⌊λF −Kπ ⌋−GD . By Proposition 5.3 we have GD = GD′ and λ = λD = λD′ . Since the ideals J (aλ−ε ) ⊇ ID′ are nested, their corresponding antinef divisors satisfy Dλ−ε 6 D ′ and they reach the same minimum λDλ−ε = λD′ = λ.  Hence, SD′ ⊆ SDλ−ε which implies GD = GD′ 6 Gλ as we wanted. Corollary 5.7. Let λ be a jumping number of an ideal a ⊆ OX,O . Then we have G 6 Gλ for any critical divisor G associated to λ. The reduced sum of all critical divisors equals the jumping divisor Gλ for simple complete ideals (see [10, Thm. 2.3] for the smooth case). However this is no longer true in general. Example 5.8. Let X be a smooth surface and consider the m-primary ideal a ⊆ OX,O whose dual graph is E3 E4 E2 E1 E6 Vertex ordering E5 3 6 2 1 Kπ 4 2 14 28 12 8 F 20 10 MULTIPLIER IDEALS IN TWO-DIMENSIONAL LOCAL RINGS 31 The multiplier ideals corresponding to the consecutive jumping numbers 7 14 6 4 10 5 8 15 7 5 11 5 7 < 3 4 are: 6 3 4 5 7 ⊇ J (a ) J (a ) The minimal jumping divisor corresponding to λ = 43 is G 3 = E1 + E2 + E4 + E6 but 4 the only critical divisors are E4 and E6 . In particular 5 3 J (a 7 ) ! π∗ OX ′ (⌈Kπ − F ⌉ + E4 + E6 ). 4 It is worth pointing out that 3 π∗ OX ′ (−D 5 − E4 − E6 ) = π∗ OX ′ (−D 5 − G 3 ) = J (a 4 ) 7 7 4 where D 5 is the antinef closure of ⌊ 57 F − Kπ ⌋. So minimality is not always achieved for 7 the divisor Gλ in Proposition 4.9. In general, not every nested ideal between two consecutive multiplier ideals is given by a contributing divisor. The following result identifies them precisely. Proposition 5.9. Any nested ideal J (aλ−ε ) ⊇ ID′ ! J (aλ ) comes from a contributing divisor G associated to λ, i.e. ID′ = π∗ OX ′ (⌈Kπ − λF ⌉ + G), if and only if D ′ = D where D is the antinef closure of ⌊λF − Kπ ⌋ − G and in this case G = GD′ . Proof. Let D ′ be the antinef closure of ⌊λF − Kπ ⌋ − G. By Proposition 5.3 we have D 6 D ′ . On the other hand, Proposition 5.2 implies GD′ 6 G which gives ⌊λF − Kπ ⌋ − G 6 ⌊λF − Kπ ⌋ − GD′ and hence D ′ 6 D so we get the desired result. The reverse implication is straightforward.  Proposition 5.10. Let ID be the ideal associated to an antinef divisor D ∈ Λ. Then, ID is a multiplier ideal for the ideal a ⊆ OX,O if and only if D is contained in the antinef closure of ⌊(λD −ε)F −Kπ ⌋. If this is the case, D is also the antinef closure of ⌊λD F −Kπ ⌋−GD . Proof. By definition, we have ⌊(λD − ε)F − Kπ ⌋ 6 D because J (aλD −ε ) ⊇ ID . We also have ID 6⊆ J (aλD ) so the only possibility for ID of being a multiplier ideal is when J (aλD −ε ) = ID so, applying Lemma 3.1, D must be contained in the antinef closure of⌊(λD − ε)F − Kπ ⌋. The rest of the statement follows from Theorem 5.4.  References [1] M. Alberich-Carramiñana, J.Àlvarez Montaner, F. Dachs-Cadefau and V. González-Alonso, Poincaré series of multiplier ideals in two-dimensional local rings with rational singularities, preprint available at arXiv:1412.3607. 17 [2] M. Alberich-Carramiñana, J.Àlvarez Montaner and G. Blanco, Effective computation of base points of two-dimensional ideals, preprint. 18 32 M. ALBERICH-CARRAMIÑANA, J. ÀLVAREZ MONTANER, AND F. DACHS-CADEFAU [3] M. Artin, Some numerical criteria for contractability of curves on algebraic surfaces, Amer. J. Math. 84 (1962), 485–496. 17 [4] M. Artin, On isolated rational singularities of surfaces, Amer. J. Math. 88 (1966), 129–136. 3, 17 [5] E. Casas-Alvero, Singularities of plane curves, London Math. Soc. Lecture Note Series, 276, Cambridge University Press, Cambridge, 2000. 2, 7 [6] L. Ein, R. Lazarsfeld, K. Smith and D. Varolin, Jumping coefficients of multiplier ideals, Duke Math. J. 123 (2004), 469–506. 9 [7] F. Enriques and O. Chisini, Lezioni sulla teoria geometrica delle equazioni e delle funzioni algebriche, N. Zanichelli, Bologna, (1915). 7 [8] C. Favre and M. Jonsson, The valuative tree, Lect. Notes Math.,1853 (2004). Springer-Verlag, Berlin, xiv+234 pp. 1, 23 [9] C. Favre and M. Jonsson, Valuations and multiplier ideals, J. Amer. Math. Soc. 18 (2005), 655–684. 1 [10] C. Galindo and F. Monserrat, The Poincaré series of multiplier ideals of a simple complete ideal in a local ring of a smooth surface, Adv. Math. 225 (2010), 1046–1068. 30 [11] C. Galindo, F. Hernando and F. Monserrat, The log-canonical threshold of a plane curve, Preprint available at arXiv:1211.6274. 2 [12] D. Grayson and M. Stillman, Macaulay 2. Available at: http://www.math.uiuc.edu/Macaulay2. 17 [13] G.-M. Greuel, G. Pfister, and H. Schönemann, Singular 2.0.5 A Computer Algebra System for Polynomial Computations. Centre for Computer Algebra, University of Kaiserslautern (2003). http://www.singular.uni-kl.de. 18 [14] E. Hyry and T. Järviletho, Jumping numbers and ordered tree structures on the dual graph, Manuscripta Math. 136 (2011), 411–437. 2, 3, 27, 28, 29 [15] T. Järviletho, Jumping numbers of a simple complete ideal in a two-dimensional regular local ring, Mem. Amer. Math. Soc. 214 (2011), no. 1009, viii+78 pp. 2, 28 [16] T. Kuwata, On log canonical thresholds of reducible plane curves, Amer. J. Math. 121 (1999), 701–721. 2 [17] H. Laufer, On rational singularities, Amer. J. Math. 94 (1972), 597–608. 7 [18] R. Lazarsfeld, Positivity in algebraic geometry II, volume 49, (2004), Springer-Verlag, xviii+385. 8 [19] J. Lipman, Rational singularities, with applications to algebraic surfaces and unique factorization, Inst. Hautes tudes Sci. Publ. Math. 36 (1969) 195–279. 2, 3, 6, 22 [20] J. Lipman and K. I. Watanabe, Integrally closed ideals in two-dimensional regular local rings are multiplier ideals, Math. Res. Lett. 10 (2003) 423–434. 1, 4, 6, 7 [21] D. Naie, Jumping numbers of a unibranch curve on a smooth surface, Manuscripta Math. 128 (2009), 33–49. 2 [22] A. J. Reguera, Curves and proximity on rational surface singularities, J. Pure Appl. Algebra 122 (1997) 107–126. 2, 3, 7 [23] K. E. Smith and H. Thompson, Irrelevant exceptional divisors for curves on a smooth surface. in: Algebra, geometry and their interactions, Contemp. Math. 448 (2007), 245–254. 2, 9 [24] K. Tucker, Integrally closed ideals on log terminal surfaces are multiplier ideals, Math. Res. Lett. 16 (2009), 903–908. 1, 6, 8 [25] K. Tucker, Jumping numbers on algebraic surfaces with rational singularities, Trans. Amer. Math. Soc. 362 (2010), 3223–3241. 2, 3, 8, 9, 10, 18, 22, 27 [26] W. Veys, Determination of the poles of the topological zeta function for curves, Manuscripta Math. 87 (1995), 435–448. 26 Departament de Matemàtiques, Universitat Politècnica de Catalunya, Av. Diagonal 647, Barcelona 08028, Spain E-mail address: [email protected], [email protected] MULTIPLIER IDEALS IN TWO-DIMENSIONAL LOCAL RINGS 33 KU Leuven, Department of Mathematics, Celestijnenlaan 200B box 2400, BE-3001 Leuven, Belgium E-mail address: [email protected]
0math.AC
arXiv:1801.04757v1 [cs.IT] 15 Jan 2018 On the Distribution of Random Geometric Graphs Mihai-Alin Badiu Justin P. Coon Department of Electronic Systems Aalborg University Fredrik Bajers Vej 7, 9220 Aalborg Øst, Denmark Email: [email protected] Department of Engineering Science University of Oxford Parks Road, Oxford OX1 3PJ, UK Email: [email protected] Abstract—Random geometric graphs (RGGs) are commonly used to model networked systems that depend on the underlying spatial embedding. We concern ourselves with the probability distribution of an RGG, which is crucial for studying its random topology, properties (e.g., connectedness), or Shannon entropy as a measure of the graph’s topological uncertainty (or information content). Moreover, the distribution is also relevant for determining average network performance or designing protocols. However, a major impediment in deducing the graph distribution is that it requires the joint probability distribution of the n(n − 1)/2 distances between n nodes randomly distributed in a bounded domain. As no such result exists in the literature, we make progress by obtaining the joint distribution of the distances between three nodes confined in a disk in R2 . This enables the calculation of the probability distribution and entropy of a threenode graph. For arbitrary n, we derive a series of upper bounds on the graph entropy; in particular, the bound involving the entropy of a three-node graph is tighter than the existing bound which assumes distances are independent. Finally, we provide numerical results on graph connectedness and the tightness of the derived entropy bounds. I. I NTRODUCTION Uncertainty is pervasive in modern wireless networks. The sources of this uncertainty range from the humans that interact with the networks and the locations of the nodes in space down to the transmission protocols and the underlying scattering processes that affect signal propagation. To date, some progress has been made towards characterizing the structural uncertainty of wireless networks by modeling these networks as random geometric graphs (RGGs) where the probability that two particular nodes are connected is a function of the distance between them [1]–[3]. RGGs with probabilistic pair connection functions are known in the mathematics community as soft RGGs [4]. Work on these graphs has mostly been focused on analyzing their percolation (in an infinite domain) or connectivity (in a finite domain) properties [5]– [7]. In the case of finite (but dense) graphs, this sort of investigation typically amounts to obtaining an understanding of the probability that a single isolated node exists. Ideally, one would like to obtain information about the complete distribution of the graphs in the ensemble. This information would enable us to study not only connectivity, but also important features such as topological structure and complexity through the lens of graph entropy [8]. Applications of entropy-based methods to the study of networked systems are abundant and include problems related to molecular struc- ture classification [9], social networks [10], [11], data compression [12], and quantum entanglement [13], [14]. Graph entropy has also been invoked in the study of communication networks to quantify node and route stability [15] with the aim of improving link prediction [16] and routing protocols [17], [18]. Topological uncertainty in dynamic mobile ad hoc networks was investigated in [19] from a network layer perspective, and [20] treated self-organisation in networks using a basic graph entropy framework. More recently, an analytical approach for studying topological uncertainty in wireless networks was proposed in [21]–[23]. In this paper, we study the probability distribution of the RGG formed by n nodes randomly distributed in a bounded domain. The joint distribution of all n(n − 1)/2 inter-node distances is greatly relevant for the distribution of the RGG. Finding distance distributions is a very challenging task in probabilistic geometry, as it often leads to intractable definite integrals; existing literature focuses on the distance between two nodes or the distances between a node and its neighbours (e.g., see [24]–[27]). We derive the joint distribution of the inter-node distances in closed-form, for n = 3 nodes confined in a disk in R2 ; to our knowledge, this is the first time such a result is obtained. We avoid intractable integrations by using a conditioning technique and expect that the same approach could be used for larger n. Also, for arbitrary n, we derive a series of upper bounds on the graph entropy; in particular, the bound involving the entropy of a three-node graph is tighter than the existing bound which assumes distances are independent. Finally, we provide numerical results on graph connectedness and the tightness of the derived entropy bounds. II. R ANDOM G EOMETRIC G RAPH A. Model Consider a set Vn = {1, . . . , n} of n nodes that are randomly located in a space K ⊂ Rd of finite volume and diameter D := supu,v∈K ku−vk. We assume that the locations {Zi }i∈Vn of the nodes are independently and uniformly distributed in K. The existence of an (undirected) edge between nodes i and j depends on the Euclidean distance between the two nodes and is indicated by the binary random variable Xij being one. Specifically, given the node locations, the variables {Xij } are independent and each edge (i, j) exists with probability P (Xij = 1|zi , zj ) = p(kzi − zj k), (1) where p : [0, ∞) → [0, 1] is the pair connection function. For example, in the hard disk model, p(·) is an indicator function that equals one when its argument is less than r0 and zero otherwise, where r0 denotes the maximum connection range. We define the binary vector Xn to include all edge variables, i.e., Xn = (Xij )i<j . The random geometric graph Gn := G(Vn , En ) with edge set En = {(i, j) | Xij = 1} is distributed in the set of all n(n − 1)/2 possible graphs. B. Probability Distribution and Entropy The distribution of Gn is determined by both the distribution of locations {Zi }i∈Vn and the probabilistic connection model specified by p(·). The graph Gn is uniquely determined by Xn , which has a multivariate Bernoulli distribution. Therefore, we study the pmf fXn (xn ) := P (Xn = xn ), for each xn ∈ {0, 1}n(n−1)/2. Since the conditional probability of edge existence depends on distance, it is more convenient to work with inter-node distances instead of node locations. Let Rn := (Rij )i<j denote the random vector collecting the pair distances Rij := kZi − Zj k, and let fRn : [0, D]n(n−1)/2 → [0, ∞) be its pdf. We now write fXn (xn ) Z n Y 1−x pxij (rij ) [1 − p(rij )] ij drij . (2) fRn (rn ) = R i,j=1 i<j where the integration domain is R = [0, D]n(n−1)/2 . The distribution of Xn is symmetric, since the node locations are identically distributed and the pair connection function is the same for all edges. The topological uncertainty (or information content) of Gn can be quantified by the Shannon entropy, i.e., H(Gn ) = H(Xn ) =− X fXn (xn ) log fXn (xn ). (3) xn ∈{0,1}n(n−1)/2 It is clear from (2) that the joint pdf fRn of inter-node distances is highly important for the graph distribution and its entropy. For n = 2, the sought pdf reduces to the pdf of the distance between two nodes, which has been extensively studied for various shapes of the embedding space K (e.g., see [24]–[27]). Obtaining the joint pdf analytically for n > 2 is very challenging and no such results have been reported previously. In the next section, we make progress by obtaining the joint pdf for n = 3 in closed-form by using a conditioning technique. This enables the calculation of the pmf (2) and entropy (3) for n = 3, which then can be used to bound the graph entropy when n > 3, as shown in Sec. IV. III. J OINT PDF OF I NTER -N ODE D ISTANCES FOR n=3 We consider n = 3 and K is a disk of diameter D in R2 . Even though the locations of the three nodes are independently and uniformly distributed, determining the joint pdf of the three distances by direct integration is very difficult. For example, one could attempt to transform the Cartesian coordinates (i.e., six variables) to other coordinates that include the three distances, apply the transformation theorem and integrate out the redundant coordinates. However, this leads to complicated definite integrals, because triangle inequalities and the condition that the points have to be inside the circle need to be ensured. Computing integrals over complicated regions is often required in probabilistic geometry. Crofton’s technique [28] has proven to simplify such evaluations in many problems, such as finding the distribution of the distance between two random points [29]. The work [30] shows that Crofton’s method is essentially equivalent to the technique of computing expectations by conditioning. We use the latter in the following. Our approach is to compute the joint pdf conditioned on an additional (suitably chosen) random variable, which is easier than the original problem. Then, we obtain the desired joint pdf by taking the expectation of the conditional pdf over the density of the additional variable. We expect that this approach is also useful for n > 3. Before presenting the result, we fix some notation. For a triangle with side lengths r12 , r13 and r23 , let d be the diameter of its circumscribed circle, i.e., 2r12 r13 r23 , (4) d= p Q(r12 , r13 , r23 ) 2 2 2 2 2 2 4 where Q(r12 , r13 , r23 ) = 2r12 r13 + 2r12 r23 + 2r13 r23 − r12 − 4 4 r13 − r23 ; note that Q(r12 , r13 , r23 ) > 0 is equivalent to r12 , r13 , r23 satisfying the triangle inequalities. We denote the largest side length by r̄ = max(r12 , r13 , r23 ). Let us also define the function ϕ : [0, 1] → R, ϕ(x) = arccos(x) − √ x 1 − x2 . Proposition 1: Assume three points are independently and uniformly distributed inside a circle of diameter D and let R12 , R13 and R23 be the side lengths of the random triangle determined by the points. Then, for all r12 , r13 , r23 ∈ R+ such that Q(r12 , r13 , r23 ) > 0 and r̄ ≤ D, the joint pdf of the side lengths is given by eq. (5) at the top of the next page. The pdf depends on whether the realized triangle is obtuse or acute, and whether the diameter (4) of its circumscribed circle is larger or smaller than D. Proof: An outline of the proof is given in the appendix. IV. B OUNDING G RAPH E NTROPY  In [21], [22], the upper-bound H(Gn ) ≤ n2 H(G2 ) is obtained for any n ≥ 2 by assuming that {Xij } are independent (or, equivalently, that the pair distances {Rij } are independent). While such an upper bound is simple and amenable to further analysis, its tightness might not always be sufficient. We set out to find tighter upper bounds by trying THE nP h  64d  2 4  i<j ϕ π D n  h   64d P i<j ϕ fR3 (r12 , r13 , r23 ) = π2 D4   r̄ 128d   π2 D4 ϕ D ,   0, rij  D rij  D − − d2 D2 ϕ 2 d D2 ϕ i rij  d i rij  d − − π 2 π 2  1−  1− to preserve the dependency between pair distances. First, we establish the following result. Proposition 2: For any m, n ∈ Z such that n > m ≥ 2, the entropies of Gn and Gm are related by S∈S where XS := (Xij )ij∈S . Each term in the r.h.s. of (7) is the entropy of a graph with m nodes; by invoking the system’s symmetry, all terms are equal to H(Gm ), such that  n H(Gn ) ≤ m  n−2 H(Gm ), m−2 (8) and (6) follows immediately. The following corollary gives a series of tighter and tighter upper bounds on H(Gn ), for all n ≥ 2. Corollary 1: The normalized (i.e., per edge) entropy decreases with the number of nodes, i.e., H(G3 ) H(Gn−1 ) H(Gn )  ≤  ≤ ... ≤ ≤ H(G2 ). n n−1 3 2 2 d D2 , r̄ d o , if 2r̄2 > 2 if 2r̄ ≤ 2 if 2r̄ > if 2r̄2 ≤ P i<j 2 rij , 2 i<j rij , P r2 , Pi<j ij 2 i<j rij , P d ≤ D, d ≤ D, d > D, d > D. (5) 0.8 (6)  Proof: The entropy of Gn is given by the entropy of the n 2 binary variables in Xn , see (3). Our intention is to relate H(Gn ) to the entropy of RGGs with smaller number of nodes.  n Specifically, for m < n, we consider all the m subsets of Vn that have m nodes. Let Nm,k ⊂ Vn be the kth such subset,  n k = 1, . . . , m . The set of pair indices corresponding to Nm,k is denoted by Sk = {ij | i, j ∈ Nm,k , i < j}. We further define the set S = {S1 , . . . , S( n ) } collecting all the sets of m pair indices. In this construction, each pair index ij with i, j ∈  n−2 Vn appears in m−2 subsets of S. According to Shearer’s inequality, which is a generalization of the subadditivity of joint entropy [31], [32], we have 1 X H(XS ), (7) H(Xn ) ≤ n−2  m−2 2 2 d 2D 2ϕ 1 (9) Proof: We immediately obtain (9) by successively applying (6) for consecutive integers. V. N UMERICAL E XPERIMENTS In the following we assume that the random nodes are confined in a disk with diameter D = 1; any two nodes are connected by an edge if and only if the distance between them is less than r0 . We first take an example from ad-hoc communications, where it is relevant to know conditions under which any two nodes of the network can communicate. Probability H(Gn ) H(Gm ) ≤ . n(n − 1) m(m − 1)  d2 + D2 o 0.6 0.4 0.2 0 0 0.2 0.4 0.6 0.8 1 Fig. 1. Probability of connectedness and probability of completeness for an RGG with n = 3 nodes and maximum connection range r0 ; the three nodes are randomly located inside a circle with diameter one. If multi-hop communication is possible, this is equivalent to the requirement that the graph be connected; otherwise, the graph needs to be complete. We consider a three-node graph and evaluate P (G3 is connected) = fX3 (0, 1, 1) + fX3 (1, 0, 1) + fX3 (1, 1, 0) + fX3 (1, 1, 1) and P (G3 is complete) = fX3 (1, 1, 1) as functions of r0 (which can be thought of as being monotonically related to the transmit power). We compute the pmf (2) by using the derived joint pdf (5) and numerical integration. The results in Fig. 1 show that two-hop relaying significantly improves the probability that any two of the three nodes can communicate. We now study the entropy bounds derived in Sec. IV. We consider n = 5 nodes and compute H(G5 ) using Monte Carlo simulation. From (9), we have H(G5 ) ≤ 10 3 H(G3 ) ≤ 10H(G2 ). We use the derived joint pdf (5) to compute the pmf (2), which then gives H(G3 ). We similarly obtain H(G2 ) based on the pdf of the distance between two points inside a circle [24]. Fig. 2 shows that H(G5 ) approaches zero when r0 → 0 or r0 → D (i.e., when the RGG becomes deterministically empty or complete, respectively). The entropy is significant at intermediate values of r0 and always less than 10 bits, which is the entropy of a five-node graph whose 10 potential edges exist independently with probability 0.5. We can also observe that the bound based on H(G3 ) provides an improvement over the one obtained by assuming the 10 inter-node distances are independent. 10 • Aj 8 Entropy (bits) θ̄ij 6 Ai • 4 Θi Θij 2 O . • Ak 0 0 0.2 0.4 0.6 0.8 1 Fig. 2. Entropy of an RGG with n = 5 nodes and maximum connection range r0 , and upper bounds; the five nodes are randomly located inside a circle with diameter one. VI. C ONCLUSION In this paper, we studied the distribution of a random geometric graph and its entropy. The distribution provides insights into properties of the random graph, such as topological structure or connectivity, while entropy is useful for understanding topological complexity. We showed that the normalized (per edge) entropy decreases with the number of nodes. This result gave a series of upper bounds on entropy, each bound involving the entropy of a graph with smaller number of nodes. We pointed out the importance of the joint distribution of pair distances in determining the graph’s distribution and its entropy, and the lack of such results in the literature. We progressed by deriving the joint distribution of distances between three nodes confined in a disk, and expect that the approach we used could be applied for larger number of nodes. A PPENDIX Let O be the center of the disk K of diameter D. We denote by Si the minimum diameter of a disk centred at O that includes the ith point and define S̄ = max(S1 , S2 , S3 ). We write Z D fR3 |S̄ (r12 , r13 , r23 | s)fS̄ (s) ds. fR3 (r12 , r13 , r23 ) = 0 (10) Conditioning on S̄ is very convenient because, in the computation of fR3 |S̄ , one of the three points is on the circle Cs of center O and diameter s, while the other two points are inside Cs ; this is a great simplification. The density fS̄ is obtained as follows: we have P (Si ≤ s) = s2 /D2 , for each s ∈ [0, D]; therefore, P (S̄ ≤ s) = s6 /D6 , which gives the pdf fS̄ (s) = 6s5 /D6 . To compute fR3 |S̄ , we study the “number of ways” in which one can fit a triangle of side-lengths r12 , r13 and r23 inside Cs when one of the triangle’s vertices is fixed on the Fig. 3. Illustration of the circle Cs of center O and diameter s; the point Ai is on the circle, while Aj and Ak are inside Cs . circle. The side lengths must satisfy the triangle inequalities, 2 2 2 2 r23 + which is equivalent to Q(r12 , r13 , r23 ) := 2r12 r13 + 2r12 2 2 4 4 4 2r13 r23 − r12 − r13 − r23 > 0. It is also required that r̄ := max(r12 , r13 , r23 ) ≤ s. In Fig. 3, point Ai represents node i. Assuming Ai is on Cs we have i (r12 , r13 , r23 ) fR 3 = fRi jk |Rij ,Rik (rjk |rij , rik )fRi ij (rij )fRi ik (rik ) (11) where superscript i indicates conditioning on node i being on Cs , and {i, j, k} ≡ {1, 2, 3}. For each j 6= i, the pdf of Rij = |Ai Aj | is [24] r  8rij ij fRi ij (rij ) = , rij ∈ [0, s]. (12) arccos πs2 s 2 2 To obtain fRi jk |Rij ,Rik , we use the law of cosines Rjk = Rij + 2 Rik − 2Rij Rik cos Θi , with Θi := ∠Aj Ai Ak . For each j 6= i, we further define Θij = ∠OAi Aj; we have Θij |Rij ∼ r U(−θ̄ij , θ̄ij )), with θ̄ij = arccos sij < π/2. Since Θi = Θij − Θik (i.e., the difference between two independent and uniformly distributed variables), it follows that Θi |Rij , Rik has a trapezoidal distribution with pdf i fΘ (θi |rij , rik ) i |Rij ,Rik  1    2 max(θ̄ij ,θ̄ik ) , if 0 ≤ |θi | ≤ |θ̄ij − θ̄ik |, = θ̄ij 4+θ̄θ̄ikθ̄−|θi | , if |θ̄ij − θ̄ik | ≤ |θi | < θ̄ij + θ̄ik , ij ik   0, if θ̄ij + θ̄ik ≤ |θi | < π. Now, we make the transformation Y = cos Θi and obtain the pdf of Y from its cdf, which is computed as FYi |Rij ,Rik (y|rij , rik ) = 1 − P (cos Θi > y). Then, we use the law of cosines and transformation theorem to obtain fRi jk |Rij ,Rik . We distinguish between several cases depending on the diameter d of the circumscribed circle (4). When d > s, the only way in which the triangle can be inside Cs while node i is on Cs is when the triangle is obtuse (i.e., 2 2 2 2r̄2 > r12 + r13 + r23 ) and its largest side length r̄ is either rij or rik . Using (12) in (11), we obtain i (r12 , r13 , r23 ) fR 3  32d   π2 s4 (θ̄ij + θ̄ik − θi ), if d ≤ s, r̄ = π64d , if d > s, 2 s4 arccos s   0, else, 2r̄2 > P i<j 2 rij , (13) for all r12 , r13 , r23 ∈ R+ that satisfy Q(r12 , r13 , r23 ) > 0 and r̄ ≤ s. Since each node can be circle with probability P on the i 1/3, it follows that fR3 |S̄ = 3i=1 fR /3, which gives 3 fR3 |S̄ (r12 , r13 , r23 |s)  "  P  64d  arccos  2 s4  3π  i<j = 128d arccos r̄  ,  3π 2 s4 s     0, rij  s − π 2 # , if d ≤ s, if d > s, 2r̄2 > P i<j else. 2 rij , (14) We have used that θ1 + θ2 + θ3 = π and when d > s the node corresponding to the obtuse angle cannot be on Cs . Finally, by plugging (14) into (10), we calculate the integral by distinguishing between the cases d ≤ D and d > D, and arrive at the closed-form expression (5). ACKNOWLEDGMENT This work was supported by Independent Research Fund Denmark grant number DFF–5054-00212 and by EPSRC grant number EP/N002350/1 (“Spatially Embedded Networks”). The research was carried out during a visit to University of Oxford, and M.-A Badiu would like to thank the Communications Research Group for the hospitality. R EFERENCES [1] M. Franceschetti and R. Meester, Random Networks for Communication: From Statistical Physics to Information Systems, ser. Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge University Press, 2008. [2] F. Baccelli and B. Błlaszczyszyn, “Stochastic geometry and wireless networks: Volume II applications,” Found. Trends Netw., vol. 4, no. 1-2, pp. 1–312, Jan. 2009. [3] C. P. Dettmann and O. Georgiou, “Random geometric graphs with general connection functions,” Physical Review E, vol. 93, no. 3, p. 032313, 2016. [4] M. D. Penrose, “Connectivity of soft random geometric graphs,” The Annals of Applied Probability, vol. 26, no. 2, pp. 986–1028, 2016. [5] ——, “On a continuum percolation model,” Advances in applied probability, vol. 23, no. 3, pp. 536–556, 1991. [6] R. Meester and R. Roy, Continuum percolation. Cambridge University Press, 1996, vol. 119. [7] J. Coon, C. P. Dettmann, and O. Georgiou, “Full connectivity: corners, edges and faces,” Journal of Statistical Physics, vol. 147, no. 4, pp. 758–778, 2012. [8] G. Simonyi, “Graph entropy: a survey,” Combinatorial Optimization, vol. 20, pp. 399–441, 1995. [9] D. Bonchev, Information theoretic indices for characterization of chemical structures. Research Studies Press, 1983, no. 5. [10] M. G. Everett, “Role similarity and complexity in social networks,” Social Networks, vol. 7, no. 4, pp. 353–359, 1985. [11] M. Dehmer and A. Mowshowitz, “A history of graph entropy measures,” Information Sciences, vol. 181, no. 1, pp. 57–78, 2011. [12] Y. Choi and W. Szpankowski, “Compression of graphical structures: Fundamental limits, algorithms, and experiments,” vol. 58, no. 2, pp. 620–638, 2012. [13] N. de Beaudrap, V. Giovannetti, S. Severini, and R. Wilson, “Interpreting the von Neumann entropy of graph Laplacians, and coentropic graphs,” A Panorama of Mathematics: Pure and Applied, vol. 658, p. 227, 2016. [14] D. E. Simmons, J. P. Coon, and A. Datta, “Symmetric Laplacians, quantum density matrices and their von Neumann entropy,” Linear Algebra and its Applications, vol. 532, pp. 534–549, nov 2017. [15] J. L. Guo, W. Wu, and S. B. Xu, “Study on route stability based on the metrics of local topology transformation entropy in mobile ad hoc networks,” Advanced Engineering Forum, vol. 1, pp. 288–292, sep 2011. [16] M.-H. Zayani, “Link prediction in dynamic and human-centered mobile wireless networks,” Ph.D. dissertation, 2012. [17] B. An and S. Papavassiliou, “An entropy-based model for supporting and evaluating route stability in mobile ad hoc wireless networks,” IEEE Communications Letters, vol. 6, no. 8, pp. 328–330, aug 2002. [18] M. Boushaba, A. Hafid, and M. Gendreau, “Node stability-based routing in wireless mesh networks,” Journal of Network and Computer Applications, vol. 93, pp. 1–12, 2017. [19] R. Timo, K. Blackmore, and L. Hanlen, “On entropy measures for dynamic network topologies: Limits to MANET,” in Communications Theory Workshop, 2005. Proceedings. 6th Australian. IEEE, 2005, pp. 95–101. [20] J. Lu, F. Valois, M. Dohler, and D. Barthel, “Quantifying organization by means of entropy,” IEEE Communications Letters, vol. 12, no. 3, pp. 185–187, mar 2008. [21] J. P. Coon, “Topological uncertainty in wireless networks,” in 2016 IEEE Global Communications Conference, GLOBECOM 2016, Washington, DC, USA, December 4-8, 2016. IEEE, 2016, pp. 1–6. [22] J. P. Coon, C. P. Dettmann, and O. Georgiou, “Entropy of Spatial Network Ensembles,” ArXiv e-prints, Jul. 2017. [23] A. Cika, J. P. Coon, and S. Kim, “Effects of directivity on wireless network complexity,” in 2017 15th International Symposium on Modeling and Optimization in Mobile, Ad Hoc, and Wireless Networks (WiOpt). IEEE, May 2017, pp. 1–7. [24] A. M. Mathai, An Introduction to Geometrical Probability, ser. Statistical Distributions and Models with Applications. Newark: Gordon and Breach, 1999. [25] S. Srinivasa and M. Haenggi, “Distance distributions in finite uniformly random networks: Theory and applications,” IEEE Trans. Vehicular Technology, vol. 59, no. 2, pp. 940–949, 2010. [26] Z. Khalid and S. Durrani, “Distance distributions in regular polygons,” IEEE Transactions on Vehicular Technology, vol. 62, no. 5, pp. 2363– 2368, Jun 2013. [27] R. Pure and S. Durrani, “Computing exact closed-form distance distributions in arbitrarily shaped polygons with arbitrary reference points,” The Mathematica Journal, vol. 17, pp. 1–27, 2015. [28] H. Solomon, Geometric Probability. Society for Industrial and Applied Mathematics, 1978. [29] V. S. Alagar, “The distribution of the distance between random points,” Journal of Applied Probability, vol. 13, no. 3, pp. 558–566, 1976. [30] B. Eisenberg and R. Sullivan, “Crofton’s differential equation,” The American Mathematical Monthly, vol. 107, pp. 129–139, 2000. [31] F. Chung, R. Graham, P. Frankl, and J. Shearer, “Some intersection theorems for ordered sets and graphs,” Journal of Combinatorial Theory, Series A, vol. 43, no. 1, pp. 23 – 37, 1986. [32] M. Yanagida and Y. Horibe, “A dropping proof of an entropy inequality,” Applied Mathematics Letters, vol. 21, no. 8, pp. 840 – 842, 2008.
7cs.IT
On Active and Passive Testing Noga Alon∗ Rani Hod† Amit Weinstein‡ arXiv:1307.7364v2 [cs.DS] 15 Nov 2015 February 27, 2018 Abstract Given a property of Boolean functions, what is the minimum number of queries required to determine with high probability if an input function satisfies this property or is “far” from satisfying it? This is a fundamental question in Property Testing, where traditionally the testing algorithm is allowed to pick its queries among the entire set of inputs. Balcan, Blais, Blum and Yang have recently suggested to restrict the tester to take its queries from a smaller random subset of polynomial size of the inputs. This model is called active testing, and in the extreme case when the size of the set we can query from is exactly the number of queries performed it is known as passive testing. We prove that passive or active testing of k-linear functions (that is, sums of k variables among n over Z2 ) requires Θ(k log n) queries, assuming k is not too large. This extends the case k = 1, (that is, dictator functions), analyzed by Balcan et. al. We also consider other classes of functions including low degree polynomials, juntas, and partially symmetric functions. Our methods combine algebraic, combinatorial, and probabilistic techniques, including the Talagrand concentration inequality and the Erdős–Rado theorem on ∆-systems. 1 Introduction Property testing considers the following general problem: given a property P, identify the minimum number of queries required to determine with high probability whether an input object has the property P or whether it is “far” from P. This question was first formalized by Rubinfeld and Sudan [24] in the context of Boolean functions. Definition 1 ([24]). Let P be a family of Boolean functions and let ǫ > 0. A q-query ǫ-tester for P is a randomized algorithm that queries an unknown function f : Zn2 → Z2 on q inputs of its choice and (i) Accepts with probability at least 2/3 when f ∈ P; (ii) Rejects with probability at least 2/3 when f is ǫ-far from P, where f is ǫ-far from P if dist(f, g) := |{x ∈ Zn2 | f (x) 6= g(x)}| ≥ ǫ2n holds for every g ∈ P. ∗ Sackler School of Mathematics and Blavatnik School of Computer Science, Tel Aviv University, Tel Aviv 69978, Israel and School of Mathematics, Institute for Advanced Study, Princeton, NJ 08540. Email: [email protected]. Research supported in part by BSF grant 2012/107, by ISF grant 620/13, by the Israeli I-Core program and by the Fund for Mathematics. † School of Mathematics, Georgia Tech, 686 Cherry st, Atlanta, GA 30332. E-mail: [email protected]. ‡ Blavatnik School of Computer Science, Tel Aviv University, Tel Aviv 69978, Israel. Email: [email protected]. Research supported in part by the Israeli I-Core program. 1 We denote the minimal q such that a q-query ǫ-tester for P exists by Qǫ (P). The main line of research in many works on property testing is to characterize Qǫ (P) for various properties P. An interesting distinction is identifying properties for which Qǫ (P) is constant (i.e., independent of n). For instance, linearity can be tested in a constant number of queries [13]; more generally, testing if a Boolean function is a polynomial of constant degree can be performed with a constant number of queries [1, 5, 7, 24]. Testing whether a function depends only on a constant number of its input variables (that is, if a function is a junta) can also be done with a constant number of queries [8, 9, 19]. In the definition above the algorithm can pick its q queries in the entire set Zn2 . Balcan, Blais, Blum, and Yang [3] suggested to restrict the tester to take its queries from a smaller, typically random, subset U ⊆ Zn2 . This model is called active testing, in resemblance of active learning (see, e.g., [16]). Active testing gets more difficult as the size of U decreases, and the extreme case is when U is a set of q random points (so the algorithm actually has no choice). This is known as passive testing, or testing from random examples1 , and was studied in [20, 21]. Formally, the next definition from [3] extends Definition 1 to active and passive testers. Definition 2. Let P be a family of Boolean functions and let ǫ > 0. A u-sample q-query ǫ-tester for P is a randomized algorithm that, given a subset U ⊆ Zn2 of size |U | = u, drawn uniformly at random, queries an unknown function f : Zn2 → Z2 on q inputs from U and (i) Accepts with probability at least 2/3 when f ∈ P; (ii) Rejects with probability at least 2/3 when f is ǫ-far from P. The set U may be chosen with or without repetitions. For our purpose these two options will be equivalent, as in the parameters considered here the probability of a repetition is negligible. We denote by Qaǫ (P, u) the minimal q such that a u-sample q-query ǫ-tester for P exists (∞ if u queries do not suffice), and by Qpǫ (P) the minimal q such that a q-sample q-query ǫ-tester (i.e., a passive ǫ-tester) for P exists. We are usually interested in poly (n)-sample testers; for simplicity, we omit the sample size u from our notation when this is the case. The following inequality from [3] shows the relation between the query complexity of the different testing models. Proposition 3 ([3, Theorem A.4.]). For every property P and for every ǫ > 0, Qǫ (P) ≤ Qaǫ (P) ≤ Qpǫ (P). To provide a simple upper bound on the query complexity of passive testing, we refer to the more difficult problem of proper passive learning. The most common model of passive learning is PAC-learning, introduced by Valiant [27]. Definition 4. Let P be a family of Boolean functions. A q-query ǫ-learning algorithm for P is a randomized algorithm that, given q random queries from an unknown function f ∈ P, outputs a Boolean function g : Zn2 → Z2 such that g is ǫ-close to f with probability at least 2/3 (the underlying probability space is the random queries and the coin tosses of the algorithm). The algorithm is called proper if it always returns some g ∈ P. We denote the minimal q such that a proper q-query ǫ-learning algorithm for P exists by Qℓǫ (P). 1 Although the examples could be drawn from a general probability distribution, in this work we focus on the uniform distribution. 2 The number of queries needed to properly learn a Boolean function essentially bounds from above the number of queries needed to test it; given the output of a proper learning algorithm, it remains to verify that the input function is indeed close to it. More formally, we have the following proposition. Proposition 5 ([20, Proposition 3.1.1]). For every property P and for every ǫ > 0, Qpǫ (P) ≤ Qℓǫ/2 (P) + O (1/ǫ). This proposition is often used together with the following known upper bound. Fact 6. For every family of Boolean functions P, Qℓǫ (P) = O( 1ǫ log |P|). For the sake of simplicity, we focus on a constant ǫ (say, ǫ = 0.001) throughout the rest of this paper. This allows us to drop the subscript ǫ from our notation when possible (e.g., we write Q (P) instead of Qǫ (P)). 1.1 Our results In [3] it was shown that active testing of dictator functions (i.e., functions that only depend on a single input variable) requires Θ (log n) queries. Our first result extends this to the family of k-linear functions; that is, the family of sums of k variables over Z2 . Let Link denote this family. Theorem 7. Active or passive testing of Boolean k-linear functions requires Θ (k log n) queries, log n for all k ≤ 10 log log n . Theorem 7 and its proof imply a lower bound for active testing of superfamilies of k-linear functions, such as k-juntas and (n − k)-symmetric functions. A function is called k-junta if it depends on at most k of its input variables, referred to as the influential variables (e.g., a dictator function is a 1-junta). We denote the family of k-juntas by Junk . Partially symmetric functions are a generalization of juntas, where the remaining variables can influence the output of the function, but only in a symmetric manner. Definition 8 (Partially symmetric functions [12]). For a subset T ⊆ [n] := {1, . . . , n}, a function f : Zn2 → Z2 is called T -symmetric if permuting the labels of the variables of T does not change the function. Moreover, f is called t-symmetric if there exists T ⊆ [n] of size at least t such that f is T -symmetric. We denote the family of t-symmetric functions by Symt . Partially symmetric functions were introduced as part of the research of isomorphism testing [12, 14], where it was shown that testing whether a function is (n − k)-symmetric for any k < n/10 can be done using O(k log k) queries. The special case of 2-symmetric functions has already been considered by Shannon in [25]. In addition to the Ω(k log n) lower bound for active testing of partially symmetric functions, we provide an upper bound as well as lower and upper bounds for passive testing (detailed in Table 1). In particular, we show that for a constant k, the family of partially symmetric functions demonstrates a significant gap among the three different testing scenarios and proper learning. Theorem 9. For a constant k we have Q Symn−k Q a p Symn−k   = Θ (1) , = Θ (log n) , p  = Θ(n1/4 log n), √  Qℓ Symn−k = Θ( n). Q Symn−k 3 The last family of functions considered in this work is low degree polynomials, with special consideration given to linear functions. The following indicates that passive testing of degree d polynomials, denoted by Pold , is essentially as hard as properly learning them. Theorem 10. The query complexity of passive testing of degree d polynomials is Θ(nd ), for constant d. On the other hand, active testing can be done slightly more efficiently, at least for linear functions. Theorem 11. The query complexity of active testing of linear functions is Θ(n/ log n). Table 1 summarizes the results presented in this work for passive and active testing, as well as the best known query complexity for the classical model of property testing and proper learning. Family Classic (Q) Active (Qa ) Passive (Qp ) Symmetric Linear d-degree polynomials O(1) O(1) [13] O(1) Θ(n/ log n) Θ(n1/4 ) n + Θ(1) Learning (Qℓ ) √ Θ( n) n + Θ(1) Θ(nd ) Θ(nd ) Θ(k log n) Θ(k log n) Θ(k log n) Ω(k log n) Ω(2k/2 + k log n) Θ(2k + k log n) O(2k k log n), Ω(k log n) O(n1/4p 2k k log n), Ω(n1/4 2k + k log n) k-linear k-juntas (n − k)-symmetric Θ(2d ) [1, 7] O(k log k), k − o(k) [9, 11] O(k log k), Ω(k) [9, 10, 15] O(k log k), Ω(k) [12] p √ Θ( n2k ) Table 1: Summary of best bounds, for fixed ǫ and k < log n/(10 log log n) The rest of the paper is organized as follows. The lower bound for active testing of k-linear functions, which applies to juntas and partially symmetric functions as well, is proved in Section 2 by establishing a general result for random subsets of abelian groups, proved by combining probabilistic and combinatorial tools including the Talagrand inequality and the Erdős–Rado results on ∆systems. Section 3 provides the lower and upper bounds for active and passive testing of symmetric and partially symmetric functions, as described in Table 1. The results concerning low degree polynomials and linear functions in particular are presented in Section 4. Concluding remarks and open problems are in Section 5. The proofs in Sections 3 and 4 are also based on probabilistic, combinatorial, and algebraic techniques. 2 k-linear functions Theorem 7 states that the query complexity of active or passive testing of k-linear functions is Θ(k log n). The upper bound can be obtained by applying Propositions 3 and 5, and Fact 6, given  that there are exactly nk different k-linear functions. In order to prove a lower bound for active testing of k-linear functions, we use the following lemma, which is an adaptation of the tools used in [3] to prove active testing lower bounds (specifically, Theorem 6.6 and Lemma B.1 ibid). 4 Definition. A property P is called ǫ-nontrivial if a random Boolean function is ǫ-close to P with probability at most 0.01. Lemma 12 ([3]). Let P be an ǫ-nontrivial property of Boolean functions and let π be a distribution supported on P. Given a set S = {x1 , x2 , . . . , xq } of q queries and a vector y ∈ Zq2 , define πS (y) = Pf ∼π [f (xi ) = yi for i = 1, 2, . . . , q] . Choose at random a set U of u samples, and suppose that with probability at least S ⊆ U of q queries and every y ∈ Zq2 satisfy πS (y) < 65 2−q . Then, Qaǫ (P, u) ≥ q. 3 4, every set The proof is based on the fact that, under the assumptions of the lemma, q queries do not suffice to distinguish between a function from the distribution π and a uniform random Boolean function. According to Lemma 12, our goal is therefore to show that when we choose a random k-linear function, querying it at o(k log n) queries chosen from a random space will appear rather random. To this end we use Lemma 18, which, roughly speaking, assures us that the probability of seeing a given output vector is very concentrated around the expectation. The proof of the lemma uses the Talagrand inequality (with an extra twist) and the Erdős–Rado ∆-systems method. Lemma 18, its proof, and the tools used appear in Section 2.1. The following theorem provides a lower bound for active testing of k-linear functions, completing the proof of Theorem 7 (assuming Lemma 18). Theorem 13. Qa (Link , u) = Ω (k log n) for k ≤ 0.1 log n/ log log n, as long as n ≤ u ≤ 2n 1/7k . Proof. Define π to be the uniform distribution over the k-linear functions. In particular, π is the distribution obtained by choosing distinct i1 , i2 , . . . , ik ∈ [n] uniformly at random and returning the function f : Zn2 → Z2 defined by f (x) = xi1 + xi2 + · · · + xik . Fix S to be a set of q vectors in Zn2 . This set can be viewed as a q × n Boolean-valued matrix. We write c1 (S) , . . . , cn (S) to represent the columns of this matrix. For any y ∈ Zq2 , πS (y) = n k !−1 ( ! X [n] I∈ : ci (S) = y k i∈I ) . Since Link is, say, 0.4-nontrivial, by Lemma 12, to prove that Qa (Link , u) = Ω (k log n), it suffices to show that when U is a set of u vectors chosen uniformly and independently at random   from Zn2 and, say, q = 1 − k1 log nk + k, then with probability at least 43 , every set S ⊂ U of size |S| = q and every y ∈ Zq2 satisfy πS (y) ≤ 65 2−q . To this end, we would like to show that πS (y) is highly concentrated around E[πS (y)] = 2−q . 1−1/k To apply Lemma 18, consider the group G = Zq2 and let N = |G| = 2q = 2k nk . By 1/7k 1/7k n ⌋ ≥ n and let λ = ⌈qn ⌉ ≥ q log u. Now, for large enough n monotonicity, we assume u = ⌊2 conditions (3a) and (3b) of the lemma hold. Indeed, to prove the first inequality note that 800 ln 2 · kN λ 2k+1 n = 800 ln 2 k !1−1/k k k2 ⌈qn 1/7k 2k+1 ⌉ !1−1/k n ≤ 800 k Since k < 0.1 log n/ log log n and q < 2k log n < (log n)2 , we have 800(2qn 1/7k 2k+1 ) √ = o( n) < n/k < 5 !1/k n k . · (2qn1/7k )2k+1 . (1) Therefore, the right-hand-side of (1) is smaller than To prove the second inequality note that λ λN = k2k n1−1/k k k ≥ However, qn1/7k n k n1/k k k (n − k + 1)qn1/7k k n1/k k k = ≥Ω n k , establishing (3a). (n − k + 1)qn1/7k k  n1/k k k nk log n nk  ! n . k−1 (2) > 1,  n and therefore the right-hand-side of (2) is bigger than k−1 , proving (3b).  Thus, for any fixed vector y ∈ Zq2 , the probability that more than 56 nk 2−q k-sets of columns of S sum to y is at most 5 · 2−λ . Furthermore, when U is defined as above, we can apply the union bound over all y ∈ G and over all subsets S ⊆ U of size |S| = q to obtain   6 P ∃S, y : πS (y) > 2−q ≤ 5 ! u uq q · 2 · 5 · 2−q log u = o (1) , · 2q · 5 · 2−λ ≤ q! q establishing the theorem. The above theorem and its proof immediately imply a lower bound for active testing of both k-juntas and (n − k)-symmetric functions. This can also be applied to show lower bounds for other concise representation families, such as small DNF formulas, small decision trees, small Boolean formulas, and small Boolean circuits (see [17]). Corollary 14. Qa (Junk ) = Ω(k log n) and Qa (Symn−k ) = Ω(k log n) for k = O (log n/ log log n). Proof. The same distribution π from the proof of Theorem 13 (uniform distribution over the klinear functions) is supported on k-juntas (resp., (n − k)-symmetric functions) and these properties, too, are still 0.4-nontrivial. In Section 3 we continue the investigation of active and passive testing of partially symmetric functions. The following proposition summarizes what we know about passive testing of k-juntas.   Proposition 15. Ω(2k/2 + k log n) ≤ Qp (Junk ) ≤ O 2k + k log n . Proof. The upper bound is obtained by applying Proposition 5 and Fact 6, as the number of  k k-juntas is nk 22 . The lower bound is a combination of two separate bounds:2 Ω (k log n) by Corollary 14 and Ω 2k/2 for verifying that the input function is indeed a junta, even when the set of the influencing variables is known in advance. Indeed, assume we are given the input function with a promise that it is either a random junta over the first k variables or a random function. Distinguishing between these two cases is impossible unless we have a pair of inputs agreeing on the first k variables; among less than 12 2k/2 queries, we get such a pair with probability at most 1 2  1 k/2 22 2.1 2 · 2−k = 1/8. Proof of main lemma Before we state the formal lemma, we introduce the two following combinatorial and probabilistic tools used in the proof. 2 Although Corollary 14 only holds for k = O(log n/ log log n), for larger values of k its contribution to the lower bound is negligible. 6 Erdős–Rado ∆-systems Definition. Let a, b be positive integers. We say that a family of a sets, each of size b, forms a ∆-system of size a if all pairs have the same intersection. Erdős and Rado proved that every large enough family of sets contains a large ∆-system. Theorem 16 ([18, Theorem 3]). Let F be a family of sets, each of size b. Then F contains ∆-system of size a whenever |F| ≥ (a − 1)b+1 b!. Talagrand’s concentration inequality In its general form, Talagrand’s inequality is an isoperimetric inequality for product probability spaces. We use the following formulation from [23] (see also [2, 26]), suitable for showing that a random variable in a product space is concentrated around its expectation under two conditions: Theorem 17 ([23, page 81]). Let X ≥ 0 be a non-trivial random variable, determined by n independent trials T1 , . . . , Tn . If there exist c, r > 0 such that (i) X is c-Lipschitz: changing the outcome of one trial can affect X by at most c, and (ii) X is r-certifiable: for any s, if X ≥ s then there is a set of at most rs trials whose outcomes certify that X ≥ s, then for any 0 ≤ t ≤ E [X], where τ = c2 rE [X].   √   P |X − E [X]| > t + 60 τ < 4 exp −t2 /8τ , We now state the main lemma. Lemma 18. Let G be an abelian group of order N , and let n ∈ N. Consider a random sequence X = (x1 , x2 , . . . , xn ), where each xi ∈ G is chosen uniformly and independently at randomo (with n  P repetitions). Fix y ∈ G and k ∈ N, and let Y = |Y|, where Y = I ∈ [n] : i∈I xi = y . Let k λ ≥ 2 log N be a positive integer and assume that n k ! ≥ 800 ln 2 · kN λ2k+1 ; and ! n λN ≤ k. k2 k−1 Then, (3a) (3b)   1 P |Y − E [Y ]| > E [Y ] < 5 · 2−λ . 5 Proof. For k = 1 we have Y ∼ Bin (n, 1/N ) and the result is implied by Chernoff’s inequality, so we henceforth assume k ≥ 2. We would like to use Talagrand’s inequality to prove that Y is concentrated around E [Y ], but Y does not satisfy the Lipschitz condition necessary for its application. Let us thus define Ŷ = Ŷ , where Ŷ ⊆ Y is maximal such that, for all j ∈ [n], xj belongs to at most c sets I ∈ Ŷ; the exact value of c will be determined later. 7 n [n]\{j} k−1 First we bound the probability that Ŷ 6= Y . Let Yj = I ∈ rem 16, there exists a ∆-system Zj ⊆ Yj of size |Zj | ≥ 1 + o : I ∪ {j} ∈ Y . By Theo- q k |Yj | / (k − 1)! > |Yj |1/k e/k, where every two distinct I1 , I2 ∈ Zj have the same intersection Kj = I1 ∩ I2 . Thus, Zj′ = P {I \ Kj : I ∈ Zj } is a collection of sj = Zj′ = |Zj | disjoint k′ -sets such that i∈I xi = z for P all I ∈ Zj′ , where k′ = k − 1 − |Kj | ≤ k − 1 and z = y − xj − i∈Kj xi . Consider the event Ez (s), defined as the existence of a collection of s disjoint k′ -subsets of X that all sum to the same element z ∈ G. Then, ! n 1 n P [Ez (s)] ≤ N −s ≤ s! k′ k′ , k′ , . . . , k′ | {z s } !s N −s n e sN k − 1 ≤ !!s ≤  eλ sk2k s , and thus we have, for the choice of c = λk , h i h P Y > Ŷ ≤ P [∃j ∈ [n] : |Yj | > c] ≤ P ∃j ∈ [n] : sj > c1/k e/k  ≤ P [∃z ∈ G : Ez (eλ/k)] ≤ N 2−k eλ/k i (4) = 2log N −eλ < 2−2λ . This also serves to show that E [Y ] and E[Ŷ ] are very close, since ! !2  2 1 λ2 2−λ < . 64 32 (5) Next we apply Talagrand’s inequality to bound the deviation of Ŷ from E[Ŷ ]. By definition, Ŷ is c-Lipschitz; moreover, to prove that Ŷ ≥ s we only need to reveal s k-sets, i.e., reveal xi for P at most ks values of i. For every choice of I ∈ [n] i∈I xi is a random element of G and thus k , E [Y ] = nk /N ≥ 800 ln 2 · kλ2k+1 . Set τ = c2 kE[Ŷ ]. By Theorem 17, h i   h i E Y − Ŷ ≤ max Y − Ŷ ·P Y > Ŷ ≤  P Ŷ − E[Ŷ ] >  n −2λ 2 ≤ k n k−1   √ 1 E[Y ] + 60 τ ≤ 4 exp −E[Y ]2 /800τ 10   2−2λ ≤ λN k2k  2−2λ ≤  ≤ 4 exp −E[Y ]/800c2 k < 4 exp −λ2k+1 ln 2/c2 = 4 · 2−λ . (6) Putting (4), (5) and (6) together,     h i 1 1 P |Y − E [Y ]| > E [Y ] ≤ P Y > Ŷ + P Ŷ − E [Y ] > E [Y ] 5 5   h i 1 1 −λ ≤ 2 + P Ŷ − E Ŷ > E [Y ] − < 5 · 2−λ , 5 32 √ 1 1 ≥ 10 E [Y ] + 60 τ , satisfied whenever λ ≥ 650. under the condition 15 E [Y ] − 32 3 Partially symmetric functions A key concept in the study of symmetric and partially symmetric functions is the following notion: 8 Definition ([12, Definition 3.1]). The symmetric influence of a set T ⊆ [n] of variables in a Boolean function f : Zn2 → Z2 is defined as SymInf f (T ) = Px∈Zn2 ,σ∈Sn [f (x) 6= f (σ (x)) | ∀i 6∈ T : σ (i) = i] . By definition, a T -symmetric function f has SymInf f (T ) = 0; conversely, for functions far from being T -symmetric we have the following lemma: Lemma 19 ([12, Lemma 3.3]). If f is ǫ-far from being T -symmetric, then SymInf f (T ) ≥ ǫ. In other words, distinguishing between a T -symmetric function and one far from being T symmetric can be done by estimating the symmetric influence. The following proposition determines the number of queries needed for passive and active testing of symmetric Boolean functions. Although these results are a special case of partially symmetric functions, we feel that this serves as an introduction and provides some intuition. Proposition 20. Qp (Symn ) = Θ(n1/4 ) and Qa (Symn ) = O(1). Proof. A symmetric function is characterized by its layers of different Hamming weight. For each Hamming weight between 0 and n, the function outputs a consistent value. To test symmetry given a function, it suffices to randomly choose an input x ∈ Zn2 and a permutation of it, and see if the output is consistent over the two inputs. Since the Hamming weight of x is distributed Bin (n, p 1/2),  two random inputs share the same Hamming weight with probability 4−n 2n = (1 + o (1)) 2/πn; n 1 1/4 having fewer than 2 n random samples yields even a single such pair with probability at most 1 2  1 1/4 2n 2 p · 2/πn < 1/8. On the other hand, among 4 (2πn)1/4 random samples, it is not hard to see that the probability of not having such a pair is smaller than, say, 1/7. (One way to show this fact is by looking for matches between the first and second halves of the samples, assuming the first half did not yield such a pair already. In this case with high probability the total measure of the layers in which we 1 have a representative from the first half is at least (2πn) 1/4 and conditioning on this, the probability that no sample from the second half falls into one of these layers is smaller than e−2 .) By Markov, repeating this 14/ǫ times results in at least 12/ǫ sets without a desired pair with probability at most 1/6. Therefore, with probability at least 5/6, we have at least 2/ǫ pairs. By Lemma 19, if the function is ǫ-far from being symmetric then each such pair will have different outputs with probability at least ǫ, so we will fail to detect this with probability (1 − ǫ)2/ǫ < 1/e2 . Altogether the success probability exceeds 2/3. In the context of active testing, given a sample space of, say, u = n/ǫ vectors we can easily find 2/ǫ input pairs with the same Hamming weight each, thus testing whether the input function is indeed symmetric can be done using 4/ǫ queries. Remark. Consider the following slight modification of the algorithms above. Instead of rejecting the input function upon the first example of it not being symmetric, we estimate its symmetric influence by counting the number of such examples among all pairs. This enables us to passively (resp., actively)distinguish that is ǫ/2-close to being symmetric and one that  between a function  −2 1/4 −2 is ǫ-far using O ǫ n (resp., O ǫ ) queries. Such an algorithm is called a tolerant tester. Some families of Boolean functions, such as symmetric and partially symmetric functions, have many pairs of functions which are close to one another. In these cases, the upper bound of Fact 6, which relies only on the size of the family, is not tight. We remedy this by proving the following refined version. 9 Definition 21. Let P be a family of Boolean functions and let ǫ > 0. Denote by Iǫ (P) a subfamily of P of maximal size such that every two distinct f, g ∈ Iǫ (P) are ǫ-far. Proposition 22. Let P be a family of Boolean functions and let ǫ > 0. Then ⌊log |I2ǫ (P)|⌋ ≤ Qℓǫ (P) ≤ l 64 ǫ m ln Iǫ/2 (P) . Proof. A proper learning algorithm for P is required to return a function from P that is ǫ-close to the input function. Since functions in I2ǫ (P) are 2ǫ-far from one another, the algorithm has to return a different output for each of them. Any deterministic algorithm making q queries can only have 2q different outputs, so if it performs less than ⌊log |I2ǫ (P)|⌋ queries, it must be wrong with probability at least 1/2. A randomized algorithm for this problem can be viewed as a distribution over deterministic algorithms (as the queries are chosen randomly and the algorithm is non-adaptive), and therefore cannot improve the success probability beyond 1/2. Next, consider the following learning algorithm: given an input function f ∈l P, return the funcm tion g ∈ Iǫ/2 (P) that agrees with f on as many queries as possible out of q = (64/ǫ) ln Iǫ/2 (P) random queries. By definition, f is ǫ/2-close to some f ′ ∈ Iǫ/2 (P); therefore, f and f ′ disagree on each query with probability at most ǫ/2, independently. The total number of disagreements is thus dominated by a Bin (q, ǫ/2) random variable and hence with high probability they disagree on fewer than 3ǫq/4 queries. Using a similar argument, a function h ∈ Iǫ/2 (P) that is ǫ-far from f will dis−2 agree with f on more than 3ǫq/4 queries with probability at least 1−exp (−ǫq/32) = 1− Iǫ/2 (P) . By the union bound, with high probability no such h will outperform f ′ and thus the algorithm will return a function that is ǫ-close to f (the obvious candidate being f ′ ). √ √ Corollary 23. Qℓ (Symn−k ) = Θ(2k n − k) for k < n; in particular, Qℓ (Symn ) = Θ( n). Proof. First, we show that Iǫ/2 (Symn−k ) = 2O(2 k √ n−k ) . The binomial distribution Bin (n − k, 1/2) m lp is concentrated around its center, and in particular the middle ℓ = 1 + 2 (n − k) ln (4/ǫ) /2 layers account for at least 1 − ǫ/2 of the weight. In other words, every (n − k)-symmetric function is (ǫ/2)-close to an ℓ-canonical (n − k)-symmetric function, which is zero outside the middle ℓ layers. k We can thus bound Iǫ/2 (Symn−k ) from above by 22 ℓ , the number of ℓ-canonical functions. j√ k For the lower bound, consider the middle ℓ′ = 1 + 2 n − k layers. The weight ratio between n−k  ⌊(n−k)/2⌋ /  k ′ n−k√ 2 2 ℓ ⌊(n−k)/2− n−k⌋ < e . Let C ⊂ Z2 be an k−1 ′ error correcting code of rate 1/2 and relative distance 1/10; in other words, C has at least 22 ℓ codewords, every pair of which are (1/10)-far. We can interpret each codeword as an ℓ′ -canonical (n − k)-symmetric function, which is 1/10e2 -far from the rest. Hence we get I2ǫ (Symn−k ) ≥ k−1 ′ 22 ℓ as long as ǫ < 1/20e2 . Therefore, for our fixed ǫ, the result follows from Proposition 22. any pair of these layers is bounded by Proposition 25 provides an upper bound for the query complexity of passive and active testing of partially symmetric functions. Its proof relies on the following simple concentration claim in which we make no attempt to optimize the estimates. Claim 24. There is an absolute constant b > 0 such that for every c, 0 < c < 1 the following holds. Let s and t be integers satisfying s < t. Let P be an arbitrary probability distribution on t bins, where the probability of each bin is at least c/t. Then, when we throw s balls randomly and 10 independently into t bins according to the probability P , the probability of getting less than cs2 /9t collisions3 is at most exp −bcs2 /t . Proof. If the number of occupied bins is less than s/3 after ⌈s/2⌉ balls were thrown, then we already have at least s/6 > cs2 /9t collisions. Otherwise, each of the next ⌊s/2⌋ balls has a probability of at least cs/3t to collide with these occupied bins, independently. The number of collisions created by the last ⌊s/2⌋ balls thus dominates a binomial Bin (⌊s/2⌋, cs/3t) random variable. By Chernoff, it is less than cs2 /9t with probability at most exp −bcs2 /t .     √ Proposition 25. Qp (Symn−k ) = O n1/4 2k/2 k log n and Qa (Symn−k ) = O 2k k log n , for k = o (log n). Proof. We begin with a passive√testing algorithm. Let f be the tested Boolean function. Our algorithm asks q = d(ǫ)n1/4 2k/2 k log n queries, and if the results obtained are consistent with f being (n − k)-symmetric it accepts, otherwise it rejects. It remains to show that if f is ǫ-far from being (n − k)-symmetric the algorithm rejects with high probability. Assume this is the case and  fix a k-set T ∈ [n] k of variables. If we choose a random vector x and another random vector y obtained from x by permuting the elements in [n] \ T the probability that f (x) 6= f (y) is at least ǫ by Lemma 19. By Claim 24 (where each bin corresponds to the ordered pair consisting of the √ projection on T and the Hamming weight of a typical vector, which is within distance Θ( n) from n/2), for an appropriately chosen d(ǫ), with probability at least 1 − n−k our queries will contain 2 more than 0.5 d(ǫ) 9 k log n > k log n/ǫ random disjoint pairs x, y which have the same Hamming weight and agree on T . The probability that none of these pairs will satisfy f (x) 6= f (y) is at most (1 − ǫ)k log n/ǫ < n−k . The union bound thus completes the argument.   The same argument implies that the query complexity of active testing is O 2k k log n because √ the only queries the passive algorithm above actually used are the results for the Θ(q 2 / n) =  Θ 2k k log n pairs x, y which agree on their Hamming weight. The active algorithm will thus   simply select from the sample Θ 2k k log n disjoint pairs with the same Hamming weight and proceed as the passive algorithm. The following proposition provides a lower bound for the query complexity of passive testing of partially symmetric functions. Note that it matches the upper bound, up to a constant factor, when k is constant.    √ Proposition 26. Qp (Symn−k ) = Ω n1/4 2k/2 + k log n . Proof. As in the proof of Proposition 15, we use a combination of two lower bounds. The first one, Ω(n1/4 2k/2 ), is required even when the identity of the k asymmetric variables is known in advance. Assuming we are given the promise that the input function is either (n − k)-symmetric and the asymmetric variables are the first k variables, or it is far from being partially symmetric, one still needs to verify the partial symmetry. The only way to verify it is by having pairs of inputs that share Hamming weight and agree on the values of the   first k variables. However, we expect to see no such pairs if the number of queries is o n1/4 2k/2 . The second part of the lower bound uses the Ω(k log n) bound of Theorem 13. We wish to show that distinguishing the sum of a random k-linear function a random  symmetric function cannot  and √ be distinguished from a random function, given q = o n1/4 k log n queries. Indeed, assume this 3 A single collision happens every time we place a ball in an already occupied bin. 11 many queries were performed and denote by H ⊆ {0, 1, . . . , n} the set of Hamming weights attained by at least two queries. A balls and bins argument shows that we expect only o (k log n) queries whose Hamming weight lies in H. Due to the random symmetric function, the algorithm cannot extract any information from queries that have a unique Hamming weight. Say that we reveal to the algorithm the value of the random symmetric function on H. Now, the algorithm has o(k log n) queries and it must distinguish between a k-linear function and a random function. Even if the algorithm were allowed to choose which queries to pick out of the initial set of q queries, the lower bound for active testing of k-linear functions indicates this cannot be done. Theorem 9 follows from Propositions 25 and 26 and Corollaries 14 and 23, as well as the results of [12]. 4 Low degree polynomials  P  n We prove Theorem 10 for a more general case, allowing 1 ≤ d ≤ n1/3 . Let ≤d = di=0 ni be the n number of monomials of degree at most d. Note that for constant d, we have ≤d = Θ(nd ). Theorem (Restatement of Theorem 10). Qp (Pold ) = Θ( n ≤d ). n (≤d ) , hence by Fact 6 and Proposition 5, passive Proof. The number of polynomials of degree d is 2  n n ) queries. We now show a lower bound of Ω( ≤d ) queries. testing can be done using O( ≤d j  k n /2e random queries performed by a passive Let x1, x2, . . . , xq ∈ Zn2 be the set of q = ≤d n ( ) tester. For i = 1, . . . , q, define yi ∈ Z2≤d to be the d-evaluation of xi , that is, the evaluations of all possible monomials of degree at most d at xi . It suffices to show that {yi } qi=1 are most likely n linearly independent to conclude that any testing algorithm performs badly; indeed, since the ≤d q monomials serve as a basis to Pold , {yi } i=1 being linearly independent implies that every possible output (f (x1 ), . . . , f (xq )) ∈ Zq2 is equally likely when choosing a random f ∈ Pold , so the tester sees a uniform distribution and therefore cannot decide. In order to show that, with high probability, these vectors are linearly independent, we bound the probability that yi is spanned by y1 , . . . , yi−1 , and then apply the union bound to show that none of these events is likely to occur. Let Vi = span {y1 , . . . , yi−1 } be the linear space spanned by the first i − 1 vectors. By Lemma 4 from [6], since dim Vi ≤ i − 1 < q ≤ ! ! d X n ⌈n(1 − 1/d)⌉ /2e ≤ , ≤d i i=0 no more than 2⌈n(1−1/d)⌉ d-evaluations of vectors from Zn2 reside in Vi . Thus, P [yi ∈ Vi ] ≤ 2−⌈n/d⌉ and, by the union bound, P [∃i : yi ∈ Vi ] ≤ q · 2−⌈n/d⌉ = o(1) for d ≤ n1/3 . We now focus on linear functions, for which we determine the passive query complexity up to an additive constant term. We slightly abuse notation by using Pol1 to denote the family of linear functions, even though degree 1 polynomials include both linear and affine functions. Proposition 27. Qp (Pol1 ) = n + Θ(1). Proof. As in the proof of Theorem 10, a linearly independent query set is useless for the testing algorithm. Let x1, x2, . . . , xq be a sequence of q ≤ n queries and define Xi to be the event that 12 xi ∈ span {x1 , . . . , xi−1 }. The probability that some linear dependency exists among the q queries is P " q [ i=1 #  Xi = P  q [ i=1  Xi \ i−1 [ j=1  Xj  = q X i=1  P Xi \ i−1 [ j=1  Xj  ≤ q X 2i−1−n = i=1 2q − 1 . 2n For q > n, surely any set of q queries is linearly dependent. Given the computation above, a set of q ≤ n−2 queries is expected to be linearly dependent with probability smaller than 1/4. On the other hand, n + O(1) queries are very likely to provide a basis for Zn2 and O (1) linear dependencies, so we can learn the unique linear function consistent with the basis and then verify it; if the function is ǫ-far from linear, each additional query is inconsistent with the learned function with a constant probability. Active testing allows us to reduce the query complexity by a logarithmic factor, in comparison to passive testing. We first prove the following lemma, which is an extension of the analysis of the BLR test provided by Bellare et al. [4]. Lemma 28. Given a function f : Zn2 → Z2 that is ǫ-far from being linear, Px1 ,x2 ,...,x2k ∈Zn2 [f (x1 ) + · · · + f (x2k ) = f (x1 + · · · + x2k )] ≤ 1 2 + 12 (1 − 2ǫ)2k−1 P P Proof. Since f is ǫ-far from being linear, when writing it in the Fourier basis f (y) = S⊆[n] fˆ (S) i∈S yi all of its Fourier coefficients {fˆ(S) : S ⊆ [n]} are bounded from above by 1 − 2ǫ. Similar to the analysis for the case k = 1, the success probability of this test is: 1 1 2+2 X S⊆[n] fˆ(S)2k+1 ≤ 12 + 12 max fˆ(S)2k−1 S⊆[n] ! X S⊆[n] fˆ(S)2 = 21 + 12 max fˆ(S)2k−1 ≤ 12 + 21 (1−2ǫ)2k−1 , S⊆[n] where the middle equality holds by Parseval’s theorem. Unlike the BLR test, which uses the case k = 1, in the context of active testing we need k to be almost linear in n, hence little amplification is necessary. Theorem (Restatement of Theorem 11). Qa (Pol1 , u) = Θ(n/ log u), for u ≥ n2 . Proof. As done in the previous proof, we bound the number of queries from below by showing that one is not expected to find a linear dependency of size smaller than n/(2 log u) among a set of u samples. The expected number of linear dependencies of size at most q is at most q X u i=0 i ! 2−n ≤ uq 2−n = 2q log u−n ≤ 2−n/2 , assuming q ≤ n/(2 log u). By Markov’s inequality, the probability of having such a linear dependency is o (1) and therefore Ω( logn u ) queries are needed. Given an input function that is ǫ-far from being linear, we use the test of Lemma 28 to identify u this. Fix q = 4 ⌈n/ log u⌉. Given a sample U of u vectors, it contains q/2 > 2n subsets of size q/2. By the pigeonhole principle two of these sets have the same sum, hence there is a linear dependency of length at most q. On the other hand, by the previous computation, with high probability there is no linear dependency of size less than n/(2 log u) = q/8 hence the length exceeds q/8. By Lemma 28 the probability that f passes a single such test is at most 12 + 12 (1 − 2ǫ)q/8−1 < 21 + 12 (1 − 2ǫ)n/2 log u . Since ǫ is constant, for large enough n this is smaller than 0.9, thus repeating the test a constant number of times reduces the probability of f passing all of them to less than 1/3 (obviously we never reject a linear function). 13 5 Discussion Throughout this work we have demonstrated new bounds for the number of queries needed for active and passive testing of several properties. In particular, we now know the amount of queries needed for testing k-linear functions in these new models. A practical aspect of property testing algorithms that we did not cover is the actual running time, rather than just the number of queries performed, which was the only concern in this work. Some of the algorithms we presented, especially those based on proper learning, have an exponential run-time complexity and it would be interesting to see whether active or passive testing can be done while maintaining polynomial running time. Quite a few of the passive testing algorithms we provided can in fact be made tolerant; that is, they can be modified to accept functions close to satisfying the property while rejecting functions far from satisfying it (with some gap in between). For simplicity we did not explicitly show that. Such modifications usually do not have an effect on the asymptotic query complexity. While Section 4 provides a tight analysis of active and passive testing of linear functions, for low degree polynomials our analysis is only tight for passive testing. Extrapolating based on the behavior of linear functions, it seems natural to expect that the query complexity of active testing of low degree polynomials is asymptotically lower than passive testing, perhaps by a polylogarithmic factor. This question remains open at the moment. Finally we mention that Lemma 18, used in the proof of Theorem 13, can be used in the study of a seemingly unrelated problem of exhibiting a very sharp cutoff phenomenon in the mixing time of random walks in random (dense) Cayley graphs of abelian groups. Indeed, the lemma implies that for any abelian group G of order N , and for (log N )1/3 ≤ k ≤ (log N )1/2−δ , if we choose d ≈ N 1/(k−1) random elements of G, then a random walk of length k − 1 in the resulting Cayley graph of G is far from being mixing (simply because we cannot reach most of the elements at all) while a random walk of length k is already mixing. While it is more interesting to study this problem for much sparser random Cayley graphs (see [22] for some related results), even the above statement for the dense case is interesting. References [1] Noga Alon, Tali Kaufman, Michael Krivelevich, Simon Litsyn, and Dana Ron, Testing lowdegree polynomials over GF(2). In: Proceedings of the 6th International Workshop on Approximation Algorithms for Combinatorial Optimization Problems and 7th International Workshop on Randomization and Approximation Techniques in Computer Science (RANDOM–APPROX ’03), pp. 188–199, 2003. [2] Noga Alon and Joel H. Spencer, The Probabilistic Method (3rd Edition). Wiley, New York, 2008. [3] Maria-Florina Balcan, Eric Blais, Avrim Blum, and Liu Yang, Active property testing. In: Proceedings of the 53rd Annual IEEE Symposium on Foundations of Computer Science (FOCS ’12), pp. 21–30, 2012. [4] Mihir Bellare, Don Coppersmith, Johan Håstad, Marcos Kiwi, and Madhu Sudan, Linearity testing in characteristic two. IEEE Transactions on Information Theory 42(6): 1781–1796, 1996. 14 [5] László Babai, Lance Fortnow, and Carsten Lund. Nondeterministic exponential time has twoprover interactive protocols. Computational Complexity 1(1):3–40, 1991 [6] Ido Ben-Eliezer, Rani Hod, and Shachar Lovett, Random low-degree polynomials are hard to approximate. Computational Complexity 21(1): 63–81, 2012. [7] Arnab Bhattacharyya, Swastik Kopparty, Grant Schoenebeck, Madhu Sudan, and David Zuckerman, Optimal testing of Reed-Muller codes. In: Proceedings of the 51st Annual IEEE Symposium on Foundations of Computer Science (FOCS ’10), pp. 488–497, 2010. [8] Eric Blais, Improved bounds for testing juntas. In: Proceedings of the 11th International Workshop on Approximation Algorithms for Combinatorial Optimization Problems and 12th International Workshop on Randomization and Approximation Techniques in Computer Science (RANDOM–APPROX ’08), pp. 317–330, 2008. [9] Eric Blais, Testing juntas nearly optimally. In: Proceedings of the 41st Annual ACM Symposium on Theory of Computing (STOC’ 09), pp. 151–158, 2009. [10] Eric Blais, Joshua Brody, and Kevin Matulef, Property Testing Lower Bounds via Communication Complexity. Computational Complexity 21(2):311–358, 2012. [11] Eric Blais and Daniel Kane, Tight bounds for testing k-linearity. In: Proceedings of the 15th International Workshop on Approximation Algorithms for Combinatorial Optimization Problems and 16th International Workshop on Randomization and Approximation Techniques in Computer Science (RANDOM–APPROX ’12), pp. 435–446, 2012. [12] Eric Blais, Amit Weinstein, and Yuichi Yoshida, Partially symmetric functions are efficiently isomorphism-testable. Proceedings of the 53rd Annual IEEE Symposium on Foundations of Computer Science (FOCS ’12), pp. 551–560, 2012. Also: SIAM J. on Computing 44(2):411– 432, 2015. [13] Manuel Blum, Michael Luby, and Ronitt Rubinfeld, Self-testing/correcting with applications to numerical problems. In: J. of Computer and System Sciences 47:549–595, 1993. [14] Sourav Chakraborty, Eldar Fischer, David García–Soriano, and Arie Matsliah, Juntosymmetric functions, hypergraph isomorphism, and crunching. In: Proceedings of the 27th Annual IEEE Conference on Computational Complexity (CCC ’12), pp. 148–158, 2012. [15] Hana Chockler and Dan Gutfreund, A lower bound for testing juntas. Information Processing Letters 90(6):301–305, 2004. [16] David Cohn, Les Atlas, and Richard Ladner, Improving generalization with active learning. In: Proceedings of the 15th International Conference on Machine Learning (ICML ’94), pp. 201– 221, 1994. [17] Ilias Diakonikolas, Homin Lee, Kevin Matulef, Krzysztof Onak, Ronitt Rubinfeld, Rocco Servedio, and Andrew Wan. Testing for concise representations. In: Proceedings of the 48th Annual IEEE Symposium on Foundations of Computer Science (FOCS ’07), pp. 549–558, 2007. [18] Paul Erdős and Richard Rado, Intersection theorems for systems of sets. J. London Math. Soc. 35(1): 85–90, 1960. 15 [19] Eldar Fischer, Guy Kindler, Dana Ron, Shmuel Safra, and Alex Samorodnitsky, Testing juntas. J. of Computer and System Sciences 68(4):753–787, 2004. [20] Oded Goldreich, Shafi Goldwasser, and Dana Ron, Property testing and its connection to learning and approximation. J.of the ACM 45(4):653–750, 1998. [21] Michael Kearns and Dana Ron, Testing problems with sublearning sample complexity. J. of Computer and System Sciences 61(3):428–456, 2000. [22] Eyal Lubetzky and Allan Sly, Cutoff phenomena for random walks on random regular graphs. Duke Mathematical Journal 153(3):475–510, 2010. [23] Michael Molloy and Bruce Reed, Graph colouring and the probabilistic method, Springer, 2002. [24] Ronitt Rubinfeld and Madhu Sudan, Robust characterizations of polynomials with applications to program testing. SIAM J. on Computing 25(2):252–271, 1996. [25] Claude E. Shannon, The synthesis of two-terminal switching circuits. Bell System Technical Journal 28(1):59–98, 1949. [26] Michel Talagrand, Concentration of measure and isoperimetric inequalities in product spaces. Publications Mathématiques de l’IHÉS 81:73–203, 1995. [27] Leslie G. Valiant, A theory of the learnable. Communications of the ACM 27(11):1134–1142, 1984. 16
8cs.DS
Best-case Analysis of MergeSort with an Application to the Sum of Digits Problem arXiv:1607.04604v2 [cs.DM] 5 Dec 2016 A manuscript (MS) v2,II intended for future journal publicationI MAREK A. SUCHENEK California State University Dominguez Hills, Department of Computer Science, 1000 E. Victoria St., Carson, CA 90747, USA, [email protected] Abstract An exact formula blg nc X n n B(n) = (blg nc + 1) − 2k Zigzag ( k+1 ), 2 2 k=0 where Zigzag(x) = min(x − bxc, dxe − x), for the minimum number B(n) of comparisons of keys performed by MergeSort on an n-element array is derived and analyzed. The said formula is less complex than any other known formula for the same and can be evaluated in O(logc ) time, where c is a constant. It is shown that there is no closed-form formula for the above. Other variants for B(n) are described as well. Since the recurrence relation for the minimum number of comparisons of keys for MergeSort is identical with a recurrence relation for the number of 1s in binary expansions of all integers between 0 and n (exclusively), the above results extend to the sum of binary digits problem. I c 2016 Marek A. Suchenek. This is a longer (new Sections 7, 8, and 9 added) version v2 of the article [Suc16] deposited at ArXive on July 15, 2016, under the same title. These new Sections contain the detailed analytic proofs of Theorems 2.2, 3.1, and 4.1 that were not included in the original version v1 of this article. Other than that, the current version v2 is identical with the original version v1. II Preprint submitted to arXiv.org for the record as a manuscript. December 6, 2016 M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 2 Keywords: MergeSort, sum of digits, sorting, best case. 2010 MSC: 68W40 Analysis of algorithms, 2010 MSC: 11A63 Radix representation ACM Computing Classification Theory of computation: Design and analysis of algorithms: Data structures design and analysis: Sorting and searching Mathematics of computing: Discrete mathematics: Graph theory: Trees Mathematics of computing: Continuous mathematics: Calculus Contents 1 Introduction 3 2 MergeSort and its best-case behavior 2.1 Recursion tree . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Best-case and its characterization B(n) . . . . . . . . . . . . . 2.3 Zigzag function . . . . . . . . . . . . . . . . . . . . . . . . . . 3 5 5 8 3 A fractal in B(n) 11 4 Computing F̃ (x) and B(n) from one another 16 5 Relationship between the best case and the worst case 18 6 The sum of digits problem 20 7 Proof of Theorem 2.2 page 8, Subsection 2.3 20 8 Proof of Theorem 3.1 page 15, Section 3 23 9 Proof of Theorem 4.1 page 17, Section 4 28 AppendixP A A derivation of the worst-case running time W (n) = ni=1 dlg ie of MergeSort 32 P n+i 36 Appendix B Proof of m−1 i=0 b m c = n M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 3 1. Introduction “One Picture is Worth a Thousand Words” [An advertisement for the San Antonio Light (1918)] Teaching undergraduate Analysis of Algorithms has been a rewarding, although a bit taxing, experience. I was often surprised to learn that many basic problems that clearly belong to its core syllabus had been left unanswered or partially answered. Also, it seemed a bit odd to me that many otherwise decent texts offered unnecessarily imprecise computations1 of several rather fundamental results. In this article, I pursue a seemingly marginal topic, the best-case behavior of a well-known sorting algorithm MergeSort, which pursuit, however, yields some interesting findings that could hardly be characterized as “marginal.” It turns out that - contrary to what a casual student of this subject might believe - computing the exact formula for the number of comparisons of keys that MergeSort performs on any n-element array in the best case is not a routine exercise and leads to a problem that gained some notoriety for being a hard nut to crack analytically: the sum of digits problem. Even more unexpectedly, a relatively straightforward2 formula for the said number of comparisons yields an improvement of a well-known answer to this instance of the sum of digits problem: How many 1s appear in binary representations of all integers between (but not including) 0 and n? 2. MergeSort and its best-case behavior A call to MergeSort inherits an n-element array A of integers and sorts it non-decreasingly, following the steps described below. Algorithm MergeSort 2.1. To sort an n-element array A do: 1. If n ≤ 1 then return A to the caller, 2. If n ≥ 2 then 1 2 A notable exception in this category is [SF13]. Although not quite closed-form. M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 4 (a) pass the first b n2 c elements of A to a recursive call to MergeSort, (b) pass the last d n2 e elements of A to another recursive call to MergeSort, (c) linearly merge, by means of a call to Merge, the non-decreasingly sorted arrays that were returned from those calls onto one nondecreasingly sorted array A0 , (d) return A0 to the caller. A Java code of Merge is shown on the Figure 1. Figure 1: A Java code of Merge, based on a pseudo-code from [Baa91]. Calls to Boolean method Bcnt.incr() count the number of comps. A typical measure of the running time of MergeSort is the number of comparisons of keys, which for brevity I call comps, that it performs while sorting array A. Since no comps are performed outside Merge, the running time of MergeSort can be computed as the sum of numbers of comps performed by all calls to Merge during the execution of MergeSort. Since the minimum number of comps performed by Merge on two list is equal to the length of the shorter list, and any increasingly sorted array on any size N ≥ 2 produces only best-case scenarios for all subsequent calls to Merge, a rudimentary analysis of the recursion tree for MergeSort easily yields the exact formula for the minimum number of comps for the entire MergeSort. The problem arises when one tries to reduce the said formula, which naturally involves long summations, to one that can be evaluated in a logarithmic time. M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 5 2.1. Recursion tree The obvious recursion tree for MergeSort and sufficiently large n is shown on Figure 2. A recursive application of the equality3 Figure 2: A sketch of the recursion 2-tree T for MergeSort for a sufficiently large n, with levels shown on the left and the numbers of nodes shown on the right. The nodes correspond to calls to MergeSort and show sizes of (sub)arrays passed to those calls. The last level is h; it only contains nodes with value 1. The root corresponds to the original call to MergeSort. If a call that is represented by a node p executes further recursive call to MergeSort then these calls are represented by the children of p; otherwise p is a leaf. n n+1 d e=b c (1) 2 2 allows for rewriting of that tree onto one whose first four levels are shown on Figure 3. 2.2. Best-case and its characterization B(n) The best-case arrays of sizes b n2 c and d n2 e for Merge, where n ≥ 2, are those in which every element of the first array is less than all elements of the second one. In such a case, MergeSort performs b n2 c of comps. 3 It can be verified separately for odd and even values of n. M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 6 Figure 3: The first four levels of the recursion 2-tree T from Figure 2, with the equality (1) applied, recursively. The number of comparisons of keys performed in the best case by Merge invoked in step 2c of Algorithm 2.1 as a result to a call to MergeSort corresponding to a node of T is equal to the number that is shown in its left child, highlighted yellow. k All the right children at level k ≥ 1 of T show numbers of the form b 2n+i k+1 c, where i ≥ 2 . Thus all the left children (highlighted yellow) at level k ≥ 1 show numbers of the form k b 2n+i k+1 c, where i < 2 . Thus the following recurrence relation for the least number B(n) of comparisons of keys that MergeSort performs on any n-element array is straightforward to derive from its description given by Algorithm 2.1. B(1) = 0, (2) and, for n ≥ 2, n n n B(n) = b c + B(b c) + B(d e). 2 2 2 Using the equality (1), the recurrence relation (3) is equivalent to: n n n+1 B(n) = b c + B(b c) + B(b c). 2 2 2 (3) (4) A graph of B(n) is shown on Figure 4. Unfolding the recurrence (4) allows for noticing that the minimum number B(n) of comps performed by all calls to Merge is equal to the sum of all values shown at nodes highlighted yellow in the recursion tree T of Figure 3. They may be summed-up level-by-level. One can notice from Figure 3 that the M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 7 120 100 80 60 40 20 10 20 30 40 50 Figure 4: Graph of the solution B(n) of the recurrence (2) and (3). number of comps performed at any level k with the maximal number 2k of nodes is given by this formula: k −1 2X b i=0 n+i c. 2k+1 (5) What is not clear is whether all levels of the recursion tree T are maximal. Fortunately, the answer to this question does not depend on whether given instance of MergeSort is running on a best-case array or on any other case of array. It has been known form a classic analysis of the worst-case running time of MergeSort that every level of its recursion tree T that contains at least one non-leaf, or - in other words - a node that shows value p ≥ 2, is maximal. Appendix A page 32 contains a detailed derivation of that fact. Thus all levels 0 through h − 1 of T are maximal. Therefore, the formula (5) gives the number of comps for every level 0 ≤ k ≤ h − 1. The last level h of T may be not maximal because the level h − 1 may contain leaves, or - in other words - nodes that show value p = 1, where h−1 − 1, and as such do not have any children p = b 2n+i h−1 c for some 0 ≤ i ≤ 2 in level h. However, for each such node the value of b p2 c = b n+i c is 0, so 2h it can be included in summation (5) without affecting its value even though the said value does not correspond to any node in level h. Therefore, the formula (5) gives the number of comps for level k = h. M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 8 Also, the depth of T is blg nc, as the Theorem Appendix A.0.2 page 35 in Appendix A states. Thus the minimum number of comps performed by MergeSort is given by this formula: blg nc 2k −1 X X n+i b k+1 c. 2 k=0 i=0 (6) Unfortunately, the summation (6) contains n−1 non-zero terms, so it cannot be evaluated quickly in its present form. Fortunately, its inner summation (5) can be reduced to a closed-form formula. 2.3. Zigzag function In order to reduce (5) to a closed form, I am going to use function Zigzag defined by: Zigzag (n) = min(x − bxc, dxe − x). (7) The following fact is instrumental for that purpose. Theorem 2.2. For every natural number n and every positive natural number m, m−1 2m−1 X n+i X n+i n c− b c = 2m × Zigzag ( ), (8) b 2m 2m 2m i=0 i=m where Zigzag is a function defined by (7) and visualized on Figure 5. 0.5 -0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 Figure 5: Graph of function Zigzag(x) = min(x − bxc, dxe − x). Proof. The equality (8) can be verified experimentally, for instance, with a help of software for symbolic computation4 . The analytic proof is deferred to Section 7. 4 I used Wolfram Mathematica for that purpose. M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 9 Corollary 2.3. For every natural number n and every positive natural number m, m−1 X n+i n n b c = − m × Zigzag ( ), (9) 2m 2 2m i=0 where Zigzag is a function defined by (7) and visualized on Figure 5. Proof. First, let’s note5 that 2m−1 X b i=0 n+i c = n. 2m (10) From (10) I conclude m−1 X 2m−1 X n+i n+i b c+ b c = n. 2m 2m i=0 i=m Solving equations (8) and (11) for Pm−1 i=0 (11) b n+i c yields (9). 2m Here is the closed-form of the summation (5). Corollary 2.4. For every natural number n and every natural number k, k −1 2X i=0 b n n n+i c = − 2k Zigzag ( k+1 ), k+1 2 2 2 (12) where Zigzag is a function defined by (7) and visualized on Figure 5. Proof. Substitute m = 2k in (9). The following theorem yields the formula (13) for the minimum number B(n) of comps performed by MergeSort. Theorem 2.5. For every natural number n, blg nc 2k −1 blg nc X X n+i X n n b k+1 c = (blg nc + 1) − 2k Zigzag ( k+1 ), 2 2 2 k=0 i=0 k=0 (13) where Zigzag is a function defined by (7) and visualized on Figure 5. 5 Analytic proof of that fact is a straightforward exercise; see Appendix Appendix B page 36. M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 10 Proof. blg nc 2k −1 blg nc X X n+i X n n b k+1 c = ( − 2k Zigzag ( k+1 )) = 2 2 2 k=0 i=0 k=0 blg nc X n n 2k Zigzag ( k+1 ). = (blg nc + 1) − 2 2 k=0 140 120 100 80 60 40 20 0 10 20 30 40 50 Pblg nc P2k −1 n+i n Figure 6: Graphs of functions i=0 b 2k+1 c (bottom line) and 2 (blg nc + 1) − k=0 Pblg nc k n k=0 2 Zigzag ( 2k+1 ) (top line) of equality (13). They coincide with each other for all natural numbers n. Formula (13), although not quite closed-form, comprises of summation with only blg nc + 1 closed-form terms, so it may be evaluated in O(logc ) time, where c is a constant. I will show in Section 3 that (13) does not have a closed form. Graphs of both sides of equality (13) are shown on Figure 6. Once can see that for natural numbers n they coincide with the solution B(n) of recurrences (2) and (3) visualized on Figure 4. Corollary 2.6. For every natural number n, the minimum number B(n) of comps that MergeSort performs while sorting an n-element array is: blg nc X n n 2k Zigzag ( k+1 ), B(n) = (blg nc + 1) − 2 2 k=0 where Zigzag is a function defined by (7) and visualized on Figure 5. (14) M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 11 3. A fractal in B(n) A deceitfully simple expression blg xc X 2k+1 Zigzag ( k=0 x 2k+1 ), (15) half of which occurs in formula (14) of Corollary 2.6, is a formidable adversary for those who may try to turn it into a closed form, although the time required for its evaluation for any given n is O(logc ) 6 . That does not come as a surprise, taking into account that its graph, shown on Figure 7, bears a resemblance of fractal. This can be easily seen as soon as a sawtooth function 2blg xc+1 − x is subtracted from it, yielding the function F (x) given by blg xc F (x) = X 2k+1 Zigzag ( k=0 x 2k+1 ) − 2blg xc+1 + x. (16) 40 30 20 10 0 10 Figure 7: A graph of function tion 2blg xc+1 − x. Since 1 2 ≤ x 2blg xc+1 20 Pblg xc k=0 40 50 60 x 2k+1 Zigzag ( 2k+1 ) plotted against a sawtooth func- < 1, equality (7) implies Zigzag ( 6 30 x x ) = 1 − , 2blg xc+1 2blg xc+1 So, to all practical purposes, (14) is a closed-form formula. M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 or 2blg xc+1 Zigzag ( x 2blg xc+1 12 ) = 2blg xc+1 − x. (17) The equality (17) simplifies definition (16) of function F to blg xc F (x) = X 2k Zigzag ( k=1 x ), 2k (18) visualized on Figure 8. 30 25 20 15 10 5 10 20 30 40 50 60 Pblg xc Figure 8: A graph of function F (x) = k=1 2k Zigzag ( 2xk ) plotted below its tight linear x−1 1 k+1 upper bound y = x−1 +(−1)k ) for 2 (if can be shown that F (x) = 2 whenever x = 3 (2 x k some integer k ≥ 0); also shown below F (x) are the terms 2 Zigzag ( 2k ) of the summation and their tight linear upper bound y = x3 . The function F is a fractal with quasi similarity that repeats at intervals of exponentially growing length. It is a union F = ∞ [ fk (19) k=0 of functions fk , each having an interval [2k , 2k+1 ) as its domain. In other words, for every integer k ≥ 0, fk = F  [2k , 2k+1 ), which, of course, yields (19). (20) M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 13 0.7 0.6 0.5 0.4 0.3 0.2 0.1 -0.2 0.2 0.4 0.6 0.8 1.0 1.2 Figure 9: A graph of the first six (the P∞first 1one is2 0) normalized parts of function of Figure 8 plotted against the line y = i=0 22i+1 = 3 . Also shown (in blue) are the first five terms 21i Zigzag (2i x), i = 0, ..., 4, of sums that occur in the formula (24) for f˜k (x); for each integer n and all x ∈ [n, n + 1), their parts above the X-axis restricted to [n, n + 1) visualize a fragment of an infinite binary search trie T defined as the set of shortest binary expansions of x − bxc with the last digit 1 (if the said binary expansion is finite) being interpreted as the sequence terminator; in particular, the root of T is .1, and if a is a finite binary sequence then the children of binary expansion .a1 are .a01 and .a11 . Let fˆk be the normalized fk on interval [0, 1), defined by: 1 fˆk (x) = k fk (2k (x + 1)), 2 (21) and f˜k be the periodized fˆk by composing it with a sawtooth function x−bxc,7 defined by: f˜k (x) = fˆk (x − bxc). (22) Contracting definitions (20), (21), and (22), yields 1 f˜k (x) = k F (2k (x − bxc + 1)). 2 (23) One can compute8 from (23) the following alternative formula for f˜k (x): f˜k (x) = 7 8 k−1 X 1 Zigzag (2i x). i 2 i=0 (24) The fractional part of x. An elementary geometric argument based on the graph visualized on Figure 9 will do. M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 14 Figure 9 shows functions f˜0 , ..., f˜6 drawn on the same graph. Since each function fk , and - therefore - each function fˆk , and - therefore each function f˜k , are a result of smaller and smaller triangles piled, originating in function Zigzag of definition (18) of function F , on one another as shown on Figure 9, for any integers 0 ≤ i < j, f˜i linearly interpolates f˜j . Because of that, each f˜i linearly interpolates the limit F̃ of all f˜k s defined by: F̃ (x) = lim f˜k (x), (25) k→∞ as Figure 10 illustrates. An application of (24) to (25) yields: ∞ X 1 Zigzag (2i x). F̃ (x) = i 2 i=0 (26) 0.7 0.6 0.5 0.4 0.3 0.2 0.1 -0.2 0.2 0.4 0.6 0.8 1.0 1.2 Figure 10: Functions functions f˜0 (x), f˜1 (x), ... and their limit (the topmost curve) F̃ (x) given by (26). Collapsing the Zigzag(x) would yield the same, albeit scaled-down (by the factor of 2) pattern 21 F̃ (2x), as (26) does imply. Since for every integer n and i ≥ k, 2i 2nk is integer, Zigzag (2i 2nk ) = 0. Therefore, by virtue of (24) and (26), for every non-negative integer k and n, n n F̃ ( k ) = f˜k ( k ). (27) 2 2 This and (24) eliminate the need for infinite summation9 while computing F̃ ( 2nk ). 9 As it appears in (26) M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 15 It can be shown that although a continuous function, F̃ is nowheredifferentiable. As such, it does not have a closed-form formula as any closedform formula on a real interval must define a function have a derivative at every point of that interval, except for a non-dense set of its points. Since F̃ can be expressed in function, described by a closed-form formula, of the righthand side of formula (13), the latter does not have a closed-form formula, either. Theorem 3.1. There is no closed-form formula ϕ(n) the values of which Pblg nc n coincide with k=0 2k Zigzag ( 2k+1 ), for all positive integers n, that is, for every closed-form formula ϕ(n) on function Zigzag there is a positive n such that blg nc X n (28) 2k Zigzag ( k+1 ) 6= ϕ(n), 2 k=0 where Zigzag is a function defined by (7) and visualized on Figure 5. Proof. Follows from the above discussion. A more detailed proof is deferred to Section 8. This way I arrived at the following conclusion. Corollary 3.2. There is no closed-form formula for B(n). Proof. A closed-form formula for B(n) would, by virtue of (14) page 10, yield Pblg nc n a closed-form formula for k=0 2k Zigzag ( 2k+1 ), which by Theorem 3.1 does not exist. Note. One can apply the reverse transformations to those used in Section 3 on function F̃ and construct a fractal function F̆ , shown on Figure 11, given by the equation x F̆ (x) = 2blg xc F̃ ( blg xc ), (29) 2 that for every positive integer n satisfies F̆ (n) = F (n), where F is given by (18). (30) M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 16 20 15 10 5 0 10 20 30 40 50 60 Figure 11: A graph of function F̆ (x) = 2blg xc F̃ ( 2blgx xc ) plotted above a graph of the Pblg xc function F (x) = k=1 2k Zigzag ( 2xk ). 4. Computing F̃ (x) and B(n) from one another Computing values of function F̃ (x) does not have to be as complex as (or more complex than) the definition (26) implies. Of course, for every integer n, F̃ (n) = 0. One can apply some elementary arguments based on a structure visualized on Figure 10 to conclude that 2 1 2 F̃ ( ) = F̃ ( ) = , 3 3 3 (31) (the latter being the maximum of F̃ (x)) or that for every positive integer k, F̃ ( k 1 ) = k. k 2 2 (32) It takes a bit more work to compute F̃ ( 3 3k − 4 )= . k 2 2k (33) It turns out that computing values of function F̃ (x) for every x that has a finite binary expansion can be done easily if an oracle for computing the values of the function B(n) defined by (2) and (3) is given10 . Once that is accomplished, since F̃ (x) is a continuous function and the set of numbers with finite binary expansions is dense in the set R of reals, it allows for fast approximations of F̃ (x) for every real x. 11 10 11 Which is not that surprising after a glance at Figure 11. It helps to remember that F̃ is a periodic function with F̃ (x) = F̃ (x − bxc). M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 Theorem 4.1. For every positive integer n 12 17 and integer k with n ≤ 2k , n n × k − 2B(n) )= . (34) k 2 2k Proof. The equality (34) can be verified experimentally, for instance, with a help of software for symbolic computation4 . The analytic proof is deferred to Section 9. F̃ ( Theorem 4.1 allows for easy computing of B(n) if F̃ ( 2nk ) is given for some k ≥ lg n using this form of (34): Corollary 4.2. For every positive integer n and integer k with n ≤ 2k , n×k n B(n) = − 2k−1 F̃ ( k ). (35) 2 2 Proof. An obvious conclusion from (34). For instance, putting k = blg nc + 1 in (35) easily yields (14). For k = dlg ne we obtain B(n) = n ndlg ne − 2dlg ne−1 F̃ ( dlg ne ) = 2 2 [by (26)] ∞ X 1 ndlg ne n = − 2dlg ne−1 Zigzag (2i dlg ne ) = i 2 2 2 i=0 [since for i ≥ dlg ne, 2i 2dlgn ne is integer and Zigzag (2i 2dlgn ne ) = 0] dlg ne−1 X 1 ndlg ne n dlg ne−1 = −2 Zigzag (2i dlg ne ) = i 2 2 2 i=0 dlg ne−1 n ndlg ne 1 X dlg ne−i − 2 Zigzag ( dlg ne−i ). = 2 2 i=0 2 Substituting k for dlg ne − i we conclude dlg ne ndlg ne 1 X k n 2 Zigzag ( k ), B(n) = − 2 2 k=1 2 a similar to (14) characterization of B(n). 12 Of course, one if free to assume that n is odd here. (36) M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 18 5. Relationship between the best case and the worst case A casual student of MergeSort tends to believe that its worst-case behavior is about twice as bad as its best-case behavior. This, of course, is only approximately true. In this Section, I will derive the exact difference between 2B(n) and W (n) using function F defined by (16) page 11. An exact formula for the number W (n) of comparisons of keys performed by MergeSort in the worst case is known13 and is given for any positive integer n by the following equality: n X W (n) = dlg ie. (37) i=1 From (14) and (16), one can derive 2B(n) = nblg nc − 2blg nc+1 + 2n − F (n) = [by Pn i=1 dlg ie = nblg nc − 2blg nc+1 + n + 1 from [Knu97]] = n X dlg ie − 1 + n − F (n) = i=1 [by (37)] = W (n) − 1 + n − F (n). The above yield the following characterization. Theorem 5.1. For every positive integer n, the difference between twice the number B(n) of comparison of keys performed in the best case and the number W (n) of comparison of keys performed in the worst case by MergeSort while sorting an n-element array is: 2B(n) − W (n) = n − 1 − F (n), where F (n), visualized on Figure 8, is given by (18). Proof. Follows from the above discussion. 13 See (A.7) in the Appendix A. (38) M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 19 In particular, since for every positive integer n, 0 ≤ F (n) ≤ n−1 2 (39) (see Figure 8 for explanation), I conclude with the following tight linear bounds on 2B(n) − W (n). Corollary 5.2. For every positive integer n, the difference between twice the minimum number B(n) and the maximum number W (n) of comparison of keys performed in the worst case by MergeSort while sorting an n-element array satisfies this inequality: n−1 ≤ 2B(n) − W (n) ≤ n − 1. 2 (40) Proof. Follows from (38) and (39). 140 120 100 80 60 40 20 20 40 60 80 100 120 140 Figure 12: A graph of 2B(n) − W (n) shown between graphs of its tight linear bounds n − 1 and n−1 2 . Obviously, 2B(n) − W (n) = n − 1 whenever F (n) = 0, that is, whenever n = 2blg nc . It can be shown that 2B(n) − W (n) = n−1 whenever n = 2 1 k+1 k (2 + (−1) ) for some integer k ≥ 0. 3 A graph of 2B(n) − W (n) and its tight bounds are shown on Figure 12. M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 20 6. The sum of digits problem A known explicit formula, published in [Tro68], for the total number of bits in all integers between 0 and n (not including 0 and n) is expressed in terms of function Zigzag (referred to as 2g in [Tro68]) and is given by:14 Let g(x) be periodic of period 1 and defined on [0, 1] by It has been shown in [McI74] that the recurrence relation for A(n, 2) is the same as the recurrence relation for B(n) given by (2) and (3). Therefore, the formula (13) derived in this paper is equivalent to A(n, 2) given above by the considerably more complicated definition. Interestingly, the above definition can be simplified to (13) along the lines of the elementary derivation of the alternative formula (36) for B(n) on page 1715 . 7. Proof of Theorem 2.2 page 8, Subsection 2.3 In this Section, I provide an analytic proof of the experimentally-derived Theorem 2.2 page 8, Subsection 2.3 that was instrumental for the derivation of a logarithmic-length formula16 for B(n). The result and its proof have a 14 The following are screen shots and an excerpt from [Tro68]. Even more interestingly, if someone did bother to simplify Trollope’s formula of [Tro68] then I am not aware of it. Pblg nc n 16 B(n) = n2 (blg nc + 1) − k=0 2k Zigzag ( 2k+1 ), where Zigzag (x) = min(x − bxc, dxe − x). 15 M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 21 flavor of Concrete Mathematics. Although they are interesting in their own right, they cannot be found in [RGP94]. Theorem 7.1. (Same as Theorem 2.2.) For every natural number n and every positive natural number m, 2m−1 X m−1 X n+i n+i n b c− b c = 2m × Zigzag ( ), 2m 2m 2m i=m i=0 (41) where Zigzag is a function defined by (7) and visualized on Figure 5 page 8. Proof. First, let’s note that m−1 m−1 m−1 X n + i + m m−1 X n+i X n+i 1 n+i n+i X n+i c− b c= b c− b c= (b + c−b c), b 2m 2m 2m 2m 2m 2 2m i=0 i=0 i=0 i=0 i=m 2m−1 X that is, 2m−1 X b i=m m−1 m−1 X n+i X n+i 1 n+i n+i c− b c= (b + c−b c). 2m 2m 2m 2 2m i=0 i=0 (42) Let n = k × 2m + r, (43) where 0 ≤ r < 2m, and let 0 ≤ i < m. We have b k × 2m + r + i 1 r+i 1 n+i 1 + c=b + c=k+b + c 2m 2 2m 2 2m 2 and n+i k × 2m + r + i r+i c=b c=k+b c. 2m 2m 2m Thus, by virtue of (42), b 2m−1 X m−1 m−1 X n+i X r+i 1 n+i r+i b c− b c= (b + c−b c). 2m 2m 2m 2 2m i=m i=0 i=0 We have   1 if r+i 1 r+i b + c−b c=  2m 2 2m 1 2 ≤ r+i 2m 0 otherwise, (44) <1 (45) M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 because r+i + 21 < 2m r+i 1 c − b 2m c ≤ 1. 2 3m 2m + 1 2 22 = 2 so that b r+i + 12 c ≤ 1 and, therefore, b r+i + 2m 2m Let I be defined as I = {i ∈ N | 1 r+i ≤ < 1} = {i ∈ N | m − r ≤ i < 2m − r}. 2 2m (46) By virtue of (45), we have m−1 X i=0 (b X r+i 1 X r+i 1 r+i r+i + c−b c) = (b + c−b c) = 1 = #I, (47) 2m 2 2m 2m 2 2m i∈I i∈I where #(I) denotes the cardinality of I. If r ≤ m then, by (46), #I = m − (m − r) = r. If r > m then, by (46), #I = 2m − r. In any case, #I = min(r, 2m − r) = 2m min( [since 0 ≤ r 2m r r ,1 − )= 2m 2m < 1 so that b r+i c = 0 and d r+i e = 1] 2m 2m = 2m min( r r r r −b c, d e− )= 2m 2m 2m 2m [by the definition (7) of function Zigzag] = 2m × Zigzag ( r )= 2m [since Zigzag is a periodic function with period 1] = 2m × Zigzag (k + r k × 2m + r ) = 2m × Zigzag ( )= 2m 2m [by (43)] = 2m × Zigzag ( n ). 2m Thus n ). 2m From (42), (44), (47), and (48), I conclude (41). #I = 2m × Zigzag ( (48) M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 23 8. Proof of Theorem 3.1 page 15, Section 3 In this Section, I present a brief discussion/motivation of what can be generally considered a closed-form formula for a function from the set of real numbers into a set of real numbers. I provide an analytic proof of Theorem 3.1 page 15, Section 3 that implies the non-existence of closed-form formula for the minimum number B(n) of comparisons of keys by MergeSort while sorting an n-element array. I am going to use the acronym cff as an abbreviation for closed-form formula. For reader’s convenience, the Theorem 3.1 is quoted below as Theorem 8.1. Theorem 8.1. (Same as Theorem 3.1.) There is no cff ϕ(n) the values of Pblg nc n ), for all positive integers n, that is, which coincide with k=0 2k Zigzag ( 2k+1 for every cff ϕ(n) on function Zigzag there is a positive n such that blg nc X 2k Zigzag ( k=0 n 2k+1 ) 6= ϕ(n), (49) where Zigzag is a function defined by (7) and visualized on Figure 5. The rest of this Section constitutes the proof of Theorem 8.1. First, let me use an example of function 2x : R −→ R as an insight of what may be accepted as a cff for a continuous function - like, say, F̃ (x) on the set R of reals or on an interval thereof. One picks a dense17 subset Q of R, with a collection of mappings ρx (i) : N −→ Q, where x ∈ R, given by so that limi→∞ ρx (i) = x. Since for any x ∈ R \ Q, 2x has been ρx (i) = bi×xc i defined as √ i (50) 2x = lim 2ρx (i) = lim 2bi×xc , i→∞ i→∞ √ i limi→∞ 2bi×xc is considered a cff α : R −→ R for 2x . Lemma 8.2. For every positive integer n, F̃ ( 17 n )= 2blg nc In the metric topology of R. n(blg nc + 2) − 2B(n) − 2, 2blg nc (51) M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 24 0.7 0.6 0.5 0.4 0.3 0.2 0.1 -0.2 0.2 0.4 0.6 0.8 Figure 13: A graph of the Blancmange function F̃ (x) = 1.0 1.2 P∞ 1 i i=0 2i Zigzag(2 x). where the function F has been defined by the equality (16) page 11, the function F̃ , visualized on Figure 13 18 , has been defined by the equality (26) page 14, and the function B(n) has been defined by the equations (2) and (4) page 6. Proof. From (16) page 11, I compute blg nc X 2i+1 Zigzag ( i=0 n 2i+1 ) = F (n) + 2blg nc+1 − n, that is, blg nc X 2i Zigzag ( i=0 1 n blg nc ) = F (n) + 2 − . 2i+1 2 2 n Applying (52) to the equality (14) page 10, I conclude B(n) = n 1 n (blg nc + 1) − ( F (n) + 2blg nc − ), 2 2 2 or B(n) = n 1 n (blg nc + 1) − F (n) − 2blg nc + , 2 2 2 that is, 1 n n F (n) = (blg nc + 1) − B(n) − 2blg nc + , 2 2 2 18 Also, together with its partial sums, on Figure 10, page 14. (52) M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 25 or F (n) = n(blg nc + 2) − 2B(n) − 2blg nc+1 . (53) On the other hand, by virtue of (18) page 12, blg nc X F (n) = i=1 n 2i Zigzag ( i ) = 2 [putting j = blg nc − i] blg nc−1 = X blg nc−j 2 Zigzag ( j=0 [since for j ≥ blg nc, 2j n 2blg nc n 2blg nc−j blg nc−1 blg nc )=2 X j=0 1 2j n Zigzag ( blg nc ) = 2j 2 j 2 n ∈ N so that Zigzag ( 2blg nc ) = 0] blg nc =2 ∞ X 2j n 1 Zigzag ( )= 2j 2blg nc j=0 [by (26) page 14] 2blg nc F̃ ( n 2blg nc Thus, F (n) = 2blg nc F̃ ( or ). n 2blg nc ) 1 ) = F (n). 2blg nc 2blg nc Combining equalities (53) and (55) yields F̃ ( F̃ ( n 2blg nc )= 1 2blg nc n (54) (55) (n(blg nc + 2) − 2B(n) − 2blg nc+1 ), or (51). Lemma 8.3. If the function B(n) defined by the equations (2) and (4) has a cff β : N −→ N then the function F̃ (x) defined by the equation (26) page 14 has a cff ϕ : [1, 2) −→ [0, 32 ]. M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 Proof. Let D={ n 2blg nc 26 | n ∈ N} (56) be the set of rationals in the interval [1, 2) with finite binary expansions19 , enumerated by ν(n) : N −→ D given by ν(n) = 2blgn nc and visualized on Figure 14. 2.0 1.8 1.6 1.4 1.2 1.0 0 500 1000 Figure 14: A graph of enumeration ν(n) = 1500 n 2blg nc 2000 of the set D. D is a dense subset of the interval [1, 2) of reals. Indeed, if x ∈ [1, 2) then n for every n ∈ N, b22nxc ∈ D and b2n xc lim = x. n→∞ 2n (57) Hence, for any x ∈ [1, 2), putting n = b2i xc, (58) so that blg nc = blgb2i xcc = blg 2i xc = bi + lg xc = i + blg xc = i 19 It is a trivial exercise to show that every real number with finite binary expansion in the interval [1, 2) is of the form 2blgn nc for some n ∈ N, and it is obvious that every real number of that form has a finite binary expansion and falls into that interval. M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 27 [the last equality holds because 1 ≤ x < 2 so that 0 ≤ lg x < 1 and blg xc = 0], or blg nc = i, (59) we conclude, by virtue of (57), b2i xc )= i→∞ 2i F̃ (x) = F̃ ( lim [by the continuity of F̃ (x)] = lim F̃ ( i→∞ b2i xc )= 2i [by the equality (51) of Lemma 8.2] b2i xc b2i xc(i + 2) − 2B(b2i xc) ib2i xc − 2B(b2i xc) −2 = lim + lim 2 −2 = i→∞ i→∞ i→∞ 2i 2i 2i = lim [by the equality (57)] ib2i xc − 2B(b2i xc) + 2x − 2. i→∞ 2i lim Thus, for any x ∈ [1, 2), ib2i xc − 2B(b2i xc) + 2x − 2. i→∞ 2i F̃ (x) = lim (60) The equality (60) shows that if there is a cff β : N −→ N for function B defined by the equations (2) and (4) page 6 then there is a cff ϕ : [1, 2) −→ [0, 23 ] given by ib2i xc − 2β(b2i xc) lim + 2x − 2 i→∞ 2i for F̃ (x). This completes the proof of Lemma 8.3. Should the nowhere-differentiable function F̃ have a cff , it would be differentiable everywhere except, perhaps, on a non-dense subset of R. The following inductive argument demonstrates that. All atomic cff s are differentiable except, perhaps, on a non-dense subset of R. If a finite number of cff s are differentiable except, perhaps, on non-dense subsets of R then their M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 28 composition is differentiable except, perhaps, on non-dense subsets of R. Thus F̃ has no cff . 20 The above observation, together with Lemma 8.3, complete the proof of Theorem 8.1. 9. Proof of Theorem 4.1 page 17, Section 4 In this Section, I provide an analytic proof of experimentally-derived Theorem 4.1 page 17, Section 4. This result, re-stated by Theorem 9.1 below, allows for practically efficient computations of values of the continuous Blackmange function for reals with finite binary floating-point representations. I also provide some properties (Lammas 9.2, 9.3, and 9.4) of the Zigzag function, given by the equality (7) page 8 and visualized on Figure 5 page 8, that are useful for a neat derivation of a formula for the Blancmange function as (the limit of) a finite sum of some values of the Zigzag function. Let the function21 F̃ , visualized on Figure 13 page 24, be defined by (26) page 14, and B(n), given by (2) and (4) page 6, be the least number of comparisons of keys that MergeSort performs while sorting an n-element array. Theorem 9.1. (Same as Theorem 4.1.) For every positive integer n integer k with n ≤ 2k , F̃ ( n × k − 2B(n) n ) = . 2k 2k 22 and (61) The reminder of this Section constitutes a proof of Theorem 9.1. Note. Function Zigzag, visualized on Figure 5 page 8, has been defined by (7) page 8. Lemma 9.2. For every k ≥ blg nc + 2, 2k Zigzag( n ) = n. 2k (62) √ For instance, function xZigzag( x1 ) is differentiable on [0, 1], except for the non-dense set {0} ∪ { n1 | n ∈ N}. 21 Known as the Blancmange function. 22 Of course, one if free to assume that n is odd here. 20 M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 29 Proof. Let k ≥ blg nc + 2, or 2k ≥ 2 × 2blg nc+1 > 2n, that is 2k > 2n. We have: 0≤b (63) n c≤ 2k [by (63)] ≤b 1 n c=b c=0 2n 2 or b n c = 0. 2k Also, 1≤d (64) n e≤ 2k [by (63)] ≤d n 1 e=d e=1 2n 2 or d n e = 1. 2k Now, 2k Zigzag( (65) n )= 2k [by (7) page 8] = 2k min{ n n n n n n − b k c, d k e − k } = min{n − 2k b k c, 2k d k e − n} = k 2 2 2 2 2 2 [by (64) and (65)] = min{n, 2k − n} = [since by (63), 2k − n ≥ n] = n. Hence, (62) holds. Lemma 9.3. For every k ≥ blg nc + 1, k X i=blg nc+2 n 2i Zigzag( i ) = n × k − n(blg nc + 1). 2 (66) M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 30 Proof. By induction on k. Basis step: k = blg nc + 1. blg nc+1 X L= i=blg nc+2 n 2i Zigzag( i ) = 0. 2 R = n(blg nc + 1) − n(blg nc + 1) = 0. Hence, L = R. This completes the Basis step. Inductive step: k ≥ blg nc + 2. Inductive hypothesis: (66). k+1 X i=blg nc+2 n 2i Zigzag( i ) = 2 k X i=blg nc+2 n n 2i Zigzag( i ) + 2k Zigzag( k ) = 2 2 [by the Inductive hypothesis and by the equality (62) of Lemma 9.2] = n × k − n(blg nc + 1) + n = n × (k + 1) − n(blg nc + 1). Thus k+1 X i=blg nc+2 n 2i Zigzag( i ) = n × (k + 1) − n(blg nc + 1). 2 This completes the Inductive step. Lemma 9.4. For every k ≥ blg nc + 1, k X n n 2 F̃ ( k ) = 2i Zigzag( i ). 2 2 i=1 k Proof. By the definition (26) page 14 of function F̃ , we get: ∞ X 1 n n 2 F̃ ( k ) = 2k Zigzag(2i k ) = i 2 2 2 i=0 k (67) M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 31 [since for every integer x, Zigzag(x) = 0, so that for i ≥ k, Zigzag(2i 2nk ) = 0] = 2k k−1 k−1 X X 1 n i n Zigzag(2 ) = 2k−i Zigzag( k−i ) = i k 2 2 2 i=0 i=0 [putting j = k − i] = k X 2j Zigzag( j=1 n ), 2j which completes the proof of (67). At this point, we are ready to conclude the proof of Theorem 4.1. By virtue of (14) page 10, we have: blg nc 2B(n) = n(blg nc + 1) − X 2k+1 Zigzag( k=0 blg nc+1 = n(blg nc + 1) − X i=1 = n(blg nc + 1) − k X i=1 n 2k+1 )= n 2i Zigzag( i ) = 2 n 2 Zigzag( i ) + 2 k X i i=blg nc+2 n 2i Zigzag( i ) = 2 [by Lemmas 9.3 and 9.4] = n(blg nc + 1) − 2k F̃ ( n n ) + n × k − n(blg nc + 1) = n × k − 2k F̃ ( k ), k 2 2 that is, 2B(n) = n × k − 2k F̃ ( n ), 2k from which (62) follows. This completes the proof of Theorem 4.1. Note. A glance at the proof of Lemma 9.3 suffices to notice that it fails if n > 2k , and so does Theorem 4.1. In particular, for k = blg nc, Lemma 8.2 page 23 yields n n × k − 2B(n) 2n n × k − 2B(n) )= + k −2> k k 2 2 2 2k 2n since for n > 2blg nc , 2blg nc − 2 > 0. F̃ ( (68) M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 32 References [Baa91] Sara Baase. Computer Algorithms: Introduction to Design and Analysis. Addison-Wesley Publishing, 2nd edition, 1991. [Knu97] Donald E. Knuth. The Art of Computer Programming, volume 3. Addison-Wesley Publishing, 2nd edition, 1997. [McI74] M. D. McIlroy. The number of 1’s in binary integers: Bounds and extremal properties. SIAM Journal of Computing, 3(4):255–261, December 1974. [RGP94] Donald Knuth Ronald Graham and Oren Patashnik. Concrete Mathematics: A Foundation for Computer Science. Addison–Wesley, 1994. [SF13] Robert Sedgewick and Philippe Flajolet. An Introduction to the Analysis of Algorithms. Pearson, 2013. [Suc16] Marek A. Suchenek. Best-case analysis of MergeSort with an application to the sum of digits problem (MS). https://arxiv.org/pdf/1607.04604v1, July 18 2016. [Tro68] J. R. Trollope. An explicit expression for binary digital sums. Mathematics Magazine, 41(1):21–25, Jan.–Feb. 1968. APPENDIX Appendix A. P A derivation of the worst-case running time W (n) = n i=1 dlg ie of MergeSort Let’s assume that n ≥ 2 is large enough to spur a cascade of many recursive calls to MergeSort following the recursion tree T , a sketch of which is shown on Figure 2. The nodes in tree T correspond to calls to MergeSort and show sizes of (sub)arrays passed to those calls. The root corresponds to the original call to MergeSort. If a call that is represented by a node p executes further M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 33 recursive calls to MergeSort then these calls are represented by the children of p; otherwise p is a leaf. Thus, T is a 2-tree23 . The levels in tree T are enumerated from 0 to h, where h is the number of the last level of the tree, or - in other words - the depth of T . On Figure 2, they are shown on the left side of the tree. The root is at the level 0, its children are at level 1, its grand children are at level 2, its great grand children (not shown on the sketch) are at level 3, at so on. Clearly, since every call to MergeSort on a sub-array of size ≥ 2 executes two further recursive calls to MergeSort, only the nodes that show value 1 are leaves and all other nodes have 2 children each. Thus, since all nodes in the last level h are leaves, they all show value 1. And since the original input array gets split, eventually, onto n 1-element sub-arrays, the number of all leaves in T is n. (This, however, does not mean that the last level h necessarily contains all the leaves of T .) If a level i has 2i nodes, each of them showing a value ≥ 2, then each such node has 2 children so that level i + 1 has twice the number of nodes in level i, that is, 2i+1 nodes. Since level 0 has 20 nodes, it follows (completion of a proof by induction with the basis and inductive steps outlined above is left as an exercise for the reader) that if k is the level number of any level above which all the nodes show values ≥ 2 then all levels i = 0, ...k contain exactly 2i nodes each. The last level h may contain 2h nodes or less. We are going to show that each level i above level h contains exactly 2i nodes. Here is a very insightful property that we are going to use for that purpose. It states that MergeSort is splitting its input array fairly evenly so that at any level of the recursive tree, the difference between the lengths of the longest sub-array and the shortest sub-array is ≤ 1. This fact is the root cause of good worst-case performance of MergeSort. Property Appendix A.0.1. The difference between values shown by any two nodes in the same level of the recursion tree for MergeSort is ≤ 1. Proof. The Property clearly holds for level 0. We will show that if it holds for level i and i is not the last level of the recursion tree (that is, i < h) then it also holds for the level i + 1. 23 A binary tree whose every non-leaf has exactly 2 children. M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 34 Let us assume that the Property holds for some level i < h. Let c ≤ d be numbers shown by any two (not necessarily distinct) nodes in level i + 1. It suffices to show that d − c ≤ 1. (A.1) Let a ≤ b be the numbers shown by the parents of the mentioned above nodes. Those parents, of course, must reside in the level i. By the inductive hypothesis (that holds for level i), b − a ≤ 1, that is, a ≤ b ≤ a + 1. (A.2) The numbers shown by all their four children are b a2 c, d a2 e, b 2b c and d 2b e, respectively, so the largest difference between any of those four numbers is d 2b e − b a2 c. In particular, d − c is not larger than that. We have: b a d−c≤d e−b c≤ 2 2 [by (A.2)] a a+1 e−b c 2 2 c c+1 [since for any integer c, d 2 e = b 2 c] ≤d =b a+2 a a a c − b c = b + 1c − b c = 2 2 2 2 [since for every x, bx + 1c = bxc + 1] a a = b c + 1 − b c = 1. 2 2 Thus (A.1) holds. This completes the inductive step and completes the proof of the Property. As we have noted, the values shown at all nodes in the last level h are all 1. Thus the values shown at their parents, that reside at level h − 1 are all 2, and the values shown at their grand parents, that reside at level h − 2 are all ≥ 3. Thus, by Property Appendix A.0.1, all nodes at level h − 2 show values ≥ 2, and, therefore (as we have proved before), all levels i = 0, ..., h − 1 have 2i nodes, each, as it has been visualized on Figure 2. M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 35 Theorem Appendix A.0.2. The depth h of the recursion tree T (n) for MergeSort run on an array of size n is h = dlg ne. (A.3) Proof. Since every level of T , except, perhaps, for the last level, has the maximal number of nodes, a 2-tree with n leaves could not be any shorter than T . So, T is a shortest 2-tree with n leaves. Therefore (by a well known fact), its depth h is equal to dlg ne. Thus (A.3) holds. Because each node in any level above h − 1 shows value ≥ 2, it has 2 children. Thus the value it shows is equal to the sum of values shown by its children, as we have indicated at the beginning of this section. From that we conclude (a proof by induction is left as an exercise for the reader) that the sum of values shown at nodes in any level i = 0, ..., h − 1 is the same for each such level. Thus the said sum is equal to the value showed by the only node at level 0, that is, is equal to n. Let a1 , ..., a2i be the values shown at the nodes of some level i = 0, ..., h−1. The number of comps performed by a call to Merge invoked by the call to MergeSort on an array of aj elements is either 0 if aj = 1 (no call to Merge is made) or, as we have shown in the previous section, is aj − 1 if aj ≥ 2. So, in either case, it is aj − 1. Thus the number of comps Ci performed at level i is Ci = (a1 − 1) + ... + (a2i − 1) = (a1 + ... + a2i ) − (1 + ... + 1) = n − 2i . (A.4) | {z } 2i Moreover, since all nodes at the last level h are 1’s Ch = 0. (A.5) Therefore, the total number W (n) of comps that MergeSort performs in the worst case on an n-element array is equal to W (n) = h X Ci = i=0 [by (A.5)] = h−1 X i=0 Ci = M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 36 [by (A.4)] h−1 X = (n − 2i ) = nh − (2h − 1) = nh − 2h + 1 = i=0 [by (A.3)] = ndlg ne − 2dlg ne + 1. This way I have proved the following. Theorem Appendix A.1. The number W (n) of comparisons of keys that MergeSort performs in the worst case while sorting an n-element array is W (n) = ndlg ne − 2dlg ne + 1. (A.6)  Proof follows from the above derivation. Using the well-known24 closed-form formula for that n X W (n) = dlg ie. Pn i=1 dlg ie, I conclude (A.7) i=1 Appendix B. Proof of Pm−1 i=0 b n+i c=n m Theorem Appendix B.0.3. For every natural number n and every positive natural number m, m−1 X n+i c = n. b m i=0 Proof. Let n = km + l, where 0 ≤ l < m. We have km + l + i l+i l+i n+i c=b c = bk + c=k+b c. m m m m Therefore, b m−1 X m−1 m−1 m−1 X l+i X l+i X n+i b c = mk+ b c = mk+ b c = mk+ 1 = mk+l = n. m m m i=0 i=0 i=m−l i=m−l 24 See [Knu97]. M. A. Suchenek: Best-case Analysis of MergeSort (MS) v2 37 References [Baa91] Sara Baase. Computer Algorithms: Introduction to Design and Analysis. Addison-Wesley Publishing, 2nd edition, 1991. [Knu97] Donald E. Knuth. The Art of Computer Programming, volume 3. Addison-Wesley Publishing, 2nd edition, 1997. [McI74] M. D. McIlroy. The number of 1’s in binary integers: Bounds and extremal properties. SIAM Journal of Computing, 3(4):255–261, December 1974. [RGP94] Donald Knuth Ronald Graham and Oren Patashnik. Concrete Mathematics: A Foundation for Computer Science. Addison–Wesley, 1994. [SF13] Robert Sedgewick and Philippe Flajolet. An Introduction to the Analysis of Algorithms. Pearson, 2013. [Suc16] Marek A. Suchenek. Best-case analysis of MergeSort with an application to the sum of digits problem (MS). https://arxiv.org/pdf/1607.04604v1, July 18 2016. [Tro68] J. R. Trollope. An explicit expression for binary digital sums. Mathematics Magazine, 41(1):21–25, Jan.–Feb. 1968. c 2016 Marek A. Suchenek. All rights reserved by the author. A non-exclusive license to distribute this article is granted to arXiv.org.
8cs.DS
arXiv:cond-mat/0407439v1 [cond-mat.mes-hall] 16 Jul 2004 A Theoretical Study on Spin-Dependent Transport of “Ferromagnet/Carbon Nanotube Encapsulating Magnetic Atoms/Ferromagnet” Junctions with 4-Valued Conductances Satoshi Kokado1,2 ∗ and Kikuo Harigaya2,3 † 1 Faculty of Engineering, Shizuoka University, Hamamatsu 432-8561, Japan Research Institute, AIST, Tsukuba 305-8568, Japan 3 Synthetic Nano-Function Materials Project, AIST, Tsukuba 305-8568, Japan (October 11, 2017) 2 Nanotechnology Abstract As a novel function of ferromagnet (FM)/spacer/FM junctions, we theoretically investigate multiple-valued (or multi-level) cell property, which is in principle realized by sensing conductances of four states recorded with magnetization configurations of two FMs; (up,up), (up,down), (down,up), (down,down). In order to sense all the states, 4-valued conductances corresponding to the respective states are necessary. We previously proposed that 4-valued conductances are obtained in FM1/spin-polarized spacer (SPS)/FM2 junctions, where FM1 and FM2 have different spin polarizations, and the spacer depends on spin [J. Phys.: Condens. Matter 15, 8797 (2003)]. In this paper, an ideal SPS is considered as a single-wall armchair carbon nanotube encapsulating magnetic atoms, where the nanotube shows on-resonance or off-resonance at the Fermi level according to its length. The magnitude of the obtained 4valued conductances has an opposite order between the on-resonant nanotube and the off-resonant one, and this property can be understood by considering electronic states of the nanotube. Also, the magnetoresistance ratio between (up,up) and (down,down) can be larger than the conventional one between parallel and anti-parallel configurations. ∗ Electronic mail: [email protected] † Electronic mail: [email protected] 1 I. INTRODUCTION Spin polarized junctions (SPJ) such as ferromagnet(FM)/spacer/FM junctions [1–4] have been recently applied to elements in magnetic random access memories (MRAM) because of their magnetoresistance (MR) effect, which appears when an applied magnetic field changes an angle between magnetizations of two FMs. In the practical use, a spin-valve type, which corresponds to a memory cell of 2 values (1bit) represented by “0” and “1” [5], is usually adopted. For the writing process, the magnetization of only one side of the FM is changed under the applied field so that magnetization configurations between two FMs are parallel (P) or anti-parallel (AP). For the reading process, we use the difference in resistance between the P and AP configurations, the so-called MR effect. For the SPJ, much effort has been made to develop elements in high density memories, which also have high sensitivity for the reading process. Important factors are considered to be (a) large MR ratio, whose expression in the unit of percent is defined by 100 × (ΓP − ΓAP )/ΓAP with ΓP (AP ) being conductance of the P (AP) case, and (b) ultra small junctions. The realistic SPJ for (a) can be, for example, Co-Fe/Al-O/Co-Fe junctions with the MR ratio of 60% at room temperature [2], epitaxially grown Ga1−x Mnx As/AlAs/Ga1−x Mnx As junctions with the MR ratio more than 70% at 8 K [3], and Co/Fe-doped Al2 O3 /Ni80 Fe20 junctions, whose MR ratio was enhanced as compared to the case of an undoped Al2 O3 [4]. On the other hand, candidates of the SPJ for (b) may be FM/nanowire/FM junctions and FM/carbon nanotube/FM junctions [6–11], where it should be noted that the nanotube length is about 200 nm [7,8] or 250nm [6] in actual experiments and their size is very large at the present moment. In the further, however, we appear to see many problems with how to miniaturize the junctions, because challenges for the limits of the junctions size will be more and more severe in spite of the progress of experimental techniques. Studies from another viewpoints far from the miniaturization should be necessary simultaneously. In fact, for other memories [12] such as the Flash memory [13], multiple valued (or multi-level) cell property [13], which allows the plural bits to be stored in each memory cell and accordingly reduces the memory cell size by 1/(the number of bits), has been extensively studied. On the other hand, there are few studies for the SPJ. If such a property is included in the SPJ, they will function as an memory cell, which is more efficient than the conventional one. We here describe the multiple-valued cell property in the general SPJ, based on our previous study [14]. In a possible scheme, recorded states are supposed to be four magnetization configurations of two FMs consisting of (up,up), (up,down), (down,up), (down,down), which are obtained by applying the magnetic fields to the respective FMs. The junctions correspond just to 2bits memory cells. Then, in order to sense all the states, 4-valued conductances corresponding to the respective states are obviously necessary. By paying attention to the magnitude of total magnetization in the whole system, a model to obtain such conductances is considered to be FM1/spin-polarized spacer (SPS)/FM2 junctions, where the FM1 and FM2 have different spin polarizations [15], according to the following procedure. First, a difference of conductances between (up,up) and (down,down) will appear, if the spacer is the SPS, where magnetization in the spacer is pinned. Second, a difference between (up,down) and (down,up) will be obtained by introducing the FM1 and FM2, in addition to the above mentioned SPS. 2 In this paper, as an ideal SPS to observe 4-valued conductances, we adopt a single-wall armchair carbon nanotube encapsulating magnetic atoms [16,17], and investigate the spin dependent transport of “FM1/single-wall armchair carbon nanotube encapsulating magnetic atoms/FM2” junctions using the Green’s function technique. When all spins of magnetic atoms are pinned parallel to the magnetization axes of FM1 and FM2, 4-valued conductances are explicitly obtained at a certain value of an exchange interaction between conduction electron spin and spin of magnetic atoms. The magnitude of the obtained 4-valued conductances has an opposite order between the nanotube with on-resonant behavior and that with off-resonant behavior. Also, the MR ratio between ⇑, ⇑ and ⇓, ⇓ can be larger than the conventional one between P and AP configurations. II. IDEAL SPIN POLARIZED SPACERS TO OBTAIN 4-VALUED CONDUCTANCES We first consider ideal SPSs to certainly observe 4-valued conductances. In the previous study [14], we found that 4-valued conductances tend to be obtained in the case of largely spin-polarized spacer with T↑,↑ − T↓,↓ ∼ 1, T↑,↑ (1) where T↑,↑ and T↓,↓ are transmission coefficients of spin-up and spin-down, respectively, in an expression of the conductance [18,19], Γ= 4π 2 e2 X X Tσ,σ′ D1,σ (EF )D2,σ′ (EF ), h σ=↑,↓ σ′ =↑,↓ (2) with σ (=↑ or ↓) being spin of the conduction electron, D1(2),σ (E) being the local densityof-states (DOS) at an interfacial layer in FM1(2) at the Fermi level EF , and Tσ,σ′ being a spin dependent transmission coefficient including spin-flip process of σ 6= σ ′ . Based on the fact, we give four objectives for the spacer having magnetic atoms, which are (i) to strongly pin the magnetization of magnetic atoms in the spacer parallel to magnetization axes of FMs, (ii) to diminish magnetic couplings between magnetic atoms and FMs, (iii) to make effective couplings between the conduction electron spin and spins of magnetic atoms, which act as much as possible, (iv) to have a long spin-flip scattering length to conserve the spin of conduction electron through the spacer. As for (i), we propose that a coercive field of magnetic particles consisting of magnetic atoms is much higher than ones of FMs. For (ii), we suppose that distances between magnetic atoms and FMs should be controlled so that magnetic dipole-dipole interactions between them become very small and give little influence on the spin dependent conduction. In (iii), 3 we should make a situation so that electrons in all conduction routes can interact with spins of magnetic atoms. For (iv), it is desired that the spin-orbit interaction of a material of the spacer is very small. As a realistic SPS, which could satisfy such objectives, we bear in mind of a carbon nanotube encapsulating magnetic atoms [16,17] by the following reasons: First, the size of a particle consisting of magnetic atoms may be close to that of a single domain particle by tuning conditions of fabrication, where the single domain particle has a high coercive field. The coercive field was recently observed as about 0.5 kOe at 300 K even for Fe particles encapsulated with non-single domain size of about 70 nm [16]. Furthermore, for only the magnetic particle, it was experimentally shown that the Fe2 O3 nanoparticle with the diameter of 6.3 nm has the coercive field of 1 kOe at 300 K [20]. If such the particle can be encapsulated in the nanotube, the nanotube will act as the ideal SPS. Second, magnetic atoms can be encapsulated in the inner region of the nanotube [16], where distances between the atoms and nanotube edges could be tuned by controlling nanotube growth processes. Third, since the encapsulated magnetic atoms are completely surrounded by carbon atoms, electrons in all conduction routes can interact with spins of magnetic atoms. Here, magnitude of couplings may be also tunable by controlling nanotube growth processes, because they strongly depend on distances between carbon atoms and magnetic atoms. Fourth, the nanotube itself has very long spin-flip scattering lengths which extend to 130 nm at least [6]. III. “FM1/CARBON NANOTUBE ENCAPSULATING MAGNETIC ATOMS/FM2” JUNCTIONS A. Model and method We focus on “FM1/single-walled armchair carbon nanotube encapsulating magnetic atoms/FM2” junctions, where magnetic atoms are located in the center of the nanotube. Figure 1 shows a simplified model, in which the FM has a simple cubic structure, the xdirection of FMs is set to be semi-infinite, and their yz-directions have the periodic boundary condition by being regarded as an infinite system. The armchair nanotube has a finite length, and then it is regarded just as an armchair ribbon [21] with short periodicity. The each edge carbon atom of the nanotube is assumed to interact with its nearest atom of the cubic lattice of the FM. On the other hand, the encapsulated magnetic atoms have localized spins. We here assume that their spins are divided into several spin clusters which interact with their nearest carbon atoms respectively, and all the spin clusters have the identical total spin. The total spin is approximately represented by a classical spin S on the assumption that the spin cluster consists of many spins, and further every S is set to have the same direction. Now, each S is arrayed along two dimer lines of the nanotube, and it has one to one interaction with carbon atoms in their lines. According to the theory on magnetic impurity problem [22], we take into account antiferromagnetic exchange interactions between conduction electron spins and S’s, where all the exchange interactions are here set to be same. Also, interactions between S’s and spins of FMs are neglected by assuming that they have little influence on the spin dependent conduction, under a balance between their coercive fields and magnetic fields due to respective spins. The balance is actually sensitive to distances between magnetic atoms and FMs. 4 Using a single orbital tight-binding model with nearest neighbor transfer integrals, the Hamiltonian is given by, Htotal = H + V, H = H10 + H20 + HN T , HN T = HN0 T + Hmag , (3) (4) (5) with Hu0 = ei,σ c†i,σ ci,σ + XX i∈u σ X X  ti,j c†i,σ cj,σ + h.c. , hi,ji∈u σ (6) for u=1, 2, NT , Hmag =  X i∈mag ∆e X c†i,σ ci,σ − J σ X σ,σ′  σσ,σ′ · Sc†i,σ ci,σ′  , (7) V = XX vi,j c†i,σ cj,σ  + h.c. , hi,ji σ (8) 0 where H1(2) is Hamiltonian for the FM1 (FM2), HN0 T is that for the carbon nanotube, and Hmag denotes interactions between the encapsulated magnetic atoms and the respective P nearest carbon atoms, where i∈mag means that the summation is taken for carbon atoms interacting with magnetic atoms. The term V represents couplings between FMs and the nanotube, where the each edge carbon atom of the nanotube couples to its nearest atom of the cubic lattice of the FM. Here, ci,σ (c†i,σ ) is the annihilation (creation) operator of an electron with spin-σ (=↑ or ↓) at the i-th site, ti,j and vi,j are transfer integrals between the i-th site and the j-th site, and ei,σ denotes the on-site energy for spin-σ at the i-th site. Furthermore, ∆e is the difference of energy between the pure carbon atom and the carbon atom interacting with the magnetic atoms, J is the antiferromagnetic exchange integral with negative sign [22], and σσ,σ′ is the (σ, σ ′ ) component of the Pauli matrix for the conduction electron spin. Also, S [= (Sx , Sy , Sz )] represents the classical spin with S ≡ |S|. Within the Green’s function technique [18,19], we calculate the conductance at zero temperature, which is written by, 4π 2 e2 Tr[D̂1 T̂ † D̂2 T̂ ], h T̂ = V + V G† V, G = (EF + i0 − Htotal )−1 , Γ= (9) (10) (11) with 1 D̂u = − ImG0u , π 0 Gu = (EF + i0 − Hu0 )−1 , 5 (12) (13) for u=1, 2. Here, D̂1(2) is the density-of-states (DOS) operator at EF of the FM1(2), and T̂ is the T -matrix. We below name Γ for the respective magnetization configurations as Γm1,m2 , where m1 (m2) is the magnetization state of FM1 (FM2), which is ⇑ or ⇓. Using these conductances, we obtain the MR ratio in the unit of percent, which is defined by Rm1,m2 = 100 × Γ⇓,⇓ − Γm1,m2 , Γ⇓,⇓ (14) where m1 (m2) is the magnetization state of FM1 (FM2) with ⇑ or ⇓. In this calculation, we choose parameters as follows: We set ti,j = t (< 0) [23] and vi,j = 0.1t, assuming that v is smaller than t because of different types between two orbitals, imperfect lattice matches at the interface, and so on. When EF =0, ei,↑ /|t| (ei,↓ /|t|) is 5.1 (5.7) for the FM1 and 5.175 (5.625) for the FM2 [24], by considering that the s-orbital, which is spin-polarized by coupling to the localized d-orbitals, contributes to the transport of the FMs. The spin polarization [15] at the interfacial layer of the FM1 (FM2) at EF , P1 (P2 ), is then evaluated to be about 0.45 (0.25) [25]. For the carbon atom, ei,↑ /|t| (ei,↓ /|t|) is set to be 0 (0) by focusing on its π orbital. By taking into account that the π orbital is coupled to d-orbitals of the magnetic atoms, whose energies are lower than ei,↑ /|t| and ei,↓ /|t| of the π orbital, ∆e/|t| is considered to be positive and it is put as 0.2. Also, the number of unit cells in the circumference direction of the nanotube is 10. The number of dimer lines [21] N is 20, 21, and 22, which correspond to nanotubes with the on-resonance, the off-resonance, and the off-resonance at EF , respectively [10,21]. It is well known that the armchair nanotube shows the on-resonant behavior for N = 3M − 1, the off-resonant one for N = 3M, and the off-resonant one for N = 3M + 1, respectively, with M being an integer [10,21]. For N=20 and 21, the spin, S, is arrayed at each carbon atom in 10-th and 11-th dimer lines of the nanotube, while it is arrayed at each carbon atom in its 11-th and 12-th dimer lines for N=22. In each N, the number of S’s is 40, which is obtained from the relation of (the number of unit cells in the circumference direction of the nanotube) × (the number of dimer lines with S’s) × (the number of sublattices in the unit cell)= 10 × 2 × 2. Furthermore, S’s are considered to exist parallel to yz-plane, and an angle between S’s and z-axis is written as θ. B. Calculated results and considerations In the upper panel of Fig. 2(a), we show −JS/|t| dependence of the conductance, Γm1,m2 , for θ=0 in the case of N=20. At JS/|t|=0, Γm1,m2 has a difference only between P and AP configurations. For JS/|t| = 6 0, differences among all conductances appear, and become largest in the vicinity of JS/|t|=−0.2. Also, Γm1,m2 has a relation of Γ⇓,⇓ > Γ⇑,⇓ > Γ⇓,⇑ > Γ⇑,⇑ for a wide range of −0.8 < JS/|t| < 0. The middle and lower panels of Fig. 2(a) show Γm1,m2 for θ=0 in the case of N=21 and 22, respectively. In the case of N=21, differences among all conductances become large in the vicinity of JS/|t|=−0.4, while they do in the vicinity of JS/|t|=−0.75 in the case of N=22. It should be noted that Γm1,m2 of N=21 and 22 has a relation of Γ⇑,⇑ > Γ⇓,⇑ > Γ⇑,⇓ > Γ⇓,⇓ for a wide range of −0.8 < JS/|t| < 0, and its order is opposite to that of N=20. 6 The behavior of conductances can be understood by considering electronic states in the center of the nanotube, where magnetic atoms are encapsulated. We therefore investigate the local DOS, defined by, X 1 Local DOS = − Im hi|(EF + i0 − HN T )−1 |ii, π i∈mag (15) where |ii represents the orbitals of carbon atoms interacting with magnetic atoms, and P i∈mag means that the summation is taken for those carbon atoms. In the upper, middle, lower panels of Fig. 3(a), we show the local DOS for ∆e/|t|=0 and JS/|t|=0, ∆e/|t|=0.2 and JS/|t|=0, and ∆e/|t|=0.2 and JS/|t|=−0.2, respectively, in the case of N=20. For ∆e/|t|=0 and JS/|t|=0, i.e., the case of no encapsulated atoms, small peaks of spin-up and spin-down are found at EF (=0), as shown in the upper panel of Fig. 3(a). The feature just represents the on-resonance at EF . The peaks originate from wave functions at the Gamma point [21], which are delocalized over the whole nanotube. For ∆e/|t|=0.2 and JS/|t|=0, i.e., the case of encapsulated nonmagnetic atoms, the peaks of spin-up and spin-down are shifted to higher energy with the same magnitude [see middle panel of Fig. 3(a)]. Then, 2-valued conductances are obtained because of no difference of local DOSs between spin-up and spin-down. On the other hand, for ∆e/|t|=0.2 and JS/|t|=−0.2, i.e., the case of encapsulated magnetic atoms, the peak of spin-down is close to EF as shown in the lower panel of Fig. 3(a). Since the electron favors to transmit when the DOS is large around EF , transmission of spin-down electron increases compared to that of spin-up electron. By taking into account the spin dependent DOSs of FMs with P1 =0.45 and P2 =0.25, Γ⇓,⇓ (Γ⇑,⇑) becomes largest (smallest) in all conductances, while Γ⇑,⇓ and Γ⇓,⇑ are present between Γ⇓,⇓ and Γ⇑,⇑ , and Γ⇑,⇓ > Γ⇓,⇑ is realized also. The upper, middle, lower panels of Fig. 3(b) show the local DOS for ∆e/|t|=0 and JS/|t|=0, ∆e/|t|=0.2 and JS/|t|=0, ∆e/|t|=0.2 and JS/|t|=−0.4, respectively, in the case of N=21. In the upper panel of Fig. 3(b), no peaks are found at EF for ∆e/|t|=0 and JS/|t|=0. It represents the off-resonance at EF . By setting ∆e/|t|=0.2 and JS/|t|=0, peaks of spin-up and spin-down near EF are shifted to higher energy with the same magnitude as shown in middle panel of Fig. 3(b), and then 2-valued conductances are obtained. For ∆e/|t|=0.2 and JS/|t|=−0.4, the peak of spin-up appears in the vicinity of EF [see the lower panel of Fig. 3(b)]. Therefore, based on the DOSs of the FMs, Γ⇑,⇑ (Γ⇓,⇓ ) is largest (smallest) in all conductances, while Γ⇑,⇓ and Γ⇓,⇑ are present between Γ⇑,⇑ and Γ⇓,⇓ , and also Γ⇓,⇑ > Γ⇑,⇓ is realized. The case of N=22 can be understood based on the local DOSs shown in Fig. 3(c), too. We systematically understand the above peak shifts as follows: When the carbon atom interacts with the magnetic atoms, its energy levels of spin-up are shifted to high energy, while its energy levels of spin-down are not largely altered, owing to ∆e/|t| > 0 and JS/|t| < 0. For the on-resonant nanotube, in which energy levels of spin-up and spin-down exist at EF for ∆e/|t|=JS/|t|=0, the energy levels of spin-down are closer to EF than those of spinup when ∆e/|t| > 0 and JS/|t| < 0. On the other hand, for the off-resonant nanotube, in which no energy levels of spin-up and spin-down exist at EF for ∆e/|t|=JS/|t|=0, the energy levels of spin-up near the top of the valence band approach to EF by setting ∆e/|t| > 0 and JS/|t| < 0. The MR ratio Rm1,m2 is shown in Fig. 2(b). In all panels, at JS/|t|=0, Rm1,m2 is finite 7 only between P and AP configurations and |Rm1,m2 | is about 15%. For a wide range of −0.8 < JS/|t| < 0, |Rm1,m2 | between P and AP configurations can be more than 15%. It should be emphasized that |Rm1,m2 | between ⇑, ⇑ and ⇓, ⇓ is larger than the conventional one between P and AP configurations. This feature is consistent with results for the case of the largely spin-polarized spacer with (T↑,↑ − T↓,↓ )/T↑,↑ ∼ 1 in the previous work [14]. Also, it is characteristic that for a wide range of −0.8 < JS/|t| < 0, Rm1,m2 ’s of N=20 and N=21 and 22 exhibit the positive MR and the negative one, respectively, reflecting the opposite order of Γm1,m2 between them. In the following, we consider the θ dependence of Γm1,m2 and Rm1,m2 , shown in Figs. 4(a) and (b), respectively. In each figure, the upper, middle, and lower panels are cases of JS/|t|=−0.2 of N=20, JS/|t|=−0.4 of N=21, and JS/|t|=−0.8 of N=22, respectively. A condition of θ/π=−0.5 (0) represents that S’s are oriented in the −y (z) direction. In all panels, at θ/π = −0.5, only the difference of Γm1,m2 between the P and AP configurations is present, and then |Rm1,m2 | between them takes small values of less than 5 %, because of the spin-flip transmission. As θ approaches to 0, differences of Γm1,m2 among all configurations become large, because a difference of diagonal elements of T̂ with regards to spin between spin-up and spin-down increases. Further, |Rm1,m2 | between ⇑,⇑ and ⇓,⇓ increases, too. IV. CONCLUSION For “FM1/armchair carbon nanotube encapsulating magnetic atoms/FM2” junctions, we theoretically investigated the multiple-valued cell property, which is in principle realized by sensing four states recorded with the magnetization configurations of two FMs. The obtained 4-valued conductances are strongly influenced by electronic states of the nanotube, and directions of spins of magnetic atoms. The order of magnitude of 4-valued conductances is opposite between the on-resonant nanotube and the off-resonant one. Furthermore, the MR ratio between (up,up) and (down,down) can be larger than the conventional one between P and AP configurations. From the viewpoint of device applications, we expect that the present junctions will be a candidate for elements of the 2bits/cell MRAM. At the same time, the junctions with magnetization reversals between ⇑, ⇑ and ⇓, ⇓ may be more efficient magnetic sensor than the conventional spin-valve type [5], in the case of the largely spin-polarized spacer. V. ACKNOWLEDGEMENTS This work has been supported by Special Coordination Funds for Promoting Science and Technology, Japan. One of the authors (K.H.) acknowledges the partial financial support from NEDO via Synthetic Nano-Function Materials Project, AIST, Japan, too. 8 REFERENCES [1] T. Miyazaki and N. Tezuka, J. Magn. Magn. Mater. 139, L231 (1995); J. S. Moodera, L. R. Kinder, T. M. Wong, and R. Meservey, Phys. Rev. Lett. 74, 3273 (1995). [2] M. Tsunoda, K. Nishikawa, S. Ogata, and M. Takahashi, Appl. Phys. Lett. 80, 3135 (2002). [3] M. Tanaka and Y. Higo, Phys. Rev. Lett. 87, 026602 (2001). [4] R. Jansen and J. S. Moodera, Appl. Phys. Lett. 75, 400 (1999). [5] For example, see S. S. Parkin, K. P. Roche, M. G. Samant, P. M. Rice, R. B. Beyers, R. E. Scheuerlein, E. J. O’Sullivan, S. L. Brown, J. Bucchigano, D. W. Abraham, Yu. Lu, M. Rooks, P. L. Trouilloud, R. A. Wanner, W. J. Gallagher, J. Appl. Phys. 85, 5828 (1999). [6] K. Tsukagoshi, B. W. Alphenaar, and H. Ago, Nature 401, 572 (1999). [7] B. Zhao, I. Mönch, T. Mühl, H. Vinzelberg, and C. M. Schneider, Appl. Phys. Lett. 80, 3144 (2002). [8] B. Zhao, I. Mönch, T. Mühl, H. Vinzelberg, and C. M. Schneider, J. Appl. Phys. 91, 7026 (2002). [9] J. -R. Kim, H. M. So, J. -J. Kim, and J. Kim, Phys. Rev. B 66, 233401 (2002). [10] H. Mehrez, J. Taylor, H. Guo, J. Wang, and C. Roland, Phys. Rev. Lett. 84, 2682 (2000). [11] S. Kokado and K. Harigaya, Phys. Rev. B 69, 132402 (2004); S. Kokado and K. Harigaya, Synth. Metals 135, 745 (2003). [12] For example, see N. Takahashi, H. Ishikuro, and T. Hiramoto, Appl. Phys. Lett. 76, 209 (2000). [13] R. V. Giridhar, Jpn. J. Appl. Phys. 35, 6347 (1996). [14] S. Kokado and K. Harigaya, J. Phys.: Condens. Matter 15, 8797 (2003). [15] The spin polarization is defined by P1(2) = (D1(2),↑ − D1(2),↓ )/(D1(2),↑ + D1(2),↓ ), where D1(2),↑ is the density-of-states (DOS) at the Fermi level of the FM1(2) for spin-up and D1(2),↓ is that of the FM1(2) for spin-down. Also, for the spin polarization at the interfacial layer, the DOS at the interfacial layer is used as D1(2),↑ . For example, see J. M. De Teresa, A. Barthelemy, A. Fert, J. P. Contour, F. Montaigne, and P. Seneor, Science 286, 507 (1999). [16] For carbon nanotubes encapsulating magnetic atoms at the edge, X. X. Zhang, G. H. Wen, S. Huang, L. Dai, R. Gao, Z. L. Wang, J. Magn. Magn. Mater. 231, L9 (2001). [17] For carbon nanotubes encapsulating magnetic atoms in the inner region, X. Zhao, S. Inoue, M. Jinno, T. Suzuki, and Y. Ando, Chem. Phys. Lett. 373, 266 (2003). [18] T. N. Todorov, G. A. D. Briggs, and A. P. Sutton, J. Phys.: Condens. Matter 5, 2389 (1993). [19] S. Kokado, M. Ichimura, T. Onogi, A. Sakuma, R. Arai, J. Hayakawa, K. Ito, and Y. Suzuki, Appl. Phys. Lett. 79, 3986 (2001). [20] Y. Ichiyanagi and Y. Kimishima, J. Therm. Anal. Cal., 69, 919 (2002). As a relevant report, see Y. Ichiyanagi, T. Uozumi, and Y. Kimishima, Trans. Mater. Res. Soc. Jpn. 26 [4], 1097 (2001). [21] K. Wakabayashi, M. Fujita, H. Ajiki, and M. Sigrist, Phys. Rev. B 59, 8271 (1999). [22] J. R. Schrieffer and P. A. Wolff, Phys. Rev. 149, 491 (1966). [23] In the previous work [10], t was set to be −2.75 eV. 9 [24] To approximately describe the s-electron within the tight-binding model, we consider that EF is located near the bottom of an energy dispersion relation. The dispersion relation near the bottom is similar to that of the free electron, which is characteristic of the s-electron. For example, see H. Itoh, A. Shibata, T. Kumazaki, J. Inoue, and S. Maekawa, J. Phys. Soc. Jpn. 68, 1632 (1999). [25] Materials with P1 ∼0.45 correspond nearly to Co, Fe, and Ni80 Fe20 , while P2 ∼0.25 is Ni. J. S. Moodera and G. Mathon, J. Magn. Magn. Mater. 200, 248 (1999). 10 FIGURES Magnetic atoms z x y Carbon nanotube FM1 FM2 FIG. 1. A schematic illustration of spin-polarized junctions with the carbon nanotube, where magnetic atoms are encapsulated in the center of the nanotube. Electric currents flow in the x-direction. 11 –2 [×10 ] 4 : : : 2 0 : 0 0.2 0.4 0.6 0.8 0 0.2 0.4 0.6 0.8 0 0.2 0.4 0.6 0.8 Γm1,m2/(e2/h) –2 [×10 ] 1.5 1 0.5 0 –2 [×10 ] 0.8 0.6 0.4 0.2 0 (a) –JS/|t| 100 50 Rm1,m2 [%] 0 0 0.2 0.4 0.6 0.8 0 0.2 0.4 0.6 0.8 0 0.2 0.4 0.6 0.8 0 –100 –200 0 –50 –100 –150 (b) –JS/|t| FIG. 2. (a) The conductance Γm1,m2 vs −JS/|t| for θ=0 and ∆e/|t|=0.2. The meanings of dots in all panels are : Γ⇓,⇓ , ▽: Γ⇑,⇓ , ✷: Γ⇓,⇑ , △: Γ⇑,⇑ . (b) The MR ratio Rm1,m2 vs −JS/|t| for θ=0 and ∆e/|t|=0.2. In each figure, the upper, middle, and lower panels are cases of N =20, 21, and 22, respectively. The meanings of dots in all panels are : R⇓,⇓ , ▽: R⇑,⇓ , ✷: R⇓,⇑ , △: R⇑,⇑ . 12 0.5 Spin–up Local DOS [states/|t|] 0 Spin–down 0.5 –1 0.5 –0.5 0 0.5 1 0.5 1 0.5 1 0.5 1 0.5 1 0.5 1 0.5 1 0.5 1 Spin–up 0 Spin–down 0.5 –1 0.5 –0.5 0 Spin–up 0 Spin–down (a) 0.5 –1 –0.5 0 E/|t| 0.5 Spin–up Local DOS [states/|t|] 0 Spin–down 0.5 –1 0.5 –0.5 0 Spin–up 0 0.5 –1 0.5 Spin–down –0.5 0 Spin–up 0 (b) 0.5 –1 Spin–down –0.5 0 E/|t| 0.5 Spin–up Local DOS [states/|t|] 0 Spin–down 0.5 –1 0.5 –0.5 0 Spin–up 0 Spin–down 0.5 –1 0.5 –0.5 0 Spin–up 0 Spin–down (c) 0.5 –1 –0.5 0 0.5 1 E/|t| FIG. 3. The local DOS in the center of the nanotube, where magnetic atoms are encapsulated. (a) The case of N =20. Upper panel: ∆e/|t|=0 and JS/|t|=0. Middle panel: ∆e/|t|=0.2 and JS/|t|=0. Lower panel: ∆e/|t|=0.2 and JS/|t|=−0.2. (b) The case of N =21. Upper panel: ∆e/|t|=0 and JS/|t|=0. Middle panel: ∆e/|t|=0.2 and JS/|t|=0. Lower panel: ∆e/|t|=0.2 and JS/|t|=−0.4. (c) The case of N =22. Upper panel: ∆e/|t|=0 and JS/|t|=0. Middle panel: ∆e/|t|=0.2 and JS/|t|=0. Lower panel: ∆e/|t|=0.2 and JS/|t|=−0.8. Here, EF =0 is set. 13 –2 [×10 ] 4 2 : : : : 0 Γm1,m2/(e2/h) –0.5 –0.4 –0.3 –0.2 –0.1 –2 [×10 ] 1.5 0 1 0.5 0 –0.5 –0.4 –0.3 –0.2 –0.1 –2 [×10 ] 0.8 0 0.6 0.4 0.2 0 –0.5 –0.4 –0.3 –0.2 –0.1 0 –0.5 –0.4 –0.3 –0.2 –0.1 0 –0.5 –0.4 –0.3 –0.2 –0.1 0 –150 –0.5 –0.4 –0.3 –0.2 –0.1 0 θ/π (a) 100 50 0 Rm1,m2 [%] 0 –100 –200 0 –50 –100 θ/π (b) FIG. 4. (a) The conductance Γm1,m2 vs θ. The meanings of dots in all panels obey those of Fig. 2(a). (b) The MR ratio Rm1,m2 vs θ. In each figure, the upper, middle, and lower panels are cases of JS/|t|=−0.2 of N =20, JS/|t|=−0.4 of N =21, and JS/|t|=−0.8 of N =22, respectively. The meanings of dots in all panels obey those of Fig. 2(b). 14
5cs.CE
Orthogonal Series Density Estimation for Complex Surveys Shangyuan Ye, Ye Liang and Ibrahim A. Ahmad arXiv:1709.06588v2 [stat.ME] 26 Sep 2017 Department of Statistics, Oklahoma State University Abstract We propose an orthogonal series density estimator for complex surveys, where samples are neither independent nor identically distributed. The proposed estimator is proved to be design-unbiased and asymptotically design-consistent. The asymptotic normality is proved under both design and combined spaces. Two data driven estimators are proposed based on the proposed oracle estimator. We show the efficiency of the proposed estimators in simulation studies. A real survey data example is provided for an illustration. Keywords: Nonparametric, asymptotic, survey sampling, orthogonal basis, HorvitzThompson estimator, mean integrated squared error. 1 Introduction Nonparametric methods are popular for density estimations. Most work in the area of nonparametric density estimation was for independent and identically distributed samples. However, both assumptions are violated if the samples are from a finite population using a complex sampling design. Bellhouse and Stafford (1999) and Buskirk (1999) proposed kernel density estimators (KDE) by incorporating sampling weights, and their asymptotic properties were studied by Buskirk and Lohr (2005). Kernel methods for clustered samples and stratified samples were studied in Breunig (2001) and Breunig (2008), respectively. One disadvantage of the KDE is that all samples are needed to evaluate the estimator. However, in some circumstances, there is a practical need to evaluate the estimator without using all samples for confidentiality or storage reasons. For example, many surveys are routinely conducted and sampling data are constantly collected. Data managers want to publish exact estimators without releasing all original data. In Section 6, we provide a real data example from Oklahoma M-SISNet, which is a routinely conducted survey on climate policies and public views. The orthogonal series estimators are useful alternatives to KDEs, without needing to release or store all samples. 1 The basic idea of the orthogonal series method is that any square integrable function f , in our case a density function, can be projected onto an orthogonal basis {ϕj }: f (x) = P∞ j=0 θj ϕj (x), where θj = Z ϕj (x)f (x)dx = E(ϕj (X)) (1) is called the jth Fourier coefficient. Some of the work in orthogonal series density estimation (OSDE) was covered in monographs by Efromovich (1999) and Tarter and Lock (1993), among others. Efromovich (2010) gave a brief introduction of this method. Walter (1994) discussed properties of different bases. Donoho et al. (1996) and Efromovich (1996) studied data driven estimators. Asymptotic properties were studied by Pinsker (1980) and Efromovich and Pinsker (1982). In this paper, we study the OSDE for samples from complex surveys. To the best of our knowledge, no previous work has been done on developing OSDE for finite populations. We propose a Horvitz-Thompson type of OSDE, incorporating sampling weights from the complex survey. We show that the proposed OSDE is design-unbiased and asymptotically design-consistent. We further prove the asymptotic normality of the proposed estimator. We compare the lower bound of minimax mean integrated squared error (MISE) with the I.I.D. case in Efromovich and Pinsker (1982). We propose two data driven estimators and show their efficiency in a simulation study. Finally, we analyze the M-SISNet survey data using the proposed estimation. All proofs to theorems and corollaries are given in the appendix. 2 Notations Consider a finite population labeled as U = {1, 2, ..., N}. A survey variable x is associated with each unit in the finite population. A subset s of size n is selected from U according to some fixed-size sampling design P̧(·). The first and second order inclusion probabilities from the sampling design P̧(·) are πi = Pr(i ∈ s) and πij = Pr(i, j ∈ s), respectively. The inverse of the first order inclusion probability defines the sampling weight di = πi−1 , ∀i ∈ s. The inference approach used in this paper for complex surveys is the combined designmodel-based approach originated in Hartley and Sielken (1975). This approach accounts for two sources of variability. The first one is from the fact that the finite population is a realization from a superpopulation, that is, the units xU = {x1 , x2 , ..., xN } are considered independent random variables with a common distribution function F , whose density function is f . The second one is from the complex sampling procedure which leads to a 2 sample x = {x1 , x2 , . . . , xn }. Denote w = {w1 , w2 , . . . , wn } design variables that determine the sampling weights. The sampling design P̧(·) is embedded within a probability space (S, J̧, PP̧ ). The expectation and variance operator with respect to the sampling design are denoted by EP̧ (·) = EP̧ (· | xU ) and VarP̧ (·) = VarP̧ (· | xU ), respectively. The superpopulation ξ, from which the finite population is realized, is embedded within a probability space (Ω, F̧, Pξ ). The sample x and the design variables w are ξ-measurable. The expectation and variance operator with respect to the model are denoted by Eξ (·) and Varξ (·), respectively. Assume that, given the design variables w, the product space, which couples the model and the design spaces, is (Ω × S, F̧ × J̧, Pξ × PP̧ ). The combined expectation and variance operators are denoted by EC (·) and VarC (·), where EC (·) = Eξ [EP̧ (· | xU )] and VarC (·) = Eξ [VarP̧ (· | xU )] + Varξ [EP̧ (· | xU )]. 3 Main Results Consider a sample s = {x1 , x2 , ..., xn } drawn from a finite population xU using some fixedsize sampling design P̧(·). Our goal is to estimate the hypothetical density function f of the superpopulation. Equation (1) implies that θj can be estimated using the Horvitz-Thompson (HT) estimator for the finite population mean θ̂j = N −1 n X di ϕj (xi ), (2) i=1 where N is the finite population size and di = πi−1 is the sampling weight for unit i. The HT estimator is a well known design unbiased estimator (Fuller, 2009). The basis {ϕj } can be Fourier, polynomial, spline, wavelet, or others. Properties of different bases are discussed in Efromovich (2010). We consider the cosine basis throughout the paper, which is defined √ as {ϕ0 = 1, ϕj = 2 cos(πjx)}, j = 1, 2, · · · , x ∈ [0, 1]. Regarding the compact support [0, 1] for the density, we adopt the argument in Wahba (1981):“it might be preferable to assume the true density has compact support and to scale the data to interior of [0, 1].” Analogous to Efromovich (1999), we propose an orthogonal series estimator in the form fˆ(x) = fˆ(x, {wj }) = 1 + ∞ X wj θ̂j ϕj (x), (3) j=1 where θ̂j is the HT estimator for the Fourier coefficient as in (2) and wj ∈ [0, 1] is a shrinking R1 coefficient. Note that θ0 = 0 f (x)dx = 1. If xU is known for all units in the finite population, 3 we can write the population estimator for f (x) as fU (x) = fU (x, {wj }) = 1 + where θU,j = N PN −1 i=1 ∞ X wj θU,j ϕj (x), (4) j=1 ϕj (xi ). The following theorems and a corollary show properties of our proposed estimator under both design and combined spaces. Theorem 1 considers unbiasedness and consistency under the design space. PP P∞ 2 πik Theorem 1 Suppose f ∈ L2 (R), δ = N −1 i=1 wi < ∞. i6=k πi πk − N < ∞ and Then, the estimator fˆ(x, {wj }) is design-unbiased and asymptotically design-consistent for fU (x, {wj }), i.e., h h i i ˆ ˆ EP̧ f (x, {wj }) = fU (x, {wj }) and ΓP̧ = VarP̧ f (x, {wj }) → 0 as N → ∞. Theorem 2 shows the asymptotic normality of the proposed estimator fˆ(x, {wj }) under the design space. Theorem 2 Suppose that all assumptions in Theorem 1 hold. As N → ∞, fˆ(x, {wj }) − fU (x, {wj }) Γ̂P̧ L P̧ −−→ N(0, 1), (5) where Γ̂P̧ = N −1 J X wj2 (1 + 2−1/2 θ̂2j + δ θ̂j2 )(1 + 2−1/2 ϕ2j (x)). j=1 We then show the asymptotic normality of the proposed estimator fˆ(x, {wj }) under the combined inference. Define a Sobolev Class of k-fold differentiable densities as F̧(k, Q) = P∞ P 2k 2 {f : f (x) = 1 + ∞ j=1 (πj) θj ≤ Q < ∞}, k ≥ 1. Note that for any j=1 θj ϕj (x), f ∈ F̧(k, Q), f is 1-periodic, f (k−1) is absolute differentiable and f (k) ∈ L2 (R). Theorem 3 Suppose that f ∈ F̧(k, Q) and all assumptions in Theorem 2 hold. Then, fˆ(x, {wj }) − f (x) LC h i −→ N(0, 1) as N → ∞, VarC fˆ(x, {wj }) (6) h i P where VarC fˆ(x, {wj }) = N −1 Jj=1 wj2 bj (1 + 2−1/2 ϕ2j (x)) and bj = 2 + 21/2 θ2j + (δ − 1)θj2 + oN (1). 4 The following corollary is a direct result of using Theorem 3 and Efromovich and Pinsker (1982). It shows the lower bound of the minimax MISE for the proposed estimator fˆ(x, {wj }) under the Sobolev class. Corollary 1 Let f ∈ F̧(k, Q) and fˆ(x, {wj }) be the estimator in Theorem 3. The lower bound of the minimax MISE, under the combined inference approach, is given by: h i R(F̧) = inf sup MISEC fˆ(x, {wj }) ≥ N −2k/(2k+1) P (k, Q, b)(1 + oN (1)), (7) {wj } f ∈F̧(k,Q) o2k/(2k+1) n k and b = 2. where P (k, Q, b) = Q1/(2k+1) π(k+1)b Remark that this lower bound is of the same form as the I.I.D. case in Efromovich and Pinsker (1982), but with b = 2 instead of b = 1. 4 Data Driven Estimators The choice of shrinking coefficients ŵj is not unique. To get a proper data driven estimator, we start with the oracle estimator (3), and then obtain ŵj by minimizing the MISE for the oracle estimator. Here, we propose two estimators: a truncated estimator and a smoothed truncated estimator, mimicking those in the I.I.D. case. The truncated estimator, denoted by fˆT , is an estimator with ŵj = 1 for j ≤ J, and ŵj = 0 for j > J. Alternatively we can write ŵj = Ij≤J . Then, only the truncation parameter J needs to be estimated. Notice that the MISE of this estimator is J h h i Z i X 2 ˆ MISEC f (x, {wj }) = VarC (θ̂j ) − θj − f 2 (x)dx. j=1 Since f 2 (x)dx is fixed and an unbiased estimator for θj2 is θ̂j2 −N −1 bj , a data-driven estimate for J can be obtained from R Jˆ = arg min J X (2N −1 b̂j − θ̂j2 ), j=1 where b̂j is the plug-in estimator of bj . In practice, the solution is obtained through a numerical search. Efromovich (1999) suggests to set the upper bound for Jˆ to be ⌊4+0.5 ln n⌋ for the search. Theoretically, the minimum of the MISE can be approximated in the following corollary. 5 Corollary 2 Let f ∈ F̧(k, Q), k > 1/2. The MISE of fˆT is minimized when J ≈ N 1/(2k+1) H1 (k, b, c), (8) and the minimum is approximately R(fˆT ) = MISEC (fˆT (x, {ŵj })) ≈ N −2k/(2k+1) H2 (k, b, c), −1/(2k+1) where H1 (k, b, c) = b and c is a constant.  2k+1 (2k+2)c −1/(2k+1) 2k/(2k+1) , H2 (k, b, c) = b (9)  2k+1 (2k+2)c −1/(2k+1) , One possible modification for fˆT is to shrink each Fourier coefficient toward zero. We call this estimator the smoothed truncated estimator, denoted by fˆS . It is constructed similarly as the truncated estimator, with the first J Fourier coefficients shrunk by multiplying the optimal smoothing coefficients wj∗, obtained from the proof of Corollary 1. Mathematically, ŵj = ŵj∗ Ij≤J , where ŵj∗ = (θ̂j2 − N −1 b̂j )/θ̂j2 is a direct plug-in estimator for wj∗ . A potential problem of the nonparametric density estimation is that the estimator may not be a valid density function. A simple modification is to define the L2 -projection of fˆT (or fˆS ) onto a class of non-negative densities, f˜T (x) = max{0, fˆT (x) − const.}, where the normalizing constant is to make f˜T integrate to 1. It has been proved that the constant always exists and is unique (Glad et al., 2003). 5 Simulation We compared our proposed estimators with the series estimator that ignores the finite population and sampling designs, through a Monte Carlo simulation study. We considered estimating density functions for three sampling designs: (1) the simple random sample without replacement (SRSWOR), (2) the stratified sampling and (3) the Poisson sampling. Note that the Poisson sampling has a random size with units independently sampled and hence violates our assumption of fixed size sampling. 1. For the SRSWOR, we considered two superpopulations: the standard normal distribution N(0, 1) and a mixture normal distribution 0.4N(−1, 0.5) + 0.6N(1, 1). 2. For the stratified sampling, we considered two superpopulations: a two-component mixture normal 0.4N(−1, 0.5) + 0.6N(1, 1) and a three-component mixture normal 6 0.3N(−1, 0.15) + 0.4N(0, 0.15) + 0.3N(1, 0.15). We designed two strata for the twocomponent mixture and three strata for the three-component mixture. A proportional stratified sampling is used. 3. For the Poisson sampling, we considered the same two superpopulations as in (1). We specified the expected sample size for the Poisson sampling to be n, and generated the first order inclusion probabilities for the Poisson sampling using the function “inclusionprobabilities” in the R package “sampling” (Till and Matei, 2016). For all cases, we considered a finite population of size N = 1, 000 drawn from each of the superpopulations. We repeated drawing the finite population for m1 = 100 times. For each of the finite population, we drew samples according to the sampling design, with increasing sample sizes: n = 20, 40, 60 and 80. The replication number for each finite population is m2 = 10, 000. The performance of estimators is measured by a Monte Carlo approximation of the MISE: Z m1 X m2 h i2 1 X f˜ij (x) − f (x) dx. MISEMC (f˜) = mm 1 2 i=1 j=1 The results of the simulation study are shown in Table 1. In general, the I.I.D. series estimator, which ignores the sampling design, performs the worst in all cases. However, it is not surprising to see that the improvement for the proposed estimators is much more in stratified sampling than in SRSWOR or Poisson sampling. It confirms the necessity of incorporating stratification sampling weights into the series estimator for a complex survey. Lastly, the smoothed truncated estimator performs better than the truncated estimator in most scenarios. 6 Oklahoma M-SISNet Survey The Oklahoma Weather, Society and Government Survey conducted by Meso-Scale Integrated Sociogeographic Network (M-SISNet) measures Oklahomans’ perceptions of weather in the state, their views on government policies and societal issues and their use of water and energy. The survey is routinely conduced at the end of each season. Until the end of 2016, 12 waves of survey data have been collected. It is desired that estimates can be obtained without constantly pulling out the original data. The sampling design has two separated phases. In Phase I, a simple random sample of size n = 1, 500 is selected from statewide households. In Phase II, a stratified oversample is selected from five special study areas: Payne County, 7 Oklahoma City County, Kiamichi County, Washita County and Canadian County. In each stratum, the sample size is fixed to be 200. The second phase can be viewed as a stratified sampling over the entire state with six strata: n1 = · · · = n5 = 200 and n6 = 0, where the sixth stratum contains households not in the five special study areas. This design with oversampling is not a typical fixed-size complex survey. The first-order inclusion probabilities are approximately πhi = nh /Nh + n/N, for i = 1, . . . , Nh and h = 1, . . . , 6. Note that for units not in the five areas, this inclusion probability is simply n/N. We presents OSDEs for two continuous variables for illustration: the monthly electricity bill and the monthly water bill. Figure 1 shows OSDEs of the two variables for all seasons in 2015. Acknowledgement This research is partially supported by National Science Foundation under Grant No. OIA1301789. Appendix Proof of Theorem 1 Proof. We first show that fˆ(x, {wj }) is design-unbiased:   ∞ h i X EP̧ fˆ(x, {wj }) = EP̧ 1 + wj θ̂j ϕj (x) j=1 = 1+ = 1+ ∞ X j=1 ∞ X wj EP̧ (θ̂j )ϕj (x) wj θU,j ϕj (x) j=1 = fU (x, {wj }). It remains to show that fˆ(x, {wj }) is asymptotically design-consistent, that is, the design-variance of fˆ(x, {wj }) approaches zero in the limit. We need the simple fact that √ ϕ2j (x) = [ 2 cos(πjx)]2 = 1 + cos(π2jx) = 1 + 2−1/2 ϕ2j (x). 8 Then, we have  ΓP̧ = VarP̧ 1 + = ∞ X ∞ X j=1  wj θ̂j ϕj (x) wj2 ϕ2j (x)VarP̧ (θ̂j ) j=1 = ∞ X wj2 j=1 h # " n i X di ϕj (xi ) , 1 + 2−1/2 ϕ2j (x) N −2 VarP̧ i=1 and VarP̧ " n X i=1 # di ϕj (xi ) = VarP̧ = EP̧ = N X i=1 − = " " N X i=1 Ii di ϕj (xi ) i=1 N X #2 Ii di ϕj (xi ) i=1 − ( EP̧   EP̧ (Ii2 )d2i EP̧ ϕ2j (xi ) + (N X N X # EP̧ (Ii )di EP̧ [ϕj (xi )] i=1 " N X #)2 Ii di ϕj (xi ) i=1 XX πik di dk EP̧ [ϕj (xi )] EP̧ [ϕk (xk )] i6=k )2 h i XX π ik 2 2 EP̧ 1 + 2−1/2 ϕ2j (xi ) + θ − N 2 θU,j πi πk U,j i6=k 2 = N (1 + 2−1/2 θU,2j + δθU,j ) ≤ N M, 2 ≤ M < ∞ for every j. where 1 + 2−1/2 θU,2j + δθU,j P 2 Hence, ΓP̧ ≤ N −1 M ∞ j=1 wj → 0 as N → ∞. Proof of Theorem 2 Proof. By the definition of θ̂j and θU,j , we have fˆ(x, {wj }) = 1 + = 1+ ∞ X wj θ̂j ϕj (x) j=1 N X i=1 9 Ii di ∞ X j=1 wj ϕj (x)ϕj (xi ), and  E Ii di ∞ X j=1  wj ϕj (x)ϕj (xi ) = = ∞ X wj ϕj (x)E [ϕj (xi )] j=1 ∞ X wj θU,j ϕj (x). j=1 Also, from the proof of Theorem 1, we have   ∞ ∞ X X 2 wj2 (1 + 2−1/2 θU,2j + δθU,j ) wj ϕj (x)ϕj (xi ) = Var Ii di j=1 j=1 ≤ B ∞ X j=1 wj2 < ∞ by assumption. Therefore, by the Lindeberg-Lévy central limit theorem, we have fˆ(x, {wj }) − fU (x, {wj }) LP̧ −−→ N (0, 1). ΓP̧ (10) It remains to show that Γ̂P̧ is consistent for ΓP̧ under design, or equivalently, P P̧ |Γ̂P̧ − ΓP̧ | −−→ 0, as n → N. (11) Condition (11) can be proved by using the facts that θ̂j is design unbiased and E(θ̂j2 ) = θj2 + Var(θ̂j ) → θj2 as n → N . Then, Theorem 2 is proved by using the equations (10) and (11) in conjunction with Slutsky’s theorem. Proof of Theorem 3 Proof. Since fU (x, {wj }) is the standard OSDE from an I.I.D. sample which is the finite population, then fU (x, {wj }) − f (x) Lξ −→ N (0, 1). Varξ [fU (x, {wj })] 10 (12) The asymptotic distribution of the I.I.D. OSDE under Sobolev class is obtained from Efromovich (1999), Chapter 7. Also, J h i h i X VarC wj θ̂j ϕj (x) VarC fˆ(x, {wj }) = j=1 = J X wj2 (1 + 2−1/2 ϕ2j (x))VarC (θˆj ) (13) j=1 Next, we calculate the variance of θ̂j by using Theorem 1: h i h i VarC (θ̂j ) = Eξ VarP̧ (θ̂j ) + Varξ EP̧ (θ̂j ) h i 2 ) + Varξ (θU,j ) = Eξ N −1 (1 + 2−1/2 θU,2j + δθU,j h i 2 ) + Varξ (θU,j ) = N −1 1 + 2−1/2 θ2j + δEξ (θU,j (14) 2 ) and Var (θ Then, we evaluate Eξ (θU,j ξ U,j ) separately. Based on a standard result in the I.I.D. case, we have Varξ (θU,j ) = N −1 (1 + 2−1/2 θ2j − θj2 ) (15) and 2 Eξ (θU,j ) = E2ξ (θU,j ) + Varξ (θU,j ) = N −1 (1 + 2−1/2 θ2j − θj2 ) + θj2 . Then, plug equations (15) and (16) into (14), we have h i VarC (θ̂j ) = N −1 2 + 21/2 θ2j + (δ − 1)θj2 + oN (1) = N −1 bj . (16) (17) Hence, plug (17) into (13) we can get the variance of fˆ under the combined inference approach. Finally, apply Theorem 5.1 in Bleuer and Kratina (1999), Theorem 3 is proved. Proof of Corollary 1 Proof. The proof is similar to Efromovich and Pinsker (1982). We sketch the steps as follows. We first evaluate the linear minimax MISE for the functions in the Sobolev class defined above. That is, we optimize wj∗ ’s that minimize MISEC (fˆ). Notice that EC (θ̂j ) = Eξ [EP̧ (θ̂j )] = Eξ (θU,j ) = θj 11 implying that θ̂j is an unbiased estimator of θj . Therefore, Z  h i MISEC fˆ(x, {wj }) = EC (f − fˆ)2 ∞ n o i h X wj2 VarC (θ̂j ) + θj2 − 2wj θj2 + θj2 . = (18) j=1 A straightforward calculation yields that wj∗ = θj2 θj2 + VarC (θ̂j ) . (19) Plug equation (19) into (18), h i sup MISEC fˆ(x, {wj }) {wj } f ∈F̧(k,Q) ∞ X θj2 VarC (θ̂j ) ≥ sup , 2 f ∈F̧(k,Q) j=1 θj + VarC (θ̂j ) RL (F̧) = inf (20) where VarC (θ̂j ) is of the form (17). Plug (17) into (20), and use the Lagrange multiplier to show that the maximum of (6) is attained at θj2 = N −1 (µ/(πj)k − bj )+ , where µ is determined by the constraint obtain P∞ 2k 2 j=1 (πj) θj (21) ≤ Q. Plug equation (21) back to (20), we RL (F̧) ≥ N −2k/(2k+1) P (k, Q, b). Pinsker (1980) shows that for Sobolev ball F̧, the linear minimax risk is asymptotically equal to the minimax risk, that is, R(F̧) = RL (F̧)(1 + oN (1)). Therefore Corollary 1 is proved. Proof of Corollary 2 Proof. Let ŵj = Ij≤J . Plug equation (17) into (18), we have R(fˆT ) = N −1 J X j=1 bj + ∞ X j=J+1 θj2 ≈ N −1 bJ + 12 ∞ X j=J+1 θj2 . (22) Notice that for f ∈ F̧(k, Q). By a straightforward calculation, we have θj2 = cj −2(k+1) (Efromovich, 1999). Therefore, ∞ X j=J+1 θj2 ≈c Z ∞ j −2(k+1) dj = J c J −2k−1 . 2k + 1 (23) Plug (23) into (22) and optimize J, Corollary 2 is proved. References Bellhouse, D. and Stafford, J. (1999), ‘Density estimation from complex surveys’, Statistica Sinica 9, 407–424. Bleuer, S. and Kratina, I. (1999), ‘On the two-phase framework for joint model and designbased inference’, The Annals of Statistics 33, 2789–2810. Breunig, R. (2001), ‘Density estimation for clustered data’, Econometric Reviews 20, 353– 367. Breunig, R. (2008), ‘Nonparametric density estimation for stratified samples’, Statistics and Probability Letters 78, 2194–2200. Buskirk, T. (1999), Using nonparametric methods for density estimation with complex survey data, Technical report, PhD thesis, Department of Mathematics, Arizona State University. Buskirk, T. and Lohr, S. (2005), ‘Asymptotic properties of kernel density estimation with complex survey data’, Journal of Statistical Planning and Inference 128, 165–190. Donoho, D., Johnstone, I., Kerkyacharian, G. and Picard, D. (1996), ‘Density estimation by wavelet thresholding’, Annals of Statistics 24, 508–539. Efromovich, S. (1996), ‘Adaptive orthogonal series density estimation for small samples’, Computational Statistics and Data Analysis 22, 599–617. Efromovich, S. (1999), Nonparametric Curve Estimation: Methods, Theorey and Applications, New York: Springer. Efromovich, S. (2010), ‘Orthogonal series density estimation’, WIREs Comp Stat 2, 467–476. 13 Efromovich, S. and Pinsker, M. (1982), ‘Estimation of square-integrable probability density of a random variable’, Problems of Information Transmission 18, 19–38. Fuller, W. (2009), Sampling Statistics, Wiley, New York. Glad, I., Hjort, N. and Ushakov, N. (2003), ‘Correction of density estimators that are not densities’, Scandinavian Journal of Statistics 30, 415–427. Hartley, H. and Sielken, R. (1975), ‘A super-population viewpoint for finite population sampling’, Biometrics 31, 411–422. Pinsker, M. (1980), ‘Optimal filtration of square-integrable signals in Gaussian noise’, Problems Inform. Transmission 16, 53–68. Tarter, M. and Lock, M. (1993), Model-Free Curve Estimation, New York: Chapman and Hall. Till, Y. and Matei, A. (2016), sampling: Survey Sampling. R package version 2.8. URL: https://CRAN.R-project.org/package=sampling Wahba, G. (1981), ‘Data-based optimal smoothing of orthogonal series density estimates’, The Annals of Statistics 9, 146–156. Walter, G. (1994), Wavelets and other Orthogonal Systems with Applications, London: CRC Press. 14 Table 1: Monte Carlo approximation of MISE for three sampling designs and two superpopulations. The finite population size is N = 1, 000. The replication size of the finite population is m1 = 100, and the replication size of the sample is m2 = 10, 000. Three estimators are compared: the truncated estimator, the smoothed estimator and the series estimator ignoring finite population and sampling design (I.I.D.). SRSWOR n 20 40 60 80 Standard Normal Mixture Normal Truncated Smoothed I.I.D. Truncated Smoothed 0.0232 0.0220 0.0290 0.0498 0.0480 0.0150 0.0140 0.0157 0.0311 0.0318 0.0116 0.0109 0.0121 0.0226 0.0234 0.0094 0.0089 0.0100 0.0173 0.0180 I.I.D. 0.0535 0.0388 0.0335 0.0219 n 20 40 60 80 Poisson Sampling Standard Normal Mixture Normal Truncated Smoothed I.I.D. Truncated Smoothed 0.0497 0.0481 0.0527 0.0580 0.0442 0.0281 0.0270 0.0392 0.0344 0.0294 0.0241 0.0229 0.0237 0.0283 0.0280 0.0201 0.0190 0.0211 0.0235 0.0234 I.I.D. 0.0705 0.0399 0.0322 0.0285 n 20 40 60 80 Stratified Sampling Two Strata Three Strata Truncated Smoothed I.I.D. Truncated Smoothed 0.0415 0.0409 0.0739 0.2847 0.2826 0.0231 0.0230 0.0688 0.2731 0.2718 0.0181 0.0180 0.0672 0.0426 0.0419 0.0142 0.0142 0.0675 0.0412 0.0406 I.I.D. 0.3106 0.3309 0.1132 0.1175 15 0.020 (a) Water Bill 0.000 0.005 Density 0.010 0.015 Winter Spring Summer Fall 0 50 100 150 200 Amount (in dollars) 250 300 (b) Electricity Bill 0.000 Density 0.004 0.008 Winter Spring Summer Fall 0 50 100 150 200 Amount (in dollars) 250 300 Figure 1: OSDEs of the electricity bill and the water bill for seasonal waves in 2015. 16
10math.ST
arXiv:cs/0411028v1 [cs.DC] 10 Nov 2004 A Machine-Independent Port of the SR Language Run Time System to NetBSD Operating System Ignatios Souvatzis University of Bonn, CS Dept., Chair V <[email protected]> 29th of September, 2004 1 Introduction SR (synchronizing resources)[1] is a PASCAL – style language enhanced with constructs for concurrent programming developed at the University of Arizona in the late 1980s[2]. MPD (presented in Gregory Andrews’ book about Foundations of Multithreaded, Parallel, and Distributed Programming[3]) is its successor, providing the same language primitives with a different syntax. The run-time system (in theory, identical) of both languages provides the illusion of a multiprocessor machine on a single single- or multi- CPU Unix-like system or a (local area) network of Unix-like machines. Chair V of the Computer Science Department of the University of Bonn is operating a laboratory for a practical course in parallel programming consisting of computing nodes running NetBSD/arm, normally used via PVM, MPI etc. We are considering to offer SR and MPD for this, too. As the original language distributions are only targeted at a few commercial Unix systems, some porting effort is needed, outlined in the SR porting guide[4]. The integrated POSIX threads support of NetBSD-2.0 should allow us to use library primitives provided for NetBSD’s phtread system to implement the primitives needed by the SR run-time system, thus implementing 13 target CPUs at once and automatically making use of SMP on VAX, Alpha, PowerPC, Sparc, 32-bit Intel and 64 bit AMD CPUs. This paper describes work in progress. 2 Generic Porting Problems Given the age of the software and the gradual development of the C language and the operating system environments available, some adaptation is to be expected. Fortunately, the latest distribution of SR (version 2.3.2) has already been portend to two relatively modern Unix-like environments (Solaris 2.2 and Linux), so the necessary changes turned out to be confined to a one area: gcc 3, the system compiler of NetBSD-2.0, doesn’t provide old <varags.h> variable argument functions anymore, so those had to be converted to <stdarg.h> syntax. Also, none of those functions had fixed arguments. Most of the functions had a first logical parameter char *locn which could be changed into a fixed parameter. A few functions had a first integer parameter (a count of the remaining parameters). In one Implementation i386 assembler SVR4 system calls Context switch times 0.059 µs 6.025 µs Table 1: Raw context switch times case (sr cat), the loops extracting the parameters from the variable argument list had to be changed to be initialized with the newly introduced fixed parameter. 3 Verification methods SR itself provides a basic and an extended verification suite for the whole system; also a small basic test for the context switching primitives. The basic suite should be run to test an installation; the context switch tests and the extended suite are used to verify a new porting effort.[4] 3.1 Context Switch Primitives The context switch primitives can be independently tested by running make in the subdirectory csw/ of the distribution; this builds and runs the cstest program, which implements a small multithreaded program and checks for detection of stack overflows, stack underflows, correct context switching etc. 3.2 Overall System When the context switch primitives seem to work individually, they — and the building system used to build SR, and the sr compiler, linker, etc. need also to be tested. A basic verification suite is in the vsuite/ subdirectory of the distribution; it can be extended with more tests from a seperate source archive vs.tar.Z. It is run by calling the driver script srv/srv, which provides normal and verbose modes, as well as using the installed vs. the freshly compiled SR system. The only test that is expected to fail is the srgrind source code formatter — it needs the vgrind program as a backend. 4 Performance evaluation SR comes with two performance ealuation packages. The first, for the context switching primitives, is in the csw/ subdirectory of the source distribution; after make csloop you can start ./csloop N where N is the number of seconds the test will run approximately. Tests of the language primitives used for multithreading are in the vsuite/timings/ subdirectory of the source tree enhanced with the verification suite. They are run by three shell scripts to compile them, run them, and summarize the results in a table. 5 Establishing a baseline There are two extremes possible when implementing the context switch primitives needed for SR: implementing each CPU manually in assembler code (what the SR project does normally) and using the SVR4-style getcontext() and setcontext() functions which operate on struct ucontext; these are provided as experimental code in the file csw/svr4.c of the SR distribution. Test description loop control overhead local call, optimised interresource call, no new process interresource call, new process process create/destroy semaphore P only semaphore V only semaphore pair semaphore requiring context switch asynchronous send/receive message passing requiring context switch rendezvous i386 ASM 0.01 µs 0.07 µs 1.45 µs 2.95 µs 2.46 µs 0.07 µs 0.05 µs 0.11 µs 0.39 µs 1.71 µs 1.90 µs 2.65 µs SVR4 s.c. 0.01 µs 0.07 µs 1.39 µs 22.20 µs 26.14 µs 0.07 µs 0.05 µs 0.11 µs 9.09 µs 1.63 µs 14.50 µs 27.05 µs Table 2: Run time system performance. The median times reported by the SR script vsuite/timings/report.sh are reported. The first tests were done by using the provided i386 assembler context switch routines. After verifying correctness and noting the times (see tables 5 and 5), the same was done using the SVR4 module instead of the assembler module. All tests were done on a 500 MHz Pentium III machine with 16+16 kB of primary cache and 512 kB of secondary cache, and 128 MB of main memory, running NetBSD2.0 BETA as of end of June 2004. The table shows a factor-of-about-ten performance hit for the operations that require context switches; note, however, that the absolute values for all such operations are still smaller than 30 µs on 500 MHz machine and will likely not be noticable if a parallelized program is run on a LAN-coupled cluster: on the switched LAN connected to the test machine, the time for an ICMP echo request to return is about 250 µs. 6 Possible improvements using NetBSD library calls While using the system calls getcontext and setcontext, as the svr4 module does, should not unduly penalize an application distributed across a LAN, it might be noticable with local applications. However, we should be able to do better than the svr4 module without writing our own assembler modules, as NetBSD 2.0 (and up) contains its own set of them for the benefit of its native Posix threads library (libpthread), which does lots of context switches within a kernel provided light weight process ([5]). The primitives provided to libpthread by its machine dependent part are the two functions getcontext u and setcontext u with similar signatures to getcontext and setcontext. There are a few difficulties that arise while pursuing this. First, on one architecture (i386) setcontext u and getcontext u are implemented by calling through a function pointer which is initialized depending on the FPU / CPU extension mode available on the particular CPU used (on i386, 8087mode vs. XMM). from this. On this architecture, setcontext u and getcontext u are defined as macros in a private header file not installed. The developer in charge of the code has indicated that he might implement public wrappers; until then, we’d have to check all available NetBSD architectures and copy the relevant files. Second, there is no context initializing function at the same level as setcontext u and getcontext u. makecontext looks like it would be good enough but this has to be analyzed further. 7 7.1 Work items left to do Building a package for pkgsrc To ease installation, a prototype package for the NetBSD package system has been built. It needs a bit of refinement, though, but will be available soon. (As the NetBSD package system is available for more operating systems than NetBSD, a bit more work is needed.) 7.2 Implementing and testing multithreaded SR SR can be compiled in a mode where it will make use of multiple threads provided by the underlying OS, so that it can use more than one CPU of a single machine. This has not been implemented yet for NetBSD, but should be. References [1] Gregory R. Andrews and Ronald A. Olsson, The SR Programming Language: Concurrency in Practice (Benjamin/Cummings, 1993 [2] Gregory R. Andrews, Ronald A. Olsson, Michael H. Coffin, Irving Elshoff, Kelvin D. Nilsen, Titus Purdin and Gregg M. Townsend, An Overview of the SR Language and Implementation, 1988, ACM TOPLAS Vol. 10.1, p. 51-86 [3] Gregory R. Andrews, Foundations of Multithreaded, Parallel, and Distributed Programming, Addison-Wesley, 2000 (ISBN 0-201-35752-6) [4] Gregg Townsend, Dave Bakken, Porting the SR Programming Language, 1994, Department of Computer Science, The University of Arizona [5] Nathan J. Williams, An Implementation of Scheduler Activations on the NetBSD Operating System, in: Proceedings of the FREENIX Track, 2002 Usenix Annual Technical Conference, Monterey, CA, USA, http://www.usenix.org/events/usenix02/tech/freenix/williams.html
6cs.PL
Improving speech recognition by revising gated recurrent units Mirco Ravanelli1 , Philemon Brakel2 , Maurizio Omologo1 , Yoshua Bengio2 1 2 Fondazione Bruno Kessler, Trento, Italy Université de Montréal, Montréal, Canada [email protected], [email protected], [email protected], [email protected] arXiv:1710.00641v1 [cs.CL] 29 Sep 2017 Abstract Speech recognition is largely taking advantage of deep learning, showing that substantial benefits can be obtained by modern Recurrent Neural Networks (RNNs). The most popular RNNs are Long Short-Term Memory (LSTMs), which typically reach state-of-the-art performance in many tasks thanks to their ability to learn long-term dependencies and robustness to vanishing gradients. Nevertheless, LSTMs have a rather complex design with three multiplicative gates, that might impair their efficient implementation. An attempt to simplify LSTMs has recently led to Gated Recurrent Units (GRUs), which are based on just two multiplicative gates. This paper builds on these efforts by further revising GRUs and proposing a simplified architecture potentially more suitable for speech recognition. The contribution of this work is two-fold. First, we suggest to remove the reset gate in the GRU design, resulting in a more efficient single-gate architecture. Second, we propose to replace tanh with ReLU activations in the state update equations. Results show that, in our implementation, the revised architecture reduces the per-epoch training time with more than 30% and consistently improves recognition performance across different tasks, input features, and noisy conditions when compared to a standard GRU. Index Terms: speech recognition, deep learning, recurrent neural networks, LSTM, GRU 1. Introduction Building machines that are able to recognize speech represents a fundamental step towards flexible and natural human-machine interfaces. A primary role for improving such a technology is played by deep learning [1], which has recently contributed to significantly outperform previous GMM/HMM speech recognizers [2]. During the last years, deep learning has been rapidly evolving, progressively offering more powerful and robust techniques, including effective regularization methods [3, 4], improved optimization algorithms [5], as well as better network architectures. The early deep learning works in speech recognition were mainly based on standard multilayer perceptrons (MLPs) [6, 7], while recent systems benefit from more advanced architectures, such as Convolutional Neural Networks (CNNs) [8] and Time Delay Neural Network (TDNN) [9, 10]. Nevertheless, since speech is inherently a sequential signal, it would be natural to address it with Recurrent Neural Networks (RNNs), which are potentially able to properly capture long-term dependencies. Several works have already highlighted the effectiveness of RNNs in various speech processing tasks such as speech recognition [11, 12, 13, 14, 15], speech enhancement [16], speech separation [17, 18] as well as speech activity detection [19]. Recent results in the newborn field of end-to-end speech recognition [20, 21] have also shown that RNNs are promising candidates for replacing traditional Hidden Markov Models (HMMs) in DNN/HMM speech recognizers. Training RNNs, however, can be complicated by vanishing and exploding gradients, which might impair learning longterm dependencies [22]. Although exploding gradients can effectively be tackled with simple clipping strategies [23], the vanishing gradient problem requires special architectures to be properly addressed. A common approach relies on the socalled gated RNNs, whose core idea is to introduce a gating mechanism for better controlling the flow of the information through the various time-steps. Within this family of architectures, vanishing gradient issues are mitigated by creating effective “shortcuts”, in which the gradients can bypass multiple temporal steps. The most popular gated RNNs are Long Short-Term Memory networks (LSTMs) [24], which often achieve state-of-theart performance in several machine learning tasks. LSTMs rely on a network design consisting of memory cells which are controlled by forget, input, and output gates. Despite their effectiveness, such a sophisticated gating mechanism might result in an overly complex model that can be tricky to implement efficiently. On the other hand, computational efficiency is a crucial issue for RNNs and considerable research efforts have recently been devoted to the development of alternative architectures [25, 26, 27]. With this purpose, an attempt to simplify LSTMs has led to a novel model called Gated Recurrent Unit (GRU) [28, 29], which is based on just two multiplicative gates. Despite the adoption of a simplified gating mechanism, some works in the literature agree that GRUs and LSTMs provide a comparable performance in different machine learning tasks [29, 26, 30]. This work continues these efforts by further revising GRUs and proposing an architecture potentially more suitable for speech recognition. The contribution of this paper is twofold: First, we propose to remove the reset gate from the network design. Similarly to [31], we found that removing the reset gate does not affect the system performance, since we observed a certain redundancy in the role played by the update and reset gates. Second, we propose to replace hyperbolic tangent (tanh) with Rectified Linear Units (ReLU) activations in the state update equation. In the past, such a non-linearity has been avoided for RNNs due to the numerical instabilities caused by the unboundedness of ReLU activations. However, when coupling our ReLU-based GRU architecture with batch normalization [4], we did not experience such numerical issues. This allows us to take advantage of ReLU neurons, which have been proven effective at further alleviating the vanishing gradient problem as well as speeding up network training. Our results, obtained on different tasks, input features, and noisy conditions show that, in our implementation, the revised architecture reduces the per-epoch training wall-clock time with more than 30%, while improving the recognition performance over all the experimental conditions considered in this work. 2. Revising GRUs The GRU architecture is defined by the following equations: zt = σ(Wz xt + Uz ht−1 + bz ), rt = σ(Wr xt + Ur ht−1 + br ), (1a) (1b) het = tanh(Wh xt + Uh (ht−1 rt ) + bh ), (1c) ht = zt ht−1 + (1 − zt )het . (1d) In particular, zt and rt are vectors corresponding to the update and reset gates respectively, while ht represents the state vector for the current time frame t. The activations of both gates are element-wise logistic sigmoid functions σ(·), which constrain zt and rt to take values ranging from 0 and 1. The candidate state het is processed with a hyperbolic tangent. The network is fed by the current input vector xt (e.g., a vector with speech features), while the parameters of the model are the matrices Wz , Wr , Wh (the feed-forward connections) and Uz , Ur , Uh (the recurrent weights). The architecture finally includes trainable bias vectors bz , br and bh , which are added before the non linearities. As shown in Eq. 1d, the current state vector ht is a linear interpolation between the previous activation ht−1 and the current candidate state het . The weighting factors are set by the update gate zt , that decides how much the units will update their activations. Note that such a linear interpolation, which is similar to that adopted for LSTMs [24], is the key component for learning long-term dependencies. For instance, if zt is close to one, the previous state is kept unaltered and can remain unchanged for an arbitrary number of time steps. On the other hand, if zt is close to zero, the network tends to favor the candidate state het , which depends more heavily on the current input and on the closer hidden states. The candidate state het , also depends on the reset gate rt , which allows the model to delete the past memory by forgetting the previously computed states. The model proposed in this paper is a revised version of the GRUs described above. The main changes concern reset gate and ReLU activations, as outlined in the next sub-sections. 2.1. Removing the reset gate The reset gate can be useful when significant discontinuities occur in the sequence. For language modeling, this may happen when moving from one text to another one which is notsemantically related. In such situations, it is convenient to reset the stored memory in order to avoid taking a decision biased by an uncorrelated history. However, for some specific tasks such a functionality might not be useful. In [31], for instance, removing rt from the GRU model has led to a single-gate architecture called Minimal Gated Recurrent Unit (M-GRU), which achieves a performance comparable to that obtained by standard GRUs in handwritten digit recognition as well as in a sentiment classification task. We argue that the role played by the reset gate should be reconsidered also for acoustic modeling in speech recognition. In fact, a speech signal is a sequence that evolves rather slowly (the features are typically computed every 10 ms), in which the past history can virtually always be helpful. Even in the presence of strong discontinuities, for instance observable at the boundary between a vowel and a fricative, completely resetting the past memory can be harmful. On the other hand, it is helpful to memorize phonotactic features, since some phone transitions are more likely than others. Figure 1: Average activations of update and reset gates for a GRU trained on TIMIT in a chunk of the utterance “sx403” of speaker “faks0”. Moreover, we believe that a certain redundancy in the activations of reset and update gates might occur when processing speech sequences. For instance, when it is necessary to give more importance to the current information, the GRU model can set small values of rt . A similar effect can also be achieved with the update gate only, by setting small values of zt . The latter solution tends to weight more the candidate state het , which, as desired, depends more heavily on the current input and on its more recent history. Similarly, a high value can be assigned either to rt or to zt , in order to place more importance on past states. This redundancy is also highlighted in Fig. 1, where a temporal correlation in the average activations of update and reset gates can be readily appreciated for a GRU trained on TIMIT. The first modification to standard GRUs proposed in this work thus concerns the removal of the reset gate rt , which helps in limiting the redundancy in the gating mechanism. The main benefits of this intervention are related to the improved computational efficiency, which is achieved thanks to the reduced number of parameters necessary to reach the performance of a standard GRU. 2.2. ReLU activations The second modification consists in replacing the standard hyperbolic tangent with ReLU activations in the state update equations (Eq. 1c - 1d). Tanh activations are, indeed, rather critical since their saturation slows down the training process and causes vanishing gradient issues. The adoption of ReLU-based neurons, which have shown effective in improving such limitations, was not so common in the past for RNNs, due to numerical instabilities originated by the unbounded ReLU functions applied over long time series. Nevertheless, some recent works have shown that ReLU RNNs can be effectively trained with a proper orthogonal initialization [32]. Formally, removing the reset gate and replacing the hyperbolic tangent function with the ReLU activation now leads to the following update equations: zt = σ(Wz xt + Uz ht−1 + bz ), (2a) het = ReLU(Wh xt + Uh ht−1 + bh ), (2b) ht = zt ht−1 + (1 − zt )het . (2c) We called this architecture M-reluGRU, to emphasize the modifications carried out on a standard GRU. 2.3. Batch Normalization Batch normalization [4] has been recently proposed in the machine learning community and addresses the so-called internal covariate shift problem by normalizing, for each training minibatch, the mean and the variance of each layer pre-activations. Such a technique has shown to be crucial both to improve the system performance and to speed-up the training procedure. Batch normalization can be applied to RNNs in different ways. In [33], authors suggest to apply it to feed-forward connections only, while in [34] the normalization step is extended to recurrent connections, using separate statistics for each time-step. In this work, we tried both approaches and we observed a comparable performance between them. We also noticed that coupling the proposed model with batch-normalization [4] helps in avoiding the numerical issues that often occur when dealing with ReLU RNNs applied to long time sequences. Batch normalization, indeed, rescales the neuron preactivations, inherently bounding the values of the ReLU neurons. This allows the network to take advantage of the wellknown benefits of such activations. 3. Experimental setup 3.1. Corpora and tasks To provide an accurate evaluation of the proposed architecture, the experimental validation was conducted using different training datasets, tasks and environmental conditions. A first set of experiments with TIMIT was performed to test the proposed model in a close-talking scenario. The experiments with TIMIT are based on the standard phoneme recognition task, which is aligned with that proposed in the Kaldi s5 recipe [35]. A set of experiments was also conducted in a distant-talking scenario with a Wall Street Journal (WSJ) task, to validate our model in a more realistic situation. The reference context was a domestic environment characterized by the presence of nonstationary noise (with an average SNR of about 10dB) and acoustic reverberation (with an average reverberation time T60 of about 0.7 seconds). The original WSJ training dataset was contaminated with a set of impulse responses measured in a real apartment. The test phase was carried out with the DIRHAEnglish corpus1 (with both real and simulated datasets), consisting of 409 WSJ sentences uttered by six native American speakers in the same apartment. A development set of 310 WSJ sentences uttered by six different speakers was also used for hyperparameter tuning. More details on this dataset and on the impulse responses can be found in [36, 37]. 3.2. System details The architecture adopted for the experiments consisted of multiple recurrent layers, which were stacked together prior to the final softmax context-dependent classifier. These recurrent layers were bidirectional RNNs [11], which were obtained by concatenating the forward hidden states (collected by processing the sequence from the beginning to the end) with backward hidden states (gathered by scanning the speech in the reverse time order). Recurrent dropout was used as regularization technique. Since extending standard dropout to recurrent connections hinders learning long-term dependencies, we followed the approach introduced in [38], which tackles this issue by sharing the same dropout mask across all the time steps. More1 This dataset is being distributed by the Linguistic Data Consortium (LDC). over, batch normalization was adopted exploiting the method suggested in [33], as discussed in Sec. 2. The feed-forward connections of the architecture were initialized according to the Glorot initialization [39], while recurrent weights were initialized with orthogonal initialization [32]. Similarly to [40], the gain factor γ of batch normalization was initialized to γ = 0.1 and the shift parameter β was initialized to 0. Before training, the sentences were sorted in ascending order according to their lengths and, starting from the shortest utterances, minibatches of 8 sentences were progressively processed by the training algorithm. This sorting approach, besides minimizing zero-paddings when forming mini-batches, exploits a curriculum learning strategy [41] which has been shown to improve the performance and to ensure numerical stability of gradients. The optimization was done using the Adam algorithm [5], which ran for 22 epochs. The performance on the development set was monitored after each epoch, while the learning rate was halved when the performance improvement went below a certain threshold. Gradient truncation was not applied, allowing the system to learn arbitrarily long time dependences. The speech recognition labels were derived by performing a forced alignment procedure on the original training datasets. See the standard s5 recipe of Kaldi for more details [35]. To evaluate the proposed architecture on different input features, three sets of experiments were performed with 39 MFCCs, with 40 mel-filterbank coefficients, as well as with 40 fMLLR features derived by a Speaker Adaptive Training (SAT) procedure [35]. All of these feature vectors were computed every 10 ms with a frame length of 25 ms. The main hyperparameters of the model (i.e., learning rate, number of hidden layers, hidden neurons per layer, dropout factor) were optimized on the development data. In particular, we guessed some initial values according to our experience, and starting from them we performed a grid search to progressively explore better configurations. A total of 20-25 experiments were conducted for the RNN models. As a result, an initial learning rate of 0.0013 and a dropout factor of 0.2 were chosen for all the experiments. The optimal numbers of hidden layers and hidden neurons, instead, depend on the considered dataset/model, and range from 4 to 5 hidden layers with 375607 neurons. The proposed system was implemented with Theano [42] and coupled with the Kaldi decoder [35] to form a contextdependent DNN/HMM speech recognizer2 . 4. Results In the following sub-sections, a comparison of the proposed architecture with other popular RNNs is presented. The results will be reported for the standard close-talking TIMIT dataset and for the distant-talking WSJ task based on the DIRHA English dataset. 4.1. Results on TIMIT Table 1 presents the results obtained with the TIMIT dataset. To perform a more accurate comparison of the various architectures, at least five experiments varying the initialization seeds were conducted for each RNN model. The results in Table 1 are reported as the average Phone Error Rates (PER%) with their corresponding standard deviations. 2 The code used for the experiments can be found at https:// github.com/mravanelli/theano-kaldi-rnn/. PP P Feat. Arch. PPP P MFCC FBANK fMLLR relu-RNN 18.7 ± 0.18 18.3 ± 0.23 16.3 ± 0.11 LSTM 18.1 ± 0.33 17.1 ± 0.36 15.7 ± 0.32 GRU 17.1 ± 0.20 16.7 ± 0.36 15.3 ± 0.28 M-GRU 17.2 ± 0.11 16.7 ± 0.19 15.2 ± 0.10 M-reluGRU 16.7 ± 0.26 15.8 ± 0.10 14.9 ± 0.27 Table 1: Phone Error Rate (PER%) obtained for the test set of TIMIT with various RNN architectures. Architecture Layers Neurons # Params Training time relu-RNN 4 607 6.1 M 318 sec. LSTM 5 375 8.8 M 506 sec. GRU 5 465 10.3 M 580 sec. M-GRU 5 465 7.4 M 390 sec. M-reluGRU 5 465 7.4 M 390 sec. Table 2: Comparison of the per-epoch training time for the RNN architectures optimized on the TIMIT development set. The first row of Table 1 presents the results of a traditional RNN with ReLU activations (no gating mechanisms are used here). Although this architecture has recently shown promising results in some machine learning tasks [32], our speech recognition performance results confirm that gated recurrent networks (rows 2-5) still outperform traditional RNNs. We also observed that GRUs tend to slightly outperform the LSTM, in the tasks addressed in these experiments. The M-GRU architecture is the version of GRU without the reset gate. Table 1 highlights that the M-GRU achieves a performance very similar to that obtained with standard GRUs, further confirming our speculation on the negligible role played by the reset gate in a speech recognition application. The last row of Table 1 reports the performance achieved with the proposed model, in which, besides removing the reset gate, ReLU activations are used. Results indicate that M-reluGRU consistently achieves the best performance across the various input features. A remarkable achievement is the average PER(%) of 14.9% obtained with the proposed architecture using fMLLR features. To the best of our knowledge, such a result yields the best published performance on the TIMIT test-set. Table 2 reports a comparison of the per-epoch training time for all the considered RNNs. Results confirm that the main advantage of the proposed model is its ability to significantly reduce the training time. In our Theano implementation, running each GRU epoch lasts 580 seconds on an NVIDIA K40 GPU against just 390 seconds taken by the M-reluGRU, with a training time reduction of more than 32%. Table 2 also reports the best architectures obtained after optimizing the hyperparameters on the TIMIT development set. Results show that for GRU models the best performance is achieved with 5 hidden layers of 465 neurons. 4.2. Results on DIRHA English WSJ Tables 3 and 4 summarize the results obtained with the simulated and real parts of the DIRHA English WSJ dataset. For the sake of compactness, only the average performance (obtained by running five experiments with different initialization seeds) is reported, while standard deviations (which range from 0.2% to 0.4%) are omitted. XX XXX Feat. XXX MFCC FBANK fMLLR Arch. X relu-RNN 23.7 23.5 18.9 LSTM 23.2 23.2 18.9 GRU 22.3 22.5 18.6 M-GRU 21.5 22.0 18.0 M-reluGRU 21.3 21.4 17.6 Table 3: Word Error Rate (%) obtained with the DIRHA English WSJ dataset (simulated part) for various RNN architectures. XXX XXXFeat. MFCC XX Arch. X FBANK fMLLR relu-RNN 29.7 30.0 24.7 LSTM 29.5 29.1 24.6 GRU 28.5 28.4 24.0 M-GRU 28.4 28.1 23.6 M-reluGRU 27.8 27.6 22.8 Table 4: Word Error Rate (%) obtained with the DIRHA English WSJ dataset (real part) for various RNN architectures. Table 3 and 4 exhibit a trend comparable to that observed for the TIMIT dataset, confirming the effectiveness of the proposed architecture also in a more realistic and challenging scenario. The results are consistent over both real and simulated data as well as across the different features considered in this study. The reduction of the training time is about 36% (25 minutes for per-epoch training with the proposed model against 40 minutes spent by the standard GRU). Moreover, the reset gate removal seems to play a more crucial role in the addressed distant-talking scenario. If the closetalking results reported in Table 1 highlight comparable error rates between standard GRU and M-GRU, in the distant-talking case we even observe a performance gain when removing the reset gate. We suppose that this behaviour is due to reverberation, which implicitly introduces redundancy in the signal, due to the multiple delayed replicas of each sample. This results in a forward memory effect that smooths energy envelopes as well as sub-band energy contours. Due to this effect, a reset gate mechanism might become ineffective to forget the past. 5. Conclusions In this paper, we revised standard GRUs for speech recognition purposes. The proposed architecture is a simplified version of a GRU, in which the reset gate is removed and ReLU activations are used. The experiments, conducted on different tasks, features and environmental conditions, have confirmed the effectiveness of the proposed model not only to reduce the computational complexity of our implementation (with a reduction of more than 30% of the training time over a standard GRU), but also to slightly improve the recognition performance. Future efforts will be focused on extending this work to different tasks and larger datasets (e.g., switchboard or LibriSpeech) and to test the revised architecture on modern endto-end systems (such as CTC and attention-based models). To ensure the practical value of the computational gains of our models, these experiments should be replicated using more optimized implementations. 6. References [1] I. Goodfellow, Y. Bengio, and A. Courville, Deep Learning. MIT Press, 2016, http://www.deeplearningbook.org. [2] D. Yu and L. Deng, Automatic Speech Recognition - A Deep Learning Approach. Springer, 2015. [3] N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov, “Dropout: A simple way to prevent neural networks from overfitting,” Journal of Machine Learning Research, vol. 15, pp. 1929–1958, 2014. [4] S. Ioffe and C. Szegedy, “Batch normalization: Accelerating deep network training by reducing internal covariate shift,” in Proc. of ICML, 2015, pp. 448–456. [5] D. Kingma and J. Ba, “Adam: A method for stochastic optimization,” in Proc. of ICLR, 2015. [6] H. Bourlard and N. Morgan, “Continuous speech recognition by connectionist statistical methods,” IEEE Transactions on Neural Networks, vol. 4, no. 6, pp. 893–909, 1993. [7] G. Dahl, D. Yu, L. Deng, and A. Acero, “Context-dependent pretrained deep neural networks for large vocabulary speech recognition,” IEEE Transactions on Audio, Speech, and Language Processing, vol. 20, no. 1, pp. 30–42, 2012. [8] O. Abdel-Hamid, A. R. Mohamed, H. Jiang, L. Deng, G. Penn, and D. Yu, “Convolutional neural networks for speech recognition,” IEEE/ACM Transactions on Audio, Speech, and Language Processing, vol. 22, no. 10, pp. 1533–1545, Oct 2014. [9] A. Waibel, T. Hanazawa, G. Hinton, K. Shikano, and K. Lang, “Phoneme recognition using time-delay neural networks,” IEEE Transactions on Acoustics, Speech, and Signal processing, vol. 37, no. 3, pp. 328–339, 1989. [10] V. Peddinti, D. Povey, and S. Khudanpur, “A time delay neural network architecture for efficient modeling of long temporal contexts,” in Proc of INTERSPEECH, 2015, pp. 3214–3218. [11] A. Graves, N. Jaitly, and A. Mohamed., “Hybrid speech recognition with Deep Bidirectional LSTM,” in Proc of ASRU, 2013. [12] H. Sak, A. W. Senior, and F. Beaufays, “Long short-term memory recurrent neural network architectures for large scale acoustic modeling,” in Proc. of INTERSPEECH, 2014, pp. 338–342. [13] D. Amodei et al., “Deep speech 2: End-to-end speech recognition in english and mandarin,” 2015. [Online]. Available: http://arxiv.org/abs/1512.02595 [14] Z. Chen, S. Watanabe, H. Erdogan, and J. Hershey, “Speech enhancement and recognition using multi-task learning of long short-term memory recurrent neural networks,” in Proc. of INTERSPEECH, 2015, pp. 3274–3278. [15] T. Menne, J. Heymann, A. Alexandridis, K. Irie, A. Zeyer, M. Kitza, P. Golik, I. Kulikov, L. Drude, R. Schlüter, H. Ney, R. Haeb-Umbach, and A. Mouchtaris, “The RWTH/UPB/FORTH System Combination for the 4th CHiME Challenge Evaluation,” in CHiME 4 challenge, 2016, pp. 39–44. [16] F. Weninger, H. Erdogan, S. Watanabe, E. Vincent, J. L. Roux, J. R. Hershey, and B. W. Schuller, “Speech enhancement with LSTM recurrent neural networks and its application to noiserobust ASR,” in Proc. of LVA/ICA, 2015, pp. 91–99. [17] F. Weninger, J. Le Roux, J. Hershey, and B. Schuller, “Discriminatively trained recurrent neural networks for single-channel speech separation,” in Proc. of IEEE GlobalSIP, 2014. [18] H. Erdogan, J. R. Hershey, S. Watanabe, and J. L. Roux, “Phasesensitive and recognition-boosted speech separation using deep recurrent neural networks,” in Proc. of ICASSP, 2015, pp. 708– 712. [19] F. Eyben, F. Weninger, S. Squartini, and B. Schuller, “Real-life voice activity detection with lstm recurrent neural networks and an application to hollywood movies,” in Proc. of ICASSP, 2013, pp. 483–487. [20] A. Graves and N. Jaitly, “Towards end-to-end speech recognition with recurrent neural networks,” in Proc. of ICML, 2014, pp. 1764–1772. [21] D. Bahdanau, J. Chorowski, D. Serdyuk, P. Brakel, and Y. Bengio, “End-to-End Attention-based Large Vocabulary Speech Recognition,” in Proc. of ICASSP, 2016. [22] Y. Bengio, P. Simard, and P. Frasconi, “Learning long-term dependencies with gradient descent is difficult,” IEEE Transaction on Neural Networks, vol. 5, no. 2, pp. 157–166, Mar. 1994. [23] R. Pascanu, T. Mikolov, and Y. Bengio, “On the difficulty of training recurrent neural networks.” in Proc. of ICML, 2013, pp. 1310– 1318. [24] S. Hochreiter and J. Schmidhuber, “Long short-term memory,” Neural Computation, vol. 9, no. 8, pp. 1735–1780, Nov. 1997. [25] K. Greff, R. K. Srivastava, J. Koutnk, B. R. Steunebrink, and J. Schmidhuber, “Lstm: A search space odyssey,” IEEE Transactions on Neural Networks and Learning Systems, vol. PP, no. 99, pp. 1–11, 2016. [26] R. Jozefowicz, W. Zaremba, and I. Sutskever, “An empirical exploration of recurrent network architectures,” in Proc. of ICML, 2015, pp. 2342–2350. [27] Y. Zhang, G. Chen, D. Yu, K. Yao, S. Khudanpur, and J. R. Glass, “Highway long short-term memory RNNS for distant speech recognition,” in Proc. of ICASSP 2016, 2016, pp. 5755–5759. [28] K. Cho, B. van Merrienboer, D. Bahdanau, and Y. Bengio, “On the properties of neural machine translation: Encoder-decoder approaches,” in Proc. of SSST, 2014. [29] J. Chung, Ç. Gülçehre, K. Cho, and Y. Bengio, “Empirical evaluation of gated recurrent neural networks on sequence modeling,” in Proc. of NIPS, 2014. [30] K. Irie, Z. Túske, T. Alkhouli, R. Schlúter, and H. Ney, “LSTM, GRU, Highway and a Bit of Attention: An Empirical Overview for Language Modeling in Speech Recognition,” in Proc. of INTERSPEECH, 2016. [31] G. Zhou, J. Wu, C. Zhang, and Z. Zhou, “Minimal gated unit for recurrent neural networks,” 2016. [Online]. Available: http://arxiv.org/abs/1603.09420 [32] Q. Le, N. Jaitly, and G. Hinton, “A simple way to initialize recurrent networks of rectified linear units,” 2015. [Online]. Available: http://arxiv.org/abs/1504.00941 [33] C. Laurent, G. Pereyra, P. Brakel, Y. Zhang, and Y. Bengio, “Batch normalized recurrent neural networks,” in Proc. of ICASSP, 2016, pp. 2657–2661. [34] T. Cooijmans, N. Ballas, C. Laurent, and A. Courville, “Recurrent batch normalization,” 2016. [Online]. Available: http://arxiv.org/abs/1603.09025 [35] D. Povey et al., “The Kaldi Speech Recognition Toolkit,” in Proc. of ASRU, 2011. [36] M. Ravanelli, L. Cristoforetti, R. Gretter, M. Pellin, A. Sosi, and M. Omologo, “The DIRHA-English corpus and related tasks for distant-speech recognition in domestic environments,” in Proc. of ASRU, 2015, pp. 275–282. [37] M. Ravanelli, P. Svaizer, and M. Omologo, “Realistic multimicrophone data simulation for distant speech recognition,” in Proc. of INTERSPEECH, 2016. [38] T. Moon, H. Choi, H. Lee, and I. Song, “RNNDROP: A novel dropout for RNNS in ASR,” in Proc. of ASRU, 2015, pp. 65–70. [39] X. Glorot and Y. Bengio, “Understanding the difficulty of training deep feedforward neural networks,” in Proc. of AISTATS, 2010, pp. 249–256. [40] M. Ravanelli, P. Brakel, M. Omologo, and Y. Bengio, “Batchnormalized joint training for dnn-based distant speech recognition,” in Proc. of SLT, 2016. [41] Y. Bengio, J. Louradour, R. Collobert, and J. Weston, “Curriculum learning,” in Proc. of ICML, 2009, pp. 41–48. [42] Theano Development Team, “Theano: A Python framework for fast computation of mathematical expressions,” arXiv e-prints, vol. abs/1605.02688, May 2016.
9cs.NE
1 Collective Stochastic Discrete Choice Problems: arXiv:1604.08136v3 [cs.SY] 17 Aug 2017 A Min-LQG Game Formulation Rabih Salhab, Roland P. Malhamé and Jerome Le Ny Abstract We consider a class of dynamic collective choice models with social interactions, whereby a large number of non-uniform agents have to individually settle on one of multiple discrete alternative choices, with the relevance of their would-be choices continuously impacted by noise and the unfolding group behavior. For example, a large collection of geographically dispersed micro robots might need to gather, in a self organized mode and with least energy expenditure, at various known potential sites of interest, where groups of sufficient size would be required to perform collective tasks, such as search and rescue. This class of problems is modeled here as a so-called Min-LQG game, i.e., a linear quadratic Gaussian dynamic and non-cooperative game, with an additional combinatorial aspect in that it includes a final choice-related minimization in its terminal cost. The presence of this minimization term is key to enforcing some specific discrete choice by each individual agent. The theory of mean field games is invoked to generate a class of decentralized agent feedback control strategies which are then shown to converge to an exact Nash equilibrium of the game as the number of players increases to infinity. A key building block in our approach is an explicit solution to the problem of computing the best response of a generic agent to some arbitrarily posited smooth mean field trajectory. Ultimately, an agent is shown to face a continuously revised discrete choice problem, where greedy choices dictated by current conditions must be constantly balanced against the risk of the future process noise upsetting the wisdom of such decisions. Even though an agent’s ultimately chosen alternative is random and dictated by its entire noise history and initial state, the limiting infinite population macroscopic behavior can still be predicted. It is shown that any Nash equilibrium of the game is defined by an a priori computable This work was supported by NSERC under Grants 6820-2011 and 435905-13. The authors are with the department of Electrical Engineering, Polytechnique Montreal and with GERAD, Montreal, QC H3T-1J4, Canada {rabih.salhab, roland.malhame, jerome.le-ny}@polymtl.ca. August 21, 2017 DRAFT 2 probability matrix characterizing the manner in which the agent population ultimately splits among the available alternatives. For the scalar binary choice case with uniform dynamics and cost functions, we propose a numerical scheme to compute this probability matrix and the associated decentralized Nash strategies. The results are illustrated through simulations. Index Terms Mean Field Games, Stochastic Optimal Control, Discrete Choice Models. I. I NTRODUCTION Discrete choice problems arise in situations where an individual makes a choice among a discrete set of alternatives, such as modes of transportation [1], entry and withdrawal from the labor market, or residential locations [2]. In some situations, the individuals’ choices are considerably influenced by the social behavior. For example, in schools, teenagers’ decisions to smoke are affected by some personal factors, as well as by their peers’ behavior [3]. In this paper, we study a discrete choice problem for a large population of agents in a dynamic setting, capturing in particular the influence of the population’s state and the efforts that must be exerted over time by an individual before reaching a decision. For example, as in [4]–[6], a group of robots exploring an unknown terrain might need to move within a finite time horizon from their initial positions towards one of multiple sites of interest. While moving, each robot optimizes its efforts to remain close to the group and to arrive at the end of the time horizon in the vicinity of one of the predefined sites. The group may split, but the size of the subgroups should remain large enough to perform some collective tasks, such as search and rescue. Our model could also be used to study a mechanistic representation of opinion crystallization in elections [7], [8], where voters continuously update their opinions until forming a final decision regarding who they should vote for. Along the path to choose a candidate, changing one’s decision requires an effort, but at the same time, deviations from the others’ opinions involve a discomfort. McFadden laid in [9] the theoretical foundations of static discrete choice models, where an agent chooses among a finite set of alternatives the one that maximizes its utility. This utility depends on some potentially observable attributes (such as the agent’s financial status in the example of residential location choice) that dictate a deterministic trend in the choice, and other attributes idiosyncratic to that agent, which are not known by the economist or social planner August 21, 2017 DRAFT 3 carrying out the macroscopic analysis, although they may influence the choice. As a result, utility is defined as the sum of a known deterministic term plus a random term. Later, Rust [10] introduced a dynamic discrete choice model involving a Markov decision process for each agent. While peer pressure effects are absent in Rust’s and McFadden’s models, Brock and Durlauf [11] discuss a discrete choice problem with social interactions modeled as a static noncooperative game, where a large number of agents have to choose between two alternatives while being influenced by the average of the choices. The authors analyze the model using an approach similar to that of a static Mean Field Game (MFG), and inspired by statistical mechanics. The Brock-Durlauf model includes peer influence but is static, and in Rust’s model, the agents are required to make a choice repeatedly at each discrete time period but under no social influence. In our model, the agents are instead continuously reassessing the adequacy of their would-be choices and current actions along their random state-space path, up until the end of the control horizon, at which point their ultimate choice of alternative becomes fully crystallized. Thus, our formulation helps in modeling situations where alternative choices are identified as potential destination points in a suitable state space (e.g., physical space in the robotics example, or opinion space in the election example), and implementation of a given choice involves movement towards a final destination state, requiring control effort and constrained by specific dynamics. Recently, we introduced a related dynamic collective choice model with social interactions in [12]–[14]. In these articles, we study using the MFG methodology a dynamic game involving a large number of players choosing between multiple destination points. The agents’ dynamics are deterministic with random initial conditions. We show that multiple approximate (epsilon) Nash equilibria may exist, each characterized by a vector describing the way the population splits between the alternatives. The strategies developed in these papers are open loop decentralized policies, in the sense that to make its choice of trajectory and destination, an agent needs to know only its initial state and the initial distribution of the population. In particular, in this formulation each agent can commit from the start to its final choice, which implies that the model with deterministic dynamics is not sufficiently rich to fully capture opinion change phenomena. In contrast, we consider here the fully stochastic case where a large number of players moving according to a set of controlled diffusion processes should lie at time T in the vicinity of one of multiple predefined destination points. Along their path, they are influenced by the average August 21, 2017 DRAFT 4 state of the population and try to develop as little effort as possible to approach one of these destinations. By introducing noise in the dynamics we can model for example the unexpected events that influence a voter’s opinion during electoral campaigns or the random forces that perturb a robot’s trajectory while choosing a site to visit. The presence of this noise requires the agents to use bona fide feedback strategies and prevents them from committing to a choice before the final time. However, one can still anticipate asymptotically the manner in which an infinite population splits among the set of alternatives. A. Mean Field Game Methodology and Contributions of This Paper The MFG methodology that we again follow in this paper was introduced in a series of papers by Huang et al. [15]–[17], and independently by Lions and Lasry [18]–[20]. It is a powerful technique to analyze dynamic games involving a large number of agents anonymously interacting through their mean field, i.e., the empirical distributions of the agents’ states. Analysis starts by considering the limiting case of a continuum of agents. For agents evolving according to diffusion processes, the equilibrium of the game can be shown to be characterized by the solution of two coupled partial differential equations (PDE), a Hamilton-Jacobi-Bellman (HJB) equation propagating backwards and a Fokker-Planck (FP) equation propagating forwards. Indeed, the former characterizes the agents’ best response to some posited candidate mean field trajectory, while the latter propagates the would-be resulting mean field when all agents implement the computed best responses. Consistency requires that sustainable mean field trajectories, if they exist, be replicated in the process. Limiting equilibria are thus required to satisfy a system of fixed point equations, herein given by the coupled HJB-FP equations. The corresponding best responses, when applied to the finite population, constitute approximate Nash equilibria (-Nash equilibria) [16], [17], in the following sense. Definition 1: Consider N agents, a set of strategy profiles S = S1 × . . . × SN , and for each agent i, a cost function Ji (u1 , . . . , uN ), for (u1 , . . . , uN ) ∈ S. A strategy profile (u∗1 , . . . , u∗N ) ∈ S is called an -Nash equilibrium with respect to the costs Ji if there exists an  > 0 such that, for any fixed 1 ≤ i ≤ N , for all ui ∈ Si , we have Ji (ui , u∗−i ) ≥ Ji (u∗i , u∗−i ) − . The main contributions and structure of the paper are described next. In Section II, we present the mathematical formulation of our multi-agent dynamic discrete choice problem. Then in Section III, we postulate a known trajectory for the agents population mean state, and compute August 21, 2017 DRAFT 5 the best response strategy of a generic agent. This involves solving a modified version of the standard Linear Quadratic Gaussian (LQG) optimal tracking problem, which we call the MinLQG optimal tracking problem, where the final cost is replaced by a minimum of l distances to capture the discrete choice between l alternatives. We give an explicit expression for the generic agent’s best response (Min-LQG optimal control law), and show that at each instant, it can be interpreted as a static discrete choice model [9], where the cost for the agent of choosing one of the alternatives includes an additional term that increases with the risk of being driven to the other alternatives by the process noise. In Section IV we introduce the mean field equations, which allow us to compute the admissible population distribution trajectories. By exploiting the relationship between dynamic programming and the stochastic maximum principle, we establish a one-to-one map between the solutions of the mean field equations and the fixed points of a finite dimensional map. The latter characterizes the way the population splits between the alternatives. We show the existence of a fixed point for this map and propose in the binary choice case a numerical scheme to compute it. Our model lies somewhere between the MFG LQG models studied in [15], [16] and the fully nonlinear MFGs considered in [17]–[20]. On the one hand, in the LQG case the optimal strategies are linear feedback policies, whereas in our case they are nonlinear. On the other hand, an explicit solution in the general nonlinear case is not possible, while we provide in this paper an explicit form of the optimal strategies. Moreover, the existence and uniqueness of solutions of the mean field equations are shown in the general case under some strong regularity and boundedness conditions on the dynamics and cost coefficients [17]–[20]. In this paper, however, the quadratic running cost and linear dynamics make it possible to relax these assumptions. Finally, Section V discusses some numerical simulations illustrating the results, and Section VI presents our conclusions. Overall, the paper develops a set of decentralized closed-loop strategies forming an approximate Nash equilibrium for our multi-agent dynamic discrete choice problem. This equilibrium converges to an exact Nash equilibrium as the size of the population increases to infinity. To compute its optimal control at each time, an agent only needs to know its current individual state and the initial distribution of the population, which could be learned by a consensus-like algorithm for example [21]. The rationality assumption in MFGs allows us to drastically reduce the amount of coordination needed between the players, by predicting the evolution of the population distribution. In practice, with a finite number of players, errors in August 21, 2017 DRAFT 6 this prediction build up over time, but could be corrected by periodic communication between agents to re-estimate their current distribution. B. Notation Given an Euclidean space X, B(c, r) denotes the ball of radius r centered at c, xk the k-th element of x ∈ X, and x−i the vector (x1 , . . . , xi−1 , xi+1 , . . . , xN ). ⊗ denotes the Kronecker product. The n×n identity matrix is In , M 0 denotes the transpose of a matrix M , Tr(M ) its trace and |M | its determinant. The notations M  0 and M  0 stand respectively for M positive q definite and positive semi-definite. Given an n×n matrix Q  0 and x ∈ Rn , 12 x0 Qx is denoted by kxkQ . The minimum and maximum eigenvalues of a square matrix Q are written λmin (Q) and λmax (Q). Let X and Y be two subsets of Euclidean spaces. The set of functions from X to Y is denoted by Y X . ∂A, Int(A) and Ā denote respectively the boundary, interior and closure of a subset A ⊂ X. C(X) refers to the set of Rn -valued continuous functions on X with the standard supremum norm k.k∞ , and C i,j (X × Y ) to the set of real-valued continuous functions f (x, y) on X × Y such that the first i partial derivatives with respect to the x variable and the first j partial derivatives with respect to the y variable are continuous. The normal distribution of mean µ and covariance matrix Σ is denoted by N (µ, Σ). II. M ATHEMATICAL M ODEL We present in this section the dynamic collective choice model with social interactions. We consider a dynamic noncooperative game involving a large number N of players with the following stochastic dynamics: dxi (t) = (Ai xi (t) + Bi ui (t)) dt + σi dwi (t), (1) for 1 ≤ i ≤ N , where Ai ∈ Rn×n , Bi ∈ Rn×m , σi ∈ Rn×n , and {wi , 1 ≤ i ≤ N } are N independent Brownian motions in Rn on a probability space (Ω, F, P, {Ft }t∈[0,T ] ), where {Ft }t∈[0,T ] is the Brownian filtration generated by {wi , 1 ≤ i ≤ N } [22, Section 2.7]. In the remaining of the paper, P(A) denotes the probability of an event A, E(X) the expectation of a random variable X and M([0, T ], Rn ) the set of progressively measurable Rn -valued functions with respect to the filtration {Ft }t∈[0,T ] . We assume that the matrices σi , 1 ≤ i ≤ N , are invertible and that the initial conditions {xi (0), 1 ≤ i ≤ N } are independent and identically distributed August 21, 2017 DRAFT 7 (i.i.d.) and also independent of {wi , 1 ≤ i ≤ N }. Moreover, we assume that Ekxi (0)k2 < ∞. The vector xi (t) ∈ Rn is the state of player i at time t and ui (t) ∈ Rm its control input. Let pj , 1 ≤ j ≤ l, be l points in Rn . Each player is associated with the following individual cost functional: Z Ji (xi (0), ui , u−i ) = E 0 T  kxi − x̄k2Qi +kui k2Ri dt + min kxi (T ) − 1≤j≤l pj k2Mi  xi (0) , (2) where T > 0, Qi  0, Ri  0 and Mi  0. Along the path, the running cost encourages the P players to remain grouped around the average of the population x̄(t) := N i=1 xi (t)/N , which captures the social effect, and to develop as little effort as possible. The form of the final cost captures the discrete choice aspect, if we assume Mi large. That is, a player i at time T should be close to one of the destination points pj ∈ Rn , otherwise it is strongly penalized. Hence, the overall individual cost captures the problem faced by each agent of deciding between l alternatives, while trying to remain close to the mean population trajectory. The players interact through the average x̄ of the population. Even though the running cost is linear and quadratic, the minimum term in the final cost changes drastically the analysis of the game with respect to the standard LQG MFG problems [15], [16]. In fact, as shown later in (14), the optimal strategies are nonlinear feedback policies, whereas they are linear in the standard LQG MFG problems. Moreover, to anticipate the mean trajectory x̄, the players need in the LQG case to know only the initial mean of the population. In our case, they need to know the full initial distribution in order to compute a solution of the nonlinear mean field equations defined later in (24). Let us denote the individual parameters θi := (Ai , Bi , σi , Qi , Ri , Mi ). We assume that there are k types of agents, that is, θi takes values in a finite set {Θ1 , . . . , Θk }, which does not depend on the size of the population N . As N tends to infinity, it is convenient to represent the limiting sequence of (θi )i=1,...,N by realizations of a random vector θ, which takes values in the same finite set {Θ1 , . . . , Θk }. Let us denote the empirical measure of the sequence θi P N as PθN (Θs ) = 1/N N i=1 1{θi =Θs } for s = 1, . . . , k. We assume that Pθ has a weak limit Pθ = (α1 , . . . , αk ) as N → ∞ For further discussions about this assumption, one can refer to [24]. We define the set of admissible control laws for each agent as follows   Z T m 2 U = u ∈ M([0, T ], R ) E ku(s)k ds < ∞, . (3) 0 August 21, 2017 DRAFT 8 We define the set of admissible Markov policies n n L = u ∈ (Rm )[0,T ]×R |∃L1 > 0, ∀(t, x) ∈ [0, T ] × Rn , ku(t, x)k≤ L1 (1 + kxk), and o (4) ∀r > 0, T 0 ∈ (0, T ), ∃L2 > 0, ∀k(x, y)k≤ r, t ∈ [0, T 0 ], ku(t, x) − u(t, y)k≤ L2 kx − yk . If u ∈ L, then the stochastic differential equation (SDE) (1), with ui equal to u(t, xi ), has a unique strong solution [22, Section 5.2]. As shown below in Theorem 6, the developed strategies form −Nash equilibria with respect to the space of admissible actions U. Moreover, these strategies can be expressed as Markov policies (feedback policies), see (14). III. T HE “M IN -LQG” O PTIMAL T RACKING P ROBLEM AND THE G ENERIC AGENT ’ S B EST R ESPONSE Following the MFG approach, we start by assuming a continuum of agents for which one can ascribe a deterministic macroscopic behavior x̄ (posited mean population state), which is supposed known in this section. The problem of determining x̄ is treated in Section IV. In order to compute its best response to x̄, a generic agent with parameters θ = (A, B, σ, Q, R, M ) ∈ {Θ1 , . . . , Θk } solves the following optimal control problem, which we call the “Min-LQG” optimal tracking problem: T Z  inf J (x(0), u, x̄) = inf E u∈U u∈U kx − x̄k2Q +kuk2R 0 dt + min kx(T ) − j=1,...,l pj k2M  x(0) (5) s.t. dx(t) = (Ax(t) + Bu(t)) dt + σdw(t), where w is a Brownian motion in Rn on the probability space (Ω, F, P) and x(0) is a random vector independent of w and distributed according to the known distribution of the agents’ initial and states. Herein, ∂h(t,x) ∂x ∂ 2 h(t,x) ∂x2 will denote respectively the gradient and Hessian matrix of the real function h with respect to x ∈ Rn . The optimal cost-to-go function of (5) satisfies the following HJB equation [25] ∂V ∂V 1 − = x0 A0 − ∂t ∂x 2 V (T, x) = min kx − 1≤j≤l  ∂V ∂x pj k2M , 0  2  1 0∂ V BR B + Tr σ σ + kx − x̄k2Q 2 ∂x 2 ∂x −1 0 ∂V (6) n ∀x ∈ R . In the following, we linearize equation (6) under appropriate conditions, using a generalized Hopf-Cole transformation [26, Section 4.4]. Moreover, we derive an explicit formula for the August 21, 2017 DRAFT 9 solution of (6) and the min-LQG optimal control law. The results of this section are proved in Appendix A. The following notation is used in the remaining of the paper. We define x(j) , u(j) and Vj to be the optimal state trajectory, optimal control law and optimal cost-to-go of the LQG tracking problem that the generic agent must solve when pj is the only available alternative, that is, (5) with pk = pj , for all k ∈ {1, . . . , l}. Recall that [27, Chapter 6] 1 Vj (t, x) = x0 Π(t)x + x0 βj (t) + δj (t) 2 u(j) (t, x) = −R−1 B 0 (Π(t)x + βj (t))  dx(j) (t) = Ax(j) (t) + Bu(j) t, x(j) (t) dt + σdw(j) (t), (7) (8) (9) where Π, βj and δj are the unique solutions of d Π(t) = Π(t)BR−1 B 0 Π(t) − A0 Π(t) − Π(t)A − Q, dt 0 d βj (t) = − A − BR−1 B 0 Π(t) βj (t) + Qx̄(t), dt d 1 1 δj (t) = βj (t)0 BR−1 B 0 βj (t) − Tr(σ 0 Π(t)σ) − kx̄(t)k2Q , dt 2 2 (10) with Π(T ) = M, βj (T ) = −M pj and δj (T ) = kpj k2M . Remark 1: The final cost in (5) is non-smooth. Hence, the corresponding HJB equation (6) and its transformed parabolic equation (30) below have non-smooth terminal conditions. However, as shown later in Lemma 8, these partial differential equations (PDEs) smooth out their solutions, i.e., the only non-smoothness occurs at the terminal time. Hence, all the PDE solutions in the remaining sections are to be understood in the strong sense. In the following, we denote by Wj , for j ∈ {1, . . . , l}, the Voronoi cell associated with pj , that is, Wj = {x ∈ Rn such that kx − pj kM ≤ kx − pk kM , for all 1 ≤ k ≤ l}. We define for all j ∈ {1, . . . , l} the following notation for the conditional probability of an agent following the control law u(j) to be in the Voronoi cell j at time T if its state at time t is x   gj (t, x) , P x(j) (T ) ∈ Wj x(j) (t) = x , (11) where x(j) is defined in (9). To linearize and solve the HJB equation (6) using the Hopf-Cole transformation (see Appendix A), we make the following assumption. Assumption 1: We assume that there exists a scalar η > 0 such that BR−1 B 0 = ησσ 0 . August 21, 2017 DRAFT 10 Remark 2: Note the following: i. Assumption 1 always holds in the scalar case (n = m = 1). ii. If η exists, then it is strictly positive. iii. If η exists, since we assumed that σ is invertible, so is BR−1 B 0 , and thus ker B 0 = {0}. In particular, the dimension of control space is greater or equal to that of the state space (m ≥ n). Then we must choose R = η1 B 0 (σσ 0 )−1 B, for some η > 0. iv. Assumption 1 is satisfied in particular if B = R = σ = In , a situation that has been studied previously in the context of other mean-field games (with A = 0) using the Hopf-Cole transformation, see [28, Chapter 2] and the references therein. We now state the main result of this section. Theorem 1: Under Assumption 1, the HJB equation (6) has a unique solution (t, x) 7→ V (t, x) in C 1,2 ([0, T ) × Rn ) ∩ C([0, T ] × Rn ), defined as ! l X 1 exp (−ηVj (t, x)) gj (t, x) , ∀(t, x) ∈ [0, T ) × Rn V (t, x) = − log η j=1 (12) V (T, x) = min kx − pj k2M , ∀x ∈ Rn , j=1,...,l where Vj and x(j) are defined in (7) and (9). Having solved the HJB equation related to the Min-LQG optimal control problem (5), we now prove the existence of a unique optimal control law. We define the following function: u∗ (t, x) = −R−1 B 0 ∂V , ∂x t ∈ [0, T ) (13) u∗ (T, x) = 0. Theorem 2: The following statements hold: i. The function u∗ defined in (13) has on [0, T ) × Rn the following form: u∗ (t, x) = l X exp (−ηVj (t, x)) gj (t, x) Pl j=1 k=1 exp (−ηVk (t, x)) gk (t, x) u(j) (t, x), (14) with Vj , u(j) defined in (7) and (8). ii. u∗ is an admissible Markov policy. iii. u∗ (t, x∗ (t, w)) is the unique optimal control law of (5), where x∗ (t, w) is the unique strong solution of the SDE in (5) with u equal to u∗ (t, x). August 21, 2017 DRAFT 11 In the degenerate case with σ = 0, it is shown in [12]–[14] that the optimal strategy of an agent i in the Min-LQG problem is equal to u(j) (the optimal strategy in the presence of only one alternative pj ) if the Linear Quadratic Regulator (LQR) control problem associated with pj is the least costly starting from xi (0). Therefore, a generic agent commits from the start to its final choice based on its initial state. When σ 6= 0, the generic agent can no longer be “decisive”. Its optimal control law (14) is a convex combination of the optimal policies u(j) , j = 1, . . . , l. The weights of u(j) form a spatio-temporal Gibbs distribution [29], which puts more mass on the less costly and risky destinations. A destination pj is considered riskier in state x at time t if the Brownian motion has a higher chance of driving the state of an agent closer to a destination different from pj at time T , when this agent implements u(j) from (x, t) onwards. We claim in Section II that the final cost forces the agents to be close to one of the destination points at time T . In the following Lemma, we show in fact that in the scalar case, the probability that an agent is close to one of the desitnation points increases with the final cost’s coefficient M . The result is proved for paths x̄ that are uniformly bounded with respect to M , a property that is shown to hold later in Theorem 5 for the fixed point paths x̄. Lemma 3: Suppose that the paths x̄ are uniformly bounded with respect to M for the norm  12 R T 2 . Then, for any  > 0, k.k dt 0   σ 2 log M 1 + P (|x∗ (T ) − pj |> , ∀1 ≤ j ≤ l) = o . M 2 M In the rest of this section, we discuss the relation between our solution to the Min-LQG optimal control problem in the scalar binary choice case and the solution of static discrete choice models. We start by recalling some facts about the static models. In the standard binary discrete choice models, a generic person chooses between two alternatives 1 and 2. The cost paid by this person when choosing an alternative j is defined by vj = k(j) + ν, where k(j) is a deterministic function that depends on personal publicly observable attributes and on alternative j, while ν is a random variable accounting for personal idiosyncrasies unobservable by the social planner. When ν is distributed according to the extreme value distribution [9], then the probability that a cost-minimizing generic person chooses an alternative j is equal to Pj = August 21, 2017 exp(−k(j)) . exp(−k(1))+exp(−k(2)) DRAFT 12 Now, the Min-LQG optimal control law (14) can be written as follows:   exp −η Ṽ1 (t, x)     u(1) (t, x) u∗ (t, x) = exp −η Ṽ1 (t, x) + exp −η Ṽ2 (t, x)   exp −η Ṽ2 (t, x)     u(2) (t, x), + exp −η Ṽ1 (t, x) + exp −η Ṽ2 (t, x) (15) where Ṽj (t, x) = Vj (t, x) − 1 log (gj (t, x)) , η j = 1, 2. (16) Here Vj (t, x) is the expected cost paid by a generic agent if pj is the only available alternative, and u(j) (t, x) is the corresponding optimal policy. In the presence of two alternatives, the optimal policy at time t is given by (15), which can be interpreted as a mixed strategy between two pure strategies u(1) (t, x) (picking alternative p1 ) and u(2) (t, x) (picking alternative p2 ). Within this framework, denoting by −j the alternative other than j, a generic agent at time t chooses the alternative pj with probability   exp −η Ṽj (t, x)    . P rj = exp −η Ṽj (t, x) + exp −η Ṽ−j (t, x) Thus, the Min-LQG problem can be viewed at each time t ∈ [0, T ] as a static discrete choice problem, where the cost of choosing alternative pj includes an additional term − η1 log (gj (t, x)) which goes to zero when the probability gj (t, x) of landing inside of the Voronoi cell Wj associated with alternative j at time T approaches one. In effect, this additional term measures the expected cost due to the risk inherent to an early choice, i.e., one based on a premature decision at time t < T in favor of one alternative, for example alternative pj , thus applying all the way the pure strategy u(j) (t, x), while ignoring the possibility that by time T , the Brownian motion could drive the agent’s state toward the −j alternative. IV. T HE M EAN F IELD E QUATIONS AND T HE F IXED P OINT P ROBLEM In Section III, we assumed the mean trajectory x̄ known and we computed the generic agent’s best response to it, which is given by (14). In the following, a superscript s refers to an agent with parameters Θs ∈ {Θ1 , . . . , Θk }. We write us∗ (t, x, x̄) instead of us∗ (t, x) to emphasize the dependence on x̄. We now seek a sustainable macroscopic behavior x̄, in the sense that it August 21, 2017 DRAFT 13 is replicated by the mean of the generic agent’s state under its best response to it. Thus, an admissible x̄ satisfies the following Mean Field equations: x̄(t) = k X αs x̄s (t), with x̄s = E[xs∗ ], 1 ≤ s ≤ k, (17) s=1 dxs∗ (t) = (As xs∗ (t) + B s us∗ (t, xs∗ (t), x̄)) dt + σ s dws (t), where xs∗ (0), 1 ≤ s ≤ k, are independent and identically distributed according to the initial distribution of the players, i.e., the distribution of xi (0), αs are defined in Section II and {w1 , . . . , wk } are k independent Brownian motions, assumed independent of {x1∗ (0), . . . , xk∗ (0)}. Solving (17) directly is no easy task. Indeed, this is an n × k nonlinear Mckean-Vlasov equation [17], where the drift term depends on the joint probability law of the k types of generic agents through the mean trajectory x̄. However, we derive in Lemma 4 below an equivalent representation for a solution x̄ of (17), based on the solution of a deterministic optimal control problem, consisting of two linear forward-backward ODEs (see (19a)-(19b) below), with a nonlinear coupling in the boundary condition (see (20a)-(20b)) through what we call a “Choice Distribution Matrix” (CDM). A CDM is a k × l row stochastic matrix with its (s, j) entry equal to the probability that the generic agent of type s is at time T closer (in the sense of the M weighted l2 norm) to pj than any of the other alternatives when it optimally responds to x̄. Equations (19a)-(19b) are respectively the expectations of the generic agents’ state (see (1)) and co-state equations (see (34)), together with that of their boundary conditions (see (35)), when the input in (1) associated with the agents’ best response is expressed in terms of the co-state. The state and co-state equations follow from the stochastic maximum principle of the Min-LQG problem, which we derive in Lemma 9 in Appendix B. The advantage of this new representation is that if one considers the CDM in the q̄(T ) boundary condition as a parameter (say any k × l row stochastic matrix), then equations (19a)-(19b) become totally linear. As a result, they have under Assumption 2 below an explicit solution (the term that multiplies P1 in (22)) parametrized by the stochastic matrix. This implies that the solutions x̄ of the mean field equations lies in the family of paths (22) parametrized by the k × l row stochastic matrices. Conversely, in order to have a path x̄Λ parametrized by some candidate Λ be a solution of (17), consistency requires that Λ be equal to the associated CDM as expressed in (20a) when the generic agents optimally respond to x̄Λ . This is equivalent to requiring that Λ be a fixed point of the finite dimensional August 21, 2017 DRAFT 14 map F defined by (23). Indeed, F maps a row stochastic matrix Λ to the CDM when the generic agents optimally respond to x̄Λ . In effect, we establish that there is a one to one map between the solutions x̄ of (17) and the fixed points of the finite dimensional map F . Theorem 5 below summarizes the related results: point (i) of the theorem states the existence of the one-to-one map in question, while point (ii) states that there is at least one fixed point of F . Thus, a Nash equilibrium CDM exists (equivalently a solution of (17)) characterizing the way an infinite population, with the same distribution of heterogeneous parameters as the original large but finite population, would split between the destination points. The above results are proved in Appendix B. In the following, we adopt the following notations. Let X̄ = (x̄1 , . . . , x̄k ), X∗ = (x1∗ , . . . , xk∗ ), U∗ = (u1∗ , . . . , uk∗ ), W = (w1 , . . . , wk ), and p = (p1 , . . . , pl ). Let A, B, Q, R, M and σ be the block-diagonal matrices diag(A1 , . . . , Ak ), diag(B 1 , . . . , B k ), diag(Q1 , . . . , Qk ), diag(R1 , . . . , Rk ), diag(M 1 , . . . , M k ) and diag(σ 1 , . . . , σ k ) respectively. Define L = Ink − 1k ⊗ P1 , where 1k is a column of k ones and P1 = Pθ0 ⊗ In where Pθ is defined in Section II. The following assumption guarantees the existence and uniqueness of a solution for (19a)-(19b) whenever the CDM in the q̄(T ) boundary condition is considered as a parameter. Assumption 2: We assume the existence of a solution on [0, T ] to the following (nonsymmetric) Riccati equation: d π = −A0 π − πA + πBR−1 B 0 π + QL, dt π(T ) = M. (18) Note that if Assumption 2 is satisfied, the solution of (18) is unique as a consequence of the smoothness of the right-hand side of (18) with respect to π [30, Section 2.4, Lemma 1]. For a uniform population, i.e., k = 1, we have L = 0 and hence Assumption 2 is always satisfied [31, Section 2.3]. For more details about Assumption 2, one can refer to [32]. Lemma 4: Under Assumption 2, x̄ satisfies (17) if and only if it satisfies the following equations d X̄(t) = AX̄(t) − BR−1 B 0 q̄(t), dt d q̄(t) = −A0 q̄(t) + QLX̄(t), dt x̄(t) = P1 X̄(t), August 21, 2017 (19a) (19b) (19c) DRAFT 15  with X̄(0) = EX(0) and q̄(T ) = M X̄(T ) − Λ ⊗ In p , where the CDM Λ is defined as follows: Λsj = P(xs∗ (T ) ∈ Wj ), 1 ≤ s ≤ k, 1 ≤ j ≤ l dX∗ (t) = (AX∗ (t) + BU∗ (t, X∗ (t), x̄)) dt + σdW (t). (20a) (20b) We are now ready to state the main result of this paper, which asserts that there exists an admissible mean trajectory x̄ satisfying (17). Moreover, it characterizes each admissible x̄ by a matrix Λ, where Λsj given in (20a) is the probability that an agent of type s optimally tracking x̄ is at time T closer to pj than any of the other destination points. This matrix is a fixed point of a well defined finite dimensional map. The following functions are used to compute the solution of (19a)-(19b), where Λ is considered as a parameter. Under Assumption 2, we define R1 and R2 such that, for all s ≥ 0,  d R1 (t, s) = A − BR−1 B 0 π(t) R1 (t, s), dt  d R2 (t) = A − BR−1 B 0 π(t) R2 (t) dt (21) + BR−1 B 0 R1 (T, t)0 M, with R1 (s, s) = Ink and R2 (0) = 0, where π is the unique solution of (18). We denote by S the set of k × l row stochastic matrices. For Λ ∈ S, define the function x̄Λ : [0, T ] → Rn by x̄Λ (t) := P1 (R1 (t, 0)X̄(0) + R2 (t)Λ ⊗ In p). (22) Next, define the finite dimensional map F from S into itself such that for all Λ ∈ S, F (Λ)sj = P(xs,Λ ∗ (T ) ∈ Wj ), (23) k,Λ where X∗Λ = (x1,Λ ∗ , . . . , x∗ ) is the unique strong solution of the following SDE parameterized by Λ dX∗Λ (t) = AX∗Λ (t) + BU∗ t, X∗Λ (t), x̄Λ  dt + σdW (t), with X∗Λ (0) = X∗ (0). (24) The map F involves the probability distribution of the process X∗Λ . Hence, to find the value of F (Λ), one needs to solve the Fokker-Planck equation associated with (24). Theorem 5: Under Assumption 2, the following statements hold: (i) x̄ satisfies (17) if and only if x̄ = x̄Λ August 21, 2017 (25) DRAFT 16 where x̄Λ is defined in (22) and Λ is a fixed point of F . (ii) F is continuous and has at least one fixed point. Equivalently, (17) has at least one solution x̄. (iii) For a uniform population, i.e, k=1, the admissible paths x̄ are uniformly bounded with R  21 T 2 respect to M and Λ ∈ S for the standard L2 norm k.k dt . 0 Remark 3: In [17], [33], which consider the general MFG theory, the authors show the existence and uniqueness of solutions for the Mckean-Vlasov equation describing the mean field behavior via Banach’s [17] or Schauder’s fixed point theorem [33]. In [17], it is assumed that the optimal control law is regular enough (Lipschitz continuous with respect to the state and the distribution) in order to define a contraction, while in [33] the result is proved under the assumption of smooth and convex final cost. In our case, the control law (14) is not Lipschitz continuous with respect to x̄. Moreover, the final cost is neither smooth nor convex. Hence, the Mckean-Vlasov equation (17) might have multiple solutions. Indeed, (17) has a number of solutions equal to the number of fixed points of F . Having solved the game for a continuum of players, we now return to the practical case of a finite population of players. Using arguments similar to those in [16, Theorem 5.6], one can show that the MFG-based decentralized strategies (14), when applied by a finite population, constitute an −Nash equilibrium. Theorem 6: The decentralized feedback strategies u∗ defined in (14) for a fixed point path x̄ of (17), when applied by N players with dynamics (1), constitute an N -Nash equilibrium with respect to the costs (2), where N converges to zero as N increases to infinity. The set of fixed points of the finite dimensional map F characterizes the game in terms of the number of distinct −Nash equilibria and the distribution of the choices for each of them. In fact, Theorem 5 establishes a one to one map between the solutions of the mean field equations (17) and the set of fixed point CDMs. If Λ is a fixed point of F and the players optimally respond to the corresponding x̄Λ given by (22), then Λsj is the fraction of agents of type s that P go towards pj , and ks=1 αs Λsj is the total fraction of players choosing this alternative. Thus, to compute a path x̄ satisfying (17), a player computes a fixed point Λ of F and then computes (22). Let us now briefly illustrate how to compute a fixed point of F in the scalar binary choice case for a population with uniform dynamics and cost functions, i.e., n = m = k = 1 and August 21, 2017 DRAFT 17 l = 2, and initial probability density function p0 . In this case, a pair (r, 1 − r) for r ∈ [0, 1] is a fixed point of F if and only if r is a fixed point of G, where G(r) = [F (r, 1 − r)]1 . Following the second point of Theorem 5, F is continuous. As a result, G is a continuous function from [0, 1] into itself. Thus, we can apply the bisection method to G(r) − r to find a fixed point of Rc G, if we can compute the value of G at any r ∈ [0, 1]. But G(r) = −∞ pr (T, x)dx, where c = (p1 + p2 )/2 and pr (t, x) is the probability density of X (r,1−r) (t) defined by (24), which can be computed numerically by solving the following Fokker-Planck equation associated to (24), e.g., via an implicit finite difference scheme [34] ∂ (µ(t, x, r)pr (t, x)) σ 2 ∂ 2 pr (t, x) ∂pr (t, x) =− + , ∂t ∂x 2 ∂x2 (26)  with pr (0, x) = p0 (x), ∀x ∈ R. Here µ(t, x, r) = Ax + Bu∗ t, x, x̄(r,1−r) for x̄(r,1−r) (t) = R1 (t, 0)x̄(0) + R2 (t) (rp1 + (1 − r)p2 ), see (22). V. S IMULATION R ESULTS To illustrate the dynamics of our collective decision mechanism, we consider a group of agents with parameters A = 0.1, B = 0.2, R = 5, M = 500, T = 2 and σ = 1.5. The agents, initially drawn from the normal distribution N (0.3, 1), choose between the alternatives p1 = −10 and p2 = 10. At first, we consider a weak social effect (Q = 0.1). Following the numerical scheme at the end of Section IV, we find a fixed point r = 0.39. Accordingly, a player applying its decentralized MFG-based strategy is at time T closer to p1 with probability 0.39. Equivalently, if we draw independently from the initial distribution a large number of players with independent Wiener processes, then the percentage of players that will be at time T closer to p1 converges to 39% as the size of the population increases to infinity. Thus, the majority of the players choose p2 . Figure 1 shows the distribution at time t = 0, t = 0.5T and t = T , the mean of a generic agent, the tracked path (admissible path (25)), and the sample paths of 10 players choosing between −10 and 10 under the weak social effect. As shown in this figure, the mean replicates the tracked path computed using the fixed point r = 0.39 and (25). Figure 2 shows that for sufficiently small values of Q (Q < 21) the fixed points of F are unique. When the social effect Q exceeds 21, F has three fixed points, where two of them correspond to consensus on one alternative. Indeed as Q increases arbitrarily, agents essentially forget temporarily about the final cost, and the problem becomes a classical rendez-vous MFG August 21, 2017 DRAFT 18 0.4 0.2 0 -20 -15 -10 -5 0 5 10 15 20 4 2 0 0 0.5 1 1.5 2 0 0.5 1 1.5 2 20 10 0 -10 -20 Fig. 1. Distribution evolution, mean trajectory, tracked path and sample paths for a weak social effect (Q = 0.1). Here r = 0.39. where they tend to merge towards each other rapidly. If this occurs around the middle of the destinations segment, then this is clearly an unstable situation where most of the time, they end up splitting classically according to initial conditions; however, some large deviations are possible whereby a significant fraction decides to choose one destination, thus pulling everyone else towards it, which may help explain the non uniqueness of outcomes. Figure 3 illustrates the evolution of the distributions that correspond to the first fixed point with Q = 10 and Q = 20. 1 0.8 0.6 0.4 0.2 0 0 5 10 15 20 25 30 Fig. 2. Influence of the coefficient Q on the multiplicity of the fixed points August 21, 2017 DRAFT 19 0.5 0.4 0.3 0.2 0.1 0 -20 -15 -10 -5 0 5 10 15 20 -15 -10 -5 0 5 10 15 20 0.5 0.4 0.3 0.2 0.1 0 -20 Fig. 3. Influence of the social effect on the distribution of the agents. Distribution evolution for medium (Q = 10) and strong (Q = 20) social effects. In the first case, r = 0.2, while in second case, r = 0.02. To illustrate the effect of the noise intensity on the behavior of the group, we fix Q = 20 and we increase σ from 1.5 to 5. For σ = 1.5, r = 0.02 (Figure 3), but for σ = 3, r increases to 0.28 (Figure 4) and for σ = 5, r = 0.46 (Figure 4). Thus, the higher the noise the more evenly distributed the players are between the alternatives. VI. C ONCLUSION We study within the framework of mean field game theory a dynamic collective choice model with social interactions. We introduce the Min-LQG optimal control problem and give an explicit form of a generic agent’s best response (Min-LQG optimal control law). The Min-LQG problem can be interpreted at each time step as a static discrete choice model where the cost of choosing one of the alternatives has an additional term that increases with the risk of being driven by the process noise to the other alternatives. We show the existence of closed loop decentralized −Nash strategies. Moreover, we characterize these strategies by a CDM describing the way August 21, 2017 DRAFT 20 0.4 0.3 0.2 0.1 0 -30 -20 -10 0 10 20 30 -20 -10 0 10 20 30 0.4 0.3 0.2 0.1 0 -30 Fig. 4. Influence of the noise on the distribution of the agents. Distribution evolution for σ = 3 and σ = 5. In the first case, r = 0.28, while in the second case, r = 0.46. the population splits between the alternatives, which is a fixed point of a well defined finite dimensional map. A PPENDIX A In this appendix, we provide the proofs of lemmas and theorems related to a generic agent’s best response. Proof of Theorem 1 We start with a technical result on the mean-square convergence of random variables. Lemma 7: Let I be a closed subset of Rn . Let Xk ∈ Rn be a sequence of random variables with finite first and second moments. If E[Xk ] =: µk → µ for some vector µ not in I, and E[kXk − µk k2 ] → 0, then lim P (Xk ∈ I) = 0. k→∞ August 21, 2017 DRAFT 21 Proof: I ⊂ Rn is a closed set and µ ∈ / I, so the distance d between µ and I is strictly positive. Since, µk converges to µ, there exists k0 > 0 such that for all k ≥ 0 and for all x in I we have kx − µk k≥ d/2. Hence, using Chevyshev’s inequality [35, Theorem 1.6.4], P (Xk ∈ I) ≤ P (kXk − µk k≥ d/2) ≤ 4 E[kXk − µk k2 ], d2 for all k ≥ k0 . The result follows since the right-hand side of the inequality is assumed to converge to 0. The following lemma concerns the regularity of the solution provided in Theorem 1. Lemma 8: V defined in (12) is in C 1,2 ([0, T ) × Rn ) ∩ C([0, T ] × Rn ). Proof: Note that for gj defined in (11), we can write   gj (t, x) = P x(j) (T ) ∈ Wj x(j) (t) = x Z Z T 1 p = exp − y − α(T, t)x + α(T, τ )BR−1 B 0 βj (τ )dτ |2πΣt | Wj t Z T α(T, τ )σσ 0 α(T, τ )0 dτ, for Σt = 2 Σ−1 t ! dy (27) t (j) where x , Π and βj are defined in (9) and (10), and the matrix-valued function α(t, s) is the unique solution of  d α(t, s) = A − BR−1 B 0 Π(t) α(t, s), dt (28) with α(s, s) = In . The expression (27) follows from the fact that the solution of a linear SDE with deterministic initial condition has a normal distribution [22, Section 2.5]. In view of (12), (27), and Σt  0 for all t ∈ [0, T ), V is in C 1,2 ([0, T )×Rn ). It remains to show the continuity on {T }× Rn . We start by considering x ∈ Rn \ ∪lj=1 ∂Wj , and (tk , xk ) ∈ [0, T ) × Rn converging to (T, x). We have x ∈ Int(Wj0 ) for some j0 ∈ {1, . . . , l}, and x 6∈ Wj for j 6= j0 . In view of (27), gj (tk , xk ) RT is the probability that a Gaussian vector of mean α(T, tk )xk − tk α(T, τ )BR−1 B 0 βj (τ )dτ (which converges to x with k) and covariance Σtk (which converges to 0 with k) is in the closed set Wj . In this way, each j defines a distinct sequence of random variables associated with the (tk , xk )’s. Now if one considers the closed set I of Lemma 7 to be any of the closed sets Wj ’s for j 6= j0 , one can conclude from this lemma that gj (tk , xk ) must converge to 0 for j 6= j0 and, as a consequence, to 1 for j = j0 since the Wj ’s form a partition of the state space. Therefore,  V (tk , xk ) converges to V (T, x). Thus, V is continuous on [0, T ] × Rn \ ∪lj=1 ∂Wj . Finally, consider a sequence (tk , xk ) ∈ [0, T )×Rn converging to (T, c), with c ∈ ∪lj=1 ∂Wj . We show that August 21, 2017 DRAFT 22 V (tk , xk ) converges to V (T, c). Up to renumbering the Voronoi cells, we can assume without loss of generality that c ∈ ∂Wj for all j in {1, . . . , z} and c ∈ / ∪lj=z+1 Wj , for some 1 ≤ z ≤ l. We have, I0 = l X exp (−ηVj (tk , xk )) gj (tk , xk ) j=1 = z X l X exp (−ηVj (tk , xk )) gj (tk , xk ) + j=1 exp (−ηVj (tk , xk )) gj (tk , xk ). j=z+1 Since c ∈ / ∪lj=z+1 Wj , one can use an argument similar to that above to show that the second term of the right-hand side of the second equality converges to 0. Next, let  > 0 and fix r > 0 small enough so that B̄(c, r) ⊂ ∩lj=z+1 Wj C . The value of r will be determined later. The first term can be written z X exp (−ηVj (tk , xk )) gj (tk , xk ) = I1 + I2 , j=1 where I1 = z X  (j) (j) exp (−ηVj (tk , xk )) P x (T ) ∈ Wj ∩ B̄(c, r) x (tk ) = xk  j=1 I2 = z X   exp (−ηVj (tk , xk )) P x(j) (T ) ∈ Wj \ B̄(c, r) x(j) (tk ) = xk . j=1 By Lemma 7, I2 converges to zero. Next, by solving the linear differential equations in (10) and replacing the expressions of βj and δj in the expression (27) of gj , one can show that under Assumption 1 I1 = exp (−ηV0 (tk , xk )) z Z X j=1  fk (y) exp η(kyk2M −ky − pj k2M ) dy, Wj ∩B̄(c,r) where fk (y) is the probability density function of the Gaussian distribution of mean α(T, tk )xk − RT α(T, τ )BR−1 B 0 β0 (τ )dτ and variance Σtk , and V0 and β0 are equal to Vj and βj defined in tk (7)-(10) but for pj = 0. By the definition of c, kc − p1 k2M = · · · = kc − pz k2M . Hence, z Z X 2 2 I1 = exp −η(V0 (tk , xk ) − kckM +kc − pj kM ) fk (y)dy j=1 + exp (−ηV0 (tk , xk )) z Z X j=1 Wj ∩B̄(c,r) fk (y)f (y)dy Wj ∩B̄(c,r) , I3 + I4 , August 21, 2017 DRAFT 23 where f (y) = exp (η(kyk2M −ky − pj k2M )) − exp (η(kck2M −kc − pj k2M )). V0 (tk , xk ) converges to V0 (T, c) = kck2M fk converges in distribution to a point mass at c, and Wj ∩ B̄(0, c), j = 1, . . . , z, is a partition of B̄(0, c). Therefore, I3 converges to exp(−ηkc − pj k2M ) = exp(−ηV (T, c)). f is continuous, and f (c) = 0. Hence, one can choose r small enough so that |f (y)|<  for all y ∈ B̄(c, r). Thus, |I4 |≤ , and lim sup|I0 − exp(−ηV (T, c))|≤ . Since  is arbitrary, I0 k converges to exp(−ηV (T, c)). This proves the result. To finish the proof of Theorem 1, it remains to show that V satisfies the HJB equation (6). We define the transformations by a generalized Hopf-Cole transformation [26, Chapter 4Section 4.4] of Vj (t, x), ψj (t, x) = exp (−ηVj (t, x)), for j = 1, . . . , l. Recall [27, Chapter 6] that the optimal cost-to-go Vj satisfies the HJB equation (6), but with the boundary condition equal to Vj (T, x) = kx − pj k2M . By multiplying the right-hand and left-hand sides of (6) by −η exp (−ηVj (t, x)), one obtain that  2  1 ∂ψj 0 0 ∂ψj 0 ∂ ψj =xA + Tr σ σ − ηkx − x̄k2Q ψj − ∂t ∂x 2 ∂x2  0  ∂Vj 1 ∂Vj + η exp (−ηVj (t, x)) . BR−1 B 0 − ησσ 0 2 ∂x ∂x Thus, under Assumption 1, we get  2  ∂ψj 1 0 0 ∂ψj 0 ∂ ψj − =xA + Tr σ σ − ηkx − x̄k2Q ψj 2 ∂t ∂x 2 ∂x  ψj (T, x) = exp −ηkx − pj k2M , ∀x ∈ Rn . (29) Define ψ(t, x) = exp (−ηV (t, x)) the transformation of V (t, x) defined in (12). Hence, we Pl ∂ψj have ψ(t, x) = j=1 ψj (t, x)gj (t, x). Equation (29), Assumption 1 and the identity ∂x = −η (Πx + βj ) ψj , where Π and βj are defined in (10), imply  2  ∂ψ 1 ∂ ψ 0 0 ∂ψ +xA + Tr σ 0 2 σ − ηkx − x̄k2Q ψ ∂t ∂x 2 ∂x  2  l  X 0 ∂gj 1 ∂gj −1 0 −1 0 0 ∂ gj = + Ax − BR B Πx − BR B βj + Tr σ σ ψj . ∂t ∂x 2 ∂x2 j=1 The process x(j) satisfies the SDE (9). Therefore, by Kolmogorov’s backward equation [22, Section 5.B],  2  0 ∂gj 1 ∂gj −1 0 −1 0 0 ∂ gj + Ax − BR B Πx − BR B βj + Tr σ σ = 0. ∂t ∂x 2 ∂x2 August 21, 2017 DRAFT 24 Hence,  2  ∂ ψ 1 ∂ψ 0 0 ∂ψ +xA + Tr σ 0 2 σ − ηkx − x̄k2Q ψ = 0. ∂t ∂x 2 ∂x By multiplying the right and left-hand sides of (30) by 1 η (30) exp(ηV (t, x)), V (t, x) satisfies (6). The uniqueness of the solution follows from the uniqueness of solutions to the uniform parabolic PDE (30) [22, Theorem 7.6]. Proof of Theorem 2 We have −1 u∗ (t, x) = −R B + 0 ∂V ∂x = l X ψj (t, x)gj (t, x) Pl j=1 k=1 ψk (t, x)gk (t, x) 1 η Pl k=1 ψk (t, x)gk (t, x) −1 R B 0 l X j=1 u(j) (t, x) ψj (t, x) ∂gj (t, x). ∂x In the following we show that the second summand is zero. By the change of variable z = RT y − α(T, t)x + t α(T, τ )BR−1 B 0 βj (τ )dτ in (27) and Leibniz integral rule, we have Z   −α(T, t) ∂gj 2 (t, x) = p exp − kzkΣ−1 ~nj (z)ds(z) t ∂x |2πΣt | ∂Wj −α(T,t)x+RtT α(T,τ )BR−1 B 0 βj (τ )dτ ! Z Z T 2 −α(T, t) ~nj (y)ds(y), exp − y − α(T, t)x + α(T, τ )BR−1 B 0 βj (τ )dτ =p |2πΣt | ∂Wj t Σ−1 t where α is defined in (28) and ~nj (y) is the unit normal component of ∂Wj and its translation RT ∂Wj − α(T, t)x + t α(T, τ )BR−1 B 0 βj (τ )dτ . By solving for βj and δj in (10) and replacing the solutions in the expressions of the costs Vj defined in (7) and in the derivatives ∂gj , ∂x one can show that under Assumption 1, l X l Z X  ∂gj ψj (t, x) (t, x) = K1 (t, x) exp K2 (t, x, y) + ηky − pj k2M −ηkyk2M ~nj (y)ds(y). ∂x j=1 j=1 ∂Wj (31) where K1 and K2 are functions that do not depend on pj , ∀j ∈ {1, . . . , l}. Note that ∂Wj = k k j j ∪i=1 Oi , where the disjoint subsets (up to a subset of measure zero) {Oi }i=1 are the common boundaries of Wj and the adjacent Voronoi cells. If Oi is the common boundary of Wj and some adjacent Voronoi Cell Wk , then ~nj (y) = −~nk (y) for all y ∈ Oi . Moreover, by the definition of the Voronoi cells, ky − pj kM = ky − pk kM for all y ∈ Oi . Therefore, the right-hand side of (31) is equal to zero. Thus, the optimal control u∗ satisfies (14). August 21, 2017 DRAFT 25 Next, we show that u∗ is an admissible Markov policy, i.e. u∗ ∈ L defined in (4). In view of (14), the function ∂u∗ ∂x is continuous on [0, T ) × Rn . Therefore, the local Lipschitz condition holds. Moreover, for all (t, x) ∈ [0, T ] × Rn , we have ku∗ (t, x)k≤ l X l X −1 0 (j) u∗ (t, x) ≤ kR B k lkΠk∞ kxk+ kβj k∞ j=1 ! . (32) j=1 Hence, the linear growth condition is satisfied and this proves the result. As a result, sufficient conditions are satisfied for the SDE defined in (5) and controlled by u∗ (t, x) to have unique strong solution denoted x∗ (.) [22, Section 5.2]. Finally, by the verification theorem [25, Theorem 4.3.1], we know that u∗ is the unique optimal control law of (5) if it is the unique minimizer (up to a set of measure 0) of the , u, t) = (Ax + Bu)0 ∂V + kx − x̄k2Q +kuk2R , and if the cost-to-go V (t, x) Hamiltonian H(x, ∂V ∂x ∂x has a polynomial growth in x and satisfies (6). For the first condition, we have for Lebesgue×Pa.e (t, ξ) ∈ [0, T ] × Ω (P is the probability measure defined at the beginning of Section II), ∂V (t, x∗ (t, ξ)) ∂x   ∂V = argmin H x∗ (t, ξ), (t, x∗ (t, ξ)), u, t . ∂x u∈Rn u∗ (t, x∗ (t, ξ)) = −R−1 B 0 In fact, the control law defined in (13) minimizes H except on the set {T } × Ω, which has a Lebesgue × P measure zero. Next, in view of (32), we have for all (t, x) ∈ [0, T ) × Rn Z kxk ∂V (t, y) dy ≤ K1 (1 + kxk2 ), kV (t, x)k≤ ∂x 0 for some K1 > 0. Moreover, kV (T, x)k≤ K2 (1 + kxk2 ), for some K2 > 0. Hence, for all (t, x) ∈ [0, T ] × Rn , kV (t, x)k≤ K (1 + kxk2 ), for some K > 0. Moreover, as established in Theorem 3, V ∈ C 1,2 ([0, T ) × Rn ) ∩ C([0, T ] × Rn ) satisfies the HJB equation (6). This proves the result. A. Proof of Lemma 3 To prove the result, it is sufficient to show that the expectation of the optimal cost EJ∗ (x(0)) ≤ K+ σ2 2 log M , for some K > 0 independent of M . The result is then a direct consequence of Chebyshev’s inequality   2 1 P min |x∗ (T ) − pj |>  ≤ 2 E min |x∗ (T ) − pj |2 ≤ EJ∗ (x(0)). 1≤j≤l  1≤j≤l M 2 August 21, 2017 DRAFT 26 To prove the boundedness of the cost, we start by the special case where x̄ = 0 and p1 = · · · = 2 RT pl = 0. The optimal cost is then J∗ (x(0)) = 21 Π(0)x2 (0) + σ2 0 Π(τ )dτ . We now show that RT Π(0) is uniformly bounded with M and that 0 Π(τ )dτ is of the order log M for large M . To prove the uniform boundness of Π(0), we consider the LQR problem  Z T Q 2 R 2 M inf JM (y(0) = 1, v(.)) = inf y + v dt + |y(T )|2 v v 2 2 2 0 (33) dy s.t. = Ay + Bv, y(0) = 1. dt ∗ The optimal cost is JM = 21 Π(0), where Π is defined in (10). By controllability of (A, B), one can find a continuous control law v10 that does not depend on M and such that the corresponding ∗ state y10 is at time T at 0. We have 12 Π(0) = JM ≤ JM (1, v10 ). The right hand side of the inequality is finite and does not depend on M . Hence, Π(0) is uniformly bounded w.r.t. M . RT We now prove that 0 Π(τ )dτ is of the order log M for large M . We have for all M ≥ 1, 1 Π(0) 2 ∗ ∗ ≥ JM = JM =1 := C > 0. The constant C is independent of M , whenever M > 1. Moreover, for large, M min Π(t) = Π(0) > C. By dividing by Π(t) on both sides of the t∈[0,T ] Riccati equation in (10) and integrating on [0, T ] the right and left hand sides, we get Z Z T b2 T 1 log M − log Π(0) = Π(τ )dτ − 2aT − q dτ. r 0 0 Π(τ ) RT 1 RT 1 By the boundedness of Π(0) and 0 Π(τ dτ ≤ , we have Π(τ )dτ /log M converges to 1 ) CT 0 as M goes to infinity. Having shown the result for the special case, the case where x̄ 6= 0 and A p1 = · · · = pl = p can be proved by making the change of variables x̃ = x − p and ũ = u + B p and noting the uniform boundedness of x̄ and that  Z T Z T RA2 T 2 M 2 2 2 Q(x̄ − p)2 dt + p. EJ∗ (x(0)) ≤ E inf E {Qx̃ + Rũ }dt + x̃ (T )|x(0) + ũ 2 B2 0 0 Finally, we conclude the general case by the following inequality Z T  R 2 M Q 2 2 EJ∗ (x(0)) ≤ E inf E { (x − x̄) + u }dt + (x(T ) − p1 ) |x(0) . u 2 2 2 0 A PPENDIX B This appendix includes the proofs of lemmas and theorems related to the existence of a solution of the mean field equations. August 21, 2017 DRAFT 27 Proof of Lemma 4 First, we provide in the following lemma a stochastic maximum principle [36] for the “minLQG” optimal control problem. Because of the non-smooth final cost, this result is derived using the relationship between dynamic programming and the stochastic maximum principle rather than the variational method used in [36].   2 s Lemma 9: The processes q s (t), ∂∂xV2 (t, xs∗ (t) , 1 ≤ s ≤ k, with q s (t) = ∂V s (t, xs∗ (t)), ∂x the following backward linear SDE:   ∂ 2V s 0 − dq s (t) = (As ) q s (t) + Qs (xs∗ (t) − x̄(t)) dt − ((t, xs∗ (t)) σ s dws (t), ∂x2   P with q s (T ) = M s xs∗ (T ) − lj=1 1Wj (xs∗ (T ))pj . Proof: The function Section 3.3.A] to ∂V s ∂x ∂V s (t, x) ∂x ∂V s ∂x (34) is smooth on [0, T ) × Rn . By applying Itô’s formula [22, (t, xs∗ (t)), and by noting that V s satisfies the HJB equation (6), we have −dq s (t) = ((As )0 q s (t) + Qs (xs∗ (t) − x̄(t))) dt − with q s (0) = satisfy ∂ 2V s ((t, xs∗ (t)) σ s dws (t), 2 ∂x (0, xs∗ (0)). It remains to show that P-a.s ∂V s lim (t, xs∗ (t)) = M s t→T ∂x xs∗ (T ) − l X ! 1Wj (xs∗ (T ))pj . (35) j=1 By Theorem 2, we have on [0, T ) × Rn  l X exp −η s Vjs (t, x) gjs (t, x) ∂Vjs ∂V s (t, x) = (t, x). Pl s s s ∂x ∂x k=1 exp (−η Vk (t, x)) gk (t, x) j=1 Fix j ∈ {1, . . . , l}. By Lemma 7, we have on {xs∗ (T ) ∈ Int(Wj )}, lim gjs (t, xs∗ (t)) = 1 and t→T s s s s lim gk (t, x∗ (t)) = 0, for all k 6= j. Hence, on {x∗ (T ) ∈ Int(Wj )}, we have lim ∂V (t, xs∗ (t)) = ∂x t→T t→T ∂V s lim ∂xj (t, xs∗ (t)) = M s (xs∗ (T ) − pj ). But, xs∗ is the solution of an SDE with non degenerate t→T noise. Therefore, P (xs∗ (T ) ∈ ∂Wj ) = 0. Hence, (35) holds. Remark 4: The backward SDE (34) is the adjoint equation [36] for the min-LQG optimal control problem. We now prove Lemma 4. By taking the expectations on the right and the left hand sides of P (34) and the SDE in (17), and in view of ks=1 αs x̄s (t) = x̄, we get the necessary condition. To prove the sufficient condition, we consider (X̄, x̄, q̄) satisfying (19a)-(20b). We define (x̂s , q̂ s ) = (Exs∗ , Eq s ), where (xs∗ , q s ) are the s-type generic agent’s optimal state and co-state when tracking August 21, 2017 DRAFT 28 x̄. We define e = (x̂1 , . . . , x̂k ) − X̄ and q̄e = (q̂ 1 , . . . , q̂ k ) − q̄. By taking expectations on the right and the left hand sides of (34) and the generic agent’s dynamics, we obtain that d e(t) = Ae(t) − BR−1 B 0 q̄e (t), e(0) = 0 dt (36) d 0 q̄e (t) = −A q̄e (t) + QLe(t), q̄e (T ) = M e(T ). dt Under Assumption 2, we define qe0 (t) = π(t)e(t), where π(t) is the unique solution of (18). We have d(q̄e −qe0 ) dt = −(A0 −π(t)BR−1 B 0 )(q̄e −qe0 ), with (q̄e (T )−qe0 (T )) = 0. Hence, q̄e (t) = π(t)e(t). By replacing q̄e (t) = π(t)e(t) in the forward equation in (36), we obtain that e = 0. Hence, x̄ satisfies (17). Proof of Theorem 5 Let x̄ be a path satisfying (17). Then, by Lemma 4, x̄ satisfies (19a)-(20b). Under Assumption 2, using arguments similar to those used in Lemma 4 we obtain that (19a) and (19b) has a unique solution (X̄, q̄). Moreover, q̄ = π X̄ + γ, where π is the unique solution of (18), and γ is the unique solution of γ̇ = −(A − BR−1 B 0 π)0 γ with γ(T ) = −M Λ ⊗ In p. By replacing, q̄ = π X̄ + γ in (19a), we get that x̄ is of the form (22). Next, by implementing this new form of x̄ in the expression of (20b) and by noting that Λ satisfies (20a), Λ is a fixed point of F .  Conversely, we consider Λ to be a fixed point of F , X̄ = R1 (t, 0)X̄(0) + R2 (t)Λ ⊗ In p and x̄ = P1 X̄. We define q̄(t) = −(BR−1 B 0 )−1 ( dtd X̄(t) − AX̄(t)). (X̄, q̄) satisfies (19a)-(19b). We s,Λ have Λsj = F (Λ)sj = P(xs,Λ is defined in (24). But x̄ is of the form ∗ (T ) ∈ Wj ), where x∗ (25), hence xλ∗ is the unique strong solution of (20b). Therefore, x̄ satisfies (19a)-(20b), and by Lemma 4, it satisfies (17). This proves the first point. Next, to show the existence of a fixed point of F , it is sufficient to show that F is continuous, in which case Brouwer’s fixed point theorem [37, Section V.9] ensures the existence of a fixed point. Equation (24) is a stochastic differential equation depending on the parameter Λ. By [38, Theorem 1], the joint distribution of X∗Λ and the Brownian motion W is weakly continuous in Λ. Consider a sequence of stochastic matrices {Λn }n≥0 converging to the stochastic matrix Λ. The distribution of X∗Λn (T ) converges weakly to the distribution of X∗λ (T ) Moreover, X∗λ is the solution of a non-degenerate SDE. Hence, Wj , j = 1, . . . , l, is a continuity set of the distribution of X∗λ . Therefore, lim F (Λn )sj = lim P(x∗s,Λn (T ) ∈ Wj ) = P(xs,Λ ∗ (T ) ∈ Wj ) = F (Λ)sj , and so n August 21, 2017 n DRAFT 29 F is continuous. Finally, using arguments similar to those used in [14, Lemma 9], one can show the third point. R EFERENCES [1] F. Koppelman and V. Sathi, “Incorporating variance and covariance heterogeneity in the generalized nested logit model: an application to modeling long distance travel choice behavior,” Transportation Research, vol. 39, pp. 825–853, 2005. [2] C. Bhat and J. Guo, “A mixed spatially correlated logit model: formulation and application to residential choice modeling,” Transportation Research, vol. 38, pp. 147–168, 2004. [3] R. Nakajima, “Measuring peer effects on youth smoking behaviour,” The Review of Economic Studies, vol. 74, no. 3, pp. 897–935, 2007. [4] D. Vail and M. Veloso, “Multi-robot dynamic role assignment and coordination through shared potential fields,” Multi-robot systems, pp. 87–98, 2003. [5] A. Halász, M. A. Hsieh, S. Berman, and V. Kumar, “Dynamic redistribution of a swarm of robots among multiple sites,” in 2007 IEEE/RSJ International Conference on Intelligent Robots and Systems. IEEE, 2007, pp. 2320–2325. [6] M. A. Hsieh, Á. Halász, S. Berman, and V. Kumar, “Biologically inspired redistribution of a swarm of robots among multiple sites,” Swarm Intelligence, vol. 2, no. 2-4, pp. 121–141, 2008. [7] S. Merrill and B. Grofman, A Unified Theory of Voting: Directional and Proximity Spatial Models. Cambridge University Press, 1999. [8] G. B. Markus and P. E. Converse, “A dynamic simultaneous equation model of electoral choice,” American Political Science Review, vol. 73, no. 04, pp. 1055–1070, 1979. [9] D. McFadden, “Conditional logit analysis of qualitative choice behavior,” in Frontiers in Econometrics, P. Zarembka, Ed. New York: New York: Academic Press, 1974, ch. 4, pp. 105–142. [10] J. Rust, “Structural estimation of markov decision processes,” Handbook of econometrics, vol. 4, pp. 3081–3143, 1994. [11] W. Brock and S. Durlauf, “Discrete choice with social interactions,” Review of Economic Studies, pp. 147–168, 2001. [12] R. Salhab, R. P. Malhamé, and J. Le Ny, “Consensus and disagreement in collective homing problems: A mean field games formulation,” in Proceedings of the 53rd IEEE Conference on Decision and Control, Dec 2014, pp. 916–921. [13] ——, “A dynamic game model of collective choice in multi-agent systems,” in Proceedings of the 54th IEEE Conference on Decision and Control, Dec 2015, pp. 4444–4449. [14] R. Salhab, R. P. Malhamé, and J. Le Ny, “A dynamic game model of collective choice in multi-agent systems,” IEEE Transactions on Automatic Control, 2017, In Press, available at http://ieeexplore.ieee.org/document/7970149/. [15] M. Huang, P. E. Caines, and R. P. Malhamé, “Individual and mass behaviour in large population stochastic wireless power control problems: centralized and Nash equilibrium solutions,” in Proceedings of the 42nd IEEE Conference on Decision and Control, 2003, pp. 98–103. [16] ——, “Large-population cost-coupled LQG problems with nonuniform agents: Individual-mass behavior and decentralized epsilon-Nash equilibria,” IEEE Transactions on Automatic Control, vol. 52, no. 9, pp. 1560–1571, 2007. [17] M. Huang, R. P. Malhamé, and P. E. Caines, “Large population stochastic dynamic games: closed-loop McKean-Vlasov systems and the Nash certainty equivalence principle,” Communications in Information & Systems, vol. 6, no. 3, pp. 221–252, 2006. [18] J. M. Lasry and P. L. Lions, “Jeux à champ moyen. I–le cas stationnaire,” Comptes Rendus Mathématique, vol. 343, no. 9, pp. 619–625, 2006. August 21, 2017 DRAFT 30 [19] ——, “Jeux à champ moyen. II–horizon fini et contrôle optimal,” Comptes Rendus Mathématique, vol. 343, no. 10, pp. 679–684, 2006. [20] ——, “Mean field games,” Japanese Journal of Mathematics, vol. 2, pp. 229–260, 2007. [21] F. Fagnani and S. Zampieri, “Randomized consensus algorithms over large scale networks,” IEEE Journal on Selected Areas in Communications, vol. 26, no. 4, pp. 634–649, 2008. [22] I. Karatzas and S. Shreve, Brownian motion and stochastic calculus. Springer Science & Business Media, 2012, vol. 113. [23] R. Salhab, R. P. Malhamé, and J. Le Ny, “A dynamic game model of collective choice: Stochastic dynamics and closed loop solutions,” arXiv preprint arXiv:1604.08136, 2016. [24] M. Huang, P. E. Caines, and R. P. Malhamé, “Social optima in mean field LQG control: centralized and decentralized strategies,” IEEE Transactions on Automatic Control, vol. 57, no. 7, pp. 1736–1751, 2012. [25] W. H. Fleming and H. M. Soner, Controlled Markov processes and viscosity solutions. Springer Science & Business Media, 2006, vol. 25. [26] L. Evans, Partial Differential Equations, ser. Graduate studies in mathematics. American Mathematical Society, 1998. [27] J. Yong and X. Y. Zhou, Stochastic controls: Hamiltonian systems and HJB equations. Springer Science & Business Media, 1999, vol. 43. [28] D. Gomes, E. Pimentel, and V. Voskanyan, Regularity Theory for Mean-Field Game Systems, ser. SpringerBriefs in Mathematics. Springer, 2016. [29] T. Liggett, Interacting particle systems. Springer Science & Business Media, 2012, vol. 276. [30] L. Perko, Differential equations and dynamical systems. Springer Science & Business Media, 2013, vol. 7. [31] B. D. Anderson and J. B. Moore, Optimal control: linear quadratic methods. Dover Publications, 2007. [32] G. Freiling, “A survey of nonsymmetric Riccati equations,” Linear algebra and its applications, vol. 351, pp. 243–270, 2002. [33] R. Carmona and F. Delarue, “Probabilistic analysis of mean-field games,” SIAM Journal on Control and Optimization, vol. 51, no. 4, pp. 2705–2734, 2013. [34] L. Pichler, A. Masud, and L. Bergman, “Numerical solution of the Fokker–Planck equation by finite difference and finite element methods - A comparative study,” in Computational Methods in Stochastic Dynamics. Springer, 2013, pp. 69–85. [35] R. Durrett, Probability: theory and examples. Cambridge university press, 2010. [36] S. Peng, “A general stochastic maximum principle for optimal control problems,” SIAM Journal on control and optimization, vol. 28, no. 4, pp. 966–979, 1990. [37] J. B. Conway, A Course in Functional Analysis, ser. Graduate Texts in Mathematics. Springer-Verlag, 1985. [38] A. V. Skorokhod, “Stochastic differential equations depending on a parameter,” Theory of Probability & Its Applications, vol. 25, no. 4, pp. 659–666, 1981. August 21, 2017 DRAFT 31 Rabih Salhab is currently pursuing the Ph.D. degree in Electrical Engineering in the Department of Electrical Engineering, Ecole Polytechnique de Montreal, Canada. He received the B.S. degree in Electrical Engineering from Ecole Supérieure d’Ingénieurs de Beyrouth (E.S.I.B), Lebanon, in 2008. From 2008 to 2013 he was an Electrical Engineer with Dar al Handasah Shair and Partners, Lebanon. His current research interests are in stochastic control, game theory and mean field games theory and its applications. Roland Malhamé received the Bachelors, Masters and Ph.D. degrees in Electrical Engineering from the American University of Beirut, the University of Houston, and the Georgia Institute of Technology in 1976, 1978 and 1983 respectively. After single year stays at University of Quebec , and CAE Electronics Ltd (Montreal), he joined in 1985 École Polytechnique de Montréal, where he is Professor of Electrical Engineering. In 1994, 2004, and 2012 he was on sabbatical leave respectively with LSS CNRS (France), École Centrale de Paris, and University of Rome Tor Vergata. His interest in statistical mechanics inspired approaches to the analysis and control of large scale systems has led him to contributions in the area of aggregate electric load modeling, and to the early developments of the theory of mean field games. His current research interests are in collective decentralized decision making schemes, and the development of mean field based control algorithms in the area of smart grids. From june 2005 to june 2011, he headed GERAD, the Group for Research on Decision Analysis. He is an Associate Editor of International Transactions on Operations Research. Jerome Le Ny (S’05-M’09-SM’16) received the Engineering Degree from the École Polytechnique, France, in 2001, the M.Sc. degree in Electrical Engineering from the University of Michigan, Ann Arbor, in 2003, and the Ph.D. degree in Aeronautics and Astronautics from the Massachusetts Institute of Technology, Cambridge, in 2008. He is currently an Associate Professor with the Department of Electrical Engineering, Polytechnique Montreal, Canada. He is a member of GERAD, a multi-university research center on decision analysis. From 2008 to 2012 he was a Postdoctoral Researcher with the GRASP Laboratory at the University of Pennsylvania. His research interests include robust and stochastic control, mean-field control, privacy and security in large-scale networked control systems, dynamic resource allocation and active perception, with applications to autonomous multi-robot systems and intelligent infrastructures. August 21, 2017 DRAFT
3cs.SY
1 Kernel Truncated Regression Representation for Robust Subspace Clustering arXiv:1705.05108v2 [cs.CV] 23 May 2017 Liangli Zhen, Dezhong Peng, Xin Yao Abstract—Subspace clustering aims to group data points into multiple clusters of which each corresponds to one subspace. Most existing subspace clustering methods assume that the data could be linearly represented with each other in the input space. In practice, however, this assumption is hard to be satisfied. To achieve nonlinear subspace clustering, we propose a novel method which consists of the following three steps: 1) projecting the data into a hidden space in which the data can be linearly reconstructed from each other; 2) calculating the globally linear reconstruction coefficients in the kernel space; 3) truncating the trivial coefficients to achieve robustness and block-diagonality, and then achieving clustering by solving a graph Laplacian problem. Our method has the advantages of a closed-form solution and capacity of clustering data points that lie in nonlinear subspaces. The first advantage makes our method efficient in handling large-scale data sets, and the second one enables the proposed method to address the nonlinear subspace clustering challenge. Extensive experiments on five realworld datasets demonstrate the effectiveness and the efficiency of the proposed method in comparison with ten state-of-the-art approaches regarding four evaluation metrics. Index Terms—Kernel truncated regression; nonlinear subspace clustering; spectral clustering; kernel techniques. I. I NTRODUCTION Subspace clustering is one of the most popular techniques for data analysis, which has attracted increasing interests from numerous areas, such as computer vision, image analysis, and signal processing [1]. With the assumption of highdimensional data lying in a union of low-dimensional subspaces, subspace clustering aims to seek a set of subspaces to fit a given data set and perform clustering based on the identified subspaces. During past decades, many subspace clustering methods have been proposed, which can be roughly classified into four categories: 1) iterative approaches [2]; 2) statistical approaches [3, 4]; 3) algebraic approaches [5–7]; and 4) spectral clustering-based approaches [8–20]. In recent years, spectral clustering-based approaches have achieved the state-of-the-art in subspace clustering, of which the key is finding a blockdiagonal affinity matrix, where the element of the matrix denotes the similarity between two data points and the blockLiangli Zhen is with the Machine Intelligence Laboratory, College of Computer Science, Sichuan University, Chengdu 610065, China, and the CERCIA, School of Computer Science, University of Birmingham, Birmingham B15 2TT, UK. (e-mail: [email protected]). Dezhong Peng is with the Machine Intelligence Laboratory, College of Computer Science, Sichuan University, Chengdu 610065, China. ([email protected]). Xin Yao is with the CERCIA, School of Computer Science, University of Birmingham, Birmingham B15 2TT, UK. (e-mail: [email protected]). diagonal structure means that only the similarity among intracluster data points is nonzero. To obtain a block-diagonal affinity matrix, most recent spectral clustering-based approaches measure the similarity using so-called self-expression, i.e. representing each data point as a linear combination of the whole data set and then using the representation coefficients to build the affinity matrix. The major difference of those methods is the constraints enforced on the representation coefficients. For example, sparse subspace clustering (SSC) [11] assumes that each data point can be linearly represented by a few of other points. To achieve this end, SSC adopts the ℓ1 -norm constraint. Low-rank representation (LRR) [12] encourages the coefficient matrix to be low rank, such that it can capture the global structures of data. To obtain low rankness, LRR enforces the nuclearnorm constraint on the coefficients. Different from SSC and LRR, truncated regression representation (TRR) [17, 19] takes Frobenius norm instead of ℓ1 - and nuclear-norm, which has shown promising performance in many real-world applications. Like most existing subspace clustering algorithms [11– 13, 21], the major disadvantage of TRR is that it may not give a satisfactory clustering result when data points cannot be linearly represented with each other. In fact, many real-world data are sampled from multiple nonlinear subspaces, which brings challenges towards TRR and limits its applications in practice. To group the data drawn from multiple nonlinear subspaces, in this paper, we propose a novel nonlinear subspace clustering method, termed kernel truncated regression representation (KTRR). Our basic idea is based on the following assumption, i.e. there exists a projection space in which the data can be linearly represented. To illustrate this simple but effective idea, we give a toy example in Fig. 1. The proposed method consists of the following steps: 1) projecting the input into another space via an implicit nonlinear transformation; 2) calculating the global self-expression of the whole data set in the projection space in which the data can be linearly reconstructed; 3) eliminating the effect of errors such as Gaussian noise by zeroing trivial coefficients; 4) constructing a Laplacian graph using the obtained coefficients; 5) solving a generalized Eigen-decomposition problem and obtain clustering with kmeans. The contributions and novelty of this work could be summarized as follows: • We propose a novel method which can cluster the data points drawn from multiple nonlinear subspaces. To the best of our knowledge, this is the first nonlinear extension of TRR and one of the first several nonlinear clustering approaches. 2 II. R ELATED W ORK Fig. 1. The basic idea of our method. By projecting the data into another space with an implicit nonlinear transformation, our method could solve the problem of nonlinear subspace clustering. The left and right plots correspond to the distribution of data in the input and hidden space, respectively. We develop a closed-form solution to our method. This makes our method very efficient, and useful for largescale data sets. • Different from most existing subspace clustering methods like SSC and LRR, KTRR achieves robustness by eliminating the impact of noises in the projection space instead of input space. In other words, KTRR does not require the prior on the structure of errors, which is more competitive to handle corrupted subspaces. Extensive experimental results show that our method significantly outperforms ten other state-of-the-art subspace clustering algorithms regarding accuracy, robustness, and computational cost. The rest of this paper is organized as follows. Section II discusses some related work. Section III presents the kernel truncated regression and the new robust subspace clustering method. Section IV provides experimental results to illustrate the effectiveness and the efficiency of the proposed algorithm. Section V concludes the paper. Notations: In this paper, unless specified otherwise, lowercase bold letters represent column vectors, upper-case bold letters represent matrices, and the entries of matrices are denoted with subscripts. For instance, v is a column vector, vi is its ith entry. M is a matrix, Mij is the entry in the ith row, jth column, and mj denotes the jth column of M. Moreover, MT represents the transpose of M, M−1 denotes the inverse matrix of M, and I stands for the identity matrix. Table I summarizes some notations used throughout the paper. • TABLE I S OME NOTATIONS USED IN THIS PAPER . During past decades, some spectral clustering-based methods have been proposed to achieve subspace clustering in many applications such as image clustering [21], motion segmentation [22], and gene expression analysis [23]. The key of these methods is to obtain a block-diagonal similarity matrix of which nonzero elements are only located on the connections of the points from the same subspace. There are two common strategies to compute the similarity matrix, i.e., pairwise distance-based strategy and linear representationbased strategy [16]. Pairwise distance-based strategy computes the similarity between two points according to their pairwise relationship, e.g., the original spectral clustering method adopts the Euclidean distance with Heat Kernel to calculate the similarity, i.e., s(xi , xj ) = e− kxi −xj k2 2σ2 (1) where s(xi , xj ) denotes the similarity between the data point xi and data point xj , and the parameter σ controls the width of the neighborhoods. Alternatively, linear representation-based approaches assume that each data point could be represented as a linear combination of some points from the intra-subspace. Based on this assumption, the linear representation coefficient can be used as a measurement of similarity and has achieved state of the art in subspace clustering [11–13, 15, 19, 24– 26] since it encodes the global structure of the whole data set into similarity. For given a data matrix X = [x1 , x2 , . . . xn ] ∈ Rm×n , these methods linearly represent X and obtain the coefficient matrix C ∈ Rn×n in a self-expression manner by solving min ℜ(C) s.t. X = XC, diag(C) = 0, (2) where diag(C) = 0 avoids the trivial solution which uses the data point to represent itself by enforcing the diagonal elements of C to be zeros. ℜ(C) denotes the adopted prior structured regularization on C and the major difference among most existing subspace clustering methods is the choice of ℜ(C). For example, SSC [11] enforces the sparsity on C by adopting ℓ1 -norm via ℜ(C) = kCk1 , LRR [12] obtains low rankness by using nuclear norm with ℜ(C) = kCk∗ . To further achieving robustness, (2) is extended as follows: min ℜ(C) + ℘(E) s.t. X = XC + E, diag(C) = 0, (3) Notation m n L λ x i ∈ Rm X ∈ Rm×n Xi ∈ Rm×n K ∈ Rn×n ci ∈ Rn C ∈ Rn×n W ∈ Rn×n L ∈ Rn×n φ: Rm → H κ(xi , xj ) Definition the dimension of input data points the number of input data points the number of underlying subspaces the balance parameter the ith data point the data matrix the dictionary matrix for the data point xi the kernel matrix of the input data points the representation vector for the mapped data point φ(xi ) the linear representation coefficients matrix the similarity matrix among all data points the normalized Laplacian matrix the mapping from the input space to the kernel space the kernel function where E stands for the errors induced by the noise and corruption, ℘(E) measures the impact of the errors. Generally, the ℘(·) = kEkF and ℘(·) = kEk1 are used to describe the Gaussian noise and Laplacian noise, respectively. k·kF denotes the Frobenius norm Due to the assumption on linear reconstruction, those methods failed to achieve nonlinear subspaces clustering. To address this challenging issue, some recent works have been proposed [15, 24], however, the methods have the following two disadvantages: 1) the methods are computationally inefficient since they involve solving ℓ1 - or nuclear-norm minimization problem; 2) Like SSC and LRR, the methods 3 need the prior on the errors existed in the data sets to get the correct mathematical formulation. If the prior is inconsistent with the real situation, the methods could achieve inferior performance. To solve these issues, we propose a nonlinear subspace clustering method which is complementary to existing approaches. Noticed that, Peng at al. recently proposed to achieve nonlinearity with deep structures [27, 28], which are first works to leverage deep learning and subspace clustering. However, this has been beyond of the scope of this paper. III. T HE PROPOSED SUBSPACE CLUSTERING METHOD This section will give the details of our proposed method, which consists of three steps: 1) calculating the kernel truncated regression representation over the whole data set. 2) eliminating the effectiveness of possible errors such as noises from the representation and then building a graph Laplacian. 3) obtaining clustering by performing the k-means algorithm on leading eigenvectors of the graph Laplacian. Moreover, we also give the computational complexity of the proposed method. A. Kernel Truncated Regression Representation For a given data set {xi }ni=1 , where xi ∈ Rm , we define a matrix X = [x1 , x2 , . . . xn ]. Let φ: Rm → H be a nonlinear mapping which transforms the input into a kernel space H, and φ(Xi ) = [φ(x1 ), . . . , φ(xi−1 ), 0, φ(xi+1 ), . . . , φ(xn )]. After mapping X into a kernel space, the corresponding {φ(xi )}ni=1 is generally believed lying in linear subspaces [15, 24]. Based on this basic idea, we propose to formulate the objective function of our KTRR as follows: λ 1 (4) min kφ(xi ) − φ(Xi )ci k22 + kci k22 , ci 2 2 where the first term is the reconstruction error in the kernel space, the second term serves as an ℓ2 -norm regularization, and λ is a positive real number, which controls the strength of the ℓ2 -norm regularization term. For each transformed data representation φ(xi ), solving the optimization problem (4), it gives that −1 ci = φ(Xi )T φ(Xi ) + λI φ(Xi )T φ(xi ), (i = 1, · · · , n). (5) Note that it requires O(n4 + mn2 ) for solving the above problems of n data points with dimensionality of m. To solve (4) more efficiently, we rewrite it as 1 λ min kφ(xi ) − φ(X)ci k22 + kci k22 , ci 2 2 eTi ci = 0, (6) where ei is a column vector with all zero elements except the i-th element is 1, and the constraint eTi ci = 0 eliminates the trivial solution of writing a transformed point as a linear combination of itself. Using Lagrangian method, we obtain that L(ci ) = s.t. λ 1 kφ(xi ) − φ(X)ci k22 + kci k22 + θeTi ci , 2 2 (7) where θ is the Lagrangian multiplier. Clearly, ∂L(ci ) = (φ(X)T φ(X) + λI)ci − φ(X)T φ(xi ) + θei . (8) ∂ci Let ∂L(ci ) ∂ci = 0, we get ci = (φ(X)T φ(X) + λI)−1 (φ(X)T φ(xi ) − θei ). (9) Multiplying ei on both sides of (9), and since eTi ci = 0, it holds that θ= eTi (φ(X)T φ(X) + λI)−1 φ(X)T φ(xi ) . eTi (φ(X)T φ(X) + λI)−1 ei (10) Substituting (10) into (9), the optimal solution is given as ci = qi − P eTi qi ei , eTi Pei (11) where qi = P(φ(X)T φ(xi )), and P = (φ(X)T φ(X)+λI)−1 . One can find that the solution to (11) does not require φ(xi ) to be explicitly computed, i.e. we will only need their dot products. Therefore, we can employ kernel functions for computing these dot products without explicitly performing the mapping φ. For some choices of a kernel κ(xi , xj ): Rm × Rm → R, [29] has shown that κ can get the dot product in the kernel space H induced by the mapping φ. We can combine all the dot products as a matrix K ∈ RN ×N whose elements are calculated as Kij = φ(xi )T φ(xj ) = [φ(X)T φ(X)]ij = κ(xi , xj ), (12) where φ(X) = [φ(x1 ), φ(x2 ), . . . φ(xn )]. The matrix K is the kernel matrix, which is a symmetric and positive semidefinite matrix. Accordingly, (11) can be rewritten as c∗i = vi − U eTi vi ei , eTi Uei (13) where vi = Uki , and U = (K + λI)−1 . It is notable that only one pseudo-inverse operation is needed for solving the representation problems of all data points. The computational complexity of calculating the optimal solutions in (13) has decreased to O(n3 + mn2 ) for n data points with m dimensions. It has been proved that, under certain condition, the coefficients over intra-subspace data points are larger than those over inter-subspace data points [17]. After representing the data set by the kernel matrix via (13), we handle the errors by performing a hard thresholding operator Tη (·) over ci , where Tη (·) keeps η largest entries in ci and sets other entries as zeros like TRR, i.e., Tη (ci ) = [Tη (C1i ), Tη (C2i ), . . . , Tη (Cni )]T and Tη (Cji ) = ( Cji , if Cji ∈ Ωi ; 0, otherwise, (14) (15) where Ωi consists of η largest elements of ci . Typically, the optimal η equals to the dimensionality of corresponding kernel 4 subspace. In this manner, it avoids to model the impact of the noises into the optimization problem explicitly and does not need the prior knowledge about the errors. B. KTRR for Robust Subspace Clustering In this section, we present the method to achieve subspace clustering by incorporating the KTRR into spectral clustering framework [8]. For a given data set X which consists of n data points in Rm , we assume that these points should be lying in a union of L low-dimensional nonlinear subspaces. We propose to project the data points into another space, in which the mapped points can be linearly represented by these mapped points from the intra-subspace. From (11), we find that the representation coefficients does not require the projection function in explicit form, but are only needed in dot products. We can induce a kernel function to calculate these dot products, and obtain the representation coefficients via (13). Moreover, the existence of the errors in the input data set leads to some error connections among the data points from different subspaces. We propose to remove these errors through a hard thresholding on each column vector of the coefficient matrix C via (14). As we claimed before, these representation coefficients can be seen as the similarities among the input data points. The similarity between two intra-subspace data points is large, and that between two inter-subspace data points is zero or very close to zero. Such that we can build a similarity matrix W based on the obtained coefficient matrix C as W = |CT | + |C|. (16) This is a symmetric similarity matrix which is suitable for integrating into the spectral clustering framework. Then, we compute the normalized Laplacian matrix [8] 1 1 L = I − D− 2 WD− 2 , Algorithm 1 Learning kernel truncated regression representation for robust subspace clustering Input: A given data set X ∈ Rm×n , the tradeoff parameter λ, thresholding parameter η, and the number of subspaces L. Output: The clustering labels of the input data points. 1: Calculate the kernel matrix K and the matrix U in (13) and store them. 2: For each point xi ∈ Rm , calculate its linear representation coefficients in the kernel space ci ∈ Rn via (13). 3: Remove the trivial coefficients from ci by performing hard thresholding operator Tη (ci ), i.e., keeping η largest entries in ci and zeroing all other elements. 4: Construct a symmetric similarity matrix via (16). 5: Calculate the normalised Laplacian matrix L via (17). 6: Compute the eigenvector matrix Y ∈ Rn×L that consists of the first L normalized eigenvectors of L corresponding to its L smallest nonzero eigenvalues. 7: Perform k-means clustering algorithm over the rows of Y to get the clustering membership. considerably less than that of KSSC (O(mn2 + tn3 ))[30], KLRR(O(t(rX + r)n2 )[24], where t denotes the total number of iterations for the corresponding algorithm, rX is the rank of X, and r is the rank for partial SVD at each iteration of KLRR. IV. E XPERIMENTAL R ESULTS AND A NALYSIS In this section, we experimentally evaluate the performance of the proposed method. We consider the results in terms of three aspects: 1) accuracy, 2) robustness, and 3) computational cost. Robustness is evaluated by conducting experiments using samples with two different types of corruptions, i.e., Gaussian noises and random pixel corruption. (17) Pn where D is a diagonal matrix with Dii = j=1 Wij . The matrix L is positive semi-definite and has an eigenvalue equals 1 0 with eigenvector D 2 1 [9], where 1 = [1, 1, . . . , 1]T ∈ Rn . Next, we calculate the first L eigenvectors y1 , y2 , . . . , yL of L, which corresponding to its first L smallest nonzero eigenvalues, and construct a matrix Y = [y1 , y2 , . . . , yL ] ∈ Rn×L . Finally, we apply the k-means clustering method on the matrix Y, by treating each row vector as a point, to get the clustering membership. The proposed subspace clustering algorithm is summarized in Algorithm 1. C. Computational Complexity Analysis Given a data matrix X ∈ Rm×n , the KTRR takes O(mn2 ) to compute the kernel matrix K. Then it takes O(n3 ) to obtain the matrix U, and O(mn2 ) to calculate all the solutions in (13) with the matrices U and K. Finally, it requires O(ηlogη) to find η largest coefficients in each column of the representation matrix C. Putting these steps together, we get the computational complexity of KTRR as O(mn2 +n3 ). This computational complexity is the same as that of TRR, and is A. Databases Five popular image databases are used in our experiments, including Extended Yale Database B (ExYaleB) [31], Columbia Object Image Library (COIL 20) [32], Columbia Object Image Library (COIL 100) [33], USPS [34], and MNIST [35]. We give the details of these databases as follows: • The ExYaleB database contains 2414 frontal face images of 38 subjects and around 64 near frontal images under different illuminations per individual, where each image is manually cropped and normalized to the size of 32×32 pixels [36]. • The COIL 20 and COIL 100 databases contain 20 and 100 objects respectively. The images of each object were taken 5 degrees apart as the object is rotated on a turntable and each object has 72 images. The size of each image is 32 × 32 pixels, with 256 grey levels per pixel [36]. 1 • The USPS handwritten digit database includes ten classes (0−9 digit characters) and 11000 samples in total. 1 The USPS database and MNIST database used in this paper are download from http://www.cad.zju.edu.cn/home/dengcai/Data/MLData.html. 5 • We use a popular subset contains 9298 handwritten digit images for the experiments, and all of these images are normalized to the size of 16×16 pixels. In the experiment, we select 200 samples of each subject from the database randomly by following the strategy in [10]. The MNIST handwritten digit database includes ten classes (0 − 9 digit characters) and 60000 samples in total. We use first 10000 handwritten digit images of the training subset to conduct the experiments, and all of these images are normalized to the size of 28 × 28 pixels. In the experiment, we also select 200 samples of each subject from the database randomly to evaluate the performance of different algorithms. The details of these real-world databases are summarized in Table II TABLE II D ETAILS OF SEVEN DATA SETS FOR THE EXPERIMENTS . F OR SIMPLICITY, c DENOTES THE TOTAL NUMBER OF CLUSTERS , AND ni STANDS FOR THE NUMBER OF SAMPLES IN EACH CLUSTER . Dataset ExYaleB COIL 20 COIL 100 USPS MNIST c 38 20 100 10 10 ni 58 72 72 1000 1000 Original size 192 × 168 128 × 128 128 × 128 16 × 16 28 × 28 Normalised size 32 × 32 32 × 32 32 × 32 16 × 16 28 × 28 C. Visualisation of Representation and Similarity Matrices Before evaluating the clustering performance of the proposed method, we illustrate the visualization results of the KTRR coefficients matrix and the obtained similarity matrix. We get the result by using the first 128 facial images in the ExYaleB database, first 64 samples of which belong to the first subject, and the other 64 samples belong to the second subject. We set the parameters as λ = 5, η = 4. The representation matrix C in (13) and the constructed similarity matrix W are shown in Fig. 2(a) and Fig. 2(b) respectively. From Fig. 2(a), we can see that the upper-left part and the bottom-right part are illuminated from the upper-right part and the bottom-left part, but there still exist some non-zero elements in the upper-right part and the bottom-left part. That is to say, the connections among the same subject are much stronger than that among different subjects, while there are many trivial connections among the samples from different subjects since the samples from various subjects are facial images, which have some common characteristics. As we know, an ideal similarity matrix for the spectral clustering algorithm is a block diagonal matrix, i.e., the connections should only exist among the data points from the same cluster [12, 15, 17, 24, 26], such that a hard thresholding operation has been executed. From the result of similarity matrix W in Fig. 2(b), we find that: • B. Baselines and Evaluation Metrics We compare KTRR2 with 10 state-of-art subspace clustering algorithms including truncated regression representation (TRR) [17], kernel low-rank representation (KLRR) [24], kernel sparse subspace clustering (KSSC) [30], Latent lowrank representation (LatLRR) [25], low-rank representation (LRR1) with ℓ1 -norm [12], low-rank representation (LRR2) with ℓ21 -norm [12], sparse subspace clustering (SSC) [11], sparse manifold clustering and embedding (SMCE) [26], local subspace analysis (LSA) [37], and standard spectral clustering (SC) [8]. For a fair comparison, we use the same spectral clustering framework [8] with different similarity matrices obtained by the tested algorithms. Like [24], for all kernel-based algorithms, we adopt the commonly used Gaussian kernel on all datasets and use the default bandwidth parameter which is set to the mean of the distances between all the samples. Four popular metrics are adopted to evaluate the subspace clustering quality, i.e., accuracy (AC) [10, 38], normalized mutual information (NMI) [10, 38], the adjusted rand index (ARI) [39], and Fscore [40]. The values of above four metrics are higher if the method works better. The values of these four metrics are equal to 1 indicates the predict results is perfectly matching with the ground truth, whereas 0 indicates totally mismatch. 2 The source code of our proposed method are available https://www.dropbox.com/s/8vj1k1b184w2ksv/KTRR.zip?dl=0. at • • Our method reveals the latent structure of data though these images belong to the two subjects. There exist only a few bright spots in the upper-right part and the bottomleft part of the obtained similarity matrix, i.e., the trivial connections among the samples from different subjects have been mostly removed by using the thresholding processing; Almost all of the bright spots lie in the diagonal blocks of the similarity matrix, i.e., the strong connections exist among the samples from the same subject; The obtained similarity matrix is a symmetric matrix which can be directly used for subspace clustering under the framework of spectral clustering [8]. D. Clustering on Clean Images In this experiment, we compare the KTRR method with other ten state-of-the-art approaches on four different benchmark databases, i.e., Extended Yale Database B (ExYaleB) [31], Columbia Object Image Library (COIL 20) [32], USPS [34], MNIST [35]. For each dataset, we perform each algorithm 10 runs, in each run the k-means clustering step are repeated 500 times, and report the mean and the standard deviation of the used metrics. The clustering quality on above four databases are shown in Table III - Table VI. The better means for each database are highlighted in boldface. To have statistically sound conclusions, the Wilcoxon’s rank sum test [41] at a 0.05 significance level is adopted to test the significance of the differences between the results obtained by the proposed method and all other algorithms. From the results, we can obtain the following conclusions. (1) Evaluation on the ExYaleB facial database: 6 (a) (b) Fig. 2. The visualization of the representation matrix and the similarity matrix on 128 facial images which from first 2 subjects in ExYaleB database. (a) The representation matrix in (13). (b) The similarity matrix obtained by our algorithm. The experiment was carried out on the first two subjects of ExYaleB. The top rows and the right columns illustrate some images of these two subjects. The dotted lines split each matrix into four parts. The upper-left part: the similarity relationship among the 64 images of the first subject. The bottom-right part: the similarity relationship among the 64 images of the second subject. The upper-right part and the bottom-left part: the similarity relationship among the images from different subjects. From the connections, it is easy to find that the upper-left part and the bottom-right part are illuminated from the upper-right part and the bottom-left part, which means that our method reflects the correct relationship among the samples from different subjects. TABLE III C LUSTERING PERFORMANCE (%) COMPARISONS IN DIFFERENT METHODS ON THE E X YALE B DATABASE . T HE BEST MEAN RESULTS IN DIFFERENT METRICS ARE IN BOLD . T HE “†” INDICATES THAT THE VALUE OF THE METHOD IS SIGNIFICANTLY DIFFERENT FROM ALL OTHER METHODS AT A 0.05 LEVEL BY THE W ILCOXON ’ S RANK SUM TEST. Metric KTRR TRR KLRR KSSC LatLRR LRR1 LRR2 SSC SMCE LSA SC AC NMI ARI Fscore 84.82+5.75† 89.52+2.43† 77.09+5.84† 77.72+5.66† 67.04+2.93 72.20+2.61 41.07+6.91 43.01+6.52 52.30+4.31 61.98+2.45 36.06+3.49 37.87+3.37 58.41+3.19 64.41+1.10 32.40+5.82 34.59+5.38 51.40+3.36 54.41+1.76 27.10+2.26 29.33+2.07 50.32+2.68 53.31+1.42 26.42+2.17 28.66+2.00 49.80+4.72 53.26+2.22 25.63+2.70 27.93+2.52 52.87+5.46 58.02+3.44 24.20+4.74 26.83+4.34 48.91+3.71 60.22+1.28 30.46+3.06 32.54+2.84 33.97+3.95 47.38+1.87 20.98+1.45 23.20+1.36 19.69+1.70 32.96+1.54 10.16+1.01 12.56+0.98 TABLE IV C LUSTERING PERFORMANCE (%) COMPARISONS IN DIFFERENT METHODS ON THE COIL 20 DATABASE . T HE BEST MEAN RESULTS IN DIFFERENT METRICS ARE IN BOLD . T HE “†” INDICATES THAT THE VALUE OF THE METHOD IS SIGNIFICANTLY DIFFERENT FROM ALL OTHER METHODS AT A 0.05 LEVEL BY THE W ILCOXON ’ S RANK SUM TEST. Metric KTRR TRR KLRR KSSC LatLRR LRR1 LRR2 SSC SMCE LSA SC AC NMI ARI Fscore 90.25+6.13† 94.71+2.75† 88.04+5.49† 88.65+5.19† 84.12+3.35 91.79+0.94 80.72+3.05 81.76+2.80 68.66+5.51 77.93+3.24 61.96+6.98 63.92+6.55 79.39+8.15 89.50+2.73 76.54+7.13 77.81+6.65 67.97+3.47 76.78+1.32 60.03+2.42 62.03+2.30 67.94+7.97 76.45+2.20 60.03+4.94 62.09+4.66 66.59+3.35 75.33+2.50 58.45+4.21 60.57+3.98 69.39+5.93 80.61+2.44 62.14+5.18 64.17+4.80 76.51+15.98 90.51+5.69 75.20+15.45 76.61+14.41 72.86+6.67 81.49+3.69 68.13+5.92 69.74+5.57 69.17+3.81 79.43+2.18 63.77+3.88 65.60+3.68 TABLE V C LUSTERING PERFORMANCE (%) COMPARISONS IN DIFFERENT METHODS ON THE USPS HANDWRITING DATABASE . T HE BEST MEAN RESULTS IN DIFFERENT METRICS ARE IN BOLD . T HE “†” INDICATES THAT THE VALUE OF THE METHOD IS SIGNIFICANTLY DIFFERENT FROM ALL OTHER METHODS AT A 0.05 LEVEL BY THE W ILCOXON ’ S RANK SUM TEST. Metric KTRR TRR KLRR KSSC LatLRR LRR1 LRR2 SSC SMCE LSA SC AC NMI ARI Fscore 81.36+14.93† 78.04+6.63† 71.73+12.67† 74.69+11.13† 60.24+16.98 59.55+7.61 46.06+13.33 51.98+11.29 70.72+2.63 66.23+3.35 57.21+3.76 61.64+3.41 75.17+2.89 73.97+2.41 65.11+3.67 68.76+3.28 70.97+4.10 66.55+4.37 57.20+4.51 61.59+4.11 70.16+4.29 66.69+4.63 57.18+4.79 61.58+4.34 70.91+3.96 66.87+4.35 57.50+4.48 61.85+4.08 26.86+13.39 20.93+13.44 9.95+13.56 24.07+7.62 73.77+7.85 71.29+9.69 62.08+13.10 66.10+11.63 68.51+8.95 64.80+7.93 55.58+9.00 60.30+7.99 70.79+8.58 62.72+4.55 53.55+5.24 58.25+4.67 TABLE VI C LUSTERING PERFORMANCE (%) COMPARISONS IN DIFFERENT METHODS ON THE MNIST HANDWRITING DATABASE . T HE BEST MEAN RESULTS IN DIFFERENT METRICS ARE IN BOLD . T HE “†” INDICATES THAT THE VALUE OF THE METHOD IS SIGNIFICANTLY DIFFERENT FROM ALL OTHER METHODS AT A 0.05 LEVEL BY THE W ILCOXON ’ S RANK SUM TEST. Metric KTRR TRR KLRR KSSC LatLRR LRR1 LRR2 SSC SMCE LSA SC AC NMI ARI Fscore 63.97+8.11† 66.81+4.43† 52.63+5.04† 57.92+4.16† 32.19+16.22 24.73+15.97 12.35+13.93 24.31+8.95 61.31+6.14 60.07+5.86 47.46+5.77 52.99+4.92 57.13+15.57 59.43+13.06 45.02+16.11 50.99+14.05 14.48+8.37 4.04+7.96 1.26+4.47 18.13+2.74 18.08+10.57 6.76+11.18 2.80+6.50 18.42+4.13 18.52+12.34 7.53+14.97 3.27+8.64 18.43+5.15 22.02+20.53 14.58+24.25 6.16+16.06 21.67+9.34 61.66+5.59 59.08+3.99 46.81+5.80 52.39+5.05 63.03+7.46 61.94+5.78 49.50+8.19 54.78+7.28 55.11+5.45 48.80+5.30 36.95+5.62 43.38+5.01 7 All linear and non-linear representation methods, i.e., KTRR, TRR [17], KLRR [24], KSSC [15], LRR [12], SSC [11], outperform the standard spectral clustering method [8]. • All the linear representation methods, i.e., TRR [17], LRR [12], and SSC [11], are inferior to their kernel-based extensions, i.e., KTRR, KLRR [24], and KSSC [15]. It means that the non-linear representation methods are more suitable to model the ExYaleB facial images. • The KTRR algorithm achieves the best results in the tests and gains a significant improvement over TRR. The means of Accuracy, N M I, ARI, and F score of KTRR are about 17%, 17%, 26% and 24% higher than that of the TRR, 32%, 28%, 41%, and 40% higher than that of the KLRR. (2) Evaluation on the COIL 20 database: • All the linear representation methods, i.e., TRR [17], LRR [12], and SSC [11], are still inferior to their kernel-based extensions, i.e., KTRR, KLRR [24], and KSSC [15]. Their non-linear versions obtain the Accuracy improvements of 6.13%, 0.68%, and 10%, respectively. • The KTRR algorithm gets the Accuracy of 90.25%, which is better than all other tested methods. Specifically, the Accuracy of KTRR is about 6.13% higher than that of the second best method TRR, and 21.86% higher than that of the third best method KLRR. • The KLRR, LatLRR and two types of LRR methods are all inferior to the standard spectral method. (3) Evaluation on the USPS handwriting database: • All the linear representation methods, i.e., TRR [17], LRR [12], and SSC [11], are inferior to their kernel-based extensions, i.e., KTRR, KLRR [24], and KSSC [15]. The performance improvement is considerable, e.g., the Accuracy of KSSC is about 44% higher than that of SSC. • SSC is inferior to LRR, while its kernel-based extension KLRR outperforms the kernel-based extension of LRR. The implicit transformation on the USPS images makes the mapped data points to be much better represented with each other in a sparse representation form. • The KTRR algorithm achieves the best results in the tests. The Accuracy of KTRR is about 21% higher than that of the TRR, 10% higher than that of the KLRR, and 6% higher than that of the KSSC. The performance indices of KTRR on N M I, ARI, and F score are also greater than other tested methods. (4) Evaluation on the MNIST handwriting database: • All the linear representation methods, i.e., TRR [17], LRR [12], and SSC [11], are inferior to their kernel-based extensions, i.e., KTRR, KLRR [24], and KSSC [15]. Especially, LRR results in poor performance on this database, while its kernel-based version, KLRR, obtains much better clustering quality regarding Accuracy, N M I, ARI, and F score. • The KTRR, KLRR, SMCE and LSA algorithms achieve the best clustering results on the MNIST handwriting • • images compared with other methods. However, the performances of all the test methods are not well. The proposed method KTRR achieves the best clustering result and obtains a significant improvement of 31.78% at Accuracy on TRR. The indexes N M I, ARI, and F score of KTRR are also higher than all other tested methods. E. Clustering on Corrupted Images To evaluate the robustness of the proposed method, we conduct the experiments on the first 10 subjects of COIL20 database and ExYaleB database respectively. All used images are corrupted by additive white Gaussian noises or random pixel corruptions. Some corrupted image samples under different levels of noises are as shown in Fig. 3. Actually, for the additional Gaussian noises, we add the noises with SN R equals 10, 20, 30, 40, 50 dB; For the random pixel corruptions, we adopt the pepper & salt noises with the ratios of affected pixels be 5%, 10%, 15%, 20%, 25%. The clustering quality of the compared methods on the two databases with additional Gaussian noises is shown in Fig. 4, from which we can get the following observations: • Most of these spectral-based methods are relatively robust to the additional Gaussian noises. While the performance of LRR1, LRR2, and LatLRR are sharply deteriorated on these two databases. The main reason may be that the additional Gaussian noises have destroyed the underlie the low-rank structure of the representation matrix. • The accuracy of all tested methods on COIL20 database are higher than that on ExYaleB database. It is consistent with the result of that on clean images. • The proposed KTRR is considerably more robust than other methods for additional Gaussian noises. Specifically, KTRR obtains the Accuracy around 80% under SN R = 10dB, which are much higher than all other tested algorithms, especially SC, LSA, LRR1, and LRR2. The clustering quality of the compared methods on the images with randomly corruptions is shown in Fig. 5, from which we obtain that: • All the investigated methods perform not as well as the case with white Gaussian noise. The result is consistent with a widely-accepted conclusion that non-additive corruptions are more challenging than additive ones in pattern recognition; • All of the test algorithms perform much better on COIL20 database than on ExYaleB database. The Accuracy of all algorithms are lower than 40% on ExYaleB under 20% and 25% of corrupted pixels. From the Fig. 3, we find that most pixel values of the images from COIL20 database are close to 0 or 255. This leads to some of the corruptions to be useless and weakens the impact to the final clustering results. • The KTRR algorithm is robust to the random pixel corruptions. It achieves the best results under the ratio of affected pixels equals 5% to 15% on the test two databases. It obtains the Accuracy around 60% under the ratio of affected pixels equals 25% on COIL20 database, 8 (a) (b) Fig. 3. (a) The corrupted samples with additional Gaussian noises under SN R equals 10, 20, 30, 40, 50 dB from left to right. (b) The corrupted samples with pepper and salt noises under the ratio of affected pixels equals 5%, 10%, 15%, 20%, 25% from left to right. KTRR TRR KLRR KSSC LatLRR LRR1 LRR2 SSC SMCE LSA SC Accuracy (%) 80 60 40 20 0 10 20 30 40 100 Accuracy (%) 100 80 60 40 20 10 50 KTRR TRR KLRR KSSC LatLRR LRR1 LRR2 SSC SMCE LSA SC The levels of noises SNR 20 30 40 50 The levels of noises SNR (a) (b) Fig. 4. The clustering results on images with different levels of additional Gaussian noises. (a) The clustering accuracy on the ExYaleB database. (b) The clustering accuracy on the COIL 20 database. KTRR TRR KLRR KSSC LatLRR LRR1 LRR2 SSC SMCE LSA SC 60 40 20 0 5% 10% 15% 20% 100 KTRR TRR KLRR KSSC LatLRR LRR1 LRR2 SSC SMCE LSA SC 80 Accuracy (%) Accuracy (%) 80 60 40 20 0 5% 25% 10% 15% 20% 25% The ratios of corrupted pixels The ratios of corrupted pixels (a) (b) Fig. 5. The clustering results on images with different ratios of pepper & salt corruptions. (a) The clustering accuracy on the ExYaleB database. (b) The clustering accuracy on the COIL 20 database. which is a very challenging situation that we can see in Fig. 3. However, the Accuracy of KTRR drops severely with the increase of the ratios of corrupted pixels, and lower than that of SSC under 20% and 25% of corrupted pixels. The KTRR should be improved to handle the images with salt & pepper corruptions. for clustering (t2 ) are recorded to evaluate the efficiency of compared methods. Table VII shows the time cost of different methods with the parameters which achieve their best results. We can see that: • F. Computational Time To investigate the efficiency of KTRR, we compare its computational time with that of other 10 approaches on the clean images of four databases. Our hardware configuration comprises of a 2.4-GHz CPU and a 16 GB RAM. The time cost for building similarity graph (t1 ) and the whole time cost • The standard SC [8] is the fastest since its similarity graph is computing via the pairwise kernel distances among the input samples, while the KSSC [15] is the most timeconsuming method. The time cost of the proposed method is very close to that of its linear version TRR [17]. Specifically, the TRR method is faster than KTRR on ExYaleB and USPS databases, while it is slower than KTRR on MNIST database. They have similar time cost on COIL database. 9 TABLE VII C OMPUTATIONAL TIME ( SECONDS ) COMPARISONS OF DIFFERENT METHODS ON THE E X YALE B, COIL 20, USPS, AND MNIST DATABASES . T HE t1 AND t2 DENOTE THE TIME COST ON THE SIMILARITY GRAPH CONSTRUCTION PROCESS AND THE TIME COST ON THE WHOLE CLUSTERING PROCESS OF EACH METHOD RESPECTIVELY. T HE BEST MEAN RESULTS IN DIFFERENT METRICS ARE IN BOLD . Databases ExYaleB COIL 20 USPS MNIST • KTRR 22.96 47.62 6.50 11.66 16.92 27.82 22.56 33.96 t1 t2 t1 t2 t1 t2 t1 t2 TRR 23.71 48.8 6.54 12.75 11.95 22.74 22.43 32.35 KLRR 45.82 71.26 16.11 25.55 29.41 39.93 34.20 44.64 KSSC 5512.68 5543.4 1466.12 1472.07 2752.97 2763.19 5742.89 5753.42 LatLRR 772.44 806.43 579.01 584.46 50.05 58.98 246.35 270.19 The Wilcoxon’s rank sum test [41] at a 0.05 significance level shows there is no significant difference between the time costs of the KTRR and TRR on the similarity graph construction and the whole clustering process on the tested four databases. The KTRR and TRR [17] algorithms are much faster than KSSC, SSC, KLRR, and LRR methods. The results are consist with the fact that the theocratical computation complexities of KTRR and TRR are much lower than that of KSSC, SSC, KLRR, and LRR methods. The KTRR and TRR [17] algorithms both have analytical solutions, and only one pseudo-inverse operation is required for solving the representation problems of all data points for KTRR and TRR algorithms. G. Clustering Performance with Varying Number of Subjects In this subsection, we investigate the clustering performance of the proposed method with a different number of subjects on COIL 100 image database. The experiments are carried out on the first t classes of the database, where t increases from 10 to 100 with an interval of 10. The clustering results are shown in Fig. 6. 100 Clustering Quality (%) 95 90 85 80 75 70 65 10 Accuracy 20 30 NMI 40 ARI 50 Fscore 60 70 80 90 100 The number of subjects Fig. 6. The clustering quality of the proposed method on the first g subjects of COIL 100 database. From the results, we can see that: • In general, with the number of subjects increase, the clustering performance is decreased since the clustering difficulty is increasing with the number of subjects growth. • With increasing number of subjects, the N M I of KTRR is changed slightly, varying from 100% to 90%. The LRR1 248.94 286.91 430.23 436.59 43.34 51.88 155.70 167.25 • LRR2 270.65 311.34 454.87 460.07 49.10 58.90 172.32 186.82 SSC 2301.75 2313.31 121.76 126.88 62.25 98.79 112.13 153.23 SMCE 10.15 45.18 5.76 10.12 67.44 76.50 16.78 25.52 LSA 198.48 229.26 61.14 66.01 108.67 120.46 142.71 154.64 SC 0.33 124.45 0.15 7.61 0.14 11.73 1.09 14.65 possible reason is that the N M I is robust to the data distribution (increasing subject number) [19]. The proposed method obtains satisfactory performance on COIL 100 database. It achieves perfect clustering result for t = 10, and gets the satisfactory performance at t = 100 with Accuracy, N M I, ARI, and F score be around 74%, 90%, 68%, and 68%, respectively. H. Parameter Analysis The KTRR has two parameters, the tradeoff parameter λ and the thresholding parameter η. The selection of the values of the parameters depends on the data distribution. A bigger λ is suitable for highly corrupted databases, and η corresponds to the dimensionality of the corresponding subspace for the mapped data points. To evaluate the impact of λ and k, we conduct the experiment on the ExYaleB and COIL20 databases. We set the λ from 10−5 to 102 , and η from 1 to 50, the results are shown in Fig. 7 and Fig. 8 . From the results, we get the following observations: • The proposed method achieves the best clustering performance with λ and η as 0.1 and 5 on ExYaleB database, and 10 and 4 on COIL20 database, respectively. • The proposed method can obtain satisfactory performance with λ from 0.1 to 1 on ExYaleB database, where the Accuracy, N M I, ARI, and F score are more than 85%, 90%, 75%, and 75%, respectively, and with λ from 0.2 to 100 on COIL20 database, where the Accuracy, N M I, ARI, and F score are more than 80%, 90%, 80%, and 80%. The performance of KTRR is not sensitive to the parameter of λ, which makes KTRR be suitable for the real applications. • The clustering quality with η from 3 to 10 on ExYaleB and COIL20 databases are much better than other cases. It means that the thresholding process is helpful to improve the performance of KTRR, and the dimensionality of underlying subspaces of the ExYaleB and COIL20 databases in the hidden space belongs the scope from 3 to 10. I. Different Kernel Functions The commonly used kernel functions are polynomial kernels, radial basis functions, and sigmoid kernels. To investigate the performance of the proposed method using different kernels, we study six different kernel functions. The results on 100 80 90 70 60 50 0.1 0.5 1 λ 5 10 3 4 6 5 7 100 80 70 60 50 40 Accuracy NMI ARI Fscore 30 10-5 10-4 10-3 10-2 0.1 0.2 0.5 0.7 0.8 η Clustering Quality (%) 90 Clustering Quality (%) Accuracy (%) 10 1 80 60 40 20 Accuracy 0 10 102 1 2 3 4 The tradeoff parameter λ (a) 5 NMI 6 7 ARI 8 9 Fscore 10 20 30 40 50 The thresholding parameter η (b) (c) Fig. 7. Clustering performance of the proposed method on ExYaleB database. (a) Clustering performance of the proposed method versus different values of λ and η. (b) Clustering performance of the proposed method versus different values of λ, and fix η = 5. (c) Clustering performance of the proposed method versus different values of η, and fix λ = 0.5. 100 80 70 60 50 0.01 0.1 100 90 80 70 60 50 Accuracy 7 1 λ 6 10 5 100 4 3 η Clustering Quality (%) Clustering Quality (%) Accuracy (%) 90 NMI ARI 40 10-5 10-4 10-3 10-2 0.1 0.2 0.5 0.7 0.8 Fscore 1 10 102 80 60 40 20 Accuracy 0 1 2 3 5 NMI 6 7 ARI 8 9 Fscore 10 20 30 40 50 The thresholding parameter η The tradeoff parameter λ (a) 4 (b) (c) Fig. 8. Clustering performance of the proposed method on COIL20 database. (a) Clustering performance of the proposed method versus different values of λ and η. (b) Clustering performance of the proposed method versus different values of λ, and fix η = 4. (c) Clustering performance of the proposed method versus different values of η, and fix λ = 10. TABLE VIII P ERFOMANCE COMPARISON OF DIFFERENT KERNEL FUNCTIONS USED IN THE PROPOSED METHOD . T HE PARAMETER OF σ IS SETTING AS THE MEAN OF THE DISTANCES BETWEEN ALL THE SAMPLES . T HE BEST MEAN RESULTS IN DIFFERENT METRICS ARE IN BOLD . Function κ(xi , xj ) USPS MNIST AC NMI ARI Fscore AC NMI ARI Fscore e 80.38+19.04 76.08+9.75 70.10+15.43 73.25+13.45 65.58+11.65 64.27+6.25 51.62+10.21 56.70+8.92 72.31+18.06 67.38+14.41 59.48+17.11 63.78+15.06 66.48+14.54 63.49+6.50 51.54+11.54 56.61+10.09 81.36+14.93 78.04+6.63 71.73+12.67 74.69+11.13 63.97+8.11 66.81+4.43 52.63+5.04 57.92+4.16 kxi −xj k2 • • kxi −xj k2 σ2 2 (xT i xj ) USPS and MINIST databases are shown in Table VIII, from which we can get the following observations: • − 3 (xT i xj ) achieves the The kernel function κ(xi , xj ) = e− σ2 best performance on USPS database. While the kernel function κ(xi , xj ) = (xTi xj )2 obtains the best performance on MNIST database. The kernel function κ(xi , xj ) = (xTi xj )3 outperforms κ(xi , xj ) = (xTi xj )2 on USPS database, which is different to that on MNIST database. It is mainly caused by the fact that the images from USPS database lie in much higher nonlinear subspaces than that from MNIST database, and the former function induced a much more nonlinear mapping. The selection of different kernels results in a great e− kxi −xj k σ 74.97+12.40 75.59+9.22 65.98+13.81 69.72+11.83 59.21+14.27 63.54+12.66 48.62+16.10 54.50+13.94 1 kxi −xj k2 1 kxi −xj k 79.62+17.69 74.18+13.08 68.32+19.86 71.68+17.47 61.62+12.43 64.00+9.32 50.18+11.25 55.63+9.71 73.64+14.46 74.58+8.01 64.62+14.44 68.53+12.38 62.06+9.67 65.33+5.59 51.20+7.18 56.66+6.13 difference in the subspace clustering performance both on USPS database and MNIST database. V. C ONCLUSION In this paper, we have incorporated the kernel technique into TRR method to achieve robust nonlinear subspace clustering. It does not need the prior knowledge about the structure of errors in the input data and remedies the drawback of the existing TRR method that it cannot deal with the data points from nonlinear subspaces. Moreover, through the theoretical analysis of our proposed mathematical model, we find that the developed optimization problem can be solved analytically, and the closed-form solution is only dependent on the kernel matrix. Theses advantages make our proposed method useful in many real-world applications. Comprehensive experiments 11 on four real-world image databases have demonstrated the effectiveness and the efficiency of the proposed method. In the future, we plan to conduct a systematical investigation on the selection of optimal kernel for our proposed method and study how to determine the number of nonlinear subspaces automatically. ACKNOWLEDGMENT This work was supported in part by the National Natural Science Foundation of China under grants 61432012, 61329302, and the Engineering and Physical Sciences Research Council (EPSRC) of U.K. under grant EP/J017515/1. R EFERENCES [1] L. Parsons, E. Haque, and H. Liu, “Subspace clustering for high dimensional data: a review,” ACM SIGKDD Explorations Newsletter, vol. 6, no. 1, pp. 90–105, 2004. [2] P. S. Bradley and O. L. Mangasarian, “k-plane clustering,” Journal of Global Optimization, vol. 16, no. 1, pp. 23–32, 2000. [3] S. R. Rao, R. Tron, R. Vidal, and Y. Ma, “Motion segmentation via robust subspace separation in the presence of outlying, incomplete, or corrupted trajectories,” in Computer Vision and Pattern Recognition, 2008. CVPR 2008. IEEE Conference on. IEEE, 2008, pp. 1–8. [4] H. Derksen, Y. Ma, W. Hong, and J. Wright, “Segmentation of multivariate mixed data via lossy coding and compression,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 29, no. 9, p. 15461562, 2007. [5] J. P. Costeira and T. Kanade, “A multibody factorization method for independently moving objects,” International Journal of Computer Vision, vol. 29, no. 3, pp. 159–179, 1998. [6] C. W. Gear, “Multibody grouping from motion images,” International Journal of Computer Vision, vol. 29, no. 2, pp. 133– 150, 1998. [7] R. Vidal, Y. Ma, and S. Sastry, “Generalized principal component analysis,” Pattern Analysis and Machine Intelligence, IEEE Transactions on, vol. 27, no. 12, pp. 1945–1959, 2005. [8] A. Y. Ng, M. I. Jordan, and Y. Weiss, “On spectral clustering: Analysis and an algorithm,” in Advances in Neural Information Processing Systems, vol. 14, 2002, Conference Proceedings, pp. 849–856. [9] U. Von Luxburg, “A tutorial on spectral clustering,” Statistics and Computing, vol. 17, no. 4, pp. 395–416, 2007. [10] B. Cheng, J. Yang, S. Yan, Y. Fu, and T. S. Huang, “Learning with ℓ1 -graph for image analysis,” IEEE Transactions on Image Processing, vol. 19, no. 4, pp. 858–866, April 2010. [11] E. Elhamifar and R. Vidal, “Sparse subspace clustering: Algorithm, theory, and applications,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 35, no. 11, pp. 2765– 2781, 2013. [12] G. Liu, Z. Lin, S. Yan, J. Sun, Y. Yu, and Y. Ma, “Robust recovery of subspace structures by low-rank representation,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 35, no. 1, pp. 171–184, 2013. [13] C. Y. Lu, H. Min, Z. Q. Zhao, L. Zhu, D. S. Huang, and S. C. Yan, “Robust and efficient subspace segmentation via least squares regression,” in Proc. of 12th Eur. Conf. Comput. Vis., Florence, Italy, Oct. 2012, pp. 347–360. [14] C. Lu, J. Tang, M. Lin, L. Lin, S. Yan, and Z. Lin, “Correntropy induced l2 graph for robust subspace clustering,” in 2013 IEEE International Conference on Computer Vision, Dec 2013, pp. 1801–1808. [15] V. M. Patel and R. Vidal, “Kernel sparse subspace clustering,” in Image Processing (ICIP), 2014 IEEE International Conference on. IEEE, 2014, Conference Proceedings, pp. 2849–2853. [16] L. Zhen, Z. Yi, X. Peng, and D. Peng, “Locally linear representation for image clustering,” Electronics Letters, vol. 50, no. 13, pp. 942–943, 2014. [17] X. Peng, Z. Yi, and H. Tang, “Robust subspace clustering via thresholding ridge regression,” in The Twenty-Ninth AAAI Conference on Artificial Intelligence, 2015, Conference Proceedings, pp. 3827–3833. [18] H. Liu, T. Liu, J. Wu, D. Tao, and Y. Fu, “Spectral ensemble clustering,” in Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. ACM, 2015, pp. 715–724. [19] X. Peng, H. Tang, L. Zhang, Z. Yi, and S. Xiao, “A unified framework for representation-based subspace clustering of outof-sample and large-scale data,” IEEE Transactions on Neural Networks and Learning Systems, vol. 27, no. 12, pp. 2499–2512, Dec 2016. [20] X. Peng, C. Lu, Y. Zhang, and H. Tang, “Connections between nuclear norm and frobenius norm based representation,” IEEE Transactions on Neural Networks and Learning Systems, vol. PP, no. 99, pp. 1–7, 2016. [21] E. Elhamifar and R. Vidal, “Sparse subspace clustering,” in IEEE Conference on Computer Vision and Pattern Recognition, 2009, Conference Proceedings, pp. 2790–2797. [22] S. R. Rao, R. Tron, R. Vidal, and Y. Ma, “Motion segmentation via robust subspace separation in the presence of outlying, incomplete, or corrupted trajectories,” in Computer Vision and Pattern Recognition, 2008. CVPR 2008. IEEE Conference on. IEEE, 2008, pp. 1–8. [23] Z. Yu, H.-S. Wong, and H. Wang, “Graph-based consensus clustering for class discovery from gene expression data,” Bioinformatics, vol. 23, no. 21, pp. 2888–2896, 2007. [24] S. Xiao, M. Tan, D. Xu, and Z. Y. Dong, “Robust kernel lowrank representation,” IEEE Transactions on Neural Networks and Learning Systems, 2015. [25] G. Liu and S. Yan, “Latent low-rank representation for subspace segmentation and feature extraction,” in 2011 International Conference on Computer Vision, Nov 2011, pp. 1615–1622. [26] E. Elhamifar and R. Vidal, “Sparse manifold clustering and embedding,” in Advances in Neural Information Processing Systems, 2011, Conference Proceedings, pp. 55–63. [27] X. Peng, S. Xiao, J. Feng, W. Yau, and Z. Yi, “Deep subspace clustering with sparsity prior,” in Proceedings of the 25 International Joint Conference on Artificial Intelligence, New York, NY, USA, 9-15 July 2016, pp. 1925–1931. [Online]. Available: http://www.ijcai.org/Abstract/16/275 [28] X. Peng, J. Feng, J. Lu, W.-Y. Yau, and Z. Yi, “Cascade subspace clustering,” in Proceedings of the 31th AAAI Conference on Artificial Intelligence. SFO, USA: AAAI, Feb. 2017, pp. 2478–2484. [29] J. Shawe-Taylor and N. Cristianini, Kernel methods for pattern analysis. Cambridge university press, 2004. [30] V. M. Patel and R. Vidal, “Kernel sparse subspace clustering,” in 2014 IEEE International Conference on Image Processing (ICIP). IEEE, 2014, pp. 2849–2853. [31] K.-C. Lee, J. Ho, and D. J. Kriegman, “Acquiring linear subspaces for face recognition under variable lighting,” Pattern Analysis and Machine Intelligence, IEEE Transactions on, vol. 27, no. 5, pp. 684–698, 2005. [32] S. K. N. S. A. Nene and H. Murase, “Columbia object image library (coil-20),” Report, 1996. [33] ——, “Columbia object image library (coil-100),” Report, 1996. [34] J. J. Hull, “A database for handwritten text recognition research,” Pattern Analysis and Machine Intelligence, IEEE Transactions on, vol. 16, no. 5, pp. 550–554, 1994. [35] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner, “Gradient-based learning applied to document recognition,” Proceedings of the IEEE, vol. 86, no. 11, pp. 2278–2324, 1998. [36] D. Cai, X. He, J. Han, and T. S. Huang, “Graph regularized nonnegative matrix factorization for data representation,” Pat- 12 [37] [38] [39] [40] [41] tern Analysis and Machine Intelligence, IEEE Transactions on, vol. 33, no. 8, pp. 1548–1560, 2011. J. Yan and M. Pollefeys, “A general framework for motion segmentation: Independent, articulated, rigid, non-rigid, degenerate and non-degenerate,” in European conference on computer vision. Springer, 2006, pp. 94–106. X. Zheng, D. Cai, X. He, W.-Y. Ma, and X. Lin, “Locality preserving clustering for image database,” in Proceedings of the 12th annual ACM international conference on Multimedia. ACM, Conference Proceedings, pp. 885–891. L. Hubert and P. Arabie, “Comparing partitions,” Journal of classification, vol. 2, no. 1, pp. 193–218, 1985. C. Goutte and E. Gaussier, A probabilistic interpretation of precision, recall and F-score, with implication for evaluation. Springer, 2005, pp. 345–359. J. D. Gibbons and S. Chakraborti, Nonparametric statistical inference. Springer, 2011.
2cs.AI
arXiv:1704.08676v1 [cs.LG] 27 Apr 2017 A quantitative assessment of the effect of different algorithmic schemes to the task of learning the structure of Bayesian Networks Stefano Berettaa , Mauro Castellib , Ivo Gonçalvesb,c , Daniele Ramazzottid,∗ a DISCo, Universitá degli Studi di Milano-Bicocca. 20126 Milano, Italy NOVA IMS, Universidade Nova de Lisboa. 1070-312 Lisboa, Portugal c CISUC, Department of Informatics Engineering, University of Coimbra, 3030-290 Coimbra, Portugal d Department of Pathology, Stanford University. California, USA b Abstract One of the most challenging tasks when adopting Bayesian Networks (BNs) is the one of learning their structure from data. This task is complicated by the huge search space of possible solutions and turned out to be a wellknown N P -hard problem and, hence, approximations are required. However, to the best of our knowledge, a quantitative analysis of the performance and characteristics of the different heuristics to solve this problem has never been done before. For this reason, in this work, we provide a detailed study of the different state-of-the-arts methods for structural learning on simulated data considering both BNs with discrete and continuous variables, and with different rates of noise in the data. In particular, we investigate the characteristics of different widespread scores proposed for the inference and the statistical pitfalls within them. Keywords: Bayesian Networks, Structure Learning, Heuristic Search, Evolutionary Computation, Genetic Algorithms ∗ Corresponding author Email addresses: [email protected] (Stefano Beretta), [email protected] (Mauro Castelli), [email protected] (Ivo Gonçalves), [email protected] (Daniele Ramazzotti) Preprint submitted to Journal Name April 28, 2017 1. Introduction Bayesian Networks (BNs) have been applied to several different fields, ranging from the water resources management [1] to the discovery of gene regulatory networks [2, 3]. The task of learning a BN can be divided into two subtasks: (1) structural learning, i.e., identification of the topology of the BN, and (2) parametric learning, i.e., estimation of the numerical parameters (conditional probabilities) for a given network topology. In particular, the most challenging task of the two is the one of learning the structure of a BN. Different methods have been proposed to face this problem, and they can be classified into two categories [4, 5]: (1) methods based on detecting conditional independencies, also known as constraint-based methods, and (2) score+search methods, also known as score-based approaches. As discussed in [6], the input of the former algorithms is a set of conditional independence relations between subsets of variables, which are used to build a BN that represents a large percentage (and, whenever possible, all) of these relations [7]. However, the number of conditional independence tests that such methods should perform is exponential and, thus, approximation techniques are required. Although constraint-based learning is an interesting approach, as it is close to the semantic of BNs, most of the developed structure learning algorithms fall into the score-based method category, given the possibility of formulating such a task in terms of an optimization problem. As the name implies, these methods have two major components: (1) a scoring metric that measures the quality of every candidate BN with respect to a dataset, and (2) a search procedure to intelligently move through the space of possible networks, as this space is enormous. More in detail, as shown in [8, 9], searching this space for the optimal structure is an N P -hard problem, even when the maximum number of parents for each node is constrained. Hence, regardless of the strategy to learn the structure, one wishes to pursue, greedy local search techniques and heuristic search approaches need to be adopted to tackle the problem of inferring the structure of BNs. However, to the best of our knowledge, a quantitative analysis of the performance of these different techniques has never been done. For this reason, here we provide a detailed assessment of the performance of different state-of-thearts methods for structural learning on simulated data, considering both BNs with discrete and continuous variables, and with different rates of noise in the data. More precisely, we investigate the characteristics of different 2 scores proposed for the inference, and the statistical pitfalls within both the constraint-based and score based techniques. Furthermore, we study the impact of various heuristic search approaches, namely Hill Climbing, Tabu Search, and Genetic Algorithms. This work is structured as follows. In the next two Sections, we provide a background on both Bayesian Networks and Heuristic Search Techniques (see Section 2 and Section 3). In Section 4 we describe the results of our study and in Section 5 we conclude the paper. 2. Bayesian Networks BNs are graphical models representing the joint distribution over a set of n random variables through a direct acyclic graph (DAG) G = (V, E), where the n nodes in V represent the variables, and the arcs E encode any statistical dependence among them. In this DAG, the set of variables with an arc toward a given node X is its set π(X) of “parents”. When the structure of a BN is known, it is possible to compute the joint distribution of all the variables as the product of the conditional distributions on each variable given its parents. However, even if we consider the simplest case of binary variables, the number of parameters in each conditional probability table is still exponential in size. For example, in the case of binary variables, the total number of parameters needed to compute the full joint distribution is P |π(X)| − 1, where |π(X)| is the cardinality of the parent set of of size X 2 each node. In the literature, there are two families of methods to learn the structure of a BN from data. The idea behind the first group of methods is the one of learning the conditional independence relations of the BN from which, in turn, the network is learned. These methods are often referred to as constraint-based approaches. The second group of methods, the so-called score-based approaches, formulates the task of structure learning as an optimization problem, with scores aimed at maximizing the likelihood of the data given the model. However, both the approaches are known to lead to N P hard formulations and, because of this, heuristic methods need to be used to find a “good” solution. 2.1. Constraint-based approaches We now briefly describe the main idea behind this class of approaches. For a detailed discussion of this topic we refer to [7, 10]. 3 This class of methods aims at building a graph structure to reflect the dependence relations in the data that match the empirical distribution. Notwithstanding, the number of conditional independence tests that such algorithms would have to perform among any pair of nodes to test all possible relations is exponential and, because of this, the introduction of some approximations is required. We now provide some details on two constraint-based algorithms that have been proven to be efficient and of widespread usage: the PC algorithm [7] and the Incremental Association Markov Blanket (IAMB) [10]. The PC algorithm. This algorithm [7] starts with a fully connected graph and, on the basis of pairwise independence tests, it iteratively removes all the extraneous edges. To avoid an exhaustive search of separating sets, the edges are ordered to consider the correct ones early in the search. Once a separating set is found, the search for that pair ends. The PC algorithm orders the separating sets by increasing values of size l, starting from 0 (the empty set), until l = n − 2 (where n is the number of variables). The algorithm stops when every variable has less than l − 1 neighbors since it can be proven that all valid sets must have already been chosen. During the computation, the bigger the value of l is, the larger the number of separating sets must be considered. However, by the time l gets too big, the number of nodes with degree l or higher must have dwindled considerably. Thus, in practice, we only need to consider a small subset of all the possible separating sets. Incremental Association Markov Blanket algorithm. A different type of constraintbased learning algorithms uses the Markov blankets [11] to restrict the subset of variables to test for independence. Thus, when this knowledge is available in advance, we do not need to test a conditioning on all possible variables. A widely used and efficient algorithm for Markov blanket discovery is IAMB which, for each variable X, keeps track of a hypothesis set H(X). The goal is, for a given H(X), to obtain at the end of the algorithm, a Markov blanket of X equal to B(X). IAMB consists of a forward and a backward phase. During the forward phase, it adds all the possible variables into H(X) that could be in B(X), while in the backward phase, it removes all the false positive variables from the hypotheses set, leaving the true B(X). The forward phase begins with an empty H(X) for each X. Then, iteratively, variables with a strong association with X (conditioned on all the variables in H(X)) are 4 added to the hypotheses set. This association can be measured by a variety of non-negative functions, such as mutual information. As H(X) grows large enough to include B(X), the other variables in the network will have very little association with X, conditioned on H(X). At this point, the forward phase is complete. The backward phase starts with H(X) that contains B(X) and false positives, which will have small conditional associations, while true positives will associate strongly. Using this test, the backward phase is able to iteratively remove the false positives, until all but the true negatives are eliminated. 2.2. Score-based approaches These approaches aim at maximizing the likelihood L of a set of observed data D, which can be computed as the product of the probability of each observation. Formally, Y L(D) = P (d) d∈D for a set of observations D. Since we want to infer a model G that best explains the observed data, we define the likelihood of observing the data given a specific model G as: Y LL(G, D) = P (d|G) . d∈D Practically, however, for any arbitrary set of data, the most likely graph is always the fully connected one, since adding an edge can only increase the likelihood of the data, i.e., this approach overfits the data. To overcome this limitation, the likelihood score is almost always combined with a regularization term that penalizes the complexity of the model in favor of sparser solutions [11]. As already mentioned, such an optimization problem leads to intractability, due to the enormous search space of the valid solutions. Because of this, the optimization task is often solved with heuristic techniques. Before moving on to describe the main heuristic methods employed to face such complexity (see Section 3), we now give a short description of a particularly relevant and known score, called Bayesian Information Criterion (BIC) [12], as an example of scoring function adopted by several the score-based methods. 5 The Bayesian Information Criterion. BIC uses a score that consists of a log-likelihood term and a regularization term that depend on a model G and data D: log m dim(G) (1) bic(G, D) = LL(G, D) − 2 where D denotes the data, m denotes the number of samples, and dim(G) denotes the number of parameters in the model. Since, in general, dim(·) depends on the number of parents of each node, it is a good metric for model complexity. Moreover, each edge added to G increases the complexity of the model. Thus, the regularization term based on dim(·) favors graphs with fewer edges and, more specifically, fewer parents for each node. The term log m/2 essentially weighs the regularization term. The effect is that the higher the weight, the more sparsity will be favored over “explaining” the data through maximum likelihood. Notice that the likelihood is implicitly weighted by the number of data points since each point contributes to the score. As the sample size increases, both the weight of the regularization term and the “weight” of the likelihood increase. However, the weight of the likelihood increases faster than that of the regularization term. This means that, with more data, the likelihood will contribute more to the score, and we may trust our observations more and have less need for regularization. Statistically speaking, BIC is a consistent score [11]. Consequently, G contains the same independence relations as those implied by the true structure. 3. Heuristic Search Techniques We now describe some of the main state-of-the-art search strategies that we took into account in this work. In particular, as stated in Section 1, we considered the following search methods: Hill Climbing, Tabu Search, and Genetic Algorithms. 3.1. Hill Climbing Hill Climbing (HC) is one of the simplest iterative techniques that have been proposed for solving optimization problems. While HC consists of a simple and intuitive sequence of steps, it is a good search scheme to be used as a baseline for comparing the performance of more advanced optimization techniques. 6 Hill Climbing shares with other techniques (like Simulated Annealing [13] and Tabu Search [14]) the concept of neighborhood. Search methods based on this latter concept are iterative procedures in which a neighborhood N (i) is defined for each feasible solution i, and the next solution j is searched among the solutions in N (i). Hence, the neighborhood is a function N : S → 2S that assigns to each solution in the search space S a (non-empty) subset of S. The sequence of steps of the Hill Climbing algorithm, for a minimization problem w.r.t. a given objective function f , are the following: 1. choose an initial solution i in S; 2. find the best solution j in N (i) (i.e., the solution j such that f (j) ≤ f (k) for every k in N (i); 3. if f (j) > f (i), then stop; else set i = j and go to Step 2. As it is clear from the aforementioned algorithm, Hill Climbing returns a solution that is a local minimum for the problem at hand. This local minimum does not generally correspond to the global minimum for the problem under exam, that is, Hill Climbing does not guarantee to return the best possible solution for a given problem. To counteract this limitation, more advanced neighborhood search methods have been defined. One of these methods is Tabu Search, an optimization technique that uses the concept of “memory”. 3.2. Tabu Search Tabu Search (TS) is a meta-heuristic that guides a local heuristic search procedure to explore the solution space beyond local optimality. One of the main components of this method is the use of an adaptive memory, which creates a more flexible search behavior. Memory-based strategies are therefore the main feature of TS approaches, founded on a quest for “integrating principles”, by which alternative forms of memory are appropriately combined with effective strategies for exploiting them. Tabus are one of the distinctive elements of TS when compared to Hill Climbing or other local search methods. The main idea in considering tabus is to prevent cycling when moving away from local optima through nonimproving moves. When this situation occurs, something needs to be done to prevent the search from tracing back its steps to where it came from. This is achieved by declaring tabu (disallowing) moves that reverse the effect of recent moves. For instance, let us consider a problem where solutions are 7 binary strings of a prefixed length, and the neighborhood of a solution i consists of the solutions that can be obtained from i by flipping only one of its bits. In this scenario, if a solution j has been obtained from a solution i by changing one bit b, it is possible to declare a tabu to avoid to flip back the same bit b of j for a certain number of iterations (this number is called the tabu tenure of the move). Tabus are also useful to help in moving the search away from previously visited portions of the search space and, thus, perform more extensive exploration. As reported in [15], tabus are stored in a short-term memory of the search (the tabu list) and usually, only a fixed limited quantity of information is recorded. It is possible to store complete solutions, but this has a negative impact on the computational time required to check whether a move is a tabu or not and, moreover, it requires a vast amount of space. The second option (which is the one commonly used) involves recording the last few transformations performed to obtain the current solution and prohibiting reverse transformations. While tabus represent the main distinguish feature of TS, this feature can introduce other issues in the search process. In particular, the use of tabus can prohibit attractive moves, or it may lead to an overall stagnation of the search process, with a lot of moves that are not allowed. Hence, several methods for revoking a tabu have been defined [16], and they are commonly known as aspiration criteria. The simplest and most commonly used aspiration criterion consists of allowing a move (even if it is tabu) if it results in a solution with an objective value better than that of the current best-known solution (since the new solution has obviously not been previously visited). The basic TS algorithm, considering the minimization of the objective function f , works as follows: 1. randomly select an initial solution i in the search space S, and set i∗ = i and k = 0, where i∗ is the best solution so far, and k the iteration counter; 2. set k = k +1 and generate the subset V of the admissible neighborhood solutions of i (i.e., non-tabu or allowed by aspiration); 3. choose the best j in V and set i = j; 4. if f (i) < f (i∗ ), then set i∗ = i; 5. update the tabu and the aspiration conditions; 6. if a stopping condition is met then stop; else go to Step 2. 8 The most commonly adopted conditions to end the algorithm are when the number of iterations (K) is larger than a maximum number of allowed iterations, or if no changes to the best solution have been performed in the last N iterations (as it is in our tests). Specifically, in our experiments, we modeled for both HC and TS the possible valid solutions in the search space as a binary adjacency matrix describing acyclic directed graphs. The starting point of the search is the empty graph (i.e. without any edge), and the search is stopped when the current best solution cannot be improved with any move in its neighborhood. The algorithms then consider a set of possible solutions (i.e., all the directed acyclic graphs) and navigate among them by means of 2 moves: insertion of a new edge or removal of an edge currently in the topology. We also recall that in the literature many alternatives are proposed to navigate the search space when learning the structure of Bayesian Networks, see [17, 18]. But, for the purpose of this work, we preferred to stick with the classical (and simpler) ones. 3.3. Genetic Algorithms Genetic Algorithms (GAs) [19] are a class of computational models that mimic the process of natural evolution. GAs are often viewed as function optimizers although the range of problems to which GAs have been applied is quite broad. Their peculiarity is that potential solutions that undergo evolution are represented as fixed length strings of characters or numbers. Generation by generation, GAs stochastically transform sets (also called populations) of candidate solutions into new, hopefully improved, populations of solutions, with the goal of finding one solution that suitably solves the problem at hand. The quality of each candidate solution is expressed by using a user-defined objective function called fitness. The search process of GAs is shown in Figure 1. To transform a population of candidate solutions into a new one, GAs make use of particular operators that transform the candidate solutions, called genetic operators: crossover and mutation. Crossover is traditionally used to combine the genetic material of two solutions (parents) by swapping a part of one individual with a part of the other. On the other hand, mutations introduce random changes in the structures of the solutions. In order to be able to use GAs to solve a given optimization problem, candidate solutions must be encoded into individuals (solutions) and, often, also the genetic operators (crossover and mutation) must be adapted. 9 Figure 1: Typical workflow of a GA algorithm. GAs have been widely used to learn the BN structure considering the search space of the DAGs. In the large majority of the works [20, 21, 22, 23, 24, 25], the GA encodes the connectivity matrix of the BN structure in its individuals. This is the same approach used in our study. Our GA follows the common structure: 1. Generate the initial population 2. Repeat the following operations until the total number of generations is reached: (a) Select a population of parents by repeatedly applying the parent selection method (b) Create a population of offspring by applying the crossover operator to each set of parents (c) For each offspring, apply one of the mutation operators with a given mutation probability (d) Select the new population by applying the survivor selection method 3. Return the best performing individual Unless stated otherwise, the following description is valid for both GA variants (discrete and continuous). The initialization method and the variation operators used in our GA ensure that every individual is valid, i.e., each individual is guaranteed to be an acyclic graph. The initialization method creates individuals with exactly N/2 connections between variables, where N is the total number of variables. A connection is only added if the graph 10 remains acyclic. The nodes being connected are selected with uniform probability from the set of variables. In the continuous variant, the value associated with each connection is randomly generated between 0.0 and 1.0, with uniform probability. The crossover operates over two parents and returns one offspring. The offspring is initially a copy of the first parent. Afterward, a node with at least one connection is selected from the second parent and all the valid connections starting from this node are added to the offspring. Three mutation operators are considered in our GA implementation: add connection mutation, remove connection mutation, and perturbation mutation. The first two are applied in both GA variants, while the perturbation mutation is only applied in the continuous variant. The offspring resulting from the add connection mutation operator differs from the parent in having an additional connection. The newly connected nodes are selected with uniform probability. In the continuous variant, the value associated with the new connection is randomly generated between 0.0 and 1.0 with uniform probability. Similarly, the offspring resulting from the remove connection mutation operator differs from the parent in having one less connection. The nodes to be disconnected are selected with uniform probability. The perturbation mutation operator applies Gaussian perturbations to the values associated with at most N/2 connections. The total number of perturbations may be less than N/2 if the individual being mutated has less than N/2 connections. Each value is perturbed following a Gaussian distribution having mean 0.0 and standard deviation 1.0. Any resulting value below 0.0 or above 1.0 is bounded to 0.0 or 1.0, respectively. Regardless of the GA variant, mutation is applied with a probability of 0.25. When a mutation is being applied, the specific mutation operator is selected with uniform probability from the available options (two in the discrete variant, and three in the continuous variant). In terms of parameters, a population of size 100 is used, with the evolutionary process being able to perform 100 generations. Parents are selected by applying a tournament of size 3. The survivor selection is elitist in the sense that it ensures that the best individual survives to the next generation. 4. Results and Discussion We made use of a large set of simulations on randomly generated datasets with the aim of assessing the characteristics of the state-of-the-art techniques for structure learning of BNs. 11 We generated data for both the case of discrete (2 values, i.e., 0 or 1) and continuous (we used 4 levels, i.e., 1, 2, 3, and 4) random variables. For each of them, we randomly generated both the structure (i.e, 100 weakly connected DAGs having 10 and 15 nodes) and the related parameters (we generated random values in (0, 1) for each entry of the conditional probability tables attached to the network structure) to build the simulated BNs. We also considered 3 levels of density of the networks, namely 0.4, 0.6, and 0.8 of the complete graph. For each of these scenarios, we randomly sampled from the BNs different datasets of sample sizes, parametrized based on the number of nodes. Specifically, for networks of 10 variables, we generated datasets of 10, 50, 100, and 500 samples, while for 15 variables, we considered datasets of 15, 75, 150, and 750 samples. Furthermore, we also considered noise in the samples as a set of random entries (both false positives and false negatives) in the dataset. To this extent, we considered noise free dataset (noise rate equals 0%) and dataset with an error rate of 10% and 20%. In total this led us to a total number of 14400 random datasets. For all of them, we considered both the constraint-based and the scorebased approaches to structural learning. From the former category of methods, we considered the PC algorithm [7] and the IAMB [10]. We recall that these methods return a partially directed graph, leaving undirected the arcs that are not unequivocally directable. In order to have a fair comparison with the score-based method which returns DAGs, we randomly resolved the ambiguities, by generating random solutions (i.e., DAGs) consistent with the statistical constraints by PC and IAMB (that is, we select a random direction for the undirected arcs). Moreover, among the score-based approaches, we consider 3 maximum likelihood scores, namely log-likelihood [11], BIC [12], and AIC [26] (for continuous variables we used the corresponding Gaussian likelihood scores). For all of them, we repeated the inference on each configuration by using HC, TS, and GA as search strategies. This led us to 11 different methods to be compared, for a total of 158400 independent experiments. To evaluate the obtained results, we considered both false positives, FP (i.e., arcs that are not in the generative BN but that are inferred by the algorithm) and false negatives, FN (i.e., arcs that are in the generative BN but that are not inferred by the algorithm). Also, with TP (true positives) being the arcs in the generative model and TN (true negatives) the arcs that are not in the generative model, for all the 12 experiments we considered the following metrics: P recision = Specif icity = TP TP + FP TN TN + FP Recall = Accuracy = TP TP + FN TP + TN TP + FP + TN + FN 4.1. Results of the Simulations In this Section, we comment on the results of our simulations. As anticipated, we computed precision, recall (sensitivity), and specificity, as well as accuracy and Hamming distance, to assess the performances and the underfit/overfit trade-off of the different approaches. Overall, from the obtained results, it is straightforward to notice that methods including more edges in the inferred networks are also more subject to errors in terms of accuracy, which may also resemble a bias of this metric that tends to penalize solutions with false positive edges rather than false negatives. On the other hand, since a typical goal of the problems involving the inference of BNs is the identification of novel relations (that is, proposing novel edges in the network), underfitting approaches could be more effective in terms of accuracy, but less useful in practice. With a more careful look, the first evidence we obtained from the simulations is that the two parameters with the highest impact on the inferred networks are the density and the number of nodes (i.e., network size). For this reason, we first focused our attention on these two parameters, and we analyzed how the different tested combinations of methods and scores behave. As shown in Figure 2, all the approaches seem to perform better when dealing with low-density networks, in fact, for almost all the methods the accuracy is higher for density equal to 0.4, while it is lower for density equal to 0.8. Since each edge of the network is a parameter that has to be “learned”, it is reasonable to think that, the more edges are present in the BN, the harder becomes the problem to be solved when learning it. Moreover, we can also observe that the results in terms of accuracy obtained for BN of discrete variables are slightly better than those achieved on the continuous ones. To this extent, the only outlier is the loglik score combined with Hill Climbing and with Tabu Search on datasets with continuous variables, for which the trend is the opposite, w.r.t. that of all the other approaches. In fact, in both these cases, the accuracy is higher on high-density datasets, and this is likely 13 Density aic−ga aic−hc aic−tb bic−ga bic−hc 0.4 0.6 bic−tb 0.8 iamb loglik−ga loglik−hc loglik−tb pc 1.00 ● ● ● ● ● ● 0.75 0.50 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● Accuracy ● ● 0.25 ● ● ● 1.00 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● discrete ● ● ● ● ● ● ● 0.25 ● ● ● ● ● ● ● ● 0.75 0.50 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● continuous ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● Figure 2: Boxplots showing the accuracy of the results obtained by the 11 tests approaches on the discrete and continuous datasets. due to a very high overfit of the approach. It is interesting to notice that Genetic Algorithms (combined with the loglik score) is less affected by this problem, and this trend will also be shown in the next analyses. In addition to the accuracy, we also computed the Hamming distance between the reconstructed solutions and the BNs used to generate the data, in order to quantify the errors of the inference process. This analysis showed that, besides the network density, also the number of nodes (parameters to be learned) influences the results, as reported in Figure 3. It is interesting to observe that, in the adopted experimental setup, we set the number of samples to be proportional to the number of nodes of the network, that is, for 10 nodes, in the same configurations we have a lower number of samples, compared to the ones for 15 nodes. From a statistical point of view alone, we would expect the problem to be easier when having more samples to build the BN, since this would lead to more statistical power, and, intuitively, should compensate for the fact that with 15 nodes we have more parameters to learn than the ones for the case of 10 nodes. While this may be the case (in fact we have similar accuracy for both 10 and 15 nodes), we also observe a constantly higher Hamming distance with more nodes. In fact, when dealing with more variables we observed a shift in the performance, that is, even when the density is low, we observe more errors manifesting with higher 14 Density aic−ga aic−hc aic−tb bic−ga bic−hc 0.4 0.6 bic−tb 0.8 iamb loglik−ga loglik−hc loglik−tb pc 300 continuous 10 200 100 0 300 continuous 15 200 Count 100 0 300 discrete 10 200 100 0 300 discrete 15 200 100 75 0 50 25 75 50 0 25 75 50 0 25 75 50 0 25 75 50 0 25 75 50 0 25 75 50 0 25 75 50 0 25 75 0 50 25 75 50 0 25 75 50 0 25 0 Hamming Distance Figure 3: Bar plots showing the Hamming distances of the solutions obtained by the 11 tested approaches, grouped by type of dataset (discrete and continuous) and number of nodes of the network (10 and 15), while colors represent densities (0.4, 0.6, and 0.8). values in terms of Hamming distance. This is due to the fact that, when increasing the number of variables, we also increase the complexity of the solutions. A further analysis we performed was devoted to assessing the impact of both overfit and underfit. As it is possible to observe from the plots in Figure 4 and Figure 5, we obtain two opposite behaviors, namely, the combinations of scores and search strategies show evident different trends in terms of sensitivity (recall ), specificity, and precision. In details, iamb and pc tend to underfit, since they both produce networks with consistently low density. While they achieve similar (high) results in terms of accuracy (see Figure 2), their trend toward underfit does not make them suited for the identification of novel edges, rather being more indicated for descriptive 15 aic−ga aic−hc aic−tb bic−ga bic−hc 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 Density 0.4 0.6 bic−tb 0.8 iamb loglik−ga loglik−hc loglik−tb pc 1.00 continuous 0.4 0.75 0.50 0.25 0.00 1.00 continuous 0.6 0.75 0.50 0.25 0.00 1.00 continuous 0.8 0.50 0.25 0.00 1.00 0.75 discrete 0.4 Recall (Sensitivity) 0.75 0.50 0.25 0.00 1.00 discrete 0.6 0.75 0.50 0.25 0.00 1.00 discrete 0.8 0.75 0.50 0.25 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.00 Precision Figure 4: Violin plots showing Precision and Recall of the solutions obtained by the 11 tested approaches, grouped by the type of dataset (discrete and continuous) and density values (0.4, 0.6, and 0.8). purposes. On the other hand, the loglik score, (mostly) independently from the adopted search technique, consistently overfits. Both these behaviors can be observed in the violin plots of Figure 4 and Figure 5: for each density, we can observe that iamb/pc results have very low recall values, while the distribution of the results of the loglik score is centered on higher values. The other two scores, i.e., AIC and BIC, present a better trade-off between 16 Density aic−ga aic−hc aic−tb bic−ga bic−hc 0.4 0.6 bic−tb 0.8 iamb loglik−ga loglik−hc loglik−tb pc 1.00 continuous 0.4 0.75 0.50 0.25 0.00 1.00 continuous 0.6 0.75 0.50 0.25 0.00 1.00 continuous 0.8 0.50 0.25 0.00 1.00 0.75 discrete 0.4 Sensitivity (Recall) 0.75 0.50 0.25 0.00 1.00 discrete 0.6 0.75 0.50 0.25 0.00 1.00 discrete 0.8 0.75 0.50 0.25 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 0.00 Specificity Figure 5: Violin plots showing Specificity and Sensitivity of the solutions obtained by the 11 tested approaches, grouped by the type of dataset (discrete and continuous) and density values (0.4, 0.6, and 0.8). overfit and underfit, with BIC being less affected by the overfit, while AIC reconstructing slightly denser networks. Once again, this trade-off between the two regularizators is well-known in the literature and points to AIC being more suited for predictions while BIC for descriptive purposes. Another relevant result of our analysis is the characterization of the performance of Genetic Algorithms in terms of sensitivity (recall ). Specifically, 17 it must be noticed that for all the three regularizators, Genetic Algorithms achieve similar results of both precision and specificity if compared with both Hill Climbing and Tabu Search, but in terms of sensitivity (recall ) it presents reduced overfit. In fact, as it is possible to observe in the plots of Figure 4 and Figure 5 for each score (i.e., loglik, AIC, and BIC), the sensitivity results of Genetic Algorithms are lower than that of both Hill Climbing and Tabu Search, highlighting the reduced impact of overfit. In summary, we can draw the following conclusions. • (i) dense networks are harder to learn, see Figure 2; • (ii) the number of nodes effects the complexity of the solutions, leading to higher Hamming distance (number of errors) even if with similar accuracy, see Figure 2 and Figure 3; • (iii) networks with continuous variables are harder to learn compared to the binary ones, see Figure 2; • (iv) iamb and pc algorithms tend to underfit, while loglik overfits, see Figure 4 and Figure 5; • (v) Genetic Algorithms tend to reduce underfit, see Figure 4 and Figure 5. We conclude the section by providing p−values by MannWhitney U test [27] in support of such claims in Table 4.1. The claim for greater and less values, i.e., accuracy, are performed with the one-tail test alternatives. The tests are performed on all the configurations of our simulations. 5. Conclusions Bayesian Networks are a widespread technique to model dependencies among random variables. A challenging problem when dealing with BNs is the one of learning their structures, i.e., the statistical dependencies in the data, which may sometime pose a serious limit to the reliability of the results. Despite their extensive use in a vast set of fields, to the best of our knowledge, a quantitative assessment of the performance of different stateof-the-art methods to learn the structure of BNs has never been performed. In this work, we aim at going in the direction of filling this gap and we presented a study of different state-of-the-art approaches for structural learning 18 Comparison Metric Test p−value Mean 1 Mean 2 density 0.4/0.8 accuracy greater < 2.2e − 16 0.68 0.55 nodes 10/15 accuracy less < 2.2e − 16 0.61 0.62 nodes 10/15 Hamming less < 2.2e − 16 17.40 39.54 discr./contin. accuracy greater < 2.2e − 16 0.62 0.61 iamb/hc loglik sensitivity less < 2.2e − 16 0.02 0.59 iamb/hc loglik specificity greater < 2.2e − 16 0.98 0.38 ga/hc sensitivity less < 2.2e − 16 0.24 0.32 ga/hc specificity greater < 2.2e − 16 0.79 0.71 Table 1: Summary of the major findings. The results of the MannWhitney U test [27] (one-tail test alternatives) in support of the results of our simulations are shown. The tests are performed on all the settings, with the comparisons as described in the first column of the table. We also show the considered metric, the adopted alternative of the one-tail test, the obtained p−value, and the mean of the two compared distributions of results. of Bayesian Networks on simulated data, considering both discrete and continuous variables. To this extent, we investigated the characteristics of 3 different likelihood score, combined with 3 commonly used search strategies schemes (namely, Genetic Algorithms, Hill Climbing, and Tabu Search), as well as 2 constraintbased techniques for the BN inference (i.e., iamb and pc algorithms). Our analysis showed the factors leading to higher effects on the performance, i.e., density, number of variables, and variable type (discrete vs continuous). As expected, these settings effect the number of parameters to be learned, hence complicating the optimization task. Furthermore, we also discussed the overit/underfit trade-off of the different tested techniques with the constraint-based approaches showing trends toward underfitting, and the loglik score showing high overfit. Interestingly, in all the configurations, Genetic Algorithms showed evidence of reducing the overfit, leading to denser structures. Overall, we place our work as a starting effort to better characterize the task of learning the structure of Bayesian Networks from data, which may lead in the future to a more effective application of this approach. 19 References References [1] S.-S. Leu, Q.-N. Bui, Leak prediction model for water distribution networks created using a bayesian network learning approach, Water Resources Management 30 (2016) 2719–2733. [2] F. Dondelinger, S. Lèbre, D. Husmeier, Non-homogeneous dynamic bayesian networks with bayesian regularization for inferring gene regulatory networks with gradually time-varying structure, Machine Learning 90 (2013) 191–230. [3] W. C. Young, A. E. Raftery, K. Y. Yeung, Fast bayesian inference for gene regulatory networks using scanbma, BMC Systems Biology 8 (2014) 47. [4] W. Buntine, A guide to the literature on learning probabilistic networks from data, IEEE Transactions on knowledge and data engineering 8 (1996) 195–210. [5] R. Daly, Q. Shen, S. Aitken, Learning bayesian networks: approaches and issues, The Knowledge Engineering Review 26 (2011) 99–157. [6] P. Larrañaga, H. Karshenas, C. Bielza, R. Santana, A review on evolutionary algorithms in bayesian network learning and inference tasks, Information Sciences 233 (2013) 109 – 125. [7] P. Spirtes, C. N. Glymour, R. Scheines, Causation, prediction, and search, MIT press, 2000. [8] D. M. Chickering, Learning bayesian networks is np-complete, in: Learning from data, Springer, 1996, pp. 121–130. [9] D. M. Chickering, D. Heckerman, C. Meek, Large-sample learning of bayesian networks is np-hard, Journal of Machine Learning Research 5 (2004) 1287–1330. [10] I. Tsamardinos, C. F. Aliferis, A. R. Statnikov, E. Statnikov, Algorithms for large scale markov blanket discovery., in: FLAIRS conference, volume 2, pp. 376–380. 20 [11] D. Koller, N. Friedman, Probabilistic graphical models: principles and techniques, MIT press, 2009. [12] G. Schwarz, et al., Estimating the dimension of a model, The annals of statistics 6 (1978) 461–464. [13] C.-R. Hwang, Simulated annealing: theory and applications, Acta Applicandae Mathematicae 12 (1988) 108–111. [14] F. Glover, Tabu search-part i, ORSA Journal on computing 1 (1989) 190–206. [15] M. Gendreau, J.-Y. Potvin, Handbook of metaheuristics, volume 2, Springer, 2010. [16] F. Glover, Tabu search: A tutorial, Interfaces 20 (1990) 74–94. [17] D. M. Chickering, Learning equivalence classes of bayesian-network structures, Journal of machine learning research 2 (2002) 445–498. [18] M. Teyssier, D. Koller, Ordering-based search: A simple and effective algorithm for learning bayesian networks, arXiv preprint arXiv:1207.1429 (2012). [19] D. E. Goldberg, J. H. Holland, Genetic algorithms and machine learning, Machine learning 3 (1988) 95–99. [20] C. Cotta, J. Muruzábal, Towards a more efficient evolutionary induction of bayesian networks, in: International Conference on Parallel Problem Solving from Nature, Springer, pp. 730–739. [21] S. Van Dijk, D. Thierens, L. C. Van Der Gaag, Building a ga from design principles for learning bayesian networks, in: Genetic and Evolutionary Computation Conference, Springer, pp. 886–897. [22] R. Etxeberria, P. Larrañaga, J. M. Picaza, Analysis of the behaviour of genetic algorithms when learning bayesian network structure from data, Pattern Recognition Letters 18 (1997) 1269–1273. [23] K.-J. Kim, J.-O. Yoo, S.-B. Cho, Robust inference of bayesian networks using speciated evolution and ensemble, in: International Symposium on Methodologies for Intelligent Systems, Springer, pp. 92–101. 21 [24] M. Mascherini, F. M. Stefanini, M-ga: A genetic algorithm to search for the best conditional gaussian bayesian network, in: International Conference on Computational Intelligence for Modelling, Control and Automation and International Conference on Intelligent Agents, Web Technologies and Internet Commerce (CIMCA-IAWTIC’06), volume 2, IEEE, pp. 61–67. [25] P. Larrañaga, M. Poza, Y. Yurramendi, R. H. Murga, C. M. H. Kuijpers, Structure learning of bayesian networks by genetic algorithms: A performance analysis of control parameters, IEEE transactions on pattern analysis and machine intelligence 18 (1996) 912–926. [26] H. Akaike, Information theory and an extension of the maximum likelihood principle, in: Selected Papers of Hirotugu Akaike, Springer, 1998, pp. 199–213. [27] H. B. Mann, D. R. Whitney, On a test of whether one of two random variables is stochastically larger than the other, The annals of mathematical statistics (1947) 50–60. 22
2cs.AI
Causal Linearizability: Compositionality for Partially Ordered Executions Simon Doherty∗1 , John Derrick†1 , Brijesh Dongol‡2 , and Heike Wehrheim§3 1 Department of Computer Science, University of Sheffield, UK Department of Computer Science, Brunel University London, UK 3 Department of Computer Science, University of Paderborn, Germany arXiv:1802.01866v1 [cs.LO] 6 Feb 2018 2 February 7, 2018 Abstract In the interleaving model of concurrency, where events are totally ordered, linearizability is compositional: the composition of two linearizable objects is guaranteed to be linearizable. However, linearizability is not compositional when events are only partially ordered, as in many weak-memory models that describe multicore memory systems. In this paper, we present causal linearizability, a correctness condition for concurrent objects implemented in weak-memory models. We abstract from the details of specific memory models by defining our condition using Lamport’s execution structures. We apply our condition to the C11 memory model, providing a correctness condition for C11 objects. We develop a proof method for verifying objects implemented in C11 and related models. Our method is an adaptation of simulation-based methods, but in contrast to other such methods, it does not require that the implementation totally order its events. We also show that causal linearizability reduces to linearizability in the totally ordered case. 1 Introduction Linearizability [18, 19] is a well-studied [12] condition that defines correctness of a concurrent object in terms of a sequential specification. It ensures that for each history of an implementation, there is a history of the specification such that (1) each thread makes the same method invocations in the same order, and (2) the order of non-overlapping operation calls is preserved. The condition however, critically depends on the existence of a total order of memory events (e.g., as guaranteed by sequential consistency (SC) [24]) to guarantee contextual refinement [15] and compositionality [18]. Unfortunately most modern systems can only guarantee a partial order of memory events, e.g., due to the effects of relaxed memory [1, 3, 4, 25]. It is known that a naive adaptation of linearizability to the partially ordered setting of weak memory is problematic from the perspective of contextual refinement [13]. In this paper, we propose a compositional generalisation of linearizability for partially ordered executions. Figs. 1 and 2 show two examples1 of multi-threaded programs on which weak memory model ∗ [email protected][email protected][email protected] § [email protected] 1 Example inspired by H.-J.Boehm talk at Dagstuhl, Nov. 2017 1 x = 0, y = 0 Process 2 Process 1 1 : x := 1; 1 : if(y = 1) 2 : y := 1; 2 : assert(x = 1); S = h i, S′ = h i Process 2 Process 1 1 : S.Push(1); 1 : if(S’.Pop = 1) 2 : S’.Push(1); 2 : assert(S.Pop = 1); Figure 1: Writing to shared variables Figure 2: Writing to shared stacks effects can be observed. Fig. 1 shows two threads writing to and reading from two shared variables x and y. Under SC, the assert in process 2 never fails: if y equals 1, x must also equal 1. However, in weak memory models like the C11 model [4, 21], this is not true: if the writes to x and y are relaxed, process 2 may observe the write to y, yet also observe the initial value x (missing the write to x by process 1). Such effects are not surprising to programmers familiar with memory models [4, 21]. However, programmer expectations for linearizable objects, even in a weak memory model like C11, are different: if the two stacks S and S′ in Fig. 2 are linearizable, the expectation is that the assert will never fail since linearizable objects are expected to be compositional [18, 19], i.e., any combination of linearizable objects must itself be linearizable. However, it is indeed possible for the two stacks to be linearizable (using the classical definition), yet for the program to generate an execution in which the assert fails. The issue here is that linearizability, when naively applied to a weak memory setting, allows too many operations to be considered “overlapping”. Our key contribution in this paper is the development of a new compositional notion of correctness, called causal linearizability, which is defined in terms of an execution structure [23], taking two different relations over operations into account: a “precedence order” (describing operations that are ordered in time) and a “communication relation”. Applied to Fig. 2, for a weak memory execution in which the assert fails, the execution restricted to stack S would not be causally linearizable in the first place. Namely, causal linearizability ensures enough precedence order in an execution to ensure that the method call S.Push(1) occurs before S.Pop, meaning S.Pop is forced to return 1. Execution structures are generic, and can be constructed for any weak memory execution that includes method invocation/response events. Our second contribution is one such scheme for mapping executions to execution structures based on the happens-before relation of the C11 memory model. Given method calls m1 and m2, we say m1 precedes m2 if the response of m1 happens before the invocation m2; we say m1 communicates with m2 if the invocation of m1 happens before the response of m2. Our third contribution is a new inductive simulation-style proof technique for verifying causal linearizability of weak memory implementations of concurrent objects, where the induction is over linear extensions of the happens-before relation. This is the first such proof method for weak memory, and one of the first that enables full verification, building on existing techniques for linearizability in SC [26, 12, 8]. Our fourth contribution is the application of this proof technique to causal linearizability of the Treiber Stack in the C11 memory model. We present our motivating example, the Treiber Stack in C11 in Section 2; describe the problem of compositionality and motivate our execution-structure based solution in Section 3; and formalise causal linearizability and prove compositionality in Section 4. Causal linearizability for C11 is presented in Section 5, and verification of the stack described in Section 6. 2 Treiber Stack in C11 The example we consider (see Algorithm 1) is the well-studied Treiber Stack [28], executing in a recent version of the C11 [22] memory model. In C11, commands may be annotated, e.g., R 2 Algorithm 1 Release-Acquire Treiber Stack 1: procedure Init 2: Top := null; 3: 4: 5: 6: 7: 8: 9: procedure Push(v) n := new(node) ; n.val := v ; repeat top :=A Top ; n.nxt := top ; until CASR (&Top, top, n) 10: 11: 12: 13: 14: 15: 16: 17: procedure Pop repeat repeat top :=A Top ; until top 6= null ; ntop := top.nxt ; until CASR (&Top, top, ntop) return top.val ; (for release) and A (for acquire), which introduces extra synchronisation, i.e., additional order over memory events [4, 21]. We assume racy read and write accesses that are not part of an annotated command are unordered or relaxed, i.e., we do not consider the effects of non-atomic operations [4]. Full details of the C11 memory model are deferred until Section 5. Due to weak memory effects, the events under consideration, including method invocation and response events are partially ordered. As we show in Section 3, it turns out that one cannot simply reapply the standard notion of linearizability in this weaker setting; compositionality demands that we use modified form: causal linearizability that additionally requires “communication” across conflicting operations. In Algorithm 1, all accesses to the shared variable Top are via an annotated command. Thus, any read of Top (lines 7, 13) reading from a write to Top (lines 9, 16) induces happens-before order from the write to the read. This order, it turns out, is enough to guarantee invariants that are in turn strong enough to guarantee2 causal linearizability of the Stack (see Section 6). Note that we modify the Treiber Stack so that the Pop operation blocks by spinning instead of returning empty. This is for good reason - it turns out that the standard Treiber Stack (with a non-blocking Pop operation) is not naturally compositional if the only available synchronisation is via release-acquire atomics (see Section 7). 3 Compositionality and execution structures This section describes the problems with compositionality for linearizability of concurrent objects under weak execution environments (e.g., relaxed memory) and motivates a generic solution using execution structures [23]. Notation. First we give some basic notation. Given a set X and a relation r ⊆ X ×X, we say r is a partial order iff it is reflexive, antisymmetric and transitive, and a strict order, iff it is irreflexive, antisymmetric and transitive. The support of r is denoted support (r) = dom(r) ∪ ran(r). A partial or strict order r is a total order iff either (a, b) ∈ r or (b, a) ∈ r for all a, b ∈ support (r). We typically use notation such as <, ≤, ≺, to denote orders, and write, for example, a < b instead of (a, b) ∈ <. The operations of an object are defined by a set of labels, Σ. For concurrent data structures, Σ = Inv × Res, where Inv and Res are sets of invocations and responses (including their input 2 Note that a successful CAS operation comprises both a read and a write access to Top, but we only require release synchronisation here. The corresponding acquire synchronisation is provided via the earlier read in the same operation. This synchronisation is propagated to the CAS by sequenced-before (aka program order), which, in C11, is included in happens-before (see Section 6 for details). 3 and return values), respectively. For example, for a stack S of naturals, the invocations are given by {Push(n) | n ∈ N} ∪ {Pop}, and the responses by N ∪ {⊥, empty}, and ΣS = {(Push(n), ⊥), (Pop, n) | n ∈ N} ∪ {(Pop, empty)} The standard notion of linearizability is defined for a concurrent history, which is a sequence (or total order) of invocation and response events of operations. Since operations are concurrent, an invocation of an operation may not be directly followed by its matching response, and hence, a history induces a partial order on operations. For linearizability, we focus on the real-time partial order (denoted ), where, for operations o and o′ , we say o o′ in a history iff the response of operation o happens before the invocation of operation ′ o in the history. A concurrent implementation of an object is linearizable if the real-time partial order ( ) for any history of the object can be extended to a total order that is legal for the object’s specification [18]. It turns out that linearizability in this setting is compositional [18, 19]: any history of a family of linearizable objects is itself guaranteed to be linearizable. Unfortunately, histories in modern executions contexts (e.g., due to relaxed memory or distributed computation) are only partially ordered since processes do not share a single global view of time. It might seem that this is unproblematic for linearizability and that the standard definition can be straightforwardly applied to this weaker setting. However, it turns out that a naive application fails to satisfy compositionality. To see this, consider the following example. Example 1. Consider a S and S’ that are both S’.Push happens before the invocation of S.Pop. history h, partially ordered by a happens-before relation, for two stacks initially empty (denoted by ⊥). Suppose that in h, the response of the invocation of S.Pop, and the response of S.Push happens before History h induces a partial order over these operations as shown below: (S’.Pop, 11) (S.Push(42), ⊥) (S.Pop, 42) (S’.Push(11), ⊥) If we restrict the execution above to S only, we can obtain a legal stack behaviour by linearizing (S.Push(42), ⊥) before (S.Pop, 42) without contradicting the real-time partial order in the diagram above. Similarly, the execution when restricted to S′ is linearizable. However, the full execution is not linearizable: ordering both pushes before both pops contradicts the induced real-time partial order ( above). A key contribution of this paper is the development of a correctness condition, causal linearizability, that recovers compositionality of concurrent objects with partially ordered histories. Our definition is based on two main insights. The first insight is that one must augment the real-time partial order with additional information about the underlying concurrent execution. In particular, one must introduce information about the communication when linearizing conflicting operations. Two operations conflict if they do not commute according to the sequential specification, e.g., for a stack data structure, Push and Pop are conflicting. Causal linearizability states that for any conflicting operations, say o and o′ , that are linearized in a particular order, say o o′ , there must exist some communication from o to o′ . We represent communication by a relation . 4 Example 2. Consider the partial order in Example 1. For both stacks S and S′ , the Push must be linearized before the Pop, and hence, we must additionally have communication edges as follows: (S’.Pop, 11) (S.Push(42), ⊥) (S.Pop, 42) (S’.Push(11), ⊥) The second insight is that the operations and the induced real-time partial order, , extended with a communication relation, , must form an execution structure [23], defined below. Definition 3 (Execution structure). Given that E is a finite3 set of events, and , ⊆ E ×E are relations over E, an execution structure is a tuple (E, , ) satisfying the following axioms for e1 , e2 , e3 ∈ E. A1 The relation is a strict order. A2 Whenever e1 e2 , then e1 A3 If e1 e2 e3 or e1 A4 If e1 e2 e3 e2 and ¬(e2 e2 e1 ). e3 , then e1 e4 , then e1 e3 . e4 . Example 4. Consider the execution depicted in Example 2. The requirements of an execution structure, in particular axiom A4 necessitate that we introduce additional real-time partial order edges as follows. (S’.Pop, 11) (S.Push(42), ⊥) (S.Pop, 42) (S’.Push(11), ⊥) For example, the edge (S.Pop, 42) (S.Push(42), ⊥) is induced by the combination of edges (S.Pop, 42) (S’.Push(11), ⊥) (S’.Pop, 11) (S.Push(42), ⊥) together with axiom A4. A consequence of these additional real-time partial order edges is that S (and symmetrically S’) is not linearizable since the edge (S.Pop, 42) (S.Push(42), ⊥) must be present even when restricting the structure to S only. Hence compositionality no longer fails. 4 Causal linearizability This section provides a formal definition of causal linearizability, and the compositionality theorem. We define sequential objects in Section 4.1, then define causal linearizability in Section 4.2. 4.1 Sequential specifications Causal linearizability defines correctness of a concurrent object with respect to a sequential object specification. Definition 5 (Sequential object). A sequential object is a pair (Σ, legal ), where legal ⊆ Σ∗ is a prefix-closed sequence of labels. 3 The original presentation allows for infinite execution structures, placing a well-foundedness condition on 5 . For example, in each legal sequence of a stack, each pop operation returns the value from the latest push operation that has not yet been popped, or empty if no such operation exists. For each sequential object, we define a conflict relation, # ⊆ Σ × Σ, based on the legal behaviours of the object. Two operations conflict if they do not commute in some legal history: o#o′ = ¬(∀k1 , k2 ∈ Σ∗ . k1 o o′ k2 ∈ legal ⇔ k1 o′ ok2 ∈ legal ) For a stack, we have, for instance, (Push(n), ⊥)#(Pop, n′ ) for any n, n′ , and for n 6= n′ , (Push(n), ⊥)#(Push(n′ ), ⊥). We now show (in Lemma 6 below) that the order of conflicting actions in a sequential history captures all the orders in that history that matter. This is formalized and proved using order relations derived from a legal sequence. However, since the same action can occur more than once in a legal sequence, we lift actions to events by enhancing each action with a unique tag and process identifier4 . Thus, given a sequential object S = (Σ, legal ) an S-event is a triple (g, p, a) where g is an event tag (taken from a set of tags G), p is a process (taken from a set of processes P ) and a is a label in Σ. We let Evt be the set of all S-events, and for a sequence k ∈ Evt ∗ , ev (k) be the set of events in k. The definitions of legality and conflict as well as sequential specifications can naturally be lifted to the level of events by virtue of the action labels. That is, a sequence of events is legal if the sequence of actions it induces is legal. In the following, we therefore use legal to refer to sequences of actions and sequences of events interchangeably. From a sequence k ∈ Evt ∗ we derive two relations on events, a temporal ordering ( k ) and a causal ordering (≺k ), where: e k e′ = ∃k1 , k2 , k3 ∈ Evt ∗ . k = k1 ek2 e′ k3 e ≺k e′ = e k e′ ∧ e#e′ Any sequential history that extends the causal order of a legal history is itself legal. We formalize this in the following lemma. Lemma 6 (Legal linear extensions). For a sequential object (Σ, legal ), if k ∈ legal and k ′ ∈ Evt ∗ , such that ev (k) = ev (k ′ ) and ≺k ⊆ k′ , then k ′ ∈ legal . Proof. We transform k into k ′ by reordering events in k to match the order k′ . We only reorder events that are not conflicting and thus, each step of the transformation preserves legality. This is sufficent to prove that k ′ ∈ legal . Let a mis-ordered pair be any pair of events e, e′ such that e k e′ but e′ k′ e. Note that in this case, we have e 6≺k e′ , because ≺k ⊆ k′ . Let e1 , e2 be a mis-ordered pair with minimal distance in k between the two elements (i.e., so that the number of events in k between e1 and e2 is minimal). We will reorder non-conflicting events in k so as to eliminate this mis-ordered pair, or reduce its size without creating a new mis-ordered pair. Once all mis-ordered pairs have been eliminated, we will have transformed k into k ′ , while preserving the legality of k. If e1 and e2 are adjacent in k, then because e1 6≺k e2 , we have ¬(e1 #e2 ), and thus we can reorder them to form a new sequence legal with fewer mis-ordered pairs. If e′1 #e2 then we would have e1 ≺k e′1 ≺k e2 and so e1 ≺k e2 , which is a contradiction. The same argument shows that there is no event between e′1 and e2 that conflicts with both. So let k ′′ be the sequence derived from k by reordering e′1 forward just past e2 . Note that because there were no conflicts, k ′′ ∈ legal. It remains to show that k ′′ has no mis-ordered pairs that were not already present in k. This could only happen if there was some e′2 such that e′1 S e′2 S e2 and e′1 k′ e′2 . Because e1 , e2 is the mis-ordered pair with minimal gap in k, it must be that e′2 k′ e2 , but then e′2 k′ e1 while e1 k e′2 . Thus, in this case, e1 , e′2 forms a smaller mis-ordered pair, contrary to hypothesis. 4 Strictly speaking, the process identifier is unimportant for Lemma 6, but we introduce it here to simplify compatibility with the rest of this paper. 6 As we shall see, this lemma is critical in the proof of our compositionality result, Theorem 10. 4.2 Concurrent executions and causal linearizability We now define causal linearizability. For simplicity, we assume complete concurrent executions, i.e., executions in which every invoked operation has returned. It is straightforward to extend these notions to cope with incomplete executions. In general, executions of concurrent processes might invoke operations on several concurrent objects. To capture this, we define a notion of object family, which represents a composition of sequential objects, indexed by some set X. Definition 7 (Object family). Suppose X is an index set. For each x ∈ X, assume a sequential object Sx = (Σx , legal x ) such that Σx is disjoint from Σy for all y ∈ X\{x}. We define the object family over X, SX = (ΣX , legal X ) by: S • ΣX = x Σx • legal X = {k ∈ Σ∗X | ∀x. k ⇂ x ∈ legal x }, where k ⇂ x is the sequence k restricted to actions of object x. Thus the set legal X contains exactly the interleavings of elements of each of the legal x . N.B., the pairwise disjointness requirement on Σx can be readily achieved by attaching the object identifier x to each operation in Σx . An execution structure (E, , ) is a complete S-execution structure iff all events in E are S-events. Definition 8 (Causal linearizability). Let SX = (ΣX , legal X ) be an object family. A complete SX -execution structure (E, , ) is causally linearizable if there exists a k ∈ legal X with ev (k) = E such that ⊆ k , and ⊇ ≺k . Condition ⊆ k ensures that the real-time (partial) order of operations is consistent with the chosen k, while condition ⊇ ≺k captures the idea that the causal ordering in k (i.e., the ordering between conflicting actions) requires a communication in the concurrent execution. Causal linearizability for single objects is a special case of Definition 8, where the family is a singleton set. To establish compositionality, we must first define an object family’s causal ordering. Note that because an object family’s legal set is just an interleaving of the underlying object’s legal sets, operations from distinct objects can always be reordered, and therefore they never conflict. Thus, we have the following lemma. Lemma S 9. Suppose SX = (ΣX , legal X ) is an object family. For any k ∈ legal X , we have ≺k = x∈X ≺k ⇂ x . For an object family SX = (ΣX , legal X ) and x ∈ X, we let Ex be the SX -execution structure E restricted to Σx . Theorem 10 (Compositionality). Suppose SX = (ΣX , legal X ) is an object family over X, and let E = (E, , ) be a complete SX -execution structure. Then, Ex is causally linearizable w.r.t. Sx for all x ∈ X iff E is causally linearizable w.r.t. SX . Proof. The implication from right to left is straightforward. For the other direction, for each x ∈ X, let kx be the legal sequential execution witnessing causal linearizability of Ex . Let be the irreflexive transitive relation defined by [ =( ∪ ≺kx )+ x∈X 7 We show that is acyclic, and is therefore a strict partial order. Because is a partial order, there is some total order ⊇ , where m ∈ legal . This total order defines a sequence of m X labels of SX . We prove that this sequence witnesses the causal linearizability of E. By definition, ⊆ m for all x, and so by Lemma 6, we have m ⇂ x ∈ legal x (where m ⇂ x we have ≺kx ⊆ is the restriction of m to the events of object x). Furthermore, 1. ⊆ 2. ⊇ ≺kx follows from causal linearizability of Ex , and hence m follows from ⊆ ⊆ m, ⊇ S x∈X ≺kx , as required. Thus, E is causally linearizable, as required. We show that is acyclic by contradiction. Suppose contains a cycle. Pick P = e1 e2 ... en to be the minimal cycle. Since is acyclic, and each ≺x is acyclic, the cycle P must contain accesses to least two different objects. Without loss of generality, assume e1 and e2 access different objects, i.e., e1 ∈ Ey , e2 ∈ Ez for some y 6= z. Since each ≺x only orders e2 . Observe that P must be of length greater than two, i.e., elements of Ex , we must have e1 it cannot be of the form e1 e2 e1 since we would then have e1 e2 e1 , which contradicts the assumption that is a partial order. Hence P must contain a third (distinct) element e3 . Note that e2 6 e3 , because otherwise we could shorten the cycle P , using the transitivity of . Thus e2 , e3 are from the same object z and e2 ≺kz e3 . By the causal linearizability of Ez , we must have e2 e3 . Let e be the element of P following e4 (so possibly e = e1 ). Note that e3 6≺kz e, because otherwise we could shorten e, so we have the cycle P , using the transitivity of ≺kz . Thus, e3 e1 e2 e3 By the execution structure axiom A4, we have e1 ··· e1 contradicting minimality of P . 4.3 e e, and hence there exists a cycle e1 e Relationship with classical linearizability In this section, we show that classical linearizablity, which is defined for totally ordered histories of invocations (events of type Inv ) and responses (events of type Res), degenerates to causal linearizability. As in the previous section, for simplicity, we assume the histories under consideration are complete; extensions to cope with incomplete histories are straightforward. First, we describe a method, inspired by the execution structure constructions given by Lamport [23], for constructing execution structures for any well-formed partially ordered history. We let Hist = (Inv ∪ Res) × (Inv ∪ Res) denote the type of all histories. A history is well-formed if it is a partial order and the history restricted to each process is a total order of invocations followed by their matching response. The set of all matching pairs of invocations and responses in a history h is given by mp(h). A history is sequential iff it is totally ordered and each invocation is immediately followed by its matching response. Note that a history could be totally ordered, but not sequential (as is the case for the concurrent histories considered under SC [19, 18]). Definition 11. Let h ⊆ Hist be a well-formed (partially ordered) history. We say exec(h) = (E, , ) is the execution structure corresponding to h if E = mp(h) = {((i1 , r1 ), (i2 , r2 )) ∈ E × E | (r1 , i2 ) ∈ h} = {((i1 , r1 ), (i2 , r2 )) ∈ E × E | (i1 , r2 ) ∈ h} 8 We now work towards the standard definition of linearizability. Recall that a sequential object (see Definition 5) is defined in terms of sequences of labels of type Σ∗ , where Σ = Inv × Res, whereas sequential histories are of type Hist . Thus, we define a function γ : Hist → Σ∗ such that for each pair (i, r), (i′ , r′ ) ∈ mp(hs) of sequential history hs we have (r, i′ ) ∈ hs iff (i, r) γ(hs) (i′ , r′ ). Thus, the order of operations in hs and γ(hs) are identical. A complete history h is linearizable w.r.t. a (family of) sequential object(s) S = (Σ, legal ) iff there exists a sequential history hs such that γ(hs) ∈ legal , for each process p, h ⇂ p = hs ⇂ p and h ⊆ hs [18]. Theorem 12. Suppose h is a totally ordered complete history and S a (family of ) sequential object(s). Then h is linearizable w.r.t S iff exec(h) is causally linearizable w.r.t. S. 5 Causal linearizability of C11 implementations We now introduce the C11 memory model, where we adapt the programming-language oriented presentation of C11 [21, 10], but we ignore various features of C11 not needed for our discussion, including non-atomic operations and fences. The C11 memory-model. Let L be a set of locations (ranged over by x, y), let V be a set of values (ranged over by u, v). Our model employs a set of memory events, which can be partitioned into read events, R, write events, W , and update events, U . Moreover, let Mod = W ∪ U be the set of events that modify a location, and Qry = R ∪ U be the set of events that query a location. For any memory event e, let loc(e) be the event’s location, and let ann(e) be the event’s annotation. Let Loc(x) = {e | loc(e) = x}. For any query event let rval(e) be the value read; and for any modification event let wval(e) be the value written. An event may carry a synchronisation annotation, which may either be a release, R, or an acquire, A, annotation. A C11 execution (not to be confused with an execution structure) is a tuple D = (D, sb, rf , mo) where D is a set of events, and sb, rf , mo ⊆ D × D define the sequence-before, reads-from and modification order relations, respectively. We say a C11 execution is valid when it satisfies: (V1) sb is a strict order, such that, for each process p, the projection of sb onto p is a total order; (V2) for all (w, r) ∈ rf , loc(w) = loc(r) and wval(w) = rval(r); (V3) for all r ∈ D ∩ Qry, there exists some w ∈ D ∩ Mod such that (w, r) ∈ rf ; (V4) for all (w, w′ ) ∈ mo, loc(w) = loc(w′ ); and (V5) for all w, w′ ∈ W such that loc(w) = loc(w′ ), (w, w′ ) ∈ mo or (w′ , w) ∈ mo. Other relations can be derived from these basic relations. For example, assuming DR and DA denote the sets of events with release and acquire annotations, respectively, the synchronises-with relation, sw = rf ∩ (DR × DA ), creates interthread ordering guarantees based on synchronisation annotations. The from-read relation, fr = (rf −1 ; mo) \ Id, relates each query to the events in modification order after the modification that it read from. Our final derived relation is the happens before relation hb = (sb ∪ sw )+ , which formalises causality. We say that a C11 execution is consistent if (C1) hb is acyclic, and (C2) hb; (mo ∪ rf ∪ fr ) is irreflexive. 9 Method invocations and responses. So far, the events apearing in our memory model are standard. Our goal is to model algorithms such as the Treiber stack. Thus, we add method events to the standard model, namely, invocations, Inv , and responses, Res. Unlike weak memory at the processor architecture level, where program order may not be preserved [13], program order in C11 is consistent with happens-before order, and hence, these can be introduced here in a straightforward manner. The only additional requirement is that validity also requires (V6) sb for each process projected restricted Inv ∪ Res must be alternating sequence of invocations and matching responses, starting with an invocation. Dynamic memory. To describe the behaviour of algorithms, such as the Treiber Stack, we must define reads and writes to higher-level structures. To this end, we develop a simple theory of references to objects, the fields of those objects and memory allocations for the object. We let F be the set of all fields and A be the set of all memory allocation events, which is an event of the form A(l) for a location l. We let . : L × F → L be the function that returns a location for a given location, field pair. We use infix notation x.f for .(x, f ), where x ∈ L and f ∈ F . We then introduce three additional constraints: (A1) for every a, a′ ∈ E ∩ A, if loc(a) = loc(a′ ) then a = a′ ; and (A2) if l.f = l′ .f ′ then l = l′ and f = f ′ . (A3) for all locations l and fields f there are no allocations of the form A(l.f ). From C11 executions to execution structures. A C11 execution with method invocations and responses naturally gives rise to an execution structure. First, for a C11 execution F, let the history of D, denoted hist(D) be the happens-before relation for D restricted to the invocation and response events. By (V6), hist(D) is a well-formed history. Thus, we can apply the construction defined in Section 4.3 to build an execution structure exec(hist(D)). Definition 13. We say that a C11 execution D is causally linearizable w.r.t a sequential object if exec(hist(D)) is. We can now state a compositionality result for a C11 execution D of an object family X. The property follows from Theorem 10 and the fact that for any object x ∈ X, exec(hist(Dx )) = exec(hist(D))x , where Dx is D restricted to events of object x. Note that Dx contains all events of x, i.e., all invocations, responses and low-level memory operations of x. Corollary 14 (Compositionality for C11 executions). Suppose that SX = (ΣX , legal X ) is an object family over X, and let D be an execution. Then, Dx is causally atomic w.r.t. Sx for all x ∈ X iff D is causally atomic w.r.t. SX . Finally, note that because the sb relation is included in hb, hist(D) includes program order on the invocations and responses of D. 6 Verification We now describe an operational method for proving that a given C11 execution is causally linearizable w.r.t a given sequential object. Accordingly, we give a state-based, operational model of a sequential object that generates legal sequences of labels (Definition 5), then present a simulation-based proof rule for causal linearizability (Section 6.1). Then, we illustrate our technique on the Treiber Stack (Section 6.2). 6.1 A simulation relation over happens-before An operational sequential object is a tuple (Γ, init , τ ) where: Γ is a set of states; init ∈ Γ is the initial state and τ : Γ × H × Inv → 7 Γ × H, where H = (Inv × Res)∗ , is a partial update function 10 that applies an invocation to a state and a history, returning the resulting state and updated history. We require that for s ∈ Γ, h ∈ H and i ∈ Inv , there exists some r ∈ Res, such that τ (s, h, i) = ( , h · h(i, r)i), where we use · for sequence concatenation. This response r is the object’s response to the invocation i. Example 15 (Operational sequential stack). A stack containing natural numbers can be represented as an operational sequential object in the following way. Let Γ = N∗ , init = h i and define the update function as follows τ (s, h, Push(n)) = (n · s, h · h(Push(n), ⊥)i) τ (n · s, h, Pop) = (s, h · h(Pop, n)i) for n ∈ N and s ∈ Γ. Note that assuming i is a stack invocation (as per Section 3), τ (s, i) is defined iff s 6= h i or i 6= Pop. Given an operational sequential object S = (Γ, init , τ ), it is easy to construct a corresponding sequential object (in the sense of Definition 5). Let ΣS = Inv × Res and let legal S be the set of histories returned by τ . Thus (ΣS , legal S ) is a sequential object, and our method verifies causal linearizability w.r.t that object. For the remainder of this section, fix a C11 execution D = (D, sb, rf , mo), and an operational sequential object S = (Γ, init , τ ). We describe a method for proving that D is causally linearizable w.r.t S. Our proof method is an induction on the length of some linear extension of D’s hb order. The proof proceeds by remembering the set Z ⊆ D of events that have already been considered by the induction, i.e., Z defines the current stage of the induction. The set Z is assumed to be downclosed with respect to hb, i.e., if z ∈ Z and (z ′ , z) ∈ hb, then z ′ ∈ Z. At each stage of the induction, we add an arbitrary e ∈ / Z to Z, where e’s hb predecessors are already in Z (i.e., the set Z ∪ {e} is also downclosed w.r.t. hb). Correctness of each inductive step is formalised by a simulation relation, ρ, relating the events in the current state, Z, to a state of the operational sequential object. Each inductive step of the implementation must match a “move” of the sequential object, i.e., be a stutter step, or a state update as given by the update function of the sequential object. Moreover, assuming that ρ holds for Z (before each inductive step), ρ must hold after the step (i.e., for Z ∪ {e}). Following the existing verification literature [12], we refer to events corresponding to nonstuttering steps as linearization points: the points where the high-level operation appears to take effect. The verifier must define a function lp : D ∩ Inv → D to determine the memory event that linearizes the given invocation, and this function must satisfy certain constraints with respect to the simulation relation ρ, as described in Definition 16, below. For each low-level operation, we must also determine the invocation and response to which it belongs. Thus we also define a function µ : D → D ∩ Inv that maps each event in D to the invocation responsible for producing e, and a function and ν : D → D ∩ Res that that maps e to the response produced by e’s invocation. More formally, µ(e) is the latest invocation in sb-order prior to e, and ν(e) is the earliest response in sb-order after e. Thus, we obtain the following definition. Definition 16 (hb-simulation). Suppose D = (D, sb, rf , mo) is an execution and S = (Γ, init , τ ) an operational sequential object. An hb-simulation is a relation ρ ⊆ 2D × (Γ × H) such that: 1. ρ(∅, (init , h i)), and (initialisation) 2. for all Z ⊆ D, and events e ∈ D\Z such that Z ∪{e} is down-closed w.r.t D’s happens-before order, if ρ(Z, (s, h)) then (a) if e 6= lp(µ(e)) then ρ(Z ∪ {e}, (s, h)), 11 (stutter step) (b) if e = lp(µ(e)) provided i = µ(e), h′ = h · h(i, r)i, and τ (s, h, i) = (s′ , h′ ), then (linearization step) i. ρ(Z ∪ {e}, (s′ , h′ )), and ii. ν(e) = r, and iii. for all operations (i′ , r′ ) in h, if (i′ , r′ ) ≺h′ (i, r) then (lp(i′ ), e) ∈ hb. The initialisation is straightforward, while the two inductive steps consider a new e for inclusion in Z following hb order. If e is a stutter step, we only have to prove that ρ is preserved by adding e to Z. If e is a linearization step (that is, if e = lp(µ(e))), then there are three obligations: prove that ρ is preserved (2(b)i); prove that the response of the high-level operation matches that returned by the sequential object (2(b)ii); and prove that whenever some operation that has already been linearized is causally prior to the newly linearized operation, then that operation’s linearization point is hb-prior to the new event e (2(b)iii). Theorem 17 (Soundness of hb-simulation). If ρ is an hb-simulation for a C11 execution D, then D is causally linearizable. Proof. The proof below uses a formulation of an operational sequential object where τ that does not maintain a history. Fix the operational sequential object S = (Γ, init , τ ). Fix the execution D, and let ≤E be any linear extension of D’s hb relation. Assume that lp is the linearization function and ρ is the simulation relation. We perform an induction on the indexes of ≤E . Let en be the nth event in ≤E order, so we are indexing from 0. Let Zn be the set of events strictly below the nth index. Thus, Zn = {em | m < n} Note that Z0 = ∅ and Zn+1 = Zn ∪ {en }. We define a function rep : {n | n < | ≤E |} → Γ recursively as follows: rep(0) = init (1) rep(n + 1) = rep(n) rep(n + 1) = π1 (τ (rep(n), µ(en )) when lp(µ(en )) 6= en when lp(µ(en )) = en (2) (3) By induction, we have ρ(Zn , rep(n)) for all n < | ≤E |. • Because ρ(Z0 , rep(0)) = ρ(∅, init ), Proposition 1 ensures that ρ(Z0 , rep(0)). • Assume ρ(Zn , rep(n)) and lp(µ(en )) 6= en . Then ρ(Zn+1 , rep(n+1)) = ρ(Zn ∪{en }, rep(n)), and thus Property 2a ensures that ρ(Zn+1 , rep(n + 1)). • Assume ρ(Zn , rep(n)) and lp(µ(en )) = en . Then ρ(Zn+1 , rep(n + 1)) = ρ(Zn ∪ {en }, π1 (τ (rep(n), µ(en ))), and thus Property 2(b)i ensures that ρ(Zn+1 , rep(n + 1)). We turn now to defining k, the legal sequence we need to witness causal linearizability of D. k0 = hi kn+1 = kn rep(n + 1) = kn · h(µ(e), ν(e))i 12 when lp(µ(en )) 6= en (4) (5) when lp(µ(en )) = en (6) It is easy to see that this is a legal history, and that (kn , rep(n)) is a move. We need to show that ≤H ⊆ k . Consider a response r and invocation i such that (r, i) ∈ hb. Ley i′ be the invocation of r, and let r′ be the response of i.. Because µ(lp(i)) = i, we have {(lp(i′ ), r), (i, lp(i))} ∈ sb ⊆ hb, and thus (lp(i′ ), lp(i)) ∈ hb and so lp(i′ ) appears at an earlier point in ≤E than lp(i), and therefore (i′ , r) k (i, r′ ), as required. Finally, we must show that ≺k ⊆ D . This is a simple induction on the length of k, with the hypothesis that, for all operations (i, r), (i′ , r′ ) in k, if (i, r) ≺k (i′ , r′ ) then (lp(i), lp(i′ ) ∈ hb. At each step we apply Property 2(b)iii. Thus, for each existing operation (i, r) and new operation (i′ , r′ ), we have (i, r) ≺k (i′ , r′ ) =⇒ (lp(i), lp(i′) ∈ hb immediately. On the other hand, (i′ , r′ ) ≺k (i, r) is impossible, because (i′ , r′ ) k (i, r) is false. This completes oour proof. 6.2 Case-study: the Treiber Stack We now outline an hb-simulation relation ρ for the Treiber stack. We fix some arbitrary C11 execution D = (D, sb, rf , mo) that contains an instance of the Treiber stack. That is, the invocations in D are the stack invocations, and the responses are the stack responses (as given in Section 3). Furthermore, the low-level memory operations between these invocations and responses are generated by executions of the operations of the Treiber stack (Algorithm 1). The main component of our simulation relation guarantees correctness of the data representation, i.e., the sequence of values formed by following next pointers starting with &T op forms an appropriate stack, and we focus on this aspect of the relation. As is typical with verifications of shared-memory algorithms, there are various other properties that would need to be considered in a full proof. In a sequentially consistent setting, the data representation can easily be obtained from the state (which maps locations to values). However, for C11 executions calculating the data representation requires a bit more work. In what follows, we define various functions that depend on a set Z of events, representing the current stage of the induction. We define the latest write in Z to a location x as latestZ (x) = max(mo ⇂(Z ∩ Loc(x))) and the current value of a location x in some set Z as cvalZ (x) = wval(latestZ (x)), which is the value written by the last write to x in modification order. It is now straightforward to construct the sequence of values corresponding to a location as stackOf Z (x) = v · stackOf Z (y), where v = cvalZ (x.val) and y = cvalZ (x.nxt). Now, assuming that (s, h) is a state of the operational sequential stack, our simulation requires: stackOf Z (cvalZ (&T op)) = s (7) Further, we require that all modifications of &T op are totally ordered by hb: ∀m, m′ ∈ Z ∩ M od(&T op). (m, m′ ) ∈ hb ∨ (m′ , m) ∈ hb (8) to ensure that any new read considered by the induction sees the most recent version of &T op. The linearization function lp for the Treiber stack is completely standard: each operation is linearized at the unique update operation generated by the unique successful CAS at line 9 (for pushes) or line 16 (for pops). In what follows, we illustrate how to verify the proof obligations given in Definition 16, for the case where the new event e is a linearization point. Let e be an update operation that is generated by the CAS at line 9 of the push operation in Algorithm 1. The first step is to prove that every modification of &T op in Z is happens-before the update event e. Formally, ∀m ∈ Z ∩ Mod ∩ Loc(&T op). (m, e) ∈ hb 13 (9) (S.Push(1), ⊥) (S’.Pop, empty) (S.Push(1), ⊥) (S’.Push(2), ⊥) (S.Pop, empty) (S’.Push, ⊥) Figure 3: Read-only operations without communication (not compositional) (S’.Pop, empty) (S.Pop, empty) Figure 4: Read-only operations with communication (compositional) Proving this formally is somewhat involved, but the essential reason is as follows. Note that there is an acquiring read r to &T op executed at line 7 of e’s operation and sb-prior to e. r reads from some releasing update u. Thus, by Property 8, and the fact the hb contains sb, e is happens after u, and all prior updates. If there were some update u′ of &T op such that (u′ , e) ∈ / hb, then (u′ , u) ∈ / hb so by Property 8, (u, u′ ) ∈ hb. But it can be shown in this case that the CAS that generated e could not have succeeded, because u′ constitutes an update intervening between r and e. Therefore, there can be no such u′ . Property 9 makes it straightforward to verify that Condition 2(b)iii of Definition 16 is satisfed. To see this, note that every linearization point of every operation is a modification of &T op. Thus, if (i′ , r′ ) is some operation such that lp(i′ ) ∈ Z (so that this operation has already been linearized) then (lp(i′ ), e) ∈ hb. Using Property 9 it is easy to see that both Property 7 and Property 8 are preserved. We show by contradiction that latestZ ′ (&T op) = e. Otherwise, we have (e, latestZ ′ (&T op)) ∈ mo. / hb, but latestZ ′ (&T op) is a modification operation, so this Therefore (latestZ ′ (&T op), e) ∈ contradicts Property 9. It follows from latestZ ′ (&T op) = e that stackOf (cvalZ ′ ) = stackOf (wval(e)). Given this, it is straightforward to show that Property 7 is preserved. This step of the proof relies on certain simple properties of push operations. Specifically, we need to show that the current value of the val field of the node being added to the stack (formally, cvalZ ((wval(e)).nxt)) is the value passed to the push operation; and that the current value of the nxt field (formally, cvalZ ((wval(e)).nxt)) is the current value of &T op when the successful CAS occurs. These properties can be proved using the model of dynamic memory given in Section 5. 7 A synchronisation pitfall We now describe an important observation regarding failure of compositionality of read-only operations caused by weak memory effects. The issue can be explained using our abstract notion of an execution structure, however, a solution to the problem is not naturally available in C11 with only release-acquire annotations. Consider the Treiber Stack in Algorithm 1 that returns empty instead of spinning; namely where the inner loop (lines 12-14) is replaced by code block “top :=A Top ; if top = null then return empty”. Such an implementation could produce executions such as the one in Fig. 3 which, like the examples in Section 3, is not compositional. Recovering compositionality requires one to introduce additional communication edges as shown in Fig. 4. In the C11 memory model, these correspond to “from-read” anti-dependencies from a read to a write overwriting the value read. However, release-acquire synchronisation is not adequate for promoting from-read order in the memory to happens-before. One fix would be to disallow read-only operations, e.g., by introducing a release-acquire CAS operation on a special variable that always succeeds at the start of each operation. However, such a fix is somewhat unnatural. Another would be to use C11’s SC annotations, which can induce 14 synchronisation across from-read edges. However, the precise meaning of these annotations is still a topic of active research [22, 6]. 8 Conclusion and related work We have presented causal linearizability, a new correctness condition for objects implemented in weak-memory models, that generalises linearizability and addresses the important problem of compositionality. Our condition is not tied to a particular memory model, but can be readily applied to memory models, such as C11, that feature a happens-before relation. We have presented a proof method for verifying causal linearizability. We emphasise that our proof method can be applied directly to a standard axiomatic memory model. Unlike other recent proposals [11, 20], we model C11’s relaxed accesses without needing to prohibit their problematic dependency cycles (so called “load-buffering” cycles). Although causal linearizability has been presented as a condition for concurrent objects, we believe it is straightforward to extend this condition to cover, for example, transactional memory. We intend to develop our approach into a framework in which the behaviour of programs that mix transactional memory, concurrent objects and primitive weak-memory operations can be precisely described in a compositional fashion. Causal linearizability is closely related to causal hb-linearizability defined in [13], which is a causal relaxation of linearizability that uses specifications strengthened with a happens-before relation. The compositionality result there requires that either a specification is commuting or that a client is unobstructive (does not introduce too much synchronisation). Our result is more general as we place no such restriction on the object or the client. Others [9] define a correctness condition, also called causal linearizabilty, that is only compositional when the client satisfies certain constraints; in contrast, we achieve full decoupling. Furthermore, that condition is only defined when the underlying memory model is given operationally, rather than axiomatically like C11. Early attempts, targetting TSO architectures, used totally ordered histories but allowed the response of an operation to be moved to a corresponding “flush” event [16, 7, 27, 14]. Others have considered the effects of linearizability in the context of a client abstraction. This includes a correctness condition for C11 that is strictly stronger than linearizability under SC [5]. Although we have applied causal linearizability to C11, causal linearizability itself is more general as it can be applied to any weak memory model with a happens-before relation. Causal consistency [2] is a related condition, aimed at shared-memory and data-stores, which has no notion of real-time order and is not compositional. References [1] Sarita V. Adve and Kourosh Gharachorloo. Shared memory consistency models: A tutorial. IEEE Computer, 29(12):66–76, 1996. [2] Mustaque Ahamad, Gil Neiger, James E. Burns, Prince Kohli, and Phillip W. Hutto. Causal memory: definitions, implementation, and programming. Distributed Computing, 9(1):37– 49, Mar 1995. [3] J. Alglave, L. Maranget, and M. Tautschnig. Herding cats: Modelling, simulation, testing, and data mining for weak memory. ACM Trans. Program. Lang. Syst., 36(2):7:1–7:74, 2014. [4] M. Batty, S. Owens, S. Sarkar, P. Sewell, and T. Weber. Mathematizing C++ concurrency. In Thomas Ball and Mooly Sagiv, editors, POPL, pages 55–66. ACM, 2011. 15 [5] Mark Batty, Mike Dodds, and Alexey Gotsman. Library abstraction for C/C++ concurrency. In Roberto Giacobazzi and Radhia Cousot, editors, POPL, pages 235–248. ACM, 2013. [6] Mark Batty, Alastair F. Donaldson, and John Wickerson. Overhauling SC atomics in C11 and opencl. In POPL, pages 634–648. ACM, 2016. [7] Sebastian Burckhardt, Alexey Gotsman, Madanlal Musuvathi, and Hongseok Yang. Concurrent library correctness on the TSO memory model. In Helmut Seidl, editor, ESOP, volume 7211 of Lecture Notes in Computer Science, pages 87–107. Springer, 2012. [8] S. Doherty, L. Groves, V. Luchangco, and M. Moir. Formal verification of a practical lockfree queue algorithm. In FORTE, volume 3235 of Lecture Notes in Computer Science, pages 97–114. Springer, 2004. [9] Simon Doherty and John Derrick. Linearizability and causality. In SEFM, volume 9763 of Lecture Notes in Computer Science, pages 45–60. Springer, 2016. [10] Marko Doko and Viktor Vafeiadis. A program logic for C11 memory fences. In VMCAI, volume 9583 of Lecture Notes in Computer Science, pages 413–430. Springer, 2016. [11] Marko Doko and Viktor Vafeiadis. Tackling real-life relaxed concurrency with FSL++. In ESOP, pages 448–475, 2017. [12] B. Dongol and J. Derrick. Verifying linearisability: A comparative survey. ACM Comput. Surv., 48(2):19:1–19:43, 2015. [13] B. Dongol, R. Jagadeesan, J. Riely, and A. Armstrong. On abstraction and compositionality for weak-memory linearisability. In VMCAI, volume 10747 of Lecture Notes in Computer Science, pages 183–204. Springer, 2018. [14] Brijesh Dongol, John Derrick, and Graeme Smith. Reasoning algebraically about refinement on TSO architectures. In ICTAC, volume 8687 of Lecture Notes in Computer Science, pages 151–168. Springer, 2014. [15] Ivana Filipovic, Peter W. O’Hearn, Noam Rinetzky, and Hongseok Yang. Abstraction for concurrent objects. Theor. Comput. Sci., 411(51-52):4379–4398, 2010. [16] Alexey Gotsman, Madanlal Musuvathi, and Hongseok Yang. Show no weakness: Sequentially consistent specifications of TSO libraries. In Marcos K. Aguilera, editor, DISC, volume 7611 of Lecture Notes in Computer Science, pages 31–45. Springer, 2012. [17] Rachid Guerraoui and Michal Kapalka. On the correctness of transactional memory. In Siddhartha Chatterjee and Michael L. Scott, editors, PPoPP, pages 175–184. ACM, 2008. [18] M. Herlihy and J. M. Wing. Linearizability: A correctness condition for concurrent objects. ACM TOPLAS, 12(3):463–492, 1990. [19] Maurice Herlihy and Nir Shavit. The art of multiprocessor programming. Morgan Kaufmann, 2008. [20] Jan-Oliver Kaiser, Hoang-Hai Dang, Derek Dreyer, Ori Lahav, and Viktor Vafeiadis. Strong logic for weak memory: Reasoning about release-acquire consistency in iris. In ECOOP, pages 17:1–17:29, 2017. 16 [21] Ori Lahav, Nick Giannarakis, and Viktor Vafeiadis. Taming release-acquire consistency. In Rastislav Bodı́k and Rupak Majumdar, editors, POPL, pages 649–662. ACM, 2016. [22] Ori Lahav, Viktor Vafeiadis, Jeehoon Kang, Chung-Kil Hur, and Derek Dreyer. Repairing sequential consistency in C/C++11. In PLDI, pages 618–632. ACM, 2017. [23] L. Lamport. On interprocess communication. part I: basic formalism. Distributed Computing, 1(2):77–85, 1986. [24] Leslie Lamport. How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Computers, 28(9):690–691, 1979. [25] J. Manson, W.Pugh, and S. V. Adve. The Java memory model. In POPL, pages 378–391. ACM, 2005. [26] Gerhard Schellhorn, John Derrick, and Heike Wehrheim. A sound and complete proof technique for linearizability of concurrent data structures. ACM Trans. Comput. Log., 15(4):31:1–31:37, 2014. [27] Oleg Travkin and Heike Wehrheim. Handling TSO in mechanized linearizability proofs. In Haifa Verification Conference, volume 8855 of Lecture Notes in Computer Science, pages 132–147. Springer, 2014. [28] R. K. Treiber. Systems programming: Coping with parallelism. Technical Report RJ 5118, IBM Almaden Res. Ctr., 1986. 17 A Potentially incomplete executions A complication with concurrent executions is that they may contain incomplete operations (that have been invoked, but have not yet returned). Since the effect of an incomplete operation may be globally visible, they cannot simply be ignored. This phenomenon has been well studied and arises in the definitions of linearizability [18] and opacity [17]. This section describes how we cope with incomplete operations in the context of causal linearizability. We define the completable extension of a sequential object S = (Σ, legal ) to be a triple T = (S, I, C), where I is a set of allowable incomplete actions and C : I → 2Σ is a completion function that maps each I to a set of possible completions for I. Example 18. If S = (Σ, legal ) is a concurrent object the set of allowable incomplete operations and completion function is defined by: I = {i ∈ Inv | ∃k1 , k2 ∈ Σ∗ . ∃r. k1 (i, r)k2 ∈ legal} C = λi. {(i, r) ∈ Σ} For the Treiber stack in Algorithm 1, we have IS = {Push(n) | n ∈ N}∪{Pop}, and CS (Push(n)) = {⊥} and CS (Pop) = N ∪ {empty}. S A completable extension of an object family SX is a triple TX = (SX , IX , CX ), where IX = x Ix and CX (a) = Cx (a), with x being the unique element of X such that a ∈ Σx . We say that E = (E, , ) is a T-execution structure iff E ⊆ Σ∪I such that dom( )∩I = ∅, i.e., no element of E may depend (in real-time order) on an element in I. Note that there may be edges both in and out of elements in E ∩ I and edges into E ∩ I. A T-execution structure is causally atomic if we can replace all incomplete events by complete events in a way that is allowed by the corresponding sequential object. This process is analagous to the extension of incomplete histories to complete histories, as allowed by linearizability and opacity in the classical (i.e., sequentially consistent) setting. Definition 19 (Causal linearizability). Let S = (Σ, legal ) be a family of sequential objects and T its completable extension. A T-execution structure E = (E, , ) is causally atomic w.r.t. S iff there exists a causally atomic S-execution structure E′ = (E ′ , ′ , ′ ) and an (order-preserving) isomorphism ϕ : E → E′ such that: • for each event e = (g, p, i) ∈ E, where i ∈ I, we have ϕ(e) = (g, p, a) for some a ∈ C(i), and • for each event e = (g, p, a) ∈ E, where a ∈ Σ, we have ϕ(e) = (g, p, a). Theorem 10 extends directly to the case of incomplete histories. The fact that each individual object history is causally atomic implies that we can assume the existence of a valid extension for each incomplete event, which is itself causally atomic. Thus, we can apply these per-object extensions to the object-family execution, and show, using the proof of Theorem 10, that the resulting complete execution structure is causally atomic. 18
6cs.PL
Self-Organization and Artificial Life: A Review Carlos Gershenson1 , Vito Trianni2 , Justin Werfel3 and Hiroki Sayama4 1 Universidad Nacional Autónoma de México, Mexico City, Mexico Institute of Cognitive Sciences and Technologies, Italian National Research Council, Rome, Italy 3 Wyss Institute for Biologically Inspired Enginering, Harvard University, Cambridge, MA 02138, USA 4 Binghamton University, Binghamton, NY 13902, USA [email protected], [email protected], [email protected], [email protected] arXiv:1804.01144v1 [nlin.AO] 3 Apr 2018 2 Abstract Self-organization has been an important concept within a number of disciplines, which Artificial Life (ALife) also has heavily utilized since its inception. The term and its implications, however, are often confusing or misinterpreted. In this work, we provide a mini-review of self-organization and its relationship with ALife, aiming at initiating discussions on this important topic with the interested audience. We first articulate some fundamental aspects of self-organization, outline its usage, and review its applications to ALife within its soft, hard, and wet domains. We also provide perspectives for further research. What is self-organization? The term “self-organizing system” was coined by Ashby (1947) to describe phenomena where local interactions between independent elements lead to global behaviors or patterns. The phrase is used when an external observer perceives a pattern in a system with many components, and this pattern is not imposed by a central authority external to those components, but rather arises from the collective behavior of the elements themselves. Natural examples are found in areas such as collective motion (Vicsek and Zafeiris, 2012), as when birds or fish move in flocks or schools exhibiting complex group behavior; morphogenesis (Doursat, 2011), in which cells in a living body divide and specialize to develop into a complex body plan; and pattern formation (Cross and Hohenberg, 1993) in a variety of physical and chemical systems, such as convection and crystal growth as well as the formation of patterns like stripes and spots on animal coats. A formal definition of the term runs into difficulties in agreeing on what is a system, what is organization, and what is self (Gershenson and Heylighen, 2003), none of which are perfectly straightforward. However, a pragmatic approach focuses on when it is useful to describe a system as self-organizing (Gershenson, 2007). This utility typically comes when an observer identifies a pattern at a higher scale but is also interested in phenomena at a lower scale; there then arise questions of how the lower scale produces the observables at the higher scale, as well as how the higher scale constrains and promotes observables at the lower scale. For example, bird behavior leads to flock formation, and descriptors at the level of the flock can also be used to understand regulation of individual bird behavior (Keys and Dugatkin, 1990). Self-organization has been an important concept within a number of disciplines, such as statistical mechanics (Wolfram, 1983; Crutchfield, 2012), supramolecular chemistry (Lehn, 2017), and computer science (Mamei et al., 2006). Artificial Life (ALife) frequently draws heavily on self-organizing systems in different contexts (Aguilar et al., 2014), starting in the early days of the field with studies of systems like snowflake formation (Packard, 1986) and agent flocking (Reynolds, 1987), and continuing to the present day. However, there are often confusion and misinterpretation involved with this concept, possibly due to an apparent lack of recent systematic literature. In this work, we aim at providing a mini-review of self-organization within the context of ALife, with a goal to open discussions on this important topic to the interested audience within the community. We first articulate some fundamental aspects of self-organization, outline ways the term has been used by researchers in the field, and then summarize work based on self-organization within soft (simulated), hard (robotic), and wet (chemical and biochemical) domains of ALife. We also provide perspectives of further research. Usage Ashby coined the term “self-organizing system” to show that a machine could be strictly deterministic and yet exhibit a self-induced change of organization (Ashby, 1947). This notion was further developed within cybernetics (von Foerster, 1960; Ashby, 1962). In many contexts, a thermodynamical perspective has been taken, where “organization” is viewed as the opposite of entropy (Nicolis and Prigogine, 1977). Since there is an equivalence between BoltzmannGibbs entropy and Shannon information, this notion has also been applied in contexts related to information theory (Fernández et al., 2014). In this view, a self-organizing system is one whose dynamics lead it to decrease its entropy or increase its information content. In the meantime, there are several other definitions of self-organization as well. For example, Shalizi (2001) defines self-organization as an increase in statistical complexity, which in turn is defined as the amount of information required to minimally specify the state of the system’s causal architecture. As an alternative to entropy, the use of the mean value of random variables has also been proposed (Holzer and De Meer, 2011). The recent subfield of guided self-organization explores mechanisms by which self-organization can be regulated for specific purposes—that is, how to find or design dynamics for a system such that it will have particular attractors or outcomes (Prokopenko, 2009; Ay et al., 2012; Polani et al., 2013; Prokopenko, 2014; Prokopenko and Gershenson, 2014). Much of this research is based on information theory. For example, the self-organization of random Boolean networks (Kauffman, 1969, 1993) can be guided to specific dynamical regimes (Gershenson, 2012). The concept of self-organization is also heavily used in organization science, with relevance to artificial society models (Gilbert and Conte, 1995; Epstein and Axtell, 1996). While there may be no single agreed-on definition of selforganization, this lack need not be an insurmountable obstacle for its study, any more than a lack of a unanimous formal definition of “life” has been an obstacle for progress in the fields of biology or ALife. In what follows, we provide a concice review of how self-organization has contributed to the progress of ALife. Domains One way to classify ALife research is to divide it into soft, hard, and wet domains, roughly referring to computer simulations, physical robots, and chemical/biological research (including living technology as the application of ALife (Bedau et al., 2009)), respectively. Self-organization has played a central role in work in all three domains. Soft ALife Soft ALife, or mathematical and computational modeling and simulation of life-like behaviors, has been linked to self-organization in many sub-domains. Cellular automata (CAs) (Ilachinski, 2001), one of the most popular modeling frameworks used in earlier forms of soft ALife, are well-explored, illustrative examples of self-organizing systems. A CA consists of many units (cells), each of which can be in any of a number of discrete states, and each of which repeatedly determines its next state in a fully distributed manner, based on its current state and those of its neighbors. With no central controller involved, CAs can spontaneously organize their state configurations to demonstrate various forms of self-organization: dynamical critical states such as in sand-pile models (Bak et al., 1988) and in the Game of Life (Bak et al., 1989), spontaneous formation of spatial patterns (Young, 1984; Wolfram, 1984; Ermentrout and Edelstein-Keshet, 1993), self-replication 1 (Langton, 1984, 1986; Reggia et al., 1993; Sipper, 1998), and evolution by variation and natural selection (Sayama, 1999, 2004; Salzberg and Sayama, 2004; Suzuki and Ikegami, 2006; Oros and Nehaniv, 2007, 2009). Similarly, partial differential equations (PDEs), a continuous counterpart of CAs, have an even longer history of demonstrating self-organizing dynamics (Turing, 1952; Glansdorff and Prigogine, 1971; Field and Noyes, 1974; Pearson, 1993). Another representative class of soft ALife that shows self-organization comprises models of collective behavior of self-driven agents (Vicsek and Zafeiris, 2012). Reynolds’ Boids model (Reynolds, 1987) is probably the best known in this category. In this work, self-propelled agents (“boids”) move in a continuous space according to three kinetic rules: cohesion (to maintain positional proximity), alignment (to maintain directional similarity), and separation (to avoid overcrowding and collision). A variety of related models have since been proposed and studied, including simplified, statistical-physicsoriented ones (Vicsek et al., 1995; Levine et al., 2000; Aldana et al., 2007; Newman and Sayama, 2008) and more detailed, behavioral-ecology-oriented ones (Couzin et al., 2002; Kunz and Hemelrijk, 2003; Hildenbrandt et al., 2010). These models produce natural-looking flocking/schooling/swarming collective behaviors out of simple decentralized behavioral rules, and they also exhibit phase transitions between distinct macroscopic states. Such collective behavior models have been brought to artificial chemistry studies (Dittrich et al., 2001; Banzhaf and Yamamoto, 2015) as well, such as swarm chemistry and its variants (Sayama, 2008; Kreyssig and Dittrich, 2011; Sayama, 2011, 2012; Erskine and Herrmann, 2015), in which kinetically and chemically distinct species of idealized agents interact to form nontrivial spatiotemporal dynamic patterns. More recently, these collective behavior models have also been actively utilized in morphogenetic engineering (Doursat, 2011; Doursat et al., 2012), in which researchers attempt to achieve a successful merger of self-organization and programmable architectural design, by discovering or designing agent rules that result in specific desired high-level patterns. Other examples of self-organization in soft ALife are found in simulation models of artificial societies. Their roots can be traced back to the famous segregation mod1 Note that earlier literature on self-reproducing cellular automata (von Neumann, 1966; Codd, 1968) is not included here, because those models typically had a clear separation between a central universal controller and a structure that is procedurally constructed by the controller; thus they may not constitute a good example of self-organization as discussed in this article. els developed by Sakoda and Schelling back in the early 1970s (Sakoda, 1971; Schelling, 1971; Hegselmann, 2017), in which simple, independent decision making by individual agents would eventually cause a spatially segregated state of society at a macroscopic level. Agent-based simulation of artificial societies has been one of the core topics discussed in the ALife community (Epstein et al., 1996; Lansing, 2002), and has elucidated self-organization of issues in social order such as geographical resource management (Lansing and Kremer, 1993; Bousquet and Page, 2004), cooperative strategies (Lindgren and Nordahl, 1993; Brede, 2011; Adami et al., 2016; Ichinose and Sayama, 2017), and common languages (Steels, 1995; Kirby, 2002; Smith et al., 2003; Lipowska and Lipowski, 2012). The literature on self-organization of adaptive social network structure (Gross and Sayama, 2009; Bryden et al., 2010; Geard and Bullock, 2010) may also be included in this category. Hard ALife Robots can be considered to be life-like artifacts in their ability to sense their physical environment and take action in response. Physical agents, even very simple ones, can evoke in the observer a particularly strong sense of being animate. From W. Grey Walter’s tortoises (Walter, 1950, 1951), to simple machines based on the principles of Braitenberg’s vehicles (Braitenberg, 1986), to other reactive robots (Brooks, 1989), to recent biomimetic and bioinspired designs (Saranli et al., 2001; Wood et al., 2013; Kim and Wensing, 2017), building artificial life as physically embodied hardware allows it to exploit the rich dynamics underlying the interaction between itself and its environment, so that even simple mechanisms and behavioral rules can confer sophisticated life-like attributes to limited machines (Simon, 1969). Still higher complexity can be attained either by increasing the sophistication of a single robot, or by increasing the number of robots in a system that, through the resulting interaction and self-organization, can then evince more sophisticated abilities collectively, from adaptive responses to group decision making. Physical hardware has the strong advantage that the physical characteristics of the system (dynamics, sensor performance, actuator noise profiles, etc.) are by definition realistic, whereas simulations are necessarily simplified and typically fail to capture phenomena that only become evident through material experimentation (Brooks and Matarić, 1993; Rubenstein et al., 2014). Conversely, while simulation can readily handle very large numbers of agents, hardware considerations (cost, space, scalability of operation, etc.) have traditionally limited hard ALife studies to using a small number of robots. In some scenarios, self-organizing phenomena of interest do not necessarily require a large number of robots; when the mechanism for coordination is based on stigmergy (persistent information left in a shared environment), the important element is a large number of interactions between robot and environment, and even a single robot could suffice (Beckers et al., 2000; Werfel et al., 2014). More recently, hardware advances have made it possible to conduct physical experiments with robots in numbers exceeding a thousand (Rubenstein et al., 2014). Physical experiments have been used to explore selforganizing phenomena in a variety of areas. Aggregation of objects has been studied from a physics perspective (Giomi et al., 2013); in ways inspired by behavior observed in living systems, such as cockroaches or bees (Garnier et al., 2008; Kernbach et al., 2009); and using controllers designed through automatic methods like artificial evolution (Dorigo et al., 2004; Francesca et al., 2014). Another topic is collective navigation, in which groups of robots coordinate their overall direction of motion and collectively avoid obstacles (Baldassarre et al., 2007; Trianni and Dorigo, 2006; Turgut et al., 2008). In other collective decision-making processes, positive feedback from recruitment processes and negative feedback from cross-inhibition contribute to shape the outcome (Reina et al., 2018; Valentini et al., 2015; Scheidler et al., 2016; Garnier et al., 2009, 2013; Kernbach et al., 2009; Francesca et al., 2014; Valentini et al., 2017). Self-assembly (Whitesides and Grzybowski, 2002) is another form of selforganization, with several examples in hard ALife of self-assembling or self-reconfiguring robots (Murata et al., 1994; Holland and Melhuish, 1999; Støy and Nagpal, 2004; Zykov et al., 2005; Dorigo et al., 2006; Ampatzis et al., 2009; Rubenstein et al., 2014). Wet ALife Wet ALife, or physico-chemical synthesis of life-like behaviors, extensively utilizes self-organization as its core principle. A classic example is the spatial pattern formation in experimentally realized reaction-diffusion systems, such as the Belousov-Zhabotinsky reaction (Vanag and Epstein, 2001; Adamatzky et al., 2008) and Gray-Scott-like selfreplicating spots (Lee et al., 1994), where dynamic patterns self-organize entirely from spatially localized chemical reactions. Similar approaches can also be taken by using microscopic biological organisms (e.g., slime molds) as the media of self-organization (Adamatzky et al., 2008; Adamatzky, 2015). In the origins of life research, molecular self-assembly plays the essential role in producing protocell structures and their metabolic dynamics (Rasmussen et al., 2003; Hanczyc et al., 2003; Rasmussen et al., 2004, 2008). More recently, dynamic behaviors of macroscopically visible chemical droplets, a.k.a. liquid robots (Čejková et al., 2017), has become a focus of active research in ALife. In this line of research, interactions among chemical reactions, physical micro-fluid dynamics and possibly other not-yet-fully-understood microscopic mechanisms cause self-organization of spontaneous movements (Hanczyc et al., 2007; Cejkova et al., 2014) and complex morphology (Čejková et al., 2018) of those droplets. Moreover, droplet-based systems have also been used to demonstrate artificial evolution in experimental chemical systems (Parrilla-Gutierrez et al., 2017). Perspectives As already mentioned above, we can understand a selforganizing system as one in which organization increases in time. However, it can be shown that, depending on how the variables of a system are chosen, the same system can be said to be either organizing or disorganizing (Gershenson and Heylighen, 2003). Moreover, in several examples of self-organization, it is not straightforward to identify the self of the system, as oftentimes all elements composing the system can be ascribed equal agency. Finally, in cybernetics and systems theory, the dependency of the boundaries of a system on the observer has thoroughly been discussed (Gershenson et al., 2014): one wants to have an objective description of phenomena, but descriptions are necessarily made by observers, making them partially subjective. It becomes clear, then, that discussing selforganization requires the identification of what is self and what is other, and what are the elements that are increasing in their organization. Similar issues have been tackled by Maturana and Varela (1980) in the definition of living systems as autopoietic systems. According to this tradition, a living system is inherently self-organising because the self is continuously produced or renewed by processes brought forth by the system’s internal components. In other words, an autopoietic system can be recognized as a unity with boundaries that encompass a number of simpler/elementary components that are at the basis of the organization of the system, as they are responsible for the definition of the system boundaries and for the (re)production of the very same components (Varela et al., 1974). This is a peculiar characteristic of living systems. If life is deeply rooted in selforganization, so should be ALife, and the several acceptations of ALife discussed above demonstrate the richness of the links it holds with self-organization. Looking at the perspectives of ALife, it can be useful to think of self-organization as the common language that unifies the soft, hard and wet domains. The ALife community can progress owing to shared concepts and definitions, and despite the mentioned difficulties, self-organization stands as a common ground on which to build shared consensus. Most importantly, we believe that the identification and classifications of the mechanisms that underpin self-organization can be extremely useful to synthesize novel forms of ALife and gain a better understanding of life itself. These mechanisms should be identified at the level of the system components and characterized for the effects they have on the system organization. Mechanisms pertain to the modalities of interaction among system components (e.g., colli- sions, perceptions, direct communication, stigmergy), to behavioural patterns pertaining to individual components (e.g., exploration vs. exploitation), and to information enhancement or suppression (e.g., recruitment or inhibitory processes). The effects of the mechanisms should be visible in the creation of feedback loops—positive or negative— at the system level, which determine the complex dynamics underlying self-organization. We believe that, by identifying and characterising the mechanisms that support selforganization, the synthesis of artifacts with life-like properties would be much simplified. In this perspective, mechanisms underlying self-organization can be thought of as design patterns to generate artificial lives (Babaoglu et al., 2006; Fernandez-Marquez et al., 2013; Reina et al., 2014). By exploiting and composing them, different forms of ALife could be designed with a principled approach, owing to the understanding of the relationship between mechanisms and system organization. The possibility of exploiting self-organization for design purposes is especially relevant toward the development of living technologies, that is, technologies presenting features of living systems (Bedau et al., 2009), such as robustness, adaptability, and self-organization, which can include self-reconfiguration, self-healing, selfmanagement, self-assembly, etc., often named together as “self-*” in the context of autonomic computing (Poslad, 2009). Self-organization has been used directly in living technologies within a variety of domains (Bedau et al., 2013), from protocells (Rasmussen et al., 2008) to cities (Gershenson, 2013), and also several methodologies that use self-organization have been proposed in engineering (Frei and Di Marzo Serugendo, 2011). A major leap forward can be expected when principled design methodologies are laid down, and a better understanding of selforganization for ALife can be at the forefront of the development of such methods. As a final discussion, and as food for thought, it is also worth considering when self-organization is not useful in the context of ALife. Tracing a clear line across the domain is of course impossible, but our reasoning above provides some suggestions. Indeed, self-organization does not account for every life-like process, for instance when there is no clear increase in organization. For instance, hard ALife has strongly developed the concept of embodied cognition and morphological computation (Pfeifer and Gómez, 2009), where the dynamics of mind-body-environment interaction are fundamental aspects. These dynamics, albeit very complex, are not easily described within the framework of self-organization. Evolution is also very much represented within ALife, but typical generational evolutionary algorithms do not present clear elements of self-organization, as the progression in organization through generations is mediated by a central authority that defines selection of the fittest individuals. Open-ended evolution (Taylor et al., 2016) makes a difference when such a centralized authority does not exist and progress is observable in mixing populations of interacting individuals. Exploring possibilities of infusing self-organization into those processes that were traditionally not oriented toward self-organization would be potentially a very fruitful direction of research. Needless to say, this mini-review we presented here is not meant to be a complete, comprehensive review of selforganization and ALife, given the limitation of space. We plan to expand the work substantially in the near future to develop a more thorough review for publication elsewhere. References Adamatzky, A. (2015). A would-be nervous system made from a slime mold. Artificial life, 21(1):73–91. Adamatzky, A., de Lacy Costello, B., and Shirakawa, T. (2008). Universal computation with limited resources: Belousov– zhabotinsky and physarum computers. International Journal of Bifurcation and Chaos, 18(08):2373–2389. Banzhaf, W. and Yamamoto, L. (2015). Artificial Chemistries. MIT Press. Beckers, R., Holland, O. E., and Deneubourg, J.-L. (2000). Prerational Intelligence: Adaptive Behavior and Intelligent Systems Without Symbols and Logic, Volume 2, chapter From Local Actions to Global Tasks: Stigmergy and Collective Robotics. Springer, Dordrecht. Bedau, M. A., McCaskill, J. S., Packard, N. H., Parke, E. C., and Rasmussen, S. R. (2013). Introduction to recent developments in living technology. Artificial Life, 19(3):291–298. Bedau, M. A., McCaskill, J. S., Packard, N. H., and Rasmussen, S. (2009). Living technology: Exploiting life’s principles in technology. Artificial Life, 16(1):89–97. Bousquet, F. and Page, C. L. (2004). Multi-agent simulations and ecosystem management: a review. Ecological Modelling, 176(3–4):313 – 332. Braitenberg, V. (1986). Vehicles: Experiments in synthetic psychology. MIT Press, Cambridge, MA, USA. Adami, C., Schossau, J., and Hintze, A. (2016). Evolutionary game theory using agent-based methods. Phys. Life Rev., 19:1–26. Brede, M. (2011). The evolution of cooperation on correlated payoff landscapes. Artificial Life, 17(4):365–373. Aguilar, W., Santamarı́a Bonfil, G., Froese, T., and Gershenson, C. (2014). The past, present, and future of artificial life. Frontiers in Robotics and AI, 1(8). Brooks, R. A. (1989). A robot that walks; emergent behaviors from a carefully evolved network. In IEEE International Conference on Robotics and Automation. Aldana, M., Dossetti, V., Huepe, C., Kenkre, V. M., and Larralde, H. (2007). Phase transitions in systems of self-propelled agents and related network models. Physical Review Letters, 98:095702. Brooks, R. A. and Matarić, M. J. (1993). Robot Learning, chapter Real Robots, Real Learning Problems, pages 193–213. Kluwer Academic Press. Ampatzis, C., Tuci, E., Trianni, V., Christensen, A., and Dorigo, M. (2009). Evolving self-assembly in autonomous homogeneous robots: experiments with two physical robots. Artificial Life. Ashby, W. R. (1947). Principles of the self-organizing dynamic system. Journal of General Psychology, 37:125–128. Bryden, J., Funk, S., Geard, N., Bullock, S., and Jansen, V. A. A. (2010). Stability in flux: community structure in dynamic networks. J. Roy. Soc. Interface, 8(60):1031–1040. Čejková, J., Banno, T., Hanczyc, M. M., and Štěpánek, F. (2017). Droplets as liquid robots. Artificial Life, 23(4):528–549. Ashby, W. R. (1962). Principles of the self-organizing system. In Foerster, H. V. and Zopf, Jr., G. W., editors, Principles of Self-Organization, pages 255–278, Oxford. Pergamon. Čejková, J., Hanczyc, M. M., and Štěpánek, F. (2018). Multiarmed droplets as shape-changing protocells. Artificial Life, 24(1):71–79. Ay, N., Der, R., and Prokopenko, M. (2012). Guided selforganization: perception–action loops of embodied systems. Theory in Biosciences, 131(3):125–127. Cejkova, J., Novak, M., Stepanek, F., and Hanczyc, M. M. (2014). Dynamics of chemotactic droplets in salt concentration gradients. Langmuir, 30(40):11937–11944. Babaoglu, O., Canright, G., Deutsch, A., Di Caro, G. A., Ducatelle, F., Gambardella, L. M., Ganguly, N., Jelasity, M. . r., Montemanni, R., Montresor, A., and Urnes, T. (2006). Design patterns from biology for distributed computing. ACM Transactions on Autonomous Adaptive Systems, 1(1):26–66. Codd, E. F. (1968). Cellular Automata, chapter A SelfReproducing Universal Computer-Constructor, pages 81– 105. Academic Press, Inc. Bak, P., Chen, K., and Kreutz, M. (1989). Self-organized criticality in the “game of life”. Nature, 342:780–782. Bak, P., Tang, C., and Wiesenfeld, K. (1988). Self-organized criticality. Physical Review A, 38:364. Baldassarre, G., Trianni, V., Bonani, M., Mondada, F., Dorigo, M., and Nolfi, S. (2007). Self-organized coordinated motion in groups of physically connected robots. IEEE Trans. Syst. Man Cybern. B Cybern., 37:224–239. Couzin, I. D., Krause, J., James, R., Ruxton, G. D., and Franks, N. R. (2002). Collective memory and spatial sorting in animal groups. Journal of Theoretical Biology, 218(1):1–11. Cross, M. C. and Hohenberg, P. C. (1993). Pattern formation outside of equilibrium. Rev. Mod. Phys., 65:851–1112. Crutchfield, J. P. (2012). Between order and chaos. Nature Physics, 8:17–24. Dittrich, P., Ziegler, J., and Banzhaf, W. (2001). Artificial chemistries—a review. Artificial Life, 7(3):225–275. Dorigo, M., Trianni, V., Şahin, E., Groß, R., Labella, T. H., Baldassarre, G., Nolfi, S., Deneubourg, J.-L., Mondada, F., Floreano, D., and Gambardella, L. (2004). Evolving selforganizing behaviors for a swarm-bot. Autonomous Robots, 17(2-3):223–245. Dorigo, M., Tuci, E., Trianni, V., Groß, R., Nouyan, S., Ampatzis, C., Labella, T. H., O’Grady, R., Bonani, M., and Mondada, F. (2006). Computational Intelligence: Principles and Practice, chapter SWARM-BOT: Design and implementation of colonies of self-assembling robots. IEEE Computational Intelligence Society. Doursat, R. (2011). The myriads of alife: Importing complex systems and self-organization into engineering. In 2011 IEEE Symposium on Artificial Life. Doursat, R., Sayama, H., and Michel, O., editors (2012). Morphogenetic Engineering: Toward Programmable Complex Systems. Springer-Verlag, Berlin, Heidelberg. Epstein, J., Axtell, R., and Project, . (1996). Growing Artificial Societies: Social Science from the Bottom Up. A Bradford book. Brookings Institution Press. Epstein, J. M. and Axtell, R. L. (1996). Growing Artificial Societies: Social Science from the Bottom Up. Brookings Institution Press MIT Press. Ermentrout, G. B. and Edelstein-Keshet, L. (1993). Cellular automata approaches to biological modeling. Journal of Theoretical Biology, 160(1):97–133. Erskine, A. and Herrmann, J. M. (2015). Cell-division behavior in a heterogeneous swarm environment. Artif. Life, 4(481–500). Fernández, N., Maldonado, C., and Gershenson, C. (2014). Information measures of complexity, emergence, selforganization, homeostasis, and autopoiesis. In Prokopenko, M., ed., Guided Self-Organization: Inception, pages 19–51. Fernandez-Marquez, J. L., Di Marzo Serugendo, G., Montagna, S., Viroli, M., and Arcos, J. L. (2013). Description and composition of bio-inspired design patterns: a complete overview. Natural Computing, 12(1):43–67. Field, R. J. and Noyes, R. M. (1974). Oscillations in chemical systems. IV. Limit cycle behavior in a model of a real chemical reaction. The Journal of Chemical Physics, 60(5). Francesca, G., Brambilla, M., Brutschy, A., Trianni, V., and Birattari, M. (2014). Automode: A novel approach to the automatic design of control software for robot swarms. Swarm Intelligence, 8(2):89–112. Frei, R. and Di Marzo Serugendo, G. (2011). Advances in complexity engineering. Int. J. of Bio-Inspired Computation, 3(4):199–212. Garnier, S., Combe, M., Jost, C., and Theraulaz, G. (2013). Do ants need to estimate the geometrical properties of trail bifurcations to find an efficient route? a swarm robotics test bed. PLOS Computational Biology, 9:e1002903. Garnier, S., Gautrais, J., Asadpour, M., Jost, C., and Theraulaz, G. (2009). Self-organized aggregation triggers collective decision making in a group of cockroach-like robots. Adaptive Behavior, 17(2):109–133. Garnier, S., Jost, C., Gautrais, J., Asadpour, M., Caprari, G., Jeanson, R., Grimal, A., and Theraulaz, G. (2008). The embodiment of cockroach aggregation behavior in a group of microrobots. Artificial Life, 14(4):387–408. Geard, N. and Bullock, S. (2010). Competition and the dynamics of group affiliation. Advances in Complex Systems, 13(4):501. Gershenson, C. (2007). Design and Control of Selforganizing Systems. CopIt Arxives, Mexico. http://tinyurl.com/DCSOS2007. Gershenson, C. (2012). Guiding the self-organization of random Boolean networks. Theory in Biosciences, 131(3):181–191. Gershenson, C. (2013). Living in living cities. Artificial Life, 19(3 & 4):401–420. Gershenson, C., Csermely, P., Erdi, P., Knyazeva, H., and Laszlo, A. (2014). The past, present and future of cybernetics and systems research. systema: connecting matter, life, culture and technology, 1(3):4–13. Gershenson, C. and Heylighen, F. (2003). When can we call a system self-organizing? In ECAL 2003, pages 606–614. Gilbert, N. and Conte, R., editors (1995). Artificial Societies: the computer simulation of social life. Taylor & Francis, Inc., Bristol, PA, USA. Giomi, L., Hawley-Weld, N., and Mahadevan, L. (2013). Swarming, swirling and stasis in sequestered bristle-bots. Proc. R. Soc. A, 469(2151). Glansdorff, P. and Prigogine, I. (1971). Thermodynamic Theory of Structure, Stability and Fluctuations. Wiley-Interscience, New York. Gross, T. and Sayama, H., editors (2009). Adaptive networks: Theory, Models and Applications. Understanding Complex Systems. Springer, Berlin Heidelberg. Hanczyc, M. M., Fujikawa, S. M., and Szostak, J. W. (2003). Experimental models of primitive cellular compartments: encapsulation, growth, and division. Science, 302:618–622. Hanczyc, M. M., Toyota, T., Ikegami, T., Packard, N., and Sugawara, T. (2007). Fatty acid chemistry at the oil- water interface: self-propelled oil droplets. Journal of the American Chemical Society, 129(30):9386–9391. Hegselmann, R. (2017). Thomas C. Schelling and James M. Sakoda: The intellectual, technical, and social history of a model. J. Artif. Soc. Soc. Simul., 20(3):15. Hildenbrandt, H., Carere, C., and Hemelrijk, C. (2010). Selforganized aerial displays of thousands of starlings: a model. Behavioral Ecology, 21(6):1349–1359. Holland, O. and Melhuish, C. (1999). Stigmergy, self-organization, and sorting in collective robotics. Artificial Life, 5:173–202. Holzer, R. and De Meer, H. (2011). Methods for approximations of quantitative measures in self-organizing systems. In Bettstetter, C. and Gershenson, C., editors, Self-Organizing Systems, LCNS volume 6557, pages 1–15. Ichinose, G. and Sayama, H. (2017). Invasion of cooperation in scale-free networks: Accumulated versus average payoffs. Artificial Life, 23(1):25–33. Maturana, H. and Varela, F. (1980). Autopoiesis and Cognition: the Realization of the Living. D. Reidel Publishing Co., Dordecht, 2nd edition. Ilachinski, A. (2001). Cellular Automata: A Discrete Universe. World Scientific. Murata, S., Kurokawa, H., and Kokaji, S. (1994). Self-assembling machine. In Proc. ICRA 1994. Kauffman, S. A. (1969). Metabolic stability and epigenesis in randomly constructed genetic nets. J. Theor. Biol., 22:437–467. Newman, J. P. and Sayama, H. (2008). Effect of sensory blind zones on milling behavior in a dynamic self-propelled particle model. Physical Review E, 78:011913. Kauffman, S. A. (1993). The Origins of Order. Oxford University Press, Oxford, UK. Kernbach, S., Thenius, R., Kernbach, O., and Schmickl, T. (2009). Re-embodiment of honeybee aggregation behavior in an artificial micro-robotic system. Adapt. Behav., 17(3):237–259. Keys, G. C. and Dugatkin, L. A. (1990). Flock size and position effects on vigilance, aggression, and prey capture in the european starling. The Condor, 92:151–159. Kim, S. and Wensing, P. M. (2017). Foundations and Trends in Robotics, volume 5, chapter Design of Dynamic Legged Robots, pages 117–190. Now Publishers Inc. Kirby, S. (2002). Natural language from artificial life. Artifical Life, 8(2):185 – 215. Kreyssig, P. and Dittrich, P. (2011). Reaction flow artificial chemistries. In ECAL, pages 431–437. Kunz, H. and Hemelrijk, C. K. (2003). Artificial fish schools: Collective effects of school size, body size, and body form. Artificial Life, 9(3):237–253. Langton, C. G. (1984). Self-reproduction in cellular automata. Physica D, 10:135–144. Langton, C. G. (1986). Studying artificial life with cellular automata. Physica D, 22(1–3):129–149. Lansing, J. S. (2002). “artificial societies” and the social sciences. Artificial Life, 8(3):279–292. Lansing, J. S. and Kremer, J. N. (1993). Emergent properties of balinese water temple networks: Coadaptation on a rugged fitness landscape. American Anthropologist, 95(1):97–114. Nicolis, G. and Prigogine, I. (1977). Self-Organization in NonEquilibrium Systems: From Dissipative Structures to Order Through Fluctuations. Wiley, Chichester. Oros, N. and Nehaniv, C. L. (2007). Sexyloop: Self-reproduction, evolution and sex in cellular automata. In 2007 IEEE Symposium on Artificial Life. Oros, N. and Nehaniv, C. L. (2009). Dude, where is my sex gene?—persistence of sex over evolutionary time in cellular automata. In 2009 IEEE Symposium on Artificial Life. Packard, N. (1986). Lattice models for solidification and aggregation. In Theory and Application of Cellular Automata, Wolfram S. (ed.), pages 305–310. World Scientific, Institute for Advanced Study Preprint. Reprinted (1986). Parrilla-Gutierrez, J. M., Tsuda, S., Grizou, J., Taylor, J., Henson, A., and Cronin, L. (2017). Adaptive artificial evolution of droplet protocells in a 3d-printed fluidic chemorobotic platform with configurable environments. Nature Communications, 8(1):1144. Pearson, J. E. (1993). Complex patterns in a simple system. Science, 261(5118):189–192. Pfeifer, R. and Gómez, G. (2009). Morphological Computation – Connecting Brain, Body, and Environment. In Creating Brain-Like Intelligence, pages 66–83. Springer, Berlin. Polani, D., Prokopenko, M., and Yaeger, L. S. (2013). Information and self-organization of behavior. Advances in Complex Systems, 16(2&3):1303001. Poslad, S. (2009). Autonomous Systems and Artificial Life, chapter 10, pages 317–341. Wiley-Blackwell. Lee, K.-J., McCormick, W. D., Pearson, J. E., and Swinney, H. L. (1994). Experimental observation of self-replicating spots in a reaction–diffusion system. Nature, 369(6477):215. Prokopenko, M. (2009). Guided self-organization. HFSP Journal, 3(5):287–289. Lehn, J.-M. (2017). Supramolecular chemistry: Where from? where to? Chem. Soc. Rev., 46:2378–2379. Prokopenko, M., editor (2014). Guided Self-Organization: Inception, volume 9 of Emergence, Complexity and Computation. Springer, Berlin Heidelberg. Levine, H., Rappel, W.-J., and Cohen, I. (2000). Self-organization in systems of self-propelled particles. Physical Review E, 63:017101. Prokopenko, M. and Gershenson, C. (2014). Entropy methods in guided self-organisation. Entropy, 16(10):5232–5241. Lindgren, K. and Nordahl, M. G. (1993). Cooperation and community structure in artificial ecosystems. Artificial Life, 1(1 2):15–37. Lipowska, D. and Lipowski, A. (2012). Naming game on adaptive weighted networks. Artificial Life, 18(3):311–323. Mamei, M., Menezes, R., Tolksdorf, R., and Zambonelli, F. (2006). Case studies for self-organization in computer science. Journal of Systems Architecture, 52(8-9):443–460. Rasmussen, S., Bedau, M. A., Chen, L., Deamer, D., Krakauer, D. C., Packard, N. H., and Stadler, P. F., editors (2008). Protocells: Bridging Nonliving and Living Matter Bridging Nonliving and Living Matter. MIT Press. Rasmussen, S., Chen, L., Deamer, D., Krakauer, D. C., Packard, N. H., Stadler, P. F., and Bedau, M. A. (2004). Transitions from nonliving to living matter. Science, 303(5660):963–965. Rasmussen, S., Chen, L., Nilsson, M., and Abe, S. (2003). Bridging nonliving and living matter. Artificial life, 9(3):269–316. Reggia, J. A., Armentrout, S. L., Chou, H.-H., and Peng, Y. (1993). Simple systems that exhibit self-directed replication. Science, 259(5099):1282–1287. Reina, A., Bose, T., Trianni, V., and Marshall, J. A. R. (2018). Effects of spatiality on value-sensitive decisions made by robot swarms. In DARS 2016, pages 461–473. Reina, A., Dorigo, M., and Trianni, V. (2014). Towards a Cognitive Design Pattern for Collective Decision-Making. In ANTS’14, pages 194–205. Reynolds, C. W. (1987). Flocks, herds, and schools: A distributed behavioral model. Computer Graphics, 21(4):25–34. Rubenstein, M., Cornejo, A., and Nagpal, R. (2014). Programmable self-assembly in a thousand-robot swarm. Science, 345(6198):795–799. Sakoda, J. M. (1971). The checkerboard model of social interaction. The Journal of Mathematical Sociology, 1(1):119–132. Salzberg, C. and Sayama, H. (2004). Complex genetic evolution of artificial selfreplicators in cellular automata. Complexity, 10(2):33–39. Støy, K. and Nagpal, R. (2004). Self-reconfiguration using directed growth. In Proc. DARS 2004, Toulouse, France. Suzuki, K. and Ikegami, T. (2006). Spatial-pattern-induced evolution of a self-replicating loop network. Artificial Life, 12(4):461–485. Taylor, T., et al. (2016). Open-ended evolution: perspectives from the OEE workshop in York. Artificial Life, 22(3):408–423. Trianni, V. and Dorigo, M. (2006). Self-organisation and communication in groups of simulated and physical robots. Biological Cybernetics, 95(3):213–231. Turgut, A. E., Çelikkanat, H., Gökçe, F., and Şahin, E. (2008). Self-organized flocking in mobile robot swarms. Swarm Intelligence, 2(2–4):97–120. Turing, A. (1952). The chemical basis of morphogenesis. Phil. Trans. Roy. Soc. Lond. B, 237(641):37–72. Valentini, G., Ferrante, E., and Dorigo, M. (2017). The best-of-n problem in robot swarms: Formalization, state of the art, and novel perspectives. Frontiers in Robotics and AI, 4(9). Saranli, U., Buehler, M., and Koditschek, D. E. (2001). RHex: A simple and highly mobile robot. International Journal of Robotics Research, 20(7):616–631. Valentini, G., Ferrante, E., Hamann, H., and Dorigo, M. (2015). Collective decision with 100 kilobots: speed versus accuracy in binary discrimination problems. In Autonomous Agents and Multi-Agent Systems, pages 553–580. Sayama, H. (1999). A new structurally dissolvable selfreproducing loop evolving in a simple cellular automata space. Artificial Life, 5(4):343–365. Vanag, V. K. and Epstein, I. R. (2001). Pattern formation in a tunable medium: The Belousov-Zhabotinsky reaction in an aerosol OT microemulsion. Phys. Rev. Lett., 87(22):228301. Sayama, H. (2004). Self-protection and diversity in self-replicating cellular automata. Artificial Life, 10(1):83–98. Varela, F. J., Maturana, H. R., and Uribe, R. (1974). Autopoiesis: The organization of living systems, its characterization and a model. Biosystems, 5(4):187–196. Sayama, H. (2008). Swarm chemistry. Artif. Life, 15(1):105–114. Sayama, H. (2011). Seeking open-ended evolution in swarm chemistry. In 2011 IEEE Symposium on Artificial Life. Vicsek, T., Czirók, A., Ben-Jacob, E., Cohen, I., and Shochet, O. (1995). Novel type of phase transition in a system of selfdriven particles. Physical Review Letters, 75:1226. Sayama, H. (2012). Morphologies of self-organizing swarms in 3d swarm chemistry. In Proc. GECCO 2012, pages 577–584. Vicsek, T. and Zafeiris, A. (2012). Collective motion. Physics Reports, 517:71–140. Scheidler, A., Brutschy, A., Ferrante, E., and Dorigo, M. (2016). The k-unanimity rule for self-organized decision-making in swarms of robots. IEEE Transactions on Cybernetics, 46(5):1175–1188. von Foerster, H. (1960). On self-organizing systems and their environments. In Yovitts, M. C. and Cameron, S., editors, SelfOrganizing Systems, pages 31–50, New York. Pergamon. Schelling, T. C. (1971). Dynamic models of segregation. The Journal of Mathematical Sociology, 1(2):143–186. von Neumann, J. (1966). The Theory of Self-Reproducing Automata. University of Illinois Press, Champaign. Edited by A. W. Burks. Shalizi, C. R. (2001). Causal Architecture, Complexity and SelfOrganization in Time Series and Cellular Automata. PhD thesis, University of Wisconsin at Madison. Walter, W. G. (1950). An imitation of life. Sci. Am., 182:42–45. Simon, H. A. (1969). The Sciences of the Artificial. MIT Press, Cambridge, Massachusetts. Werfel, J., Petersen, K., and Nagpal, R. (2014). Designing collective behavior in a termite-inspired robot construction team. Science, 343(6172):754–758. Sipper, M. (1998). Fifty years of research on self-replication: An overview. Artificial Life, 4(3):237–257. Smith, K., Kirby, S., and Brighton, H. (2003). Iterated learning: A framework for the emergence of language. Artificial Life, 9(4):371–386. Steels, L. (1995). A self-organizing spatial vocabulary. Artificial Life, 2(3):319–332. Walter, W. G. (1951). A machine that learns. Sci. Am., 185:60–63. Whitesides, G. M. and Grzybowski, B. (2002). Self-assembly at all scales. Science, 295(5564):2418–2421. Wolfram, S. (1983). Statistical mechanics of cellular automata. Reviews of Modern Physics, 55(3):601–644. Wolfram, S. (1984). Cellular automata as models of complexity. Nature, 311:419–424. Wood, R., Nagpal, R., and Wei, G.-Y. (2013). robobees. Scientific American. Flight of the Young, D. A. (1984). A local activator-inhibitor model of vertebrate skin patterns. Mathematical Biosciences, 72(1):51–58. Zykov, V., Mytilinaios, E., Adams, B., and Lipson, H. (2005). Robotics: self-reproducing machines. Nature, 435:163–164.
9cs.NE
Quo Vadis, Action Recognition? A New Model and the Kinetics Dataset arXiv:1705.07750v3 [cs.CV] 12 Feb 2018 † João Carreira† Andrew Zisserman†,∗ [email protected] [email protected] DeepMind ∗ Department of Engineering Science, University of Oxford Abstract The paucity of videos in current action classification datasets (UCF-101 and HMDB-51) has made it difficult to identify good video architectures, as most methods obtain similar performance on existing small-scale benchmarks. This paper re-evaluates state-of-the-art architectures in light of the new Kinetics Human Action Video dataset. Kinetics has two orders of magnitude more data, with 400 human action classes and over 400 clips per class, and is collected from realistic, challenging YouTube videos. We provide an analysis on how current architectures fare on the task of action classification on this dataset and how much performance improves on the smaller benchmark datasets after pre-training on Kinetics. We also introduce a new Two-Stream Inflated 3D ConvNet (I3D) that is based on 2D ConvNet inflation: filters and pooling kernels of very deep image classification ConvNets are expanded into 3D, making it possible to learn seamless spatio-temporal feature extractors from video while leveraging successful ImageNet architecture designs and even their parameters. We show that, after pre-training on Kinetics, I3D models considerably improve upon the state-of-the-art in action classification, reaching 80.9% on HMDB-51 and 98.0% on UCF-101. Figure 1. A still from ‘Quo Vadis’ (1951). Where is this going? Are these actors about to kiss each other, or have they just done so? More importantly, where is action recognition going? Actions can be ambiguous in individual frames, but the limitations of existing action recognition datasets has meant that the best-performing video architectures do not depart significantly from single-image analysis, where they rely on powerful image classifiers trained on ImageNet. In this paper we demonstrate that video models are best pre-trained on videos and report significant improvements by using spatio-temporal classifiers pre-trained on Kinetics, a freshly collected, large, challenging human action video dataset. 1. Introduction mentation, depth prediction, pose estimation, action classification. In the video domain, it is an open question whether training an action classification network on a sufficiently large dataset, will give a similar boost in performance when applied to a different temporal task or dataset. The challenges of building video datasets has meant that most popular benchmarks for action recognition are small, having on the order of 10k videos. In this paper we aim to provide an answer to this question using the new Kinetics Human Action Video Dataset [16], which is two orders of magnitude larger than previous datasets, HMDB-51 [18] and UCF-101 [29]. Kinetics has One of the unexpected benefits of the ImageNet challenge has been the discovery that deep architectures trained on the 1000 images of 1000 categories, can be used for other tasks and in other domains. One of the early examples of this was using the fc7 features from a network trained on ImageNet for the PASCAL VOC classification and detection challenge [10, 23]. Furthermore, improvements in the deep architecture, changing from AlexNet to VGG-16, immediately fed through to commensurate improvements in the PASCAL VOC performance [25]. Since then, there have been numerous examples of ImageNet trained architectures warm starting or sufficing entirely for other tasks, e.g. seg1 400 human action classes with more than 400 examples for each class, each from a unique YouTube video. Our experimental strategy is to reimplement a number of representative neural network architectures from the literature, and then analyze their transfer behavior by first pretraining each one on Kinetics and then fine-tuning each on HMDB-51 and UCF-101. The results suggest that there is always a boost in performance by pre-training, but the extent of the boost varies significantly with the type of architecture. Based on these findings, we introduce a new model that has the capacity to take advantage of pre-training on Kinetics, and can achieves a high performance. The model termed a “Two-Stream Inflated 3D ConvNets” (I3D), builds upon state-of-the-art image classification architectures, but inflates their filters and pooling kernels (and optionally their parameters) into 3D, leading to very deep, naturally spatiotemporal classifiers. An I3D model based on Inceptionv1 [13] obtains performance far exceeding the state-of-theart, after pre-training on Kinetics. In our model comparisons, we did not consider more classic approaches such as bag-of-visual-words representations [6, 19, 22, 33]. However, the Kinetics dataset is publicly available, so others can use it for such comparisons. The next section outlines the set of implemented action classification models. Section 3 gives an overview of the Kinetics dataset. Section 4 reports the performance of models on previous benchmarks and on Kinetics, and section 5 studies how well the features learned on Kinetics transfer to different datasets. The paper concludes with a discussion of the results. 2. Action Classification Architectures While the development of image representation architectures has matured quickly in recent years, there is still no clear front running architecture for video. Some of the major differences in current video architectures are whether the convolutional and layers operators use 2D (image-based) or 3D (video-based) kernels; whether the input to the network is just an RGB video or it also includes pre-computed optical flow; and, in the case of 2D ConvNets, how information is propagated across frames, which can be done either using temporally-recurrent layers such as LSTMs, or feature aggregation over time. In this paper we compare and study a subset of models that span most of this space. Among 2D ConvNet methods, we consider ConvNets with LSTMs on top [5, 37], and two-stream networks with two different types of stream fusion [8, 27]. We also consider a 3D ConvNet [14, 30]: C3D [31]. As the main technical contribution, we introduce TwoStream Inflated 3D ConvNets (I3D). Due to the highdimensionality of their parameterization and the lack of labeled video data, previous 3D ConvNets have been rela- tively shallow (up to 8 layers). Here we make the observation that very deep image classification networks, such as Inception [13], VGG-16 [28] and ResNet [12], can be trivially inflated into spatio-temporal feature extractors, and that their pre-trained weights provide a valuable initialization. We also find that a two-stream configuration is still useful. A graphical overview of the five types of architectures we evaluate is shown in figure 2 and the specification of their temporal interfaces is given in table 1. Many of these models (all but C3D) have an Imagenet pre-trained model as a subcomponent. Our experimental strategy assumes a common ImageNet pre-trained image classification architecture as back bone, and for this we chose Inception-v1 with batch normalization [13], and morph it in different ways. The expectation is that with this back bone in common, we will be able to tease apart those changes that benefit action classification the most. 2.1. The Old I: ConvNet+LSTM The high performance of image classification networks makes it appealing to try to reuse them with as minimal change as possible for video. This can be achieved by using them to extract features independently from each frame then pooling their predictions across the whole video [15]. This is in the spirit of bag of words image modeling approaches [19, 22, 33]; but while convenient in practice, it has the issue of entirely ignoring temporal structure (e.g. models can’t potentially distinguish opening from closing a door). In theory, a more satisfying approach is to add a recurrent layer to the model [5, 37], such as an LSTM, which can encode state, and capture temporal ordering and long range dependencies. We position an LSTM layer with batch normalization (as proposed by Cooijmans et al. [4]) after the last average pooling layer of Inception-V1, with 512 hidden units. A fully connected layer is added on top for the classifier. The model is trained using cross-entropy losses on the outputs at all time steps. During testing we consider only the output on the last frame. Input video frames are subsampled by keeping one out of every 5, from an original 25 frames-per-second stream. The full temporal footprint of all models is given in table 1. 2.2. The Old II: 3D ConvNets 3D ConvNets seem like a natural approach to video modeling, and are just like standard convolutional networks, but with spatio-temporal filters. They have been explored several times, previously [14, 30, 31, 32]. They have a very important characteristic: they directly create hierarchical representations of spatio-temporal data. One issue with these models is that they have many more parameters than 2D ConvNets because of the additional kernel dimension, and Figure 2. Video architectures considered in this paper. K stands for the total number of frames in a video, whereas N stands for a subset of neighboring frames of the video. this makes them harder to train. Also, they seem to preclude the benefits of ImageNet pre-training, and consequently previous work has defined relatively shallow custom architectures and trained them from scratch [14, 15, 30, 31]. Results on benchmarks have shown promise but have not been competitive with state-of-the-art, making this type of models a good candidate for evaluation on our larger dataset. For this paper we implemented a small variation of C3D [31], which has 8 convolutional layers, 5 pooling layers and 2 fully connected layers at the top. The inputs to the model are short 16-frame clips with 112 × 112-pixel crops as in the original implementation. Differently from [31] we used batch normalization after all convolutional and fully connected layers. Another difference to the original model is in the first pooling layer, we use a temporal stride of 2 instead of 1, which reduces the memory footprint and allows for bigger batches – this was important for batch normalization (especially after the fully connected layers, where there is no weight tying). Using this stride we were able to train with 15 videos per batch per GPU using standard K40 GPUs. 2.3. The Old III: Two-Stream Networks LSTMs on features from the last layers of ConvNets can model high-level variation, but may not be able to capture fine low-level motion which is critical in many cases. It is also expensive to train as it requires unrolling the network through multiple frames for backpropagation-through-time. A different, very practical approach, introduced by Simonyan and Zisserman [27], models short temporal snapshots of videos by averaging the predictions from a single RGB frame and a stack of 10 externally computed optical flow frames, after passing them through two replicas of an ImageNet pre-trained ConvNet. The flow stream has an adapted input convolutional layer with twice as many input channels as flow frames (because flow has two channels, horizontal and vertical), and at test time multiple snapshots are sampled from the video and the action prediction is averaged. This was shown to get very high performance on existing benchmarks, while being very efficient to train and test. A recent extension [8] fuses the spatial and flow streams after the last network convolutional layer, showing some improvement on HMDB while requiring less test time augmentation (snapshot sampling). Our implementation follows this paper approximately using Inception-V1. The inputs to the network are 5 consecutive RGB frames sampled 10 frames apart, as well as the corresponding optical flow snippets. The spatial and motion features before the last average pooling layer of Inception-V1 (5 × 7 × 7 feature grids, corresponding to time, x and y dimensions) are passed through a 3 × 3 × 3 3D convolutional layer with 512 output channels, followed by a 3 × 3 × 3 3D max-pooling layer and through a final fully connected layer. The weights of these new layers are initialized with Gaussian noise. Both models, the original two-stream and the 3D fused version, are trained end-to-end (including the two-stream averaging process in the original model). 2.4. The New: Two-Stream Inflated 3D ConvNets With this architecture, we show how 3D ConvNets can benefit from ImageNet 2D ConvNet designs and, optionally, from their learned parameters. We also adopt a twostream configuration here – it will be shown in section 4 that while 3D ConvNets can directly learn about temporal patterns from an RGB stream, their performance can still be greatly improved by including an optical-flow stream. Inflating 2D ConvNets into 3D. A number of very successful image classification architectures have been developed over the years, in part through painstaking trial and error. Instead of repeating the process for spatio-temporal models we propose to simply convert successful image (2D) classification models into 3D ConvNets. This can be done by starting with a 2D architecture, and inflating all the filters and pooling kernels – endowing them with an additional temporal dimension. Filters are typically square and we just make them cubic – N × N filters become N × N × N . Bootstrapping 3D filters from 2D Filters. Besides the architecture, one may also want to bootstrap parameters from the pre-trained ImageNet models. To do this, we observe that an image can be converted into a (boring) video by copying it repeatedly into a video sequence. The 3D models can then be implicitly pre-trained on ImageNet, by satisfying what we call the boring-video fixed point: the pooled activations on a boring video should be the same as on the original single-image input. This can be achieved, thanks to linearity, by repeating the weights of the 2D filters N times along the time dimension, and rescaling them by dividing by N . This ensures that the convolutional filter response is the same. Since the outputs of convolutional layers for boring videos are constant in time, the outputs of pointwise non-linearity layers and average and max-pooling layers are the same as for the 2D case, and hence the overall network response respects the boring-video fixed point. [21] studies other bootstrapping strategies. Pacing receptive field growth in space, time and network depth. The boring video fixed-point leaves ample freedom on how to inflate pooling operators along the time dimension and on how to set convolutional/pooling temporal stride – these are the primary factors that shape the size of feature receptive fields. Virtually all image models treat the two spatial dimensions (horizontal and vertical) equally – pooling kernels and strides are the same. This is quite natural and means that features deeper in the networks are equally affected by image locations increasingly far away in both dimensions. A symmetric receptive field is however not necessarily optimal when also considering time – this should depend on frame rate and image dimensions. If it grows too quickly in time relative to space, it may conflate edges from different objects breaking early feature detection, while if it grows too slowly, it may not capture scene dynamics well. In Inception-v1, the first convolutional layer has stride 2, then there are four max-pooling layers with stride 2 and a 7 × 7 average-pooling layer preceding the last linear clas- sification layer, besides the max-pooling layers in parallel Inception branches. In our experiments the input videos were processed at 25 frames per second; we found it helpful to not perform temporal pooling in the first two maxpooling layers (by using 1 × 3 × 3 kernels and stride 1 in time), while having symmetric kernels and strides in all other max-pooling layers. The final average pooling layer uses a 2 × 7 × 7 kernel. The overall architecture is shown in fig. 3. We train the model using 64-frame snippets and test using the whole videos, averaging predictions temporally. Two 3D Streams. While a 3D ConvNet should be able to learn motion features from RGB inputs directly, it still performs pure feedforward computation, whereas optical flow algorithms are in some sense recurrent (e.g. they perform iterative optimization for the flow fields). Perhaps because of this lack of recurrence, experimentally we still found it valuable to have a two-stream configuration – shown in fig. 2, e) – with one I3D network trained on RGB inputs, and another on flow inputs which carry optimized, smooth flow information. We trained the two networks separately and averaged their predictions at test time. 2.5. Implementation Details All models but the C3D-like 3D ConvNet use ImageNetpretrained Inception-V1 [13] as base network. For all architectures we follow each convolutional layer by a batch normalization [13] layer and a ReLU activation function, except for the last convolutional layers which produce the class scores for each network. Training on videos used standard SGD with momentum set to 0.9 in all cases, with synchronous parallelization across 32 GPUs for all models except the 3D ConvNets which receive a large number of input frames and hence require more GPUs to form large batches – we used 64 GPUs for these. We trained models on on Kinetics for 110k steps, with a 10x reduction of learning rate when validation loss saturated. We tuned the learning rate hyperparameter on the validation set of Kinetics. Models were trained for up to 5k steps on UCF-101 and HMDB-51 using a similar learning rate adaptation procedure as for Kinetics but using just 16 GPUs. All the models were implemented in TensorFlow [1]. Data augmentation is known to be of crucial importance for the performance of deep architectures. During training we used random cropping both spatially – resizing the smaller video side to 256 pixels, then randomly cropping a 224 × 224 patch – and temporally, when picking the starting frame among those early enough to guarantee a desired number of frames. For shorter videos, we looped the video as many times as necessary to satisfy each model’s input interface. We also applied random left-right flipping consistently for each video during training. During test time Figure 3. The Inflated Inception-V1 architecture (left) and its detailed inception submodule (right). The strides of convolution and pooling operators are 1 where not specified, and batch normalization layers, ReLu’s and the softmax at the end are not shown. The theoretical sizes of receptive field sizes for a few layers in the network are provided in the format “time,x,y” – the units are frames and pixels. The predictions are obtained convolutionally in time and averaged. Method ConvNet+LSTM 3D-ConvNet Two-Stream 3D-Fused Two-Stream I3D #Params 9M 79M 12M 39M 25M Training # Input Frames Temporal Footprint 25 rgb 5s 16 rgb 0.64s 1 rgb, 10 flow 0.4s 5 rgb, 50 flow 2s 64 rgb, 64 flow 2.56s Testing # Input Frames Temporal Footprint 50 rgb 10s 240 rgb 9.6s 25 rgb, 250 flow 10s 25 rgb, 250 flow 10s 250 rgb, 250 flow 10s Table 1. Number of parameters and temporal input sizes of the models. the models are applied convolutionally over the whole video taking 224 × 224 center crops, and the predictions are averaged. We briefly tried spatially-convolutional testing on the 256 × 256 videos, but did not observe improvement. Better performance could be obtained by also considering left-right flipped videos at test time and by adding additional augmentation, such as photometric, during training. We leave this to future work. We computed optical flow with a TV-L1 algorithm [38]. tions require more emphasis on the object to distinguish, for example playing different types of wind instruments. The dataset has 400 human action classes, with 400 or more clips for each class, each from a unique video, for a total of 240k training videos. The clips last around 10s, and there are no untrimmed videos. The test set consists of 100 clips for each class. A full description of the dataset and how it was built is given in [16]. 4. Experimental Comparison of Architectures 3. The Kinetics Human Action Video Dataset The Kinetics dataset is focused on human actions (rather than activities or events). The list of action classes covers: Person Actions (singular), e.g. drawing, drinking, laughing, punching; Person-Person Actions, e.g. hugging, kissing, shaking hands; and, Person-Object Actions, e.g. opening presents, mowing lawn, washing dishes. Some actions are fine grained and require temporal reasoning to distinguish, for example different types of swimming. Other ac- In this section we compare the performance of the five architectures described in section 2 whilst varying the dataset used for training and testing. Table 2 shows the classification accuracy when training and testing on either UCF-101, HMDB-51 or Kinetics. We test on the split 1 test sets of UCF-101 and HMDB-51 and on the held-out test set of Kinetics. There are several noteworthy observations. First, our new I3D models do best in all datasets, with either RGB, flow, or RGB+flow modali- Architecture (a) LSTM (b) 3D-ConvNet (c) Two-Stream (d) 3D-Fused (e) Two-Stream I3D RGB 81.0 51.6 83.6 83.2 84.5 UCF-101 Flow RGB + Flow – – – – 85.6 91.2 85.8 89.3 90.6 93.4 RGB 36.0 24.3 43.2 49.2 49.8 HMDB-51 Flow RGB + Flow – – – – 56.3 58.3 55.5 56.8 61.9 66.4 RGB 63.3 56.1 62.2 – 71.1 Kinetics Flow RGB + Flow – – – – 52.4 65.6 – 67.2 63.4 74.2 Table 2. Architecture comparison: (left) training and testing on split 1 of UCF-101; (middle) training and testing on split 1 of HMDB-51; (right) training and testing on Kinetics. All models are based on ImageNet pre-trained Inception-v1, except 3D-ConvNet, a C3D-like [31] model which has a custom architecture and was trained here from scratch. Note that the Two-Stream architecture numbers on individual RGB and Flow streams can be interpreted as a simple baseline which applies a ConvNet independently on 25 uniformly sampled frames then averages the predictions. Architecture (a) LSTM (b) 3D-ConvNet (c) Two-Stream (d) 3D-Fused (e) Two-Stream I3D RGB 53.9 56.1 57.9 – 68.4 (88.0) Kinetics Flow – – 49.6 – 61.5 (83.4) RGB + Flow – – 62.8 62.7 71.6 (90.0) ImageNet then Kinetics RGB Flow RGB + Flow 63.3 – – – – – 62.2 52.4 65.6 – – 67.2 71.1 (89.3) 63.4 (84.9) 74.2 (91.3) Table 3. Performance training and testing on Kinetics with and without ImageNet pretraining. Numbers in brackets () are the Top-5 accuracy, all others are Top-1. ties. This is interesting, given its very large number of parameters and that UCF-101 and HMDB-51 are so small, and shows that the benefits of ImageNet pre-training can extend to 3D ConvNets. Second, the performance of all models is far lower on Kinetics than on UCF-101, an indication of the different levels of difficulty of the two datasets. It is however higher than on HMDB-51; this may be in part due to lack of training data in HMDB-51 but also because this dataset was purposefully built to be hard: many clips have different actions in the exact same scene (e.g. “drawing sword” examples are taken from same videos as “sword” and “sword exercise”). Third, the ranking of the different architectures is mostly consistent. Additionally, two-stream architectures exhibit superior performance on all datasets, but the relative value of RGB and flow differs significantly between Kinetics and the other datasets. The contribution from flow alone, is slightly higher than that of RGB on UCF-101, much higher on HMDB-51, and substantially lower on Kinetics. Visual inspection of the datasets suggests that Kinetics has much more camera motion which may make the job of the motion stream harder. The I3D model seems able to get more out of the flow stream than the other models, however, which can probably be explained by its much longer temporal receptive field (64 frames vs 10 during training) and more integrated temporal feature extraction machinery. While it seems plausible that the RGB stream has more discriminative information – we often struggled with our own eyes to discern actions from flow alone in Kinetics, and this was rarely the case from RGB – there may be opportunities for future research on integrating some form of motion stabilization into these architectures. We also evaluated the value of training models in Kinetics starting from ImageNet-pretrained weights versus from scratch – the results are shown in table 3. It can be seen that ImageNet pre-training still helps in all cases and this is slightly more noticeable for the RGB streams, as would be expected. 5. Experimental Evaluation of Features In this section we investigate the generalizability of the networks trained on Kinetics. We consider two measures of this: first, we freeze the network weights and use the network to produce features for the (unseen) videos of the UCF-101/HMDB-51 datasets. We then train multi-way soft-max classifiers for the classes of UCF-101/HMDB-51 (using their training data), and evaluate on their test sets; Second, we fine-tune each network for the UCF-101/HMDB-51 classes (using the UCF101/HMDB-51 training data), and again evaluate on the UCF-101/HMDB-51 test sets. We also examine how important it is to pre-train on ImageNet+Kinetics instead of just Kinetics. Figure 4. All 64 conv1 filters of each Inflated 3D ConvNet after training on Kinetics (the filter dimensions are 7 × 7 × 7, and the 7 time dimensions are shown left-to-right across the figure). The sequence on top shows the flow network filters, the one in the middle shows filters from the RGB I3D network, and the bottom row shows the original Inception-v1 filters. Note that the I3D filters possess rich temporal structure. Curiously the filters of the flow network are closer to the original ImageNet-trained Inception-v1 filters, while the filters in the RGB I3D network are no longer recognizable. Best seen on the computer, in colour and zoomed in. The results are given in table 4. The clear outcome is that all architectures benefit from pre-training on the additional video data of Kinetics, but some benefit significantly more than the others – notably the I3D-ConvNet and 3D-ConvNet (although the latter starting from a much lower base). Training just the last layers of the models after pretraining in Kinetics (Fixed) also leads to much better performance than directly training on UCF-101 and HMDB-51 for I3D models. One explanation for the significant better transferability of features of I3D models is their high temporal resolution – they are trained on 64-frame video snippets at 25 frames per second and process all video frames at test time, which makes it possible for them to capture fine-grained temporal structure of actions. Stated differently, methods with sparser video inputs may benefit less from training on this large video dataset because, from their perspective, videos do not differ as much from the images in ImageNet. The difference over the C3D-like model can be explained by our I3D models being much deeper, while having much fewer parameters, by leveraging an ImageNet warm-start, by being trained on 4× longer videos, and by operating on 2× higher spatial resolution videos. The performance of the two-stream models is surpris- ingly good even when trained from scratch (without ImageNet or Kinetics), mainly due to the accuracy of the flow stream, which seems much less prone to overfitting (not shown). Kinetics pretraining helps significantly more than ImageNet. 5.1. Comparison with the State-of-the-Art We show a comparison of the performance of I3D models and previous state-of-the-art methods in table 5, on UCF-101 and HMDB-51. We include results when pretraining on the Kinetics dataset (with and without ImageNet pre-training). The conv1 filters of the trained models are shown in fig. 4. Many methods get similar results, but the best performing method on these datasets is currently the one by Feichtenhofer and colleagues [7], which uses ResNet-50 models on RGB and optical flow streams, and gets 94.6% on UCF-101 and 70.3% on HMDB-51 when combined with the dense trajectories model [33]. We benchmarked our methods using the mean accuracy over the three standard train/test splits. Either of our RGB-I3D or RGB-Flow models alone, when pre-trained on Kinetics, outperforms all previous published performance by any model or model combinations. Our combined two-stream architecture widens Architecture (a) LSTM (b) 3D-ConvNet (c) Two-Stream (d) 3D-Fused (e) Two-Stream I3D Original 81.0 / 54.2 – / 51.6 91.2 / 83.6 89.3 / 69.5 93.4 / 88.8 UCF-101 Fixed 88.1 / 82.6 – / 76.0 93.9 / 93.3 94.3 / 89.8 97.7 / 97.4 Full-FT 91.0 / 86.8 – / 79.9 94.2 / 93.8 94.2 / 91.5 98.0 / 97.6 Original 36.0 / 18.3 – / 24.3 58.3 / 47.1 56.8 / 37.3 66.4 / 62.2 HMDB-51 Fixed 50.8 / 47.1 – / 47.0 66.6 / 65.9 69.9 / 64.6 79.7 / 78.6 Full-FT 53.4 / 49.7 – / 49.4 66.6 / 64.3 71.0 / 66.5 81.2 / 81.3 Table 4. Performance on the UCF-101 and HMDB-51 test sets (split 1 of both) for architectures starting with / without ImageNet pretrained weights. Original: train on UCF-101 or HMDB-51; Fixed: features from Kinetics, with the last layer trained on UCF-101 or HMDB-51; Full-FT: Kinetics pre-training with end-to-end fine-tuning on UCF-101 or HMDB-51. Model Two-Stream [27] IDT [33] Dynamic Image Networks + IDT [2] TDD + IDT [34] Two-Stream Fusion + IDT [8] Temporal Segment Networks [35] ST-ResNet + IDT [7] Deep Networks [15], Sports 1M pre-training C3D one network [31], Sports 1M pre-training C3D ensemble [31], Sports 1M pre-training C3D ensemble + IDT [31], Sports 1M pre-training RGB-I3D, Imagenet+Kinetics pre-training Flow-I3D, Imagenet+Kinetics pre-training Two-Stream I3D, Imagenet+Kinetics pre-training RGB-I3D, Kinetics pre-training Flow-I3D, Kinetics pre-training Two-Stream I3D, Kinetics pre-training UCF-101 88.0 86.4 89.1 91.5 93.5 94.2 94.6 65.2 82.3 85.2 90.1 95.6 96.7 98.0 95.1 96.5 97.8 HMDB-51 59.4 61.7 65.2 65.9 69.2 69.4 70.3 74.8 77.1 80.7 74.3 77.3 80.9 Table 5. Comparison with state-of-the-art on the UCF-101 and HMDB-51 datasets, averaged over three splits. First set of rows contains results of models trained without labeled external data. the advantage over previous models considerably, bringing overall performance to 98.0 on UCF-101 and 80.9 on HMDB-51, which correspond to 63% and 35% misclassification reductions, respectively compared to the best previous model [7]. The difference between Kinetics pre-trained I3D models and prior 3D ConvNets (C3D) is even larger, although C3D is trained on more videos, 1M examples from Sports1M plus an internal dataset, and even when ensembled and combined with IDT. This may be explainable by the better quality of Kinetics but also because of I3D simply being a better architecture. 6. Discussion We return to the question posed in the introduction, “is there a benefit in transfer learning from videos?”. It is evident that there is a considerable benefit in pre-training on (the large video dataset) Kinetics, just as there has been such benefits in pre-training ConvNets on ImageNet for so many tasks. This demonstrates transfer learning from one dataset (Kinetics) to another dataset (UCF-101/HMDB-51) for a similar task (albeit for different action classes). However, it still remains to be seen if there is a benefit in using Kinetics pre-training for other video tasks such as semantic video segmentation, video object detection, or optical flow computation. We plan to make publicly available I3D models trained on the official Kinetics dataset’s release to facilitate research in this area. Of course, we did not perform a comprehensive exploration of architectures – for example we have not employed action tubes [11, 17] or attention mechanisms [20] to focus in on the human actors. Recent works have proposed imaginative methods for determining the spatial and temporal extent (detection) of actors within the two-stream architectures, by incorporating linked object detections in time [24, 26]. The relationship between space and time is a mysterious one. Several very creative papers have recently gone out of the box in attempts to capture this relationship, for example by learning frame ranking functions for action classes and using these as a representation [9], by making analogies between actions and transformations [36], or by creating 2D visual snapshots of frame sequences [2] – this idea is related to the classic motion history work of [3]. It would be of great value to also include these models in our comparison but we could not, due to lack of time and space. Acknowledgements: We would like to thank everyone on the Kinetics project and in particular Brian Zhang and Tim Green for help setting up the data for our experiments, and Karen Simonyan for helpful discussions. [11] [12] [13] [14] [15] References [1] M. Abadi, A. Agarwal, P. Barham, E. Brevdo, Z. Chen, C. Citro, G. S. Corrado, A. Davis, J. Dean, M. Devin, et al. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv:1603.04467, 2016. [2] H. Bilen, B. Fernando, E. Gavves, A. Vedaldi, and S. Gould. Dynamic image networks for action recognition. In IEEE International Conference on Computer Vision and Pattern Recognition CVPR, 2016. [3] A. F. Bobick and J. W. Davis. The recognition of human movement using temporal templates. IEEE Transactions on pattern analysis and machine intelligence, 23(3):257–267, 2001. [4] T. Cooijmans, N. Ballas, C. Laurent, and A. Courville. Recurrent batch normalization. arXiv preprint arXiv:1603.09025, 2016. [5] 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 Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2625–2634, 2015. [6] A. Fathi and G. Mori. Action recognition by learning midlevel motion features. In Computer Vision and Pattern Recognition, 2008. CVPR 2008. IEEE Conference on, pages 1–8. IEEE, 2008. [7] C. Feichtenhofer, A. Pinz, and R. P. Wildes. Spatiotemporal residual networks for video action recognition. arXiv preprint arXiv:1611.02155, 2016. [8] C. Feichtenhofer, A. Pinz, and A. Zisserman. Convolutional two-stream network fusion for video action recognition. In IEEE International Conference on Computer Vision and Pattern Recognition CVPR, 2016. [9] B. Fernando, E. Gavves, J. M. Oramas, A. Ghodrati, and T. Tuytelaars. Modeling video evolution for action recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5378–5387, 2015. [10] R. Girshick, J. Donahue, T. Darrell, and J. Malik. Rich feature hierarchies for accurate object detection and semantic [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 580–587, 2014. G. Gkioxari and J. Malik. Finding action tubes. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 759–768, 2015. K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Computer Vision and Pattern Recognition (CVPR), 2016 IEEE Conference on, 2016. S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. S. Ji, W. Xu, M. Yang, and K. Yu. 3d convolutional neural networks for human action recognition. IEEE transactions on pattern analysis and machine intelligence, 35(1):221– 231, 2013. A. Karpathy, G. Toderici, S. Shetty, T. Leung, R. Sukthankar, and L. Fei-Fei. Large-scale video classification with convolutional neural networks. In Proceedings of the IEEE conference on Computer Vision and Pattern Recognition, pages 1725–1732, 2014. W. Kay, J. Carreira, K. Simonyan, B. Zhang, C. Hillier, S. Vijayanarasimhan, F. Viola, T. Green, T. Back, P. Natsev, M. Suleyman, and A. Zisserman. The kinetics human action video dataset. arXiv preprint arXiv:1705.06950, 2017. A. Kläser, M. Marszalek, C. Schmid, and A. Zisserman. Human focused action localization in video. In International Workshop on Sign, Gesture, Activity, ECCV 2010, 2010. H. Kuehne, H. Jhuang, E. Garrote, T. Poggio, and T. Serre. HMDB: a large video database for human motion recognition. In Proceedings of the International Conference on Computer Vision (ICCV), 2011. I. Laptev, M. Marszalek, C. Schmid, and B. Rozenfeld. Learning realistic human actions from movies. In Computer Vision and Pattern Recognition, 2008. CVPR 2008. IEEE Conference on, pages 1–8. IEEE, 2008. Z. Li, E. Gavves, M. Jain, and C. G. Snoek. VideoLSTM convolves, attends and flows for action recognition. arXiv preprint arXiv:1607.01794, 2016. E. Mansimov, N. Srivastava, and R. Salakhutdinov. Initialization strategies of spatio-temporal convolutional neural networks. CoRR, abs/1503.07274, 2015. J. C. Niebles, H. Wang, and L. Fei-Fei. Unsupervised learning of human action categories using spatial-temporal words. International journal of computer vision, 79(3):299–318, 2008. M. Oquab, L. Bottou, I. Laptev, and J. Sivic. Learning and transferring mid-level image representations using convolutional neural networks. 2014 IEEE Conference on Computer Vision and Pattern Recognition, pages 1717–1724, 2014. X. Peng and C. Schmid. Multi-region two-stream R-CNN for action detection. In European Conference on Computer Vision, pages 744–759. Springer, 2016. 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. S. Saha, G. Singh, M. Sapienza, P. H. Torr, and F. Cuzzolin. Deep learning for detecting multiple space-time action tubes [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] in videos. British Machine Vision Conference (BMVC) 2016, 2016. K. Simonyan and A. Zisserman. Two-stream convolutional networks for action recognition in videos. In Advances in Neural Information Processing Systems, pages 568–576, 2014. K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. K. Soomro, A. R. Zamir, and M. Shah. UCF101: A dataset of 101 human actions classes from videos in the wild. arXiv preprint arXiv:1212.0402, 2012. G. W. Taylor, R. Fergus, Y. LeCun, and C. Bregler. Convolutional learning of spatio-temporal features. In European conference on computer vision, pages 140–153. Springer, 2010. D. Tran, L. Bourdev, R. Fergus, L. Torresani, and M. Paluri. Learning spatiotemporal features with 3d convolutional networks. In 2015 IEEE International Conference on Computer Vision (ICCV), pages 4489–4497. IEEE, 2015. G. Varol, I. Laptev, and C. Schmid. Long-term temporal convolutions for action recognition. IEEE transactions on pattern analysis and machine intelligence, 2017. H. Wang and C. Schmid. Action recognition with improved trajectories. In International Conference on Computer Vision, 2013. L. Wang, Y. Qiao, and X. Tang. Action recognition with trajectory-pooled deep-convolutional descriptors. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4305–4314, 2015. L. Wang, Y. Xiong, Z. Wang, Y. Qiao, D. Lin, X. Tang, and L. Van Gool. Temporal segment networks: towards good practices for deep action recognition. In European Conference on Computer Vision, 2016. X. Wang, A. Farhadi, and A. Gupta. Actions˜ transformations. arXiv preprint arXiv:1512.00795, 2015. J. Yue-Hei Ng, M. Hausknecht, S. Vijayanarasimhan, O. Vinyals, R. Monga, and G. Toderici. Beyond short snippets: Deep networks for video classification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4694–4702, 2015. C. Zach, T. Pock, and H. Bischof. A duality based approach for realtime TV-L1 optical flow. Pattern Recognition, pages 214–223, 2007.
1cs.CV