SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.06976 · NeurIPS · 2024

Discrete Dictionary-based Decomposition Layer for Structured Representation Learning

Taewon Park, Minho Lee, Hyun-Chul Kim

arXiv · PDF · Open in the Atlas

Code that ran

10 of 14 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; 5 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 4 failures of our instrument; 4 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/2406.06976.json · badge: /api/ran/2406.06976.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
taewonpark/D3 canonical (classifier label)
classifier basis: census
8 ran · 3 no recorded run
taewonpark/d3 canonical (classifier label)
classifier basis: classifier_2025
2 ran · 1 no recorded run
FunctionStatusWhere it lives
HashingSymbol Ran
ran on a synthesized input
taewonpark/d3/SARtask/models/D3_wF.py
code served (permissive licence) · get_code("2fb8cf3ccb006b0e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, 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

INIT_ARGS = {
    'input_dim': 8,
    'mem_size': 12,
    'slot_size': 16,
    'binding_num_slots': 3,
    'reasoning_num_slots': 2,
    'n_keys': 32,
    'top_k': 4
}

ARGS = {
    'input': torch.randn(2, 5, 8),
    'flag': 'binding'
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
build_ood_binary_dataset Ran
ran; our contract draft was wrong, not the code
taewonpark/D3/Sort-of-CLEVR/sort_of_clevr_generator.py
code served (permissive licence) · get_code("42d8383d870245ac")
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 cv2
import numpy as np
import random

# Set seed for reproducibility
random.seed(0)
np.random.seed(0)

ARGS = {
    "is_train": True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — 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
center_generate Ran
ran, honoured the contract we drafted
taewonpark/D3/Sort-of-CLEVR/sort_of_clevr_generator.py
code served (permissive licence) · get_code("a0bf524db1b20389")
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 1, dtype family int, shape (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 numpy as np

np.random.seed(0)

# The function center_generate takes 'objects' as a parameter
# Looking at the function body:
# - It iterates over objects (if len(objects) > 0)
# - For each object, it unpacks: name, c, shape
# - It accesses c as if it's an array-like (center - c) and calls .sum()
# - So c should be a numpy array or similar

# Create a small list of objects with the expected structure
objects = [
    ("obj1", np.array([35, 35]), (5, 5)),
    ("obj2", np.array([50, 50]), (3, 3)),
]

ARGS = {
    "objects": objects
}
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 ndarray, ndim 1, dtype family int, shape (2,) — shape (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
elu_p1 Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
taewonpark/D3/WikiText103/src/utils/D3.py
code served (permissive licence) · get_code("fa08c36ab5558b55")
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 2, dtype family float, shape (2, 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.functional as F

torch.manual_seed(0)

# The function elu_p1 takes a single parameter 'x' which is used with F.elu
# F.elu expects a tensor input
x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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 2, dtype family float, shape (2, 4) — shape (2, 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
get_normal_values Ran
ran, honoured the contract we drafted
taewonpark/D3/Sort-of-CLEVR/model.py
code served (permissive licence) · get_code("bf45a2b233b0a484")
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 (5, 8) 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 numpy as np
import math

ARGS = {
    "n_keys": 5,
    "dim": 8,
    "seed": 42,
}
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 ndarray, ndim 2, dtype family float, shape (5, 8) — shape (5, 8) 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
get_positional Ran
ran, honoured the contract we drafted
taewonpark/D3/Sort-of-CLEVR/model.py
code served (permissive licence) · get_code("19b03c9a66c8c81b")
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 Tensor, ndim 3, dtype family float, shape (1, 5, 8) 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 math

torch.manual_seed(0)

# The function get_positional takes seq_len (sequence length) and dim (dimension)
# and returns a positional encoding tensor of shape (1, seq_len, dim)

ARGS = {
    "seq_len": 5,
    "dim": 8,
}
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 Tensor, ndim 3, dtype family float, shape (1, 5, 8) — shape (1, 5, 8) 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
get_uniform_keys Ran
ran, honoured the contract we drafted
taewonpark/d3/SARtask/models/D3_wF.py
code served (permissive licence) · get_code("2c1c24e4bcbb631d")
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 ndarray, ndim 2, dtype family float, shape (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 math
import numpy as np

ARGS = {
    "n_keys": 5,
    "dim": 4,
    "seed": 42,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — 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 (5, 4) — shape (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
get_uniform_keys Ran
ran, honoured the contract we drafted
taewonpark/D3/Sort-of-CLEVR/model.py
code served (permissive licence) · get_code("98edd8073a8cfd5d")
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 (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 numpy as np
import math

ARGS = {
    "n_keys": 5,
    "dim": 4,
    "seed": 42,
}
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 ndarray, ndim 2, dtype family float, shape (5, 4) — shape (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
sum_norm Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
taewonpark/D3/WikiText103/src/utils/D3.py
code served (permissive licence) · get_code("379d7685e2a746e5")
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 2, dtype family float, shape (2, 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

torch.manual_seed(0)

# The function sum_norm takes a single parameter 'x' which is a tensor
# It performs: x / x.sum(-1, keepdim=True)
# This means x should be a tensor where we can sum along the last dimension

# Create a small tensor with distinct dimensions
# batch_size=2, feature_dim=4
x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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 2, dtype family float, shape (2, 4) — shape (2, 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
sum_norm_eps Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
taewonpark/D3/WikiText103/src/utils/D3.py
code served (permissive licence) · get_code("90f48cc1487150b9")
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 2, dtype family float, shape (2, 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

torch.manual_seed(0)

# The function sum_norm_eps takes a single parameter x
# It performs: x / (x.sum(-1, keepdim=True) + 1e-05)
# So x should be a tensor that supports sum operation along the last dimension

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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 2, dtype family float, shape (2, 4) — shape (2, 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
Decomposition Not yet run
unverified (harvested, no recorded run)
taewonpark/d3/SARtask/models/D3_wF.py
code served (permissive licence) · get_code("785a6e69eb46dd45")
How it ran

no invocation recorded.

format_log Not yet run
unverified (harvested, no recorded run)
taewonpark/D3/WikiText103/src/eval_sliding_window.py
code served (permissive licence) · get_code("b0a73836f5b2859d")
How it ran

no invocation recorded.

scatter Not yet run
unverified (harvested, no recorded run)
taewonpark/D3/WikiText103/src/utils/data_parallel.py
code served (permissive licence) · get_code("69598ced7806d8c3")
How it ran

no invocation recorded.

scatter_kwargs Not yet run
unverified (harvested, no recorded run)
taewonpark/D3/WikiText103/src/utils/data_parallel.py
code served (permissive licence) · get_code("aa1de448b0528802")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 4 the same month, 0 later) and 6 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
scatter_kwargs 11 other papers
10 dated earlier, 1 the same month
1901.02860 (2019-01)
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context
2106.06295 (2021-06)
Going Beyond Linear Transformers with Recurrent Fast Weight Programmers
2204.03883 (2022-04)
Vision Transformers for Single Image Dehazing
and 8 more not named here
scatter 8 other papers
8 dated earlier
1901.02860 (2019-01)
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context
2106.06295 (2021-06)
Going Beyond Linear Transformers with Recurrent Fast Weight Programmers
2204.03883 (2022-04)
Vision Transformers for Single Image Dehazing
and 5 more not named here
elu_p1 4 other papers
3 dated earlier, 1 the same month
2106.06295 (2021-06)
Going Beyond Linear Transformers with Recurrent Fast Weight Programmers
2310.16076 (2023-10)
Practical Computational Power of Linear Transformers and Their Recurrent and Self-Referential Extensions
2312.00276 (2023-12)
Metalearning Continual Learning Algorithms
and 1 more not named here
sum_norm 4 other papers
3 dated earlier, 1 the same month
2106.06295 (2021-06)
Going Beyond Linear Transformers with Recurrent Fast Weight Programmers
2310.16076 (2023-10)
Practical Computational Power of Linear Transformers and Their Recurrent and Self-Referential Extensions
2312.00276 (2023-12)
Metalearning Continual Learning Algorithms
and 1 more not named here
sum_norm_eps 2 other papers
1 dated earlier, 1 the same month
2106.06295 (2021-06)
Going Beyond Linear Transformers with Recurrent Fast Weight Programmers
2406.01012 (2024-06)
Attention-based Iterative Decomposition for Tensor Product Representation
center_generate 1 other paper
1 dated earlier
1706.01427 (2017-06)
A simple neural network module for relational reasoning
format_log 1 other paper
1 dated earlier
2106.06295 (2021-06)
Going Beyond Linear Transformers with Recurrent Fast Weight Programmers

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

Neuro-symbolic neural networks have been extensively studied to integrate symbolic operations with neural networks, thereby improving systematic generalization. Specifically, Tensor Product Representation (TPR) framework enables neural networks to perform differentiable symbolic operations by encoding the symbolic structure of data within vector spaces. However, TPR-based neural networks often struggle to decompose unseen data into structured TPR representations, undermining their symbolic operations. To address this decomposition problem, we propose a Discrete Dictionary-based Decomposition (D3) layer designed to enhance the decomposition capabilities of TPR-based models. D3 employs discrete, learnable key-value dictionaries trained to capture symbolic features essential for decomposition operations. It leverages the prior knowledge acquired during training to generate structured TPR representations by mapping input data to pre-learned discrete features within these dictionaries. D3 is a straightforward drop-in layer that can be seamlessly integrated into any TPR-based model without modifications. Our experimental results demonstrate that D3 significantly improves the systematic generalization of various TPR-based models while requiring fewer additional parameters. Notably, D3 outperforms baseline models on the synthetic task that demands the systematic decomposition of unseen combinatorial data. 1 1 The code of D3 is publicly available at https://github.com/taewonpark/D3 2 The roles and fillers depend on the task at hand. For example, in a tree structure, the role corresponds to a position within the tree, while the filler represents the label associated with that position [34]. In associative memory, the role is analogous to an associative key, and the filler corresponds to the associative value [28,30]. 38th Conference on Neural Information Processing Systems (NeurIPS 2024).

For agents

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

get_harvested_code_for_paper("2406.06976")
get_code_for_paper("2406.06976")
have("2406.06976")

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

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

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

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

Connect an agent — have() is free.