# How Deep is the Signal? Time-Context up to 30 Years for Colorectal Cancer Prediction in a Primary-Care EHR Model

DevFeed: [How Deep is the Signal? Time-Context up to 30 Years for Colorectal Cancer Prediction in a Primary-Care EHR Model](<https://devfeed.tech/articles/how-deep-is-the-signal-time-context-up-to-30-years-for-colorectal-cancer-prediction-in-a-primary-care-ehr-model-120178.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.07265>)

Author: Achille Raviez, Lan Wang, Brendan Delaney

Published: 2026-11-06T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Artificial Intelligence](<https://devfeed.tech/sources/arxiv-artificial-intelligence.md>), [arXiv: Machine Learning](<https://devfeed.tech/sources/arxiv-machine-learning.md>)

Topics: [AI Foundation Models](<https://devfeed.tech/topics/ai-foundation-models.md>), [Fine-tuning](<https://devfeed.tech/topics/fine-tuning.md>), [Training AI Models](<https://devfeed.tech/topics/training-ai-models.md>), [model architecture](<https://devfeed.tech/topics/model-architecture.md>)

Tags: [2](<https://devfeed.tech/tags/2.md>), [about](<https://devfeed.tech/tags/about.md>), [abstract](<https://devfeed.tech/tags/abstract.md>), [all](<https://devfeed.tech/tags/all.md>), [arxiv](<https://devfeed.tech/tags/arxiv.md>), [base](<https://devfeed.tech/tags/base.md>), [buffer](<https://devfeed.tech/tags/buffer.md>), [calendar](<https://devfeed.tech/tags/calendar.md>), [cancer](<https://devfeed.tech/tags/cancer.md>), [capture](<https://devfeed.tech/tags/capture.md>), [cases](<https://devfeed.tech/tags/cases.md>), [context](<https://devfeed.tech/tags/context.md>), [context-window](<https://devfeed.tech/tags/context-window.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [deep](<https://devfeed.tech/tags/deep.md>), [model](<https://devfeed.tech/tags/model.md>), [prediction](<https://devfeed.tech/tags/prediction.md>), [primary](<https://devfeed.tech/tags/primary.md>), [q-bio-qm](<https://devfeed.tech/tags/q-bio-qm.md>), [signal](<https://devfeed.tech/tags/signal.md>), [time](<https://devfeed.tech/tags/time.md>), [up](<https://devfeed.tech/tags/up.md>)

## AI overview

In this primary-care EHR study, colorectal cancer prediction improved as the model's calendar lookback expanded, then leveled off: AUROC rose from 0.551 at 2 years to 0.590 at 18 years, with about 80% of the gain reached by 10 years. The 34.6M-parameter transformer was pretrained on coded events from 3.6M North West London patients and evaluated on the same cohort of 1,008 cases and 9,582 matched controls across 15 nested windows, with a 12-month pre-diagnostic buffer. An XGBoost baseline reached a similar peak AUROC of 0.589. A simulation suggests elapsed-time rotary position embeddings may alias beyond about 20 years at the default base frequency, prompting the authors to suggest retuning θ. The findings support reporting calendar lookback separately from token context; they describe one model, task, and cohort.

## Source excerpt

arXiv:2611.07265v1 Announce Type: cross Abstract: EHR foundation models read medical events within a fixed context window, and long context has so far been measured only in tokens. How far back in time a model must look to capture the earliest predictive signal is unknown. We introduce time-context, the calendar lookback window before the prediction point, and provide, to our knowledge, the first systematic evaluation of decade-scale time-context for an EHR foundation model. We pretrained a decoder-only transformer (34.6M parameters) on 1.4B coded events from 3.6M primary-care patients in North West London and fine-tuned it to predict incident colorectal cancer under a 12-month pre-diagnostic buffer. A frozen cohort of 1,008 cases and 9,582 matched controls, all registered for at least 30 years, was evaluated at 15 nested lookback windows from 2 to 30 years, so that every truncation is compared within the same patients. Discrimination rose from an AUROC of 0.551 at 2 years to 0.590 at 18 years, then plateaued, with about 80% of the gain reached within 10 years; an XGBoost baseline converged to the same level (peak AUROC 0.589). A simulation further suggests that rotary position embeddings (RoPE) over elapsed time alias beyond about 20 years at the default base frequency, motivating a retuned $\theta$. Time-context is a measurable design axis for clinical prediction models, distinct from token-context, and should be reported.