SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2302.14685 · CVPR · 2023

DART: Diversify-Aggregate-Repeat Training Improves Generalization of Neural Networks

Sravanti Addepalli, Samyak Jain, Priyam Dey, Venkatesh Babu, Pawan Kumar Sahu

arXiv · PDF · Open in the Atlas

Code that ran

11 of 13 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; 4 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 7 failures of our instrument; 2 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/2302.14685.json · badge: /api/ran/2302.14685.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
val-iisc/DART canonical (classifier label)
classifier basis not recorded on the link
11 ran · 2 no recorded run
FunctionStatusWhere it lives
conv3x3 Ran
ran; our contract draft was wrong, not the code
val-iisc/DART/domainbed/lib/wide_resnet.py
pointer only (licence: MIT); the stored copy get_code serves, from DaikiTanak/manifold_mixup, is pointer only (licence: NONE) · get_code("00e569acd6b45ef0")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from DaikiTanak/manifold_mixup, and GitHub detected no licence in that repository 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.

default_hparams Ran
ran; our contract draft was wrong, not the code
val-iisc/DART/domainbed/hparams_registry.py
code served (permissive licence) · get_code("02a21c87d500ef9d")
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 dict. The image it ran in was not recorded. If your copy returns the same type 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 numpy as np

ARGS = {
    'algorithm': 'ERM',
    'dataset': 'PACS'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
get_shapes Ran
ran; our contract draft was wrong, not the code
val-iisc/DART/domainbed/algorithms/miro.py
pointer only (licence: MIT); the stored copy get_code serves, from zhaorui-tan/L-Reg_NeurIPS24, is pointer only (licence: NONE) · get_code("c5919b96db289dbd")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from zhaorui-tan/L-Reg_NeurIPS24, and GitHub detected no licence in that repository 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.

hashable Ran
ran, honoured the contract we drafted
val-iisc/DART/domainbed/lib/query.py
code served (permissive licence) · get_code("71a3a61ceed99bf3")
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 int, ndim 0, dtype family int, shape () 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 json
import torch

def hashable(obj):
    try:
        hash(obj)
        return obj
    except TypeError:
        return json.dumps({'_': obj}, sort_keys=True)

torch.manual_seed(0)

# Test with a hashable object (int)
hashable_obj = 42

# Test with an unhashable object (list)
unhashable_obj = [1, 2, 3]

ARGS = {
    'obj': hashable_obj
}
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 int, ndim 0, dtype family int, shape () — shape () 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
levelize Ran
ran, honoured the contract we drafted
val-iisc/DART/domainbed/lib/logger.py
code served (permissive licence) · get_code("2f597a2077a1c95d")
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 int, ndim 0, dtype family int, shape () 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 logging

def test_levelize():
    # Test case 1: levelname as string
    levelname_str = "DEBUG"
    
    # Test case 2: levelname as integer
    levelname_int = logging.DEBUG
    
    ARGS = {
        "levelname": levelname_str
    }
    
    return ARGS

ARGS = test_levelize()
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () 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
make_selector_fn Ran
ran; our contract draft was wrong, not the code
val-iisc/DART/domainbed/lib/query.py
code served (permissive licence) · get_code("2f8af5779e1edcb6")
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 function. The image it ran in was not recorded. If your copy returns the same type 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 types
import torch

torch.manual_seed(0)

# Test case 1: string selector with simple key access
selector_simple_key = "x"

# Test case 2: string selector with nested key access (dot notation)
selector_nested = "x.y"

# Test case 3: string selector with multiple keys (comma notation)
selector_multiple = "x,y"

# Test case 4: function selector
def custom_selector(obj):
    return obj['data']

selector_func = custom_selector

# Create test objects that would work with these selectors
test_obj_simple = {'x': 42}
test_obj_nested = {'x': {'y': 100}}
test_obj_multiple = {'x': 1, 'y': 2}
test_obj_custom = {'data': 'value'}

ARGS = {
    'selector': selector_simple_key
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
make_weights_for_balanced_classes Ran
ran, honoured the contract we drafted
val-iisc/DART/domainbed/lib/misc.py
code served (permissive licence) · get_code("955c4020424d8ac1")
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 (6,) 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
from torch.utils.data import Dataset

torch.manual_seed(0)

class SimpleDataset(Dataset):
    def __init__(self, samples):
        self.samples = samples
    
    def __len__(self):
        return len(self.samples)
    
    def __getitem__(self, idx):
        return self.samples[idx]

# Create a simple dataset with imbalanced classes
# 3 samples of class 0, 1 sample of class 1, 2 samples of class 2
dataset = SimpleDataset([
    (torch.randn(4), 0),
    (torch.randn(4), 0),
    (torch.randn(4), 0),
    (torch.randn(4), 1),
    (torch.randn(4), 2),
    (torch.randn(4), 2),
])

ARGS = {
    "dataset": dataset
}
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 (6,) — shape (6,) 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
random_hparams Ran
ran; our contract draft was wrong, not the code
val-iisc/DART/domainbed/hparams_registry.py
code served (permissive licence) · get_code("58e06fd6cfa6a889")
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 dict. The image it ran in was not recorded. If your copy returns the same type 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 numpy as np

ARGS = {
    'algorithm': 'DANN',
    'dataset': 'PACS',
    'seed': 42
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
random_pairs_of_minibatches Ran
ran; our contract draft was wrong, not the code
val-iisc/DART/domainbed/lib/misc.py
code served (permissive licence) · get_code("4fa2b54178fcc1df")
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 list. The image it ran in was not recorded. If your copy returns the same type 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 torch.nn as nn

torch.manual_seed(0)

# Create small minibatches as list of (x, y) tuples
# Each minibatch is ((features_tensor, labels_tensor))
minibatch_1 = (torch.randn(2, 4), torch.randint(0, 2, (2,)))
minibatch_2 = (torch.randn(3, 4), torch.randint(0, 2, (3,)))
minibatch_3 = (torch.randn(2, 4), torch.randint(0, 2, (2,)))

minibatches = [minibatch_1, minibatch_2, minibatch_3]

ARGS = {
    "minibatches": minibatches
}
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 list — a list output has no array shape of its own; none is stated
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
to_minibatch Ran
ran, honoured the contract we drafted
val-iisc/DART/domainbed/algorithms/algorithms.py
pointer only (licence: MIT); the stored copy get_code serves, from saqibjaved1/QT-DoG, is pointer only (licence: NONE) · get_code("12c23ce22097acd0")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from saqibjaved1/QT-DoG, and GitHub detected no licence in that repository 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.

to_row Ran
ran; our contract draft was wrong, not the code
val-iisc/DART/domainbed/lib/misc.py
code served (permissive licence) · get_code("5dd6a674fbe45a89")
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 str. The image it ran in was not recorded. If your copy returns the same type 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 numpy as np

# Construct a simple row of mixed values
row = [1.234567, 2.5, "text", 42, 3.14159265]

# Test with default parameters
ARGS = {
    "row": row,
    "colwidth": 10,
    "latex": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
accuracy_from_loader Not yet run
unverified (harvested, no recorded run)
val-iisc/DART/domainbed/evaluator.py
code served (permissive licence) · get_code("687efdf3db9c44df")
How it ran

no invocation recorded.

get_writer Not yet run
unverified (harvested, no recorded run)
val-iisc/DART/domainbed/lib/writers.py
code served (permissive licence) · get_code("aa6558d41d5c4673")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 13 are also present in other papers whose code we hold (13 with at least one paper dated earlier, 0 the same month, 13 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
conv3x3 74 other papers
38 dated earlier, 36 later · 5 only as an assembly brick
1605.07146 (2016-05)
Wide Residual Networks
1707.01629 (2017-07)
Dual Path Networks
1802.05668 (2018-02)
Model compression via distillation and quantization
and 71 more not named here
hashable 20 other papers
8 dated earlier, 12 later
2106.02266 (2021-06)
SAND-mask: An Enhanced Gradient Masking Strategy for the Discovery of Invariances in Domain Generalization
2111.12853 (2021-11)
Domain Prompt Learning for Efficiently Adapting CLIP to Unseen Domains
2203.10789 (2022-03)
Domain Generalization by Mutual-Information Regularization with Pre-trained Models
and 17 more not named here
make_selector_fn 20 other papers
8 dated earlier, 12 later
2106.02266 (2021-06)
SAND-mask: An Enhanced Gradient Masking Strategy for the Discovery of Invariances in Domain Generalization
2111.12853 (2021-11)
Domain Prompt Learning for Efficiently Adapting CLIP to Unseen Domains
2203.10789 (2022-03)
Domain Generalization by Mutual-Information Regularization with Pre-trained Models
and 17 more not named here
make_weights_for_balanced_classes 18 other papers
8 dated earlier, 10 later
1907.02893 (2019-07)
Invariant Risk Minimization
2106.02266 (2021-06)
SAND-mask: An Enhanced Gradient Masking Strategy for the Discovery of Invariances in Domain Generalization
2111.12853 (2021-11)
Domain Prompt Learning for Efficiently Adapting CLIP to Unseen Domains
and 15 more not named here
random_pairs_of_minibatches 7 other papers
2 dated earlier, 5 later
2110.09410 (2021-10)
Exploiting Domain-Specific Features to Enhance Domain Generalization
2203.10789 (2022-03)
Domain Generalization by Mutual-Information Regularization with Pre-trained Models
2303.01233 (2023-03)
Domain-aware Triplet loss in Domain Generalization
and 4 more not named here
to_minibatch 7 other papers
1 dated earlier, 6 later
2203.10789 (2022-03)
Domain Generalization by Mutual-Information Regularization with Pre-trained Models
2303.01233 (2023-03)
Domain-aware Triplet loss in Domain Generalization
2305.13046 (2023-05)
POEM: Polarization of Embeddings for Domain-Invariant Representations
and 4 more not named here
levelize 6 other papers
2 dated earlier, 4 later
2203.10789 (2022-03)
Domain Generalization by Mutual-Information Regularization with Pre-trained Models
2206.04046 (2022-06)
Sparse Mixture-of-Experts are Domain Generalizable Learners
2303.01233 (2023-03)
Domain-aware Triplet loss in Domain Generalization
and 3 more not named here
default_hparams 5 other papers
1 dated earlier, 4 later
2203.10789 (2022-03)
Domain Generalization by Mutual-Information Regularization with Pre-trained Models
2303.01233 (2023-03)
Domain-aware Triplet loss in Domain Generalization
2305.13046 (2023-05)
POEM: Polarization of Embeddings for Domain-Invariant Representations
and 2 more not named here
random_hparams 5 other papers
1 dated earlier, 4 later
2203.10789 (2022-03)
Domain Generalization by Mutual-Information Regularization with Pre-trained Models
2303.01233 (2023-03)
Domain-aware Triplet loss in Domain Generalization
2305.13046 (2023-05)
POEM: Polarization of Embeddings for Domain-Invariant Representations
and 2 more not named here
to_row 5 other papers
1 dated earlier, 4 later
2203.10789 (2022-03)
Domain Generalization by Mutual-Information Regularization with Pre-trained Models
2303.01233 (2023-03)
Domain-aware Triplet loss in Domain Generalization
2305.13046 (2023-05)
POEM: Polarization of Embeddings for Domain-Invariant Representations
and 2 more not named here
accuracy_from_loader 4 other papers
2 dated earlier, 2 later
2203.10789 (2022-03)
Domain Generalization by Mutual-Information Regularization with Pre-trained Models
2206.04046 (2022-06)
Sparse Mixture-of-Experts are Domain Generalizable Learners
2310.08255 (2023-10)
Leveraging Vision-Language Models for Improving Domain Generalization in Image Classification
and 1 more not named here
get_shapes 4 other papers
1 dated earlier, 3 later
2203.10789 (2022-03)
Domain Generalization by Mutual-Information Regularization with Pre-trained Models
2310.08255 (2023-10)
Leveraging Vision-Language Models for Improving Domain Generalization in Image Classification
2407.15085 (2024-07)
Learn to Preserve and Diversify: Parameter-Efficient Group with Orthogonal Regularization for Domain Generalization
and 1 more not named here
get_writer 2 other papers
1 dated earlier, 1 later
2203.10789 (2022-03)
Domain Generalization by Mutual-Information Regularization with Pre-trained Models
2407.15085 (2024-07)
Learn to Preserve and Diversify: Parameter-Efficient Group with Orthogonal Regularization for Domain 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

Generalization of Neural Networks is crucial for deploying them safely in the real world. Common training strategies to improve generalization involve the use of data augmentations, ensembling and model averaging. In this work, we first establish a surprisingly simple but strong benchmark for generalization which utilizes diverse augmentations within a training minibatch, and show that this can learn a more balanced distribution of features. Further, we propose Diversify-Aggregate-Repeat Training (DART) strategy that first trains diverse models using different augmentations (or domains) to explore the loss basin, and further Aggregates their weights to combine their expertise and obtain improved generalization. We find that Repeating the step of Aggregation throughout training improves the overall optimization trajectory and also ensures that the individual models have sufficiently low loss barrier to obtain improved generalization on combining them. We theoretically justify the proposed approach and show that it indeed generalizes better. In addition to improvements in In-Domain generalization, we demonstrate SOTA performance on the Domain Generalization benchmarks in the popular DomainBed framework as well. Our method is generic and can easily be integrated with several base training algorithms to achieve performance gains. Our code is available here: https://github.com/val-iisc/DART.

For agents

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

get_harvested_code_for_paper("2302.14685")
get_code_for_paper("2302.14685")
have("2302.14685")

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

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

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

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

Connect an agent — have() is free.