Skip to content

Einstein-Hilbert action and the boundary terms

The Einstein–Hilbert action looks deceptively simple,

SEH[g]=116πGMdd+1xgR,S_{\rm EH}[g]=\frac{1}{16\pi G}\int_M d^{d+1}x\,\sqrt{-g}\,R,

but it is not functionally differentiable on a manifold MM with boundary M\partial M under the usual Dirichlet boundary condition “hold the induced metric fixed”. The reason is that RR contains second derivatives of the metric, so δSEH\delta S_{\rm EH} contains boundary terms with normal derivatives of δgμν\delta g_{\mu\nu}. The GHY term is exactly the boundary functional that cancels those “nδg\partial_n\delta g” terms.

On this page we derive that statement carefully and end with the standard result (for non-null boundaries):

Sgrav=SEH+SGHY,SGHY=ε8πGMddxγK,S_{\rm grav}=S_{\rm EH}+S_{\rm GHY},\qquad S_{\rm GHY}=\frac{\varepsilon}{8\pi G}\int_{\partial M} d^d x\,\sqrt{|\gamma|}\,K,

with ε=nμnμ=±1\varepsilon=n_\mu n^\mu=\pm1 the sign of the unit normal’s norm.


1. Boundary geometry: γμν\gamma_{\mu\nu}, nμn^\mu, and KμνK_{\mu\nu}

Section titled “1. Boundary geometry: γμν\gamma_{\mu\nu}γμν​, nμn^\munμ, and KμνK_{\mu\nu}Kμν​”

Assume M\partial M is non-null (time-like or space-like). Let nμn^\mu be the outward-pointing unit normal, normalized as

nμnμ=ε,ε={+1(space-like normal, i.e. time-like boundary),1(time-like normal, i.e. space-like boundary).n_\mu n^\mu=\varepsilon,\qquad \varepsilon= \begin{cases} +1 & \text{(space-like normal, i.e. time-like boundary)},\\ -1 & \text{(time-like normal, i.e. space-like boundary)}. \end{cases}

The induced metric (first fundamental form) is the tangential projector

γμν=gμνεnμnν,γμν=δμνεnμnν.\gamma_{\mu\nu}=g_{\mu\nu}-\varepsilon n_\mu n_\nu,\qquad \gamma^\mu{}_\nu=\delta^\mu{}_\nu-\varepsilon n^\mu n_\nu.

The extrinsic curvature (second fundamental form) is

Kμν=γμργνσρnσ,K=γμνKμν.K_{\mu\nu}=\gamma_\mu{}^{\rho}\gamma_\nu{}^{\sigma}\nabla_\rho n_\sigma,\qquad K=\gamma^{\mu\nu}K_{\mu\nu}.

All boundary indices will be denoted by a,b,a,b,\dots when we use coordinates intrinsic to M\partial M.


2. Varying the Einstein–Hilbert action: where the boundary term comes from

Section titled “2. Varying the Einstein–Hilbert action: where the boundary term comes from”

Start from

δ(gR)=δ(g)R+gδR.\delta(\sqrt{-g}R)=\delta(\sqrt{-g})\,R+\sqrt{-g}\,\delta R.

We will use δg=ggμνδgμν=ggμνδgμν\delta g=gg^{\mu\nu}\delta g_{\mu\nu}=-gg_{\mu\nu}\delta g^{\mu\nu} and δR=Rμνδgμν+gμνδRμν\delta R=R_{\mu\nu}\delta g^{\mu\nu}+g^{\mu\nu}\delta R_{\mu\nu}. Two standard identities are:

  1. Variation of the determinant:
δg=12ggμνδgμν.\delta\sqrt{-g}=-\frac12\sqrt{-g}\,g_{\mu\nu}\,\delta g^{\mu\nu}.
  1. The Palatini identity:
δRμν=ρδΓμνρνδΓμρρ,\delta R_{\mu\nu}=\nabla_\rho\,\delta\Gamma^\rho_{\mu\nu}-\nabla_\nu\,\delta\Gamma^\rho_{\mu\rho},

with

δΓμνρ=12gρσ(μδgνσ+νδgμσσδgμν).\delta\Gamma^\rho_{\mu\nu} =\frac12 g^{\rho\sigma}\left( \nabla_\mu \delta g_{\nu\sigma}+\nabla_\nu \delta g_{\mu\sigma}-\nabla_\sigma \delta g_{\mu\nu} \right).

Using these, one can show that

gμνδRμν=ρ(gμνδΓμνρgρνδΓμνμ)=μvμ,g^{\mu\nu}\delta R_{\mu\nu}=\nabla_\rho(g^{\mu\nu}\delta\Gamma^\rho_{\mu\nu}-g^{\rho\nu}\delta\Gamma^\mu_{\mu\nu})=\nabla_\mu v^\mu,

where

vμνδgμνgρσμδgρσ.v^\mu\equiv \nabla_\nu \delta g^{\mu\nu}-g_{\rho\sigma}\nabla^\mu \delta g^{\rho\sigma}.

Putting everything together gives the key decomposition:

δ(gR)=gGμνδgμν+gμvμ,GμνRμν12gμνR.\delta(\sqrt{-g}R)=\sqrt{-g}\,G_{\mu\nu}\,\delta g^{\mu\nu}+\sqrt{-g}\,\nabla_\mu v^\mu, \qquad G_{\mu\nu}\equiv R_{\mu\nu}-\frac12 g_{\mu\nu}R.

Therefore,

δSEH=116πGMdd+1xgGμνδgμν+116πGMdd+1xgμvμ.\delta S_{\rm EH} =\frac{1}{16\pi G}\int_M d^{d+1}x\,\sqrt{-g}\,G_{\mu\nu}\,\delta g^{\mu\nu} +\frac{1}{16\pi G}\int_M d^{d+1}x\,\sqrt{-g}\,\nabla_\mu v^\mu.

Using Stokes’ theorem,

Mgμvμ=εMddxγnμvμ,\int_M \sqrt{-g}\,\nabla_\mu v^\mu =\varepsilon\int_{\partial M} d^d x\,\sqrt{|\gamma|}\,n_\mu v^\mu,

so the boundary term from Einstein–Hilbert is

δSEHM=ε16πGMddxγnμvμ.\delta S_{\rm EH}\Big|_{\partial M} =\frac{\varepsilon}{16\pi G}\int_{\partial M} d^d x\,\sqrt{|\gamma|}\, n_\mu v^\mu.

3. Why Dirichlet data on γab\gamma_{ab} does not kill the Einstein–Hilbert boundary term

Section titled “3. Why Dirichlet data on γab\gamma_{ab}γab​ does not kill the Einstein–Hilbert boundary term”

The usual “Dirichlet” boundary condition in gravity is:

Fix the induced metric on the boundary, i.e. δγab=0\delta\gamma_{ab}=0 on M\partial M.

However, the boundary term above contains normal derivatives of δgμν\delta g_{\mu\nu}, so δγab=0\delta\gamma_{ab}=0 is not enough.

The cleanest way to see this is to adopt Gaussian normal coordinates near M\partial M:

ds2=εdρ2+γab(ρ,y)dyadyb,M: ρ=0.ds^2=\varepsilon\,d\rho^2+\gamma_{ab}(\rho,y)\,dy^a dy^b, \qquad \partial M:\ \rho=0.

In these coordinates,

nμμ=ρ,Kab=12ργab,K=12γabργab.n^\mu\partial_\mu=\partial_\rho,\qquad K_{ab}=\frac12\,\partial_\rho\gamma_{ab},\qquad K=\frac12\,\gamma^{ab}\partial_\rho\gamma_{ab}.

If we impose δγab(ρ=0,y)=0\delta\gamma_{ab}(\rho=0,y)=0, then ρδγab\partial_\rho\delta\gamma_{ab} is still free. One finds that the Einstein–Hilbert boundary variation contains a term of the schematic form

δSEHMε16πGMddxγγabρ(δγab),\delta S_{\rm EH}\Big|_{\partial M}\supset -\frac{\varepsilon}{16\pi G}\int_{\partial M} d^d x\,\sqrt{|\gamma|}\, \gamma^{ab}\,\partial_\rho(\delta\gamma_{ab}),

which does not vanish when δγab=0\delta\gamma_{ab}=0. This is the precise obstruction: the Einstein–Hilbert action wants you to fix both γab\gamma_{ab} and its normal derivative if you do not modify the action.


4. The GHY boundary term and its variation

Section titled “4. The GHY boundary term and its variation”

To cancel the unwanted normal-derivative piece, add the GHY functional

SGHY=ε8πGMddxγK.S_{\rm GHY}=\frac{\varepsilon}{8\pi G}\int_{\partial M} d^d x\,\sqrt{|\gamma|}\,K.

4.1 Variation of γK\sqrt{|\gamma|}K in Gaussian normal coordinates

Section titled “4.1 Variation of ∣γ∣K\sqrt{|\gamma|}K∣γ∣​K in Gaussian normal coordinates”

In Gaussian normal coordinates,

K=12γabργab.K=\frac12\gamma^{ab}\partial_\rho\gamma_{ab}.

Vary:

δK=12δγabργab+12γabρ(δγab).\delta K=\frac12\,\delta\gamma^{ab}\,\partial_\rho\gamma_{ab} +\frac12\,\gamma^{ab}\,\partial_\rho(\delta\gamma_{ab}).

Also,

δγ=12γγabδγab.\delta\sqrt{|\gamma|}=\frac12\sqrt{|\gamma|}\,\gamma^{ab}\delta\gamma_{ab}.

Therefore

δ(γK)=γ[12γabρ(δγab)(Kab12Kγab)δγab].\delta(\sqrt{|\gamma|}K) =\sqrt{|\gamma|}\biggl[ \frac12\,\gamma^{ab}\partial_\rho(\delta\gamma_{ab}) -\biggl(K^{ab}-\frac12 K\gamma^{ab}\biggr)\delta\gamma_{ab} \biggr].

The key point is the first term: it contains exactly the normal derivative ρ(δγab)\partial_\rho(\delta\gamma_{ab}) that we need to cancel.

Multiplying by the coefficient in SGHYS_{\rm GHY} gives

δSGHY+ε16πGMddxγγabρ(δγab),\delta S_{\rm GHY}\supset +\frac{\varepsilon}{16\pi G}\int_{\partial M} d^d x\,\sqrt{|\gamma|}\, \gamma^{ab}\,\partial_\rho(\delta\gamma_{ab}),

which cancels the problematic piece in δSEH\delta S_{\rm EH}.

After the cancellation, the total boundary variation of SEH+SGHYS_{\rm EH}+S_{\rm GHY} takes the standard form

δ(SEH+SGHY)M=ε16πGMddxγ(KabKγab)δγab(+ possible corner/joint terms).\delta(S_{\rm EH}+S_{\rm GHY})\Big|_{\partial M} =\frac{\varepsilon}{16\pi G}\int_{\partial M} d^d x\,\sqrt{|\gamma|}\, \left(K_{ab}-K\gamma_{ab}\right)\delta\gamma^{ab} \quad(+\ \text{possible corner/joint terms}).

So, with Dirichlet boundary conditions δγab=0\delta\gamma_{ab}=0, we get δS=0\delta S=0 on-shell: the variational principle is now well-posed.


5. Final answer (including a cosmological constant)

Section titled “5. Final answer (including a cosmological constant)”

With a cosmological constant, the full gravitational action (for non-null boundaries) is

Sgrav=116πGMdd+1xg(R2Λ)+ε8πGMddxγK.S_{\rm grav} =\frac{1}{16\pi G}\int_M d^{d+1}x\,\sqrt{-g}\,(R-2\Lambda) +\frac{\varepsilon}{8\pi G}\int_{\partial M} d^d x\,\sqrt{|\gamma|}\,K.

Its variation is

δSgrav=116πGMdd+1xg(Gμν+Λgμν)δgμν+ε16πGMddxγ(KabKγab)δγab(+ corner/joint terms).\delta S_{\rm grav} =\frac{1}{16\pi G}\int_M d^{d+1}x\,\sqrt{-g}\,\left(G_{\mu\nu}+\Lambda g_{\mu\nu}\right)\delta g^{\mu\nu} +\frac{\varepsilon}{16\pi G}\int_{\partial M} d^d x\,\sqrt{|\gamma|}\, \left(K_{ab}-K\gamma_{ab}\right)\delta\gamma^{ab} \quad(+\ \text{corner/joint terms}).

6. Bonus viewpoint: “GHY removes second derivatives” (ADM/Gauss–Codazzi)

Section titled “6. Bonus viewpoint: “GHY removes second derivatives” (ADM/Gauss–Codazzi)”

Another way to “see” why the same boundary term must appear is to note that RR contains second derivatives of the metric. Using a foliation by constant-ρ\rho hypersurfaces, one can rewrite (schematically)

R=(d) ⁣R+ε(KabKabK2)2εμ(),R = {}^{(d)}\!R + \varepsilon\left(K_{ab}K^{ab}-K^2\right) - 2\varepsilon\,\nabla_\mu(\cdots),

where (d) ⁣R{}^{(d)}\!R is the intrinsic Ricci scalar of the hypersurface. Integrating the total divergence produces a boundary integral proportional to KK. Adding SGHYS_{\rm GHY} precisely cancels that divergence term, so the bulk Lagrangian becomes “first-derivative” in time (or radial) derivatives, which is what you want for canonical (Hamiltonian/ADM) formulations.


7. Beyond smooth non-null boundaries: joints (corners) and null boundaries

Section titled “7. Beyond smooth non-null boundaries: joints (corners) and null boundaries”

The discussion above assumed:

  1. M\partial M is smooth, so it has no “boundary of a boundary”, and
  2. M\partial M is non-null, so a unit normal nμn^\mu exists.

In Lorentzian gravity—especially in holography—these assumptions often fail. The good news is that the needed extensions are known and fit naturally with the GHY logic: add whatever boundary functional cancels the leftover boundary-of-boundary terms in δS\delta S and makes the action additive under gluing.


8. Joint (corner) terms for piecewise smooth non-null boundaries (Hayward term)

Section titled “8. Joint (corner) terms for piecewise smooth non-null boundaries (Hayward term)”

Suppose the boundary is a union of smooth segments,

M=iΣi,\partial M=\bigcup_i \Sigma_i,

and two segments Σ1\Sigma_1 and Σ2\Sigma_2 meet along a codimension-2 surface

J=Σ1Σ2.\mathcal{J}=\Sigma_1\cap\Sigma_2.

Let σAB\sigma_{AB} be the induced metric on J\mathcal{J} (often called the “corner metric”), with volume element σ\sqrt{|\sigma|}.

Each segment Σi\Sigma_i has its own (outward) unit normal niμn_i^\mu and its own GHY term

SGHY[Σi]=εi8πGΣiddxγ(i)K(i).S_{\rm GHY}[\Sigma_i]=\frac{\varepsilon_i}{8\pi G}\int_{\Sigma_i} d^d x\,\sqrt{|\gamma^{(i)}|}\,K^{(i)}.

When you vary the total action, the cancellation that produced Section 4 happens separately on each segment, but there is still a leftover contribution localized at J\mathcal{J} because the normal (and therefore the adapted Gaussian coordinate) jumps when moving from Σ1\Sigma_1 to Σ2\Sigma_2.

Concretely, the “ρ(δγ)\partial_\rho(\delta\gamma)” terms in δSEH\delta S_{\rm EH} and δSGHY\delta S_{\rm GHY} cancel on each Σi\Sigma_i, but in integrating by parts on Σi\Sigma_i you produce a boundary term on Σi\partial\Sigma_i. For a smooth boundary, Σi\partial\Sigma_i is empty; for a piecewise boundary, Σi\partial\Sigma_i contains the joints.

8.2 What the leftover variation looks like

Section titled “8.2 What the leftover variation looks like”

Under Dirichlet boundary conditions on each Σi\Sigma_i (fix γab(i)\gamma_{ab}^{(i)}), the remaining joint variation takes the universal form

δSJ=18πGJdd1xσδη,\delta S\Big|_{\mathcal{J}} =\frac{1}{8\pi G}\int_{\mathcal{J}} d^{d-1}x\,\sqrt{|\sigma|}\,\delta\eta,

where η\eta is the “angle” (Euclidean) or “boost parameter” (Lorentzian) measuring the relative orientation between the normals n1n_1 and n2n_2 in the 2D normal plane of J\mathcal{J}.

This immediately tells you what to add: a joint term whose variation produces δη-\delta\eta.

The required joint functional is

Sjoint[J]=18πGJdd1xση.S_{\rm joint}[\mathcal{J}] =\frac{1}{8\pi G}\int_{\mathcal{J}} d^{d-1}x\,\sqrt{|\sigma|}\,\eta.
  • Euclidean signature: n1n_1 and n2n_2 are unit vectors in a Euclidean normal plane, so the dihedral angle is

    η=arccos(n1n2).\eta=\arccos(n_1\cdot n_2).
  • Lorentzian signature: η\eta is a rapidity (boost parameter) in the normal plane. The precise “cosh/sinh” relation depends on whether each segment is time-like or space-like. A practical way to record it is case-by-case:

    • If Σ1\Sigma_1 and Σ2\Sigma_2 are both space-like (so n12=n22=1n_1^2=n_2^2=-1 are time-like), define

      coshη=n1n2(for consistently oriented time-like normals).\cosh\eta = -\,n_1\cdot n_2\qquad (\text{for consistently oriented time-like normals}).
    • If Σ1\Sigma_1 and Σ2\Sigma_2 are both time-like (so n12=n22=+1n_1^2=n_2^2=+1 are space-like), define

      coshη=n1n2.\cosh\eta = |n_1\cdot n_2|.
    • If one segment is time-like and the other space-like (the most common “time-slice meets radial wall” corner), define the rapidity by

      sinhη=ntimelikenspacelike.\sinh\eta = n_{\rm timelike}\cdot n_{\rm spacelike}.

    The joint term depends on the signed η\eta (orientation matters). In practice, if you only need the on-shell value (not the detailed variation), choosing a consistent outward/future convention and taking the principal value of η\eta is usually sufficient.


9. Null boundaries: boundary terms, joint terms, and reparametrization invariance

Section titled “9. Null boundaries: boundary terms, joint terms, and reparametrization invariance”

Null boundaries require special care because the normal becomes null and cannot be normalized. Moreover, on a null hypersurface the normal is also tangent, so we must keep track of the choice of null generator.

Let N\mathcal{N} be a null hypersurface ruled by null generators with tangent vector kμk^\mu:

kμkμ=0,kμμ=ddλ,k^\mu k_\mu=0,\qquad k^\mu \partial_\mu=\frac{d}{d\lambda},

where λ\lambda is a parameter along the generators. Choose coordinates (λ,θA)(\lambda,\theta^A) on N\mathcal{N}, where θA\theta^A label the generators. Each constant-λ\lambda slice has induced (Riemannian) metric γAB\gamma_{AB} and area element γ\sqrt{\gamma}.

Define the non-affinity κ\kappa by

kννkμ=κkμ.k^\nu\nabla_\nu k^\mu=\kappa\,k^\mu.

If λ\lambda is an affine parameter along the null geodesics, then κ=0\kappa=0.

The natural “extrinsic data” on N\mathcal{N} is encoded in the null extrinsic curvature

BABAkBprojected to the cross-sections,ΘγABBAB=1γdγdλ,B_{AB} \equiv \nabla_A k_B\quad\text{projected to the cross-sections}, \qquad \Theta \equiv \gamma^{AB}B_{AB}=\frac{1}{\sqrt{\gamma}}\frac{d\sqrt{\gamma}}{d\lambda},

where Θ\Theta is the expansion.

9.2 The null boundary term (analogue of GHY)

Section titled “9.2 The null boundary term (analogue of GHY)”

For a region whose boundary includes a null piece N\mathcal{N}, a standard choice of boundary term that yields a well-posed Dirichlet variational principle (fixing the intrinsic geometry γAB\gamma_{AB} on N\mathcal{N}) is

Snull[N]=18πGNdλdd1θ γκ.S_{\rm null}[\mathcal{N}] =\frac{1}{8\pi G}\int_{\mathcal{N}} d\lambda\,d^{d-1}\theta\ \sqrt{\gamma}\,\kappa.
  • If you choose λ\lambda affine, then κ=0\kappa=0 and this term vanishes.
  • For general parametrizations, this term cancels the λ(δγAB)\partial_\lambda(\delta\gamma_{AB})-type variation that plays the same role as n(δγab)\partial_n(\delta\gamma_{ab}) on a non-null boundary.

Just like non-null segments meet at joints, null segments also meet other segments at codimension-2 surfaces. The required joint terms are logarithmic because rescaling a null normal is physical at the level of the action.

Let J\mathcal{J} be a codimension-2 joint with induced metric σAB\sigma_{AB} and area element σ\sqrt{\sigma}.

  • Null–non-null joint: if a null boundary with generator kμk^\mu meets a non-null boundary with unit normal nμn^\mu, then a standard joint term is

    Sjoint(k,n)[J]=18πGJdd1θ σa,alnkn.S_{\rm joint}^{(k,n)}[\mathcal{J}] =\frac{1}{8\pi G}\int_{\mathcal{J}} d^{d-1}\theta\ \sqrt{\sigma}\, a,\qquad a\equiv \ln|k\cdot n|.
  • Null–null joint: if two null boundaries with generators kμk^\mu and kˉμ\bar{k}^\mu meet, then a standard choice is

    Sjoint(k,kˉ)[J]=18πGJdd1θ σa,alnkkˉ2.S_{\rm joint}^{(k,\bar{k})}[\mathcal{J}] =\frac{1}{8\pi G}\int_{\mathcal{J}} d^{d-1}\theta\ \sqrt{\sigma}\, a,\qquad a\equiv \ln\left|\frac{k\cdot \bar{k}}{2}\right|.

The exact placement of absolute values and additive constants corresponds to conventions (and to the freedom to add local counterterms on J\mathcal{J}), but the logarithmic dependence is robust.

9.4 A useful counterterm: restoring reparametrization invariance on null boundaries

Section titled “9.4 A useful counterterm: restoring reparametrization invariance on null boundaries”

In many holographic applications (notably the “complexity = action” proposal), one wants the action to be independent of how one parametrizes the null generators. A widely used fix is to add the null counterterm

Sctnull=18πGNdλdd1θ γΘln ⁣(ctΘ),S_{\rm ct}^{\rm null} =\frac{1}{8\pi G}\int_{\mathcal{N}} d\lambda\,d^{d-1}\theta\ \sqrt{\gamma}\, \Theta\,\ln\!\big(|\ell_{\rm ct}\,\Theta|\big),

where ct\ell_{\rm ct} is an arbitrary length scale. This term:

  • is intrinsic to N\mathcal{N} (depends only on γAB\gamma_{AB} and its λ\lambda-derivative),
  • does not affect the bulk equations of motion,
  • shifts the action by quantities that behave like boundary “scheme choices”, and
  • makes the total null-boundary contribution invariant under λf(λ)\lambda\to f(\lambda) in the settings where it is used.

Lorentzian path integrals and Hamiltonian evolution in a finite region: When a spacetime region is bounded by two space-like “initial/final time” slices together with a time-like wall (a finite box or radial cutoff), codimension-2 corners appear where each slice meets the wall. The Hayward joint term contributes there and is needed for additivity under gluing regions in time, obtaining the correct Hamiltonian/ADM interpretation of the action, and keeping the variational principle well-posed when you fix the induced metric on each boundary segment separately.

Wheeler–DeWitt patches and holographic complexity (CA proposal): A Wheeler–DeWitt patch is typically bounded by null hypersurfaces shot inward from specified boundary times. The gravitational action for such a region generically requires null boundary terms (often evaluated with an affine choice so that κ=0\kappa=0), logarithmic null joint terms where null sheets intersect each other and/or a regulator surface, and frequently the reparametrization-invariance counterterm SctnullS_{\rm ct}^{\rm null}. The dominant time dependence often comes from the joint terms at the intersections.

These boundary and joint terms also appear in actions of causal diamonds and entanglement wedges bounded partly by null surfaces, gravitational thermodynamics in Lorentzian signature when regulating spacetime regions with mixed (time-like/space-like) cutoffs, and any computation where actions of regions are compared after cutting and gluing along non-smooth hypersurfaces.


Quick reference: the full “good” gravitational action for generic boundaries

Section titled “Quick reference: the full “good” gravitational action for generic boundaries”

For a spacetime region MM in (d+1)(d+1) dimensions with bulk metric gμνg_{\mu\nu} and (possibly mixed) boundary, a standard “good” gravitational action is

S=116πGMdd+1xg(R2Λ)+18πGiεiΣiddxγK+18πGjNjdλdd1θ γκ+18πGαJαdd1θ σηα  +  Sctnull (optional).\begin{aligned} S = {} & \frac{1}{16\pi G}\int_M d^{d+1}x\,\sqrt{-g}\,(R-2\Lambda) +\frac{1}{8\pi G}\sum_i \varepsilon_i\int_{\Sigma_i} d^d x\,\sqrt{|\gamma|}\,K \\ & +\frac{1}{8\pi G}\sum_j \int_{\mathcal{N}_j} d\lambda\,d^{d-1}\theta\ \sqrt{\gamma}\,\kappa +\frac{1}{8\pi G}\sum_\alpha \int_{\mathcal{J}_\alpha} d^{d-1}\theta\ \sqrt{|\sigma|}\,\eta_\alpha \;+\;S_{\rm ct}^{\rm null}\ (\text{optional}). \end{aligned}

Here:

  • Σi\Sigma_i are non-null boundary pieces with induced metric γab\gamma_{ab} and extrinsic curvature KK (this term is the usual GHY term).
  • Nj\mathcal{N}_j are null boundary pieces with generator kμ=d/dλk^\mu=d/d\lambda and non-affinity κ\kappa.
  • Jα\mathcal{J}_\alpha are non-null joints (Hayward term) with “angle/boost” η\eta.
  • Jβ\mathcal{J}_\beta are joints involving at least one null boundary with logarithmic integrand aa.
  • SctnullS_{\rm ct}^{\rm null} is the common null counterterm used to restore reparametrization invariance (see Section 9.4). Signs and corner conventions vary by author; this page keeps the most common “outward normal” conventions and flags where choices enter.

For Euclidean gravity with smooth boundaries, only the first line matters.