The Holographic Shape of Entanglement and Einstein's Equations

We study shape-deformations of the entanglement entropy and the modular Hamiltonian for an arbitrary subregion and state (with a smooth dual geometry) in a holographic conformal field theory. More precisely, we study a double-deformation comprising of a shape deformation together with a state deformation, where the latter corresponds to a small change in the bulk geometry. Using a purely gravitational identity from the Hollands-Iyer-Wald formalism together with the assumption of equality between bulk and boundary modular flows for the original, undeformed state and subregion, we rewrite a purely CFT expression for this double deformation of the entropy in terms of bulk gravitational variables and show that it precisely agrees with the Ryu-Takayanagi formula including quantum corrections. As a corollary, this gives a novel, CFT derivation of the JLMS formula for arbitrary subregions in the vacuum, without using the replica trick. Finally, we use our results to give an argument that if a general, asymptotically AdS spacetime satisfies the Ryu-Takayanagi formula for arbitrary subregions, then it must necessarily satisfy the non-linear Einstein equation.


Introduction
A lot of progress has been made in recent years in understanding the gravity dual of entanglement entropy in holographic conformal field theories [1][2][3][4][5][6][7]. So far, much of this work has focussed on using the replica trick (except for [3], which leverages the symmetries of ballshaped regions in the vacuum), which in quantum field theories requires putting the theory on a different background with a conical deficit at the entangling surface, together with other subtle operations such as analytic continuation in the replica index. It is desirable to gain further understanding of holographic entanglement entropy using more direct techniques, given that it should be computable directly within the original Hilbert space. There are several motivations for this -firstly, it could potentially provide a clearer understanding of the meaning of subregions in quantum gravity (in AdS) and could provide further insight into the microscopic origin of the Bekenstein-Hawking entropy, perhaps in terms of counting of edge modes [8,9]. Another motivation would be to give a more direct derivation of the Ryu-Takayanagi (RT) formula, without using the replica trick. Finally, there has been much work in recent years suggesting a deep connection between the emergence of spacetime geometry and entanglement in the AdS/CFT correspondence [10][11][12][13]. For instance, it was shown in these papers that any asymptotically AdS spacetime which computes the entanglement entropies for ball-shaped regions in the CFT using the Ryu-Takayanagi formula for up to first order state deformations around the vacuum, necessarily satisfies the linearized Einstein equation around AdS. It is likely that understanding this connection further will involve essentially new techniques.
One approach along these lines is entanglement (or modular) perturbation theory, where one studies the entanglement entropy (or correlation functions of the modular Hamiltonian) perturbatively around a background state, for small deformations in the state or shape of the subregion. This approach was first explored in [14], and later improved upon in [15]. Since then, there have been many advances, especially when the perturbations are shape deformations [16][17][18][19][20][21][22][23][24][25][26][27][28]. In addition to being computationally useful, entanglement perturbation theory has found several interesting applications. For instance, [22] derived the averaged null energy condition (ANEC) in Minkowski spacetime from the monotonicity of relative entropy together with entanglement perturbation theory for shape deformations (see also [29] for another proof of the ANEC using OPE techniques). Entanglement perturbation theory was also used [30,31] to derive the gravitational equations of motion from entanglement to second order around AdS. Importantly, much of this work so far has focussed on special symmetric situations, such as for instance, deformations around ball-shaped regions in the CFT vacuum, which in the holographic context only probes small deformations around AdS spacetime. Further progress necessitates moving away from such special cases.
In this paper, we will take the first steps in this direction by studying the shape deformations of entanglement entropy for a general region R and a general state ψ (with a smooth AAdS dual geometry g) in a holographic conformal field theory with Einstein gravity dual (although our techniques can also be applied to higher-curvature theories). More precisely, we will be interested in a double-deformation δδ V S of the entanglement entropy, where δ V denotes a shape deformation of the subregion, while δ denotes a state deformation around the reference state. From the CFT point of view, we have the following boundary expression for this double deformation of the entropy: where ∂R B is a small (Euclidean) tube of radius B which surrounds the entangling surface, and V is the vector field parametrizing the shape deformation. This formula essentially follows from the setup in [22] and will be explained in more detail in section 2, but at this point we would like to highlight a few of its salient properties. Firstly, it contains the evolution operator ρ is/2π R involving the density matrix of ψ reduced over R, which generates what is commonly called modular flow ; this is crucial for the right hand side to have a non-trivial limit as B → 0. Secondly, it depends on the integral of the stress tensor on a co-dimension one surface ∂R B (which naively becomes co-dimension 2 as B → 0), which greatly facilitates rewriting it in terms of bulk gravitational variables. Finally, equation (1.1) provides a purely field-theoretic constraint on a particular deformation of the entropy (on the left hand side) in terms of the stress tensor expectation value (on the right hand side), which we will see has an interesting manifestation in the bulk.
Indeed, for holographic theories dual to Einstein gravity, we expect this double-deformation of the entanglement entropy to be computed by the change in the area of the bulk extremal surface: One of the goals of this paper is to derive (1.2) from (1.1). In fact, we will also derive the quantum corrections to the above formula coming from the bulk entanglement entropy [32], but these have been omitted here for simplicity. Our derivation below will use two main ingredients: (i) a purely gravitational identity from the Hollands-Iyer-Wald formalism [33,34] (which can be thought of as the gravitational equivalent of Gauss' law), which, upon using the extrapolate dictionary, allows us to rewrite the right hand side of equation (1.1) in terms of bulk geometric quantities, and (ii) we will assume that for the original (i.e., undeformed) reference state ψ and subregion R, boundary modular flow is equivalent to bulk modular flow. 1 These two ingredients, along with the bulk equations of motion (linearized around the background geometry) will directly lead to a derivation of equation (1.2). Since R and δψ were arbitrary, this equation can then be bootstrapped to large shape-deformations. For instance, as a corollary to equation (1.2), we can give a novel, perturbative, CFT derivation of the JLMS formula [35] for an arbitrary subregion (with the topology of a ball) in the vacuum state, without using the replica trick.
In fact, we can also go in the opposite direction -assuming that the bulk geometry satisfies equation (1.2), we will be able to give an argument that it must also satisfy the linearized Einstein equation around the background g. Since g can be taken to be an arbitrary AAdS solution to the Einstein equation, this then implies that any asymptotically AdS spacetime which satisfies the Ryu-Takayanagi formula for arbitrary subregions, necessarily satisfies the non-linear Einstein equation! Indeed, as we will see in more detail later, our derivation will involve an interesting interplay between the equations of motion, extremality and modular flow.

Summary of results
For clarity, we will presently state our results and the assumptions we will use to derive them. We will work with a general subregion and state (with a smooth bulk dual) in a holographic conformal field theory. We will throughout assume: (i) the extrapolate dictionary near the asymptotic boundary, and (ii) the equality between the background (i.e., corresponding to the undeformed state and subregion) bulk and boundary modular flows. With these assumptions, we can re-write the purely CFT expression (1.1) in terms of bulk gravitational variables, as discussed in section 3. This general bulk expression then has the following properties: • If we assume the linearized bulk equations of motion around g, then we obtain a derivation of the RT (JLMS) formula (for small state variations), upon requiring the perturbed surface to be extremal. For the special case of the vacuum, since the equality between bulk and boundary modular flows for ball-shaped regions was derived in [3], this is a first-principles derivation of the perturbative RT formula for an arbitrary region (with the topology of a ball) in the vacuum. For more general states, our resuts imply the perturbative RT formula for an arbitrary region assuming the equality between modular flows for a reference region 2 .
• If we assume that the equality between bulk and boundary flows continues to hold even for the shape-deformed subregion (together with the bulk equations of motion), then we obtain a derivation of the extremality condition.
• On the other hand, if we do not assume the equations of motion and instead assume the RT formula (or equivalently JLMS), then the bulk expression for (1.1) is only compatible with JLMS if the linearized equations of motion around g are satisfied along the RT surface. This gives a derivation of the linearized equations of motion around an arbitrary AAdS background.
The rest of the paper is organized as follows. In section 2 we will introduce the necessary background material and set up notation. In section 3, we will present our results about the gravitational dual of (1.1). We will then use it to prove equation (1.2), and also explain the various implications for JLMS, extremality, bulk equations of motion etc. We finish with some closing comments in section 4. In order to avoid cluttering the main body of the paper, we defer most of the detailed calculations to the various appendices.

Preliminaries
In this section, we will review some of the prerequisite background material and set up notation which will be used through the rest of the paper.

Perturbative approach to entanglement
Let us begin by considering a general state ψ in a relativistic quantum field theory, and let R be a general subregion on a Cauchy surface Σ. Assuming that the Hilbert space of the theory on Σ factorizes, the reduced density matrix corresponding to ψ on the subregion R is given by The entanglement entropy is then defined as the von Neumann entropy of this density matrix: It is also convenient to define the modular Hamiltonian as in terms of which the reduced density matrix takes the thermal form ρ ψ,R = e −H ψ,R . In special circumstances, the modular Hamiltonian is local, i.e. its action on local operators is local and geometric. For instance, if R is a half-space in the vacuum of a relativistic quantum field theory, then where ξ µ is the vector field corresponding to boosts around the entanglement cut, and w O is the modular weight of the operator O. Consequently, in this case ρ generates a geometric modular flow. Note however, that this is only true in very special situations, and for the case of general ψ and R which is of interest in the present paper, the modular Hamiltonian is not local. Nevertheless, modular evolution maps the algebra of operators inside R into itself. In order to avoid cluttering notation, we will henceforth drop the subscript ψ on the density matrix and simply write ρ R .
Entanglement perturbation theory is a useful tool for computing the entanglement entropy perturbatively for small deformations around a reference state/subregion [14]. For example, given a small deformation of the reference state δ|ψ (and the corresponding change δρ R in the reduced density matrix), the first order change in the entanglement entropy is given by This is known as the first law of entanglement entropy, and has found many interesting applications [12,36]. Consider now, a second order variation of the entropy δ 1 δ 2 S, where δ 1 and δ 2 denote the two (generically different) variations. From the definitions (2.2) and (2.3), we obtain 3 : The first term on the right hand side is similar to the contribution we found at first order. The latter containing δ 1 H is more subtle and interesting. In fact, this term is equal to the relative entropy between the two density matricesρ R = ρ R + δ 1 ρ R + δ 2 ρ R and ρ R : and as such is symmetric between δ 1 and δ 2 , despite appearances. Relative entropy in quantum field theory is generally expected to be free of the ultraviolet (UV) divergences typically found in the entanglement entropy. Because of this fact, we expect terms of the form δ 1 H R δ 2 ψ to be UV finite, which is an extra motivation to study them. Such terms will be our central focus in the present paper.
In order to proceed, we need to compute δH R in terms of δρ R . Since H R = − ln ρ R , we can use the Baker-Campbell-Hausdorff formula to compute δH R (see [22]): (2.8) The parameter s denotes "modular flow" -when the modular hamiltonian is local, for instance in the case of a half-space in the vacuum, s parametrizes Rindler-time evolution. More generally, this internal evolution is very non-local and hard to compute explicitly, but it is nonetheless a useful construct [37], among other reasons because it is a well defined operation even in the continuum limit. This can be seen by considering the full modular hamiltonian: This operator is well defined: it does not present the ambiguities near ∂R which the entropy has and the modular flow is more generally defined as being generated by the full modular Hamiltonian: With equation (2.8), one can in principle re-write and compute (2.6) in terms of correlation functions in the reference state ψ, provided the modular evolution in (2.8) can be carried out explicitly, as was done, for instance, in [15,21]. However, since we are interested in the general situation where modular flow is not local, we will not have this luxury. In order to make progress in this situation, we will consider the particular case where one of the variations -which we will henceforth call δ V -is a deformation of the shape of the entangling surface. The other variation -which we will simply call δ -will be taken to be a state deformation, which in the holographic context corresponds to a small deformation of the bulk geometry.

Shape deformations
In this section we review several details about the shape dependence of entanglement entropy and modular Hamiltonians, first for a general CFT and then from a gravitational perspective for holographic CFT's with Einstein gravity duals.

CFT perspective
As was discussed, for example in [16,22], we can think of a shape deformation in terms of shifting the background metric by a pure diffeomorphism; we will now briefly review this argument. We can construct the reference state ψ by performing the Euclidean path-integral on the lower half-space in Euclidean signature (x 0 < 0, where x 0 is Euclidean time), with some (not necessarily local 4 ) operator insertion Ψ away from x 0 = 0: where φ collectively denote the elementary fields which are integrated over in the path-integral, and ϕ denote the boundary conditions on the Cauchy surface x 0 = 0 (with x being spatial coordinates on this surface). Note that for states in holographic CFTs dual to smooth bulk geometries, it might be more natural to consider coherent states, where we turn on (not necessarily small) sources for single-trace, primary operators in the Euclidean path-integral.
As long as the sources only have support far from x 0 = 0, our arguments carry over in this case as well. The reduced density matrix ρ R can then be obtained by gluing this path-integral with its image under time-reversal along the complement region R c : where now ϕ ± R are boundary conditions over and under the cut along R, and Z normalizes the density matrix. Let V denote the vector field which parametrizes the deformation of the entangling surface; V is a priori defined on ∂R, but we can pick some smooth extension to a neighborhood of ∂R. Now, by performing a diffeomorphism x µ → x µ − V µ , we can map the deformed entangling surface to the original one. Of course, the diffeomorphism acts non-trivially on the background metric: and so in this way we can trade the shape-deformation of the entangling surface with a metric deformation: where U is a unitary map from the Hilbert space of the subregion R + δ V R to the hilbert space in the subregion R. Consequently, the variation of the modular hamiltonian has two contributions: (i) from the variation of − ln ρ R,η+δ V g coming from the change in the metric δ V g, and (ii) from the unitary transformation U (which also depends on V ).
For contributions of type (i), the variation of the density matrix δ g ρ R with respect to the Euclidean metric deformation (2.13) can be read off from equation (2.12): where we have defined The upshot of this discussion is that inside the path-integral, we can make the following replacement for ρ −1 R δ g ρ R : where note that T µν is inserted in Euclidean time, and hence should be interpreted as a non-local, Heisenberg operator in terms of the operator-algebra on R. Now we can integrate by parts in x. In [22], it was shown that this gives two contributions: one from a (d − 1) dimensional tube ∂R B of radius B which surrounds the entangling surface, and another contribution from the cut along the region R on the x 0 = 0 slice (see figure 1). In fact, this latter contribution coming from the cut exactly cancels the contribution of type (ii) above, coming from the unitary transformations U . Therefore, the final change in the modular hamiltonian is given by: where y denotes the coordinates along the entangling surface, ∂R, and θ is the angular coordinate around the tube (see figure 1 for an illustration). Note that ∂R B has a cut along θ = 0 (i.e. ε ≤ θ ≤ 2π−ε) and B should be regarded as much smaller than any of the curvature scales in the CFT, because, we are interested in the limit B → 0. Note that equation (2.18) is true for general subregions and does not require a U (1) rotation symmetry around the entanglement cut (although reference [22], where it was derived, focused on situations where such a symmetry is present 5 ).
Additionally, there is an extra contact term at the entangling surface that should be added to the δ V H R operator, which is discussed in Appendix A of [22]. This term is important and it is the only contribution to the change in the entropy due to a shape deformation [16]. However, since our double-deformation is unambiguous, it should not depend on this contact term; in other words, we expect this contact term to be state-independent. 6 Further, this contact term should cancel out in the case of the full modular Hamiltonian δ V H f ∂R , while the right hand side of (2.18) will survive even in the full modular Hamiltonian.
Coming back to (2.18), naively it might seem that this term vanishes in the B → 0 limit, but in fact the s-integral gives an enhancement from the integration regions s ∼ ± ln B, thus leading to a finite result [22]. 7 To see this in more detail, let us consider a general integral of 5 We are using a definition for δV HR where this operators live in the hilbert space of the subregion R + δV R, which is more convenient for our purposes. In particular, δV H ψ = 0 and this term is responsible for the change in the entropy, via the contact term described in the next paragraph. This definition of δV HR is directly connected with the area operator, since it is a state independent operator, but its shape variation is non-zero (it changes the boundary conditions). 6 This contact term is related with the Tµν HR OPE. In holographic theories, we can rewrite this term in terms of bulk gravitational variables (by using techniques to be discussed later), and the only way it can survive is if we encounter bulk UV divergences to counter the suppression in the B → 0 limit. However, since HR is a UV finite operator from the bulk point of view, we expect this not to happen. From the point of view of the change in the area, we can understand this state independence as the fact that there is a boundary term in the asymptotic AdS boundary which is non-zero in the background state but vanishes upon doing a state deformation, see appendix B for more details. 7 For instance in the case of a half-space in the vaccum of a relativistic quantum field theory, equation (2.18) becomes where H ± are respectively the future and past Rindler the form We now wish to perform the θ-integral, which looks like a daunting task in a general reference state ψ. However, note that operator O is approaching the entangling surface in the B → 0 limit, and we can therefore use the following important fact: in an infinitesimal Euclidean neighborhood of the entangling surface (much smaller than the scale associated with the extrinsic curvature of the entangling surface, or other scales associated with ψ), we can treat Euclidean modular evolution as being local, even for a non-trivial state and subregion! See [37,38] for discussion about this 8 . In other words, in the B → 0 limit we can approximately re-write the operator O µ 1 ,··· ,µm (B, θ, y) as: where w the the modular weight of O, which can be defined in terms of holomorphic and anti-holomorphic coordinates x ± = re ±iθ near the entangling surface, as the number of + indices minus the number of − indices on O. By shifting the s contour by s → s + iθ, we can horizons corresponding to the half-space. This fact, together with the monotonicity of relative entropy, was used in [22] to prove the averaged null energy condition in general relativistic quantum field theories on Minkowski spacetime. 8 A heuristic argument for this is that in the B → 0 limit, we can zoom-in to an infinitesimal neighborhood of the entangling surface (much smaller than the scale of extrinsic curvature of the entangling surface, and away from the other sources and operator insertions in the path-integral). In this region, ξ = ∂ θ is a symmetry of the Euclidean path-integral. We thank Tom Faulkner for multiple discussions about applying the methods of [22] to non-local modular hamiltonians.
rewrite equation (2.19) as We can now perform the θ integration, by using where the · · · denotes potential contact terms which have delta function support at s = 0, and will not be relevant presently, as these contributions vanish in the B → 0 limit. Now let us specialize to a two-index tensor O µ 1 µ 2 . To see the potential enhancement, consider, for instance, I −,w=−2 which corresponds to O −− : Using locality of modular flow for Be s K (where K is the length-scale associated with the extrinsic curvature of the entangling surface), the modular flow on O gives a Jacobian factor of e 2s , resulting in an overall Be s inside the integral, which becomes O(1) when s ∼ ln B. Hence, the s-integral gives an enhancement in this limit. Of course, we have no control over modular flow beyond this region of integration, and therefore we cannot do the integral explicitlybut at the very least, the above enhancement is guaranteed to give a finite contribution from the region s ∼ ln B, Be s K . We can similarly argue that I +,w=+2 (corresponding to O ++ ) also gets enhanced. On the other hand, we find that all the other components of O (such as O +− , O ±i , O ij ) do not show enhancement in the accessible region of integration, and we expect that they do not receive enhanced contributions from the non-local region Be s K either. 9 At any rate, for now we will leave equation (2.18) as it is, without performing the θ-integral etc. -the purpose of the above discussion was only to convince the reader that the operator δ V H R is in general non-vanishing in the B → 0 limit. However, the above enhancement arguments will be crucial in section 3, where will apply them to bulk modular flow in the holographic setup.
A couple of further comments are in order. Firstly, note that the authors of [22] included the unitary in the definition of the state while we consider it to be part of the definition of the modular hamiltonian. With this definition δ V ψ = 0, because the state doesn't change under a surface translation and we get that the entropy variation is just: (2.24) Secondly, we emphasize that while the shape deformation of the entangling surface is implemented by a Euclidean deformation of the metric, equation (2.18) ultimately yields a Lorentzian operator -the Euclidean angular dependence, θ, should be interpreted in the Heisenberg picture, and so T (B, θ, y) represents a non-local operator on R, at x 0 = 0.

Bulk perspective
We now turn to shape deformations of the entangling surface for a holographic CFT with an Einstein gravity dual. In the bulk, this quantity is simple to compute -using the Ryu-Takayanagi formula and its covariant generalization, it is given by the second variation of the area of the extremal surface : where as before, δ V represents the shape deformation of the boundary entangling surface, and now δ represents the change in the bulk geometry as a result of the state deformation in the CFT. In computing the right hand side, it is important that we account for the fact that the bulk extremal surface changes under a shape deformation, because we are simultaneously also considering a metric deformation . Let g be the asymptotically AdS bulk metric dual to the state ψ, and let S be the original bulk extremal surface corresponding to the boundary region R. Further, let v I (y i ) be the bulk vector field (a priori defined on S) which parametrizes the deformation of the bulk extremal surface under a shape deformation V of the boundary subregion. The vector field v I satisfies the extremality condition 10 (see Appendix A for further details): on the original extremal surface at S, and approaches V I at the asymptotic boundary and K I ij is the extrinsic curvature of S. It is in principle possible to solve the above differential equation on S subject to the asymptotic boundary condition to obtain v I in terms of V I .
Returning to equation (2.25), the change in the area of the extremal surface under the deformation v I is captured by the extrinsic curvature (up to boundary terms which are not important for our discussion): (2.27) 10 We are using Gaussian normal coordinates (x I , y i ) adapted to the original extremal surface S in the bulk.
Here, y i (i = 1, · · · , d − 1) are coordinates along S and x I (I = 1, 2) label directions orthogonal to it. In these coordinates, the original extremal surface S sits at x I = 0. Additional details can be found in Appendix A.
In this way, the second variation δδ V A ext of the area of the bulk extremal surface is given by 11 (see Appendix A for further details): where v I satisfies equation (2.26).
So far we have only considered the classical Ryu-Takayanagi entropy, but in what follows we will also be considering quantum deformations. In this case, the quantum corrections to Ryu-Takayanagi should be included: where r is the bulk subregion enclosed between the boundary subregion R and the extremal surface S, and S(ρ bulk,r ) is the von Neumann entropy of the bulk quantum fields in r. Using arguments similar to those given around (2.24), we therefore arrive at where δψ bulk denotes the change in the quantum state of the bulk fields resulting from the boundary state deformation δψ. Of course, this is equivalent to the JLMS formula [35] relating the boundary modular Hamiltonian to the sum of the bulk modular Hamiltonian and the area operator 12 : This formula is valid to order G 0 N and should be thought as being evaluated in states ψ + δψ which are small deformations around a background state. At this point it might be worth noting what we mean by δψ. In this setting, we have in mind deformations of the state which are semi-classical -these deformations can involve turning on a boundary source directly for the stress tensor 13 or other fields or just inserting some particles, as long as the overall change in the boundary stress tensor is small compared with 1 G N . If we focus on classical gravity, we want δ T bdy ∼ λG −1 N , λ 1, but we might also consider quantum corrections, whose energy 11 More explicitly, we have which is equivalent to equation (2.28) up to unimportant boundary terms. 12 The statement trδHρ = 0 is still true for the JLMS hamiltonian: H R,ψ = A ψÎ + √ γγ ab (γ ab −Îγ ψ ab ). However, note that this operator is state independent, it stays the same under a shift in the background: δH R,ψ = δA ψ − √ γγ ab δγ ψ ab = 0 , so δH ψ ρ = trδρ = 0. 13 For simplicity we want to keep the boundary metric at x 0 = 0 fixed.
is O(1). Given any semi-classical change in the state, we will have a corresponding classical change in the metric δg. In [35], it was also argued from (2.31) that the boundary modular flow in R and the bulk modular flow in r are equivalent, a fact which will play a crucial role in section 3.
The goal of this paper is to prove equations (2.29), (2.30) from equation (2.18), without using the replica trick. The reason why this will be possible is that in (2.18), the stress tensor is integrated on a codimension-1 surface (instead of on the whole spacetime), which leads to a simple holographic dual for this operator. To understand how this works, we need one last ingredient -a gravitational identity from the Hollands-Iyer-Wald formalism.

Hollands-Iyer-Wald formalism
In order to make further progress in understanding the bulk-dual of (2.18), we will need to recall the Hollands-Iyer-Wald (HIW) formalism [33,34] (see also [39]), which can be used to relate "gravitational" quantities in the boundary CFT (i.e., involving the boundary stress tensor) with bulk quantities. Let m 1 ···mn be the (d + 1 − n)-form where we will use boldface notation for differential forms. For our purposes, the most important aspect of the HIW formalism is that the symplectic form ω of the bulk gravitational theory satisfies the following purely gravitational identity : where Σ is an arbitrary codimension-1 Cauchy surface in the bulk, and X is an arbitrary vector field. Further, χ is a (d − 1) form (to be defined below), and we have where E ab (g) is proportional to the non-linear equation of motion (including the cosmological term) for the bulk metric g. Equation (2.33) expresses gravitational quantities on Σ in terms of the gravitational "charge" on ∂Σ and is the analog of Gauss' law for gravity. At no point have we used the equations of motion here. The bulk surface Σ is in principle arbitrary. Finally, note that since this whole equation is linear in δg, we can write it as an operator equation by changing δg → δg.
In this paper, we will set up formalism which works for a holographic CFT with a general gravity dual, but for concreteness we will focus on the case of Einstein gravity in the bulk.
In this case, we can give explicit formulas for the various quantities appearing in equation (2.33). The covariant gravitational symplectic 2-form density ω in Einstein gravity is given by 14 where P is the following tensor built out of the background metric: The (d − 1)-form χ given by where, as before, X is an arbitrary vector field. Finally, we have In the next section, we will see that by picking Σ to be a suitable cylindrical tube which ends on ∂R B at the asymptotic boundary, we can "integrate in" equation (2.18) into the bulk, thereby constructing a bulk-dual for δ V H R .

Integrating in the modular hamiltonian
In this section, we will present our main calculation. As explained previously, we consider a general (not necessarily ball-shaped) subregion R in a general state ψ of a holographic CFT dual to a smooth AAdS bulk geometry g. We will now prove equation (2.30): where as before, δ V denotes the shape deformation and δψ is a state deformation (such that the backreaction in the bulk is small). In proving equation (3.1), we are going to assume: (i) the extrapolate dictionary near the asymptotic boundary, and (ii) that the boundary modular flow of R for the reference state ψ is equivalent to the bulk modular flow in the bulk region r for ψ bulk . We emphasize that (ii) is only an assumption about the background modular flow and in particular is weaker than the RT formula, since we do not need to mention the area: the modular flow is generated by the full modular hamiltonian, in terms of which the assumption reads H f ∂R = H f ∂r,bulk . For the special case of a ball-shaped region in the vacuum, this assumption is the usual matching of bulk and boundary symmetries [3], and for more general states and subregions was shown to follow from RT in [35]. However, our approach here is to take this equality of the background bulk and boundary modular flows as a starting point, and use it to prove equation (3.1). To highlight how weak this assumption is, this is a property that can be checked completely in the realm of bulk perturbation theory: it is a statement about an equivalence in the code subspace, while the area contribution is not something calculable just from the code subspace, see [41] for some discussion about this. In other words, it is a property similar to bulk locality, in the sense which is present as long as there is a holographic dual, independently of the corresponding gravitational theory.

Calculation
Our starting point will be equation (2.18) in the boundary CFT. In order to proceed, we wish to rewrite equation (2.18) in terms of the bulk gravitational variables using equation (2.33): where we have used linearity in δg to write this as an operator equation. For most of the calculation below we can be general and take Σ to be a cylindrical tube surrounding some bulk surface S, and ending on ∂R B . Consistency with the boundary expression requires S to be the codimension 2 surface invariant under modular flow and S satisfies the condition that full boundary modular flow w.r.t. ∂R is equal to full bulk modular flow w.r.t. S (as stated previously); then v will be the deformation of S under the boundary shape deformation V (or more more precisely, some smooth extension of this vector field around S). Looking ahead, S will be the undeformed bulk extremal surface, but at this moment we don't need to impose this condition. We can describe this tube locally in Gaussian normal coordinates adapted to S (see Appendix A); in these coordinates the metric takes the form: where the surface S is located at ρ = 0, τ is the angular coordinate around S, and we have neglected to write the O(ρ) corrections for simplicity, but they are important for all calculations and can be found explicitly written out in Appendix A. In these coordinates, the cylindrical tube Σ will be taken to be the surface ρ = b, with a cut along τ = 0 (i.e., ε ≤ τ ≤ 2π − ε). Let us first focus on the boundary term on the right hand side of equation (3.2). The boundary ∂Σ consists of three components: the piece at the asymptotic boundary will be called Σ 0 , 15 while the two boundaries along S at τ = ε and τ = 2π − ε will be denoted by Σ + and Σ − respectively (see figure 2). A simple calculation shows that from Σ 0 , we get Therefore, using equations (2.18) and (3.5), and picking Σ 0 to coincide with ∂R B , we can re-write δ V H R as: where we have defined E = E − v m T bulk mn n . We have almost managed to rewrite equation (2.18) in terms of bulk gravitational variables, except for the CFT modular flow in the above 15 In Fefferman-Graham coordinates, we can put a cutoff in the radial direction and pick the asymptotic boundary to be at z = z0. Then, we want the asymptotic component of ∂Σ to match with ∂RB, which requires B ∼ z0b. equation. At this point, we assume that in the background, CFT and bulk modular flows are equivalent, i.e., the action of the CFT modular flow in equation (3.6) on bulk operators is equivalent to bulk modular flow. With this replacement, it is immediately clear that the second term on the right hand side is equal to δ V H bulk,r . We therefore rewrite equation (3.6) as (3.7) Now let us focus on the remaining terms individually. Firstly, the last term on the right hand side above is proportional to the equations of motion for the background metric g and the linearized equations for δg (including the bulk stress tensor), and so clearly this term vanishes on-shell. However in the interest of generality, we will keep this term as it is for now. Next, let's consider the term with ω. Since this term is integrated over Σ, naively it might appear to vanish in the b → 0 limit; in fact, the only terms inside ω which survive in the b → 0 limit are terms which get enhanced by modular flow, coming from the region s ∼ ± ln b in the s-integration. Following the discussion in section 2, the enhancement will only be sufficient for terms which have 2 (or more) + or − indices onδg. Therefore, it suffices to only keep track of the terms proportional toδg ++ , ∇ iδ g ++ , ∇ +δ g ++ andδg −− , ∇ iδ g −− , ∇ −δ g −− ; the remaining terms vanish in the b → 0 limit. Note that we have assigned modular weights to covariant tensors, which transform nicely under coordinate transformations. 16 We will present the details of this calculation in Appendix B. The result is: where δ V K ± can be written explicitly in terms of the original metric and v I as in (2.26) and · · · denote terms which do not get enhanced and hence drop out in the b → 0 limit. Crucially, the terms proportional to δg ±± in equation (3.9) (which do survive as b → 0) are proportional to the extremality condition for v ± ! Therefore, imposing the extremality condition on v (and S) eliminates these terms. However, we will not impose extremality at this stage -we will denote these two contributions collectively as δ V S f low . Next, we move onto the χ terms in equation (3.7). A short calculation shows (see Appendix B for details) where recall that δ K I = δK I was defined in equation (2.26). Now once again using the locality of bulk modular flow near S (i.e., using the fact that τ = 2π corresponds to s = 2πi), we can rewrite the two terms (on Σ + and Σ − ) as r where C is the following contour in the complex-s plane (see figure 3): Using analyticity in the strip shown in figure 3 together with the residue theorem, this contour integral picks up the double pole of sinh −2 ( s+i 2 ) as ε → 0, whose residue is equal to the commutator of H bulk with the integrand inside the y-integral: Once again, the locality of the bulk modular flow near the RT surface implies that this commutator is determined by the local boost weight, which is ±1 forδK ± 17 and 0 forδg ij , so we get: where · · · denote terms localized on S which vanish when we take S to be extremal. 17 This can also be seen by expanding this object in covariant derivatives ofδg.
In conclusion, putting everything together, we find that where the · · · correspond to terms that vanish when the equations of motion and the extremality conditions are satisfied and we have promoted this to an operator equation, because the state deformation was arbitrary, albeit with the standard caveat of small back-reaction. It is also useful to write down the corresponding equation for the full modular hamiltonian: We emphasize that so far, the only assumptions we have made are that for the original region R and reference state ψ, the bulk and boundary modular flows are equivalent, together with the extrapolate dictionary.

Results
Now we are ready to consider the various consequences of these formulas.
• Let us begin by assuming that the bulk equations of motion are satisfied (by both g and δg), S is the undeformed extremal surface, and v satisfies the extremality condition equation (2.26). In this case, the · · · in equation (3.15) drop out, and we get which is the JLMS formula for the shape-deformed region. In particular, equation (3.17) implies that if the bulk and boundary modular flows are equivalent for some subregion R (in some reference state ψ), and if the bulk geometry satisfies Einstein's equations, then a small shape deformation of the modular hamiltonian will satisfy JLMS. We want to highlight here the difference between JLMS and the equality of modular flows 18 , because in the equality between modular flows there is no reference to the area term in the modular hamiltonian. In fact, from a quantum field theory perspective such a term localized on S can be pretty subtle. However, in our result, it pops-out naturally in the bulk (from the minimal assumption of equality of background modular flows), and in particular is well-defined. Furthermore, equation (3.17) implies that the equality between bulk and boundary modular flows continues to be true even for the deformed subregion. Importantly, since we assumed no special properties about the original subregion R (for example, R need not be ball-shaped in our arguments), we can now bootstrap this result to generate large shape deformations as well. This leads to an important corollary: if ψ is the vacuum state, then [3] implies the equality of bulk and boundary modular flow for all ball-shaped regions; a ball-shaped region is therefore a natural candidate for the background subregion R. Since we can generate any compact subregion (with the topology of a ball) by deforming such a ball-shaped region, equation (3.17) therefore implies the JLMS formula for such subregions of arbitrary shape in the vacuum.
• Alternatively, we could drop the assumption that v satisfies the extremality condition (2.26), and instead assume that the boundary modular flow is equivalent to bulk modular flow even in the deformed region R + δ V R. This implies that the δ V S f low terms in (3.16) have to vanish -this is because it is clear from the enhancement arguments given in section 2 that δ V S f low would give a non-local operator with support in the bulk of r, so the equality between bulk and boundary modular flows necessarily implies i.e., extremality for the perturbed surface S +δ V S. Since we can repeat these arguments perturbatively in the boundary shape deformations, the equality of modular flows does not allow for the corresponding deformations of the bulk surface S to add extrinsic curvature with non-zero trace. We therefore expect that the extremality condition generally (for arbitrary subregions) follows from the equality between bulk and boundary modular flows! This is certainly true for any subregion with the topology of a ball in the vacuum, but for more general states we will leave it for future study.
• Next, we drop the assumption that the equations of motion are satisfied by the bulk metric deformation δg (while g still satisfies the background equation of motion), but we assume that the JLMS formula is satisfied for arbitrary regions; equivalently we may assume the Ryu-Takayanagi formula (including quantum corrections), which implies JLMS. In this case, we deduce from equation (3.15) that we must have where E (1) mn is the linearized equation of motion, including the bulk stress tensor term. On the other hand, the enhancement from modular flow guarantees that the terms proportional to E where H ± bulk are the bulk future and past horizons.
Given that the subregion R is completely arbitrary, we expect that the only way equation (3.19) can be satisfied is if the null-null components of the linearized equation of motion are satisfied: E (1) although we have not attempted to prove this rigorously. If this can be shown, then this would prove that any AAdS geometry which satisfies the Ryu-Takayanagi formula (with quantum corrections) for first order state/metric deformations around the background geometry g, necessarily satisfies the linearized equations of motion E (1) ±± = 0 around g. Since the background geometry g can be taken to be an arbitrary (not necessarily AdS) asymptotically AdS solution to the Einstein equation, this would then constitute a derivation of the full non-linear Einstein equation from entanglement in holographic conformal field theories! We end with the remark that this argument seems quite closely analogous to the original argument of Jacobson deriving the Einstein equation from the first law of thermodynamics [42].

Discussion
In this paper, we have combined the tecniques of [22] with a purely gravitational identity from the Hollands-Iyer-Wald formalism to study the properties of entanglement entropy for subregions of arbitrary shape in conformal field theories with holographic duals. Starting from the equality between bulk and boundary modular flows in the background, we derived (3.15) and (3.16), which upon the assumption of the equations of motion in the bulk, gave us the extremality condition and JLMS for arbitrary shapes. In the reverse direction, we were able to give an argument that any AAdS spacetime which satisfies the Ryu-Takayanagi formula must necessarily satisfy the non-linear Einstein equation. More precisely, we argued that the equation of motion integrated on an extremal surface should vanish for equation (3.19) to be true, but we have not given a detailed argument for the vanishing of the local equations of motion by "inverting" (3.19) -we leave this to future work. Now, we would like to comment on some possible future directions or applications of this work.

It from modular flow?
In the previous section, we considered three cases where we either assumed the bulk equations of motion and derived JLMS and extremality, or vice versa. More generally, we expect the equality between modular flows in (3.16) to impose δ v S f low + E f low = 0. It is not clear to us if this equation has any other solution other than the two terms being individually zero. If there was a solution, it would be interesting to understand it better. If there is none, then both extremality and the equations of motion would follow form the equality of modular flows! In a related but slightly different direction, if we focus on the leading order in G N contribution around the RT surface (imposing equations of motion but not extremality for the shape deformation), it would seem that : This object is more bulk non-local than just the area operator and it might be possible to determine that δ VŜf low is zero solely from comparing the properties of this object with the boundary modular hamiltonian. For instance, this operator doesn't seem to commute with operators which are space-like separated from the RT surface. However, it seems hard to make this statement more concrete.
At any rate, we seem to have a novel rewriting of the extremality condition in terms of a certain modular flow integral of the symplectic flux in the bulk (somewhat analogous to the discussion in [30]), and it would be interesting to explore its physical interpretation further. Moreover, it is also of interest to give a more detailed derivation of the equations of motion based on the argument given in this paper. Finally, at various points in this paper we used the locality of modular evolution in an infinitesimal Euclidean neighborhood of the entangling surface, for modular times which are large-but-not-too-large; it would be useful to provide rigorous justifications.

Time dependent boundary time slices
We introduced the shape variation through the Euclidean path integral, but we expect that in the boundary we can consider arbitrary Lorentzian Cauchy slices through analytic continuation. In these cases where the Cauchy slice is not a Euclidean section, we expect that this analytic continuation carries straightforwardly to the bulk: given a Lorentzian holographic mapping, we only need to continue the neightbourhood of the fixed point of bulk modular flow slightly into euclidean signature. We leave a more careful analysis of this for the future.

Higher derivatives
Our discussion above was quite general, and except for the explicit computation of ω and χ, we expect that it might in principle be straightforward to generalize to other theories of gravity. This might provide an alternative derivation of the formulas of [5,6] which does not rely on the replica trick (see also [31] for progress along these lines).

Quantum corrections
Our discussion focused on the semiclassical regime, where gravitons can be thought of as free, spin-2 fields. That is, we have been working to order O(G 0 N ) in the entropy. Beyond that, we expect [43,44] that the position of the surface is shifted by a contribution proportional to the change in the bulk entanglement entropy. It would be nice to understand these corrections from our approach. We also expect some correction to the equality between modular flows [44] and our approach could provide useful to understand that better.

Bulk vs boundary contributions in the s integral
We would like to highlight a feature of the calculation which might seem confusing at first 20 . The boundary expression for δ V H naively vanishes as B → 0 but this suppression gets compensated by an enhancement at large modular time s ∼ log B. In the bulk, there is a similar contribution from ω, δ v H bulk , where large modular times give rise to finite terms. However, there is also the contribution from χ which is not suppresed in b, but, in the absence of modular flow, it would be zero because the contribution from Σ ± would cancel. After modular flow, the non-trivial contribution of χ comes from the double pole (which occurs at small s). So, when going from the boundary to the bulk, one finds that there is some mixing on which modular times are contributing to the integral. This was already observed in [30] and it might be related to the fact that the bulk solution might be "more regular" than the boundary, in the spirit of [4]. This seems to be related with the fact that the area operator is state independent, but we leave a more detailed analysis of this to the future.

Modular flow versus replica trick
Our approach had some similarities with the replica trick approach of [4] -there one assumed that the replica symmetry extended into the bulk, and here we assumed that the modular flow extends naturally into the bulk. Our surface S was defined in terms of the fixed point of this symmetry while in [4] the RT surface is defined as the analytic continuation of the fixed point of replica symmetry. However, when doing the replica trick, one considers variations of the metric which look very singular, while our deformations have been rather mild, which makes it less constraining.
Also, note that the our double-deformation of the entropy with respect to the state and shape morally resembles that of [44], where they studied the dual of a different double deformation, i.e., a state variation together with a deformation of the Renyi parameter, which could also be integrated into the bulk. However, the integral in [44] was on a codimension-0 surface instead of codimension-1 because they had to integrate it in through the action. Nevertheless, it might be fruitful to better understand the connections between the two approaches.
where I, J · · · = +, − denote indices perpendicular to S and and i, j · · · = 1, 2, · · · , d−1 denote indices along S. Further, δ IJ = 0 1/2 1/2 0 , and γ ij (y) is the metric in the directions parallel to S. The undeformed extremal surface is located at x I = 0, with the extremality condition imposing γ ij K I;ij = 0. (The calculation can be carried out more generally without imposing this condition, but since we are ultimately interested in extremal background surfaces, we will take take γ ij K I;ij = 0 for simplicity).
Some useful Christoffel symbols evaluated at x ± = 0 are:

B Extremality Condition in Gaussian Normal Coordinates
In this appendix, we derive the extremality condition and change in the area of the extremal surface (to first order in the both the shape and state deformation) in Gaussian normal coordinates for a general subregion in a general AAdS spacetime.
As explained in the main text, the shape deformation of the area and the extremality condition under a shape deformation are equivalent to: where if the background is of the previous form, the extrinsic curvature terms are given by: In particular, when δg mn = 2∇ (m v n) is a diffeomorphism, we can manipulate the covariant derivatives to write it in terms of the extrinsic curvatures, Riemann tensor and covariant derivatives of v in the tangential direction.
In this appendix, we will show this by explicit computation. In [45], a similar expansion of the area was also considered.

Extremality condition
Let us first derive the extremality condition. In the interest of generality, we will begin by picking arbitrary coordinates (x I , y i ) for now, with the only requirement that the original extremal surface is located at x I = 0. Let the new extremal surface be located at x I = v I (y). The induced metric is given by We can expand the induced metric for small v as: Note that we have dropped O(v 3 ) terms above, because we are interested only in shape perturbations to linear order. We can make the following gauge choice here for convenience: This is always possible; for instance, this is one of the conditions satisfied in the Gaussian normal coordinates we will use momentarily. Then the induced metric becomes In order to ensure extremality, we need to vary with respect to v; the change in the induced metric is given by In addition, we also need the relations From here, we obtain Clearly, requiring that v = 0 be an extremal surface requires g ij ∂ K g ij = 0. This simplifies the above expression, and we obtain Now using Gaussian normal coordinates, we get the following extremality condition: (B.12) where ∇ is the intrinsic covariant derivative in the original extremal surface. We can now covariantize the extremality condition by using This is the final form of the extremality condition we will work with.

Area
Next, we wish to compute δ V A ext. , i.e. the change in the area of the extremal surface to linear order in the shape deformation and simultaneously linear order in the bulk metric deformation. The area of the RT surface is If we deform the background geometry slightly, then this changes as Importantly, δh ij has two terms: where the first term is the change in the induced metric on the original surface, while the second term comes from the change in the minimal surface due to change in the bulk geometry. At the order we are working, we can discard the second term, because the original surface is extremal and so the change in the area coming from the second term should vanish. So we find We actually want to compute the first shape-derivative δ V -derivative of this term where we have So we obtain (now using Gaussian normal coordinates) We can drop the first term because Tr K I = 0. Finally, covariantizing the remaining terms, we obtain It is easy to see that this is equivalent to (B.2) up to integrations by parts in the ydirections. When integrating by parts, there is a boundary contribution which vanishes as long as the leading asymptotic of δg ij is fixed at the boundary (and thus the leading contribution comes from turning on the stress tensor). This boundary term doesn't vanish if we had g Ij instead of δg Ij and it is in fact the only contribution to the shape deformation of the entropy δ V A (see for example equation (3.10) of [46]).

C Details of the Symplectic 2-form and Boundary terms
In this appendix, we spell out the details of the ω term and χ term from equation (3.7).

ω-term
Let us first consider the ω term. Recall from section 2, that the gravitational symplectic form density is given by We wish to integrate the symplectic form over the cylindrical tube Σ (or radius b) surrounding the HRRT surface, with δ 2 g = L V g. It is convenient to rewrite this integral as where we have defined the covariant momentum We are interested in the limit b → 0. Let us evaluate the various components of the covariant momentum for small b: Note that in the second line of equation (C.8), we have kept an O(b) term as it is relevant for our calculation (this term is O(b) because g −i = 2a i x − ), and neglected other O(b) as well as higher order terms.
Additionally, since one of the arguments of the symplectic 2-form is L V g, it is also convenient to work out the various components of L V g up to O(b 2 ): (C.10) We are now in a position to extract the terms in the symplectic form which get sufficiently enhanced to survive in the b → 0 limit. These are terms which contain covariant tensors of modular weight ±2 (or higher), for e.g., δg ±± , ∇ i δg ±± and ∇ ± δg ±± etc. For simplicity, let us focus on the -terms. We will use the notation h V = L V g for convenience. We have two types of contributions in the symplectic flux density: (i) terms of the type δg −− Π h V and (ii) terms of the type h V Π δg (where we only keep objects with modular weight -2). The first type of contribution is given by: where we have used 14) The second type of contribution is of the type h V Π δg : Note that we have also kept terms of the form ∇ + δg −− for completeness, and in the last line, the a j term comes from integrating by parts the second line of equation (C.8). Combining all the terms together, we find that the δg −− contribution (or more precisely the weight -2 contribution) to the symplectic form is given by: 16) where note that we have integrated by parts along the y i direction, and it can be checked that the boundary term vanishes by the asymptotic boundary conditions. Finally, rewriting ∂ + ∂ I g ij in Gaussian normal coordinates, we find that the coefficient of δg −− is precisely the extremality condition.
ω-term using the canonical symplectic form Above, we used the covariant version of the symplectic form. There is a second, quicker way to arrive at the above result using the canonical version of the symplectic form, which we now briefly explain. In the canonical formalism, we have: where h, p are the induced metric and momenta in the tube Σ surrounding the extremal surface S. The momentum is defined by: where the b subindex denotes that this is the extrinsic curvature in the codimension 1 surface.
In this case, the rule for enhancement is that we only have to keep the δh ±± , δp ±± terms. Since δ V h ±± = 0, i.e., the surface translation doesn't change the τ, τ component of the metric, we only get a contribution from δ V p ±± . For simplicity, let us work with cylindrical coordinates, we have: and thus its v variation will be given by 21 : where we used that K τ b,ij = K +,ij e iτ + K −,ij e −iτ . In this way since δg τ τ = e 2iτ δg ++ + e −2iτ δg −− + 2δg +− , the only contribution which gets enhanced will be:

χ-term
Now recall that Let us first focus on the contribution coming from the cut Σ ± . Here we get where we have and similarly, Combining equations (C.24) and (C.24), we find that the only terms which survive are given by 24) which is the result used in the main text. Note that the v I K ij I δg ij = ∇ i v j δg ij term comes from the integration by parts of ∇ i δg I− term, since we are integrating by parts in a codimension 2 surface.