In standard statistics, we usually assume that variables can move independently. If you measure a person’s height and their weight, knowing one doesn't mathematically force the other to be a specific value. But in many real-world domains—microbiome research, immunology, and ecology—data comes in the form of proportions that must sum to a constant (like 1 or 100%).
This constraint changes everything. If you are looking at the relative abundance of bacteria in a gut sample, an increase in Firmicutes must be balanced by a decrease in other species to keep the total at 100%. This is compositional data, and it lives on a geometric structure called the unit simplex.
The Failure of Independence
The fundamental problem with compositional data is that it violates the assumption of independence. As Jinkyung Yoo and Michael Greenacre explain in A guideline for the statistical analysis of compositional data in immunology, applying standard tools like t-tests or correlation coefficients to these proportions leads to "spurious correlations." Two variables might appear related simply because they are both part of the same whole, not because of any underlying biological mechanism.
This dependency creates a "zero-sum game" that breaks traditional inference. For instance, Ritwik Bhaduri and Lucas Janson point out in Compositional Covariate Importance Testing via Partial Conjunction of Bivariate Hypotheses that any single variable in a composition is a deterministic function of all the others. If you know the percentage of sand and silt in a soil sample, you already know the percentage of clay. Standard statistical tests often conclude that no individual variable provides "unique" information, even when a specific component is the primary driver of an outcome.
The Ripple Effect of Errors
When data is constrained to a sum, errors are never isolated. In High-dimensional log contrast models with measurement errors, Lingzhou Xue and Xiang Zhan describe this as a "ripple effect." If a sequencing error causes an undercount of one microbe, the proportions of every other microbe in that sample are artificially inflated to maintain the unit sum.
To combat this, they developed the Eric Lasso (Error-in-composition Lasso), which explicitly models how measurement errors propagate across the simplex. This allows for more accurate variable selection in high-dimensional settings where traditional Lasso would be misled by the induced dependencies.
Mapping the Simplex: Transformations and Kernels
To analyze this data, researchers generally take one of two paths: transforming the data into a space where standard tools work, or building new tools that respect the simplex's geometry.
- Log-Ratio Transformations: The most common approach is to transform proportions into ratios (e.g., the log of one component divided by another). This moves the data from the constrained simplex to an unconstrained Euclidean space. Jinkyung Yoo advocates for these in A Guideline for the Statistical Analysis of Compositional Data in Immunology to uncover patterns like racial disparities in cancer patient immune landscapes.
- Radial Transformations: A major headache in compositional data is the presence of zeros (e.g., a species not detected in a sample). Log-ratios fail here because you cannot take the log of zero. Junyoung Park and Changwon Yoon propose a radial transformation in Kernel Methods for Radial Transformed Compositional Data with Many Zeros. By mapping data onto a hypersphere instead of using "fudge factors" to replace zeros, they preserve the true geometry of the data.
- Kernel Methods: Rather than transforming the data, Shimeng Huang and Niklas Pfister developed KernelBiome in Supervised Learning and Model Analysis with Compositional Data. This nonparametric framework uses kernels designed for the simplex, allowing for powerful machine learning predictions while providing mathematically grounded ways to interpret which features are actually driving the model.
Optimization and Privacy on the Slice
The constraints of the simplex also complicate computation and data protection. In optimization, Andrea Cristofari and colleagues note in New Active-Set Frank-Wolfe Variants for Minimization over the Simplex and the $\ell_1$-Ball that you cannot simply "zero out" a variable during an algorithm; you must simultaneously increase others to keep the sum constant. Their AS-SIMPLEX algorithm manages this by identifying "active sets" of variables to optimize in blocks.
Even privacy is harder on the simplex. Standard Differential Privacy adds noise to data points, but if you add independent noise to a probability vector, it will no longer sum to one. Parham Gohari and Matthew T. Hale addressed this in The Dirichlet Mechanism for Differential Privacy on the Unit Simplex by using the Dirichlet distribution to generate noise that naturally respects the unit-sum constraint.
Why It Works: The Blessing of Geometry
While the simplex constraint is often viewed as a burden, it can also be a "blessing." Jingru Zhang demonstrates in Principal component analysis for high-dimensional compositional data that the very structure of the simplex allows researchers to recover the latent structure of absolute abundances even when they can only observe relative proportions. By exploiting the sparsity and high dimensionality of the data, we can look through the "distorted lens" of proportions to see the underlying system more clearly.