Pruning Patched Biosignal Encoders Without Losing Their Few-Label Advantage

Pretrained time-series encoders are valuable in medicine because they let a model learn a new diagnosis from a few hundred labeled recordings instead of tens of thousands. These encoders work on "patches," short windows of the signal that each become one token. The large ones are too heavy for a bedside monitor. Compressing them is the obvious fix, but the published advice is discouraging. Structured pruning of a self-supervised model before task fine-tuning reportedly destroys accuracy, so pruning is recommended only after fine-tuning on full labels. That is exactly the step a label-scarce clinical task cannot afford. Pruning criteria also do not transfer between model families: rules designed for convolutional filters, attention heads, and recurrent states each fail on the others.

We propose one label-free pruning criterion that works the same way whether the encoder is a Transformer, a convolutional patch mixer, or a state-space model (a recurrent network whose hidden state follows learned linear dynamics). The criterion relies on what patching gives all of these models in common: a stream of per-patch hidden vectors that every block reads from and writes to. We score each removable unit (a head, a channel, or a state dimension) by how much it writes into that stream along directions the stream rarely uses. This is measured after whitening, meaning the vectors are rescaled so that every direction has equal variance. The bet is that rare diagnoses live in exactly those low-variance directions. Ordinary energy-based or magnitude-based scores discard them first, and that is why pruned self-supervised models lose their few-label advantage.

Core Claim

A pruning score that preserves the whitened geometry of patch representations on unlabeled data will keep downstream few-shot accuracy, especially on minority classes, far better than three alternatives at the same parameter count. The alternatives are scores based on output energy, magnitude, or the pretext reconstruction loss. The score is computed the same way across Transformer, convolutional, and state-space patch encoders, so one pruned backbone can serve many downstream tasks without any labels entering the pruning step.

Formally, consider a structural group $g$ that writes a contribution vector $c_g(x,t)$ into the residual stream of layer $l$ at patch $t$ of input $x$. Let $\Sigma_l$ be the (ridge-regularized) covariance of that stream over an unlabeled calibration set. The score is

$$ s_g = \mathbb{E}_{x,t}\left[ c_g(x,t)^\top \Sigma_l^{-1} c_g(x,t) \right], $$

which is the expected squared change in the whitened representation if $g$ is removed. Setting $\Sigma_l = I$ recovers a plain output-energy score, close in spirit to the forward-pass output statistics used by GHOST. That substitution is the main ablation. For attention heads and feed-forward blocks, $c_g$ is the block's projected output. For convolutional channels, it is the channel's contribution through the following pointwise projection. For state-space models, it is $C_n h_n$, the readout of state dimension $n$. All of these need only forward passes.

Prior Work and Where This Sits

Three papers motivate the gap. Fine-tune Before Structured Pruning compresses WavLM by 80% for speaker diarization, but only after full-label fine-tuning, and reports that pruning the pretrained model first fails. We test whether that failure comes from the pruning criterion rather than from the ordering itself. FORMED keeps a TimesFM backbone frozen and tunes 0.1% of parameters, reporting a 35% absolute F1 gain on ADFTD. This shows few-label adaptation works, but the full backbone still runs at inference. Benchmarking ECG FMs finds foundation models 3.3x to 9x more label-efficient than supervised models. It also finds that a 3.8M-parameter state-space model trained with contrastive predictive coding (ECG-CPC) beats models up to 25x larger. That result raises the question of whether large encoders are mostly removable weight, and it is also the strongest threat to our proposal.

Three papers supply method pieces and also constrain the design. GHOST truncates Mamba2 states using forward-pass controllability and observability statistics, halving the state dimension for about one point of WikiText-2 perplexity. It shows that low-magnitude "phantom" states can be essential, which rules out magnitude scores. We reuse its forward-only, output-aware philosophy but change the weighting and the reach. GHOST weights by output energy, whereas we weight by whitened geometry. GHOST is specific to Mamba2, whereas we cover attention and convolution through the shared patch stream. SAViT models how ViT heads, feed-forward neurons, and embedding dimensions interact through a sampled Hessian of the supervised loss. Because it needs labels and an evolutionary search, it is unsuitable here, but it is our evidence that budgets must be allocated jointly across components. We allocate them with one globally comparable score. OTOv3 finds removable parameter groups automatically from the computation graph, which we use for physical removal. Its importance signal comes from supervised training, and we replace that with our label-free score.

SimPrune shows that token pruning tuned for supervised learning causes a 2.4% drop in self-supervised ViTs, versus 0.2% under supervision. It prunes tokens during training rather than weights, but it supports our premise that self-supervised representations break under criteria built for other objectives.

On the patching side, PatchTST, PatchMixer, and MOMENT supply the three backbone families that share the per-patch residual stream. Mantis reports a 2.2M-parameter model "after pruning" without studying the step, and finds intermediate layers transfer better than final ones. That finding is why we score against the probe layer's stream rather than against reconstruction loss.

Research Program

We first build the scoring and removal pipeline for three patch encoder families. These are MOMENT (Transformer), a PatchMixer-style convolutional encoder pretrained by masked patch reconstruction on the same ECG corpus, and an ECG-CPC-style state-space encoder. We use public checkpoints where they exist and otherwise reproduce the published recipe. Calibration uses a few thousand unlabeled recordings.

Groups are ranked globally by $s_g$, normalized by each group's parameter or FLOP cost, and removed up to a target budget. Removal is followed by a short label-free repair step: self-distillation that matches the pruned model's patch tokens to the original's on unlabeled data. The repair step is applied identically to every pruning baseline.

The analysis has two parts. First, for each architecture and sparsity level, we measure the full few-shot learning curve, linear probe and light fine-tuning at 1%, 5%, 10%, 30%, and 100% of labels. We summarize it as label-efficiency retention: the label fraction the pruned model needs to match the unpruned model's score at 10% labels. We report this separately for frequent and rare diagnostic classes. Second, we test the mechanism directly. We measure how much of each pruned group's removed contribution falls in the bottom principal directions of the stream. We then check whether that quantity predicts rare-class probe loss across architectures.

Baselines

The do-nothing reference is the unpruned pretrained encoder with the same linear probe and fine-tuning protocol. It sets the curves that every pruned model is measured against. A second reference is a supervised model trained from scratch at each label fraction. On PTB-XL this anchors both ends: Self-supervised representation learning from 12-lead ECG data reports a supervised macro AUC of 0.9318, a CPC linear-probe AUC of 0.927, and a fine-tuned AUC of 0.9418. Deep Learning for ECG Analysis reports about 0.939 macro AUC for CNN ensembles on diagnostic statements.

The strongest small-model competitor is ECG-CPC itself, used at its native 3.8M size. Benchmarking ECG FMs reports it dominating 5 of 7 task categories, but no reported per-task AUC was found on Lacuna for ECG-CPC. We therefore rerun it under our splits. Pruned MOMENT counts as beating it only if, at matched parameter count and CPU latency, it achieves higher mean macro AUC across the benchmark tasks at 1% to 10% labels.

The strongest pruning baselines are the following. GHOST-style output-energy scoring ($\Sigma_l = I$) isolates the whitening ingredient. OTOv3 groups with magnitude importance stand in for the generic architecture-agnostic approach. A first-order Taylor score on the masked-reconstruction loss is the pretext-aligned label-free option. The few-label version of Fine-tune Before Structured Pruning fine-tunes on the K available labels, then prunes with distillation, once per task.

All baselines use the same calibration data and the same repair budget in GPU-hours. They also use the same probe hyperparameter grid, selected on a validation split. The proposal counts as successful if whitened scoring beats every label-free baseline on rare-class AUC at 50% and 75% parameter reduction, across at least two of the three architectures. It must also be within noise of the per-task fine-then-prune baseline while producing one shared backbone instead of one per task.

Why not just…?

Why not just use ECG-CPC, which is already small and wins? This is a real threat. If a 3.8M state-space model trained from scratch matches every pruned large model at equal size, compressing Transformers is pointless for ECG. Our experiments settle this directly with a matched-size comparison. The proposal survives either outcome in a narrower form: the criterion also applies to ECG-CPC, so we also test whether it can be halved again for microcontroller deployment. Its claim to cross-architecture generality does not depend on Transformers winning. For EEG and multi-domain tasks, where no comparable small champion appears in the file, the large-model path stays open.

Why not just distill the big encoder into a small student on unlabeled data? Distillation may work as well, and we treat it as a co-equal baseline. We distill MOMENT into an architecture of the pruned model's size using the same patch-token matching loss and the same GPU-hour budget as pruning plus repair. Pruning has a structural advantage here. It starts from the teacher's own weights, including the low-variance directions a student trained on mean-squared token matching is likely to underfit. Rare-class AUC is where we expect a difference. If none appears, we report that distillation is sufficient.

Why not just prune after fine-tuning on the few labels, as the speech work recommends? With 1% of PTB-XL labels, task-driven pruning has little signal and risks fitting the pruned structure to noise. It also yields a different pruned network for every diagnosis. We run this recipe from Fine-tune Before Structured Pruning per task. If it beats label-free whitened pruning by a clear margin even at 1% labels, our central claim that the criterion was the problem, not the ordering, is falsified.

Why not just keep the backbone frozen and train a small head, as FORMED does? This preserves accuracy but compresses nothing. FORMED still runs the whole TimesFM backbone on every input. We report its accuracy as an upper reference on ADFTD, APAVA, and TDBrain, measure its latency against ours, and apply its query head on top of our pruned backbone to test whether the two methods combine.

Proposed Experiments and Decisive Checks

The main testbed is PTB-XL under its standard patient-stratified splits, with the label fractions above. A subset of the 26-task ECG foundation-model benchmark covers morphology, structure-and-function, and outcome categories. The last of these is where foundation models already struggle, and where we expect pruning damage to show first. EEG generalization uses the FORMED suite (ADFTD, APAVA, TDBrain). General classification uses UCR and UEA through MOMENT, so the findings are not ECG-specific.

We report macro AUC or F1 against label fraction. We also report label-efficiency retention, rare-class AUC (classes in the bottom quartile of PTB-XL frequency), parameters, FLOPs, and measured CPU and embedded-GPU latency.

Three results would be decisive. First, across all three architectures, rank correlation between $s_g$-predicted damage and measured rare-class probe loss should exceed that of the energy, magnitude, and reconstruction-Taylor scores. A failure here on any one architecture would mean the patch stream is not the shared interface we assume. Second, at 75% parameter reduction, whitened pruning should keep label-efficiency retention near 1. Output-energy pruning of the same model should need several times more labels to recover, with the gap concentrated on rare classes rather than spread evenly. Third, the matched-size comparison against ECG-CPC and against the distilled student either justifies compressing large encoders or narrows the contribution to a portable pruning criterion. We will report whichever outcome occurs.