SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2004.14603 · IJCAI · 2020

Dynamic Language Binding in Relational Visual Reasoning

Svetha Venkatesh, Truyen Tran, Thao Le, Vuong Le

arXiv · PDF · Open in the Atlas

Code that ran

6 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (5 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 0 failures of our instrument; 3 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/2004.14603.json · badge: /api/ran/2004.14603.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
thaolmk54/LOGNet-VQA community
Papers with Code archive
6 ran · 3 no recorded run
FunctionStatusWhere it lives
Controller Ran
ran on a synthesized input · constructed an object; no result was computed
thaolmk54/LOGNet-VQA/exp_clevr/model/LOGUnits.py
code served (permissive licence) · get_code("2401a481f69c8d60")
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, Controller: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

class Config:
    def __init__(self):
        self.train = TrainConfig()

class TrainConfig:
    def __init__(self):
        self.control_input_unshared = True

# Create config
cfg = Config()

# Dimensions
module_dim = 4
max_step = 4
batch_size = 2
question_len = 3

# Create tensors
question = torch.randn(batch_size, module_dim)
prev_ctrl_head_1 = torch.randn(batch_size, module_dim)
prev_ctrl_head_2 = torch.randn(batch_size, module_dim)
context = torch.randn(batch_size, question_len, module_dim)
question_lengths = torch.tensor([3, 2])
step = 0

ARGS = {
    'cfg': cfg,
    'module_dim': module_dim,
    'max_step': max_step,
}

# Test forward pass arguments (separate from __init__ args)
FORWARD_ARGS = {
    'question': question,
    'prev_ctrl_head_1': prev_ctrl_head_1,
    'prev_ctrl_head_2': prev_ctrl_head_2,
    'context': context,
    'question_lengths': question_lengths,
    'step': step,
}
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 Controller — 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 Controller 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
GraphConstructor Ran
ran on a synthesized input · constructed an object; no result was computed
thaolmk54/LOGNet-VQA/exp_clevr/model/LOGUnits.py
code served (permissive licence) · get_code("890c90f4b841447c")
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, GraphConstructor: 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)

# Parameters for GraphConstructor
module_dim = 4

# Instantiate the model
model = nn.Module()  # Placeholder, not actually used in the forward call

# Create input tensors
batch_size = 2
num_objs = 3

memory = torch.randn(batch_size, module_dim)
object_spatial_feat = torch.randn(batch_size, num_objs, module_dim)
control_head_1 = torch.randn(batch_size, module_dim)
control_head_2 = torch.randn(batch_size, module_dim)

ARGS = {
    "module_dim": module_dim,
}

# For forward pass (if needed separately):
FORWARD_ARGS = {
    "memory": memory,
    "object_spatial_feat": object_spatial_feat,
    "control_head_1": control_head_1,
    "control_head_2": control_head_2,
}
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 GraphConstructor — 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 GraphConstructor 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
GraphConvolution Ran
ran on a synthesized input · constructed an object; no result was computed
thaolmk54/LOGNet-VQA/exp_clevr/model/LOGUnits.py
code served (permissive licence) · get_code("bd5196cd30adaf0f")
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, GraphConvolution: 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
from torch.nn.parameter import Parameter
from torch.nn.modules.module import Module

torch.manual_seed(0)

# Define the GraphConvolution class (given in the problem)
class GraphConvolution(Module):
    """
    Simple GCN layer, adapted from https://arxiv.org/abs/1609.02907
    """

    def __init__(self, in_features, out_features, bias=True, init='xavier'):
        super(GraphConvolution, self).__init__()
        self.in_features = in_features
        self.out_features = out_features
        self.weight = Parameter(torch.FloatTensor(in_features, out_features))
        if bias:
            self.bias = Parameter(torch.FloatTensor(out_features))
        else:
            self.register_parameter('bias', None)
        if init == 'uniform':
            print('| Uniform Initialization')
            self.reset_parameters_uniform()
        elif init == 'xavier':
            print('| Xavier Initialization')
            self.reset_parameters_xavier()
        elif init == 'kaiming':
            print('| Kaiming Initialization')
            self.reset_parameters_kaiming()
        else:
            raise NotImplementedError

    def reset_parameters_uniform(self):
        stdv = 1.0 / math.sqrt(self.weight.size(1))
        self.weight.data.uniform_(-stdv, stdv)
        if self.bias is not None:
            self.bias.data.uniform_(-stdv, stdv)

    def reset_parameters_xavier(self):
        nn.init.xavier_uniform_(self.weight.data)
        if self.bias is not None:
            nn.init.constant_(self.bias.data, 0.0)

    def reset_parameters_kaiming(self):
        nn.init.kaiming_normal_(self.weight.data, a=0, mode='fan_in')
        if self.bias is not None:
            nn.init.constant_(self.bias.data, 0.0)

    def forward(self, input, adj):
        support = torch.matmul(input, self.weight)
        output = torch.matmul(adj, support)
        if self.bias is not None:
            return output + self.bias
        else:
            return output

    def __repr__(self):
        return self.__class__.__name__ + ' (' + str(self.in_features) + ' -> ' + str(self.out_features) + ')'


# Create test data
in_features = 4
out_features = 3

ARGS = {
    'in_features': in_features,
    'out_features': out_features,
    'bias': True,
    'init': 'xavier'
}
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 GraphConvolution — 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 GraphConvolution 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
MemoryUpdate Ran
ran on a synthesized input
thaolmk54/LOGNet-VQA/exp_clevr/model/LOGUnits.py
code served (permissive licence) · get_code("3c1c7b5a1c6feb7f")
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 2, 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 torch.nn as nn

class MemoryUpdate(nn.Module):
    def __init__(self, cfg, module_dim):
        super().__init__()
        self.cfg = cfg
        self.linear = nn.Linear(module_dim * 2, module_dim)

    def forward(self, memory, refined_kb):
        newMemory = torch.cat([memory, refined_kb], -1)
        newMemory = self.linear(newMemory)
        return newMemory

INIT_ARGS = {
    'cfg': {'some_config': True},
    'module_dim': 4
}

# Create tensors for ARGS
batch_size = 2
num_objs = 3
module_dim = 4

memory = torch.randn(batch_size, module_dim)
refined_kb = torch.randn(batch_size, num_objs, module_dim)

# Select one object per batch element (simulating refined_kb selection)
refined_kb_selected = refined_kb[:, 0, :]  # [batch_size, module_dim]

ARGS = {
    'memory': memory,
    'refined_kb': refined_kb_selected
}

# Construct and call
model = MemoryUpdate(**INIT_ARGS)
output = model(**ARGS)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 — 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)
RepRefinement Ran
ran on a synthesized input · constructed an object; no result was computed
thaolmk54/LOGNet-VQA/exp_clevr/model/LOGUnits.py
code served (permissive licence) · get_code("d4809f91c00e743c")
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, RepRefinement: 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 torch.nn.functional as F
import math
from torch.nn.parameter import Parameter
from torch.nn.modules.module import Module

torch.manual_seed(0)

class GraphConvolution(Module):
    """
    Simple GCN layer, adapted from https://arxiv.org/abs/1609.02907
    """

    def __init__(self, in_features, out_features, bias=True, init='xavier'):
        super(GraphConvolution, self).__init__()
        self.in_features = in_features
        self.out_features = out_features
        self.weight = Parameter(torch.FloatTensor(in_features, out_features))
        if bias:
            self.bias = Parameter(torch.FloatTensor(out_features))
        else:
            self.register_parameter('bias', None)
        if init == 'uniform':
            print('| Uniform Initialization')
            self.reset_parameters_uniform()
        elif init == 'xavier':
            print('| Xavier Initialization')
            self.reset_parameters_xavier()
        elif init == 'kaiming':
            print('| Kaiming Initialization')
            self.reset_parameters_kaiming()
        else:
            raise NotImplementedError

    def reset_parameters_uniform(self):
        stdv = 1.0 / math.sqrt(self.weight.size(1))
        self.weight.data.uniform_(-stdv, stdv)
        if self.bias is not None:
            self.bias.data.uniform_(-stdv, stdv)

    def reset_parameters_xavier(self):
        nn.init.xavier_uniform_(self.weight.data)
        if self.bias is not None:
            nn.init.constant_(self.bias.data, 0.0)

    def reset_parameters_kaiming(self):
        nn.init.kaiming_normal_(self.weight.data, a=0, mode='fan_in')
        if self.bias is not None:
            nn.init.constant_(self.bias.data, 0.0)

    def forward(self, input, adj):
        support = torch.matmul(input, self.weight)
        output = torch.matmul(adj, support)
        if self.bias is not None:
            return output + self.bias
        else:
            return output

    def __repr__(self):
        return self.__class__.__name__ + ' (' + str(self.in_features) + ' -> ' + str(self.out_features) + ')'

class ResidualGCN(nn.Module):

    def __init__(self, nhid, dropout):
        super(ResidualGCN, self).__init__()
        self.gcn_block = GraphConvolution(nhid, nhid)
        self.linear = nn.Linear(nhid, nhid, bias=False)
        self.dropout = dropout

    def forward(self, x, adj):
        """
        Args:
            x: node's features
                [batch_size, num_objs, module_dim]
            adj: visual graph's adjacency matrix
                [batch_size, num_objs, num_objs]

        Return:
            hidden layer
        """
        gcn_layer = self.gcn_block(x, adj)
        gcn_layer = F.elu(gcn_layer)
        gcn_layer = F.dropout(gcn_layer, self.dropout, training=self.training)
        x = F.elu(x + self.linear(gcn_layer))
        return x

class RepRefinement(nn.Module):

    def __init__(self, module_dim):
        super().__init__()
        self.max_gcn_blocks = 8
        self.attn = nn.Linear(module_dim, 1)
        self.GCN = ResidualGCN(module_dim, 0.15)

    def forward(self, lang_bound_rep, adjacency_matrix):
        """
        Args:
            lang_bound_rep: object representation after being bound by language words
                [batch_size, num_objs, module_dim]
            adjacency_matrix: adjacency matrix of visual object graph
                [batch_size, num_objs, num_objs]

        Return:
            refined visual object's representation with GCN
        """
        refined_rep = lang_bound_rep
        for _ in range(self.max_gcn_blocks):
            refined_rep = self.GCN(refined_rep, adjacency_matrix)
        attn = self.attn(refined_rep).squeeze(-1)
        attn = F.softmax(attn, 1)
        attn = attn.unsqueeze(-1)
        refined_rep = (attn * refined_rep).sum(1)
        return refined_rep

# Create ARGS dictionary with valid arguments
module_dim = 4
batch_size = 2
num_objs = 3

lang_bound_rep = torch.randn(batch_size, num_objs, module_dim)
adjacency_matrix = torch.randn(batch_size, num_objs, num_objs)

ARGS = {
    'module_dim': module_dim,
}
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 RepRefinement — 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 RepRefinement 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
ResidualGCN Ran
ran on a synthesized input · constructed an object; no result was computed
thaolmk54/LOGNet-VQA/exp_clevr/model/LOGUnits.py
code served (permissive licence) · get_code("4e516ff2044792ee")
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, ResidualGCN: 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 torch.nn.functional as F
import math
from torch.nn.parameter import Parameter
from torch.nn.modules.module import Module

torch.manual_seed(0)

class GraphConvolution(Module):
    """
    Simple GCN layer, adapted from https://arxiv.org/abs/1609.02907
    """

    def __init__(self, in_features, out_features, bias=True, init='xavier'):
        super(GraphConvolution, self).__init__()
        self.in_features = in_features
        self.out_features = out_features
        self.weight = Parameter(torch.FloatTensor(in_features, out_features))
        if bias:
            self.bias = Parameter(torch.FloatTensor(out_features))
        else:
            self.register_parameter('bias', None)
        if init == 'uniform':
            print('| Uniform Initialization')
            self.reset_parameters_uniform()
        elif init == 'xavier':
            print('| Xavier Initialization')
            self.reset_parameters_xavier()
        elif init == 'kaiming':
            print('| Kaiming Initialization')
            self.reset_parameters_kaiming()
        else:
            raise NotImplementedError

    def reset_parameters_uniform(self):
        stdv = 1.0 / math.sqrt(self.weight.size(1))
        self.weight.data.uniform_(-stdv, stdv)
        if self.bias is not None:
            self.bias.data.uniform_(-stdv, stdv)

    def reset_parameters_xavier(self):
        nn.init.xavier_uniform_(self.weight.data)
        if self.bias is not None:
            nn.init.constant_(self.bias.data, 0.0)

    def reset_parameters_kaiming(self):
        nn.init.kaiming_normal_(self.weight.data, a=0, mode='fan_in')
        if self.bias is not None:
            nn.init.constant_(self.bias.data, 0.0)

    def forward(self, input, adj):
        support = torch.matmul(input, self.weight)
        output = torch.matmul(adj, support)
        if self.bias is not None:
            return output + self.bias
        else:
            return output

    def __repr__(self):
        return self.__class__.__name__ + ' (' + str(self.in_features) + ' -> ' + str(self.out_features) + ')'

class ResidualGCN(nn.Module):

    def __init__(self, nhid, dropout):
        super(ResidualGCN, self).__init__()
        self.gcn_block = GraphConvolution(nhid, nhid)
        self.linear = nn.Linear(nhid, nhid, bias=False)
        self.dropout = dropout

    def forward(self, x, adj):
        """
        Args:
            x: node's features
                [batch_size, num_objs, module_dim]
            adj: visual graph's adjacency matrix
                [batch_size, num_objs, num_objs]

        Return:
            hidden layer
        """
        gcn_layer = self.gcn_block(x, adj)
        gcn_layer = F.elu(gcn_layer)
        gcn_layer = F.dropout(gcn_layer, self.dropout, training=self.training)
        x = F.elu(x + self.linear(gcn_layer))
        return x

ARGS = {
    'nhid': 4,
    'dropout': 0.5
}
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 ResidualGCN — 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 ResidualGCN 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
LOGUnits Not yet run
unverified (harvested, no recorded run)
thaolmk54/LOGNet-VQA/exp_clevr/model/LOGUnits.py
code served (permissive licence) · get_code("5d1db5ba17ad45e5")
How it ran

no invocation recorded.

LanguageBinding Not yet run
unverified (harvested, no recorded run)
thaolmk54/LOGNet-VQA/exp_clevr/model/LOGUnits.py
code served (permissive licence) · get_code("c75b5c065f748b81")
How it ran

no invocation recorded.

WordsToSingleVisualNode Not yet run
unverified (harvested, no recorded run)
thaolmk54/LOGNet-VQA/exp_clevr/model/LOGUnits.py
code served (permissive licence) · get_code("07bd0dba4c652d5b")
How it ran

no invocation recorded.

Also present in other papers' code

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

We present Language-binding Object Graph Network, the first neural reasoning method with dynamic relational structures across both visual and textual domains with applications in visual question answering. Relaxing the common assumption made by current models that the object predicates pre-exist and stay static, passive to the reasoning process, we propose that these dynamic predicates expand across the domain borders to include pairwise visual-linguistic object binding. In our method, these contextualized object links are actively found within each recurrent reasoning step without relying on external predicative priors. These dynamic structures reflect the conditional dual-domain object dependency given the evolving context of the reasoning through co-attention. Such discovered dynamic graphs facilitate multi-step knowledge combination and refinements that iteratively deduce the compact representation of the final answer. The effectiveness of this model is demonstrated on image question answering demonstrating favorable performance on major VQA datasets. Our method outperforms other methods in sophisticated question-answering tasks wherein multiple object relations are involved. The graph structure effectively assists the progress of training, and therefore the network learns efficiently compared to other reasoning models.

For agents

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

get_harvested_code_for_paper("2004.14603")
get_code_for_paper("2004.14603")
have("2004.14603")

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

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

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

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

Connect an agent — have() is free.