Supervised Learning and Model Analysis with Compositional Data

Shimeng Huang, Elisabeth Ailer, Niki Kilbertus, Niklas Pfister

Introduction

Compositional data, common in fields like microbiome research, represents parts of a whole that must sum to one (e.g., relative species abundance). This constraint places the data on a mathematical structure called a simplex, which poses significant challenges for standard statistical tools. Dependencies between components often induce "spurious" correlations, and the presence of zeros (sparsity) makes traditional logarithmic transformations problematic. Furthermore, researchers often face a trade-off between interpretable but weak linear models and powerful but opaque "black-box" machine learning methods.

The KernelBiome Framework

To bridge this gap, the authors introduce KernelBiome, a nonparametric framework designed specifically for compositional data. Instead of forcing data into a linear mold, KernelBiome maps compositional inputs into a high-dimensional feature space (a Reproducing Kernel Hilbert Space, or RKHS) where complex, non-linear relationships can be captured while respecting the geometry of the simplex.

Overview of the KernelBiome framework, illustrating the transition from compositional input and prior knowledge to model selection and analysis.

The framework includes a suite of kernels tailored to the simplex, such as Aitchison geometry, Jensen-Shannon distances, and Riemannian manifold heat-diffusion kernels. A key innovation is the use of weighted kernels, which allow for the integration of prior knowledge—such as phylogenetic trees—enabling the model to share information between evolutionarily related features.

Interpretability: CFI and CPD

A major contribution of KernelBiome is the introduction of two mathematically grounded measures for model interpretation: Compositional Feature Influence (CFI) and Compositional Feature Dependence (CPD). Unlike standard permutation importance or partial dependence plots, which often evaluate models outside the simplex, CFI and CPD use specific perturbations that maintain the sum-to-one constraint.

Compositional Feature Dependence (CPD) and Compositional Feature Influence (CFI) plots, showing how individual features drive predictions within the simplex constraints.

CFI provides a consistent estimate of a feature's effect, generalizing the coefficients of classical linear models, while CPD visualizes the functional relationship between a feature and the response. These measures ensure that the interpretation remains physically meaningful and avoids the false signals often generated by standard methods when applied to constrained data.

Key Results and Performance

KernelBiome was validated across 33 public microbiome datasets, covering both classification and regression tasks. The framework demonstrated state-of-the-art performance, matching or outperforming Random Forests and Support Vector Machines. Notably, it significantly surpassed standard log-contrast methods on high-dimensional, sparse data.

Beyond predictive accuracy, KernelBiome enables the creation of "Data-driven scalar summary statistics." For example, it can calculate a "Kernel Health Score" based on how far a sample's composition is from a "healthy median" in the RKHS. The framework's data-driven model selection automatically identifies the optimal kernel for a given dataset, effectively defaulting to simpler models when the signal is linear and scaling to complex non-linear kernels when necessary.

Limitations and Future Work

While KernelBiome offers a powerful and interpretable approach, some limitations remain. Interpreting CPD requires caution when perturbations move data into regions of the simplex not well-represented in the training set. Computationally, kernel methods scale cubically ($O(n^3)$) with the number of samples, which may require approximation techniques for extremely large biobanks. Future work will also focus on formal proofs of positive-definiteness for specialized kernels like the Heat Diffusion kernel, which currently rely on empirical evidence.

Summary updated

BibTeX
@article{huang2023supervised,
  author = {Shimeng Huang and Elisabeth Ailer and Niki Kilbertus and Niklas Pfister},
  title = {{Supervised Learning and Model Analysis with Compositional Data}},
  journal = {PLOS Computational Biology},
  year = {2023},
  doi = {10.1371/journal.pcbi.1011240},
}
Figure