Chern-Simons Invariants from Ensemble Averages

We discuss ensemble averages of two-dimensional conformal field theories associated with an arbitrary indefinite lattice with integral quadratic form $Q$. We provide evidence that the holographic dual after the ensemble average is the three-dimensional Abelian Chern-Simons theory with kinetic term determined by $Q$. The resulting partition function can be written as a modular form, expressed as a sum over the partition functions of Chern-Simons theories on lens spaces. For odd lattices, the dual bulk theory is a spin Chern-Simons theory, and we identify several novel phenomena in this case. We also discuss the holographic duality prior to averaging in terms of Maxwell-Chern-Simons theories.


Introduction
One of the most remarkable recent developments in quantum gravity is the realization that semiclassical Euclidean quantum gravity requires us to sum over ensembles of semi-classical geometries, at least for two-dimensional Jackiw-Teitelboim gravity [1,2] and three-dimensional pure gravity [3].
In the language of holography, such an ensemble average in the bulk is translated into an ensemble of conformal field theories (CFTs). It is therefore of great interest to further study ensembles for a simple class of CFTs, and discuss their holographic interpretations. This will hopefully shed light on the question of when and how ensemble averages arise more generally in holography. For non-supersymmetric CFTs we generically do not expect any moduli space. However, there are still known examples of moduli spaces of CFTs without supersymmetry in the literature [4,5]. In the recent references [6,7], the ensemble average of toroidally-compactified free bosons has been considered. The moduli space in this case is the Narain moduli space: where II p,p denotes the even, self-dual lattice associated with the compactification on the pdimensional torus T p . The resulting average was then interpreted in the holographic dual as an exotic gravity theory approximated by the Abelian Chern-Simons theory with gauge group U(1) 2p .
This holographic duality was studied further in e.g. [8][9][10][11][12][13][14]. In this paper we consider the generalization where the associated CFT moduli space is a more general type of Narain moduli space associated with an indefinite quadratic form Q of rank p + q and signature (p, q) 1 : where O Q (Z) is a subgroup of O(p, q; Z) preserving the quadratic form Q. The dimension of this moduli space is In the process of generalizing to an arbitrary integral quadratic form Q, we will encounter many interesting features which were not present in the previous studies. Our discussion applies to non-self-dual lattices, and additionally to lattices with p = q (such as those arising from toroidal compactifications of the heterotic string theories), where we have gravitational anomalies. Finally, we are also able to analyze odd integral lattices, where the partition function is dependent on the choice of spin structure. Our analysis shows that the partition function after the ensemble average contains spin Chern-Simons invariants for the handlebody geometries, giving further support to the appearance of the Chern-Simons term in the holographic dual.
The rest of this paper is organized as follows. In section 2, we discuss the case where the integral quadratic form Q is even. We find that the ensemble average of the CFT partition function is equal to an Eisenstein series associated with Q, which can be interpreted as a sum over geometries in the three-dimensional Chern-Simons theories. In section 3, we extend the discussion to an odd integral quadratic form. In this case we have a non-trivial dependence on the choice of spin structure, and we identify the holographic dual to be a spin Chern-Simons theory. While the discussions in sections 2 and 3 address the holographic duality after ensemble averaging, in section 4 we discuss holography before ensemble averages. Finally, section 5 is devoted to a summary and concluding remarks. We include appendices on technical materials. 1 We will also denote p − q as the signature in some parts of this paper. The usage is clear from context.

Lattices with Even Quadratic Forms
In this section we consider free boson CFTs with momenta valued in a (p + q)-dimensional integral lattice Λ = Z p+q ⊂ R p+q , equipped with an even quadratic form with signature (p, q). This quadratic form is said to be even if the value Q( ) is even for any integral vector i , of length p + q. This condition implies that Q ii is even for any i, and Q ij is an integer for i = j; it also implies the integrality of the bilinear form Before coming to the discussion of general Q, it is useful to remind ourselves of the simplest case of the S 1 -compactification of the free boson. In this case we have p = q = 1, and the lattice Λ is given by where the integers n and w represent the momentum and winding, respectively. The radius R of the circle is the coordinate for the Narain moduli space. The quadratic form for this example is which determines the so-called II 1,1 lattice. Note that Q is independent of the modulus R, while the choice of the modulus is equivalent to the choice of the decomposition of the quadratic form Q into two positive definite quadratic forms Q L := p 2 L and Q R := p 2 R defined on one-dimensional subspaces V L , V R of R 2 . Such a choice is also equivalent with the choice of a positive quadratic form on the whole of R 2 : Let us now discuss the case of a general even quadratic form Q. The point of the moduli space M Q is again specified by decomposing the quadratic form into left and right-moving parts Q L and Q R . Namely, we choose a decomposition R p+q = V L ⊕ V R into a p-dimensional subspace V L (and a q-dimensional subspace V R ) together with positive quadratic forms Q L (and Q R ) on V L (and V R ) respectively, such that we have the the left-moving and right-moving momenta p L and p R : We can simply write this as 2 As in the case of the circle compactification, one can also define a positive quadratic form, the Hamiltonian H( ) := Q L ( ) + Q R ( ), which can also be used as another parametrization of the moduli space. Note that the positive quadratic form H satisfies H( ) ≥ Q( ) for all , and is moreover the minimal such choice; 3 for this reason H is called a minimal majorant.
Notice that for any quadratic form Q of signature (p, q), one can apply an element of GL(p, q; R) to express Q in an orthonormal frame 1 , . . . , p+q : i . This clearly leads to . . , p+q } and their associated quadratic forms The moduli space is parameterized by transformations that preserve Q L − Q R , modulo those that fix H. We also must quotient by transformations that simply permute points of the lattice. This explains the double coset in (2).
The incompatibility between a general O(p, q; R) transformation and the integrality of the lattice Λ means that we have V L ∩ Λ = V R ∩ Λ = ∅ at a generic point in the moduli space. The concepts of "left-and right-moving lattices" therefore do not exist. However, there are still special sub-loci of the moduli space where V L ∩ Λ or V R ∩ Λ becomes non-trivial, and this is precisely the locus where the symmetry of the CFT enhances. Indeed, the moduli space M Q arises from deformations of the Wess-Zumino-Witten models by currents in the Cartan subalgebras of the left and right current algebra symmetries [15]. The cosets M Q are submanifolds of M IIp,p where only restricted sets of exactly marginal operators are turned on.

CFT Partition Function
In the majority of this section, we study the genus one CFT partition function. (We will comment on higher genus partition functions later in Sec. 2.6.) The genus one partition function of our 2 Strictly speaking, QL( ) was defined previously only on VL, and we have now extended this to the whole of V by setting QL = 0 on VR. A similar comment applies to QR( ). 3 We can define an ordering among the positive definite quadratic forms by defining Q1 ≤ Q2 if and only if Q1( ) ≤ Q2( ) for all . A minimal majorant is minimal with respect to this partial ordering. theory, associated with a point m of the moduli space M Q , can be written as where τ = τ 1 + iτ 2 is the modulus of the torus, η(τ ) is the Dedekind eta function, and ϑ Q is the Siegel-Narain theta function, which is defined as: We can also write this in the more familiar notation with q := exp(2πiτ ), q := exp(2πiτ ). Note that this function depends explicitly on the choice of the point m in the moduli space M Q . 4 We can introduce more general partition functions. Let us denote the dual lattice of Λ by Λ * : By definition we have Λ ⊂ Λ * , but Λ Λ * unless Λ is self-dual. 5 Let us define the discriminant group D by The theta function ϑ Q,h shifted by a point h ∈ D is defined as: 4 One might be tempted to rewrite this as a factorized expression into sums over "left-and right-moving lattices" ΛL, ΛR: However, as remarked already such left and right-moving lattices do not exist at a generic point of the moduli space, and therefore the theta function does not factorize into holomorphic and anti-holomorphic parts. 5 A lattice Λ is self-dual if Λ = Λ * , or equivalently if the associated quadratic form Q has determinant ±1, i.e. | det Q| = 1.
with ϑ Q (τ, τ ; m) = ϑ Q,h=0 (τ, τ ; m). We can define the associated partition function as From now on we will suppress explicit dependence of non-holomorphic quantities on τ , since this dependence should be clear from context.
The modular transformations of the Siegel-Narain theta function ϑ Q,h (τ ; m) are [16, section 4, equation (37)] where σ := p−q is the signature, and T and S are PSL(2, Z) matrices whose SL(2, Z) representatives we take to be (using the same symbols T and S) We have the relation (ST ) 3 = S 2 = 1 in PSL(2, Z). Note that the modular S-transformation mixes the theta functions ϑ Q,h (τ ; m) with different values of h ∈ D. Using the modular transformation rule for the eta function T : η(τ + 1) = e 2πi/24 η(τ ) , the modular transformation of the partition function Z Q,h can be worked out as Note that the partition function is in general not modular invariant. This is not surprising since we are studying a general choice of the quadratic form Q, and in particular the theories in general have gravitational anomalies (p = q) and also are not invariant under S unless Λ = Λ * . As we shall see, this does not affect our discussion of the ensemble average and the holographic dual. If we impose modular invariance, the even lattice needs to be self-dual, so that the discriminant group D is trivial. Recall that for the self-dual case, | det Q| = 1. Therefore, the equations in (23) above simplify T : Z Q (τ + 1; m) = e −2πiσ/24 Z Q (τ ; m) , meaning that the partition function is modular invariant if σ ≡ 0 modulo 24. This happens, for example, if Q is one of the 24 positive-definite, even, self-dual lattices of rank 24, known as Niemeier lattices. Let us consider the ensemble average of the partition function

Ensemble Average and the Siegel-Weil Theorem
where the normalization factor is the volume of the moduli space. 6 Note that (25) is independent of the choice of the overall normalization factor of the measure on the moduli space. Since the eta function piece of the partition function is independent of the moduli space, this amounts to the evaluation of the ensemble average of the Siegel-Narain theta function (18): For convergence of the right hand side of (27), we impose p + q > 4 [16]. A remarkable theorem by Siegel (see [19,Satz 1] and [16, Section 4, Theorem 12]), later generalized by Weil [20,21] and therefore known as the Siegel-Weil theorem, states that when pq = 0 the ensemble average is given 6 See e.g. [17,18] for discussion of the volumes of the moduli spaces. by where is the Siegel-Eisenstein series (henceforth referred to simply as Eisenstein series) associated with the quadratic form Q, and δ h = 1 for h ∈ Λ, and δ h = 0 for h / ∈ Λ. Note that the constant term is expected for h ∈ Λ since in the limit τ 2 → ∞, we still have a contribution from the origin = 0 of the lattice Λ in the sum (13). The factor γ Q,h (c, d) is given by a version of the quadratic Gauss Finally, the summation is over a pair of coprime integers c, d satisfying c > 0. Equivalently, the sum is over all rational numbers d/c. The modular transformations of the Eisenstein series E Q,h (τ ) Notice that the modular transformations of the Eisenstein series (31) are equivalent to the modular transformations of the Siegel-Narain theta function described in (20), as expected from the Siegel-Weil formula (28).
We can also make contact with the results used in [6,7]. Let us consider the case of the (p, q = p) Narain moduli space II p,p discussed before. We then have (recall again that |det Q| = 1 for a self-dual lattice, and recall that c and d are coprime) so that we have a non-holomorphic Eisenstein series We begin by presenting the idea of the proof, which is similar to the strategy in [6,7,13]. The first step is to show that both sides of (29) have the same behavior at the cusps of the upper half plane, which are the images of τ = i∞ under PSL(2, Z). Then we will derive a differential equation that is satisfied by both sides of (29), and will proceed to show that a solution to this differential equation is uniquely identified by its behavior at the cusps. The Siegel-Weil theorem then follows. This argument only relies on the transformation laws for theta functions, and does not involve explicit integration over moduli space.
To identify the behavior of the left hand side of (29) near a cusp, note that for any h, the function ϑ Q,h is a modular form for Γ(N ), where the level N (also the level of the quadratic form Q) is the smallest integer such that N Q −1 is even [22,23]. The quotient H/Γ(N ) has cusps at the The asymptotic behavior of the theta functions at τ = i∞ is given by δ h∈Λ . The asymptotic behavior of the theta functions at the other cusps is then determined by the modular transformation of the theta functions. In particular, if a modular transformation g ∈ PSL(2, Z) acts as then the behavior of ϑ Q,h (τ ) near the cusp τ = g · i∞ is given by The matrix U can be computed from the corresponding formulas for T and S given previously in (20), and its general formula was given in [16]. If g · τ = (aτ + b)/(cτ + d), then we find We see the behavior near each of the cusps is completely determined by the behavior at the cusp at infinity, and matches the behavior of the Eisenstein series near the cusp.
The next step is to derive a differential equation satisfied by both sides of (29). It is simple to show that In appendix A, we show that ϑ Q,h M Q satisfies the same differential equation. We are interested in the uniqueness of solutions to (37). For this purpose, note that if f (τ ) is a solution to (37), then where the weight k Laplacian is defined by The minimum eigenvalue for a square normalizable eigenfunction of k is 7 Taking p > q, we then have We have p > 2 for convergence, so the right hand side is less than or equal to zero. It follows that there is no normalizable eigenfunction satisfying the differential equation (38), except in the case q = 0 where such a function is allowed.
From now on we fix q > 0. We consider the function Both E Q,h and ϑ Q,h M Q are modular forms for Γ(N ) with the same eigenvalue λ < λ min under the Laplacian after rescaling by τ

Bulk Interpretation
Having identified the ensemble average, let us now come to the holographic interpretation. In the holographic bulk we expect a sum over semiclassical geometries which are asymptotically AdS 3 .
7 Let f λ be an eigenfunction for k with eigenvalue λ, assuming k > 0 without loss of generality. Integrating by parts, we have The right hand side is manifestly positive, so the eigenvalue of a normalizable eigenfunction of k is bounded from below by (41).
Such geometries were classified in [24], 8 and include geometries labeled by an element of PSL(2, Z), the so-called "PSL(2, Z) black holes" [25,26]. 9 Mathematically, these are solid tori with torus boundaries (genus one handlebodies), where PSL(2, Z) acts as the mapping class group on the boundary torus. More precisely, the geometry is labeled by Γ ∞ \PSL(2, Z), where Γ ∞ Z is the Abelian group generated by the matrix T . An element of the quotient group Γ ∞ \PSL(2, Z) can be parametrized by a pair of coprime integers (c, d) with c > 0, since given such a pair we can uniquely identify an element a b c d of PSL(2, Z), up to ambiguities in Γ ∞ . We denote the associated geometry by M (c,d) : these geometries include thermal AdS 3 (M (0,1) ) and the BTZ black [27]. Since we have a sum over essentially the same pair (c, d) in (29), we expect to interpret the sum in (29) as a sum over geometries.
One subtlety for us is that that our theories in general have gravitational anomalies (since p = q), and hence the partition function is not invariant under the large coordinate transformations in Γ ∞ .
(Relatedly, the BTZ black hole is now rotating with angular momentum J = σ 24 = p − q 24 [28].) In the discussion of the partition function, we need to be careful in picking up a representative from the coset Γ ∞ \PSL(2, Z), since different choices give partition functions differing by factors of exp(2πiσ/24).
By identifying the δ h∈Λ piece as a contribution from matrices with c = 0 (and hence d = 1), we can write where we defined γ Q,h (0, 1) := δ h∈Λ . Owing to the modular transformations of the Dedekind eta function mentioned previously in (22), one obtains where g is a PSL(2, Z) matrix of the form a b c d , and Φ(g) ∈ Z is the Rademacher function. 10 Note that the phase factor exp(2πiσΦ(g)/24) as well as the eta functions η(g · τ ) pη (g · τ ) q depend 8 This amounts to the classification of hyperbolic 3-manifolds H 3 /Γ whose fundamental group is contained in that of the two-dimensional boundary torus. 9 The asymptotically AdS3 boundary condition allows for orbifolds M (c,d) /Zm of PSL(2, Z) black holes [24]. There is in general no consensus on which geometries we should include in the path integral of fully quantum gravity. We will not include these orbifold geometries in this paper, since these geometries are not needed for reproducing our partition functions. 10 The modular transformation rule for the eta function is given by on the choice of a representative of the quotient Γ ∞ \PSL(2, Z), as expected from the gravitational anomaly. However, the whole combination does not depend on such a choice.
Let us next consider the contribution from the thermal AdS 3 geometry. While the graviton has no dynamical degrees of freedom in the bulk of the three-dimensional gravity, there are boundary excitations, as studied by Brown and Henneaux [29]. In our context, we can construct boundary Virasoro generators by the Sugawara construction [30] of the U(1) p+q current algebras, p left-and q right-moving. We therefore expect the partition function to be and by summing over PSL(2, Z) images we might expect In fact, this is precisely the logic which worked for the special case of the II p,p lattice [7]. In this special case, we have and the expression (45) has no ambiguities: as anticipated in (51). Moreover, the contribution from each geometry was identified with the partition function of the three-dimensional Abelian Chern-Simons theory, whose gauge group is and the Dedekind sum s(d, c) for c > 0 is defined by with (Recall that Q is even, ensuring the integer quantization of the levels.) Note that the appearance of the U(1) p+q gauge symmetry in the bulk is expected from the U(1) p+q global symmetry of the boundary theory, and the existence of the Chern-Simons term is suggested from the anomalies of the global symmetries. Moreover the eta function contributions in (53) were derived from the oneloop analysis of the Chern-Simons theory, building on similar computations in three-dimensional gravity [31]. 11 Our discussion for a general, even quadratic form Q is more involved than the special case of the II p,p lattice, as is evident, e.g., from the non-trivial factors γ Q,h (c, d) in (29). It turns out, however, that the bulk theory is still described by the Abelian Chern-Simons theory (54) in our more general setting. While the bulk theory is an exotic theory of gravity whose complete understanding is beyond the scope of this paper, the Abelian Chern-Simons theory is a good approximation to the exotic theory and will successfully reproduce many results, including the phase factor γ Q,h (c, d).
Incidentally, in the condensed matter literature these Chern-Simons theories are used for the classification of topological phases of interacting system in two spatial dimensions [32], where the matrix Q is often called the K-matrix. 12 It is remarkable that all such theories arise from ensemble averages discussed in this paper.
In order to derive the phase factor γ Q,h (c, d), let us first recall the canonical quantization Note that the phase factor in the action of T represents the framing anomaly of the Chern-Simons theory [33], while that of S is simply a discrete Fourier transformation. It is straightforward to 11 There are, however, potential subtleties associated with the asymptotic boundary conditions of the fields in the Chern-Simons theory. 12 In the literature the level of the Chern-Simons theory is often denoted by Q/2, not Q. Our normalization here is useful when we discuss spin Chern-Simons theory in section 3. 13 As in footnote 12, we choose a normalization where the minimal value of the level for the non-spin (even) Chern-Simons theory is k = 2.
work out a similar formula for a more general Abelian Chern-Simons theory (54), so that one has where h, h are elements of the discriminant group D (17). Since SL(2, Z) is generated by S and T -transformations, one can work out the action of a more general matrix g = a b c d ∈ SL(2, Z): Now coming back to the discussion of holography, we are interested in the geometry of the solid torus without any Wilson line insertions, namely in the state |h = 0 . This means that we are interested in the matrix element (U (g)) 0,h , which we find to be related by complex conjugation to the factor γ Q,h (c, d) in the Eisenstein series E Q,h (see also the discussion around (35) and (36)): As this discussion makes clear, the expression (U (g)) h,0 in itself can be identified as the Chern-Simons partition function of the geometry obtained by gluing two solid tori along the boundary torus by the mapping class group element represented by U (g). This is the lens space L(c, d), which is defined for c = 0 by a discrete Z c quotient of the three-sphere |z 1 | 2 + |z 2 | 2 = 1 (with complex for c = 0 the lens space is defined to be S 1 × S 2 . The Chern-Simons partition function for lens spaces was computed by Jeffrey in [34], and also in various other papers such as [35][36][37][38][39][40][41][42]. The parameters h, h represent insertions of Wilson lines in each solid torus. The extra phase factor exp(2πiσΦ(g)/24) represents the effect of the framing anomaly. The partition functions of the lens spaces, without any Wilson line insertions, are given by (U (g)) 0,0 , which is expressed as a sum over contributions from flat connections-for each contribution, the phase represents the η-invariant of the three-manifold [43], or equivalently the phase in the one-loop determinant for the Chern-Simons theory [33]. In summary, This completes our derivation of the bulk partition function.
In our discussion of the matrix elements of U (g), it was crucial to assume that the gauge group of the Chern-Simons theory is U(1) p+q , not R p+q . If we wish to obtain the honest wavefunction of the U(1) p+q Chern-Simons theory, however, we should rather consider a sum of the expression (60) over large gauge transformations of the gauge fields. We will then have a theta function in the numerator, to match with the character of the boundary current algebra. (We will discuss such wavefunctions in a more generalized setup in section 4.) The choice of the bulk gauge group, U(1) p+q or R p+q , is therefore a subtle question (see [7] for related discussion), and we will leave a better concentual understanding of this subtlety for future works.
It is interesting to notice that quadratic forms with different signatures (p,

Positive Definite Case
In the discussion of the Siegel-Weil formula the special case of pq = 0 was excluded when we stated the formula. In the chiral case (q = 0), the moduli space M Q is zero-dimensional and therefore trivial. It turns out that there is still a formula of the form [45] ϑ For a given Q we can consider a representative class Q 1 , . . . , Q h(Q) with the same genus as Q.
Since the Siegel-Narain theta function depends only on the class of Q, the set of theta functions {ϑ Q j } do not depend on the choice of representative elements from the genus of Q.
The ensemble average in (61) is defined by a weighted sum where the normalization factor M (Q) is known as the mass of the quadratic form Q. Note that holography for chiral theories was discussed in [9], see also [10]. It is far from clear physically, however, why we need to consider such an ensemble average. 14 As an example, for the case p = 24 this ensemble average is a sum over the 24 even self-dual lattices, the Niemeier lattices.
Since there are no continuous moduli for a positive definite lattice, we can consider observables such as correlation functions in addition to the partition function. Here we will give one example, fixing the self-dual case for simplicity. Let P ( ) be a polynomial which is spherical with respect to Q, meaning that Q ij ∂ i ∂ j P = 0. Then P (∂X) is a primary operator in the conformal field theory, and we can consider its one-point function on the torus [47]. This correlation function is equal to a spherical theta function, A theorem of Waldspurger [48,49] computes the ensemble average of ϑ Q,P for some specific spherical polynomials, Here P ν m is defined in terms of Gegenbauer polynomials, T m is the Hecke operator, and C (ν) k is known as Cohen's function (see [48] for details). It would be interesting to understand the bulk interpretation of these correlation functions.

Higher Genus
We can repeat the discussions above for a higher genus boundary surface Σ g . The higher genus theta function is given by the expression where Ω = Ω 1 + iΩ 2 is the period matrix of size g × g that parametrizes the Siegel upper half plane, and = ( 1 , . . . , g ). The averaged partition function, derived in [50], is given by 14 For indefinite cases there is only one class in a given genus [46].
where E g Q, h (Ω) = γ∈Γ∞\Sp(2g,Z) is the Siegel-Eisenstein series and we have assumed that p + q > 2g + 2. The expressions for γ h (C, D), which generalizes the genus 1 expressions in (30), can be found in [50,Section 12]. The summation in (66) is equivalently over the Lagrangian sublattices in H 1 (Σ g , Z 2 ) [7], and when Σ g is connected can be identified with a sum over handlebodies. We then expect that γ h (C, D) should be matched with the partition functions of the Abelian Chern-Simons theory (54), now on 3-manifolds obtained by gluing two genus g handlebodies (i.e. 3-manifolds with Heegaard genus g). 15 Note that for any choice of p and q the formula (66) holds only for finitely many g's-since the exotic bulk theory is "coarse-grained," it is not surprising that we have access to only finitely many invariants.

Ensemble Average of Fermionic CFTs
In this section we extend the discussion of the previous section to an integral quadratic form Q which is not necessarily even. While this might look like a minor change, such a generalization requires us to carefully discuss spin-structure dependence of our holographic dualities. 16

Review of Spin Chern-Simons Theory
To explain the spin-structure dependence, let us begin with the bulk Chern-Simons theory.
Let us recall the standard argument for the quantization of the levels of the Chern-Simons theory.
While the Chern-Simons Lagrangian (54) is apparently not gauge-invariant, one can consider a four-manifold N bounding the three-manifold M , to rewrite the action (54) in terms of the gaugeinvariant field strength F = dA as While this depends on the choice of N , a different choice N gives an answer which differs from that of N by where N ∪N is a closed four-manifold obtained by gluing N andN (N with orientation reversed) 15 In three-dimensional gravity there are classical solutions with conformal boundary which are not handlebodies [51]. It seems that these geometries do not contribute to the partition function. The identification of the bulk geometry is more non-trivial when the boundary geometry Σ has several disconnected components, see [7] for further discussion. 16 See [52] for a recent discussion of spin structures in two-dimensional quantum gravity.
along the common three-manifold M . Since Q is even, Q/2 is integral and Q(F, F )/(2 × 8π 2 ) gives an element of the integer cohomology class. This means that the combination exp(−S CS ) is gauge-invariant in the path integral.
This argument does not apply for odd integral Q. We can, however, cure this problem by requiring that the three manifold M is spin, and by requiring that the bounding four-manifold N admits a spin structure compatible with that of M [53,54]. Then the integral of Q(F, F ) 2 1 8π 2 over a closed spin four-manifold is now an integer for any integral quadratic form Q. The resulting theory then depends on both the topology of the three-manifold M , as well as a choice of the spin structure on it. 17 We call this theory the spin Chern-Simons theory (associated with an integral quadratic form Q). Notice that while we are expected to sum over all the possible geometries in the theories of quantum gravity, one can still restrict the geometries by fixing their spin structures.
In the rest of this section, we will discuss how to incorporate this spin-structure dependence into the framework of ensemble averages.

Partition Functions with Spin Structure
In the boundary theory, we consider CFTs that are dependent on the choice of the spin structure, namely fermionic CFTs (spin CFTs). 18 There are four spin structures on the boundary two-dimensional torus, which are labeled by H 1 (T 2 ; Z 2 ) = Z 2 ⊕ Z 2 . We will denote this by the Z 2 -signs 1 , 2 , each of which takes values in 0 and 1. Following [53] we define the generalization of the theta function (18) to be where h is an element of D = Λ * /Λ, just as before. The characteristic class W ∈ Λ * , known as the (integral) Wu class [59,60], is defined by (W, ) ≡ Q( ) mod 2 for ∈ Λ. 19 This is solved by W α = Q αα . 20 Note that only ϑ 0,0 Q,h and ϑ 0,1 Q,h are non-vanishing at the cusp at τ = i∞. The modular transformations of the theta functions are given in appendix B. Note that the modular transformations mix spin structures, as shown in Fig. 1.
The theta function above (70) (with h = 0) is reminiscent of the free fermion partition function Here 1 labels the periodicities on the spatial circle (R or NS), and 2 labels the periodicity on 17 Any compact oriented three-manifold admits a spin structure [55]. 18 See [56][57][58] for recent discussion on spin CFTs. 19 This condition determines only the element of the quotient [W ] ∈ Λ * /(2Λ * ). 20 We can check this for binary forms, for example. If Q( ) = a 2 1 +2b 1 2+c Therefore as we go around the circle, we have We want to find the analog of a spin field for a free fermion, which makes fermions anti-periodic on the spatial circle [61]. We make an ansatz of exponential form : exp(ip ·X) :. As we go once around the spatial circle, this transforms as : e ip·X : (e 2πi z) = e 2πiQ(p,p) : e ip·X : (z) .
Now consider the state : exp(ip ·X) : (z)| , where ∈ Λ. When we go around the circle, this state picks up a phase exp(2πiQ(p, )). In order for this state to be anti-periodic when is a fermion and periodic when is a boson, we therefore need 2Q(p, ) ≡ Q( ) mod 2. But this is precisely the definition of the characteristic class W . Therefore the spin field is : exp(iW ·X/2) :. This creates the Ramond sector ground state, and the dependence on 1 then follows.

Ensemble Average
Now that we have computed the partition function for a spin CFT, we can define the Eisenstein series with spin structure ( 1 , 2 ) as the average of ϑ 1 , 2 Q,h over the moduli space, As in the even case, we would like to understand the interpretation of this Eisenstein series in terms of the bulk Chern-Simons theory.
Let us start with the case of 1 = 2 = 0. In this case, the definition (70) coincides with the previous definition in the even case (13), except here Q is not necessarily even. We can cure this problem by writing (70) in terms of 2Q and τ /2: Since this is expressed in terms of the theta function for an even quadratic form, the ensemble average can be evaluated using the analysis of section 2.3. We find In terms of the sum over geometries, we have Since 2 (p+q)/2 γ 2Q,h (c, d) = γ Q,h (c, 2d), from the definition of γ Q,h (c, d) in (30), we obtain We can also divide the sum into c odd and c even, to obtain: The expression for γ Q,h (2c, 2d) reads as multiplied by exp(−iπdc) = (−1) c , where we assumed that d is odd. Therefore for c even we have γ Q,h (2c, 2d) = 2 (p+q)/2 γ Q,h (c, d), and for c odd the sum vanishes. The answer then reduces to This is the same expression for E Q,h (29) for even Q, but with the additional constraint that cd is even.
Now that we have identified the Eisenstein series for the (0, 0) spin structure, we can generate two more spin structures by the modular transformations (see Fig. 1).
Let us start with the case of | det Q| = 1 so that h = 0. Then the other two Eisenstein series are derived from the modular transformations of the theta functions to be and consequently Now let us look at the γ's that appear in the numerator of (83), (86) and (87). We expect that these expressions should coincide with the Chern-Simons invariants, as in the case of the even quadratic forms. We will see that this is indeed true in the next subsection. In this case, we have a spin Chern-Simons theory, and the phase of the one-loop determinant is given by the fermionic eta invariant, which can be written as a sum of the spin-independent eta invariant as well as the spin-dependent Arf invariant [62]. For E 0,0 Q,0 (83) γ Q,h (c, d) is simply the ordinary partition function with no spin structure. For E 0,1 Q,0 (86) we have When Q is rank 1, this matches the nontrivial spin structure invariant in [63].
We can repeat similar computations for higher | det Q| by using the modular transformations, Here we have defined Note that q W (h) does not depend on the choice of the representative from the quotient Λ * /Λ, since for h ∈ Λ * and ∈ Λ as follows from the integrality of Q and the definition of W . The quadratic form q W on the discriminant D is a quadratic refinement of the bilinear form on D induced from Q: for h, h ∈ D. Here on the right hand side Q is regarded as a bilinear form on the discriminant Notice that we can also compute these Eisenstein series by repeating the proof of the Siegel-Weil theorem in section 2.3. We can apply the same logic to the Eisenstein series for the remaining odd structure (1, 1), and we find that E 1,1 Q,h vanishes: this follows since the theta function for the singlet is a modular form for some Γ(N ) with eigenvalue less than λ min , and it is zero at all of the cusps.
The three sums (83), (89), and (90) compute the Eisenstein series for each of the triplet of even spin structures under the modular group. We can again write these as sums over geometries, in terms of the corresponding invariants of spin Chern-Simons theories. In direct analogy to (60) we expect Here we have defined the states | 1 2 ; h with spin structure ( 1 , 2 ) and charge h. The logic is the same as in section 2.3: in order to obtain the behavior of the theta functions at an arbitrary cusp, we perform a modular transformation g on the theta functions near the cusp at τ = i∞. The two spin structures (0, 0) and (0, 1) are the only spin structures for which the theta functions are nonvanishing at the cusp at τ = i∞, so the numerator of (94) represents the transformation from τ = i∞ to an arbitrary cusp.
In the next subsection we will check the formula (94) so that the summand of E 0,0 Q,h vanishes. This is consistent with the constraint cd ∈ 2Z in (83). The other congruence conditions follow in a similar manner.

Spin Chern-Simons Invariants
In this subsection, we will show that spin Chern-Simons invariants appear in the novel Eisenstein series presented in the previous subsection, in a form consistent with (94). We shall follow the approach of Jeffrey [34], who computed the Witten-Reshetikhin-Turaev (WRT) invariants [33,64] for non-spin Chern-Simons theory on lens spaces from the action of PSL(2, Z) on the Hilbert space on a solid torus. Such an invariant is the partition function of the Chern-Simons theory, obtained as a matrix element of the gluing matrix U (g) with g ∈ PSL(2, Z) that glues two solid tori to give a lens space.
In order to compute spin Chern-Simons invariants in an analogous manner, we shall employ the PSL(2, Z) transformations of elements of the Hilbert space of a general Abelian spin Chern-Simons theory on T 2 × R, which was derived explicitly by Belov and Moore [53] (with minor corrections in [65]). 21 Such a Hilbert space is labeled by the characteristic class W ∈ Λ * (where Λ is the integral lattice characterizing the spin Chern-Simons theory) and a pair of spin structures, 1 and 2 , defined on the boundary torus. The matrix elements of an operator O acting from H 1 , 2 ,W to H 1 , 2 ,W are denoted via the notation O h h 1 2 1 2 , where h, h label elements of the discriminant group D = Λ * /Λ. In particular, the modular transformation operators are represented by matrices with the following elements (only nonzero elements are listed). 22 The T operator matrix elements 21 See [66] for analogous spin-structure-dependent computations of the matrix elements of the mapping class group action, in a different context of the analytic continuations of a supergroup Chern-Simons theory. 22 Our wavefunctions are the complex conjugates of those in [53,65].
while the S operator matrix elements are To compute a spin Chern-Simons invariant, we shall concatenate these operators to form a gluing matrix, keeping in mind how each operator maps spin structures. In particular, the inverse of an operator maps spin structures in a direction opposite to that of the operator, e.g., the inverse 1 0 . The inverse S −1 can be computed with the help of an identity We shall first compute a spin Chern-Simons invariant for the lens space L(c, ) (where c > 0 and = ±1) with trivial spin structure, and show that it takes a form that we expect from the Eisenstein series E 0,0 Q,h . The gluing matrix for this space is The matrix element of interest (corresponding to a lens space with Wilson line insertion) is computed to be where c must be even to obtain a nonzero answer. This results in the W dependence cancelling out due to the form of the T transformations. We now make use of the Gauss reciprocity formula derived in [67], and described in appendix C, which is for c even. Using this formula, we obtain the spin Chern-Simons invariant where c is restricted to be even. This is the complex conjugate of the expression γ Q,h (c, d) that appears in the Eisenstein series E 0,0 Q,h (c.f. (83)), for d = , multiplied by the complex conjugate of the overall phase in (58). This formula generalizes the result of Okuda et al. [63] involving a single U(1) gauge group.
Next, we shall show that a spin Chern-Simons invariant appears in E 0,1 Q,h . To this end we shall compute a spin Chern-Simons invariant for the lens space L(c, ) with nontrivial spin structure, i.e., we would like to compute Here, the concatenation of operators begins on the right with ( 1 0 is nonzero, there is no restriction on c. Furthermore, for = −1, we must end the concatenation with Then, we obtain We can write the right hand side of (109) as To obtain a familiar expression from this we ought to use a Gauss reciprocity formula. 23 For c even, we can use (105) (with Ψ = h − c 2 W ), while for c odd, we ought to use the more general formula 23 See [68] for another discussion of reciprocity formulas in the study of Abelian Chern-Simons theories.
described in appendix C. Doing so, we find the right hand side of (109) to be (For h = 0 and Λ a rank 1 lattice, this agrees exactly with the result of Okuda et al. [63].) Up to the overall phase in (58), this in fact takes the form of the complex conjugate of γ Q,h (c, d − c) that appears in E 0,1 Q,h , i.e., Finally, let us consider E 1,0 Q,h , for which the relevant matrix element is where c is restricted to be odd. To match this to the Eisenstein series, we expand (90), and complex conjugating indeed gives (114) up to the overall phase.

Holographic Dual before Ensemble Average
We have seen that the CFT partition function gives that of the Abelian spin Chern-Simons theory after the ensemble average. However, we do not encounter such an ensemble average in the standard discussion of holography. One might therefore wonder if there exists a holography before ensemble average, so that the ensemble average of this more "fine-grained" holography gives the holography of the previous sections as a "coarse-grained" counterpart after the ensemble average (see also [69]).
In this section, we address this question.
In order to discuss holography before ensemble averages, we need to incorporate the dependence on the moduli M Q . Since a point of the moduli space gives a decomposition into left movers and right movers (recall from section 2.1), one possibility is to perform such a decomposition to the Chern-Simons theory, so that we have an action where the "left-moving" (resp. "right-moving") gauge fields A 1,.. In [70] it was recognized that we can realize irrational CFTs on the boundary if we instead consider a Maxwell-Chern-Simons theory [71,72]. The theory is defined by the action where e 2 is the coupling which has dimensions of mass, and λ −1 is a dimensionless, symmetric, positive definite matrix with determinant one. Since e 2 is dimensionful, the Yang-Mills term is irrelevant and the Chern-Simons term is expected to dominate in the IR. This gives the topological limit e 2 → ∞, leaving only the Chern-Simons term. The effect of the Yang-Mills term, however, does not quite go away, since the quantization conditions for the gauge fields in the topological limit depend on the parameters λ, and hence on a point of the moduli space M Q .
We will see that in this setup we can identify a duality between the resulting Abelian Chern-Simons theory defined with respect to the quadratic form Q, and a CFT associated with an integral lattice with the same quadratic form, at each point of the moduli space of the latter. In contrast to the previous discussion that the exotic bulk theories after ensemble averages are only approximately Chern-Simons theories, here we find that the bulk theory is given precisely by the Chern-Simons theories. In order to simplify the discussion we restrict to the case of the trivial spin structure.
The aforementioned quantization of the Maxwell-Chern-Simons theory is performed on the infinite volume limit of the solid torus, i.e., M = T 2 × R. Picking a complex structure τ on the torus with flat metric, the basis of wavefunctions for the topological sector of the theory was shown in [53,70] to be for h ∈ Λ * /Λ, where µ is a symmetric positive definite matrix defined below, and where the theta function is defined as with Q L := 1 2 (Q + µ), Q R := 1 2 (−Q + µ), and ξ(A) := − 1 √ 2π (P − (iImτ Az); P + (iImτ A z )), where P ± := 1 2 (1 ± µ −1 Q) are projection operators onto left/right movers. The matrix µ takes the form where ∆ ± are diagonal matrices satisfying ∆ + ii > 0 and ∆ − ii < 0, and O is a real orthogonal matrix that diagonalizes λ 1/2 Qλ 1/2 such that We thus observe that the moduli that enter the theta function in (120) arise from the matrix λ whose elements enter the kinetic term in (118).
To elucidate the duality with a CFT before averaging, let us specialize to the case of gauge group U(1) × U(1) with gauge fields denoted A and B, where e 2 = e A e B and In this case, Now, the vector ξ(A) = − 1 √ 2π (P − (iImτ Az); P + (iImτ A z )) involves components of the fields P − A := A − and P + A := A + . If we were to compute the path integral of this Maxwell-Chern-Simons theory on the solid torus, we ought to obtain a state in the Hilbert space of the theory as a function of the boundary values of the fields. If we were to choose the boundary conditions A − z = 0 and A + z = 0, we find that the basis of wavefunctions simplifies to which is, up to a factor of √ k, the CFT partition function (19) for p = q = 1, once we identify µ with the Hamiltonian H. It is in this sense that there is a duality between the topological sector of Maxwell-Chern-Simons theory and the CFTs studied in section 2.2.
Note that, since the Chern-Simons sector of the action can be recast as S CS = i 16π k (A + ∧dA + − A − ∧ dA − ), the boundary conditions A − z = 0 and A + z = 0 resemble the boundary conditions (in Euclidean signature) used by Coussaert, Henneaux and Van Driel [73] in relating SL(2, R)×SL(2, R) Chern-Simons theory to the SL(2, R) WZW model. This would indeed be the case if the ratio e B /e A was rational, but not otherwise since A + and A − cannot then be defined as nontrivial connections, and would not be truly independent.
For general Q and λ, the boundary conditions P − Az = 0 and P + A z = 0 lead us to the same conclusion of a duality before averaging between the topological limit of Maxwell-Chern-Simons theory and the aforementioned CFTs for each value of their moduli. These observations, in fact, generalize to the case of spin Maxwell-Chern-Simons theory on higher genus handlebodies with nontrivial spin structure, whose wavefunctions were derived in [53]. The CFT dual to this theory for genus one was studied in section 3.
The discussion up to this point makes clear one can formulate the holography not only for the partition functions but also at the level of states inside the Hilbert space. To see this, first note that the CFT partition function on the two-torus should be regarded as a wavefunction of the holographic dual on the Hilbert space H(T 2 ) associated with the two-torus. In order to better represent this fact, we introduce a new bra-ket notation so that the Hilbert space H(T 2 ) is spanned by |h; m with h ∈ D. Note that we are making the dependence on Q and τ, τ to be implicit. In this notation, the modular transformation rules of the CFT partition functions (23) coincide with the transformation rules (56) in the holographic dual. In other words, both bulk and the boundary give exactly the same pair (H, R) of the Hilbert space H(T 2 ) and a representation R of the mapping class group PSL(2, Z) on the Hilbert space.
Moreover, such a pair is independent of the CFT moduli space, and hence is preserved by the ensemble average.
It is interesting to note that different choices of the quadratic form can generate equivalent representations of the mapping class group, as discussed in [53]. Such a equivalence is constrained more strongly in our case, since in our partition functions we have dependence on both the rank p + q and the signature σ = p − q of the quadratic form, while for (56) only p − q modulo 24 enters into the representation of the mapping class group. There is no inconsistency in these statements, since two Abelian Chern-Simons theories which are equivalent in the sense of [53] can still lead to different partition functions when we consider manifolds with boundary, with different boundary conditions imposed.

Discussion
One of the interesting findings in the analysis of the holographic duality in this paper is that once we have an ensemble average over the CFT moduli space then the sum over geometries in the bulk is automatically incorporated. We propose that this is a general lesson for holographies involving Note that ϑ Q,h (τ, τ ; m) stands for theta functions with or without spin structure. Furthermore, upon averaging, the moduli-dependent Laplacian drops out so that the averaged theta function satisfies the same differential equation as the related Eisenstein series.

C Gauss Reciprocity Formulas
In this appendix, we collect Gauss reciprocity formulas that we use in the main text, based on the results of Deloup and Turaev [67].
Consider a pair of lattices Λ and Λ , defined with the quadratic forms Q and Q respectively.
Let us consider a tensor product Λ ⊗ Λ (over Z) with a quadratic form Q := Q ⊗ Q , as well as a Wu class z on it. Theorem 2 of [67] can then be stated as This is precisely the formula we use in Section 3.4. Note that for c even, we have W = 0 and the dependence on W is no longer present, with z = −2Ψ ⊗ 1.