# Fast Computing for Distance Covariance

arXiv: https://arxiv.org/abs/1410.1503 · HTML: https://mlsanity.com/paper/1410.1503/

## Key facts

- Cited by 14 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 6 Oct 2014.

## Built on by (most cited first, 14 of 14)

- [Learning linear non-Gaussian directed acyclic graph with diverging number of nodes](https://mlsanity.com/paper/2111.00740/) (2021)
- [Deep Transfer Learning: Model Framework and Error Analysis](https://mlsanity.com/paper/2410.09383/) (2024)
- [Machine Learning with Multitype Protected Attributes: Intersectional Fairness through Regularisation](https://mlsanity.com/paper/2509.08163/) (2025)
- [Early Detection of Ovarian Cancer by Wavelet Analysis of Protein Mass Spectra](https://mlsanity.com/paper/2207.07028/) (2022)
- [MAPPING: Debiasing Graph Neural Networks for Fair Node Classification with Limited Sensitive Information Leakage](https://mlsanity.com/paper/2401.12824/) (2024)
- [Private measurement of nonlinear correlations between data hosted across multiple parties](https://mlsanity.com/paper/2110.09670/) (2021)
- [Large-scale Time-Varying Portfolio Optimisation using Graph Attention Networks](https://mlsanity.com/paper/2407.15532/) (2024)
- [Transfer Learning through Enhanced Sufficient Representation: Enriching Source Domain Knowledge with Target Data](https://mlsanity.com/paper/2502.20414/) (2025)
- [CEDAR: Causal Edge Discovery for Autoregressive Processes](https://mlsanity.com/paper/2607.20696/) (2026)
- [Fair Sufficient Representation Learning](https://mlsanity.com/paper/2504.01030/) (2025)
- [Transfer Learning with Distance Covariance for Random Forest: Error Bounds and an EHR Application](https://mlsanity.com/paper/2510.10870/) (2025)
- [Finite-Sample Unbiased Variance of MMD under Unbalanced Sampling: Exact Estimation and Quasi-Linear Computation](https://mlsanity.com/paper/2601.13874/) (2026)
- [The Statistical Cost of Causal Discovery with Feedback](https://mlsanity.com/paper/2609.34050/) (2026)
- [Latent-Space Importance Weighting under Covariate Shift](https://mlsanity.com/paper/2610.15571/) (2026)

## Abstract (arXiv)

Distance covariance and distance correlation have been widely adopted in measuring dependence of a pair of random variables or random vectors. If the computation of distance covariance and distance correlation is implemented directly accordingly to its definition then its computational complexity is O(n2) which is a disadvantage compared to other faster methods. In this paper we show that the computation of distance covariance and distance correlation of real valued random variables can be implemented by an O(n log n) algorithm and this is comparable to other computationally efficient algorithms. The new formula we derive for an unbiased estimator for squared distance covariance turns out to be a U-statistic. This fact implies some nice asymptotic properties that were derived before via more complex methods. We apply the fast computing algorithm to some synthetic data. Our work will make distance correlation applicable to a much wider class of applications.
