SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2302.03933 · ICLR · 2023

Graph Signal Sampling for Inductive One-Bit Matrix Completion: a Closed-form Solution

Junchi Yan, Chao Chen, Xiaokang Yang, Haoyu Geng, Gang Zeng, Zhaobing Han, Hua Chai

arXiv · PDF · Open in the Atlas

Code that ran

2 of 10 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 2 have no contract verdict; 0 failures of our instrument; 8 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/2302.03933.json · badge: /api/ran/2302.03933.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
cchao0116/GSIMC-ICLR2023 marked official in Papers with Code
Papers with Code archive
2 ran · 8 no recorded run
FunctionStatusWhere it lives
Covariance Ran
ran on a synthesized input
cchao0116/GSIMC-ICLR2023/src/model.py
code served (permissive licence) · get_code("59d1da26c6933010")
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 csc_matrix. 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
import scipy.sparse as sp

# Import the classes from the provided code
class Kernel:
    @classmethod
    def sparsify(cls, K, epsilon: float, eta: int):
        assert K is not None, 'K is None'
        assert eta < K.shape[1], 'eta is larger than the dimension'
        if epsilon == 0.0 and eta == 0.0:
            return K
        if not isinstance(K, np.ndarray):
            K = K.toarray()
        if epsilon > 0.0:
            assert eta > 0, 'epsilon must collaborate with eta'
            K[K < epsilon] = 0.0
        if eta > 0:
            kk = np.asarray(np.argpartition(np.abs(K), -eta)[:, -eta:])
            nn = np.asarray(K[np.arange(K.shape[0])[:, np.newaxis], kk])
            ix = nn.nonzero()
            vals, rows, cols = (nn[ix].flatten(), ix[0].flatten(), kk[ix].flatten())
            K = sp.csc_matrix((vals, (rows, cols)), shape=K.shape, dtype=K.dtype)
        return K

    @classmethod
    def kernel(cls, u, R, scale: float, epsilon: float, eta: int):
        raise NotImplementedError('kernel method is not implemented.')

    @classmethod
    def shift(cls, R, shift: float):
        raise NotImplementedError('shift method is not implemented.')

    @classmethod
    def build(cls, name: str):
        kernel = {'Laplacian': Laplacian(), 'Covariance': Covariance()}
        return kernel.get(name, Laplacian())

class Laplacian(Kernel):
    @classmethod
    def kernel(cls, u, R: sp.csr_matrix, scale: float, epsilon: float, eta: int):
        R = R.tocsc().astype(np.float32)
        Dv = np.asarray(R.sum(axis=0)).flatten()
        De = np.asarray(R.sum(axis=1)).flatten()
        sDv = 1.0 / np.maximum(np.power(Dv, scale / 2.0), 1.0)
        sDe = 1.0 / np.maximum(np.power(De, scale / 2.0), 1.0)
        sR = sp.diags(sDe) * R * sp.diags(sDv)
        K: sp.csc_matrix = sR[:, u].T * sR
        K = cls.sparsify(K, epsilon, eta)
        return K

    @classmethod
    def shift(cls, K: sp.csr_matrix, shift: float):
        K = K - sp.diags(K.diagonal()) if shift == 0.0 else K + sp.diags(shift - K.diagonal())
        return K

class Covariance(Kernel):
    @classmethod
    def kernel(cls, u, R: sp.csr_matrix, scale: float, epsilon: float, eta: int):
        R = R.tocsc().astype(np.float32)
        Dv = np.asarray(R.sum(axis=0)).flatten()
        De = np.asarray(R.sum(axis=1)).flatten()
        sDv = 1.0 / np.maximum(np.power(Dv, scale / 2.0), 1.0)
        sDe = 1.0 / np.maximum(np.power(De, scale / 2.0), 1.0)
        sR = sp.diags(sDe) * R * sp.diags(sDv)
        K: sp.csc_matrix = sR[:, u].T * sR
        K = cls.sparsify(K, epsilon, eta)
        return K

    @classmethod
    def shift(cls, K: sp.csr_matrix, shift: float):
        if shift == 0.0:
            return K
        K = K + sp.diags(shift * np.ones_like(K.diagonal()))
        return K

# Create a small sparse affinity matrix (6 rows x 5 columns)
np.random.seed(42)
data = np.random.rand(12)
row = np.array([0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5])
col = np.array([0, 1, 1, 2, 2, 3, 3, 4, 0, 4, 1, 4])
R = sp.csr_matrix((data, (row, col)), shape=(6, 5), dtype=np.float32)

INIT_ARGS = {}

ARGS = {
    'u': [0, 1],
    'R': R,
    'scale': 0.75,
    'epsilon': 0.1,
    'eta': 2
}

METHOD = 'kernel'

# Construct and call
instance = Covariance()
result = getattr(instance, METHOD)(**ARGS)
print("Result type:", type(result))
print("Result shape:", result.shape)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type csc_matrix — a csc_matrix output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a csc_matrix 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
LICfilter Ran
ran on a synthesized input
cchao0116/GSIMC-ICLR2023/src/model.py
code served (permissive licence) · get_code("75a52567f0499f65")
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 ndarray, ndim 2, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 collections

Solution = collections.namedtuple('Solution', ('U', 'V', 'H'))

topk = 100

class Filter:
    """
        Spectral Graph Matrix Completion
    """

    @classmethod
    def filter(cls, signal: np.ndarray, solut: Solution, sDv: np.ndarray):
        """
        Graph filter

        Parameters
        ----------
        signal : ndarray, i.e., graph signal for a user or rating vetor
        solut : Solution, including eigenvalues(V), eigenvectors(U), and filter matrix(H)
        sDv : scaled diagonal degree vector

        Returns
        -------
        out : list of integer, top-N recommendations
        """
        H = solut.H
        r = signal / sDv[np.newaxis, :]
        ans = np.matmul(r, H) * sDv
        ans = np.where(signal == 1.0, -np.inf, ans)
        out = np.argsort(ans)[:, -topk:][:, ::-1]
        return out

    @classmethod
    def build(cls, name: str):
        filters = {'TRfilter': TRfilter(), 'BLfilter': BLfilter(), 'LRwfilter': LRwfilter(), 'LICfilter': LICfilter(), 'LDPfilter': LDPfilter()}
        return filters.get(name, Filter())

class LDPfilter(Filter):
    """
        Low-pass Diffussion Process filter
    """

    @classmethod
    def filter(cls, signal: np.ndarray, solut: Solution, sDv: np.ndarray):
        U, V = (solut.U, solut.V)
        r = signal / sDv[np.newaxis, :]
        k = np.where(V < 4, np.exp(1.0 / (V - 4.0)), 1.0)
        ans = np.matmul(np.matmul(r, U) * k, U.T) * sDv
        ans = np.where(signal == 1.0, -np.inf, ans)
        out = np.argsort(ans)[:, -topk:][:, ::-1]
        return out

class LRwfilter(Filter):
    """
        Low-pass One-step Random-walk filter
    """

    @classmethod
    def filter(cls, signal: np.ndarray, solut: Solution, sDv: np.ndarray):
        U, V = (solut.U, solut.V)
        r = signal / sDv[np.newaxis, :]
        V: np.ndarray = np.minimum(V, 4.0)
        ans = np.matmul(np.matmul(r, U) * (1.0 + 0.1 * V), U.T) * sDv
        ans = np.where(signal == 1.0, -np.inf, ans)
        out = np.argsort(ans)[:, -topk:][:, ::-1]
        return out

class TRfilter(Filter):
    """
        Tikhonov regularization filter, the inverse of the kernel matrix
    """

    @classmethod
    def filter(cls, signal: np.ndarray, solut: Solution, sDv: np.ndarray):
        H = solut.H
        r = signal / sDv[np.newaxis, :]
        ans = np.matmul(r, -H) / (np.diag(H) / sDv)
        ans = np.where(signal == 1.0, -np.inf, ans)
        out = np.argsort(ans)[:, -topk:][:, ::-1]
        return out

class BLfilter(Filter):
    """
        Band-limited filter
    """

    @classmethod
    def filter(cls, signal: np.ndarray, solut: Solution, sDv: np.ndarray):
        U, V = (solut.U, solut.V)
        r = signal / sDv[np.newaxis, :]
        U: np.ndarray = U
        ans = np.matmul(np.matmul(r, U), U.T) * sDv
        ans = np.where(signal == 1.0, -np.inf, ans)
        out = np.argsort(ans)[:, -topk:][:, ::-1]
        return out

class LICfilter(Filter):
    """
        Low-pass Inverse Cosine filter
    """

    @classmethod
    def filter(cls, signal: np.ndarray, solut: Solution, sDv: np.ndarray):
        U, V = (solut.U, solut.V)
        r = signal / sDv[np.newaxis, :]
        V = np.minimum(V, 4.0)
        ans = np.matmul(np.matmul(r, U) * np.cos(np.pi * (4 - V) / 8.0), U.T) * sDv
        ans = np.where(signal == 1.0, -np.inf, ans)
        out = np.argsort(ans)[:, -topk:][:, ::-1]
        return out


INIT_ARGS = {}

ARGS = {
    'signal': np.array([[1.0, 0.0, 1.0, 0.0], [0.0, 1.0, 0.0, 1.0]]),
    'solut': Solution(
        U=np.random.randn(4, 4),
        V=np.array([0.5, 1.5, 2.5, 3.5]),
        H=np.random.randn(4, 4)
    ),
    'sDv': np.array([1.0, 1.5, 2.0, 2.5])
}

METHOD = 'filter'

instance = LICfilter()
result = instance.filter(**ARGS)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 2, dtype family int — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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)
BLfilter Not yet run
unverified (harvested, no recorded run)
cchao0116/GSIMC-ICLR2023/src/model.py
code served (permissive licence) · get_code("b9fffd67b495650d")
How it ran

no invocation recorded.

Fowlkes Not yet run
unverified (harvested, no recorded run)
cchao0116/GSIMC-ICLR2023/src/model.py
code served (permissive licence) · get_code("69ec65e9f0bd7a41")
How it ran

no invocation recorded.

LDPfilter Not yet run
unverified (harvested, no recorded run)
cchao0116/GSIMC-ICLR2023/src/model.py
code served (permissive licence) · get_code("1b5154668a14b918")
How it ran

no invocation recorded.

LRwfilter Not yet run
unverified (harvested, no recorded run)
cchao0116/GSIMC-ICLR2023/src/model.py
code served (permissive licence) · get_code("3cf9848bff5725be")
How it ran

no invocation recorded.

Laplacian Not yet run
unverified (harvested, no recorded run)
cchao0116/GSIMC-ICLR2023/src/model.py
code served (permissive licence) · get_code("0888cac7f58926f1")
How it ran

no invocation recorded.

Model Not yet run
unverified (harvested, no recorded run)
cchao0116/GSIMC-ICLR2023/src/model.py
code served (permissive licence) · get_code("545e1bc0260209b8")
How it ran

no invocation recorded.

Nystrom Not yet run
unverified (harvested, no recorded run)
cchao0116/GSIMC-ICLR2023/src/model.py
code served (permissive licence) · get_code("732bd42e81ddf103")
How it ran

no invocation recorded.

TRfilter Not yet run
unverified (harvested, no recorded run)
cchao0116/GSIMC-ICLR2023/src/model.py
code served (permissive licence) · get_code("25e31032bf7d2e4f")
How it ran

no invocation recorded.

Also present in other papers' code

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

Inductive one-bit matrix completion is motivated by modern applications such as recommender systems, where new users would appear at test stage with the ratings consisting of only ones and no zeros. We propose a unified graph signal sampling framework which enjoys the benefits of graph signal analysis and processing. The key idea is to transform each user's ratings on the items to a function (graph signal) on the vertices of an item-item graph, then learn structural graph properties to recover the function from its values on certain vertices -the problem of graph signal sampling. We propose a class of regularization functionals that takes into account discrete random label noise in the graph vertex domain, then develop the GS-IMC approach which biases the reconstruction towards functions that vary little between adjacent vertices for noise reduction. Theoretical result shows that accurate reconstructions can be achieved under mild conditions. For the online setting, we develop a Bayesian extension, i.e., BGS-IMC which considers continuous random Gaussian noise in the graph Fourier domain and builds upon a predictioncorrection update algorithm to obtain the unbiased and minimum-variance reconstruction. Both GS-IMC and BGS-IMC have closed-form solutions and thus are highly scalable in large data as verified on public benchmarks.

For agents

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

get_harvested_code_for_paper("2302.03933")
get_code_for_paper("2302.03933")
have("2302.03933")

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

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

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

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

Connect an agent — have() is free.