We conducted a microlongitudinal study in 137 participants investigating how fluctuations in metacognition were driving day-to-day OCD symptoms. Participants (76.6% female, 21.2% male, 2.2% non-binary; age: mean [M] = 32.8 years ± 8.22 [standard deviation]) were recruited via an online worker platform and were included based on a self-declared diagnosis of OCD and a score of ≥21 (the traditional cut-off for clinically significant OCD) on the obsessive-compulsive inventory-revised (OCI-R17; M = 48.04 ± 11.43—Fig. 1).

Fig. 1: Microlongitudinal study design to determine the link between real-world fluctuating symptoms of OCD, self-confidence and metacognition during decision making.Fig. 1: Microlongitudinal study design to determine the link between real-world fluctuating symptoms of OCD, self-confidence and metacognition during decision making.

a Participants were asked to log in the app whenever they experienced episodes of OCD. They could press ‘Yes, right now’ if current experiencing symptoms, or otherwise ‘No’ to retrospectively log symptom that happened earlier that day. b Participants answered a survey probing states four times a day (with a minimum of 2 h between notifications) that probed the listed constructs. c On alternate days (eight total), participants completed a perceptual metacognitive task at the same time as one of the four state notifications. Trials begin with participants viewing a total of 64 aliens, mixed of two different colours on a planet for 250 ms. They are asked to select which alien is more abundant on the planet and then rate their confidence in their decision on a sliding bar. The task lasted 80 trials each play (40 trials per block) ~roughly 5 min per play. d Study timeline depicting the ecological momentary cognitive testing (EMCT) design over 14 days. e All participants scored highly on an obsessive-compulsive scale (OCI-R, ≥21 being the traditional cut-off for OCD). f Participants’ data were used in the analysis if they completed at least 50% of all notifications. We excluded 38/175 people for not meeting this criterion. Note that artwork for (c, d) are adapted from the Brain Explorer app: https://brainexplorer.net/ created by senior author Tobias Hauser.

After an initial baseline assessment, participants followed a 14-day procedure in which they were instructed to log any symptoms of OCD (defined as any instances of intrusive thoughts or compulsive behaviour) by tapping on a button on the home screen of the study app (see Fig. 1a). This self-initiated ‘symptom logging’ was used to capture instances of OCD episodes independent of scheduled notification periods (see below). This has been successfully adopted in prior work to assess emotional states following specific events, for instance, after non-suicidal self-injury18,19, but, until now, not in OCD.

In total, 119 participants logged a total of 1862 symptoms (median logs = 6, interquartile range = 15.5) throughout the study period. Alongside symptom logging, participants were repeatedly notified to report on their subjective states (four times a day), including subjective self-confidence (Fig. 1b), and play a perceptual metacognitive task (once every other day) (Fig. 1c, d). The combination of symptom logs with state notification reports provided enhanced insight into the drivers of OCD symptoms, allowing us to measure instances of symptom logs close in time to state confidence. Eighteen participants did not log any symptoms throughout the testing period, although they did complete the state-notified assessments.

Participants reported a total of 6389 states across the 14 days (mean notification completion rate [proportion]: M = 0.82 ± 0.13; mean total number of notifications completed per person: M = 46.6 ± 7.79) and completed a total of 922 cognitive games (M = 7.4 ± 2.7). See Fig. 1f and ‘Methods’ for details of data and participant exclusion criteria.

To validate our symptom logging approach, we also assessed OCD severity during state notifications by asking participants to rate their symptoms, as is standard in other momentary sampling studies20. To better understand factors relating to and fluctuating with confidence and OCD symptoms, we also asked participants other questions related to mental health (e.g. current anxiety, mood and sleep quality—see ‘Methods’).

Frequency of self-initiated OCD symptom logging is linked to other state measures and external contexts

First, as a validity check, we investigated whether self-initiated OCD symptom log frequency was associated with well-established measures (e.g. OCD severity and mood) (Fig. 2a). We quantified symptom logging frequency as the mean time difference between symptom logs (inter-symptom interval) in hours per participant (the lower the time, the greater the density). We implemented this instead of simple counts of symptom logs, which is more susceptible to compliance to the study protocol, while averaged time-between-logs better reflect intensity of symptoms (i.e. greater intensity when logs are closer in time)21. We found that people who had a smaller inter-symptom interval also overall reported increased state anxiety (rho = − 0.25, p-FDR [false discovery rate corrected] = 0.020; Fig. 2d) and an increase in averaged state OCD severity ratings (rho = − 0.19, p-FDR = 0.077, p-uncorrected = 0.050), albeit the latter association did not reach corrected statistical significance. Conversely, the inter-symptom interval was linked to a reduced averaged state confidence (rho = 0.30, p-FDR = 0.007; Fig. 2b) and happiness (rho = 0.32, p-FDR = 0.0064; Fig. 2c). These relationships align with findings from prior trait work reporting that OCD symptomatology is tied to constructs of mood, anxiety and confidence12,22,23 and thus provides evidence that our OCD symptom log data captured meaningful variation in behaviour.

Fig. 2: Identifying correlations between trait- and state-measures, with a focus on OCD symptoms and self-confidence.Fig. 2: Identifying correlations between trait- and state-measures, with a focus on OCD symptoms and self-confidence.

a Correlation matrix showing Spearman relationships between averaged state measures. ‘X’ indicates correlation is not statistically significant, while a ‘-’ indicates marginal significance (p-FDR <0.1). bd Scatterplots depicting key relationships between averaged states and symptom log frequency (quantified as mean time difference between logs). State measures are always displayed on the x-axis. Spearman’s Rho (ρ) is displayed in the top left of each plot. Higher averaged time between symptom logs (inter-symptom interval) was significantly correlated with averaged self-confidence (b) and happiness (c), but inversely related to averaged anxiety (d). e Results from a mixed-effects model with random intercepts showing OCD severity ratings during notifications are significantly linked to past and future OCD symptom logs within a 4-h window. n (sample size) = 119; error bars = 95% confidence intervals with centre representing fixed effect value (beta) from mixed-effects model. Scatterplots depicting correlations between averaged self-confidence and self-esteem (f) and between averaged self-confidence and perceived functional impairment related to OCD (g). Across all scatterplots, purple colours indicate significant negative relationships, while red indicates significant positive relationships. Shaded bands represent 95% confidence intervals. Spearman correlations were used for all correlational analyses, which were corrected for multiple comparisons using the false discovery rate. All tests used were two-tailed.

Next, to further assess symptom log validity, we confirmed that symptom logs were significantly associated with moment-to-moment state OCD severity ratings (see Supplementary Note 3 for detailed analyses on OCD severity ratings and other state and trait scores) during notification periods. Indeed, current OCD severity ratings were positively associated with past (β = 0.149, 95% CI [0.06 0.22], p < 0.001) and future symptom logs (β = 0.234, 95% CI [0.15 0.31], p < 0.001) within a 4 h-window (Fig. 2e), indicating that our symptom log measure is temporally linked to (more traditionally implemented) ecological momentary assessment (EMA)-based OCD severity ratings20.

Additionally, we confirmed that symptom logs were meaningfully capturing external events (i.e. whether the probability of a symptom log varied based on current activities and social contexts) and explored how symptom log occurrence fluctuated by the time-of-day and the day-of-week. Briefly, we uncovered that OCD symptom logging was, on average, more frequent on weekdays (per day mean = 2.34 ± 3.73) compared to weekends (per day mean = 1.95 ± 3.38), Wilcoxon’s V = 4506, p = 0.008, and that partaking in restful (odds ratio = 0.59, β = − 0.54, p < 0.001), and self-care (odds ratio = 0.69, β = − 0.37, p = 0.008) activities promoted lowered likelihood of symptom logging. This suggests, intuitively, engaging in relaxing or enjoyable activities is associated with reduced OCD symptoms (see Supplementary Note 2 for further analyses of these contextual and environmental effects on symptoms).

Our findings thus support the ecological validity of this logging approach, allowing us to further investigate the relationship between symptom logs and its drivers.

Self-confidence linked to self-esteem and perceived cognitive impairment

Because our momentary assessment of self-confidence (probed using the question ‘How confident do you feel right now?’—see ‘Methods’) was not used in this context before, we assessed whether it is associated with well-established trait measures. Indeed, participants with greater trait self-esteem (measured with the Rosenberg self-esteem scale24) also reported increased mean state self-confidence (rho = 0.49, p-FDR < 0.001; Fig. 2f), thus confirming the construct validity of our state self-confidence question. Additionally, more (averaged state) self-confident participants reported lower perceived cognitive impairment related to OCD (rho = − 0.38, p-FDR < 0.001, Fig. 2g; measured using the Cognitive Assessment Instrument of Obsessions and Compulsions-1325; example item: ‘Do you doubt having done things properly?’), suggesting that self-reported confidence is also linked to OCD-related metacognition.

These trait-state relationships were maintained even when accounting for other state measures (mean anxiety, happiness, sleep quality and brain fog) using partial Spearman correlations (see Supplementary Note 1). Further analyses on links between self-confidence and external contexts, the time of day and the day-of-week can be found under Supplementary Note 2.

Reduced self-confidence predicts future OCD symptom logs

Our main question in this study was to assess whether and how fluctuations in momentary confidence contributed to the emergence of OCD symptoms. We therefore leveraged our temporally fine-grained assessments to not only investigate associations, but also the directionality of these effects. To do this, we used logistic mixed effects models, with state measures predicting whether a symptom was logged within 4 h of completing a state questionnaire. We found that above other state measures (anxiety, brain fog, happiness and sleep quality), a future symptom log was best predicted by reduced self-confidence (odds ratio = 0.72, β = − 0.33, p = 0.005), as well as increased OCD severity ratings (odds ratio = 1.32, β = 0.28, p = 0.012)—Fig. 3a. These significant effects were maintained even when subsequently controlling for activities people reported they were currently doing. The association with OCD severity ratings supports the notion that symptom logging in this study reflects genuine OCD ratings, while the association with self-confidence expands current understanding of how confidence contributes to OCD symptoms. These results held even when testing shorter time windows between symptom logs and state questionnaires (i.e. within 3 h: β = − 0.23, p < 0.001; 2 h: β = − 0.23, p < 0.001; and 1 h: β = − 0.29, p < 0.001). This means that drops in self-confidence were meaningfully associated with OCD symptoms.

Fig. 3: Characterising associations between self-confidence, metacognitive bias and OCD symptom logs.Fig. 3: Characterising associations between self-confidence, metacognitive bias and OCD symptom logs.

a Low self-confidence and high OCD severity significantly predicted the occurrence of a future OCD symptom log. b The effects of confidence on symptom logs are unidirectional; high self-confidence is associated with a lower probability of a symptom being logged, but occurrence of a past symptom log was not associated with future self-confidence. Past and future symptom logs (within 4 h of answering the state questions) were used as independent variables in a logistic mixed-effects model predicting self-confidence. c Our staircasing procedure succeeded in producing relatively stable accuracy (~0.72) across participants and notifications. The plot depicts mean staircased accuracy (grey) and group mean ± standard error of the mean (black) across notifications (x-axis). Each grey line is an individual participant. d Raincloud plot showing an overall positive within-participant correlation between metacognitive bias and self-confidence (significantly different from 0 using the Wilcoxon one-sample signed rank test). Each circle represents one participant’s Spearman’s Rho value quantifying the correlation strength between their own self-confidence and metacognitive bias. Overall mean correlation coefficient and standard error are shown in black. e Low metacognitive bias significantly predicts future symptom logs above other task measures, and d the effect of metacognitive bias over symptom logs is unidirectional; metacognitive bias significantly predicts future symptom logs, but past symptom logs do not predict metacognitive bias. Error bars for a, b, e, f = 95% confidence intervals with centre representing fixed effect value (beta) from mixed-effects models; n for a, b, e, f = 119; n for c, d = 137. All bar plots depict model coefficient estimates from mixed-effects models with random intercepts. All tests used were two-tailed.

Next, we were interested in the directionality of these effects, i.e. whether drops in self-confidence preceded increased OCD severity or vice versa. To this end, we tested whether self-confidence was more related to past (OCDt − 1; suggesting OCD affects future confidence) or future OCD logs (OCDt + 1; confidence affecting OCD). We uncovered that the relationship between self-confidence and the likelihood of logging a symptom was unidirectional: in a linear mixed-effects model, current self-confidence was significantly associated with a future symptom log (β = − 0.18, 95% CI [−0.26 −0.10], p < 0.001; Fig. 3b) but not with a past symptom log (β = 0.007, 95% CI [−0.08 0.09], p = 0.877). These findings were maintained even when using past, current and future OCD severity ratings during timed notifications to predict self-confidence—see Supplementary Note 3. This means that drops in self-confidence temporally precede OCD symptoms, but OCD symptoms do not precede drops in self-confidence.

Task-derived metacognitive bias is coupled with self-confidence

Next, we were interested in whether metacognition influencing symptom occurrence was specific to self-reported self-confidence, or whether it generalised to other metacognitive measures, such as task-related confidence. To this end, we asked participants to play a smartphone-compatible gamified perceptual metacognition task (eight times total throughout the EMCT period; Fig. 1b) with staircased performance26, an essential component for computational metacognition research. We ascertained that the staircasing procedure succeeded in producing an averaged (proportion) accuracy of 0.72 ± 0.005 across all participants and across eight sessions (Fig. 3c), within the range of average staircased accuracy reported in prior metacognitive studies14,27,28,29. Each individual session also yielded averaged accuracies ranging from 0.71 to 0.73. Moreover, in a linear mixed-effects model with session number predicting staircased accuracy, we found that accuracy did not significantly fluctuate by session (β = 0.023, 95% CI [−0.055 0.009], p = 0.164), indicating that practice effects did not substantially impact participant accuracy.

To further study the construct validity of the metacognitive measures, we investigated whether the self-reported self-confidence was linked to task metacognition. From the metacognition task, we derived two commonly studied measures: (i) metacognitive bias (operationalised as mean confidence rating30), where low bias indicates underconfidence while high bias indicates overconfidence and (ii) metacognitive efficiency (meta-d’/d’), derived using signal-detection theoretic computational models31, which quantifies whether task confidence ratings are sensitive to correct and error trials while controlling for performance (d’). Here, metacognitive bias was defined according to metacognition research conventions9,27,29,30,32,33, where it refers to the overall expressed confidence under staircased accuracy conditions—not to the calibration bias in a strict sense of a deviation from a normative reference point.

We utilised these task measures based on existing literature, in which some reports indicate that obsessive-compulsive symptoms are associated with biased (e.g. too low) reporting of confidence (i.e. related to metacognitive biases) (see Hoven et al.12 for review) while other findings suggest compulsivity is linked to imprecise confidence judgements13,34, manifesting as decreased sensitivity in delineating correct from incorrect choices in their confidence ratings (i.e. pertaining to metacognitive efficiency)27,35.

We found a significant within-participant correlation between metacognitive bias and self-confidence (Fig. 3d; median Spearman’s rho = 0.24, one-sample Wilcoxon rank-sum test: p < 0.001, % participants showing a positive correlation coefficient ≥0.1 = 57%, participants showing a negative correlation coefficient ≤ − 0.1 = 29%), meaning that task-based metacognitive bias co-fluctuated with self-reported self-confidence over time. Metacognitive efficiency was not significantly associated with self-confidence (one-sample Wilcoxon rank-sum test: p = 0.267). We formally tested the robustness of the association between self-confidence and metacognitive bias in a model controlling for other state measures (anxiety, brain fog, happiness and OCD severity rating). Indeed, only self-confidence was significantly associated with metacognitive bias (β = 0.12, 95% CI [0.04, 0.20], p = 0.002). The relationship between metacognitive bias and self-confidence was maintained (β = 0.12, 95% CI [0.05 0.19], p < 0.001) even when controlling for other task measures, namely signal strength (numerical difference between task stimuli; a measure of task difficulty), choice reaction time and staircased (i.e. adaptive; see ‘Methods’) accuracy. These findings provide strong evidence for different confidence measures measuring a common underlying metacognitive construct, even though the assessment modalities (self-report vs task) and frequency (four times daily vs every other day) differed substantially.

Metacognitive bias fluctuations drive future OCD symptom logs

Here, we assessed whether the task-based metacognitive bias was linked to OCD symptom logs. When inserted into a logistic mixed effects model, lower metacognitive bias (i.e. underconfidence; odds ratio = 0.75, β = − 0.28, p = 0.022), but not metacognitive efficiency (β = 0.027, p = 0.839), was significantly associated with a future symptom log (within a 4-h period from completing a game).

We conducted further analyses to thoroughly assess the robustness of the relationship between metacognitive bias and symptom logs. First, controlling for other task measures in the same model still indicated that reduced metacognitive bias was significantly associated with a future symptom log (odds ratio =  0.78, β = − 0.25, p = 0.046)—see Fig. 3e. Next, the relationship was maintained (odds ratio = 0.60, β = − 0.51, p = 0.036) when controlling for state measures (anxiety, brain fog, happiness, OCD severity rating and sleep quality) that were close in time to the completion of the task (within at most a 4-h period). In addition, using shorter time windows between game completion and symptom log (<4 h) yielded similarly significant results (3 h: β = − 0.26, p = 0.046; 2 h: β = − 0.36, p = 0.011; 1 h: β = − 0.31, p = 0.048).

We also investigated the temporal succession of these effects, i.e. whether a drop in metacognition preceded or followed the emergence of OCD symptoms. In line with our self-confidence findings, we saw that reduced metacognitive bias was linked to future symptom logs (β = − 0.21, 95% CI [−0.40 −0.015], p = 0.035), but past symptom logs did not impact current metacognitive bias (β = 0.03, 95% CI [−0.13 0.19], p = 0.690)— Fig. 3f.

Finally, to address the possibility that the observed effects reflect a systematic miscalibration rather than an overall confidence level, we reanalysed the data using the signed difference between confidence and accuracy (confidence − accuracy). This alternative operationalisation is conceptually stricter as it uses accuracy as an explicit reference point against which confidence is evaluated. The results held: this calibration-based bias measure similarly showed a negative association with future symptom logs (odds ratio = 0.75, β = − 0.28, p = 0.022), even when controlling for choice reaction times and signal strength (odds ratio = 0.78, β = − 0.25, p = 0.046). This indicates that participants who are underconfident relative to their actual performance are more likely to subsequently report OCD symptoms.

In summary, both task-based (as well as self-reported) metacognition preceded the appearance of OCD symptom logs. This indicates that fluctuations in metacognition predict a possible rise in OCD symptoms within a few hours’ time.

Sensitivity analyses

In addition to robustness tests described above, we conducted several sensitivity analyses targeting potential imbalances and missingness in the data and found that the main findings were largely robust across these checks.

First, inspecting the distribution of symptom logs across the study period (see Fig. 4a) revealed that the data were highly skewed, with several participants only logging once or twice and a few showing extremely high logging frequency (e.g. 175 total logs). To assess whether our results were disproportionately influenced by these participants, we removed ‘outlier’ values following standard statistical conventions, i.e. participants showing symptom log numbers either above the 75% or below the 25% quartiles by a factor of 1.5 times the interquartile range. This initially led to the removal of 12 participants who showed extremely high logs, although no participants in the lower ranges met the cut-off for removal (using the quartile method, the cut-off for high logging was 41.75, while the cut-off for low logging was −20.25). Nonetheless, we removed those who logged only once or twice (n = 28) as we assumed this may be too infrequent to be meaningful. This led to a total of 79 participants retained with a number of symptom logs ranging between 3 and 39 (see Fig. 4b for distribution).

Fig. 4: Sensitivity analysis to address the skewed symptom logging distribution.Fig. 4: Sensitivity analysis to address the skewed symptom logging distribution.

a Histogram of the number of symptoms logged per participant throughout the EMCT period. b Histogram of the number of symptoms logged per participant after removal of highly infrequent and frequent loggers. c Main results were maintained for self-confidence predicting future symptom logs, controlling for other state variables. d Self-confidence predicted a future symptom log, but past symptom logging was not significantly related to self-confidence. e Metacognitive bias still significantly predicted future symptom logging, controlling for other task variables. f Metacognitive bias predicted a future symptom log, but past symptom logging was not significantly related to metacognitive bias. Results cf were obtained from the sample where overly frequent and infrequent symptom loggers were removed. Error bars = 95% confidence intervals with centre representing fixed effect value (beta) from mixed-effects models; n for cf = 79. Bar plots depict model coefficient estimates from mixed-effects models with random intercepts. All tests used were two-tailed.

When removing the overly high- and low-frequency loggers, we found that self-confidence (odds ratio = 0.63, β = − 0.46, p = 0.001) still significantly predicted future symptom logging—Fig. 4b. Furthermore, a future symptom log, but not past logging, was still significantly associated with current self-confidence (future log: β = − 0.25, 95% CI [−0.36 −0.15], p < 0.001; past log: β = − 0.01, 95% CI [−0.12 0.10], p = 0.817; Fig. 4d). Additionally, metacognitive bias, but not other task measures, still significantly predicted a future symptom log (odds ratio = 0.68, β = − 0.39, p = 0.010; Fig. 4e). The relationship between metacognitive bias and a future symptom log was similarly intact (future log: β = − 0.32, 95% CI [−0.56 −0.08], p = 0.009; past log: β = − 0.01, 95% CI [−0.21 0.18], p = 0.904; Fig. 4f).

Next, our decision to retain participants who completed at least 50% of notifications may be viewed as too liberal, and hence we reattempted the analyses above (removing high and low frequency loggers) using a more stringent 75% cut-off (n = 101 before removing high/low frequency loggers, n = 56 after removal). We found that lowered state self-confidence (controlling for other state measures; β = − 0.41, odds ratio =  0.66, p = 0.010) and metacognitive bias (controlling for other task measures; β = − 0.46, odds ratio = 0.63, p = 0.005) still significantly predicted a future symptom log.

Lastly, we found that the number of participants logging symptoms depleted over the 14-day testing period—with 119 participants logging symptoms on day 1, but by day 8, this had diminished to 38 loggers, with day 14 only having 7 loggers left (Fig. 5a). We assessed whether this drop in symptom logging impacted our main results.

Fig. 5: Sensitivity analysis comparing results from week 1 (days 1–7) and week 2 (days 8–14).Fig. 5: Sensitivity analysis comparing results from week 1 (days 1–7) and week 2 (days 8–14).

a Number of participants logging symptoms decreased as the study continued. b During week 1, state self-confidence still significantly predicted a future symptom log. c When analysing only data within week 2, self-confidence was no longer significantly associated with symptom logs. d Within week 1, metacognitive bias was still inversely associated with future symptom logs, but the effect was no longer as strong as it was across all days. e When considering only week 2, the effect of metacognitive bias on symptom logs was no longer apparent. Error bars = 95% confidence intervals with centre representing fixed effect value (beta) from mixed-effects models; n for b, d = 115; n for c, e = 114. Bar plots depict model coefficient estimates from mixed-effects models with random intercepts. All tests used were two-tailed.

In the first week of the study (days 1–7), controlling for other state measures, state self-confidence was still significantly predictive of a future symptom log (odds ratio = 0.58, β = − 0.55, p < 0.001, Fig. 5b), while the effect was in the same direction for metacognitive bias (controlling for other task measures), albeit weaker (odds ratio = 0.77, β = − 0.26, p = 0.051, Fig. 5c).

However, both effects had disappeared by week 2/days 8–14 (state self-confidence: odds ratio = 1.29, β = 0.26, p = 0.260, Fig. 5d; metacognitive bias: odds ratio = 0.46, β = − 0.77, p = 0.254, Fig. 5e), potentially due to the limited availability of symptom log data. Thus, our conclusions hold under sufficient data density, and future work with higher compliance rates will be better positioned to determine whether this reflects a power limitation or if the effect may genuinely attenuate over time.