# On-Demand Entanglement of Molecules in a
Reconfigurable Optical Tweezer Array

Connor M. Holland  These authors contributed equally to this work. Department
of Physics, Princeton University, Princeton, New Jersey 08544 USA  Yukai Lu
These authors contributed equally to this work. Department of Physics,
Princeton University, Princeton, New Jersey 08544 USA  Department of
Electrical and Computer Engineering, Princeton University, Princeton, New
Jersey 08544 USA  Lawrence W. Cheuk<EMAIL_ADDRESS>Department of
Physics, Princeton University, Princeton, New Jersey 08544 USA

###### Abstract

Entanglement is crucial to many quantum applications including quantum
information processing, simulation of quantum many-body systems, and quantum-
enhanced sensing Nielsen and Chuang (2000); Gisin  _et al._ (2002); Preskill
(2018); Amico  _et al._ (2008); Pezzè  _et al._ (2018). Molecules, because of
their rich internal structure and interactions, have been proposed as a
promising platform for quantum science DeMille (2002); Carr  _et al._ (2009);
Blackmore  _et al._ (2018). Deterministic entanglement of individually
controlled molecules has nevertheless been a long-standing experimental
challenge. Here we demonstrate, for the first time, on-demand entanglement of
individually prepared molecules. Using the electric dipolar interaction
between pairs of molecules prepared using a reconfigurable optical tweezer
array, we realize an entangling two-qubit gate, and use it to
deterministically create Bell pairs Bell (1964). Our results demonstrate the
key building blocks needed for quantum information processing, simulation of
quantum spin models, and quantum-enhanced sensing. They also open up new
possibilities such as using trapped molecules for quantum-enhanced fundamental
physics tests Augenbraun  _et al._ (2020) and exploring collisions and
chemical reactions with entangled matter.

##  I Introduction

Entanglement lies at the heart of quantum mechanics. It is both central to the
practical advantage provided by quantum devices Nielsen and Chuang (2000);
Gisin  _et al._ (2002); Preskill (2018), and important to understanding the
behavior of many-body quantum systems Amico  _et al._ (2008). The ability to
create entanglement controllably has been a long-standing experimental
challenge. Molecules have been proposed as a promising platform for quantum
simulation and quantum information processing because of their rich internal
structure and long-lived interacting states DeMille (2002); Carr  _et al._
(2009); Blackmore  _et al._ (2018). In the past two decades, much progress has
been made in producing and controlling molecules at ultracold temperatures,
both through coherent assembly of ultracold alkali atoms Ni  _et al._ (2008)
and direct laser-cooling Barry  _et al._ (2014). Rapid advances have been made
in recent years, including the creation of degenerate molecular gases De Marco
_et al._ (2019); Schindewolf  _et al._ (2022), the creation of molecular
magneto-optical traps Barry  _et al._ (2014); Truppe  _et al._ (2017);
Anderegg  _et al._ (2017); Collopy  _et al._ (2018), high-fidelity detection
of single molecules Liu  _et al._ (2018); Anderegg  _et al._ (2019);
Christakis  _et al._ (2022) and laser-cooling of complex polyatomic molecules
Mitra  _et al._ (2020); Vilas  _et al._ (2022). In addition, coherent dipolar
interactions have also been observed in bialkali molecules trapped in optical
lattices Yan  _et al._ (2013); Christakis  _et al._ (2022).

Figure 1:  Laser-cooled Molecules in a Reconfigurable Optical Tweezer Array.
(a) Single CaF molecules trapped in an optical tweezer array are prepared into
closely separated tweezer pairs. Molecules in each pair held by separate
tweezer traps interact via the long-range electric dipolar interaction
$\hat{H}_{\text{SE}}$. (b) The electric dipolar interaction leads to dipolar
spin-exchange of rotational excitations. (c) Molecules are loaded
stochastically, detected non-destructively, and rearranged into the desired 1D
configuration. The molecules are then initialized into a single internal state
and the pair separations are reduced in order to switch on interactions. After
specific interaction times, the pairs are then separated and detected state-
selectively.

A major outstanding challenge to fully realizing the potential of molecules
has been achieving deterministic entanglement with microscopic control. In
this work, we report the first realization of a two-qubit entangling gate
between individual laser-cooled molecules trapped in a reconfigurable optical
tweezer array (Fig. 1a). The approach of molecular tweezer arrays Liu  _et
al._ (2018); Anderegg  _et al._ (2019); Zhang  _et al._ (2022); Holland  _et
al._ (2022) combines the microscopic controllability offered by reconfigurable
optical tweezer traps Endres  _et al._ (2016); Barredo  _et al._ (2016);
Cooper  _et al._ (2018); Norcia  _et al._ (2018); Saskin  _et al._ (2019) with
the ability to generate entanglement through the electric dipolar interaction
between molecules. We specifically make use of effective spin-exchange
interactions that arise between rotational states to realize an iSWAP gate,
which along with single qubit rotations, is sufficient for universal quantum
computation Ni  _et al._ (2018) (Fig. 1b). We subsequently use this to
entangle pairs of molecules into Bell states, which are prototypical entangled
states Bell (1964) often used to benchmark quantum platforms such as photons
Aspect  _et al._ (1982), trapped ions Turchette  _et al._ (1998), neutral
atoms Hagley  _et al._ (1997), superconducting circuits Steffen  _et al._
(2006), nitrogen-vacancy centers in diamond Neumann  _et al._ (2008), and
semiconductor quantum dots Zajac  _et al._ (2018).

##  II Preparing Pairs of Laser-Cooled Molecules and Initializing Their
Internal States

Our work starts with single laser-cooled CaF molecules trapped in a
dynamically reconfigurable array of optical tweezer traps Anderegg  _et al._
(2019); Holland  _et al._ (2022). Through a series of steps involving laser-
cooling, optical trapping and transport, single molecules are transferred from
a magneto-optical trap into a 1D array of 37 identical optical tweezer traps
with a uniform spacing of $4.20(6)\,\mu\text{m}$. Since our laser-cooling
scheme relies on a closed optical cycle present only for the
$X^{2}\Sigma(v=0,N=1)$ in CaF Stuhl  _et al._ (2008), the molecules initially
loaded into the tweezers occupy a single rovibrational manifold.

To remove the randomness in tweezer occupation, we use a rearrangement
approach pioneered in neutral atom experiments Endres  _et al._ (2016);
Barredo  _et al._ (2016). We non-destructively detect the tweezer occupations
using a variant of $\Lambda$-imaging Cheuk  _et al._ (2018). The empty
tweezers are identified, switched off, and the remaining occupied tweezers are
then rearranged into the desired 1D pattern. We characterize the rearrangement
procedure by measuring the probability of successfully creating uniform
arrays, and find a single particle rearrangement fidelity of 97.4(1)%. As
shown in Fig. 2a, we are able to create uniform arrays up to a size of $16$
with a probability $>0.6$. The rearrangement fidelity is limited by the non-
destructive detection fidelity, with minimal loss (0.2(10)%) due to movement
of the tweezer traps.

Figure 2:  Tweezer Rearrangement and Internal State Initialization. (a)
Probability of creating defect-free molecular arrays via rearrangement. A fit
to $p^{n}$, where $n$ is the array size, gives a single particle rearrangement
fidelity of $p=0.974(1)$. (b) Exemplary images of defect-free arrays. (c)
Optical pumping (orange arrow) prepares molecules in $|{D}\rangle$. Microwave
sweeps (dashed green arrows) transfer $|{D}\rangle$ molecules to
$|{\uparrow}\rangle$.

After rearrangement, we initialize the internal state of the molecules, which
are distributed among the 12 hyperfine states in the $X^{2}\Sigma(v=0,N=1)$
rovibrational manifold. To prepare molecules into a single hyperfine state, we
optically pump molecules into
$\left|D\right\rangle=X^{2}\Sigma(v=0,N=1,J=3/2,F=2,m_{F}=2)$. Subsequent
microwave sweeps along with an optical clean-out pulse transfer the molecules
into the target final state
$\left|\uparrow\right\rangle=X^{2}\Sigma(v=0,N=1,J=1/2,F=0,m_{F}=0)$ (Fig.
2c). The overall fidelity of preparing molecules in $|{\uparrow}\rangle$ is
$82.4(11)\%$. Our preparation sequence ensures that the dominant preparation
error is in the form of unoccupied tweezers, with a small contribution
($\approx 1\%$) coming from molecules prepared in the incorrect internal state
$\left|+\right\rangle=X^{2}\Sigma(v=0,N=0,J=1/2,F=1,m_{F}=1)$. The state
initialization errors come from imperfect microwave transfer, polarization
impurity of the optical pumping light, and loss due to heating in the tweezer
traps.

##  III Probing Single-Molecule Coherence

In order to produce entanglement via the dipolar interactions between
molecules, we require long coherence times compared to the typical interaction
timescales of $h/J\sim 10\,\text{ms}$ at our tweezer separations. Achieving
long coherence times for optically trapped molecules has been an ongoing
experimental challenge with steady advances being made. For molecules,
different internal states can experience different trapping potentials, which,
in combination with motion due to finite temperature, can lead to decoherence.
For ${}^{1}\Sigma$ bialkali molecules, long coherence times of different
nuclear spin states have been reported Park  _et al._ (2017); Gregory  _et
al._ (2021), and work using “magic” trapping conditions have demonstrated
extended coherence times between rotational states in both ${}^{1}\Sigma$ and
${}^{2}\Sigma$ molecules Neyenhuis  _et al._ (2012); Seeßelberg  _et al._
(2018); Lin  _et al._ (2021); Burchesky  _et al._ (2021); Christakis  _et al._
(2022).

Since the effective spin-exchange interactions couple different rotational
states, we desire long rotational coherence times between the two interacting
states $\left|\uparrow\right\rangle$ and
$\left|\downarrow\right\rangle=X^{2}\Sigma(v=0,N=0,J=1/2,F=1,m_{F}=0)$.
Building upon previous work in CaF Burchesky  _et al._ (2021), we identify a
pseudo-magic trapping condition where both spin states experience
approximately identical trapping potentials. Our pseudo-magic condition takes
into account vector and tensor shifts and is achieved by applying a magnetic
field orthogonal to the tweezer light polarization at a reduced tweezer depth
compared to that used for initial loading and imaging.

Figure 3:  Single Particle Coherence and Spin-Exchange Oscillations. (a)
Ramsey pulse sequence used to measure rotational coherence. The bottom Bloch
sphere diagrams show the action of the various pulses for a molecule
initialized in $\left|\downarrow\right\rangle$. (b) The XY8 dynamical
decoupling sequence. (c) Ramsey contrast of non-interacting molecules versus
free evolution time $t$. Green triangles, red squares, and blue circles show
the cases when no spin-echo, one spin-echo, and the XY8 sequence is applied,
respectively. Exponential fits give coherence times ($1/e$) of 2.5(3) ms,
29(2) ms, and 215(30) ms, respectively. Insets show exemplary Ramsey fringes
with corresponding sinusoidal fits shown by the dashed lines. (d) Spin-
exchange oscillations at a tweezer separation of $1.93(3)~{}\mu\text{m}$.
Shown are the $\left|\uparrow\uparrow\right\rangle$ populations measured after
the Ramsey pulse sequence, $P_{\uparrow\uparrow}$, as a function of
interaction time $t$, for molecular pairs initialized in
$\left|\uparrow\uparrow\right\rangle$. The solid curve is a fit to a
phenomenological model. Insets show exemplary fluorescence images at the
indicated times. (e) Spin-exchange oscillations at separations of
$1.26(2)\,\mu\text{m}$ (red pentagons), $1.43(2)\,\mu\text{m}$ (orange
hexagons), $1.60(2)\,\mu\text{m}$ (yellow diamonds), $1.68(2)\,\mu\text{m}$
(green squares), $1.93(3)\,\mu\text{m}$ (blue circles), and
$2.35(3)\,\mu\text{m}$ (purple triangles). Curves are offset vertically by 0.3
for clarity. (f) The extracted spin-exchange strength $J$ versus pair
separation $r$. The light red band indicates the theoretical prediction taking
into account the finite temperature of the molecules and the uncertainty in
the electric dipole moment of CaF. The dashed blue curve shows the prediction
without taking into account finite temperature. Inset shows the single
particle loss rate $\gamma_{\text{D}}$ versus pair separation $r$.

To measure the resulting coherence time, we prepare tweezer pairs with only
one molecule initialized in $\left|\uparrow\right\rangle$. We next apply a
Ramsey pulse sequence consisting of two $\pi/2$ microwave pulses (first pulse
along $\hat{x}$, second pulse along
$\hat{n}=\cos\theta\,\hat{x}+\sin\theta\,\hat{y}$) separated by a variable
free evolution time (Fig. 3a). The remaining fraction of
$\left|\uparrow\right\rangle$ molecules, $P_{\uparrow}$, oscillates as a
function of $\theta$, with the oscillation amplitude directly measuring the
coherence. Fitting to an exponential decay curve yields a bare coherence time
$T_{2}^{*}$ of $2.5(3)\,\text{ms}$. Adding a spin-echo improves the coherence
time to $T_{2}=29(2)\,\text{ms}$. Following previous work exploring dipolar
interactions of KRb molecules in an optical lattice Yan  _et al._ (2013); Li
_et al._ (2022), we implement the XY8 dynamical decoupling sequence depicted
in Fig. 3b, and find that the $1/e$ coherence time is further extended to
215(30) ms (Fig. 3c). This is consistent with our understanding that the bare
coherence times are primarily limited by slow (ms-timescale) fluctuations of
ambient magnetic fields.

##  IV Observing Coherent Dipolar Spin-Exchange Interactions

Having achieved sufficiently long rotational coherence times, we next set out
to observe coherent spin-exchange interactions. The long-range electric
dipolar interaction between the molecules gives rise to resonant exchange of
rotational excitations between $\left|\uparrow\right\rangle$ and
$\left|\downarrow\right\rangle$. The resulting spin-exchange interaction is
described by the Hamiltonian

$\hat{H}_{\text{SE}}=\frac{J}{2}\Big{(}\hat{S}_{1}^{+}\hat{S}_{2}^{-}+\hat{S}_{1}^{-}\hat{S}_{2}^{+}\Big{)}=J\left(\hat{S}_{1}^{x}\hat{S}_{2}^{x}+\hat{S}_{1}^{y}\hat{S}_{2}^{y}\right),$

where $\hat{S}_{i}^{+}$, $\hat{S}_{i}^{-}$, $\hat{S}_{i}^{x}$,
$\hat{S}_{i}^{y}$ are spin-1/2 operators for molecule $i$ and

$J=\frac{d^{2}}{4\pi\varepsilon_{0}}\frac{1}{r^{3}}(1-3\cos^{2}\theta^{\prime}),$

with $d=\langle{\uparrow}|\hat{\mathbf{d}}|{\downarrow}\rangle$ being the
transition dipole moment, $r=|\vec{r}|$ being the intermolecular separation,
$\theta^{\prime}$ being the angle between $\vec{r}$ and the quantization axis,
and $\varepsilon_{0}$ being the free space permittivity. Starting with two
molecules in a product state, time evolution under $\hat{H}_{\text{SE}}$ can
lead to entanglement. For example, two molecules initially prepared in the
product state
$\left|\uparrow\right\rangle\otimes\left|\downarrow\right\rangle$ become
maximally entangled after interacting for a time $t=\pi\hbar/(2J)$.

To observe the effect of spin-exchange interactions, we first create pairs of
$\left|{\uparrow}\right\rangle$ molecules at an initial separation of
$4.20(6)\,\mu\text{m}$, over which interactions are negligible. We next reduce
the pair separation to $1.93(3)\,\mu\text{m}$ over 3 ms, where the interaction
strength $J$ ($J=h\times 43\,\text{Hz}$) becomes appreciable on the coherence
timescale. Subsequently, we apply the Ramsey pulse sequence used above with
$\theta=0$. To retain long coherence times, the XY8 decoupling pulses are kept
on during the free evolution time. Because the $\pi$-pulses in the XY8
sequence leave $\hat{H}_{\text{SE}}$ unchanged, spin-exchange interactions are
preserved Choi  _et al._ (2020).

For a molecular pair initialized in $\left|{\uparrow}{\uparrow}\right\rangle$,
the resulting state following the Ramsey sequence is given by

$\left|\psi\right\rangle=ie^{-i\frac{Jt}{4\hbar}}\left(\sin\left(\frac{Jt}{4\hbar}\right)\left|\uparrow\uparrow\right\rangle+i\cos\left(\frac{Jt}{4\hbar}\right)\left|\downarrow\downarrow\right\rangle\right),$
(1)

and $P_{\uparrow\uparrow}$ oscillates at an angular frequency of $J/(2\hbar)$.
As shown in Fig. 3d, we indeed observe oscillations of $P_{\uparrow\uparrow}$,
directly revealing the presence of coherent spin-exchange interactions. By
varying the pair separation between $1.26(2)~{}\mu\text{m}$ and
$2.35(3)~{}\mu\text{m}$, we verify that the interaction strength $J$, as
extracted from the oscillation frequency, approximately scales as $1/r^{3}$,
as expected for dipolar interactions (Fig. 3f).

We observe that the oscillations decay faster when the molecules are closer.
This decay could be due to molecular loss or reduced single particle coherence
times at close separations. We verify that even at the closest spacing of
$1.26(2)\,\mu\text{m}$, tunneling of molecules between adjacent tweezers,
which could lead to loss, is negligible. Separately measured single particle
loss rates show that molecular loss increases at short separations and
significantly contributes to damping (Fig 3f inset). We believe the molecular
loss is likely due to parametric heating specific to our scheme of generating
tweezer traps using an acousto-optical deflector (AOD), and can be
circumvented with other tweezer generation techniques. Comparison with
independently measured single particle decoherence rates point to additional
damping that could be due to thermal motion of molecules in the tweezer traps.

Our work is the first observation of coherent interactions between
individually prepared molecules, and also between laser-cooled molecules. We
note in passing that experiments with bulk samples of bialkali molecules in
optical lattices have observed coherent spin-exchange both through macroscopic
measurements Yan  _et al._ (2013); Li  _et al._ (2022) and also recently with
single molecule resolution Christakis  _et al._ (2022).

##  V Realizing a Two-Qubit Gate and Creating Bell Pairs

We next create a maximally entangling two-qubit gate, which, together with
single qubit rotations, is sufficient for universal quantum computing. As
proposed in Ni  _et al._ (2018), we realize an iSWAP gate between two
molecules by allowing them to interact via $\hat{H}_{\text{SE}}$ for a
specific time of $T=\pi\hbar/J$. We use this gate to generate maximally
entangled Bell pairs by applying two additional $\pi/2$ pulses along the
$x$-axis before and after the gate. This sequence converts a molecular pair
prepared in $\left|\uparrow\uparrow\right\rangle$ into the Bell state
$\left|\psi_{B}\right\rangle=\frac{1}{\sqrt{2}}(\left|\uparrow\uparrow\right\rangle+i\left|\downarrow\downarrow\right\rangle)$.
As a compromise between maximizing $J$ and minimizing heating loss, we choose
a pair separation of $1.93(3)\,\mu\text{m}$ for creating
$\left|\psi_{B}\right\rangle$.

Figure 4:  Creating and Probing Bell Pairs. (a) Top left panel shows the two-
tweezer detection probabilities $P_{ij}$ for the Bell pairs. Right panel shows
corresponding probabilities when an additional $\pi$ pulse is applied before
measurement. Bottom panel shows the full probabilities extracted from the top
panels. The SPAM-corrected populations for the
$\left|\uparrow\right\rangle-\left|\downarrow\right\rangle$ subsystem are
shown by the green triangles. (b) Probing Bell state coherence through parity
oscillations. The coherence $\mathcal{C}$ between $|{\uparrow\uparrow}\rangle$
and $|{\downarrow\downarrow}\rangle$ is obtained from the amplitude of the
oscillations in $\Pi$ as a function of $\theta$. Insets show exemplary images
at the maxima and minima of $\Pi$. (c) SPAM-corrected Bell state fidelity
$\mathcal{F}_{\text{SPAM}}$ versus hold time $t$ at the initial pair creation
distance of 1.93(3) $\mu\text{m}$ are shown in blue circles. Red squares show
the corresponding data for pairs separated to a larger distance of
$4.20(6)~{}\mu\text{m}$ following creation. Inset shows the contrast
$\mathcal{C}_{\text{SPAM}}$ versus hold time $t$ for the two separations. The
extracted $1/e$ lifetimes are ($\mathcal{F}_{\text{SPAM}}$,
$\mathcal{C}_{\text{SPAM}}$)= ($85(5)\,\text{ms}$, $61(3)\,\text{ms}$) at the
Bell creation distance, and ($70(16)\,\text{ms}$, $57(8)\,\text{ms}$) at the
larger separation.

To measure the fidelity
$\mathcal{F}=\left\langle\psi_{B}\right|\rho\left|\psi_{B}\right\rangle$ of
creating $\left|\psi_{B}\right\rangle$, where $\rho$ is the density matrix, we
make use of the relation Turchette  _et al._ (1998)

$\mathcal{F}=\frac{1}{2}(P_{\uparrow\uparrow}+P_{\downarrow\downarrow}+\mathcal{C}),$
(2)

where $P_{\uparrow\uparrow}$ ($P_{\downarrow\downarrow}$) are the
probabilities of measuring $\left|\uparrow\uparrow\right\rangle$
$(\left|\downarrow\downarrow\right\rangle)$, and $\mathcal{C}$ is the
amplitude of the coherence between $\left|\uparrow\uparrow\right\rangle$ and
$\left|\downarrow\downarrow\right\rangle$.

Our imaging scheme only detects $\left|\uparrow\right\rangle$ molecules. To
measure $P_{\uparrow\uparrow}$, we separate the two molecules after preparing
$\left|\psi_{B}\right\rangle$ and subsequently measure the probability that
both tweezers in a pair appear bright. To measure $P_{\downarrow\downarrow}$,
we apply an additional $\pi$-pulse prior to detection (Fig. 4a) to convert
molecules from $\left|\downarrow\right\rangle$ to
$\left|\uparrow\right\rangle$ for detection. To obtain the coherence envelope
$\mathcal{C}$, we apply a $\pi/2$ pulse about a variable axis
$\hat{n}=\cos\theta\,\hat{x}+\sin\theta\,\hat{y}$ after preparing
$\left|\psi_{B}\right\rangle$. From the two-tweezer probabilities $P_{ij}$, we
construct the parity signal $\Pi=P_{11}+P_{00}-P_{10}-P_{01}$, where $1(0)$
denotes a bright (dark) tweezer site.

For a general density matrix that includes the possibility of empty tweezers
($\left|e\right\rangle$) due to imperfect state preparation, $\Pi$ can display
modulation at $2\theta$ and $\theta$. The $2\theta$ modulation is directly
related to the coherence between $\left|\uparrow\uparrow\right\rangle$ and
$\left|\downarrow\downarrow\right\rangle$, while the $\theta$ modulation is
related single molecule coherences, such as that between
$\left|e\uparrow\right\rangle$ and $\left|e\downarrow\right\rangle$. The
amplitude of the $2\theta$ modulation directly gives $\mathcal{C}$. As shown
in Fig. 4b, we find that $\Pi$ only oscillates at $2\theta$. The lack of
oscillations at $\theta$ is consistent with the pulse sequence used. Single
molecules prepared in $\left|e\uparrow\right\rangle$ or $\left|\uparrow
e\right\rangle$ effectively experience a $\pi$-pulse and no single particle
coherence is created. Correcting only for measurement errors, we obtain a Bell
state fidelity $\mathcal{F}=0.54(1)$. The state-preparation and measurement
(SPAM) corrected fidelity is $\mathcal{F}_{\text{SPAM}}=0.80(2)$. We believe
the fidelity to be limited in part by the single molecule decoherence time and
the finite temperature of the molecules. We leave the investigation and
improvement of these effects to future work.

We note in passing that the modulation of $\Pi$ at $2\theta$ directly shows
the enhanced metrological sensitivity of the Bell state, which is a two-
particle realization of a Greenberger-Horne-Zeilinger state (GHZ) state, a
class of entangled states known to reach the Heisenberg limit in quantum
metrology Pezzè  _et al._ (2018). Specifically, the $2\theta$ modulation in
$\Pi$ directly illustrates the two-fold increase in sensitivity of the Bell
state compared to unentangled states.

In addition, the phase of the $2\theta$ oscillation in $\Pi$ measures the
relative phase between $\left|\uparrow\uparrow\right\rangle$ and
$\left|\downarrow\downarrow\right\rangle$ in the Bell state, which is
sensitive to the sign of $J$. As expected, the observed phase of the
oscillation shows that $J>0$, indicating anti-ferromagnetic spin-exchange
interactions. In the context of quantum simulation, our measurements
demonstrate the fundamental building block for simulating anti-ferromagnetic
XY spin models.

Having demonstrated deterministic creation of Bell pairs, we next probe their
lifetime. We measure the Bell state fidelity $\mathcal{F}_{\text{SPAM}}$ as a
function of hold time and find a lifetime of $85(5)\,\text{ms}$, largely
consistent with but somewhat shorter than that expected from uncorrelated
single particle decoherence. We also examine whether the Bell pairs survive
when separated to larger distances following their creation. Specifically, we
separate the Bell pairs to a distance of $4.20(6)~{}\mu\text{m}$ over
$3\,\text{ms}$ following their creation, and measure
$\mathcal{F}_{\text{SPAM}}$ as a function of hold time. Within experimental
uncertainty, we find a lifetime identical to the case without separation (Fig.
4c). This ability to preserve entanglement while separating molecules could
allow one to bypass the limited range of dipolar interactions through movement
of molecules, and obtain arbitrary connectivity useful for quantum simulation
and information processing. Similar abilities to preserve entanglement have
recently been demonstrated in atomic tweezer arrays Bluvstein  _et al._
(2022).

##  VI Outlook

In summary, we have demonstrated on-demand creation of entangled Bell pairs of
molecules in a reconfigurable optical tweezer array. Our work is enabled by
several advances we have made in controlling laser-cooled molecules, including
initialization of defect-free molecular arrays, achievement of long rotational
coherence times in tightly-focused tweezer traps, and observation of coherent
dipolar interactions between individual laser-cooled molecules. Our results
demonstrate key building blocks for simulating quantum spin models, processing
quantum information, and realizing quantum-enhanced metrology in the emerging
platform of molecular tweezer arrays. Specifically for quantum simulation and
information processing, the interactions between long-lived molecular states
could offer long evolution times and deep circuit depths competitive with
other platforms such as Rydberg atom arrays, trapped ions, and superconducting
qubits. Our work on entangling molecules on-demand, combined with the rapid
progress in extending laser-cooling to molecular species of increasing
complexity Mitra  _et al._ (2020); Vilas  _et al._ (2022), opens new research
avenues such as quantum-enhanced precision measurement using trapped molecules
Augenbraun  _et al._ (2020) and explorations of molecular collisions Cheuk
_et al._ (2020) and chemical reactions with entangled matter.

##  VII Acknowledgements

We thank Waseem Bakr’s group and Sarang Gopalakrishnan for fruitful
discussions. We also thank Waseem Bakr, Jeff Thompson, Samuel J. Li, and
Christie Chiu for careful readings of the manuscript. This work is supported
by the National Science Foundation under Grant No. 2207518. L.W.C.
acknowledges support by the Sloan Foundation.

## References

  * Nielsen and Chuang (2000) M. Nielsen and I. Chuang, “Quantum computation and information,” (2000).
  * Gisin  _et al._ (2002) N. Gisin, G. Ribordy, W. Tittel, and H. Zbinden, Reviews of modern physics 74, 145 (2002).
  * Preskill (2018) J. Preskill, Quantum 2, 79 (2018).
  * Amico  _et al._ (2008) L. Amico, R. Fazio, A. Osterloh, and V. Vedral, Reviews of modern physics 80, 517 (2008).
  * Pezzè  _et al._ (2018) L. Pezzè, A. Smerzi, M. K. Oberthaler, R. Schmied, and P. Treutlein, Rev. Mod. Phys. 90, 035005 (2018).
  * DeMille (2002) D. DeMille, Physical Review Letters 88, 067901 (2002).
  * Carr  _et al._ (2009) L. D. Carr, D. DeMille, R. V. Krems, and J. Ye, New Journal of Physics 11, 055049 (2009).
  * Blackmore  _et al._ (2018) J. A. Blackmore, L. Caldwell, P. D. Gregory, E. M. Bridge, R. Sawant, J. Aldegunde, J. Mur-Petit, D. Jaksch, J. M. Hutson, B. E. Sauer, M. R. Tarbutt, and S. L. Cornish, Quantum Science and Technology 4, 014010 (2018).
  * Bell (1964) J. S. Bell, Physics Physique Fizika 1, 195 (1964).
  * Augenbraun  _et al._ (2020) B. L. Augenbraun, Z. D. Lasner, A. Frenett, H. Sawaoka, C. Miller, T. C. Steimle, and J. M. Doyle, New Journal of Physics 22, 022003 (2020).
  * Ni  _et al._ (2008) K.-K. Ni, S. Ospelkaus, M. H. G. de Miranda, A. Pe’er, B. Neyenhuis, J. J. Zirbel, S. Kotochigova, P. S. Julienne, D. S. Jin, and J. Ye, Science 322, 231 (2008).
  * Barry  _et al._ (2014) J. F. Barry, D. J. McCarron, E. B. Norrgard, M. H. Steinecker, and D. Demille, Nature 512, 286 (2014).
  * De Marco  _et al._ (2019) L. De Marco, G. Valtolina, K. Matsuda, W. G. Tobias, J. P. Covey, and J. Ye, Science 363, 853 (2019).
  * Schindewolf  _et al._ (2022) A. Schindewolf, R. Bause, X.-Y. Chen, M. Duda, T. Karman, I. Bloch, and X.-Y. Luo, Nature 607, 677 (2022).
  * Truppe  _et al._ (2017) S. Truppe, H. J. Williams, M. Hambach, L. Caldwell, N. J. Fitch, E. A. Hinds, B. E. Sauer, and M. R. Tarbutt, Nature Physics 13, 1173 (2017).
  * Anderegg  _et al._ (2017) L. Anderegg, B. L. Augenbraun, E. Chae, B. Hemmerling, N. R. Hutzler, A. Ravi, A. Collopy, J. Ye, W. Ketterle, and J. M. Doyle, Phys. Rev. Lett. 119, 103201 (2017).
  * Collopy  _et al._ (2018) A. L. Collopy, S. Ding, Y. Wu, I. A. Finneran, L. Anderegg, B. L. Augenbraun, J. M. Doyle, and J. Ye, Phys. Rev. Lett. 121, 213201 (2018).
  * Liu  _et al._ (2018) L. R. Liu, J. D. Hood, Y. Yu, J. T. Zhang, N. R. Hutzler, T. Rosenband, and K.-K. Ni, Science 360, 900 (2018).
  * Anderegg  _et al._ (2019) L. Anderegg, L. W. Cheuk, Y. Bao, S. Burchesky, W. Ketterle, K.-K. Ni, and J. M. Doyle, Science 365, 1156 (2019).
  * Christakis  _et al._ (2022) L. Christakis, J. S. Rosenberg, R. Raj, S. Chi, A. Morningstar, D. A. Huse, Z. Z. Yan, and W. S. Bakr, arXiv:2207.09328 (2022).
  * Mitra  _et al._ (2020) D. Mitra, N. B. Vilas, C. Hallas, L. Anderegg, B. L. Augenbraun, L. Baum, C. Miller, S. Raval, and J. M. Doyle, Science 369, 1366 (2020).
  * Vilas  _et al._ (2022) N. B. Vilas, C. Hallas, L. Anderegg, P. Robichaud, A. Winnicki, D. Mitra, and J. M. Doyle, Nature 606, 70 (2022).
  * Yan  _et al._ (2013) B. Yan, S. A. Moses, B. Gadway, J. P. Covey, K. R. Hazzard, A. M. Rey, D. S. Jin, and J. Ye, Nature 501, 521 (2013).
  * Zhang  _et al._ (2022) J. T. Zhang, L. R. B. Picard, W. B. Cairncross, K. Wang, Y. Yu, F. Fang, and K.-K. Ni, Quantum Science and Technology 7, 035006 (2022).
  * Holland  _et al._ (2022) C. M. Holland, Y. Lu, and L. W. Cheuk, arXiv:2208.12159 (2022).
  * Endres  _et al._ (2016) M. Endres, H. Bernien, A. Keesling, H. Levine, E. R. Anschuetz, A. Krajenbrink, C. Senko, V. Vuletić, M. Greiner, and M. D. Lukin, Science 354, 1024 (2016).
  * Barredo  _et al._ (2016) D. Barredo, S. De Léséleuc, V. Lienhard, T. Lahaye, and A. Browaeys, Science 354, 1021 (2016).
  * Cooper  _et al._ (2018) A. Cooper, J. P. Covey, I. S. Madjarov, S. G. Porsev, M. S. Safronova, and M. Endres, Phys. Rev. X 8, 041055 (2018).
  * Norcia  _et al._ (2018) M. A. Norcia, A. W. Young, and A. M. Kaufman, Phys. Rev. X 8, 041054 (2018).
  * Saskin  _et al._ (2019) S. Saskin, J. T. Wilson, B. Grinkemeyer, and J. D. Thompson, Phys. Rev. Lett. 122, 143002 (2019).
  * Ni  _et al._ (2018) K.-K. Ni, T. Rosenband, and D. D. Grimes, Chem. Sci. 9, 6830 (2018).
  * Aspect  _et al._ (1982) A. Aspect, J. Dalibard, and G. Roger, Physical review letters 49, 1804 (1982).
  * Turchette  _et al._ (1998) Q. Turchette, C. Wood, B. King, C. Myatt, D. Leibfried, W. Itano, C. Monroe, and D. Wineland, Physical Review Letters 81, 3631 (1998).
  * Hagley  _et al._ (1997) E. Hagley, X. Maitre, G. Nogues, C. Wunderlich, M. Brune, J.-M. Raimond, and S. Haroche, Physical Review Letters 79, 1 (1997).
  * Steffen  _et al._ (2006) M. Steffen, M. Ansmann, R. C. Bialczak, N. Katz, E. Lucero, R. McDermott, M. Neeley, E. M. Weig, A. N. Cleland, and J. M. Martinis, Science 313, 1423 (2006).
  * Neumann  _et al._ (2008) P. Neumann, N. Mizuochi, F. Rempp, P. Hemmer, H. Watanabe, S. Yamasaki, V. Jacques, T. Gaebel, F. Jelezko, and J. Wrachtrup, Science 320, 1326 (2008).
  * Zajac  _et al._ (2018) D. M. Zajac, A. J. Sigillito, M. Russ, F. Borjans, J. M. Taylor, G. Burkard, and J. R. Petta, Science 359, 439 (2018).
  * Stuhl  _et al._ (2008) B. K. Stuhl, B. C. Sawyer, D. Wang, and J. Ye, Physical review letters 101, 243002 (2008).
  * Cheuk  _et al._ (2018) L. W. Cheuk, L. Anderegg, B. L. Augenbraun, Y. Bao, S. Burchesky, W. Ketterle, and J. M. Doyle, Phys. Rev. Lett. 121, 083201 (2018).
  * Park  _et al._ (2017) J. W. Park, Z. Z. Yan, H. Loh, S. A. Will, and M. W. Zwierlein, Science 357, 372 (2017).
  * Gregory  _et al._ (2021) P. D. Gregory, J. A. Blackmore, S. L. Bromley, J. M. Hutson, and S. L. Cornish, Nature Physics 17, 1149 (2021).
  * Neyenhuis  _et al._ (2012) B. Neyenhuis, B. Yan, S. Moses, J. Covey, A. Chotia, A. Petrov, S. Kotochigova, J. Ye, and D. Jin, Physical review letters 109, 230403 (2012).
  * Seeßelberg  _et al._ (2018) F. Seeßelberg, X.-Y. Luo, M. Li, R. Bause, S. Kotochigova, I. Bloch, and C. Gohle, Physical Review Letters 121, 253401 (2018).
  * Lin  _et al._ (2021) J. Lin, J. He, X. Ye, and D. Wang, Physical Review A 103, 023332 (2021).
  * Burchesky  _et al._ (2021) S. Burchesky, L. Anderegg, Y. Bao, S. S. Yu, E. Chae, W. Ketterle, K.-K. Ni, and J. M. Doyle, Phys. Rev. Lett. 127, 123202 (2021).
  * Li  _et al._ (2022) J.-R. Li, K. Matsuda, C. Miller, A. N. Carroll, W. G. Tobias, J. S. Higgins, and J. Ye, arXiv:2208.02216 (2022).
  * Choi  _et al._ (2020) J. Choi, H. Zhou, H. S. Knowles, R. Landig, S. Choi, and M. D. Lukin, Physical Review X 10, 031002 (2020).
  * Bluvstein  _et al._ (2022) D. Bluvstein, H. Levine, G. Semeghini, T. T. Wang, S. Ebadi, M. Kalinowski, A. Keesling, N. Maskara, H. Pichler, M. Greiner, _et al._ , Nature 604, 451 (2022).
  * Cheuk  _et al._ (2020) L. W. Cheuk, L. Anderegg, Y. Bao, S. Burchesky, S. S. Yu, W. Ketterle, K.-K. Ni, and J. M. Doyle, Phys. Rev. Lett. 125, 043401 (2020).


#  Combining General and Personalized Models
for Epilepsy Detection with Hyperdimensional Computing ††thanks: This work has
been partially supported by the ML-Edge Swiss National Science Foundation
(NSF) Research project (GA No. 200020182009/1), and the PEDESITE Swiss NSF
Sinergia project (GA No. SCRSII5 193813/1). T. Teijeiro is supported by the
grant RYC2021-032853-I funded by MCIN/AEI/ 10.13039/501100011033 and by the
”European Union NextGenerationEU/PRTR”

Una Pale1, Tomas Teijeiro12, David Atienza1  1Embedded Systems Laboratory
(ESL), Ecole Polytechnique Federale de Lausanne (EPFL), Switzerland
2 BCAM - Basque Center for Applied Mathematics, Spain
{una.pale<EMAIL_ADDRESS><EMAIL_ADDRESS>
###### Abstract

Epilepsy is a chronic neurological disorder with a significant prevalence.
However, there is still no adequate technological support to enable epilepsy
detection and continuous outpatient monitoring in everyday life.
Hyperdimensional (HD) computing is an interesting alternative for wearable
devices, characterized by a much simpler learning process and also lower
memory requirements. In this work, we demonstrate a few additional aspects in
which HD computing, and the way its models are built and stored, can be used
for further understanding, comparing, and creating more advanced machine
learning models for epilepsy detection. These possibilities are not feasible
with other state-of-the-art models, such as random forests or neural networks.
We compare inter-subject similarity of models per different classes (seizure
and non-seizure), then study the process of creation of generalized models
from personalized ones, and in the end, how to combine personalized and
generalized models to create hybrid models. This results in improved epilepsy
detection performance. We also tested knowledge transfer between models
created on two different datasets. Finally, all those examples could be highly
interesting not only from an engineering perspective to create better models
for wearables, but also from a neurological perspective to better understand
individual epilepsy patterns.

###### Index Terms:

Hyperdimensional computing, machine learning, epilepsy, seizure detection,
personalized models, generalized models, hybrid models, knowledge transfer

##  1 Introduction

Epilepsy is a chronic neurological disorder characterized by the unexpected
occurrence of seizures, imposing serious health risks and many restrictions on
the daily life of patients. It affects a significant portion of the world’s
population (0.6 to 0.8%) [1], of which one third still suffer from seizures
despite pharmacological treatments. Thus, a potential solution is to have
small, non-stigmatizing, wearable devices for long-term epilepsy monitoring in
patients’ homes and everyday life rather than limited to in-hospital
monitoring.

Although many studies report impressive levels of accuracy in epilepsy
detection using machine learning (ML) methods, widespread adoption of
commercial technology has not yet occurred. The reasons for this are many,
some of which are specific to the complexity of epilepsy itself, such as
spontaneous occurrence, unbalanced datasets, and multimodal nature.
Furthermore, seizures show highly personalized patterns, which require new
methods of personalizing general models using the characteristics of
individual patients [2]. Other aspects that need to be taken into account when
designing algorithms for future lightweight wearable devices with long battery
life are computational complexity and memory consumption. Many state-of-the-
art ML algorithms for epilepsy detection are, for this reason, not ideal for
wearable devices. Thus, hyperdimensional computing is posed as a potential
alternative.

Hyperdimensional computing (HDC) is an emerging ML paradigm inspired by
neuroscience research, based on data representation in the shape of high-
dimensional hypervectors (usually having more than 10000 dimensions) [3]. The
paradigm shift in data representation brings various advantages for efficient
learning and low-power hardware implementation. From a learning perspective,
it opens new paths for semi-supervised [4], distributed [5], continuous online
learning [6], or multicentroid learning [7]. In terms of hardware,
parallelization possibilities open the way to design efficient accelerators
[8] or in-memory computations [9]. Its lower energy and memory requirements
enable learning in low-power wearables and IoT systems. HD computing has
attracted a great deal of attention for various biomedical applications, one
of them being epilepsy detection [10, 11, 12]. Most of the HDC models
developed by researchers are either personalized (only using patient-specific
data) or generalized (using all patients) and are rarely discussed or
compared. Thus, in this work we want to demonstrate several interesting
aspects of HD computing models, such as the ability to create generalized
models from personalized ones, compare them, and also to build hybrid models
from personalized and generalized ones at the same time.

Figure 1: HD workflow for training classical and online HD models. Online
training differs in that the class vectors are updated after every datapoint
by multiplying its similarity to the target class by the vector before
accumulating it into the class.

This works contributes to the state-of-the-art in the following ways:

  * •

We show how HD computing models represented as hypervectors can be used to
compare inter-personal seizure and non-seizure models.

  * •

We present several approaches to create generalized models from personalized
models of individual subjects. Then, we study how many subjects are needed to
achieve stable generalized models.

  * •

We compare the performance of epilepsy detection between personalized and
generalized models, aggregated for all subjects, and also for individual
subjects. Furthermore, we design hybrid models that rely both on personalized
and generalized models and show that they can achieve better detection
accuracy than just generalized or personalized models.

  * •

Finaly, we test knowledge transfer between models of two EEG epilepsy
datasets, one big but short-term database (Repomse [13]), and one long-term
but with a smaller number of subjects (CHB-MIT [14]).

The remainder of the paper is organized as follows: Section 2 motivates and
details how hyperdimensional computing can be used for the creation of
personalized and generalized models, how they can be compared, and how to
combine them. Section 3 describes the dataset used as well as all important
methodological choices. Section 4 presents results of all analyses performed,
while section 5 further contextualizes and comments the presented results. In
the end, Section 6 concludes this work.

##  2 HD computing for personalized and generalized epilepsy models

###  2.1 Basics of HD computing

HD computing is based on computations with long and redundant vectors (usually
$\geq 10000$ dimensions), representing information in a condensed and
distributed way. It was inspired by the neuroscience research hypothesis that
the brain’s computation is based on the high-dimensional randomized
representation of data rather than scalar numerical values [3].

Calculating and learning with vectors (usually $\geq 10000$ dimensions) is
based on two key algebraic properties: 1) any randomly chosen pair of vectors
are nearly orthogonal, and 2) if we sum two or more vectors, the result will
be with a high probability more similar to the added vectors than to any other
randomly chosen vector [3]. These properties are the basis for learning and
inference. The most common subtype of used vectors are binary ones, where
their elements can be only 0 or 1. In practice, also tertiary (-1,0,1) or
integer/float vectors are sometimes used.

More specifically, HD learning starts by encoding data and its relations to HD
vectors. As illustrated in Fig. 1 typically, baseline vectors representing
different feature values and features indexes are combined during the encoding
stage to get one vector. This vector represents a specific data sample,
instead of a feature set, as in other ML approaches. This makes the training
phase relatively simple and consists of summing (bundling) all vectors from
the same class to one prototype vector representing each class. Summation of
the vectors is usually done by bit-wise summation, followed by majority voting
normalization. Later, during inference, a vector representing the current data
sample is compared with the prototype vectors of all classes, and the label of
the most similar one is given as output. The similarity is measured as the
distance between two vectors, which can be the Hamming distance for binary
vectors or cosine (or dot) product for integer or floating-point value
vectors.

Traditionally, HD computing classifiers have been based on single-pass
learning and having a single-centroid model vector per class. Here, all data
samples are equally important during learning, leading to more common patterns
dominating the prototype vectors, meaning that less common patterns could be
potentially under-represented and wrongly predicted even on the same training
data. Thus, an OnlineHD [15] training has been proposed, where a naive
accumulation of equally important samples is replaced by using a weighting
approach before adding the current vector to the prototype vectors. The weight
is defined by the similarity of the current vector to the current prototype
vectors: the higher the similarity, the lower the weight. This approach
identifies the most dominating patterns and lowers model saturation.

HD computing has been applied for different challenges in the domain of
biomedical applications: EEG error-related potentials detection [16],
electromyogram (EMG), gesture recognition [17], emotion recognition from GSR
(galvanic-skin response), electrocardiogram (ECG) and EEG [18], etc. It has
also been tested on epilepsy detection [10, 11, 12], but always with
personalized models. Up to our knowledge, generalized models with HD computing
have not yet been discussed.

###  2.2 Comparing models

HD computing training results in models which are in the form of long
hypervectors. For example, for epilepsy, typically, we have one model (vector)
for ictal (seizure, S) and one model for inter-ictal (non-seizure, NS) data.
These two vectors can be easily compared using the cosine or Hamming distance,
giving us the value of separability/similarity of the two classes. If we train
only using data from individual seizures, comparing resulting vectors can
quantify the similarity between sets of seizures (intra-subject similarity).
This can further help to quantify how repeatable the seizure patterns of
specific patients are.

Similarly, performing personalized training results in pairs of seizure
(ictal) and non-seizure (interictal) model vectors for every subject. Then, an
interesting next step is to study the difference between models of different
subjects. This comparison leads to a characterization of the similarity of
seizure patterns between different patients (ictal-ictal or S to S), the
similarity of non-seizure data between patients (interictal-interictal or NS
to NS), as well as inter-subject ictal-interictal (S to NS) similarity. These
values can help us to understand how patients could take advantage of
generalized models from other patients. Potentially, it can even help to group
patients depending on the similarity between their seizure or non-seizure
models.

###  2.3 Creating generalized models

Focusing on generalized models, they can be created by training on the whole
data containing all subjects at once, but they can also be created from
already trained personalized models of individual subjects. This approach is
very interesting for distributed learning where, for example, each subject’s
model is created on a different wearable device and without sharing sensitive
clinical data. Generalized models can be combined on a central server where
all individual patient models are sent. It is very important to highlight that
these personalized models are privacy-preserving, as it is impossible to
decode back individual data after it was encoded and accumulated to
hyperdimensional models.

We test and compare different approaches to build general models from
personalized ones: 1) Avrg, 2) WSub and 3) WAdd&Sub. The simplest Avrg
approach is based on the average of all personalized model vectors (and
normalize to have binary model vectors again), as defined in equation 3.
$VecP$ stands for personalized vector of individual subject (weather it is
seizure or non-seizure model vector), and $NumS$ stands for number of subjects
that are available in a dataset. Another approach to creating generalized
models is similar to OnlineHD training, where before adding a new subject, its
model vectors are compared to the current generalized models and added
proportionally to the novelty they would bring. More specifically, the
personal vector of the correct class is added, but the opposite class is also
subtracted and multiplied with the weight. This is defined in equation 4. We
call this approach Wsub as only the opposite class is multiplied with the
weight. The third tested approach is called Wadd&sub as defined by equation 5.
Here the correct class is also multiplied with the corresponding weight before
being added to the generalized model vector. In the end, we also test if there
is any benefit of performing weighted adding in an iterative manner. In all
cases, the weight for adding the correct class is defined as

$w_{corr}=\alpha(1-hammDist_{corr})$ (1)

so that the more similar (higher hamming distance) personalized and
generalized vectors are, the smaller is the weight with which it is
multiplied, as it doesn’t bring a lot of new information. On the other hand,
weight for the opposite/wrong class is defined as

$w_{wrong}=\alpha*hammDist_{wrong}$ (2)

so that if the opposite class personal vector is very similar to the current
generalized vector (hamming distance is high), weight is also high, reducing
that vector significantly. In both equations for weight, there are additional
factors $\alpha_{corr}$ and $\alpha_{wrong}$ that define the importance of
adding the correct class or subtracting the wrong class. In this case, we use
value 1 for both of them, but they could be further optimized in the future,
depending on the specific use case.

$VecG=\frac{\sum_{p}^{NS}{VecP_{corr}}}{NS}$ (3)

$VecG=\frac{\sum_{p}^{NS}{VecP_{corr}-w_{wrong}VecP_{wrong}}}{\sum_{p}^{NS}{1-w_{wrong}}}$
(4)

$VecG=\frac{\sum_{p}^{NS}{w_{corr}VecP_{corr}-w_{wrong}VecP_{wrong}}}{\sum_{p}^{NS}{w_{corr}-w_{wrong}}}$
(5)

Further, we can also track the evolution of generalized models as more
subjects are added. For example, tracking average similarity with personalized
models as we add more personalized models enables us to determine how many
subjects are needed to reach stable generalized models that do not change
significantly when adding more subjects.

###  2.4 Hybrid models

Using generalized models would be most convenient from a practical
perspective. Models could be trained once and then used on all new subjects.
This is particularly interesting for wearable outpatient applications. But as
epilepsy exhibits highly personalized patterns, generalized models usually do
not perform well enough. Also, real-life recordings are highly unbalanced,
which poses another challenge for good performance, as shown in [7].

Having both personalized and generalized models, we can compare the detection
performance on individual subjects. We can further divide patients into groups
for which personalized perform better, or for which generalized models are
better. Here we investigate the hybrid approach of using generalized models by
default and replacing them with personalized models if the generalized
performs worse than a certain threshold. We study the percentage of subjects
that would need to use personalized models depending on the chosen performance
threshold of generalized and how the overall performance over the whole
population changes when including more subjects using generalized model.

Finally, HDC models allow us to have even more flexibility, for example, by
combining both personalized and generalized models at the same time, rather
than choosing only a personalized or a generalized model. More specifically,
since seizure and non-seizure models are just simple hypervectors, we test the
performance when only the seizure model is kept personalized, while the non-
seizure model vector is kept generalized (NSgen-Spers), or the other way
around (NSpers-Sgen). The NSgen-Spers approach is interesting as it reuses
non-seizure models from other subjects where only seizure data from individual
subjects are needed to create their personal seizure models (NSgen-Spers),
potentially saving a lot of time for training personalized models. On the
other hand, the NSpers-Sgen model is very interesting since we only require
non-seizure data of each subject to have a personalized model, which is much
easier to gather than seizure data. This would mean that the new subject would
only need to record some amount of non-seizure data rather than recording for
days or weeks to gather sufficient amount of seizure data. In this work, we
compare the performance of both of these approaches with personalized and
generalized model performances.

Figure 2:  Statistics of the Repomse dataset: number of seizures per patient
in original database, and also reasons for rejecting specific subjects. In the
end we keep 286 subjects which satisfy our criteria.

###  2.5 Models transfer between databases

In the literature, knowledge transfer between models of different datasets is
rarely tested. In the recent paper [19], deep learning approach called M2D2
(’Maximum-Mean-Discrepancy-Decoder’) was used for automatic temporal
localization and labeling of seizures in long EEG recordings of the Epilepsiae
[20] and CHB-MIT databases. Their problem formulation is slightly different
than ours, detecting windows of a certain size with a high probability that
they contain seizures, intending to simplify and speed up the labeling process
of a new database. But overall, this is one of the few works that test models
trained on a different dataset.

For hyperdimensional computing, based on our knowledge, there is no work that
performed generalized training so far, or that further combined models from
several datasets. Here, HD computing enables us not only to use generalized
models from different datasets but also to create hybrid models where only one
part of the model is from a different dataset. For example, we will test when
only the seizure (or non-seizure) model is from a different dataset. This
enables us to better understand the knowledge transfer between models of two
datasets, in both directions.

##  3 Experimental setup

###  3.1 Dataset

The main analyses were performed using the Repomse database [13] curated by
the Lausanne University Hospital. Originally, the database contained EEG
recordings of 869 patients with an average of 3.3 seizures per patient. A more
detailed distribution of the number of seizures per subject is shown in Fig.
2. We selected only patients with at least three seizures (to be able to
create personalized models), with identical 18 channels (i.e., FP1-F7, F7-T7,
T7-P7, P7-O1, FP1-F3, F3-C3, C3-P3, P3-O1, FP2-F4, F4-C4, C4-P4, P4-O2,
FP2-F8, F8-T8, T8-P8, P8-O2, FZ-CZ, CZ-PZ) and with a sampling frequency of at
least 256Hz. If the sampling frequency was higher, it was downsampled to
256Hz. Fig. 2 also shows the reasons for rejecting specific subjects and the
percentage of subjects affected. Finally, we kept 286 subjects, which is still
a much larger number than we could have get from any other publicly available
dataset, and then it was ideal for studying generalized models. Original
recordings contain a single seizure with a maximal length of 1 min, with
usually 3 minutes of interictal recording before the seizure onset. Similarly,
as in [21] we exclude 1 min of pre-ictal, and utilize 1 min of inter-ictal
data. In this way, every file contains a balanced amount of seizure and non-
seizure data.

Finally, to test knowledge and models transfer between databases, we also used
the public CHB-MIT database [14]. It is a long-term scalp EEG database for
epilepsy detection containing 980 hours of data recorded at 256Hz. It consists
of 183 seizures from 24 pediatric subjects. On average, it has 7.6 $\pm$ 5.8
seizures per subject, and between 23 and 26 channels, of which the same 18
channels as in Repomse database are kept. From the raw database, similarly as
in [12] we prepared a dataset that contains ten times more non-seizure data
than seizure data to be closer to a more real-life data balance. The main
reason to avoid a balanced scenario, which is common in many works in the
literature, is that it can lead to a highly overestimated performance, not
achievable during the continuous monitoring with a wearable device [7]. Non-
seizure segments were chosen randomly from available non-seizure data, but
excluding data 1 min before and 15 min after a seizure, and arranged around
seizures. Thus data structure was similar as in Repomse, with one-seizure-per-
file but with a bigger amount (10x more) of non-seizure data.

###  3.2 Features used

We use the mean amplitude and both relative and absolute power spectral
density in the five common brain wave frequency bands: delta: [0.5-4] Hz,
theta: [4-8] Hz, alpha: [8-12] Hz, beta: [12-30] Hz, gamma: [30-45] Hz, and
low-frequency components: [0-0.5] Hz and [0.1-0.5] Hz. We also included the
line length feature [22] and the ’approximate-zero-crossing’ features (AZC),
as proposed in [23]. The AZC features are based on simplifying the EEG signals
by applying a polygonal approximation to mimic how our brain selects prominent
patterns among noisy data. Then, a simple zero-crossing count is used as an
estimation of the dominating frequency of the signal. We extracted six
features by using six different thresholds for polygonal approximation. Thus,
in total, we extract 25 features from data segmented into 4-second windows
with a 0.5-second step. Before extracting the AZC features, the data is
filtered with a 4th-order, zero-phase Butterworth bandpass filter between [1,
20] Hz.

Figure 3:  Inter-subject similarity between model vectors of individual
subjects (both between ictal (Seiz, S) or inter-ictal (NonSeiz, NS) models).

###  3.3 Training and evaluation

For the HD computing workflow, we can choose between the standard learning or
OnlineHD approach. Since in [12] authors compared standard and OnlineHD for
the use case of epileptic seizure detection and showed better performance of
an OnlineHD, we use it in this work as well. Due to the subject-specific
nature of epileptic seizures, and one-seizure-per-file division, training and
evaluation of personalized models were done using leave-one-seizure-out cross-
validation. In the end, all test predictions are appended into the original
time order, and performance is calculated. This is a training method that is
more appropriate for long-term datasets, without excluding any data and thus
leading to more representative performance for real-life applications [24].
For generalized models, on the other hand, and for both databases, the leave-
one-subject-out cross-validation approach was used. To report the overall
performance, we calculate the average over all subjects, both for personalized
and generalized approaches.

The performance of the classifier is evaluated with respect to episode
detection and duration-based detection, measuring sensitivity, predictivity,
and F1 score. The performance at the episode level groups the signal into
blocks of seizure and non-seizure, as detailed in [25], while the performance
at the duration level considers the correct prediction of each sample. In
epilepsy detection, raw label predictions often lead to unrealistic seizure
dynamics (e.g., seizures lasting only a few seconds or seizures that are only
a few seconds apart). Thus, label post-processing is an integral part of the
pipeline. We use Bayesian post-processing that calculates cumulative
probability of classes and thresholds them as described in [21]. Threshold
value of 1.5 and window length of 5s were used.

##  4 Results

First, we show how HD computing can compare seizure and non-seizure models of
individual subjects. Then we show results related to the creation of
generalized models, followed by a comparison of the performance of
personalized and generalized models. Finally, we show the possibilities of
hybrid models and models trained on different datasets.

Figure 4:  Comparing different approaches to creating generalized models from
personalized. Similarity between seizure and non-seizure model vectors as well
as overall class separability is measured.

###  4.1 Inter-subject similarity

Fig. 3 shows a comparison between individual seizure and non-seizure models of
286 subjects. Non-seizure to non-seizure (NS to NS) models are the most
similar, followed by seizure to seizure (S to S). Finally, seizure to non-
seizure (S to NS) models are the least similar, which is expected. There is
significant difference between S to S and NS to NS, and also there is a
significant difference between S to NS similarities and S to S as well as NS
to NS. Wilcoxon paired tests were performed to compare distributions, with all
$p-$values being lower than $10^{-15}$. A similar comparison can be made
within the data of one single subject (intra-subject), comparing models of
individual seizures.

###  4.2 Creating generalized models

Fig. 4 shows the quality of generalized models created with four different
approaches. We measure the similarity between the generalized and all
individual personalized models, showing the mean and standard deviation. The
similarity is measured for all options: generalized seizure to personalized
seizure models (S to S), non-seizure to non-seizure (NS to NS), which
represent similarities between correct classes, and similarly NS to S and S to
NS, representing similarities between opposite classes. From similarities
between correct and opposite classes, we further calculate class vector
separability as a measure of how separable the models are.

When comparing the four approaches, the simplest averaging (Avrg) of
individual subject models results in the highest similarity between the
correct classes but also a high similarity with the opposite class, leading to
the lowest class separability. When we add weighted subtraction of opposite
class vectors in the Wsub approach, both similarities drop, but opposite
classes become less similar, leading to better separability. Finally, if
adding the correct class individual vectors is also multiplied with weight
(proportional to the novelty of individual subjects vector) accompanied with
weighted subtraction of opposite class (WAdd&Sub), similarities drop
significantly but lead to the highest classes separability. Since the order in
which subjects were added could have influenced the similarity of generalized
models with personalized ones that were added at the beginning of the process,
we also tested iterative creation, where we passed through all subjects
several times. As shown in Fig. 4 this didn’t change any of the measured
values.

Figure 5:  Evolution of generalized vectors as adding one by one individual
subject. Average similarity with all personalized subjects is measured to
characterize how stable are generalized vectors.

Next, we tried to assess how many individual subjects are needed to get stable
generalized models. Thus, we measure how similar the generalized model is on
average to all individual personalized ones (no matter if they were already
added to the generalized or not). We repeated this 10 times, adding subjects
in a different order, and we show the average similarity in Fig. 5. A clear
trend of similarity plateauing after adding approximately 40 patients (both
for seizure and non-seizure vectors) quantifies the minimum number of patients
needed to create stable generalized models.

###  4.3 Personalized vs. Generalized models

First, we were interested in comparing performance between personalized and
generalized models. If we look at the F1 score for episodes, personalized
models were better for 95 out of 286 subjects, generalized were better for 152
subjects, and for 39 subjects, both models had the same result. In Fig. 6, we
compared the performance of generalized and personalized models in three
cases: the average of all subjects, the average of subjects where generalized
models performed better (F1 score for episodes), and the average of subjects
where personalized models performed better. The figure shows that for the
whole group population, generalized performed, on average, slightly better
than personalized models in terms of F1 score for episodes (F1E), but when
looking at the F1 score for the duration (F1D), where we care about the
classification of each sample, personalized models performed much better. When
observing only subjects where personalized performed better, it can be seen
that, indeed, F1 score for episodes (F1E) dropped significantly for
generalized performance. Similarly, for subjects where generalized performed
better, F1E was much higher for generalized than personalized models. This gap
between performance of personalized models and generalized models for
individual subjects opens the possibility to stratify patients into two
groups.

Figure 6:  Comparing performance of personalized and generalized models: 1)
for all subjects (in gray), 2) on subjects where personalized models perform
better (in blue) and 3) on subjects where generalized perform better (in
green). Performance without any postprocessing is shown, for F1 score on the
level of episodes, duration and gmean of both (F1 combined).

As explained before, for real-life applications, ideally one generalized model
that would perform well for all subjects would be the best solution. But as
shown, generalized models do not always perform the best. Thus, we tested an
approach in which we used personalized models in case the generalized model
performed under a chosen threshold. We measured how overall performance for
all subjects depends on the chosen threshold and the final percentage of
generalized models used. In Fig. 7, results show that the highest overall
performance (average of all subjects in the Repomse database, if looking at
F1E) is achieved when 60 to 80 % of subjects used generalized models. With
full horizontal lines, the hypothetical performance with an optimal selection
of personalized or generalized models among subjects. This is of course not
achievable in practice, because we cannot know which model performs better if
both models are not built and tested. Thus here we use approach where by
default generalized model is used, unless it performs worse then chosen
threshold. More precisely, if the minimal satisfactory performance threshold
of generalized models is set to 60% this would result in 80% of patients
having generalized models. If we want to be more strict and choose a
performance threshold of 75% we will use 60% of generalized models. On the
right graph in Fig. 7, we show the performance after moving average post-
processing, and we can see that even if for raw predictions the ideal
performance (full horizontal lines) were not reached, with post-processing it
is possible to reach it.

Figure 7:  We investigate combinations of generalized and personalized models.
Namely, by default for all subjects generalized models is used, but if it
performs worse then certain performance threshold, personalized models is
used. On the left graph percentage of subjects that would use generalized
model is shown as threshold is decreased. On next two graphs, overall
performance when changing percentage of generalized models is shown.

###  4.4 Hybrid models

Finally, a unique possibility of HD computing models is to actually not only
choose a personalized or generalized model per subject, but the ability to
combine and create hybrid models. Fig. 8 shows the performance of random
fores, personalized, generalized and two hybrid models (NSgen-Spers and
NSpers-Sgen). Sensitivity (TPR), precision (PPV) and F1 score for episode and
duration based performance are shown.

When looking at episode performance, HD computing models outperformed random
forest with the same set of features. Further, generalized and personalized
models perform similarly, and hybrid NSpers-Sgen models achieves slightly
higher F1 score for episodes. This is due to higher precision (PPV), or less
false positives. If we look at performance on the level of duration, it can be
noticed that generalized and NSpers-Sgen models perform significantly worse in
terms of sensitivity (TPR), leading also to a lower final F1 score. The NSgen-
Spers approach, on the other hand, performs as well as personalized models in
terms of sensitivity, having also a slightly higher precision and finally a
slightly higher final F1 score (F1D) than personalized models. This means that
non-seizure data can be used from other subjects but that for good sample-by-
sample classification it is important to keep seizure models personalized.

###  4.5 Models transfer between databases

Fig. 9 shows the result of testing models trained on one database (CHB-MIT)
and utilizing (testing) them on a different database (Repomse). More
specifically, the performance of five different models is shown: personalized
models and generalized models trained on Repomse, followed by three models
trained on CHB-MIT database: generalized and hybrid (NSgen-Spers and NSpers-
Sgen). Boxplots represent the performance distribution over all subjects.
First, a clear drop in F1 score (for episode and duration) when using a
generalized model from the CHB-MIT dataset is visible. This is due to much
worse seizure detection as measured by significantly lower sensitivity (TPR)
both on episode and duration levels. The NSpers-Sgen approach doesn’t help to
improve performance, but the NSgen-Spers does help. Indeed, personalizing
seizure models improves sensitivity and also the final F1 score (both for
episodes and duration), reaching and even exceeding the levels of the
generalized model from the same Repomse database.

Fig. 10 shows the opposite transfer of models. Models trained on Repomse
dataset with many subjects are tested on the CHB-MIT dataset. Here NSpers-Sgen
models performed better, as in Repomse there is a very small amount of non-
seizure data, and thus it doesn’t generalize well for a dataset with much more
non-seizure data. On the other side, Repomse contained more subjects and thus
seizure data seems to be general enough to use generalized models.

Figure 8:  Performance of 4 types of models: personalized, generalized and
hybrid (NSgen-Spers and NSpers-Sgen). Boxplots represent performance over all
subjects. Sensitivity (TPR), precision(PPV) and F1 score both for performance
on the level of episodes and on the whole duration level are shown.

##  5 Discussion

By analyzing inter-patient similarities, we show that non-seizure models are
more similar than seizure models. This makes sense, as seizures usually
exhibit specific individual patterns. Still, seizures to non-seizures are the
least similar, enabling classification. For long-term, unbalanced epilepsy
recordings, these trends would probably be even stronger, especially regarding
non-seizure models. Further, this opens the possibility of checking
similarities between individual patients and potentially grouping them into
groups of similar seizure (or non-seizure) patterns.

Furthermore, we studied the creation of generalized models by adding
personalized models one-by-one in three different ways. It is shown that
simple averaging of personalized models leads to the most similar vectors to
the summed personalized ones, but also leads to low class separability.
Approaches where vectors are weighted before being added, and also the idea of
subtracting opposite class, leads to more separable generalized vectors. Thus,
we recommend using one of those approaches for creating generalized model
vectors. Iterative passing through subjects doesn’t lead to better-generalized
models. This is most likely due to the fact that we used 286 subjects, and
generalized models were very stable, so passing again through individual
models didn’t change generalized models anymore. Assessment of the evolution
of generalized models as, one-by-one, more individual subject models were
added, lead to the conclusion that at least 40 individual subjects are needed
to get stable generalized model vectors. We have to consider that different
databases with unbalanced datasets result in different minimal number of
subjects. For example, if data is long-term (such as, for example, in CHB-MIT
epilepsy database), maybe non-seizure vectors will stabilize much sooner,
whereas, for stable seizure models, we will need many more subjects.

Figure 9:  Knowledge transfer between two databases is tested on the Repomse
dataset. Performance of 5 types of models is shown: personalized, generalized
Repomse (models from Repomse data), generalized CHB-MIT, and hybrid from CHB-
MIT (NSgen-Spers and NSpers-Sgen).

Assessment of the evolution of generalized models as, one-by-one, more
individual subject models were added, lead to the conclusion that at least 40
individual subjects are needed to get stable generalized model vectors. We
have to consider that different databases with unbalanced datasets result in
different minimal number of subjects. For example, if data is long-term (such
as, for example, in CHB-MIT epilepsy database), maybe non-seizure vectors will
stabilize much sooner, whereas, for stable seizure models, we will need much
more subjects.

Observing the performance of personalized and generalized models led to the
conclusion that there is an obvious stratification between subjects. This
could be due to not enough seizures or very different seizures in some
patients, which makes personalized models not precise enough. It can also be
that some subjects have very specific seizures for which generalized seizure
models don’t perform well.

Even if utilizing generalized models for all subjects would be the most
practical, generalized models do not perform well for all subjects. In Fig. 7,
we can see that when caring about sample-by-sample prediction, personalized
models always perform better. With a simple system where personalized models
are built only for subjects where generalized models performed worse than some
preset threshold, it is possible to achieve even better performance than with
only generalized (or even only personalized models). Specifically, for the
Repomse dataset, it is possible to maintain generalized models for up to 80%
of patients without loss of performance. This is probably dataset-specific,
and numbers might be significantly different if long-term datasets are used.

Finally, we tested the detection performance of hybrid models, containing one
generalized and one personalized model vector (NSgen-Spers and NSpers-Sgen),
and show that, indeed, they can improve overall seizure detection even more.
For example, if we require high episode performance, the NSpers-Sgen model
gives the best overall performance by decreasing the number of false positive
seizure predictions. In contrast, if we care that the entire duration of the
seizure is correctly classified, the (NSgen-Spers model performs better by
keeping high sensitivity. We tested the possibility of keeping both
personalized and generalized models for each subject and giving a prediction
of a more certain model, but this led to giving a prediction of the
personalized model in almost all the cases, thus not being particularly
interesting.

Figure 10:  Knowledge transfer between two databases is tested on the CHB-MIT
dataset. Performance of 5 types of models is shown: personalized, generalized
CHB-MIT (models from CHB-MIT data), generalized Repomse, and hybrid from
Repomse (NSgen-Spers and NSpers-Sgen).

When comparing the possibility of transferring knowledge between databases,
interesting results were achieved. Transferring knowledge from the long-term
CHB-MIT database to a shorter (but with more subjects) Repomse database showed
that it was not good enough to use just a general model from CHB-MIT. Namely,
seizure models from CHB-MIT showed low sensitivity (TPR) and F1 scores on the
Repomse database. However, personalizing seizure models using Repomse data
improved predictions significantly, leading to improved results compared to
generalized (or even personalized) Repomse models. This means that for
epilepsy detection on the Repomse dataset, it is possible to reuse non-seizure
models from the CHB-MIT database and only retrain seizure models. When
transferring knowledge from Repomse to CHB-MIT, an opposite effect was
noticed. Seizures from Repomse were general enough, but non-seizure models
were not general enough to use on a dataset that contained much more non-
seizure data. Thus, to avoid full training on CHB-MIT, seizure models from
Repomse can be used. All these results show that having a big long-term
database with many subjects, and building generalized models trained on that
database could be potentially reusable for new unseen patients (without having
to retrain models). If needed, as in NSgen-Spers and NSpers-Sgen hybrid
approaches, only one class could be retrained, saving a lot of training time.

Limitations and future work
The Repomse dataset is very interesting due to the high number of subjects
available, which enabled us to study properly generalized models. As we have
shown, we indeed needed more than 40 subjects to achieve stable generalized
models. This is more than what is available in other public datasets (i.e., 24
subjects in CHB-MIT or 18 in SWEC-ETHZ [26]). However, it is a short-term
database, meaning that performances might be overestimated with respect to
what they would be on a long-term database. Thus, we studied knowledge
transfer between slightly bigger data subset from the CHB-MIT database, using
10 times more non-seizure data. Ideally, in the future, a similar analysis
should also be performed on a long-term database with a similarly large number
of subjects.

From a neurological perspective, as the CHB-MIT database contains pediatric
patients and the Repomse adult population, mixing the types of patients might
not be that compelling. Furthermore, databases contain a broad range of
seizure types but, unfortunately, no labels. Mixing different seizure types
adds a certain level of complexity. Here we were interested in the performance
possible even in this limited scenario, but in the future, repeating this
analysis separately for different types of seizure would be more interesting
from a medical perspective.

##  6 Conclusion

In this work, we have demonstrated how HD computing, and the way its models
are built and stored, can be used to further understand, compare, and create
more complex machine learning models. These possibilities are not feasible
with other state-of-the-art models, such as random forests or neural networks.
We compare inter-subject similarity of seizure and non-seizure epilepsy models
and then study the process of creation of generalized models from personalized
ones, which is an essential part of distributed wearable applications. We
tested a novel hybrid approach to create models that consist partially of
personalized and partially of generalized models. This is a unique possibility
that hyperdimensional computing allows, and we show that these models result
in an improved epilepsy detection performance. Similarly, we use hybrid models
to test knowledge transfer between models of different epilepsy databases.
Finally, all those examples could be very interesting not only from an
engineering perspective to create better models for wearables but also from a
neurological perspective to understand individual epilepsy patterns better.

## References

  * [1] Florian Mormann et al. “Seizure prediction: the long and winding road” In _Brain: A Journal of Neurology_ 130, 2007, pp. 314–333 DOI: 10.1093/brain/awl241
  * [2] Dionisije Sopic et al. “Personalized seizure signature: An interpretable approach to false alarm reduction for long‐term epileptic seizure detection” In _Epilepsia_ , 2022 DOI: 10.1111/epi.17176
  * [3] Pentti Kanerva “Hyperdimensional Computing: An Introduction to Computing in Distributed Representation with High-Dimensional Random Vectors” In _Cognitive Computation_ 1, 2009 DOI: 10.1007/s12559-009-9009-8
  * [4] Mohsen Imani et al. “SemiHD: Semi-Supervised Learning Using Hyperdimensional Computing” In _IEEE ICCAD_ , 2019 DOI: 10.1109/ICCAD45719.2019.8942165
  * [5] Mohsen Imani et al. “A Framework for Collaborative Learning in Secure High-Dimensional Space” In _IEEE CLOUD_ , 2019, pp. 435–446 DOI: 10.1109/CLOUD.2019.00076
  * [6] S. Benatti et al. “Online Learning and Classification of EMG-Based Gestures on a Parallel Ultra-Low Power Platform Using Hyperdimensional Computing” In _IEEE TBIoCAS_ , 2019 DOI: 10.1109/TBCAS.2019.2914476
  * [7] Una Pale et al. “Multi-Centroid Hyperdimensional Computing Approach for Epileptic Seizure Detection” In _Frontiers in Neurology_ 13, 2022
  * [8] Mohsen Imani et al. “Revisiting HyperDimensional Learning for FPGA and Low-Power Architectures” In _IEEE HPCA_ , 2021, pp. 221–234 DOI: 10.1109/HPCA51647.2021.00028
  * [9] Geethan Karunaratne et al. “Energy Efficient In-Memory Hyperdimensional Encoding for Spatio-Temporal Signal Processing” In _IEEE TCAS_ , 2021 DOI: 10.1109/TCSII.2021.3068126
  * [10] Alessio Burrello et al. “An Ensemble of Hyperdimensional Classifiers: Hardware-Friendly Short-Latency Seizure Detection With Automatic iEEG Electrode Selection” In _IEEE JBHI_ , 2021 DOI: 10.1109/JBHI.2020.3022211
  * [11] Fatemeh Asgarinejad et al. “Detection of Epileptic Seizures from Surface EEG Using Hyperdimensional Computing” In _IEEE EMBC_ , 2020 DOI: 10.1109/EMBC44109.2020.9175328
  * [12] Una Pale et al. “Exploration of Hyperdimensional Computing Strategies for Enhanced Learning on Epileptic Seizure Detection” In _IEEE EMBC_ , 2022 DOI: 10.1109/EMBC48229.2022.9870919
  * [13] Sylvain Rheims et al. “Hypoxemia following generalized convulsive seizures: Risk factors and effect of oxygen therapy” In _Neurology_ 92, 2019 DOI: 10.1212/WNL.0000000000006777
  * [14] Ali Hossam Shoeb “Application of machine learning to epileptic seizure onset detection and treatment”, 2009
  * [15] Alejandro Hernández-Cano et al. “Real-Time and Robust Hyperdimensional Classification” In _VLSI_ , 2021
  * [16] Abbas Rahimi et al. “Hyperdimensional Computing for Blind and One-Shot Classification of EEG Error-Related Potentials” In _Mobile Networks and Applications_ 25, 2020 DOI: 10.1007/s11036-017-0942-6
  * [17] Abbas Rahimi et al. “Hyperdimensional biosignal processing: A case study for EMG-based hand gesture recognition” In _IEEE ICRC_ , 2016 DOI: 10.1109/ICRC.2016.7738683
  * [18] En-Jui Chang et al. “Hyperdimensional Computing-based Multimodality Emotion Recognition with Physiological Signals” In _IEEE AICAS_ , 2019 DOI: 10.1109/AICAS.2019.8771622
  * [19] Alireza Amirshahi et al. “M2D2: Maximum-Mean-Discrepancy Decoder for Temporal Localization of Epileptic Brain Activities” In _IEEE Journal of Biomedical and Health Informatics_ PP, 2022 DOI: 10.1109/JBHI.2022.3208780
  * [20] Juliane Klatt et al. “The EPILEPSIAE database: An extensive electroencephalography database of epilepsy patients” In _Epilepsia_ 53.9, 2012 DOI: 10.1111/j.1528-1167.2012.03564.x
  * [21] Valentin Gabeff et al. “Interpreting deep learning models for epileptic seizure detection on EEG signals” In _Artificial Intelligence in Medicine_ 117, 2021 DOI: 10.1016/j.artmed.2021.102084
  * [22] R. Esteller et al. “Line length: an efficient feature for seizure onset detection” In _IEEE IEMBS_ 2, 2001 DOI: 10.1109/IEMBS.2001.1020545
  * [23] R. Zanetti et al. “Approximate zero-crossing: a new interpretable, highly discriminative and low-complexity feature for EEG and iEEG seizure detection” In _Journal of Neural Engineering_ 19.6, 2022 DOI: 10.1088/1741-2552/aca1e4
  * [24] William Andrew Simon et al. “HDTorch: Accelerating Hyperdimensional Computing with GP-GPUs for Design Space Exploration” In _IEEE ICCAD_ Association for Computing Machinery, 2022, pp. 1–8 DOI: 10.1145/3508352.3549475
  * [25] Una Pale et al. “Importance of methodological choices in data manipulation for validating epileptic seizure detection models”, 2023 DOI: 10.48550/arXiv.2302.10672
  * [26] Alessio Burrello et al. “Laelaps: An Energy-Efficient Seizure Detection Algorithm from Long-term Human iEEG Recordings without False Alarms” In _DATE_ , 2019 DOI: 10.23919/DATE.2019.8715186