SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.18409 · 2023

Direction-oriented Multi-objective Learning: Simple and Provable Stochastic Algorithms

arXiv · PDF · Open in the Atlas

Code that ran

8 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; 3 honoured the contract we drafted, 1 violated it and 4 have no contract verdict; 0 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/2305.18409.json · badge: /api/ran/2305.18409.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
ml-opt-lab/sdmgrad canonical (classifier label)
classifier basis: census
8 ran · 2 no recorded run
FunctionStatusWhere it lives
delta_fn Ran
ran, honoured the contract we drafted
ml-opt-lab/sdmgrad/experiments/cityscapes/utils.py
code served (permissive licence) · get_code("2b356e9ebfba41cb")
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 float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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

def delta_fn(a):
    BASE = np.array([0.7401, 0.9316, 0.0125, 27.77])
    SIGN = np.array([1, 1, 0, 0])
    KK = np.ones(4) * -1
    return (KK ** SIGN * (a - BASE) / BASE).mean() * 100.0

# Create a small numpy array with shape (4,) to match BASE
a = np.array([0.5, 0.8, 0.01, 25.0])

ARGS = {
    "a": a
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
depth_error Ran
ran on a synthesized input
ml-opt-lab/sdmgrad/experiments/cityscapes/utils.py
code served (permissive licence) · get_code("1539c8d54c086d09")
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 tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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)

# x_pred: predicted depth map, shape (batch, channels, height, width) or similar
# The function uses: device, masked_select, abs, sum, nonzero
# x_output: ground truth depth map, same shape as x_pred
# The function creates a binary mask where sum across dim=1 != 0

# Create small tensors: batch_size=2, with distinct dimensions
# x_pred and x_output should have same shape
# They need at least 2 dimensions (dim=1 is used for summing)

batch_size = 2
height = 3
width = 4

# Create predicted depth (small random values)
x_pred = torch.randn(batch_size, height, width)

# Create ground truth depth with some non-zero values
# The mask is created by checking if sum(x_output, dim=1) != 0
# So we need some rows (along dim=1) to be all zeros and some to have non-zero values
x_output = torch.tensor([
    [[1.0, 2.0, 3.0, 4.0],
     [0.0, 0.0, 0.0, 0.0],
     [5.0, 6.0, 7.0, 8.0]],
    [[0.5, 1.5, 2.5, 3.5],
     [4.5, 5.5, 6.5, 7.5],
     [0.0, 0.0, 0.0, 0.0]]
], dtype=torch.float32)

ARGS = {
    "x_pred": x_pred,
    "x_output": x_output
}
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 tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
euclidean_proj_simplex Ran
ran on a synthesized input
ml-opt-lab/sdmgrad/mtrl_files/sdmgrad.py
code served (permissive licence) · get_code("b7b864e78753f74c")
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 ndarray, ndim 1, dtype family float, shape (5,) 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 numpy as np

# Create a simple numpy array to project onto the simplex
v = np.array([3.0, 1.0, 2.0, 0.5, 1.5])

# Define radius of simplex (must be > 0)
s = 1

# Construct arguments dict
ARGS = {
    "v": v,
    "s": s,
}
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 ndarray, ndim 1, dtype family float, shape (5,) — shape (5,) 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
get_rank Ran
ran on a synthesized input
ml-opt-lab/sdmgrad/experiments/mean_rank.py
code served (permissive licence) · get_code("47019f3895d2e9d3")
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 defaultdict. 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.

from collections import defaultdict

# Construct valid arguments for get_rank function
# The function expects a dict 'stats' with keys: 'Method', 'mIoU', 'Pix Acc', 'Abs Err', 'Rel Err'
# Each value should be a list of values corresponding to different methods

stats = {
    'Method': ['Method_A', 'Method_B', 'Method_C'],
    'mIoU': [0.85, 0.82, 0.88],
    'Pix Acc': [0.92, 0.90, 0.94],
    'Abs Err': [0.15, 0.18, 0.12],
    'Rel Err': [0.08, 0.10, 0.06]
}

ARGS = {
    'stats': stats
}
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 defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict 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
read_file Ran
ran on a synthesized input
ml-opt-lab/sdmgrad/experiments/mean_rank.py
code served (permissive licence) · get_code("1cb4b9ddd1f0d15b")
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 defaultdict. 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 tempfile
import os

# Create a temporary file with the expected format
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_fname = temp_file.name

# Write header
temp_file.write('Header\n')

# Write data rows with tab-separated values matching the keys
temp_file.write('Method1\t0.85\t0.92\t0.15\t0.08\n')
temp_file.write('Method2\t0.88\t0.94\t0.12\t0.06\n')
temp_file.write('Method3\t0.91\t0.96\t0.10\t0.05\n')

temp_file.close()

ARGS = {
    'fname': temp_fname
}
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 defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict 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
str2bool Ran
ran, violated the contract we drafted
ml-opt-lab/sdmgrad/experiments/utils.py
code served (permissive licence) · get_code("7c508037b40522af")
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 bool, ndim 0, dtype family float, 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 argparse

def str2bool(v):
    if isinstance(v, bool):
        return v
    if v.lower() in ('yes', 'true', 't', 'y', '1'):
        return True
    elif v.lower() in ('no', 'false', 'f', 'n', '0'):
        return False
    else:
        raise argparse.ArgumentTypeError('Boolean value expected.')

# Test cases for str2bool
ARGS = {
    'v': 'true'  # string input that should convert to boolean
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 bool, ndim 0, dtype family float, 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
str_or_float Ran
ran, honoured the contract we drafted
ml-opt-lab/sdmgrad/experiments/utils.py
code served (permissive licence) · get_code("eefc191f062ea49a")
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 float, ndim 0, dtype family float, 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 torch

def str_or_float(value):
    try:
        return float(value)
    except:
        return value

ARGS = {
    "value": "3.14"
}
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 float, ndim 0, dtype family float, 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
str_to_list Ran
ran, honoured the contract we drafted
ml-opt-lab/sdmgrad/experiments/utils.py
code served (permissive licence) · get_code("267fdf7ca1571871")
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, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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

def str_to_list(string):
    return [float(s) for s in string.split(',')]

ARGS = {
    "string": "1.5,2.3,3.7,4.2"
}
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, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
calc_loss Not yet run
unverified (harvested, no recorded run)
ml-opt-lab/sdmgrad/experiments/cityscapes/trainer.py
code served (permissive licence) · get_code("0a0f4c8898070a9d")
How it ran

no invocation recorded.

gradient_normalizers Not yet run
unverified (harvested, no recorded run)
ml-opt-lab/sdmgrad/methods/min_norm_solvers.py
code served (permissive licence) · get_code("2d5ff72859c98459")
How it ran

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, 5 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 1 the same month, 5 later) and 5 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
str2bool 175 other papers
68 dated earlier, 7 the same month, 97 later, 3 same year, order not determinable · 2 only as an assembly brick
1406.6247 (2014-06)
Recurrent Models of Visual Attention
1603.09382 (2016-03)
Deep Networks with Stochastic Depth
1710.10196 (2017-10)
Progressive Growing of GANs for Improved Quality, Stability, and Variation
and 172 more not named here
gradient_normalizers 3 other papers
1 dated earlier, 2 later
2202.01017 (2022-02)
Multi-Task Learning as a Bargaining Game
2402.15638 (2024-02)
Fair Resource Allocation in Multi-Task Learning
2408.11104 (2024-08)
ConFIG: Towards Conflict-free Training of Physics Informed Neural Networks
str_or_float 2 other papers
2 later
2402.04005 (2024-02)
Bayesian Uncertainty for Gradient Aggregation in Multi-Task Learning
2402.15638 (2024-02)
Fair Resource Allocation in Multi-Task Learning
str_to_list 2 other papers
2 later
2402.04005 (2024-02)
Bayesian Uncertainty for Gradient Aggregation in Multi-Task Learning
2402.15638 (2024-02)
Fair Resource Allocation in Multi-Task Learning
delta_fn 1 other paper
1 later
2402.04005 (2024-02)
Bayesian Uncertainty for Gradient Aggregation in Multi-Task Learning

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

Multi-objective optimization (MOO) has become an influential framework in many machine learning problems with multiple objectives such as learning with multiple criteria and multi-task learning (MTL). In this paper, we propose a new direction-oriented multi-objective problem by regularizing the common descent direction within a neighborhood of a direction that optimizes a linear combination of objectives such as the average loss in MTL. This formulation includes GD and MGDA as special cases, enjoys the direction-oriented benefit as in CAGrad, and facilitates the design of stochastic algorithms. To solve this problem, we propose Stochastic Direction-oriented Multi-objective Gradient descent (SDMGrad) with simple SGD type of updates, and its variant SDMGrad-OS with an efficient objective sampling in the setting where the number of objectives is large. For a constant-level regularization parameter $λ$, we show that SDMGrad and SDMGrad-OS provably converge to a Pareto stationary point with improved complexities and milder assumptions. For an increasing $λ$, this convergent point reduces to a stationary point of the linear combination of objectives. We demonstrate the superior performance of the proposed methods in a series of tasks on multi-task supervised learning and reinforcement learning. Code is provided at https://github.com/ml-opt-lab/sdmgrad.

For agents

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

get_harvested_code_for_paper("2305.18409")
get_code_for_paper("2305.18409")
have("2305.18409")

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

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

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

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

Connect an agent — have() is free.