Exotic B-series and S-series: algebraic structures and order conditions for invariant measure sampling

B-series and generalizations are a powerful tool for the analysis of numerical integrators. An extension named exotic aromatic B-series was introduced to study the order conditions for sampling the invariant measure of ergodic SDEs. Introducing a new symmetry normalization coefficient, we analyze the algebraic structures related to exotic B-series and S-series. Precisely, we prove the relationship between the Grossman-Larson algebras over exotic and grafted forests and the corresponding duals to the Connes-Kreimer coalgebras and use it to study the natural composition laws on exotic S-series. Applying this algebraic framework to the derivation of order conditions for a class of stochastic Runge-Kutta methods, we present a multiplicative property that ensures some order conditions to be satisfied automatically.


Introduction
The concept of B-series was introduced in the 1960s by John Butcher as a tool to study Runge-Kutta methods and generalizations of these.The idea of B-series originates from the fact that both Taylor expansions of the exact solution of an ODE and of numerical solutions obtained using Runge-Kutta methods can be written using formal sums indexed by rooted trees [6,16].
For an arbitrary dimension d ∈ N, let f ∶ R d → R d be a vector field and let the covariant derivative at a point p ∈ R d along the vectors v 1 , . . ., v n ∈ R d be defined as Then, B-series are defined using the correspondence between vector fields of the form f (y 0 ), f ′ (y 0 )f (y 0 ), f ′′ (y 0 )(f (y 0 ), f (y 0 )), . . .and the set of rooted non-planar trees of the form , , , . . .[9].This allows us to use combinatorics of rooted trees to study the properties and operations over vector fields.Larger classes of trees and tree-like structures were introduced in the literature [8,12,15] to fit different purposes.For example, bicolored trees, e.g.

, , ,
were introduced to study splitting methods and to define P-series that are used in the study of partitioned methods.The close relationship between vector fields and differential operators lead to the introduction of collections of trees called forests, e.g.

, , ,
and their use to represent differential operators.The series that are based on forests are called S-series and they were originally introduced to study first integrals [27].
Another generalization of trees, called aromatic trees, was introduced as a tool to study numerical integrators equivariant under affine maps.Aromatic trees are used to define aromatic B-series [25] and were first introduced independently in [11] and in [18] as a way to express the divergence of the vector field of a problem.We note that rooted trees can be defined as directed trees with roots being the vertices with no outgoing edges.Aromatic trees1 are graphs with every vertex having at most one outgoing edge with exactly one vertex (the root) without an outgoing edge.A collection of aromatic trees is called an aromatic forest and the set of aromatic forests is used to define aromatic S-series [2].An aromatic tree can have multiple connected components, examples are, , , , where the directions of edges forming a cycle is counterclockwise.We extend aromatic trees and forests to the stochastic context and use S-series as the main tool.Different generalizations of trees were introduced in the stochastic context for the study of the error on the trajectory (strong error) and the error on the law (weak error) of the numerical solution.Burrage and Burrage [4] and Komori, Mitsui and Sugiura [20] introduced stochastic trees and B-series for studying the order conditions for strong convergence of SDE, and [5,13,14,[29][30][31][32] for study of high order weak and strong methods on a finite time interval.We consider ergodic integrators and recall that the weak order can be used to obtain convergence with respect to the sampling of the invariant measure [33].However, there exist schemes which have a smaller error with respect to the sampling of the invariant measure than is predicted by their weak order, see [1,3,21,22], and [23], where the order with respect to the invariant measure is considered.The order conditions for sampling the invariant measure, and their algebraic structures, are the main focus of this paper.First studied in [22], grafted trees and exotic trees are the trees that correspond to vector fields appearing in the study of SDEs with additive noise.Due to the nice properties of the overdamped Langevin equation, one of which is ergodicity of the solution, we consider it as an example and study the related algebraic structures and the order conditions with respect to the invariant measure.Some examples of the grafted trees and exotic trees, with more examples in Table 1 of the Appendix, are In this paper, we use B-series over grafted trees following [22] and introduce a new normalization of the series using the symmetry coefficients σ(τ ) of trees τ analogously to the deterministic case [7].Due to the fact that we work in a stochastic context, we study the expectation of the functional φ applied to the one step of a method X 1 ∶= Ψ h (X 0 , f ), i.e.E[φ(Ψ h (X 0 , f ))].This leads us to the notion of S-series and we introduce S-series over grafted forests and exotic S-series.
In Sections 3 and 4, we use the combinatorial algebra framework of decorated aromatic forests to describe the relationship between S-series over grafted forests and exotic S-series, and present composition laws for the new kinds of S-series.Algebraic structures that we present do not depend on the particular problem or its dimension d and are valid for any SDE with additive noise and can be generalized to SDEs with multiplicative noise in a straightforward way.
In Section 5, the formalism of exotic forests is used to define a theoretical algorithm that generates order conditions with respect to the invariant measure for numerical methods that can be expanded using B-series.The algorithm defines a linear map A ∶ EF → EF that is applied to the truncated S-series corresponding to the method and returns a linear combination of exotic forests in which the coefficient of an exotic forest π is denoted by ω(π).The order p conditions obtained in this way have the form where EF is a subset of exotic forests.We prove Theorem 5.8.Theorem 5.8 Let ⋅ denote the concatenation product and let ω be the order condition map for a numerical method that can be expanded as a B-series over grafted trees, then, Theorem 5.8 allows us to decrease the number of order conditions with respect to the invariant measure for a class of numerical methods that includes stochastic Runge-Kutta methods defined in Definition 2.4.If an exotic forest π can be written as π = π 1 ⋅ π 2 , then the order condition ω(π) = 0 is automatically satisfied if ω(π 1 ) = 0 is satisfied.For example, Theorem 5.8 implies the following relations between the order conditions: )ω( ), which decreases the number of order conditions, in particular, for order 3 from 13 to 9. The values of ω( ), ω( ), and ω( ) for stochastic Runge-Kutta methods with coefficients b i , a ij , d i with i, j = 1, . . ., s are presented below, The list of values of ω for all exotic trees up to size 3 can be found in Table 2 in the Appendix.This property was first observed for order 3 by manual computation in [22].
In this paper, we prove the property for arbitrary high order.

Fundamentals
We consider the overdamped Langevin equation which is widely used in molecular dynamics and is ergodic under appropriate assumptions, where is a constant that can be changed by rescaling the problem in time, and W (t) is a d−dimensional standard Wiener process fulfilling the usual assumptions.
Let us consider test functions φ ∈ C ∞ P (R d , R) which are taken to be smooth functionals on R d with all partial derivatives having polynomial growth of the form with some constants C n and s n independent of x.We consider numerical methods with the following weak Taylor expansion.Given an integrator X 1 = Ψ h (X 0 , f, ξ), we have where A i , i = 1, 2, . . ., are linear differential operators.For more details see [33].
An integrator X 1 = Ψ h (X 0 , f, ξ) satisfying the usual assumptions (see Section 5) has weak order q if ) is a test function.We note that the expectation of the functional of the exact solution has the following weak Taylor expansion: denotes the Laplacian operator.Thus, an integrator has weak order q if In this paper, we consider ergodic problems that have unique invariant measures that characterize the trajectories of the system.Definition 2.1.A problem is ergodic if there exists a unique invariant measure µ satisfying for all deterministic initial conditions X 0 and all smooth test functions φ, A similar definition can be applied to numerical integrators.Definition 2.2.A numerical method X 1 = Ψ h (X 0 , f, ξ) is ergodic if there exists a unique invariant probability law µ h with finite moments of any order satisfying for all deterministic initial conditions X 0 = x and all smooth test functions φ, See [24] for more details.
Integrators can be used to approximate the invariant measure µ of the system using the invariant measure µ h of the integrator.The accuracy of the approximation is characterized by the order of the integrator with respect to the invariant measure.Definition 2.3.A numerical method X 1 = Ψ h (X 0 , f, ξ) has order p with respect to the invariant measure of the SDE if where C is independent of h assumed small enough.
We note that an order p with respect to the invariant measure can be shown for a large class of integrators using the weak Taylor expansion.The details are discussed in Section 5.1.We also note that the order p with respect to the invariant measure is higher or equal than the weak order q of the integrator, that is p ≥ q.We will use the following form of stochastic Runge-Kutta methods.
be the coefficients defining the stochastic Runge-Kutta (sRK) scheme, and ξ (k) n ∼ N (0, I d ) be independent Gaussian random vectors.Then, the stochastic Runge-Kutta scheme has the form: 1)  n .
We shall assume for simplicity of the presentation that l = 1 which is sufficient to achieve weak order 2 or order 3 with respect to the invariant measure.We note that l > 1 is necessary in general to achieve high order [22].The analysis in this paper extends naturally to the l > 1 case by considering grafted forests with decorated grafted vertices.Two grafted vertices can form a pair only if they are decorated by the same number.For example, for l = 2, we should consider grafted of the form More details on grafted and exotic forests can be found in Section 2.2.

The framework of B-series and S-series
Let us consider the space X of vector fields on R d .Let f, g ∈ X and let f [g] denote the differentiation of g in the direction of f , that is, for p ∈ R d , we have This way, vector fields define differential operators of degree one.The differential operators of higher degrees can be obtained by pointwise composition of vector fields, for example, let f, g, h ∈ X and ∂ ij ∶= ∂ i ∂ j , then, for p ∈ R d , we have From now on we will omit writting p and the differentiation will be written as Due to the fact that the pointwise composition is commutative, differentiation is a pre-Lie product, that is, it satisfies the following relation We consider an initial value ODE of the form The elementary differentials that appear as terms in the Taylor expansion of y(h) around 0 form a pre-Lie algebra with the product given by differentiation.For example, Let us consider the pre-Lie algebra of non-planar rooted trees (T , ↷) with ↷ being the grafting product on trees defined by attaching the root of the left operand to a vertex of the right operand in all possible ways, for example, We extend the grafting product to the commutative algebra of forests (F, ⋅) which is the symmetric algebra on trees, (F, ⋅) ∶= S R (T ).Let τ ∈ T and π 1 , π 2 ∈ F, then We note that this definition of grafting on forests is well-defined since grafting is a pre-Lie product.The details can be found in [28].
In [10], it is proven that the algebra (T n , ↷) with n−colored trees is the free pre-Lie algebra with n generators.Therefore, there exists a surjective morphism from the pre-Lie algebra (T , ↷) onto the pre-Lie algebra of elementary differentials generated by hf .The morphism is extended to (F, ⋅, ↷) by sending the commutative product to the pointwise composition product of vector fields.The morphism is denoted by F f and we give the explicit formula in Definition 2.6.Let us use the following notation, [d] ∶= {1, . . ., d}.Definition 2.6.Let τ be a tree with all edges being directed towards the root, V (τ ) be the set of vertices of τ , and p(v) be the set of predecessors of v in τ .Then, where the sum is taken over all decorations of τ by the set [d] such that the root r of τ is decorated by k ∈ [d], and F f (•) = hf where h is the timestep.
For example, , where we decorate the tree as k i j for the Definition 2.7.[6,16] B-series are formal sums of vector fields of the following form where T is the set of rooted non-planar trees, a ∶ T → R is a functional, and σ(τ ) is the size of the automorphism group of τ .
The exact solution y(h) and one-step of a Runge-Kutta method Ψ h (A, b, f ) can be expanded using B-series as y 0 ↦ y 0 + B(a)(y 0 ) with the functionals a ∶ T → R defined appropriately.The concept of S-series was used to study the first integrals of B-series [27].Let I ∶ R d → R be a first integral, then we have the following property where S(a) is called an S-series, F is the set of forests, the functional a ∶ F → R extends to forests by a(π where Id is the identity Id(x) = x.Similar ideas are used to write the flow of a differential equation as the exponential of F f (•), i.e.
where α is an appropriate functional on forests.The details can be found in Chapter III.5.1 of [15] in the context of the Baker-Campbell-Hausdorff formula for splitting integrators.We note that in a stochastic context, we can replace the first integral I with a test function φ and use S-series to study the expectation of a functional of one-step of a numerical integrator, i.e.E[φ(y 0 + B(a)(y 0 ))], using its weak Taylor expansion [33].
An important feature of B-series and S-series is that they are completely characterized by the functionals a ∶ T → R.This allows us to use combinatorial properties and algebraic structures on trees and forests to study the properties and operations of numerical integrators.

Extended tree formalism
We extend the framework of B-series and S-series by extending the tree and forest formalisms.We consider the sets of aromatic trees AT = A × T where A is the set of multi-aromas, i.e. graphs in which every vertex has exactly one outgoing edge.The set A includes the empty graph and some of its elements are 1, , , , .
The corresponding vector spaces are denoted by A and AT , respectively.We obtain the set of aromatic forests AF by concatenating aromatic trees in all possible ways, including the empty forest 1.The corresponding vector space is denoted by AF.
We define decorated aromatic forests as aromatic forests π together with maps α ∶ V (π) → D that send vertices of π to decorations from the set D which is defined depending on the type of forests we want to represent.The set of decorated aromatic forests with an abstract set D is denoted by AF D and the vector space by AF D .
Let us consider the space of bicolored aromatic forests AF •,× spanned by aromatic forests π ∈ AF together with decorations α g ∶ V (π) → {•, ×}.Let the space of grafted forests be defined as the quotient space That is, grafted forests are bicolored aromatic forests (π, α g ) for which α −1 g (×) is a subset of leaves of π.For example, some grafted trees are listed below , , , The size of a grafted forest is taken to be the sum of weights of vertices with black vertices having weight 1 and grafted vertices having weight 0.5.All grafted trees up to size 3 are listed in Table 1 of the Appendix.Grafted forests arise when we consider the overdamped Langevin equation and the B-series [22] that are used to study it.The sets of grafted forests and trees are denoted by AF g and AT g , and the corresponding vector spaces are denoted by AF g and AT g .
Exotic forests are grafted forests with even number of grafted vertices in which all grafted vertices are paired.For example, some exotic trees are listed below . All exotic trees up to size 3 are listed in Table 1 of the Appendix.We note that the pairing between two grafted vertices is denoted by associating a natural number to the two grafted vertices.The choice of the particular natural number does not matter.Exotic forests are used to represent the differential operators that appear in the expansion of E[φ(y 0 + B(a)(y 0 ))] applied to the overdamped Langevin equation [22].We build the space of exotic forests in several steps.

consider a space AF
2. let AF •N be the completion with respect to the graduation given by the number of vertices.The elements of AF •N are formal sums of the form 3. define the space of exotic forests EF to be spanned by the set EF of elements (π, α e ) ∶= α∈P (αe) with α e being a decoration of π ∈ AF by We say that if P (α e,1 ) = P (α e,2 ), then α e,1 = α e,2 .For example, the following two exotic forest (π 1 , α e,1 ) and (π 2 , α e,2 ) are equal , since P (α e,1 ) = P (α e,2 ).
A pair of grafted vertices forms a liana.This terminology was proposed in [22], in which the pairs of grafted vertices are replaced by dotted lines.
An isomorphism is an invertible morphism, and an automorphism is an isomorphism of a decorated aromatic forest with itself.The group of all automorphisms of a decorated aromatic forests (π, α) is denoted by Aut(π, α).The symmetry coefficient of (π, α) is denoted by σ(π, α) and is defined as the size of the automorphism group.For example, σ( The combinatorial and algebraic structures of decorated aromatic forests are studied in more detail in Section 3. We note that we will often omit writting α and denote the elements of AF D simply by π.In the cases when π ∈ AF g or π ∈ EF , the corresponding decorations are denoted by α g and α e , respectively.
We extend the concatenation product of forests to the concatenation product of decorated aromatic forests as follows.Let π i ∈ AF and where We note that the subspace K × forms an ideal with respect to the concatenation product, therefore, it is extended to grafted and exotic forests.We extend the grafting product to the decorated aromatic forests and, by the same argument, to grafted and exotic forests.We recall that forests, including grafted and exotic forests, are used to represent differential operators with the grafting product representing the differentiation.Let us consider the Grossman-Larson product denoted by ◇, which represents the composition of differential operators, that is, Let us now define the Connes-Kreimer coproduct [2] on decorated aromatic forests.Definition 2.9.The Connes-Kreimer coproduct on AF D is defined as where the sum runs over all rooted subforests π 0 ∈ AF of π such that π ∖ π 0 ∈ AF and there are no edges going from π 0 to π ∖ π 0 in π.
We recall that aromatic forests that we consider must have at least one root.This differs with [2] where multi-aromas are also included in AF .For example, We denote the dual of the Connes-Kreimer coproduct by ⊛ and call it dual CK product.We extend the Grossman-Larson and dual CK products to decorated aromatic forests including grafted and exotic forests.We note that to define the Connes-Kreimer coproduct on grafted and exotic forests, we need to dualize their constructions, that is, interchange taking a subspace and taking a quotient by its complement.

Combinatorial algebra framework of decorated aromatic forests
We use decorated aromatic forests to prove combinatorial relations that are essential in our description of the algebraic structure of exotic S-series.We introduce a relationship between decorations and use it to prove the relationship between the Grossman-Larson and dual CK products on decorated aromatic forests.This is also used to describe the way exotic S-series are obtained by taking the expectation of S-series over grafted forests.
The relationship between Grossman-Larson and dual CK product on aromatic forests was proven implicitly in [2] and on classical forests in [17].We present an alternative proof which is easily generalizable to more complex sets of forest, for example, grafted and exotic forests.We note that Φ π is well-defined on the equivalence classes (π, α e ) that are used to define the exotic forests.We say that the decoration of the exotic forests is finer than the decoration of the grafted forests.Definition 3.2.Let p(π, α, α), with α being finer than α, denote the number of decorations α such that (π, α) ≅ (π, α) and α = Φ ○ α where Φ is the map such that α = Φ ○ α.

Relationship between the two products
Let the map A σ ∶ AF D → AF D be defined as A σ (π, α) = σ(π, α)(π, α).The map A σ sends a decorated aromatic forest to itself multiplied by its symmetry.We prove that the linear map A σ induces algebra isomorphism We note that an aromatic forest can be decorated by multiple sets by taking their Cartesian product.For example, , We define a set of labeled decorated aromatic forests AF DL and the corresponding space AF DL .We note that labels, unlike decorations, are required to be in bijection with the vertices.The elements (π, α, α l ) of AF DL are aromatic forests π ∈ AF decorated by α ∶ V (π) → D for some set D and α l ∶ V (π) → N such that α l is an injection.
Let us define the Grossman-Larson and dual CK products on the space AF DL by considering the space AF DN of elements (π, α, α N ) where (π, α) ∈ AF D and α N ∶ V (π) → N. Let us define a subspace K which is an ideal in (AF DN , ◇) and (AF DN , ⊛): Then, the corresponding algebras (AF DL , ◇) and (AF DL , ⊛) are defined as Then, the Grossman-Larson product and the product dual to the Connes-Kreimer coproduct are identical on the space AF DL .For example, , Let us denote by AF DL the completion of the space AF DL with respect to the graduation given by the number of vertices in the aromatic forests.That is, AF DL is a space of formal sums of the form π∈AF DL a(π)π, with a ∈ AF * DL .
Proposition 3.5.Define the maps ϕ and φ as where ϕ(π, α) is the sum are over all labelings α l and φ(π, α) is the sum are over all labelings α l such that all terms of the sum are distinct.Then, the maps ϕ and φ are injective algebra morphisms.
Proof.Let us consider the maps ϕ ∶ (AF D , ◇) → ( AF DL , ◇) and φ ∶ (AF D , ⊛) → ( AF DL , ⊛) from the Proposition 3.5.We show that ϕ = φ ○ A σ and use this fact as a key ingredient of the proof.We have where p(π, α, α × α l ) is the number of ways to obtain (π, α, α l ) from (π, α).We use Proposition 3.4 and we note that σ(π, α, α l ) = 1 due to the definition of a labeling.Therefore, We use this property together with the fact that ◇ = ⊛ in AF DL to show that We use the injectivity of ϕ to finish the proof.
We note that Propoposition 3.7 is proved for any Grossman-Larson and dual CK algebras over decorated aromatic forests, including the cases AF D = AF g and AF D = EF , that is, of grafted and exotic forests.

Exotic S-series
Let us introduce S-series over decorated aromatic forests.We denote by AF D the space of formal sums of the form It is the completion with respect to the graduation given by the number of vertices.Let δ σ ∶ AF * D → AF D be the isomorphism between the dual and the completion given by We assume that the map F f (Definition 2.6) is defined over decorated aromatic forests and is a Grossman-Larson algebra morphism, Definition 4.1.S-series over decorated aromatic forests are defined as S ∶= F f ○ δ σ , that is, where Proof.We use identity δ σ ○ * = ◇ ○ (δ σ ⊗ δ σ ), which follows from Proposition 3.7, and the definition of the Grossman-Larson product.
We are interested in studying how the structures that were originally defined on deterministic differential equations are affected when considered in a stochastic context.Similarly to the classical Runge-Kutta methods which can be written as B-series, sRK methods (Definition 2.4) can be written using B-series over grafted trees [22].Composing sRK methods between themselves or with a test function gives rise to S-series over grafted forests.For example, let Ψ h be an sRK method and with the functional a ∶ AF g → R defined in Proposition 4.3.Differential operators F f (π) corresponding to grafted forests are defined by extending Definition 2.6 with F f (×) = √ 2hξ where ξ ∼ N (0, I d ).For example, The map F f defined this way over AF g is an algebra morphism, therefore, the composition law for S-series over grafted forests is given by Theorem 4.2.
The functional a ∶ AF g → R corresponding to an sRK method with coefficients b i , d i , a ij with i, j = 1, . . ., s is defined analogously to the classical case, that is, as a sum over sRK coefficients with b i corresponding to the black roots, a ij corresponding to black vertices which are not roots, and d i corresponding to the grafted vertices.Grafted roots coorespond to 1.The coefficient is 0 on all grafted forests that contain an aroma.
where F g is the set of grafted forests without aromas, V c (π) are the vertices of π of color c, and s(v) are the successors of v in π.
We recall that all edges are directed towards the roots of the corresponding connected components.Some values of a ∶ AF g → R corresponding to an sRK method with coefficients b i , a ij , d i for i, j ∈ [s] are Some values of a for bigger forests are: The proof of Proposition 4.3 is a straightforward extension of the theory presented in [15] in Chapter III.1.1.The functional a ∶ AF g → R corresponding to an S-series for sRK method is 0 on all grafted forests that contain aromas due to the fact that the Taylor expansion of I(Ψ h (y 0 )) around y 0 does not produce differentials that would correspond to aromas.

From grafted to exotic forests
Since we are interested in studying the order conditions with respect to the invariant measure, we consider the expansion of E[φ(y 0 + B(a)(y 0 ))] which can be written as E[S(a) [φ]] where S(a) is an S-series over grafted forests.Let us consider how the expectation acts on the differential operators corresponding to grafted forests [22].From the definition of F f on grafted forests, it follows that the expectation depends only on the grafted vertices, i.e. on terms of the form E(ξ i 1 ⋯ξ im ).We know that the expectation is 0 for m odd, thus, we consider E(ξ i 1 ⋯ξ i 2n ).We know that E(ξ i ξ j ) = E(ξ i )E(ξ j ) if i ≠ j, therefore, the indices must have even multiplicities.For example, We notice that the expectation forces i and k, which are indices corresponding to the grafted vertices, to be equal.This creates a pairing between the grafted vertices, this pairing is named liana and the resulting vector field corresponds to the vector field of an exotic forest.Therefore, the expectation of an S-series over grafted forests is an exotic S-series, i.e.S-series over exotic forest.
Let n ∈ N be a natural number and let e 1 , . . ., e n denote the standard basis of R n .Let g ∶ R d → R d be a vector field, then g(x) = ∑ ∞ i=1 g i (x)e i with g i = 0 for all i > d.Let g(x) = √ 2h1 ∈ R d where 1 is a vector of ones.The map F f is defined over exotic forests by extending Definition 2.6 with F f (k) = g k e k for k ∈ N using the construction (4) of exotic forests as a subspace of AF •N .We use the example we have already seen to illustrate the definition: The map F f defined this way over EF is an algebra morphism, therefore, the composition law for exotic S-series is given by Theorem 4.2.Theorem 4.4 is proved in [22] and follows from the Isserlis Theorem [19].
Theorem 4.4.[22] Let (π, α g ) ∈ AF g be a grafted forest with an even number of grafted vertices.Then, the expectation of F f (π, α g ) is given by where the sum is over all decorations α e with α −1 where α e is defined by ( 4).Using Theorem 4.4, we can define Proof.Recall that p(π, α e , α g ) (Section 3.1) is the number of ways to pair grafted vertices of (π, α g ) to obtain an exotic forest isomorphic to (π, α e ).Therefore, using Proposition 3.4, we have, where the sum is over all α e such that α −1 e (•) = α −1 e (•).We use this identity to see that E commutes with δ σ .Since E commutes with both F f and δ σ , the statement is proved.
Remark 4.6.We note that, in general, the expectation of a composition of S-series is not equal to the composition of the corresponding exotic S-series, i.e.

E [S(a)[S(b)]] ≠ ES(a)[ES(b)].
However, the equality holds if we use a splitting method that splits the noise denoted by the grafted vertices × into noises × 1 and × 2 that are independent.This assures that E [S(a)[S(b)]] does not contain pairings of grafted vertices of colors × 1 and × 2 , and makes S(a) and S(b) independent random variables.

Order conditions for invariant measure sampling of ergodic SDEs
In this section, we generate order conditions building on the results and ideas from [22].We define a theoretical algorithm that generates systematically the order conditions for the invariant measure sampling of ergodic SDEs and prove an algebraic property of the generated order conditions.This allows us to reduce the number of order conditions, for example, it allows us to reduce the number of order 3 conditions from 13 to 9.
We consider a truncated exotic S-series and apply transformations to the corresponding exotic forests.The result of the algorithm is a truncated exotic S-series ES(ω).We prove that ω is a character of (EF , ⋅), therefore, the order p conditions with respect to the invariant measure are obtained by requiring ω(τ ) = 0 for all τ ∈ ET with τ < p.

Numerical analysis framework
We recall that we focus on the overdamped Langevin equation (2), where V ∶ R d → R is a smooth and globally Lipschitz potential and there exist C 1 > 0 and Such potential guarantees the problem to be ergodic [24] with the density of the unique invariant measure being Assumption 1.The integrator X 1 = Ψ h (X 0 , f, ξ) has bounded moments of any order along time, i.e., for all integer k ≥ 0, ), where A i , i = 1, 2, . . ., are linear differential operators.For more details see [33].We assume that A 1 = L where L is the generator discussed in Section 2, that is, the integrator has at least weak order 1.
then, the integrator has order p with respect to the invariant measure.

Transformation of exotic forests
We consider numerical integrators that can be expanded using B-series over grafted trees, for example, sRK methods.We recall that for such integrators the differential operators A j from Theorem 5.1 have the form where EF j is the subset of exotic forests of size j.Thus, Theorem 5.1 states that a numerical method y 0 + B(a)(y 0 ) is order p with respect to the invariant measure, if where is the sum over all exotic forests up to size p with coefficients given by a ∶ EF → R normalized by σ.We obtain order conditions with respect to the invariant measure by modifying the differential operators that make up ES <p (a) in a way that does not change the value of the integral.This translates into two transformations applied to the corresponding exotic forests: 1. Edge-liana inversion (ELI), which moves the liana down the tree along an edge, where we note that ELI uses the fact that the exotic forests here are used to denote differential operators, which means that it assumes there is an "invisible" edge starting at the roots, 2. Integration by parts (IBP), which takes a grafted root, connects it to all other vertices with coefficient −1, and adds a term with coefficient −2 in which the grafted root is removed and the paired grafted vertex is colored black, for example, More details on ELI and IBP can be found in [22] in Section 4.2 and Proposition 4.7.Proposition 5.2 allows us to use ELI and IBP to obtain order conditions.Proposition is proven for ELI using the fact that the vector field f is the gradient of a potential, that is, f = −∇V , and for IBP using the integration by parts process on the integral.For example, let ) = I( 1 1 ) due to the following computation where the property ∂ i f j = ∂ j f i is used, ) = 2h 1 ).
Analogously, let 1 − 2 , then, we perform the following computation, where we used integration by parts of the integral and the identity ∂ i ρ ∞ = f i ρ ∞ .We define the term connecting liana and build an algorithm by composing ELI and IBP such that the exotic forests obtained by the algorithm have no connecting lianas., and the compositions of ELI and IBP that get rid of the connecting lianas are The compositions of ELI and IBP listed in Example 5.4 are called transformation chains and denoted by π → π where π ∈ EF and π ∈ EF, where EF is the vector space of exotic forests without connecting lianas.

Labeled Transformation Chains
To simplify the analysis of the algorithm that we introduce, let us consider the space of labeled exotic forests denoted by EF L .We use the labeling to split the transformation chains into labeled transformation chains (LTCs) that have labeled exotic forests as terms.This means that the IBP transformation applied to π is split into IBP v transformations for v ∈ V (π) and IBP • for the term where the grafted root is removed and the remaining grafted vertex becomes black.For example, the transformation chain is split into the following labeled transformation chains: where we exclude the coefficients from the LTC and handle them separately.We note that ELI is not affected.Let us denote by Ψ ∶ EF → EF L any injection of EF into EF L which labels the vertices of exotic forests according to some rules.Let Φ ∶ EF L → EF be the linear map that forgets the labeling.We note that Φ ○ Ψ = id and Ψ ○ Φ is a relabeling.Let A ∶ EF → EF be a linear map defined as where the sum is taken over all labeled transformation chains (LTCs) starting at π which are generated recursively by Algorithm 1 and the coefficient C(π → π) is defined as where π → π IBPv is the number of IBP v transformations for v ∈ V (π) for any intermediate π and π → π IBP• is the number of IBP • transformations.
Let us assume a total order on the vertices of any labeled exotic forest.We require the total order to respect the concatenation product, that is, Such order can be obtained by extending the results from [34].Let a minimal connecting liana be the connecting liana {v 1 , v 2 } such that v 1 has the shortest path to the root.If there are multiple such lianas, choose the liana with smallest v 1 according to the total order of vertices.If there are multiple lianas with equal v 1 , choose the liana with the smallest v 2 .
Algorithm 1: Generate the set of all LTCs that start with π 1 ∈ EF L Input: π 1 ∈ EF L Output: The set of LTCs {π 1 → π n } with π n ∈ EF L .
Step 2: If the grafted vertex v 1 is a root, then let {π 2 } N i=1 with N = V (π 1 ) + 1 be the set of forests obtained by applying IBP v and IBP • to π 1 with respect to l.
Step 3: If v 1 is not a root, then let {π 2 } be the singleton set containing the forest obtained by applying ELI moving l towards the root.
Proof.The algorithm is guaranteed to end because every application of the IBP decreases the number of roots, which means that IBP can be applied only a finite number of times.The application of ELI does not change the number of roots.ELI moves a liana towards the root which can be done a finite number of times.Note that the minimal connecting liana will stay minimal after the application of ELI.
Let ⟨⋅, ⋅⟩ be the orthonormal inner product, that is, for π 1 , π 2 ∈ EF , we have Let ⟨⋅, ⋅⟩ σ be the renormalized inner product, that is, ⟨π 1 , π 2 ⟩ σ ∶= σ(π 1 )⟨π 1 , π 2 ⟩.We note that both inner products are equal on the space of labeled exotic forests EF L .Due to Algorithm 1, the maps A L and A are well-defined and we are ready to obtain the order conditions with respect to the invariant measure.The order conditions are denoted by ω(π) = 0 with π ∈ EF where Due to Theorem 5.1 and Proposition 5.2, the conditions ω(π) = 0 for all π ∈ EF , π < p, imply the order p with respect to the invariant measure, since The values of ω for all exotic forests up to size 3 are listed in Table 2 of the Appendix.

Multiplicative property of order conditions
Let ∆ σ ∶ EF → EF ⊗ EF denote the dual of the concatenation product with respect to the inner product ⟨⋅, ⋅⟩ σ .The explicit formula for ∆ σ is the following .
We can see that this formula is true, since, Let us also consider the dual of the concatenation product on the space EF L of labeled exotic forests, ∆ ∶ EF L → EF L ⊗ EF L .We prove Lemma 5.6 as an intermediate result.
Lemma 5.6.Let π, π ∈ EF L be labeled exotic forests.We define the sets S 1 and S 2 as Proof.Let us take a tuple (π → π, (π 1 , π2 )) ∈ S 1 .It contains an LTC π → π and a splitting of π into π1 and π2 .Since LTC keeps the labels of vertices when it acts on them, we can split π into π 1 and π 2 by following the labeling of π1 and π2 .This also gives us a splitting of the LTC π → π into π 1 → π1 and π 2 → π2 .That is, we get a tuple Let us take a tuple ((π 1 , π 2 ), π 1 → π1 , π 2 → π2 ) ∈ S 2 that contains a splitting of π into π 1 and π 2 , and two LTCs π 1 → π1 and π 2 → π2 .We can combine π 1 → π1 and π 2 → π2 by concatenating all intermediate labeled exotic forests into one LTC π → π.This is possible since the total order of vertices respects the concatenation product and the two LTC have distinct labels because π 1 and π 2 are a splitting of one exotic forest.By combining the two LTCs, we also get an exotic forest π that has π1 and π2 as splitting.
This finishes the proof.
We prove that the maps Φ ∶ (EF L , ∆) → (EF , ∆ σ ), A L ∶ (EF L , ∆) → ( EF L , ∆), and A ∶ (EF , ∆ σ ) → ( EF , ∆ σ ) are coalgebra morphisms.We recall that the maps A and A L are defined in Section 5.3 and Φ is the map that forgets the labels of the exotic forests.
This implies that, using the formula for ∆ σ , we have This proves identity (1).
Step 2) We follow the definition of A L and use the property C(π → π) = C(π 1 → π1 )C(π 2 → π2 ) where the LTC π → π splits into the LTCs π 1 → π1 and π 2 → π2 .We start by using the definitions of A L and ∆ and obtain: Then, we use Lemma 5.6 and group the terms to get We use the definitions of A L and ∆ to conclude the proof of identity (2).
Step 3) We use the definition of A and identites (1) and (2) to show that We note that the definition of A accepts any injection Ψ, therefore, we can insert a relabeling Ψ ○ Φ to obtain which proves identity (3) using the definition of A, identity (1), and the property Φ○Ψ = id.
Theorem 5.8.Let us apply Algorithm 1 to an exotic S-series ES(a) with a being a character of (EF, ⋅), then, the map ω defined as ( 5) is a character of (EF , ⋅), that is, Proof.We use the definition of ω and ∆ σ to have and this finishes the proof.
B Order conditions for the invariant measure up to order 3 π ω(π) Table 2: Order conditions for stochastic Runge-Kutta methods of order 3 generated by the Algorithm 1.The rows marked by * correspond to the order conditions which are automatically satisfied using the Theorem 5.8.

Proposition 4 . 3 .
Let S(a) be the S-series of a stochastic Runge-Kutta method with coefficients

5 .
The expectation of an S-series over grafted forests S(a) is an exotic S-series ES(a ○ Φ), that is, E [S(a)] = ES(a ○ Φ).
apply Algorithm 1 to π 2 .Merge all the resulting sets {π → π n } of LTCs and prepend π 1 to each LTC.Return the resulting set {π 1