SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2008.02693 · 2020

Fashion Captioning: Towards Generating Accurate Descriptions with Semantic Rewards

arXiv · PDF · Open in the Atlas

Code that ran

8 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; 1 honoured the contract we drafted, 2 violated it and 0 have no contract verdict; 5 failures of our instrument; 0 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/2008.02693.json · badge: /api/ran/2008.02693.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
xuewyang/Fashion-Image-Captioning-Benchmark community (classifier label)
classifier basis not recorded on the link
8 ran · 0 no recorded run
FunctionStatusWhere it lives
attention Ran
ran; our contract draft was wrong, not the code
xuewyang/Fashion-Image-Captioning-Benchmark/captioning/models/TransformerModel.py
code served (permissive licence) · get_code("269003e7c21d565d")
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 torch.nn as nn
import math

torch.manual_seed(0)

# Create small tensors for attention computation
# query, key, value should have shape (batch, seq_len, d_k)
batch_size = 2
seq_len = 3
d_k = 4

query = torch.randn(batch_size, seq_len, d_k)
key = torch.randn(batch_size, seq_len, d_k)
value = torch.randn(batch_size, seq_len, d_k)

# Create a mask (optional parameter)
# mask should be broadcastable to (batch, seq_len, seq_len)
mask = torch.ones(batch_size, seq_len, seq_len)

# Create a dropout layer (optional parameter)
# The function calls dropout(p_attn), so it needs to be callable
dropout = nn.Dropout(p=0.1)

ARGS = {
    "query": query,
    "key": key,
    "value": value,
    "mask": mask,
    "dropout": dropout
}
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 — 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
clones Ran
ran; our contract draft was wrong, not the code
xuewyang/Fashion-Image-Captioning-Benchmark/captioning/models/TransformerModel.py
code served (permissive licence) · get_code("a3722169bbc81569")
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 ModuleList. 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
import copy

torch.manual_seed(0)

# Create a simple module to clone
class SimpleModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

module = SimpleModule()
N = 5

ARGS = {
    "module": module,
    "N": N
}
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 ModuleList — a ModuleList output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ModuleList output the recorded ndim 1 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
pack_wrapper Ran
ran; our contract draft was wrong, not the code
xuewyang/Fashion-Image-Captioning-Benchmark/captioning/models/AttModel.py
code served (permissive licence) · get_code("d2379d710eedc4ae")
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 3, dtype family float, shape (2, 5, 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
import torch.nn as nn
from torch.nn.utils.rnn import PackedSequence, pack_padded_sequence, pad_packed_sequence

torch.manual_seed(0)

# Create a simple module that processes packed sequences
class SimpleModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, x):
        # x is the data from a PackedSequence
        return self.linear(x)

# Create test data
batch_size = 2
feature_dim = 4
max_seq_len = 5

# att_feats: (batch_size, max_seq_len, feature_dim)
att_feats = torch.randn(batch_size, max_seq_len, feature_dim)

# att_masks: (batch_size, max_seq_len) with 1s for valid positions, 0s for padding
# Different lengths for each sample: first has 5 valid, second has 3 valid
att_masks = torch.tensor([
    [1, 1, 1, 1, 1],
    [1, 1, 1, 0, 0]
], dtype=torch.float32)

# Create module
module = SimpleModule()

ARGS = {
    "module": module,
    "att_feats": att_feats,
    "att_masks": att_masks
}
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 3, dtype family float, shape (2, 5, 4) — shape (2, 5, 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
pad_unsort_packed_sequence Ran
ran; our contract draft was wrong, not the code
xuewyang/Fashion-Image-Captioning-Benchmark/captioning/models/AttModel.py
code served (permissive licence) · get_code("bfac58a04b6835f5")
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 3, dtype family float, shape (2, 4, 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
from torch.nn.utils.rnn import pack_padded_sequence

torch.manual_seed(0)

# Create a simple packed sequence
# We need: batch_size=2, sequence_length=4, input_size=3
batch_size = 2
seq_length = 4
input_size = 3

# Create input tensor (seq_length, batch_size, input_size)
data = torch.randn(seq_length, batch_size, input_size)

# Create lengths for each sequence in the batch
lengths = torch.tensor([4, 3], dtype=torch.long)

# Pack the sequence
packed_input = pack_padded_sequence(data, lengths, enforce_sorted=False)

# Create inverse indices for unsorting
# pack_padded_sequence with enforce_sorted=False returns sorted_indices
# We need the inverse permutation to unsort
sorted_indices = packed_input.sorted_indices
inv_ix = torch.argsort(sorted_indices)

ARGS = {
    "input": packed_input,
    "inv_ix": inv_ix
}
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 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 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
repeat_tensors Ran
ran, honoured the contract we drafted
xuewyang/Fashion-Image-Captioning-Benchmark/captioning/models/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from cuhksz-nlp/R2Gen, is pointer only (licence: NONE) · get_code("b317109a6e9a36e3")
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 cuhksz-nlp/R2Gen, 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.

sort_pack_padded_sequence Ran
ran; our contract draft was wrong, not the code
xuewyang/Fashion-Image-Captioning-Benchmark/captioning/models/AttModel.py
code served (permissive licence) · get_code("e56d2f9cbd9cb8b1")
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 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 torch.nn.utils.rnn import pack_padded_sequence

torch.manual_seed(0)

# Create a small batch of padded sequences
# batch_size=2, max_seq_length=3, embedding_dim=4
batch_size = 2
max_seq_length = 3
embedding_dim = 4

input_tensor = torch.randn(batch_size, max_seq_length, embedding_dim)
lengths = torch.tensor([3, 2], dtype=torch.long)

ARGS = {
    "input": input_tensor,
    "lengths": lengths,
}
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 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_tensors Ran
ran, violated the contract we drafted
xuewyang/Fashion-Image-Captioning-Benchmark/captioning/models/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from cuhksz-nlp/R2Gen, is pointer only (licence: NONE) · get_code("936178513bc7b9d7")
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 cuhksz-nlp/R2Gen, 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.

subsequent_mask Ran
ran, violated the contract we drafted
xuewyang/Fashion-Image-Captioning-Benchmark/captioning/models/TransformerModel.py
pointer only (licence: MIT); the stored copy get_code serves, from ruotianluo/Transformer_Captioning, is pointer only (licence: NONE) · get_code("dd03765c7da9ca51")
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 ruotianluo/Transformer_Captioning, 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.

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 (5 with at least one paper dated earlier, 0 the same month, 8 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
clones 79 other papers
24 dated earlier, 55 later · 11 only as an assembly brick
1411.4555 (2014-11)
Show and Tell: A Neural Image Caption Generator
1612.00563 (2016-12)
Self-critical Sequence Training for Image Captioning
1706.03762 (2017-06)
Attention Is All You Need
and 76 more not named here
subsequent_mask 21 other papers
9 dated earlier, 12 later
1411.4555 (2014-11)
Show and Tell: A Neural Image Caption Generator
1612.00563 (2016-12)
Self-critical Sequence Training for Image Captioning
1707.07998 (2017-07)
Bottom-Up and Top-Down Attention for Image Captioning and Visual Question Answering
and 18 more not named here
pad_unsort_packed_sequence 14 other papers
7 dated earlier, 7 later · 2 only as an assembly brick
1612.00563 (2016-12)
Self-critical Sequence Training for Image Captioning
1707.07998 (2017-07)
Bottom-Up and Top-Down Attention for Image Captioning and Visual Question Answering
1906.05963 (2019-06)
Image Captioning: Transforming Objects into Words
and 11 more not named here
pack_wrapper 13 other papers
6 dated earlier, 7 later · 2 only as an assembly brick
1612.00563 (2016-12)
Self-critical Sequence Training for Image Captioning
1707.07998 (2017-07)
Bottom-Up and Top-Down Attention for Image Captioning and Visual Question Answering
1906.05963 (2019-06)
Image Captioning: Transforming Objects into Words
and 10 more not named here
sort_pack_padded_sequence 10 other papers
6 dated earlier, 4 later · 2 only as an assembly brick
1612.00563 (2016-12)
Self-critical Sequence Training for Image Captioning
1707.07998 (2017-07)
Bottom-Up and Top-Down Attention for Image Captioning and Visual Question Answering
1906.05963 (2019-06)
Image Captioning: Transforming Objects into Words
and 7 more not named here
attention 5 other papers
5 later
2021.acl-long.459 (2021 (year only))
Cross-modal Memory Networks for Radiology Report Generation
2403.05396 (2024-03)
HistGen: Histopathology Report Generation via Local-Global Feature Encoding and Cross-modal Context Interaction
2404.13039 (2024-04)
LaPA: Latent Prompt Assist Model For Medical Visual Question Answering
and 2 more not named here
split_tensors 2 other papers
2 later
2010.16056 (2020-10)
Generating Radiology Reports via Memory-driven Transformer
2110.03298 (2021-10)
End-to-End Supermask Pruning: Learning to Prune Image Captioning Models
repeat_tensors 1 other paper
1 later
2010.16056 (2020-10)
Generating Radiology Reports via Memory-driven Transformer

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

Generating accurate descriptions for online fashion items is important not only for enhancing customers' shopping experiences, but also for the increase of online sales. Besides the need of correctly presenting the attributes of items, the expressions in an enchanting style could better attract customer interests. The goal of this work is to develop a novel learning framework for accurate and expressive fashion captioning. Different from popular work on image captioning, it is hard to identify and describe the rich attributes of fashion items. We seed the description of an item by first identifying its attributes, and introduce attribute-level semantic (ALS) reward and sentence-level semantic (SLS) reward as metrics to improve the quality of text descriptions. We further integrate the training of our model with maximum likelihood estimation (MLE), attribute embedding, and Reinforcement Learning (RL). To facilitate the learning, we build a new FAshion CAptioning Dataset (FACAD), which contains 993K images and 130K corresponding enchanting and diverse descriptions. Experiments on FACAD demonstrate the effectiveness of our model.

For agents

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

get_harvested_code_for_paper("2008.02693")
get_code_for_paper("2008.02693")
have("2008.02693")

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

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

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

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

Connect an agent — have() is free.