SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2306.05268 · NeurIPS · 2023

FACTORIZED CONTRASTIVE LEARNING: Going Beyond Multi-view Redundancy

Paul Liang, Ruslan Salakhutdinov, Louis-Philippe Morency, James Zou, Zihao Deng, Martin Ma

arXiv · PDF · Open in the Atlas

Code that ran

5 of 11 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 5 have no contract verdict; 0 failures of our instrument; 6 no recorded run), measured 2026-11-23; 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/2306.05268.json · badge: /api/ran/2306.05268.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
pliang279/FactorCL canonical (classifier label)
classifier basis: census
5 ran · 6 no recorded run
FunctionStatusWhere it lives
generate_data Ran
ran on a synthesized input
pliang279/FactorCL/Synthetic/dataset.py
code served (permissive licence) · get_code("163224ba7c2a61f9")
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 math

# Set random seed for reproducibility
np.random.seed(0)

# Define arguments for generate_data function
num_data = 2
num_modalities = 2

# feature_dim_info: dict mapping feature names to dimensions
# Keys must contain modality indicator (1 or 2)
feature_dim_info = {
    "modality_1_feature_a": 3,
    "modality_1_feature_b": 2,
    "modality_2_feature_c": 4,
    "modality_2_feature_d": 2,
}

# label_dim_info: dict mapping label component names to dimensions
# Keys must be present in feature_dim_info
label_dim_info = {
    "modality_1_feature_a": 2,
    "modality_2_feature_c": 3,
}

# transforms: list of transformation matrices (one per modality)
# Each transform maps from concatenated raw features to transformed space
# Modality 1 has 3+2=5 raw dims, transform to 100 dims
# Modality 2 has 4+2=6 raw dims, transform to 100 dims
transforms = [
    np.random.uniform(0.0, 1.0, (5, 100)),
    np.random.uniform(0.0, 1.0, (6, 100)),
]

ARGS = {
    "num_data": num_data,
    "num_modalities": num_modalities,
    "feature_dim_info": feature_dim_info,
    "label_dim_info": label_dim_info,
    "transforms": transforms,
}
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 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
get_intersections Ran
ran on a synthesized input
pliang279/FactorCL/Synthetic/dataset.py
code served (permissive licence) · get_code("f28802f46d4499ad")
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 torch
import numpy as np

# Call get_intersections function
def get_intersections(num_modalities):
    modalities = [i for i in range(1, num_modalities + 1)]
    all_intersections = [[]]
    for i in modalities:
        new = [s + [str(i)] for s in all_intersections]
        all_intersections += new
    res = list(map(lambda x: ''.join(x), sorted(all_intersections[1:])))
    return sorted(res, key=lambda x: (len(x), x))

# Build arguments
ARGS = {
    "num_modalities": 3
}
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 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
get_labels Ran
ran on a synthesized input
pliang279/FactorCL/Synthetic/dataset.py
code served (permissive licence) · get_code("b39a9cd5944176a0")
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 (2, 1) 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

# Construct arguments for get_labels function
# The function takes:
# - label_dim_info: dict mapping keys to dimension values
# - total_raw_features: dict mapping keys to numpy arrays

# Create label_dim_info: maps feature names to their label dimensions
label_dim_info = {
    'feature_a': 2,
    'feature_b': 1,
}

# Create total_raw_features: dict with numpy arrays
# Shape should be (batch_size, feature_dim)
# We use batch_size=2 and varying feature dimensions
total_raw_features = {
    'feature_a': np.random.randn(2, 4),  # batch=2, feature_dim=4
    'feature_b': np.random.randn(2, 3),  # batch=2, feature_dim=3
}

ARGS = {
    'label_dim_info': label_dim_info,
    'total_raw_features': total_raw_features,
}
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 2, dtype family float, shape (2, 1) — shape (2, 1) 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
infonce_lower_bound_obj Ran
ran on a synthesized input
pliang279/FactorCL/critic_objectives.py
code served (permissive licence) · get_code("54f5c99d1c0e3ce1")
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 Tensor, ndim 0, dtype family float, shape () 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

torch.manual_seed(0)

# The function expects 'scores' which should be a 2D tensor
# It uses:
# - .diag() to get diagonal elements
# - .mean() on the diagonal
# - .logsumexp(dim=1) to compute log-sum-exp along dimension 1
# - .size(0) to get the batch size
# The tensor should be square or at least have enough columns for logsumexp

# Create a small scores matrix (batch_size=2, num_scores=4)
scores = torch.randn(2, 4)

ARGS = {
    "scores": scores
}
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 Tensor, ndim 0, dtype family float, shape () — shape () 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
probabilistic_classifier_eval Ran
ran on a synthesized input
pliang279/FactorCL/critic_objectives.py
code served (permissive licence) · get_code("241bbfb3df170458")
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 Tensor, ndim 0, dtype family float, shape () 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

torch.manual_seed(0)

# The function expects:
# f: a tensor with shape (batch_size, ...) where it can be reshaped and indexed
# The function:
# 1. Gets batch_size from f.shape[0]
# 2. Calls f.contiguous().view(-1) to flatten
# 3. Indexes with [::batch_size + 1] to get diagonal elements
# 4. Applies sigmoid, clamp, and log operations
# 5. Computes mean

# For this to work, we need a tensor where we can extract diagonal-like elements
# A simple 2D tensor (batch_size, batch_size) works well
# The indexing [::batch_size + 1] on a flattened tensor gets diagonal elements

batch_size = 2
f = torch.randn(batch_size, batch_size)

ARGS = {
    "f": f
}
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 Tensor, ndim 0, dtype family float, shape () — shape () 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
drop Not yet run
unverified (harvested, no recorded run)
pliang279/FactorCL/multibench_model.py
code served (permissive licence) · get_code("790c33df390d7bc2")
How it ran

no invocation recorded.

mlp_head Not yet run
unverified (harvested, no recorded run)
pliang279/FactorCL/IRFL_model.py
code served (permissive licence) · get_code("3b16d9634b443b77")
How it ran

no invocation recorded.

noise Not yet run
unverified (harvested, no recorded run)
pliang279/FactorCL/IRFL_model.py
code served (permissive licence) · get_code("3ba768516088431d")
How it ran

no invocation recorded.

permute Not yet run
unverified (harvested, no recorded run)
pliang279/FactorCL/IRFL_model.py
code served (permissive licence) · get_code("5477d0827fb36dd7")
How it ran

no invocation recorded.

probabilistic_classifier_obj Not yet run
unverified (harvested, no recorded run)
pliang279/FactorCL/critic_objectives.py
code served (permissive licence) · get_code("98cfa1281159229d")
How it ran

no invocation recorded.

train_sup_model Not yet run
unverified (harvested, no recorded run)
pliang279/FactorCL/synthetic_model.py
code served (permissive licence) · get_code("e8dcf7f8e1816e8e")
How it ran

no invocation recorded.

Also present in other papers' code

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

FunctionAlso present inEarliest-datedOthers named
mlp_head 1 other paper
1 later
2410.23996 (2024-10)
An Information Criterion for Controlled Disentanglement of Multimodal 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-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

In a wide range of multimodal tasks, contrastive learning has become a particularly appealing approach since it can successfully learn representations from abundant unlabeled data with only pairing information (e.g., image-caption or video-audio pairs). Underpinning these approaches is the assumption of multi-view redundancy -that shared information between modalities is necessary and sufficient for downstream tasks. However, in many real-world settings, task-relevant information is also contained in modality-unique regions: information that is only present in one modality but still relevant to the task. How can we learn self-supervised multimodal representations to capture both shared and unique information relevant to downstream tasks? This paper proposes FACTORCL, a new multimodal representation learning method to go beyond multi-view redundancy. FACTORCL is built from three new contributions: (1) factorizing task-relevant information into shared and unique representations, (2) capturing task-relevant information via maximizing MI lower bounds and removing task-irrelevant information via minimizing MI upper bounds, and (3) multimodal data augmentations to approximate task relevance without labels. On large-scale real-world datasets, FACTORCL captures both shared and unique information and achieves state-of-the-art results on six benchmarks.

For agents

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

get_harvested_code_for_paper("2306.05268")
get_code_for_paper("2306.05268")
have("2306.05268")

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

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

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

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

Connect an agent — have() is free.