安徽科技工程大学 · 本科生科研社团Anhui Science and Technology University · Undergraduate research society
安科科学梦之队AHSTU Future Scientists
预印本Preprint · 2026.10.04 · arXiv:2610.05368 [cs.LG]

缺失模式失配对时间序列分类方法选择的影响:一项受控实证研究The effect of missingness-pattern mismatch on method selection for time-series classification

Ruiqi Zhao1,†Zishun Yuan2Zhentao Wang3Jiahao Quan4Kangzheng Li5Jianfan Deng6
1东京大学The University of Tokyo · 2纽约州立大学石溪分校(韩国)Stony Brook University, SUNY Korea · 3福耀科技大学Fuyao University of Science and Technology · 4中国人民大学Renmin University of China · 5清华大学Tsinghua University · 6安徽科技工程大学Anhui Science and Technology University · †通讯作者Corresponding author

摘要Abstract

时间序列分类器通常依据验证数据进行选择,但部署时缺失观测的时间模式可能与验证时不同。我们考察这种失配是否影响基于验证的分类器选择。在受控的 2 × 2 设计中,64 个单变量 UCR 数据集的验证集与测试集分别以随机点缺失或循环块缺失遮蔽(缺失率 5%–30% 共六档),经线性插补后用于在三个预先指定的候选(1NN-DTW、MiniRocket + Ridge、统计特征随机森林)中进行选择,训练数据保持完整。失配验证使所选分类器的测试平衡准确率平均降低 1.14 个百分点(95% CI 0.79–1.51),64 个数据集中有 49 个受损;损失在 5% 缺失率时可以忽略,30% 时增至 2.46 个百分点,并集中出现在点缺失的部署场景(1.84 个百分点)。失配在 35.5% 的配对中改变了所选分类器,但改变并不总意味着变差。使用不绕回的线性块的补充实验重现了上述结论,且效应更大(1.67 个百分点)。因此,让验证数据的缺失模式与预期的部署模式一致,是方法选择中一项简单的保障,在缺失率较高时尤其如此。Classifiers for time-series classification are commonly selected on validation data, but the temporal pattern of missing observations at deployment may differ from the pattern seen during validation. We examine whether such a mismatch affects validation-based classifier selection. In a controlled 2 × 2 design, validation and test sets of 64 univariate UCR datasets were masked with either random point missingness or circular block missingness at six rates from 5% to 30%, imputed by linear interpolation, and used to select among three prespecified candidates: 1NN-DTW, MiniRocket with a Ridge classifier, and a statistical-feature Random Forest. Training data remained complete. Mismatched validation reduced the test balanced accuracy of the selected classifier by 1.14 percentage points on average (95% CI 0.79 to 1.51), with losses on 49 of the 64 datasets. The loss was negligible at 5% missingness and increased to 2.46 points at 30%, concentrated in point-masked deployment (1.84 points). Mismatch changed the selected classifier in 35.5% of paired comparisons, but a changed selection did not always reduce performance. A supplementary analysis with non-wrapping linear blocks reproduced these findings with a larger effect (1.67 points). Matching the missingness pattern of validation data to the expected deployment pattern is therefore a simple safeguard for method selection, particularly at higher missingness rates.

一句话概括In one sentence

让验证数据的缺失模式与部署时一致——这条简单的原则,平均能为所选分类器挽回 1.14 个百分点的平衡准确率;缺失率越高,它越重要。Match the missingness pattern of your validation data to what you expect at deployment: this simple rule recovers 1.14 pp of balanced accuracy for the selected classifier on average — and matters more as missingness grows.

1.14pp 平均损失(95% CI 0.79–1.51)pp mean loss (95% CI 0.79–1.51)
49/64个数据集因失配受损datasets hurt by mismatch
2.46pp 损失(缺失率 30%)pp loss at 30% missingness
35.5% 的配对中所选分类器发生改变% of pairs changed their selection

01问题:验证时的缺失,与部署时一样吗?The question: does validation go missing the way deployment does?

时间序列分类器通常在验证集上“选秀”。但传感器掉线、记录中断,会让部署时的数据以另一种方式缺失:可能是零散的点缺失,也可能是连续的块缺失。两者可以删去同样多的观测值,却留下截然不同的时间结构。

Time-series classifiers are usually chosen on validation data. But dropped sensors and interrupted logging mean that deployment data may go missing in a different way: as scattered point missingness or as contiguous block missingness. The two can remove the same number of observations yet leave very different temporal structure behind.

已有工作研究过缺失对预测性能的影响。我们关心的是另一件事:选择决策本身。在固定缺失率下,验证集与测试集的缺失模式失配,会不会让我们选错分类器?又会损失多少?

Prior work studies how missingness affects predictive performance. We ask about something else: the selection decision itself. At a fixed missingness rate, does a mismatch between validation and test missingness patterns lead us to pick the wrong classifier — and what does it cost?

02点缺失与(循环)块缺失Point vs (circular) block missingness

两种模式删除完全相同数量的观测 k = ⌊rT⌋。点缺失均匀不放回地抽取 k 个位置;循环块缺失随机选择起点 s,遮蔽 {(s + j) mod T}——块可以从序列末尾“绕回”开头,从而保证每个位置被遮蔽的边际概率都是 k/T。缺失值随后用固定的线性插补填充。亲手试试:

Both patterns remove exactly k = ⌊rT⌋ observations. Point missingness samples k positions uniformly without replacement; circular block missingness picks a random start s and masks {(s + j) mod T} — a block may wrap from the end of the series to its start, so every position has the same marginal masking probability k/T. Missing values are then filled by fixed linear interpolation. Try it:

实验台 · 缺失模式Lab · Missingness patterns
20%
观测值observed 线性插补 / 被遮蔽位置linear imputation / masked 被隐藏的真实值hidden ground truth
被遮蔽masked k—
最长连续缺口longest gap—
插补误差imputation RMSE—
缺失率rate r—
观察:同样的缺失率下,块缺失会抹去整段形状(例如一个峰),插补只能“拉直线”;点缺失则几乎能被完美修复。这正是两种模式会让分类器排名发生变化的原因。Notice: at the same rate, a block erases whole shapes (a peak, say) and interpolation can only draw a straight line, whereas point gaps are repaired almost perfectly. That is exactly why the two patterns can reorder classifiers.

03实验设计:受控的 2 × 2Design: a controlled 2 × 2

对每个数据集与种子,官方训练集按 75/25 分层划分为完整的拟合子集与验证子集;候选模型只在完整数据上训练,缺失仅注入验证集与官方测试集。三个预先指定的候选:1NN-DTW、MiniRocket + Ridge,以及基于十个统计特征的随机森林。验证集上平衡准确率最高者被选中,然后在同一份被遮蔽的测试集上评估。

For each dataset and seed, the official training set is split 75/25 (stratified) into a complete fitting subset and a validation subset; candidates are trained only on complete data, and missingness is injected only into the validation set and the official test set. Three pre-specified candidates: 1NN-DTW, MiniRocket + Ridge, and a Random Forest on ten statistical features. The candidate with the best validation balanced accuracy is selected and then evaluated on the same masked test set.

测试:点缺失Test: point
测试:块缺失Test: block
验证:点缺失Validate: point
P → P匹配matched
遗憾regret 2.06 pp · 选错率sel. error 26.9%
P → B失配mismatched
遗憾regret 2.93 pp · 选错率sel. error 34.3%
验证:块缺失Validate: block
B → P失配mismatched
遗憾regret 3.89 pp · 选错率sel. error 38.4%
B → B匹配matched
遗憾regret 2.49 pp · 选错率sel. error 32.9%

遗憾(regret)= 测试集上事后最佳候选的平衡准确率 − 所选候选的平衡准确率。数值为 64 个数据集在种子与缺失率上的平均(论文表 3)。

Regret = balanced accuracy of the retrospectively best candidate on the test set − that of the selected candidate. Values are averages over 64 datasets, seeds and rates (Table 3 of the paper).

04主要结果Results

失配验证使所选分类器的测试平衡准确率平均降低 1.14 pp(95% CI 0.79–1.51;49 个数据集变差、7 个变好、8 个持平;Wilcoxon p = 1.8 × 10⁻⁹),选错率上升 6.4 pp。损失随缺失率稳步增长:5% 时与零无异,30% 时达到 2.46 pp;数据集层面的斜率为每 1 pp 缺失率损失 0.091 pp。

Mismatched validation lowered the test balanced accuracy of the selected classifier by 1.14 pp on average (95% CI 0.79–1.51; 49 datasets worse, 7 better, 8 equal; Wilcoxon p = 1.8 × 10⁻⁹) and raised the selection-error rate by 6.4 pp. The loss grows steadily with the rate: indistinguishable from zero at 5%, 2.46 pp at 30%; the dataset-level slope is 0.091 pp per percentage point of missingness.

深蓝线:失配造成的平衡准确率损失(均值与 95% bootstrap 区间,左轴);红色柱:所选分类器发生改变的比例(右轴)。数据:论文表 2。Navy line: balanced-accuracy loss from mismatch (mean with 95% bootstrap band, left axis); red bars: share of pairs whose selected classifier changed (right axis). Data: Table 2 of the paper.
比较ComparisonΔBA (pp)95% CI差/好/平W/B/Ep
两类测试合计Both targets1.14[0.79, 1.51]49/7/81.8 × 10⁻⁹
点缺失测试(BP vs PP)Point test (BP vs PP)1.84[1.23, 2.50]43/13/87.4 × 10⁻⁷
块缺失测试(PB vs BB)Block test (PB vs BB)0.44[−0.11, 1.03]34/22/80.20
论文表 1。补充实验改用不绕回的线性块,结论重现且效应更大(1.67 pp)。Table 1 of the paper. A supplementary run with non-wrapping linear blocks reproduces the findings with a larger effect (1.67 pp).

05为什么只在点缺失部署时吃亏?Why does it hurt mainly under point-masked deployment?

效应几乎全部来自点缺失的部署场景(1.84 pp),而块缺失部署的损失很小且不显著。候选层面的结果提示了一种机制:在点缺失测试中,MiniRocket-Ridge 占据了 84.0% 的“事后最佳”份额,偏离它代价高昂;而块缺失的验证集恰恰把选择从 MiniRocket 推向了 1NN-DTW 与随机森林——它们在 BP 条件下被选中时,平均比最佳候选低 10.5 与 14.5 pp。

The effect comes almost entirely from point-masked deployment (1.84 pp); for block-masked deployment the loss is small and not significant. Candidate-level results suggest a mechanism: on point-masked tests MiniRocket-Ridge holds 84.0% of the oracle share, so departing from it is costly — and block-masked validation pushes selection away from MiniRocket towards 1NN-DTW and the Random Forest, which were 10.5 and 14.5 pp below the oracle when selected under BP.

点缺失验证Point validation
MiniRocket 73.5%DTW 16.4%RF 10.2%
块缺失验证Block validation
MiniRocket 61.4%DTW 19.9%RF 18.7%
各候选被选中的比例(数据集等权)。块缺失验证使选择分散到另外两个候选。Share of conditions in which each candidate was selected (datasets weighted equally). Block-masked validation spreads selection towards the other two candidates.

换言之,这种不对称更可能取决于“最佳候选在各部署模式下有多集中”,而非点缺失或块缺失本身的固有性质。值得一提的是,块缺失测试本身要难得多:候选集的最佳平衡准确率在点缺失测试上为 81.5%,在块缺失测试上仅 70.4%,64 个数据集中有 62 个更低。

In other words, the asymmetry likely depends on how concentrated the best candidate is under each deployment pattern, rather than on an intrinsic property of point or block missingness. Note too that block-masked tests are much harder: the candidate-set oracle averaged 81.5% balanced accuracy on point-masked tests but only 70.4% on block-masked ones, lower on 62 of the 64 datasets.

06“换了”不等于“变差”A changed selection is not always a worse one

失配让约三分之一的配对选了不同的分类器,但在这些“换了”的配对里,失配的选择只有 58.3% 更差,37.3% 反而更好,4.4% 持平。在 5% 的缺失率下,约五分之一的配对换了选择,却没有可检测的性能损失。因此,研究分布偏移下的方法选择时,应报告配对的性能差或遗憾,而不只是“所选方法是否一致”。

Mismatch changed the selected classifier in about a third of pairs, but among those changed selections the mismatched choice was worse in only 58.3%, better in 37.3% and equal in 4.4%. At 5% missingness about one pair in five switched without any detectable loss. Studies of method selection under shift should therefore report paired performance differences or regret, not just agreement between selected methods.

07实践建议与局限Takeaways and limitations

  1. 匹配模式。若已知部署时的缺失模式,就用同样的模式遮蔽验证数据——尤其在中高缺失率下;5% 时差别不大。
  2. Match the pattern. If you know the deployment missingness pattern, mask validation data the same way — especially at moderate to high rates; at 5% it made little difference.
  3. 两种都试。若部署时可能出现成片缺口而验证集没有(或反之),在下定论前比较两种模式下的候选排名。
  4. Try both. If contiguous gaps may appear at deployment but not in validation (or vice versa), compare candidate rankings under both patterns before committing.
  5. 关注验证集规模。即使模式匹配,PP 条件下仍有 26.9% 的选择不是最优——验证集大小与重复验证对选择可靠性的影响值得单独研究。
  6. Mind the validation size. Even when matched, 26.9% of PP selections were suboptimal — the effect of validation-set size and repeated validation on selection reliability deserves its own study.

局限:仅比较了三个预先指定、超参数固定的候选;插补固定为线性插值;数据为 UCR2015 中 64 个单变量、等长、原本完整的数据集;缺失由受控的合成机制产生,并非模拟某种真实故障。结论应在这一受控设定下理解。

Limitations: only three pre-specified candidates with fixed hyperparameters; imputation fixed to linear interpolation; 64 univariate, equal-length, originally complete UCR2015 datasets; missingness generated by a controlled synthetic mechanism rather than a model of a specific real-world failure. The conclusions should be read within this controlled setting.

阅读原文:arXiv:2610.05368。配置文件、冻结的结果文件、分析输出与校验和构成了研究的完整数值记录。 Read the paper: arXiv:2610.05368. Configuration files, frozen result files, analysis outputs and checksums form the complete numerical record of the study.