SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.07479 · 2021

An Online Riemannian PCA for Stochastic Canonical Correlation Analysis

arXiv · PDF · Open in the Atlas

Code that ran

3 of 3 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 3 have no contract verdict; 0 failures of our instrument; 0 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/2106.07479.json · badge: /api/ran/2106.07479.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
zihangm/riemannian-streaming-cca community (classifier label)
classifier basis not recorded on the link
3 ran · 0 no recorded run
FunctionStatusWhere it lives
load_data Ran
ran on a synthesized input
zihangm/riemannian-streaming-cca/DeepCCA/utils.py
code served (permissive licence) · get_code("851f55eaa5b3f5f1")
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 list. 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 gzip
import pickle
import torch
import numpy as np
import tempfile
import os

torch.manual_seed(0)

# Create a temporary gzip pickle file with mock data
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "mock_data.pkl.gz")

# Create mock train, valid, test sets
# Each set is a tuple of (data_x, data_y)
train_data_x = [[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]]
train_data_y = [0, 1]
train_set = (train_data_x, train_data_y)

valid_data_x = [[9.0, 10.0, 11.0, 12.0], [13.0, 14.0, 15.0, 16.0]]
valid_data_y = [1, 0]
valid_set = (valid_data_x, valid_data_y)

test_data_x = [[17.0, 18.0, 19.0, 20.0], [21.0, 22.0, 23.0, 24.0]]
test_data_y = [0, 1]
test_set = (test_data_x, test_data_y)

# Pickle and gzip the data
with gzip.open(temp_file, 'wb') as f:
    pickle.dump((train_set, valid_set, test_set), f)

ARGS = {
    'data_file': temp_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cPickle, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list 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_tensor Ran
ran on a synthesized input
zihangm/riemannian-streaming-cca/DeepCCA/utils.py
code served (permissive licence) · get_code("336b13f904f766bb")
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 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
import torch

torch.manual_seed(0)

# Create sample data for data_xy parameter
# data_xy is a tuple of (data_x, data_y)
# data_x will be converted to torch.tensor, so can be list/array
# data_y will be converted to np.asarray with dtype int32

data_x = [[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]]  # 2x4 array-like
data_y = [0, 1]  # 2 labels

data_xy = (data_x, data_y)

ARGS = {
    "data_xy": data_xy
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — 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
svm_classify Ran
ran on a synthesized input
zihangm/riemannian-streaming-cca/DeepCCA/utils.py
code served (permissive licence) · get_code("a53476caeab3f698")
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 list, ndim 1, dtype family float; 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
from sklearn import svm
from sklearn.metrics import accuracy_score

# Create small synthetic data
np.random.seed(0)

# Training data: (features, _, labels)
train_features = np.random.randn(10, 4)  # 10 samples, 4 features
train_labels = np.random.randint(0, 2, (10, 1))  # Binary labels

# Validation data
valid_features = np.random.randn(6, 4)
valid_labels = np.random.randint(0, 2, (6, 1))

# Test data
test_features = np.random.randn(8, 4)
test_labels = np.random.randint(0, 2, (8, 1))

# Construct data parameter: list of 3 tuples (train, valid, test)
# Each tuple is (features, _, labels)
data = [
    (train_features, None, train_labels),
    (valid_features, None, valid_labels),
    (test_features, None, test_labels)
]

ARGS = {
    'data': data,
    'C': 1.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 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
svm_classify 1 other paper
1 later
2107.07502 (2021-07)
MULTIBENCH: Multiscale Benchmarks for Multimodal Representation Learning

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

We present an efficient stochastic algorithm (RSG+) for canonical correlation analysis (CCA) using a reparametrization of the projection matrices. We show how this reparametrization (into structured matrices), simple in hindsight, directly presents an opportunity to repurpose/adjust mature techniques for numerical optimization on Riemannian manifolds. Our developments nicely complement existing methods for this problem which either require $O(d^3)$ time complexity per iteration with $O(\frac{1}{\sqrt{t}})$ convergence rate (where $d$ is the dimensionality) or only extract the top $1$ component with $O(\frac{1}{t})$ convergence rate. In contrast, our algorithm offers a strict improvement for this classical problem: it achieves $O(d^2k)$ runtime complexity per iteration for extracting the top $k$ canonical components with $O(\frac{1}{t})$ convergence rate. While the paper primarily focuses on the formulation and technical analysis of its properties, our experiments show that the empirical behavior on common datasets is quite promising. We also explore a potential application in training fair models where the label of protected attribute is missing or otherwise unavailable.

For agents

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

get_harvested_code_for_paper("2106.07479")
get_code_for_paper("2106.07479")
have("2106.07479")

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

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

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

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

Connect an agent — have() is free.