SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2503.09601 · 2025

RewardSDS: Aligning Score Distillation via Reward-Weighted Sampling

arXiv · PDF · Open in the Atlas

Code that ran

5 of 9 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 5 have no contract verdict; 0 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/2503.09601.json · badge: /api/ran/2503.09601.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
itaychachy/RewardSDS canonical (classifier label)
classifier basis not recorded on the link
5 ran · 4 no recorded run
FunctionStatusWhere it lives
compute_image_reward_score Ran
ran on a synthesized input
itaychachy/RewardSDS/evaluation/image_reward_eval.py
code served (permissive licence) · get_code("e92e66252033faef")
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
import torch.nn as nn
from PIL import Image
import numpy as np

torch.manual_seed(0)

class MockImageRewardModel(nn.Module):
    """Mock ImageReward model that implements the score method."""
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 1)
    
    def score(self, prompt, pil_image):
        """
        Compute score between prompt and image.
        Takes a text prompt and PIL Image, returns a float score.
        """
        # Mock implementation: return a scalar score
        return 0.75

# Create mock model
ir_model = MockImageRewardModel()

# Create a mock image as a PIL Image
# Create a small RGB image (3 channels, 4x3 pixels)
image_array = np.random.randint(0, 256, (3, 4, 3), dtype=np.uint8)
image_array = np.transpose(image_array, (1, 2, 0))  # Convert to (H, W, C)
pil_image = Image.fromarray(image_array)

# Create a text prompt
prompt = "a dog running in the park"

ARGS = {
    "ir_model": ir_model,
    "image": pil_image,
    "prompt": prompt
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — 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
convert_to_bytes Ran
ran on a synthesized input
itaychachy/RewardSDS/evaluation/llm_grader.py
code served (permissive licence) · get_code("bf36390adc8a9dfc")
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 bytes. 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
from PIL import Image
import numpy as np

# Create a temporary directory for test images
temp_dir = tempfile.mkdtemp()

# Create a simple test image and save it
test_image = Image.new('RGB', (10, 8), color=(255, 0, 0))
test_image_path = os.path.join(temp_dir, 'test_image.png')
test_image.save(test_image_path)

ARGS = {
    'path_or_url': test_image_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bytes — a bytes output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a bytes 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
load_image Ran
ran on a synthesized input
itaychachy/RewardSDS/evaluation/clip_eval.py
code served (permissive licence) · get_code("b3be8306c7ad6d6d")
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 Image. 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
from PIL import Image
import numpy as np

# Create a temporary directory and a simple test image
temp_dir = tempfile.mkdtemp()
image_path = os.path.join(temp_dir, "test_image.png")

# Create a simple RGB image and save it
test_image_array = np.random.randint(0, 256, (10, 15, 3), dtype=np.uint8)
test_image = Image.fromarray(test_image_array, mode='RGB')
test_image.save(image_path)

ARGS = {
    'image_path': image_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
load_prompts Ran
ran on a synthesized input
itaychachy/RewardSDS/evaluation/aesthetic_eval.py
code served (permissive licence) · get_code("d98daaa9e9aeb095")
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 json
import tempfile
import os

# Create a temporary JSON file with sample prompts
temp_dir = tempfile.mkdtemp()
json_path = os.path.join(temp_dir, "prompts.json")

sample_data = {
    "prompts": [
        {"id": 1, "text": "What is machine learning?"},
        {"id": 2, "text": "Explain neural networks"}
    ],
    "metadata": {
        "version": "1.0",
        "count": 2
    }
}

with open(json_path, 'w') as f:
    json.dump(sample_data, f)

ARGS = {
    "json_path": json_path
}
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 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
tensor_from_indices Ran
ran on a synthesized input
itaychachy/RewardSDS/2D_experiments/utils.py
code served (permissive licence) · get_code("60276b633c063dec")
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)

# Create a small tensor with distinct dimensions for clarity
tensor = torch.randn(5, 4)

# Test case 1: indices as a single integer (non-tuple case)
indices_single = 0

ARGS = {
    "tensor": tensor,
    "indices": indices_single
}
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
compute_clip_similarity_score Not yet run
unverified (harvested, no recorded run)
itaychachy/RewardSDS/evaluation/clip_eval.py
code served (permissive licence) · get_code("250ca996c68301f2")
How it ran

no invocation recorded.

get_aesthetic_model Not yet run
unverified (harvested, no recorded run)
itaychachy/RewardSDS/2D_experiments/reward_model.py
code served (permissive licence) · get_code("05ea08e55e414c2d")
How it ran

no invocation recorded.

get_aesthetic_model Not yet run
unverified (harvested, no recorded run)
itaychachy/RewardSDS/evaluation/aesthetic_eval.py
code served (permissive licence) · get_code("7e0ccce191ad9bf9")
How it ran

no invocation recorded.

load_image Not yet run
unverified (harvested, no recorded run)
itaychachy/RewardSDS/evaluation/aesthetic_eval.py
code served (permissive licence) · get_code("68fcd95a9ed32977")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 8 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 8 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-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

Score Distillation Sampling (SDS) has emerged as an effective technique for leveraging 2D diffusion priors for tasks such as text-to-3D generation. While powerful, SDS struggles with achieving fine-grained alignment to user intent. To overcome this, we introduce RewardSDS, a novel approach that weights noise samples based on alignment scores from a reward model, producing a weighted SDS loss. This loss prioritizes gradients from noise samples that yield aligned high-reward output. Our approach is broadly applicable and can extend SDS-based methods. In particular, we demonstrate its applicability to Variational Score Distillation (VSD) by introducing RewardVSD. We evaluate RewardSDS and RewardVSD on text-to-image, 2D editing, and text-to-3D generation tasks, showing significant improvements over SDS and VSD on a diverse set of metrics measuring generation quality and alignment to desired reward models, enabling state-of-the-art performance. Project page is available at https://itaychachy.github.io/reward-sds/.

For agents

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

get_harvested_code_for_paper("2503.09601")
get_code_for_paper("2503.09601")
have("2503.09601")

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

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

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

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

Connect an agent — have() is free.