# 哈特里-拉奥积

**哈特里-拉奥积**（Khatri-Rao product）是一种矩阵乘积，记作 \( \odot \)，它逐列地施加克罗内克积：两个列数相同的矩阵被组合成一个更高的矩阵，其第 \( i \) 列是两个输入矩阵第 \( i \) 列的克罗内克积。它由 C. G. 哈特里（C. G. Khatri）与 C. R. 拉奥（C. R. Rao）在 1968 年一篇关于函数方程与概率分布的论文中提出，如今已成为张量分解、统计学和信号处理中的标准工具。<sup>[1](https://www.stat.ethz.ch/R-manual/R-devel/library/Matrix/html/KhatriRao.html)</sup>

| 关键事实 | 细节 |
|---|---|
| 定义 | 对 \( A \in \mathbb{K}^{I \times K} \) 与 \( B \in \mathbb{K}^{J \times K} \)，\( A \odot B = [a_1 \otimes b_1, \ldots, a_K \otimes b_K] \in \mathbb{K}^{IJ \times K} \)，其中 \( a_i, b_i \) 为第 \( i \) 列<sup>[2](https://www.kolda.net/publication/TensorReview.pdf)</sup> |
| 其他名称 | 逐列克罗内克积<sup>[2](https://www.kolda.net/publication/TensorReview.pdf)</sup><sup> • </sup><sup>[3](https://www.netlib.org/utk/people/JackDongarra/PAPERS/rand-templates.pdf)</sup> |
| 向量情形 | 若 \( a \) 与 \( b \) 为向量，则 \( a \otimes b = a \odot b \)：哈特里-拉奥积与克罗内克积重合<sup>[2](https://www.kolda.net/publication/TensorReview.pdf)</sup> |
| 非交换性 | \( A \odot B \neq B \odot A \)，因为每列中元素的排列顺序不同<sup>[4](https://acsess.onlinelibrary.wiley.com/doi/10.1002/tpg2.20033)</sup> |
| 起源 | C. G. 哈特里与 C. R. 拉奥（1968），《Sankhya》，A 辑，第 30 卷，第 167–180 页<sup>[1](https://www.stat.ethz.ch/R-manual/R-devel/library/Matrix/html/KhatriRao.html)</sup> |
| 核心计算 | 矩阵化张量乘哈特里-拉奥积（MTTKRP）是张量 CP 分解算法中的典型瓶颈<sup>[5](https://arxiv.org/abs/1708.07401)</sup> |
| 软件 | R 的 Matrix 包提供 KhatriRao()，返回维度为 \( (n \cdot m) \times k \) 的稀疏 CsparseMatrix<sup>[1](https://www.stat.ethz.ch/R-manual/R-devel/library/Matrix/html/KhatriRao.html)</sup> |

## 定义与基本性质

给定列数相同的矩阵 \( A \in \mathbb{K}^{I \times K} \) 与 \( B \in \mathbb{K}^{J \times K} \)，其哈特里-拉奥积为

\[ A \odot B = \left[ a_1 \otimes b_1,\; a_2 \otimes b_2,\; \ldots,\; a_K \otimes b_K \right] \in \mathbb{K}^{IJ \times K}, \]

其中 \( \otimes \) 为克罗内克积，\( a_i \)、\( b_i \) 分别表示 \( A \) 与 \( B \) 的第 \( i \) 列。<sup>[6](https://doi.org/10.3389/fams.2022.836433)</sup> 输出的每一列将两个输入列元素之间的 \( IJ \) 个两两乘积堆叠起来，因此行数相乘，而列数为两者所共有。用指标记号，该乘积可写作 \( (A \odot B) = a_{ik} b_{jk} e_{ij}^{k} \)，其中列指标 \( k \) 为两个因子所共有。<sup>[7](https://link.springer.com/article/10.1186/1687-6180-2014-142)</sup>

该乘积满足结合律但不满足交换律：\( (A \odot B) \odot C = A \odot (B \odot C) \)，而 \( A \odot B \neq B \odot A \)，因为每列内元素的排列顺序不同。<sup>[2](https://www.kolda.net/publication/TensorReview.pdf)</sup><sup> • </sup><sup>[4](https://acsess.onlinelibrary.wiley.com/doi/10.1002/tpg2.20033)</sup> 有两个恒等式将它同普通的格拉姆矩阵以及哈达玛（逐元素）积 \( * \) 联系起来：<sup>[2](https://www.kolda.net/publication/TensorReview.pdf)</sup>

\[ (A \odot B)^{T}(A \odot B) = A^{T}A * B^{T}B, \]
\[ (A \odot B)^{\dagger} = \left( (A^{T}A) * (B^{T}B) \right)^{\dagger} (A \odot B)^{T}, \]

其中 \( \dagger \) 表示穆尔-彭罗斯伪逆。第一个恒等式是张量分解中许多最小二乘推导的基础，因为它使得哈特里-拉奥积那个巨大的 \( IJ \times K \) 格拉姆矩阵可以由两个小的 \( K \times K \) 矩阵构成。<sup>[2](https://www.kolda.net/publication/TensorReview.pdf)</sup>

## 与克罗内克积和哈达玛积的关系

哈特里-拉奥积处在两个更为人熟知的乘积之间。当操作数为单列（向量）时，它恰好退化为克罗内克积。<sup>[2](https://www.kolda.net/publication/TensorReview.pdf)</sup> 在分块划分的视角下，将每个矩阵切成块 \( A_{ij} \) 与 \( B_{ij} \)，该乘积按块定义为 \( A \circledast B = (A_{ij} \otimes B_{ij})_{ij} \)：若每块都是单个 \( 1 \times 1 \) 元素，乘积便成为哈达玛积；若每个矩阵只有一个块，则成为完全的克罗内克积。<sup>[8](https://onlinelibrary.wiley.com/doi/10.1155/2016/8301709)</sup><sup> • </sup><sup>[9](https://0-academic-oup-com.legcat.gov.ns.ca/biomet/article/113/3/asag041/8715499)</sup>

这种分块上的灵活性在统计学中有实际意义。克罗内克积要求试验设计中各处理组合的重复次数相同，而哈特里-拉奥积则能容纳各处理组合样本量的差异，并为不平衡交叉设计的协方差矩阵给出精确的结构化表达。<sup>[9](https://0-academic-oup-com.legcat.gov.ns.ca/biomet/article/113/3/asag041/8715499)</sup> 在基因型×环境模型中，它出现在设计矩阵的精确定义之中；而对于列向量，它与这些协方差结构中所用的克罗内克积一致。<sup>[4](https://acsess.onlinelibrary.wiley.com/doi/10.1002/tpg2.20033)</sup>

该乘积还可推广到普通矩阵之外。对于作用在希尔伯特空间直和上的算子矩阵，哈特里-拉奥积推广了算子的张量积与哈达玛积，其代数性质、正性与单调性已在该框架下得到研究。<sup>[8](https://onlinelibrary.wiley.com/doi/10.1155/2016/8301709)</sup>

## 在张量分解中的作用

该乘积最突出的用途是在 **CANDECOMP/PARAFAC（CP）分解** 的算法之中。CP 分解将张量近似为若干秩一张量之和，广泛用于多维数据分析。<sup>[10](https://epubs.siam.org/doi/10.1137/1.9781611976137.1)</sup> 标准的交替最小二乘（CP-ALS）算法求解一系列高度超定的线性最小二乘问题，其设计矩阵正是当前因子矩阵的哈特里-拉奥积。<sup>[11](https://arxiv.org/abs/1701.06600)</sup> 将矩阵化张量与此类哈特里-拉奥积相乘的核心运算 MTTKRP，是这些算法的典型瓶颈。<sup>[5](https://arxiv.org/abs/1708.07401)</sup>

**通信与内存。** 由于 MTTKRP 主导了开销，其数据移动已被直接分析。格雷·巴拉德（Grey Ballard）、尼古拉斯·奈特（Nicholas Knight）与凯瑟琳·劳斯（Kathryn Rouse）建立了稠密 MTTKRP 的通信下界，并给出了达到该下界的串行与并行算法，表明该计算的结构允许比将其视为一般矩阵乘法更少的通信。<sup>[5](https://arxiv.org/abs/1708.07401)</sup> 随后一项发表于 SIAM PP 2020 的成果收紧了下界，使其在张量各维长度不等、且处理器数量相对于维数较少时仍然可达；达到该界的算法将张量按块分布，只通信因子矩阵。<sup>[10](https://epubs.siam.org/doi/10.1137/1.9781611976137.1)</sup>

第二条研究路线则完全避免构造哈特里-拉奥矩阵。GenTen 软件包中的无矩阵 MTTKRP 的内存开销按 \( O(R(n+m+k)) \) 增长，即张量各维长度之和乘以秩 \( R \)；而显式构造哈特里-拉奥矩阵的基于矩阵的方法按乘积 \( O(R(mnk)) \) 增长。对于一个秩为 2000 的问题，这将内存降至基于矩阵方法开销的 2%，即 50 倍的改进，使得分解可以在一块 NVIDIA H100 GPU 上运行，而非六块。<sup>[12](https://arxiv.org/abs/2510.14891)</sup>

**随机化方法。** 哈特里-拉奥结构也有利于采样。由于该乘积在 CP-ALS 迭代中使用，它产生了有利于直接随机最小二乘采样的条件。<sup>[11](https://arxiv.org/abs/1701.06600)</sup> 一项发表于 NeurIPS 2023 的数据结构按照杠杆分数的精确分布从多个矩阵的哈特里-拉奥积中采样行，抽取每一行的时间与乘积高度成对数关系、与列数成二次关系，并已在十亿规模的稀疏张量上得到验证。<sup>[13](https://arxiv.org/abs/2301.12584)</sup>

## 应用

除张量分解之外，该乘积还出现在数值分析与机器学习的诸多领域。<sup>[14](https://www2.eecs.berkeley.edu/Pubs/TechRpts/2025/EECS-2025-146.pdf)</sup> 在信号处理中，它被用于定义无线通信的空时码与空时频码，并构成欠定混合盲辨识的子空间方法的基础。<sup>[15](https://onlinelibrary.wiley.com/doi/10.1002/9781119700999.ch2)</sup><sup> • </sup><sup>[16](https://www.sciencedirect.com/science/article/pii/S0165168413001291)</sup> 在系统辨识中，由矩阵与自身反复作哈特里-拉奥积所构建的张量网络可支持对称 MIMO 沃尔泰拉模型辨识，其中另一种构造方式免去了显式计算该网络的需要，将辨识速度提升至多十倍。<sup>[17](https://repository.tudelft.nl/record/uuid%3Ad40901a5-8d16-4d11-b619-ac3d8f1a9c4d)</sup> 晚近，该乘积还被用于在视觉模型的参数高效微调中提高低秩适配器的有效秩。<sup>[18](https://mlanthology.org/iccv/2025/albert2025iccv-higher/)</sup>

## References

1. [KhatriRao {Matrix}, R Documentation, R Manual](https://www.stat.ethz.ch/R-manual/R-devel/library/Matrix/html/KhatriRao.html)
2. [Tamara G. Kolda and Brett W. Bader, Tensor Decompositions and Applications](https://www.kolda.net/publication/TensorReview.pdf)
3. [Tensor Product Structures: The Kronecker and Khatri-Rao products](https://www.netlib.org/utk/people/JackDongarra/PAPERS/rand-templates.pdf)
4. [Martini (2020), On Hadamard and Kronecker products in covariance structures for genotype × environment interaction, The Plant Genome](https://acsess.onlinelibrary.wiley.com/doi/10.1002/tpg2.20033)
5. [Ballard, Knight, Rouse (2017), Communication Lower Bounds for Matricized Tensor Times Khatri-Rao Product, arXiv:1708.07401](https://arxiv.org/abs/1708.07401)
6. [CPD-Structured Multivariate Polynomial Optimization, Frontiers in Applied Mathematics and Statistics (2022)](https://doi.org/10.3389/fams.2022.836433)
7. [Overview of constrained PARAFAC models, EURASIP Journal on Advances in Signal Processing (2014)](https://link.springer.com/article/10.1186/1687-6180-2014-142)
8. [Ploymukda (2016), Khatri-Rao Products for Operator Matrices Acting on the Direct Sum of Hilbert Spaces, Journal of Mathematics](https://onlinelibrary.wiley.com/doi/10.1155/2016/8301709)
9. [On the inverse of covariance matrices for unbalanced crossed designs, Biometrika](https://0-academic-oup-com.legcat.gov.ns.ca/biomet/article/113/3/asag041/8715499)
10. [General Memory-Independent Lower Bound for MTTKRP, Proceedings of the 2020 SIAM Conference on Parallel Processing for Scientific Computing](https://epubs.siam.org/doi/10.1137/1.9781611976137.1)
11. [A Practical Randomized CP Tensor Decomposition, arXiv:1701.06600 (SIAM J. Matrix Anal. Appl. 39(2), 2018)](https://arxiv.org/abs/1701.06600)
12. [Kosmacher, Phipps, Rajamanickam (2025), A Performance Portable Matrix Free Dense MTTKRP in GenTen, arXiv:2510.14891](https://arxiv.org/abs/2510.14891)
13. [Bharadwaj et al. (2023), Fast Exact Leverage Score Sampling from Khatri-Rao Products with Applications to Tensor Decomposition, arXiv:2301.12584 (NeurIPS 2023)](https://arxiv.org/abs/2301.12584)
14. [Fast Khatri-Rao Product Leverage Sampling, UC Berkeley EECS Technical Report EECS-2025-146](https://www2.eecs.berkeley.edu/Pubs/TechRpts/2025/EECS-2025-146.pdf)
15. [Favier (2021), Hadamard, Kronecker and Khatri-Rao Products, in Matrix and Tensor Decompositions in Signal Processing, Wiley](https://onlinelibrary.wiley.com/doi/10.1002/9781119700999.ch2)
16. [A Khatri-Rao subspace approach to blind identification of mixtures of quasi-stationary sources, Signal Processing](https://www.sciencedirect.com/science/article/pii/S0165168413001291)
17. [A Khatri-Rao product tensor network for efficient symmetric MIMO Volterra identification, IFAC-PapersOnLine 56(2), 7282-7287 (2023)](https://repository.tudelft.nl/record/uuid%3Ad40901a5-8d16-4d11-b619-ac3d8f1a9c4d)
18. [Towards Higher Effective Rank in Parameter-Efficient Fine-Tuning Using Khatri-Rao Product, ICCV 2025](https://mlanthology.org/iccv/2025/albert2025iccv-higher/)

---
*Initially written Oct 15, 2026 · Edited: Oct 25, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 数与代数 › Linear and multilinear algebra › Matrix theory › Matrix operations and matrix algebra

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/khatri-rao-product

English original: https://www.edgepedia.org/khatri-rao-product
