SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.08851 · 2024

PAPERCLIP: Associating Astronomical Observations and Natural Language with Multi-Modal Models

arXiv · PDF · Open in the Atlas

Code that ran

9 of 12 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, 2 violated it and 0 have no contract verdict; 6 failures of our instrument; 3 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/2403.08851.json · badge: /api/ran/2403.08851.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
smsharma/paperclip-hubble canonical (classifier label)
classifier basis: census
9 ran · 3 no recorded run
FunctionStatusWhere it lives
create_input_iter Ran
ran; our contract draft was wrong, not the code
smsharma/paperclip-hubble/utils/dataset_utils.py
code served (permissive licence) · get_code("3695aed14d3d5db1")
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 generator. 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 jax
import jax.numpy as jnp

class FakeDataset:
    """Fake dataset that yields objects with _numpy() method."""
    def __init__(self, num_samples=2):
        self.num_samples = num_samples
    
    def __iter__(self):
        for i in range(self.num_samples):
            yield FakeBatch()

class FakeBatch:
    """Fake batch with _numpy() method that returns numpy arrays."""
    def __init__(self):
        self.data = np.random.randn(2, 4).astype(np.float32)
    
    def _numpy(self):
        return self.data
    
    def __iter__(self):
        # Support tree_map by making it iterable as a leaf
        yield self

# Create the dataset
ds = FakeDataset(num_samples=2)

ARGS = {
    "ds": ds,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
flax, jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type generator — a generator output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a generator 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
is_environment_end Ran
ran, violated the contract we drafted
smsharma/paperclip-hubble/paper/percy.py
code served (permissive licence) · get_code("07f425a9bd5b3430")
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 bool, 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
import torch.nn as nn

ARGS = {
    'line': '\\end{document}'
}
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 bool, 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
is_environment_start Ran
ran, violated the contract we drafted
smsharma/paperclip-hubble/paper/percy.py
code served (permissive licence) · get_code("543d5228963018a6")
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 bool, 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
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'line': '\\begin{document}'
}
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 bool, 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
make_dataloader Ran
ran; our contract draft was wrong, not the code
smsharma/paperclip-hubble/utils/dataset_utils.py
code served (permissive licence) · get_code("de7306a52cef789b")
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 _BatchDataset. 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 tempfile
import os

# Create a minimal TFRecord file for testing
def create_test_tfrecord(filename, num_examples=2):
    """Create a simple TFRecord file with test data."""
    writer = tf.io.TFRecordWriter(filename)
    
    for i in range(num_examples):
        # Create minimal image data (4x3x3 = 36 bytes for uint8)
        image_data = bytes([i] * 36)
        
        feature = {
            'image': tf.train.Feature(bytes_list=tf.train.BytesList(value=[image_data])),
            'abstract': tf.train.Feature(bytes_list=tf.train.BytesList(value=[b'abstract caption ' + str(i).encode()])),
            'summary': tf.train.Feature(bytes_list=tf.train.BytesList(value=[b'summary caption ' + str(i).encode()])),
            'image_height': tf.train.Feature(int64_list=tf.train.Int64List(value=[4])),
            'image_width': tf.train.Feature(int64_list=tf.train.Int64List(value=[3])),
        }
        
        example = tf.train.Example(features=tf.train.Features(feature=feature))
        writer.write(example.SerializeToString())
    
    writer.close()

# Create temporary TFRecord file
temp_dir = tempfile.mkdtemp()
tfrecord_path = os.path.join(temp_dir, 'test.tfrecord')
create_test_tfrecord(tfrecord_path, num_examples=2)

ARGS = {
    'files': [tfrecord_path],
    'batch_size': 2,
    'seed': 42,
    'split': 'train',
    'shuffle': True,
    'caption_type': 'abstract'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
absl, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type _BatchDataset — a _BatchDataset output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a _BatchDataset 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
mini_batch_sigmoid_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
smsharma/paperclip-hubble/models/losses.py
code served (permissive licence) · get_code("6e6845d6f9081ed9")
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 ArrayImpl, 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 jax
import jax.numpy as jnp
import numpy as np

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

# Define small tensors with distinct dimensions
batch_size = 2
embedding_dim = 4

# Create text embeddings: (batch_size, embedding_dim)
text_embeds = jnp.array(np.random.randn(batch_size, embedding_dim), dtype=jnp.float32)

# Create image embeddings: (batch_size, embedding_dim)
image_embeds = jnp.array(np.random.randn(batch_size, embedding_dim), dtype=jnp.float32)

# Logit scale: a scalar value
logit_scale = jnp.array(1.0, dtype=jnp.float32)

# Logit bias: a scalar value
logit_bias = jnp.array(0.0, dtype=jnp.float32)

# Negative samples: boolean flag
negative_samples = False

ARGS = {
    "text_embeds": text_embeds,
    "image_embeds": image_embeds,
    "logit_scale": logit_scale,
    "logit_bias": logit_bias,
    "negative_samples": negative_samples,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, 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
modify_tex Ran
ran; our contract draft was wrong, not the code
smsharma/paperclip-hubble/paper/percy.py
code served (permissive licence) · get_code("5a3550f6fd153b50")
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 is_environment_start(line):
    return '\\begin{' in line

def is_environment_end(line):
    return '\\end{' in line

def modify_tex(tex_content):
    """
    Modifies the given TeX content by inserting a '%' symbol followed by a newline
    after each sentence within text sections, avoiding modification within environments.
    """
    modified_lines = []
    skip_environment = False
    for line in tex_content.split('\n'):
        if is_environment_start(line):
            skip_environment = True
        elif is_environment_end(line):
            skip_environment = False
            modified_lines.append(line)
            continue
        if not skip_environment:
            line = re.sub('(\\.)(\\s)', '\\1\\n%\\n', line)
        modified_lines.append(line)
    return '\n'.join(modified_lines)


# Construct test TeX content with environments and text sections
tex_input = """This is a sentence. It has multiple sentences. More text here.
\\begin{equation}
x = y. This should not be modified.
\\end{equation}
Another sentence. And another one. End of text."""

ARGS = {
    "tex_content": tex_input
}
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
param_count Ran
ran, honoured the contract we drafted
smsharma/paperclip-hubble/models/train_utils.py
code served (permissive licence) · get_code("9798c58198048703")
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 int, ndim 0, dtype family int, 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 jax
import jax.numpy as jnp

# Create a simple pytree structure using nested dicts and lists with JAX arrays
pytree = {
    'layer1': {
        'weights': jnp.ones((4, 3)),
        'bias': jnp.zeros((3,)),
    },
    'layer2': {
        'weights': jnp.ones((3, 2)),
        'bias': jnp.zeros((2,)),
    },
    'metadata': [
        jnp.array(5.0),
        jnp.array([1.0, 2.0, 3.0]),
    ]
}

ARGS = {
    'pytree': pytree
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
parse_function Ran
ran; our contract draft was wrong, not the code
smsharma/paperclip-hubble/utils/dataset_utils.py
code served (permissive licence) · get_code("eb839aaa0465ebd4")
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 tensorflow as tf
import numpy as np

# Create a minimal valid TFRecord example
def create_tfrecord_example():
    # Create small image data (4x3 RGB image)
    image_height = 4
    image_width = 3
    image_data = np.random.randint(0, 256, (image_height, image_width, 3), dtype=np.uint8).tobytes()
    
    # Create feature dict
    feature = {
        'image': tf.train.Feature(bytes_list=tf.train.BytesList(value=[image_data])),
        'abstract': tf.train.Feature(bytes_list=tf.train.BytesList(value=[b'This is an abstract'])),
        'summary': tf.train.Feature(bytes_list=tf.train.BytesList(value=[b'This is a summary'])),
        'image_height': tf.train.Feature(int64_list=tf.train.Int64List(value=[image_height])),
        'image_width': tf.train.Feature(int64_list=tf.train.Int64List(value=[image_width])),
    }
    
    # Create example and serialize
    example = tf.train.Example(features=tf.train.Features(feature=feature))
    return example.SerializeToString()

# Generate a serialized example
example_bytes = create_tfrecord_example()

ARGS = {
    'example': example_bytes,
    'caption_type': 'abstract'
}
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 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
read_abstracts_file Ran
ran; our contract draft was wrong, not the code
smsharma/paperclip-hubble/utils/abstract_utils.py
code served (permissive licence) · get_code("af373d34e5b4c411")
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 DataFrame. 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 tempfile
import os

# Create a temporary file with sample abstracts.cat content
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.cat')
temp_filename = temp_file.name

# Write sample abstracts.cat format data
sample_data = """Prop. Type: Research
Category: Physics
ID: 12345
Cycle: 2023
Title: Study of Quantum Effects
PI: Dr. John Smith
Abstract: This is a detailed abstract about quantum effects.
It spans multiple lines and contains important research information.
-----
Prop. Type: Fellowship
Category: Biology
ID: 67890
Cycle: 2024
Title: Genetic Engineering Applications
PI: Dr. Jane Doe
Abstract: This abstract discusses genetic engineering.
More details about the research go here.
-----
"""

temp_file.write(sample_data)
temp_file.close()

ARGS = {
    'filename': temp_filename
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
all_gather Not yet run
unverified (harvested, no recorded run)
smsharma/paperclip-hubble/models/losses.py
code served (permissive licence) · get_code("1ccc6469fa6105cb")
How it ran

no invocation recorded.

retrieval_eval_metric Not yet run
unverified (harvested, no recorded run)
smsharma/paperclip-hubble/models/eval_utils.py
code served (permissive licence) · get_code("d00bfe05aa6fb85e")
How it ran

no invocation recorded.

sigmoid_loss Not yet run
unverified (harvested, no recorded run)
smsharma/paperclip-hubble/models/losses.py
code served (permissive licence) · get_code("33b4705e5aff1051")
How it ran

no invocation recorded.

Also present in other papers' code

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

FunctionAlso present inEarliest-datedOthers named
create_input_iter 1 other paper
1 dated earlier
2311.17141 (2023-11)
A point cloud approach to generative modeling for galaxy surveys at the field level
param_count 1 other paper
1 dated earlier
2311.17141 (2023-11)
A point cloud approach to generative modeling for galaxy surveys at the field level

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

We present PAPERCLIP (Proposal Abstracts Provide an Effective Representation for Contrastive Language-Image Pre-training), a method which associates astronomical observations imaged by telescopes with natural language using a neural network model. The model is fine-tuned from a pre-trained Contrastive Language-Image Pre-training (CLIP) model using successful observing proposal abstracts and corresponding downstream observations, with the abstracts optionally summarized via guided generation using large language models (LLMs). Using observations from the Hubble Space Telescope (HST) as an example, we show that the fine-tuned model embodies a meaningful joint representation between observations and natural language through tests targeting image retrieval (i.e., finding the most relevant observations using natural language queries) and description retrieval (i.e., querying for astrophysical object classes and use cases most relevant to a given observation). Our study demonstrates the potential for using generalist foundation models rather than task-specific models for interacting with astronomical data by leveraging text as an interface.

For agents

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

get_harvested_code_for_paper("2403.08851")
get_code_for_paper("2403.08851")
have("2403.08851")

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

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

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

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

Connect an agent — have() is free.