Home

Awesome

Re-basin via implicit Sinkhorn differentiation

Implementation of paper Re-basin via implicit Sinkhorn differentiation (Accepted at CVPR 2023).

Installation

pip install sinkhorn-rebasin

Running the examples

BasicsBasics
Models alignmentModels alignment
Linear mode connectivityLinear mode connectivity

Models alignment

cd examples
python main_alignment_{mlp|cnn|resnet}.py
ExampleLayer from $\theta_A$Layer from $\pi_{\mathcal{P}}(\theta_A)$Layer from $\theta_B$
MLPAlignment modelA MLPAlignment pi_modelA MLPAlignment modelB MLP
VGGAlignment modelA VGGAlignment pi_modelA VGGAlignment modelB VGG
ResNet18Alignment modelA ResNetAlignment pi_modelA ResNetAlignment modelB ResNet

Linear mode connectivity

cd examples
python main_lmc_{mlp|cnn|resnet}.py
DatasetModelAccuracy LMCCross Entropy Loss LMC
MnistMLPLMC MLP AccuracyLMC MLP Loss
MnistVGGLMC VGG AccuracyLMC VGG Loss
Imagenette-320ResNet18LMC ResNet AccuracyLMC ResNet Loss