LongiSeg: Dual Frameworks in Imaging & LLMs
- LongiSeg is defined as two distinct frameworks, one enabling promptable, longitudinal CT lesion segmentation and the other providing segmented execution for long-context LLMs.
- In medical imaging, it leverages a 3D U-Net architecture with synthetic pretraining and Difference Weighting to enhance lesion tracking across serial CT scans.
- For long-context language models, LongiSeg introduces a training–inference consistent segment-level generation method that reduces memory usage while preserving performance.
Searching arXiv for LongiSeg papers to ground the article and disambiguate the term. LongiSeg is a name used in arXiv literature for two technically distinct frameworks. In medical imaging, it denotes a promptable framework for longitudinal lesion segmentation and clinician-verified interactive lesion tracking in serial CT, with applications to whole-body oncological follow-up and challenge evaluation in autoPET/CT IV (Kirchhoff et al., 30 Aug 2025, Kirchhoff et al., 22 May 2026). In long-context language modeling, it denotes a training–inference consistent segment-level generation framework for Transformer LLMs under bounded-context execution constraints (Shang et al., 12 May 2026). The shared label therefore identifies two separate research lines rather than a single unified method.
1. Terminological scope and disambiguation
The medical-imaging usage of LongiSeg is centered on longitudinal segmentation, meaning segmentation across multiple timepoints, with explicit use of baseline and follow-up CT data. The 2025 paper "Promptable Longitudinal Lesion Segmentation in Whole-Body CT" extends the LongiSeg framework with promptable capabilities through point and mask interactions, and frames the task as longitudinal promptable segmentation in the setting of autoPET/CT IV Task 2 (Kirchhoff et al., 30 Aug 2025). The 2026 paper "Exploiting Longitudinal Context in Clinician-Verified Interactive Lesion Tracking" places LongiSeg within a "Verified Tracking" paradigm, where a registration-proposed prompt is verified or corrected by a clinician before segmentation of the follow-up lesion (Kirchhoff et al., 22 May 2026).
The language-modeling usage is separate. The 2026 paper "Training-Inference Consistent Segmented Execution for Long-Context LLMs" uses LongiSeg as the name of a framework in which training and inference share the same segment-level forward execution semantics, with truncated backpropagation through time and a fixed-size carried KV tail as the differentiable cross-segment state (Shang et al., 12 May 2026).
A plausible implication is that the term "LongiSeg" should be interpreted contextually: in imaging papers it refers to longitudinal promptable segmentation, whereas in LLM papers it refers to longitudinal or segmented execution over long contexts.
2. LongiSeg in longitudinal CT lesion segmentation
In the imaging literature, LongiSeg addresses lesion segmentation in paired CT scans, typically a baseline volume and a follow-up volume. The 2025 formulation denotes these by and , stacks them along the channel dimension after rigid alignment around the lesion center, and predicts the follow-up lesion mask from the joint input and prompt channels (Kirchhoff et al., 30 Aug 2025). The full input tensor for one lesion is written as
The backbone is the "ResEncL" preset from nnU-Net, instantiated as a 3D U-Net with levels of down- and up-sampling, each level containing residual blocks (Kirchhoff et al., 30 Aug 2025). Feature encoding passes both timepoints jointly through the shared backbone,
followed by a decoder that yields the predicted follow-up lesion mask.
Prompting is implemented directly at the input level. A point prompt at location is represented by a 3D Gaussian
with maximum intensity $1$, while a mask prompt is concatenated as an additional channel (Kirchhoff et al., 30 Aug 2025). This promptable design is described as enabling lesion-specific tracking, even in anatomically complex whole-body CT.
The 2026 verified-tracking variant reorganizes this idea into a two-stream formulation. A registration module, specifically uniGradICON, computes a deformation field 0 from baseline scan 1 to follow-up 2 and proposes a follow-up point
3
which a clinician either accepts or corrects to yield the verified prompt 4 (Kirchhoff et al., 22 May 2026). Matching volumes-of-interest are extracted around 5 and 6, and the baseline and follow-up branches are formed as
7
where 8 is a small Gaussian heatmap with 9 voxel and unit peak.
3. Architectural mechanisms: early prompt fusion and Difference Weighting
The 2026 LongiSeg model combines early spatial prompt fusion with latent temporal difference weighting (Kirchhoff et al., 22 May 2026). The segmentation network processes baseline and follow-up inputs in parallel through a shared-weight encoder, described as a 3D Residual U-Net encoder with four resolution levels. At each level, the encoder uses two consecutive 0 convolutions with stride 1, each followed by InstanceNorm and ReLU, with residual connections; downsampling is performed via a 2 strided convolution, doubling the channel count at each level, for example 3.
The central temporal-fusion mechanism is the Difference Weighting Block (DWB). For encoded baseline and follow-up features 4 at level 5, the fused follow-up feature is
6
In the paper’s description, InstanceNorm of the feature difference produces an attention map that gates 7 to highlight regions of change between baseline and follow-up (Kirchhoff et al., 22 May 2026). These fused features are then sent to the decoder, which upsamples via 8 transposed convolutions, concatenates with the temporally fused skip features, applies two 9 convolutions plus InstanceNorm and ReLU per level, and produces a single-channel logit volume through a final 0 convolution.
The relation between the 2025 and 2026 formulations is structurally important. The 2025 paper describes a single-input concatenative formulation over both timepoints and prompts (Kirchhoff et al., 30 Aug 2025), whereas the 2026 paper separates baseline and follow-up into parallel streams and adds DWB at each skip connection (Kirchhoff et al., 22 May 2026). This suggests an architectural progression from direct longitudinal concatenation toward explicit temporal feature modulation.
4. Synthetic longitudinal pretraining and optimization
Both imaging papers identify limited real longitudinal training data as a central constraint and use synthetic pretraining to mitigate it. In the 2025 work, synthetic longitudinal CT is generated from a real CT scan 1 by anatomy-informed augmentation 2, such as spatial warps and intensity perturbations, to create a synthetic baseline 3 paired with a real follow-up 4 and transformed masks (Kirchhoff et al., 30 Aug 2025). Pretraining minimizes a hybrid Dice and cross-entropy objective,
5
with
6
Fine-tuning on autoPET/CT IV Task 2 uses the same hybrid Dice + CE loss on the follow-up lesion mask,
7
and the paper states that no additional prompt-specific regularization or temporal-smoothness term was introduced beyond the standard segmentation loss (Kirchhoff et al., 30 Aug 2025).
The 2026 verified-tracking paper reports pretraining on 2,606 synthetic CT pairs generated by anatomy-informed deformations that simulate tumor growth or shrinkage and scanner noise (Kirchhoff et al., 22 May 2026). Prompt simulation is split 50/50 between in-mask clicks sampled with probability proportional to 8 and off-target clicks mimicking registration error. The loss is Dice plus binary cross-entropy:
9
summed over both timepoints during pretraining.
A consistent conclusion across the imaging papers is that synthetic longitudinal pretraining is necessary to make effective use of temporal context. The 2025 work reports an improvement of up to 6 Dice points compared to models trained from scratch, including an example from approximately 0 to 1 DSC, and states that the final five-fold ensembled model reaches 2 DSC (Kirchhoff et al., 30 Aug 2025). The 2026 work reports that synthetic pretraining yields up to a 3 Dice-point gain over training from scratch when combined with Difference Weighting, specifically from 4 to 5 DSC on the autoPET IV validation set (Kirchhoff et al., 22 May 2026).
5. Evaluation settings, datasets, and challenge performance
The principal benchmark in the imaging line is autoPET IV. The 2026 paper specifies that autoPET IV contains 285 patients and 670 CTs, with one third held out for test and the remaining two thirds split 80/20 into train and validation, while PanTrack is reserved strictly for zero-shot evaluation (Kirchhoff et al., 22 May 2026). The 2025 paper reports evaluation with Dice Similarity Coefficient, False Negative Volume, False Positive Volume, and optionally the 95th percentile Hausdorff distance:
6
The 2026 paper also introduces PanTrack, a longitudinal pancreatic cancer benchmark consisting of 45 pancreatic adenocarcinoma patients and 161 CT exams, with 2–11 exams per patient and mean 3.6, all in portal-venous phase on Siemens scanners (Kirchhoff et al., 22 May 2026). It includes primary pancreatic lesions and hepatic metastases, with a single expert radiologist segmenting all lesions on each scan and strict instance-level correspondence maintained across timepoints. Evaluation uses DSC, Normalized Surface Distance, and Lesion Detection Rate.
The reported PanTrack results are as follows:
| Setting | LongiSeg | Next best |
|---|---|---|
| Automatic Tracking DSC | 58.2 ± 3.0 % | 49.9 % |
| Automatic Tracking NSD | 48.6 ± 3.0 % | — |
| Automatic Tracking LDR | 93.7 ± 3.0 % | — |
| Verified Tracking DSC | 60.0 ± 2.8 % | 53.4 % |
| Verified Tracking NSD | 49.7 ± 2.9 % | — |
| Verified Tracking LDR | 94.7 ± 2.7 % | — |
In autoPET IV challenge evaluation, the 2026 paper reports first place in MICCAI autoPET IV, with 7 DSC in the Automatic setting and 8 DSC in the Verified setting (Kirchhoff et al., 22 May 2026). The paper characterizes the verified setting as one in which only one point prompt must be verified or corrected.
The 2025 paper provides implementation details for reproducibility, including clipping CT intensities to 9 HU, z-score normalization, and 3D patches of size for example 0 voxels centered on the lesion; training uses AdamW with learning rate 1 and batch size 2 for longitudinal inputs, and inference uses exact center alignment with one forward pass per lesion followed by merging into a multilabel scan (Kirchhoff et al., 30 Aug 2025). The 2026 paper instead reports SGD with momentum 3, weight decay 4, initial learning rate 5 with poly decay over 1000 epochs, and batch size 6 where one sample is a pair of VOIs 7 (Kirchhoff et al., 22 May 2026). These differences reflect distinct implementations rather than a single fixed training recipe.
6. Strengths, limitations, and the Verified Tracking paradigm
The imaging papers explicitly position LongiSeg between fully automatic tracking and manual intervention. The 2026 work states that existing automated methods face a trade-off: end-to-end trackers offer high automation but no opportunity to correct silent tracking failures, whereas decoupled registration-segmentation pipelines permit user verification yet discard the lesion’s prior appearance (Kirchhoff et al., 22 May 2026). The "Verified Tracking" paradigm is presented as a middle ground in which a clinician verifies a registration-proposed prompt and the model leverages that verified prompt together with baseline lesion appearance to resolve segmentation ambiguities.
The strengths listed in the 2025 paper are lesion-specific tracking in anatomically complex whole-body CT, the ability of large-scale synthetic longitudinal pretraining to unlock temporal cues missed by single-timepoint models, and simple patch-based inference that is fast and stable and produces multilabel outputs in one forward pass per lesion (Kirchhoff et al., 30 Aug 2025). The 2026 paper further reports strong out-of-distribution generalization on PanTrack and superior performance in both automatic and verified settings (Kirchhoff et al., 22 May 2026).
The stated limitations are equally specific. The 2025 paper notes that performance still degrades at complex boundaries and in cases of large deformations between scans; current prompts, described as rigid Gaussian points, may be suboptimal if follow-up localization is inaccurate or lesions change shape drastically; and the method relies on synthetic augmentation quality, while real longitudinal variation can still differ (Kirchhoff et al., 30 Aug 2025). A plausible implication is that the prompt mechanism is robust to moderate localization uncertainty but not a complete substitute for accurate temporal correspondence.
One potential misconception is that promptability simply adds an interaction layer to a conventional cross-sectional segmenter. The 2025 and 2026 papers argue otherwise by tying gains specifically to longitudinal context and to pretraining that enables the model to exploit it (Kirchhoff et al., 30 Aug 2025, Kirchhoff et al., 22 May 2026). The 2026 ablations make this explicit: single-timepoint scratch reaches 8 DSC, naïve longitudinal concatenation from scratch reaches 9, synthetic pretraining plus naïve longitudinal reaches 0, and LongiSeg with Difference Weighting and pretraining reaches 1 on autoPET IV validation (Kirchhoff et al., 22 May 2026).
7. LongiSeg in long-context language modeling
A separate usage of the name LongiSeg appears in long-context LLM research. In that setting, LongiSeg is a training–inference consistent segment-level generation framework for Transformer decoders, motivated by the observation that many inference-efficient long-context methods use bounded-context or segment-level execution only during inference while keeping full-context attention during training (Shang et al., 12 May 2026). The framework instead treats segmented execution as the shared modeling assumption for both phases.
The sequence of length 2 is partitioned into 3 non-overlapping segments of size 4. For segment 5, the model carries forward a fixed-size KV tail 6 of length 7 as the sole differentiable interface state, and may also use an optional forward-only retrieval prefix 8 of length 9 that does not participate in backpropagation (Shang et al., 12 May 2026). Segment-wise execution is written as
0
with 1 and 2.
Training enforces consistency through truncated backpropagation through time with depth 3 in practice. The paper states that gradients only flow across the most recent segment transition, and symbolically gives
4
for all 5 when 6 (Shang et al., 12 May 2026). The attention formulation distinguishes local heads, which attend causally over the current segment and the carried tail, from designated long-range heads in designated layers, which may additionally attend over the retrieved prefix.
The reported empirical behavior is that LongiSeg achieves performance comparable to full-context attention across long-context benchmarks while improving scalability at very long context lengths. The paper reports approximately 7 lower peak prefill memory at 8K compared to full-context attention with FlashAttention (Shang et al., 12 May 2026). In the excerpted memory table for LLaMA2-7B-32K on A100, peak GPU memory at 9K is approximately $1$0 GB for full attention, $1$1 GB for FlashAttention, and $1$2 GB for LongiSeg. On PG-19 perplexity, LongiSeg remains within $1$3 perplexity of full attention up to $1$4K context, and on RULER length generalization it is reported as the only method retaining non-zero performance at $1$5K, with Common-Words Extraction recall of $1$6 (Shang et al., 12 May 2026).
Although the name is shared with the imaging framework, the methodological content is different: the LLM version concerns segment-level execution semantics, carried KV states, and retrieval prefixes rather than promptable lesion tracking or longitudinal CT segmentation. The overlap is nominal rather than conceptual.
8. Overall significance
Across its two usages, LongiSeg designates methods that operationalize sequential context under constrained observability. In medical imaging, that context is longitudinal lesion appearance across serial CT, modulated by point or mask prompts and, in the verified-tracking formulation, by clinician validation of a registration-proposed follow-up point (Kirchhoff et al., 30 Aug 2025, Kirchhoff et al., 22 May 2026). In language modeling, it is long-range textual context carried across segments under a training–inference consistent recurrence (Shang et al., 12 May 2026).
The medical-imaging line shows a clear internal trajectory: a promptable extension of a ResEncL-based 3D U-Net for longitudinal whole-body CT, followed by a unified framework combining early spatial prompt fusion and latent temporal difference weighting, synthetic pretraining, and clinician verification (Kirchhoff et al., 30 Aug 2025, Kirchhoff et al., 22 May 2026). The LLM line develops a different meaning of the same name around exact inference-consistent gradients under segmented execution (Shang et al., 12 May 2026).
For technical readers, the key point is therefore not merely what LongiSeg is, but which LongiSeg is meant. In current arXiv usage, the term names either a promptable longitudinal segmentation framework for CT lesion tracking or a segment-level training–inference consistent framework for long-context LLMs.