Models that label every moment of a long video or sensor stream ("temporal action segmentation") tend to fail in two ways. They cut one continuous action into flickering fragments, or they smear a label across a real change of activity. The field mostly treats these failures with local fixes: smoothing penalties between neighbouring frames, or learned "barriers" that stop smoothing at predicted transitions. Structured decoders from language processing work differently. A conditional random field (CRF) is a layer that scores whole label sequences instead of each position independently. Its semi-Markov variant goes further and scores whole segments, including how long each segment lasts. Such a decoder can reject implausible transitions and implausible durations outright. It has been kept out of long continuous streams mainly because enumerating every possible segment costs time quadratic in sequence length.
We propose to make segment-level decoding practical for continuous streams. The decoder would search only over segments whose endpoints come from a cheap, signal-driven boundary detector. That detector's threshold is set so it keeps a guaranteed fraction of true boundaries, which we call recall control. The central claim is that most residual segmentation error comes from two separable sources: which boundaries the proposal step keeps, and which ones the decoder chooses. A lattice (the graph of candidate cut points and the segments between them) built for high recall and decoded globally with duration-aware segment scores should beat both local smoothing and frame-level CRFs. Just as important, the lattice makes the two error sources measurable. Because protocols in this area diverge so much, every comparison is run under a fixed-feature, multi-seed protocol with released code.
Core Claim and What Is New
The closest existing work is Filtered Semi-Markov CRF, which is the method we build on. It prunes candidate text spans with a BERT classifier, builds a directed acyclic graph over the survivors, and decodes exactly, reaching roughly linear graph size and up to 137x speedups over a full semi-Markov CRF. It works only on word tokens, however. Its own stated weakness is that a gold span removed by the filter can never be recovered. Our proposal differs in two ways. First, candidates are cut points in a continuous signal, found by a boundary detector trained on the signal or taken from its physics, rather than spans over given tokens. Second, the pruning threshold is chosen explicitly against a boundary-recall target, and we report the resulting oracle ceiling. This turns FSemiCRF's unrecoverable-pruning weakness into a quantity we tune and publish.
On the video side, Boundary-Aware Cascade Networks is the motivating work. It found that multi-stage temporal convolutions still bleed labels across true transitions and added Local Barrier Pooling to stop smoothing at predicted boundaries. Those barriers act locally. They do not enforce global legality of the sequence or any duration model, and the authors report sensitivity to the pooling window and a mismatch in confidence handling between training and inference. We keep a learned boundary module like theirs, but use its output only to propose lattice nodes, and let a global decoder decide.
Mechanism
Take a stream of $T$ frames with features $x_{1:T}$ from a fixed backbone. A boundary scorer outputs a per-frame transition probability $b_t$. The candidate set $\mathcal{B}_\tau = \{t : b_t > \tau\}$ keeps the frames above a threshold $\tau$. We choose $\tau$ on training videos as the largest value whose boundary recall is at least a target $\rho$, counting a true boundary as found if a candidate lies within $\delta$ frames of it. A segmentation $y$ is a sequence of segments $(s_k, e_k, c_k)$, where $s_k$ and $e_k$ are the start and end frames of segment $k$ and $c_k$ is its class. Every start and end must lie in $\mathcal{B}_\tau$. The model scores a segmentation as
$$ S(y) = \sum_k \Big[ \phi(x_{s_k:e_k}, c_k) + \log p_{c_k}(e_k - s_k) + A_{c_{k-1}, c_k} \Big], $$
where $\phi$ is a segment emission score (a learned pooling of frame emissions and features over the segment), $p_{c}(\cdot)$ is a learned duration distribution for class $c$, and $A$ is a class-to-class transition matrix. Training maximizes the log-likelihood of the gold segmentation after snapping each gold boundary to its nearest candidate. The partition function is computed by the forward recursion over the lattice. Inference is exact semi-Markov Viterbi over the lattice. With at most $M$ candidates spanned per segment and $C$ classes, it costs $O(|\mathcal{B}_\tau| \cdot M \cdot C^2)$. This is linear in the number of candidates for the same reason FSemiCRF's graph is.
The recall target $\rho$ is the single knob that connects the pieces. We also compute the oracle score: the best segmental F1 achievable by any segmentation inside the lattice. That gives each system two numbers, the proposal ceiling and the decoder's fraction of that ceiling. Those two numbers are what the reproducibility lens needs, because they separate "better boundaries" from "better decoding" even across papers that use different backbones.
Research Program
We would build the lattice decoder as a drop-in replacement for the refinement stages of MS-TCN++. Frame emissions and the boundary scorer come from the prediction stage of MS-TCN++, which improved MS-TCN with dual-dilated layers. We would start from the audited MS-TCN code in cmhungsteve/SSTDA so that the backbone, splits, and features match the published pipeline exactly.
We would study three sources of boundary candidates, which directly tests the boundary-misalignment direction. The first is the learned boundary scorer. The second is an unsupervised change-point detector on the features. The third is a uniform grid every $k$ frames, which is the "semantically arbitrary" reference. Evidence from Bio-PM motivates this comparison: replacing signal-grounded submovement segments with equal-length chunks cost 0.18 Macro-F1. The same pattern appears in MDLSeg and the Segmenter-Ranker, where adaptive boundaries beat fixed slicing in video question answering. None of these papers asked whether the advantage survives once a global decoder with duration priors sits on top. A duration-aware decoder over a fine uniform grid might recover most of it, and that is a genuinely open question.
As a secondary transfer test, we would apply the same decoder to continuous wrist-accelerometer recordings. The candidates there are the acceleration zero-crossings used by Bio-PM. Because the segment emission $\phi$ pools raw input over the whole segment, it can include the low-frequency mean. That offers a principled route to restore the posture cues, such as sitting versus lying, which Bio-PM's 0.5 Hz high-pass filter discards. We treat this as exploratory, because Bio-PM reports window classification rather than segmentation, and no segmentation number on these benchmarks is available to compare against. We deliberately leave out MIMIC-III clinical streams, despite their reproducibility appeal (Johnson et al.). The file contains no public segment-level labels for them, and inventing such labels would undercut the reproducibility argument.
The reproducibility component is a protocol, not a separate paper. All video methods use the same frozen I3D features, the standard splits of 50Salads, GTEA, and Breakfast, identical tuning budgets, and five seeds. We report segmental F1@{10,25,50}, edit score, frame accuracy, seed spread, and the oracle ceiling. The field's divergence in feature backbones and metric definitions (strict span matching versus frame-wise accuracy) is exactly what currently obscures whether architectural gains are real.
Baselines
The naive reference is MS-TCN++ with a single prediction stage and a frame-wise argmax. It shows how much any refinement or decoding adds. The strongest published convolutional baseline is full MS-TCN++. On 50Salads, Li et al. report an F1 of 70.1 (reported as F1@{10,25,50}) against 64.5 for MS-TCN. We rerun it from the shared codebase under our protocol and report our reproduced figure next to the published one. For GTEA and Breakfast, no reported MS-TCN++ result was found on Lacuna, so our reruns serve as the reference.
BCN is the strongest boundary-aware competitor, because it attacks the same failure with local barriers. It reports roughly a 4% frame-accuracy gain and up to a 10% F1 gain on Breakfast, but no absolute number was found on Lacuna. We therefore rerun it on the same features with its published hyperparameters and the same seed budget.
A linear-chain CRF on the MS-TCN++ emissions tests whether global transitions alone suffice without segments or durations. We decode it both with exact Viterbi and with the parallel Bregman CRF from lightspeed-crf, following Corro et al.. Using both separates accuracy from speed.
Two ablations isolate the key ingredient. The first is the same semi-Markov decoder over a uniform-grid lattice with the same number of candidates. The second is a dense semi-Markov CRF with a maximum-duration cap, run on the shorter datasets where it fits in memory. Beating these means our lattice decoder must exceed MS-TCN++ and BCN on F1@50 and edit score by more than the seed spread of either. It must also beat the uniform-grid ablation, which shows that adaptive boundaries matter even under a global decoder, while staying within a small margin of the dense semi-CRF at a fraction of its cost.
Why not just…?
Why not just post-process MS-TCN++ output with a minimum-duration filter? Merging segments shorter than a class-specific minimum is cheap and directly targets flickering. It is the most serious threat to this proposal. It cannot re-place a boundary, reassign a class, or enforce transition legality, but it may capture most of the edit-score gain. We run it as a tuned baseline, with thresholds chosen on validation, and break results down by error type. If it matches the lattice decoder on F1@50, then the duration term is doing the work. In that case we would scale the claim back to the diagnostic contribution.
Why not just add a linear-chain CRF, now that Bregman projections make it fast? Speed is no longer the obstacle; Corro et al. match Viterbi accuracy with up to 8.8x faster training. A frame-level chain, however, implies geometrically distributed durations and cannot use segment-pooled features. Evidence from text that segment scoring helps comes from FSemiCRF's 2.5-point F1 gain over a CRF on CoNLL-2003. The linear-chain baseline measures whether the same holds for continuous video.
Why not just rely on Local Barrier Pooling? BCN already improves boundaries. Its barriers are local, though, and the authors report sensitivity to the window size. Our comparison on identical features settles whether global decoding adds anything once barriers exist. We also feed BCN's own barrier scores in as lattice candidates, which isolates the decoder's contribution from the boundary detector's.
Decisive Checks
The first check is the oracle decomposition. As $\rho$ rises from 0.8 to 0.99, the lattice ceiling should rise while the decoder's fraction of that ceiling stays roughly flat. If instead the fraction falls, larger lattices are confusing the decoder, and recall control is the wrong knob. The second check is the uniform-grid ablation at matched candidate count. If adaptive candidates do not beat it on F1@50 beyond seed spread, then the boundary-misalignment benefit reported by Bio-PM and MDLSeg is absorbed by structured decoding, which would be a useful negative result. The third check is the duration-filter comparison above. The fourth is reproduction: if our reruns of MS-TCN++ fall outside seed spread of the published 70.1, we report the gap and draw every conclusion from reran numbers only.
References
- Filtered Semi-Markov CRF
- Boundary-Aware Cascade Networks for Temporal Action Segmentation
- MS-TCN++: Multi-Stage Temporal Convolutional Network for Action Segmentation
- MS-TCN: Multi-Stage Temporal Convolutional Network for Action Segmentation
- Bio-Inspired Self-Supervised Learning for Wrist-worn Accelerometer Data
- A Parameter-free Scene Detection Algorithm for Vision and Language Understanding
- Segment-Then-Rank: Non-Factoid Question Answering on Instructional Videos
- MIMIC-III, a freely accessible critical care database
- Bregman Conditional Random Fields: Sequence Labeling with Parallelizable Inference Algorithms