arXiv:2607.28136cs.DScs.IR2026-07

改进 $k^2$-树的存储布局,提升图计算时的内存效率和运算速度。

Extended Depth-First Representations of $k^2$-trees

  • 采用深度优先遍历重构 $k^2$-树布局,增强缓存局部性。
  • 压缩版布局在多数场景下实现最优压缩率,峰值内存降低显著。
  • 适合大规模图数据中的矩阵运算场景,尤其关注内存与速度平衡的系统设计。

本文研究静态、计算友好且无损的图压缩格式,聚焦 $k^2$-树在内存局部性和操作效率上的表现。传统按层布局在矩阵向量及矩阵矩阵运算中因局部性差导致缓存性能不佳。为此,提出四种深度优先表示:纯深度优先布局(EDF-1)、括号平衡表示(BP)及其压缩变体(CEDF、CBP)。引入基于后缀数组与LCP数组的线性时间压缩方法,识别并压缩相同子树。在真实数据集(Web Graphs、Wikidata)和合成数据(随机邻接矩阵)上评估执行时间、磁盘空间和峰值内存使用,覆盖上述线性代数操作。结果表明,深度优先布局在多数情况下优于现有方法:CEDF在压缩率上表现最佳,EDF-1与CEDF持续降低峰值内存;不同布局在不同任务与数据下各有优势。整体证明深度优先布局为 $k^2$-树提供了实用高效的替代方案,显著提升压缩与计算性能。

原文摘要 · Abstract (English)

In this paper, we study static, computation-friendly, lossless compression formats for graphs, focusing on memory locality and operational efficiency of $k^2$-trees. We observe that their traditional level-wise layouts suffer from poor cache performance due to weak locality, especially in operations such as matrix-vector and matrix-matrix operations. To address this limitation, we propose four depth-first representations of $k^2$-trees: a plain depth-first layout (EDF-1), a balanced-parenthesis representation (BP), and their compressed variants (CEDF and CBP). We further introduce a linear-time compression method based on suffix and LCP arrays to identify and compress identical subtrees. We experimentally evaluate the execution time, the disk space, and the peak-memory usage of our approaches against classical level-wise $k^2$-trees and DFUDS-based representations across two real and one synthetic dataset (i.e., Web Graphs, Wikidata, and random adjacency matrices) over the above linear-algebra operations. Results show that our depth-first layouts are competitive and often superior than known approaches: CEDF achieves the best compression in most settings, EDF-1 and CEDF reduce the peak memory usage consistently, and performance varies by workload, with different layouts excelling in different operations and data regimes. Overall, this work demonstrates that depth-first layouts of $k^2$-trees provide a practical and efficient alternative to traditional layouts, improving both compression and computational performance in matrix operations.

图压缩内存优化矩阵运算

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。