When Does Neighborhood Matter? Measuring How Area Context Fades and Returns in Dynamic Risk Models

Risk models in medicine and criminal justice have split into two camps that do not talk to each other. One camp tracks individuals over time, using minute-by-minute vital signs, hourly lab values, or daily step counts, and shows that these trajectories beat one-time admission scores. The other camp links a person's home address to neighborhood statistics such as poverty, education, and housing quality, and shows that where people live predicts how they fare. The trajectory models ignore the neighborhood. The neighborhood models join a single census snapshot to each person once, at one geographic level, and never update it.

This note proposes to model neighborhood context as a prior belief about a person's hidden risk state, set before individual evidence arrives. The prior is drawn from several nested geographic levels at once and is matched to the calendar year of each observation. The test is whether its influence shrinks as individual trajectory data accumulate, and whether it returns when that data stream thins out, for example after hospital discharge or between court cases. The main output is a measured curve of how much predictive value neighborhood information adds as a function of elapsed observation time. The model is the tool used to measure that curve honestly. The curve determines when area-level socioeconomic data is worth the privacy cost of geocoding and when physiology has already absorbed it.

Core Claim

The literature leaves a specific question unanswered. Beyond Thresholds trained a hidden Markov model (a model that infers a small set of unobserved physiological "states" from vital-sign streams) on 130,960 surgeries. It found the largest gains, +0.223 AUROC, among patients whom static preoperative scores had called low-risk. It could not say why these "hidden vulnerable" patients deteriorated. The Medicare dementia study of neighborhood deprivation and mortality found that the Area Deprivation Index (a composite of 17 census indicators) predicted death in urban patients but lost significance in rural ones. StateESR found that even state-level geographic survival baselines add 0.01 to 0.02 in concordance index.

Our claim is that these findings fit one pattern. Area context carries information mainly where individual evidence is thin. At a fine geographic scale that information is too noisy in sparsely populated places. So a model should give weight to neighborhood data in inverse proportion to the amount of individual trajectory data seen so far. It should pool geographic levels in proportion to how reliable each level is for that location.

If this is right, three predictions follow:

  1. The added value of context is high at admission, low deep into an ICU stay, and high again for post-discharge outcomes.
  2. In rural areas, the signal lost at the ZIP-code level reappears at the county level.
  3. A one-time 2010 census join, like the one used in WCLD across fifty years of court records, systematically miscalibrates cases far from 2010.

Research Program

The model has two parts.

Individual trajectory. Each person has a latent risk state that evolves over time. It is updated by their individual record: vital signs and labs in hospital, or charge histories in court data. For the clinical data we reuse the hourly aggregation of MIMIC-Extract. Its 104 clinical concepts give a standard, reproducible feature set.

Neighborhood prior. Neighborhood information enters only through the prior on the initial state and on transition rates, not as an extra input feature. The prior is a weighted combination of context vectors at block group, tract, ZIP, county, and state levels. Each vector is computed from the census or American Community Survey release closest to the event date. The weight on each level is shrunk toward coarser levels when the finer unit has small population or few training cases. This is standard partial pooling from multilevel statistics, borrowed here to handle the problem that conclusions depend on which geographic unit you choose (the "modifiable areal unit problem").

Because context acts on the prior, a well-calibrated model will naturally let individual evidence override it. That property makes the context value curve interpretable. We define it as

$$V(\tau) = L_{\text{no context}}(\tau) - L_{\text{context}}(\tau),$$

where $L(\tau)$ is held-out log loss for predictions made $\tau$ hours (or days, or case-events) after observation begins. We estimate $V(\tau)$ with bootstrap confidence bands.

Relation to prior work.

  • Motivating work: Beyond Thresholds, the PREDICT trial, and Meiring et al. establish that static snapshots decay and trajectories help. We ask the same decay question of neighborhood data rather than of physiology.
  • Closest multimodal work: MuST builds a "spatial" graph over patient feature similarity. DiffDT reduces social determinants to ICD code tokens. Neither uses physical geography, nested levels, or time-matched census data.
  • Borrowed architecture idea: multi-scale vision models such as MAMILNet weight 5x, 10x, and 20x magnifications but fuse them by averaging at the end. Our weights over geographic levels are learned per location and tied to data reliability. That is what the rural failure calls for.

Data Reality

No benchmark in the file contains both individual trajectories and geography. MIMIC and INSPIRE are de-identified without addresses, and the PREDICT cohort is not described as public. This absence is the gap itself.

We therefore use two testbeds:

  • Public testbed: WCLD. It has 1.5 million Wisconsin court cases from 1970 to 2020, with longitudinal defendant histories and ZIP-level 2010 census links. We re-link each case to year-matched decennial and survey releases and add county-level context.
  • Clinical testbed: a geocoded institutional cohort. This would be a partner U.S. health system's ICU and perioperative records, processed with the MIMIC-Extract pipeline so the features match a public standard. Addresses would be geocoded to block group behind an institutional firewall, and only aggregate results released.

Outcomes are in-hospital mortality, prolonged ICU stay beyond 48 hours (mirroring INSPIRE), and 30-day readmission. On WCLD the outcome is two-year recidivism.

Baselines

Naive reference. A static model with no geography. On WCLD this is the authors' logistic regression and XGBoost, which report roughly 0.70 AUC for two-year recidivism in WCLD. We rerun them on our identical splits rather than quoting that number. Beating it is not the goal. It anchors the scale.

Strongest practical competitor. The same trajectory model with every geographic level and year concatenated as input features, fit by gradient boosting on the full history. This is what a careful practitioner would build. It uses identical features, splits, and hyperparameter search budget as our model, with the same number of tuning trials and the same compute cap. On the clinical side, the closest published anchors are MIMIC-Extract, which reports mortality AUROC of 0.85 to 0.90 with random forests and LSTMs and AUPRC often below 0.50, and Beyond Thresholds, which reports prolonged-ICU AUPRC rising from 0.244 (static) to 0.339 (trajectory). Those numbers come from other cohorts and will not be directly comparable. We refit both approaches on our cohort. Beating this competitor means lower held-out log loss and better calibration in rural and low-population units at matched discrimination. Overall AUROC gains alone would not count, given how small StateESR's gains were.

Classical epidemiology baseline. A multilevel logistic or generalized estimating equation model with random intercepts at tract and county, fit on admission features. This matches the approach of the dementia mortality study.

Ablations that isolate the key ingredients. First, context entered as a plain feature rather than as a prior. Second, a single ZIP level versus the nested levels. Third, the 2010-only join versus year-matched releases. Fourth, a placebo in which block groups are shuffled within county, which preserves coarse context but breaks fine-scale linkage.

Why not just…?

Why not just concatenate ADI to the trajectory model? This is the real threat. On raw discrimination it may match us. If it does, we report that, and the contribution becomes the measurement protocol, which works with any model, including this one. We expect it to differ in two places. The first is calibration in sparse rural units, where unpooled fine-scale features overfit. The second is the shape of $V(\tau)$: a feature-concatenation model has no mechanism that lets individual evidence displace context. Both are tested directly.

Why not a classical multilevel regression? It handles nesting well but has no way to consume trajectories. Meiring et al. and Beyond Thresholds show that admission-only models leave large signal unused. We include it as a baseline and borrow its pooling idea.

Why not assume physiology already encodes deprivation and skip geocoding? This is a legitimate hypothesis, not a strawman. It predicts that $V(\tau)$ reaches zero quickly and stays there, including for post-discharge outcomes. The PREDICT trial raised readmission AUC from 0.71 to 0.84 with post-discharge activity data, which suggests the environment after discharge matters. Our curve tests this hypothesis directly. A flat-zero result would be a useful negative finding that argues against geocoding.

Why not extract social determinants from clinical notes instead? MIMIC-SBDH reports that Bio-ClinicalBERT fails 44.5% of negation tests and 70.9% of attribution tests, often confusing a family member's education with the patient's. Note-derived labels are too unreliable to serve as the sole source. We include note-extracted indicators as an optional extra input and report whether they change the curve.

Proposed Experiments

Experiment 1: the context value curve. We estimate $V(\tau)$ on the clinical cohort for in-hospital mortality by hour of stay and for readmission by day since discharge. On WCLD we estimate it by number of prior cases. The decisive result is a curve that decays during dense monitoring and rises again after discharge, with bootstrap bands excluding zero at the ends. A curve that is flat at zero falsifies the core claim.

Experiment 2: the hidden vulnerable. Within the lowest static-risk tertile, defined as in Beyond Thresholds, we test whether early deterioration concentrates in high-deprivation block groups. We then test whether the neighborhood prior recovers part of the gain that trajectory features provide there. A null result would suggest the hidden vulnerability is physiological, not structural.

Experiment 3: rural recovery. We stratify by urban and rural status and compare ZIP-only against nested pooling. We ask whether calibration and the mortality association reappear in rural units at the county level, where the dementia mortality study saw ZIP-level ADI fail. The shuffle-within-county placebo tells us whether any recovered signal comes from genuine fine-scale geography.

Experiment 4: stale census on WCLD. We compare 2010-only against year-matched linkage, measuring calibration error by decade of case. We also recompute the group false-positive rates the WCLD authors report, 32.7% for Native American defendants versus 21.6% for Caucasian defendants. The decisive check is whether miscalibration grows with distance from 2010 under the static join and flattens under year matching. We also check whether the disparity gap narrows or widens, and we report the result either way.