subfig

# Variational Autoencoders for Reliability Optimization in Multi-Access Edge
Computing Networks

Arian Ahmadi, Omid Semiari, Mehdi Bennis, and Mérouane Debbah This research
was supported by the U.S. National Science Foundation under Grants CNS 1941348
and CNS 2008646.A. Ahmadi and O. Semiari are with the Department of Electrical
and Computer Engineering, University of Colorado, Colorado Springs, CO, 80918
USA (Email<EMAIL_ADDRESS>osemiari@uccs.edu). M. Bennis is with the
Department of Communications Engineering, University of Oulu, FI-90014, Oulu,
Finland (Email: mehdi.bennis@oulu.fi).M. Debbah is with the Technology
Innovation Institute, (email<EMAIL_ADDRESS>and also with the
Mohamed Bin Zayed University of Artificial Intelligence, 9639 Masdar City, Abu
Dhabi, United Arab Emirates.

###### Abstract

Multi-access edge computing (MEC) is viewed as an integral part of future
wireless networks to support new applications with stringent service
reliability and latency requirements. However, guaranteeing ultra-reliable and
low-latency MEC (URLL MEC) is very challenging due to uncertainties of
wireless links, limited communications and computing resources, as well as
dynamic network traffic. Enabling URLL MEC mandates taking into account the
statistics of the end-to-end (E2E) latency and reliability across the wireless
and edge computing systems. In this paper, a novel framework is proposed to
optimize the reliability of MEC networks by considering the distribution of
E2E service delay, encompassing over-the-air transmission and edge computing
latency. The proposed framework builds on _correlated_ variational
autoencoders (VAEs) to estimate the full distribution of the E2E service
delay. Using this result, a new optimization problem based on risk theory is
formulated to maximize the network reliability by minimizing the Conditional
Value at Risk (CVaR) as a risk measure of the E2E service delay. To solve this
problem, a new algorithm is developed to efficiently allocate users’
processing tasks to edge computing servers across the MEC network, while
considering the statistics of the E2E service delay learned by VAEs. The
simulation results show that the proposed scheme outperforms several baselines
that do not account for the risk analyses or statistics of the E2E service
delay.

##  I Introduction

The sixth-generation (6G) wireless cellular network must support a broad range
of new applications with ultra-high reliability and low latency service
requirements [1]. Among these emerging applications include factory
automation, connected and autonomous vehicles (CAVs), and extended reality
(XR) with strict quality-of-service (QoS) requirements on the end-to-end (E2E)
latency (e.g., 1 ms) and reliability (e.g., $10^{-8}$ packet loss probability)
[2]. To meet such stringent service requirements, multi-access edge computing
(MEC) is an attractive solution to significantly reduce service latency by
enabling base stations (BSs) to process computing tasks (e.g., XR rendering)
for user equipment (UE) directly within the radio access network (RAN) without
relying on remote cloud servers [3, 4].

While promising, delivering a guaranteed performance over MEC is challenging
due to random wireless channel variations, stochastic task arrival, as well as
heterogeneity of edge computing servers and computing tasks. Furthermore,
given the resource limitations of wireless networks and edge servers (e.g., in
terms of bandwidth or computing power), the MEC network can easily get
overloaded, leading to computing task drops and poor QoS. Hence, it is
imperative to develop novel solutions for optimizing the allocation of edge
computing resources to UEs’ processing tasks within the MEC, while taking into
account the statistics of E2E reliability and latency across communications
and computing systems.

Recently, a large body of work [4, 5, 3, 6, 7] has focused on ultra-reliable
and low-latency MEC (URLL MEC). Most of these existing works do not rely on
statistical analyses of E2E reliability and latency since deriving full
distribution of these metrics via traditional model-based approaches is very
challenging. For URLL MEC, in particular, there is a need to account for joint
wireless and edge computing constraints and conventional model-based
approaches are not tractable in such complex network scenarios. As an
alternative to model-based methods, model-free approaches based on machine
learning (ML) along with computing capabilities of UEs and BSs can provide new
opportunities for enabling URLL MEC.

In this regard, the body of work in [8, 9, 10, 11] presents several new
schemes based on deep neural networks (DNNs) and deep reinforcement learning
(DRL) to optimize the network performance for URLL MEC applications. The
authors in [9] propose a decentralized resource allocation technique using DRL
for vehicular communications. In [10], the authors present a DRL-based
resource allocation scheme for URLL MEC. However, most of existing works
assume that explicit traffic and queue models are available to the resource
management system. In [11], the concept of experienced deep reinforcement
learning is proposed via generative adversarial networks (GANs) in order to
provide model-free resource allocation for low latency services. However,
existing model-free methods (e.g., in [11]) do not account for the
distribution of E2E reliability or latency or statistical correlation between
computing and communication delays when designing task assignment in MEC
networks. In contrast with the prior art, we develop a new ML-based approach
for statistical optimization of E2E reliability in MEC networks.

The main contribution of this paper is a novel framework to optimize the
reliability of MEC networks while considering the distribution of the _E2E
service delay_ , comprising the over-the-air transmission and edge computing
latencies. To derive the distribution of the E2E service delay, the proposed
method builds on correlated variational autoencoders (VAEs) which are powerful
deep generative models for estimating the probability density function (PDF)
of latent variables that represent the feature space of the training data.
This is achieved by modeling the transmission and computing delays as two
correlated Gaussian random variables (within a two-dimensional latent space).
Then, using the derived distribution for the E2E service delay, we define a
reliability metric for the MEC network and formulate a new optimization
problem based on risk theory that aims to maximize the network reliability by
efficiently allocating the edge computing resources to UEs’ processing tasks
across the RAN, while accounting for the constraints of the wireless network
and edge computing servers.

In particular, the proposed optimization problem uses the concept of
Conditional Value at Risk (CVaR) to capture the tail of the system’s E2E
service delay distribution learned by the correlated VAE. Given that the
proposed problem is a mixed integer non-linear programming (MINLP) and
difficult to solve, a new algorithm is developed to jointly solve the task
allocation problem and computing resource allocation across the MEC.
Comprehensive simulations are performed based on both synthetic and real data
for a network of CAVs as a case study. The results show that the proposed
correlated VAE scheme can effectively capture the correlation between over-
the-air transmission and computing latencies resulting from an imbalanced load
distribution in MEC. In addition, the results show that the proposed approach
can guarantee 30 ms E2E service delay with a high probability of 0.9999
compared to two other baselines that can only satisfy this E2E latency
requirement with probabilities less than 0.92.

The rest of the paper is organized as follows. Section II presents the system
model. Section III presents the proposed approach for deriving the
distribution of the service delay. Section IV describes the problem
formulation and the proposed solution. Simulation results are provided in
Section V and conclusions are presented in Section VI.

##  II System Model

Consider an MEC network consisting of a set $\mathcal{M}$ of $M$ UEs and a set
$\mathcal{N}$ of $N$ BSs. This network allows UEs to submit their computing
tasks along with the associated data (e.g., camera and LiDAR outputs for
rendering a high-definition map for CAVs) to a nearby BS. Each BS collects the
requests from UEs in the uplink, uses its edge computing server to process the
tasks, and sends the results back to its assigned UEs over downlink
transmissions. Therefore, the _E2E service delay_ for a UE $m\in\mathcal{M}$
served by a BS $n\in\mathcal{N}$ can be defined as [12]

$\tau(m,n)=\left[\tau_{t}(m,n)\right]T+\tau_{p}(m,n),\vspace{-0.15cm}$ (1)

where $T$ is the duration of one transmission time interval (TTI) and
$\tau_{t}(m,n)$ represents the total over-the-air transmission latency over
uplink and downlink, in terms of the number of TTIs. In addition,
$\tau_{p}(m,n)$ is the computational latency at the edge server of a BS $n$ to
process the requested task by UE $m$. Using (1), we can deﬁne the reliability
of the link between BS $n$ and UE $m$ within the MEC network as

$\operatorname{F}_{\tau(m,n)}(\tau_{\text{th}})=\operatorname{P}(\tau(m,n)<\tau_{\text{th}}),\vspace{-0.15cm}$
(2)

where $\tau_{\text{th}}$ is a delay threshold that is determined based on the
QoS requirement. In fact, (2) implies that the reliability depends on the
cumulative distribution function (CDF) of the E2E service delay $\tau$. Next,
we explain the transmission and computing latencies in details.

###  II-A Over-the-Air Transmission Latency

The overall transmission latency consists of the downlink and uplink
transmission latencies as follow:

$\tau_{t}(m,n)=\tau_{d}(m,n)+\tau_{u}(m,n),$ (3)

where $\tau_{u}(m,n)$ represents the uplink transmission latency for UE $m$ to
send its computing task request along with any associated data to BS $n$. Due
to the wireless fading channel, some packets may not be decoded successfully
at the BS, hence, retransmission is needed. With this in mind, the uplink
transmission latency is given by:

$\tau_{u}(m,n)=\sum_{j=1}^{J}\left\lceil\frac{I_{u}}{R_{uj}(m,n)T}\right\rceil,\vspace{-0.15cm}$
(4)

where $\lceil.\rceil$ is the ceiling function, $J-1$ is the number of
retransmissions, and $I_{u}$ is the uplink packet size (in bits). In (4),
$R_{uj}(m,n)$ represents the uplink data rate for the $j$-th transmission of a
packet during one TTI and is given by:

$R_{uj}(m,n)=w\log_{2}\left(1+\gamma_{uj}(m,n)\right),\vspace{-0.15cm}$ (5)

where $w$ is the channel bandwidth. Moreover, $\gamma_{uj}(m,n)$ is the uplink
signal-to-interference-plus-noise ratio (SINR) and is given by

$\gamma_{uj}\left(m,n\right)=\frac{G_{m}G_{n}P_{m}h_{mnj}L_{mn}}{\sum_{m^{\prime}\neq
m}P_{m^{\prime}n}+\sigma_{n}^{2}},\vspace{-0.15cm}$ (6)

where $P_{m}$, $P_{m^{\prime}n}$, and $\sigma_{n}^{2}$ denote, respectively,
the transmit power of UE $m$, the received power from an interfering UE
$m^{\prime}$, and the noise power. $G_{m}$ and $G_{n}$ are the antenna gains
for UE $m$ and BS $n$, respectively. In addition, $h_{mnj}$, and $L_{mn}$
represent, respectively, the Rayleigh fading channel gain for the $j$-th
transmission and path loss of the uplink between UE $m$ and BS $n$. The
channel gain $h_{mnj}$ is considered flat-fading over the bandwidth $w$ and
constant during the transmission of one packet. Similar to (4), the downlink
transmission latency, $\tau_{d}(m,n)$, for sending the processed results from
BS $n$ to UE $m$ will be

$\tau_{d}(m,n)=\sum_{i=1}^{I}\left\lceil\frac{I_{d}}{R_{di}(m,n)T}\right\rceil,\vspace{-0.15cm}$
(7)

where $I_{d}$ is the downlink packet size in bits and $I-1$ is the number of
retransmissions. In (7), $R_{di}(m,n)$ represents the downlink data rate for
the $i$-th transmission of a packet and is given by:

$R_{di}(m,n)=w\log_{2}\left(1+\gamma_{di}(m,n)\right).\vspace{-0.15cm}$ (8)

In (8), $\gamma_{di}(m,n)$ is the downlink SINR which is given by

$\gamma_{di}(m,n)=\frac{G_{m}G_{n}P_{n}h_{mni}L_{mn}}{\sum_{n^{\prime}\neq
n}P_{mn^{\prime}}+\sigma_{n}^{2}},\vspace{-0.15cm}$ (9)

where $P_{n}$ and $P_{mn^{\prime}}$ denote, respectively, the transmit power
of BS $n$ and the received power from interfering BS $n^{\prime}$ at the UE
$m$’s receiver.

###  II-B Computing Latency at Edge Computing Servers

Computing latency refers to the time needed for executing a task at an edge
computing server within the MEC network. The execution time of a task depends
on the data to be processed and the tasks submitted, therefore, it can be
modeled as a random variable [12]. For instance, the execution time for
performing the object detection highly depends on the quality or level of
details in the captured images, as well as the type (GPU vs. CPU) and
processing resources (e.g., processing bandwidth) of the edge server.

Let $f_{max}$ denote the maximum computing-cycle frequency of edge processors
for each BS, and $f_{m}$ as the computing-cycle frequency (i.e., the number of
computing-cycles required to process one bit of data) allocated to the task
requested by UE $m$. Therefore, the total cycles needed for processing the
submitted task by UE $m$ will be $c_{m}=f_{m}I_{u}$. In addition, we define
$f(m,n)$ as the computing frequency allocated to UE $m$ by BS $n$. Therefore,
the Computing latency in (1) can be calculated as
$\tau_{p}(m,n)=\frac{c_{m}}{f(m,n)}$.

Given the proposed model, deriving the distribution of the E2E service delay
is very challenging due to the stochastic effects of the wireless fading
channel, noise, random queuing delays at the transmitters and edge computing
servers, packet retransmissions, along with heterogeneity of processing tasks
and edge computing resources. To address this challenge, in the next section,
we will adopt a new approach based on VAEs to derive the distribution of the
E2E service delay. While the proposed models in Section II are not used
directly to derive the distribution of E2E service delay, they will be used to
generate the data for training the VAE model.

##  III Correlated VAE for Learning the Distribution of the Service Delay

Next, we first review the standard VAE. Then, we present the adopted
correlated VAE model that will be used to capture the correlation between the
transmission and computing latencies.

###  III-A Standard VAE model

The standard VAE model consists of a DNN that performs as an encoder followed
by a second DNN that serves as a decoder [13]. The encoder of the VAE takes
$\boldsymbol{x}=\left[{x}_{1},\ldots,{x}_{D}\right]\subseteq\mathbbm{R}^{D}$
as input and encodes the data into a latent representation
$\boldsymbol{z}=\left[{z}_{1},\ldots,{z}_{d}\right]\subseteq\mathbbm{R}^{d}$.
Using the latent representation, the decoder aims to generate a reconstruction
data that is statistically similar to the input data. In the MEC network, BSs
can train VAEs to learn the distribution of the service delay by considering
the transmission and computing latencies as the two variables of the latent
space (i.e., $\boldsymbol{z}=[\tau_{t},\tau_{p}]$).

More specifically, the VAE generates the latent representation
$\boldsymbol{z}$ by drawing $L$ independent samples
${z}_{l}\stackrel{{\scriptstyle i.i.d}}{{\sim}}p_{\theta}({z}_{l})$,
$l\in\\{1,2,\cdots,L\\}$, from the prior distribution $p_{\theta}$ which
usually is a standard Gaussian distribution. Then, the decoder generates $L$
independent data points ${x}_{l}\sim
p_{\boldsymbol{\theta}}\left({x}_{l}\mid{z}_{l}\right)$ from the model
conditional distribution $p_{\boldsymbol{\theta}}$. The objective of the VAE
is to maximize the marginal likelihood
$p_{\boldsymbol{\theta}}(\boldsymbol{x})$, where $\boldsymbol{\theta}$ is a
vector of all parameters in the decoder
$p_{\boldsymbol{\theta}}(\boldsymbol{x}|\boldsymbol{z})$. The marginal
likelihood is intractable [13], and is approximated by the evidence lower
bound (ELBO) defined as

$\mathcal{L}(\boldsymbol{\theta},{\phi})=\langle\log
p_{\boldsymbol{\theta}}(\boldsymbol{x}|\boldsymbol{z})\rangle_{q_{{\phi}(\boldsymbol{z}|\boldsymbol{x})}}-\mathrm{KL}[q_{{\phi}}(\boldsymbol{z}|\boldsymbol{x})\|p_{\boldsymbol{\theta}}(\boldsymbol{z})],\\!\\!$
(10)

which satisfies $\mathcal{L}(\boldsymbol{\theta},{\phi})\leq\log
p_{\boldsymbol{\theta}}(\boldsymbol{x})$. In (10),
$q_{{\phi}}(\boldsymbol{z}|\boldsymbol{x})$ is the encoder network
parameterized by ${\phi}$, KL$[\cdot\|\cdot]$ denotes Kullback-Leibler (KL)
divergence, and $\langle\cdot\rangle_{p(\cdot)}$ is the expectation over a
distribution $p(\cdot)$.

We use a finite set of $L$ samples of $\boldsymbol{z}$ to approximate the
expectation in (10) as

$\\!\mathcal{L}(\boldsymbol{\theta},\\!{\phi})\simeq\frac{1}{L}\\!\sum_{l}[\log
p_{\boldsymbol{\theta}}(\boldsymbol{x}_{l}|\boldsymbol{z}_{l})-\mathrm{KL}[q_{{\phi}}(\boldsymbol{z}_{l}|\boldsymbol{x}_{l})\|p_{\boldsymbol{\theta}}(\boldsymbol{z}_{l})]].\vspace{-0.15cm}$
(11)

The VAE loss function is the sum of two loss terms – a reconstruction loss,
and a latent loss. The former is used to fit the reconstructed vector to the
original vector, whereas the latter pushes the variational distribution
$q_{{\phi}}(\boldsymbol{z}|\boldsymbol{x})$ towards the prior distribution
$p_{\theta}\left(\boldsymbol{z}\right)$. However, sampling $\boldsymbol{z}$
from $q_{{\phi}}(\boldsymbol{z}|\boldsymbol{x})$ is a non-differentiable
operation. The work-around this issue is the “reparametrization trick” by
creating randomness from a fixed distribution
$\boldsymbol{\epsilon}\sim\mathcal{N}(\boldsymbol{\mu}_{prior},\boldsymbol{\sigma}_{prior}\mathbf{I_{d}})$.
Then, the samples of the appropriate distribution can be generated by
computing
$\mathbf{z}_{l}=\boldsymbol{\mu}_{l}+\tilde{\mathbf{C}}_{l}\boldsymbol{\epsilon}$
where $\boldsymbol{\mu}_{l}$ is the mean vector of the posterior learned for
the $l_{th}$ sample and $\tilde{\mathbf{C}}_{l}$ is the Choleskiy
decomposition of the corresponding covariance matrix $\mathbf{C}_{l}$. While
the prior distribution is chosen as
$p_{\boldsymbol{\theta}}(\boldsymbol{z})=\mathcal{N}(\boldsymbol{\mu}_{prior},\boldsymbol{\sigma}_{prior}\mathbf{I_{d}})$,
the standard choice widely adopted for the sample-wise approximate posterior
is to set
$\mathbf{C}_{l}^{(\mathbf{s})}=\operatorname{diag}\left(\mathbf{s}_{l}\right)$.
In other words,
$q_{\phi}\left(\mathbf{z}_{l}\mid\mathbf{x}_{l}\right)=\mathcal{N}\left(\boldsymbol{\mu}_{l},\operatorname{diag}\left(\mathbf{s}_{l}\right)\right)$
hence, the latent loss in (11) can be written as

$\displaystyle\mathrm{KL}[q_{{\phi}}(\boldsymbol{z}_{l}|\boldsymbol{x}_{l})\|p_{\boldsymbol{\theta}}(\boldsymbol{z}_{l})]=$
(12)
$\displaystyle\frac{1}{2}\left[\frac{\mathbf{s}^{2}_{l}}{\boldsymbol{\sigma}^{2}_{prior}}+\frac{(\boldsymbol{\mu}_{l}-\boldsymbol{\mu}_{prior})^{2}}{\boldsymbol{\sigma}^{2}_{prior}}\right.\left.-d-\log(\frac{\mathbf{s}_{l}}{\boldsymbol{\sigma}_{prior}})\right].$

Since the variational distribution $q_{{\phi}}(\boldsymbol{z}|\boldsymbol{x})$
factorizes over input data points and the prior distribution is i.i.d.
Gaussian, the KL-divergence in the ELBO is a sum over the per-data-point KL-
divergence terms, which means that we disregard any correlation within
dimensions of the latent space. In our problem, this will be a limiting aspect
as the transmission and computing latencies can be correlated. For example, if
a BS is overloaded (i.e., many UEs are assigned to one BS), both wireless and
computing resources will be distributed among a large set of UEs, which can
lead to an increase in both transmission and computing delays.

###  III-B Correlated VAE model

Since the standard VAE does not allow any correlation between the dimensions
of the approximate posterior, in this section, we implement a new class of
VAEs that uses the first-order autoregressive Gaussian,
$q_{\phi}\left(\mathbf{z}_{l}\mid\mathbf{x}_{l}\right)=\mathcal{N}\left(\boldsymbol{\mu}_{l},\mathbf{C}_{(\rho,s)}\right)$,
instead of the standard Gaussian with diagonal covariance. First-order
autoregressive covariance, $\mathbf{C}_{(\rho,s)}$, is characterized by a
scaling factor $s$ and a scalar $\rho$ to control the level of correlation and
is defined as

$\mathbf{C}_{(\rho,s)}=s\begin{bmatrix}1&\rho&\rho^{2}&\ldots{}&\rho^{d-1}\\\
\rho&1&\rho&\ldots{}&\rho^{d-2}\\\ \rho^{2}&\rho&1&\ldots{}&\rho^{d-3}\\\
\mathmakebox[\widthof{{}\ldots{}}][c]{\vdots}&\mathmakebox[\widthof{{}\ldots{}}][c]{\vdots}&\mathmakebox[\widthof{{}\ldots{}}][c]{\vdots}&\ldots{}&\mathmakebox[\widthof{{}\ldots{}}][c]{\vdots}\\\
\rho^{d-1}&\ldots{}&\rho^{2}&\rho&1\end{bmatrix},\vspace{-0.15cm}$ (13)

where $s$ is a positive scalar and the correlation parameter $\rho$ is bounded
between [-1,1]. The determinant for this matrix can be obtained as [14]

$\operatorname{det}\left(\mathbf{C}_{(\rho,s)}\right)=s^{d}\left(1-\rho^{2}\right)^{d-1},$
(14)

based on which we can derive the regularization term of the loss function as

$\displaystyle\mathrm{KL}[q_{{\phi}}(\boldsymbol{z}_{l}|\boldsymbol{x}_{l})\|p_{\boldsymbol{\theta}}(\boldsymbol{z}_{l})]\\!=\frac{1}{2}\left[d\left(-1-\log(\frac{s}{\boldsymbol{\sigma}_{prior}})+\right.\right.$
(15)
$\displaystyle\left.\left.\frac{s^{2}}{\boldsymbol{\sigma}^{2}_{prior}}\right)+\frac{(\boldsymbol{\mu}_{l}\\!-\\!\boldsymbol{\mu}_{prior})^{2}}{\boldsymbol{\sigma}^{2}_{prior}}\\!-(d-1)\\!\log(1-\rho^{2})\right].$

Within the developed model for the MEC network, each BS collects a dataset
including wireless transmission and computing delays from previous
communications, and uses this dataset to train the proposed correlated VAE
model. In order to evaluate the joint distribution of the transmission and
computing latencies given a data point $\boldsymbol{x}$,
$q_{{\phi}}(\boldsymbol{z}|\boldsymbol{x})$, we use the 1-dimensional
convolutional network (CNN) encoder with two convolutional layers. Each
convolution is followed by the rectified linear unit layer that introduces
nonlinearity into the extracted features. These extracted features are
concatenated into a single vector which is connected to a fully connected (FC)
layer. Then, there is a decoder network,
$p_{\boldsymbol{\theta}}(\boldsymbol{x}|\boldsymbol{z})$, that mirrors the
encoder to reconstruct the input $\boldsymbol{x}$ back from the latent space
sample $\boldsymbol{z}$.

Using the proposed learning framework, the CDF of the E2E service delay
$F_{\tau(m,n)}(.)$, defined in (2), can be easily obtained from
$q_{\phi}(\boldsymbol{z}|\boldsymbol{x})$, i.e., the joint distribution of the
transmission and computing latencies.

Algorithm 1 Proposed Algorithm for Joint Task Assignment and Computing
Resource Allocation

0: $\mathcal{N}$, $\mathcal{M}$, $\boldsymbol{x}$

0: $\boldsymbol{v}$ and $\boldsymbol{f}$

1: while $\boldsymbol{\theta}$ and $\phi$ are not converged do

2: Randomly select minibatch of dataset $\boldsymbol{x}$.

3: Feed the selected minibacth into CNN encoder
$q_{{\phi}}(\boldsymbol{z}|\boldsymbol{x})$.

4: Randomly sample
$\epsilon\sim\mathcal{N}(\boldsymbol{\mu}_{prior},\boldsymbol{\sigma}_{prior}\mathbf{I_{d}})$.

5: Calculate latent representation $\boldsymbol{z}$.

6: Feed $\boldsymbol{z}$ into CNN decoder
$p_{\boldsymbol{\theta}}(\boldsymbol{x}|\boldsymbol{z})$.

7: Calculate VAE loss function in (15), update $\boldsymbol{\theta}$ and
$\phi$.

8: end while

9: while maximum number of iterations is not reached do

10: Using the distribution of E2E service delay obtained from Steps 1 to 8,
solve the task assignment in (22a)-(22d) and find $\boldsymbol{v^{*}_{mn}}$.

11: Substitude $\boldsymbol{v^{*}_{mn}}$ into (21a) and solve computing
resource allocation in (23a)-(23b).

12: end while

##  IV VAE-Based Reliability Optimization in MEC Networks

Using the learned correlated VAE models, in this section, we propose a new
optimization problem based on risk theory to minimize the _risk_ as the
performance metric, thus maximizing the reliability of MEC networks.

###  IV-A Problem Formulation

We build our problem formulation on the risk theory [15] that uses the concept
of CVaR as a risk measure to characterize the tail distribution of the E2E
service delay $\tau$. The CVaR provides the average of loss that exceeds the
Value-at-Risk (VaR). The $\alpha$-VaR is the $\alpha$-percentile of
distribution of a random variable given by [16]:

$\operatorname{VaR}_{\alpha}(\tau(m,n))\\!=\\!\arg\inf_{\tau_{\text{th}}}\\{\tau_{\text{th}}:1-\operatorname{F}_{\tau(m,n)}(\tau_{\text{th}})\leq\alpha\\},$
(16)

where $\alpha\in(0,1)$. In addtion, the function
$\operatorname{F}_{\tau(m,n)}(\tau_{\text{th}})$, defined in (2), is the CDF
of the service delay that is learned by the VAE approach proposed in Section
III. The CVaR function is defined as

$\\!\\!\operatorname{CVaR}_{\alpha}(\tau(m,n))\\!=\\!\mathbbm{E}\left[\tau(m,n)\\!\mid\\!\tau(m,n)\\!>\\!\operatorname{VaR}_{\alpha}(\tau(m,n))\right].\\!$
(17)

Next, we define an auxiliary function

$\\!\phi_{\alpha}(\tau(m,n),\tau_{\text{th}})\\!:=\\!\tau_{\text{th}}\\!+\\!\frac{1}{1-\alpha}\mathbbm{E}\left[(\tau(m,n)\\!-\\!\tau_{\text{th}})^{+}\right],\\!\vspace{-0.15cm}$
(18)

where $(x)^{+}=\max(0,x)$ and the expectation is taken with respect to the
distribution of the channel gain. According to [16], the CVaR of $\tau(m,n)$
can finally be calculated as

$\operatorname{CVaR}_{\alpha}(\tau(m,n))=\min_{\tau_{\text{th}}\in\mathbbm{R}}(\phi_{\alpha}(\tau(m,n)),\tau_{\text{th}}).\vspace{-0.15cm}$
(19)

Meanwhile, we denote $\boldsymbol{v}$ as an association vector defined as

$\boldsymbol{v}_{mn}=\left\\{\begin{array}[]{ll}1,&\text{ If UE }m\text{ is
assigned to BS }n,\\\ 0,&\text{ otherwise.
}\vspace{-0.12cm}\end{array}\right.$ (20)

To optimize the network reliability, our goal is to minimize the maximum risk
among all the UEs, which can be described by the following optimization
problem:

$\displaystyle\min_{\boldsymbol{v,f}}\max_{m\in\mathcal{M}}\,\,\,$
$\displaystyle\boldsymbol{v}_{mn}\beta\text{CVaR}_{\alpha}(\tau(m,n))$ (21a)
s.t., $\displaystyle\sum_{n\in\mathcal{N}}v_{mn}\leq 1,\forall
m\in\mathcal{M},$ (21e) $\displaystyle\sum_{m\in\mathcal{M}}v_{mn}\leq
M,\forall n\in\mathcal{N},$ $\displaystyle\sum_{m\in\mathcal{M}}f(m,n)\leq
f_{max},\forall n\in\mathcal{N},$ $\displaystyle
v_{mn}\in\\{0,1\\},\vspace{-0.15cm}$

where the objective function represents the risk measure for the MEC network
and depends on the tail distribution of the service delay $\tau$ (derived via
the correlated VAE) and $\beta\in(0,1)$ is the weight of the CVaR. Moreover,
(21e) and (21e) represent, respectively, the constraint to ensure that each UE
is associated to at most one BS, and each BS can serve up to $M$ UEs. (21e)
indicates that the sum of the computation frequency allocated to UEs should
not exceed the maximum computation frequency.

The proposed optimization problem in (21a)-(21e) is a non-convex MINLP, hence,
it is difficult to solve. Next, we develop a new efficient algorithm to solve
this problem.

###  IV-B Proposed Algorithm for Joint Task Assignment and Resource Allocation

The proposed algorithm is summarized in Algorithm 1 which decomposes the
problem into two sub-problems that solve the task and computing resource
allocation problems within MEC. The first sub-problem is formulated as

$\displaystyle\min_{\boldsymbol{v}}\max_{m\in\mathcal{M}}$
$\displaystyle\sum_{n\in\mathcal{N}}{\boldsymbol{v}_{mn}}\beta\text{CVaR}_{\alpha}(\tau_{t}(m,n))$
(22a) s.t. $\displaystyle\sum_{n\in\mathcal{N}}v_{mn}\leq 1,\forall
m\in\mathcal{M},$ (22b) $\displaystyle\sum_{m\in\mathcal{M}}v_{mn}\leq
M,\forall n\in\mathcal{N},$ (22c) $\displaystyle 0\leq v_{mn}\leq 1.$ (22d)

The constraint (22d) is obtained from the integer programming relaxation of
the constraint (21e). The optimization problem in (22a)-(22d) can be solved
via applying the Karush-Kuhn-Tucker (KKT) conditions. After finding the
optimal association vector, $\boldsymbol{v}^{*}_{mn}$, we substitute it into
(21a) and formulate the second sub-problem as follows:

$\displaystyle\min_{\boldsymbol{f}}\max_{m\in\mathcal{M}}$
$\displaystyle\sum_{n\in\mathcal{N}}\boldsymbol{v}^{*}_{mn}\beta\text{CVaR}_{\alpha}(\tau_{p}(m,n))$
(23a) s.t. $\displaystyle\sum_{m\in\mathcal{M}}f(m,n)\leq f_{max},\forall
n\in\mathcal{N}.\vspace{-0.2cm}$ (23b)

Since $\tau_{p}(m,n)=\frac{c_{m}}{f(m,n)}$, the problem in (23a) is a non-
convex optimization problem. To transform it into a convex problem, we use an
auxiliary variable $g(m,n)=[\frac{1}{f(m,n)}]$, $\forall m\in\mathcal{M}$ and
$\forall n\in\mathcal{N}$. Then, the computing resource allocation problem can
be reformulated as

$\displaystyle\min_{{g}}\max_{m\in\mathcal{M}}$
$\displaystyle\sum_{n\in\mathcal{N}}\boldsymbol{v}^{*}_{mn}\beta\text{CVaR}_{\alpha}(c_{m}{g}(m,n))$
(24a) s.t.
$\displaystyle\sum_{m\in\mathcal{M}}\frac{\boldsymbol{v}^{*}_{mn}}{g(m,n)}\leq
f_{max},\forall n\in\mathcal{N},$ (24b)

which is a convex optimization problem.

##  V Simulation Results

In this section, we evaluate the performance of the proposed scheme for
reliability optimization in MEC networks. As a case study, we consider a
network of CAVs that leverages an MEC network to manage processing tasks
required for their autonomous navigation. The downlink and uplink packet sizes
are selected randomly from a uniform distribution with a range $[1,10]$ kbits.
Simulation parameters are summarized in Table I. We compare the performance of
the proposed method with two baseline approaches. The first baseline approach,
hereinafter referred to as “Baseline 1”, aims to minimize the maximum average
service delay among all the CAVs, , i.e., $\mathbbm{E}\left[\tau(m,n)\right]$.
The second baseline, hereinafter referred to as “Baseline 2”, aims to minimize
an upper bound (derived in [15]) for the weighted sum of the average service
delay and the CVaR, i.e.,
$\mathbbm{E}\left[\tau(m,n)\right]+\beta\mathrm{CVaR}_{\alpha}\left(\tau(m,n)\right)$.
A detailed description of the two baseline approaches is available in [15].

Therefore, the baseline methods rely only on the average performance metrics
and do not take into account the VAEs’ outcomes for solving the joint task
assignment and computing resource allocation. The performance was evaluated by
averaging the results over sufﬁciently large Monte Carlo runs.

TABLE I:  Simulation Parameters Notation |  Parameter |  Value
---|---|---
$N$ |  Number of BSs |  10
$M$ |  Number of CAVs |  40
$P_{n}$ |  Transmit power of a BS |  100 mW
$P_{m}$ |  Transmit power of a CAV |  10 mW
$G_{n}$,$G_{m}$ |  Antenna gains |  1
$f_{max}$ |  Computing frequency |  20 GHz
$N_{0}$ |  Noise power spectral density |  $-90$ dBm/Hz
$W$ |  Total system bandwidth |  100 MHz
$\tau_{\text{th}}$ |  Service delay requirement |  10-100 ms[1]

###  V-A Training data

In order to compute the computational latency in a realistic scenario, we use
one of the most powerful object detection CNN algorithms, namely YOLOv3 (You
Only Look Once). Here, we consider object detection since it is one of the
common processing tasks in applications such as CAVs or XR that rely on
computer vision.

We use Berkeley Deep Drive 100k (BDD100K) dataset to train the CNN. BDD100K
consists of more than 100,000 images of size 1280×720 with ten different
classes (bus, traffic light, traffic sign, person, bike, truck, motorcycle,
car, train, rider) with a training set of 70,000 image-label pair, a test set
of 20,000 image-label pair and a validation set of 10,000 data. We use
ImageNet pre-trained network parameters given in repository and train the
model over 10 epochs using a deep learning server equipped with i9-9920X
X-series CPU, 128GB DDR4 memory, and two Quadro RTX 6000 GPUs plus NVLink.

###  V-B Results and discussion

Figure. 1 shows the average loss function for the training of the correlated
VAE versus the number of epochs. Here, the average loss is computed by
averaging $\mathcal{L}$ over large independent runs. From Fig. 1, we observe
that the loss decreases rapidly, showing the fast convergence of the VAE. The
results show that the proposed correlated VAE successfully converges within
reasonably small number of epochs.

Figure 1: Correlated VAE loss function versus the number of epochs.

Figure 2: CDF of the E2E service delay.

Figure 3: Average E2E service delay versus the computing frequency.

Figure. 2 compares the CDF of the E2E service delay, and equivalently, the
network’s reliability, resulting from the proposed approach and the two
baseline methods. The results in Fig. 2 show that the proposed approach
completely outperforms the baseline schemes. For example, we can observe that
the proposed approach can guarantee 30 ms E2E latency with a probability of
0.9999, ensuring a high reliability for the MEC network. However, both
baseline approaches can only satisfy this E2E latency requirement with
probabilities less than 0.92. In addition, as shown in Fig. 2, baseline 2
performs better compared to baseline 1 indicating that adding the CVaR to the
optimization objective can reduce the risk of high delays.

Figure. 3 compares the average E2E service delay for the proposed approach
with the baseline methods, versus the computing-cycle frequency of each BS. It
can be seen that by increasing the computing-cycle frequency, the E2E service
delay decreases for all the three methods. Furthermore, we note that the E2E
service delay does not reach zero when the computing-cycle frequency is
relatively high. This is because for a high computing-cycle frequency, the
total delay is mainly determined by a non-zero transmission delay. The results
in Fig. 3 also show that the proposed algorithm outperforms the other two
schemes. For example, for $f$=30 GHz, the performance gain is up to 18% and
10%, respectively, compared to baseline methods 1 and 2 when $N=10$ BSs and
$M=40$ CAVs. More importantly, the results verify the near-optimal performance
of the proposed method compared with the optimal solution obtained from an
exhaustive search for a network with $N=2$ BSs and $M=10$ CAVs. For instance,
the optimality gap for $f=70$ GHz is only $5\%$ and it reduces as the
computing cycle increases. Also, the performance gains compared to baseline
methods 1 and 2 are $35\%$ and $30\%$, respectively.

Figure 4: Average E2E service delay versus the number of CAVs.

Figure 5: Scatter plot of the mean for the transmission and computing
latencies within the correlated VAE’s latent space.

In Fig. 4, the average E2E service delay per CAV versus the network size is
shown for the proposed approach and the two baseline methods. Clearly, the
average E2E service delay increases as more CAVs exist in the network. The
results in Fig. 4 show the superior performance of the proposed approach
compared to the baseline methods. For example, in a network with $M=30$ CAVs,
the performance gains yielded by the proposed algorithm are up to 35% and 27%,
respectively, compared to baseline schemes 1 and 2. Furthermore, Fig. 4 also
highlights the scalability of the proposed scheme. For example, with the
average E2E service delay threshold of $30$ ms, the proposed algorithm can
support up to $40$ CAVs, which is $40\%$ and $32\%$ higher compared to
baselines 1 and 2, respectively.

Figure. 5 shows the scatter plot of the expected values of latencies within
the 2-dimensional latent space, obtained from the correlated VAE. The x-axis
and y-axis represent, respectively, the distribution of the transmission delay
and the computing delay. Here, each point represents the outcome from one
learning epoch. From Fig. 5, we can observe that the proposed correlated VAE
can successfully capture the correlation between input data points for the
transmission and computing latencies, resulting from unbalanced task
assignment within the MEC network. We can also observe that, the derived
correlation between two latent variables (i.e., transmission and computing
latencies) is positive.

##  VI Conclusions

In this paper, we have developed a novel framework to optimize the E2E
reliability in MEC networks. The proposed scheme has adopted a learning
method, based on correlated VAEs, to estimate the distribution of the E2E
service delay. Then, a new problem has been formulated that uses the trained
VAE models to maximize the network reliability by minimizing the CVaR as a
risk measure of the E2E service delay. To solve the proposed non-convex MINLP,
we have developed a new algorithm that iteratively solves the task allocation
problem within the MEC network jointly with computing resource allocation at
each edge computing server. Simulation results have confirmed the
effectiveness of the developed VAE method for estimating the distribution of
the E2E service delay and capturing the underlying correlations between the
transmission and computing latencies. Furthermore, the results have shown that
the proposed algorithm can substantially improve the network’s reliability
compared to other baseline methods that ignore the distribution of the E2E
service delay.

## References

  * [1] O. Semiari, W. Saad, M. Bennis, and M. Debbah,  “Integrated millimeter wave and sub-6 GHz wireless networks: A roadmap for joint mobile broadband and ultra-reliable low-latency communications,”  IEEE Wireless Communications, vol. 26, no. 2, pp. 109–115, 2019\.
  * [2] 3GPP,  “Study on scenarios and requirements for next generation access technologies,”  Technical Report (TR) 38.913, Version 15.0.0,  2018\.
  * [3] Q. Pham et al.,  “A survey of multi-access edge computing in 5G and beyond: Fundamentals, technology integration, and state-of-the-art,”  IEEE Access, vol. 8, pp. 116974–117017, 2020.
  * [4] Y. Mao, C. You, J. Zhang, K. Huang, and K. Letaief,  “A survey on mobile edge computing: The communication perspective,”  IEEE Communications Surveys & Tutorials, vol. 19, no. 4, pp. 2322–2358, 2017.
  * [5] C. Jiang, X. Cheng, H. Gao, X. Zhou, and J. Wan,  “Toward computation offloading in edge computing: A survey,”  IEEE Access, vol. 7, pp. 131543–131558, 2019.
  * [6] A. Kovalenko, R. Hussain, O. Semiari, and M. Salehi,  “Robust resource allocation using edge computing for vehicle to infrastructure (V2I) networks,”  in 2019 IEEE 3rd International Conference on Fog and Edge Computing (ICFEC). IEEE, 2019, pp. 1–6.
  * [7] H. Wu,  “Multi-objective decision-making for mobile cloud offloading: A survey,”  IEEE Access, vol. 6, pp. 3962–3976, 2018.
  * [8] C. Jiang, H. Zhang, Y. Ren, Z. Han, K. Chen, and L. Hanzo,  “Machine learning paradigms for next-generation wireless networks,”  IEEE Wireless Communications, vol. 24, no. 2, pp. 98–105, 2016\.
  * [9] H. Ye, G. Li, and B. Juang,  “Deep reinforcement learning based resource allocation for V2V communications,”  IEEE Transactions on Vehicular Technology, vol. 68, no. 4, pp. 3163–3173, 2019.
  * [10] J. Li, H. Gao, T. Lv, and Y. Lu,  “Deep reinforcement learning based computation offloading and resource allocation for MEC,”  in 2018 IEEE Wireless Communications and Networking Conference (WCNC). IEEE, 2018, pp. 1–6.
  * [11] A. Taleb Zadeh Kasgari, W. Saad, M. Mozaffari, and H. V. Poor,  “Experienced deep reinforcement learning with generative adversarial networks (gans) for model-free ultra reliable low latency communication,”  IEEE Transactions on Communications, vol. 69, no. 2, pp. 884–899, 2020.
  * [12] M. M. K. Tareq, O. Semiari, M. Salehi, and W. Saad,  “Ultra reliable, low latency vehicle-to-infrastructure wireless communications with edge computing,”  in 2018 IEEE Global Communications Conference (GLOBECOM). IEEE, 2018, pp. 1–7.
  * [13] D. Kingma and M. Welling,  “Auto-encoding variational bayes,”  arXiv preprint arXiv:1312.6114, 2013.
  * [14] S. Ferdowsi, M. Diephuis, S. Rezaeifar, and S. Voloshynovskiy,  “$\rho$-vae: Autoregressive parametrization of the vae encoder,”  arXiv preprint arXiv:1909.06236, 2019.
  * [15] X. Hao, R. Zhao, T. Yang, Y. Hu, B. Hu, and Y. Qiu,  “A risk-sensitive task offloading strategy for edge computing in industrial internet of things,”  arXiv preprint arXiv:2101.05946, 2021.
  * [16] R. Rockafellar and S. Uryasev,  “Conditional value-at-risk for general loss distributions,”  Journal of banking & finance, vol. 26, no. 7, pp. 1443–1471, 2002\.


# Ultrafast TACOS – Terahertz-Assisted Chiro-Optical Spectroscopy

J. Terentjevas1,2, P. Vindel-Zandbergen3, L. Rego2,4,5, F. Morales1, A.
Ordóñez2,6, O. Smirnova1,7, D. Ayuso1,2,6 1Max-Born-Institut, 12489 Berlin,
Germany  2Department of Physics, Imperial College London, SW7 2BW London, UK
3Department of Chemistry, New York University, New York 10003, New York, USA
4Instituto Madrileño de Estudios Avanzados en Nanociencia (IMDEA Nano),
Cantoblanco 28049, Madrid, Spain  5Departamento de Química, Universidad
Autónoma de Madrid, 28049 Madrid, Spain  6School of Physical and Chemical
Sciences, Queen Mary University of London, E1 4NS, UK  7Technische Universität
Berlin, 10623 Berlin, Germany

###### Abstract

We bring together the advantages of terahertz (THz) and optical spectroscopies
to introduce TACOS (Terahertz-Assisted Chiro-Optical Spectroscopy), a novel
approach for ultrafast and highly efficient imaging of molecular chirality and
control over chiral electronic dynamics. We show how, using a THz pulse, we
can induce a transient electronic orientation in a medium of randomly oriented
chiral molecules that breaks the isotropy of the molecular sample. This
symmetry breaking twists the nonlinear response of the medium to an ultrashort
linearly polarised optical pulse in a highly enantiosensitive manner. As a
result, the medium emits elliptically polarised light at new optical
frequencies that records the molecular handedness via purely electric-dipole
interactions. The long wavelength and period of the THz pulse enable both
spatial coherence across the sample and a substantial degree of electronic
orientation over the duration of the ultrashort optical pulse. TACOS does not
require optical carrier-envelope phase stability or working in vacuum, and it
creates exciting avenues for ultrafast and highly efficient chiral sensing and
manipulation.

Opposite versions of a chiral object display non-superimposable mirror images
of each other. This geometrical property makes them behave identically, except
when interacting with another chiral entity. For instance, whereas a sock can
fit both feet, only the right shoe fits the right foot. Chirality is
ubiquitous in biological systems, and thus telling apart opposite versions of
the same chiral molecule (enantiomers) is vital for pharmaceutical
developments and even for medical diagnosis [1], but also challenging.
Traditional optical methods [2, 3, 4, 5, 6, 7, 8], such as polarimetry [7, 8]
and photo-absorption circular dichroism [2, 3] rely on the weak magnetic
coupling between light and matter, which leads to weak enantiosensitivity [9]
and creates important challenges, particularly for ultrafast spectroscopy.

The electric-dipole “revolution” [10] is transforming the landscape of
molecular chiral discrimination with a new generation of chiro-optical methods
offering orders-of-magnitude greater enantiosensitivity. Different “streams”
of this revolution rely on analysing different enantiosensitive observables,
from microwave radiation [11, 12, 13, 14, 15] to optical/UV signals [16, 17,
18, 19, 20, 21, 22, 23] or to photoelectron currents [24, 25, 26, 27, 28, 29,
30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], but share one
common ingredient [45]: the enantiosensitive response of the molecules is
driven solely by the electronic response of the molecules to the local
polarisation of the electric driving field – magnetic interactions are not
required.

Locally chiral light [17, 18, 19, 20, 21], where the electric field draws a
chiral 3D Lissajous figure in time, can drive enantiosensitive electronic
dynamics via purely electric-dipole interactions. This type of light can be
created by overlapping two laser beams that carry several frequencies and
propagate non-collinearly. The non-collinear nature of the setup creates a
spatial modulation of the overall field’s properties, with a periodicity on
the order of the laser wavelengths [46]. This can be exploited to steer the
light emission from the chiral molecules in an enantiosensitive way [18, 47].
However, since such periodicities are on the order of the optical wavelengths,
and thus much smaller than typical interaction regions, one needs to carefully
design experiments so that such spatial modulations do not wash out
enantiosensitive effects in the macroscopic response of the medium.

The microwave counterpart of locally chiral light can also be created in non-
collinear configurations, but it maintains its properties over spatial regions
that are on the order of microwave wavelengths, which can cover the molecular
samples. Locally chiral microwave radiation can drive highly enantiosensitive
_rotational_ dynamics in chiral molecules [13, 48]. However, microwaves are
not well suited for attochemistry, an emerging field which aims to image and
control chemical reactions by manipulating _electronic_ motion in molecules on
the attosecond timescale [49].

Figure 1:  Physical picture. Step 1: a linearly-polarized THz field (red)
transiently orients the electronic density in a randomly oriented ensemble of
chiral molecules via linear response, making the medium anisotropic. Step 2:
the THz-driven electronic orientation twists the non-linear response of the
medium to an ultrashort cross-polarised and cross-propagating optical pulse
(blue). Step 3: the radiation emitted by the medium at new optical frequencies
(magenta) acquires enantiosensitive elliptical polarisation: the ellipticity
and rotation (tilt) angle record the molecular handedness via purely electric-
dipole interactions. The relevant achiral and chiral multiphoton pathways are
depicted in the inset.

Can we bring the advantages of both approaches together? That is, can we use
optical frequencies to drive ultrafast electronic dynamics in chiral
molecules, while benefiting from the long wavelengths of microwave or
terahertz radiation? We provide a positive answer to this question by
introducing terahertz-assisted chiro-optical spectroscopy (TACOS).

Our approach involves cross-polarised and cross-propagating THz and optical
pulses interacting with a medium of randomly oriented chiral molecules, see
Fig 1. Without the THz field, the local response of the medium to the optical
pulse would be linearly polarised and insensitive to its handedness. The
linear response to the THz field breaks this symmetry by transiently orienting
the electronic clouds of the molecules. As a result, the non-linear response
to the optical pulse acquires an enantiosensitive polarisation component that
is orthogonal to both driving fields and enables efficient chiral recognition:
it leads to emission of harmonic light which has opposite polarisation in
opposite enantiomers.

Using the linear response to a THz pulse to electronically orient the
molecules ensures that they will maintain the same orientation over a spatial
region on the order of half the THz wavelength and that the orientation will
persist during half the THz period. Thus, if either the optical beam at the
focus or the medium, or a substantial part of them, are smaller than half the
THz wavelength, the enantiosensitive electronic response of the medium can be
maintained in space over the whole interaction region. TACOS also requires
few-cycle optical pulses, although optical carrier-envelope phase (CEP)
stability is not needed and the THz field does not need to be ultrashort.

Let us consider a multiphoton picture and focus on low-order non-linear
processes resulting from purely electric-dipole interactions. The molecules
can absorb 3 photons from the $x$-polarised optical pulse, see Fig. 1 (inset),
leading to achiral polarisation at frequency $3\omega_{\text{op}}$ along $x$.
Since we are neglecting magnetic interactions, this pathway is not sensitive
to the medium’s handedness [50]. The next-order non-linear process involving 3
optical photons and 1 additional $z$-polarised THz photon induces polarisation
at frequency $3\omega_{\text{op}}+\omega_{\text{THz}}$ along $y$. This even-
order response is exclusive of chiral media and it has an opposite phase in
opposite enantiomers. It can be understood as chiral sum-frequency generation
[51, 52, 53, 16, 50, 54] from the optical and THz fields assisted by the
absorption of two additional optical photons. Using a few-cycle optical pulse
(a key ingredient of TACOS) with a spectral bandwidth
$\Delta\omega_{\text{op}}>\omega_{\text{THz}}$, enables the interference
between the achiral and chiral pathways in the frequency domain. As a result,
the non-linear response of the medium around the frequency of
$3\omega_{\text{op}}$ acquires an enantiosensitive polarisation. Higher order
nonlinear processes involving additional $2N$ optical photons in both pathways
can also be enantiosensitive.

Having $\omega_{\text{op}}>>\omega_{\text{THz}}$ not only facilitates the
spectral overlap between the achiral and chiral pathways (Fig. 1) in the near
field, it also ensures an effective far-field interference. Indeed,
$|\textbf{k}_{\text{op}}|>>|\textbf{k}_{\text{THz}}|$ implies that
$3\textbf{k}+\textbf{k}_{\text{THz}}\simeq 3\textbf{k}$, and thus the two
pathways lead to emission along essentially the same direction. As a result,
the emitted radiation maintains its enantiosensitive polarisation as it
reaches the detector.

We have numerically tested our proposal in randomly oriented carvone
molecules, see Methods, considering the following optical parameters:
wavelength $\lambda_{\mathrm{op}}=660$nm, intensity
$I_{\mathrm{op}}=10^{12}$W/cm2 and pulse duration $\tau_{\mathrm{op}}=10$fs
(FWHM). For the THz field, we used $\lambda_{\mathrm{THz}}=80\mu$m (period
$T_{\mathrm{THz}}=267$fs), $I_{\mathrm{THz}}=10^{12}$W/cm2 and
$\tau_{\mathrm{THz}}=355$fs. We used a relatively short wavelength and an
ultrashort duration in the THz pulse to keep the simulations affordable, but
we note this is not a requirement. Both parameters can be increased without
degrading the efficiency of the chiral discrimination. The wavelength of the
optical pulse was chosen to be in electronic resonance in order to maximise
the enantiosensitive response.

Figure 2:  Non-linear response of randomly oriented carvone
($\bm{\mathrm{CEP}=0}$). a Intensity of light emission in the vicinity of
$3\omega_{\mathrm{op}}$ as a function of the output frequency (lower axis) and
wavelength (upper axis) driven by the setup of Fig. 1. The intensity of
emission is not enantiosensitive because the overall driving field is achiral.
b,c, Enantiosensitive polarisation of the radiation emitted from the L
(magenta) and R (cyan) enantiomers: rotation angle of the major component of
the polarisation ellipse (b) and ellipticity (c). Here ellipticity is defined
as $b/a$, where $a$ and $b$ are the semimajor and semiminor axes respectively.
Figure 3:  Enantiosensitive control over the polarisation of the nonlinear
optical response. Rotation angle of the major component of the polarisation
ellipse (a, b) and ellipticity (c, d) of the radiation emitted from the L (a,
c) and R (b, d) enantiomers of carvone as a function of the output
wavelength/frequency and the phase of the THz field. In our calculations, we
use an ultrashort THz pulse and vary its CEP, but using few-cycle THz pulses
is not a requirement. If TACOS is implemented using a longer THz field, a sub-
cycle temporal delay would lead to the same effect.

Fig. 2 shows the intensity and polarisation of the light emitted from the two
enantiomers of carvone in the vicinity of $3\omega_{\mathrm{op}}$, where the
two quantum pathways (Fig. 1) effectively interfere. The intensity (Fig. 2a)
is not enantiosensitive because the overall driving field is achiral: it has
mirror symmetry with respect to the $xy$ plane. Yet, it can encode the
molecular handedness in the polarisation of the emitted light, see Fig. 2b,c.
Indeed, because the x-component of the emitted radiation is not sensitive to
the medium’s handedness and the y-component has opposite phase in opposite
enantiomers, the ellipticity $\varepsilon$ (Fig. 2c) and the rotation, or
tilt, angle $\gamma$ of the polarisation ellipse (Fig. 2b) record the
chirality of the medium. Notably, the relative rotation angle
$\gamma_{R}-\gamma_{L}$ reaches $15^{\circ}$ degrees at the emission peak, and
it becomes larger at higher frequencies. We also note that the emitted light
at wavelength $\lambda\approx 220$nm is not substantially absorbed by air,
which means that our proposal does not require working in vacuum.

We now show how we can control the enantiosensitive response of the medium by
controlling the properties of the incident fields. The polarisation of the
emitted radiation records the relative amplitude and phase between the induced
polarisation associated with the achiral and chiral pathways (Fig. 1, inset).
Because these pathways involve absorption of the same number of optical
photons, their relative amplitude and phase are not sensitive to the intensity
and phase of the optical pulse. This means that the enantiosensitive response
is not sensitive to the CEP of the optical pulse, and thus optical CEP
stability is not needed. However, because only the chiral pathway is sensitive
to the THz field (it involves the absorption of one THz photon), we can
control the enantiosensitive response by controlling the properties of the THz
pulse. Indeed, changing the THz phase changes the phase of the induced
polarisation associated with the chiral pathway without altering the amplitude
of the chiral response.

Fig. 3 shows the rotation angle, or tilt, of the polarisation ellipse (Fig.
3a,b) and ellipticity (Fig. 3c,d) of the emitted radiation as functions of the
THz CEP and output frequency in the vicinity of $3\omega_{\mathrm{op}}$, for
(L)- and (R)-carvone. We find large tilt angles and ellipticities across the
spectrum, reaching up to $\gamma\simeq\pm 22^{\circ}$ and
$\varepsilon\simeq\pm 0.5$. Note that changing the molecular enantiomer
changes the phase associated with the chiral pathway without altering the
phase of the achiral pathway, and thus both $\gamma$ and $\varepsilon$ flip
sign when exchanging the molecular enantiomers. Changing the THz CEP by $\pi$
leads to the same effect.

The modulation of the enantiosensitive response with the THz phase records the
transient electronic orientation driven by the THz field in the medium. In our
calculations, we assume that the temporal envelopes of the THz and optical
pulses are centered. Thus, if the THz CEP is either $0$ or $\pi$, the maximum
of the optical pulse envelope coincides with a maximum or minimum of the THz
field amplitude, see Fig. 4a. In these situations, the optical pulse arrives
to the sample when the degree of THz-driven electronic orientation is at the
maximum, leading to a strong chiro-optical response. However, if the THz CEP
is either $0.5\pi$ or $1.5\pi$, the maximum of the optical pulse envelope
coincides with a zero in the THz field amplitude, see Fig. 4b. That is, the
optical pulse arrives when the degree of electronic orientation is weak, and
thus it produces a weak chiro-optical signal. This can be seen in Fig. 3.

We emphasise that, while we use ultrashort THz pulses to keep our simulations
affordable, this is not a requirement of TACOS. We can obtain equivalent
results using a longer THz pulse and varying the temporal delay between THz
and optical fields, as long as the THz pulse is sufficiently intense to drive
a substantial degree of transient electronic orientation in the medium.

Figure 4:  Understanding the generation of the chiro-optical response.
Electric-field amplitude of the optical (blue) and THz (red) fields when the
CEP of the THz field is 0 (a) and $\pi/2$ (b). The linear response to the THz
field induces transient electronic orientation in the medium. a, If CEP=0 (or
$\pi$), the ultrashort optical pulse arrives to the medium when the degree of
THz-driven electronic orientation is at its maximum, resulting in a strong
chiro-optical signal (see Fig. 3). b, If CEP=$\pi/2$ (or $3\pi/2$) the optical
field arrives to the sample when it is barely oriented, hence producing a weak
chiro-optical response.

Recent developments in the generation of intense THz pulses [55, 56, 57] from
ultrashort optical pulses [57, 58, 59] may facilitate the experimental
realisation of TACOS. Note that the THz field plays the role of a quasi-static
electric field, which induces an electronic orientation of the chiral
molecules. The THz period is sufficiently long so the molecules remain
electronically oriented during the whole interaction with the optical pulse,
but also sufficiently short so the molecules do not undergo substantial
ionisation – as it would inevitably happen if one attempts to realise our
proposal using a constant electric field of comparable amplitude.

TACOS combines short- and long-wavelength radiation to drive highly
enantiosensitive electronic dynamics in chiral molecules on ultrafast
timescales, bringing together the advantages of THz and optical
spectroscopies. The long wavelength and period of the THz field enable both a
large spatial coherence across the sample and a transient electronic
orientation that survives the duration of the optical pulse. Further
implementations of TACOS using tailored polarisation either in the optical or
THz field may lead to richer chiral dynamics, stronger chiro-optical signals,
and higher degrees of enantiosensitive control in attochemistry.

## Acknowledgements

We acknowledge enlightening discussions with Misha Ivanov. J.T., A.O. and D.A.
acknowledge funding from the Royal Society
URF$\backslash$R1$\backslash$201333, URF$\backslash$ERE$\backslash$210358 and
URF$\backslash$ERE$\backslash$231177\. L. R. acknowledges financial support
from the European Union-NextGenerationEU and the Spanish Ministry of
Universities via Margarita Salas Fellowship through the University of
Salamanca. J.T. and O.S. acknowledge funding from the European Union (ERC,
ULISSES, 101054696). J.T. and D.A. acknowledge funding from COST Action
CA18222, supported by COST (European Cooperation in Science and Technology).
Views and opinions expressed are, however, those of the authors only and do
not necessarily reflect those of the European Union or the European Research
Council. Neither the European Union nor the granting authority can be held
responsible for them.

## Methods

The molecular geometry of the most stable conformer of (R)-carvone was taken
from Ref. 60 and reoptimized for consistency using Density Functional Theory
(DFT) [61, 62] with the B3LYP [63, 64] functional and the 6-311G(d,p) [65]
basis set available in Gaussian 16 [66]. The excitation energies and
transition dipoles were evaluated for the first 100 excited states using time-
dependent DFT at the CAM-B3LYP/d-aug-cc-pVDZ level of theory [67, 68, 69, 70].
The transition dipoles between the excited states were computed with the
Multiwfn software [71].

The ultrafast electronic response of the most stable conformer of carvone was
evaluated by solving numerically the time-dependent Schrödinger equation
(TDSE) in the basis set of the field-free eigenstates using an explicit Runge-
Kutta method of order 8 in the presence of the THz and optical fields:

$\bm{E}=E_{\mathrm{op}}(t)\cos(\omega_{\mathrm{op}}t)\hat{\bm{x}}+E_{\mathrm{THz}}(t)\cos(\omega_{\mathrm{THz}}t+\Delta)\hat{\bm{z}}$
(1)

where $E_{\mathrm{op}}$ and $E_{\mathrm{THz}}$ are the Gaussian envelopes for
the optical ($\sigma=182$ a.u.) and terahertz ($\sigma=6230$ a.u.) pulses,
respectively, each of peak amplitude $E_{max}=0.00534$ a.u.
$\omega_{\mathrm{op}}=0.0690$ a.u. and $\omega_{\mathrm{THz}}=0.000570$ a.u.
are the optical and terahertz pulse frequencies, respectively, and $\Delta$ is
the CEP of the terahertz pulse. To describe a randomly orientated ensemble, we
ran TDSE simulations for 208 molecular orientations and averaged the induced
polarisation

$\bm{P}=\frac{1}{8\pi^{2}}\int_{0}^{2\pi}\int_{0}^{2\pi}\int_{0}^{\pi}\bm{P}_{\chi\phi\theta}\sin(\theta)d\chi
d\phi d\theta$ (2)

where $\chi,\phi,\theta$ are the Euler angles and $\bm{P}_{\chi\phi\theta}$ is
the induced polarization in the laboratory frame for a given molecular
orientation. The integral over $\phi$, $\theta$ was approximated using the
Lebedev quadrature [72] of order 7, which gives 26 points on a sphere ($\phi$,
$\theta$). Integration over $\chi$ was performed using the trapezoid method
including 8 rotations around each Lebedev axis. The radiation emitted by the
medium is $\bm{E}(\omega)=E_{x}(\omega)\bm{e}_{x}+E_{y}(\omega)\bm{e}_{y}$,
where $E_{x}$ and $E_{y}$ are the achiral and chiral polarisation,

$\displaystyle E_{x}(\omega)$
$\displaystyle\propto\omega^{2}\bm{P}(\omega)\cdot\hat{\bm{e}}_{x},$ (3)
$\displaystyle E_{y}(\omega)$
$\displaystyle\propto\omega^{2}\bm{P}(\omega)\cdot\hat{\bm{e}}_{y}.$ (4)

Note that the $z$ component of the induced polarisation is parallel to the
propagation direction of the optical field and thus it cannot produce a
macroscopic response. The ellipticity ($\varepsilon$) and rotation angle
($\gamma$) of the emitted radiation are given by

$\displaystyle\gamma$
$\displaystyle=0.5\arctan\left(\frac{2|E_{x}||E_{y}|\cos(\delta)}{|E_{x}|^{2}-|E_{y}|^{2}}\right),$
(5) $\displaystyle\varepsilon$
$\displaystyle=\frac{1-\sqrt{1-\alpha^{2}}}{\alpha},$ (6)

where $\delta=\arg(E_{y})-\arg(E_{y})$ and
$\alpha=\frac{2\tan(\psi)\sin(\delta)}{1+\tan(\psi)^{2}}$, with
$\tan(\psi)=\frac{|E_{y}|}{|E_{x}|}$.

## Supplementary Information

Figure 5:  Non-linear response of randomly oriented carvone molecules
($\bm{\mathrm{CEP}=0}$) driven by the setup of Fig. 1. a Intensity of the
harmonic emission in the range from 0 to $5.5\omega_{\mathrm{op}}$ as a
function of the output frequency (lower axis) and wavelength (upper axis). The
strength of the harmonic emission is identical in opposite enantiomers. b,c,
Enantiosensitive polarisation of the radiation emitted from the L (magenta)
and R (cyan) enantiomers: rotation angle of the major component of the
polarisation ellipse (b) and ellipticity (c).

## References

  * Liu  _et al._ [2023] Y. Liu, Z. Wu, D. W. Armstrong, H. Wolosker, and Y. Zheng, Detection and analysis of chiral molecules as disease biomarkers, Nat. Rev. Chem. 7, 355 (2023).
  * Berova  _et al._ [2007] N. Berova, L. Bari, and G. Pescitelli, Application of electronic circular dichroism in configurational and conformational analysis of organic compounds, Chem. Soc. Rev 36, 914 (2007).
  * Schellman [1975] J. A. Schellman, Circular dichroism and optical rotation, Chem. Rev. 75, 323 (1975).
  * Nafie  _et al._ [1976] L. Nafie, T. Keiderling, and P. Stephens, Vibrational circular dichroism, J. Am. Chem. Soc 98, 2715 (1976).
  * Costante  _et al._ [1997] J. Costante, L. Hecht, P. L. Polavarapu, A. Collet, and L. D. Barron, Absolute configuration of bromochlorofluoromethane from experimental and ab initio theoretical vibrational raman optical activity, Angewandte Chemie International Edition in English 36, 885 (1997).
  * Polavarapu and Chakraborty [1998] P. Polavarapu and D. Chakraborty, Absolute stereochemistry of chiral molecules from ab initio theoretical and experimental molecular optical rotations, J. Am. Chem. Soc 120, 6160 (1998).
  * Orlova  _et al._ [2014] A. V. Orlova, R. R. Andrade, C. O. da Silva, A. I. Zinin, and L. O. Kononov, Polarimetry as a Tool for the Study of Solutions of Chiral Solutes, ChemPhysChem 15, 195 (2014).
  * Tran  _et al._ [2021] D.-B.-A. Tran, K. M. Manfred, R. Peverall, and G. A. D. Ritchie, Continuous-Wave Cavity-Enhanced Polarimetry for Optical Rotation Measurement of Chiral Molecules, Anal. Chem. 93, 5403 (2021).
  * Barron [2004] L. D. Barron,  _Molecular Light Scattering and Optical Activity_, 2nd ed. (Cambridge University Press, 2004).
  * Ayuso  _et al._ [2022a] D. Ayuso, A. Ordonez, and O. Smirnova, Ultrafast chirality: The road to efficient chiral measurements, Phys. Chem. Chem. Phys 24, 26962 (2022a).
  * Patterson  _et al._ [2013] D. Patterson, M. Schnell, and J. Doyle, Enantiomer-specific detection of chiral molecules via microwave spectroscopy, Nature 497, 475 (2013).
  * Patterson and Doyle [2013] D. Patterson and J. M. Doyle, Sensitive chiral analysis via microwave three-wave mixing, Phys. Rev. Lett. 111, 023008 (2013).
  * Eibenberger  _et al._ [2017] S. Eibenberger, J. Doyle, and D. Patterson, Enantiomer-specific state transfer of chiral molecules, Phys. Rev. Lett. 118, 123002 (2017).
  * Pérez  _et al._ [2017] C. Pérez, A. Steber, S. Domingos, A. Krin, D. Schmitz, and M. Schnell, Coherent enantiomerselective population enrichment using tailored microwave fields, Angew. Chem. Int. Ed 56, 12512 (2017).
  * Leibscher  _et al._ [2019] M. Leibscher, T. Giesen, and C. Koch, Principles of enantio-selective excitation in threewave mixing spectroscopy of chiral molecules, J. Chem. Phys 151, 014302 (2019).
  * Fischer  _et al._ [2002] P. Fischer, K. Beckwitt, F. Wise, and A. Albrecht, The chiral specificity of sum-frequency generation in solutions, Chem. Phys. Lett 352, 463 (2002).
  * Ayuso  _et al._ [2019] D. Ayuso, O. Neufeld, A. Ordonez, P. Decleva, G. Lerner, O. Cohen, M. Ivanov, and O. Smirnova, Synthetic chiral light for efficient control of chiral light-matter interaction, Nat. Photon 13, 866 (2019).
  * Ayuso  _et al._ [2021a] D. Ayuso, A. Ordonez, P. Decleva, M. Ivanov, and O. Smirnova, Enantio-sensitive unidirectional light bending, Nat. Commun 12, 3951 (2021a).
  * Ayuso  _et al._ [2021b] D. Ayuso, A. Ordonez, M. Ivanov, and O. Smirnova, Ultrafast optical rotation in chiral molecules with ultrashort and tightly focused beams, Optica 8, 1243 (2021b).
  * Ayuso [2022] D. Ayuso, New opportunities for ultrafast and highly enantio-sensitive imaging of chiral nuclear dynamics enabled by synthetic chiral light, Phys. Chem. Chem. Phys 24, 10193 (2022).
  * Ayuso  _et al._ [2022b] D. Ayuso, A. Ordonez, P. Decleva, M. Ivanov, and O. Smirnova, Strong chiral response in noncollinear high harmonic generation driven by purely electric-dipole interactions, Opt. Express 30, 4659 (2022b).
  * Khokhlova  _et al._ [2022] M. Khokhlova, E. Pisanty, S. Patchkovskii, O. Smirnova, and M. Ivanov, Enantiosensitive steering of free-induction decay, Sci. Adv 8, 1962 (2022).
  * Rego  _et al._ [2023] L. Rego, O. Smirnova, and D. Ayuso, Tilting light’s polarization plane to spatially separate the ultrafast nonlinear response of chiral molecules, J. Nanophotonics 12, 2873 (2023).
  * Ritchie [1976] B. Ritchie, Theory of the angular distribution of photoelectrons ejected from optically active molecules and molecular negative ions, Phys. Rev. A 13, 1411 (1976).
  * Powis [2000] I. Powis, Photoelectron circular dichroism of the randomly oriented chiral molecules glyceraldehyde and lactic acid, J. Chem. Phys 112, 301 (2000).
  * Böwering  _et al._ [2001] N. Böwering, T. Lischke, B. Schmidtke, N. Müller, T. Khalil, and U. Heinzmann, Asymmetry in photoelectron emission from chiral molecules induced by circularly polarized light, Phys. Rev. Lett 86, 1187 (2001).
  * Garcia  _et al._ [2003] G. Garcia, L. Nahon, M. Lebech, J.-C. Houver, D. Dowek, and I. Powis, Circular dichroism in the photoelectron angular distribution from randomly oriented enantiomers of camphor, J. Chem. Phys 119, 8781 (2003).
  * Garcia  _et al._ [2013] G. Garcia, L. Nahon, S. Daly, and I. Powis, Vibrationally induced inversion of photoelectron forward-backward asymmetry in chiral molecule photoionization by circularly polarized light, Nat. Commun 4, 2132 (2013).
  * Janssen and Powis [2014] M. Janssen and I. Powis, Detecting chirality in molecules by imaging photoelectron circular dichroism, Phys. Chem. Chem. Phys 16, 856 (2014).
  * Lux  _et al._ [2012] C. Lux, M. Wollenhaupt, T. Bolze, Q. Liang, J. Köhler, C. Sarpe, and T. Baumert, Circular dichroism in the photoelectron angular distributions of camphor and fenchone from multiphoton ionization with femtosecond laser pulses, Angew. Chem. Int. Ed 51, 5001 (2012).
  * Lehmann  _et al._ [2013] C. Lehmann, N. Ram, I. Powis, and M. Janssen, Imaging photoelectron circular dichroism of chiral molecules by femtosecond multiphoton coincidence detection, J. Chem. Phys 139, 234307 (2013).
  * Lux  _et al._ [2015] C. Lux, M. Wollenhaupt, C. Sarpe, and T. Baumert, Photoelectron circular dichroism of bicyclic ketones from multiphoton ionization with femtosecond laser pulses, ChemPhysChem 16, 115 (2015).
  * Kastner  _et al._ [2016] A. Kastner, C. Lux, T. Ring, S. Züllighoven, C. Sarpe, A. Senftleben, and T. Baumert, Enantiomeric excess sensitivity to below one percent by using femtosecond photoelectron circular dichroism, ChemPhysChem 17, 1119 (2016).
  * Comby  _et al._ [2016] A. Comby, S. Beaulieu, M. Boggio-Pasqua, D. Descamps, F. Légaré, L. Nahon, S. Petit, B. Pons, B. Fabre, Y. Mairesse, and V. Blanchet, Relaxation dynamics in photoexcited chiral molecules studied by time-resolved photoelectron circular dichroism: Toward chiral femtochemistry, J. Phys. Chem. Lett 7, 4514 (2016).
  * Beaulieu  _et al._ [2016] S. Beaulieu, A. Comby, B. Fabre, D. Descamps, A. Ferré, G. Garcia, R. Géneaux, F. Légaré, L. Nahon, S. Petit, T. Ruchon, B. Pons, V. Blanchet, and Y. Mairesse, Probing ultrafast dynamics of chiral molecules using time-resolved photoelectron circular dichroism, Faraday Discuss. 194, 325 (2016).
  * Comby  _et al._ [2018] A. Comby, E. Bloch, C. Bond, D. Descamps, J. Miles, S. Petit, S. Rozen, J. Greenwood, V. Blanchet, and Y. Mairesse, Real-time determination of enantiomeric and isomeric content using photoelectron elliptical dichroism, Nat. Commun 9, 5212 (2018).
  * Demekhin  _et al._ [2018] P. V. Demekhin, A. N. Artemyev, A. Kastner, and T. Baumert, Photoelectron circular dichroism with two overlapping laser pulses of carrier frequencies $\omega$ and $2\omega$ linearly polarized in two mutually orthogonal directions, Phys. Rev. Lett. 121, 253201 (2018).
  * Goetz  _et al._ [2019] R. Goetz, C. Koch, and L. Greenman, Quantum control of photoelectron circular dichroism, Phys. Rev. Lett 122, 013204 (2019).
  * Rozen  _et al._ [2019] S. Rozen, A. Comby, E. Bloch, S. Beauvarlet, D. Descamps, B. Fabre, S. Petit, V. Blanchet, B. Pons, N. Dudovich, and Y. Mairesse, Controlling subcycle optical chirality in the photoionization of chiral molecules, Phys. Rev X 9, 031004 (2019).
  * Ordonez and Smirnova [2022] A. Ordonez and O. Smirnova, Disentangling enantiosensitivity from dichroism using bichromatic fields, Phys. Chem. Chem. Phys 24, 7264 (2022).
  * Beaulieu  _et al._ [2018a] S. Beaulieu, A. Comby, D. Descamps, S. Petit, F. Légaré, V. Blanchet, Y. Mairesse, and B. Fabre, Multiphoton photoelectron circular dichroism of limonene with independent polarization state control of the bound-bound and bound-continuum transitions, J. Chem. Phys. 149, 134301 (2018a).
  * Beaulieu  _et al._ [2018b] S. Beaulieu, A. Comby, D. Descamps, B. Fabre, G. Garcia, R. Géneaux, A. Harvey, F. Légaré, Z. Masín, L. Nahon, A. Ordonez, S. Petit, B. Pons, Y. Mairesse, O. Smirnova, and V. Blanchet, Photoexcitation circular dichroism in chiral molecules, Nat. Phys 14, 484 (2018b).
  * Planas  _et al._ [2022] X. B. Planas, A. Ordóñez, M. Lewenstein, and A. S. Maxwell, Ultrafast imaging of molecular chirality with photoelectron vortices, Phys. Rev. Lett. 129, 233201 (2022).
  * Wanie  _et al._ [2024] V. Wanie, E. Bloch, E. P. Månsson, L. Colaizzi, S. Ryabchuk, K. Saraswathula, A. F. Ordonez, D. Ayuso, O. Smirnova, A. Trabattoni, V. Blanchet, N. Ben Amor, M.-C. Heitz, Y. Mairesse, B. Pons, and F. Calegari, Capturing electron-driven chiral dynamics in uv-excited molecules, Nature 630, 109 (2024).
  * Ordonez and Smirnova [2018] A. Ordonez and O. Smirnova, Generalized perspective on chiral measurements without magnetic interactions, Phys. Rev. A 98, 063428 (2018).
  * Ordóñez  _et al._ [2023] A. Ordóñez, P. Vindel-Zandbergen, and D. Ayuso, Chiral coherent control of electronic population transfer: Towards all-optical and highly enantioselective photochemistry, arXiv (2023), arxiv:2309.02392 .
  * Rego and Ayuso [2023] L. Rego and D. Ayuso, Structuring the local handedness of synthetic chiral light: global chirality versus polarization of chirality, New Journal of Physics 25, 093005 (2023).
  * Lee  _et al._ [2022] J. Lee, J. Bischoff, A. Hernandez-Castillo, B. Sartakov, G. Meijer, and S. Eibenberger-Arias, Quantitative study of enantiomer-specific state transfer, Phys. Rev. Lett 128, 173001 (2022).
  * Calegari and Martin [2023] F. Calegari and F. Martin, Open questions in attochemistry, Communications Chemistry 6, 184 (2023).
  * Fischer and Hache [2005] P. Fischer and F. Hache, Nonlinear optical spectroscopy of chiral molecules, Chirality 17, 421 (2005).
  * Giordmaine [1965] J. A. Giordmaine, Nonlinear optical properties of liquids, Phys. Rev. 138, A1599 (1965).
  * Fischer  _et al._ [2000] P. Fischer, D. Wiersma, R. Righini, B. Champagne, and A. Buckingham, Three-wave mixing in chiral liquids, Phys. Rev. Lett 85, 4253 (2000).
  * Belkin  _et al._ [2000] M. Belkin, T. Kulakov, K.-H. Ernst, L. Yan, and Y. Shen, Sum-frequency vibrational spectroscopy on chiral liquids: A novel technique to probe molecular chirality, Phys. Rev. Lett 85, 4474 (2000).
  * Vogwell  _et al._ [2023] J. Vogwell, L. Rego, O. Smirnova, and D. Ayuso, Ultrafast control over chiral sum-frequency generation, Science Advances 9, eadj1429 (2023), https://www.science.org/doi/pdf/10.1126/sciadv.adj1429 .
  * Hoffmann and Fülöp [2011] M. C. Hoffmann and J. A. Fülöp, Intense ultrashort terahertz pulses: generation and applications, J. Phys. D Appl. Phys. 44, 083001 (2011).
  * Koulouklidis  _et al._ [2020] A. D. Koulouklidis, C. Gollner, V. Shumakova, V. Y. Fedorov, A. Pugžlys, A. Baltuška, and S. Tzortzakis, Observation of extremely efficient terahertz generation from mid-infrared two-color laser filaments, Nat. Commun. 11, 292 (2020).
  * Kim [2009] K.-Y. Kim, Generation of coherent terahertz radiation in ultrafast laser-gas interactionsa), Phys. Plasmas 16, 056706 (2009).
  * Jang and Kim [2020] D. Jang and K.-Y. Kim, Multicycle terahertz pulse generation by optical rectification in linbo3, litao3, and bbo crystals, Opt. Express 28, 21220 (2020).
  * Nam  _et al._ [2023] I. Nam, I. Eom, M. Kim, M. Cho, and D. Jang, Optimized terahertz pulse generation with chirped pump pulses from an echelon-based tilted-pulse-front (tpf) scheme, Opt. Express 31, 26969 (2023).
  * Lambert  _et al._ [2012] J. Lambert, R. N. Compton, and T. D. Crawford, The optical activity of carvone: A theoretical and experimental investigation, J. Chem. Phys. 136, 114512 (2012).
  * Kohn  _et al._ [1996] W. Kohn, A. D. Becke, and R. G. Parr, Density Functional Theory of Electronic Structure, J. Chem. Phys. 100, 12974 (1996).
  * Ziegler [2002] T. Ziegler, Approximate density functional theory as a practical tool in molecular energetics and dynamics (2002).
  * Lee  _et al._ [1988] C. Lee, W. Yang, and R. G. Parr, Development of the Colle-Salvetti correlation-energy formula into a functional of the electron density, Phys. Rev. B 37, 785 (1988).
  * Becke [1988] A. D. Becke, Density-functional exchange-energy approximation with correct asymptotic behavior, Phys. Rev. A 38, 3098 (1988).
  * McLean and Chandler [2008] A. D. McLean and G. S. Chandler, Contracted Gaussian basis sets for molecular calculations. I. Second row atoms, Z=11–18, J. Chem. Phys. 72, 5639 (2008).
  * Frisch  _et al._ [2016] M. J. Frisch, G. W. Trucks, H. B. Schlegel, G. E. Scuseria, M. A. Robb, J. R. Cheeseman, G. Scalmani, V. Barone, G. A. Petersson, H. Nakatsuji, X. Li, M. Caricato, A. V. Marenich, J. Bloino, B. G. Janesko, R. Gomperts, B. Mennucci, H. P. Hratchian, J. V. Ortiz, A. F. Izmaylov, J. L. Sonnenberg, D. Williams-Young, F. Ding, F. Lipparini, F. Egidi, J. Goings, B. Peng, A. Petrone, T. Henderson, D. Ranasinghe, V. G. Zakrzewski, J. Gao, N. Rega, G. Zheng, W. Liang, M. Hada, M. Ehara, K. Toyota, R. Fukuda, J. Hasegawa, M. Ishida, T. Nakajima, Y. Honda, O. Kitao, H. Nakai, T. Vreven, K. Throssell, J. A. Montgomery, Jr., J. E. Peralta, F. Ogliaro, M. J. Bearpark, J. J. Heyd, E. N. Brothers, K. N. Kudin, V. N. Staroverov, T. A. Keith, R. Kobayashi, J. Normand, K. Raghavachari, A. P. Rendell, J. C. Burant, S. S. Iyengar, J. Tomasi, M. Cossi, J. M. Millam, M. Klene, C. Adamo, R. Cammi, J. W. Ochterski, R. L. Martin, K. Morokuma, O. Farkas, J. B. Foresman, and D. J. Fox, Gaussian 16 Revision C.01 (2016).
  * Yanai  _et al._ [2004] T. Yanai, D. P. Tew, and N. C. Handy, A new hybrid exchange–correlation functional using the coulomb-attenuating method (cam-b3lyp), Chem. Phys. Lett. 393, 51 (2004).
  * Kobayashi and Amos [2006] R. Kobayashi and R. D. Amos, The application of cam-b3lyp to the charge-transfer band problem of the zincbacteriochlorin–bacteriochlorin complex, Chem. Phys. Lett. 420, 106 (2006).
  * Kendall  _et al._ [1992] R. A. Kendall, J. Dunning, Thom H., and R. J. Harrison, Electron affinities of the first‐row atoms revisited. Systematic basis sets and wave functions, J. Chem. Phys. 96, 6796 (1992).
  * Woon and Dunning [1994] D. E. Woon and J. Dunning, Thom H., Gaussian basis sets for use in correlated molecular calculations. IV. Calculation of static electrical response properties, J. Chem. Phys. 100, 2975 (1994).
  * Lu and Chen [2012] T. Lu and F. Chen, Multiwfn: A multifunctional wavefunction analyzer, J. Comput. Chem. 33, 580 (2012).
  * Lebedev and Laikov [1999] V. I. Lebedev and D. N. Laikov, A quadrature formula for the sphere of the 131st algebraic order of accuracy, Dokl. Math. 59, 477 (1999).


# The ”Ant on a Rubber Rope” Paradox

Ting-Yang Hsiao
email<EMAIL_ADDRESS>
###### Abstract

We clarify and generalize the ant on a rubber rope paradox, which is a
mathematical puzzle with a solution that appears counterintuitive. In this
paper, we show that the ant can still reach the end of the rope even if we
consider the step length of the ant and stretching length of the rubber rope
as random variables.

###### keywords:

Ant on a rubber rope; Law of large numbers; Paradox; Harmonic series

††journal: arXiv

##  1 Introduction

The ant on a rubber rope paradox is usually expressed as (see, for instance,
[1] or [2]): An ant is at the left endpoint of a rubber rope, which is $1$
kilometre long and the ant crawls along the rope at a steady pace of $1$
centimetre per second. After the first second, the rubber rope stretches
uniformly to $2$ kilometres instantly. After the next second, it stretches to
$3$ kilometres, and so on. The question is, will the ant ever reach the right
endpoint of the rubber rope?

Surprisingly, the answer to this paradox is ”Yes”. In the beginning, we should
know that the ant moves with the rope when the rope is stretching. Now, we can
analyse this paradox by measuring the fraction of the rope the ant covers
after each second. When the sum of these fractions is $1$, the ant has come to
the right endpoint of the rope.

Initially, the rubber rope is $1$ kilometre long and the ant moves $1$
centimetre forward. This means that at the end of the first second, the ant
has travelled $\dfrac{1}{100,000}$ times of the rubber rope’s length of $1$
kilometre. Meanwhile, after the first second, the rubber rope stretches
uniformly to $2$ kilometres immediately. Then the ant crawls another
centimetre after the next second. That is to say, the ant has gone an
additional $\dfrac{1}{200,000}$ times of the rope’s new length of $2$
kilometres. By repeating this process $m$ times, after the $m$th second, the
ant’s progress can be expressed as a fraction of the entire rubber rope, which
is

$\dfrac{1}{100,000}\left(\dfrac{1}{1}+\dfrac{1}{2}+...+\dfrac{1}{m}\right).$
(1)

The equation (1) is a partial sum of the Harmonic series, which can be made as
large as we desire. Therefore, the ant will complete the journey to the right
endpoint of the rubber rope.

Now, we consider the case that both the movements of the ant and the
increments of the rubber rope are random. Specifically, let $X_{0},X_{1}$,… be
positive, independent, and identically distributed random variables with
$EX_{i}=\mu_{X}>0$. Let $L_{1},L_{2}$,… be positive, independent, and
identically distributed random variables with $EL_{i}=\mu_{L}<\infty$. Let
$l_{0}$ be a positive constant. From the very beginning, the length of the
rope is $l_{0}$ units. At the first second, the ant, which is at the left
endpoint of the rope, starts to move $X_{0}$ units. At the end of the first
second, the rope uniformly stretches $L_{1}$ units to $l_{0}+L_{1}$ units
immediately. In the next second, the ant moves another $X_{1}$ units. Again,
at the end of the second second, the rope uniformly stretches another $L_{2}$
units to $l_{0}+L_{1}+L_{2}$ units. If this continues, will the ant still
reach the other end of the rope? Astonishingly, the answer is still ”Yes”.

$Theorem~{}1$ In the stochastic model of the ant on a rubber rope, the ant can
still reach the other end of the rope almost surely.

In Section 2, we will establish two lemmas and then use them to prove Theorem
1.

##  2 Two Lemmas

To prove Theorem 1, we need the following Lemmas 1 and 2.
$Lemma~{}1$ An ant is originally at the left endpoint of a rubber rope of
length $l_{0}$ units. At the $i$th second the ant moves along the rope at a
pace of $x_{i-1}$ units, and then the rubber rope uniformly stretches $l_{i}$
units instantly. If, at the $m$th second, the ant still does not reach the
right endpoint of the rope, then the ant’s progress can be expressed as a
fraction of the entire rubber rope, which is

$\dfrac{x_{0}}{l_{0}}+\dfrac{x_{1}}{l_{0}+l_{1}}+\dfrac{x_{2}}{l_{0}+l_{1}+l_{2}}+...+\dfrac{x_{m-1}}{l_{0}+l_{1}+...+l_{m-1}}.$
(2)

This lemma is not difficult to prove by induction argument. The key point is
to note that the ratio of length of the ant’s progress to that of the rope
remains unchanged after the rope uniformly stretching.

$Lemma~{}2$ Let $X_{0},X_{1}$,… be positive, independent, and identically
distributed random variables with $EX_{i}=\mu_{X}>0$. Let $L_{1},L_{2}$,… be
positive, independent, and identically distributed random variables with
$EL_{i}=\mu_{L}<\infty$. Let $l_{0}$ be a positive constant. Then

$\dfrac{X_{0}}{l_{0}}+\dfrac{X_{1}}{l_{0}+L_{1}}+\dfrac{X_{2}}{l_{0}+L_{1}+L_{2}}+...=\infty$
(3)

almost surely.

######  Proof 1 (Proof)

Let $\Omega$ be the sample space. By strong law of large numbers there exists
$\Omega_{0}$ with $P(\Omega_{0})=1$, such that for each $\omega\in\Omega_{0}$,

$\dfrac{L_{1}(\omega)+...+L_{n}(\omega)}{n}\longrightarrow\mu_{L},$ (4)

and

$\dfrac{X_{1}(\omega)+...+X_{n}(\omega)}{n}\longrightarrow\mu_{X},$ (5)

when $n$ goes to $\infty$. This implies that for each $\omega\in\Omega_{0}$,
and any given $\epsilon>0$, we can choose an $N\in\mathbb{N}$ such that

$\left|\dfrac{l_{0}+L_{1}(\omega)+...+L_{n}(\omega)}{n}-\mu_{L}\right|<\epsilon,$
(6)

and

$\left|\dfrac{X_{1}(\omega)+...+X_{n}(\omega)}{n}-\mu_{X}\right|<\epsilon,$
(7)

if $n\geqslant N$. To simplify our notation, denote $L_{i}(\omega)$ and
$X_{i}(\omega)$ by $l_{i}$ and $x_{i}$, respectively.
Now, for each $i\in\mathbb{N}$, we have, according to (7),

$\displaystyle~{}~{}~{}\left|\dfrac{x_{(i-1)N+1}+...+x_{iN}}{N}-\mu_{X}\right|=\left|\dfrac{x_{1}+...+x_{iN}}{N}-\dfrac{x_{1}+...+x_{(i-1)N}}{N}-\mu_{X}\right|$
$\displaystyle=\left|i\dfrac{x_{1}+...+x_{iN}}{iN}-i\mu_{X}+(i-1)\mu_{X}-(i-1)\dfrac{x_{1}+...+x_{(i-1)N}}{(i-1)N}\right|$
$\displaystyle\leqslant
i\left|\dfrac{x_{1}+...+x_{iN}}{iN}-\mu_{X}\right|+(i-1)\left|\dfrac{x_{1}+...+x_{(i-1)N}}{(i-1)N}-\mu_{X}\right|$
$\displaystyle<i\epsilon+(i-1)\epsilon=(2i-1)\epsilon.$ (8)

Consequently, for any fixed $m\in\mathbb{N}$, we can use (6) and (1) to yield
that

$\displaystyle~{}~{}~{}\dfrac{x_{0}}{l_{0}}+\dfrac{x_{1}}{l_{0}+l_{1}}+\dfrac{x_{2}}{l_{0}+l_{1}+l_{2}}+...$
$\displaystyle\geqslant\sum\limits_{i=1}^{N}\dfrac{x_{i}}{l_{0}+...+l_{i}}+\sum\limits_{i=N+1}^{2N}\dfrac{x_{i}}{l_{0}+...+l_{i}}+...+\sum\limits_{i=(m-1)N+1}^{mN}\dfrac{x_{i}}{l_{0}+...+l_{i}}$
$\displaystyle\geqslant\sum\limits_{i=1}^{N}\dfrac{x_{i}}{l_{0}+...+l_{N}}+\sum\limits_{i=N+1}^{2N}\dfrac{x_{i}}{l_{0}+...+l_{2N}}+...+\sum\limits_{i=(m-1)N+1}^{mN}\dfrac{x_{i}}{l_{0}+...+l_{mN}}$
$\displaystyle=\dfrac{\dfrac{x_{1}+...+x_{N}}{N}}{\dfrac{l_{0}+l_{1}+...+l_{N}}{N}}+\dfrac{1}{2}\dfrac{\dfrac{x_{N+1}+...+x_{2N}}{N}}{\dfrac{l_{0}+l_{1}+...+l_{2N}}{2N}}+...+\dfrac{1}{m}\dfrac{\dfrac{x_{(m-1)N+1}+...+x_{mN}}{N}}{\dfrac{l_{0}+l_{1}+...+l_{mN}}{mN}}$
$\displaystyle\geqslant\dfrac{\mu_{X}-\epsilon}{\mu_{L}+\epsilon}+\dfrac{1}{2}\dfrac{\mu_{X}-3\epsilon}{\mu_{L}+\epsilon}+...+\dfrac{1}{m}\dfrac{\mu_{X}-(2m-1)\epsilon}{\mu_{L}+\epsilon}\rightarrow\dfrac{\mu_{X}}{\mu_{L}}\left(1+\dfrac{1}{2}+...+\dfrac{1}{m}\right)~{}~{}\mbox{as}~{}\epsilon\rightarrow
0^{+}.$

Because the harmonic series diverges to $\infty$, we conclude that

$\dfrac{X_{0}}{l_{0}}+\dfrac{X_{1}}{l_{0}+L_{1}}+\dfrac{X_{2}}{l_{0}+L_{1}+L_{2}}+...=\infty$

almost surely.

Now, we can prove Theorem 1 as follows.

######  Proof 2 (Proof of Theorem 1)

Using the notations as in Lemma 2, we define

$T=\min\left\\{n~{}\Bigg{|}~{}\dfrac{X_{0}}{l_{0}}+\dfrac{X_{1}}{l_{0}+L_{1}}+...+\dfrac{X_{n-1}}{l_{0}+L_{1}+L_{2}+...+L_{n-1}}\geqslant
1\right\\}.$

In view of Lemma 1, $T$ is just the time (in seconds) when the ant reaches the
right endpoint of the rubber rope. Here we use the convention that
$\min\emptyset=\infty$. Now, Lemma 2 tells that $T<\infty$ almost surely,
which completes the proof.

## References

  * [1] Gardner, Martin (1982). aha! Gotcha: paradoxes to puzzle and delight. W. H. Freeman and Company. pp. 145–146. ISBN 0-7167-1361-6.
  * [2] Graeme (2002). The Problem Site. Archived from the original on 24 April 2008. Retrieved 6 April 2008.
  * [3] Koelman, Johannes (2012). ”Beam Me The Farthest, Scotty!”. Archived from the original on 6 April 2013. Retrieved 26 December 2012.