We place three algorithms for computing the unbiased sample covariance matrix in streaming and distributed settings on a common algebraic, numerical, and statistical foundation. The Gram algorithm, derived from the variance reformulation, maintains the running cross-product matrix $G_t = \sum_{i=1}^t x_i x_i^\top$ and the column-sum vector $s_t = \sum_{i=1}^t x_i$, yielding the unbiased covariance estimator $S_t = (t-1)^{-1}(G_t - t^{-1}s_t s_t^\top)$ in $O(p^2)$ time per update. The Welford algorithm propagates a running mean $m_t$ and outer-product corrections $M_t$, with updates $m_t = m_{t-1} + (x_t - m_{t-1})/t$ and $M_t = M_{t-1} + (x_t - m_{t-1})(x_t - m_t)^\top$, achieving the same asymptotic cost with improved numerical stability under large data shifts. The Chan-Golub-LeVeque algorithm supports block-parallel merging through the exact identity $M = M_A + M_B + \frac{n_A n_B}{n_A+n_B}(m_B - m_A)(m_B - m_A)^\top$, making it the natural choice for distributed and map-reduce architectures. All three algorithms produce the same estimator $S_t = M_t/(t-1)$ in exact arithmetic, although their finite-precision behavior differs markedly. Beyond runtime and numerical comparisons, we introduce a conformal prediction framework for streaming covariance estimation that yields finite-sample, distribution-free confidence sets $C_{t,jk}$ for each entry $S_{t,jk}$ of the covariance matrix at any step $t$ of the data stream. Experiments confirm that the Gram algorithm is fastest for batch computation, Welford is uniquely robust to catastrophic cancellation under large mean shifts, CGL is optimal for distributed settings, and conformal intervals achieve the nominal coverage level across all three algorithms.


翻译:本文在统一的代数、数值与统计基础上,研究了三种适用于流式与分布式环境下的无偏样本协方差矩阵计算方法。基于方差重构推导出的Gram算法通过维护运行交叉积矩阵$G_t = \sum_{i=1}^t x_i x_i^\top$与列和向量$s_t = \sum_{i=1}^t x_i$,以每次更新$O(p^2)$时间复杂度获得无偏协方差估计量$S_t = (t-1)^{-1}(G_t - t^{-1}s_t s_t^\top)$。Welford算法则递推更新运行均值$m_t$及外积修正项$M_t$,其更新式为$m_t = m_{t-1} + (x_t - m_{t-1})/t$与$M_t = M_{t-1} + (x_t - m_{t-1})(x_t - m_t)^\top$,在相同渐近复杂度下对大幅数据偏移具有更优数值稳定性。Chan-Golub-LeVeque算法通过精确恒等式$M = M_A + M_B + \frac{n_A n_B}{n_A+n_B}(m_B - m_A)(m_B - m_A)^\top$支持分块并行合并,成为分布式与Map-Reduce架构的理想选择。在精确算术条件下,三种算法均可产生相同估计量$S_t = M_t/(t-1)$,但其有限精度表现存在显著差异。除运行时间与数值精度对比外,本文针对流式协方差估计引入保形预测框架,该框架可在数据流的任意时刻$t$给出协方差矩阵每个元素$S_{t,jk}$的有限样本、无分布假设的置信集$C_{t,jk}$。实验证实:Gram算法批量计算速度最快,Welford算法对大均值移位导致的灾难性抵消具有独特鲁棒性,CGL算法适用于分布式场景,且保形区间在三种算法下均达到名义覆盖水平。

0
下载
关闭预览

相关内容

【牛津大学博士论文】流形假设下的贝叶斯非参数估计
专知会员服务
19+阅读 · 2025年5月1日
【干货书】科学计算中的经典数值方法,153页pdf
专知会员服务
56+阅读 · 2023年10月22日
专知会员服务
26+阅读 · 2021年9月9日
124页哈佛数学系本科论文,带你了解流形学习的数学基础
专知会员服务
45+阅读 · 2020年12月23日
【AAAI2021】对比聚类,Contrastive Clustering
专知
26+阅读 · 2021年1月30日
简述多种降维算法
算法与数学之美
11+阅读 · 2018年9月23日
计算文本相似度常用的四种方法
论智
33+阅读 · 2018年5月18日
Spark机器学习:矩阵及推荐算法
LibRec智能推荐
16+阅读 · 2017年8月3日
各种相似性度量及Python实现
机器学习算法与Python学习
11+阅读 · 2017年7月6日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关主题
最新内容
非对称防御中的自组织临界性:俄乌战争
专知会员服务
1+阅读 · 今天14:36
《战争中的大语言模型监管》
专知会员服务
2+阅读 · 今天14:26
边缘计算的军事应用
专知会员服务
8+阅读 · 8月9日
一种考虑资源机动性的武器目标分配混合算法
专知会员服务
9+阅读 · 8月8日
相关资讯
【AAAI2021】对比聚类,Contrastive Clustering
专知
26+阅读 · 2021年1月30日
简述多种降维算法
算法与数学之美
11+阅读 · 2018年9月23日
计算文本相似度常用的四种方法
论智
33+阅读 · 2018年5月18日
Spark机器学习:矩阵及推荐算法
LibRec智能推荐
16+阅读 · 2017年8月3日
各种相似性度量及Python实现
机器学习算法与Python学习
11+阅读 · 2017年7月6日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员