Papers
Topics
Authors
Recent
Search
2000 character limit reached

Matrix-Driven Instant Review (MDIR)

Updated 3 July 2026
  • Matrix-Driven Instant Review (MDIR) is a methodology that infers explicit weight relationships between LLM parameters to identify plagiarism, weight reuse, or derivative model construction.
  • It employs matrix-level operations such as orthogonal decomposition and permutation alignment along with large deviation theory to compute rigorous p-value estimates.
  • MDIR achieves high sensitivity and specificity in detecting neural network weight correspondences while operating efficiently on commodity CPU hardware.

Matrix-Driven Instant Review (MDIR) is a methodology for detecting and reconstructing weight correspondences between LLM parameter sets to identify plagiarism, weight reuse, or derivative model construction. MDIR enables statistically robust, efficient detection of intentional or obfuscated reuse of neural network weights by leveraging matrix analysis and Large Deviation Theory, and delivers rigorous pp-value estimates of similarity. It operates directly on matrix weights without relying on forward inference, achieving both high sensitivity and specificity while reconstructing exact linear transformations (including permutations, orthogonal transforms, scalings, and noise) mapping one model’s weights to another. The method is designed to run within an hour on a commodity CPU-only PC for models with weight matrices of order n2×104n \approx 2 \times 10^4 (Zhang, 8 Aug 2025).

1. Conceptual Framework and Goals

MDIR addresses the detection of LLM plagiarism, specifically situations where model B’s parameters θB\theta_B are derived—partially or fully—by reusing those of model A (θA\theta_A). Scenarios of interest include direct copying, upcycling (subtle modifications to weights, e.g., continual pretraining, pruning, or permutations), and architectural adaptation. The main objectives are:

  • To infer whether θB\theta_B is related to θA\theta_A by explicit weight relationships.
  • To reconstruct the explicit linear mappings—permutations, orthogonal transforms, scalings, or additive noise—that best relate the two parameter sets.
  • To provide rigorous statistical significance quantification (via pp-value estimation) underpinning each detection, minimizing false positives, especially in the presence of similar training data or architectural constraints.
  • To obviate the need for full model inference or dataset access, contrasting with earlier approaches (Zhang, 8 Aug 2025).

2. Matrix-Analysis Methodology

The MDIR pipeline operates at the matrix level, systematically comparing major weight blocks within deep neural architectures:

  • Embedding matrices: ERV×dE \in \mathbb{R}^{V \times d} and ERV×dE' \in \mathbb{R}^{V' \times d}.
  • Attention layers: For each layer ll, matrices n2×104n \approx 2 \times 10^40 (and n2×104n \approx 2 \times 10^41 analogously).
  • MLP weights: Gate, Up, and Down matrices, each n2×104n \approx 2 \times 10^42.

Orthogonal (Polar) Decomposition

For any matrix n2×104n \approx 2 \times 10^43 with SVD n2×104n \approx 2 \times 10^44, the “orthogonal part” is defined as:

n2×104n \approx 2 \times 10^45

This orthogonal factor maximizes the trace inner product n2×104n \approx 2 \times 10^46 over all n2×104n \approx 2 \times 10^47 orthogonal (n2×104n \approx 2 \times 10^48).

Permutation Alignment

Given n2×104n \approx 2 \times 10^49, the algorithm seeks the permutation θB\theta_B0 maximizing the Frobenius inner product:

θB\theta_B1

This is equivalent to minimizing the Frobenius norm θB\theta_B2, assessing direct congruence modulo permutation. This process generalizes to any pair of square blocks, with corresponding similarity scores θB\theta_B3.

3. Statistical Significance via Large Deviation Theory

MDIR employs a rigorous Large Deviation Principle (LDP) for θB\theta_B4-value calculation, instrumental in distinguishing genuine structural matches from coincidental similarity due to data or initialization.

  • Null Model: When θB\theta_B5 and θB\theta_B6 are unrelated, θB\theta_B7 is Haar-uniform on the orthogonal group θB\theta_B8. For a fixed permutation θB\theta_B9,

θA\theta_A0

  • Union Bound: Since the optimal permutation is selected over θA\theta_A1 options,

θA\theta_A2

  • Asymptotic Rate Function: For θA\theta_A3, θA\theta_A4, and θA\theta_A5 Haar in θA\theta_A6,

θA\theta_A7

Hence,

θA\theta_A8

  • p-Value Estimator:

θA\theta_A9

or, compactly for θB\theta_B0, θB\theta_B1,

θB\theta_B2

This formalism ensures that only correspondences far beyond random coincidence result in low θB\theta_B3-values, providing a strong statistical basis for detection.

4. Detection and Reconstruction Pipeline

The MDIR algorithm is as follows:

  1. Matrix extraction: Retrieve target embedding matrices θB\theta_B4 and θB\theta_B5.
  2. Orthogonal alignment: Compute θB\theta_B6.
  3. Permutation search: Calculate optimal permutation θB\theta_B7 using the Hungarian algorithm (θB\theta_B8 complexity).
  4. Statistical check: Compute θB\theta_B9, estimate θA\theta_A0 as above.
  5. Decision rule:
    • If θA\theta_A1 (default θA\theta_A2), accept θA\theta_A3 as the global match and flag the pair as related.
    • Otherwise, retain θA\theta_A4.
  6. Component-wise mapping:
    • Attention layers: For each θA\theta_A5, compute inner transform for θA\theta_A6 (θA\theta_A7) and analogously for θA\theta_A8.
    • MLP blocks: Compute θA\theta_A9 (optionally aggregating Gate, Up, Down), with its own pp0-value.
  7. Outputs: Flag (0/1), global transformation pp1, per-block transforms pp2, and MLP permutation pp3.

The Hungarian method at pp4 requires pp5 operations, typically requiring pp6 hour of CPU time, with moderate memory (pp73GB for several square matrices). SVD and polar decomposition steps are pp8 (Zhang, 8 Aug 2025).

5. Empirical Validation and Comparative Assessment

Experimental Regimes

MDIR's efficacy is demonstrated across a spectrum of LLM modification scenarios:

Level Model Families Tested Transformation Type
Level 1 Qwen2.5-0.5B, Llama-3.1-8B Fine-tuning
Level 2 Qwen2-7B → Qwen2.5-7B Heavy continual pretraining
Level 3 Llama-3.1-8B → Llama-3.2-{1B,3B} Pruning and retraining
Level 4 RWKV variants Architectural changes
Level 5 Pangu-Pro-MoE vs Qwen2.5-14B MoE upscaling, obfuscation

Key Results

  • True positives: All plagiarized pairs were detected with pp9.
  • False positives: None among unrelated pairs; all had ERV×dE \in \mathbb{R}^{V \times d}0.
  • Ablation: MDIR only flags models with shared seed (true sharing), not those with overlapping data only.
  • Comparison: Competing methods (REEF, CKA) showed false positives based on feature similarity, while MDIR maintained specificity.
  • Visualization: Permutation matrices for true positives displayed near-perfect alignment in heatmaps (red/white).
  • Efficiency: Full detection and reconstruction was achieved within the stated hardware/runtime constraints.

6. Limitations and Prospective Directions

Several assumptions and limitations are explicit:

  • Polar decomposition is ill-posed for low-rank or reduced-precision matrices (e.g., fp16/bf16).
  • In extreme ERV×dE \in \mathbb{R}^{V \times d}1-value regimes (ERV×dE \in \mathbb{R}^{V \times d}2 to ERV×dE \in \mathbb{R}^{V \times d}3), numerical inaccuracies (up to 1%) can decrease ERV×dE \in \mathbb{R}^{V \times d}4 and inflate ERV×dE \in \mathbb{R}^{V \times d}5.
  • For semi-orthogonal/pruned weight blocks (ERV×dE \in \mathbb{R}^{V \times d}6), tight LDP bounds are not available, so ERV×dE \in \mathbb{R}^{V \times d}7 may be overestimated.

Potential extensions proposed include:

  • Developing rigorous LDP bounds for partial isometries and Stiefel manifolds.
  • Enhancing resistance to deliberate evasion strategies, such as noise injection and large learning rate retraining.
  • Implementing GPU-accelerated or approximate matching algorithms (Hungarian) to efficiently scale to ERV×dE \in \mathbb{R}^{V \times d}8 (Zhang, 8 Aug 2025).

7. Context and Significance

MDIR addresses critical gaps in intellectual property verification for LLMs. Its ability to disentangle true weight reuse from feature similarity is distinguished by both methodological rigor and robust statistical interpretation. By reconstructing the precise weight correspondences and quantifying statistical significance, MDIR supports transparent auditing in an era of increasingly complex and obfuscated LLM derivations. The avoidance of model inference and limited resource requirements make the approach broadly accessible and practical for academic, industrial, and legal applications. The proposed areas for extension indicate a path toward further applicability and resilience of MDIR protocols for future large-scale neural models (Zhang, 8 Aug 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Matrix-Driven Instant Review (MDIR).