SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.05719 · ICLR · 2024

Transformer Fusion with Optimal Transport

Sidak Singh, Thomas Hofmann, Sotiris Anagnostidis, Moritz Imfeld, Jacopo Graldi, Marco Giordano

arXiv · PDF · Open in the Atlas

Code that ran

3 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 7 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2310.05719.json · badge: /api/ran/2310.05719.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
graldij/transformer-fusion canonical (classifier label)
classifier basis: classifier_2025
3 ran · 7 no recorded run
FunctionStatusWhere it lives
dict_get Ran
ran; our contract draft was wrong, not the code
graldij/transformer-fusion/otfusion/otfusion_lib.py
pointer only (licence: NONE) · get_code("721bb9bc2a6879cd")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, graldij/transformer-fusion when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

ln_fusion Ran
ran; our contract draft was wrong, not the code
graldij/transformer-fusion/otfusion/otfusion_lib.py
pointer only (licence: NONE) · get_code("ea4d8e1f07bacca8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, graldij/transformer-fusion when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

resid_policy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
graldij/transformer-fusion/otfusion/otfusion_lib.py
pointer only (licence: NONE) · get_code("55a0789f11552e01")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, graldij/transformer-fusion when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

GroundMetric Not yet run
unverified (harvested, no recorded run)
graldij/transformer-fusion/otfusion/otfusion_lib.py
pointer only (licence: NONE) · get_code("b47405ab6d7d2f03")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, graldij/transformer-fusion when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

act_attention_fusion Not yet run
unverified (harvested, no recorded run)
graldij/transformer-fusion/otfusion/otfusion_lib.py
pointer only (licence: NONE) · get_code("d5028e23c26a673c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, graldij/transformer-fusion when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

dict_write Not yet run
unverified (harvested, no recorded run)
graldij/transformer-fusion/otfusion/otfusion_lib.py
pointer only (licence: NONE) · get_code("ebd6da09478807df")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, graldij/transformer-fusion when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

encoder_fusion Not yet run
unverified (harvested, no recorded run)
graldij/transformer-fusion/otfusion/otfusion_lib.py
pointer only (licence: NONE) · get_code("49bcbae821502d39")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, graldij/transformer-fusion when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

fc_fusion Not yet run
unverified (harvested, no recorded run)
graldij/transformer-fusion/otfusion/otfusion_lib.py
pointer only (licence: NONE) · get_code("5b6a97a40329a03f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, graldij/transformer-fusion when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

histogram_to_str Not yet run
unverified (harvested, no recorded run)
graldij/transformer-fusion/otfusion/otfusion_lib.py
pointer only (licence: NONE) · get_code("268fc860ec170df8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, graldij/transformer-fusion when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

matrix_stats Not yet run
unverified (harvested, no recorded run)
graldij/transformer-fusion/otfusion/otfusion_lib.py
pointer only (licence: NONE) · get_code("2c6503476961b9d9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, graldij/transformer-fusion when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 10 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Fusion is a technique for merging multiple independently-trained neural networks in order to combine their capabilities. Past attempts have been restricted to the case of fully-connected, convolutional, and residual networks. This paper presents a systematic approach for fusing two or more transformer-based networks exploiting Optimal Transport to (soft-)align the various architectural components. We flesh out an abstraction for layer alignment, that can generalize to arbitrary architectures -in principle -and we apply this to the key ingredients of Transformers such as multi-head self-attention, layer-normalization, and residual connections, and we discuss how to handle them via various ablation studies. Furthermore, our method allows the fusion of models of different sizes (heterogeneous fusion), providing a new and efficient way to compress Transformers. The proposed approach is evaluated on both image classification tasks via Vision Transformer and natural language modeling tasks using BERT. Our approach consistently outperforms vanilla fusion, and, after a surprisingly short finetuning, also outperforms the individual converged parent models. In our analysis, we uncover intriguing insights about the significant role of soft alignment in the case of Transformers. Our results showcase the potential of fusing multiple Transformers, thus compounding their expertise, in the budding paradigm of model fusion and recombination. Code is available at https://github.com/graldij/transformer-fusion.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2310.05719")
get_code_for_paper("2310.05719")
have("2310.05719")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2310.05719.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2310.05719.svg)](https://syntology.ai/paper/2310.05719)

Connect an agent — have() is free.