SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2508.05417 · ICML · 2025

Smoothing Slot Attention Iterations and Recurrences

Joni Pajarinen, Juho Kannala, Rongzhen Zhao, Wenyan Yang

arXiv · PDF · Open in the Atlas

Code that ran

1 of 1 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 0 failures of our instrument; 0 no recorded run), measured 2026-11-24; 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/2508.05417.json · badge: /api/ran/2508.05417.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
Genera1Z/SmoothSA community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
SmoothSA Ran
ran on a synthesized input · constructed an object; no result was computed
Genera1Z/SmoothSA/object_centric_bench/model/smoothsa.py
code served (permissive licence) · get_code("a930bb5d067d9133")
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 an instance of its own class, SmoothSA: the run constructed the object and did not call it, so no result was computed. 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
from einops import rearrange

torch.manual_seed(0)

# Small stand-in modules for each component

class EncodeBackbone(nn.Module):
    """Extracts features from input image"""
    def __init__(self):
        super().__init__()
        self.conv = nn.Conv2d(3, 4, kernel_size=1)
    
    def forward(self, x):
        return self.conv(x)

class EncodePositEmbed(nn.Module):
    """Adds positional embeddings"""
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, x):
        return self.linear(x)

class EncodeProject(nn.Module):
    """Projects encoded features"""
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, x):
        return self.linear(x)

class Initializ(nn.Module):
    """Initializes query slots"""
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, encode, condit):
        # Returns (qinit, query)
        query = self.linear(encode.mean(dim=1, keepdim=True))  # (b, 1, 4)
        query = query.expand(-1, 3, -1)  # (b, 3, 4) - 3 slots
        qinit = query.clone()
        return qinit, query

class Aggregat(nn.Module):
    """Aggregates attention over slots"""
    def __init__(self):
        super().__init__()
        self.gru = nn.GRUCell(4, 4)
    
    def forward(self, encode, query):
        # encode: (b, hw, 4), query: (b, n_slots, 4)
        b, hw, c = encode.shape
        n_slots = query.shape[1]
        
        # Compute attention scores
        scores = torch.matmul(query, encode.transpose(1, 2))  # (b, n_slots, hw)
        attenta = torch.softmax(scores, dim=-1)
        
        # Aggregate
        slotz = torch.matmul(attenta, encode)  # (b, n_slots, c)
        
        return slotz, attenta

class Decode(nn.Module):
    """Decodes slots back to image space"""
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, clue, slotz):
        # clue: (b, hw, c), slotz: (b, n_slots, c)
        b, hw, c = clue.shape
        n_slots = slotz.shape[1]
        
        # Reconstruct
        recon = clue.unsqueeze(1).expand(-1, n_slots, -1, -1)  # (b, n_slots, hw, c)
        recon = recon.reshape(b * n_slots, hw, c)
        recon = self.linear(recon)
        recon = recon.reshape(b, n_slots, hw, c)
        recon = recon.mean(dim=1)  # (b, hw, c)
        
        # Attention for decode
        attentd = torch.ones(b, n_slots, hw, device=clue.device) / hw
        
        return recon, attentd

# Construct arguments
ARGS = {
    'encode_backbone': EncodeBackbone(),
    'encode_posit_embed': EncodePositEmbed(),
    'encode_project': EncodeProject(),
    'initializ': Initializ(),
    'aggregat': Aggregat(),
    'decode': Decode(),
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SmoothSA — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SmoothSA 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

Also present in other papers' code

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

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Slot Attention (SA) lies at the heart of mainstream Object-Centric Learning (OCL). Image features can be aggregated into object-level representations by SA iteratively refining cold-start query slots. For video, such aggregation proceeds by SA recurrently shared across frames, with queries cold-started on the first frame while transitioned from the previous frame's slots thereafter. However, cold-start queries lack samplespecific cues thus hindering precise aggregation on image or video's first frame; Non-first frames' queries are already sample-specific thus requiring aggregation transforms different from the first frame. We address these issues with our SmoothSA: (1) To smooth SA iterations on image or video's first frame, we preheat cold-start queries with rich input-feature information, by a tiny module self-distilled inside OCL; (2) To smooth SA recurrences across video's first and non-first frames, we differentiate the homogeneous aggregation transforms by using full and single iterations respectively. Comprehensive experiments on object discovery, recognition and visual reasoning validate our method's effectiveness. Further visual analyses illuminate the underline mechanisms. Our source code, model checkpoints and training logs are provided on https://github.com/Genera1Z/SmoothSA.

For agents

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

get_harvested_code_for_paper("2508.05417")
get_code_for_paper("2508.05417")
have("2508.05417")

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

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

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

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

Connect an agent — have() is free.