hopefully final commit

This commit is contained in:
Alex Blank
2025-09-05 20:02:41 +00:00
parent a2fdf2f0a3
commit bf2e79cc4c
15 changed files with 709 additions and 449 deletions
+83 -173
View File
@@ -4,7 +4,7 @@
\section{Discussion}\label{sec:discussion}
\subsection{RQ1: Model Architecture Evuation an Optimization}\label{subsec:discussion_rq1_model_evaluation}
\subsection{Objective 1: Model Architecture Evuation an Optimization}\label{subsec:discussion_rq1_model_evaluation}
The first research objective considered different model architectures and how they perform
@@ -71,7 +71,7 @@ as a direct regression target, might prove more stable and informative.
As we will see in the next section, the current targets are highly sensitive to anomalies,
which may not be the case for alternative formulations.
\subsection{RQ2: Factors and Patterns that Influence Prediction}\label{susbsec:discussion_rq2_factors_and_patterns}
\subsection{Objective 2: Factors and Patterns that Influence Prediction}\label{susbsec:discussion_rq2_factors_and_patterns}
Our second research objective focused on identifying potential factors and patterns in the data
that influence fertility prediction.
@@ -116,7 +116,7 @@ This could lead to a more biologically grounded interpretation of the patterns u
Moreover, improvements in label quality will naturally improve the interpretability and accuracy of predictions.
Better labels would also allow more reliable medical interpretation of the prediction outputs and the patterns driving them, as previously discussed.
\subsection{RQ3: Performance Across Regular and Irregular Cycles}\label{subsec:discussion_rq3_regular_vs_irregular}
\subsection{Objective 3: Performance Across Regular and Irregular Cycles}\label{subsec:discussion_rq3_regular_vs_irregular}
The third research objective of this study was to compare model performance across subsets of users
with regular and irregular menstrual cycles.
@@ -159,190 +159,100 @@ Ideally, the model would have access to the entire cycle history of a user for t
However, this would likely exceed the memory and capacity constraints of the architectures used in this study.
Overcoming this limitation may require more efficient or hierarchical time series architectures, as previously discussed.
\subsection{RQ4: Use-case Evaluations}\label{subsec:discussion_rq4_use_case_evaluations}
\subsection{Objective 4: Use-case Evaluations}\label{subsec:discussion_rq4_use_case_evaluations}
The fourth research objective was to evaluate two practical use-cases—natural contraception
and natural family planning (NFP), using predefined evaluation algorithms.
These algorithms approximate the effectiveness of different models across varying fertility thresholds.
% -------------------------------------------------------------------------------------
This study set out to evaluate the predictive value of body temperature for ovulation and fertility,
to assess the performance of different model architectures across use cases,
and to compare machine learning models with rule-based baselines.
Below we discuss the findings in relation to these objectives, their implications, and limitations.
We found that for both use-cases, all trained models outperformed the baselines.
There was notable variability between model types, with the Transformer model
performing best, especially for low fertility thresholds, followed closely by the convolutional variants.
The LSTM model consistently showed the weakest performance across all metrics.
Still, both trained and baseline models yielded significant
improvements over the control group, indicating that all model types offer meaningful predictive value.
\subsection{Predictive Value of Body Temperature}
Our results confirm that body core temperature carries meaningful predictive value for ovulation and fertility,
particularly in regular cycles with clear pre-ovulatory dips.
This dip before the
In such cases, fertility-probability curves aligned closely with the ground truth,
demonstrating that models can reliably exploit this physiological marker.
However, anomalies in the signal, such as irregular spikes or absent dips, frequently led to erroneous predictions.
This suggests that the models strongly rely on short-term temperature fluctuations without
distinguishing between ovulation-related and unrelated changes.
To our knowledge, no previous work has explicitly evaluated use-cases of natural
contraception or NFP with machine learning, or compared them to traditional contraceptive methods.
This highlights the exploratory nature of this analysis.
The irregular-versus-regular cycle analysis reinforces this interpretation:
prediction accuracy was consistently higher in regular cycles, indicating that models leverage cyclical regularity in
addition to absolute thermal changes.
Especially for regular cycles, the performance of the trained models
\paragraph{Contraception Use-Case.}
For the natural contraception scenario, Transformer-based architectures produced competitive results,
achieving fewer than 5 pregnancies per 100 user-years for low thresholds.
For context, the expected pregnancy rates per 100 user-years are approximately 12 for male condoms
and around 7 for oral contraceptives (e.g., “the pill”).
Only implanted hormonal contraceptives and sterilization achieve lower rates (under 1)~\cite{noauthor_birth_nodate}.
In contrast, the control group, representing no contraception, resulted in 90 pregnancies per 100 user-years,
which closely aligns with literature values (85 pregnancies per 100 women per year)~\cite{trussell_contraceptive_2011}.
%[continue here: bring in your figure-based examples of temperature drops, anomalies, and unclear cases, with interpretation rather than description.]
As expected, the number of denials, i.e.,
days on which a potential application would suggest abstinence,increases with the threshold.
Therefore, a trade-off exists between minimizing pregnancies and minimizing denials.
This trade-off is user-dependent: while some users prefer certainty and are comfortable with frequent denials,
others may accept higher risk or use additional protective measures to mitigate it.
Taken together, these findings highlight both the utility and the limitations of body temperature as a single biomarker.
While it provides a strong signal in favorable cases, its variability across users and cycles limits robustness in real-world applications.
Additional biomarkers or contextual information are likely required to disambiguate genuine ovulatory patterns from noise.
This highlights a critical limitation: all results are based on a naive,
rigid denial strategy that did not incorporate any additional measures or contextual information
beyond the raw model predictions.
When combined with established behavioral protocols,such as abstinence during the early cycle phase,
as used in several commercial products~\cite{thigpen_oura_2025, bull_real-world_2019},
significantly lower pregnancy rates are likely achievable.
\subsection{Model Architectures and Use-Case Performance}
Across architectures, LSTMs consistently outperformed both Transformers and convolutional models in the fertility-probability task.
This was somewhat unexpected given the recent dominance of Transformer-based approaches in sequence modeling.
The advantage of LSTMs likely stems from their strong inductive bias for sequential dependencies
and the relatively small dataset size, which may limit the benefits of more parameter-heavy architectures.
Convolutional models, by contrast, performed competitively on medium-length inputs,
suggesting that localized temporal filters can capture useful features when the history is limited.
However, they struggled with longer input sequences, where recurrent and attention-based models excelled.
As shown in previous sections, irregular cycles require additional caution.
All trained models had difficulty accurately predicting fertile days in these cases.
Therefore, any real-world application must include mechanisms that warn users about
potential inaccuracies and recommend additional precautions when irregular patterns are detected.
Resolution also proved important: medium-resolution inputs produced the strongest results,
suggesting a balance between preserving relevant detail and avoiding noise.
Too fine a resolution may amplify random fluctuations, while too coarse a resolution may obscure important cues.
Future work could explore models that combine predicted fertility probabilities
with contextual features—such as current follicular phase length—to generate
more nuanced contraceptive guidance.
In practical use-case simulations, thresholding had a decisive effect.
For contraception, a low threshold produced Pearl-Index equivalents in the range of 45,
which is competitive with or better than common contraceptive methods under typical use.
These numbers, however, must be treated as theoretical projections, since real-world outcomes depend on user behavior,
adherence, and additional protective measures.
For pregnancy planning, results were less directly comparable, reflecting the multifactorial nature of conception.
Nonetheless, the analysis illustrates how probabilistic outputs could be adapted to individual risk preferences,
highlighting the flexibility of machine learning approaches over fixed rules.
\paragraph{Pregnancy Use-Case.}
For the NFP use-case (i.e., attempting to conceive), all trained models achieved
nearly double the pregnancy rate compared to the baselines.
However, at low fertility thresholds, the baseline models showed higher efficiency in terms
of pregnancies per 1000 intercourse events.
Despite this, trained models maintained the overall advantage in total pregnancies per 100 user-years.
At low thresholds, all models achieved approximately 90 pregnancies per 100 user-years,
decreasing to 70--80 at higher thresholds.
The number of correct deferrals, days correctly identified as non-fertile, rose with increasing thresholds,
again suggesting that users may benefit from personalized thresholds depending
on the intensity of their conception efforts.
Most related studies report pregnancy outcomes over 12 cycles, which we assume to represent roughly one year.
We use the 100 user-years metric for consistency.
Since fertility status of couples in our dataset is unknown, we assume that all included users are generally fertile.
%\section{Discussion}\label{sec:discussion}
Related research usually refers to pregnancies per 100 women over 12 cycles.
We assume that, on average 12 cycles represent one year, and thus use the 100 user-years metric as comparison.
We cannot make any assumptions about the fertility of couples in our study, thus we assume that all users sampled
are generally able to conceive.
The model selection study based on the input window length, input resolution and model complexity parameters has shown,
longer input windows and higher complexity seem to be favourable for the purposes of this study.
The convolutional models show better performance for medium length input windows, which might be a limitation
of the model or its convolutional layers.
It thus seems like, the more historical measurements are available, the better
Among commercial fertility monitors, pregnancy rates over 12 cycles range
from 68\% to 72\% (with additional cervical mucus tracking)~\cite{bouchard_achieving_2018}.
Our method reaches approximately 80\%, without requiring additional measures,
placing it at the upper end of current non-invasive fertility prediction tools.
The LSTM and Transformer models also work better with medium resolution input, which suggests a sweet-spot of information.
Too small a resolution might omit important information, while the opposite might introduce too much noise,
that the models in the current configuration cannot handle.
It could be worth investigating how more complex models handle more complex input data,
as this grid-search was not possible in this study due to time and resource limitations.
Interestingly, control group results show that high pregnancy rates are achievable
even without targeted timing: random intercourse (approximately 6 times per month)
resulted in 90 out of 100 women becoming pregnant within one year, which aligns
with literature estimates that ~85\% of couples conceive within a year without
timing-based intervention~\cite{pfeifer_optimizing_2017}.
The study also showed, that the LSTM and Transformer base models outperform the convolutional models.
However, this is only the case for longer input sequences.
When isolating a 40-day input window, the convolutional models outperform the non-convolution models,
which suggests, that there is an informational benefit in the convolution.
However, the convolutional models seem to struggle with longer input windows,
which clearly represent a benefit for the predictive tasks, as the normal LSTM and Transformer models perform better
on longer input windows.
Additional work might be necessary to investigate, whether the convolutional models need additional complexity
or an optimized convolutional pre-processing to deal with longer input sequences.
The benefit of model-based prediction becomes more evident when examining efficiency.
While most related work ignores intercourse frequency, our results show that
trained and baseline models significantly outperform the control group in pregnancies per 1000 intercourse events.
At mid-range threshold values, trained models demonstrated a four-fold increase in efficiency,
indicating that model guidance can substantially optimize the effort-to-outcome ratio for couples trying to conceive.
Overall, the standard LSTM showed the best performance on the fertility-probability target.
This came to our surprise, as we expected the Transformer based architecture to outperform the LSTM based architectures.
The convolutional Transformer had a lower error rate than the convolutional LSTM, which aligned with our expectations.
But it is hard to interpret the results to thoroughly, as they have been taken on single measurement basis.
For a further evaluation, each model should be evaluated multiple times to get statistically more significant and comparable results.
The resource and time limitations of this study did not permit this.
Another useful metric could be time-to-pregnancy across different models and the control group.
The same pregnancy rate over one year can represent conception in the first or twelfth month,
which has practical significance for users.
Including this temporal dimension would allow for a more detailed comparative analysis.
We will be focusing mainly on the predictive quality of the fertility-probability target,
as most selections and evaluations were based on it and the fertility-probability contains the most relevant information
for potential users of the predictions.
All prediction curve in this section have been generated with the best model selected in section~\ref{subsubsec:results_best_model_config_selection},
i.e., the LSTM model.
Figure~\ref{fig:discussion_regular_cycle_fertility_prediction} shows the prediction curve for the fertility-probability target
for a user with a regular cycle pattern.
For such a regular cycle pattern, the predictions almost exactly match the targets.
Another noteworthy observation is the correlation between a clear temperature drop preceding ovulation and
the fertility rising.
This can be seen more prominently in Figure~\ref{fig:discussion_temperature_drop_fertility_prediction}.
The model seems to identify that this drop must be an indication for a heightened fertility.
However, this decrease in temperature is not visible for all cycles, and thus significantly impacts the prediction qualities of the model.
Figure~\ref{fig:discussion_spike_in_temperature_drop} shows an anomaly that results in a temperature spike during
the pre-ovulatory temperature dip.
This confuses the model into ending the fertile phase earlier.
This suggests that the model may interpret the termination of the pre-ovulatory temperature decline as a
signal that ovulation is imminent or has just occurred, thus marking the end of the fertile window.
Another pattern that is visible for many users is a cycle with no clear temperature drop.
Figure~\ref{fig:discussion_unclear_temperature_drop} shows such a curve.
Here, potentially unrelated circumstances lead to a drop in temperature that the model incorrectly identifies as fertile days.
The actual fertile days don't result in an equally visible temperature drop.
This indicates, that a clear temperature drop is a precursor to the ovulation and comes with the fertile days,
but its intensity varies between users and also between cycles of the same user.
Such a pattern can turn out to be a useful predictor for ovulation / fertility, but the models we trained don't seem
to be able to differentiate between ovulation-related and unrelated temperature drops.
This also points to a potential flaw in our workflow.
We don't yet have clinically accurate labels for the cycles that were used for the training of our models.
In fact, we cannot guarantee an ovulation, not even for the cycles with a clear temperature rise after the apparent ovulation.
The identified temperature drop and the fertility that seems to come with it could be a base for further research
with more accurate ovulation labeling.
It might be an indicator for a successful upcoming ovulation.
The results of the irregular vs regular cycle study, as shown in~\ref{subsubsec:regular_vs_irregular_cycles},
indicate, that the models seem to learn recurrent cycle pattern on a per-user basis.
We conclude this based on the fact, that regular cycle performance is significantly better than the performance on the irregular cycle set.
If there is a reliable indicator in the temperature data, or its ablations, then there would not be a large difference between the two subsets.
The temperature patterns should show up in both regular and irregular cycle users.
Thus, all models must learn or extract information beyond the actual temperature data, which they seem to rely on more than
the temperature related features.
This is likely information indicating some form of regularity, which the models then use to predict the targets for new cycles.
It would be interesting to take a close look at how and in what intensity the models use certain features,
and whether the performance changes upon omitting certain features.
\paragraph{Use-Case Study.}
The threshold has a large effect on the overall effectiveness of the different use cases.
For the contraception use case, changing the threshold doubles and even quadruples the pregnancy rate.
It has to be noted, that the contraception use case is naive use-case, where the woman does not take any other
measures next to the prediction of our models.
In a real-world scenario, this is largely not the case, and thus the pregnancy rates should be even lower.
A measure often taken is abstinence during the first cycle phase (luteal phase), which should significantly lower
unwanted pregnancies.
Even without additional measures, a threshold of 0.05 leads to an approximate \emph{Pearl-Index} (pregnancy rate over 1 year for 100 women)
of 4--5, which is significantly better than methods such as the contraceptive pill (7) or the condom (13) for a typical use case.
However, these numbers have to be taken with caution, as this is not an actual study, but a naive theoretical projection.
Further research is necessary to find more reliable results.
The pregnancy use case is harder to contextualize, as there are no comparable results for other methods,
and the actual pregnancy probability is subject to many more factors, we could not take into consideration for this study.
Overall, we conclude, that the body core temperature itself might be a sufficient indicator for pre-ovulation fertility.
However, this marker by itself is prone to anomalies in the data.
When anomalies intercept with the fertile phase and result in unusual temperature shifts,
none of our models were able to avoid erroneous predictions, and we think it will be nearly impossible to do so
just based on the temperature data.
Measuring and correlating other biomarkers or context information could turn out highly effective in detecting such
anomalies and improving the predictive quality of the temperature measurements.
The biological mechanisms that influence body core temperature are highly complex and not yet fully understood.
Many factors can affect it and the resulting temperature curve.
We were not yet able to isolate the ovulation-related temperature fluctuations over time reliably,
but in many cases, they provide highly useful information for NFP or natural contraception.
For a practical use case of any model's prediction, a medical interpretation should be performed.
While the results themselves can give a clear indication of both the fertility probability and whether the ovulation
of a given cycle is already over for any given day, there a variety of external factors that should be taken into
consideration for a direct output to the user.
% talk about whether bbt / temperature can be used for such a task, discuss bbt doubt papers
% While previous work has argued against the predictive value of BBT~\cite{some_author_2010}, our findings suggest otherwise.
%Using continuous core body temperature data from 40,000 cycles, we demonstrate that temperature-based models can reliably detect ovulatory patterns, even in the presence of physiological noise or mild irregularity.
% explain the need for further medical interpretation of the results of either model
% regular vs irregular cycles: mean baselines perform well on regular cycles as expected, as they get closer to the regularities with every past cycle
% transformer can deal with more data and does also perform better for some cases
% lstm outperforms
%The findings do not show a clear indication, that the temperature can be used as a predictive target.
%The results of irregular cycles should be significantly better to infer, that there are usable patters in the
%temperature readings before the ovulation or the fertile days.
%
% add improvements in experiments / comparison
% add better decision base
As in the contraception use-case, all results are based on statistical assumptions
that may not fully hold in real-world scenarios.
Therefore, findings should be interpreted accordingly.
A more detailed investigation of these assumptions, along with further medical interpretation,
would improve the reliability and applicability of the predictions.