acceptodds
Published as a conference paper at NeurIPS 2026

Pattern-Based Matrix Analysis Under Permutations

Andrei Ermakov

Abstract

Low-rank approximation captures one important notion of matrix simplicity: a matrix is simple if it is well described by a low-dimensional linear model. This paper studies a complementary notion. We consider matrices that become structurally simple only after permuting rows and columns, so that their mass concentrates in a prescribed geometric pattern such as a band, block-diagonal, arrowhead, or related form. We introduce a pattern distance that measures how close a matrix is to a given structural mask after optimal reordering, giving a common framework for latent ordering, community detection, and bandwidth minimization. The problem is NP-hard in general; we derive an alternating algorithm based on Linear Assignment subproblems, and establish identifiability of the target structure up to pattern automorphisms. We further introduce a pattern-plus-low-rank decomposition that combines permutation-structured fitting with a low-rank residual; it dominates pure low-rank approximation by feasibility and admits a strict rank separation on planted block-diagonal targets, with broad empirical gains across pattern families. We evaluate the framework on synthetic recovery tasks, real correlation and graph adjacency matrices, and transformer attention heads (GPT-2, Qwen2.5-0.5B and Qwen2.5-7B), showing that a single universal algorithm recovers qualitatively different forms of matrix structure.

Keywords:
Paris

Reviews

Among:
Shape:
123456this paper, Top 8%
Figure 1. Mean review rating of the reviewed papers at NeurIPS 2026. This paper averages 5.00 over 3 reviews, above 92% of the others.
Reviewer_cLXuOpenReview ↗
Rating
5
Clarity
3
Confidence
4
Originality
3
Quality
3
Significance
3
Read review
Summary

This paper studies permutation-structural simplicity as a matrix structure complementary to low-rankness. The authors define a pattern distance that measures how well a matrix can be reordered to match a target binary mask that represent a matrix structure pattern. They further propose an alternating LAP solver, a pattern-plus-low-rank decomposition model, and an adaptive procedure for discovering patterns.

Strengths and weaknesses

Strengths:

  1. The pattern-distance formulation is clean and intuitive. It provides a unified way to describe problems where row and column permutations reveal hidden matrix structure.
  2. The attention-head application is attractive.
  3. Substantial theoretical analysis.

Weaknesses:

  1. The alternating LAP solver is useful, but probably not a major algorithmic novelty. I can see it basically a block coordinate descent over permutations. Additionally, It has high computation cost of O(n^3) and can only guarantee convergence to a coordinate-wise local minimum.
  2. The adaptive pattern-selection method does not truly discover arbitrary patterns, it selects from a predefined vocabulary. I think the density-normalized score is reasonable, but mask density alone does not capture the full complexity of a pattern family.

Update 2026.07.30:

AC has pointed out the contribution type mismatch, and this work should be evaluated under the "Concept and Feasibility" category. My overall positive assessment remains, as I find the proposed notion of permutation-structural simplicity to be an interesting and potentially valuable perspective complementary to traditional low-rank formulations. However, I agree with the AC that the relationship to existing literature requires clearer positioning. My original review focused more on the internal formulation and algorithmic framework, while the broader novelty question depends on how this framework differs from and improves upon established approaches. Stronger comparisons and discussion with these related methods would be important to better assess the scope and impact of the proposed concept.

Update 2026.08.07

The authors' rebuttal has substantially addressed this concern through clearer positioning, stronger specialized baselines and capacity-controlled comparisons, and additional clarifications showing settings in which the general formulation is useful. I am comfortable with an accept recommendation.

Questions

Overall, I think this is a strong paper with a clean formulation and interesting applications. I have no additional questions and suggestions.

Limitations

yes

Paper formatting concerns

I do not notice any major issues in this paper with respect to violation of formatting, anonymity, etc.

Final justification

After considering the author response and the AC discussion, I have revised my assessment of the paper. I continue to find the proposed notion of permutation-structural simplicity interesting and the formulation technically clean. However, I agree with the AC that the current paper does not sufficiently establish the novelty and distinctiveness of the proposed framework relative to substantial prior work, under the "Concept and Feasibility" category. My overall positive assessment remains, therefore, I have adjusted my recommendation accordingly.

1 comment

We thank the reviewer for the positive assessment of our work and for the careful, precise reading of the algorithmic part. We respond to the two points raised in Weaknesses below.

W1. We agree: AltLAP is block coordinate descent over the two permutations, with the specific property that each block subproblem is solved exactly as an LAP, hence monotone descent, finite termination, and, as the reviewer notes, convergence only to a coordinatewise local minimum. We do not claim the solver as the main novelty; the contribution lies in the pattern-based formulation (one solver for all patterns), the identifiability analysis, and the PatLR decomposition. On O(n3)O(n^3) cost: all experiments in the paper (up to n=512n=512) take seconds per instance, and a wall-clock check we ran on planted banded instances gives 41 s at n=4000n=4000 and 4 min at n=8000n=8000 for a single CPU run. Scaling further via approximate LAP steps and related ideas is future work, outlined in our response to Reviewer 8mc6 (Q3).

W2. We agree on both points. The procedure is indeed finite-vocabulary pattern selection, so the structure is identified within the provided vocabulary. We also agree that density normalization is only a first-order correction — two masks of equal density can still differ in how easily arbitrary matrices fit them (e.g. in how many permutations leave the mask invariant). We consider two directions promising for lifting these limitations: estimating mask parameters (e.g. block boundaries) from data within a pattern family instead of enumerating fixed masks, and calibrating each mask's score against its own random-permutation null rather than a density correction; both are future work.

Reviewer_8mc6OpenReview ↗
Rating
5
Clarity
2
Confidence
4
Originality
4
Quality
4
Significance
4
Read review
Summary

This paper introduces a formal matrix-analysis framework. The authors say that a matrix is simple if its entries concentrate into a clean, prescriptive geometric layout (such as a band, block-diagonal, or arrowhead) once its rows and columns are properly reordered.

They define a pattern distance metric (dMd_M) that measures the "off-pattern" Frobenius mass that leaks outside a given template/stencil after optimal row and column sorting. Because finding the exact global permutation of rows & columns is NP-hard, the paper leverages a structural property termed column-separability—showing that freezing one dimension decouples the other into independent subproblems.

The framework is highly modular, separating the target geometry, the error metric, and the optimization engine. This flexibility allows it to serve as a unified formalism for diverse problems such as community detection, latent seriation, and bandwidth minimization. Furthermore, the paper introduces a hybrid decomposition model, PatLR, which splits a matrix into a sharp structural pattern and a smooth low-rank background, bypassing the "blurring" artifacts that occur when standard tools like SVD attempt to fit sharp topological boundaries.

Overall, the paper shows how the framework can be used both as a data science toolkit for solving messy real-world engineering problems, and as a diagnostic tool for auditing black-box AI models.

Strengths and weaknesses

Overall, this is a well-written paper of a well-done research. The approach of permuting rows while keeping columns fixed and then permuting columns keeping rows fixed is valid and converges. I have used the technique in solving some problems in the past and hence can vouch for the method's validity and O(n3)O(n^3) complexity.

The authors have demonstrated that freezing the row permutations completely decouples the column dimensions into independent subproblems, transforming an intractable quadratic assignment bottleneck into a sequence of exact Linear Assignment Problems (LAPs). By alternating between solving row-LAPs and column-LAPs, they construct an O(n3)O(n^3) algorithm that guarantees monotone convergence to a local minimum. This formal mathematical formulation was an enlightening and joyful read.
Quality: The claims are well supported through both theory and analysis. The methods are appropriate. The authors discuss limitations clearly.

Clarity: The paper is well organized. But I would expect the authors to provide a glossary of terms (in the appendix) that they use without definition, to derive the results in the paper (e.g. Fielder vector in Spectral initialization paragraph pg 3). An expert reader who is up to date with the maths can understand the paper but clarity is questionable in general. Demonstrating the algorithm through an example (say 10*10 toy matrix with any template) is highly recommended for the paper's final version. There's a repetition (line 477).

Significance: Because the authors provide a practical, universally applicable O(n3)O(n^3) solver (Alternating LAP) that works for any binary mask without code changes, practitioners are highly likely to adopt this tool. Researchers building on this work can easily extend the vocabulary of patterns or apply the Adaptive PatLR pipeline to new domains, such as biological networks, financial correlation matrices, or deeper interpretability studies of neural architectures.

The paper successfully tackles an inherently NP-hard combinatorial problem: the simultaneous reordering of matrix rows and columns. Instead of relying on rigid, specialized heuristics, the Alternating LAP approach elegantly decouples the row and column permutations, reducing the search to easily solvable Linear Assignment Problems. The empirical results demonstrate that this method clearly outperforms classic baselines like Reverse Cuthill-McKee (RCM) and greedy Fiedler swaps in recovering banded structures. Additionally, the Pattern-plus-Low-Rank (PatLR) decomposition addresses a critical flaw of traditional SVD and Robust PCA—which blur sharp topological boundaries—by provably isolating crisp structural blocks from low-rank background noise.

The application of this framework to the internal attention heads of large language models yields a striking conclusion: disparate AI architectures (GPT-2, Qwen2.5-0.5B, Qwen2.5-7B) naturally organize information using invariant structural routing styles (e.g., local bands, block clusters, and arrowhead hubs) at nearly identical relative network depths.

Originality: The use of a density-normalized score (s~M\tilde{s}_M) combined with simulated annealing for adaptive pattern selection is highly innovative. It allows the algorithm to automatically discover the best geometric blueprint without requiring the user to know what shape is hidden in the data. I find this submission to be a substantial, original, and highly practical contribution that bridges the gap between combinatorial optimization and continuous matrix analysis, offering a robust toolkit that will clearly benefit the broader research community.

Questions
  1. Can you add a toy example demonstrating the method step by step?

  2. The pattern distance (dMd_M) is formulated using the Frobenius norm (an L2L_2 penalty) for the off-pattern mass. While this works beautifully for Gaussian noise, L2L_2 penalties are notoriously sensitive to sparse outliers or heavy-tailed noise distributions. Hence, can you justify your choice of Frobenius norm before using it directly?

  3. The attention head analysis is fascinating, but it is currently limited to a maximum context length of n=512n=512. Given that the Alternating LAP solver scales at O(n3)O(n^3), applying this to modern LLM contexts (e.g., 4k, 8k, or 32k tokens) seems computationally prohibitive. A small experiment or discussion outlining a path to scale this framework to n>1024n > 1024 would drastically improve its practical impact for the AI community.

  4. Adaptive PatLR uses simulated annealing over a fixed dictionary of 9 patterns. What happens when the true underlying structure is a hybrid or novel shape not present in the vocabulary? Does the density-normalized score strongly favor the "closest" mask, or does it default to rejecting all of them? Expanding the discussion on how the framework behaves with out-of-distribution patterns would clarify the limits of the automated discovery loop. It is really important to at least openly discuss this in the final version.

Limitations

Yes. I have a few suggestions that I have included with the questions.

Paper formatting concerns

no concerns.

Final justification

As pointed out by the AC I have reassessed my evaluation to weigh the category mismatch. I have read the other reviews as well as the author's response to my original review. I maintain my original scores as I believe there is room for improvement with respect to clarity of the paper, building a narrative by starting with properly discussing related prior work.

Reviewer_Z2LfOpenReview ↗
Rating
5
Clarity
3
Confidence
3
Originality
3
Quality
3
Significance
2
Read review
Summary

The singular value decomposition of matrix AA can be described as a pair of orthogonal matrices U,VU,V such that U⊤AVU^\top A V has a simple structure: it is a diagonal matrix. But suppose UU and VV are restricted to be permutation matrices, which are a particular kind of orthogonal matrix. (Hereafter UU and VV will denote permutation matrices.) Then in most cases there are no U,VU,V such that U⊤AVU^\top A V is diagonal. But if the goal is being close in Frobenius norm to a diagonal matrix, or if the target structure is broadened from diagonality to, for example, banded, block diagonal, anti-banded, triangular, and so on, then finding the best such permutations becomes a general version of a number of previously studied problems. Here the structure is specified as a mask matrix M∈0,1n×nM\in\\{0,1\\}^{n\times n}, when AA is n×nn\times n; the goal is to make ∣(U⊤AV)⊙M∣F\\|(U^\top A V)\odot M\\|_F, the norm of the Hadamard product, as large as possible.

The classical problem of training a recommender system could be described as finding appropriate rank-kk square projection UkU_k and VkV_k, such that ∣(Uk⊤AVk)⊙M∣F\\|(U_k^\top A V_k)\odot M\\|_F is maximized, where MM is the mask with nonzeros where entries of AA are known. A standard training technique is to repeatedly fix UkU_k, and maximize with respect to VkV_k, and then fix VkV_k, and max with respect to UkU_k. In this paper an algorithm altLAP is proposed that similarly applies alternating maximization to find good U,VU,V; the maximization problem with one matrix fixed can be readily reduced to a linear assignment problem (LAP).

In this formulation, only a particular block diagonal matrix structure can be specified. However, the paper also considers the broader pattern discovery problem where optimal UU, VV, and MiM_i within a family M1,M2,…,MK\\{M_1,M_2,\ldots,M_K\\} are sought. An algorithm Adaptive PatLR is proposed that applies altLAP to candidates MiM_i picked using uniform random selection, and updating the current best candidate with a trial candidate under an annealing random decision.

Also considered is the problem of finding U,VU,V and rank-kk XX such that U⊤AV−XU^\top AV-X is as small as possible outside the mask, that is, the masked entries contribute zero to the loss. This could be expressed as finding also SS such that S⊙M=SS\odot M=S and with loss ∣U⊤AV−X−S∣F\\| U^\top AV-X - S \\|_F is as small as possible. An iterative algorithm PatLR is proposed, optimizing U,V,X,SU,V,X,S, alternating among these, again applying altLAP to find U,VU,V for given S,XS,X. Here for fixed U,VU,V and XX, the optimal SS is simply (U⊤AV−X)⊙M(U^\top AV-X)\odot M, so as noted, the masked entries contribute zero to the loss.

The paper gives some basic theoretical results, and evaluates the algorithms experimentally in a number of settings of matrices and masks. This includes comparison of altLAP against Reverse Cuthill-McKee (RCM) for band matrix masks; PatLR and Adaptive PatLR against SVD and robust PCA for "community" matrices (e.g., Karate Club) and others; and adaptive pattern-selection, via density-normalized pattern-distance scoring over a fixed mask vocabulary, to transformer attention matrices. In the latter, notably patterns relevant to the "attention sink" phenomenon are found.

Strengths and weaknesses

The formulation of a general matrix permutation problem subsuming several known such problems, and then attacking it with an effective algorithm, is a novel idea, and the main appeal here. This is true even while the theoretical contributions and the proposed algorithms involved are not surprising. NB: they were clearly stated. A few possible correctness issues: the NP-hardness proof appears to use the symmetric restriction σ=π\sigma=\pi and then infer hardness for the unrestricted row/column problem; this implication is not immediate. The “fixed width w≥1w\ge 1” statement for banded masks also seems stronger than what the standard bandwidth reduction directly gives. Finally, the finite-termination claim for PatLR' is less clear than monotone descent, since the low-rank variable is continuous.

A difficulty here is that one might compare the general algorithm with specialized algorithms for any given special case; when does the unified view actually help?

The adaptive pattern-selection setting of Adaptive PatLR is useful, but it is limited by the fixed finite vocabulary of masks. For example, arbitrary block sizes are not discovered unless the corresponding masks are explicitly included. Thus claims about discovering block-diagonal or community structure should be interpreted as discovery within the provided vocabulary rather than unconstrained structural discovery.

The experimental results are interesting, and show the strength of the approach, although the discussion in the main body of the submission was packed enough that it was a bit hard to understand, particularly the part discussing attention. (And while I suppose the meaning of mask block_k4 or banded_w2 is not hard to figure out, a definition would still be helpful. And generally, double checking that terms are defined before use is always good.)

More substantively, I'm not sure that RCM is the best current bandwidth minimizer (I see there is "Gibbs-Poole-Stockmeyer"), and anyway, its main role seems to be to reduce fill-in of Gaussian elimination, a problem outside the paper's scope. Another issue is that RCM is surely much faster than altLAP, which is cubic time in general, and likely much slower even with careful exploitation of sparsity. The comparison doesn't seem entirely "apples to apples".

The comparison of PatLR to SVD or robust PCA is somewhat tricky. Although the reported DQ/EV metrics use full reconstruction error, the PatLR fitting objective allows the pattern-supported component SS to absorb all in-mask residuals exactly. Thus PatLR has substantially more effective capacity than a rank-kk SVD/RPCA model, especially for dense masks. A comparison controlling for parameter count, mask density, or compression cost would make the empirical advantage easier to interpret. Here again, something more clearly "apples to apples" would be helpful.

Applying adaptive pattern-selection to get a better understanding of attention seems very interesting; I wonder if significant permutations were needed to discover the arrowhead pattern. That is, if the input matrix doesn't need permuting to have the arrowhead pattern, the approach seems a bit overpowered for the application.

Questions

My understanding of the weaknesses of the paper, as given in that section, either imply that more clarity of exposition would be helpful (if it's just my misunderstanding), or that indeed further study is needed. Is there a way to detect and exploit a more general block diagonal structure? Is RCM the right benchmark? Is "structured + low-rank" as useful as "low-rank"? Do the proposed algorithms scale for large problems well enough (that cubic time!), relative to specialized algorithms? Do we need the full power of the permutation approach to see arrowhead structure?

Here are some wording issues found by the LLM. To be clear: they are just included to be helpful; I don't feel it necessary to address them during the response period.

Clear typos / grammar

  • p.6, line 190:
    “...dominates all baselines on every pattern. the three lower-DQ cases...”
    → “The three lower-DQ cases...”

  • p.8, line 245:
    “asymmetric (π,σ)(\pi,\sigma)setting”
    → “asymmetric (π,σ)(\pi,\sigma) setting”

  • p.15, lines 477–478:
    “Denser patterns ... tolerate higher noise before recovery fails; denser patterns tolerate more noise...”
    → Repetitive. Delete one clause.

  • p.18, lines 532–533:
    “...the mean EV gap ... is 0.011, 26/29 cells stay...”
    → Comma splice. Use semicolon or split sentence.

  • p.13, line 378:
    “with M=InM = In”
    → should be M=InM=I_n.

Wording / clarity

  • p.5, Eq. (8) and Appendix Definition 2:
    The density-normalized score is easy to misread. The text says “superlinear denominator,” so the equation should clearly show

    \frac{d_M(A;\pi,\sigma)} {\|A\|_F^2(1-\rho_M)^{3/2}}.$$
  • p.6, line 196:
    “matches Oracle PatLR in DQ to within 94.9%”
    → Awkward. Better: “achieves at least 94.9% of Oracle PatLR’s DQ” or “matches Oracle PatLR with a minimum ratio of 94.9%.”

  • p.7, line 213:
    “CIs of width ±0.5%”
    → “half-width ±0.5 percentage points” or simply “95% bootstrap CIs of ±0.5 percentage points.”

  • p.8, line 229:
    “which is direct evidence...”
    → This is a bit strong. Consider “which suggests” or “which provides evidence.”

  • p.20, line 569:
    “recognised”
    → Use “recognized” if the paper is otherwise using American English.

Consistency issues

  • Model naming varies:

    • “Qwen0.5B and Qwen7B”
    • “Qwen2.5-0.5B”
    • “Qwen-0.5B”
    • “Qwen-7B”

    Suggest standardizing to Qwen2.5-0.5B and Qwen2.5-7B throughout.

  • Algorithm/name capitalization varies:

    • “PATLR”
    • “PatLR”
    • “Adaptive PATLR”
    • “Adaptive PatLR”

    Pick one convention, probably PatLR and Adaptive PatLR.

  • Pattern names vary:

    • block_k2
    • “block-k2”
    • “Block k=2”
    • block_band_k3w2

    It would help to define the naming convention once and use it consistently.

  • “HuggingFace” should usually be Hugging Face.

  • “sklearn datasets” is informal; use scikit-learn datasets.

Possibly misleading wording

  • Table 2: Some entries such as Monge and Robinson are not simple binary support masks in the same sense as Definition 1. The table may need wording to clarify whether these are literal masks or related pattern/ordering constraints.

  • Conclusion, line 262:
    “outperforms SVD/NMF/RPCA” — NMF appears mainly in the appendix, not the main experimental narrative. This is okay if intentional, but worth checking consistency with the main claims.

Overall, the writing is generally clear, but the paper would benefit from a pass focused on notation/name consistency and overcompressed experimental wording, especially in the attention section.

Limitations

Yes

Paper formatting concerns

None

Final justification

Update 2026.07.30:

AC has pointed out the contribution type mismatch, and this work should be evaluated under the "Concept and Feasibility" category. (If a reviewer is not to make their own judgment of the contribution type, why is it something for the reviewer to select? I have changed my selection to match the authors.) As such, my question "when does the unified view actually help?" rises in significance, although it is also true that a general technique that is "good enough" for a broad range of applications might be valuable even if its performance can be beaten for any given application by a specialized technique. Relatedly and more significant for a revised evaluation is that the contribution type is to be something that is "highly novel, high potential reward". I can't see the submission as such a contribution: novel, good potential reward would be it.

Update 2026.08.03: The improvements and discussions lead me to raise my score.

Comments on the paper

1 comment
Meta-review

This paper introduces a unified framework for "permutation-structural simplicity": a matrix is simple if reordering its rows and columns concentrates its mass onto a target binary mask (band, block-diagonal, arrowhead, etc.). It formalizes an off-pattern distance, reduces the one-sided problem to a linear assignment problem, and builds an alternating solver (altLAP), a pattern-plus-low-rank decomposition (PatLR), and an adaptive pattern-selection procedure. The reviewers unanimously recommend acceptance, praising the clean formulation, the sound and convergent alternating-LAP machinery, and the compelling attention-head application, which recovers consistent structural "routing styles" across GPT-2 and Qwen2.5.

My initial recommendation was reject, on one major concern: the central object is heavily studied, and the paper could not be assessed without explicit comparison to the QAP/graph-matching, seriation, block-model, and Birkhoff-polytope literatures. The rebuttal resolved this. The authors give precise correspondences to these areas, claim novelty only for the arbitrary-mask formulation, PatLR, the identifiability result, and the attention application, and corrected the hardness theorem and the altLAP description. They added strong specialized baselines (convex seriation, GPS, QAP-FAQ, RPCA, spectral co-clustering, and — following further discussion — Bethe–Hessian, non-backtracking, regularized spectral, and Leiden at the SBM detectability scale) with matched parameter and mask-density controls. Critically, they demonstrated regimes where the general solver helps, scored by the baselines' own metrics: latent-order recovery, capacity-controlled decomposition (with a random-mask control isolating structural alignment from capacity), composite targets no single specialist handles, and a refinement mode over a specialist pipeline. Their candid account of the SBM crossover below detectability their criterion is correctly not competitive with belief-propagation methods, above it it matches or beats the panel thus strengthening the contribution.

Evaluated under its "Concept and Feasibility" type, the paper offers a novel, general formulation with clear feasibility evidence, and the reviewers converged toward acceptance after the rebuttal. I recommend acceptance. For camera-ready, the authors should include the related-work correspondence table and full baseline pass, the corrected hardness/convergence statements, an explicit O(n³) scalability limitation, and the promised clarity fixes. The citation checker flagged 0/19 references.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.