The canonical ensemble reloaded: the complex-stability of Euclidean quantum gravity for black holes in a box

We revisit the stability of black hole saddles for the Euclidean path integral describing the canonical partition function Z(β) for gravity inside a spherical reflecting cavity. The boundary condition at the cavity wall couples the transverse-traceless (TT) and pure-trace modes that are traditionally used to describe fluctuations about Euclidean Schwarzschild black holes in infinite-volume asymptotically flat and asymototically AdS spacetimes. This coupling obstructs the familiar Gibbons-Hawking-Perry treatment of the conformal factor problem, as Wick rotation of the pure-trace modes would require that the TT modes be rotated as well. The coupling also leads to complex eigenvalues for the Lichnerowicz operator. We nevertheless find that the Lichnerowicz operator can be diagonalized in the space of coupled modes. This observation allows the eigenmodes to define a natural generalization of the pure-trace Wick-rotation recipe used in infinite volume, with the result that a mode with eigenvalue λ is stable when Re λ > 0. In any cavity, and with any cosmological constant Λ ≤ 0, we show this recipe to reproduce the expectation from black hole thermodynamics that large Euclidean black holes define stable saddles while the saddles defined by small Euclidean black holes are unstable.


Introduction
Gibbons and Hawking [1] argued long ago that gravitational partition functions Z(β) are naturally described by Euclidean path integrals. Such integrals can be evaluated in the semiclassical approximation using saddle points associated with Euclidean black holes. The behavior of the action under small fluctuations indicates stability or instability of these saddles and determines which saddles are relevant to a given computation.
Unfortunately, due to the conformal factor problem, the Euclidean gravitational action is unbounded below. This prevents one from taking the integral over all Euclidean metrics as a definition of the problem to be studied. Many authors [2][3][4][5][6][7][8][9][10] have argued that the fundamental definition should instead be made in Lorentz signature, with implications for Euclidean path integrals determined by further careful study. While we are deeply sympathetic to this point of view, it has not yet led to a useful recipe to determine the stability of general Euclidean saddles.
As a result, past work has sometimes simply proposed a defining contour in particular contexts and then checked that it yields physically sensible results. In particular, for path integrals that compute partition functions in the canonical ensemble in asymptotically flat or asymptotically AdS spacetimes, it was suggested in [11] that the conformal factor JHEP08(2022)215 should be integrated over a contour parallel to the imaginary axis while the conformal metric should be integrated over real values. This recipe has a mathematical elegance and has the important property that black holes saddles for the canonical partition function are unstable when they have negative specific heat and when the above classes of perturbations can be decoupled (see [12] for the asymptotically AdS context and section 4.3 of [13] for a more general argument; in the latter case it is generally clear that the associated negativeaction deformation preserves the determinant of the metric and thus remains a physical negative mode after the above Wick rotation).
At the level of linearized fluctuations about saddles, this recipe is easiest to implement by first decomposing the Euclidean-signature perturbations into pure-trace, transversetraceless (TT), and pure-gauge modes. The proposal then implies that one should integrate the Euclidean pure-trace modes over imaginary field values while integrating transversetraceless modes over the real contour. Since pure-gauge modes do not change the action, the particular contour chosen for such modes will not affect the result and can be chosen to help preserve boundary conditions not discussed in detail in [11].
Mode stability in this approach is often discussed by noting (see e.g. [14]) that the quadratic action for perturbations h about a saddleĝ ab may be written as an expectation value S (2) [h] = (h, Lh) is the inner product defined by the DeWitt and is the Lichnerowicz operator. In particular, L reduces to the usual Lichnerowicz operator ∆ L on perturbations that satisfy the de Donder gauge, i.e.∇ ah ab = 0. The inner product (1.1c) has indefinite signature but, in the above thermodynamic context, Wick-rotating 1 It was pointed out by DeWitt [15] that there is a one-parameter family of 'ultralocal' metricŝ G ab cd λ DW = 1 2 ĝ acĝbd +ĝ adĝbc + λDWĝ abĝcd on the space of Riemannian metrics on M. Here we have added the subscript DW to DeWitt's parameter λ to avoid confusion with the eigenvalues we study below. Eq. (1.1c) corresponds to λDW = −1, or a = −1/2 in the conventions of [14]. We refer to the general such metric as DeWitt λ DW , so (1.1c) is DeWitt−1.

JHEP08(2022)215
the pure-trace modes makes the inner product positive definite while leaving L self-adjoint. Positivity of the Wick-rotated version of (1.1a) is thus determined by the spectrum of L, with positive eigenvalues of L corresponding to stable modes. In the presence of matter, the pure-trace modes generally couple to matter modes, but by using the approach of [16] analogous coupled modes can often be identified by inspection with correspondingly successful results [17]. See also [18][19][20] in the cosmological context. We will be interested below in a more complicated situation that occurs when one studies gravitational thermodynamics in a finite-sized cavity with fixed boundary metric. As in the case with matter fields, such boundary conditions again couple the pure-trace modes to other modes, which in this case are TT gravitational modes. This coupling is described in detail in section 3.1, but it should not be surprising: when they are both real, there are particular combinations of pure-trace perturbations and TT perturbations that preserve the induced metric on the cavity wall, even though each piece separately would change the induced metric. But if we Wick rotate the pure trace modes to imaginary values while keeping the TT modes real, then such cancellations cannot occur and the contributions of pure-trace and TT modes to the induced metric would have to vanish independently. Naively Wick rotating the pure-trace modes would thus have the effect of imposing an additional non-physical boundary condition which should be expected to invalidate any results. And since the bulk action is of course the same as in the infinite volume case, the issue is not immediately resolved by following [16].
It thus seems that the contour rotation prescription of [11] must be modified inside a reflecting cavity. As a first step in doing so we note that the DeWitt −1 metricĜ ab cd can still be used to define an operator L via (1.1a). We study this L below and find that it can again be diagonalized, though some of its eigenvalues may be complex. 2 We then use this observation to propose that the pure-trace Wick-rotation recipe from infinite volume be generalized to Wick-rotation of appropriate negative-norm parts of the L eigenmodes. The upshot of our generalization turns out to be that mode stability is again determined by the eigenvalues λ of L, with stable modes having Re λ > 0. This is in turn equivalent to analyzing stability under Ricci flow (perhaps modified by a cosmological term) as proposed in [14], though that reference did not explicitly discuss either complex eigenvalues or a definite proposal for Wick-rotation.
In either our formulation or that of [14], the critical input lies in giving a preferred status to the DeWitt −1 inner product. From our present point of view, this choice is as ad hoc as the Wick-rotation of pure-trace modes in [1,29]. Nonetheless, its physical viability is demonstrated below by showing (again, in analogy with [12]) that the above recipe reproduces the prediction from black-hole thermodynamics that in any cavity the large and small black hole saddles are respectively stable and unstable. 2 There are active discussions as to whether the full non-linear theory is physically sensible with such Dirichlet boundary conditions; see [21][22][23][24][25] for discussions of mathematical issues and [26] for discussion of more physical issues. However the linearized problem is well-defined in the context we study below. Furthermore, we have verified that following [22,23,27,28] and using instead boundary conditions that fix the conformal metric and the trace of the extrinsic curvature again leads both to couplings between the pure-trace and TT modes and to complex eigenvalues for the Lichnerowicz operator, though we leave a detailed study of such boundary conditions future work.

JHEP08(2022)215
We begin with general formalism in section 2, describing both the sense in which complex eigenvalues are natural and our proposed Wick-rotation. This section also introduces the particular approach we will take to discretizing our system for numerical investigation, which involves discretizing the system at the level of the action (from which a discrete L operator follows immediately) rather than using the continuum action to define a continuum L (and then attempting to discretize the result). This discussion also refers to some useful properties of the de Donder gauge that are reviewed in appendix A.
This sets the scene for section 3 to study fluctuations around the associated Euclidean black holes in d = 4, 5 spacetime dimensions. In particular, we show there that our proposed Wick-rotation reproduces the thermodynamic stability/instability of large/small black holes. The associated thermodynamic calculations are of a standard form but, since they do not seem to appear in the existing literature for black holes in a reflecting cavity with negative cosmological constant, we provide the details of this analysis in appendix B. We close with some final comments and discussion in section 4.

Wick rotation and mode stability
It is useful to begin by stating our Wick rotation prescription in very general terms. We thus consider any actionŠ, which is a quadratic function of independent and unconstrained real field variables Q I that is stationary at Q I = 0, and where we will explain the reason for the decorationˇin section 2.2. SettingŠ = 0 at the stationary point we thus havě where the subscript , IJ denotes the indicated second derivative of the action. We take our action to be real for real Q I , so that the coefficientsŠ ,IJ are real as well. Since our discussion is general, the label I may take either continuous values (as in the problem we wish to study) or discrete values (as in the numerical approximations that we will use in practice). In the latter case I , IJ represents the appropriate integral and , IJ denotes functional derivatives. The above notation is chosen to match that used in later sections in our study of particular systems. Our goal will be to investigate positivity of (2.1). However, since we will study Euclidean gravity, the conformal factor problem will ensure that (2.1) is not positive definite for real Q I . We therefore wish to introduce some structure that defines a 'Wick rotation' Q I = J W I J R J for some complex matrix W I J and to instead investigate positivity ofŠ for As foreshadowed in the introduction, we will define our Wick rotation W I J by making use of a (real) metric G IJ on the configuration space, which in practice will be the DeWitt −1 metric or a discrete approximation thereof. Indeed, one property we require (which in some JHEP08(2022)215 In our case this last property is also manifest from the fact that both G IJ andŠ ,IJ are real so that L I J is also real. Thus if J L I J v J = λv I , then complex-conjugating this result yields J L I J (v J ) * = λ * (v I ) * . In particular, complex eigenvalues require complex eigenvectors v, v * from which we can form the real linear combinations Re(v) = v+v * 2 and 2i . When the eigenvalues of L I J are non-degenerate, our Wick rotation will be defined to act in a simple way on the associated eigenspaces. It is convenient to state this definition by noting that any eigenvalue λ can be associated with an eigenvector v that satisfies the normalization condition Indeed, given an arbitrary eigenvector V we may define α = (V * , V )) so that the rescaled eigenvector v = α −1 V satisfies (2.9). Here we use the fact that combining the non-degeneracy of the spectrum with the non-degeneracy of the inner product requires α to be non-zero.
When λ is real, v * corresponds to the same eigenvalue, so non-degeneracy of the spectrum and Hermiticity of the inner product requires v * to be v times a phase. The condition (2.9) then also requires (v, v) = ±1. This sign is not a convention, but a statement of whether the given eigenmode has positive or negative norm.
The convention (2.9) gives a certain preferred status to the real and imaginary parts Re(v), Im(v). In particular, for λ = λ * one finds the following inner products: Note that more generally one finds (Re(v), Im(v)) = 1 2 Im(v * , v). Up to a choice of overall scale we thus see that requiring orthogonality of Re(v), Im(v) is equivalent to imposing (v, v * ) = ±1, and choosing the positive sign imposes the convention that Re(v) is the positive-norm member of the pair Re(v), Im(v) while Im(v) is the negative norm member.
In this context we define W I J by the following properties:

JHEP08(2022)215
Let us ignore for the moment any issues associated with gauge invariance of the gravitational action, returning to such issues in section 2.2 below. Non-degeneracy of the spectrum of L I J is then generic, and it remains to define W I J only at those special points in parameter space where eigenvalues become degenerate. In such cases we simply define W I J by requiring our Wick rotation to be a continuous function of the parameters. We hypothesize that this is always possible, and we will in section 3.3 below that this property holds for the particular problem studied here.
With this prescription it is clear that positivity of (2.2) is determined by the spectrum of L I J . In particular, since the eigenmodes v i of L I J span the space, we may write any R I as a linear combination of such modes. Due to (2.8), it will be useful to divide the full set of eigenvalues v i into the real eigenvalues λ a with eigenvectors V a (chosen to have all components real), the eigenvalues λ A with positive imaginary parts with eigenvectors v A , and the complex-conjugate eigenvalues λ * A with eigenvectors v * A . We may then write Since the c a are real, it is clear from (2.11) that a given mode is stable when it satisfies Re λ > 0, with marginal stability for Re λ = 0 and strict instability for Re λ < 0. We will investigate this definition of stability for gravity in a box in section 3, where we also discuss the relationship to the Ricci-flow prescription of [14].

Further issues and a comment on numerics
Our discussion above was cleanly presented in terms of an actionŠ that was a quadratic function of independent and unconstrained field variables Q I . However, the form in which gravitational systems are typically presented is not quite so clean. One issue is that, because spacetime is continuous, a good gravitational variational principle will generally require certain boundary conditions that constrain what would otherwise be independent values of the Q I . At first glance this is a minor issue that should affect only our choice of notation. We use the somewhat awkward notation Q I to denote a naive set of field variables on which boundary conditions have not yet been imposed, and we reserve Q I for the remaining independent variables after the constraints defined by such boundary conditions have been solved. Since we study linearized theories, the boundary conditions are also linear and explicit such solutions are always possible. However, due to the need to impose boundary conditions, and in order to develop a practical formalism that can be applied to very general situations, when it comes time to study our system numerically we will find it prudent to depart somewhat from the traditional approach of [12][13][14][29][30][31][32][33][34]. That approach would use the continuum action to construct a continuum differential operator L, after which the boundary conditions could be used to define an appropriate discretization of this operator. However, this discretization is not unique, and may not interact cleanly with the discretization of other structures such as the metric G.

JHEP08(2022)215
For this reason, we instead choose to first discretize the fields Q that solve the boundary conditions, the actionŠ, and the chosen metric G. Using the discretizedŠ, G to define L via (2.4) then guarantees that the properties described in section 2.1 hold exactly, or at least up to the numerical accuracy with which the resulting algebraic equations have been solved. While this is a minor issue for the current paper, we have found it to be extremely useful in studying the more general boundary conditions that we considered in [35]. This is the comment on our numerical approach advertised in the title of this subsection.
A second issue is that gravitational systems have a gauge symmetry, so that different Q I are generally not physically independent. While such physical independence was not strictly required in our treatment above, its lack means that -even after discretizationgeneral physical parameters might not lead to non-degeracy of the spectrum of L. Indeed, gauge invariance means that there are modes ξ I which we may use to shift any Q I without changing the value of the action; i.e., the action is the same for all Q I + ξ I , independent of the value of . For gravity we may take ξ I real, so that for real Q I we may differentiate the above result with respect to to find (Q, Lξ) = 0 for all Q. And since the inner product is non-degenerate, this would require each pure gauge mode ξ I to be a zero-eigenvalue eigenvector of L, leading to a highly degenerate spectrum.
While this is rightly considered a mere technical issue, it is one that we will wish to avoid. As usual, one can do so by fixing a gauge. The de Donder gauge ∇ a h ab − 1 2 ∇ b h = 0 is a common choice. At the conceptual level we will also make this choice, though with certain technical modifications as discussed below.
As reviewed in appendix A, the time-component of the de Donder gauge condition is straightforward to implement in our context. Indeed, doing so corresponds merely to setting a certain component of the metric to zero. But the radial component will also be non-trivial in our context. While it can also be solved, inserting the solution into the action leads to a higher-derivative action that is more complicated to study.
We thus avoid imposing this last condition explicitly (except at the cavity wall where it use it as an additional boundary condition). Instead, we will call the quadratic gravitational action I (with no check (ˇ)), and we will define a new actioň (2.12) to be used in our numerics by adding an additional quadratic term IJ K IJ Q I Q J that explicitly breaks gauge invariance but which has no effect on modes that satisfy the de Donder condition. That is to say, we require IJ K I Q I = 0 when Q I satisfies the de Donder condition. In our gravitational problem, it is the operator L defined by the modified action (2.12) that turns out to be usual Lichnerowicz operator in the bulk. While one could in principle use any gauge condition in the above way, the de Donder gauge has a particularly elegant property for this purpose. To explain this properly, let us use V to denote the space of all pure-gauge modes. Then as also reviewed in appendix A, as defined by the DeWitt −1 inner product, in our context the orthogonal complement V ⊥ of V consists precisely of perturbations satisfying the de Donder gauge. To see the utility of this property, recall that following the strategy outlined in section 2.1 means that we JHEP08(2022)215 study eigenvalues of a self-adjoint operator L. And since the action of this operator on any de Donder gauge mode is the same as that defined by gauge-fixing the theory, this L must have eigenmodes that satisfy the de Donder gauge and which in fact span V ⊥ . The above orthogonality then means that any eigenmode will either lie in V ⊥ or in V ; i.e., the eigenmodes will sort themselves cleanly into "physical" de Donder gauge modes and pure-gauge modes.
In particular, recall that (as reviewed in appendix A) any mode can be uniquely decomposed into a pure-gauge mode and a mode that satisfies the de Donder gauge. Since the addition of a pure-gauge mode leaves the original S invariant, if this action has a negative mode then it must in fact have a negative mode that satisfies the de Donder gauge. 5 But since the two actions agree on such modes, this would also provide a negative mode for the modified actionŠ. It follows that establishing positivity ofŠ will also establish positivity of the original action S under physical perturbations.
With these details in hand, we are now ready to analyze our gravitational system.

Fluctuations about the d = 4, 5 Euclidean Schwarzschild(-AdS) black hole in a reflecting cavity
We now turn to the details of mode stability for Euclidean Schwarzschild-AdS black holes in reflecting cavities. We introduce notation and conventions for the metric and for timeindependent spherical perturbations in section 3.1 and provide brief comments on numerical methods in section 3.2. Results regarding eigenvalues and eigenvectors are then presented in section 3.3.

Linearized modes
Euclidean AdS-Schwarzschld black hole solutions in a spherical cavity are just those parts of the usual Euclidean Schwarzschild-AdS spacetimes that lie within the cavity walls. We will work in Schwarzschild coordinates, where the Euclidean Schwarzschild-AdS line element reads with dΩ 2 n the metric on a unit radius round n−sphere, with and where is the AdS length scale, related to the cosmological constant Λ via The same is true of zero modes, though one should understand that Killing fields of the background give rise to trivial zero modes for which the metric perturbation h ab vanishes identically. Since the isometries of Euclidean AdS-Schwarzschild form a compact group, such zero modes cannot destabilize our canonical ensemble.

JHEP08(2022)215
The black hole event horizon is located at r = r + , where f (r) vanishes linearly. We take τ to be a periodic coordinate with τ ∼ τ + β * , and to avoid a conical singularity at r = r + , we must have (3.4) This fixes r + as a function of β * . Note that β * is not the physical inverse temperature as measured at the cavity wall, as such walls have not yet been introduced. But in any case we will find it more convenient to describe results in terms of r + below. The detailed thermodynamics of such solutions in a cavity of radius r 0 are described in appendix B. As usual, for a given box size there are both 'large' and 'small' branches of the space of black hole solutions, with the large/small black holes being thermodynamically stable/unstable and with the boundary between the two branches given by (B.11). The calculations are standard, and we will use (B.11) below.
Since the background metric is spherically symmetric, we can take advantage of its SO(d − 1) symmetry group and expand perturbations in terms of spherical harmonics. These harmonics come in three classes: scalar-derived gravitational perturbations, vectorderived gravitational perturbations and tensor-derived gravitational perturbations, with all of these being mutually orthogonal with respect to any DeWitt inner product. Furthermore, we expect modes with non-zero angular momentum to have larger values of Re λ, so we will study in detail only perturbations with zero angular momentum.
For zero angular momentum the vector-derived and tensor-derived modes are pure gauge and thus leave the action invariant. When the cavity walls taken to infinity, adding angular momentum is known to increase the eigenvalues of the Lichnerowicz operator [36]. Assuming that this result continues to hold in the presence of a finite-radius spherical wall, all vector-and tensor-derived modes will necessarily have positive Euclidean action after applying the Wick rotation of section 2.1. We reserve a careful check of this assumption for future work.
We are thus left with scalar perturbations. Scalar perturbations depend on a single quantum number S ≥ 0 and, as described above, modes with S = 0 will have the smallest Re λ eigenvalue λ. We will therefore focus on such modes.
Recalling that we restrict discussion to time-independent geometries, these S = 0 perturbations have exactly the same symmetries as the background geometry. Furthermore, as reviewed in appendix A, imposing the τ -component of the de Donder gauge condition sets the rτ component of the perturbation to zero everywhere. As a result, our perturbations take the form The action (1.1a) is readily evaluated on such perturbations. However, as described in section 2.2 we in fact wish to modify this action by adding a term that breaks gauge invariance. In particular, a standard argument shows that using the DeWitt −1 metric the space V ⊥ described in section 2.2 is just the space of perturbations that satisfy the de Donder gauge. As a result, we may take the additional K term in (2.12) to be given by

JHEP08(2022)215
(h, h) with h ab = −2∇ (a∇ ph b)p , so that the modified action is jusť evaluated on the perturbed line element (3.5). The results may be writteň where Ω d−2 is the volume of the metric on a unit radius round (d − 2)−sphere, q = {a(r), b(r), c(r)}, the operation · denotes the standard Cartesian inner product in Euclidean space defined by the Kronecker delta metric δ I, J , and P and V are symmetric matrices with the following independent components . (3.8) and Note in particular that neither P nor V are positive definite. This is to be expected, since we know that pure trace deformations (in the infinite cavity limit) will have a negative contribution to the Euclidean action.
In the infinite cavity limit, the trace modes and the traceless-tranverse modes decouple. For this reason, we can then Wick rotate the trace modes freely. However, in the presence of a cavity they couple. Let us see this more explicitly. We begin by separating the trace and trace-free parts of the metric by writing

JHEP08(2022)215
However, in the canonical ensemble, perturbations must preserve the induced metric on the cavity walls (located at r = r 0 ). This amounts to imposing a(r 0 ) = c(r 0 ) = 0 , (3.11) or p(r 0 ) = −dĉ(r 0 ) and p(r 0 ) = d d − 1b (r 0 ). (3.12) Furthermore, at least with the symmetries imposed above, the part of this boundary condition that fixed the proper length of the Euclidean time circle at the value of r where the sphere has radius r 0 is invariant under all diffeomorphisms, and is thus unaffected by the pure gauge modes. 6 Yet it is clear from (3.12) that the effect of any pure trace mode on the boundary conditions can be compensated by turning on a non-trace mode with appropriatê c(r 0 ),b(r 0 ) proportional to p(r 0 ), and with real proportionality constants. As a result, when p,ĉ,b all take real values, there are allowed perturbations of p with p(r 0 ) = 0. But if we were to Wick rotate the contour of integration for p so that p(r 0 ) is imaginary while keeping the TT modes real, the (real) boundary conditions (3.12) would require p(r 0 ) and the corresponding boundary values of the TT modes to vanish separately. 7 This would amount to imposing at least one extra boundary condition which, in particular, has no analogue in any real-time version of the system. Such a condition would be highly suspect, and strongly motivates us to explore other proposals for defining the contour of integration such as that proposed in section 2.
One can make the issue more concrete by choosing a gauge. Let us consider in particular the de Donder gauge condition This gives a first order differential equation that involvesb,b ,ĉ andp which can be readily solved forĉ:ĉ (3.14) The boundary conditions then becomê For p,b real, these define two boundary conditions as desired. But for p imaginary andb real, (3.15) can be satisfied only if the real and imaginary parts vanish separately, effectively imposing four boundary conditions, which is two more than one would find in any Lorentzsignature analogue of the problem. 6 This is the key difference between finite r0 and removing the cavity by taking r0 = ∞. As is well known, with asymptotically AdS boundary conditions the conformal rescaling of the boundary metric induced by any pure-trace mode can be compensated by a diffeomorphism. 7 Whileb andĉ can both be affected by pure-gauge modes, as described above there must be a gaugeinvariant combination. This combination is necessarily real due to the underlying reality of the physical system.

A small interlude on numerical methods
A standard approach to minimizing the action eq. (3.7) is to use an operator approach.
In such an approach, one does not work directly with the action, but instead studies the auxiliary problem with h chosen to satisfy the de Donder gauge. One then discretizes∆ L on a numerical grid and studies the resulting eigenvalues. As advertised in section 2.2, we will proceed differently here by discretizing the action (3.7) directly and then using the result to define a discretized Lichnerowicz operator. Again, this allows us to easily incorporate complicated boundary conditions. We will find this to be particularly useful when we study the microcanonical ensemble [35]. We have checked that our action-based approach reproduces known results from the operator approach (including all that were reported in [14]).
Numerically, it is useful to work with a compact coordinate y ∈ [0, 1] defined as so that the horizon is located at y = 0 and the cavity walls at y = 1. It is in these coordinates that we introduce a grid with N + 1 discrete points. In this work, we will use spectral collocation methods on Gauss-Lobatto collocation points defined in terms of the coordinate y. 8 For the case at hand these are simply defined as Let g(y) be a function, whose derivative we want to compute on the grid {y i }. Let Dg be our approximation to the derivative of g on the grid points {y i }. It turns out that Dg can be computed via matrix multiplication Dg = D · g, with g i ≡ g(y i ). Explicit expressions for the components of D can be found for instance in [37]. Integration also is implemented by a similar linear operator, which can be taken to be given by the formulae in [38].
Using this approach, one can write a discretization of the action in the form for some M I J , where the factor of 3 in 3(N + 1) is a result of the fact that we take and c being respectively discretized versions of a, b and c. As in section 2.2, the tilde on Q indicates that we have not yet imposed boundary conditions. At the cavity walls we demand a(1) = c(1) = 0, since we want the period of the time circle to remain unchanged, as well as the size of the S d−2 sphere. At the horizon, we demand regularity, which in y coordinates amounts to

JHEP08(2022)215
It might appear that we are missing a boundary condition for b at the cavity wall y = 1. However, this may be resolved by imposing the de Donder gauge condition at this one point. Doing so turns out to yield a Robin boundary condition We now discretize these boundary conditions using the scheme described above. For instance, the Neumann boundary condition for a will appear as D N +1 · a = 0. We then use the boundary conditions to reduce eq. (3.19) to a function of the degrees of freedom that remain unconstrained after imposing the boundary conditions. In particular, we set and c N +1 , respectively. At the cavity, we solve with respect to a 1 , b 1 and c 1 . Once these conditions are imposed, the sum in (3.19) may be rewritten so that it sums only over the remaining unconstrained components Q: Because the boundary conditions are homogeneous linear relations, the actionŠ remains a homogeneous quadratic function of the Q I . As described in section 2, we must now choose a metric G IJ in order to use (2.4) define the linear operator L I J . As advertised in the introduction, in the continuum we choose the DeWitt −1 metric for which where the factor of (32πG) −1 in front is chosen to agree with the conventions of [14]. We now discretize (3.22) by following the same procedure used to discretize the action. The result is of the form where by construction both S ,IJ and G IJ are symmetric in I, J. Finally, we wish to solve for eigenvectors of the L I J defined by (2.4). However, we comment that this is equivalent to the so-called generalized eigenvalue problem whereL I J = K δ IK S ,IJ andĜ I J = K δ IK G IJ in terms of the Kronecker delta δ IK and the metric G IJ . Note in particular, since the operatorsL,Ĝ are both self-adjoint with respect to the positive definite metric δ IJ . The point of writing (3.24) is that this formulation of our problem is found in many standard libraries of numerical methods.

Results
Our findings are summarised in figure 1, where we plot the dimensionless lowest lying λ ≡ λ r 2 + as a function of y 0 ≡ r 0 /r + and y + ≡ r + / for d = 4 (left panel) and d = 5 (right panel). In all cases, the mode with smallest Re λ has real λ. We also plot the plane λ = 0 in red, so that it is apparent when the mode becomes positive. The solid black curve in each of the plots is given by eq. (B.11) and it precisely matches the locus where λ changes sign. In the limit where y 0 becomes large we recover the results of [12,13,30,[39][40][41]. To our knowledge this work is the first to report the lowest lying mode in AdS at finite y 0 .
We now come to the issue of the norm of the mode underĜ. Any metric perturbation can be decomposed as a sum of a traceless component h ab and a pure trace part φ: The metricĜ is such that h ab andĝ ab h are orthogonal to each other. That is to say h abĜ ab cdĝ This, in turn, implies that the norm defined in (2.9) may be written in the form where we have defined and It thus follows that positivity of h 2 is equivalent to positivity of (3.28) In figure 2 we plot η as a function of y 0 and y + for d = 4 (left panel) and d = 5 (right panel). We see that the norm is positive definite everywhere, so that, according to our rule, we should not Wick rotate. η also reveals another expected result, namely, the fact that the trace mode decouples from the traceless-transverse part of the metric. This is seen in figure 2, where we see η approaching unity when the cavity is removed, i.e. y 0 → +∞.
Having established that the Schwarzschild AdS black hole is unstable whenever the lowest lying mode is negative, we turn to the issue of the details of the spectrum.
For simplicity, we start by studying the case with y + = 0, i.e. the case with a vanishing cosmological constant, and we restrict to excited modes (i.e., we leave aside the lowest-lying mode that we have already studied). In figure 3 we plot the eigenvalues corresponding to the first twenty excited modes as a function of y 0 . The colour coding is as follows: green triangles are non-gauge modes with complex eigenvalues; blue diamonds are non-gauge modes with negative norm underĜ; red squares are non-gauge modes with positive norm underĜ and the black disks are pure gauge modes. Modes are classified as gauge vs. nongauge by comparing the modified actionŠ (2) to the original action S (2) , with vanishing of the latter (to numerical precision) indicating a gauge-mode while for non-gauge modes the values agree. As a consistency check, we also verify that the non-gauge modes are precisely those that satisfy the De Donder gauge condition as expected.
In the left column of figure 3 we plot the real part of the eigenvalues, and on the right column we plot the absolute value of the imaginary part of the complex eigenvalues using a logarithmic scale. The top row has d = 4, while the bottom row has d = 5.   The first and most important thing we note is that all excited modes have Re λ > 0, thus establishing stability with respect to all excited modes for all y 0 , y + . Again, we remind the reader that this sets aside the lowest-lying mode studied earlier.

JHEP08(2022)215
The second observation is simply that complex modes exist, in the sense that some eigenvalues have non-zero imaginary parts. In fact, because they must come in complex conjugate pairs, the spectrum exhibits bubbles at the edges of which non-gauge modes with positive and negative norms merge together to form a complex mode (which, as described in section 2, always have zero norm). Each green triangle (which denotes data associated with a complex eigenvalue) has a two-fold degeneracy because complex mode appear in conjugate pairs.
We now further address the issue of completeness of the spectrum. We first note that in generic regions of parameter space our numerics yield exactly 3N −4 distinct eigenvalues (here we are counting λ and λ * as distinct eigenvalues when λ is complex). This is precisely JHEP08(2022)215 the dimension of the space of all independent unconstrained perturbations Q. As explained in section 2.1, this is sufficient to show that we can construct 3N −4 orthogonal eigenvectors, thus showing that L is digonalizable and that the eigenvectors of L span the full space of perturbations in generic regions of parameter space.
However, one might wonder what happens at the special values of y 0 , y + where the eigenvalues become degenerate, i.e. where a bubbles first forms or where it disappears. For simplicity, we will restrict detailed discussion to the case with vanishing cosmological constant, but we find similar results when Λ = 0. Since the pure gauge modes never become complex, they are absent from this discussion. Let us denote by region I, the range of y 0 where modes are all real. In this region we have negative-norm modes and positive-norm modes. Let denote by region II the range of y 0 where complex modes exist. The question is then what happens to these modes as we cross from region I into region II and vice-versa. We find that, with our normalisation for the complex modes, the limit of the negative-norm eiegenmode from region I agrees to numerical precision with the limit of the imaginary part of the eigenmode from region II, while the limit of the positive-norm eigenmode in region I agrees with the limit of the real part of the complex eigenmode from region II. Furthermore, the limits of the positive-and negative-norm eigenmodes from region I are linearly independent. This means that, as previously advertised, the eigenmodes continue to span the space of all modes even when the eigenvalues become degenerate at the edges of the bubbles. Furthermore, the continuity between these modes in passing from region I to region II ensures that our Wick rotation is well defined throughout the entire parameter space, including the critical points when the spectrum becomes degenerate.
As a typical example, let us investigate the region of moduli space near y 0 ≈ y b = 6.0285 with y + = 0. This corresponds to the region in the top row, right column, of figure 3 where the first bubble on the left forms. We use f ± to denote the positive-norm and negative-norm eigenfunctions, respectively, associated with the perturbed metric function a for y 0 y b . Additionally, let us define f R (f I ) to be the real (imaginary) part of the complex eigenfunction associated with the perturbed metric function a for y 0 y b . In figure 4 we plot on the left panel f + (blue disks) and f R (orange squares), while on the right panel we plot f − (red diamonds) and f I (purple triangles). We see that as claimed in the preceding paragraph.
Let us now return to describing general features of the spectrum, this time with a non-zero cosmological constant. Perhaps surprisingly, we find that complex eigenvalues exist for all values of y + , and in particular even if the black hole is very large compared to the AdS scale. However, as we describe below, at large y + a given excitation becomes complex only in a very narrow window of y 0 .
It is computationally challenging to monitor what happens to all the bubbles we found with y + = 0 as we increase y + , so we instead focus on the bubble in d = 4 and d = 5 that starts at the smallest value of y 0 and follow its dependence on y + . This is the bubble The red diamonds represent f − , defined as the limit of the negative-norm eigenfunction from region I, and the purple triangles represent f I , defined as the limit of the imaginary part of the complex eigenfunction (using our normalisation) from region II. Region I is defined as y 0 y b = 6.0285, while region II is defined as y 0 y b . associated with the first pair of positive/negative norm excitations. In figure 5 we plot the imaginary part (left column) and real part (right column) of the eigenvalues for the first excited mode in the region where λ is complex. The top row has d = 4, while the bottom row has d = 5. The green horizontal plane on the left column lies at λ = 0 and is included for illustration purposes only. The mode with Im λ > 0 is represented in red, while for Im λ < 0 we represent the mode in blue. From this figure it is clear that the width (measured in terms of y 0 ) of the bubble becomes shrinks as we increase y + .
From the behaviour as we increase y + , it might appear that the bubble will disappear altogether at some threshold value of y + . However, we find that this is not the case.
Instead, it appears that for any finite value of y + we can find a small bubbles where the given modes becomes complex, though the width of the bubbles becomes incredibly small. In figure 6 we plot the real part of λ (left panel) for d = 4, as a function of y 0 ∈ (1. 1,20) and y + = 2 using the same colour coding as in figure 3. Examining the left panel it appears that complex modes do not exist. However, if we zoom in on the region where positive and negative modes appear to cross we see that complex bubbles do exist (right panel) in an incredibly narrow region of y 0 . We have confirmed this picture for values of y + as large as 100.
It would be interesting to explore these structures further in the future. One may expect that more complicated black holes, and in particular those associated with additional free parameters, lead to even more intricate structures. The green horizontal plane on the left column sits at λ = 0 and is just there for illustration purposes. The mode with Im λ > 0 is represented in red, while for Im λ < 0 we represent the mode in blue.

Discussion & conclusions
The main point of our work above was to generalize the proposal of Gibbons, Hawking, and Perry for the contour of integration in the path integral describing fluctuations about a saddle in Euclidean quantum gravity. This was motivated by consideration of Euclidean gravity in a reflecting cavity, where boundary conditions couple the pure-trace and transverse-traceless (TT) modes, preventing us from Wick-rotating one the former without also Wick-rotating the latter. However, by making use of the DeWitt −1 metric, the quadratic action can still be said to define a linear operator L. When this operator can be diagonalized, its eigenmodes can be used to specify an integration contour that reduces to the Gibbons-Hawking-Perry proposal in their context. The result is an eigenmode is stable precisely when its eigenvalue λ satisfies Re λ > 0. We show numerically that L can In the right panel we plot the imaginary part of λ in a magnified description of the region where the first excited non-gauge mode with negative norm crosses the first excited non-gauge mode with positive norm. The colour coding is as follows: green triangles are non-gauge modes with complex eigenvalues; blue diamonds are non-gauge modes with negative norm underĜ; red squares are nongauge modes with positive norm underĜ and the black disks are pure gauge modes.
be diagonalized for cavity fluctuations about Euclidean Schwarzschild-AdS black holes, and that our recipe reproduces the stability/instability of large/small black holes expected from the black hole thermodynamics studied in appendix B. While the proposal thus satisfies an important physical consistency requirement, it remains somewhat ad hoc. For that reason we describe the proposal as a 'rule of thumb'.
Because our L is just the Lichnerowicz operator (or a discretization thereof), the stability condition Re λ ≥ 0 is precisely the same as that proposed in [14] based on Ricci flow (or a generalization thereof to include a cosmological constant). Indeed, while [14] did not discuss the possibility of complex eigenvalues, when they exist the condition for stability of their flow is again Re λ ≥ 0.
There are many future directions to explore. In particular, the conjectured generality of our rule of thumb opens up a wide arena of related contexts for the community to investigate. In addition to adding charge, and perhaps rotation, one is also free to consider all manner of cavities (e.g., Schwarzschild black holes in rectangular or ellipsoidal boxes), or perhaps infinite-volume AdS systems with complicated boundary conditions. It would be interesting to check that L remains diagonalizable in all cases, and that our rule of thumb continues to reproduce expectations from black hole thermodynamics. 9 It also remains to check our assumption that angular momentum does indeed increase Re λ and thus that the vector-and tensor-derived modes are indeed stable, to investigate whether such higher angular momentum modes become complex, and to similarly study modes JHEP08(2022)215 that break time-translation symmetry. Finally, one would also like to have a more general abstract argument for such agreement along the lines of section 4.3 of [13], but somehow showing that the negative mode discussed there is not affected by the Wick rotation defined by our rule of thumb.
Perhaps more interesting is the question of whether choosing a different value of the DeWitt parameter λ DW = −1 continues to give physically viable results. A priori it would appear that our procedure is well-defined for any λ DW , but since λ DW affects the definition of L it is natural to expect that the stability/instability of large/small black holes will be reproduced for at most one value of λ DW . However, this remains to be checked, and it is worth noting that in the absence of a cavity wall the decoupling of trace and TT perturabtions means that our rule of thumb would yield identical results for all λ DW .
Finally, while the results of our Euclidean analysis seem quite satisfactory, it remains to find a first-principles derivation of our rule of thumb. We expect the Lorentz-signature path integral to provide a useful starting point for such an analysis since, as an oscillatory integral, it should be well-defined in a distributional sense without any Wick rotation. Allowed deformations of the contour of integration for this path integral might then be used to define the correct Euclidean prescription. We hope to at least partially address this issue in future work.

A Properties of the de Donder gauge
The gauge transformations of linearized gravity may be written in the form for any one-form ξ a . As usual we define gauge transformations to be such that the tangential projection of ξ a into the cavity wall vanishes. In our case, we also fix the cavity wall to be at the coordinate location r = r 0 . The remaining gauge transformations then have ξ r (r 0 ) = 0, so that ξ a vanishes entirely at the cavity wall. As a result, we refer to perturbations of the form h gauge ab = ∇ a ξ b + ∇ b ξ a as pure gauge modes whenever ξ a | r=r 0 = 0.
As in the main text, we restrict attention to transformations that preserve explicit spherical symmetry and time-translation symmetry, so that ξ a has only r and τ components and both are independent of τ . We denote the space of such pure gauge modes by V .
It will be useful to understand the space V ⊥ of perturbations that are orthogonal to V in the DeWitt −1 inner product. Using (1.1b) and (1.1c), the statement h ab ∈ V ⊥ takes JHEP08(2022)215 In order to study global thermodynamic stability, we now investigate the on-shell Euclidean action of the Euclidean Schwarzschild-AdS solution. This quantity, in turn, is proportional to the Helmoltz free energy, where we have used the fact that It follows that when r + ≥ the Euclidean Schwarszschild-AdS solution has lower Euclidean action than thermal AdS and is thus the preferred phase [45]. This corresponds to and marks the onset of the so-called Hawking-Page transition. Note in particular that β > β HP , so that when the Hawking page transition takes place, the black hole is large and has positive specific heat. It is also not a coincidence that β matches the maximum value of β * (at which the large and small Euclidean Schwarzschild-AdS black holes coincide). In the flat space limit, when → +∞, the Euclidean Schwarzschild black hole always has negative specific heat and the Hawking-Page transition never occurs.

B.2 Inside a spherical box
We now analyze the same issues for Schwarzschild-AdS black holes inside a spherical reflecting cavity on which the induced metric is held fixed. We take the area-radius of the cavity to be r = r 0 . As in flat space [46][47][48][49][50], the cavity has an effect on the thermodynamics of the system. In particular, eq. (3.4) expressing the relation between β * and r + is now affected by the red-shift of the cavity walls β * = 4π f (r 0 ) |f (r + )| . (B.8) For each value of β * , there are again two distinct black solutions, corresponding to small and large black holes. We will refrain from present explicit expressions in terms of r, as For numerical purposes it is more useful for introduce a compact coordinate y, so that y = 0 is the Euclidean horizon and y = 1 is the location of the cavity. In particular, we define [14] r = r + 1 − 1 − r + r 0 y , so that y = r 0 r r − r + r 0 − r + , (B.9) with y ∈ (0, 1). It is also useful to introduce dimensionless quantities y 0 ≡ r 0 r + and y + ≡ r + , (B.10) so that we recover the vanishing cosmological constant case for y + → 0.
We can now use these dimensionless quantities to investigate the boundary between large and small black holes. This is also the boundary that we expect to divide regions Note that when y 0 → +∞ we recover eq. (B.3). Furthermore, inside a cavity, even when → +∞ (and thus y + → 0), there are distinct large and small black hole branches which merge when (B.12) The above result has been also derived in [51], where a detailed analysis of the negative mode of a Schwarzschild black hole inside a cavity has been performed across a number of spacetime dimensions. For d = 4, we recover the well known result y 0 = 3/2 [48]. We shall see that our numerical results in the canonical ensemble are in perfect agreement with the fact that the solutions are thermodynamically stable iff y + < y + . This is certainly not a surprise given the by now very well established relation between the existence of negative modes with grand canonical ensemble boundary conditions and local thermodynamic stability [13,52,53].
Open Access. This article is distributed under the terms of the Creative Commons Attribution License (CC-BY 4.0), which permits any use, distribution and reproduction in any medium, provided the original author(s) and source are credited. SCOAP 3 supports the goals of the International Year of Basic Sciences for Sustainable Development.