When analyzing data that represents parts of a whole—such as the relative abundance of microbes in a gut, the proportion of daily time spent sleeping versus exercising, or the chemical composition of a soil sample—standard statistical methods break down. This type of data, known as compositional data, is inherently constrained. Because the components must sum to a fixed constant (like 1 or 100%), they do not vary independently.
If you treat these proportions as ordinary unconstrained variables, you run into severe mathematical artifacts. This article explains why compositional data breaks standard statistics and how a family of geometric mappings—log-ratio transformations—bridges the gap between constrained probability spaces and flat Euclidean geometry.
The Tyranny of the Constant Sum
Imagine a three-part mixture of sand, silt, and clay. If the proportion of sand increases, the combined proportions of silt and clay must decrease to maintain the 100% total. This simple sum-to-one constraint introduces a fundamental mathematical bias: components are artificially forced into negative correlations with one another.
As Pawlowsky‐Glahn et al. argue, using standard correlation coefficients on relative data is mathematically inappropriate. It frequently produces "spurious correlations" that do not reflect any underlying physical or biological reality. For instance, in microbiome research, Lo et al. and Marcos-Zambrano et al. note that an increase in a single dominant bacterium forces the mathematical abundance of all other taxa to drop, leading standard network models to infer false competitive relationships.
Geometrically, an unconstrained $D$-dimensional vector can live anywhere in real space ($\mathbb{R}^D$). However, a $D$-component composition is restricted to a bounded, lower-dimensional subspace called a simplex ($\mathcal{S}^D$).
Unconstrained Space (R^2) Constrained Simplex (S^3)
Y-axis Clay
| /\
| • (x, y) / \
| / \
---------+--------- X-axis / • \
| /________\
| Sand Silt
As Wahabzada et al. point out, there is a severe geometric mismatch between the bounded probability simplex and the flat Euclidean distance metrics used by standard clustering and machine learning algorithms. If you compute a straight-line Euclidean distance across the simplex, your path ignores the boundaries and the relative nature of the data.
Why Log-Ratios Work
To resolve this mismatch, we need an invertible mapping that projects the interior of a constrained simplex into an unconstrained Euclidean space. The mathematical engine behind this is the log-ratio.
Why focus on logs of ratios rather than absolute values?
- Ratios capture relative change: In compositional data, the difference between 1% and 2% is conceptually identical to the difference between 10% and 20%—both represent a doubling of presence. Ratios naturally preserve this scale-invariance.
- Logs linearize multiplicative relationships: Taking the logarithm converts multiplicative operations into additive ones. For example, Xue et al. demonstrate that transforming proportions into log-ratios converts complex, multiplicative sequencing measurement biases into simple additive errors, which can then be corrected using linear statistical techniques.
There are three primary log-ratio transformations used to map the simplex to Euclidean space:
1. Additive Log-Ratio (ALR)
The ALR divides each component by a single chosen reference component (e.g., the $D$-th component) before taking the log:
$$\text{alr}(x) = \left[ \ln\frac{x_1}{x_D}, \ln\frac{x_2}{x_D}, \dots, \ln\frac{x_{D-1}}{x_D} \right]$$
As shown by Shanmugam et al. and Zhang et al., the ALR effectively maps scores from a bounded simplex to an unbounded real space. This eliminates boundary biases in density estimation and allows for stable linear calibrations. However, the ALR is asymmetric because the choice of the reference component alters the resulting coordinate system.
2. Centered Log-Ratio (CLR)
To restore symmetry, the CLR divides each component by the geometric mean ($g(x)$) of all components in the sample:
$$\text{clr}(x) = \left[ \ln\frac{x_1}{g(x)}, \ln\frac{x_2}{g(x)}, \dots, \ln\frac{x_D}{g(x)} \right]$$
Quinn et al. explain that the CLR decouples the artificial dependencies between variables by referencing them to a sample-wide baseline. This makes it highly popular for normalizing trace element data in geology (Tan et al.) and identifying biomarker associations in microbiomes (Lo et al.). The trade-off is that the resulting coordinates still sum to zero, meaning the data remains trapped on a hyperplane within $\mathbb{R}^D$.
3. Isometric Log-Ratio (ILR)
The ILR solves the remaining dimensionality problem. It projects the composition onto an orthonormal basis of the simplex, mapping a $D$-component composition directly into an unconstrained, flat Euclidean space of $D-1$ dimensions ($\mathbb{R}^{D-1}$).
As Williams et al. explain, the ILR is an isometric transformation: it perfectly preserves geometric distances between probability vectors.
Preserving Aitchison Geometry
The true power of the ILR transformation lies in its preservation of Aitchison geometry—the natural geometry of the simplex.
When you train a continuous generative model (like a Flow Matching model or a Diffusion model) directly on raw probabilities, the model's training paths often stray outside the simplex boundaries or fail to respect the relative scaling of probabilities. By applying an ILR transformation, Williams et al. demonstrate that straight-line paths in the transformed Euclidean space correspond exactly to natural geodesics (the shortest paths) on the simplex.
Straight Path in Euclidean Space Corresponding Geodesic on Simplex
(Unconstrained) (Constrained)
Vector Clay
| /\
| / \
v / ) \
---------------+---> / / \
| /_/______\
| Sand Silt
Because the transformation prioritizes component ratios over absolute differences, the model naturally focuses its capacity on the structural relationships between categories.
Unlocking Standard Machine Learning
Once the compositional data has been mapped into an unconstrained Euclidean space via log-ratios, the entire toolbox of modern statistics and machine learning becomes safely available:
- Regression without Multicollinearity: In behavioral studies tracking 24-hour time budgets, Li et al. use the ILR transformation to eliminate severe multicollinearity in regression models, allowing researchers to accurately simulate swapping time between sedentary behavior and physical activity.
- Convex Optimization: For multi-region medical image segmentation, Andrews et al. map probability simplexes to Euclidean space via isometric transforms. This allows them to perform unconstrained optimization with guaranteed global optimums, ensuring that the sum-to-one probability constraint is inherently satisfied without requiring complex projection steps during inference.
- Spatial Mapping: In environmental remote sensing, Zhao et al. combine ILR transformations with Random Forests to map soil particle size fractions across complex permafrost terrains, significantly outperforming models that predict fractions independently.
- Causal Inference: Ailer et al. leverage ILR transformations to extend instrumental variable estimation to compositional treatments, enabling researchers to determine whether specific recipes of microbes or cells cause health outcomes.
Alternative Geometries and Limitations
While log-ratio transformations are mathematically elegant, they are not a silver bullet for every dataset. Their primary vulnerability is zero values. Because the logarithm of zero is undefined, datasets with high sparsity (such as microbiome tables containing many absent species) require artificial data substitution or "fudge factors" to function.
To bypass this limitation, alternative geometric mappings have emerged. For instance, Park et al. propose a radial transformation that maps compositional data onto a hypersphere instead of a flat Euclidean space. This approach preserves the core directional and proportional information of the data while handling zero values naturally without data distortion. Similarly, Petersen et al. utilize invertible mappings to project continuous probability density functions into linear Hilbert spaces to perform functional data analysis.
Finally, it is vital to remember that computational transformations cannot entirely replace physical measurements. As Lloréns‐Rico et al. caution in a comprehensive benchmark, purely mathematical fixes for compositionality can still fail to capture true biological dynamics if they are not paired with experimental measurements of absolute load (such as total cell counts). Log-ratio transformations correct the geometry of relative data, but they do not magically reconstruct information that was never collected.
Key Foundational Work
Automated interpretation of 3D laserscanned point clouds for plant organ segmentation (2015) — contributed 2 concept elements to this direction.
Proportionality: A Valid Alternative to Correlation for Relative Data (2015) — contributed 1 concept elements to this direction.
Sparse and Compositionally Robust Inference of Microbial Ecological Networks (2015) — contributed 1 concept elements to this direction.