When a model reads a hospital note and decides that "40 mg" is the dose of "furosemide," it may be doing one of two very different things. It may be reading the words that link them, or it may simply be noticing that the two spans sit three tokens apart, which is where doses usually sit. Both strategies score well on standard benchmarks. Only the first is safe to deploy. This proposal builds a test that separates them. The test uses entity-relative distance, meaning each token's offset from the two entities in question, as a statistical null model. We then use that test to measure how much clinically pre-trained encoders lean on proximity rather than content, and whether removing that reliance helps on long-range relations and on notes from another institution.
The central argument is that the usual way of checking explanations is confounded in relation extraction. A rationale is the small set of tokens an explanation method marks as responsible for a prediction. Rationales are scored by sufficiency (does the prediction survive when only the rationale is kept?) and comprehensiveness (does it collapse when the rationale is deleted?). In relation extraction, the tokens nearest the two entities are informative almost by construction. So a rationale that just hugs the entities will look faithful even when it reflects nothing the model computes about meaning. We propose to compare every rationale against random tokens drawn from the same distribution of distances to the entities. We expect much of the apparent faithfulness of clinical attributions to disappear under this comparison, and we expect the size of the gap to predict where clinical models fail.
Core Claim
The claim has three parts, each testable. First, on clinical relation benchmarks, attribution rationales from strong clinical encoders beat a uniform random-token baseline by a wide margin but beat a distance-matched random baseline by much less. Second, how much a model depends on proximity, measured by how often its predictions flip under edits that change entity distance but preserve the gold relation, differs between clinically pre-trained and general-domain encoders. We do not know the sign of that difference in advance, and finding it is part of the contribution. Third, models that depend more on proximity lose more on cross-sentence relations and on cross-institution transfer. If a model is made less distance-dependent, through an explicit and switchable distance channel plus distance-perturbing augmentation, its distance-matched faithfulness should rise and its long-range recall should improve without hurting in-domain F1.
Where This Sits in Prior Work
Entity-relative distance is an old and effective feature. Relation Classification via Convolutional Deep Neural Network attached learned embeddings of each word's offset to the two target nouns. Removing them cut sentence-level F1 on SemEval-2010 Task 8 from 78.9% to 69.7%. MIT at SemEval-2017 Task 10 won ScienceIE with the same features, plus "sentence cutting" that discarded tokens outside the entity window. These papers motivate our worry: distance alone carries a great deal of label signal, and we treat that as a confound to measure rather than a feature to celebrate. Attention-based relative encodings supply the mechanism we reuse for the explicit distance channel; Self-Attention with Relative Position Representations is the clearest example, adding learned offset terms inside attention.
Clinical transformers handle entities differently, with discrete boundary markers. Clinical Relation Extraction Using Transformer-based Models found that concatenating the [CLS] token with four marker representations worked best. It showed clinical pre-training beating general pre-training on MADE1.0 and n2c2 2018, and it reported that accuracy degrades for relations two or more sentences apart. Incorporating medical knowledge in BERT for clinical relation extraction found that entity markers gave a 24.57% improvement over vanilla BERT, while UMLS knowledge injection added only about 0.54%. Both papers constrain our design. Markers are clearly a strong baseline, so a proposal that merely swaps markers for distance embeddings to chase F1 would likely produce a small result. We therefore keep markers in every model and ask a different question: what the markered model actually relies on. Neither paper examines this.
On interpretability, An Empirical Study on Explanations in Out-of-Domain Settings supplies both the metrics and the key warning. Sufficiency and comprehensiveness can increase out-of-domain because fragile models flip easily, and attribution methods can look faithful while failing to beat random tokens. That study covers only sentiment data, general BERT, and a uniform random baseline. We extend its logic to a structured task where uniform randomness is too weak a null. Self-Verification Improves Few-Shot Clinical Information Extraction has GPT-4 quote evidence spans and reports 93% overlap with expert spans. That figure measures plausibility, meaning agreement with humans, not faithfulness to the model's computation. Their method also relies on repeated calls to a closed model. We study open encoders and ask the faithfulness question directly.
On domain pre-training, Are Clinical T5 Models Better for Clinical Text? found that clinical T5 models gain little within MIMIC and lose to FLAN-T5 on an outside hospital's data. That is evidence that domain pre-training can fit corpus-specific regularities. Note layout and typical entity spacing are plausible examples of such regularities, and our distance tests can detect them. Clinical-Longformer and Clinical-BigBird extend clinical context to 4,096 tokens. They give us a natural long-range model to test, since a longer window does not by itself guarantee the model uses distant evidence.
Research Program
The first component is a distance-matched null for rationale faithfulness. For a rationale $R$ of $k$ tokens, let $\delta(t)$ be the minimum absolute offset of token $t$ from either entity span. We build a null rationale $R_0$ by sampling $k$ non-entity tokens whose $\delta$ histogram matches that of $R$. We then report
$$\Delta_{\text{suff}} = \text{Suff}(R) - \mathbb{E}\left[\text{Suff}(R_0)\right],$$
where Suff is normalized sufficiency as defined in the out-of-domain explanation study and the expectation is estimated over 50 samples. We report the analogous gap for comprehensiveness, $\Delta_{\text{comp}}$. A rationale method earns credit only for the faithfulness it shows beyond what proximity alone explains. We compute these gaps for attention, scaled attention, InputXGrad, Integrated Gradients, and DeepLift, the same five methods as the out-of-domain study. We also include a select-then-predict model (FRESH) as an inherently faithful reference point.
The second component is a counterfactual distance stress test. For each test relation we generate edits that keep the gold label fixed while changing distance. One edit inserts one to three neutral sentences between the entities. We take these from the same note, choosing sentences that mention neither entity, so that the filler matches the note's style. A second edit inserts a "proximity decoy," an unrelated drug or dosage string drawn from another note and placed adjacent to one entity. A third edit moves the sentence containing the linking evidence while preserving clinical meaning. Two clinicians will check a random sample of 300 edits for label preservation. We will drop any edit type with under 90% agreement. The headline quantity is the label-preserving flip rate under each edit type. We will also report how that rate grows with inserted distance, giving a curve rather than a single number.
The third component is a corrective intervention, designed so that its key ingredient can be isolated. We add an explicit entity-relative distance bias to the attention of the final layers, in the style of the relative position work above but indexed by offset to the two entities. This bias can be switched off at test time, which turns the model's proximity reliance into a quantity we can read off directly: the change in prediction when the channel is zeroed. We pair it with distance-perturbing augmentation during fine-tuning, using the same filler insertions as the stress test but drawn from a disjoint pool of notes. This pairing is meant to push the rest of the network toward content. We will not assume the channel is needed. The ablations below test whether augmentation alone does the work.
Baselines
The naive reference point is a distance-only classifier: gradient-boosted trees given only the bucketed offsets between the entities, sentence-gap count, entity types, and marker positions, with no words. Its F1 on each benchmark tells us how much of the task can be solved without reading. Every other number in the study is interpreted against it.
The strongest existing methods are the published clinical encoders with entity markers. On MADE1.0, Clinical Relation Extraction Using Transformer-based Models reports F1 0.8959 for RoBERTa-clinical. On 2018 n2c2, the same paper reports F1 0.9610 for XLNet-clinical. On 2010 i2b2/VA, Incorporating medical knowledge in BERT for clinical relation extraction reports F1 0.9181 for ClinicalBERT-EE-RI-ST. On 2012 i2b2 temporal relations, Prompting Large Language Models for Clinical Temporal Relation Extraction reports F1 89.54% for hard-prompted GatorTron-Base. We will reimplement the marker setup (the [CLS] token concatenated with the four marker representations) on general RoBERTa and BERT, Clinical-RoBERTa, ClinicalBERT, GatorTron-Base, and Clinical-Longformer. All models use identical splits, five seeds, and the same hyperparameter search of 20 trials per model on the same GPU budget. Reproduced numbers within one F1 point of the published ones will count as a faithful reimplementation. For faithfulness, the strongest competitor is FRESH, because its rationale is a strict bottleneck on the prediction.
The ablations separate the intervention's ingredients. We compare augmentation alone, the distance channel alone, both together, and a control augmentation that inserts filler outside the span between the entities. That control keeps sequence length change but leaves distance unchanged, so it tests whether any benefit comes from changing distance rather than from adding text. Beating the baselines means two things. The corrected model must match the markered baseline's in-domain F1 within one point. It must also either cut the label-preserving flip rate by at least half or raise F1 on relations two or more sentences apart by at least three points. Both results must hold across seeds with non-overlapping 95% confidence intervals. If augmentation alone achieves this, we will report that the distance channel is unnecessary and treat it only as a measurement tool.
Why not just…?
Why not just add relative distance embeddings to ClinicalBERT and report F1? Entity markers already give clinical transformers most of the structural signal: they account for a 24.57% gain over vanilla BERT on i2b2, against about 0.54% for further knowledge injection, per Incorporating medical knowledge in BERT for clinical relation extraction. Distance embeddings on top of markers would most likely move F1 by fractions of a point and tell us nothing about why the model is right. We include this model as the "channel alone" ablation precisely so that this outcome can be observed.
Why not just stratify accuracy by sentence gap? Clinical Relation Extraction Using Transformer-based Models already does this and finds degradation at two or more sentences. Stratified accuracy cannot tell a model that reads the evidence apart from one that guesses well at short range. Natural long-range relations also differ from short ones in relation type and wording. Our filler-insertion edits change distance while holding the relation and its evidence fixed, which isolates distance in a way stratification cannot. We do need to show the edits are not themselves out of distribution. The control augmentation and the clinician label checks address this, and we will also report each model's perplexity-style confidence on edited versus original inputs.
Why not just use the standard uniform random baseline from the out-of-domain explanation study? That baseline is appropriate for sentiment, where informative tokens can appear anywhere. In relation extraction, any rationale concentrated near the entities beats uniform randomness for structural reasons. That is exactly the faithfulness-without-content failure that An Empirical Study on Explanations in Out-of-Domain Settings warns about. We report both baselines side by side. If the two give the same ranking of attribution methods, our null adds nothing and we will say so.
Why not just ask an LLM to quote its evidence, as in self-verification? Quoted evidence that overlaps expert spans 93% of the time, as reported in Self-Verification Improves Few-Shot Clinical Information Extraction, shows the model can produce plausible justifications. It does not show those justifications drove the extraction. Self-verification also requires several sequential calls to a closed model and cannot run on locally deployed encoders. We will apply our distance stress test to a GPT-class few-shot extractor on a 500-example subset, where data use agreements permit, to see whether its extractions are also proximity-dependent. That would be a useful finding in its own right.
Proposed Experiments
The in-domain study fine-tunes every encoder on 2018 n2c2, MADE1.0, 2010 i2b2/VA, and THYME CONTAINS. On THYME, the tree-LSTM's recall of 0.462 from Investigating the Challenges of Temporal Relation Extraction from Clinical Text suggests the strongest dependence on distance. For each model we report F1, $\Delta_{\text{suff}}$ and $\Delta_{\text{comp}}$ for all five attribution methods and for FRESH, and flip-rate curves under the three edit types. The decisive check for the first claim is whether the gap between uniform-null and distance-matched-null faithfulness is large: we will call it large if at least a third of the apparent advantage disappears for most methods. The check for the second claim is whether clinical and general encoders differ significantly in flip rate under a paired bootstrap over test examples.
The transfer study trains on 2018 n2c2 and tests on MADE1.0 for the relation types the two corpora share: drug–dosage, drug–route, and drug–adverse event. This is a cross-institution shift. We will also test the faithfulness paradox there: if out-of-domain sufficiency rises under the uniform null but not under the distance-matched null, the matched null is correcting the artifact the out-of-domain study identified. The third claim is supported if per-model flip rate measured in-domain correlates with the out-of-domain F1 drop across the roughly twelve encoder-and-intervention variants, with a Spearman correlation above 0.6. If no such correlation appears, proximity reliance is a curiosity rather than a cause, and the corrective program should be dropped in favor of reporting the diagnostic alone.
The last check uses the 2012 i2b2 temporal data and Clinical-Longformer. The question is whether a longer context window reduces distance dependence or merely hides it. We compare flip rates for Clinical-Longformer against ClinicalBERT on edits that keep both entities within 512 tokens, so that window size is held fixed.
References
- Relation Classification via Convolutional Deep Neural Network
- MIT at SemEval-2017 Task 10: Relation Extraction with Convolutional Neural Networks
- Self-Attention with Relative Position Representations
- Clinical Relation Extraction Using Transformer-based Models
- Incorporating medical knowledge in BERT for clinical relation extraction
- An Empirical Study on Explanations in Out-of-Domain Settings
- Self-verification improves few-shot clinical information extraction
- Are Clinical T5 Models Better for Clinical Text?
- Clinical-Longformer and Clinical-BigBird: Transformers for long clinical sequences
- Prompting Large Language Models for Clinical Temporal Relation Extraction
- Investigating the Challenges of Temporal Relation Extraction from Clinical Text