arXiv:2610.29114cs.LGOct 2026

Manuscript Offprint

arXiv:2610.29114

MHeatmap: Two-Walk Laplacian Reordering and Mosaic Layout for Rectangular Matrix Visualization

Juntang Wang, Sheng'en Li, Liming Zhu, Yihan Wang, Siyuan Cao, Hao Wu, Man Zhang, Shixin Xu, Dongmian Zou

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Juntang Wang

Harvard University

Cambridge, USA

juntangwang@g.harvard.edu

Yihan Wang

Duke University

Durham, USA

yihan.wang@dukekunshan.edu.cn

Man Zhang

Westlake University

Hangzhou, China

man.zhang@westlake.edu.cn

Sheng'en Li

Duke Kunshan University

Kunshan, China

Siyuan Cao

Duke Kunshan University

Kunshan, China

siyuan.cao@dukekunshan.edu.cn

Shixin Xu

Duke Kunshan University

Kunshan, China

shixin.xu@duke.edu

Liming Zhu

Duke Kunshan University

Kunshan, China

liming.zhu@dukekunshan.edu.cn

Hao Wu

Duke Kunshan University

Kunshan, China

hw412@duke.edu

Dongmian Zou ∗^{*}

Duke Kunshan University

Kunshan, China

dongmian.zou@duke.edu

Abstract

Weighted rectangular matrices record relations between two types of objects, such as occupations and industries, documents and terms, origins and destinations, or annotated classes and computed clusters. Their heatmaps become difficult to read when arbitrary row and column orders scatter related objects, while equal size cells hide large differences in row and column totals. We present MHEATMAP (MOSAIC HEATMAP), which addresses these problems in two stages. Two-WALK spectral seriation first represents the matrix as a weighted bipartite graph. Ordinary bipartite ordering uses only observed row to column links. Two-WALK also uses length-two walks, so rows that share columns and columns that share rows receive explicit similarity links. Sorting a Fiedler vector of the resulting graph Laplacian gives coordinated row and column orders. The MOSAIC layout then partitions a unit square so that row height is proportional to the row total and column width is proportional to the column total, while color represents the observed entry. We prove how the Two-WALK energy combines direct alignment with shared-neighbor smoothness, derive an exact matrix vector product that permits sparse computation, and formalize the tiling and area semantics of MOSAIC. Across 300 synthetic matrices and seven real data sets, Two-WALK obtains the lowest normalized 2-SUM in all 15 synthetic regimes and the highest Band@10% in 14. The largest gains occur when shared neighborhoods express the latent relational structure.

Keywords

matrix visualization, matrix reordering, spectral reordering, mosaic heatmap, visual pattern recovery, bipartite graphs, marginal distribution

References (19)