SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.02401 · ACL · 2021

Entity Concept-enhanced Few-shot Relation Extraction

Shiliang Pu, Guanglin Niu, Yongfei Zhang, Qinhua Zhao

arXiv · PDF · Open in the Atlas

Code that ran

4 of 4 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; 1 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 0 failures of our instrument; 0 no recorded run), measured 2026-11-21; 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/2106.02401.json · badge: /api/ran/2106.02401.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
LittleGuoKe/ConceptFERE community
Papers with Code archive
3 ran · 0 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
GNN_nl Ran
ran on a synthesized input · constructed an object; no result was computed
LittleGuoKe/ConceptFERE/models/gnn_iclr.py
code served (permissive licence) · get_code("12abc387ce3f7d9f")
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, GNN_nl: 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
from torch.autograd import Variable

torch.manual_seed(0)

# Small stand-in class for input
class DummyInput:
    def __init__(self):
        pass

# Construct valid arguments for GNN_nl
N = 5  # number of output features
input_features = 3  # input feature dimension
nf = 8  # number of features (should be even for int(nf/2))
J = 2  # J parameter for Gconv

# Create a small batch of input data
# x should be shape (batch_size, num_nodes, input_features)
batch_size = 2
num_nodes = 4
x = torch.randn(batch_size, num_nodes, input_features)

ARGS = {
    'N': N,
    'input_features': input_features,
    'nf': nf,
    'J': J
}
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 GNN_nl — 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 GNN_nl 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
Gconv Ran
ran on a synthesized input · constructed an object; no result was computed
LittleGuoKe/ConceptFERE/models/gnn_iclr.py
code served (permissive licence) · get_code("467b6f16535dc46e")
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, Gconv: 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)

# Analyze the function:
# - gmul(input) expects input = (W, x)
#   - W is split on dimension 3, so W needs rank 4
#   - x is used in torch.bmm(W, x), so x needs rank 3
#   - After split/cat operations, output has shape (batch, N, features)
# - Gconv.forward expects input = (W, x)
#   - W is passed through unchanged
#   - x goes through gmul, fc layer, and batch norm
#   - num_inputs = J * nf_input
#   - num_outputs = nf_output

# Let's construct valid inputs:
# For gmul to work:
# - W should be shape (batch, nf, N, J) where J is the split dimension
# - x should be shape (batch, N, nf_input)
# - After gmul, output is (batch, N, J * nf_input) before view

batch_size = 2
nf_input = 4
nf_output = 3
N = 5  # number of nodes
J = 2  # number of graph convolution layers

# Create W with shape (batch, ?, N, J)
# When split on dim 3, we get J tensors of shape (batch, ?, N, 1)
# After cat on dim 1, we get (batch, ? * J, N)
# After bmm with x of shape (batch, N, nf_input), output is (batch, ? * J, nf_input)
# We need output such that when split by N on dim 1, we get J pieces
# So ? * J = N * J, thus ? = N
W = torch.randn(batch_size, N, N, J)

# Create x with shape (batch, N, nf_input)
x = torch.randn(batch_size, N, nf_input)

ARGS = {
    'nf_input': nf_input,
    'nf_output': nf_output,
    'J': J,
    'bn_bool': True
}
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 Gconv — 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 Gconv 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
Wcompute Ran
ran on a synthesized input · constructed an object; no result was computed
LittleGuoKe/ConceptFERE/models/gnn_iclr.py
code served (permissive licence) · get_code("de3e78c09ac1e6a0")
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, Wcompute: 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)

# Create a tiny input tensor for the forward pass
# The forward method expects x to be a tensor that will be processed
# Shape: (batch, features, height, width) for Conv2d operations
# After unsqueeze and transpose operations, input_features should match
batch_size = 2
input_features = 4
spatial_h = 3
spatial_w = 3

x = torch.randn(batch_size, input_features, spatial_h, spatial_w)

# W_id is used in the forward pass as an identity-like mask
# It's expanded and used in subtraction/multiplication operations
# Shape should be broadcastable to W_new after convolutions
W_id = torch.zeros(batch_size, 1, spatial_h, spatial_w)

ARGS = {
    'input_features': input_features,
    'nf': 8,
    'operator': 'J2',
    'activation': 'softmax',
    'ratio': [2, 2, 1, 1],
    'num_operators': 1,
    'drop': False,
}
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 Wcompute — 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 Wcompute 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
gmul Ran
ran, honoured the contract we drafted
this paper's copy was not recorded; identical code first harvested from HoganZhang/few-shot-gnn
pointer only; the stored copy get_code serves, from HoganZhang/few-shot-gnn, is pointer only (licence: NONE) · get_code("346e55cd35e8bf35")
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.

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 3 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
gmul
brick of this paper's assembly: helper
3 other papers
2 dated earlier, 1 later
1711.04043 (2017-11)
Few-Shot Learning with Graph Neural Networks
1810.10147 (2018-10)
FewRel: A Large-Scale Supervised Few-Shot Relation Classification Dataset with State-of-the-Art Evaluation
2023.findings-emnlp.153 (2023 (year only))
Chain of Thought with Explicit Evidence Reasoning for Few-shot Relation Extraction

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

Few-shot relation extraction (FSRE) is of great importance in long-tail distribution problem, especially in special domain with low-resource data. Most existing FSRE algorithms fail to accurately classify the relations merely based on the information of the sentences together with the recognized entity pairs, due to limited samples and lack of knowledge. To address this problem, in this paper, we proposed a novel entity CONCEPTenhanced FEw-shot Relation Extraction scheme (ConceptFERE), which introduces the inherent concepts of entities to provide clues for relation prediction and boost the relations classification performance. Firstly, a conceptsentence attention module is developed to select the most appropriate concept from multiple concepts of each entity by calculating the semantic similarity between sentences and concepts. Secondly, a self-attention based fusion module is presented to bridge the gap of concept embedding and sentence embedding from different semantic spaces. Extensive experiments on the FSRE benchmark dataset FewRel have demonstrated the effectiveness and the superiority of the proposed ConceptFERE scheme as compared to the state-of-the-art baselines. Code is available at https://github.com/LittleGuoKe/ConceptFERE.

For agents

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

get_harvested_code_for_paper("2106.02401")
get_code_for_paper("2106.02401")
have("2106.02401")

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

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

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

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

Connect an agent — have() is free.