Averaging over moduli in deformed WZW models

WZW models live on a moduli space parameterized by current-current deformations. The moduli space defines an ensemble of conformal field theories, which generically have $N$ abelian conserved currents and central charge $c>N$. We calculate the average partition function and show that it can be interpreted as a sum over 3-manifolds. This suggests that the ensemble-averaged theory has a holographic dual, generalizing recent results on Narain CFTs. The bulk theory, at the perturbative level, is identified as $U(1)^{2N}$ Chern-Simons theory coupled to additional matter fields. From a mathematical perspective, our principal result is a Siegel-Weil formula for the characters of an affine Lie algebra.


Introduction
There are indications that the sum over topologies in the gravitational path integral is related to an ensemble average over microscopic theories [1][2][3][4][5][6][7]. The clearest example is the duality between two-dimensional JT gravity and random matrix theory, which suggests a considerable extension to the AdS/CFT dictionary [4].
There are different points of view on the recent developments resurrecting this old idea. The first is that the implications of the gravitational path integral should be trusted, and non-factorizing contributions force us to consider an ensemble average (or, equivalently, superselection sectors). The second is that the sum over topologies is an uncontrolled artifact of the low-energy description, and the true microscopic theory is ordinary quantum mechanics without disorder. There is also a middle path, natural to an effective field theorist: The microscopic theory is ordinary quantum mechanics, but the sum over topologies accurately computes certain self-averaging observables. With this interpretation, we should either include the sum over topologies or UV microstates, not both, as the higher topologies encode some coarse-grained properties of the microstates. There is direct evidence for this "topological dualism" in string theory [8][9][10][11][12] and the SYK model [13,14], and circumstantial evidence more generally, including the successful application of wormholes to the Page curve [15,16].
In more than two bulk dimensions, it is far from clear how to define an ensemble average of microscopic theories. Progress has been made in AdS 3 gravity in certain limits, e.g. [7,[17][18][19]]. An alternative is to simplify the problem by adding more symmetries. Afkhami-Jeddi, Cohn, Hartman, and Tajdini [20] and Maloney and Witten [21] found that one simple ensemble of 2d CFTs -the Narain ensemble of toroidal compactifications of N free bosons -has a holographic interpretation. After averaging over the Narain moduli, the partition function of the theory on any Riemann surface, or collection of disconnected Riemann surfaces, can be reinterpreted as a sum over three-dimensional topologies. The bulk theory is not ordinary gravity, because it has a large number of light states, but the same is true of other models where we can perform the sum over topologies, including tensionless string theory [22,23] and the SYK model [24,25].
At present, there is no fully satisfactory, non-perturbative definition of the bulk theory dual to the Narain ensemble. It is related to U (1) 2N Chern-Simons theory, but there is a restriction on the allowed gauge configurations and the sum over topologies appears ad hoc. Therefore, conservatively, the bulk can be interpreted as an effective theory that is UVcompleted by an individual CFT in the ensemble, and the question is what aspects of the UV are encoded in the IR sum over topologies. In theories of 2d gravity with a hard cutoff on the dilaton, such as those obtained by reducing from higher dimensions, the JT/Random matrix duality [4] should be interpreted in the same spirit.
It would be useful to have more examples of averaged CFTs in order to explore these issues further. The original Narain duality has been extended in several directions recently, to include chemical potentials [26], orbifolds of free bosons [27], and more general quadratic forms [28] (see also [29][30][31][32][33] for related progress). In this paper, we generalize the Narain duality to an ensemble of CFTs defined by the moduli space of the SU (N + 1) k WZW model deformed by exactly marginal current-current operators. The action is where J i are the Cartan currents. These deformed WZW models are exactly solvable, as described by Förste and Roggenkamp [34]. The moduli space is easy to describe. WZW models can be realized as the orbifolds where the first factor is known as a generalized parafermion theory [35,36], T Λ is a Narain CFT, and Γ k is a discrete group. The current-current deformation acts only on the T Λ theory. Therefore the moduli space of deformed WZW models is locally identical to the Narain moduli space (but there are global differences related to dualities). The ensemble average is defined by integrating over the couplings λ ij with the Zamolodchikov measure.
We will see that the methods used to analyze the averaged Narain theory in [20,21,[26][27][28], based on the Siegel-Weil theorem, can be extended to study this more general ensemble. The WZW model at level k = 1 is a theory of N free bosons, so we recover the Narain duality in this special case. Our main result is a simple formula for the averaged torus partition function, where 'dWZW' stands for 'deformed WZW', λ runs over primaries of SU (N + 1) k , and c λ µ is the string function of the affine Lie algebra. The sum over P SL (2, Z) in this formula suggests a holographic interpretation as a sum over 3-manifolds. We will not have much to say about the bulk theory, but based on the partition function we conclude that perturbatively, it should be a theory of U (1) 2N Chern-Simons fields coupled to topological matter dual to the parafermions. The U (1) sector and the parafermion sector are coupled only in the sense that they are correlated by the sum over manifolds. The non-perturbative definition of the bulk theory is incomplete, similar to the Narain duality.
It is remarkable that the final answer (1.3) is so simple. This is a consequence of various cancellations. Note that the parafermions do not directly participate in the averaging pro-cedure, but nonetheless their characters, which are proportional to c λ µ , provide the seed for the sum over manifolds.
This duality has some nice features beyond the original Narain duality. CFTs in the ensemble generically have U (1) N left ×U (1) N right symmetry, like the Narain duality, but a larger central charge, c > N . There are non-conserved primary operators coming from the parafermion sector that survive the averaging procedure, so the bulk theory has matter fields. This allows for the study of averaged correlation functions, although we will not pursue this here. (Correlators were also studied recently in an orbifolded version of the Narain duality and found to have an interesting correspondence to rational tangles [27].) Also, since there is a coupling constant 1/k, the theory has an 't Hooft-like limit N, k → ∞. This limit resembles earlier versions of higher-spin AdS/CFT [37,38]. Finally the WZW models appear in various contexts in string theory, and we view our result as a step toward averaging more general sigma models. Any sigma model with enough symmetry can be recast as an abelian coset of a WZW model [39], so at least these cases should be tractable.
An intriguing aspect of averaged holographic dualities is the interplay with global symmetries and the swampland [10,[40][41][42][43]. The arguments against global symmetries in quantum gravity [40,[44][45][46][47] do not apply to ensemble-averaged theories, because factorization fails, and black hole evaporation is not unitary in the usual sense. Thus global symmetries can arise after averaging.
The pattern in the Narain duality and deformed WZW duality is a bit different from the case of JT/Random matrix duality. At the perturbative level, the bulk theory has an apparent global symmetry O(N, N ) rotating the Chern-Simons fields. The moduli space that defines the CFT ensemble is a quotient of the same group, O(N, N ). Therefore by summing over topologies, we end up averaging over the apparent global symmetry group of the bulk theory. It is an interesting question whether this pattern applies more generally to theories of quantum gravity with apparent global symmetries. Perhaps whenever a bulk theory appears to have a global symmetry G, the sum over topologies induces an average over G. This is related to observations in [40][41][42] that symmetries of the ensemble can appear as global symmetries in the bulk.
The outline of the paper is as follows. In section 2 we review current-current deformations of WZW models, and set up the calculation of the average. Unlike in [20,21], we must consider twisted sectors of the Narain factor. Therefore in section 3 we calculate the average partition function of a toroidal CFT with twisted boundary conditions (this result stands independently and could be useful in other ensembles). In section 4 we return to the WZW model and derive the average partition function quoted above in (1.3). We also consider the averaged spectrum. Section 5 is a discussion of the holographic dual and some open questions.
2 Current-current deformations of WZW models

WZW model as orbifold
Wess-Zumino-Witten (WZW) models are 2d rational CFTs associated to affine Lie groups [48][49][50][51][52]. We will restrict to the case of SU (N +1) k with a diagonal spectrum, but it should be straightforward to extend the analysis to other compact (and possibly non-compact) groups. The central charge is The level k is a positive integer, and we assume N > 2 because as we will see, otherwise the average is ill defined. Denote the root lattice of SU (N + 1) by Q and the weight lattice by P . Let e i be the simple roots and e i the fundamental weights, with e i · e j = δ i j . Our convention is to suppress indices on lattice vectors but write other indices explicitly.
The torus partition function is a finite sum of affine characters, where P + k ⊂ P are the (finite parts of) integrable highest weights at level k, which correspond to Young tableaux with at most k boxes in the first row. Representations of the affine Lie algebraĝ k decompose into representations of the cosetĝ k /ĥ, where h is the Cartan subalgebra of g. This underlies the orbifold construction in (1.2). Primaries in the WZW model decompose into the parafermions and toroidal bosons as Thus the characters can be expanded in theta functions, where the coefficients c λ µ are called string functions, and with q = e 2πiτ . The string functions are complicated objects, but they have relatively nice transformation laws under SL(2, Z) [53]. Up to a factor of η(τ ) N , the string functions are the branching functions for theĝ k /ĥ coset.
An orbifold representation of WZW models as in (1.2) was described by Förste and Roggenkamp [34], following earlier work in [35,39,54]. We will use a slightly different construction (see appendix A for a comparison). The orbifold group is To describe its action on the Hilbert space, let G 0 ij = e i · e j be the Cartan matrix and define the antisymmetric Below we will use the shorthand B 0 β := e i B 0 ij (e j · β). The symmetry γ ∈ Γ k acts on the (left ⊗ right) parafermion Hilbert space as and with the opposite phase on the bosons. The partition functions of the two factors, twisted by group elements α, β ∈ Γ k , are for the parafermions and the free bosons, respectively. These combine to reproduce the WZW model partition function (2.2) by summing over twisted sectors and dividing by the order of Γ k , For more details and some useful string function identities, as well as a comparison to Förste and Roggenkamp, see appendix A. The free boson sector is a toroidal CFT, so we can rewrite Z Λ α,β as a sum over a Narain lattice. By plugging (2.5) into (2.10) we see that the lattice is This is an even self-dual lattice in R N,N , with the inner product where each entry is a vector in R N . Define the Siegel-Narain theta function (2.14) The twisted boson partition function given in (2.10) is The twists α, β are vectors in R N while w(α), w(β) are vectors in R N,N . In (2.15) they are related by 1 These twists are special in that they lie in the lattice ( 1 k Λ)/Λ and satisfy under the Narain inner product. More details on the Narain lattice of the WZW model can be found in appendix B.

Current-current deformations
The orbifold representation allows for a straightforward analysis of the moduli space of current-current deformations [34]. The conserved currents of the WZW model are J a (z) andJ a (z) with a = 1 . . . dim g running over the generators of the Lie algebra g. Currents in the Cartan subalgebra, which we denote J i (z) andJ i (z) with i = 1 . . . rank g, are mutually commuting. Therefore for SU (N + 1) k there are N 2 exactly marginal operators, J i (z)J j (z). The WZW model deformed by these operators as in (1.1) is conformal for finite values of the couplings λ ij . (Conformal invariance would be broken if we deformed by non-commuting currents.) The deformations modify the spectrum but leave the OPE coefficients unchanged [34,55].
In terms of the orbifold, the Cartan currents live in the Narain factor, so the deformation 1 Derivation: Starting from (2.14), write λ = 1 √ k (µ + kδ, µ + kδ ′ ) − λ0 where µ ∈ P/kQ, δ, δ ′ ∈ Q, and the shift is by the lattice vector λ0 acts only on T Λ . The deformed WZW models are therefore orbifolds [34] where O ∈ O(N, N ) deforms the Narain lattice Λ. The partition function is Note that the deformation rotates the vectors w(α), w(β). This is required in order for Z OΛ α,β to stay in a fixed, finite-dimensional representation of SL(2, Z) after the deformation, so that the full partition function Z dWZW remains modular invariant. In other words, the coordinates of the vectors w(α), w(β) are held fixed under deformations, but the basis vectors depend on moduli. This construction implies that the moduli space of deformed WZW models is locally identical to the Narain moduli space. Globally, the full moduli space is

Setting up the average over moduli
Under the Haar measure, the moduli space M has infinite volume for k > 1, because the has infinite volume and the duality group is finite. This is in contrast to the Narain moduli space, which has finite volume for N ≥ 2. These moduli spaces are locally identical, but in the deformed WZW model, the duality group is finite so M is generally much larger.
To average over the moduli space of the deformed WZW model we must regulate this infinity. Fortunately, for the partition function there is a natural choice: we simply average over the Narain moduli space instead, This is well defined because the partition function has the full O(N, N, Z) invariance. For N = 1 and k = 1, it divides the average over M by an infinite constant. Thus we define the ensemble average partition function by We emphasize that this is our choice of ensemble. Any observable can be averaged over this ensemble, although for general observables sensitive to the OPE coefficients, the result may depend on the choice of fundamental domain for O(N, N, Z). For the partition function this not an issue. Only the boson factor depends on moduli, so We will carefully define and calculate Θ Λ in the next section and return to the WZW model in section 4.

Averaging twisted theta functions
Our first task is to compute the average over moduli space of a Siegel-Narain theta function, with nonzero twists (a, b). The twisted sectors with a = 0 were treated by Siegel, and interpreted holographically in recent work generalizing the Narain duality to orbifolds [27] and general lattices [28]. The main new element here is to allow for independent a and b.

Siegel-Narain theta functions
Although we already defined the Siegel-Narain theta function in (2.14), this definition is inconvenient for averaging because the twist vectors depend on moduli. We will now introduce a more convenient notation similar to Siegel's. Let S µν be a semi-integral quadratic form, i.e., a symmetric matrix with integers on the diagonal and half-integers off the diagonal. For any positive definite matrix H µν satisfying where a µ and b µ are vectors in R 2N called characteristics or twists, and τ = τ 1 + iτ 2 with τ 1 ∈ R and τ 2 ∈ R + . We will assume S µν has signature (N, N ) with N > 2.
Siegel developed a formalism to analyze general semi-integral quadratic forms, not necessarily associated to self-dual lattices. [56][57][58] We are interested in the self-dual case relevant to Narain lattices (but we will end up using Siegel's more general result at an intermediate step). The quadratic form associated to Narain lattices is and the moduli of the Narain lattice are encoded in the block matrix H as where G ij is the metric and B ij is the antisymmetric B-field. We will denote the inner product with the Narain quadratic form by The theta function Θ H,T is identical to the Siegel-Narain theta function written as a sum over lattice points in (2.14), where the vectors U µ are the basis vectors of the Narain lattice as in appendix B. The notation Θ H,T is more convenient for doing the average because the coordinate a µ is rational and independent of moduli, unlike the vector a = a µ U µ as explained around (2.20).
To describe the modular transformations of Θ, let Package the twists into a vector The Siegel-Narain theta function for an even self-dual lattice of signature (N, N ) transforms as where γ acts on τ by fractional linear transformations and on the vector A µ by ordinary matrix multiplication, The formula (3.8) is equivalent to the statement that the combination Θ/|η| 2N appearing in the partition function of free bosons is modular invariant, so long as we transform both τ and the twists.

Calculating the average
The definitions and transformation rules above hold for arbitrary twists a and b. For generic twists, the action of modular transformations on Θ H,T produces an infinite dimensional representation of SL(2, Z). However we will be interested in special cases where this action truncates and the representation is finite-dimensional. This occurs when a µ , b µ are rational, because if b µ′ = ca µ + db µ is integral, then the shift by b ′ in the theta sum is trivial. We therefore restrict to where k is a positive integer (which will eventually be identified as the WZW level). We would like to calculate the average over Narain moduli space, , and dH is the Haar measure normalized by the volume of the moduli space. We will not need the explicit formula for the measure but it can be found in [21,[56][57][58]. Siegel calculated the average for a = 0. Fortunately turning on nonzero a is a straightforward generalization, and the integral can be calculated by any of the various methods described in [20] and [21], or (with somewhat more difficulty) by reducing it to a finite sum of Siegel averages. Whatever method we use, the basic idea is that Θ T is determined by its singularities as τ approaches rational points on the real line, τ → − d c , and these singularities are fixed by modular transformations. We will first use this intuition to guess the answer, and then sketch the rigorous derivation below.
For c = 0, the SL(2, Z) transformation γ = f g c d acting on τ maps the point − d c to i∞. For nearby points, the transformation rule (3.8) gives The corrections to this formula are exponentially suppressed as δτ → 0. Furthermore, the theta function evaluated at τ = i∞ projects the sum onto contributions with zero scaling dimension (where the scaling dimension is the quantity multiplying −2πτ 2 in (3.1)). In an untwisted theta function, this would project onto the zero vector n µ = 0, corresponding to the ground state of the CFT. In a twisted theta function, We use the shorthand The right-hand side of (3.14) appears to depend on f, g, but this must be illusory because the left-hand side depends only on d/c. To make this manifest, assume w.l.o.g. that c and d are coprime, and write When the δ-function is satisfied, the quantity multiplying m is 2πi × (integer) so it drops out, and we now have an expression that depends on only c and d.
We are now ready to compute the average. The magic of the Siegel-Weil formula is that the average is simply equal to the sum over singularities, so the natural guess from (3.14) is This turns out to be correct. It is a generalization of the non-holomorphic Eisenstein series.
We have included the cusp at infinity separately in the first term.
The answer simplifies for twists living in just one of the two blocks of the Narain inner product in (3.2). Suppose that in this basis a µ = (0, a i ) and b µ = (0, b i ) with a i , b i ∈ 1 k Z N . This subspace is preserved under modular transformations, and within it all twist inner products vanish, a, a = b, b = a, b = 0. Therefore in this case The twists that appear in the deformed WZW models are of this type. In the notation of section 2, when a 2 = b 2 = a · b = 0. In this formula, Λ on the right-hand side should be interpreted as the original, undeformed lattice with respect to which (a, b) are defined. Equivalently, where Γ = P SL(2, Z) and Γ ∞ is the abelian group generated by ( 1 1 0 1 ). For prime k, this expression simplifies further and becomes an Eisenstein series for the congruence subgroup Γ 0 (k) as we will discuss in section 4.3.

Derivation
We will now sketch the proof of (3.18).
We are calculating the average for a self-dual lattice, with both twists a and b non-zero. Siegel solved a slightly different problem: the average for an arbitrary lattice, with only b non-zero. We will show that our case can be reduced to Siegel's.
First let us state Siegel's main theorem in a convenient way (see [56][57][58] for the original papers, and [59] for a review in English). Let S µν be a semi-integral quadratic form of signature (N, N ) and choose b µ such that 2S µν b ν ∈ Z. The leading behavior of the theta function near rational points τ → − d c (with c = 0) is of the form Crucially, the right-hand side is independent of the moduli matrix H µν . The coefficient R S is derived by Poisson summation of (3.1) and is known in closed form, but for our purposes it is enough to know that it exists. (See appendix C for the formula.) Siegel's theorem states that the average over moduli space is the non-holomorphic Eisenstein series defined by summing over singularities, As advertised, the theorem requires a = 0 but allows for a general quadratic form S. Fortunately we can recast our problem into this form. We want to calculate the average of Θ H,T (a µ , b µ , τ ) where a µ ∈ 1 k Z 2N , b µ ∈ 1 k Z 2N for k ∈ Z + , and T µν is the Narain quadratic form (3.2). By decomposing the theta sum into residue classes modulo k, n µ = km µ + r µ , we find The twists in the expression on the right-hand side satisfy the assumptions of Siegel's theorem: a ′µ = 0, and 2S ′ µν b ′ν ∈ Z where S ′ µν = k 2 T µν and b ′µ = 1 k (b µ + r µ ). We can therefore apply (3.23) to find the average (3.25) Next, we could plug in Siegel's formula for R S on the right-hand side, but there is a shortcut. This is a sum over singularities at rational τ . We argued around (3.14) that these singularities are fixed by modular invariance of Θ H,T and are independent of moduli. So there is no need to recalculate them: the final answer must be (3.18). This completes the derivation. As a consistency check, we perform the explicit sum of Siegel's R S in appendix C for the case relevant to the WZW model, and (after quite a bit of effort) recover the simple formula (3.19). In the appendix we also sketch a self-contained derivation of our averaging formula using the method of Maloney and Witten [20] which turns the averaging integral into a differential equation.

Averaging the deformed WZW model
We now return to the deformed WZW model by assembling the results of sections 2 and 3.

Partition function
In section 3 we derived (4.1) Here we have applied (3.21) This is not quite the final answer. The average can only be ascribed a natural holographic interpretation if it can be written in the form γ Z 0 (γτ ) for some function Z 0 (τ ). We will see that it can. The parafermions satisfy the same modular transformation rule as the bosons, By a simple change of variables we can replace the sum over α, β by a sum over ν, φ, in which only φ = 0 contributes. Now we plug in the parafermion partition function (2.9), Z dWZW (τ ) = 1 (N + 1)k N λ∈P + k µ∈P/kQ ν∈Q/kQ γ∈Γ∞\Γ e 2πiν·µ/k |c λ µ (γτ )| 2 (4.6) Summing over ν sets µ = 0 and contributes a factor of |P/kQ| = (N + 1)k N , giving our final answer This is the result quoted in the introduction.

Average of an individual affine representation
The average contribution of a single WZW primary, |χ λ (τ )| 2 , also has a Siegel-Weil formula. The string functions for integrable representations at fixed level transform in a finitedimensional representation M of SL(2, Z) [53, Chapter 13]: Repeating the steps from (4.2) to (4.7) we find This is a Siegel-Weil formula for the mod-squared characters of an affine Lie algebra.

Average spectrum for prime k
We will now rewrite the result in a way that makes the spectrum of the average theory easier to discern. The average spectrum will of course be unitary, because we are averaging an ensemble of unitary CFTs with a positive measure. This was not the case in pure gravity [60], where the starting point was a Poincaré series rather than an ensemble of CFTs, and indeed the Poincaré series for pure gravity led to a negative density of states in some regimes [61]. We restrict to prime k in this section, for technical reasons that will become clear. As the string functions are complicated functions that in general don't have closed analytical forms, we will do the analysis starting from (2.24), instead of (4.7).
The Poincaré sum for the averaged theta function (3.21) only has contributions from coprime (c, d) such that cα + dβ ∈ kQ. For prime k, this condition can only be satisfied when the twists are colinear vectors. Therefore the important averages are f 0 (τ ) = Θ Λ (0, 0, τ ) (4.10) f and g are independent of the twists, because for example the condition cα ∈ kQ is equivalent to k|c for any α = 0. The only other non-zero averages for prime k are for h = 0 . . . k − 1.
A useful observation is that the basic ingredients f 0 , f, g are all proportional to Eisenstein series. The untwisted term f 0 is the non-holomorphic Eisenstein series for SL(2, Z); this is the same quantity that appears in the Narain duality [20,21]. The twisted average f is proportional to an Eisenstein series for the congruence subgroup These Eisenstein series depend on a choice of Dirichlet character mod k. For the character χ, the real-analytic Eisenstein series is defined as Elements of Γ ∞ \Γ 0 (k) correspond to coprime pairs (c, d) with c = 0 mod k. Therefore, for the principal character χ 0 (d), defined to be 1 if (d, k) = 1 and 0 otherwise, we have E k (τ, s) := E k (τ, s; χ 0 ) = γ∈Γ∞\Γ 0 (k) (Im γτ ) s (4.14) |ckτ + d| −2s χ 0 (d) . To relate this to the averaged theta functions, first consider α = 0, β = 0. We found the average .

(4.16)
Similarly for nonzero β, which is proportional to E k (− 1 τ , N 2 ). The Eisenstein series at prime level can be easily expressed in terms of the Eisenstein series for SL(2, Z). In appendix D we derive the relations Now we will use these results to rewrite Z dWZW in a way that makes the spectrum more apparent. Recall that the averaged partition function is (4.20) Plugging in the twisted parafermion partition function (2.9), this becomes where The full spectrum is thus a convolution of the parafermion spectrum with that of h 1 , h 2 , and h µ,α 3 . The latter spectra can be found by a Fourier transform. The Fourier expansions of h 1 and h 2 are given in (D. 19) and (D.20). They are manifestly positive, and they have continuous spectra starting at the unitarity bound. Finally, consider the h 3 term in (4.21). The Fourier transform of g(τ ) is where the coefficients g ℓ are given in (D. 16) and (D.17) and are also manifestly positive.
Performing the sum over h, we get (4.26) Although the exp(2πilτ 1 /k) is not periodic under τ 1 → τ 1 + 1, the full expression is periodic indicating a spectrum with integers spins, because the string functions obey (see for example [52, §14.5 To summarize, for prime k, the average partition function is (4.21), where the coefficients h 1 , h 2 , h µ,α 3 are all known explicitly and we have given their Fourier expansions. The spectrum is unitary, continuous, and consists only of integers spins. Of course the the spectrum of the deformed WZW model is unitary and integer-spin at any point in moduli space, so these features were guaranteed by the setup. The continuous spectrum is a consequence of averaging.

Discussion of the holographic interpretation
A natural ansatz for the partition function of 3d gravity is the Poincaré series [60] where Z 0 (τ ) is the perturbative partition function of bulk fields on the solid torus with complex structure τ at infinity. The solid torus is a Euclidean black hole, and the Poincaré sum is interpreted as a sum over the Maldacena-Strominger family of SL(2, Z) black holes [62]. In a general theory of 3d gravity there are additional contributions to the path integral, but (5.1) might be sufficient (or at least dominant) in simple examples. The averaged partition function of Narain CFTs takes this form; this observation is the starting point for the Narain duality proposed in [20,21] (see also [63,64] for earlier efforts to apply Poincaré series to rational CFTs). A similar sum can be used to calculate indices in supersymmetric theories [65,66], but in the present discussion, Z is not holomorphic in τ . We have shown that the averaged partition function in the deformed WZW model Z dWZW can also be written as a Poincaré series. This suggests a holographic interpretation. To succeed, we need a three-dimensional theory for which the perturbative partition function on a solid torus is Let us reorganize this into is the branching function of the SU (N + 1) k /U (1) N coset, i.e., the parafermion character. We have factored out the term |η(τ )| −2N , which is the perturbative partition function of three-dimensional U (1) 2N Chern-Simons theory [20,21,67]. For k = 1, the branching functions are trivial and there is only one non-zero contribution to the sum over λ, so we recover the Narain duality. This is expected, because SU (N + 1) 1 lives in the moduli space of N free bosons.
The form (5.3) suggests that at the perturbative level, the holographic dual of the average deformed WZW model is U (1) 2N Chern-Simons theory coupled to topological 'matter fields'. The matter fields should account for the parafermion contribution to (5.3). There is a well known construction of holomorphic parafermion characters using Chern-Simons theory [68][69][70][71], but what is needed is a non-holomorphic combination of left and right movers. For abelian Chern-Simons theory this was achieved in [72], but to our knowledge the nonabelian generalization needed to write a Lagrangian for our bulk theory does not appear in the literature, so we defer this problem to the future. 3 In addition to finding the bulk Lagrangian, there are several concrete directions to pursue. The duality can be explored at higher genus, as in [21]; the double torus is especially interesting because it encodes energy spacing statistics of the ensemble [7]. As mentioned in the introduction, there are nontrivial correlation functions in the deformed WZW duality that can be studied using methods similar to [27]. It may be interesting to analyze the thermodynamics of the averaged theory as well. In particular, we have not calculated the spectral gap or compared to the Cardy formula (see [20] for the Narain case). Part of our motivation for studying this class of theories is that the symmetry class of theories with U (1) N chiral algebra and c > N interpolates between the pure Virasoro case and the maximally symmetric case c = N relevant to sphere packing [73,74]; it would be interesting to understand whether this ultimately gives insight into the pure Virasoro limit, relevant to Einstein gravity in three dimensions.
We conclude with a few more general open questions: 1. Is there a non-perturbative definition of the bulk theory, in the Narain duality or the duality described here, that does not rely on an ad hoc prescription for the sum over manifolds?
2. Is there a worldsheet interpretation of the ensemble average? The WZW models in particular appear as worldsheet sigma models. It would also be very interesting to average over Calabi-Yau moduli, but this requires new ideas [27].
4. Can these holographic dualities be embedded into string theory? If so, what is the meaning of the ensemble average? In string theory we expect the dual to be a single CFT, but it could be useful to introduce an explicit average to calculate certain observables. For example, maybe the average allows some statistical properties of the UV theory to be accessed in supergravity.

A Details on orbifolding A.1 Comparison to Förste and Roggenkamp
In section 2, we constructed the WZW model as an orbifold by the group Γ k ∼ = Q/kQ. This is based on [34], but our orbifold action appears to be slightly different, so here we will explain the differences. First, the orbifold group in [34] is described as P/kQ. This is not a significant difference, because the elements of P/Q correspond to the center of SU (N + 1) and act trivially. In particular, Z P F α,β vanishes for either α or β in P/Q, so (2.11) can be written as a sum over α, β ∈ P/kQ, in agreement with [34].
More importantly, the orbifold action in [34] (see also earlier work by Gepner [35]) is defined to be (2.8) without the B 0 terms. This leads to ambiguities, because the resulting phase depends on the coset representatives chosen for γ, µ,μ. Our definition of the symmetries resolves these ambiguities. To see this, rewrite the phase in (2.8) as exp 2πi The matrices R ± ij have integer entries, so this is invariant under shifting γ, µ, orμ by an element of kQ. Without B 0 , there would be a sign ambiguity under these shifts. 4 In the rest of this appendix, we elaborate on the orbifold sum, Eq. (2.11).

A.2 Vacuum Normalization
First, let us explain the normalization of the parafermion partition function in Eq. (2.9). The coefficient, (N + 1) −1 , is chosen to normalize the vacuum state to have unit coefficient (see [52, §18.2]). Consider the untwisted partition function of the parafermions: Here we prove a useful identity: This identity can be shown by applying outer automorphisms. The automorphism group is O(ŝu(N + 1)) = Z N +1 whose generator we denote by a. The group acts on affine weights, but we only care about its action on the finite part of the affine weights. For A = a n ∈ O(ŝu(N + 1)) with n = 0 . . . N , this is a n λ = ke n + w a n λ (A. 3) in which {e i } are the fundamental weights, e 0 = 0, and w a n is a Weyl transformation corresponding to a n . We note that {0} ∪ {ke i } = kP/kQ. Thus, for a given n and µ, we in which we used the fact that c Aλ Aµ = c λ µ in the second equality and c λ wµ = c λ µ in the third equality. The last equality simply follows from a n being a symmetry of the set P + k . The equality above means that, for a particular sum of string functions of this kind, we are able to shift its µ index by ke i without changing its value. Thus, We can thus write Finally, if we limit ourselves to µ ∈ P/kP , the vacuum term (qq) −c P F /24 comes entirely from the |c 0 0 | term, whose coefficient is 1. Thus, the partition function is correctly normalized.

A.3 Orbifold Sum
Now we derive Eq. (2.11). Using the identity Eq. (A.6), we are able to write In line 5 we extended the range of the β summation because the product of string functions vanish if β ∈ Q.

B Details on Narain lattices
Denote a vector in λ ∈ R N,N by λ = (λ + , λ − ), where λ + and λ − are each vectors in R N . The inner product is For vectors in R N , the inner product is the ordinary Euclidean dot product. A Narain lattice is an even self-dual lattice. Any Narain lattice in R N,N can be constructed starting from a Euclidean lattice L ⊂ R N as follows. Start with a basis v i for L, and dual basis v i for L * satisfying v i · v j = δ i j . (Each v i is a vector in R N with components v a i , but we will suppress the lattice index a which is raised and lowered with δ ab .) The basis for L defines a metric Define the R N,N vectors where B ij = −B ji . The set of 2N vectors {V i ,V j } is a basis for a Narain lattice, Ω. The basis vectors satisfy which makes it easy to check that Ω is even and self-dual. The moduli of the Narain lattice are the antisymmetric tensor B ij and the metric G ij . There are also O(N ) × O(N ) rotations, but these do not affect the CFT or the theta function. Introduce an index µ = 1, . . . , 2N running over all the Narain basis vectors, Points on the lattice are with n µ ∈ Z 2N . The integers p i and w i are momentum and winding of the compact boson. The Narain lattice Λ associated to the level-k WZW model was defined in (2.12). The corresponding Euclidean lattice is L = √ kQ, so in terms of the roots and weights, where G 0 ij is the Cartan matrix and B 0 ij was defined below (2.7). The basis vectors are The twists (2.16) are therefore where α i = e i · α, β i = e i · β. In the notation used in section 3, a = a µ U µ and b = b µ U µ , the components are

C Details on Siegel's formula
In this appendix we give some more details on Siegel's averaging formula, and use it to reproduce our average (3.19) directly from Siegel's theorem as stated in [59]. We also rederive our result using the method of Maloney and Witten based on a modular differential equation.
The Siegel-Weil formula [56][57][58][59] tells us that is the singularity coefficient mentioned in Eq. (3.23), and derived in [59]. γ b = 0 unless b = 0, in which case γ b = 1. We note that pairs (c, d) where d > 0 can be mapped to elements in Γ ∞ \SL(2, Z). That is, we write matrices in SL(2, Z) as We simplify the last sum of phases as follows. First we write g = (m, n) in which m, n are N dimensional integer mod d vectors: This expression is zero if the denominator is not zero because the numerator is always zero. When the denominator is zero, the fraction is d by l'Hospital's rule. Thus Now we have a lemma: is equal to (k, d) when (k, d)|b; otherwise it is zero.
Proof. When (k, d) does not divide b, the equation obviously has no solutions; any solution would introduce a contradiction because one side is divisible by (k, d) and the other side is not.
Otherwise consider first the case (k, d) = 1. The proposition is obvious because k is invertible mod d.
Suppose a = (k, d) = 1. Define k ′ = k/a, d ′ = d/a, b ′ = b/a. Then the equation has exactly one solution, Consider any solution y of the original equation, ky + b = d. This means that k ′ (y − x 0 ) = (1 − c)d ′ , so that y − x 0 is divisible by d ′ . Thus, y = x 0 + pd ′ ; since y ∈ Z/dZ, p can take values from 1 to a. Therefore there are a = (d, k) solutions.
In the end, we are able to collect all the terms: The last line is true because b has entries whose numerators are less than or equal to k, and (c, d) = 1. Now we write k = (k, d)p, d = (k, d)q, (p, q) = 1. Furthermore we note that (pc, q) = 1. Then in which in the second equality we have renamed all the variables. It is worth mentioning that the renaming of the variables do not cause any multiplicity troubles. That is, there is a bijection between pairs (c, d) and pairs (pc, q): the map from (c, d) to (pc, q) is the definition. The map from (pc, q) to (c, d) is by observing that (k, pc) = p(k/p, c) = p((k, d), c) = p, so (k, d) = k/(k, pc) and thus d = k/(k, pc)q, c = pc/(k, pc). This completes the averaging process for Θ H,T (0, b µ , τ ).

C.2 The Averaging of partition functions Θ H,T (a µ , b µ , τ )
Now consider the case a = 0. We note the following identity of theta functions: Here we take the basis a µ = (0, a i ), b µ = (0, b i ). We have thus reduced the averaging to the procedure in the previous section. Note that an k 2 rescaling as in (3.24) would have been sufficient for the requirement of the averaging process because 2k 2 T (b + r)/k has integer entries; we used a k 3 scaling to simplify the following calculations. We can thus calculate the average Again, we focus on the sum of phases.
In the second line we used the fact that a, a = b, b = a, b = 0. Hence, we can do the two sums separately, in which we have omitted the exponential sum that's exactly the same as the last section. In the last equality the two delta functions merge: if da i ∈ Z N , then the last delta function can never be satisfied. We can thus plug this result back into the average: Similarly we write k = (k, d)p, d = (k, d)q, (p, q) = 1. Thus which is the final expression for the averaged classical partition function of the twisted boson, Eq. (3.19)

C.3 Derivation from modular differential equation
For a self-contained derivation of our general averaging formula (3.18), we can also apply the method of Maloney and Witten [21]. It is straightforward to check by a direct calculation that Θ H,T in (3.1) obeys the differential equation where ∆ M is the Laplacian on moduli space acting on H µν (or G ij and B ij ), and ∆ τ is the hyperbolic Laplacian on the upper-half plane, . Inserting this differential equation into the averaging integral (3.11) leads to the eigenvalue equation So far, this is exactly the argument of Maloney and Witten, who considered the case with trivial twists A µ = 0 [21]. All the twisted sectors obey the same differential equation, but the difference is that with nontrivial twists, Θ is no longer invariant under SL(2, Z); it transforms in some finite-dimensional representation. In fact the decomposition (3.24) and the results of [82,83] on the a = 0 theta functions tell us that Θ H,T is a modular form for the congruence subgroup Γ(k 2 ). It is easy to check that the Eisenstein series (3.18) satisfies the eigenvalue equation. We can also check that (3.18) transforms in the correct representation, as follows. First we rewrite the average as Θ T (A µ , τ ) = (Im τ ) −N/2 γ∈Γ∞\SL(2,Z) (Im γτ ) N/2 Θ H,T (γA µ , i∞) . (C.18) Now act on this with σ ∈ SL(2, Z) by replacing A µ → σA µ , τ → στ . By relabeling γ → γσ −1 in the resulting sum, we find Θ T (σA µ , στ ) = (Im στ ) −N/2 (Im τ ) N/2 Θ T (A µ , τ ) (C. 19) which is indeed the correct transformation (3.8). So our Θ T has all the right properties to be the average: it obeys the differential equation (C.17), has the correct singular behavior, and transforms properly. In fact it is the unique object with these properties. The proof of uniqueness uses the fact that Θ T is a modular form for Γ(k 2 ) and follows exactly the argument in [21,28] so we omit it.

D Fourier transforms
In this appendix we calculate the Fourier transforms used in section 4.3 and discuss some additional properties of the Γ 0 (k) Eisenstein series. D.1 Fourier transform of f 0 (τ ), f (τ ), and g(τ ) As explained in the main text, the functions f 0 , f, g defined in (4.10) are related to the principal Eisenstein series for Γ 0 (k). For non-prime k, the Fourier transform can be found using the methods in, e.g. [84,85], but in this section we assume k is prime, and in this case things are considerably simpler. First let us review the situation for the Eisenstein series for SL(2, Z). To calculate the Fourier transform of f 0 (τ ) = Θ Λ (0, 0, τ ) = 1 + The Fourier transform is now straightforward, for any k. For prime k, we can also write the sum as (σ N −1 (kn) − σ N −1 (n)) |kn| 1/2−N/2 K N/2−1/2 (2π|n|kτ 2 )e 2πiknτ 1

 
We have rearranged terms in this expression so that the Fourier coefficients are manifestly positive.