Wormholes and surface defects in rational ensemble holography

We study wormhole contributions to the bulk path integral in holographic models which are dual to ensembles of rational free boson conformal field theories. We focus on the path integral on a geometry connecting two toroidal boundaries, which should capture the variance of the ensemble distribution. We show that this requirement leads to a nontrivial set of constraints which generically picks out the uniform, maximum entropy, ensemble distribution. Furthermore, we show that the two-boundary path integral should receive contributions from `exotic' wormholes, which arise from the inclusion of topological surface defects.


Introduction and summary
Recent developments have led to a revived interest in the role of wormhole geometries contributing to the Euclidean path integral in gravity.On one hand, inclusion of replica wormholes in the path integral for the entanglement entropy of black hole radiation have shed light on the information puzzle [1,2].On the other hand, contributions from wormholes connecting different asymptotic boundaries lead to non-factorizing observables and are a sign that the path integral computes an average over an ensemble of CFTs.
Perhaps the most clear-cut instance of such ensemble holography is that of JT gravity, where the contribution of the 'double-trumpet' wormhole and its generalizations are directly related to the fact that the model is dual to an ensemble of quantum mechanical theories [3].These insights from two-dimensional gravity have also led to a tentative reinterpretation of Maloney and Witten's result [4] for the partition function of pure three dimensional anti-de Sitter gravity, which displays features of an ensemble average.For one, the resulting continuous spectrum is most naturally interpreted as describing an average of theories with discrete spectra.Furthermore, Cotler and Jensen found an explicit bulk wormhole contributing to the two-boundary partition function [5].The putative ensemble interpretation of the Maloney-Witten result for the gravity path integral on a solid torus with boundary complex structure τ would imply an identity of the form Here, the left hand side is a so-called Poincaré sum with χ 0 Virasoro vacuum character, Γ = P SL(2, Z) is the modular group and Γ f is the subgroup leaving |χ 0 | 2 invariant.The expectation value of the CFT partition function Z[τ ] on the right-hand side stands for an ensemble average over all Virasoro CFTs.Since we have at present no control over this ensemble (nor how to define an integration measure to average over it), making (1.1) more precise remains a daunting task 1 .
It is encouraging however that relations of the type (1.1) do turn out to hold in situations with enhanced symmetry.That is, if we replace χ 0 by the vacuum character of an extended chiral algebra for which we have control over the moduli space of CFTs, (1.1) can often be turned into a mathematical identity.The candidate bulk theory giving rise to (1.1) is then an 'exotic Chern-Simons gravity', where one starts from a Chern-Simons theory realizing the appropriate chiral algebra, and supplements it with a prescription to sum over certain topologies in the path integral.
As we already mentioned, the lack of factorization of ensemble-averaged two-boundary CFT partition function can be interpreted in the bulk in terms of wormhole contributions to the path integral where the boundaries are connected through the bulk.The wormhole contribution Z wh [τ 1 , τ 2 ] is the connected part of the expectation value of the product of two partition functions Z (2)  conn and, as rewritten in the second line, measures the variance of the ensemble distribution.
The bulk interpretation of this expression however leads to a puzzle which was pointed out in [18] and which inspired our investigations.The authors of [18] computed the right hand side of (1.2) in the Narain ensemble and compared it to Cotler and Jensen's direct computation [5] from the path integral on a wormhole geometry.While this direct computation captures part of the result, other terms in the ensemble expression are not accounted for.It therefore appears that the bulk dual to the ensemble requires extra contributions from as yet unknown sectors which we will refer to as 'exotic wormholes'.Our goal in this note is to clarify the holographic interpretation of the two-boundary partition function, including a version of the exotic wormhole puzzle, in a simpler setting where the dual ensemble consists of rational CFTs.The study of identities of the type (1.1) in generic rational CFTs was recently undertaken in [30] and, in the case of ensembles of Virasoro minimal models, goes back to [31].Further studies of rational ensemble holography include [32][33][34][35][36][37].These models provide discrete analogs2 to Narain holography, since both sides of the relation (1.1) contain only a finite number of terms.In particular, the right hand side of (1.1) becomes a sum over a finite set of modular invariant partition functions Although the ensemble weights ρ I can be computed from eq. (1.1) on a case-by-case basis, a general expression for them in terms of the CFT data is currently not known.
In this note we will restrict attention to what is arguably the simplest class of rational CFT ensembles, consisting of free compact boson CFTs where the radius squared is a rational number.These ensembles may be viewed as measure zero subsets of the Narain moduli space on which the chiral algebra is enhanced and the CFT becomes rational, and were studied by one of us in the context of ensemble holography in [38].The candidate bulk theory is in this case an exotic Chern-Simons gravity with compact U (1) k × U (1) −k gauge group.It was shown in [38] that, when the integer level k does not contain any square divisors, the bulk theory describes the maximum entropy ensemble where the weights ρ I in (1.3) are all equal.
Our main object of study is the connected two-boundary partition function Z conn (1.2) in this class of models.In the bulk description, it can be expressed as a Poincaré sum of the form [5] Z where Z (2) seed is a seed amplitude representing a functional integral on a wormhole geometry connecting two toroidal boundaries with complex structure moduli τ 1 and τ 2 .As pointed out in [39], the form of Z (2) seed is constrained due to its three-dimensional origin.Taking these constraints into account, we point out that matching (1.4) with its proposed dual (1.2) leads in general to an overconstrained system, restricting not only the form of Z (2) seed but also the ensemble weights ρ I .When the level k is non-prime and free of square divisors, our analysis shows that the only consistent solution is in fact the maximum entropy distribution with equal ρ I .This can be viewed as a nontrivial consistency check on the proposed ensembleholographic models with starting point (1.1), and actually rules out many other putative models where one would replace the vacuum character |χ 0 | 2 in (1.1) by a more general combination of characters.
We also compare our expression for Z seed [τ 1 , τ 2 ] with a direct bulk computation of the modulus square of a U (1) k Chern-Simons partition function on a wormhole geometry connecting two toroidal boundaries.The latter partition function Z CS T 2 ×I (τ 1 , τ 2 ) is known from the work [40] on the canonical quantization on the annulus and can be viewed as the equivalent of the Cotler-Jensen wormhole partition function [39,41] in rational CFTs.As it turns out, Z CS T 2 ×I captures only one of the terms in our expression for the two-boundary seed amplitude Z (2) seed .Similar to what happens in Narain holography, we appear to miss a number of contributions from 'exotic' wormholes, in this case labelled by nondiagonal modular invariants.However, in the present context, these have a clear bulk interpretation as arising from a Chern-Simons path integral in the presence of a topological surface defect.This follows in straightforward manner from the relation between surface operators in 3D Chern-Simons theory and modular invariants in rational CFT established by Kapustin and Saulina [42] (see also [43]).Therefore, surface defects appear to play a crucial role in ensemble-holographic duality 3 .This paper is organized as follows.In Section 2 we summarize the holographic paradigm for ensembles of rational CFTs, and derive general formulas for the ensemble weights and the two-boundary wormhole amplitude.In Section 3 we introduce the ensembles of rational free boson CFTs which will be the focus of our analysis.In Section 4 we analyze the solutions to the consistency constraints imposed by the holographic interpretation of the two-boundary wormhole amplitude, both in simple examples and in general ensembles at square-free level k.Based on these results we point out in Section 5 that ensemble holography requires the inclusion of topological surface defects in the path integral.In the Discussion we summarize some lessons to be learned form our findings and point out remaining puzzles and possible generalizations.

Rational ensemble holography
In this Section we review some aspects of holography for ensembles of rational CFTs, and derive general expressions for the ensemble weights and the two-boundary wormhole amplitude which will be analyzed in a class of examples in the rest of the paper.

Ensembles of rational CFTs
In a rational conformal field theory (RCFT), the spectrum contains only a finite number N of irreducible representations of the chiral algebra, which we will denote as A. We label these representations as R i , i = 0, . . ., N − 1, and the corresponding characters as χ i (τ ), i = 0, . . ., N − 1, with the convention that R 0 and χ 0 denote the vacuum representation and the vacuum character.Combining left-and right-moving sectors, RCFTs allow for a finite number M of independent modular invariant partition functions which we label as 4 The matrices M I are modular invariant in the sense that they commute with the unitary matrices representing the action of the modular group on the space of characters.We will use the convention that M 1 is the identity matrix, giving rise to the diagonal modular invariant.We restrict our attention to the situation where all modular invariants are physical, meaning that all matrix components of the M I are integer, and that the vacuum representation appears only once, i.e.
Furthermore, we consider here only parity-invariant theories, in which the M I matrices are in addition symmetric.An ensemble of RCFTs with chiral algebra A × A is specified by assigning a weight (or probability) ρ I to each of the modular invariant theories.These should be positive and sum up to one, (2. 3) The ensemble-averaged partition function is given by (cfr.(1.3)) One can associate an entropy to the ensemble distribution, This entropy reaches a maximum for a uniform distribution where all CFTs are equally likely, Similarly, we can consider the ensemble-averaged n-fold product of partition functions of the form ⟨ n a=1 Z[τ a ]⟩.Of special interest is the connected part of these n-point averages.
For n = 2, 3 one finds5 More generally, standard generating function methods show that the connected n-point partition function measures n-th cumulant of the ensemble distribution.These can be formally introduced as (2.9)

Exotic Chern-Simons gravity in the bulk
Tentative bulk duals to ensembles of RCFTs have been proposed in the form of 'exotic Chern-Simons gravities'.These are constructed from a standard 3D Chern-Simons theory supplemented with a prescription to sum over certain topologies in the path integral, as one would in a theory of gravity.Through the correspondence between 3D Chern Simons theories and 2D RCFTs [40,47], a RCFT with chiral algebra A×A can be realized in terms of the edge modes of a Chern-Simons theory on a three-dimensional manifold with boundary, with appropriate boundary conditions.For example, if A is the Kac-Moody algebra g k associated to a semisimple Lie algebra g, we would start from a G k × G −k Cherns-Simons theory, while if we want to describe Virasoro or W N minimal models, we would start from an SL(2, R) × SL(2, R) resp.SL(N, R) × SL(N, R) theory at appropriate values of the level, supplemented with boundary conditions which implement a Drinfeld-Sokolov reduction of the chiral algebra.In this work we will focus on U (1) k ×U (1) −k Chern-Simons theory, which realizes the chiral algebra of a rational compact boson (or 'rational torus' in the terminology of [48]) as we will review in more detail in Section 3.
These Chern-Simons theories contain in some sense a gravitational sector, since they all give rise to a boundary stress tensor generating left-and right-moving Virasoro subalgebras.It is then natural to attempt to make gravity fully dynamical by supplementing the bulk theory with a prescription to sum over topologies in the path integral.The ad-hoc prescription which is most commonly used in the literature, and which we will adopt also here, includes, for a CFT ensemble defined on a Riemann surface Σ, a sum over handlebody topologies whose boundary is Σ.
the case in a large class of examples we will consider, the 2-point function expression further simplifies to For example, when Σ is a torus with complex structure parameter τ , this prescription tells us to sum over the SL(2, Z) family [49] of handlebodies corresponding to the inequivalent ways of 'filling in' the boundary torus.This leads to the bulk expression for the ensemble-averaged partition function (cfr.(1.1)) as a Poincaré sum (2.10) Here, the 1-boundary seed amplitude arises from a Chern-Simons path integral on a specific solid torus, and Γ f is the subgroup of the modular group Γ which leaves Z seed [τ ] invariant.We note that this expression is sensible, as the RHS is modular invariant by construction, and expanding it in a basis (2.1) of modular invariants determines the ensemble weights ρ I .
Note that, once the weights ρ I are determined, so are all the connected n-point functions (2.9) in the ensemble.On the bulk side, the latter should come from path integrals on geometries connecting n boundary tori.The above prescription expresses them also in terms of Poincaré sums of seed amplitudes of the form Here, the seed amplitude Z seed arises from a Chern-Simons path integral on a specific 3D geometry connecting the n boundary tori, and the Poincaré sums arise from performing relative Dehn twists between the boundaries.As we shall illustrate below, the seed amplitudes satisfy certain geometric constraints, and the RHS of (2.11) is not arbitrarily adjustable.Therefore, nontrivial consistency conditions arise from equating (2.11) with the boundary ensemble expression (2.9).
In this work we will focus on the constraints imposed by the ensemble interpretation of the two-boundary (n = 2) amplitude.Besides strongly constraining the allowed 1boundary seed amplitude Z (1) seed and the ensemble weights, the solution will also instruct us to include contributions from topological surface defects in the 2-boundary seed Z (n) seed .

Ensemble weights
Let us make the above general statements more concrete, starting from the calculation of the ensemble weights from the relation (2.10), following [30,31].The seed amplitude Z (1) seed arises from a Chern-Simons path integral on a solid torus.The most natural choice is to perform this path integral on the pure solid torus, without any Wilson line insertions.Viewing this geometry as a disk times a circle representing Euclidean time, one can obtain canonical quantization of two copies of U (1) k Chern-Simons theory on the disk.Each copy leads to a chiral algebra A on the boundary and a Hilbert space given by its vacuum irreducible representation R 0 [40].Consequently the seed amplitude is proportional to the square of the vacuum character where ñ is an as yet undetermined normalization.A possible generalization [30] of (2.12) is to take as a starting point a more general combination of characters determined by a seed matrix M seed : Since the quantization of the U (1) k theory on the disk pierced by a Wilson line of charge j ∈ Z 2k produces the representation R j , the seed amplitude (2.13) can be realized as a path integral on a solid torus with a formal combination of Wilson lines inserted along the noncontractible circle.However, we will see that not every seed matrix will lead to sensible ensemble weights satisfying (2.3).Note that the vacuum seed (2.12) is the special case where Given a seed amplitude, the corresponding ensemble weights ρ I are determined by combining eqs.(2.4,2.10).The result can be written as a matrix equation Multiplying by M J , taking the trace and using modular invariance of the M J matrices one finds where n = |Γ/Γ f |ñ and we have defined the 'seed vector' and the M × M matrix D IJ = trM I M J . (2.18) The normalization factor n should ensure that (2.3) holds, in particular One obvious constraint on the allowed seed matrices (2.13) is that this expression is finite.
In the theory based on the vacuum seed (2.14) we have, due to (2.2), (2.20)

Two-boundary consistency conditions
Having discussed the bulk partition function in the presence a single torus boundary and the determination of the ensemble weights, let us now move on to the situation with two toroidal boundaries and study the implications of the equality of the bulk (2.11) and boundary (2.9) expressions for this connected 2-point amplitude.In (2.11) with n = 2, the 2-boundary seed amplitude Z integral on a 3-geometry with the topology of a torus times an interval.Therefore, we will assume that it takes a holomorphically factorized form, i.e.
Furthermore, it was argued on general grounds in [5] (see also [18]) that Z T 2 ×I (τ 1 , τ 2 ) should be invariant under a simultaneous modular transformation of the arguments in the sense that where implements a sign reversal of τ .The argument goes as follows (see Figure 1): a modular transformation on one boundary torus stems from a different choice of basis for the lattice defining it, and this new basis is transported smoothly through the bulk to induce the same change of basis in the second boundary.Therefore the Chern-Simons path-integral In this path integral, the two boundaries are oppositely oriented as induced from the bulk.
To obtain the partition function for boundary tori with the same orientation, we replace It is straightforward to check that the property (2.24) translates into (2.22).The property (2.22) implies that we can expand the seed amplitude in terms of M unknown 'wormhole coefficients' c I as follows: (2.26) The equality of the expressions (2.9) and (2.11) can once again be expressed as a matrix identity, which can be reduced to where we defined To derive (2.27) we have used our assumption (see below (2.2)) that the M I are real and symmetric matrices.We should note that (2.27) is in general an overdetermined system for the M complex coefficients c I , and it is therefore to be expected that the existence of solutions will also impose constraints on the ρ I and therefore the 1-boundary seed amplitude Z (1) seed .

Wormhole amplitude from canonical quantization
Naively one might expect that the 2-boundary seed amplitude Z seed should be given by the pure Chern-Simons path integral on the T 2 × I wormhole geometry.This path integral is the RCFT equivalent of the wormhole partition function computed by Cotler and Jensen for pure gravity and noncompact U (1) Chern-Simons theories [5,39].However, as we shall see, this Chern-Simons path integral, which we will denote as Z CS T 2 ×I (τ 1 , τ 2 ), gives only part of the required answer and needs to be supplemented with additional 'exotic' wormhole contributions which it will be our task to identify.
Let us first recall the result for the pure Chern-Simons path integral Z CS T 2 ×I (τ 1 , τ 2 ) from the standard Chern-Simons/RCFT correspondence.Viewing T 2 × I as an annulus S 1 × I times a circle representing Euclidean time, we can obtain Z CS T 2 ×I (τ 1 , τ 2 ) from the canonical quantization of the theory on the annulus.In this case there are chiral algebras A and A associated to the two boundary circles of the annulus, and [40] obtained the following result for the Hilbert space: where we recall that the R i are the irreducible representations of the chiral algebra.Correspondingly, the path intregral is given by (allowing for an undetermined normalization factor n) Here, we have followed the steps below (2.24) to account for boundaries with the same orientation.As a consistency check, we see that this is indeed of the general form (2.26): it is the particular case where only the diagonal modular invariant M ij 1 = δ ij appears.In other words, if the pure Chern-Simons partition function were the full answer, the coefficients c I would be of the form One remark is in order before we continue to discuss a particular class of RCFT ensembles.For simplicity, we have in this section considered CFT partition functions and characters which only keep track of the Virasoro conformal weights L 0 and L0 .However, when the chiral algebra is extended, it can be desirable to work with refined partition functions and characters which keep track of further quantum numbers (commuting with L 0 , L0 ) and depend on additional chemical potentials.The formulas in this section readily generalize to this setting, provided we assign the proper modular transformation law to the chemical potentials, as we will illustrate in the examples below.

Rational boson ensembles and their bulk duals
In what follows we will make the general considerations of the previous Section explicit in a simple class of ensemble holographic theories.In these, the exotic gravity theory is based on a compact U (1) k × U (1) −k Chern-Simons theory with action where the level 6 k should be an integer in order for the path integral to be well-defined.As shown in [38], a large subset of these remains under analytic control even when the size of the ensemble goes to infinity.This will allow us to find explicit expressions for the ensemble weights (2.16) and to investigate the 2-boundary consistency conditions (2.27).

Chiral algebra and representations
The chiral algebra of the models of interest, which we denote as A k , arises in free boson CFTs at rational values of the radius squared.Indeed, let us consider a compact free boson at radius 7 R 2 = p/q with p and q relatively prime and positive integers.Setting k = pq this theory has chiral currents with conformal weights 1 and k respectively.These generate the chiral algebra A k .This algebra has 2k inequivalent irreducible representations R j , j = 0, . . ., 2k − 1 [48] (for a review, see [51]).To fully characterize these, we should not only keep track of 6 Our normalization of the level is chosen in order to avoid factors of 2 in formulas below.Many references use a differently normalized level related to ours as k there = 2k. 7Our compact boson conventions follow Polchinski's book [50] with α ′ = 1.
their weights under the Virasoro generator L 0 but also under the u(1) generator J 0 .That is, we will work with refined characters defined as where q = e 2πiτ , ζ = e −2πiz , and η = q so we can take j in the range j = 0, . . ., 2k − 1. Charge conjugation sends j → −j: We note that the representations R 0 and R k are self-conjugate, while the remaining R j with j / ∈ kZ are not, since χ j * (τ, z) ̸ = χ j (τ, z).However, the specialized characters evaluated at z = 0 cannot distinguish conjugate representations: Therefore, in order to keep track of the full A k representation content we need to work with refined characters rather than specialized ones.Under modular transformations γ = a b c d ∈ SL(2, Z), the characters transform as Here, the U γ furnish a 2k-dimensional unitary representation of SL(2, Z).In particular, the modular S and T transformations are represented as S : One checks that the following group relations hold: Since the charge conjugation matrix C is not the identity, the matrices U γ furnish a representation of SL(2, Z) rather than P SL(2, Z).Due to the z-dependent prefactor in (3.10), the refined characters do not transform in a matrix representation of SL(2, Z) under modular transformations.This can be remedied by multiplying the characters by an extra factor whose transformation offsets the anomalous part.Indeed, one checks that χj (τ, z) = e πk z 2 4τ 2 χ j (τ, z) (3.12) transforms in the unitary matrix representation of SL(2, Z) furnished by the matrices U γ .We should also note that the rescaled characters χ(τ, z) are the ones that naturally appear in expressions obtained from a covariant path integral formulation [52].In the 2D free boson theory, the chemical potential z is introduced in the Lagrangian by adding a term of the form A w∂ w X + A w ∂ wX , where A w ∝ z .In converting to Hamiltonian form one gets a cross term proportional to A w A w which is precisely the prefactor in (3.13).The argument extends to 3D Chern-Simons path integrals, e.g. the path integral on the solid torus with appropriate boundary conditions is proportional to | χ0 (τ, z)| 2 [14].

Modular invariants
Let us now discuss the modular invariant combinations of A k × A k characters.From the construction above we note that, for each divisor δ of k (which we will write as δ|k in what follows), the compact boson at radius R 2 = k/δ 2 yields a realization of the algebra A k × A k .The refined and rescaled partition function therefore furnishes a modular invariant.Furthermore, a full analysis of the commutant of the S-and T -matrices [53,54] shows that the modular invariants obtained in this way form a complete basis.It follows that in these theories, the number of independent modular invariants is M = d(k), the number of distinct divisors of k.
It will be convenient to introduce a specific labelling of the modular invariant partition functions.For this we first label the divisors of k with an index I running from 1 to d(k) in increasing order 1 = δ 1 < δ 2 . . .< δ d(k) . (3.14) We will use the same label to indicate the modular invariant partition function associated to δ I , i.e.
As before we associate to Z I a modular invariant 2k ×2k matrix M I through decomposition in (rescaled) characters Let us now give an explicit expression for these matrices M I .
It will be useful to introduce the symbol α I to denote the greatest common denominator of δ I and k/δ I : Note that α I is a quadratic divisor of k, α 2 I |k.The definition (3.17) and Bezout's lemma imply that there exist integers r I , s I such that From these we define the quantity ω I as follows where we introduced the notation [x] n := x mod n.We note that ω I is defined modulo 2k/α 2 I , and it is straightforward to check that a different choice of r I and s I leads to the same ω I .Furthermore, ω I are roots of unity modulo 4k/α 2 I , Here, the quantity δ [x]n is defined to be one if x ≡ 0 (mod n) and zero otherwise.We note that all these modular invariants are physical in the sense of Section 2: the coefficients in the character decomposition are positive integers and the vacuum representation occurs precisely once, M 00 I = 1, ∀I.We note that the uniqueness of the vacuum fixes the normalization of the modular matrices, preventing us from multiplying them by some positive natural number.
We close this subsection with a remark on T-duality.Since, in our labelling (3.14), ω 1 = 1 and ω d(k) = −1, the corresponding modular invariant matrices are These cases correspond to the diagonal and to the charge conjugation modular invariant respectively.More generally, the root of unity associated to k/δ I is −ω I and their modular matrices are related as Therefore, due to (3.7), at vanishing chemical potential their partition functions are the same, which expresses the standard T-duality invariance of the compact boson partition function.

Monoidal multiplicative structure
Before proceeding, let us comment on the further structure on the space of the modular invariant matrices.From the component form (3.21) one can deduce that multiplying two modular invariant matrices gives again a modular invariant matrix.Concretely (see [38] for details) one finds where • stands for the following multiplication rule . (3.26) The prefactor on the RHS could, at the cost of working with non-physical modular matrices, be absorbed in a rescaling of the M I by a factor α −1 I ; one then sees that the rescaled matrices form a monoid under multiplication.This is consistent with the fact that modular invariants are in one-to-one correspondence with topological surface operators in the Chern-Simons theory.As we shall show in detail in Section 5, the multiplication rule (3.25) agrees with the fusion rule for these defects, which define a monoidal two-category.
This additional structure becomes even more restrictive in the case where k is squarefree, meaning that it has no non-trivial square divisors β 2 |k, β > 1, so that the numbers α I defined above are all equal to one.In this case the monoidal structure simplifies to an actual group structure.More precisely, the modular matrices form a representation of the multiplicative group G k of roots of unity modulo 2k, To show this, we first note that, for the modular invariant associated to the divisor δ I , the quantity ω I defined in (3.19) with α I = 1 is an element of G k due to (3.20).Conversely, to every element ω ∈ G k one can associate the divisor Notice that, by definition, ω is its own multiplicative inverse modulo 2k hence it must be coprime with 2k.So every ω ∈ G k is in particular odd and the quantity ω+1 2 is an integer.Moreover δ(ω) is well defined even if ω is defined modulo 2k, because of the property gcd(a + mk, k) = gcd(a, k).One can check that the definitions (3.19) and (3.28) are each others inverse, providing a one-to-one correspondence between the set of divisors of k and the elements of G k .In this special case, from the component expression (3.21) we see that the modular invariant matrices M I furnish the 2k-dimensional representation corresponding simply to the multiplication by ω I in Z 2k .
For generic k, the multiplication rules (3.25) show that the modular matrices form a representation of a commutative monoid with unit element.It can be seen to possess the following structure 9

.29)
9 Note that in general we cannot replace mod4k/α 2 with mod2k/α 2 in (3.29) when k is not square-free.
Here, corresponding to each square-divisor α there is a maximal subgroup G α k which is one-to-one with the subset of divisors of k satisfying gcd(δ, k/δ) = α.This can be shown similarly to above, generalizing (3.28) to which inverts (3.19) in the general case.This provides a one-to-one correspondence between the set of divisors of k and G k in full generality.

Analysis of the two-boundary constraints
Having set the stage, we will in the rest of this work explore the solutions to the equations (2.16) determining the ensemble weights and the two-boundary consistency conditions (2.27).

Examples for small k
It will prove instructive to first consider the problem for a few simple cases at low values of k as we shall do presently; in the next subsection we will then find the general solution for square-free k.

k = 1
In this simplest example, there are two irreducible representations (N = 2) and only one possible modular invariant (M = 1), the diagonal one.Hence there is no ensemble to average over and (2.27) indeed tells us that the wormhole coefficient c 1 should vanish.

k = 2
In this example there are four representations (N = 4) and two modular invariants (M = 2).In our labelling convention we have and the modular invariant matrices are the identity and the charge conjugation matrix C Since C 2 = 1 the group they form under multiplication is isomorphic to Z 2 .The matrix D IJ defined in (2.18) is equal to Starting from a general seed vector we find from (2.16) the ensemble weights In order for the weights to take values between zero and one the seed vector needs to satisfy The special case of the vacuum seed vector V seed = (1, 1) (cfr.(2.20)) leads to equal ensemble weights, ρ I = 1 2 (1, 1).Next we turn to the equations (2.27) for the wormhole coefficients c I .In this example the system is solvable for general ensemble weights, and the solution is only determined up to an overall phase θ 2 : This example generalizes to the situation where k is a prime number in a straightforward way.
The examples with only 1 or 2 modular invariants considered so far are special; for a greater number of modular invariants (2.27) also places constraints on the ensemble weights ρ I , as the two following examples show.Working out the modular invariant matrices from (3.21) one finds that they form a group isomorphic to (Z 2 ) 2 , more precisely The matrix D IJ is found to be and a general 1-boundary seed vector ) leads to the ensemble weights Positivity of the ρ I again restricts the allowed ranges of the v I .
Next we turn to the 2-boundary consistency constraints (2.27).We first convert to a basis in which the RHS of (2.27) is diagonal.In order for solutions to exist, the LHS must also be diagonal in this basis, which places restrictions on the allowed seed vector V seed .
One finds that these lead to two classes of admissible seed vectors.Either it is (up to an overall rescaling) of the form v I = trM I M J , for some J.In this case, the 1-boundary seed amplitude is already modular invariant and given by M J .This picks out a single CFT theory, ρ I = δ IJ , rather than an ensemble, and the wormhole coefficients c I consequently vanish.
The second consistent possibility, and the only one leading to an ensemble of theories, is that seed vector is (up to rescaling) v I = (1, 1, 1, 1).This arises most naturally from the vacuum seed amplitude (2.14), but it could also come from starting with the charge-k excited state Z (1) seed = ñ| χk | 2 .We see from (4.11) that the seed vector v I = (1, 1, 1, 1) leads to a maximal entropy ensemble with 12) The solution for the corresponding wormhole coefficients is determined up to 3 phases, which for later comparison we label as θ 2,3,4 ; one finds In this example, k is not square-free.We have N = 18, M = 3 and The modular matrices form a monoid under multiplication, with M 1 playing the role of an identity element and In other words, M 2 does not possess an inverse.Note that M 1 , M 3 form a Z 2 subgroup.Denoting again V seed = (v 1 , v 2 , v 3 ), the general ensemble weights are We note that, in contrast with the previous examples, starting from the vacuum seed vector v I = (1, 1, 1) does not lead to a uniform distribution but to ρ I = (3/8, 1/4, 3/8).An analysis of the 2-boundary consistency conditions (2.27) for the wormhole coefficients shows that only two types of solutions are possible.As in the previous example, a trivial class of solutions occurs when we start from a modular invariant 1-boundary seed amplitude, in which case there is no ensemble and the wormhole amplitude vanishes, c I = 0.The second possibility occurs when the seed vector is such that the non-invertible invariant M 2 doesn't appear in the ensemble, i.e. ρ 2 = 0. From (4.16) this happens for The analysis proceeds as in the k = 2 case, as we are left with an ensemble containing 2 modular invariants forming a Z 2 group.The solutions in this class have One can check that these exhaust all consistent possibilities.We note in particular that starting from the vacuum seed V seed ∝ (1, 1, 1) is in this case ruled out.

General solution for square-free k
The first three examples above belong to the class where k is square-free.We will now derive an explicit formula the ensemble weights (2.16) and analyze the consistent solutions to the 2-boundary constraints (2.27) within this class of rational boson ensembles.We recall that the modular invariant matrices form a group under multiplication, which is isomorphic to the group G k of roots of unity modulo 2k, Since k is square-free, its prime decomposition is of the form10 k = p 1 p 2 . . .p Ω(k) with all p ρ distinct, and the number of elements of k) .This is also the number of independent modular invariants which we denoted by M: The group G k is commutative and, apart from the unit element ω 1 , all group elements have order two.A standard result [55] shows that G k is in fact isomorphic to (Z 2 ) Ω(k) .The group (Z 2 ) Ω(k) is generated by Ω(k) 'odd elements' which, under the isomorphism correspond to ω(p ρ ), ρ = 1, . . ., Ω(k).(4.21) For example, when k = 6 (see (4.9)) these odd elements are given by ω(2) = [7] 12 ≃ (−1, 1) and ω(3) = [5] 12 ≃ (1, −1).

Some representation theory
In what follows we will need some representation theory of G k .Let us first discuss its irreducible representations (irreps).Since G k is a commutative group, all the irreps are one-dimensional, and their number equals M = 2 Ω(k) , the order of the group.Since each group element squares to one, the irreps can only take the values 1 or -1.An irrep is fully specified by giving its value on each of the generating elements ω(p ρ ), leading indeed to 2 Ω(k) sign choices.We will label the irreps as σ α , α = 1, . . ., M. For fixed α, we can view σ α as a M-dimensional vector with components taking the values 1 or -1.We adopt the convention that σ 1 is the trivial representation, i.e. (σ 1 ) I = 1, ∀I. (4.23) The orthogonality relations between irreducible characters can be expressed as follows: Next we turn to the regular representation which we denote as R, and whose matrices we write as R I ≡ R(ω I ).R is the M-dimensional representation corresponding to the action of the group on itself The representation matrices R I are symmetric, commuting, permutation matrices which square to one.A standard property for abelian groups is that each irrep appears precisely once in the decomposition of R, The basis in which the R matrices are block-diagonal according to the above decomposition is provided by the vectors σ α .Indeed, one shows that which follows from (4.28) A useful identity following from (4.27) is that the regular representation matrices can be expressed as

.29)
A last representation which plays a role in our problem corresponds to the natural action of ω ∈ G k on Z 2k by multiplication, [i] 2k → [ωi] 2k .We denote this representation by M and write M (ω I ) ≡ M I .We see from (3.21) that the M I are precisely the modular invariant matrices introduced before.We denote by m α the multiplicity of the irrep σ α in the decomposition of M : Let us say a bit more about these multiplicities.It is straightforward to see that the trivial representation appears at least twice, i.e.
Indeed, since the congruence [0] 2k is invariant under multiplication by ω I , it defines an invariant subspace.A second invariant subspace is the congruence [k] 2k , which is mapped to itself under multiplication by ω I since, as we established below eq.(3.28), the ω I are odd.In other words, we have In CFT terms this means that each modular invariant contains the (vacuum, vacuum) and the (k, k) representation precisely once.As for the other multiplicities in (4.36), we will see below (4.40) that they are all nonvanishing: Note that the properties (4.31) and (4.33) imply that the representation M is always bigger than the regular representation R. The decomposition (3.21) implies a similar expansion for the characters, trM I = α m α (σ α ) I , which can be inverted to give an formula for the multiplicities m α :

General formula for the ensemble weights
Using these properties, we can rewrite the expression (2.16) for the ensemble weights ρ I in a theory with generic seed amplitude purely in terms of representation-theoretic quantities.
Recall that (2.16) takes the form where n is determined by the normalization condition that I ρ I = 1.First we observe that the matrix D IJ = trM I M J becomes diagonal in the {σ α } basis: where we used the orthogonality relations (4.24).Since D IJ can be shown to be invertible 11 , it follows that all the multiplicities m α are nonvanishing, as anticipated in (4.33) above.Therefore its inverse is

.37)
11 First one realizes that the matrices MI are linearly independent.This is because if a linear combination satisfies 0 = I a I MI then acting on [1] 2k one gets 0 = I a I [ωI ] 2k .Since the ωI are all distinct elements of Z 2k , the above is a linear combination of a sub-basis of C 2k , which leads us to conclude that a I = 0, hence {MI } is linear independent.Since tr(− † , −) is a non-degenerate bilinear form on matrices, when restricted to the subspace spanned by {MI } (which are real symmetric) it remains non-degenerate because this set is linearly independent.So DIJ is non-degenerate.
To proceed it will be useful to also define the components of various vectors appearing in the problem in the {σ α } basis: In order for the seed amplitude to lead to sensible ensemble weights satisfying I ρ I = 1, it is necessary12 that v 1 ̸ = 0, or equivalently, I v I ̸ = 0.The formula (4.35) can be simply rewritten as and converting back to the Carthesian basis we get This is our-sought-after general formula for the ensemble weights.Note that in the special case of the vacuum seed vector, we have v α ∝ δ α 1 and we reproduce the result of [38] that the ensemble weights are equal, ρ I = M −1 , ∀I.

Two-boundary consistency conditions
Now let us try to solve the consistency conditions (2.27) to determine the wormhole coefficients c I .Due to being a highly overdetermined system, the existence if solutions will also place constraints on the allowed seed vectors.The equations (2.27) can be written as where in the second line we used (4.40).Using the identity (4.29), multiplying both sides with (σ α ) K and summing over K, the system (4.41) can be reduced to Summing (4.42) over all I leads to the equation which determines the coefficients c I up to phases: We still have to check whether the remaining equations in the system (4.42) are satisfied.Substituting (4.43) into (4.42)yields This system can be viewed as a set of highly restrictive constraints on the 1-boundary seed coefficients v α .Let us now find all the solutions which make physical sense.Summing (4.45) over α, we obtain We note that the RHS is independent of I, so this equation restricts each ρ I to be a root of the same quadratic equation.
The case M = 2 is special, since (4.46) is automatically satisfied for ρ 2 = (1 − ρ 1 ), and so is (4.45).Therefore for M = 2 the ρ I are unrestricted and the general solution for the wormhole coefficients (4.44) reduces to Now let us analyze the situation where M > 2. The general solution of (4.46) is determined by M sign choices s I = ±1, I = 1, . . ., M for the branches of the roots of quadratic equations (4.46): Summing over I and using (2.3) we find that at least half of the s I should be equal to 1, since Substituting into (4.48)gives For each choice of the s I which sum to a positive number we should in principle check if the full set of equations (4.45) is obeyed.This would be a daunting task in general, but in practice we can restrict attention to those cases where the ρ I in (4.50) are positive.This will reduce our work to checking only two cases.
The first case to verify is that where all s I = 1.This leads to and it is straightforward to check that (4.45) is obeyed.This case includes our natural starting point of the vacuum seed amplitude, Z seed ∝ | χ0 | 2 but, due to (4.32) one could just as well take Z The next case to check is that where all except one of s I are equal to one, say s J = −1 for some J.This leads to This also trivially satisfies (4.45).The first relation shows that there is no ensemble and (4.44) shows that the corresponding wormhole coefficients vanish, This class arises if we start with a seed amplitude which is already modular invariant, Z seed ∝ Z CFT J for some J. Next we should consider the case where precisely two of the signs, say s J , s K for some J ̸ = K, are equal to minus one.Note that this requires M > 4. Then the expression (4.50) gives Similarly, one shows that all remaining choices for the s I would lead to negative ensemble weights and can therefore be discarded.As a check on our formulas it is useful to compare them to our earlier computations in simple examples.For k = 2, we have One checks that our equations (4.40) for the ensemble weight and (4.47) for the wormhole coefficients in the case M = 2 match with our earlier results (4.5) and (4.7).For k = 6, one finds With these in hand one checks that (4.40) reproduces the ensemble weights (4.11), and that the formula (4.52) for the wormhole coefficients with vacuum seed reproduces (4.13).
While we defer the general lessons to be learned from this rather technical analysis to the Discussion, we will first focus on one prominent feature: the need to include somewhat exotic wormholes and their relation to topological surface defects.

Exotic wormholes from surface defects
Both in the examples and in the general discussion, we have seen that, in sitations which describe an ensemble, the wormhole coefficients c I are typically all nonvanishing (see e.g.(4.44)).Therefore the two-boundary seed amplitude includes, besides the J = 1 term which we saw in Section (2.5) comes from the standard pure U (1) k Chern-Simons path integral (2.30) on the wormhole geometry, also other terms which represent some kind of exotic wormhole contributions.These correspond to 2-boundary amplitudes seed constructed from nondiagonal modular invariants.As we shall presently describe, these have a nice bulk interpretation in terms of path integrals including topological surface defects.These defects were studied by Kapustin and Saulina in [42] (see also [43,56]), and were recently discussed from a somewhat different perspective in [57].
Far from doing justice to the subject of surface defects in topological field theories and the mathematical structure of monoidal 2-categories underlying them, we will here only review their construction in the context which is relevant for our discussion and perform some consistency checks.
Let us recall from Section 2.5 that quantization of the pure U (1) theory on the annulus leads to the Hilbert space (2.29) and partition function (2.30), which in turn can be interpreted as a path integral on the wormhole geometry T 2 × I upon identifying the extra dimension with a compactified Euclidean time.There, the quantum number labelling representations and characters of the chiral algebra A k is i ∈ Z 2k . 13On the wormhole geometry there are two chiral algebras associated to the two boundaries and from the partition function (2.30) we see that their representations pair diagonally.Instead, from the component expression (3.21) we see that in each term with J ̸ = 1 in (5.1) the representation of charge i on one boundary pairs with the representation of charge ω J i (modulo 2k/α J , and if both i and j are divisible by α J ) on the other boundary.
To justify the introduction of surface defects, let us also recall that the quantum number i is related geometrically to the holonomy of the bulk gauge field along the non contractible cycle on the annulus.More specifically, k π A = i mod 2k as explained in [40]. 14This holonomy is a dynamical coordinate on the phase space of the theory which has to be summed over in the path integral.Consequently, from a path integral point of view it is somewhat intuitive to geometrically engineer the modular invariant M J as follows (see Figure 2): one inserts a surface defect S J inside the wormhole geometry, parallel to the boundaries, where the holonomy of the bulk gauge field has a discontinuity subject to the sewing conditions A L,R are divisible by α J (here A L,R are the gauge fields on the two sides of S J ).In terms of the divisor δ J associated to ω J , this can be equivalently rewritten as 15  k π (5.3) 13 i never denotes the imaginary unit in this Section. 14To compare with their expressions, notice that the normalization of the level differs from our convention by a factor of 2. 15 The relation can be seen as follows.Let us call iL,R = k π AL,R and assume iL = ωiR mod (2k/α).Now using definition (3.19) and adding and subtracting ω we get Notice that since the sewing conditions are topological they do not break diffeomorphism invariance, hence their insertions produce quantities which are invariant under diagonal modular transformations, by the same argument as given below (2.22).Moreover when ω J is taken to be the identity we are describing a trivial or invisible defect, and the path integral agrees with the bilinear diagonal modular invariant (2.30).
The surface S J with sewing conditions enforcing (5.3) can be precisely identified as a topological defect of the type introduced in [42].Their full analysis from a Lagrangian point of view requires some more care than what we explained above, we refer also to [57] for a recent detailed review. 16It is now clear that the terms with J ̸ = 1 in the seed amplitude (5.1) arise from path integrals with insertions of nontrivial surface defects.
For completeness we notice that these surfaces could alternatively be introduced using the so called 'folding trick' (see Figure 3): one considers a 'folded' U (1) k × U (1) −k Chern-Simons theory on the torus times an interval [0, 1] whith dynamical boundary conditions on T 2 × {0} fixing modular parameters τ 1 and τ 2 for the two gauge fields, and topological boundary conditions on T 2 × {1} that essentially relate the holonomies of the two gauge fields as in (5.3) (up to orientation).The path integral then picks a state on the Hilbert space at T 2 × {0}, which is invariant under large diffeomorphisms (diagonal modular transformations on τ 1 , τ 2 ) because the boundary conditions at T 2 ×{1} are topological.Reversing the orientation of one of the two U (1) theories makes the above construction equivalent to the 'unfolded' U (1) k theory on T 2 × [0, 2], where the two opposite boundaries have dyfor some integers N, Ñ .By the relation of δ and α = gcd(δ, k/δ) we see that iL −iR ∈ (2k/δ)Z.Analogously one proves that iL + iR ∈ (2δ)Z.On the other hand, starting from the two latter relations, one knows that there exist integers a, b such that iL = δa + k δ b and iR = δa − k δ b.It is immediate to see that both iL,R are divisible by α, while it is more tedious to check that this implies ωiR = iL mod (2k/α). 16In particular the sewing conditions (5.3) follow directly from Eq. (6.17) in [57], which is taken as a definition of the defect.On general grounds, two topological surface defects can be fused together to form a new defect.This fusion gives the set of defects the structure of a monoid, since the inverse is not guaranteed to exist, with the trivial defect playing the role of a unit element.The particular fusion rule found in [42] is where δ K(I,J) := lcm gcd δ I , k δ J , gcd δ J , k δ I . (5.4) From the above considerations, the fusion of the defects should agree with the monoidal structure (3.25) of the modular invariant matrices M J under multiplication.It is a heartening consistency check to indeed verify this, as we do in Appendix A.

Discussion
In this paper we have analyzed the implications of the requirement that the 2-boundary bulk amplitude should capture the variance of the ensemble distribution, under the plausible assumptions that it comes from a seed amplitude Z seed which is holomorphically factorized (2.21) and satisfies the Cotler-Jensen property (2.22).We focused on ensembles of rational compact boson CFTs, and were able to analyze the problem in general when the level k is square-free.

Some lessons
Let us summarize the results of this analysis and some lessons we can draw from them.When the ensemble consists of more than two CFTs, i.e. when the level k is not a prime number, we found that the consistency constraints (2.27) are highly constraining and allow for only two possibilities.multi-boundary amplitudes and higher genus boundaries.It will be interesting to see if the uniform ensemble distribution arising from the vacuum seed will pass the consistency tests arising on these topologies as well.
An obvious question is how our work generalizes to the holographic description of ensembles in other rational CFTs.A first class to consider would be the rational boson ensembles in which k has nontrivial square divisors.As we saw above, the additional complications stem, on the boundary side, from the fact that the chiral algebra extends or, in the bulk, from the existence of non-invertible zero-form symmetries associated to certain surface defects.We briefly touched on this class of theories in the suggestive example in par.4.1.4,and a general analysis is in progress [60].Also of interest would be the generalization to multiple compact bosons in rational Narain theories (see [61] for a classification) and to Wess-Zumino-Witten models as well as Virasoro minimal models.As a by-product it would be interesting to harness the existing knowledge of modular invariants through their ADE classification [54] to holographically determine or verify the fusion rules of surface defects in the associated Chern-Simons theories.In the interest of understanding the Euclidean path integral in more general contexts like [1,2], it would also be desirable give a clear bulk path-integral derivation of the partition function on the torus times an interval with the insertion of a surface defect, following related recent studies [62,63].
In order to progress towards the ultimate goal of understanding the ensemble interpretation of pure 3D gravity, we should extend the analysis of multi-boundary consistency constraints to ensembles of irrational CFTs.A natural first step would be to consider the Narain ensembles of irrational free boson theories [10,11].In this case, the required Poincaré-summed 'exotic wormhole' contributions were determined in [18], and it would be of interest to see if those arise form a sensible seed amplitude and allow for an interpretation in terms of surface defects.The current work may also shed light on the ensemble description of pure gravity at certain negative values of the central charge [64,65], where the chiral algebra has been argued to be a twisted version of the rational boson algebra A k .
In this Section we show the agreement between this formula and the multiplication rule (3.25) satisfied by the modular invariant matrices M I .
First of all we notice that, by definition of α I = G(δ I , k/δ I ) and associativity of gcd, the prefactors agree: Now we will rewrite the formula for δ K(I,J) in a more suitable form.Using standard properties of gcd and lcm one can show that Thus, collecting G(α I ,α J ) G(δ I ,δ J ) , (A.1) can be rewritten as19  (A.9) Using prime decomposition we will check below that L(δ I , δ J ) divides k α I α J G(δ I , δ J ), hence the final result is (A.13) The RHS is the form of the exponents of L(δ I , δ J ), hence the latter divides k α I α J G(δ I , δ J ) as claimed.

( 2 )Figure 1 :
Figure 1: (a) The two boundaries of M = T 2 × I have complex structures induced by choices of lattice bases ω 1,2 (r = 0) and ω 1,2 (r = 1) (r is the coordinate on the 'radial' direction I).(b) A simultaneous modular transformation on the two boundaries is induced by the same change of basis on the two lattices and can be smoothly transported as a large diffeomorphism through the bulk (the transformed bases are colored in red).

. 20 )
With these definitions, the components of the modular invariant matrices M I in(3.16)are[38]

Figure 2 :
Figure 2: Wormhole geometry T 2 × I with inclusion of the surface defect S J along the non trivial 2-cycle in the bulk.In (a) the I radial factor is displayed as connecting the two boundary components.In (b) only the 'spatial' annulus slice is displayed (the compact 'Euclidean time' direction is perpendicular to the paper).τ 1 and τ 2 denote the two boundary complex moduli, while A L and A R are the gauge fields on the two sides of the defect.

SFigure 3 :
Figure 3: Folding trick.The wormhole geometry of Fig. 2.a has been 'folded' along the surface defect, which now behaves as a topological boundary condition.Due to orientation reversing one of the two sides, the theory has gauge group U (1) k × U (1) −k and one of the boundary conditions has been conjugated.

δ
I (ω I • ω J ) = G(α I , α J )L(δ I , δ J ) G(δ I , δ J ) = δ K(I,J) (A.10)as desired.Let us check the promised relation G L(δ I , δ J ), k α I α J G(δ I , δ J ) = L(δ I , δ J ). Fix the prime decompositons m j , mj ≤ n j .Then α I = j p min(m j ,n j −m j ) j , α J = j p min( mj ,n j − mj ) j and L(δ I , δ J ) = j p max(m j , mj ) j .Also the other combination in the gcd isk α I α J G(δ I , δ J ) = j p n j +min(m j , mj )−min(m j ,n j −m j )−min( mj ,n j − mj ) j .(A.12)For each j, the exponents in this last expression can be explicitly seen to satisfy n + min(m, m) − min(m, n − m) − min( m, n − m) ≥ m m > m m m < m .