SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2107.02363 · 2021

Asymptotics of Network Embeddings Learned via Subsampling

arXiv · PDF · Open in the Atlas

Code that ran

8 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; 0 honoured the contract we drafted, 1 violated it and 5 have no contract verdict; 2 failures of our instrument; 1 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, 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/2107.02363.json · badge: /api/ran/2107.02363.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
aday651/embed-asym-exeriments canonical (classifier label)
classifier basis: plan_row
6 ran · 0 no recorded run
aday651/embed-asym-experiments canonical (classifier label)
classifier basis: classifier_2025
2 ran · 1 no recorded run
FunctionStatusWhere it lives
sigmoid Ran
ran, violated the contract we drafted
aday651/embed-asym-exeriments/custom_scripts/gen_data.py
code served (permissive licence) · get_code("b8e95809ca2c17c9")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned ndarray, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-05T02:39:00Z). 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 numpy as np

# The sigmoid function takes a single parameter 'x' which should be a numeric value or array
# Looking at the function body, it performs: 1 / (1 + np.exp(-x))
# This works with scalars, lists, or numpy arrays

# Create a small numpy array to pass as input
x_input = np.array([0.0, 1.0, -1.0, 2.0])

ARGS = {
    "x": x_input
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (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
colorbar Ran
ran on a synthesized input
aday651/embed-asym-exeriments/custom_scripts/calc_minima.py
code served (permissive licence) · get_code("25e12dd19a1cb4b7")
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 Colorbar. 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 matplotlib.pyplot as plt
import numpy as np

# Create a figure and axis
fig, ax = plt.subplots()

# Create sample data
data = np.random.rand(4, 3)

# Create an image plot (which returns a mappable object)
mappable = ax.imshow(data)

# Define ARGS dictionary with the mappable object
ARGS = {
    'mappable': mappable
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, mpl_toolkits, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Colorbar — a Colorbar output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Colorbar 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
gen_graphon_data Ran
ran; our contract draft was wrong, not the code
aday651/embed-asym-experiments/custom_scripts/gen_data.py
code served (permissive licence) · get_code("8d0a3c5e02c50236")
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 tuple. 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 numpy as np
from pathlib import Path

class Args:
    def __init__(self):
        self.latent_dgp = 'uniform_lin'
        self.num_vertices = 8
        self.latent_dim = 4
        self.indef_ip = False
        self.filename = None

ARGS = {'args': Args()}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
make_simple_skipgram_loss Ran
ran on a synthesized input
aday651/embed-asym-exeriments/custom_scripts/skipgram_modified.py
code served (permissive licence) · get_code("a18e1ebc5654c088")
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.

import tensorflow as tf
import numpy as np

def make_simple_skipgram_loss(clip=None):
    """ Makes a simple skipgram loss for edge prediction from a given edge list.

    This function takes a simple edge list and does not further modify it. In particular,
    it does not apply any transformation such as windowing or pruning.

    Parameters
    ----------
    clip: If not None, a value to clip the individual losses at.

    Returns
    -------
    loss: a function which computes the loss.
    """

    def loss(edge_logits, num_vertex, edge_list, edge_weights, params):
        with tf.compat.v1.name_scope('skipgram_loss', values=[edge_logits, edge_list, edge_weights]):
            if len(edge_list.shape) == 3:
                batch_size = tf.cast(tf.shape(input=edge_list)[0], dtype=tf.float32)
            else:
                batch_size = 1.0
            edge_present = tf.cast(tf.equal(edge_weights, 1), dtype=tf.float32)
            edge_censored = tf.cast(tf.not_equal(edge_weights, -1), dtype=tf.float32)
            edge_pred_loss = tf.nn.sigmoid_cross_entropy_with_logits(labels=edge_present, logits=edge_logits)
            edge_pred_loss = edge_pred_loss * edge_censored
            if clip:
                edge_pred_loss = tf.clip_by_value(edge_pred_loss, 0, clip)
            loss_value = tf.divide(tf.reduce_sum(input_tensor=edge_pred_loss), batch_size, name='skipgram_edge_loss')
        return loss_value
    return loss


# Create test tensors with TensorFlow
edge_logits_np = np.random.randn(2, 3).astype(np.float32)
edge_logits = tf.constant(edge_logits_np)

edge_list_np = np.array([[0, 1], [1, 2], [2, 0]], dtype=np.int64)
edge_list = tf.constant(edge_list_np)

edge_weights_np = np.array([1, 1, -1], dtype=np.float32)
edge_weights = tf.constant(edge_weights_np)

num_vertex = 3

params = {}

ARGS = {
    "clip": 10.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — 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
make_weighted_loss Ran
ran on a synthesized input
aday651/embed-asym-exeriments/custom_scripts/skipgram_modified.py
code served (permissive licence) · get_code("c703de90c21e5f2a")
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.

import tensorflow as tf

# Create a simple loss function that takes predictions and targets
def simple_loss_fn(y_true, y_pred):
    """A simple MSE-like loss function"""
    return tf.reduce_mean(tf.square(y_true - y_pred))

# Create sample tensors for testing
y_true = tf.constant([[1.0, 2.0, 3.0, 4.0],
                       [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32)
y_pred = tf.constant([[1.1, 2.1, 3.1, 4.1],
                       [5.1, 6.1, 7.1, 8.1]], dtype=tf.float32)

ARGS = {
    "loss_fn": simple_loss_fn,
    "weight": 2.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — 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
parse_arguments Ran
ran; our contract draft was wrong, not the code
aday651/embed-asym-experiments/custom_scripts/gen_data.py
code served (permissive licence) · get_code("25492f639e03d229")
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 Namespace. 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 argparse
import sys
from io import StringIO

def parse_arguments(parser=None):
    if parser is None:
        parser = argparse.ArgumentParser()
    parser.add_argument('--num-vertices', type=int, default=100)
    parser.add_argument('--latent-dim', type=int, default=4)
    parser.add_argument('--filename', type=str)
    parser.add_argument('--latent-dgp', type=str, default='normal', choices=['normal', 'normal-lin', 'normal-exp', 'uniform', 'uniform-lin', 'uniform-exp'])
    parser.add_argument('--sbm', default=False, action='store_true')
    parser.add_argument('--indef-ip', default=False, action='store_true')
    parser.add_argument('--sbm-filename', type=str)
    return parser.parse_args()

# Construct command-line arguments as a list
argv_list = [
    '--num-vertices', '50',
    '--latent-dim', '8',
    '--filename', 'test_graph.txt',
    '--latent-dgp', 'normal',
    '--sbm',
    '--indef-ip',
    '--sbm-filename', 'sbm_test.txt'
]

# Save original sys.argv and replace with our test arguments
original_argv = sys.argv
sys.argv = ['test_script'] + argv_list

try:
    result = parse_arguments()
finally:
    sys.argv = original_argv

ARGS = {
    'parser': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace 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
pop_risk_constrained_optim Ran
ran on a synthesized input
aday651/embed-asym-exeriments/custom_scripts/calc_minima.py
code served (permissive licence) · get_code("02f29b2b7763af89")
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 ndarray, ndim 2, dtype family float, shape (3, 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 numpy as np
import cvxpy as cp

# Create valid arguments for pop_risk_constrained_optim

# sbm_probs: a numpy array representing community sizes/probabilities
# The function calls .size on it, so it needs to be a numpy array
sbm_probs = np.array([0.3, 0.4, 0.3])

# samp_formula_edge: a matrix of sampling formula values for edges
# Based on the function body, it's used in element_wise_loss with cp.multiply
# and cp.logistic operations. It should be a numpy array or similar
# The shape should match (k, k) where k = sbm_probs.size
k = sbm_probs.size
samp_formula_edge = np.random.rand(k, k)

# samp_formula_non_edge: a matrix of sampling formula values for non-edges
# Same shape and type as samp_formula_edge
samp_formula_non_edge = np.random.rand(k, k)

ARGS = {
    "sbm_probs": sbm_probs,
    "samp_formula_edge": samp_formula_edge,
    "samp_formula_non_edge": samp_formula_non_edge,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cvxpy, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (3, 3) — shape (3, 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
pop_risk_optim Ran
ran on a synthesized input
aday651/embed-asym-exeriments/custom_scripts/calc_minima.py
code served (permissive licence) · get_code("8c68f103b0e5d903")
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 ndarray, ndim 1, dtype family float, shape (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 numpy as np

# The function performs simple arithmetic operations on the input parameters
# samp_formula_edge and samp_formula_non_edge are divided and then log is taken
# sbm_probs is not used in the function body, so we can provide any reasonable value

# Create simple numpy arrays as sampling formulas
samp_formula_edge = np.array([0.8, 0.7, 0.9])
samp_formula_non_edge = np.array([0.2, 0.1, 0.3])

# sbm_probs represents community probabilities in a Stochastic Block Model
# It's not used in the function but we should provide a valid array
sbm_probs = np.array([[0.9, 0.1], [0.1, 0.8]])

ARGS = {
    "sbm_probs": sbm_probs,
    "samp_formula_edge": samp_formula_edge,
    "samp_formula_non_edge": samp_formula_non_edge,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (3,) — shape (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
sbm_eval Not yet run
unverified (harvested, no recorded run)
aday651/embed-asym-experiments/custom_scripts/learn_embed.py
code served (permissive licence) · get_code("c760bdad11675c47")
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, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 1 later) and 7 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
sigmoid 51 other papers
18 dated earlier, 32 later, 1 same year, order not determinable · 2 only as an assembly brick
1505.05770 (2015-05)
Variational Inference with Normalizing Flows
1804.00779 (2018-04)
Neural Autoregressive Flows
1809.10765 (2018-09)
Auto-Encoding Knockoff Generator for FDR Controlled Variable Selection
and 48 more not named here
make_weighted_loss 1 other paper
1 dated earlier
1806.10701 (2018-06)
Empirical Risk Minimization and Stochastic Gradient Descent for Relational Data

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

Network data are ubiquitous in modern machine learning, with tasks of interest including node classification, node clustering and link prediction. A frequent approach begins by learning an Euclidean embedding of the network, to which algorithms developed for vector-valued data are applied. For large networks, embeddings are learned using stochastic gradient methods where the sub-sampling scheme can be freely chosen. Despite the strong empirical performance of such methods, they are not well understood theoretically. Our work encapsulates representation methods using a subsampling approach, such as node2vec, into a single unifying framework. We prove, under the assumption that the graph is exchangeable, that the distribution of the learned embedding vectors asymptotically decouples. Moreover, we characterize the asymptotic distribution and provided rates of convergence, in terms of the latent parameters, which includes the choice of loss function and the embedding dimension. This provides a theoretical foundation to understand what the embedding vectors represent and how well these methods perform on downstream tasks. Notably, we observe that typically used loss functions may lead to shortcomings, such as a lack of Fisher consistency.

For agents

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

get_harvested_code_for_paper("2107.02363")
get_code_for_paper("2107.02363")
have("2107.02363")

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

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

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

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

Connect an agent — have() is free.