SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2004.05707 · 2020

VGCN-BERT: Augmenting BERT with Graph Embedding for Text Classification

arXiv · PDF · Open in the Atlas

Code that ran

7 of 9 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; 1 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 4 failures of our instrument; 2 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/2004.05707.json · badge: /api/ran/2004.05707.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
Louis-udm/VGCN-BERT canonical (classifier label)
classifier basis: census
7 ran · 2 no recorded run
FunctionStatusWhere it lives
clean_str Ran
ran; our contract draft was wrong, not the code
Louis-udm/VGCN-BERT/old_version/vgcn_bert/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from audqhsid/-Review-CNN-for-Sentence-Classification, is pointer only (licence: NONE) · get_code("efe1a86fd9a2468e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from audqhsid/-Review-CNN-for-Sentence-Classification, and GitHub detected no licence in that repository when it was checked. 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.

clean_tweet_tokenize Ran
ran on a synthesized input
Louis-udm/VGCN-BERT/old_version/vgcn_bert/utils.py
code served (permissive licence) · get_code("9d8e7609681c97c2")
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 str. 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 numpy as np

# The function clean_tweet_tokenize takes a single parameter: string
# It expects a string input that will be tokenized

ARGS = {
    'string': "Hello world! This is a tweet with @mentions and #hashtags :) http://example.com"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
nltk, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
del_http_user_tokenize Ran
ran on a synthesized input
Louis-udm/VGCN-BERT/old_version/vgcn_bert/utils.py
code served (permissive licence) · get_code("21b74dce29517187")
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 str. 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 re

def del_http_user_tokenize(tweet):
    space_pattern = '\\s+'
    url_regex = 'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+'
    mention_regex = '@[\\w\\-]+'
    tweet = re.sub(space_pattern, ' ', tweet)
    tweet = re.sub(url_regex, '', tweet)
    tweet = re.sub(mention_regex, '', tweet)
    return tweet

ARGS = {
    'tweet': 'Hello @user check out https://example.com and   multiple   spaces here'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
gelu Ran
ran; our contract draft was wrong, not the code
Louis-udm/VGCN-BERT/old_version/pytorch_pretrained_bert/modeling_gpt2.py
code served (permissive licence) · get_code("8d23fbe2b99b840b")
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 math

torch.manual_seed(0)

# Create a small tensor for testing
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
gelu Ran
ran, honoured the contract we drafted
Louis-udm/VGCN-BERT/old_version/pytorch_pretrained_bert/modeling.py
pointer only (licence: MIT); the stored copy get_code serves, from maximek3/e-ViL, is pointer only (licence: NONE) · get_code("3c06d11eadebd504")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from maximek3/e-ViL, and GitHub detected no licence in that repository when it was checked. 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.

prune_conv1d_layer Ran
ran; our contract draft was wrong, not the code
Louis-udm/VGCN-BERT/old_version/pytorch_pretrained_bert/modeling_gpt2.py
code served (permissive licence) · get_code("4ce41ad16628f684")
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 Conv1D. 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
from torch.nn.parameter import Parameter

torch.manual_seed(0)

class Conv1D(nn.Module):
    def __init__(self, nf, nx):
        super(Conv1D, self).__init__()
        self.nf = nf
        w = torch.empty(nx, nf)
        nn.init.normal_(w, std=0.02)
        self.weight = Parameter(w)
        self.bias = Parameter(torch.zeros(nf))

    def forward(self, x):
        size_out = x.size()[:-1] + (self.nf,)
        x = torch.addmm(self.bias, x.view(-1, x.size(-1)), self.weight)
        x = x.view(*size_out)
        return x

# Create a Conv1D layer with distinct dimensions
# weight shape will be (nx=5, nf=3)
layer = Conv1D(nf=3, nx=5)

# Create index tensor to select which entries to keep
# Select 2 out of 3 along dim=1
index = torch.tensor([0, 2], dtype=torch.long)

ARGS = {
    "layer": layer,
    "index": index,
    "dim": 1
}
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 Conv1D — a Conv1D output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv1D 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
prune_linear_layer Ran
ran; our contract draft was wrong, not the code
Louis-udm/VGCN-BERT/old_version/pytorch_pretrained_bert/modeling.py
code served (permissive licence) · get_code("393af350cd7381f6")
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 Linear. 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)

# Create a small linear layer to prune
layer = nn.Linear(3, 4, bias=True)

# Create an index tensor to select which outputs to keep
# Using dim=0, we select which output features to keep
index = torch.tensor([0, 2])

ARGS = {
    "layer": layer,
    "index": index,
    "dim": 0
}
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 Linear — a Linear output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Linear 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
load_tf_weights_in_bert Not yet run
unverified (harvested, no recorded run)
Louis-udm/VGCN-BERT/old_version/pytorch_pretrained_bert/modeling.py
code served (permissive licence) · get_code("460517934d4f107f")
How it ran

no invocation recorded.

load_tf_weights_in_gpt2 Not yet run
unverified (harvested, no recorded run)
Louis-udm/VGCN-BERT/old_version/pytorch_pretrained_bert/modeling_gpt2.py
code served (permissive licence) · get_code("8a9df506fe60a0cd")
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, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 3 the same month, 7 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.

FunctionAlso present inEarliest-datedOthers named
gelu 198 other papers
38 dated earlier, 8 the same month, 150 later, 2 same year, order not determinable · 32 only as an assembly brick
1408.5882 (2014-08)
Convolutional Neural Networks for Sentence Classification
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.10125 (2019-01)
Glyce: Glyph-vectors for Chinese Character Representations
and 195 more not named here
gelu 51 other papers
13 dated earlier, 2 the same month, 36 later · 8 only as an assembly brick
1706.03762 (2017-06)
Attention Is All You Need
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.02860 (2019-01)
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context
and 48 more not named here
prune_linear_layer 29 other papers
7 dated earlier, 21 later, 1 same year, order not determinable
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1906.08230 (2019-06)
Evaluating Protein Transfer Learning with TAPE
1906.08237 (2019-06)
XLNet: Generalized Autoregressive Pretraining for Language Understanding
and 26 more not named here
prune_conv1d_layer 16 other papers
4 dated earlier, 12 later
1906.08237 (2019-06)
XLNet: Generalized Autoregressive Pretraining for Language Understanding
1909.05311 (2019-09)
Graph-Based Reasoning over Heterogeneous External Knowledge for Commonsense Question Answering
1909.11942 (2019-09)
ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
and 13 more not named here
load_tf_weights_in_bert 15 other papers
4 dated earlier, 1 the same month, 8 later, 2 same year, order not determinable
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1908.09355 (2019-08)
Patient Knowledge Distillation for BERT Model Compression
1911.00720 (2019-11)
ZEN: Pre-training Chinese Text Encoder Enhanced by N-gram Representations
and 12 more not named here
clean_str 9 other papers
5 dated earlier, 4 later
1408.5882 (2014-08)
Convolutional Neural Networks for Sentence Classification
1510.03820 (2015-10)
A Sensitivity Analysis of (and Practitioners' Guide to) Convolutional Neural Networks for Sentence Classification
1608.06019 (2016-08)
Domain Separation Networks
and 6 more not named here
load_tf_weights_in_gpt2 4 other papers
3 dated earlier, 1 later
1906.01698 (2019-06)
Open Sesame: Getting Inside BERT's Linguistic Knowledge
1908.09355 (2019-08)
Patient Knowledge Distillation for BERT Model Compression
1911.00720 (2019-11)
ZEN: Pre-training Chinese Text Encoder Enhanced by N-gram Representations
and 1 more not named here

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

Much progress has been made recently on text classification with methods based on neural networks. In particular, models using attention mechanism such as BERT have shown to have the capability of capturing the contextual information within a sentence or document. However, their ability of capturing the global information about the vocabulary of a language is more limited. This latter is the strength of Graph Convolutional Networks (GCN). In this paper, we propose VGCN-BERT model which combines the capability of BERT with a Vocabulary Graph Convolutional Network (VGCN). Local information and global information interact through different layers of BERT, allowing them to influence mutually and to build together a final representation for classification. In our experiments on several text classification datasets, our approach outperforms BERT and GCN alone, and achieve higher effectiveness than that reported in previous studies.

For agents

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

get_harvested_code_for_paper("2004.05707")
get_code_for_paper("2004.05707")
have("2004.05707")

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

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

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

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

Connect an agent — have() is free.