SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2604.02355 · 2026

From Broad Exploration to Stable Synthesis: Entropy-Guided Optimization for Autoregressive Image Generation

Yu Cheng, Han Song, Kong, Jianbing Shen, Yucheng Zhou

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 0 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/2604.02355.json · badge: /api/ran/2604.02355.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
minebetter/EG-GRPO canonical (classifier label)
classifier basis: census
6 ran · 0 no recorded run
FunctionStatusWhere it lives
create_grid_with_captions Ran
ran; our contract draft was wrong, not the code
minebetter/EG-GRPO/src/eg-grpo/src/infer/reason_inference.py
code served (permissive licence) · get_code("142b5a790d0a0a45")
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 torch
import numpy as np
import os
import tempfile
from PIL import Image

torch.manual_seed(0)

# Create temporary directory for saving
temp_dir = tempfile.mkdtemp()

# Create sample images as numpy arrays (small 64x64 RGB images)
visual_img = [
    np.random.randint(0, 256, (64, 64, 3), dtype=np.uint8) for _ in range(4)
]

# Create captions for each image
answer_list = [
    "This is the first generated image with a caption",
    "Second image caption here",
    "A longer caption text that might wrap to multiple lines when displayed",
    "Short caption"
]

# Define arguments
ARGS = {
    'visual_img': visual_img,
    'answer_list': answer_list,
    'save_dir': temp_dir,
    'prompt_text': 'test_prompt_text',
    'num_generation': 4
}
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 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
get_caption_height Ran
ran, honoured the contract we drafted
minebetter/EG-GRPO/src/eg-grpo/src/infer/reason_inference.py
code served (permissive licence) · get_code("dd52eb593f187038")
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 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.

from PIL import Image, ImageDraw, ImageFont

# Create a simple test image
img = Image.new('RGB', (800, 600), color='white')
draw = ImageDraw.Draw(img)

# Create a font object - use default font
try:
    font = ImageFont.load_default()
except:
    # Fallback: create a mock font object with required attributes
    class MockFont:
        def __init__(self):
            self.size = 14
    font = MockFont()

# Test text
text = "This is a sample caption text that will be wrapped across multiple lines based on the image width"

# Image width
img_width = 400

ARGS = {
    'text': text,
    'font': font,
    'img_width': img_width,
    'draw': draw
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
PIL — 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
is_duplicate Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
minebetter/EG-GRPO/src/eg-grpo/src/utils/reward_gdino.py
code served (permissive licence) · get_code("5b210be39523ed69")
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.

# Setup code for is_duplicate function

# The function takes two bounding boxes as arguments
# Each bbox is a tuple/list of 4 coordinates: (x1, y1, x2, y2)
# The function computes IoU (Intersection over Union) and checks for duplicates

# Example bounding boxes that represent overlapping regions
bbox1 = (10, 20, 50, 60)  # (x1, y1, x2, y2)
bbox2 = (15, 25, 55, 65)  # Slightly offset, should have high IoU

ARGS = {
    "bbox1": bbox1,
    "bbox2": bbox2,
}
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_detection_prompt Ran
ran; our contract draft was wrong, not the code
minebetter/EG-GRPO/src/eg-grpo/src/open_r1/eg_grpo.py
code served (permissive licence) · get_code("b08542a34054013e")
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. 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 numpy as np

torch.manual_seed(0)

# The function takes a list of nouns (strings) and processes them
# to create a detection prompt and token spans

ARGS = {
    'nouns': ['cat', 'dog', 'happy bird']
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple 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
plot_boxes_to_image Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
minebetter/EG-GRPO/src/eg-grpo/src/utils/reward_gdino.py
code served (permissive licence) · get_code("e0510cde3f4b5a14")
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. 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
from PIL import Image, ImageDraw, ImageFont
import numpy as np

torch.manual_seed(0)
np.random.seed(0)

# Create a small PIL image
image_pil = Image.new('RGB', (640, 480), color=(255, 255, 255))

# Create target dictionary with required keys
tgt = {
    'size': (480, 640),  # H, W
    'boxes': torch.tensor([
        [0.2, 0.3, 0.1, 0.15],
        [0.7, 0.6, 0.15, 0.2]
    ]),
    'labels': [1, 2]
}

ARGS = {
    'image_pil': image_pil,
    'tgt': tgt
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple 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
split_prompts Ran
ran; our contract draft was wrong, not the code
minebetter/EG-GRPO/src/eg-grpo/src/analysis/batch_inference_analysis.py
code served (permissive licence) · get_code("d30936dc2e3a8a96")
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 2, 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)

# Analyze the function:
# - prompts: needs to support len() and slicing with [i:j]
# - world_size: an integer
# The function splits a list of prompts into world_size chunks

# Create sample prompts as a list of strings
prompts = [
    "What is your name?",
    "How are you?",
    "Tell me a story",
    "Explain quantum physics",
    "Write a poem",
    "Summarize this text"
]

world_size = 3

ARGS = {
    "prompts": prompts,
    "world_size": world_size
}
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 2, 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

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 0 later) and 4 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
plot_boxes_to_image 3 other papers
3 dated earlier
2305.01586 (2023-05)
An Alternative to WSSS? An Empirical Study of the Segment Anything Model (SAM) on Weakly-Supervised Semantic Segmentation Problems
2310.13398 (2023-10)
OpenAnnotate3D: Open-Vocabulary Auto-Labeling System for Multi-modal 3D Data
2410.12369 (2024-10)
Context-Infused Visual Grounding for Art
get_caption_height 2 other papers
2 dated earlier
2501.13926 (2025-01)
Can We Generate Images with CoT? Let's Verify and Reinforce Image Generation Step by Step
2505.00703 (2025-05)
T2I-R1: Reinforcing Image Generation with Collaborative Semantic-level and Token-level CoT

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

Combining Chain-of-Thought (CoT) with Reinforcement Learning (RL) improves text-to-image (T2I) generation, yet the underlying interaction between CoT's exploration and RL's optimization remains unclear. We present a systematic entropybased analysis that yields three key insights: (1) CoT expands the generative exploration space, while RL contracts it toward high-reward regions; (2) final reward is strongly negatively correlated with both the mean and variance of imagetoken entropy, highlighting the need to reduce uncertainty and instability; and (3) the entropy of the textual CoT directly governs downstream image quality, with lower-entropy CoTs leading to better generations. Motivated by these findings, we propose Entropy-Guided Group Relative Policy Optimization (EG-GRPO), a fine-tuning strategy that reallocates optimization budget by uncertainty: lowentropy tokens are excluded from reward-driven updates to preserve stability, while high-entropy tokens receive an entropy bonus that encourages structured exploration without collapse. Experiments on standard T2I benchmarks demonstrate that EG-GRPO achieves state-of-the-art performance. Our code is available at https://github.com/minebetter/EG-GRPO.

For agents

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

get_harvested_code_for_paper("2604.02355")
get_code_for_paper("2604.02355")
have("2604.02355")

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

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

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

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

Connect an agent — have() is free.