Preprint
Article

This version is not peer-reviewed.

Intelligent Agents Actively Assist in Timing Decision-Making Guided by Cognitive State Confidence

Submitted:

09 November 2026

Posted:

10 November 2026

You are already at the latest version

Abstract
We present confidence-guided sequential assistance (CGSA), an interface from electroencephalography (EEG) condition probabilities to optional assistance timing. Spectral features, random-forest estimation, smoothing, and held-out calibration feed a cost-derived admission bound with consecutive-window persistence and deadline abstention. Participant-disjoint replay uses 72 rest and arithmetic episodes from 36 participants, comprising 2,088 windows. The smoothed estimator reaches area under the receiver operating characteristic curve (AUROC) 0.710 and Brier score 0.219. Main-setting offers occur in 13/36 rest and 3/36 arithmetic episodes. Mean proxy cost is 0.534 versus 0.648 for a calibrated single-window gate and 0.500 for abstention; the paired difference interval includes zero. A 240-setting sensitivity analysis exposes dependence on temporal parameters and assigned costs. Fold diagnostics distinguish insufficient threshold crossings from weak participant transfer. At 16 stopping times, mean rest probability is 0.899 versus observed rest fraction 0.813, with substantial uncertainty. These results evaluate a controlled condition-based gate; practical interruption suitability and assistance benefit require interactive validation.
Keywords: 
;  ;  ;  ;  

2. Method

2.1. Episodes and Spectral State Estimation

Figure 1 summarizes the sensing, prediction, and scheduling modules. An episode lasts 60 s, with decisions at t = 4, 6, …, 60 s. An available offer enters the queue after the initial four-second acquisition. The agent waits, presents once, or abstains at the deadline; no later observation can change an issued offer. The condition label Y is one for rest and zero for arithmetic. Signal processing, smoothing, and persistence reset between recordings.
The final 60 s of each European Data Format (EDF) recording are converted to physical units using header ranges. We retain 19 scalp channels at 500 Hz, excluding reference-difference, electrocardiogram, and annotation channels. Features use only the preceding four seconds. Welch estimation uses 500-sample Hann segments, 250-sample overlap, constant detrending, and 1 Hz spacing. Equation (1) defines log relative band power for channel c and band k, where S is the window power spectrum, ε = 10⁻¹², and half-open bands are 1–4, 4–8, 8–13, 13–30, and 30–40 Hz.
φ c , k , t = log ∑ f ∈ B k S c , t ( f ) + ε ∑ 1  ≤  f  <  40 S c , t ( f ) + ε
The resulting 95 features feed a random forest (RF) [14] with 300 trees, minimum leaf size three, and square-root feature subsampling. Its rest probability is p. Logistic regression (LR) uses the same features, training-only standardization, regularization parameter one, and at most 2,000 iterations. No feature selection uses calibration or test outcomes.

2.2. Temporal Smoothing and Calibration

We clip p to [10⁻⁶, 1 − 10⁻⁶] and smooth its log odds using Eq. (2), initializing z from the first window. The main retention ρ = 0.5 gives a two-second half-life. This transparent engineering default was fixed before replay, without empirical claims of optimality.
z t = ρ z t − 2 + 1 − ρ log p t 1 − p t ,      ρ = 0.5
Calibration follows smoothing: Eq. (3) maps z to rest probability q through a sigmoid fitted on six held-out calibration participants per fold. Parameters minimize window-level binary cross-entropy with 0 ≤ a ≤ 20 and −20 ≤ b ≤ 20. A separate sigmoid is fitted to unsmoothed scores for the corresponding baseline and ablation.
q t = σ ( a z t + b ) = 1 1 + exp ( − a z t   −   b )
Predicted rest requires q ≥ 0.5; confidence max(q, 1 − q) concerns the experimental condition. Smoothing precedes calibration so the fitted sigmoid sees the same score transformation as the scheduler.
Equal clip lengths give participants equal calibration weight. The one-scalar filter learns no recurrent parameters. Overlapping windows remain dependent, and persistent participant errors can survive smoothing. Section 3.5 varies retention and persistence rather than treating repeated windows as independent confirmation.

2.3. Admission Rule and Episode Loss

Let CI be the cost of offering during arithmetic, CM the missed-rest-opportunity cost, λ the delay weight, and d the normalized delay after acquisition. Presenting has expected cost CI(1 − q) + λdq; foregoing has cost CMq. Their comparison yields the admission threshold in Eq. (4).
τ t = C I C I + C M − λ d t ,      d t = t − 4 56
Main costs are CI = 5, CM = 1, and λ = 0.2, yielding thresholds 0.8333–0.8621. These are declared preferences, not measured interruption utilities. Equation (5) offers after h = 2 consecutive passing windows, resetting after failure; the earliest offer is 6 s. No qualifying time by 60 s means abstention. Persistence is a debounce default whose coverage–error trade-off is tested in Section 3.5. All evaluated thresholds are at least 0.5.
v t = 1 [ q t  ≥  τ t ] ( v t − 2 + 1 ) ,   t * = min { t  :  v t  ≥  h } ,   h = 2
For episode i, Aᵢ indicates an offer and Dᵢ is normalized delay at presentation, or zero under abstention. Equation (6) combines arithmetic-prompt, missed-rest, and rest-delay losses. Waiting incurs no additional per-window fee.
L i = C I ( 1   −   Y i ) A i + C M Y i ( 1   −   A i ) + λ Y i D i

3. Experiments and Results

3.1. Data and Participant-Disjoint Evaluation

We use PhysioNet’s EEG During Mental Arithmetic Tasks, version 1.0.0 [15] (https://physionet.org/content/eegmat/1.0.0/). All 72 EDF files match publisher checksums. The final 60 s yield 36 rest and 36 arithmetic episodes, each with 29 overlapping windows. Acquisition filtering is 0.5–45 Hz with 50 Hz rejection; no further whole-record filtering or artifact rejection is applied. Demographics and performance groups are excluded.
Six shuffled outer folds (seed 2026) each test six participants. Fold-specific permutations (seed 700 plus zero-based fold index) divide the remaining people into 24 for fitting and six for calibration: 1,392/348/348 windows. Both conditions and all windows from each person stay together, and each person is tested once [16]. Main settings remain fixed; additional parameter sweeps are descriptive and never select a test-optimal configuration.
State metrics pool held-out windows: AUROC, balanced accuracy, macro F1, Brier score, and expected calibration error (ECE) over ten equal-width bins. Episode metrics include offers, proxy cost, and rest presentation time conditional on offering. Cost intervals use 2,000 paired participant-bootstrap resamples [17], retaining both episodes. Stopping-time intervals use 10,000 analogous resamples (seed 20261022). Percentile limits are 2.5%/97.5%; all intervals condition on fitted predictions and exclude refitting uncertainty.
Controls are permanent abstention, immediate and fixed 14 s presentation, raw RF admission at 0.5, and a calibrated single-window cost gate. Ablations remove smoothing, calibration, or persistence while retaining the analytic cost rule. Removing smoothing refits its calibrator; removing calibration applies the gate to the sigmoid of smoothed raw log odds. No threshold is selected using test outcomes.

3.2. State Discrimination and Probability Quality

Table 1 reports state estimates; Figure 2 shows discrimination and reliability. Smoothed calibrated RF reaches AUROC 0.710 and Brier 0.219, but ECE 0.059 exceeds raw RF’s 0.036. Fold-specific monotone calibration preserves within-fold rankings while changing pooled rankings. Window-level reliability under balanced condition prevalence does not establish reliability at selected offer times; Section 3.4 evaluates those times separately.

3.3. Timing Policies and Component Ablations

Table 2 reports policies and ablations. CGSA offers in 13/36 rest and 3/36 arithmetic episodes. Its cost is 0.534 versus 0.648 for the calibrated gate; the paired difference −0.114 has 95% interval [−0.332, 0.037]. Permanent abstention costs 0.500 with zero coverage. These results establish neither a reliable cost reduction nor a paired speed improvement, since conditional times concern different selected episodes.
Ablations alter both rest coverage and arithmetic prompts. Removing persistence changes rest/arithmetic offers from 13/3 to 15/4; removing calibration gives 9/2 and cost 0.520. The raw 0.5 gate produces 29 arithmetic prompts despite moderate discrimination. Coverage and prompt counts therefore remain necessary alongside probability scores.

3.4. Participant Transfer and Stopping-Time Reliability

Table 3 links fold-level prediction errors to admission outcomes. Fold 5 has AUROC 0.752, yet its maximum rest score 0.821 stays below the threshold throughout. Fold 6 has AUROC 0.563 and only one rest-window crossing, which persistence rejects. Fold 3’s two arithmetic-offer episodes have mean rest probabilities 0.760 and 0.756 across all windows, indicating sustained transfer errors. Ranking, score-tail behavior, and persistence explain distinct failures; this replay cannot isolate classifier error from calibration-cohort variation.
At 16 CGSA stopping times from 13 participants, mean q is 0.899 versus rest fraction 13/16 = 0.813. Their difference 0.086 has participant-bootstrap 95% interval [−0.101, 0.228]. Stopping-time Brier is 0.155 and ECE is 0.144. Only two bins are populated: [0.8, 0.9), n = 9, predicted 0.871 versus observed 0.667; [0.9, 1], n = 7, predicted 0.934 versus observed 1.000. This sparse, selected sample does not establish stopping-time calibration or assistance suitability.

3.5. Sensitivity to Design Choices

We replay 240 settings: ρ ∈ {0, 0.25, 0.5, 0.75, 0.9}, h ∈ {1, 2, 3, 4}, CI/CM ∈ {1, 2, 5, 10}, and λ/CM ∈ {0, 0.2, 0.5}. Setting CM = 1 normalizes loss scale. Each retention refits calibration using only the original calibration participants; RF models and test folds remain fixed. Table 4 shows one-factor slices. Across the grid, rest offers range 1–35/36, arithmetic offers 0–30/36, and zero-offer folds 0–5. These descriptive results leave the main configuration unchanged.
Higher persistence suppresses both conditions, and smoothing costs are nonmonotone. Rest misses equal 36 minus rest offers. Times concern changing selected episodes. Rows varying costs change the objective as well as the threshold, so their assigned costs are not a common-utility ranking. The replay justifies reporting sensitivity, not an optimal parameter choice or empirically validated interruption weights.

4. Discussion

The results separate discrimination, probability quality, and action utility. Persistence reduces both rest coverage and arithmetic prompts; smoothing has nonmonotone effects. The selected-offer calibration gap and fold differences limit probability-based cost interpretations. Assigned weights make preferences inspectable, but empirical sensitivity does not validate those preferences.
ProMemAssist already balances assistance value against cognitive cost through delivery, deferral, and suppression [18]. CGSA contributes a narrower calibrated-condition interface. Its separate clips contain no natural transitions, actual offers, or post-intervention behavior. Artifacts, recording context, six-person calibration cohorts, and balanced prevalence constrain transfer. Rest probability alone cannot establish receptivity or the benefit of intervening during an ongoing task.
Stopping-time diagnostics are sparse and conditional on fixed models. Zero-offer folds have undefined stopping reliability, not perfect calibration. A lower Brier score among selected offers cannot be interpreted as improvement over all windows because selection changes prevalence. Conditional rest times likewise compare different covered episodes.
Interactive evaluation should use continuous tasks, independently labeled assistance opportunities, task-context scheduler baselines, and randomized offer timing. Acceptance, completion time, errors, and interruption burden are required to estimate utilities and assess stopping-time reliability. Deployment requires sensing consent, opt-out, and urgent-information overrides.

5. Conclusion

CGSA combines condition estimation, separately fitted calibration, and explicit sequential admission for one nonurgent offer. Participant-disjoint replay exposes sensitivity to parameter choices, sustained transfer errors, and uncertain stopping-time reliability. Under main proxy costs it does not reliably outperform the calibrated gate and costs more than abstention. Interactive evidence is required before interpreting condition-based admission as practical assistance benefit.

References

  1. Eric Horvitz. 1999. Principles of mixed-initiative user interfaces. In Proc. SIGCHI Conf. Human Factors in Computing Systems, pp. 159–166. [CrossRef]
  2. Justin Edwards, Philip R. Doyle, Holly P. Branigan, and Benjamin R. Cowan. 2024. Comparing Perceptions of Static and Adaptive Proactive Speech Agents. In Proceedings of the 6th ACM Conference on Conversational User Interfaces (CUI ‘24), Article 25, 1–12. [CrossRef]
  3. Kevin Pu, Daniel Lazaro, Ian Arawjo, Haijun Xia, Ziang Xiao, Tovi Grossman, and Yan Chen. 2025. Assistance or Disruption? Exploring and Evaluating the Design and Trade-offs of Proactive AI Programming Support. In Proceedings of the 2025 CHI Conference on Human Factors in Computing Systems (CHI ‘25), 1–21. [CrossRef]
  4. Valerie Chen, Alan Zhu, Sebastian Zhao, Hussein Mozannar, David Sontag, and Ameet Talwalkar. 2025. Need Help? Designing Proactive AI Assistants for Programming. In Proceedings of the 2025 CHI Conference on Human Factors in Computing Systems, 1-18. [CrossRef]
  5. T. O. Zander and C. Kothe. 2011. Towards passive brain–computer interfaces: Applying brain–computer interface technology to human–machine systems in general. J. Neural Eng., 8, 2, Art. 025005. [CrossRef]
  6. Samy Chikhi, Nadine Matton, and Sophie Blanchet. 2022. EEG power spectral measures of cognitive workload: A meta-analysis. Psychophysiology 59, 6, Article e14009. [CrossRef]
  7. M. Saini and U. Satija. 2023. State-of-the-art mental tasks classification based on electroencephalograms: a review. Physiological Measurement 44, 6, Article 06TR01. [CrossRef]
  8. Vishnu K N and Cota Navin Gupta. 2024. Systematic review of experimental paradigms and deep neural networks for electroencephalography-based cognitive workload detection. Progress in Biomedical Engineering 6, 4, Article 042004. [CrossRef]
  9. Telmo Silva Filho, Hao Song, Miquel Perello-Nieto, Raul Santos-Rodriguez, Meelis Kull, and Peter Flach. 2023. Classifier calibration: a survey on how to assess and improve predicted class probabilities. Machine Learning 112, 9, 3211–3260. [CrossRef]
  10. Luís Felipe Cattelan and Danilo Silva. 2024. How to Fix a Broken Confidence Estimator: Evaluating Post-hoc Methods for Selective Classification with Deep Neural Networks. In Proceedings of the Fortieth Conference on Uncertainty in Artificial Intelligence (Proceedings of Machine Learning Research) 244, 547–584. https://proceedings.mlr.press/v244/cattelan24a.html.
  11. Andrea Pugnana and Salvatore Ruggieri. 2023. AUC-based Selective Classification. In Proceedings of the 26th International Conference on Artificial Intelligence and Statistics (Proceedings of Machine Learning Research) 206, 2494–2514. https://proceedings.mlr.press/v206/pugnana23a.html.
  12. Hengyue Liang, Le Peng, and Ju Sun. 2024. Selective Classification Under Distribution Shifts. Transactions on Machine Learning Research. https://openreview.net/forum?id=dmxMGW6J7N.
  13. Junwei Lv, Yuqi Chu, Jun Hu, Peipei Li, and Xuegang Hu. 2024. Second-order Confidence Network for Early Classification of Time Series. ACM Trans. Intell. Syst. Technol., 15, 1, Art. 10, pp. 1–28. [CrossRef]
  14. Leo Breiman. 2001. Random Forests. Mach. Learn., 45, 1, pp. 5–32. [CrossRef]
  15. Igor Zyma, Sergii Tukaev, Ivan Seleznov, Ken Kiyono, Anton Popov, Mariia Chernykh, and Oleksii Shpenkov. 2019. Electroencephalograms during Mental Arithmetic Task Performance. Data, 4, 1, Art. 14. [CrossRef]
  16. Sayash Kapoor and Arvind Narayanan. 2023. Leakage and the reproducibility crisis in machine-learning-based science. Patterns, 4, 9, Art. 100804. [CrossRef]
  17. B. Efron. 1979. Bootstrap Methods: Another Look at the Jackknife. Ann. Statist., 7, 1, pp. 1–26. [CrossRef]
  18. Kevin Pu, Ting Zhang, Naveen Sendhilnathan, Sebastian Freitag, Raj Sodhi, and Tanya R. Jonker. 2025. ProMemAssist: Exploring Timely Proactive Assistance Through Working Memory Modeling in Multi-Modal Wearable Devices. In Proceedings of the 38th Annual ACM Symposium on User Interface Software and Technology, 1-19. [CrossRef]
Figure 1. EEG spectral features, state prediction, temporal processing, and a cost-dependent gate for one assistance decision.
Figure 1. EEG spectral features, state prediction, temporal processing, and a cost-dependent gate for one assistance decision.
Preprints 243203 g001
Figure 2. Held-out ROC and ten-bin reliability curves. The reliability diagonal indicates predicted–observed agreement.
Figure 2. Held-out ROC and ten-bin reliability curves. The reliability diagonal indicates predicted–observed agreement.
Preprints 243203 g002
Table 1. Pooled held-out window performance. Lower Brier and ECE are better.
Table 1. Pooled held-out window performance. Lower Brier and ECE are better.
State estimator AUROC Balanced accuracy Macro F1 Brier ECE
LR 0.672 0.632 0.632 0.290 0.236
RF 0.690 0.641 0.641 0.225 0.036
RF calibrated 0.693 0.639 0.639 0.223 0.035
RF smooth calibrated 0.710 0.667 0.667 0.219 0.059
Table 2. Episode timing and ablations under main proxy costs. Time is conditional on a rest offer; intervals are participant-bootstrap cost intervals.
Table 2. Episode timing and ablations under main proxy costs. Time is conditional on a rest offer; intervals are participant-bootstrap cost intervals.
Policy Cost 95% interval Rest offers Task offers Rest time (s)
Never offer 0.500 0.500–0.500 0/36 0/36 —
Immediate offer 2.500 2.500–2.500 36/36 36/36 4.00
Fixed 14 s 2.518 2.518–2.518 36/36 36/36 14.00
Raw RF gate 2.032 1.683–2.324 35/36 29/36 6.57
Calibrated gate 0.648 0.416–0.925 15/36 5/36 15.73
CGSA 0.534 0.354–0.769 13/36 3/36 13.23
Without smoothing 0.551 0.369–0.781 12/36 3/36 19.67
Without calibration 0.520 0.376–0.705 9/36 2/36 16.89
Without persistence 0.576 0.380–0.837 15/36 4/36 13.33
Table 3. Smoothed calibrated RF by test fold. FN and FP are rest false negatives and arithmetic false positives at q = 0.5 (174 windows per condition); offers are episodes (six per condition).
Table 3. Smoothed calibrated RF by test fold. FN and FP are rest false negatives and arithmetic false positives at q = 0.5 (174 windows per condition); offers are episodes (six per condition).
Fold AUROC Brier Rest FN Task FP Rest/task offers
1 0.725 0.218 94 16 2/0
2 0.812 0.229 19 106 5/1
3 0.684 0.231 51 66 3/2
4 0.891 0.166 31 42 3/0
5 0.752 0.210 85 27 0/0
6 0.563 0.261 86 72 0/0
Table 4. One-factor slices, with unvaried settings fixed at main values. Lists follow the order of levels; offers count episodes out of 36 per condition. Cost uses each row’s assigned weights; time is conditional rest-offer time in seconds.
Table 4. One-factor slices, with unvaried settings fixed at main values. Lists follow the order of levels; offers count episodes out of 36 per condition. Cost uses each row’s assigned weights; time is conditional rest-offer time in seconds.
Factor and levels Rest offers Task offers Assigned cost Rest time (s)
ρ: 0, 0.25, 0.5, 0.75, 0.9 12, 13, 13, 12, 11 3, 3, 3, 4, 3 0.551, 0.536, 0.534, 0.616, 0.559 19.67, 16.31, 13.23, 12.67, 11.09
h: 1, 2, 3, 4 15, 13, 10, 8 4, 3, 2, 2 0.576, 0.534, 0.505, 0.531 13.33, 13.23, 14.40, 13.00
CI/CM: 1, 2, 5, 10 29, 22, 13, 9 20, 9, 3, 1 0.382, 0.456, 0.534, 0.518 8.97, 14.73, 13.23, 13.33
λ/CM: 0, 0.2, 0.5 13, 13, 12 3, 3, 2 0.528, 0.534, 0.486 13.08, 13.23, 13.17
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.