S Ducasse

L Dargaud

G Polito

Microdown: a clean and extensible markup language to support Pharo documentation

Markdown is imposing itself as a defacto standard for wiki-like syntax. However, building a Markdown implementation that correctly interacts with other implementations requires a careful design. First, Markdown clumsily proposes multiple syntaxes for the same elements. Second, there is a Markdown specification but many different sub-specifications and implementations, each of them with different super/sub-sets, where github Markdown is one of the most knowns. The Markdown standard does not support many features that are important for book writing such as anchor definition, figure and code block parameters. Finally, it does not offer coherent and systematic extension mechanisms.

In this article we present Microdown. Microdown is a clean subset of Markdown introducing clean extension mechanisms as proposed in Pillar. The objective of Microdown is to have a syntax compatible with most of the existing markdown implementations, extensible, usable for book writings, and non-ambiguous. Microdown is the foundation for class and package comments in Pharo image as well as full book and documentation.

INTRODUCTION

There are many different markup languages to describe documents such as ASCIIDoc, Pandoc, Markdown, and the less known Pillar [START_REF] Thibault Arloing | Pillar: A versatile and extensible lightweight markup language[END_REF] (inspired from the original Wiki via the SmallWiki implementation [START_REF] Ducasse | SmallWiki -a metadescribed collaborative content management system[END_REF] and in use since 2002). Among all these options, Markdown is imposing itself as a defacto standard for wikilike syntax. Markdown is a lightweight markup language declined in many implementations and supported by many tools, for example with Github Markdown and its related online editing and 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 permissions@acm.org. IWST '20, Sept, 2020, Virtual © 2020 Association for Computing Machinery.

https://doi.org/xxxxxxx render tools. The fact that Github uses markdown for its online documentation is massively promoting Markdown.

However, Markdown is clumsy. It proposes multiple syntaxes for the same elements. In addition, it does not support many important features mandatory for books or structured documents such as explicit anchor definition, references to figures and code elements. Finally, it does not offer coherent and systematic extension mechanisms. This leads to Markdown dialects such as MarkDeep1 that is a kitchen sink of features.

In this article, we present Microdown: a markup language based on Markdown. Microdown takes the good pieces of Markdown so that developers write class comments with a familiar syntax, and this familiar syntax renders well in existing tools such as Github online renderers. Also, Microdown proposes extensions and a flexible extension mechanisms to produce books, slides and websites such as compilation chains like Pillar (http://github.com/pillar-markup/).

Contrary to Markdown extensions such as MarkDeep, the design of Microdown is to have a small core in the spirit of Smalltalk design, but with the extra constraint of supporting the main elements of Markdown. Such minimality but also the familiarity with Markdown lower the user cognitive load but also of the maintenance of the project.

Finally Microdown fulfils three important goals for Pharo: (1) first it is the foundation to support the writing of better class and package comments. Pharo uses it as a structured text and renders such elements using rich text rendering, (2) all the Pharo external documentations such as books, booklets will be migrated to Microdown to support on the fly loading and in image browsing, and

(3) all documentation written in Pharo will integrate more easily, and up to some extent, with external Markdown-related tools. With Microdown we unify the syntax for comments and for books while keeping familiarity for users.

The article is structured as follows: first we describe some of the limits of Markdown and the interesting features of Pillar. Second we stress the design constraints we followed while designing Microdown. Then we present Microdown from a user perspective and finally we show how Microdown will be used in Pharo 90. At the time of writing this article the Pillar toolchain is under adaptation to use Microdown as syntax for books.

MARKDOWN'S LIMITS

In this section we sketch the key limits of Markdown. Some blogs such as https://medium.com/@Mister_Gold/stop-using-markdown-fordocumentation-5bda05ad17e3 identifies similar limits.

Multiple ways to express the same element

Markdown proposes multiple syntaxes to represent an element such as a header. It means that different users may use different variations and get alienated when reading other variations. For example, Listing 1 shows two different syntaxes to define headings of different levels.

# Heading level 1 ## Heading level 2

Heading level 1 =============== Heading level 2 ---------------Listing 1: Different syntax for headers in Markdown Markdown also supports a lazy mode where some blocks separated by a newline are render as a single one. For example, Listing 2 shows two blockquotes in Markdown that will be merged in a single one because of the lazy mode. Such mode could be good idea but makes users producing documents with mixed types and writing conventions. Some Markdown implementations do even support extensions to disable such behaviour 2 . > This is a blockquote. > On multiple lines. That may be lazy. > > This is the second paragraph.

Listing 2: Lazy mode in Markdown merges two blocks separated by a new line Having a single syntax without optional (lazy) markup usage for a concept is better since it supports the generation of a more coherent body of documents. In addition it simplifies the parser.

Fuzzy evaluation semantics

Even if Github's Markdown has a specification as the one available in https://github.github.com/gfm the evaluation semantics of the blocks that compose the language is sometimes unclear. The presence of elements such as blockquotes given its proposed semantics looks like it is available only because the renderer does highlighting or emphasizes the text. However, blockquotes accept nested elements such as a headers or other blockquotes recursively, but the definition of some elements such as references inside nested blockquotes is totally unclear (Listing 3).

Serious lack of key features

Markdown does not support many important features such as explicit anchor definition. Instead, the writer is forced to change all its references each time a header is changed. Also, figures and code blocks cannot be referred to. They cannot have parameters such as caption for code block or width for figures. This means that the underlying model cannot be efficiently used to generate parametrizable LaTeX.

No extension mechanisms

Markdowm does not offer coherent and systematic extension mechanisms. In Pillar, as we will show in section 3, there are two simple yet powerful extension mechanisms that plugins can define:

Annotations. Pillar supports the definition of new complex annotations. For example, ${citation=Duca99a|file=rmod.bib}$ is the definition of a citation with arguments in Pillar syntax. Environments. New environments can be defined.

KEY PILLAR FEATURES

Pillar is a document edition toolkit using the a syntax based on the one of Pier (which is the evolution of SmallWiki [START_REF] Ducasse | SmallWiki -a metadescribed collaborative content management system[END_REF]). The syntax was heavily influenced by the syntax of the original Wiki developed by W. Cunningham. In addition, Pier and Pillar introduced specific extension mechanisms not found in the original Wiki syntax because Pillar was designed to support book writing.

The Pillar syntax supports the traditional features such as: header, list (three kinds), internal links, figures with parameters (to specify anchors, size and any other information), preformatted, paragraph with different formattings, and tables.

In addition Pillar supports features not found in Markdown as listed below and shown in Figure 12: • Anchors. Figures, environments (mathematical environments, environments or code blocks) and headers can define an anchor that can then be referred by links. • Annotations. Annotations, defined using ${ and }$ in text, delimit a tag and a list of parameters. They represent an element not supported by default in the core of Pillar. In Listing 12 inputFile is an annotation for input files. Annotations are used in Pillar to support footnote, slides, columns, citations. A plugin expands its annotations into companion structures that can be handled by various engines (expressed as visitors).

• Environments. Environments are similar to annotations but they define document structure. They contain other elements such as headers, paragraph. They are similar to LaTeX environments: they have a start, an end and support parameters to customize them. • Meta-data. Even if annotations could support the definition of metadata Pillar offers a specific syntax for them.

Pillar has been successfully used for wiki, full books, slides, and static web sites.

MICRODOWN DESIGN PRINCIPLES

The idea behind Microdown is not to invent yet another markup language but to make the Pillar toolkit more familiar for new users. In other words, Microdown introduces a more powerful and leaner Markdown. Pillar's features and design have proven to be good to support our objectives (in the past slides, books, comments and websites got built with Pillar) 3 . Still, there are several main forces that shape the design of Microdown:

(1) Strong similarity to Markdown. It means in particular that Microdown should be subset of Markdown. The idea is that developers should be able to write in a subset of markdown package comments and Pharo browsers can import and display it. The implications are strong. It means that some key elements such as header, links, figures, lists, codeblocks, should be the same syntactically. Even quoteblock whose semantics is unclear should be supported since developers are using them to highlight information. As a general principle we took, even with some reluctance, the Markdown syntax when an element was present in Markdown.

(2) Small uniform core. Having a profusion of syntax and markups is possible -MarkDeep is a typical example of this.

While such an approach is a possible path, we refrain to take it because we want to make sure that we get the essence of a document so that the same document can be displayed in multiple supports. In addition, we do not want to overwhelm Microdown writers. They also should not be alienated when reading documents written in a specific subset. The uniformity of the corpus is an important design decision. Finally we want to have the simplest implementation possible for maintenance reasons.

3 Pillar did not reach a strong visibility. In part due to the niche aspect of Smalltalk.

(3) Extensible (supporting books, web sites, comments).

Microdown should offer evolutions and the design of specific plugins within the same syntax. The experience of Pillar books and slides proved that this is possible to build this on top of a small core.

A tolerant parser to handle Microdown-Markdown mismatches. Although Microdown was designed thinking on Markdown, not all the syntactic alternatives of Markdown are supported by Microdown, and Microdown extensions are not supported by Markdown. This causes a mismatch between both markup languages. We have chosen to handle these cases in the same way Markdown implementations do: use a more tolerant parser.

When developers use features not supported by Microdown, the Microdown parser will parse it as plain text. Microdown writers then get immediate feedback in the in-image tools that do not display them nicely.

MICRODOWN IN A NUTSHELL

We present briefly the Microdown syntax. We show the selected Markdown elements and the new syntax introduced for the extensions. In addition we use the following terminology: we name block elements those elements that start in a line and may span multiple lines (header, section, paragraph, lists...), and intext elements those elements that start and end in the same line such as bold. Block elements elements may contain intext elements, but the inverse does not hold. Intext elements may contain other intext elements. Listing 5 shows an example of all these elements.

Microdown as Markdown or Pillar is based on the identification of a block type based on the first line of the block. But discussed later, the Microdown parsing approach is more robust than Pillar since it follows the Markdown design that scope intext markup termination to block end.

Mimicking Markdown

The basic principle for Microdown is to follow Markdown when the element is available in Markdown. But it supports only one syntax for one element where possible, and does not support lazy mode.

The following block elements are available in Microdown.

Horizontal line. A horizontal line is defined by three stars. Headers. Headers in Microdown are defined as 1 to 6 # sign followed by the title of the section. Code blocks. Code blocks are defined using 3 back ticks but in addition support for parameters is available. Ordered lists. Ordered lists follow the digit period syntax. Unordered lists. Unordered lists accept the three markdown syntaxes *, -and + but we consider only keeping the first two.

Having two options is good for nesting lists but we consider that using multiple nesting level is in general a bad style.

The nested list spacing follows the idea that the markup should be aligned of Markdown (it requires two spaces for unordered and three for ordered lists).

Figures. Figures use the Markdown syntax but in addition support

parameters as URL parameters, delimited by a ? as shown in Listing 5. There we see that a figure can define a size and a label (anchor) that can explicitly referenced by inline references presented below. We are considering using anchor instead of label (which is inherited from LaTeX) to be more regular and close to the anchor block that we introduce (See next Section). Blockquotes. Blockquotes are syntactically supported using the greater than sign on each line Microdown does not do recursive parsing. In addition, Microdown does render blockquotes closer to preformatted blocks than to quotes. Tables. Tables follow Github Markdown table extensions but with a stricter form. While in Github Markdown some information in tables is optional, we decided that in Microdown information should be systematically provided. This simplifies the Microdown parser while making all Microdown tables compatible with Github Mardown tables. We plan to support right, left and centred as in Pillar.

The following intext elements are kept from Markdown.

Links. Links use the Markdown syntax (...)[url+params] but variables are not supported and will be interpreted as plain text. This point avoids to have a define a scope and other language rules for an optional feature. Formatting. For in text markup, Microdown supports monospace with one backtick, bold with ** and italic with _. We decided not to support anymore Pillar subscript, superscript and strike since they are barely used. Listing 5: Markdown selected and extended features.

Microdown

In addition to the essential Markdown elements mentioned above that are extended to support parameters (codeblocks, figures and links), Microdown introduces several Pillar elements: comments, anchors, references, annotations in text, environments, metadata and math block elements as well as in text as shown in Listing 6. These elements support building advanced documents such as books and slides, and will be usually ignored and rendered as plain text by other Markdown tools.

The following block elements are available in Microdown.

Comments. % as first element identifies that the line is a comment.

Anchors. An anchor is a way to make a block element the target of a reference. The main basic usage is for sections. An anchor is a block element and follows the Pillar definition @anchor Mathematical environment. A mathematical environment is a block accepting LaTeX math syntax and parameters. They are delimited by $. Meta-data. Microdown express meta-data as STON expressions [CDF + 15]. Syntactically they are delimited by { and }. Environments. An environment is a named block containing potentially other blocks. Microdown syntax for environment is <? and ?>. Environments are not fully stabilised and will probably slightly be changed when the slide support will be migrated from Pillar to Microdown. Currently the use of <? has been favored because it is similar to the one of intext annotations which are the equivalent to environments in intext. Environments are an important extension point. New elements can be supported without introducing new syntax. The following intext elements are kept from Markdown. Since blocks and intext markups live in different scope we decided to reuse when possible the markups. This is the case for math intext and annotations.

References. A reference, syntactically identified by *@mysection@* (we used @ for looks closer to anchors definition), refers to anchors, figures, code blocks, environment and math environments.

Annotations. An annotation is a tagged markup with parameters.

They are delimited by <? and ?> as shown by the footnote in Listing 6. With annotations, Microdown can be extended without the need for introducing new syntactical elements. Intext math. Intext math uses the same markups than the math environment one, i.e., $ and accepts plain math as in LaTeX.

%This comment allows us to say that @level1 is an anchor for the section.

# This is a level 1 section @level1 Microdown supports annotations <?footnote | value=A foonote is an annotation.?> in text. Microdown supports reference to anchor *@level1@* and figures (see

MICRODOWN USES

This section shows the current use of Microdown. Such use is not specific to Microdown and another markup language could be used. Nevertheless we show it since in Pharo 9.0, class and package comments will use Microdown as description language. We expect that having better looking comments will encourage developers to write better comments -This hypothesis will take several years to be validated and it is not the focus of the current article.

Supporting Nicer Class/Package Comments

Figure 1 shows a class comment in Microdown. Browsers have been extended to support a nicer rendering of such comments with hyperlink to web resources but also in image entities such as classes, methods or packages. Figure 2 shows the same comments displayed the user. Figure 3 shows the rendering of a comment using mathematical expressions.

About Hyperlinks to in Image Entities

In addition to displaying comments with a nicer output, the rendering engine takes care to support hyperlinks for navigation. To the question of the introduction of a specific markup or markup family at the level of Microdown, we decided not to modify Microdown but to enhance the rendering engine to analyse monospace in text and identify when the marked text corresponds to a class, package, method name.

The following conventions are used:

• For class, the analysis is simple: it checks the class name.

Hence 'Point' is a link to the Point class. Metaclasses are similarly supported: 'Point class' is a link to the Point class. • For methods, the analysis supports the exact syntax of direct compiled method access: Point class » #r:degrees:. Clicking 'Point class » #r:degrees:' will bring a message browser on the method r:degrees:. • For the package, Pharo does not propose any specific syntax.

We decided to support the syntax #'Refactoring-Core' to represent navigation to the corresponding package. When the analysis does not find any of the patterns above, the text is displayed using the monospace conventions.

The net result is that:

• We limit the number of extensions.

• Pharo users can navigate fast and get benefit from Microdown use. • When the text is edited or rendered with another engine, we do not end up with an orphan (not treated) element.

Class and Package Level Templates

Even if packages are represented as a class, their comments are important. Since comments are attached to classes representing different concepts such as test cases, project definitions (Metacello Baselines), traits or packages, we designed a templating mechanism.

At the meta-level, packages, classes, traits, baselines and test classes define specific comment templates. Users then can extend those templates with comments specific to the commented class. Figure 4 shows that the comments of a test case shows immediately the list of tests. Figure 5 shows that in case of Metacello project Baselines (and similarly for packages containing a baseline) the template displays the baseline definition since it is the most important information.

The fact that the displayed information is queried from the actual

A System Customisation Hook

A Microdown builder is available to let user define and extend the templates without having to be concerned about the production of correct Microdown text. The builder encapsulates the textual representation of the elements.

In addition, we introduced the hook buildMicroDownUsing: aBuilder withComment: aMicrodownString and customized it on packages, classes, baselines, traits and test cases to be able to customize the information that they display. Listing 7 shows the template definition, in particular a baseline shows its baseline automatically as shown in Figure 5. Similarly Listing 8 shows that when browsing a package, the template looks for the companion baseline to display the baseline as shown in Figure 5.

Microdown AST

The Microdown AST is decomposed in two main groups: the block level elements such as comment, lists, and the intrablock elements such as bold, link... Block-Level Elements. Listing 9 shows the hierarchy of the Microdown block-level element. Only the leaves of the inheritance tree are instantiated and represent a document.

The Microdown parser does not accept lazy definition of element parts. In addition, there is only one way to do something, except for bulleted list where * andare accepted for compatibility with Markdown.

The Microdown parser follows the Markdown parsing approach in which the first line of a block allows the identification of a block. In addition, Microdown takes advantage of the Markdown parsing approach in which a block delimits a context in which intext elements are scoped. This approach limits error propagation, makes the parser more robust and provides an overall nice user experience.

Block-based contexts

Microdown implementation follows the design described in https: //github.github.com/gfm, in particular the parsing strategy.

In short, the strategy is that at any point in time, we might have a number of children of the root which are open. The deepest open one in the tree is called current. All the parents of current are open.

When a new line is read we do the following:

(1) Check if the new line can be consumed by current. As part of this, a child of current can be made which can consume the new line. For example, when consuming "' the root block node will create, a new code block that will become current and consume the body of the "' element then will close. (2) If current cannot consume the new line, we close current, move current to its parent, and repeat 1.

(3) The root node can consume anything, for instance by making new nodes for storing the new line. (4) The root node is not closed until input is exhausted.

The following listing 11 is the core logic. Each block level element redefines canConsumeLine: and in combinaison with addLin-eAndReturnNextNode: implements a kind of state machine of the acceptance of new children by the current element. Listing 11: Microdown parsing logic.

Handling of broken formatting

The logic for handling broken formatting e.g., opened but not closed or closed without an opening is an important point for simple markups. It limits the propagation of an error to a block. An error cannot span further down elements and provides a stability in document processing by handling locally error.

Let us illustrate this point by comparing with Pillar parsing approach. The Pillar parser does not handle well the non closing of formatting. For example, listing 12 produces a paragraph with unclosed monospace part that spans over two paragraphs. This leads to LaTeX generation errors that are difficult to handle at the level of the LaTeX exporter.

A part without monospace ==beginning

Another paragraph

Listing 12: Example of broken document.

In Microdown as well as in Markdown the same situation does not produce a broken document. Listing 13 produces a valid document composed of two paragraphs each with a part having an uninterpreted monospace text.

CONCLUSION

In this article we presented Microdown a clean and lean Markdown supporting extensibility mechanisms that make it suitable to write full books such as Pharo by Example [BDN + 09]. We show some of the drawbacks of Markdown and key features of Pillar. Microdown takes a good pieces of both using the syntax of Markdown to lower the learning curve and improving familiarity. We show that Pharo 9.0 will use Microdown for rendering comments in rich text as well as navigation facilities. Future work is to perform another pass on the infrastructure to make sure that all the Pharo documentation, books and slides can be expressed in Microdown. The ultimate goal being to be able to load full chapters as documentation within Pharo.

$

  {inputFile:myFile.pillar}$ ${inputFile:value=directory/myFile.pillar}$ ${footnote:note=Pillar supports the definition annotations.}$ ${begin:card}$ ! aSection @anAnchor A paragraph about the card. I will be interpreted as part of the card. ${end:card}$ Listing 4: Pillar extensibility: annotations and environments with parameters

Fig

Figure 1 :

 1 Figure 1: Editing comments using Microdown.

Figure 2 :

 2 Figure 2: Rendering comments.

Figure 3 :

 3 Figure 3: An example of mathematical rendering.

Figure 4 :

 4 Figure 4: Test classes shows their tests.

Figure 5 :

 5 Figure 5: BaselineOf classes and packages show their actual baselines to avoid to have to click to access the information.

  BaselineOf class >> buildMicroDownUsing: aBuilder withComment: aString aBuilder header: [ :b | b text: self name ] withLevel: 1; horizontalLine; text: 'A baseline is a kind of map to load project.'; header: [ :b | b text: 'Description' ] withLevel: 3; text: aString; header: [ :b | b text: 'Dependencies' ] withLevel: 3; codeblockTag: 'pharo' withBody: (self instanceSide sourceCodeAt: #baseline:) Listing 7: Microdown baseline template RPackage >> buildMicroDownUsing: aBuilder withComment: aString self class environment at: self name ifPresent: [ :cls | aBuilder header: [ :b | b text: self name ] withLevel: 1; horizontalLine; text: 'A baseline is a kind of map to load project.'; header: [ :b | b text: 'Description' ] withLevel: 3; text: aString; header: [ :b | b text: 'Dependencies' ] withLevel: 3implemented as a parser generating a Pillar document model. The Microdown parser produces a Microdown tree which is then transformed into Pillar document elements. Such elements are then later on rendered using a rich text renderer.

4

  http://pillar-markup/microdown

  line copyReplaceAll: String tab with: String space. [ (current canConsumeLine: normalized) ifTrue: [ ^current := current addLineAndReturnNextNode: normalized ] ifFalse: [ current closeMe ]. current := current parent. self handleLine: normalized ] on: Error do: [ self handleErrorInLine: line ]

A

  part without monospace `beginning Another paragraph closing `end Listing 13: Example of non broken document

https://casual-effects.com/markdeep/features.md.html

Acknowledgments. The authors are grateful to Kasper Osterbye first proof of concept of Markdown parsing and Rich text rendering. Thanks a lot, you help us! We want to thank Damien Pollet and Oleksandr Zaitsev for their discussions.


Denis S Goldobin

Matteo Di Volo

Alessandro Torcini

A reduction methodology for fluctuation driven population dynamics

Lorentzian distributions have been largely employed in statistical mechanics to obtain exact results for heterogeneous systems. Analytic continuation of these results is impossible even for slightly deformed Lorentzian distributions, due to the divergence of all the moments (cumulants). We have solved this problem by introducing a pseudo-cumulants' expansion. This allows us to develop a reduction methodology for heterogeneous spiking neural networks subject to extrinsinc and endogenous noise sources, thus generalizing the mean-field formulation introduced in [E. Montbrió et al., Phys. Rev. X 5, 021028 (2015)].

Introduction The Lorentzian (or Cauchy) distribution (LD) is the second most important stable distribution for statistical physics (after the Gaussian one) [START_REF] Zolotarev | One-dimensional stable distributions[END_REF], which can be expressed in a simple analytic form, i.e.

L(y) = π -1 ∆ ∆ 2 + (y -y 0 ) 2 (1)
where y 0 is the peak location and ∆ is the half-width at half-maximum (HWHM). In particular, for a heterogenous system with random variables distributed accordingly to a LD it is possible to estimate exactly the average observables via the residue theorem [2]. This approach has found large applications in physics, ranging from quantum optics, where it was firstly employed to treat in exactly the presence of heterogeneities in the framework of laser dynamics [2,3], to condensed matter, where the Lloyd model [4] assumed a LD for the potential disorder to obtain exact results for the Anderson localization in a three-dimensional atomic lattices [5]. Furthermore, thanks to a Lorentzian formulation exact results can be obtained for various problems related to collective dynamics of heterogeneous oscillator populations [START_REF] Rabinovich | Oscillations and waves: In linear and nonlinear systems[END_REF][START_REF] Crawford | [END_REF]. Moreover, LDs emerge naturally for the phases of self-sustained oscillators driven by common noise [8,9].

More recently, the Ott-Antonsen (OA) Ansatz [10,11] yielded closed mean-field (MF) equations for the dynamics of the synchronization order parameter for globally coupled phase oscillators on the basis of a wrapped LD of their phases. The nature of these phase elements can vary from the phase reduction of biological and chemical oscillators [12,[START_REF] Kuramoto | Chemical oscillations, waves, and turbulence[END_REF] through superconducting Josephson junctions [START_REF] Watanabe | [END_REF][START_REF] Marvel | Chaos: An Interdisciplinary[END_REF] to directional elements like active rotators [16,17] or magnetic moments [18].

A very important recent achievement has been the application of the OA Ansatz to heterogeneous globally coupled networks of spiking neurons, namely of quadratic integrate-and-fire (QIF) neurons [19,20]. In particu-lar, this formulation has allowed to derive a closed lowdimensional set of macroscopic equations describing exactly the evolution of the population firing rate and of the mean membrane potential [21]. In the very last years the Montbrió-Pazó-Roxin (MPR) model [21] is emerging as a representative of a new generation of neural mass models able to successfuly capture relevant aspects of neural dynamics [22][23][24][25][26][START_REF] Coombes | Nonlinear Dynamics in Computational Neuroscience[END_REF][START_REF] Pietras | [END_REF][29][30][31][32][33].

However, the OA Ansatz (as well as the MPR model) is not able to describe the presence of random fluctuations, which are naturally present in real systems due to noise sources of different nature. In brain circuits the neurons are sparsely connected and in vivo the presence of noise is unavoidable [START_REF] Gerstner | Neuronal dynamics: From single neurons to networks and models of cognition[END_REF]. These fundamental aspects of neural dynamics have been successfully included in high dimensional MF formulations of spiking networks based on Fokker-Planck or self consistent approaches [START_REF] Brunel | [END_REF][36][37]. A first attempt to derive a low dimensional MF model for sparse neural networks has been reported in [38,39], however the authors mimicked the effects of the random connections only in terms of quenched disorder by neglecting endogenous fluctuations in the synaptic inputs. Fluctuations which have been demonstrated to be essential for the emergence of collective behaviours in recurrent networks [START_REF] Brunel | [END_REF]36].

In this Letter we introduce a general reduction methodology for dealing with deviations from the LD on the real line, based on the characteristic function and on its expansion in pseudo-cumulants. This approach avoids the divergences related to the expansion in conventional moments or cumulants. The implementation and benefits of this formulation are demonstrated for populations of QIF neurons in presence of extrinsic or endogenous noise sources, where the conditions for a LD of the membrane potentials [21] are violated as in [38,40]. In particular, we will derive a hierarchy of low-dimensional MF models, generalizing the MPR model, for globally coupled networks with extrinsic noise and for sparse random networks with a peculiar focus on noise driven collective oscillations (COs).

Heterogeneous populations of quadratic integrate-andfire neurons. Let us consider a globally coupled recurrent network of N heterogeneous QIF neurons, in this case the evolution of the membrane potential V j of the j-th neuron is given by

Vj = V 2 j + I j , I j = I 0 + η j + J j s(t) + σ j ξ j (t), ( 2
)
where I 0 is the external DC current, η j the neural excitability, J j s(t) the recurrent input due to the activity s(t) of the neurons in the network and mediated by the synaptic coupling of strenght J j . Furthermore, each neuron is subject to an additive Gaussian noise of amplitude σ j = σ(η j , J j ), where ξ j (t)ξ l (t ′ ) = 2δ jl δ(tt ′ ) and ξ j = 0. The j-th neuron emits a spike whenever the membrane potential V j reaches +∞ and it is immediately resetted at -∞ [41]. For istantaneous synapses, in the limit N → ∞ the activity of the network s(t) will coincide with the population firing rate r(t) [21]. Furthermore, we assume that the parameters η j (J j ) are distributed accordingly to a LD g(η) (h(J)) with median η 0 (J 0 ) and half-width half-maximum ∆ η (∆ J ).

In the thermodynamic limit, the population dynamics can be characterized in terms of the probability density function (PDF) w(V, t|x) with x = (η, J), which obeys the following Fokker-Planck equation (FPE):

∂w(V, t|x) ∂t + ∂ ∂V (V 2 + I x )w(V, t|x) = σ 2 x ∂ 2 w(V, t|x) ∂V 2 ,
(3) where I x ≡ I 0 + η + Jr(t). In [21], the authors made the Ansatz that for any initial PDF w(V, 0|x) the solution of Eq. (3) in absence of noise converges to a LD w(V, t|x) = a x /[π(a 2

x + (Vv x ) 2 )], where v x and r x (t) = lim

V →∞ V 2 w(V, t|x) = a x π ,
represent the mean membrane potential and the firing rate for the x-subpopulation. This Lorentzian Ansatz has been shown to correspond to the OA Ansatz for phase oscillators [21] and joined with the assumption that the parameters η and J are indipendent and Lorentzian distributed lead to the derivation of exact low dimensional macroscopic evolution equations for the spiking network (2) in absence of noise. Characteristic function and pseudo-cumulants. Let us now show how we can extend to noisy systems the approach derived in [21]. To this extent we should introduce the characteristic function for V x , i.e. the Fourier transform of its PDF, namely

F x (k) = e ikVx = P.V. +∞ -∞
e ikVx w(V x , t|x)dV x in this framework the FPE (3) can be rewritten as

∂ t F x = ik[I x F x -∂ 2 k F x ] -σ 2 x k 2 F x ; (4)
for more details on the derivation see [42].

Under the assumption that F x (k, t) is an analytic function of the parameters x one can estimate the average chracteristic function for the population F (x, t) = dη dJF x (x, t)g(η)h(J) and the corresponding FPE via the residue theorem, with the caution that different contours have to be chosen for positive (upper half-plane) and negative k (lower half-plane). Hence, the FPE is given by

∂ t F = ik H 0 F -∂ 2 k F -|k|D 0 F -S 2 0 k 2 F ; (5)
where k) , one obtains the following evolution equation

H 0 = I 0 + η 0 + J 0 r, D 0 = ∆ η + ∆ J r and S 2 0 = σ 2 (η 0 + i∆ η k/|k|, J 0 + i∆ J k/|k|) = N R + iN I . For the logarithm of the characteristic function, F (k) = e Φ(
∂ t Φ = ik[H 0 -∂ 2 k Φ -(∂ k Φ) 2 ] -|k|D 0 -S 2 0 k 2 . ( 6
)
In this context the Lorentzian Ansatz amounts to set Φ L = ikv -a|k| [START_REF]The Fourier transform of the Lorentzian distribution is P.V. +∞ -∞ e ikV a π[END_REF], by substituting Φ L in [START_REF] Rabinovich | Oscillations and waves: In linear and nonlinear systems[END_REF] for

S 0 = 0 one gets v = H 0 + a 2 -v 2 , ȧ = 2av + D 0 , (7)
which coincides with the two dimensional MF model found in [21] with r = a/π. In order to consider deviations from the LD, we analyse the following general polynomial form for Φ

Φ = -a|k| + ikv - ∞ n=2 q n |k| n + ip n |k| n-1 k n . (8)
The terms entering in the above expression are dictated by the symmetry of the characteristic function F x (k) for real-valued V x , which is invariant for a change of sign of k joined to the complex conjugation. For this characteristic function neither moments, nor cumulats can be determined [START_REF] Lukacs | Characteristic functions[END_REF]. Therefore, we will introduce the notion of pseudo-cumulants, defined as follows

W 1 ≡ a -iv , W n ≡ q n + ip n . (9)
By inserting the expansion (8) in the Eq. ( 6) one gets the evolution equations for the pseudo-cumulants, namely:

Ẇm = (D 0 -iH 0 )δ 1m + 2(N R + iN I )δ 2m + im -mW m+1 + m n=1 W n W m+1-n . (10)
It can be shown [42] that the modulus of the pseudocumulats scales as 1) with the noise amplitude, therefore it is justified to consider an expansion limited to the first two pseudo-cumulants. In this case, one obtains the following MF equations

|W m | ∝ |S 0 | 2(m-
ṙ = ∆ η /π + ∆ J r + 2rv + p 2 /π, (11a)
v = I 0 + η 0 + J 0 r -π 2 r 2 + v 2 + q 2 , ( 11b
) q2 = 2N R + 4(p 3 + q 2 v -πp 2 r), (11c) ṗ2 = 2N I + 4(-q 3 + πq 2 r + p 2 v). ( 11d
)
As we will show in the following the above four dimensional set of equations (with the simple closure q 3 = p 3 = 0) is able to reproduce quite noticeably the macroscopic dynamics of globally coupled QIF populations in presence of additive noise, as well as of deterministic sparse QIF networks. Therefore the MF model (11) represents an extention of the MPR model to system subject to either extrinsic or endogenous noise sources.

It can be demonstrated [42] that the definitions of the firing rate r = lim V →∞ V 2 w(V, t) and of the mean membrane potential v = P.V.

+∞

-∞ V w(V, t) dV in terms of the PDF w(V, t) obtained in [21] for the LD are not modified even if the PDF includes the correction terms {q n , p n } .

Globally coupled network with extrinsic noise. In order to show the quality of the MF formulation (11) let us consider a globally coupled network of QIF neurons each subject to an independent additive Gaussian noise term of amplitude σ (i.e. N R = σ 2 , N I = 0). In this framework, we show that the model (11) reproduces the macroscopic dynamics of the network in different dynamical regimes relevant for neural dynamics. Let us first consider the asynchronous dynamics, this amounts to a fixed point solution (r, v, q2 , p2 ) for (11). In this case we can give a clear physical interpretation of the stationary corrections q2 and p2 . They can be interpreted as a measure of an additional source of heterogeneity in the system induced by the noise, indeed the stationary solution of (11) coincides with those of the MPR model [START_REF] Crawford | [END_REF] with excitabilities distributed accordingly to a Lorentzian PDF of median η 0 + q2 and HWHM ∆ η + p2 .

As shown in Fig. 1 (a-b), in the asynchronous regime the MF model (11) reproduces quite well the population firing rate and the mean membrane potential obtained by the network simulations, furthermore as reported in Fig. 1 (c-d) the corrections q 2 and p 2 scales as ∝ σ 2 as expected. The truncation to the second order of the expansion (10) which leads to (11) is largely justified in the whole range of noise amplitude here considered. Indeed as displayed in Fig. 1 (e For a different set of parameters, characterized by stronger recursive couplings and higher external DC currents, we can observe the emergence of COs. This bifurcation from asynchronous to coherent behaviours can be characterized in term of the standard deviation v of the mean membrane potential: in the thermodynamic limit v is zero (finite) in the asynchronous state (COs). As shown in Fig. 1 (f) the MF model reveals a hysteretic transition from the asynchronous state to COs characterized by a sub-critical Hopf bifurcation occurring at σ HB ≃ 0.0055. The coexistence of asynchronous dynamics and COs is observable in a finite range delimted on one side by σ HB and on the other by a saddle-node bifurcation of limit cycles at σ SN ≃ 0.00095. This scenario is confirmed by the network simulations with N = 64000 (triangles in panel (f)), however due to the finite size effects v is not expected to vanish in the asynchronous state. The coexistence of different regimes is well exemplified by the raster plots shown in panel (g). The comparison of the simulations and MF data reported in Fig. 1 (h) show that the model ( 11) is able to accurately reproduce the time evolution of v and r also during COs.

Sparse networks exhibiting endogenous fluctuations. Let us now consider a sparse random network characterized by a LD of the in-degrees k j with median K and HWHM ∆ k = ∆ 0 K, this scaling is assumed in analogy with an exponential distribution. By following [START_REF] Brunel | [END_REF], we can assume at a MF level that each neuron j receives k j Poissonian spike trains characterized by a rate r, this amounts to have an average synaptic input J0kj K r(t) plus Gaussian fluctuations of variance σ 2 j = J 2 0 kj r(t) 2K 2 . Therefore, as shown in [38] the quenched disorder in the connectivity can be rephrased in terms of a random synaptic coupling. Namely, we can assume that the neurons are fully coupled, but with random distributed synaptic couplings J j = J0kj K with median J 0 and HWHM ∆ J = J 0 ∆ 0 . Furthermore, each neuron j will be subject to a noise of variance σ 2 j = J0Jj 2K r(t) and this amounts to have N R = J 2 0 r 2K and N I = -

J 2 0 ∆0r
2K . By considering the MF model (11) for this random network and by increasing the synaptic coupling, we observe a supercritical Hopf transition from asynchronous to oscillatory dynamics at J 0 ≃ 2.956. The standard deviation v of v is reported in Fig. 2 (a) for the MF and for network simulations of different sizes for K = 4000. The network simulations confirm the existence of a transition to collective behaviour for J 0 ≃ 2.9. Furthermore, the asynchronous and coherent attractors in the r-v plane observed for the MF and the network simulations are in good agreement, despite the finite size effects (as shown in Fig. 2 (b)). Finally, in presence of collective oscillations the time evolution for r and v obtained by the network simulations are well reproduced by the MF dynamics (see Fig. 2 (c) and(d)).

It should be remarked that the inclusion of the quenched disorder due to the heterogeneous in-degrees in the MPR model is not sufficient to lead to the emergence of COs, as shown in [38]. It is therefore fundamental to take in account corrections to the Lorentzian Ansazt due to endogenous fluctuations. Indeed, as shown in Fig. 2 (c) and (d) the evolution of r and v is clearly guided by that of the corrective terms p 2 and q 2 displaying regular oscillations.

Conclusions. A fundamental aspect that renders the LD L(y) (1) difficult to employ in a perturbative approach is that all moments and cumulants diverge, which holds true also for any distribution with y -2 -tails. However, to cure this aspect one can deal with the characteristic function of y and introduce an expansion in pseudocumulants, whose form is suggested from the LD structure. As we have shown, this expansion can be fruitfully applied to build low dimensional MF reductions for QIF spiking neural networks going beyond the MPR model [21], since our approach can also encompass different types of noise sources. In particular, the MPR model is recovered by limiting the expansion to the first pseudocumulant. Moreover, the stability of the MPR manifold can be rigorously analyzed within our framework by considering higher order pseudo-cumulants.

Our approach allows one to derive in full generality a hierarchy of low-dimensional neural mass models able to reproduce, with the desidered accuracy, firing rate and mean membrane potential evolutions for heterogeneous sparse populations of QIF neurons. Furthermore, our formulation applies also to populations of identical neurons in the limit of vanishing noise [25,[START_REF] Laing | [END_REF], where the macroscopic dynamics is attracted to a manifold that is not necessary the OA (or MPR) one [46].

One of the main important aspects of the MPR formulation, as well as of our reduction methodology, is the ability of these MF models to capture transient synchronization properties and oscillatory dynamics present in the spiking networks [22,26,[START_REF] Coombes | Nonlinear Dynamics in Computational Neuroscience[END_REF]32], but that are lost in usual rate models as the Wilson-Cowan one [47]. Low dimensional rate models able to capture the synchronization dynamics of spiking networks have been recently introduced [48,49], but they are usually limited to homogenous populations. MF formulations for heterogeneous networks subject to extrinsic noise sources have been examined in the context of the circular cumulants expansion [40,[49][50][51]. However, as noticed in [51], this expansion has the drawback that any finite truncation leads to a divergence of the population firing rate. Our formulation in terms of pseudo-cumulants does not suffer of these strong limitations and as shown in [42] even the definition of the macroscopic observables is not modified by considering higher order terms in the expansion.

Potentially, the introduced framework can be fruitfully applied to one-dimensional models of Anderson localization, where the localization exponent obeys a stochastic equation similar to Eq. ( 2) [52] and also to achieve generalizations of the 3D Lloyd model [4], of the theory of heterogeneous broadening of the laser emission lines [2], and of some other problems in condensed matter and collective phenomena theory involving heterogenous ensembles.

[52] I. Lifshitz, S. Gredeskul, and L. Pastur, New York (1988).

SUPPLEMENTAL MATERIAL ON "A REDUCTION METHODOLOGY FOR FLUCTUATION DRIVEN POPULATION DYNAMICS"

by Denis S. Goldobin, Matteo di Volo, and Alessandro Torcini

CHARACTERISTIC FUNCTION AND PSEUDO-CUMULANTS

Here we report in full details the derivation of the model (11), already outlined in the Letter, in terms of the characteristic function and of the associated pseudo-cumulants. In particular, the characteristic function for V x is defined as

F x (k) = e ikVx = P.V. +∞ -∞
e ikV w(V, t|x) dV , which for a Lorentzian distribution becomes :

P.V. +∞ -∞ e ikV a x π[a 2 x + (V -v x ) 2 ]
dV = e ikvx-ax|k| .

In order to derive the FPE in the Fourier space, let us proceed with a more rigourous definition of the characteristic function, namely

F x ≡ lim ε→+0 e ikVx-ε|Vx| .
Therefore by virtue of the FPE (Eq. ( 3) in the Letter) the time derivative of the characteristic function takes the form

∂ t F x = lim ε→+0 P.V. +∞ -∞ e ikVx-ε|Vx| ∂w x ∂t dV x = -lim ε→+0 P.V. +∞ -∞ e ikVx -ε|Vx| ∂ ∂V x (I x + V 2 x )w x -σ 2 x ∂ ∂V x w x dV x = -lim ε→+0 lim B→+∞ B -B e ikVx -ε|Vx| ∂ ∂V x (I x + V 2 x )w x -σ 2 x ∂ ∂V x w x dV x .
Performing a partial integration, we obtain

∂ t F x = -lim ε→+0 lim B→+∞   e ikVx-ε|Vx| q x (V x ) B -B - B -B ∂e ikVx-ε|Vx| ∂V x q x (V x )dV x   , (12)
where the probability flux for the x-subpopulation is defined as

q x = (I x + V 2 x )w x -σ 2 x ∂w x ∂V x .
As the membrane potential, once it reaches the threshold +B, is reset to -B this sets a boundary condition on the flux, namely q x (B) = q x (-B) for B → +∞; therefore, e ikB-εB q x (B)e -ikB-εB q x (-B) = 2ie -εB sin kB q x (B) B→+∞ -→ 0 and the first term in Eq. ( 12) will vanish, thus the time derivative of the characteristic function is simply given by

∂ t F x = lim ε→+0 lim B→+∞ B -B ike ikVx-ε|Vx| (I x + V 2 x )w x -σ 2 x ∂w x ∂V x dV x .
Hence, after performing one more partial integration for the remaining V x -derivative term, we obtain

∂ t F x = lim ε→+0 P.V. +∞ -∞ e ikVx -ε|Vx| ik I x + V 2 x w x -σ 2 x k 2 w x dV x = ik   I x F x + lim ε→+0 P.V. +∞ -∞ e ikVx-ε|Vx| V 2 x w x dV x   -σ 2 x k 2 F x (13)
and finally

∂ t F x = ik[I x F x -∂ 2 k F x ] -σ 2 x k 2 F x , (14)
which is Eq. ( 4) in the Letter. Under the assumption that F x (k, t) is an analytic function of the parameters x one can calculate the average characteristic function for the population F (k, t) = dη dJF x (k, t)g(η)h(J) and the corresponding FPE via the residue theorem, with the caution that different contours have to be chosen for positive (upper half-planes of complex η and J) and negative k (lower half-planes). Hence, the FPE is given by

∂ t F = ik H 0 F -∂ 2 k F -|k|D 0 F -S 2 0 k 2 F , (15)
where

H 0 = I 0 + η 0 + J 0 r, D 0 = ∆ η + ∆ J r and S 2 0 = σ 2 (η 0 + i∆ η k/|k|, J 0 + i∆ J k/|k|) = N R + iN I .
For the logarithm of the characteristic function, F (k) = e Φ(k) , one obtains the following evolution equation

∂ t Φ = ik[H 0 -∂ 2 k Φ -(∂ k Φ) 2 ] -|k|D 0 -S 2 0 k 2 . ( 16
)
In this context the Lorentzian Ansatz amounts to set Φ L = ikv -a|k| [START_REF]The Fourier transform of the Lorentzian distribution is P.V. +∞ -∞ e ikV a π[END_REF], by substituting Φ L in (6) for S 0 = 0 one gets

v = H 0 + a 2 -v 2 , ȧ = 2av + D 0 , (17)
which coincides with the two dimensional mean-field model found in [21] with r = a/π. In order to consider deviations from the Lorentzian distribution, we analyse the following general polynomial form for Φ :

Φ = -a|k| + ikv - ∞ n=2 q n |k| n + ip n |k| n-1 k n . (18)
The terms entering in the above expression are dictated by the symmetry of the characteristic function F x (k) for real-valued V x , which is invariant for a change of sign of k joined to the complex conjugation. For this characteristic function neither moments, nor cumulats can be determined [START_REF] Lukacs | Characteristic functions[END_REF]. Hence, we can choose the notation in the form which would be most optimal for our consideration. Specifically, we introduce

Ψ = k∂ k Φ, Ψ = -(asign(k) -iv)k -(q 2 + ip 2 sign(k))k 2 -(q 3 sign(k) + ip 3 )k 3 -. . . . (19)
Please notice that

Ψ(-k) = Ψ * (k) [as well as Φ(-k) = Φ * (k)] . (20)
In this context Eq. ( 16) becomes

∂ t Ψ = ikH 0 -|k|D 0 -ik∂ k k∂ k Ψ k + Ψ 2 k -2S 2 0 k 2 . (21)
It is now convenient to introduce the pseudo-cumulants, defined as follows:

W 1 ≡ a -iv , W n ≡ q n + ip n . (22)
From Eq. ( 21) we can thus obtain the evolution equation for the pseudo-cumulants W m , namely

Ẇm = (D 0 -iH 0 )δ 1m + 2(N R + iN I )δ 2m + im -mW m+1 + m n=1 W n W m+1-n , (23)
where for simplicity we have assumed k > 0 and employed the property (20). Moreover, we have omitted the kδ(k) contribution, since it vanishes. The evolution of the first two pseudo-cumulant reads as:

Ẇ1 = D 0 -iH 0 -iW 2 + iW 2 1 , (24)
Ẇ2 = 2(N R + iN I ) + 4i(-W 3 + W 2 W 1 ) . ( 25
)
Or equivalently ṙ = ∆ η /π + ∆ J r + 2rv + p 2 /π , (26a) v = I 0 + η 0 + J 0 rπ 2 r 2 + v 2 + q 2 , (26b) q2 = 2N R + 4(p 3 + q 2 vπp 2 r) , (26c) ṗ2 = 2N I + 4(-q 3 + πq 2 r + p 2 v) ,

which is Eq. ( 11) in the Letter.

FIRING RATE AND MEAN MEMBRANE POTENTIAL FOR PERTURBED LORENTZIAN DISTRIBUTIONS

In the following we will demonstrate that the definitions of the firing rate r and of the mean membrane potential v in terms of the PDF w(V, t), namely:

r = lim V →∞ V 2 w(V, t)
and v = P.V.

+∞ -∞

V w(V, t) dV , obtained in [21] for a Lorentzian distribution, are not modified even by including in the PDF the correction terms {q n , p n } . The probability density for the membrane potentials w(V, t) is related to the characteristic function F (k) via the follwoing anti-Fourier transform w(V, t) = (2π) -1 +∞ -∞ F (k) e -ikV dk with F (k) = e Φ(k) . By considering the deviations of Φ(k) from the Lorentzian distribution up to the seond order in k, we have

2π w(V, T ) = +∞ -∞ e ikv-a|k|-q2 k 2 2 -ip2 k|k| 2 e -ikV dk ≈ +∞ -∞ e -iky-a|k| 1 -q 2 k 2 2 -ip 2 k|k| 2 dk = +∞ -∞ 1 + q 2 2 (1 -θ) ∂ 2 ∂y 2 -θ ∂ 2 ∂a 2 - p 2 2
∂ 2 ∂y∂a e -iky-a|k| dk , where y = Vv and θ is an arbitrary parameter. Thus one can rewrite

w(V, t) ≈ 1 + q 2 2 (1 -θ) ∂ 2 ∂y 2 -θ ∂ 2 ∂a 2 - p 2 2 ∂ 2 ∂y∂a a π(a 2 + y 2 ) . ( 27
)
From the expression above, it is evident that q 2 and p 2 , as well as the higher-order corrections, do not modify the firing rate definition reported in [21] for the Lorentzian distribution, indeed r = lim V →∞ V 2 w(V, t) = a π . |W m | →∼ σ 2(m-1) .

The above scaling is well confirmed by the data reported in Fig. 3. Therefore, a two-element truncation ( 24)-( 25) of the infinite equation chain ( 23) is well well justified as a first significant correction to the Lorentzian distribution dynamics.

  ) |W 1 | ∼ O(10 -2 ) and |W 2 | ∼ O(10 -4 ), while the moduli of the other pseudocumulants are definitely smaller.

FIG. 1 .

 1 FIG. 1. (a-e) Asynchronous Dynamics Stationary values r (a), v (b), p2 (c), q2 (d) and |Wn| (e) versus noise amplitude σ. (a-b) Symbols refer to network simulations with N = 16000, solid line to the MF model (11), dashed (magenta) lines are the values of r and v for the MPR model. In (c-d) the dashed red lines refer to a quadratic fit to the data. In (e) the symbols refer from top to bottom to |W1|, |W2|, |W3| and |W4|. Other parameters : I0 = 0.0001,J0 = -0.1, ∆J = 0.1. (f-h) Emergence of COs (f) Standard deviation v of v obtained for quasi-adiabatic variation of σ. Lines (symbols) refer to MF (network) simulations: solid black (dashed red) lines and right (left) triangles are obtained by increasing (decreasing) σ. (g) Raster plots for a network of N = 32000 neurons, only 1000 are displayed. The black and red dots refer to the two coexisting states denoted by arrows of the same color in (f) for σ = 0.002. (h) r (v) versus time for σ = 0.002: dots refer to network simulations with N = 32000 and lines to MF results. Other parameters: I0 = 0.38, J0 = -6.3 and ∆J = 0.01. In all cases η0 = ∆η = 0.

FIG. 2 .

 2 FIG. 2. Sparse Network (a) Standard deviation v of v versus the synaptic coupling |J0|. Blue solid line (colored symbols) refers to MF (network) simulations. The different colors black, red and magenta correspond to different network sizes N = 10000, 15000 and 20000, respectively. The error bars are estimated as the standard deviations over 8 different realisations of the random network. (b) Attractors in the r-v plane for J0 = -2.5 (asynchronous) and J0 = -3.7 (collective oscillations). For the latter value of the coupling the MF evolution of r (p2) and v (q2) is displayed in (c) and (d) as black solid (blue dashed) lines, respectively. In (c-d) the symbols refer to the network simulations with N = 40000. In all panels the parameters are K = 4000,∆J = 0.01, I0 = 0.19. and η0 = ∆η = 0. The standard deviations v are estimated over a time window of T = 500 after discarding a transient of the same duration.

FIG. 3 .

 3 FIG.3. Modulus of the pseudo-cumulants |Wn| versus the noise variance σ 2 for n ranging from 1 to 5 from top to bottom. The pseudo-cumulants are estimated by integrating Eq. (10) in the main text with extended precision (30 digits) and by limiting the sum to the first 100 elements. Other parameters: I0 = 0.1, η0 = -1, J0 = 1, ∆η = 0.1 and ∆J = 0.1.

We acknowledge stimulating discussions with Lyudmila Klimenko, Gianluigi Mongillo, Arkady Pikovsky, and Antonio Politi. The development of the basic theory of pseudo-cumulants was supported by the Russian Science Foundation (Grant No. 19-42-04120). A.T. and M.V. received financial support by the Excellence Initiative I-Site Paris Seine (Grant No. ANR-16-IDEX-008), by the Labex MME-DII (Grant No. ANR-11-LBX-0023-01), and by the ANR Project ERMUNDY (Grant No. ANR-18-CE37-0014), all part of the French program Investissements d'Avenir.

Let us now estimate the mean membrane potential by employing the PDF [START_REF] Coombes | Nonlinear Dynamics in Computational Neuroscience[END_REF], where we set the arbitrary parameter θ to zero without loss of generality, namely

where w 0 (V, t) = π -1 a/[a 2 + (Vv) 2 ] . The mean membrane potential is given by

All the higher-order corrections enetering in w(V, t), denoted by (. . . ) in [START_REF] Pietras | [END_REF], have the form of higher-order derivatives of w 0 with respect to V and a; therefore they yield a zero contribution to the estimation of V . Thus, Eq. ( 28) is correct not only to the 2nd order, but also for higher orders of accuracy. We can see that the interpretation of the macroscopic variables a = πr and v = V in terms of the firing rate and of the mean membrane potential entering in Eq. ( 23) or Eqs. (26a)-(26d) remains exact even away from the Lorentzian distribution.

SMALLNESS HIERARCHY OF THE PSEUDO-CUMULANTS

Eq. ( 23) for m > 1 can be recast in the following form

where W m is present only in the first term of the right-hand side of the latter equation.

Let us now understand the average evolution of W M . In particular, by dividing Eq. (11a) by r and averaging over time, one finds that

where • denotes the average in time and where we have employed the fact that the time-average of the time-derivative of a bounded process is zero, i.e. d dt ln r = 0. Since r(t) can be only positive, v will be strictly negative for a heterogeneous population (∆ η = 0 and/or ∆ J = 0) in the case of nonlarge deviations from the Lorentzian distribution, i.e., when p 2 is sufficiently small. In particular, for asynchronous states v = v, hence, Eq. ( 30) yields a relaxation dynamics for W m under forcing by W m+1 and W 1 , . . . , W m-1 ; by continuity, this dissipative dynamics holds also for oscillatory regimes which are not far from the stationary states.

Let us explicitly consider the dynamics of the equations ( 29) for m = 2, 3, 4, namely:

. . . . In absence of noise terms N R = N I = 0, we consider a small deviation from the Lorentzian distribution such that |W n | < Cε n-1 , where C is some positive constant and ε ≪ 1 is a smallness parameter. In this case, from Eq. ( 31) one observes that W 2 tends to ∼ W 3 , while from Eq. (32), W 3 →∼ W 2 2 . Therefore, W 2 →∼ W 2 2 , which means that W 2 (t → +∞) → 0. Further, from Eq. ( 33), W 4 →∼ W 2 W 3 ∼ W 3 2 → 0. Thus, in absence of noise, the systems tends to a state W 1 = 0, W m>1 = 0 (at least from a small but finite vicinity of this state). This tell us that the Lorentzian distribution is an attractive solution in this case.

In presence of noise, by assuming that |N R + iN I | ∼ σ 2 , a similar analysis of Eqs. ( 31