Worst-Case Segment Boundaries: Cheap Adversarial Training for Pooling Under Syntactic Drift

Many relation and entity models do not summarize a sentence with one global "strongest feature." They cut the sentence at the entity mentions into pieces: left context, the stretch between the two entities, and right context. They take the strongest feature inside each piece and concatenate the results. This is segmented max-pooling. It works because, in modern news prose, the words that state the relation usually sit between the two entities. Older prose and fast-changing social text break that assumption. Verbs drift to the end of clauses, arguments invert, and long nested clauses push the relational cue into the "wrong" segment. A model trained on today's word order then reads the evidence from the wrong pocket. We propose to train these models against exactly this failure, using an adversary that shifts the segment boundaries to the worst nearby positions during training.

The useful property is cost. Ordinary adversarial training solves an inner maximization with extra forward and backward passes through the whole network. In relation extraction this roughly doubles epoch time (Adversarial Training for Relation Extraction). A boundary adversary does not need that. The expensive part, the convolutional or Transformer feature map, is computed once. Re-pooling the same feature map under every candidate boundary pair costs only a few max operations and a pass through the small classifier head. The worst case is found by brute-force enumeration, and the whole update still needs one backward pass. The claim is that this near-free, structure-shaped adversary buys robustness to temporal syntactic drift that embedding-space adversarial training buys only at about twice the compute, and that random boundary noise does not buy at all.

Core Claim

Let $H \in \mathbb{R}^{d \times n}$ be the feature map of an $n$-token sentence with $d$ filters or hidden units. Let $b=(b_1,b_2)$ be the entity-anchored boundaries. Write $z(b)$ for the concatenation of per-dimension maxima of $H$ over $[1,b_1)$, $[b_1,b_2)$ and $[b_2,n]$, and let $g_\theta$ be the classifier head with loss $\mathcal{L}$. We train with

$$\min_\theta \; \mathcal{L}\big(g_\theta(z(b)),y\big) + \lambda \max_{b' \in \mathcal{B}_k(b)} \mathcal{L}\big(g_\theta(z(b')),y\big),$$

where $\mathcal{B}_k(b)$ is the set of ordered boundary pairs within $k$ tokens of the originals, and $\lambda$ weights the adversarial term.

Because $|\mathcal{B}_k| \le (2k+1)^2$ and segment maxima reuse prefix and suffix maxima of a single $H$, the inner maximization is exact and costs a small fraction of one encoder forward pass. The same objective applies unchanged to span classification with prefix, span and suffix segments, as in SWE2. It also applies to Transformer encoders that pool final hidden states by segment.

The prediction has three parts. First, the gain over plain training should grow with the amount of syntactic drift between training and test periods. Second, it should exceed a random-shift control at matched $k$. Third, it should match or beat embedding perturbation at a fraction of the wall-clock cost.

Why This Gap Is Real

The proposal draws on three groups of prior work, each playing a different role.

The method comes from the pooling literature. Distant Supervision for Relation Extraction via Piecewise Convolutional Neural Networks introduced three-way pooling for distant supervision and argued that it beats parse-based features on long sentences. Large Margin Prototypical Network for Few-shot Relation Classification with Fine-grained Features refined the cut into five segments and reported large few-shot gains on FewRel. Both treat boundaries as fixed and evaluate only on static splits. We keep their architecture and change only how boundaries are treated during training.

The motivation comes from diachronic studies. Toward a Treebank Collecting German Aesthetic Writings of the Late 18th Century found that labeled attachment drops from 84.6% on modern news to 65.4% on 18th-century fragments, while lemmatization stays at 97.6%. In other words, the drift there is structural, not lexical. Part-of-Speech Tagging for Historical English found that spelling normalization and structural adaptation fix different error classes. Together these say that the drift most likely to break boundary-anchored pooling is exactly the drift that spelling repair cannot address.

The constraint comes from the robustness literature. Adversarial Training for Relation Extraction showed that embedding perturbation regularizes a piecewise CNN on NYT, but at about twice the training time and with a fragile perturbation size. Towards Improving Adversarial Training of NLP Models cut discrete-attack cost only to about 3x faster than TextFooler, still subsampling 20% of the data per epoch. Neither paper looks at temporal splits. Improved Multi-label Classification under Temporal Concept Drift shows that random splits overstate real performance by about 10% and that standard Group-DRO collapses under drift. That result constrains our evaluation to chronological splits and rules out era-wise reweighting as a sufficient answer.

The file's own suggested combination is to restrict embedding perturbations to the middle segment to save compute (Gap 2). We do not pursue it, because it does not save much. The cost of embedding perturbation is the extra full backward pass, which is the same whether one token is perturbed or forty. Our adversary acts on the pooling structure itself, which is where the savings actually come from. The two existing pooling-plus-adversarial papers differ from this in other ways. Wu et al. perturb embeddings. Sentiment Analysis Method based on Piecewise Convolutional Neural Network and Generative Adversarial Network uses a domain discriminator and hand-tunes its segmentation parameter, so neither treats boundaries as the adversary's variable.

Research Program

Diagnostic study. The first piece establishes that the hypothesized failure exists, using treebanks that already carry structure. On the Penn historical corpora (PTB, PPCMBE, PPCEME) and the German aesthetic treebank versus modern German, we take subject–verb–object configurations from gold trees. We then measure how often the verb, the main relational cue, falls outside the span between its two arguments, and how far outside. If this rate does not rise across eras, boundary drift is not the mechanism and the project should stop or retarget.

Training method. The second piece is the boundary adversary for two encoders: a piecewise CNN matching Zeng et al. and Wu et al., and a fine-tuned BERT-style encoder with entity markers and segment max-pooling over final states. For each, we record exact wall-clock and memory overhead relative to plain training. We also analyze which boundary shifts the adversary selects. A drift-relevant adversary should mostly push the middle-segment end rightward on verb-final constructions, and this can be checked against the diagnostic statistics.

Evaluation. The third piece is evaluation on chronological splits only. The primary benchmark is the Temporal Twitter Dataset from Mitigating Temporal-Drift, which trains on 2014–2018 and tests on 2019. We cast it as span classification with prefix, span and suffix pooling. Relation extraction is evaluated on Riedel NYT. Its static-split numbers are reported for continuity, and we add a year-ordered resplit if article dates can be recovered from the underlying corpus. Since no temporally split historical relation benchmark appears in the file, we will build a modest diachronic probe. It consists of argument-pair predicate classification derived from PPCEME and PPCMBE parse trees, with the training data taken from the modern PTB. This probe is labeled automatically from gold trees, so annotation drift between corpora is a known confound. We will report it per corpus rather than pooling results.

Baselines

Plain segmented pooling. The do-nothing reference is the same architecture trained without any boundary treatment, with identical data, epochs and tuning budget. Every other number is reported as a difference from it, separately for in-period and out-of-period test sets, so that drift sensitivity is visible directly.

Embedding perturbation. The strongest existing robustness method is fast-gradient perturbation of word embeddings applied to piecewise CNNs, as in Adversarial Training for Relation Extraction. On Riedel NYT it raised precision–recall AUC from 0.329 to 0.356 for the piecewise CNN (and 0.351 to 0.382 for a recurrent model). It is the right competitor because it is the only cited method that hardens exactly this architecture. We run it with its perturbation size tuned over the same number of trials as our $k$ and $\lambda$, and we compare at equal wall-clock as well as equal epochs. Beating it means matching its AUC on the static NYT split while using clearly less than its roughly 2x training time, and exceeding it on chronological test sets.

Trend-based retraining. On Temporal Twitter, the strongest drift method in the file is burstiness-based trend selection of retraining data, from Mitigating Temporal-Drift. It improved F1 by 2.70% to 5.71% over a random temporal-sampling baseline. The file gives only these deltas, not absolute F1, so no reported absolute result was found on Lacuna for this benchmark and we will reproduce both arms ourselves. Trend selection uses labeled data from the new period, whereas our method does not. We therefore report both the unlabeled-target setting and the combination of the two. Beating it in the first setting, or adding to it in the second, both count.

Dependency-path pooling. For relation extraction we include pooling over the shortest dependency path plus one-hop neighbors, from On the Effectiveness of the Pooling Methods for Biomedical Relation Extraction with Deep Learning. It reported F1 73.9 on DDI-2013 versus 73.0 for dynamic piecewise pooling. This is the best static alternative for locating relational cues. Our hypothesis is that it degrades under drift because its parser does.

Random-shift control. The ablation that isolates the key ingredient replaces the worst-case boundary choice with a uniformly random boundary pair from the same set $\mathcal{B}_k$, at the same $k$, $\lambda$ and cost. If this matches the adversary, the contribution reduces to boundary data augmentation.

Why not just…?

Why not just jitter the boundaries randomly? This is the most serious threat, because it costs the same and could plausibly give the same gain. Our argument against it is that syntactic drift is directional: verbs move systematically toward clause ends. Random jitter spends most of its draws on shifts that never occur, whereas the worst case concentrates on the shifts that hurt. The random-shift control at matched $k$ settles this directly. We also report the gap as a function of measured drift. If the adversary's advantage does not grow with drift, we will report boundary augmentation as the finding and drop the adversarial framing.

Why not just drop segments and use global pooling or full self-attention? Without fixed boundaries there is nothing to misplace. But segmentation is where these models get their accuracy: the five-segment model gains about 6.84% on average on FewRel (Large Margin Prototypical Network). Domain-pretrained Transformers still go stale under drift (Mitigating Temporal-Drift), and attention can be hijacked by a few loud tokens (Improving the Robustness of Transformer-based Large Language Models with Dynamic Attention). We include global-pooled and classification-token versions of the same encoder. If either loses less under drift than our segmented model, segmentation is a liability and the method is moot.

Why not just use embedding adversarial training, which already regularizes these models? It does help on static NYT. However, it perturbs word vectors inside a small ball and never moves evidence across segments, which is the specific error drift induces. It also costs about twice the compute. The equal-wall-clock comparison above, together with an analysis of errors on the diagnostic verb-outside-span cases, shows whether it covers the same failures.

Why not just normalize spelling or retrain on new data? Normalization addresses a different error class (Part-of-Speech Tagging for Historical English), so we apply VARD-style normalization to all systems on historical data rather than treating it as a competitor. Retraining needs fresh labels for every period, and burstiness detection misses shifts that come without frequency spikes. Both are measured as baselines rather than assumed away.

Decisive Checks

Three results decide the project. First, the diagnostic must show that the rate at which relational cues fall outside the middle segment rises from modern to historical text. Without that, there is no mechanism. Second, on Temporal Twitter and the chronological relation splits, the boundary adversary must beat the random-shift control at equal cost, with a gap that widens as drift grows. Third, its training overhead must stay well under the roughly 2x of embedding perturbation while matching that method's static NYT AUC. If all three hold, segment boundaries become a cheap, interpretable adversarial variable for temporal robustness. If the second fails, the honest conclusion is that boundary augmentation suffices, which is still a useful, nearly free result to report.