SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2505.16368 · NeurIPS · 2025

SATURN: SAT-based Reinforcement Learning to Unleash Language Model Reasoning

Jia Li, Hao Zhu, Ge Li, Kechi Zhang, Yihong Dong, Huanyu Liu

arXiv · PDF · Open in the Atlas

Code that ran

3 of 5 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, 0 violated it and 0 have no contract verdict; 2 failures of our instrument; 2 no recorded run), measured 2026-11-24; 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/2505.16368.json · badge: /api/ran/2505.16368.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
snap-stanford/SATURN canonical (classifier label)
classifier basis: classifier_2025
2 ran · 2 no recorded run
gtxygyzb/saturn-code canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
calc_sat_value Ran
ran, honoured the contract we drafted
gtxygyzb/saturn-code/src/reward_function/reward_func.py
code served (permissive licence) · get_code("b6b12cd63c70f9e2")
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 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 torch
import numpy as np

def calc_sat_value(clause, solution):

    def parse_literals(clause_str):
        literals = []
        i = 0
        while i < len(clause_str):
            if clause_str[i] == '!':
                literals.append(clause_str[i:i + 2])
                i += 2
            else:
                literals.append(clause_str[i])
                i += 1
        return literals
    for subclause in clause.split(' & '):
        satisfied = False
        for lit in parse_literals(subclause):
            neg = False
            if lit.startswith('!'):
                var = lit[1]
                neg = True
            else:
                var = lit
            idx = ord(var) - ord('A')
            if idx >= len(solution):
                val = '0'
            else:
                val = solution[idx]
            if neg and val == '0' or (not neg and val == '1'):
                satisfied = True
                break
        if not satisfied:
            return 0
    return 1

# Example 1: Simple clause with one literal satisfied
clause_1 = "A"
solution_1 = "1"

# Example 2: Clause with AND and negation
clause_2 = "A & !B"
solution_2 = "10"

# Example 3: Clause with multiple literals in subclause
clause_3 = "!A & B"
solution_3 = "01"

ARGS = {
    "clause": clause_2,
    "solution": solution_2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — 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
cluster_knn Ran
ran; our contract draft was wrong, not the code
snap-stanford/SATURN/score_adata.py
code served (permissive licence) · get_code("ca960c7882b0787c")
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 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 pandas as pd

# Create a sample DataFrame that matches what cluster_knn expects
# The function expects a DataFrame with 'Source_Cell' column
# and it performs value_counts on the result, so we need tuples as index

# Create sample data
data = {
    'Source_Cell': ['cell_A', 'cell_A', 'cell_A', 'cell_B', 'cell_B'],
    'Cross_Species_KNN_Label': ['label_1', 'label_1', 'label_2', 'label_3', 'label_3'],
    'Source_Cluster': ['cluster_X', 'cluster_X', 'cluster_X', 'cluster_Y', 'cluster_Y']
}

cluster_knn_df = pd.DataFrame(data)

# The function filters by Source_Cell and then calls value_counts()
# value_counts() on a DataFrame returns a Series with MultiIndex (tuples)
# We need to construct the DataFrame so that value_counts() produces the right structure

# Better approach: create a DataFrame where value_counts will work as expected
cluster_knn_df = pd.DataFrame({
    'Source_Cell': ['cell_A', 'cell_A', 'cell_A', 'cell_A', 'cell_B', 'cell_B'],
    'Cross_Species_KNN_Label': ['label_1', 'label_1', 'label_2', 'label_1', 'label_3', 'label_3'],
    'Source_Cluster': ['cluster_X', 'cluster_X', 'cluster_X', 'cluster_X', 'cluster_Y', 'cluster_Y']
})

# The label parameter is used to filter Source_Cell
label = 'cell_A'

ARGS = {
    'cluster_knn_df': cluster_knn_df,
    'label': label
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
get_knn_label Ran
ran; our contract draft was wrong, not the code
snap-stanford/SATURN/score_adata.py
code served (permissive licence) · get_code("29bccf890c4cdc58")
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 torch
import numpy as np
from collections import Counter
import pandas as pd

# Create a minimal stand-in for AnnData
class MinimalAnnData:
    def __init__(self, obs_data):
        self.obs = obs_data
    
    def __getitem__(self, cell_names):
        # Return a view with subset of obs
        subset_obs = self.obs.loc[self.obs.index.isin(cell_names)]
        return MinimalAnnData(subset_obs)

# Create sample data
cell_names_list = ['cell_0', 'cell_1', 'cell_2', 'cell_3', 'cell_4']
col_name = 'cell_type'

# Create obs dataframe with cell types
obs_df = pd.DataFrame({
    col_name: ['TypeA', 'TypeB', 'TypeA', 'TypeA', 'TypeC']
}, index=cell_names_list)

# Create AnnData object
adata = MinimalAnnData(obs_df)

# Create cell_names list (subset of available cells)
cell_names = ['cell_0', 'cell_1', 'cell_2']

ARGS = {
    'cell_names': cell_names,
    'adata': adata,
    'col': col_name
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, torch — 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
cross_species_knn_all Not yet run
unverified (harvested, no recorded run)
snap-stanford/SATURN/score_adata.py
code served (permissive licence) · get_code("f972e78511aba103")
How it ran

no invocation recorded.

pretrain_saturn Not yet run
unverified (harvested, no recorded run)
snap-stanford/SATURN/train-saturn.py
code served (permissive licence) · get_code("6e56ce30857f547e")
How it ran

no invocation recorded.

Also present in other papers' code

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

Repositories linked to this paper

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

Abstract

How to design reinforcement learning (RL) tasks that effectively unleash the reasoning capability of large language models (LLMs) remains an open question. Existing RL tasks (e.g., math, programming, and constructing reasoning tasks) face three key limitations: ❶ Scalability. They rely heavily on human annotation or expensive LLM synthesis to generate sufficient training data. ❷ Verifiability. LLMs' outputs are hard to verify automatically and reliably. ❸ Controllable Difficulty. Most tasks lack fine-grained difficulty control, making it challenging to train LLMs from easy to hard and progressively develop reasoning capability. To address these limitations, we propose SATURN, a SAT-based RL framework that uses Boolean Satisfiability (SAT) problems to train and evaluate LLM reasoning. SATURN enables scalable task construction, rule-based verification, and precise difficulty control. SATURN designs a curriculum learning pipeline that continuously improves LLMs' reasoning capability by constructing SAT tasks of increasing difficulty and training LLMs from easy to hard. To ensure stable training, we design a principled mechanism to control difficulty transitions. We introduce SATURN-2.6k, a dataset of 2,660 SAT problems with varying difficulty. It supports the evaluation of how LLM reasoning changes with problem difficulty. We apply SATURN to DeepSeek-R1-Distill-Qwen and obtain SATURN-1.5B and SATURN-7B. We achieve several notable results: ❶ On SAT problems, SATURN-1.5B and SATURN-7B achieve average pass@3 improvements of +14.0 and +28.1, respectively. ❷ On math and programming tasks, SATURN-1.5B and SATURN-7B improve average scores by +4.9 and +1.8 on benchmarks (e.g., AIME, LiveCodeBench). ❸ Compared to the state-of-the-art (SOTA) approach in constructing RL tasks, SATURN achieves further improvements of +8.8%. We release the source code, data, and models to support future research at https: //github.com/gtxygyzb/Saturn-code.

For agents

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

get_harvested_code_for_paper("2505.16368")
get_code_for_paper("2505.16368")
have("2505.16368")

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

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

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

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

Connect an agent — have() is free.