Pairwise KAN Matrix (PKAN)
- PKAN is a matrix-based tool for quantifying and visualizing nonlinear associations between variable pairs using learnable, spline-based mappings derived from Kolmogorov–Arnold theory.
- It computes a normalized association strength score and extracts explicit functional forms via a streamlined, single-layer KAN approach for each input–target pair.
- PKAN overcomes the limitations of linear and mutual information measures by revealing asymmetric, explicit nonlinear relationships for better feature selection and model interpretation.
The Pairwise KAN Matrix (PKAN) is a matrix-based tool for quantifying and visualizing nonlinear associations between ordered pairs of variables in a dataset. Derived from the theoretical foundations of the Kolmogorov–Arnold representation theorem and implemented using the Kolmogorov–Arnold Network (KAN) architecture, PKAN provides a color-coded summary of both the strength and the explicit functional form of each pairwise relationship, thereby addressing the limitations of classical linear and information-theoretic association measures (Fuente et al., 12 Dec 2025).
1. Theoretical Foundation
PKAN is grounded in the Kolmogorov–Arnold representation theorem, which asserts that any continuous multivariate function can be written as a finite superposition of continuous univariate functions:
where and are continuous functions. The KAN architecture provides a parametric, learnable analogue to these and functions, typically using spline-based single-layer neural networks and training via standard prediction losses such as mean squared error.
PKAN specifically utilizes a simplified KAN, omitting the outer layer and learning only a single univariate mapping for each input–target pair. The learned mapping characterizes the predictive relationship and the form of nonlinearity between and .
2. Formal Definition
Given a set of 0 variables 1, PKAN constructs an 2 matrix where each entry 3 encodes the fit of a single-input single-output network predicting 4 from 5:
6
Two outputs are obtained from each fit:
- Functional form: The learned univariate 7, representing the explicit relationship.
- Association strength: A normalized scalar 8 quantifying the degree to which 9 predicts 0.
Strength calculation involves:
- Computing prediction loss 1 (e.g., MSE) on held-out data.
- Converting 2 to a predictive strength score using the Nash–Sutcliffe Efficiency (NSE) or similar:
3
- Estimating the KAN attribute score 4 as the ratio of standard deviation of activation through 5 to the total at the node.
- Calculating raw strength 6.
- Rescaling 7 for all pairs to 8:
9
with 0 for diagonal elements.
3. Algorithmic Construction
PKAN computation follows these steps:
- Preprocessing: Optionally normalize each variable to 1.
- Model fitting: For each ordered pair 2 with 3, fit a univariate KAN mapping 4 via mean squared error minimization.
- Output computation:
- Evaluate 5 on held-out data.
- Compute 6 as per Liu et al.
- Obtain 7.
- Normalization: Transform 8 to 9 as above.
- Storage: Record 0 and the learned curve 1 (sampled over a grid) for visualization.
The diagonal 2 is set to 3 and the identity function is stored for reference.
Algorithm Pseudocode (from (Fuente et al., 12 Dec 2025))
| Step | Operation | Output |
|---|---|---|
| Preprocess | Normalize 4 (optional) | Normalized variables |
| KAN Fit | Train 5 for 6 | Parameters 7 |
| Evaluate | Compute 8 | Raw strength 9 |
| Normalize | Convert 0 to 1 | PKAN matrix 2 |
| Visualize | Store 3 curves | Heatmap overlay |
4. Visualization and Interpretation
PKAN is rendered as an 4 color-coded matrix:
- Rows 5: target variables 6
- Columns 7: input variables 8
- Cell 9: color encodes 0 (white for 1, dark red for 2); a curve is overlaid to show 3
Interpreting a cell:
- Color intensity (magnitude) indicates how strongly 4 alone predicts 5
- Curve shape (form) reveals monotonicity, nonlinearity, symmetry, or injectivity
- Directional asymmetry is manifest as 6 except for mutually injective mappings
5. Comparative Evaluation with Classical Metrics
PKAN provides a richer characterization compared to standard association measures:
- Pearson correlation 7: Captures only linear, symmetric dependence; fails for nonlinear monotonic relationships (e.g., 8 on symmetric domains with 9).
- Mutual information 0: Detects nonlinearity and is symmetric, but unable to represent directionality or explicit function shape, and becomes computationally challenging as 1 increases.
- PKAN: Encodes strength (asymmetrically), explicit function form, and directionality. It remains robust to collinearity by isolating each predictor.
Empirical demonstrations include:
- Quadratic/cubic: PKAN captures 2, 3 accurately in strength and learned curve; Pearson and MI miss essential features.
- Heteroscedastic noise: PKAN scores track Pearson but with curve shape reflecting the true underlying relation.
- Lagged sinusoids: PKAN recognizes cyclic structure and directionality, which Pearson and MI cannot fully recover.
PKAN thus provides both an interpretable score of association and direct visualization of the relationship, serving as a tool for pre-processing (feature selection, redundancy analysis), post-processing (model explanation), and discovery of physical patterning in data (Fuente et al., 12 Dec 2025).
6. Applications and Broader Significance
PKAN supports multiple stages in the model development workflow:
- Exploratory data analysis: Rapid assessment of all pairwise relationships in high-dimensional data.
- Feature selection and redundancy analysis: Identification of inputs with non-trivial, possibly nonlinear predictive value.
- Physical insight: Visualization of explicit functional forms to guide scientific hypothesis formation.
- Model explanation: Post hoc interrogation of black-box models via analogous association patterns.
Case studies, such as analysis on the CAMELS hydrology dataset and large-eddy simulations of river flow, corroborate the robustness, informativeness, and interpretability advantages of PKAN over prior approaches (Fuente et al., 12 Dec 2025).
Plausible implications: The combined strength-and-form rendering aids in domain-informed modeling and hypothesis-driven discovery, particularly under high-dimensional and collinear regimes where conventional statistics may obscure essential structure.