SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2306.01708 · NeurIPS · 2023

TIES-MERGING: Resolving Interference When Merging Models

Colin Raffel, Mohit Bansal, Prateek Yadav, Derek Tam, Leshem Choshen

arXiv · PDF · Open in the Atlas

Code that ran

4 of 8 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; 4 failures of our instrument; 4 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2306.01708.json · badge: /api/ran/2306.01708.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
prateeky2806/ties-merging canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
EnnengYang/AdaMerging community
Papers with Code archive
2 ran · 0 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
flowritecom/flow-merge community
Papers with Code archive
0 ran · 4 no recorded run
FunctionStatusWhere it lives
disjoint_merge Ran
ran; our contract draft was wrong, not the code
EnnengYang/AdaMerging/src/ties_merging_utils.py
code served (permissive licence) · get_code("d2a53ee4479956ae")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Construct arguments for disjoint_merge function
Tensor = torch.randn(2, 4)  # Shape: (batch=2, dim=4)
merge_func = "some-prefix-mean"  # Will be split and last part taken
sign_to_mult = torch.tensor([1.0, -1.0, 1.0, 1.0])  # Shape: (4,) for element-wise mult

ARGS = {
    "Tensor": Tensor,
    "merge_func": merge_func,
    "sign_to_mult": sign_to_mult,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
resolve_lambda_code Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
prateeky2806/ties-merging/src/ties_merging.py
code served (permissive licence) · get_code("adff87f187a088be")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 1, dtype family float, shape (3,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function takes a single parameter: lambda_code
# It can be:
# 1. A tuple
# 2. A float or int
# 3. A string containing 'linear+'
# 4. A string containing 'mergelist'

ARGS = {
    "lambda_code": (0.1, 0.2, 0.3)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family float, shape (3,) — shape (3,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ties_merging Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
EnnengYang/AdaMerging/src/ties_merging_utils.py
code served (permissive licence) · get_code("7b834a39961b956a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a small tensor for flat_task_checks
# Shape: (batch=2, dim=4) - represents task-specific weight differences
flat_task_checks = torch.randn(2, 4)

# reset_thresh: controls the top-k threshold (as a percentage)
reset_thresh = 0.5

# merge_func: the aggregation function to use
merge_func = 'ties-mean'

ARGS = {
    'flat_task_checks': flat_task_checks,
    'reset_thresh': reset_thresh,
    'merge_func': merge_func,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
topk_values_mask Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
this paper's copy was not recorded; identical code first harvested from r-three/realistic_evaluation_of_model_merging_for_compositional_generalization
pointer only; the stored copy get_code serves, from r-three/realistic_evaluation_of_model_merging_for_compositional_generalization, is pointer only (licence: NONE) · get_code("225c26ebc567caaa")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

BaseMergeMethodSettings Not yet run
unverified (harvested, no recorded run)
flowritecom/flow-merge/flow_merge/lib/merge_methods/task_arithmetic.py
code served (permissive licence) · get_code("27c058dc73f0bc72")
How it ran

no invocation recorded.

Model Not yet run
unverified (harvested, no recorded run)
flowritecom/flow-merge/flow_merge/lib/merge_methods/task_arithmetic.py
code served (permissive licence) · get_code("07b31b99cc6756ae")
How it ran

no invocation recorded.

TaskArithmeticSettings Not yet run
unverified (harvested, no recorded run)
flowritecom/flow-merge/flow_merge/lib/merge_methods/task_arithmetic.py
code served (permissive licence) · get_code("13ed3abc8bafa589")
How it ran

no invocation recorded.

TiesMergingSettings Not yet run
unverified (harvested, no recorded run)
flowritecom/flow-merge/flow_merge/lib/merge_methods/task_arithmetic.py
code served (permissive licence) · get_code("e5f70e4892a42b45")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 8 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 4 later) and 0 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.

FunctionAlso present inEarliest-datedOthers named
BaseMergeMethodSettings
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2212.04089 (2022-12)
Editing Models with Task Arithmetic
Model
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2212.04089 (2022-12)
Editing Models with Task Arithmetic
TaskArithmeticSettings
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2212.04089 (2022-12)
Editing Models with Task Arithmetic
TiesMergingSettings
brick of this paper's assembly: entry
1 other paper
1 dated earlier
2212.04089 (2022-12)
Editing Models with Task Arithmetic
disjoint_merge
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2406.11801 (2024-06)
Safety Arithmetic: A Framework for Test-time Safety Alignment of Language Models by Steering Parameters and Activations
resolve_lambda_code 1 other paper
1 later
2410.02396 (2024-10)
Parameter Competition Balancing for Model Merging
ties_merging
brick of this paper's assembly: entry
1 other paper
1 later
2406.11801 (2024-06)
Safety Arithmetic: A Framework for Test-time Safety Alignment of Language Models by Steering Parameters and Activations
topk_values_mask
brick of this paper's assembly: helper
1 other paper
1 later
2409.18314 (2024-09)
Realistic Evaluation of Model Merging for Compositional Generalization

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-22.

Repositories linked to this paper

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

Abstract

Transfer learning -i.e., further fine-tuning a pre-trained model on a downstream task -can confer significant advantages, including improved downstream performance, faster convergence, and better sample efficiency. These advantages have led to a proliferation of task-specific fine-tuned models, which typically can only perform a single task and do not benefit from one another. Recently, model merging techniques have emerged as a solution to combine multiple task-specific models into a single multitask model without performing additional training. However, existing merging methods often ignore the interference between parameters of different models, resulting in large performance drops when merging multiple models. In this paper, we demonstrate that prior merging techniques inadvertently lose valuable information due to two major sources of interference: (a) interference due to redundant parameter values and (b) disagreement on the sign of a given parameter's values across models. To address this, we propose our method, TRIM, ELECT SIGN & MERGE (TIES-MERGING), which introduces three novel steps when merging models: (1) resetting parameters that only changed a small amount during fine-tuning, (2) resolving sign conflicts, and (3) merging only the parameters that are in alignment with the final agreed-upon sign. We find that TIES-MERGING outperforms several existing methods in diverse settings covering a range of modalities, domains, number of tasks, model sizes, architectures, and fine-tuning settings. We further analyze the impact of different types of interference on model parameters, and highlight the importance of resolving sign interference. 1

For agents

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

get_harvested_code_for_paper("2306.01708")
get_code_for_paper("2306.01708")
have("2306.01708")

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

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

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

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

Connect an agent — have() is free.