Home / Writing / KAN re-basin

Permutation Re-Basin for B-Spline KANs

Two Kolmogorov-Arnold Networks trained from different seeds look nothing alike in weight space. Once their hidden units are matched, are they in the same basin?

neuralnets · 25 November 2026 · 13 min read

Test loss along the straight line between two networks trained from different seeds, averaged over 15 pairs. MNIST, width 64.

Hover or tap the chart to read values.

α = 0 is the first network, α = 1 the second. The dashed line joins their losses. The height of each curve above that line is the loss barrier. Matching hidden units before interpolating flattens the hump.

See the results How it works

Results at a glance

92.1%
barrier removed
by activation matching, width-128 KAN
56 → 93%
midpoint accuracy
naive average vs aligned, width 64
0.117%
worst endpoint change
from sharing spline grids

Every cell uses six independently trained networks and all 15 pairs between them. Intervals resample networks, not pairs. Small models, simple datasets: read the scope in Limitations.

Train the same network twice from different random seeds and you get two models that perform equally well but sit far apart in parameter space. Walk in a straight line from one to the other and the loss usually shoots up in the middle. For ordinary networks, a lot of that hump turns out to be an illusion: the two models learned similar features, just in a different order. Reorder one to match the other and the straight path often becomes nearly flat.

This project asks whether that holds for Kolmogorov-Arnold Networks, a newer architecture that learns a whole function on every edge instead of a single weight. KANs have the same kind of hidden-unit symmetry as ordinary networks, but they add something MLPs don't have: a grid of spline knots that can adapt to the data during training. That raises a question with no obvious answer from the MLP literature. Can two KANs be merged when they don't even describe their functions in the same basis?

1The problem

1.1Barriers and the permutation story

Independently trained networks can be joined by low-loss curved paths, but straight lines between them usually cross a region of high loss.[1][2] When the straight line stays low, the two models are said to be linearly mode connected.[3]

Part of the reason straight lines fail is symmetry. Swap two hidden neurons in a layer, swap the matching weights in the next layer, and the network computes exactly the same thing at a different point in parameter space. A network with 64 hidden units has 64! equivalent arrangements per layer. Entezari and colleagues conjectured that most interpolation barriers are artefacts of picking the wrong arrangement.[4] Ainsworth, Hayase and Srinivasa made this constructive with Git Re-Basin: find the permutation that lines up one model's units with the other's, then interpolate. For wide enough MLPs and CNNs, the barrier nearly disappears.[5]

1.2What changes in a KAN

A Kolmogorov-Arnold Network replaces each scalar weight with a learnable one-dimensional function.[6] In the B-spline variant used here, every edge computes a fixed smooth base term plus a spline: a weighted sum of bump-shaped basis functions placed on a grid of knots. A node simply adds up its incoming edge functions.

Hidden units in a KAN can still be permuted without changing the function, and recent work has used exactly that symmetry to build learners over KAN weights.[7] But two things make KANs a distinct test of the re-basin story:

1.3Four questions

We fixed four hypotheses before running the main experiments:

  1. Naive barrier. Linear interpolation between independently trained KANs has a large loss barrier.
  2. Alignment. Matching hidden units shrinks that barrier, and the reduction improves with width, as it does for MLPs.
  3. Grids. For adaptive-grid KANs, putting both models on a shared grid before interpolating lowers the barrier further.
  4. KAN vs MLP. Aligned KANs have lower barriers than comparable MLPs, perhaps because spline coefficients enter the output linearly.

A time-bounded literature search found Git Re-Basin, work on KAN permutation symmetry, permutation-equivariant KANs,[8] and KAN parameter averaging during concurrent training,[9] but no study of independent-seed linear mode connectivity in spline KANs with alignment and grid harmonization together. That is evidence of a narrow gap, not proof that nobody has tried.

2Methodology

2.1Models and data

All KANs have two hidden layers, no biases and no normalisation. Each edge has a SiLU base term and a cubic B-spline with 5 grid intervals, following the parameter layout of the widely used efficient-kan implementation.[10] We trained them on three tasks:

Images are flattened to 784 inputs. Classifiers were trained for 20 epochs with Adam at learning rate 10⁻³. Every model was trained in full precision on a single laptop GPU, with a CPU fallback after the GPU failed partway through the study.

2.2Permuting a KAN correctly

Reordering hidden units in a KAN means reordering the rows of one layer's base weights, spline coefficients and spline scales, and the matching columns of the next layer. There is one more piece that is easy to miss: the next layer keeps one knot grid per input feature, so its grid rows must be reordered too.

Fixed grids

Every feature shares the same uniform grid. Forgetting to move the grid rows changes nothing, so a buggy permutation looks correct.

Adaptive grids

Each feature has its own knots. A permutation that moves the coefficients but not the grid silently attaches them to the wrong basis and changes the function.

Figure 1. Why the grid row matters. We test that a permutation leaves the network's outputs unchanged, on both kinds of grid.

2.3Three ways to match units

Every method produces a one-to-one assignment between the hidden units of model B and model A, solved exactly with the Hungarian algorithm.[13]

2.4Putting two KANs on one grid

The adaptive-grid study uses width-64 KANs with 3 grid intervals, whose knots are moved to follow the data after epochs 1, 5 and 10. For these models, we need both networks to use the same basis before their coefficients can be meaningfully averaged. Our method does this in three steps:

  1. Match units first. After permutation, corresponding features line up, so it makes sense to compare their grids.
  2. Take the union of the knots. For each feature, merge the two knot vectors into one sorted list. A spline on either original grid can be written exactly on this finer grid.
  3. Refit and check. Re-express both models on the shared grid by least squares, then accept the pair only if both models' train and test losses change by less than 0.5%.

We compared this against the naive alternative: average the two knot vectors and the two coefficient vectors directly. We also tried a simpler shared uniform grid early on and dropped it before any results were recorded, because it changed one trained model's loss by 92.8%.

2.5Measuring the barrier

Given two aligned models with parameters θA and θB, we evaluate 25 evenly spaced points on the straight line between them, on the full train and test sets. The loss barrier is the largest amount by which the path rises above a straight line drawn between the two endpoint losses:

B = maxα [ L(θ(α)) − (1 − α) LA − α LB ],   θ(α) = (1 − α) θA + α θB

A barrier of zero means the two models are linearly connected. For classification, the loss is cross-entropy; a barrier of 1.0 is roughly ten times a trained model's loss.

2.6Statistics and baselines

Each configuration has six independently trained networks, giving all 15 pairs between them. Those pairs are not independent, since each network appears in five of them. So our 95% intervals resample networks and rebuild the pair statistic, rather than resampling pairs as if they were separate experiments.[14] A leave-one-network-out check is reported alongside. Comparisons between alignment methods are paired on the same two networks.

To see what is specific to KANs, every KAN result is compared with two MLP baselines, both with ReLU and biases:

As a sanity check that the pipeline reproduces the known MLP result, we also ran a width-512 MLP on MNIST. Weight matching cut its barrier from 0.608 to 0.0034, in line with Git Re-Basin. Metric definitions, the uncertainty procedure and the hypotheses were fixed in writing before the main results were inspected; changes along the way were logged with a reason.

3Results

3.1Naive interpolation fails everywhere

TaskWidthNaive barrierMidpoint accuracy
MNIST321.477[1.261, 1.744]44.4%
MNIST641.096[0.946, 1.263]56.4%
MNIST1280.721[0.642, 0.819]74.6%
Fashion-MNIST640.952[0.881, 1.057]56.4%
Regression643.074[2.825, 3.296]—
Table 1. Fixed-grid KANs, no alignment. Test-loss barrier with 95% interval over networks. Midpoint accuracy is the accuracy of the model halfway along the path; the endpoints themselves score 96.3–97.8% on MNIST and 88.6% on Fashion-MNIST.

Hypothesis 1 is supported. Averaging two good KANs gives a bad one. At width 64, the halfway model gets just over half of MNIST right. Wider models have smaller barriers, as with MLPs, but even at width 128 the barrier is several times the endpoint loss.

3.2Alignment removes most of the barrier

MNIST KAN test-loss barrier by width (log scale)

  • No alignment
  • Weight matching
  • Activation matching
Figure 2. Mean barrier over 15 pairs at each width. The vertical axis is logarithmic, so equal gaps mean equal ratios. The gap between no alignment and activation matching widens from 5× at width 32 to 13× at width 128.
WidthNoneWeightActivationBarrier removed
321.4770.5620.29580.0%[73.2, 86.4]
641.0960.3590.12688.5%[84.8, 90.8]
1280.7210.2380.05792.1%[90.7, 93.2]
64 · F-MNIST0.9520.1990.13186.3%
Table 2. Test-loss barrier for fixed-grid KANs. "Barrier removed" is for activation matching, with a paired 95% interval. Every interval excludes zero.

Hypothesis 2 is supported over the widths we tested. Both matching methods help a lot, activation matching most. The reduction grows steadily with width: at width 128 the aligned barrier is 0.057, with an interval of [0.051, 0.066]. Fashion-MNIST shows the same pattern. Whether the trend continues to a true zero barrier at larger widths is not something three widths can tell us.

3.3Activation beats weights, and the KAN-specific matcher loses

In Git Re-Basin, weight matching works well for MLPs. For KANs it was consistently second. At width 64 on MNIST, it left a barrier of 0.359, nearly three times activation matching's 0.126. One plausible reason: a KAN unit's parameters are spread across a base weight and several spline coefficients per edge, and two units can compute similar functions with quite different coefficients.

We expected functional matching, which compares the edge functions directly, to do better than weights for exactly that reason. It did worse. It reduced the width-64 barrier only from 1.096 to 0.627. Comparing curves on a fixed set of input points was not a good enough signal of which units do the same job; comparing what units actually output on real data was. Because it was both slower and weaker in this first test, we ran it only at width 64.

3.4Sharing grids works, but doesn't help

This is the part of the study we were most interested in, and the result is negative.

The harmonization itself does what it should. Across all accepted pairs, putting two adaptive-grid KANs on their shared knot union changed endpoint loss by at most 0.117%, well under the 0.5% gate. Both models compute the same functions as before, now in one common basis. But the barrier did not reliably drop:

Task · alignmentNaive gridsShared gridDifference
MNIST · none1.0981.086−0.012[−0.039, 0.008]
MNIST · activation0.1440.155+0.011[0.006, 0.018]
Regression · none2.8222.698−0.124[−0.181, −0.062]
Regression · activation1.3061.270−0.036[−0.070, −0.003]
Table 3. Adaptive-grid KANs, width 64. Negative differences mean the shared grid lowered the barrier. Paired 95% intervals over networks.

Hypothesis 3 is not supported. The shared grid helped a little on the regression task, made no clear difference to unaligned MNIST models, and made aligned MNIST models slightly worse. Different knot grids, it turns out, are not the main thing standing between two KANs. Once units are matched, the grids of corresponding features are apparently already close enough that averaging them directly does about as well.

One more result sits here. On adaptive-grid MNIST models, weight matching after harmonization was weak: a barrier of 0.956, against 0.155 for activation matching. Comparing coefficients across models becomes less informative once grids have moved, which is another reason to prefer matching on activations.

What the shared grid is good for. It is a check, not a fix. It lets us interpolate adaptive-grid KANs in a basis where averaging coefficients has a clear meaning, and confirm that doing so doesn't change the conclusion. It also makes the merged model larger, since the union grid has more knots than either original.

3.5KANs vs MLPs: it depends what you hold fixed

Best aligned test-loss barrier, MNIST (log scale)

  • KAN
  • MLP, same width
  • MLP, same parameter count
Figure 3. For each architecture we take its best alignment method. Further left is better. Same-size MLPs sit one to two orders of magnitude below KANs.
KAN widthKANMLP, same widthMLP, same size
320.2950.5890.0183width 252
640.1260.1840.0050width 443
1280.0570.0610.0009width 759
Table 4. Best aligned barrier per architecture. KANs use activation matching; MLPs mostly weight matching.

Hypothesis 4 holds only in its weak form. At equal width, aligned KANs had lower barriers than aligned MLPs: half as large at width 32, but the gap closes by width 128, where the intervals overlap. At equal parameter count the picture reverses completely. A KAN edge carries several parameters, so a same-size MLP is much wider, and width is what drives barriers down. Same-size MLPs were almost perfectly connected after matching, and also slightly more accurate (98.1–98.5% vs 96.3–97.8%).

So nothing here shows that spline edges make KANs inherently easier to merge. If anything, per parameter, they are harder. We also can't say why KANs win at equal width; the experiment doesn't isolate a mechanism.

3.6Robustness

Two pre-planned checks at MNIST width 64 changed one training choice at a time:

SettingNoneWeightActivation
KAN, Adam, cubic splines (main)1.0960.3590.126
KAN, Adam, linear splines1.1460.3080.122
KAN, SGD, cubic splines0.8180.0380.049
MLP, SGD1.0360.0700.094
Table 5. Test-loss barrier, MNIST, width 64. SGD learning rates were chosen on a held-out slice of the training set (0.1 for KANs, 0.05 for MLPs); the test set was never consulted.

The main finding survives both. Spline order barely matters. The optimizer matters a lot: with SGD, the aligned KAN barrier fell from 0.126 to 0.049 for activation matching and from 0.359 to 0.038 for weight matching, which now edged ahead. Aligned SGD-trained KANs also beat the SGD-trained MLP of the same width. How much of the KAN behaviour in this study is really Adam behaviour is an open question.

3.7Low barrier, mediocre merge

MNIST test accuracy, KAN width 64

Single network97.2%
Ensemble of two97.5%

Midpoint of the path

No alignment56.4%
Weight matching84.7%
Activation matching93.1%
Figure 4. The ensemble averages the two networks' outputs; the midpoint averages their parameters into one network. On Fashion-MNIST the aligned midpoint reached 82.2%, against 88.6% for one network and 89.3% for the ensemble.

Alignment turns a useless average into a reasonable model, but the merged KAN is still about four points worse than either parent. Running both parents and averaging their predictions is better than either. At width 128 the gap narrows (95.7% merged vs 97.8% single), consistent with the width trend. A falling barrier describes the geometry of the loss surface; it doesn't by itself make parameter averaging a good way to combine models.

4Limitations

5What's next

A note on tools

AI coding tools helped with implementation, experiment orchestration and analysis in this project. Every number in this post was checked against the saved experiment records.

References

  1. Timur Garipov, Pavel Izmailov, Dmitrii Podoprikhin, Dmitry Vetrov, Andrew Gordon Wilson. Loss Surfaces, Mode Connectivity, and Fast Ensembling of DNNs. NeurIPS, 2018. arXiv:1802.10026
  2. Felix Draxler, Kambis Veschgini, Manfred Salmhofer, Fred Hamprecht. Essentially No Barriers in Neural Network Energy Landscape. ICML, 2018. arXiv:1803.00885
  3. Jonathan Frankle, Gintare Karolina Dziugaite, Daniel M. Roy, Michael Carbin. Linear Mode Connectivity and the Lottery Ticket Hypothesis. ICML, 2020. arXiv:1912.05671
  4. Rahim Entezari, Hanie Sedghi, Olga Saukh, Behnam Neyshabur. The Role of Permutation Invariance in Linear Mode Connectivity of Neural Networks. 2021. arXiv:2110.06296
  5. Samuel K. Ainsworth, Jonathan Hayase, Siddhartha Srinivasa. Git Re-Basin: Merging Models modulo Permutation Symmetries. ICLR, 2023. arXiv:2209.04836
  6. Ziming Liu, Yixuan Wang, Sachin Vaidya, Fabian Ruehle, James Halverson, Marin Soljačić, Thomas Y. Hou, Max Tegmark. KAN: Kolmogorov-Arnold Networks. ICLR, 2025. arXiv:2404.19756
  7. G. Bar-Shalom et al. A Graph Meta-Network for Learning on Kolmogorov-Arnold Networks. ICLR, 2026. arXiv:2602.16316
  8. G. Elbaz et al. FS-KAN: Permutation Equivariant Kolmogorov-Arnold Networks via Function Sharing. ICLR, 2026. arXiv:2509.24472
  9. V. Polar, A. Poluektov. Concurrent Training Methods for Kolmogorov-Arnold Networks: Disjoint Datasets and FPGA Implementation. Neurocomputing, 2026. doi:10.1016/j.neucom.2026.134772
  10. Blealtan. efficient-kan: An Efficient Pure-PyTorch Implementation of Kolmogorov-Arnold Networks. 2024. github.com/Blealtan/efficient-kan
  11. Yann LeCun, Léon Bottou, Yoshua Bengio, Patrick Haffner. Gradient-Based Learning Applied to Document Recognition. Proceedings of the IEEE 86(11), 1998. doi:10.1109/5.726791
  12. Han Xiao, Kashif Rasul, Roland Vollgraf. Fashion-MNIST: A Novel Image Dataset for Benchmarking Machine Learning Algorithms. 2017. arXiv:1708.07747
  13. Harold W. Kuhn. The Hungarian Method for the Assignment Problem. Naval Research Logistics Quarterly 2(1–2), 1955. doi:10.1002/nav.3800020109
  14. Konrad Menzel. Bootstrap with Cluster-Dependence in Two or More Dimensions. Econometrica 89(5), 2021.
  15. Keller Jordan, Hanie Sedghi, Olga Saukh, Rahim Entezari, Behnam Neyshabur. REPAIR: REnormalizing Permuted Activations for Interpolation Repair. ICLR, 2023. arXiv:2211.08403

Cite this work

neuralnets (2026). Permutation Re-Basin for B-Spline KANs: Linear Mode Connectivity and Adaptive Grids. Building Bad. https://buildingbad.xyz/blog/kan-rebasin/

BibTeXDownload .bib
@misc{neuralnets2026kanrebasin,
  author       = {neuralnets},
  title        = {Permutation Re-Basin for {B}-Spline {KANs}: Linear Mode Connectivity and Adaptive Grids},
  howpublished = {Building Bad},
  year         = {2026},
  month        = nov,
  url          = {https://buildingbad.xyz/blog/kan-rebasin/}
}