# Amplitude Bootstrap in (Anti) de Sitter Space And The Four-Point Graviton
from Double Copy

Jiajie Meia a Department of Mathematical Sciences, Durham University, Durham,
DH1 3LE, UK

###### Abstract

We propose studying a new representation of on-shell Anti de Sitter (AdS)
amplitude in Mellin-Momentum space, where it encodes all the dynamical
information in Cosmological Correlators. At tree level, we demonstrate that
this amplitude has a similar analytic structure as the S-matrix, with residues
of poles made up of on-shell lower-point amplitudes. We use this structure to
bootstrap 4-point scalar amplitudes with spin-1 and spin-2 exchange. In the
second part of the paper, we use double copy to construct the 4-point graviton
amplitude in general dimension. This leads us to a novel, concise formula that
exhibits the flat space structure. We also verified this formula for the case
when d=3 with literature.

##  I Introduction

Scattering amplitudes are a cornerstone of Quantum Field Theory (QFT), as they
have both theoretical and experimental significance in predicting collider
results. However, defining the S-matrix of QFT in curved spacetime is a
challenge. In Anti de Sitter (AdS) space, the gauge-gravity duality allows us
to obtain the correlation function of a Conformal Field Theory (CFT) on the
boundary[1]. In addition, QFT in de Sitter (dS) space offers powerful tools
for computing cosmological observables, an active area of research reviewed in
[2].

Over the past decades, there has been tremendous success in bootstrapping the
S-matrix using fundamental physical principles such as Lorentz invariance,
locality, and unitarity [3, 4, 5]. For example, the factorization of the four-
point massless scalar amplitude with spin-1 and spin-2 exchange completely
constrains the amplitude,

$A_{4}\xrightarrow{P^{2}\to 0}\frac{\sum_{h}A_{3}^{h}A_{3}^{-h}}{P^{2}},$ (1)

where $h$ indicates the possible internal helicity. Generalizing this from
flat space to curved space, by replacing Lorentz invariance with conformal
invariance, presents considerable challenges. Recent progress has been made in
momentum space and cosmology to tackle this problem [6, 7, 8, 9, 10], which is
known as the Cosmological Bootstrap. However, cosmological correlators are not
invariant under field redefinition/gauge transformation. While factorization
is manifest in momentum space, the pole structure is significantly more
intricate, and the special conformal generator in momentum space is a second-
order differential operator, making it challenging to implement conformal
symmetry. Our proposal in this letter will aim to tackle these challenges in a
novel way.

Inspired by recent developments in differential representation[11, 12, 13, 14,
15, 16], perturbiner[17], and Mellin-Barnes representation[18, 19], we propose
studying a new representation for the AdS amplitude: Mellin-Momentum
amplitude. This proposal has two main motivations, described in Fig[1].
Firstly, by using the recently developed: From AdS to dS [20, 21, 22], we can
easily obtain the observables in Cosmology such as the In-In correlators from
AdS amplitudes, as detailed in the Appendix[B]. Secondly, at tree level, the
residue of the Mellin-Momentum amplitude pole is determined by on-shell lower-
point sub-amplitudes, similar to the S-matrix. We now outline how we tackle
the challenges in Cosmological Bootstrap [6].

  * •

On-Shelless: The amplitude is invariant under field redefinition/gauge
transformation [15].

  * •

Pole structure: The amplitude has two types of poles, factorization poles,
which are similar to Eq(1) in flat space, and Operator Product Expansion (OPE)
poles, which indicate the exchange of single-particle states from a CFT
perspective [23, 18].

  * •

Conformal symmetry: Instead of solving conformal ward identities, we demand
the OPE poles have the correct residue.

Demanding factorization limit and OPE limit, we can completely constrain the
scalar amplitude with spin-1 and 2 exchange in general dimension.

Figure 1: Mellin-Momentum amplitudes in curved space play a similar role to
the S-matrix in flat space, with simple analytic structure and the ability to
extract observables.

In the second part of the paper, we will explore the hidden structures in the
spinning amplitude for Yang-Mills (YM) and Gravity, such as color/kinematics
duality and double copy[24, 25, 26, 27, 28]. As an illustration, we can
represent the 4-point Yang-Mills amplitude in flat space schematically as
follows,

$A_{4}=\frac{n_{s}c_{s}}{s}+\frac{n_{t}c_{t}}{t}+\frac{n_{u}c_{u}}{u},$ (2)

where $c_{i}$ is the standard color factor that satisfies the Jacobi
identities $c_{s}+c_{t}+c_{u}=0$, and $n_{i}$ are known as the kinematic
numerators, and obey an analogue Jacobi relation,

$n_{s}+n_{t}+n_{u}=0.$ (3)

This is known as the kinematic Jacobi identity, which encodes the
color/kinematic duality. By replacing the color factor in the Yang-Mills
amplitude with the same kinematic numerator, we can obtain the gravity
amplitude:

$M_{4}=\frac{n_{s}^{2}}{s}+\frac{n_{t}^{2}}{t}+\frac{n_{u}^{2}}{u}.$ (4)

This is known as the double copy. We will develop a similar procedure to
compute the 4-point graviton amplitude in AdS.

##  II  Mellin-Momentum space

We work with AdSd+1 with radius $\mathcal{R}$ in the Poincaré patch,

$\tilde{g}_{mn}dx^{m}dx^{n}=\tfrac{\mathcal{R}^{2}}{z^{2}}(dz^{2}+\eta_{\mu\nu}dx^{\mu}dx^{\nu}),$
(5)

with $0<z<\infty$ and $\mathcal{R}=1$. The spacetime indices $m,n,\ldots$
generically represent the radial direction $z$ and the boundary directions.
The latter are denoted by $\mu,\nu=0,\ldots,d-1$, and $\eta_{\mu\nu}$ is the
flat boundary metric. We can make the Wick rotation $z\to-i\eta$ to obtain the
analogous computations in dS. Hence the AdS amplitudes consider here can be
directly compared with wavefunction coefficients in dS. We will follow the
work in [18, 19, 20] to define Mellin-Momentum space. We begin by defining the
equation of motion (EoM) operator in momentum space, whose solution without
source term gives the scalar bulk-to-boundary propagator:

$\displaystyle\mathcal{D}_{k}^{\Delta}\phi_{\Delta}(k,z)=0,$
$\displaystyle\mathcal{D}_{k}^{\Delta}\equiv
z^{2}k^{2}-z^{2}\partial_{z}^{2}-(1-d)z\partial_{z}+\Delta(\Delta-d),$ (6)

with $\Delta$ is scaling dimension and $k=|\vec{k}|$ is norm of boundary
momentum. Next, for the spinning particle, we rescale the field accordingly,
such that gluon behaves like a $\Delta=d-1$ scalar, while the graviton behaves
like a massless scalar111We restore the $\mathcal{R}$ for dimensional
counting.. To be more specific, for Yang-Mills, we have
$\mathbf{A}_{m}=(\mathcal{R}/z)A_{m}$, where
$\mathbf{F}_{mn}=\partial_{m}\mathbf{A}_{n}-\partial_{n}\mathbf{A}_{m}-i[\mathbf{A}_{m},\mathbf{A}_{n}]$
is the usual field strength. The graviton will be parametrized as
$g_{mn}=\tilde{g}_{mn}+\frac{\mathcal{R}^{2}}{z^{2}}h_{mn}$, we can then
expand this in Einstein field equation and obtain:

$\displaystyle\mathcal{D}_{k}^{d-1}A_{\mu}(k,z)$ $\displaystyle=0,$ (7)
$\displaystyle\mathcal{D}_{k}^{d}h_{\mu\nu}(k,z)$ $\displaystyle=0.$ (8)

Clearly, the solutions are just scalar propagators dressed up with boundary
polarization.

$\displaystyle A_{\mu}(k,z)$ $\displaystyle=\varepsilon_{\mu}\phi_{d-1}(k,z),$
(9) $\displaystyle h_{\mu\nu}(k,z)$
$\displaystyle=\varepsilon_{\mu\nu}\phi_{d}(k,z).$ (10)

Now we consider the Mellin transform of the scalar bulk-to-boundary propagator

$\displaystyle\phi_{\Delta}(k,z)=\int_{-i\infty}^{+i\infty}\frac{ds}{2\pi
i}z^{-2s+d/2}\phi_{\Delta}(s,k),$ (11)

where $s$ is the corresponding Mellin variable, similar to boundary momentum:
counting the spacetime derivative
$(z\partial_{z})\phi_{\Delta}=(-2s+d/2)\phi_{\Delta}$. Eq(II) becomes the
following,

$\displaystyle(z^{2}k^{2}+(d/2-\Delta)^{2}-4s^{2})\phi_{\Delta}(s,k)=0,$ (12)

momentum $k$ will always associate with a factor $z$ to capture scale
invariance. This is the on-shell condition for the amplitude below. The
solution of this equation can be found in: 222To obtain the Mellin-Barnes
representation of bulk-to-boundary [20], we can change
$z^{2}k^{2}\phi_{\Delta}(s,k)=k^{2}\phi_{\Delta}(s+1,k)$ to turn it into a
difference equation and with appropriate boundary condition, we have:
$\phi_{\Delta}(s,k)=\frac{\Gamma(s+\frac{1}{2}(\frac{d}{2}-\Delta))\Gamma(s-\frac{1}{2}(\frac{d}{2}-\Delta))}{2\Gamma(\Delta-\frac{d}{2}+1)}\left(\frac{k}{2}\right)^{-2s+\Delta-\frac{d}{2}}.$
(13) .

Now the n-point boundary correlator in momentum space can be written in the
following Mellin-Barnes representation:

$\displaystyle\langle\mathcal{O}(\vec{k}_{1})\dots\mathcal{O}(\vec{k}_{n})\rangle$
$\displaystyle=\delta^{d}(\vec{k}_{T})\prod_{i=1}^{n}\int\frac{ds_{i}}{(2\pi
i)}\phi(s_{i})A^{\prime}_{n}(s),$ $\displaystyle A^{\prime}_{n}(s)$
$\displaystyle=\int\frac{dz}{z^{d+1}}\mathcal{A}_{n}(z)z^{\sum\limits_{i=1}^{n}(-2s_{i}+d/2)},$
(14)

where $\vec{k}_{T}=\vec{k}_{1}+...+\vec{k}_{n}$. We can also integrate out the
$z$ variable at every vertex [20]:

$\displaystyle\int\frac{dz}{z^{d+1+b}}z^{\sum\limits_{i=1}^{n}(-2s_{i}+d/2)}=\delta(d+b+\sum\limits_{i=1}^{n}(2s_{i}-d/2)),$
(15)

where $b$ is counting the extra factor of $z$ due to scale invariance, this is
referred to Mellin Delta function. Finally, the reduced correlator
$\mathcal{A}_{n}(z)$ is defined as the Mellin-Momentum amplitude, where it
encodes all the dynamical information in boundary correlators333This amplitude
can be viewed as the differential representation of the Mellin-Barnes
amplitude first proposed in [73]. We thank Charlotte Sleight for bringing the
references to our attention and sharing the unpublished note..

LSZ reduction formula and local terms: The boundary correlator in momentum
space is not invariant under field redefinition [32, 7]. For instance,
consider a massless free scalar theory in $d=3$, where under the field
redefinition $\phi\to\phi+\alpha\phi^{3}$, the four-point correlator changes
to $\alpha\sum\limits_{i=1}^{4}(k_{i}^{3})$. These are boundary contact terms
in momentum space. For Mellin-Momentum amplitude, under such field
redefinition, it changes to $\alpha\sum\limits_{i=2}^{4}(z^{2}k_{1}\cdot
k_{i}+(d/2-2s_{1})(d/2-2s_{i}))$. Importantly, by using boundary momentum
conservation, Mellin delta function and on-shell condition Eq(12), it vanishes
and hence the Mellin-Momentum amplitude is invariant under field redefinition.
Similarly, the Conformal Ward identities (CWI) [33] in momentum space,
$\sum_{i=1}^{n}D^{AB}_{i}\Psi_{n}=...$ 444The $...$ represents the contact
terms here, and $AB$ is the notation from Embedding formalism, different
component will give different conformal generators., only hold up to contact
terms. However, the CWI for Mellin-Momentum amplitude is free of contact
terms.

These observations can be explained by LSZ reduction formula in AdS with
similar argument as QFT in Minkowski space: _contact term is not singular on
the on-shell poles_. Contact term of boundary correlator in position space
take the following general form:

$\displaystyle\langle\mathcal{O}(x_{1})\dots\mathcal{O}(x_{n})\rangle\delta^{d}(x_{i}-x_{j}),$
(16)

which vanishes unless the two operators collide. We now consider the Mellin-
Fourier transform $\phi(x,z)\sim e^{ik\cdot x}z^{-2s+d/2}\phi(s,k)$. Due to
the delta function, it becomes a $n-1$ point correlator. Hence, the contact
term can not be written as Eq(II) where the definition needs
$\prod_{i=1}^{n}\phi(s_{i},k_{i})$.

> Therefore, _contact terms in a boundary correlator do not contribute to the
> Mellin-Momentum amplitude $\mathcal{A}_{n}$._

This is the main reason why we claim that Mellin-Momentum amplitude should be
treated as amputated amplitude in AdS.

##  III Factorization limit and OPE limit for scalar four-point amplitude

In this section, we will adopt the amplitude bootstrap approach to derive the
4-point scalar exchanging spinning particle in AdS. We will demonstrate that
due to the simple analytic structure of Mellin-Momentum amplitude, we can
replicate the success in the flat space amplitude analysis. We will focus on
the spin-1 and spin-2 cases, since they encode the most non-trivial
information in YM and gravity amplitude.

At the level of 3-point, by imposing the gauge condition $\varepsilon_{i}\cdot
k_{i}=0$, dimensional analysis and boundary Lorentz invariance, we can write
down the on-shell 3-point amplitude for two scalars and one spin-$\ell$
particle in general dimension:

$\displaystyle\mathcal{A}_{3}=z^{\ell}(k_{1}\cdot\varepsilon_{3})^{\ell}.$
(17)

In general, tree-level Mellin-Momentum amplitudes have two types of poles:
factorization poles $\mathcal{D}_{k_{s}}^{\Delta}$ and OPE poles
$\vec{k}_{s}$, where $\vec{k}_{s}=\vec{k}_{1}+\vec{k}_{2}$. We will begin with
spin-1 exchange as an example to demonstrate how studying the pole structure
can determine the 4-point amplitude. In the factorization limit:

$\displaystyle\mathcal{A}^{J}_{4}\xrightarrow{\mathcal{D}_{k_{s}}^{d-1}\to 0}$
$\displaystyle\sum_{h}\mathcal{A}_{3}^{J}\frac{1}{\mathcal{D}_{k_{s}}^{d-1}}\mathcal{A}_{3}^{J}=\frac{z^{2}\Pi_{1,1}}{\mathcal{D}_{k_{s}}^{d-1}},$
(18)

where the sum runs over the possible helicities (guarantee by unitarity) and
$J$ denotes conserved current being exchanged. The polarization sums are
detailed in Appendix[A]. We stress that the inverse operator should act on the
three-point amplitude and the inverse is explicitly defined in Appendx[B].

We now turn to the OPE limit, taking $\vec{k}_{s}\to 0$. This limit is
determined by the Conformal Partial Wave (CPW)[18]555where
$\hat{\partial_{\varepsilon}}$ is the Todorov operator on the boundary, and
$\tilde{\mathcal{O}}$ is the shadow operator.

$\displaystyle\lim_{\vec{k}_{s}\to
0}\langle\mathcal{O}(\vec{k}_{1})\mathcal{O}(\vec{k}_{2})\mathcal{O}(\vec{k}_{3})\mathcal{O}(\vec{k}_{4})\rangle$
$\displaystyle\sim$
$\displaystyle\langle\mathcal{O}(\vec{k}_{1})\mathcal{O}(\vec{k}_{2})\mathcal{O}(\vec{k}_{s};\hat{\partial_{\varepsilon}})\rangle\langle\tilde{\mathcal{O}}(-\vec{k}_{s};\varepsilon)\mathcal{O}(\vec{k}_{3})\mathcal{O}(\vec{k}_{4})\rangle.$
(19)

Putting the 3-point data Eq(17) into the equation above implies that,

$\displaystyle\mathcal{A}^{J}_{4}\xrightarrow{\vec{k}_{s}\to 0}$
$\displaystyle\mathcal{O}(k_{s}^{0}).$ (20)

This is all we need from CPW. The leading term in OPE limit from Eq(18) is
controlled by,

$\displaystyle\frac{z^{2}(k_{1}^{2}-k_{2}^{2})(k_{3}^{2}-k_{4}^{2})}{16k_{s}^{2}(s_{12}-d/2)(s_{12}-1)},$
(21)

where $s_{12}=s_{1}+s_{2}$. In the denominator, we replaced the $z$ derivative
with Mellin variables because in the OPE limit it behaves like contact
interaction. Then by using EoM Eq(12) and Mellin delta function, it becomes:

$\displaystyle-\frac{(s_{1}-s_{2})(s_{3}-s_{4})}{z^{2}k_{s}^{2}}.$ (22)

Amazingly, the Mellin variables in the denominator cancel exactly. On the
other hand, Eq(20) tells us that pole $(k_{s})^{-2}$ must cancel exactly.
Hence, this term should then be subtracted (to have the correct OPE limit),
therefore completely fixed the 4-point amplitude:

$\displaystyle\mathcal{A}^{J}_{4}=\frac{z^{2}\Pi_{1,1}}{\mathcal{D}_{k_{s}}^{d-1}}+\Pi_{1,0}.$
(23)

Next, we will turn to minimally coupled scalars exchanging graviton. The
factorization limit demands that

$\displaystyle\mathcal{A}^{T}_{4}\xrightarrow{\mathcal{D}_{k_{s}}^{d}\to
0}\sum_{h}\mathcal{A}_{3}^{T}\frac{1}{\mathcal{D}_{k_{s}}^{d}}\mathcal{A}_{3}^{T}=\frac{z^{4}\Pi_{2,2}}{\mathcal{D}_{k_{s}}^{d}},$
(24)

where $T$ denotes the stress tensor being exchanged. In the OPE limit, the
situation becomes slightly more complicated because of the additional terms.
Details can be found in Appendix[A] along with the definition of $\Pi_{2,i}$.
In the end, we fixed the four-point scalar with graviton exchange as follows:

$\displaystyle\mathcal{A}^{T}_{4}=\frac{z^{4}\Pi_{2,2}}{\mathcal{D}^{d}_{k_{s}}}+z^{2}\Pi_{2,1}+\Pi_{2,0}.$
(25)

We have also verified this formula with literature, details can be found in
Appendix[B].

##  IV Yang-Mills Amplitude and Color/Kinematics Duality

In the following sections, we will tackle the most interesting cases of AdS
amplitudes: Yang-Mills and Gravity. While spinor-helicity techniques have
shown to be very efficient in the flat space amplitude bootstrap, it is still
unclear how to achieve similar simplicity in the AdS context. So in the rest
of this letter, our strategy will be writing the known expression for Yang-
Mills from [17] into Mellin-Momentum space, and exploiting double copy to
compute the gravity amplitude.

The 3-point color-ordered YM amplitude in general dimension takes the
following form (This Mellin form and 3-point Gravity double copy below was
first presented in [36])

$\displaystyle\mathcal{A}_{3}=z(\varepsilon_{1}\cdot\varepsilon_{2}\varepsilon_{3}\cdot
k_{1}+\varepsilon_{2}\cdot\varepsilon_{3}\varepsilon_{1}\cdot
k_{2}+\varepsilon_{3}\cdot\varepsilon_{1}\varepsilon_{2}\cdot k_{3}).$ (26)

Next, for the 4-point Yang-Mills amplitude we have

$\displaystyle\mathcal{A}_{4}=$
$\displaystyle\frac{z^{2}\varepsilon_{1}\cdot\varepsilon_{2}\varepsilon_{3}\cdot\varepsilon_{4}\Pi_{1,1}+z^{2}W_{s}}{\mathcal{D}_{k_{s}}^{d-1}}+\varepsilon_{1}\cdot\varepsilon_{2}\varepsilon_{3}\cdot\varepsilon_{4}\Pi_{1,0}+V_{c}^{s}$
$\displaystyle-[(12)\to(23)],$ (27)

where

$\displaystyle 4W_{s}=$
$\displaystyle\varepsilon_{1}\cdot\varepsilon_{2}(k_{1}\cdot\varepsilon_{3}k_{2}\cdot\varepsilon_{4}-k_{2}\cdot\varepsilon_{3}k_{1}\cdot\varepsilon_{4})$
$\displaystyle+$
$\displaystyle\varepsilon_{3}\cdot\varepsilon_{4}(k_{3}\cdot\varepsilon_{1}k_{4}\cdot\varepsilon_{2}-k_{4}\cdot\varepsilon_{1}k_{3}\cdot\varepsilon_{2})$
$\displaystyle+$
$\displaystyle(k_{2}\cdot\varepsilon_{1}\varepsilon_{2}-k_{1}\cdot\varepsilon_{2}\varepsilon_{1})\cdot(k_{4}\cdot\varepsilon_{3}\varepsilon_{4}-k_{3}\cdot\varepsilon_{4}\varepsilon_{3}),$
(28)

and the s-channel contact diagram is

$\displaystyle 4V_{c}^{s}=$
$\displaystyle\varepsilon_{1}\cdot\varepsilon_{3}\varepsilon_{2}\cdot\varepsilon_{4}-\varepsilon_{1}\cdot\varepsilon_{4}\varepsilon_{2}\cdot\varepsilon_{3}.$
(29)

We can now extract the kinematic numerator from the expression above:

$\displaystyle n_{s}=$
$\displaystyle\varepsilon_{1}\cdot\varepsilon_{2}\varepsilon_{3}\cdot\varepsilon_{4}(z^{2}\Pi_{1,1}+\Pi_{1,0}\mathcal{D}_{k_{s}}^{d})+z^{2}W_{s}+V_{c}^{s}\mathcal{D}_{k_{s}}^{d},$
(30)

where we have replaced the EoM operator Eq(II) with the different conformal
dimension for Gravity. This seems to be an unavoidable procedure in curved
space and we will discuss more about it in sectionVI. The reason we keep the
kinematic numerator as an operator form is so that when we perform the double
copy, we can simply cancel it with the propagator in the denominator. However,
the EoM operator itself by definition Eq(II) is equivalent to
$\mathcal{D}_{k_{s}}^{d}=z^{2}k_{s}^{2}+4s_{12}s_{34}$. It’s noteworthy that
after this replacement the kinematic numerator is free of the OPE pole $k_{s}$
now. Other channels can be obtained by permutation:

$n_{t}=n_{s}\bigl{|}_{(234)\to(423)},\quad
n_{u}=n_{s}\bigl{|}_{(234)\to(342)}.$ (31)

It’s easy to verify that the kinematic Jacobi identity is satisfied, similar
to the case of flat space amplitude[37, 38, 39, 40, 41, 42]:

$n_{s}+n_{t}+n_{u}=0.$ (32)

##  V Graviton Amplitude And Double copy

Finally, we are ready to discuss the most important example in this letter,
namely the gravity amplitude. Firstly, the 3-point gravity amplitude:

$\displaystyle\mathcal{M}_{3}=z^{2}(\varepsilon_{1}\cdot\varepsilon_{2}\varepsilon_{3}\cdot
k_{1}+\varepsilon_{2}\cdot\varepsilon_{3}\varepsilon_{1}\cdot
k_{2}+\varepsilon_{3}\cdot\varepsilon_{1}\varepsilon_{2}\cdot k_{3})^{2}.$
(33)

This has a manifestly double copy structure [43, 44, 41, 45, 36, 46, 47] with
the appropriate normalization:

$\displaystyle\mathcal{M}_{3}=(\mathcal{A}_{3})^{2}.$ (34)

This relation has no ordering ambiguity and is valid in general dimensions.
However, this is not the full story. As double copy of pure Yang-Mills should
give graviton coupled to dilaton and antisymmetric tensor. Considering the
tensor product of the polarization, we decompose it into a transverse and
traceless tensor (graviton) and a trace (dilaton),

$\displaystyle\varepsilon^{\mu}\varepsilon^{\nu}=\frac{1}{2}(\varepsilon^{\mu}\varepsilon^{\nu}+\varepsilon^{\nu}\varepsilon^{\mu}-\frac{2}{d-1}\Pi^{\mu\nu})+\frac{1}{d-1}\Pi^{\mu\nu},$
(35)

where $\Pi_{\mu\nu}=\eta_{\mu\nu}-\frac{k_{\mu}k_{\nu}}{k^{2}}$ is the
projection tensor. This predicts a new interaction between two graviton
$h_{\mu\nu}$ and one dilaton $\phi$ (where dilaton is identified as
$\varepsilon^{+}\varepsilon^{-}$):

$\displaystyle\mathcal{M}_{3}(1_{h},2_{h},3_{\phi})$
$\displaystyle=(\mathcal{A}_{3})^{2}|_{\varepsilon_{3}^{\mu}\varepsilon_{3}^{\nu}\to\Pi^{\mu\nu}},$
$\displaystyle=z^{2}(\varepsilon_{1}\cdot\varepsilon_{2})^{2}k_{1}^{\mu}k_{1}^{\nu}\Pi_{\mu\nu}.$
(36)

This amplitude has a vanishing flat space limit as expected. Moving to four-
point, with the color/kinematic duality satisfying in Eq(32), we can replace
the color factor with the kinematic numerator[48, 49, 50, 51, 41],

$\displaystyle\mathcal{M}_{4}=\frac{n_{s}^{2}}{\mathcal{D}_{k_{s}}^{d}}+\frac{n_{t}^{2}}{\mathcal{D}_{k_{t}}^{d}}+\frac{n_{u}^{2}}{\mathcal{D}_{k_{u}}^{d}}.$
(37)

However, with the new 3-point interaction found above, the double copy result
will include four external graviton exchanging dilaton. It would be very
interesting to understand whether Eq(37) corresponds to the four-graviton
amplitude in a dilaton-graviton theory. We leave this exploration to the
future. Instead, here we will extract Einstein gravity from the double copy
above by using a similar strategy in flat space, for examples, pure gravity at
loop level and massive scalar[52, 53, 54, 55, 56, 57]. To project out the
dilaton scalar degree of freedom, we can demand the factorization only has
graviton propagation:

$\displaystyle\mathcal{M}_{4}^{EG}=\frac{n_{s}^{2}}{\mathcal{D}_{k_{s}}^{d}}+\frac{n_{t}^{2}}{\mathcal{D}_{k_{t}}^{d}}+\frac{n_{u}^{2}}{\mathcal{D}_{k_{u}}^{d}}-\tilde{\mathcal{M}}_{\mathrm{AdS}}.$
(38)

So we subtracted out the dilaton state,

$\displaystyle\tilde{\mathcal{M}}_{\mathrm{AdS}}=$
$\displaystyle(\varepsilon_{1}\cdot\varepsilon_{2}\varepsilon_{3}\cdot\varepsilon_{4})^{2}(\frac{z^{4}\Pi_{2,2}^{\mathrm{Tr}}}{\mathcal{D}_{k_{s}}^{d}}-\Pi_{2,0}+\Pi_{1,0}^{2}\mathcal{D}_{k_{s}}^{d})$
$\displaystyle+\mathcal{P}(2,3,4),$ (39)

where $\mathcal{P}(2,3,4)$ denotes sum over permutation to obtain the
t-channel and u-channel. The first correction term is the dilaton exchange and
the last two terms can be understood as the conformal structure of the
graviton propagator. This formula is the first 4-point gravity amplitude in
$\mathrm{AdS}_{d+1}$ and takes on a remarkably simple form. In particular,
this formula exhibits flat space structure and explains the origin of the
complex contact interaction terms as simply zero/two derivative scalar contact
interaction like flat space amplitude. As a result, one can simply replace the
flat space amplitude by Eq(VI) to obtain AdS amplitude. We have explicitly
verified that it matches with [58] in $d=3$ by reverting back to momentum
space.

##  VI Final remarks

Remark on flat space structure: Given the simplicity of the Mellin-Momentum
amplitude and its resemblance to its flat space counterpart, we can define an
uplifting operation as follows:

$\displaystyle\mathcal{U}:\\{$
$\displaystyle\epsilon_{i}\cdot\epsilon_{j}\to\varepsilon_{i}\cdot\varepsilon_{j},\epsilon_{i}\cdot
k_{j}\to z\varepsilon_{i}\cdot k_{j},$
$\displaystyle\frac{(T-U)^{2}}{S}\to\frac{z^{4}\Pi_{2,2}}{\mathcal{D}^{\Delta}_{k_{s}}}+\Pi_{2,1}+\Pi_{2,0},$
$\displaystyle\frac{T-U}{S}\to\frac{z^{2}\Pi_{1,1}}{\mathcal{D}^{\Delta}_{k_{s}}}+\Pi_{1,0},S\to
z^{2}k_{s}^{2}+4s_{12}s_{34}\\},$ (40)

which uplifts all the scattering variables in $(d+1)$ Minkowski space to the
AdS ones. In hindsight, the last three steps are essentially stating that we
should replace Lorentz-invariant quantities with conformally-invariant ones.
It is noteworthy that all the examples considered in this letter adhere to
this form,

$\displaystyle\mathcal{A}^{\mathrm{AdS}}=\mathcal{U}(A^{\mathrm{Mink}}).$ (41)

It would be interesting to compare this operation with weight-shifting
operators approach:[59, 41, 45, 60, 61].
Remark on flat space limit: Based on the previous work [62, 63], it is easy to
guess that the flat space limit of the Mellin-Momentum amplitude can be
obtained by taking the scaling limit of the Mellin variables $s_{i}\to\infty$,
and then replacing them with the corresponding norm of momentum:

$\displaystyle\lim_{\mathcal{R}_{\rm
AdS}\rightarrow\infty,s_{i}\to\infty}\mathcal{A}^{\mathrm{AdS}}\xrightarrow{s_{i}\to\frac{zk_{i}}{2}}A^{\mathrm{Mink}}\delta^{d+1}(\sum_{i}^{n}\vec{k}_{i}).$
(42)

Under the scaling limit, the Mellin mode in $z$ direction behaves like a
Fourier mode and hence the delta function in flat space naturally arises from
combining the boundary momentum conservation with the Mellin delta function.
One might try to prove this formula following the discussion in [64].
Remark on Double Copy in curved space: In our proposal, the squaring process
naturally mimics the Double Copy structure in the S-matrix, while the rest of
the bootstrap procedure aims to probe the extra structure in curved space. The
additional constraint we need to construct the Double Copy to Gravity might be
a generic feature in curved spacetime. The color/kinematic duality and double
copy for Non-Linear Sigma Models(NLSM) was studied in [65, 40, 15, 66, 67].
Moreover, in [15] the authors showed that the duality holds off-shell at
symmetric spacetime manifold. However, the process of replacing color with
kinematic is blind to the extra quantum number of conformal dimension, which
has different values in AdS for NLSM, and sG [67, 68].

Future directions: An important direction would be to consider higher-point
amplitudes. Indeed, in [69] we have found the 5-point tree-level YM amplitude
has a similar flat space structure. With the on-shell constructibility and
flat space structure shown here, another natural question to ask is that
whether we can construct on-shell recursion [70] in AdS. It would be very
interesting to better understand the new interaction predicted by double copy,
especially it may shed new light on double copy/KLT relation [27] to string
amplitudes in curved space. The recent discovery of single-valued zeta
functions in the leading curvature correction to the AdS Virasoro-Shapiro
amplitude [71, 72] strongly indicates the possibility of such relation.

###### Acknowledgements.

We would like to thank Luis F. Alday, Connor Armstrong, Harry Goodhew, Renann
Lipinski Jusinskas, Guanda Lin, Yue-Zhou Li, Paul McFadden, Silvia Nagy,
Enrico Pajer for valuable discussions and comments on the draft, and
especially Arthur Lipstein and Charlotte Sleight for many valuable comments
and suggestions to improve the draft during the completion of this work. JM is
supported by a Durham-CSC Scholarship.

## References

  * Maldacena [1998] J. M. Maldacena, The Large N limit of superconformal field theories and supergravity, Adv. Theor. Math. Phys. 2, 231 (1998), arXiv:hep-th/9711200 .
  * Baumann  _et al._ [2022a] D. Baumann, D. Green, A. Joyce, E. Pajer, G. L. Pimentel, C. Sleight, and M. Taronna, Snowmass White Paper: The Cosmological Bootstrap, in  _Snowmass 2021_ (2022) arXiv:2203.08121 [hep-th] .
  * Benincasa and Cachazo [2007] P. Benincasa and F. Cachazo, Consistency Conditions on the S-Matrix of Massless Particles, (2007), arXiv:0705.4305 [hep-th] .
  * Elvang and Huang [2015] H. Elvang and Y.-t. Huang,  _Scattering Amplitudes in Gauge Theory and Gravity_ (Cambridge University Press, 2015).
  * Cheung [2018] C. Cheung, TASI Lectures on Scattering Amplitudes, in  _Proceedings, Theoretical Advanced Study Institute in Elementary Particle Physics : Anticipating the Next Discoveries in Particle Physics (TASI 2016): Boulder, CO, USA, June 6-July 1, 2016_, edited by R. Essig and I. Low (2018) pp. 571–623, arXiv:1708.03872 [hep-ph] .
  * Arkani-Hamed  _et al._ [2020] N. Arkani-Hamed, D. Baumann, H. Lee, and G. L. Pimentel, The Cosmological Bootstrap: Inflationary Correlators from Symmetries and Singularities, JHEP 04, 105, arXiv:1811.00024 [hep-th] .
  * Pajer [2021] E. Pajer, Building a Boostless Bootstrap for the Bispectrum, JCAP 01, 023, arXiv:2010.12818 [hep-th] .
  * Baumann  _et al._ [2021] D. Baumann, C. Duaso Pueyo, A. Joyce, H. Lee, and G. L. Pimentel, The Cosmological Bootstrap: Spinning Correlators from Symmetries and Factorization, SciPost Phys. 11, 071 (2021), arXiv:2005.04234 [hep-th] .
  * Jazayeri  _et al._ [2021] S. Jazayeri, E. Pajer, and D. Stefanyszyn, From locality and unitarity to cosmological correlators, JHEP 10, 065, arXiv:2103.08649 [hep-th] .
  * Goodhew  _et al._ [2021] H. Goodhew, S. Jazayeri, and E. Pajer, The Cosmological Optical Theorem, JCAP 04, 021, arXiv:2009.02898 [hep-th] .
  * Eberhardt  _et al._ [2020] L. Eberhardt, S. Komatsu, and S. Mizera, Scattering equations in AdS: scalar correlators in arbitrary dimensions, JHEP 11, 158, arXiv:2007.06574 [hep-th] .
  * Roehrig and Skinner [2022] K. Roehrig and D. Skinner, Ambitwistor strings and the scattering equations on AdS3×S3, JHEP 02, 073, arXiv:2007.07234 [hep-th] .
  * Gomez  _et al._ [2021] H. Gomez, R. L. Jusinskas, and A. Lipstein, Cosmological Scattering Equations, Phys. Rev. Lett. 127, 251604 (2021), arXiv:2106.11903 [hep-th] .
  * Herderschee  _et al._ [2022] A. Herderschee, R. Roiban, and F. Teng, On the differential representation and color-kinematics duality of AdS boundary correlators, JHEP 05, 026, arXiv:2201.05067 [hep-th] .
  * Cheung  _et al._ [2022] C. Cheung, J. Parra-Martinez, and A. Sivaramakrishnan, On-shell correlators and color-kinematics duality in curved symmetric spacetimes, JHEP 05, 027, arXiv:2201.05147 [hep-th] .
  * Li and Mei [2023] Y.-Z. Li and J. Mei, Bootstrapping Witten diagrams via differential representation in Mellin space, (2023), arXiv:2304.12757 [hep-th] .
  * Armstrong  _et al._ [2022a] C. Armstrong, H. Gomez, R. Lipinski Jusinskas, A. Lipstein, and J. Mei, New recursion relations for tree-level correlators in anti–de Sitter spacetime, Phys. Rev. D 106, L121701 (2022a), arXiv:2209.02709 [hep-th] .
  * Sleight and Taronna [2020] C. Sleight and M. Taronna, Bootstrapping Inflationary Correlators in Mellin Space, JHEP 02, 098, arXiv:1907.01143 [hep-th] .
  * Sleight [2020a] C. Sleight, A Mellin Space Approach to Cosmological Correlators, JHEP 01, 090, arXiv:1906.12302 [hep-th] .
  * Sleight and Taronna [2021a] C. Sleight and M. Taronna, From dS to AdS and back, JHEP 12, 074, arXiv:2109.02725 [hep-th] .
  * Sleight and Taronna [2021b] C. Sleight and M. Taronna, From AdS to dS exchanges: Spectral representation, Mellin amplitudes, and crossing, Phys. Rev. D 104, L081902 (2021b), arXiv:2007.09993 [hep-th] .
  * Di Pietro  _et al._ [2022] L. Di Pietro, V. Gorbenko, and S. Komatsu, Analyticity and unitarity for cosmological correlators, JHEP 03, 023, arXiv:2108.01695 [hep-th] .
  * Arkani-Hamed and Maldacena [2015] N. Arkani-Hamed and J. Maldacena, Cosmological Collider Physics, (2015), arXiv:1503.08043 [hep-th] .
  * Bern  _et al._ [2008] Z. Bern, J. J. M. Carrasco, and H. Johansson, New Relations for Gauge-Theory Amplitudes, Phys. Rev. D 78, 085011 (2008), arXiv:0805.3993 [hep-ph] .
  * Bern  _et al._ [2010a] Z. Bern, J. J. M. Carrasco, and H. Johansson, Perturbative Quantum Gravity as a Double Copy of Gauge Theory, Phys. Rev. Lett. 105, 061602 (2010a), arXiv:1004.0476 [hep-th] .
  * Bern  _et al._ [2010b] Z. Bern, T. Dennen, Y.-t. Huang, and M. Kiermaier, Gravity as the Square of Gauge Theory, Phys. Rev. D 82, 065003 (2010b), arXiv:1004.0693 [hep-th] .
  * Kawai  _et al._ [1986] H. Kawai, D. C. Lewellen, and S. H. H. Tye, A Relation Between Tree Amplitudes of Closed and Open Strings, Nucl. Phys. B 269, 1 (1986).
  * Bern  _et al._ [2019] Z. Bern, J. J. Carrasco, M. Chiodaroli, H. Johansson, and R. Roiban, The Duality Between Color and Kinematics and its Applications, (2019), arXiv:1909.01358 [hep-th] .
  * Note [1] We restore the $\mathcal{R}$ for dimensional counting.
  * Note [2] To obtain the Mellin-Barnes representation of bulk-to-boundary [20], we can change $z^{2}k^{2}\phi_{\Delta}(s,k)=k^{2}\phi_{\Delta}(s+1,k)$ to turn it into a difference equation and with appropriate boundary condition, we have:  $\phi_{\Delta}(s,k)=\frac{\Gamma(s+\frac{1}{2}(\frac{d}{2}-\Delta))\Gamma(s-\frac{1}{2}(\frac{d}{2}-\Delta))}{2\Gamma(\Delta-\frac{d}{2}+1)}\left(\frac{k}{2}\right)^{-2s+\Delta-\frac{d}{2}}.$ (43) .
  * Note [3] This amplitude can be viewed as the differential representation of the Mellin-Barnes amplitude first proposed in [73]. We thank Charlotte Sleight for bringing the references to our attention and sharing the unpublished note.
  * Maldacena and Pimentel [2011] J. M. Maldacena and G. L. Pimentel, On graviton non-Gaussianities during inflation, JHEP 09, 045, arXiv:1104.2846 [hep-th] .
  * Bzowski  _et al._ [2014] A. Bzowski, P. McFadden, and K. Skenderis, Implications of conformal invariance in momentum space, JHEP 03, 111, arXiv:1304.7760 [hep-th] .
  * Note [4] The $...$ represents the contact terms here, and $AB$ is the notation from Embedding formalism, different component will give different conformal generators.
  * Note [5] Where $\hat{\partial_{\varepsilon}}$ is the Todorov operator on the boundary, and $\tilde{\mathcal{O}}$ is the shadow operator.
  * Sleight [2020b] C. Sleight, A mellin-barnes approach to scattering in de sitter space, Strings 2020 (2020b).
  * Armstrong  _et al._ [2021] C. Armstrong, A. E. Lipstein, and J. Mei, Color/kinematics duality in AdS4, JHEP 02, 194, arXiv:2012.02059 [hep-th] .
  * Albayrak  _et al._ [2021] S. Albayrak, S. Kharel, and D. Meltzer, On duality of color and kinematics in (A)dS momentum space, JHEP 03, 249, arXiv:2012.10460 [hep-th] .
  * Alday  _et al._ [2021] L. F. Alday, C. Behan, P. Ferrero, and X. Zhou, Gluon Scattering in AdS from CFT, JHEP 06, 020, arXiv:2103.15830 [hep-th] .
  * Diwakar  _et al._ [2021] P. Diwakar, A. Herderschee, R. Roiban, and F. Teng, BCJ amplitude relations for Anti-de Sitter boundary correlators in embedding space, JHEP 10, 141, arXiv:2106.10822 [hep-th] .
  * Li [2022] Y.-Z. Li, Flat-space structure of gluon and graviton in AdS, (2022), arXiv:2212.13195 [hep-th] .
  * Drummond  _et al._ [2023] J. M. Drummond, R. Glew, and M. Santagata, Bern-Carrasco-Johansson relations in AdS5×S3 and the double-trace spectrum of super gluons, Phys. Rev. D 107, L081901 (2023), arXiv:2202.09837 [hep-th] .
  * Farrow  _et al._ [2019] J. A. Farrow, A. E. Lipstein, and P. McFadden, Double copy structure of CFT correlators, JHEP 02, 130, arXiv:1812.11129 [hep-th] .
  * Lipstein and McFadden [2020] A. E. Lipstein and P. McFadden, Double copy structure and the flat space limit of conformal correlators in even dimensions, Phys. Rev. D 101, 125006 (2020), arXiv:1912.10046 [hep-th] .
  * Lee and Wang [2022] H. Lee and X. Wang, Cosmological Double-Copy Relations, (2022), arXiv:2212.11282 [hep-th] .
  * Li  _et al._ [2018] S. Y. Li, Y. Wang, and S. Zhou, KLT-Like Behaviour of Inflationary Graviton Correlators, JCAP 12, 023, arXiv:1806.06242 [hep-th] .
  * Caron-Huot and Li [2021] S. Caron-Huot and Y.-Z. Li, Helicity basis for three-dimensional conformal field theory, JHEP 06, 041, arXiv:2102.08160 [hep-th] .
  * Armstrong  _et al._ [2023] C. Armstrong, H. Goodhew, A. Lipstein, and J. Mei, Graviton Trispectrum from Gluons, (2023), arXiv:2304.07206 [hep-th] .
  * Lipstein and Nagy [2023] A. Lipstein and S. Nagy, Self-dual gravity and color/kinematics duality in AdS4, (2023), arXiv:2304.07141 [hep-th] .
  * Zhou [2021] X. Zhou, Double Copy Relation in AdS Space, Phys. Rev. Lett. 127, 141601 (2021), arXiv:2106.07651 [hep-th] .
  * Bissi  _et al._ [2023] A. Bissi, G. Fardelli, A. Manenti, and X. Zhou, Spinning correlators in $\mathcal{N}$ = 2 SCFTs: Superspace and AdS amplitudes, JHEP 01, 021, arXiv:2209.01204 [hep-th] .
  * Carrasco and Vazquez-Holm [2021a] J. J. M. Carrasco and I. A. Vazquez-Holm, Extracting Einstein from the loop-level double-copy, JHEP 11, 088, arXiv:2108.06798 [hep-th] .
  * Kosower  _et al._ [2022] D. A. Kosower, R. Monteiro, and D. O’Connell, The SAGEX review on scattering amplitudes Chapter 14: Classical gravity from scattering amplitudes, J. Phys. A 55, 443015 (2022), arXiv:2203.13025 [hep-th] .
  * Johansson and Ochirov [2015] H. Johansson and A. Ochirov, Pure Gravities via Color-Kinematics Duality for Fundamental Matter, JHEP 11, 046, arXiv:1407.4772 [hep-th] .
  * Luna  _et al._ [2018] A. Luna, I. Nicholson, D. O’Connell, and C. D. White, Inelastic Black Hole Scattering from Charged Scalar Amplitudes, JHEP 03, 044, arXiv:1711.03901 [hep-th] .
  * Carrasco and Vazquez-Holm [2021b] J. J. M. Carrasco and I. A. Vazquez-Holm, Loop-Level Double-Copy for Massive Quantum Particles, Phys. Rev. D 103, 045002 (2021b), arXiv:2010.13435 [hep-th] .
  * Plefka  _et al._ [2020] J. Plefka, C. Shi, and T. Wang, Double copy of massive scalar QCD, Phys. Rev. D 101, 066004 (2020), arXiv:1911.06785 [hep-th] .
  * Bonifacio  _et al._ [2022] J. Bonifacio, H. Goodhew, A. Joyce, E. Pajer, and D. Stefanyszyn, The graviton four-point function in de Sitter space, (2022), arXiv:2212.07370 [hep-th] .
  * Baumann  _et al._ [2020] D. Baumann, C. Duaso Pueyo, A. Joyce, H. Lee, and G. L. Pimentel, The cosmological bootstrap: weight-shifting operators and scalar seeds, JHEP 12, 204, arXiv:1910.14051 [hep-th] .
  * Bonifacio  _et al._ [2021] J. Bonifacio, E. Pajer, and D.-G. Wang, From amplitudes to contact cosmological correlators, JHEP 10, 001, arXiv:2106.15468 [hep-th] .
  * Baumann  _et al._ [2022b] D. Baumann, W.-M. Chen, C. Duaso Pueyo, A. Joyce, H. Lee, and G. L. Pimentel, Linking the singularities of cosmological correlators, JHEP 09, 010, arXiv:2106.05294 [hep-th] .
  * Penedones [2011] J. Penedones, Writing CFT correlation functions as AdS scattering amplitudes, JHEP 03, 025, arXiv:1011.1485 [hep-th] .
  * Raju [2012] S. Raju, New Recursion Relations and a Flat Space Limit for AdS/CFT Correlators, Phys. Rev. D 85, 126009 (2012), arXiv:1201.6449 [hep-th] .
  * Li [2021] Y.-Z. Li, Notes on flat-space limit of AdS/CFT, JHEP 09, 027, arXiv:2106.04606 [hep-th] .
  * Sivaramakrishnan [2022] A. Sivaramakrishnan, Towards color-kinematics duality in generic spacetimes, JHEP 04, 036, arXiv:2110.15356 [hep-th] .
  * Armstrong  _et al._ [2022b] C. Armstrong, H. Gomez, R. Lipinski Jusinskas, A. Lipstein, and J. Mei, Effective field theories and cosmological scattering equations, JHEP 08, 054, arXiv:2204.08931 [hep-th] .
  * Armstrong  _et al._ [2022c] C. Armstrong, A. Lipstein, and J. Mei, Enhanced soft limits in de Sitter space, JHEP 12, 064, arXiv:2210.02285 [hep-th] .
  * Bonifacio  _et al._ [2019] J. Bonifacio, K. Hinterbichler, A. Joyce, and R. A. Rosen, Shift Symmetries in (Anti) de Sitter Space, JHEP 02, 178, arXiv:1812.08167 [hep-th] .
  * Mei and Mo [2024] J. Mei and Y. Mo, On-shell Bootstrap for n-gluons and gravitons scattering in (A)dS, Unitarity and Soft limit, (2024), arXiv:2402.09111 [hep-th] .
  * Britto  _et al._ [2005] R. Britto, F. Cachazo, B. Feng, and E. Witten, Direct proof of tree-level recursion relation in Yang-Mills theory, Phys. Rev. Lett. 94, 181602 (2005), arXiv:hep-th/0501052 .
  * Alday  _et al._ [2023] L. F. Alday, T. Hansen, and J. A. Silva, Emergent world-sheet for the AdS Virasoro-Shapiro amplitude, (2023), arXiv:2305.03593 [hep-th] .
  * Alday  _et al._ [2022] L. F. Alday, T. Hansen, and J. A. Silva, AdS Virasoro-Shapiro from single-valued periods, JHEP 12, 010, arXiv:2209.06223 [hep-th] .
  * Sleight and Taronna [2021c] C. Sleight and M. Taronna, On the consistency of (partially-)massless matter couplings in de Sitter space, JHEP 10, 156, arXiv:2106.00366 [hep-th] .
  * Weinberg [2005] S. Weinberg,  _The Quantum theory of fields. Vol. 1: Foundations_ (Cambridge University Press, 2005).
  * Albayrak and Kharel [2019a] S. Albayrak and S. Kharel, Towards the higher point holographic momentum space amplitudes. Part II. Gravitons, JHEP 12, 135, arXiv:1908.01835 [hep-th] .
  * Albayrak and Kharel [2019b] S. Albayrak and S. Kharel, Towards the higher point holographic momentum space amplitudes, JHEP 02, 040, arXiv:1810.12459 [hep-th] .

##  Appendix A Polarization sums

In this appendix, we provide the details of the polarization sums employed in
this letter. Following the boundary transverse gauge [17]: (This is the same
as in QFT textbook [74] with Coulomb gauge.)

$\displaystyle\sum_{h=\pm}\varepsilon_{\mu}(k,h)\varepsilon_{\nu}(k,h)^{*}$
$\displaystyle=\eta_{\mu\nu}-\frac{k_{\mu}k_{\nu}}{k^{2}}\equiv\Pi_{\mu\nu},$
(44)
$\displaystyle\sum_{h=\pm}\varepsilon_{\mu\nu}(k,h)\varepsilon_{\rho\sigma}(k,h)^{*}$
$\displaystyle=\frac{1}{2}\Pi_{\mu\rho}\Pi_{\nu\sigma}+\frac{1}{2}\Pi_{\mu\sigma}\Pi_{\rho\nu}-\frac{1}{d-1}\Pi_{\mu\nu}\Pi_{\rho\sigma},$
(45)

which are transverse and traceless projection tensor. Let’s return to QED in
Coulomb gauge for a moment. The polarization tensor above which appear in the
photon propagator is not Lorentz invariant on its own, but we can restore
Lorentz invariance to obtain the covariant photon propagator. This is the same
logic that we use to derive all of the polarization sums below by demanding
conformal invariance.
Finally, let us explicitly write out the polarization sums at 4-point, see
also [6, 8, 61] for the case of conformally coupled scalar.

$\displaystyle\Pi_{1,1}\equiv$
$\displaystyle\frac{1}{4}(k_{1}^{\mu}-k_{2}^{\mu})\Pi_{\mu\nu}(k_{3}^{\nu}-k_{4}^{\nu})=\frac{1}{4}(k_{1}-k_{2})\cdot(k_{3}-k_{4})+\frac{(k_{1}^{2}-k_{2}^{2})(k_{3}^{2}-k_{4}^{2})}{4k_{s}^{2}},$
(46) $\displaystyle\Pi_{1,0}\equiv$
$\displaystyle-\frac{(s_{1}-s_{2})(s_{3}-s_{4})}{z^{2}k_{s}^{2}}.$ (47)

Next, we write the spin-2 polarization sums in a way that makes its double
copy structure clear.

$\displaystyle\Pi_{2,2}\equiv$
$\displaystyle\frac{1}{16}(k_{1}^{\mu}-k_{2}^{\mu})(k_{1}^{\nu}-k_{2}^{\nu})(\frac{1}{2}\Pi_{\mu\rho}\Pi_{\nu\sigma}+\frac{1}{2}\Pi_{\mu\sigma}\Pi_{\rho\nu}-\frac{1}{d-1}\Pi_{\mu\nu}\Pi_{\rho\sigma})(k_{3}^{\rho}-k_{4}^{\rho})(k_{3}^{\sigma}-k_{4}^{\sigma})$
(48) $\displaystyle=$ $\displaystyle\Pi_{1,1}^{2}-\Pi_{2,2}^{\mathrm{Tr}},$
(49) $\displaystyle\Pi_{2,1}\equiv$ $\displaystyle 2\Pi_{1,1}\Pi_{1,0},$ (50)
$\displaystyle\Pi_{2,2}^{\mathrm{Tr}}\equiv$
$\displaystyle\frac{(k_{1}^{\mu}-k_{2}^{\mu})\Pi_{\mu\nu}(k_{1}^{\nu}-k_{2}^{\nu})(k_{3}^{\rho}-k_{4}^{\rho})\Pi_{\rho\sigma}(k_{3}^{\sigma}-k_{4}^{\sigma})}{16(d-1)},$
(51) $\displaystyle\Pi_{2,0}\equiv$
$\displaystyle-\frac{d(k_{1}^{2}-k_{2}^{2})(k_{3}^{2}-k_{4}^{2})(s_{1}-s_{2})(s_{3}-s_{4})}{4(d-1)k_{s}^{4}}+\frac{(d-2)z^{2}(k_{1}^{2}-k_{2}^{2})(k_{3}^{2}-k_{4}^{2})(s_{1}-s_{2})(s_{3}-s_{4})}{4(d-1)k_{s}^{2}(d-2s_{12})(d-2s_{34})}$
$\displaystyle+\frac{(k_{1}^{2}-k_{2}^{2})(s_{1}-s_{2})(d^{2}-8(s_{3}^{2}+s_{4}^{2}))}{8(d-1)k_{s}^{2}(d-2s_{12})}+\frac{(k_{3}^{2}-k_{4}^{2})(s_{3}-s_{4})(d^{2}-8(s_{1}^{2}+s_{2}^{2}))}{8(d-1)k_{s}^{2}(d-2s_{34})}$
$\displaystyle+\frac{(z^{2}k_{s}^{2}+4s_{12}s_{34})}{(d-1)}+\frac{4(s_{1}-s_{2})^{2}+4(s_{3}-s_{4})^{2}-d^{2}}{16(d-1)}.$
(52)

Both $\Pi_{2,1}$ and $\Pi_{2,0}$ can be determined in the same way as we
obtained $\Pi_{1,0}$ in the main text. Note that there are still terms with
Mellin variables in the denominator which naively violate locality. However,
they will all cancel after using the Mellin delta function.

##  Appendix B Back to Momentum space and Cosmological Correlators

In this letter, we focused on the analytic structure of Mellin-Momentum
amplitude. However, it is also important to stress that we can easily obtain
the actual observables: Cosmological correlators. As a non-trivial example, we
will give a detailed translation from the Four-point gravity amplitude to the
gravity Trispectrum [58]. Expanding out the full expression from Eq(38):

$\displaystyle\mathcal{M}_{4}=\frac{(\varepsilon_{1}\cdot\varepsilon_{2}\varepsilon_{3}\cdot\varepsilon_{4}z^{2}\Pi_{1,1}+z^{2}W_{s})^{2}-(\varepsilon_{1}\cdot\varepsilon_{2}\varepsilon_{3}\cdot\varepsilon_{4}z^{2})^{2}\Pi_{2,2}^{\mathrm{Tr}}}{\mathcal{D}_{k_{s}}^{d}}+(\varepsilon_{1}\cdot\varepsilon_{2}\varepsilon_{3}\cdot\varepsilon_{4})^{2}\Pi_{2,0}$
$\displaystyle+2(\varepsilon_{1}\cdot\varepsilon_{2}\varepsilon_{3}\cdot\varepsilon_{4}z^{2}\Pi_{1,1}+z^{2}W_{s})(\varepsilon_{1}\cdot\varepsilon_{2}\varepsilon_{3}\cdot\varepsilon_{4}\Pi_{1,0}+V_{c}^{s})+((V_{c}^{s})^{2}+2\varepsilon_{1}\cdot\varepsilon_{2}\varepsilon_{3}\cdot\varepsilon_{4}V_{c}^{s}\Pi_{1,0})(z^{2}k_{s}^{2}+4s_{12}s_{34})$
$\displaystyle+\mathcal{P}(2,3,4).$ (53)

First of all, we want to emphasize that unlike the usual bulk calculation on
spinning particles in AdS which involves complicated bulk integral in axial
gauge[75, 76], all of our calculations are just scalar integrals, which can be
easily automated by Mathematica. Now by inverse Mellin transform:

$\displaystyle\mathcal{I}_{2,2}$
$\displaystyle=\frac{z^{4}\Pi_{2,2}}{\mathcal{D}_{k_{s}}^{d}}\to\Pi_{2,2}\int\frac{dz}{z^{d+1}}(z^{2}\phi_{1}\phi_{2})(\mathcal{D}_{k_{s}}^{d})^{-1}(z^{2}\phi_{3}\phi_{4}),$
(54) $\displaystyle\mathcal{I}_{2,1}$
$\displaystyle=\Pi_{2,1}\to\frac{\Pi_{1,1}}{k_{s}^{2}}\int\frac{dz}{z^{d+1}}z^{2}(\partial_{z1}-\partial_{z2})(\partial_{z3}-\partial_{z4})\phi_{1}\phi_{2}\phi_{3}\phi_{4}.$
(55)

where $\partial_{zi}$ means the $\partial_{z}$ acting on the corresponding leg
only. The inversion is defined via the standard Green function:

$\displaystyle(\mathcal{D}(z))^{-1}\mathcal{O}(z)$
$\displaystyle=\int\frac{dy}{y^{d+1}}G(z,y)\mathcal{O}(y),$ (56)
$\displaystyle\mathcal{D}(z)G(z,y)$ $\displaystyle=z^{d+1}\delta(z-y).$ (57)

We will evaluate the integral in $d=3$,

$\displaystyle\mathcal{I}_{2,2}=$
$\displaystyle\Pi_{2,2}\int\frac{dz}{z^{d+1}}(z^{2}\phi_{1}\phi_{2})G(k_{s},z,z^{\prime})(z^{\prime
2}\phi_{3}\phi_{4})$ $\displaystyle=$
$\displaystyle\Pi_{2,2}\left(\frac{2k_{1}k_{2}k_{3}k_{4}\left(E_{L}E_{R}+Ek_{s}\right)}{E_{L}^{2}E^{3}E_{R}^{2}}+\frac{k_{1}k_{2}\left(E_{L}k_{34}+Ek_{s}\right)}{E_{L}^{2}E^{2}E_{R}}+\frac{k_{3}k_{4}\left(Ek_{s}+E_{R}k_{12}\right)}{E_{L}E^{2}E_{R}^{2}}+\frac{E_{L}E_{R}-k_{s}^{2}}{E_{L}EE_{R}}\right),$
(58) $\displaystyle\mathcal{I}_{2,1}=$
$\displaystyle\frac{\Pi_{1,1}(k_{1}-k_{2})(k_{3}-k_{4})}{k_{s}^{2}}\left(\frac{2k_{1}k_{3}k_{4}k_{2}}{E^{3}}+\frac{k_{1}k_{2}k_{34}}{E^{2}}+\frac{k_{3}k_{4}k_{12}}{E^{2}}+\frac{k_{12}k_{34}}{E}\right).$
(59)

The integral for $\Pi_{2,0}$ clearly involve more $z$ derivatives, but it is
essentially just contact diagram, we will not present the integrated
expression here, but we have explicitly verified that agree with [58]. In
particular, we matched our $\Pi_{2,0}$ with
$f_{(2,0)}^{(s)}(E_{L}E_{R}-sk_{T})\Pi_{2,0}^{(s)}+f_{c}$ in Eq(2.39) [58].
Moving forward, we can utilize the formula in [58, 8], which establishes a
connection between the wavefunction coefficient and In-In correlator, this
will give us the graviton trispecturm.


inventory costs, initial states, backlog costs, prices are products are sold)
can be found in Hubbs et al. (2020), indeed, we rely on their publicly
available repository for our experiments. We report here, however, a couple of
modifications that we have taken to improve the performances. The state of the
agent (i.e., a vector $v$ with dimension $33$) has been normalized according
to $\frac{v}{20}-1$. The action space, that was originally a multi-discrete
space of dimension $[100,90,80]$, has been shrinked to $[25,25,25]$ to speed
up the learning process. Indeed, larger action values are highly sub-optimal
given the demand curve and the inventory costs.

###  E.2 Policy Evaluation Experiments

Figure 7: Experimental results (mean and $95\%$ confidence intervals of $100$
runs) on the Policy Evaluation domain described in Section E.1. Each picture
reports the average MSE (i.e., $y$-axis) against the budget that has been
spent to collect trajectories (i.e., $x$-axis). More specifically, we report
results when using our approximately optimal DCS $\bm{\tilde{n}}^{*}$ and the
uniform data collection strategy $\bm{n}_{u}$. The policy that is estimated is
the uniform one, and the data have been collected on-policy. The first row of
the figure is obtained with $T=100$, the second one with $T=1000$, and the
third one with $T=2000$. The third column with $\gamma=0.95$, the second one
with $\gamma=0.995$, and the third one with $\gamma=0.999$. Figure 8:
Experimental results (mean and $95\%$ confidence intervals of $100$ runs) on
the Policy Evaluation domain described in Section E.1. Each picture reports
the average MSE (i.e., $y$-axis) against the budget that has been spent to
collect trajectories (i.e., $x$-axis). More specifically, we report results
when using our approximately optimal DCS $\bm{\tilde{n}}^{*}$ and the uniform
data collection strategy $\bm{n}_{u}$. The policy that is estimated takes
$a_{1}$ with probability $0.49$ and $a_{2}$ with probability $0.51$; the data
have been collected using the random policy (i.e., off-policy evaluation). The
first row of the figure is obtained with $T=100$, the second one with
$T=1000$, and the third one with $T=2000$. The third column with
$\gamma=0.95$, the second one with $\gamma=0.995$, and the third one with
$\gamma=0.999$.

Figure 7 and 8 report results for our experimental evaluation setting. Figure
7 studies the on-policy evaluation problem, where we want to evaluate the
random policy with data collected from the random policy itself. Figure 8,
instead, focuses on the off-policy setting: we consider the problem of
estimating the policy that takes $a_{1}$ with probability $0.49$ and $a_{2}$
with probability $0.51$ with data collected from the random policy. In both
Figures, each picture compares the performance, in term of MSE, of
$\bm{\tilde{m}}^{*}$ against the usual uniform-in-the-horizon DCS.181818Notice
that in the considered environment, the exact value of any policy can easily
be computed in closed form. It follows that the MSE can be computed exactly.
Each experiment shows the mean MSE, together with $95\%$ confidence intervals,
over $100$ runs. To conduct exhaustive experimentation, we have varied both
the value of $\Lambda$ abd $\gamma$. The results are consistent with our
theory: for small values of $\gamma$ (or, equivalently, for larger values of
$T$) the benefits of $\bm{\tilde{m}}^{*}$ increases.

###  E.3 Policy Optimization Ablations

Figure 9: Experimental results (mean and $95\%$ confidence intervals of $15$
runs) on the Corridor Sparse domain with different values of $\gamma$ and
$\Lambda$. More specifically, the first row is obtained with $\Lambda=2500$
and the second one with $\Lambda=1300$. The first column is obtained training
the algorithm with $\gamma=0.999$, the second one with $\gamma=0.995$, and the
third one with $\gamma=0.99$. The reported metric is the average of the
discounted return with the corresponding value of $\gamma$. Figure 10:
Experimental results (mean and $95\%$ confidence intervals of $15$ runs) on
the Corridor Dense domain with different values of $\gamma$ and $\Lambda$.
More specifically, the first row is obtained with $\Lambda=25000$ and the
second one with $\Lambda=15000$. The first column is obtained training the
algorithm with $\gamma=0.999$, the second one with $\gamma=0.995$, and the
third one with $\gamma=0.99$. The reported metric is the average of the
discounted return with the corresponding value of $\gamma$. Figure 11:
Experimental results (mean and $95\%$ confidence intervals of $15$ runs) on
the Corridor Sparse domain with different values of $\gamma$ and $\Lambda$.
More specifically, the first row is obtained with $\Lambda=2500$ and the
second one with $\Lambda=1300$. The first column is obtained with
$\gamma=0.999$, the second one with $\gamma=0.97$, and the third one with
$\gamma=0.99$. The reported metric is the average of undiscounted return
(i.e., $\gamma=1$.) Figure 12: Experimental results (mean and $95\%$
confidence intervals of $15$ runs) on the Corridor Dense domain with different
values of $\gamma$ and $\Lambda$. More specifically, the first row is obtained
with $\Lambda=25000$ and the second one with $\Lambda=15000$. The first column
is obtained with $\gamma=0.999$, the second one with $\gamma=0.97$, and the
third one with $\gamma=0.99$. The reported metric is the average of
undiscounted return (i.e., $\gamma=1$.)

Figure 9 and 10 report results on the Corridor domain presented in Section
E.1. More specifically, Figure 9 reports the result for the sparse reward
setting, while Figure 10 focuses on the dense reward one. Each plot shows the
mean and the $95\%$ confidence intervals over $15$ runs of the average
discounted return. To conduct exhaustive experimentation, we varied the values
of $\gamma$ and $\Lambda$.

Some observations are in order. First of all, from Figure 9, TT-POIS shows a
robust behavior even in this sparse reward scenario. Notice that, at the
beginning of the learning process, since the performance is close to $0$, the
agent rarely reaches the goal (i.e., it sparsely receives positive feedback
from the environment). Yet, TT-POIS still obtains the same learning curves as
POIS. Secondly, from Figure 10, we can appreciate a significant benefit of TT-
POIS over POIS for the dense reward setting, especially with small values of
$\gamma$. This is consistent with what have been highlighted in Section 5.
Finally, Figure 12 and 11 report the undiscounted average return as a metric.
The previous considerations extend to these results as well.

###  E.4 Additional Optimization Results: varying $\Lambda$ and $\gamma$

Figure 13: Experimental results (mean and $95\%$ confidence intervals of $5$
runs) on the Dam domain with different values of $\gamma$ and $\Lambda$. More
specifically, the first row is obtained with $\Lambda=8640$ and the second one
with $\Lambda=4320$. The first column is obtained training the algorithm with
$\gamma=0.999$, the second one with $\gamma=0.995$, and the third one with
$\gamma=0.95$. The reported metric is the average of the discounted return
with the corresponding value of $\gamma$. Figure 14: Experimental results
(mean and $95\%$ confidence intervals of $5$ runs) on the Supply Chain domain
with different values of $\gamma$ and $\Lambda$. More specifically, the first
row is obtained with $\Lambda=3900$ and the second one with $\Lambda=2400$.
The first column is obtained training the algorithm with $\gamma=0.999$, the
second one with $\gamma=0.97$, and the third one with $\gamma=0.95$. The
reported metric is the average of the discounted return with the corresponding
value of $\gamma$. Figure 15: Experimental results (mean and $95\%$ confidence
intervals of $5$ runs) on the Reacher domain with different values of $\gamma$
and $\Lambda$. More specifically, the first row is obtained with
$\Lambda=8000$ and the second one with $\Lambda=4000$. The first column is
obtained training the algorithm with $\gamma=0.999$, the second one with
$\gamma=0.995$, and the third one with $\gamma=0.95$. The reported metric is
the average of the discounted return with the corresponding value of $\gamma$.

In this Section, we provide additional experimental optimization results. More
specifically, Figures 13, 14 and 15 reports results for the Dam, Supply Chain
and Reacher environments respectively (average return over $5$ run with $95\%$
confidence intervals), while varying the value of $\Lambda$ and $\gamma$. For
the Dam domain we test the following combinations of $\Lambda$ and $\gamma$:
$\gamma\in\\{0.95,0.995,0.999\\}$ and $\Lambda\in\\{4320,8640\\}$. For the
Reacher domain, instead, we test $\gamma\in\\{0.95,0.995,0.999\\}$ and
$\Lambda\in\\{4000,8000\\}$. Finally, for the Supply Chain, we report
$\gamma\in\\{0.95,0.97,0.999\\}$ and $\Lambda\in\\{2400,3900\\}$.

As one can see, what has been highlighted in Section 5 replicates
consistently.

###  E.5 Additional Optimization Results: undiscounted performance

Figure 16: Experimental results (mean and $95\%$ confidence intervals of $5$
runs) on the Dam domain with different values of $\gamma$ and $\Lambda$. More
specifically, the first row is obtained with $\Lambda=8640$ and the second one
with $\Lambda=4320$. The first column is obtained with $\gamma=0.999$, the
second one with $\gamma=0.995$, and the third one with $\gamma=0.95$. The
reported metric is the average of undiscounted return (i.e., $\gamma=1$.)
Figure 17: Experimental results (mean and $95\%$ confidence intervals of $5$
runs) on the Reacher domain with different values of $\gamma$ and $\Lambda$.
More specifically, the first row is obtained with $\Lambda=8000$ and the
second one with $\Lambda=4000$. The first column is obtained with
$\gamma=0.999$, the second one with $\gamma=0.995$, and the third one with
$\gamma=0.95$. The reported metric is the average of undiscounted return
(i.e., $\gamma=1$.) Figure 18: Experimental results (mean and $95\%$
confidence intervals of $5$ runs) on the Supply Chain domain with different
values of $\gamma$ and $\Lambda$. More specifically, the first row is obtained
with $\Lambda=3900$ and the second one with $\Lambda=2400$. The first column
is obtained with $\gamma=0.999$, the second one with $\gamma=0.97$, and the
third one with $\gamma=0.95$. The reported metric is the average of
undiscounted return (i.e., $\gamma=1$.)

In this Section, we report the undiscounted average return for the experiments
of Section E.4. More specifically, Figures 16, 17 and 18 reports results for
the Dam, Reacher and Supply Chain environments respectively (average
undiscounted return over $5$ run with $95\%$ confidence intervals).

As we can appreciate, in these scenarios, the advantages of TT-POIS over POIS
replicates even for the undiscounted return metric.

###  E.6 Hyper-parameters and other details

We have run the experiments using $88$ Intel(R) Xeon(R) CPU E7-8880 v4 @
2.20GHz cpus and $94$ GB of RAM.

We now provide details on the hyper-parameters that were used to generate the
results. Table 1, 2, 3, 4 and 5 provides hyper-parameters for POIS and TT-POIS
on the different domains. For all values of $\gamma$, we used the same hyper-
parameters. The hyper-parameters on the number of offline iterations refers to
Line $4$ of Algorithm 1.

Table 1: Corridor Sparse Rewards Hyper-parameters for POIS and TT-POIS  Hyper-parameter | $\bm{\Lambda=2500}$ | $\bm{\Lambda=1300}$
---|---|---
Neural Network Size | $[64,32]$ | $[64,32]$
Weight Initialization | Normc | Normc
Activation Function | Xavier | Xavier
Confidence $\delta$ | $0.9$ | $0.9$
Number of offline iterations | $10$ | $10$
Importance Weight Clipping | $100$ | $100$
$R_{\textrm{MIN-MAX}}$ | Not applied | Not applied
Table 2: Corridor Dense Rewards Hyper-parameters for POIS and TT-POIS  Hyper-parameter | $\bm{\Lambda=25000}$ | $\bm{\Lambda=15000}$
---|---|---
Neural Network Size | $[64,32]$ | $[64,32]$
Weight Initialization | Normc | Normc
Activation Function | Xaiver | Xavier
Confidence $\delta$ | $0.7$ | $0.7$
Number of offline iterations | $10$ | $10$
Importance Weight Clipping | $100$ | $100$
$R_{\textrm{MIN-MAX}}$ | Not applied | Not applied
Table 3: Dam Hyper-parameters for POIS and TT-POIS  Hyper-parameter | $\bm{\Lambda=8600}$ | $\bm{\Lambda=4320}$
---|---|---
Neural Network Size | $[64,32]$ | $[64,32]$
Weight Initialization | Normc | Normc
Activation Function | Tanh | Tanh
Confidence $\delta$ | $0.7$ | $0.6$
Number of offline iterations | $10$ | $10$
Importance Weight Clipping | Not applied | Not applied
$R_{\textrm{MIN-MAX}}$ | Not applied | Not applied
Table 4: Supply Chain Hyper-parameters for POIS and TT-POIS  Hyper-parameter | $\bm{\Lambda=3900}$ | $\bm{\Lambda=2400}$
---|---|---
Neural Network Size | $[100,50,25]$ | $[100,50,25]$
Weight Initialization | Normc | Normc
Activation Function | Tanh | Tanh
Confidence $\delta$ | $0.005$ | $0.005$
Number of offline iterations | $20$ | $20$
Importance Weight Clipping | $100$ | $100$
$R_{\textrm{MIN-MAX}}$ | Not applied | Not applied
Table 5: Reacher Hyper-parameters for POIS and TT-POIS  Hyper-parameter | $\bm{\Lambda=8000}$ | $\bm{\Lambda=4000}$
---|---|---
Neural Network Size | $[100,50,25]$ | $[100,50,25]$
Weight Initialization | Normc | Normc
Activation Function | Tanh | Tanh
Confidence $\delta$ | $0.8$ | $0.8$
Number of offline iterations | $20$ | $20$
Importance Weight Clipping | Not applied | Not applied
$R_{\textrm{MIN-MAX}}$ | $5$ | $5$


# Which programming languages do hackers use?

Christian Koch  Christian Koch
Technische Hochschule Nürnberg Georg Simon Ohm
Kesslerpl. 12
Nuremberg
Germany<EMAIL_ADDRESS>,  Katharina Müller  Katharina Müller
Friedrich-Alexander University Erlangen-Nuremberg
Martensstr. 5a
Erlangen
Germany<EMAIL_ADDRESS>and  Eldar Sultanow  Eldar Sultanow
Chair of Business Informatics, Processes and Systems
Potsdam University
Karl-Marx Straße 67
14482 Potsdam
Germany<EMAIL_ADDRESS>
###### Abstract.

There are numerous articles about the programming languages most commonly used
by hackers. Among them, however, there are hardly any scientific studies. One
reason might be that hackers mainly operate anonymously and are difficult to
reach. This paper aims to shed light on this interesting and relevant research
question. In order to find answers, we conducted a survey among the members of
the German Chaos Computer Club. As one of the world’s largest organisations
for information security and hacking, the club provides a good basis for our
study. We examine the question of which programming languages are used by
hackers as well as the importance of the programming language for their work.
The paper offers first insights into the topic and can provide a starting
point for further research.

###### Key words and phrases:

Programming Language, Hacking, Chaos Computer Club

##  1\. Introduction

In recent years, the Python programming language has gained the reputation to
be popular among hackers [1, p. v]. Since Python was one of the most widely
used languages in 2021, this may not come as a surprise [2]. There are several
online resources that support the hypothesis [3][4][5][6]. Unfortunately,
there are hardly any scientific studies available on the prevalence of
programming languages in the hacking community. Our paper aims to help closing
this research gap. The question we try to answer is: Which programming
languages do hackers use?

In order to address this research question, we conducted a survey among the
members of the German Chaos Computer Club (CCC). As ”Europe’s largest
association of hackers”[7], the club provides a good basis for our study.
Before we explain our approach and discuss the results, the term _hacker_
needs to be clarified. Since there is no standard notion in the scientific
literature, we define the term as follows:

######  Definition 1.

A hacker is someone who uses his/her technical expertise to deal with
computers with special regard to their security. We explicitly refer to the
Chaos Computer Club’s hacker ethics [8]. These form the core of the club’s
hacker definition and consequently that of our study.

Some authors distinguish between ”black-hat”, ”white-hat” and ”grey-hat”
hackers with respect to their ethics [9, p. 20] [1, pp. 12-13]. By this
definition, a white-hat hacker has no criminal intent, while black-hats use
their computer knowledge for unlawful activities. Grey-hats are in between
these two concepts. Raymond’s guide on how to become a hacker uses the term
”cracker” to describe malicious behaviour. According to Raymond, ”hackers
build things, crackers break them” [10]. Since we conducted our survey at the
Chaos Computer Club, our research focuses on their hacker ethics, in line with
Definition 1. The club’s hacker concept is not based on the black-hat/white-
hat definition outlined above, but constitutes separate principles such as
freedom of information and protection of private data [8].

There are numerous works on hacking in the (scientific) literature. Not all of
them draw a line between different groups of hackers. Whether this distinction
is important for the choice of programming language is another question.
Programming languages are mainly discussed from a functional standpoint in
literature. Raymond, for example, mentions Python, C, Perl, and Lisp as
adequate choices [10]. Ericson provides code snippets in C[11]. Simpson and
Antill describe C as ”one of the most popular programming languages for
security professionals and hackers” [12, p. 196]. The authors also write that
hackers ”use Perl to create automated exploits and malicious bots” [12, p.
178]. Clark explains hacking techniques with shell scripts under Linux and
Windows as well as programmatic approaches with Python and other languages
[13]. Python is covered by a variety of further hacking books [14], [15],
[16]. Since software vulnerabilities play an import role for security, Turner
analysed C, Java, C++, Objective-C, C#, PHP, Visual Basic, Python, Perl and
Ruby in this regard [17].

As mentioned above, it is hard to find literature on the prevalence of
programming languages in the hacking community. One reason might be that
hackers often operate anonymously and are difficult to reach. Samtani et al.
sidestepped this problem by exploring hacker assets in underground forums
[18]. The authors used machine learning algorithms to classify whether code
postings were written in Java, Python, C/C++, HTML, PHP, Delphi, ASP, SQL,
Ruby, or Perl. This way, they could show that XSS attacks were primarily
implemented in Perl, password cracks and keyloggers in Java, and finally
banking vulnerabilities and Microsoft exploits in SQL [18, p. 35]. Our paper
follows an alternative approach to shed light on this topic.

##  2\. Approach

In May 2021 we conducted a cross-sectional survey [19] at the Chaos Computer
Club. For this purpose, we have sent a link to an online questionnaire to the
local and regional affiliates of the CCC (so-called Erfa-Kreise) [20]. The
design of the questionnaire was inspired by the 2019 Stack Overflow Developer
Survey [21]. Other sources of inspiration were the Kaggle Data Science Survey
[22] and Raymond’s guide on how to become a hacker [10]. Our questions focused
on programming languages as well as related topics such as operating systems
and development environments. For a better interpretation of the results, we
also asked the participants how important they consider the choice of
programming language to be for hacking.

In our questionnaire, we used Likert scales as well as multiple choices and
drop-downs. Control questions were included to ensure proper answering [23].
The survey instrument was pre-tested on 3 selected participants. Based on the
pre-test we slightly revised some survey items, especially enclosed answer
options and added examples and instructions.

We opened the questionnaire on 1 May and closed it on 30 May 2021. In total,
we received 43 responses. As not all questions were mandatory, the number of
responses for a given question may be lower than the total number of
participants. It is clear that the results do not allow for a representative
conclusion on our research question. Nevertheless, the study offers first
insights into the topic and can serve as a starting point for further, broader
research.

##  3\. Discussion of Results

In the following, we discuss the most important results of our survey. For a
better overview, we have divided the responses into several subsections.

###  3.1. Experience

Our first questions focused on the experience of the participants. Table 1
shows that the majority of respondents had a general programming experience of
several years. A slightly different picture emerged when we asked about the
specific hacking experience as presented in Table 2.

Table 1. How many years of programming experience do you have in general (hacking and non-hacking)? Options |  % Percentages |  # Responses
---|---|---
20+ years |  41.86 % |  18
10 - 20 years |  32.56 % |  14
5 - 10 years |  18.60 % |  8
3 - 5 years |  2.33 % |  1
1 - 3 years |  4.65 % |  2
$>$ 1 year |  0.00 % |  0
I have never written code |  0.00 % |  0
Total |  |  43
Table 2. How many years of hacking experience do you have? Options |  % Percentages |  # Responses
---|---|---
20+ years |  27.50 % |  11
10 - 20 years |  27.50 % |  11
5 - 10 years |  20.00 % |  8
3 - 5 years |  15.00 % |  6
1 - 3 years |  2.50 % |  1
$>$ 1 year |  5.00 % |  2
I have no hacking experience |  2.50 % |  1
Total |  |  40

###  3.2. Programming Language

When asked about the programming languages used for hacking in the last year,
participants named a variety of technologies. Table 3 lists the responses in
descending order.

Table 3. Which programming languages have you used for hacking in the last year? (You can choose more than one answer option) Options |  % Percentages |  # Responses
---|---|---
Bash/Shell/PowerShell |  72.50 % |  29
Python |  70.00 % |  28
C |  32.50 % |  13
JavaScript |  32.50 % |  13
HTML/CSS |  30.00 % |  12
C++ |  27.50 % |  11
Go |  22.50 % |  9
SQL |  22.50 % |  9
Java |  20.00 % |  8
Others |  20.00 % |  8
Assembly |  17.50 % |  7
C# |  15.00 % |  6
PHP |  15.00 % |  6
Rust |  12.50 % |  5
Ruby |  10.00 % |  4
Perl |  7.50 % |  3
TypeScript |  7.50 % |  3
Kotlin |  5.00 % |  2
Scala |  5.00 % |  2
VB/VBA |  5.00 % |  2
Lisp |  2.50 % |  1
Swift |  2.50 % |  1
Objective-C |  0.00 % |  0
R |  0.00 % |  0
Total Respondents 40 |  |

The options of programming languages provided in the questionnaire were based
on a Stack Overflow survey [21], Raymond’s hacking guide [10] and feedback
from our pre-testers. Whether technologies such as HTML, Bash or SQL can be
called programming languages is of course debatable. We have included them in
the list anyway to avoid possible gaps in the study.

According to Table 3, shell scripts (e.g. Bash) and Python were used most
frequently. It also appears that the C language family (C, C++, C#, and
Objective-C) is still common. With regard to Java, the survey supports
Raymond’s argument that this language is not the first choice for hackers
[10]. Table 4 shows that the language preference of the majority of
participants has changed over time. Compared to programming languages used
more than a year before (see Table 10 in the appendix), a shift towards shell
scripts and Python can be noted. Python’s rise in popularity has been observed
by other developer surveys too [21] [2].

Table 4. Has your programming language preference changed over time? Options |  % Percentages |  # Responses
---|---|---
yes, my preference has changed |  77.50 % |  31
no, I always used the same programming languages |  22.5 % |  9
Total |  |  40
Table 5. How strongly do you agree with the following statement: ”The choice of the programming language is important for hacking.” Options |  % Percentages |  # Responses
---|---|---
Strongly Agree |  5.0 % |  2
Agree |  20.0 % |  8
Neither / Nor Agree |  32.50 % |  13
Disagree |  20.00 % |  8
Strongly Disagree |  22.50 % |  9
Total |  |  40

An interesting result appears in Table 5. Many respondents (75%) did not agree
that the choice of the programming language is important for hacking. Only 25%
of participants agreed or strongly agreed with this statement. The prevalence
of Python for hacking might therefore simply reflect the general increase in
its use in recent years. Consequently, one could expect that the language
preference of hackers will continue to change in future as technology evolves.

###  3.3. Ecosystem

We also asked the participants which operating systems (OS) they used for
hacking in the last year. Table 6 shows that the majority of respondents chose
a Linux-based variant. This is not surprising, since Kali Linux even provides
a specific distribution for security and penetration testing [24]. When asked
about the integrated development environments (IDEs), a variety of tools were
selected. As evident from Table 7, Vim and Visual Studio Code were in the top
five (see Table 11 in the appendix for a full list).

Table 6. Which operating systems have you used for hacking in the last year? (You can choose more than one answer option) Options |  % Percentages |  # Responses
---|---|---
Linux-based |  95.00 % |  38
Windows |  40.00 % |  16
MacOS |  32.50 % |  13
BSD |  17.50 % |  7
Others |  5.00 % |  2
Total Respondents 40 |  |
Table 7. Which integrated development environments (IDEs) have you used for hacking in the last year?(You can choose more than one answer option) Options |  % Percentages |  # Responses
---|---|---
Vim |  60.00 % |  24
Visual Studio Code |  50.00 % |  20
Others |  22.50 % |  9
IntelliJ |  17.50 % |  7
Visual Studio |  17.50 % |  7
… |  … |  …
Total Respondents 40 |  |

###  3.4. Demographics

Finally, we asked the participants about their gender identity and age. Table
8 shows that most respondents identified themselves as male. Their age varied,
with the majority between 25 and 44 years old, as revealed by Table 9.

Table 8. What is your gender identity? Options |  % Percentages |  # Responses
---|---|---
woman |  2.50 % |  1
man |  60.00 % |  24
nonbinary |  12.50 % |  5
prefer not to say |  20.00 % |  8
prefer to self-describe |  5.00 % |  2
Total |  |  40
Table 9. What is your age? Options |  % Percentages |  # Responses
---|---|---
0 - 17 |  2.50 % |  1
18 - 21 |  2.50 % |  1
22 - 24 |  5.00 % |  2
25 - 29 |  17.50 % |  7
30 - 34 |  22.50 % |  9
35 - 39 |  15.00 % |  6
40 - 44 |  20.00 % |  8
45 - 49 |  7.50 % |  3
50 - 54 |  2.50 % |  1
55 - 59 |  5.00 % |  2
60 - 69 |  0.00 % |  0
70+ |  0.00 % |  0
Total |  |  40

##  4\. Conclusion

The purpose of this paper was to shed light on the question of which
programming languages are used by hackers. In order to achieve that goal, we
conducted a survey at the German Chaos Computer Club in May 2021. Our results
show that the members were using different programming languages at the time.
Shell scripts and Python were chosen most frequently. It also appears that the
C language family is still common. Another important finding is that the
choice of programming language does not play a vital role for hackers. Their
language preference has changed over time and will presumably continue to do
so in the future.

The number of responses we received does not allow for a representative
conclusion. Furthermore, the survey targeted only members of the CCC. The
findings might therefore be biased both regionally and in favour of a specific
group. Our results do, however, add to the extremely scarce literature on the
subject. The approach could serve as a model for future surveys, possibly at
international level.

##  Appendix A Additional Questions

This section contains responses to our questionnaire that were referenced but
not included in the main text.

Table 10. If your programming language preference has changed, which programming languages have you used for hacking more than a year ago? (You can choose more than one answer option) Options |  % Percentages |  # Responses
---|---|---
Bash/Shell/PowerShell |  47.06 % |  16
Python |  41.18 % |  14
C |  38.24 % |  13
PHP |  32.35 % |  11
C++ |  26.47 % |  9
JavaScript |  26.47 % |  9
Assembly |  23.53 % |  8
Java |  23.53 % |  8
Others |  20.59 % |  7
HTML/CSS |  17.65 % |  6
Perl |  14.71 % |  5
SQL |  8.82 % |  3
VB/VBA |  8.82 % |  3
C# |  5.88 % |  2
Rust |  5.88 % |  2
R |  2.94 % |  1
Ruby |  2.94 % |  1
Go |  0.00 % |  0
Kotlin |  0.00 % |  0
Lisp |  0.00 % |  0
Objective-C |  0.00 % |  0
Scala |  0.00 % |  0
Swift |  0.00 % |  0
TypeScript |  0.00 % |  0
Total Respondents 34 |  |
Table 11. Which integrated development environments (IDEs) have you used for hacking in the last year? (You can choose more than one answer option) Options |  % Percentages |  # Responses
---|---|---
Vim |  60.00 % |  24
Visual Studio Code |  50.00 % |  20
Others |  22.50 % |  9
IntelliJ |  17.50 % |  7
Visual Studio |  17.50 % |  7
Android Studio |  15.00 % |  6
Eclipse |  15.00 % |  6
Nano |  15.00 % |  6
Notepad++ |  15.00 % |  6
PyCharm |  12.50 % |  5
Sublime Text |  12.50 % |  5
Atom |  7.50 % |  3
IPython / Jupyter |  7.50 % |  3
NetBeans |  5.00 % |  2
PHPStorm |  5.00 % |  2
RubyMine |  5.00 % |  2
Xcode |  5.00 % |  2
Coda |  2.50 % |  1
Emacs |  2.50 % |  1
TextMate |  2.50 % |  1
Komodo |  0.00 % |  0
RStudio |  0.00 % |  0
Total Respondents 40 |  |

##  Appendix B Glossary

Term |  Definition
---|---
CCC |  Chaos Computer Club
Cracker |  Individual using computer knowledge with malicious intent
Erfa-Kreise |  Local and regional affiliates of the Chaos Computer Club
Hacker |  See Definition 1
Keylogger |  Software for keystroke recording
XSS |  Cross site scripting

## References

  * [1] Fahad Ali Sarwar.  Python Ethical Hacking from Scratch.  Packt Publishing, 2021.
  * [2] Stack Overflow.  2021 Stack Overflow Developer Survey.  https://insights.stackoverflow.com/survey/2021.  Accessed 2022-03-08.
  * [3] Simplilearn.  The 5 best programming languages for hacking in 2022.  https://www.simplilearn.com/tutorials/cyber-security-tutorial/programming-languages-for-hacking.  Accessed 2022-03-08.
  * [4] Madhurjya Chowdhury.  Top 8 programming languages for hacking 2021.  https://www.analyticsinsight.net/top-8-programming-languages-for-hacking-2021/, 08 2021.  Accessed 2022-03-08.
  * [5] Calltutors.  Learn best programming language for hacking.  https://www.calltutors.com/blog/programming-language-for-hacking/, 2020\.  Accessed 2022-03-08.
  * [6] UbuntuPIT.  The 15 best programming languages for hacking (ethical hacking).  https://www.ubuntupit.com/best-programming-languages-for-hacking/, 04 2021\.  Accessed 2022-03-08.
  * [7] Chaos Computer Club.  CCC—Home.  https://www.ccc.de/en/, 2022.  Accessed 2022-03-08.
  * [8] Chaos Computer Club.  Hacker Ethics.  https://www.ccc.de/en/hackerethics, 2022.  Accessed 2022-03-08.
  * [9] Alana Maurushat.  Ethical hacking.  University of Ottawa Press, 2019.
  * [10] Eric Steven Raymond.  How To Become A Hacker.  http://catb.org/~esr/faqs/hacker-howto.html, 2020.  Accessed 2022-03-08.
  * [11] Jon Ericson.  Hacking: The Art of Exploitation.  No Starch Press, 2 edition, 2008.
  * [12] Michael T. Simpson and Nicholas D. Antill.  Hands-On Ethical Hacking and Network Defense.  Cengage Learning, 3 edition, 2017.
  * [13] Ben Clark.  RTFM: Red Team Field Manual.  CreateSpace Independent Publishing Platform, 2014.
  * [14] TJ O’Connor.  Violent Python: A Cookbook for Hackers, Forensic Analysts, Penetration Testers and Security Engineers.  Newnes, 2012.
  * [15] Justin Seitz.  Black Hat Python: Python Programming for Hackers and Pentesters.  No Starch Press, 2015.
  * [16] Sanjib Sinha.  Beginning Ethical Hacking with Python.  Apress, 2017.
  * [17] Stephen Turner.  Security vulnerabilities of the top ten programming languages: C, Java, C++, Objective-C, C#, PHP, Visual Basic, Python, Perl, and Ruby.  Journal of Technology Research, 5, 2014.
  * [18] Sagar Samtani, Ryan Chinn and Hsinchun Chen.  Exploring hacker assets in underground forums.  2015 IEEE International Conference on Intelligence and Security Informatics (ISI), 2015.
  * [19] James H McMillan.  Educational research: Fundamentals for the consumer.  ERIC, 1996.
  * [20] Chaos Computer Club.  Erfa-Kreise.  https://www.ccc.de/en/club/erfas, 2022.  Accessed 2022-03-08.
  * [21] Stack Overflow.  2019 Stack Overflow Developer Survey.  https://insights.stackoverflow.com/survey/2019.  Accessed 2022-03-10.
  * [22] Kaggle.  State of Data Science and Machine Learning 2020.  https://www.kaggle.com/kaggle-survey-2020.  Accessed 2022-03-08.
  * [23] Jürgen Raithel.  Quantitative Forschung.  Springer, 2008.
  * [24] Kali Linux.  Kali Linux Features.  https://www.kali.org/features/.  Accessed 2022-03-10.