Many labeling systems now run on text that arrives one word at a time: live captions, clinical dictation, a voice assistant reading a lab protocol aloud. They have to tag names, drugs, or actions before the sentence ends. The standard tool for this job is the BiLSTM-CRF. It pairs a bidirectional recurrent network, which reads the whole sentence in both directions, with a conditional random field (CRF), a decoding layer that scores label-to-label transitions so the output never contains an illegal sequence such as an "inside-entity" tag with no entity start. That design assumes the future is already available. The streaming alternative is the causal convolution, a convolution that only looks at past inputs. It forces a choice of lookahead: how many future words to wait for before committing to a label. Each word of lookahead costs latency.
We propose to measure and then shrink that lookahead in unfamiliar domains. Our hypothesis is that a tagger trained on news can recognize familiar names from left context and the word itself. When the domain shifts to tweets, scientific text, or lab protocols, the names are new, and the model relies on right-context cues ("… said", "… was added to") to decide. If so, domain shift raises the lookahead a streaming tagger needs. Adversarial domain adaptation trains the encoder so that a separate classifier cannot tell which domain a representation came from. Our second claim is that alignment restricted to entity-bearing positions lowers the required lookahead in the target domain. In other words, alignment can partly substitute for latency.
Core Claim
Define a lag-$k$ tagger as one whose representation of token $t$ depends only on tokens $1$ through $t+k$. It emits the label for $t$ once token $t+k$ arrives. For a domain $D$, let $k^*(D)$ be the smallest lag at which the tagger's entity F1 comes within one point of an offline bidirectional tagger trained identically. We claim two things. First, $k^*$ is larger on shifted target domains than on the source domain. Second, entity-gated adversarial alignment reduces $k^*$ on target domains by more than domain-adaptive pre-training alone does.
The first claim is a measurement no paper in our file makes. The file's gap analysis notes that the literature "has not examined how causal masking degrades … token-level sequence labeling and CRF decoding when domain shift is introduced." The second claim would give streaming deployments a concrete lever other than simply waiting longer.
Relation to Prior Work
The closest work is the entity-aware adversarial network of Peng et al.. It adapts a BiLSTM-CRF from CoNLL-2003 news to Twitter. It uses a gradient reversal layer, an identity map whose backward pass flips the gradient's sign so the encoder learns to confuse a domain classifier. Peng et al. route alignment through attention keyed on entity features, because aligning all tokens mostly aligns the dominant non-entity words ("false alignment"). We reuse that insight, which motivates and supplies our gating. Their model is fully bidirectional and offline, and it never asks how much context alignment needs. We change the question from "does alignment help?" to "does alignment reduce the future context a tagger must wait for?" That requires a lag-controlled encoder and a CRF decoder that commits online.
The encoder comes from the causal convolution line. Temporal convolutional networks from Bai et al. stack dilated causal convolutions, which skip inputs at growing intervals so that the reach into the past doubles per layer, and match or beat LSTMs on long-range tasks. Asymmetric padding, as in the streaming speech enhancement work of Richter et al., makes the future horizon an exact, tunable number. Shifting that padding by $k$ positions gives a lag-$k$ encoder. TeCNO shows that causal dilated stacks run online in a high-stakes domain. It smooths predictions heuristically rather than with a CRF, and it reports that adding a third refinement stage overfits. That result constrains our design to shallow stacks. Bradbury et al. report large training speedups for convolution-style recurrence over LSTMs. That result matters only for our secondary efficiency comparison, not for the central claim.
The target domains and the specialization baseline come from CrossNER (Liu et al.). CrossNER shows that domain-adaptive pre-training (DAPT), which continues language-model training on unlabeled domain text, improves cross-domain F1 by an average of 2.16%. It also shows a "subcategory trap": 84.81% of person entities in the music domain are labeled as artists. Zero-resource cross-domain NER supplies the SciTech target and a BiLSTM-CRF reference point. The negative finding of Lee et al., that naively concatenating external domain corpora did not consistently raise F1, constrains the design further: adding data without alignment is not a free fix. FAN-Net finds that aligning too aggressively destroys fine boundaries in medical images. We take that as a warning that alignment could also erase the right-context cues we care about, and we test for this directly.
Research Program
The model has three parts. The first is a lag-$k$ dilated causal convolution encoder over token embeddings. The input embeddings are either static or taken from a DAPT-adapted encoder, so that specialization and alignment can be separated. The second is a linear-chain CRF decoded with fixed-lag Viterbi. At each arrival $t+k$, the decoder commits the best label for position $t$ given all emission and transition scores so far, so the output stays legal while streaming. The third is a domain classifier behind a gradient reversal layer. The classifier sees only the representations at positions the tagging head currently scores as likely entities.
The training objective is
$$ \mathcal{L} = \mathcal{L}_{\text{CRF}}(\text{source}) - \lambda \sum_{t} g_t \,\ell_{\text{dom}}(h_t), $$
The symbols are as follows. $h_t$ is the lag-$k$ representation of token $t$. $g_t \in [0,1]$ is the tagging head's probability that $t$ lies inside an entity, with gradients stopped through $g_t$. $\ell_{\text{dom}}$ is the domain classifier's cross-entropy. $\lambda$ sets the alignment strength. The classifier minimizes $\ell_{\text{dom}}$ while the encoder, through gradient reversal, maximizes it.
We sweep $k \in \{0,1,2,3,5,8\}$ plus the offline limit. For each lag we compute F1 on source and target and read off $k^*$ per domain. We then break the gains down along two axes: entity names seen versus unseen in source training, and each entity type. This tests whether lookahead matters most for unseen names, as our mechanism predicts.
Baselines
The naive reference point is a source-only lag-$k$ causal-convolution CRF with no adaptation. It is trained on CoNLL-2003 and evaluated directly on each target. It fixes the size of the problem, meaning how far target F1 falls at each lag. Its offline counterpart is a standard BiLSTM-CRF trained the same way. Liu et al. report 68.21 F1 for this model on SciTech. We use it as the ceiling that defines $k^*$, not as a competitor, because it cannot stream.
The strongest existing adaptation method is the entity-aware adversarial BiLSTM-CRF of Peng et al.. It reports 54.69 F1 on CoNLL-2003→Twitter, and 52.26 without its entity-aware attention. We reimplement it and first check that we reproduce roughly 54.69 before trusting any comparison. It is the strongest competitor because it already solves false alignment. If our lag-$k$ model with large $k$ cannot approach it, our encoder is the bottleneck, not the lookahead.
For streaming, Peng's model cannot run as is, so we build a matched-latency version of it. It re-encodes a sliding window ending $k$ tokens past each position with the bidirectional encoder and emits the label for that position. This windowed-bidirectional baseline is the real threat. At equal $k$ it sees the same information as our encoder, so it isolates whether the causal convolution matters for accuracy or only for compute. We give it the same embeddings, the same unlabeled target text, and the same hyperparameter search budget (an equal number of trials over learning rate, $\lambda$, and width). We report F1 at matched $k$ alongside wall-clock cost per emitted token.
Three further baselines test specialization. DAPT-only uses domain-adapted embeddings with no discriminator. Few-shot fine-tuning trains on the 100–200 labeled target sentences CrossNER provides. The frontier-LLM reference prompts on complete sentences. The ablation that isolates our key ingredient replaces the gate $g_t$ with $g_t = 1$, which aligns all tokens.
We count the proposal as beating the field under three conditions. At some fixed lag $k \le 3$, entity-gated alignment must exceed both DAPT-only and the windowed-bidirectional adversarial baseline on target F1 across seeds. It must also reduce $k^*$ on at least three of the five CrossNER domains. And it must not lose more than one point to Peng's offline model once $k$ reaches sentence end. The file gives no per-domain absolute CrossNER numbers ("no reported result found on Lacuna for per-domain CrossNER F1"), so all CrossNER comparisons use our own reruns.
Why not just…?
Why not just run a bidirectional tagger on a sliding window? At matched lookahead it has the same information, and it may well match our accuracy. This is the most serious alternative, and the matched-$k$ comparison above settles it. If the windowed model matches us in F1, the causal convolution contributes only incremental compute: our encoder does constant work per new token, whereas the windowed model must recompute over the whole window each step. In that case the paper's contribution narrows to the lookahead-under-shift measurement and the alignment effect. Both would hold for either encoder, so we would also run the gated discriminator on the windowed model.
Why not just do domain-adaptive pre-training and skip the adversary? DAPT is cheap and helps: CrossNER reports a 2.16% average gain. Yet the same paper still finds the 84.81% subcategory trap, and Lee et al. find that adding domain data without alignment is unreliable. That evidence is suggestive, not decisive, because neither paper measures lookahead. Our factorial comparison (DAPT, alignment, both, neither) at every lag answers the question directly. If DAPT alone lowers $k^*$ as much as the combination, we will report that alignment is unnecessary.
Why not just fine-tune on the few labeled target sentences? CrossNER provides 100–200 labeled target sentences, and fine-tuning on them is the obvious move. We include it as a baseline and also combine it with alignment. Zero-resource targets such as Twitter in Peng's setup and SciTech in Liu et al. have no labeled target data at all, and there alignment is the only option.
Why not just prompt a large generalist model? It cannot commit a label within a bounded delay at conversational speed. On specialized coding, Hou et al. report that prompting before fine-tuning reached under 1% exact match, with frequent invented codes. We report prompted accuracy on full sentences as an offline reference only.
Proposed Experiments
The source domain is CoNLL-2003 in every experiment. The targets are Twitter (following Peng et al.), SciTech (following Liu et al.), and the five CrossNER domains. We add a streaming case study on the Wet Lab Protocol Corpus of Kulkarni et al., where an in-domain BiLSTM-CRF reaches 78.03 micro-F1. That makes it a natural offline ceiling for a spoken lab-assistant scenario, reported both in-domain and after transfer from protocols in other sub-areas. The metrics are entity F1 at each lag, $k^*$ per domain, F1 split by seen and unseen entity names, the rate of subcategory confusion on CrossNER music, and compute per emitted token. Every number uses five seeds.
Three checks decide the proposal. The first tests whether the causal-versus-offline F1 gap at $k=0$ is larger on targets than on CoNLL-2003 and concentrates on unseen names. If not, the premise fails, and the result is still a useful negative finding for streaming NER. The second tests whether entity-gated alignment lowers $k^*$ relative to DAPT-only and to the all-token ablation. The all-token comparison matters because Peng's false-alignment argument predicts that aligning every token will not help and may hurt. The third, following the FAN-Net warning, tests whether stronger alignment (higher $\lambda$) starts to raise $k^*$ again by erasing right-context cues. That would show up as a U-shaped curve, and it would tell practitioners that alignment strength and lookahead must be tuned together.
References
- An Entity-Aware Adversarial Domain Adaptation Network for Cross-Domain Named Entity Recognition (Student Abstract)
- Convolutional Sequence Modeling Revisited
- Speech Signal Improvement Using Causal Generative Diffusion Models
- TeCNO: Surgical Phase Recognition with Multi-stage Temporal Convolutional Networks
- Quasi-Recurrent Neural Networks
- CrossNER: Evaluating Cross-Domain Named Entity Recognition
- Zero-Resource Cross-Domain Named Entity Recognition
- NCUEE-NLP at SemEval-2022 Task 11: Chinese Named Entity Recognition Using the BERT-BiLSTM-CRF Model
- Fan-Net: Fourier-Based Adaptive Normalization for Cross-Domain Stroke Lesion Segmentation
- Enhancing medical coding efficiency through domain-specific fine-tuned large language models
- An Annotated Corpus for Machine Reading of Instructions in Wet Lab Protocols