further work on introduction
This commit is contained in:
+97
-104
@@ -7,25 +7,18 @@
|
||||
\subsection{Physiological Background}\label{subsec:physiological_background}
|
||||
|
||||
\subsubsection{Menstrual Cycle}\label{subsec:menstrual_cycle}
|
||||
The menstrual cycle describes the physiological changes in the female body that prepare it for pregnancy.
|
||||
It is divided into two phases: the \textbf{follicular phase} and the \textbf{luteal phase}.
|
||||
\\
|
||||
During the follicular phase, the ovarian follicles mature, and the endometrium (the inner lining of the uterus) thickens
|
||||
in preparation for a potential implantation of a fertilized egg.
|
||||
Around day 14 of a typical cycle, ovulation occurs, marking the transition to the luteal phase.
|
||||
Ovulation refers to the rupture of the mature ovarian follicle and the release of an egg cell into the fallopian tube.
|
||||
The menstrual cycle consists of physiological changes preparing the female body for potential pregnancy,
|
||||
typically spanning around 28 days but varying considerably among individuals.
|
||||
It includes two main phases: the follicular phase, beginning with menstruation, and the luteal phase, following ovulation.
|
||||
|
||||
Ovulation is triggered by a surge in \textbf{luteinizing hormone (LH)}
|
||||
and \textbf{follicle-stimulating hormone (FSH)}, following a peak in estradiol levels.
|
||||
As ovulation occurs, estradiol levels drop, progesterone levels begin to rise and a slight increase in body temperature
|
||||
(typically around 0.5°C) can be observed.
|
||||
This marks the beginning of the luteal phase.
|
||||
During the follicular phase, ovarian follicles mature under the influence of rising estradiol levels, thickening the uterine lining (endometrium).
|
||||
Around mid-cycle, a surge of luteinizing hormone (LH) and follicle-stimulating hormone (FSH), triggered by peak estradiol,
|
||||
induces ovulation—the release of a mature egg into the fallopian tube.
|
||||
|
||||
During the luteal phase, the endometrium thickens further, creating an optimal environment for embryo implantation.
|
||||
LH and FSH levels decrease, while progesterone remains elevated to support endometrial maintenance.
|
||||
If fertilization does not occur, progesterone levels drop, leading to the shedding of the endometrial lining along
|
||||
with the unfertilized egg.
|
||||
This process, known as menstruation, marks the beginning of a new cycle.
|
||||
After ovulation, the luteal phase begins.
|
||||
Progesterone increases substantially, maintaining endometrial thickness for potential embryo implantation.
|
||||
In parallel, a subtle rise in body temperature (~0.5°C) occurs due to progesterone elevation.
|
||||
If fertilization does not happen, progesterone and temperature decline back to baseline levels, resulting in menstruation and initiating a new cycle.
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
@@ -36,27 +29,23 @@ This process, known as menstruation, marks the beginning of a new cycle.
|
||||
\label{fig:background_menstrual_cycle_physiology}
|
||||
\end{figure}
|
||||
|
||||
The menstrual cycle typically lasts around 28 days, with ovulation occurring near the midpoint.
|
||||
However, variations, particularly in the follicular phase length, are common and can be influenced by factors such as stress, diet, exercise and age~\cite{silberstein_physiology_2000}.
|
||||
Figure~\ref{fig:background_menstrual_cycle_physiology} provides a detailed overview of the hormonal and physiological changes throughout the menstrual cycle.
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\includegraphics[width=0.9\textwidth]{resources/figures/background/background_labeled_cycle}
|
||||
\caption{Body core temperature curve across a menstrual cycle. The red line represents a locally smoothed temperature trend.
|
||||
Menstruation, ovulation, and the fertile phase are indicated in red, blue, and green, respectively.}
|
||||
Menstruation, ovulation, and the fertile window are indicated in red, blue, and green, respectively.}
|
||||
\label{fig:background_labeled_cycle}
|
||||
\end{figure}
|
||||
|
||||
Figure~\ref{fig:background_menstrual_cycle_physiology} illustrates these physiological changes, highlighting hormonal fluctuations and temperature shifts around ovulation.
|
||||
The menstrual cycle length varies significantly, influenced by factors such as stress, age, diet, and exercise~\cite{silberstein_physiology_2000}.
|
||||
|
||||
Figure~\ref{fig:background_labeled_cycle} shows the temperature curve over the course of a menstrual cycle with the
|
||||
menstruation, fertile phase and ovulation marked.
|
||||
menstruation, fertile window and ovulation marked.
|
||||
It starts with a menstruation and ends just before the next menstruation.
|
||||
The follicular phase starts at the beginning and goes on until the ovulation.
|
||||
The luteal phase begins at the ovulation and continues until the next menstruation.
|
||||
|
||||
Not every cycle results in ovulation—a phenomenon known as anovulation—which leads to a monophasic temperature pattern.
|
||||
Anovulation can have various causes, including hormonal imbalances, stress, or underlying health conditions~\cite{rosenfield_adolescent_2013}.
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\includegraphics[width=0.9\textwidth]{resources/figures/background/background_anovulatory_cycle}
|
||||
@@ -65,25 +54,28 @@ Anovulation can have various causes, including hormonal imbalances, stress, or u
|
||||
\end{figure}
|
||||
|
||||
|
||||
Anovulation is reflected in temperature data as either an absence of a clear temperature rise or a rise
|
||||
that is insufficient in magnitude or duration to be considered a reliable indicator of ovulation.
|
||||
Distinguishing between ovulatory and anovulatory cycles is challenging, as the only definitive confirmation of
|
||||
successful ovulation in a clinical sense is a positive pregnancy test.
|
||||
While many cycles exhibit a characteristic biphasic pattern, deviations from this norm are common.
|
||||
Some remain monophasic, which might be an indication for an anovulatory cycle, which is a menstrual cycle, where no ovulation occurs.
|
||||
Anovulation can have various causes, including hormonal imbalances, stress, or underlying health conditions~\cite{rosenfield_adolescent_2013}.
|
||||
Monophasic cycles with a confirmed ovulation event have been observed, so there seems to be no clear indication that it is a direct cause of anovulation~\cite{moghissi_accuracy_1976}.
|
||||
Thus, distinguishing between ovulatory and anovulatory cycles is challenging, as the only definitive confirmation of
|
||||
successful ovulation in a clinical sense is a pregnancy.
|
||||
Even ultrasound imaging can only confirm that an egg was released from its follicle—not whether it was successfully implanted or fertilized.
|
||||
Figure~\ref{fig:background_anovulation} shows a cycle that does not have an ovulation, and thus no resulting temperature rise.
|
||||
|
||||
Figure~\ref{fig:background_anovulation} shows a cycle with a monophasic temperature pattern.
|
||||
|
||||
To illustrate the diversity of real-world menstrual cycles, Figures~\ref{fig:background_long_cycle} and~\ref{fig:background_short_cycle}
|
||||
show examples of cycles that are significantly longer or shorter than a normative 28-day cycle.
|
||||
\citeauthor{bull_real-world_2019} have done an extensive study on cycle variability,
|
||||
highlighting that women frequently deviate from the normative cycle, especially with age\cite{bull_real-world_2019}.
|
||||
|
||||
\begin{figure}[htb]
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\includegraphics[width=0.9\textwidth]{resources/figures/background/background_long_cycle}
|
||||
\caption{Example of a long cycle with a length of 111 days}
|
||||
\label{fig:background_long_cycle}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}[htb]
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\includegraphics[width=0.9\textwidth]{resources/figures/background/background_short_cycle}
|
||||
\caption{Example of a short cycle with a length of 22 days}
|
||||
@@ -93,36 +85,28 @@ show examples of cycles that are significantly longer or shorter than a normativ
|
||||
These irregularities appear not only on a per-cycle basis, but also across time within the same individual.
|
||||
Figures~\ref{fig:background_irregular_cycles} and~\ref{fig:background_regular_cycles}
|
||||
show examples of a woman with an irregular and a regular menstrual cycle pattern, respectively.
|
||||
Raw body core temperature readings are shown in light blue, with a red line indicating smoothing by local regression.
|
||||
Vertical dotted black lines mark the beginning of each cycle.
|
||||
The irregular example highlights how multiple parameters can vary between individuals:
|
||||
cycle length, timing of ovulation, temperature shift magnitude between phases, and intra-phase temperature variability.
|
||||
This multidimensional variability underscores the need for adaptive, data-driven models capable of learning personalized patterns---
|
||||
rather than relying on population-wide assumptions.
|
||||
For a regular cycle pattern, sophisticated analysis or predictions are often not necessary, as the last ovulation day
|
||||
can reliably be used as the next.
|
||||
|
||||
\begin{figure}[htb]
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\includegraphics[width=0.9\textwidth]{resources/figures/background/background_irregular_cycle_example}
|
||||
\caption{Example of a woman with irregular menstrual rhythm}
|
||||
\caption{Example of a woman with irregular menstrual rhythm. The dashed vertical lines indicate the ends of each cycle.}
|
||||
\label{fig:background_irregular_cycles}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
\includegraphics[width=0.9\textwidth]{resources/figures/background/background_regular_cycle_example}
|
||||
\caption{Example of a woman with regular menstrual rhythm}
|
||||
\caption{Example of a woman with regular menstrual rhythm. The dashed vertical lines indicate the ends of each cycle.}
|
||||
\label{fig:background_regular_cycles}
|
||||
\end{figure}
|
||||
|
||||
\subsubsection{Fertility Prediction}\label{subsubsec:fertility_prediction}
|
||||
Throughout the menstrual cycle, the chance of fertilization varies significantly.
|
||||
An egg cell released from the ovary during ovulation, can be fertilized for up to 24 hours.
|
||||
However, since male sperm cells can survive up to 6 days inside the female reproductive tract,
|
||||
the fertile window is typically defined as the five days before ovulation until one day after ovulation~\cite{dunson_day-specific_1999}.
|
||||
Research by~\citeauthor{dunson_day-specific_1999} has shown that the highest chance of fertilization is around one day before ovulation,
|
||||
as illustrated in Figure~\ref{fig:background_pregnancy_chance}.
|
||||
Fertility varies throughout the menstrual cycle, centered around the ovulation event.
|
||||
An egg remains viable for about 24 hours post-ovulation, while sperm can survive up to 6 days in a woman's reproductive tract,
|
||||
thus the fertile period extends to approximately five days prior to ovulation~\cite{dunson_day-specific_1999}.
|
||||
Consequently, the whole fertile window generally spans six days: five days preceding ovulation and one day after.
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
@@ -132,11 +116,30 @@ as illustrated in Figure~\ref{fig:background_pregnancy_chance}.
|
||||
\label{fig:background_pregnancy_chance}
|
||||
\end{figure}
|
||||
|
||||
It is important to note that fertility prediction is inherently dependent on ovulation prediction.
|
||||
Since the probability of conception is tightly linked to ovulation timing, the accuracy of fertility prediction methods
|
||||
is constrained by the precision of ovulation detection.
|
||||
This relationship underscores the necessity of developing reliable ovulation prediction models,
|
||||
as even small inaccuracies can significantly impact fertility assessments.
|
||||
Figure~\ref{fig:background_pregnancy_chance} demonstrates the probability of fertilization peaking one day before ovulation, emphasizing the critical timing for fertility prediction.
|
||||
|
||||
Fertility prediction fundamentally depends on accurate ovulation timing.
|
||||
However, since the goal is to identify the fertile window before ovulation occurs, detection must be early and precise.
|
||||
For individuals trying to conceive or avoid pregnancy, knowing the window of fertility is more actionable than identifying the ovulation event itself.
|
||||
|
||||
\subsubsection{Practical Use Cases}\label{subsubsec:practical_use_cases}
|
||||
In this study, we will focus on \emph{natural family planning} (NFP), which includes preventing and achieving pregnancy.
|
||||
Individuals aiming to avoid pregnancy identify fertile days to abstain from intercourse,
|
||||
whereas those seeking pregnancy aim to focus intercourse around days with the highest fertility probability.
|
||||
|
||||
Both use cases revolve around accurately predicting ovulation.
|
||||
However, the implications of prediction errors differ significantly.
|
||||
A false-positive prediction indicates high fertility despite actual fertility being low or nonexistent,
|
||||
whereas a false-negative prediction implies low fertility when fertility is actually high.
|
||||
|
||||
For women aiming to avoid pregnancy, minimizing false-negative predictions is crucial due to the risk of unintended pregnancy.
|
||||
Although false-positives may lead to unnecessary abstinence, this outcome is generally considered less severe.
|
||||
Consequently, prediction algorithms should be conservative, erring on the side of higher fertility estimates to prioritize safety.
|
||||
|
||||
Conversely, for women aiming to conceive, false-positive predictions could misdirect efforts toward incorrect cycle days,
|
||||
causing frustration or delays.
|
||||
False-negatives have fewer negative consequences.
|
||||
Therefore, algorithms for this group should prefer cautious fertility estimates, reducing the risk of misdirected effort.
|
||||
|
||||
\subsubsection{Physiological Signs of Ovulation}\label{subsubsec:physiological_signs}
|
||||
Several physiological signs correlate with ovulation and can be used for prediction.
|
||||
@@ -154,26 +157,7 @@ detecting the slight temperature rise that follows ovulation.
|
||||
Advances in wearable technology have further enabled continuous and automated temperature monitoring,
|
||||
improving accessibility and usability~\cite{alexander_fertilitatsmonitoring_2014, luo_detection_2020, yu_tracking_2022}.
|
||||
|
||||
\subsubsection{Use Cases of Fertility Prediction}\label{subsubsec:use_cases_of_ovulation_prediction}
|
||||
The prediction of ovulation and corresponding fertility within a menstrual cycle serves two distinct use cases.
|
||||
Specifically, we will focus on \emph{natural family planning} (NFP), which includes preventing and achieving pregnancy.
|
||||
Individuals aiming to avoid pregnancy identify fertile days to abstain from intercourse,
|
||||
whereas those seeking pregnancy aim to focus intercourse around days with the highest fertility probability.
|
||||
|
||||
Both use cases revolve around accurately predicting ovulation.
|
||||
However, the implications of prediction errors differ significantly.
|
||||
A false-positive prediction indicates high fertility despite actual fertility being low or nonexistent,
|
||||
whereas a false-negative prediction implies low fertility when fertility is actually high.
|
||||
|
||||
For women aiming to avoid pregnancy, minimizing false-negative predictions is crucial due to the risk of unintended pregnancy.
|
||||
Although false-positives may lead to unnecessary abstinence, this outcome is generally considered less severe.
|
||||
Consequently, prediction algorithms should be conservative, erring on the side of higher fertility estimates to prioritize safety.
|
||||
|
||||
Conversely, for women aiming to conceive, false-positive predictions could misdirect efforts toward incorrect cycle days,
|
||||
causing frustration or delays.
|
||||
False-negatives have fewer negative consequences.
|
||||
Therefore, algorithms for this group should prefer cautious fertility estimates,
|
||||
reducing the risk of misdirected effort.
|
||||
Among the available methods, temperature-based monitoring, especially when automated and continuous, offers a promising avenue for large-scale cycle analysis.
|
||||
|
||||
\subsection{Data Source and Characteristics}\label{subsec:data_background}
|
||||
This study is based on a dataset collected from users of the \emph{OvulaRing}~\cite{noauthor_ovularing_nodate},
|
||||
@@ -202,14 +186,15 @@ Therefore, all user-entered cycle starts undergo manual review to reduce annotat
|
||||
In addition to temperature measurements, the database includes contextual metadata such as age, height, weight, and optional user-entered markers.
|
||||
These markers provide further physiological context and may include information about intermediate bleeding, sexual intercourse, or positive pregnancy tests.
|
||||
|
||||
At the time of writing, the dataset contains approximately 65{,}000 annotated cycles, comprising more than 350 million individual temperature measurements.
|
||||
At the time of writing, the dataset contains approximately 65{,}000 annotated cycles,
|
||||
comprising more than 350 million individual temperature measurements~\footnote{This is the largest dataset of continuous body core temperature data used in any study so far.}.
|
||||
|
||||
\subsubsection{Dataset Summary}
|
||||
For the present study, the dataset was reduced to approximately 40{,}000 cycles after filtering out entries that were incomplete,
|
||||
contained hardware-related anomalies, or fell outside a reasonable cycle length range.
|
||||
|
||||
Very short cycles typically result from incorrect cycle start entries or premature termination of temperature recordings.
|
||||
Extremely long cycles are often due to data entry errors or pregnancy-related recordings,
|
||||
Cycles shorter than 10 days typically result from incorrect cycle start entries or premature termination of temperature recordings.
|
||||
Long cycles, longer than 150 days, are often due to data entry errors or pregnancy-related recordings,
|
||||
where the sensor was worn continuously throughout gestation—sometimes producing sequences up to nine months long.
|
||||
|
||||
While such cases may still contain useful information, they were excluded from this analysis to avoid complications in preprocessing and labeling.
|
||||
@@ -222,16 +207,18 @@ The median number of cycles per user is 4 (IQR: 2--8) and the median cycle lengt
|
||||
The average data density—defined as the fraction of available measurements out of the theoretical maximum of 288 measurements per day—is 0.90.
|
||||
This corresponds to an average data availability of 90\% per cycle, with an average loss of 10\%.
|
||||
|
||||
It should be noted, that both ovulation day and anovulation estimates are based on retrospective algorithmic inference, not human labels.
|
||||
Further details are provided in section~\ref{sec:methodology}.
|
||||
37934 cycles (94\%) were classified as biphasic and 2333 (6\%) as monophasic.
|
||||
|
||||
Users had a median age of 32 years (IQR: 29–36), median weight of 65 kg (IQR: 58–77), and median height of 168 cm (IQR: 163–172).
|
||||
|
||||
\subsubsection{Irregularities and Confounding Factors}
|
||||
Core body temperature is influenced by various factors unrelated to the menstrual cycle.
|
||||
Despite careful data collection, real-world measurements are subject to physiological and behavioral noise.
|
||||
Especially core body temperature is influenced by various factors unrelated to the menstrual cycle.
|
||||
Illnesses—especially those involving fever—can significantly affect temperature patterns.
|
||||
This poses a challenge for any analysis relying on temperature data, as one of the key physiological indicators of ovulation is a post-ovulatory temperature rise (see Section~\ref{subsubsec:physiological_signs}).
|
||||
|
||||
Figure~\ref{fig:background_fever_cycle} shows an example of a cycle where an illness caused a marked increase in temperature.
|
||||
This event is particularly problematic because the fever-induced rise occurs just before the expected ovulatory shift, potentially confounding ovulation detection.
|
||||
This event is particularly problematic because the fever-induced rise occurs just before the expected ovulatory shift, potentially confounding fertility detection.
|
||||
Distinguishing illness-related changes from cycle-related ones requires models that are sensitive to context and robust to outliers.
|
||||
|
||||
\begin{figure}[htbp]
|
||||
@@ -254,39 +241,35 @@ Figure~\ref{fig:background_menstruation_data_gap} shows an example cycle with a
|
||||
\label{fig:background_menstruation_data_gap}
|
||||
\end{figure}
|
||||
|
||||
%TODO: more stats!
|
||||
|
||||
\subsubsection{Privacy}
|
||||
The dataset used in this study contains sensitive personal health information and is handled with strict privacy safeguards.
|
||||
All data is pseudonymized and processed exclusively on encrypted devices, ensuring that no identifiable information can be traced back to individual users.
|
||||
VivoSensMedical does not share user data with third parties; the data is used solely for internal research and product improvement efforts that directly benefit users at no additional cost.
|
||||
|
||||
\subsection{Technical Background}\label{subsec:technological_background}
|
||||
With a large, high-resolution dataset of longitudinal temperature measurements and associated metadata available,
|
||||
the next challenge lies in how to model such sequential data effectively.
|
||||
Accurate ovulation prediction requires algorithms that can handle temporal dependencies,
|
||||
irregularities, and physiological variability across users.
|
||||
To this end, we turn to machine learning techniques designed for time series analysis,
|
||||
beginning with foundational concepts and progressing to modern neural architectures.
|
||||
|
||||
\subsubsection{Time Series Analysis}\label{subsubsec:time_series_analysis}
|
||||
Time series analysis is a fundamental tool for studying sequential data that evolves over time.
|
||||
Unlike other data types, time series data has an inherent temporal order, where each data point is associated
|
||||
with a timestamp, capturing its dependence on past values.
|
||||
Time series analysis typically serves two main goals:
|
||||
Understanding the underlying mechanisms that lead to the observed data and predicting future data points based on the
|
||||
historical information and potentially external factors~\cite{cryer_time_2008}
|
||||
\\
|
||||
Time series analysis encompasses various methods, ranging from simple statistical models to complex deep learning architectures.
|
||||
Classical methods
|
||||
|
||||
|
||||
In the following, we will introduce the two most common approaches used for machine learning on time series data,
|
||||
LSTMs and transformers.
|
||||
Temperature data recorded by the OvulaRing forms a high-resolution time series, where each measurement carries temporal context.
|
||||
Time series analysis is essential to uncover meaningful patterns and predict future physiological states from such sequential data.
|
||||
In machine learning, this often involves models that can learn temporal dependencies—most notably
|
||||
Recurrent Neural Networks (RNNs) and the more recent Transformer architecture.
|
||||
|
||||
\subsubsection{RNN and LSTM Networks}\label{subsubsec:lstm_networks}
|
||||
Recurrent Neural Networks (RNNs) are extensions of classical neural networks that incorporate cyclic connections between neurons.
|
||||
These recurrent connections allow the network to retain information from previous inputs by feeding the hidden state
|
||||
from a prior time step into the current one, enabling a form of temporal memory.
|
||||
They process input \emph{sequentially}, maintaining this hidden state over time.
|
||||
|
||||
In practice, this means that input data is processed sequentially, one step at a time.
|
||||
At each step \(t\), the input \(x_t\) is combined with the previous hidden state \(h_{t-1}\) to produce a new
|
||||
hidden state \(h_t\), which contributes to the output \(o_t\).
|
||||
This process allows the network to learn temporal dependencies and model sequential data effectively~\cite{medsker_recurrent_1999}.
|
||||
This enables the network to learn temporal dependencies in sequential data~\cite{medsker_recurrent_1999}.
|
||||
|
||||
However, this approach has the downside that the model cannot explicitly control how it remembers or forgets information at each step,
|
||||
limiting its ability to manage long-term dependencies.
|
||||
@@ -366,7 +349,7 @@ as well as the biases for each gate in a cell, are learned through backpropagati
|
||||
To build more expressive models, memory cells can be stacked in multiple layers, and their outputs concatenated or passed sequentially to higher layers.
|
||||
|
||||
LSTMs are widely used in biomedical applications due to their capacity to handle sequences of variable length and complexity.
|
||||
In the context of ovulation prediction, where hormonal patterns exhibit periodicity but also irregularity,
|
||||
In the context of fertility prediction, where hormonal patterns exhibit periodicity but also irregularity,
|
||||
LSTMs are well-suited to learn relevant time-dependent signals from sequential physiological measurements.
|
||||
|
||||
While powerful, LSTMs can be computationally intensive and sensitive to hyperparameter tuning.
|
||||
@@ -374,16 +357,19 @@ Therefore, they are often compared with alternative architectures,
|
||||
including simpler feedforward networks and more recent attention-based models,
|
||||
to evaluate trade-offs in performance, interpretability, and computational cost.
|
||||
|
||||
The next section introduce the \emph{Transformer} architecture, a more recent alternative that forgoes
|
||||
Given their ability to learn from sequences with noisy periodic structure,
|
||||
LSTMs offer a natural choice for modeling hormonal and temperature fluctuations across menstrual cycles.
|
||||
|
||||
The next section introduces the \emph{Transformer} architecture, a more recent alternative that forgoes
|
||||
recurrence in favor of attention mechanisms.
|
||||
|
||||
\subsubsection{Transformer Models}\label{subsubsec:transformer_models}
|
||||
|
||||
Transformer models are a class of neural architectures that use \emph{self-attention}
|
||||
to model dependencies in sequential data without relying on recurrence~\cite{vaswani_attention_2017}.
|
||||
Unlike recurrent neural networks (RNNs), Transformers process input sequences in parallel,
|
||||
Unlike recurrent neural networks (RNNs), Transformers process input sequences \emph{in parallel},
|
||||
allowing them to model relationships between any pair of input tokens or timesteps directly.
|
||||
This mitigates the limitations of recurrent models, such as long-term memory constraints
|
||||
This design mitigates the limitations of recurrent models, such as long-term memory constraints
|
||||
and vanishing gradients.
|
||||
|
||||
Originally introduced for machine translation, Transformers have proven broadly applicable to
|
||||
@@ -423,13 +409,13 @@ to the model regardless of their location, even if they play different syntactic
|
||||
Positional encodings, often based on sinusoidal functions, inject a unique position-dependent signal
|
||||
into each token, enabling the model to distinguish between identical tokens in different positions.
|
||||
|
||||
In this work, we use since and cosine functions of different frequencies:
|
||||
In this work, we use sine and cosine functions of different frequencies:
|
||||
\begin{align}
|
||||
PE_{\text{pos}, 2i} &= \sin\left(\frac{\text{pos}}{10000^{\frac{2i}{d_{\text{model}}}}}\right), \\
|
||||
PE_{\text{pos}, 2i+1} &= \cos\left(\frac{\text{pos}}{10000^{\frac{2i}{d_{\text{model}}}}}\right)
|
||||
\end{align}
|
||||
where \(i\) is the dimension of the input and \(pos\) is the position in the sequence.
|
||||
This was done according to the original paper~\cite{vaswani_attention_2017}.
|
||||
where \(i\) is the dimension of the input and \(pos\) is the position in the sequence,
|
||||
as in the original paper~\cite{vaswani_attention_2017}.
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\centering
|
||||
@@ -553,6 +539,9 @@ including time-series forecasting and biomedical modeling~\cite{wu_deep_nodate,z
|
||||
Its ability to model complex, long-range dependencies without recurrence makes it well-suited to domains like biomedical time-series,
|
||||
where signals are often irregular and span diverse temporal resolutions.
|
||||
|
||||
This makes Transformers well-suited for learning long-range temporal dependencies in physiological data,
|
||||
such as ovulatory trends spanning multiple days or cycles.
|
||||
|
||||
\subsubsection{Convolutional Layers as Temporal Feature Extractors}
|
||||
For high-resolution time-series data, the input dimensionality can become large,
|
||||
especially in models like Transformers that process the entire sequence in parallel.
|
||||
@@ -578,3 +567,7 @@ The stride determines how far the filter moves at each step, affecting both the
|
||||
\label{fig:background_convolution_example}
|
||||
\end{figure}
|
||||
|
||||
In summary, time-series modeling offers a range of approaches, each with specific trade-offs.
|
||||
RNNs and LSTMs provide explicit sequential modeling but suffer from training inefficiencies.
|
||||
Transformers excel at long-range context capture but demand more memory and parallelization.
|
||||
Convolutional layers offer efficient local feature extraction and often serve as useful pre-processing stages for both model families.
|
||||
Reference in New Issue
Block a user