SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2007.08053 · IJCAI · 2020

Inductive Link Prediction for Nodes Having Only Attribute Information

Xike Xie, Sibo Wang, Xin Cao, Yixiang Fang, Yu Hao

arXiv · PDF · Open in the Atlas

Code that ran

1 of 2 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; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 0 failures of our instrument; 1 no recorded run), measured 2026-11-21; 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/2007.08053.json · badge: /api/ran/2007.08053.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
working-yuhao/DEAL marked official in Papers with Code
Papers with Code archive
1 ran · 1 no recorded run
FunctionStatusWhere it lives
Hidden_Layer Ran
ran on a synthesized input
working-yuhao/DEAL/model.py
code served (permissive licence) · get_code("7d15b0a1d544cb8d")
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, shape (2, 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 torch
import torch.nn as nn
import torch.nn.functional as F

class Hidden_Layer(nn.Module):

    def __init__(self, emb_dim, device, BCE_mode, mode='all', dropout_p=0.3):
        super(Hidden_Layer, self).__init__()
        self.emb_dim = emb_dim
        self.mode = mode
        self.device = device
        self.BCE_mode = BCE_mode
        self.Linear1 = nn.Linear(self.emb_dim * 2, self.emb_dim).to(self.device)
        self.Linear2 = nn.Linear(self.emb_dim, 32).to(self.device)
        x_dim = 1
        self.Linear3 = nn.Linear(32, x_dim).to(self.device)
        if self.mode == 'all':
            if self.BCE_mode:
                self.linear_output = nn.Linear(x_dim + 3, 1).to(self.device)
            else:
                self.linear_output = nn.Linear(x_dim + 3, 2).to(self.device)
        else:
            self.linear_output = nn.Linear(1, 2).to(self.device)
            self.linear_output.weight.data[1, :] = 1
            self.linear_output.weight.data[0, :] = -1
        self.cos = nn.CosineSimilarity(dim=1, eps=1e-06)
        self.pdist = nn.PairwiseDistance(p=2, keepdim=True)
        self.softmax = nn.Softmax(dim=1)
        self.elu = nn.ELU()
        assert self.mode in ['all', 'cos', 'dot', 'pdist'], 'Wrong mode type'

    def forward(self, f_embs, s_embs):
        if self.mode == 'all':
            x = torch.cat([f_embs, s_embs], dim=1)
            x = F.rrelu(self.Linear1(x))
            x = F.rrelu(self.Linear2(x))
            x = F.rrelu(self.Linear3(x))
            cos_x = self.cos(f_embs, s_embs).unsqueeze(1)
            dot_x = torch.mul(f_embs, s_embs).sum(dim=1, keepdim=True)
            pdist_x = self.pdist(f_embs, s_embs)
            x = torch.cat([x, cos_x, dot_x, pdist_x], dim=1)
        elif self.mode == 'cos':
            x = self.cos(f_embs, s_embs).unsqueeze(1)
        elif self.mode == 'dot':
            x = torch.mul(f_embs, s_embs).sum(dim=1, keepdim=True)
        elif self.mode == 'pdist':
            x = self.pdist(f_embs, s_embs)
        if self.BCE_mode:
            return x.squeeze()
        else:
            x = self.linear_output(x)
            x = F.rrelu(x)
            return x

    def evaluate(self, f_embs, s_embs):
        if self.mode == 'all':
            x = torch.cat([f_embs, s_embs], dim=1)
            x = F.rrelu(self.Linear1(x))
            x = F.rrelu(self.Linear2(x))
            x = F.rrelu(self.Linear3(x))
            cos_x = self.cos(f_embs, s_embs).unsqueeze(1)
            dot_x = torch.mul(f_embs, s_embs).sum(dim=1, keepdim=True)
            pdist_x = self.pdist(f_embs, s_embs)
            x = torch.cat([x, cos_x, dot_x, pdist_x], dim=1)
        elif self.mode == 'cos':
            x = self.cos(f_embs, s_embs)
        elif self.mode == 'dot':
            x = torch.mul(f_embs, s_embs).sum(dim=1)
        elif self.mode == 'pdist':
            x = -self.pdist(f_embs, s_embs).squeeze()
        return x


INIT_ARGS = {
    'emb_dim': 4,
    'device': 'cpu',
    'BCE_mode': False,
    'mode': 'all',
    'dropout_p': 0.3,
}

ARGS = {
    'f_embs': torch.randn(2, 4),
    's_embs': torch.randn(2, 4),
}

if __name__ == '__main__':
    model = Hidden_Layer(**INIT_ARGS)
    output = model(**ARGS)
    print("Output shape:", output.shape)
    print("Output:", output)
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, shape (2, 2) — shape (2, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
DEAL Not yet run
unverified (harvested, no recorded run)
working-yuhao/DEAL/model.py
code served (permissive licence) · get_code("e3b7b0b0273d098d")
How it ran

no invocation recorded.

Also present in other papers' code

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

Repositories linked to this paper

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

Abstract

Predicting the link between two nodes is a fundamental problem for graph data analytics. In attributed graphs, both the structure and attribute information can be utilized for link prediction. Most existing studies focus on transductive link prediction where both nodes are already in the graph. However, many real-world applications require inductive prediction for new nodes having only attribute information. It is more challenging since the new nodes do not have structure information and cannot be seen during the model training. To solve this problem, we propose a model called DEAL, which consists of three components: two node embedding encoders and one alignment mechanism. The two encoders aim to output the attributeoriented node embedding and the structure-oriented node embedding, and the alignment mechanism aligns the two types of embeddings to build the connections between the attributes and links. Our model DEAL is versatile in the sense that it works for both inductive and transductive link prediction. Extensive experiments on several benchmark datasets show that our proposed model significantly outperforms existing inductive link prediction methods, and also outperforms the state-ofthe-art methods on transductive link prediction.

For agents

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

get_harvested_code_for_paper("2007.08053")
get_code_for_paper("2007.08053")
have("2007.08053")

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

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

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

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

Connect an agent — have() is free.