SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2206.03865 · 2022

Fault-Aware Neural Code Rankers

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 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; 2 failures of our instrument; 1 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/2206.03865.json · badge: /api/ran/2206.03865.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
microsoft/coderanker canonical (classifier label)
classifier basis: classifier_2025
4 ran · 1 no recorded run
FunctionStatusWhere it lives
FaultAwareModelOutput Ran
ran on a synthesized input · constructed an object; no result was computed
microsoft/coderanker/src/run_seq_classification_and_line_prediction.py
code served (permissive licence) · get_code("1700760e0cf3e3f9")
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 an instance of its own class, FaultAwareModelOutput: the run constructed the object and did not call it, so no result was computed. 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
from transformers.file_utils import ModelOutput
from dataclasses import dataclass
from typing import Optional, Tuple

torch.manual_seed(0)

# Create small tensors for the output
batch_size = 2
num_classes = 4
seq_length = 3
num_hidden_layers = 2
hidden_dim = 8

loss_tensor = torch.randn(1, dtype=torch.float32)
line_loss_tensor = torch.randn(batch_size, dtype=torch.float32)
classifier_loss_tensor = torch.randn(1, dtype=torch.float32)
line_logits = torch.randn(batch_size, 5, dtype=torch.float32)
classifier_logits = torch.randn(batch_size, num_classes, dtype=torch.float32)

# Create hidden states tuple
hidden_states = tuple(
    torch.randn(batch_size, seq_length, hidden_dim, dtype=torch.float32)
    for _ in range(num_hidden_layers)
)

# Create attentions tuple
attentions = tuple(
    torch.randn(batch_size, 6, seq_length, seq_length, dtype=torch.float32)
    for _ in range(num_hidden_layers)
)

ARGS = {
    "loss": loss_tensor,
    "line_loss": line_loss_tensor,
    "classifier_loss": classifier_loss_tensor,
    "line_logits": line_logits,
    "classifier_logits": classifier_logits,
    "hidden_states": hidden_states,
    "attentions": attentions,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type FaultAwareModelOutput — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a FaultAwareModelOutput 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
compute_vanilla_metrics Ran
ran; our contract draft was wrong, not the code
microsoft/coderanker/src/compute_metrics.py
code served (permissive licence) · get_code("ff8254638aec856b")
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 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 numpy as np

# Construct grouped_labels - a list of lists where each inner list contains labels
# The function expects labels to be either 'Correct', 'Execution error', or other strings
grouped_labels = [
    ['Correct', 'Correct', 'Execution error', 'Correct'],
    ['Correct', 'Execution error', 'Execution error'],
    ['Correct', 'Correct', 'Correct', 'Correct', 'Correct'],
]

ARGS = {
    'grouped_labels': grouped_labels
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — 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
get_data Ran
ran; our contract draft was wrong, not the code
microsoft/coderanker/src/compute_metrics.py
code served (permissive licence) · get_code("acfd98dfb7817a6f")
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 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 json
import tempfile
import os

# Create temporary files for the function to read
temp_dir = tempfile.mkdtemp()

# Create logits prediction file
logits_file = os.path.join(temp_dir, 'logits.txt')
with open(logits_file, 'w') as f:
    f.write('index\tlogits\n')
    f.write('0\t[0.1, 0.2, 0.3, 0.4]\n')
    f.write('1\t[0.5, 0.6, 0.7, 0.8]\n')

# Create data file with JSONL format
data_file = os.path.join(temp_dir, 'data.jsonl')
with open(data_file, 'w') as f:
    f.write(json.dumps({'prompt': 'hello', 'text': 'world', 'id': 1}) + '\n')
    f.write(json.dumps({'prompt': 'hello', 'text': 'universe', 'id': 2}) + '\n')

# Create labels file
labels_file = os.path.join(temp_dir, 'labels.txt')
with open(labels_file, 'w') as f:
    f.write('label1\n')
    f.write('label2\n')

ARGS = {
    'logits_prediction_file': logits_file,
    'data_file': data_file,
    'labels_file': labels_file,
    'prompt_key': 'prompt'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
tqdm — 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
pass_at_k Ran
ran, honoured the contract we drafted
microsoft/coderanker/src/compute_metrics.py
code served (permissive licence) · get_code("62af43e66bbbc806")
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 float64, 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 numpy as np

# Analyzing the function:
# - n: total number of samples (integer)
# - c: number of correct samples (integer)
# - k: k in pass@k (integer)
# The function uses these as integers in arithmetic operations

ARGS = {
    "n": 100,
    "c": 50,
    "k": 10
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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, 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
RobertaForFaultAwareRanker Not yet run
unverified (harvested, no recorded run)
microsoft/coderanker/src/run_seq_classification_and_line_prediction.py
code served (permissive licence) · get_code("c983d662daf116af")
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, 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 4 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
pass_at_k 6 other papers
6 later
2306.10763 (2023-06)
Guiding Language Models of Code with Global Context using Monitors
2402.09497 (2024-02)
Instruction Tuning for Secure Code Generation
2503.05592 (2025-03)
R1-Searcher: Incentivizing the Search Capability in LLMs via Reinforcement Learning
and 3 more not named here

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

Large language models (LLMs) have demonstrated an impressive ability to generate code for various programming tasks. In many instances, LLMs can generate a correct program for a task when given numerous trials. Consequently, a recent trend is to do large scale sampling of programs using a model and then filtering/ranking the programs based on the program execution on a small number of known unit tests to select one candidate solution. However, these approaches assume that the unit tests are given and assume the ability to safely execute the generated programs (which can do arbitrary dangerous operations such as file manipulations). Both of the above assumptions are impractical in real-world software development. In this paper, we propose CodeRanker, a neural ranker that can predict the correctness of a sampled program without executing it. Our CodeRanker is fault-aware i.e., it is trained to predict different kinds of execution information such as predicting the exact compile/runtime error type (e.g., an IndexError or a TypeError). We show that CodeRanker can significantly increase the pass@1 accuracy of various code generation models (including Codex, GPT-Neo, GPT-J) on APPS, HumanEval and MBPP datasets.

For agents

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

get_harvested_code_for_paper("2206.03865")
get_code_for_paper("2206.03865")
have("2206.03865")

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

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

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

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

Connect an agent — have() is free.