Papers
Topics
Authors
Recent
Search
2000 character limit reached

Kernel-Density Slice Sampling (KDS)

Updated 19 July 2026
  • Kernel-Density-based Slice Sampling (KDS) is a density-aware method that leverages KDE over lung area statistics to select representative, information-rich CT slices.
  • KDS is integrated within the SSFL++ framework to enhance training stability, accelerate convergence, and maintain global scan context with fewer, high-quality slices.
  • Empirical results demonstrate that KDS improves F1-scores and reduces inter-source variance, boosting both predictive performance and multi-center robustness.

Kernel-Density-based Slice Sampling (KDS) is a density-aware slice-selection method for chest CT analysis that was introduced within the Spatial-Slice Feature Learning framework, especially SSFL++, to address three recurrent difficulties in COVID-19 CT classification: large variability in scan length and resolution, a substantial fraction of out-of-distribution (OOD) slices, and redundancy across adjacent slices. In the cited literature, KDS is applied after SSFL++ has removed spatial and slice-level redundancy, and then uses kernel density estimation (KDE) over per-slice quantities such as lung area to select representative, information-rich slices while preserving global sequence information. The reported goals are to enhance stability during training and inference, accelerate convergence, and improve predictive performance with relatively simple 2D backbones such as EfficientNet-2D (Hsu et al., 2024).

1. Origins and problem setting

The immediate context for KDS is CT-scan recognition for COVID-19 detection, where each scan may contain hundreds of axial slices acquired under heterogeneous protocols and with varying slice counts and resolutions. The 2024 SSFL++ papers identify two central issues: conventional CT imaging recognition faces strict input-size and model-adaptability requirements because of variability in scan size and resolution, and CT scans contain many OOD slices, with crucial features often present only in specific spatial regions and slices of the whole sequence (Hsu et al., 2024).

Prior work in this line, including SSFL by Hsu et al., reduced the number of slices presented to deep networks by random sampling. The 2024 formulation of KDS was motivated by the observation that random sampling can introduce instability and bias, may miss important regions, and does not guarantee preservation of global sequential context. Systematic sampling, while providing even coverage, was described as agnostic to slice informativeness and therefore liable to include low-density or less informative regions. KDS was proposed to reconcile these competing objectives by selecting slices in a data-driven way that emphasizes informative anatomical regions without collapsing coverage to a narrow subset of the scan (Hsu et al., 2024).

Within SSFL++, KDS is part of a broader attempt to filter OOD data within the entire CT scan and to select essential spatial-slice features for analysis by reducing data redundancy by 70%70\%. The original evaluation used the COVID-19-CT-DB datasets provided by the DEF-AI-MIA workshop, in conjunction with CVPR 2024, and emphasized that promising performance could be obtained with a simple EfficientNet-2D model, including settings with only 1%1\% of the training data (Hsu et al., 2024).

2. Mathematical formulation

In the original formulation, KDS operates on the slice interval [Zs,Ze][\mathbf{Z}_s,\mathbf{Z}_e] remaining after SSFL++ has removed OOD and redundant slices. For each of the remaining ss slices, a scalar xix_i is computed; the cited implementations use quantities such as the area of the lung region after preprocessing. KDS then estimates a univariate density over these slice-level measurements using KDE:

f^h(x)=1si=1sKh(xxi)=1shi=1sK ⁣(xxih).\widehat{f}_h(x)=\frac{1}{s}\sum_{i=1}^{s}K_h(x-x_i)=\frac{1}{sh}\sum_{i=1}^{s}K\!\left(\frac{x-x_i}{h}\right).

The kernel is Gaussian,

K(x,x)=exp(xx22σ2),K(x,x')=\exp\left(-\frac{\|x-x'\|^2}{2\sigma^2}\right),

and the bandwidth hh is reported as being selected via Scott's rule (Hsu et al., 2024).

The estimated density induces a cumulative distribution function,

F(x)=xf^h(t)dt,F(x)=\int_{-\infty}^{x}\widehat{f}_h(t)\,dt,

which is then used to define percentile-based intervals via F(qp)=pF(q_p)=p. The essential sampling rule is adaptive interval partitioning: the sequence is divided according to CDF percentiles, and at least one slice is sampled from each interval, with selection probabilities proportional to local density. This ensures that higher-density regions are more likely to contribute slices while preventing the method from focusing solely on the peak-density portion of the scan (Hsu et al., 2024).

Later multi-source studies preserved the same KDE-and-percentile logic but described concrete configurations for fixed-size temporal downsampling. One reported implementation selects eight output slices corresponding to percentiles 1%1\%0, thereby covering the full extent of the lung from apex to base (Lee et al., 26 Jul 2025). Another challenge report divides the empirical CDF into eight equal percentile intervals, 1%1\%1 for 1%1\%2, and selects exactly one slice per interval, with neighboring-interval fallback if an interval contains no slice (Lee et al., 2 Jul 2025). These descriptions indicate closely related percentile-based realizations of the same density-guided sampling principle.

3. Placement within SSFL and SSFL++

KDS is not presented as a stand-alone detector but as a component in a staged preprocessing and feature-learning pipeline. In the SSFL++ sequence, spatial standardization first removes irrelevant background, crops or aligns the lung region, and excludes slices at the beginning and end of the scan where the area is small or not relevant. KDS is then applied to the reduced slice set, using per-slice lung-area statistics to perform temporal downsampling before the selected slices are fed to a 2D backbone such as EfficientNet-b3 (Hsu et al., 2024).

The key implementation steps reported for the 2024 pipeline are: compute lung area for each selected slice after morphological preprocessing, fit KDE to these area values, compute the CDF to derive interval boundaries, and for the required number of samples, select slices from these intervals with probabilities proportional to their density. After selection, the slices are resized and processed individually using a 2D convolutional network backbone, and the resulting features are pooled or aggregated for patient-level predictions (Hsu et al., 2024).

A later multi-source challenge implementation described the surrounding preprocessing in more detail. The pipeline combines lung region extraction, quality control, and adaptive slice sampling to select eight representative slices per scan. The reported steps are minimum filtering, binarization, and hole-filling to create a lung mask; lung-region cropping and resizing to 1%1\%3; exclusion of scans with inconsistent slice dimensions or fewer than 5 slices; KDS-based sampling of 8 representative slices; and input assembly as a fixed-size representation for 2D CNN or Transformer models (Lee et al., 2 Jul 2025).

The 2025 domain-shift analysis characterizes this combined procedure as input-space standardization. In that reading, SSFL++ provides spatial standardization and KDS provides temporal standardization. The paper states that spatial alignment is crucial because it makes the area measurements used by KDS accurate and aligned across scans, and that the combination yields a synergistic effect: spatial alignment provides the foundation for anatomically meaningful temporal sampling (Lee et al., 26 Jul 2025).

4. Empirical performance and convergence behavior

Across the cited studies, KDS is associated with improvements in F1-score, convergence stability, and data efficiency. In the 2024 ablation study, the baseline configuration without SSFL++ and without KDS achieved F1 1%1\%4 at slice level and 1%1\%5 at scan level; SSFL++ without KDS increased these values to 1%1\%6 and 1%1\%7; and SSFL++ plus KDS reached 1%1\%8 at slice level and 1%1\%9 at scan level on the validation set (Hsu et al., 2024).

The accompanying few-shot results emphasized that the gains persist under aggressive data restriction. One reported configuration, E2D + KDS trained with only [Zs,Ze][\mathbf{Z}_s,\mathbf{Z}_e]0 of the training scans and 4 slices per scan, achieved [Zs,Ze][\mathbf{Z}_s,\mathbf{Z}_e]1 F1 at slice level and [Zs,Ze][\mathbf{Z}_s,\mathbf{Z}_e]2 at scan level. In additional validation comparisons, the E2D model with KDS reached scan-level F1 up to [Zs,Ze][\mathbf{Z}_s,\mathbf{Z}_e]3, surpassing random sampling and more complex 3D or [Zs,Ze][\mathbf{Z}_s,\mathbf{Z}_e]4D models in the reported table. On the testing set, the E2D configuration with SSFL++ and KDS achieved macro-F1 [Zs,Ze][\mathbf{Z}_s,\mathbf{Z}_e]5, compared with a baseline value of [Zs,Ze][\mathbf{Z}_s,\mathbf{Z}_e]6 (Hsu et al., 2024).

Random-sampling baselines were also compared directly with KDS in fixed-slice settings. For 8 slices per scan, the reported scan-level F1 increased from [Zs,Ze][\mathbf{Z}_s,\mathbf{Z}_e]7 with random sampling to [Zs,Ze][\mathbf{Z}_s,\mathbf{Z}_e]8 with KDS; for 16 slices, the reported increase was from [Zs,Ze][\mathbf{Z}_s,\mathbf{Z}_e]9 to ss0. These comparisons were used to support the claim that KDS improves performance with fewer, more relevant slices and is particularly effective in few-shot or data-limited scenarios (Hsu et al., 2024).

The reported optimization behavior is also specific. Figure 1 in the 2024 analysis shows that KDS leads to faster, smoother convergence than random sampling, with less oscillation, lower final loss, and more robust training. The same paper attributes these effects to reduced randomness during both training and inference and to the exclusion of redundant or OOD slices before density-guided selection (Hsu et al., 2024).

Study Setting Reported result
(Hsu et al., 2024) Ablation: baseline ss1 SSFL++ ss2 SSFL++ + KDS Slice F1: 80.41 ss3 92.68 ss4 94.11; Scan F1: 81.26 ss5 93.37 ss6 100.00
(Hsu et al., 2024) Few-shot, ss7 training data, 4 slices, E2D + KDS Slice F1: 91.42; Scan F1: 96.42
(Hsu et al., 2024) Testing set, E2D with SSFL++ and KDS Macro-F1: 94.39; baseline: 85.11
(Lee et al., 2 Jul 2025) Multi-source validation set EfficientNet-B7: F1-score 94.68%, AUC 0.9813; Swin Transformer: F1-score 93.34%, AUC 0.9797

5. Multi-source CT classification and domain robustness

The later literature shifts the emphasis from within-scan redundancy to cross-source generalization. In multi-source CT classification, domain shift is attributed to different acquisition protocols, scanner machinery, patient positioning, scan parameters, and temporal inconsistency in scan length and slice selection. Within this framing, KDS is described as a temporal standardization technique that ensures consistent, representative selection of CT slices across diverse scans and institutions (Lee et al., 26 Jul 2025).

The central claim of the 2025 domain-shift analysis is that SSFL++ and KDS together reduce inter-source variance by preemptively aligning inputs in space and time, rather than relying on post-hoc domain adaptation in feature space. The paper reports that KDS alone, and especially KDS combined with SSFL++, substantially lowers feature distribution differences between domains, yielding a ss8 reduction in inter-source variance. In one quantitative comparison, using KDS increased the Fisher Score from ss9 to xix_i0 and reduced Inter-Source Variance (COVID) from xix_i1 to xix_i2 (Lee et al., 26 Jul 2025).

The same study also reports that adding KDS to SSFL++ produced a substantial jump in F1-score, from xix_i3 to xix_i4 on EfficientNet-B3, with similar behavior on Swin Transformer. The authors interpret this as evidence that the preprocessing itself, rather than architecture-specific inductive bias, is a dominant contributor to robust generalization. Visual analyses using t-SNE and PCA were reported to show tighter, better-separated, and source-agnostic feature embeddings when KDS is present (Lee et al., 26 Jul 2025).

A challenge-oriented multi-source paper provides a complementary operational perspective. There, KDS is used to select eight representative slices per scan from CT scans originating in four distinct medical centers. The preprocessing is described as combining lung region extraction, quality control, and adaptive slice sampling, and the reported validation results are F1-score xix_i5 for EfficientNet and xix_i6 for Swin Transformer. The same report stresses the importance of dataset balance in multi-institutional medical imaging evaluation (Lee et al., 2 Jul 2025).

The broader implication, explicitly stated in the domain-shift paper, is that KDS participates in a trade-off between local discriminability and cross-source generalization. The authors argue that purely maximizing within-source class separability can encourage overfitting to institutional artifacts, whereas temporal standardization encourages learning of disease-related patterns that are more stable across centers (Lee et al., 26 Jul 2025).

Methodologically, KDS is best understood in this literature as a KDE-based temporal downsampling rule over anatomically meaningful per-slice statistics. Its comparative position is defined against two simpler alternatives. Random sampling is described as straightforward but high-variance, vulnerable to selecting uninformative, redundant, or OOD slices, and unable to guarantee representative coverage. Systematic sampling is described as providing even sequence coverage but remaining agnostic to slice informativeness. KDS is presented as combining the advantages of both methods by upsampling in high-density regions while still ensuring samples across the whole scan (Hsu et al., 2024).

This characterization also explains why the papers connect KDS to few-shot capability and data efficiency. Because higher-density intervals are sampled preferentially but all intervals retain representation, the procedure emphasizes slices likely to contain discriminative anatomical content without discarding scan-level structure. The original papers explicitly state that KDS can implicitly improve data efficiency and thereby enhance the model's few-shot capability (Hsu et al., 2024).

A common point of terminological ambiguity is the acronym itself. In the CT literature discussed here, KDS denotes Kernel-Density-based Slice Sampling, a preprocessing method for selecting representative CT slices (Hsu et al., 2024). This usage is distinct from “Kernel Density Steering,” an inference-time ensemble framework for diffusion-based image restoration (Hu et al., 8 Jul 2025), and it is likewise distinct from slice-driven Gibbs samplers for arbitrary probability kernels, such as the Automated Sliced Gibbs framework (Ghosh et al., 31 Mar 2026). The shared language of “kernel density” and “slice” does not indicate a shared application domain or algorithmic objective.

Within medical CT classification, the accumulated evidence positions KDS as a compact but consequential component of the SSFL/SSFL++ family: it uses KDE over lung-area-derived slice statistics to perform adaptive percentile-based sampling, reduces redundancy, improves convergence behavior, and, in later work, functions as a temporal standardization mechanism for multi-source robustness (Hsu et al., 2024).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Kernel-Density-based Slice Sampling (KDS).