SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2503.04446 · CVPR · 2025

SMTPD: A New Benchmark for Temporal Prediction of Social Media Popularity

Ning Xu, Wei Zhu, Yijie Xu, Chenggang Yan, Anan Liu, Quan Zhang, Bolun Zheng, Hangjia Pan, Yuchen Yao

arXiv · PDF · Open in the Atlas

Code that ran

8 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; 0 honoured the contract we drafted, 0 violated it and 8 have no contract verdict; 0 failures of our instrument; 5 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.04446.json · badge: /api/ran/2503.04446.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
zhuwei321/SMTPD canonical (classifier label)
classifier basis not recorded on the link
8 ran · 5 no recorded run
FunctionStatusWhere it lives
PCA_down Ran
ran on a synthesized input
zhuwei321/SMTPD/tools.py
code served (permissive licence) · get_code("9365e60de0a7c9f0")
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 2, dtype family float, shape (2, 2) 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 numpy as np
from sklearn.decomposition import PCA

torch.manual_seed(0)

# Construct arguments for PCA_down function
# The function expects:
# - weight: array-like, shape (n_samples, n_features) to be transformed
# - dimension: int, the target number of components

# Create a small weight matrix with shape (2, 4)
# This represents 2 samples with 4 features each
weight = np.random.randn(2, 4)

# Set dimension to reduce to (must be less than min(n_samples, n_features))
dimension = 2

ARGS = {
    "weight": weight,
    "dimension": dimension
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 2) — shape (2, 2) 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
TFIDF Ran
ran on a synthesized input
zhuwei321/SMTPD/tools.py
code served (permissive licence) · get_code("79473b1fae5500cb")
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 2, dtype family float, shape (2, 10) 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 numpy as np
from sklearn.feature_extraction.text import TfidfVectorizer

# The function takes a single parameter 'text' which should be an iterable of strings
# The function calls vectorizer.fit_transform(text).toarray() on it
# So text needs to be a collection of text documents (strings)

text = [
    "hello world this is a test",
    "another document with some words"
]

ARGS = {
    "text": text
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 10) — shape (2, 10) 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_examples_to_features Ran
ran on a synthesized input
zhuwei321/SMTPD/smp_model.py
code served (permissive licence) · get_code("94cb461ef88a9c6e")
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
import numpy as np

class MockTokenizer:
    """Stand-in tokenizer with required methods."""
    
    def tokenize(self, text):
        """Split text into tokens."""
        words = text.split()
        return words
    
    def convert_tokens_to_ids(self, tokens):
        """Convert tokens to token IDs."""
        # Simple mapping: assign each unique token an ID
        token_to_id = {
            '[CLS]': 101,
            '[SEP]': 102,
            'hello': 1000,
            'world': 1001,
            'this': 1002,
            'is': 1003,
            'a': 1004,
            'test': 1005,
        }
        ids = []
        for token in tokens:
            ids.append(token_to_id.get(token, 999))
        return ids


tokenizer = MockTokenizer()

examples = [
    "hello world",
    "this is a test"
]

seq_length = 8

ARGS = {
    "examples": examples,
    "seq_length": seq_length,
    "tokenizer": tokenizer
}
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 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
count_columns Ran
ran on a synthesized input
zhuwei321/SMTPD/rewrite_s.py
code served (permissive licence) · get_code("6909ad6d938fe111")
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 pandas as pd
import numpy as np
import tempfile
import os

# Create a temporary CSV file for the function to read
temp_dir = tempfile.mkdtemp()
csv_path = os.path.join(temp_dir, "test.csv")

# Write a simple CSV with multiple columns
data = {
    'col0': [1, 2, 3],
    'col1': [4, 5, 6],
    'col2': [7, 8, 9],
    'col3': [10, 11, 12]
}
df = pd.DataFrame(data)
df.to_csv(csv_path, header=False, index=False)

ARGS = {
    'path': csv_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — 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
mape Ran
ran on a synthesized input
zhuwei321/SMTPD/utils.py
code served (permissive licence) · get_code("d625b0d73ff5f604")
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

# Create small numpy arrays for actual and predicted values
actual = np.array([100.0, 200.0, 150.0, 300.0])
pred = np.array([110.0, 190.0, 160.0, 290.0])

ARGS = {
    "actual": actual,
    "pred": pred
}
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
not_nan Ran
ran on a synthesized input
zhuwei321/SMTPD/rewrite_s.py
code served (permissive licence) · get_code("d784a6ef2632f738")
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 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 torch
import numpy as np

def not_nan(s):
    try:
        f = float(s)
        if f != f or f == float('inf') or f == float('-inf'):
            return False
        return True
    except ValueError:
        return False

# The function takes a single parameter 's' which is converted to float
# Valid inputs include: int, float, str representation of number, numpy scalar, etc.
# We'll test with a simple numeric string value

ARGS = {
    "s": "3.14"
}
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 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
test Ran
ran on a synthesized input
zhuwei321/SMTPD/fe.py
code served (permissive licence) · get_code("14b2d03f943acced")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
from unittest.mock import MagicMock

torch.manual_seed(0)

# Define a minimal model that accepts img, text, meta
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, img, text, meta):
        # img: (batch, 4), text: list, meta: (batch, 4)
        # Combine img and meta, pass through linear layer
        combined = torch.cat([img, meta], dim=1)  # (batch, 8)
        out = self.linear(combined[:, :4])  # (batch, 3)
        return out

# Create a minimal test loader
def create_test_loader():
    batch_size = 2
    loader = []
    for _ in range(2):
        batch = {
            'img': torch.randn(batch_size, 4),
            'text': ['sample text 1', 'sample text 2'],
            'meta': torch.randn(batch_size, 4),
            'label': torch.randn(batch_size, 3),
            'id': ['id_1', 'id_2']
        }
        loader.append(batch)
    return loader

# Mock print_output_seq function
def print_output_seq(labels, preds):
    return {"labels": labels, "preds": preds}

# Patch the function's reference to print_output_seq
import sys
current_module = sys.modules[__name__]
setattr(current_module, 'print_output_seq', print_output_seq)

# Create args object
class Args:
    def __init__(self):
        self.write = False
        self.result_file = '/tmp/results.csv'

# Build the ARGS dictionary
ARGS = {
    'args': Args(),
    'model': MinimalModel(),
    'test_loader': create_test_loader()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm — 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
time2hours Ran
ran on a synthesized input
zhuwei321/SMTPD/tools.py
code served (permissive licence) · get_code("e2ed13c765a8fe8c")
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 time

ARGS = {
    'time1': '2024/01/15 08:30:45',
    'time2': '2024/01/15 10:45:30'
}
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 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
bert_feature Not yet run
unverified (harvested, no recorded run)
zhuwei321/SMTPD/smp_model.py
code served (permissive licence) · get_code("b3d65bd9032a7e9d")
How it ran

no invocation recorded.

ft_feature Not yet run
unverified (harvested, no recorded run)
zhuwei321/SMTPD/smp_model.py
code served (permissive licence) · get_code("d3f56df2d76b627f")
How it ran

no invocation recorded.

load_data Not yet run
unverified (harvested, no recorded run)
zhuwei321/SMTPD/fe.py
code served (permissive licence) · get_code("dd9ced4c33b3b7df")
How it ran

no invocation recorded.

load_data Not yet run
unverified (harvested, no recorded run)
zhuwei321/SMTPD/main_bili.py
code served (permissive licence) · get_code("5951718c3f44c934")
How it ran

no invocation recorded.

val_and_save Not yet run
unverified (harvested, no recorded run)
zhuwei321/SMTPD/cb.py
code served (permissive licence) · get_code("175ab7f7669d573c")
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, 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 13 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

Social media popularity prediction task aims to predict the popularity of posts on social media platforms, which has a positive driving effect on application scenarios such as content optimization, digital marketing and online advertising. Though many studies have made significant progress, few of them pay much attention to the integration between popularity prediction with temporal alignment. In this paper, with exploring YouTube's multilingual and multi-modal content, we construct a new social media temporal popularity prediction benchmark, namely SMTPD, and suggest a baseline framework for temporal popularity prediction. Through data analysis and experiments, we verify that temporal alignment and early popularity play crucial roles in social media popularity prediction for not only deepening the understanding of temporal dynamics of popularity in social media but also offering a suggestion about developing more effective prediction models in this field. Code is available at https://github.com/zhuwei321/SMTPD

For agents

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

get_harvested_code_for_paper("2503.04446")
get_code_for_paper("2503.04446")
have("2503.04446")

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

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

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

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

Connect an agent — have() is free.