SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2607.13433 · 2026

When Rubrics Change: Cross-Rubric Generalization for Critical Thinking Essay Scoring

Nischal Kumar, Andrew Lan, Sana Kang, Payu Wittawatolarn, Marisa Peczuh, Blair Lehman, Ryan Baker, Caitlin Mills, Sherry Lachman, Ruochen Sun

arXiv · PDF

Code that ran

16 of 19 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 1 has no contract verdict; 14 failures of our instrument; 3 no recorded run), measured 2026-11-23; 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/2607.13433.json · badge: /api/ran/2607.13433.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
umass-ml4ed/generalization-in-essay-scoring canonical (classifier label)
classifier basis: census
16 ran · 3 no recorded run
FunctionStatusWhere it lives
build_messages Ran
ran; our contract draft was wrong, not the code
umass-ml4ed/generalization-in-essay-scoring/infer_traits.py
code served (permissive licence) · get_code("5f467ab96140f274")
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 torch.nn as nn

torch.manual_seed(0)

# Construct arguments for build_messages function
# The function takes:
# 1. prompt_template: str - a template string that may contain {ESSAY_TEXT} placeholder
# 2. essay_text: str - the actual essay text to insert

# Test case 1: template with the expected essay block format
prompt_template = """You are an expert essay analyzer. Analyze the following essay for traits.

Essay:
<<<
{ESSAY_TEXT}
>>>

Provide detailed analysis."""

essay_text = """This is a sample essay about the importance of education.
Education shapes our future and enables personal growth.
It provides opportunities and opens doors to success."""

ARGS = {
    'prompt_template': prompt_template,
    'essay_text': essay_text,
}
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 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
calculate_rmse Ran
ran, honoured the contract we drafted
umass-ml4ed/generalization-in-essay-scoring/analyze_results.py
code served (permissive licence) · get_code("6be2bf8b8ae3d3a5")
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 float64, ndim 0, 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

# Construct ground truth labels - mix of valid categorical labels
ground_truth = ['not applicable', 'below emerging', 'emerging', 'expanding', 'exemplifying', 'emerging']

# Construct predicted labels - mix of valid categorical labels with some variation
predicted = ['not applicable', 'emerging', 'emerging', 'expanding', 'expanding', 'below emerging']

ARGS = {
    'ground_truth': ground_truth,
    'predicted': predicted
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
construct_prompt_message Ran
ran on a synthesized input
umass-ml4ed/generalization-in-essay-scoring/prompt_llm_utils.py
code served (permissive licence) · get_code("f8f7f419c5b351b2")
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

torch.manual_seed(0)

# Define the arguments
system_prompt = "You are a helpful assistant that answers questions concisely."

user_prompt = "What is the capital of France?"

few_shot_prompt = {
    0: {
        'User': 'What is the capital of Germany?',
        'Assistant': 'The capital of Germany is Berlin.'
    },
    1: {
        'User': 'What is the capital of Spain?',
        'Assistant': 'The capital of Spain is Madrid.'
    }
}

ARGS = {
    'system_prompt': system_prompt,
    'user_prompt': user_prompt,
    'few_shot_prompt': few_shot_prompt
}
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
create_data_splits Ran
ran; our contract draft was wrong, not the code
umass-ml4ed/generalization-in-essay-scoring/llama_data.py
code served (permissive licence) · get_code("4fb9b0736c4f60d3")
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 pandas as pd
import numpy as np

# Create a small sample dataframe with realistic structure
np.random.seed(47)
data = {
    'text': [f'sample text {i}' for i in range(100)],
    'label': np.random.randint(0, 2, 100),
    'id': range(100)
}
gt_df = pd.DataFrame(data)

ARGS = {
    'gt_df': gt_df,
    'random_state': 47
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — 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
extract_observations_dict Ran
ran; our contract draft was wrong, not the code
umass-ml4ed/generalization-in-essay-scoring/llama_train_wrubric_traits.py
code served (permissive licence) · get_code("45f2dde85a993307")
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 dict. 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

TRAIT_KEYS_ORDER = ['claim_explicitness', 'structural_coherence', 'evidence_presence', 'evidence_claim_linkage', 'alternative_perspectives', 'analytical_depth']

def extract_observations_dict(entry):
    """
    Extract per-trait observation strings from a trait entry payload.
    Supports:
      - {"observations": {"claim_explicitness": "...", ...}, ...}
    Returns a dict keyed by trait name, or an empty dict.
    """
    if not isinstance(entry, dict):
        return {}
    obs_source = entry.get('observations', {})
    if not isinstance(obs_source, dict):
        return {}
    observations = {}
    for key in TRAIT_KEYS_ORDER:
        if key in obs_source and obs_source[key]:
            observations[key] = obs_source[key]
    return observations


# Test case 1: Valid entry with observations for all traits
entry_full = {
    'observations': {
        'claim_explicitness': 'The claim is clearly stated.',
        'structural_coherence': 'The argument flows logically.',
        'evidence_presence': 'Strong empirical evidence provided.',
        'evidence_claim_linkage': 'Evidence directly supports the claim.',
        'alternative_perspectives': 'Multiple viewpoints considered.',
        'analytical_depth': 'Deep analysis of the topic.'
    },
    'other_field': 'some value'
}

# Test case 2: Entry with partial observations
entry_partial = {
    'observations': {
        'claim_explicitness': 'Claim is explicit.',
        'analytical_depth': 'Moderate depth.'
    }
}

# Test case 3: Entry with empty observations
entry_empty = {
    'observations': {}
}

# Test case 4: Entry with non-dict observations (should return {})
entry_non_dict = {
    'observations': 'not a dict'
}

# Test case 5: Entry that is not a dict (should return {})
entry_not_dict = 'string entry'

# Test case 6: Entry with None observations
entry_none = {
    'observations': None
}

# Use the most comprehensive test case
ARGS = {
    'entry': entry_full
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
extract_trait_dict Ran
ran; our contract draft was wrong, not the code
umass-ml4ed/generalization-in-essay-scoring/llama_train_wrubric_traits.py
code served (permissive licence) · get_code("c5d9af799ba2fdb5")
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 dict. 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

TRAIT_KEYS_ORDER = ['claim_explicitness', 'structural_coherence', 'evidence_presence', 'evidence_claim_linkage', 'alternative_perspectives', 'analytical_depth']

# Test case 1: entry with nested 'traits' dict
entry_with_traits_key = {
    'traits': {
        'claim_explicitness': 'explicit',
        'structural_coherence': 'high',
        'evidence_presence': 'present',
        'evidence_claim_linkage': 'strong',
        'alternative_perspectives': 'considered',
        'analytical_depth': 'deep'
    },
    'raw': 'some raw text that should be ignored'
}

# Test case 2: entry with flat trait keys
entry_flat_traits = {
    'claim_explicitness': 'implicit',
    'structural_coherence': 'low',
    'evidence_presence': 'absent',
    'observations': 'this should be ignored'
}

# Test case 3: entry with partial traits
entry_partial_traits = {
    'traits': {
        'claim_explicitness': 'mixed',
        'evidence_presence': 'partial'
    }
}

# Test case 4: entry with no traits (empty dict)
entry_no_traits = {
    'observations': 'only non-trait fields',
    'raw': 'text'
}

# Test case 5: non-dict entry
entry_non_dict = None

ARGS = {
    'entry': entry_with_traits_key
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
filter_dataset_by_subskills Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
umass-ml4ed/generalization-in-essay-scoring/llama_train_wrubric.py
code served (permissive licence) · get_code("b3401fcaab0399b3")
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 pandas as pd

# Create a sample dataframe with subskill_full column
df = pd.DataFrame({
    'subskill_full': [
        '1.Introduction',
        '1.1.Basics',
        '2.Advanced',
        '2.1.Details',
        '3.Expert',
        '1.2.More'
    ]
})

# Define subskill numbers to filter by
subskill_nums = [1, 2]

ARGS = {
    'df': df,
    'subskill_nums': subskill_nums
}
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
format_trait_text Ran
ran; our contract draft was wrong, not the code
umass-ml4ed/generalization-in-essay-scoring/llama_train_wrubric_traits.py
code served (permissive licence) · get_code("7da3b1c8eb845e35")
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

ARGS = {
    "value": "snake_case_trait_name"
}
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 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
get_few_shot_text Ran
ran; our contract draft was wrong, not the code
umass-ml4ed/generalization-in-essay-scoring/classify.py
code served (permissive licence) · get_code("eb44e2383591feea")
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 pandas as pd
import numpy as np

# Create a small dataframe with essay data
data = {
    'essay_id': ['essay_1', 'essay_2', 'essay_3'],
    'essay_text': [
        'This is the first essay about writing skills.',
        'This is the second essay about critical thinking.',
        'This is the third essay about communication.'
    ]
}
gt_df = pd.DataFrame(data)

# Create few_shot_cats dictionary mapping categories to essay IDs
few_shot_cats = {
    'writing skills': ['essay_1'],
    'critical thinking': ['essay_2', 'essay_3'],
    'communication': None
}

ARGS = {
    'few_shot_cats': few_shot_cats,
    'gt_df': gt_df
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — 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
get_few_shot_text Ran
ran; our contract draft was wrong, not the code
umass-ml4ed/generalization-in-essay-scoring/classify_justification.py
code served (permissive licence) · get_code("3b521b00a7bc1332")
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 pandas as pd

# Create a minimal DataFrame with the required structure
gt_df = pd.DataFrame({
    'essay_id': ['essay_001', 'essay_002', 'essay_003'],
    'essay_text': [
        'This is the first sample essay about mathematics.',
        'This is the second sample essay about science.',
        'This is the third sample essay about history.'
    ]
})

# Create few_shot_cats dictionary with category names and corresponding essay IDs
few_shot_cats = {
    'excellent writing': 'essay_001',
    'good structure': 'essay_002',
    'needs improvement': None,
}

ARGS = {
    'few_shot_cats': few_shot_cats,
    'gt_df': gt_df,
}
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 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
get_label_and_justification Ran
ran; our contract draft was wrong, not the code
umass-ml4ed/generalization-in-essay-scoring/classify.py
code served (permissive licence) · get_code("c3bd338ec75c117c")
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, 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

ARGS = {
    'response': 'Label - 1: positive\nJustification - This is a great product with excellent quality.'
}
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 tuple, ndim 1, dtype family float — a tuple 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_label_and_obs Ran
ran; our contract draft was wrong, not the code
umass-ml4ed/generalization-in-essay-scoring/majority_vote_traits.py
code served (permissive licence) · get_code("d1a39f56a947a1c7")
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, 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

torch.manual_seed(0)

essay_data = {
    'traits': {
        'trait_A': 8,
        'trait_B': 7,
        'observations': {
            'trait_A': 'This essay demonstrates strong analytical skills.',
            'trait_B': 'Good use of evidence.'
        }
    }
}

trait = 'trait_A'

ARGS = {
    'essay_data': essay_data,
    'trait': trait
}
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 tuple, ndim 1, dtype family float — a tuple 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
load_prompt_template Ran
ran; our contract draft was wrong, not the code
umass-ml4ed/generalization-in-essay-scoring/infer_traits.py
code served (permissive licence) · get_code("c78179a9cf42084f")
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 tempfile
import os

# Create a temporary directory and a temporary prompt file
temp_dir = tempfile.mkdtemp()
prompt_path = os.path.join(temp_dir, 'traits.txt')

# Write a sample prompt template to the temporary file
with open(prompt_path, 'w') as f:
    f.write("This is a sample prompt template for traits.\nIt contains multiple lines.\nAnd various prompt instructions.")

# Define the arguments dictionary
ARGS = {
    'path': prompt_path
}
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
parse_trait_response Ran
ran; our contract draft was wrong, not the code
umass-ml4ed/generalization-in-essay-scoring/infer_traits.py
code served (permissive licence) · get_code("5ad62a429309eac8")
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 dict. 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 json
import ast
import re
import logging

logger = logging.getLogger(__name__)

def _flatten_traits(parsed: dict) -> dict:
    """
    Normalize a parsed trait dict into a flat label dict.

    Handles two formats:
      - nested (CoT): {"trait": {"observation": "...", "label": "label_value"}, ...}
      - flat (legacy): {"trait": "label_value", ...}

    Returns a flat dict of trait -> label, with an additional "observations" key
    (mapping trait -> observation string) when the nested format is present.
    """
    flat = {}
    observations = {}
    for key, val in parsed.items():
        if isinstance(val, dict) and 'label' in val:
            flat[key] = val['label']
            if 'observation' in val:
                observations[key] = val['observation']
        elif isinstance(val, str):
            flat[key] = val
    if observations:
        flat['observations'] = observations
    return flat

def parse_trait_response(response_text: str) -> dict:
    """
    Parse the model's response into a flat trait-label dict.

    Accepts both the new CoT nested format and the legacy flat format.
    Tries json.loads first (preferred), then ast.literal_eval as fallback.
    Extracts the outermost {...} block if the response contains extra text.

    Returns:
        Flat dict with trait keys (+ optional "observations" key),
        or {"parse_error": True, "raw": ...} on failure.
    """
    cleaned = response_text.strip()

    def _try_parse(text: str) -> dict | None:
        for parser in (json.loads, ast.literal_eval):
            try:
                result = parser(text)
                if isinstance(result, dict):
                    return _flatten_traits(result)
            except Exception:
                pass
        return None
    result = _try_parse(cleaned)
    if result is not None:
        return result
    match = re.search('\\{.*\\}', cleaned, re.DOTALL)
    if match:
        result = _try_parse(match.group(0))
        if result is not None:
            return result
    logger.warning(f'Could not parse response: {cleaned[:300]}')
    return {'parse_error': True, 'raw': response_text}


# Test cases for different input formats
ARGS = {
    "response_text": '{"trait1": "label1", "trait2": "label2"}'
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
prepare_pseudo_label_training_data Ran
ran; our contract draft was wrong, not the code
umass-ml4ed/generalization-in-essay-scoring/llama_train_wrubric.py
code served (permissive licence) · get_code("058e5870d7e482cb")
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 pandas as pd
import logging

logging.basicConfig(level=logging.INFO)

# Create test_df with essay_id and essay_text columns
test_df = pd.DataFrame({
    'essay_id': ['essay_1', 'essay_2', 'essay_1'],
    'essay_text': [
        'This is the first essay about writing skills.',
        'This is the second essay about reading comprehension.',
        'This is the first essay about writing skills.'
    ]
})

# Create rubric_df with required columns
rubric_df = pd.DataFrame({
    'Subskill': ['3.1 Main Idea', '3.2 Supporting Details', '4.1 Grammar', '4.2 Punctuation'],
    'Definition': [
        'Ability to identify main idea',
        'Ability to provide supporting details',
        'Understanding of grammar rules',
        'Understanding of punctuation rules'
    ],
    'Not Applicable': [
        'Not applicable for this skill',
        'Not applicable for this skill',
        'Not applicable for this skill',
        'Not applicable for this skill'
    ],
    'Below Emerging': [
        'Does not identify main idea',
        'No supporting details',
        'Grammar errors present',
        'Punctuation errors present'
    ],
    'Emerging': [
        'Partially identifies main idea',
        'Few supporting details',
        'Minor grammar errors',
        'Minor punctuation errors'
    ],
    'Expanding': [
        'Clearly identifies main idea',
        'Some supporting details',
        'Good grammar',
        'Good punctuation'
    ],
    'Exemplifying': [
        'Exceptionally identifies main idea',
        'Excellent supporting details',
        'Excellent grammar',
        'Excellent punctuation'
    ]
})

# Create pseudo_labels dict
pseudo_labels = {
    'essay_1': {
        '3.1 Main Idea': {
            'label': 'exemplifying',
            'justification': 'The essay clearly articulates the main idea throughout.'
        },
        '3.2 Supporting Details': {
            'label': 'expanding',
            'justification': 'Good use of supporting details.'
        }
    },
    'essay_2': {
        '4.1 Grammar': {
            'label': 'emerging',
            'justification': 'Minor grammar issues present.'
        },
        '4.2 Punctuation': {
            'label': 'expanding',
            'justification': 'Punctuation is mostly correct.'
        }
    }
}

# train_subskill_nums list
train_subskill_nums = [3, 4]

ARGS = {
    'test_df': test_df,
    'rubric_df': rubric_df,
    'pseudo_labels': pseudo_labels,
    'train_subskill_nums': train_subskill_nums
}
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
prepare_training_data Ran
ran; our contract draft was wrong, not the code
umass-ml4ed/generalization-in-essay-scoring/llama_data.py
code served (permissive licence) · get_code("6d66bc0a52473e77")
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 pandas as pd

# Create essay_df with essay data
essay_data = {
    'essay_id': [1, 2],
    'essay_text': ['This is a sample essay about writing.', 'Another essay example for testing.'],
    'Subskill 1': ['exemplifying', 'emerging'],
    'Subskill 2': ['expanding', 'below_emerging'],
    'Subskill 1: Writing Clarity': ['exemplifying', 'emerging'],
    'Subskill 2: Organization': ['expanding', 'below_emerging']
}
essay_df = pd.DataFrame(essay_data)

# Create rubric_df with rubric definitions
rubric_data = {
    'Subskill': [
        'Subskill 1: Writing Clarity',
        'Subskill 2: Organization'
    ],
    'Definition': [
        'The ability to express ideas clearly and concisely.',
        'The ability to structure ideas in a logical order.'
    ],
    'Not Applicable': [
        'N/A - not applicable for this essay',
        'N/A - not applicable for this essay'
    ],
    'Below Emerging': [
        'Writing is unclear and difficult to follow.',
        'Ideas are disorganized and hard to follow.'
    ],
    'Emerging': [
        'Writing is somewhat clear with minor issues.',
        'Ideas are mostly organized with some gaps.'
    ],
    'Expanding': [
        'Writing is clear and generally well-expressed.',
        'Ideas are well-organized with logical flow.'
    ],
    'Exemplifying': [
        'Writing is exceptionally clear and compelling.',
        'Ideas are excellently organized and coherent.'
    ]
}
rubric_df = pd.DataFrame(rubric_data)

# Create justification_df with justifications
justification_data = {
    'Essay ID': ['1', '1', '2'],
    'Subskill': ['Subskill 1', 'Subskill 2', 'Subskill 1'],
    'Justification': [
        'The essay demonstrates exemplary writing clarity with well-constructed sentences.',
        'The essay shows good organization with clear transitions between paragraphs.',
        'This essay shows emerging clarity with some awkward phrasing.'
    ]
}
justification_df = pd.DataFrame(justification_data)

split_name = 'train'

ARGS = {
    'essay_df': essay_df,
    'rubric_df': rubric_df,
    'justification_df': justification_df,
    'split_name': split_name
}
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
analyze_token_lengths Not yet run
unverified (harvested, no recorded run)
umass-ml4ed/generalization-in-essay-scoring/llama_data.py
code served (permissive licence) · get_code("a116a51e8dfc0b6a")
How it ran

no invocation recorded.

load_version Not yet run
unverified (harvested, no recorded run)
umass-ml4ed/generalization-in-essay-scoring/majority_vote_traits.py
code served (permissive licence) · get_code("2f207ee0f029edcd")
How it ran

no invocation recorded.

majority_vote Not yet run
unverified (harvested, no recorded run)
umass-ml4ed/generalization-in-essay-scoring/majority_vote_traits.py
code served (permissive licence) · get_code("965991a74fc77621")
How it ran

no invocation recorded.

Also present in other papers' code

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

Automated essay scoring (AES) research has largely focused on cross-prompt generalization, where essays from unseen prompts are scored while the scoring criteria are typically held constant. In practice, however, educators may revise or even introduce new rubrics in their scoring task, to evaluate different aspects of essays. We study cross-rubric generalization: training on essays labeled under one set of rubrics and evaluating on previously unseen rubrics, which target different aspects of the essay. We use a Large Language Model (LLM) fine-tuning framework with two components: rubric-agnostic intermediate representations, called traits, and target-essay supervision under seen rubrics during training. On an AES dataset augmented with multiple rubric-defined labels of student critical thinking skills, we find that traits improve macro F1 by 5.0% over a baseline without traits in the hardest setting, where both target rubrics and target essays are unseen during training. We further find that increasing target-essay supervision improves performance, with our best fine-tuned open-source Llama-based model outperforming GPT-5-mini prompting by 2.1% macro F1 and trailing GPT-5 by 1.9%. These results show that trait-based intermediate structure and controlled supervision improve generalization to unseen rubrics. github.com/umass-ml4ed/generalization-in-essay-scoring

For agents

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

get_harvested_code_for_paper("2607.13433")
get_code_for_paper("2607.13433")
have("2607.13433")

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

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

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

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

Connect an agent — have() is free.