SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2205.01316 · CVPR · 2022

HL-Net: Heterophily Learning Network for Scene Graph Generation

Dacheng Tao, Yibing Zhan, Zijian Li, Xin Lin, Changxing Ding

arXiv · PDF · Open in the Atlas

Code that ran

5 of 9 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; 1 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 3 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/2205.01316.json · badge: /api/ran/2205.01316.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
siml3/HL-Net community
Papers with Code archive
5 ran · 4 no recorded run
FunctionStatusWhere it lives
CalAttenMap Ran
ran on a synthesized input · constructed an object; no result was computed
siml3/HL-Net/maskrcnn_benchmark/modeling/roi_heads/relation_head/model_mp.py
code served (permissive licence) · get_code("cb160c29bb986979")
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, CalAttenMap: 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
from torch import nn

torch.manual_seed(0)

# Parameters for CalAttenMap
input_dims = 4
p = 3

# Create sample data for forward pass
# obj_feats: tensor of shape (n_nodes, input_dims)
n_nodes = 2
obj_feats = torch.randn(n_nodes, input_dims)

# union_feats: tensor of shape (n_pairs, input_dims)
n_pairs = 3
union_feats = torch.randn(n_pairs, input_dims)

# pair_idxs: tensor of shape (n_pairs, 2) with indices into obj_feats
pair_idxs = torch.tensor([
    [0, 1],
    [1, 0],
    [0, 0]
], dtype=torch.long)

ARGS = {
    "input_dims": input_dims,
    "p": p,
}
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 CalAttenMap — 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 CalAttenMap 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
boxlist_iou Ran
ran, honoured the contract we drafted
siml3/HL-Net/maskrcnn_benchmark/modeling/roi_heads/relation_head/model_mp.py
code served (permissive licence) · get_code("fdd5a250b21677e5")
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 2, dtype family float, shape (2, 3) 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)

class BoxList:
    """Minimal BoxList implementation for testing boxlist_iou."""
    
    def __init__(self, bbox, image_size, mode='xyxy'):
        """
        Args:
            bbox: tensor of shape [N, 4] with boxes in format specified by mode
            image_size: tuple (height, width)
            mode: 'xyxy' or other format
        """
        self.bbox = bbox
        self.size = image_size
        self.mode = mode
    
    def __len__(self):
        return len(self.bbox)
    
    def convert(self, mode):
        """Convert to specified mode. For this test, assume already in xyxy."""
        if mode == 'xyxy':
            return BoxList(self.bbox.clone(), self.size, mode='xyxy')
        return self
    
    def area(self):
        """Compute area of boxes. Boxes are in xyxy format."""
        boxes = self.bbox
        width = boxes[:, 2] - boxes[:, 0]
        height = boxes[:, 3] - boxes[:, 1]
        return width * height


# Create two BoxList instances with same image size
image_size = (480, 640)

# boxlist1: 2 boxes
bbox1 = torch.tensor([
    [10.0, 20.0, 100.0, 150.0],
    [50.0, 60.0, 200.0, 250.0]
], dtype=torch.float32)
boxlist1 = BoxList(bbox1, image_size, mode='xyxy')

# boxlist2: 3 boxes
bbox2 = torch.tensor([
    [20.0, 30.0, 120.0, 160.0],
    [55.0, 65.0, 210.0, 260.0],
    [100.0, 100.0, 300.0, 300.0]
], dtype=torch.float32)
boxlist2 = BoxList(bbox2, image_size, mode='xyxy')

ARGS = {
    'boxlist1': boxlist1,
    'boxlist2': boxlist2
}
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 2, dtype family float, shape (2, 3) — shape (2, 3) 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
nms_overlaps Ran
ran; our contract draft was wrong, not the code
siml3/HL-Net/maskrcnn_benchmark/modeling/roi_heads/relation_head/model_mp.py
code served (permissive licence) · get_code("418e364939c18906")
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 (2, 2, 3) 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)

# boxes is expected to be a 3D tensor with shape (N, nc, 4)
# where N is number of boxes, nc is number of channels, and 4 are coordinates [x1, y1, x2, y2]
boxes = torch.tensor([
    [[10.0, 10.0, 20.0, 30.0], [5.0, 5.0, 15.0, 25.0], [40.0, 40.0, 50.0, 60.0]],
    [[12.0, 12.0, 22.0, 32.0], [50.0, 50.0, 60.0, 70.0], [8.0, 8.0, 18.0, 28.0]]
])

# Verify shape is correct: (N=2, nc=3, 4)
assert boxes.dim() == 3
assert boxes.size(2) == 4

ARGS = {
    "boxes": boxes
}
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 (2, 2, 3) — shape (2, 2, 3) 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
reporthook Ran
ran; our contract draft was wrong, not the code
siml3/HL-Net/maskrcnn_benchmark/modeling/roi_heads/relation_head/model_mp.py
code served (permissive licence) · get_code("cec8c324e96be444")
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 function. 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.

from tqdm import tqdm

# Create a tqdm progress bar object
t = tqdm(total=100)

# Define ARGS mapping the parameter to a value
ARGS = {
    "t": t
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
to_onehot Ran
ran; our contract draft was wrong, not the code
siml3/HL-Net/maskrcnn_benchmark/modeling/roi_heads/relation_head/model_mp.py
code served (permissive licence) · get_code("0cbeff1b7f9a25e0")
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 2, dtype family float, shape (4, 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)

# Create a 1D tensor with class indices
# The tensor should contain values in range [0, num_classes)
vec = torch.tensor([0, 2, 1, 3], dtype=torch.long)

# Number of classes
num_classes = 4

# Fill value
fill = 1000

ARGS = {
    "vec": vec,
    "num_classes": num_classes,
    "fill": fill
}
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 2, dtype family float, shape (4, 4) — shape (4, 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
ART_block Not yet run
unverified (harvested, no recorded run)
siml3/HL-Net/maskrcnn_benchmark/modeling/roi_heads/relation_head/model_mp.py
code served (permissive licence) · get_code("2f227a3f63d6e0b2")
How it ran

no invocation recorded.

ARTs Not yet run
unverified (harvested, no recorded run)
siml3/HL-Net/maskrcnn_benchmark/modeling/roi_heads/relation_head/model_mp.py
code served (permissive licence) · get_code("f79b65e2496429c6")
How it ran

no invocation recorded.

load_word_vectors Not yet run
unverified (harvested, no recorded run)
siml3/HL-Net/maskrcnn_benchmark/modeling/roi_heads/relation_head/model_mp.py
code served (permissive licence) · get_code("a67e13e540b4c85e")
How it ran

no invocation recorded.

obj_edge_vectors Not yet run
unverified (harvested, no recorded run)
siml3/HL-Net/maskrcnn_benchmark/modeling/roi_heads/relation_head/model_mp.py
code served (permissive licence) · get_code("04248b89fd96cd09")
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, 4 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 4 the same month, 0 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
reporthook
brick of this paper's assembly: helper
5 other papers
4 dated earlier, 1 the same month · 1 only as an assembly brick
1606.05250 (2016-06)
SQuAD: 100,000+ Questions for Machine Comprehension of Text
1611.01603 (2016-11)
Bidirectional Attention Flow for Machine Comprehension
1812.01880 (2018-12)
Learning to Compose Dynamic Tree Structures for Visual Contexts
and 2 more not named here
to_onehot
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 the same month · 1 only as an assembly brick
1906.07413 (2019-06)
Learning Imbalanced Datasets with Label-Distribution-Aware Margin Loss
2205.01297 (2022-05)
RU-Net: Regularized Unrolling Network for Scene Graph Generation
nms_overlaps
brick of this paper's assembly: helper
1 other paper
1 the same month · 1 only as an assembly brick
2205.01297 (2022-05)
RU-Net: Regularized Unrolling Network for Scene Graph Generation
obj_edge_vectors
brick of this paper's assembly: helper
1 other paper
1 the same month
2205.01297 (2022-05)
RU-Net: Regularized Unrolling Network for Scene Graph Generation

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

Current SGG methods typically utilize graph neural networks (GNNs) to acquire context information between objects/relationships. Despite their effectiveness, however, current SGG methods only assume scene graph homophily while ignoring heterophily. Accordingly, in this paper, we propose a novel Heterophily Learning Network (HL-Net) to comprehensively explore the homophily and heterophily between objects/relationships in scene graphs. More specifically, HL-Net comprises the following 1) an adaptive reweighting transformer module, which adaptively integrates the information from different layers to exploit both the heterophily and homophily in objects; 2) a relationship feature propagation module that efficiently explores the connections between relationships by considering heterophily in order to refine the relationship representation; 3) a heterophily-aware message-passing scheme to further distinguish the heterophily and homophily between objects/relationships, thereby facilitating improved message passing in graphs. We conducted extensive experiments on two public datasets: Visual Genome (VG) and Open Images (OI). The experimental results demonstrate the superiority of our proposed HL-Net over existing state-of-the-art approaches. In more detail, HL-Net outperforms the secondbest competitors by 2.1% on the VG dataset for scene graph classification and 1.2% on the IO dataset for the final score. Code is available at https://github.com/siml3/HL-Net.

For agents

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

get_harvested_code_for_paper("2205.01316")
get_code_for_paper("2205.01316")
have("2205.01316")

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

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

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

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

Connect an agent — have() is free.