SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2503.09679 · NeurIPS · 2025

DRESS: Disentangled Representation-based Self-Supervised Meta-Learning for Diverse Tasks

Jesse Cresswell, Yi Sui, Tongzi Wu, Wei Cui

arXiv · PDF · Open in the Atlas

Code that ran

5 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 2 failures of our instrument; 6 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.09679.json · badge: /api/ran/2503.09679.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
layer6ai-labs/DRESS marked official in Papers with Code
Papers with Code archive
4 ran · 5 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 1 no recorded run
FunctionStatusWhere it lives
QKVAttention Ran
ran on a synthesized input · constructed an object; no result was computed
layer6ai-labs/DRESS/encoders/diti.py
code served (permissive licence) · get_code("b22fdd4994990f4f")
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, QKVAttention: 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
import math

torch.manual_seed(0)

class QKVAttention(nn.Module):
    """
    A module which performs QKV attention and splits in a different order.
    """

    def __init__(self, n_heads):
        super().__init__()
        self.n_heads = n_heads

    def forward(self, qkv):
        """
        Apply QKV attention.
        :param qkv: an [N x (3 * H * C) x T] tensor of Qs, Ks, and Vs.
        :return: an [N x (H * C) x T] tensor after attention.
        """
        bs, width, length = qkv.shape
        assert width % (3 * self.n_heads) == 0
        ch = width // (3 * self.n_heads)
        q, k, v = qkv.chunk(3, dim=1)
        scale = 1 / math.sqrt(math.sqrt(ch))
        weight = torch.einsum('bct,bcs->bts', (q * scale).view(bs * self.n_heads, ch, length), (k * scale).view(bs * self.n_heads, ch, length))
        weight = torch.softmax(weight, dim=-1)
        a = torch.einsum('bts,bcs->bct', weight, v.reshape(bs * self.n_heads, ch, length))
        return a.reshape(bs, -1, length)


# Create valid arguments for QKVAttention
n_heads = 2
batch_size = 2
head_dim = 4
seq_length = 3
width = 3 * n_heads * head_dim

# Create a random QKV tensor of shape [batch_size, 3 * n_heads * head_dim, seq_length]
qkv_tensor = torch.randn(batch_size, width, seq_length)

ARGS = {
    "n_heads": n_heads,
}
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 QKVAttention — 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 QKVAttention 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
QKVAttentionLegacy Ran
ran on a synthesized input · constructed an object; no result was computed
layer6ai-labs/DRESS/encoders/diti.py
code served (permissive licence) · get_code("56122d5495b08e3f")
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, QKVAttentionLegacy: 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 math
import torch
import torch.nn as nn

torch.manual_seed(0)

# QKVAttentionLegacy.__init__ takes n_heads
# QKVAttentionLegacy.forward takes qkv tensor of shape [N x (H * 3 * C) x T]

# Let's choose:
# n_heads = 2
# C (channel per head) = 4
# N (batch size) = 2
# T (sequence length) = 3
# width = H * 3 * C = 2 * 3 * 4 = 24

n_heads = 2
ch = 4
bs = 2
length = 3
width = n_heads * 3 * ch  # 2 * 3 * 4 = 24

# Create qkv tensor: [N x (H * 3 * C) x T]
qkv = torch.randn(bs, width, length)

ARGS = {
    "n_heads": n_heads,
}
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 QKVAttentionLegacy — 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 QKVAttentionLegacy 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
View Ran
ran on a synthesized input · constructed an object; no result was computed
layer6ai-labs/DRESS/encoders/diti.py
code served (permissive licence) · get_code("a5788ad13b47f3b3")
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, View: 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

torch.manual_seed(0)

# The View module takes a 'size' parameter in __init__
# In forward, it calls input.view(self.size) where input is a tensor
# So size should be a tuple or list representing the target shape

# Create a small tensor with shape (2, 4) to test with
input_tensor = torch.randn(2, 4)

# Define the target size for the view operation
# We'll reshape from (2, 4) to (4, 2)
target_size = (4, 2)

ARGS = {
    "size": target_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 View — 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 View 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
normalization Ran
ran; our contract draft was wrong, not the code
layer6ai-labs/DRESS/encoders/diti.py
code served (permissive licence) · get_code("992e95480b7cbca2")
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 GroupNorm. 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

torch.manual_seed(0)

# The normalization function takes a single parameter: channels (int)
# It creates a GroupNorm layer with 32 groups and the specified number of channels
# We need to provide a valid number of channels

ARGS = {
    "channels": 64
}
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 GroupNorm — a GroupNorm output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a GroupNorm 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
zero_module Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from andreasfloros/cascaded-wavelet-diffusion
pointer only · get_code("129b804760b3115f")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

AttentionBlock Not yet run
unverified (harvested, no recorded run)
layer6ai-labs/DRESS/encoders/diti.py
code served (permissive licence) · get_code("f6b39d2739468aaf")
How it ran

no invocation recorded.

DiTi Not yet run
unverified (harvested, no recorded run)
layer6ai-labs/DRESS/encoders/diti.py
code served (permissive licence) · get_code("53af6e132f2045c0")
How it ran

no invocation recorded.

DiTiCELEBAEncoder Not yet run
unverified (harvested, no recorded run)
layer6ai-labs/DRESS/encoders/diti.py
code served (permissive licence) · get_code("b2bebacdf89de0ec")
How it ran

no invocation recorded.

_get_mask_end_dim Not yet run
unverified (harvested, no recorded run)
layer6ai-labs/DRESS/encoders/diti.py
code served (permissive licence) · get_code("d241c9856ac78e53")
How it ran

no invocation recorded.

construct_latent_groups Not yet run
unverified (harvested, no recorded run)
layer6ai-labs/DRESS/encoders/diti.py
code served (permissive licence) · get_code("3c3e6fb356a512b8")
How it ran

no invocation recorded.

conv_nd Not yet run
unverified (harvested, no recorded run)
this paper's copy was not recorded; identical code first harvested from andreasfloros/cascaded-wavelet-diffusion
pointer only · get_code("fe4eb545bbb728e0")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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. No invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 2 the same month, 3 later) and 5 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
zero_module
brick of this paper's assembly: helper
196 other papers
170 dated earlier, 4 the same month, 21 later, 1 same year, order not determinable · 49 only as an assembly brick
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2105.05233 (2021-05)
Diffusion Models Beat GANs on Image Synthesis
and 193 more not named here
conv_nd
brick of this paper's assembly: helper
121 other papers
109 dated earlier, 2 the same month, 10 later · 32 only as an assembly brick
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
and 118 more not named here
AttentionBlock
brick of this paper's assembly: model
3 other papers
2 dated earlier, 1 later
2212.12990 (2022-12)
Unsupervised Representation Learning from Pre-trained Diffusion Probabilistic Models
2303.01469 (2023-03)
Consistency Models
2505.07071 (2025-05)
Semantic-Guided Diffusion Model for Single-Step Image Super-Resolution
QKVAttention
brick of this paper's assembly: helper
2 other papers
2 dated earlier · 1 only as an assembly brick
2212.12990 (2022-12)
Unsupervised Representation Learning from Pre-trained Diffusion Probabilistic Models
2303.01469 (2023-03)
Consistency Models
QKVAttentionLegacy
brick of this paper's assembly: helper
2 other papers
2 dated earlier
2212.12990 (2022-12)
Unsupervised Representation Learning from Pre-trained Diffusion Probabilistic Models
2303.01469 (2023-03)
Consistency Models
normalization
brick of this paper's assembly: helper
2 other papers
2 dated earlier
2212.12990 (2022-12)
Unsupervised Representation Learning from Pre-trained Diffusion Probabilistic Models
2303.01469 (2023-03)
Consistency Models

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

Meta-learning represents a strong class of approaches for solving few-shot learning tasks. Nonetheless, recent research suggests that simply pre-training a generic encoder can potentially surpass meta-learning algorithms. In this paper, we hypothesize that the reason meta-learning fails to stand out in popular few-shot learning benchmarks is the lack of diversity among the few-shot learning tasks. We propose DRESS, a task-agnostic Disentangled REpresentation-based Self-Supervised meta-learning approach that enables fast model adaptation on highly diversified few-shot learning tasks. Specifically, DRESS utilizes disentangled representation learning to create self-supervised tasks that can fuel the metatraining process. We validate the effectiveness of DRESS through experiments on datasets with multiple factors of variation and varying complexity. The results suggest that DRESS is able to outperform competing methods on the majority of the datasets and task setups. Through this paper, we advocate for a re-examination of how task adaptation studies are conducted, and aim to reignite interest in the potential of meta-learning for solving few-shot learning tasks via disentangled representations.

For agents

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

get_harvested_code_for_paper("2503.09679")
get_code_for_paper("2503.09679")
have("2503.09679")

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

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

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

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

Connect an agent — have() is free.