[ BENCHMARKS / v5.0 / TASKS / 196_polyphase_resampler ]
Polyphase resampler 44.1k -> 48k with >= 80 dB stopband in Python.
A 44.1 kHz to 48 kHz sample-rate converter with zero latency, a bounded dependency window, streaming and at least 80 dB of stopband rejection, standard library only.
- Unit
196_polyphase_resampler- Category
- Signal Processing & DSPMultirate / sample-rate conversion
- Language
- Python
- Difficulty
- Hard900 s wall clock (15 min)
- Origin
- New in v5
- Ranked rows passed
- 5/7single seed each
The prompt
The agent receives exactly this text as its task, verbatim. The harness adds its own system prompt and, in some campaign arms, guidance of its own; the harness chapter describes those. The task’s setup also writes the files its working directory starts with (a worked sample, a repository or a service, where the prompt names them); they are not reproduced here.
Create /tmp/eval_resamp196/resample.py (Python 3.12, standard library only): a sample-rate converter from 44100 Hz to 48000 Hz for real mono signals.
Signal model. An input x of N samples (a list of floats, |x[n]| <= 1, 0 <= N <= 200000) has sample n at time n/44100 s; x is 0 outside 0..N-1. The output y has sample m at time m/48000 s, for every m >= 0 whose time is strictly before N/44100 s, so len(y) is exactly the number of such m. y must be time-aligned with x (zero latency): y[m] estimates the band-limited signal at time m/48000 s itself, not at a delayed time. Each y[m] may depend only on input samples whose time is within 64 input-sample periods (64/44100 s) of m/48000 s, on the past side as well as the future side. This is checked: changing input samples outside that window of m must leave y[m] unchanged (to 1e-9).
API (both required):
- resample(x: list[float]) -> list[float]: the whole signal at once.
- class Resampler with Resampler() (no arguments), process(chunk: list[float]) -> list[float] and flush() -> list[float]. Feeding x as consecutive chunks of any sizes (empty chunks included) and concatenating every process() result followed by the flush() result must give resample(x) to within 1e-9 per sample. Streaming may hold outputs back, but once process() calls have delivered n samples in total, every output m with 147*m/160 + 64 < n (its whole dependency window delivered) must already have been returned. One Resampler instance converts one stream; flush() is called once, at the end.
Quality, judged on interior outputs (at least 2 ms from either end of the signal). For any input tone x[n] = A*sin(2*pi*f*n/44100 + phi) with 0 <= f <= 20000 Hz, 0.1 <= A <= 1 (for f = 0, x[n] = A), with t = m/48000 s:
- passband: the output's component at f has amplitude within +/-0.1 dB of A and phase within 2*pi*f*1e-6 rad of phi (timing error at most 1 microsecond);
- stopband: every other spectral component of the output, at a frequency more than 100 Hz away from f, is at least 80 dB below that tone. The validator measures this with a Kaiser-window (beta = 14) FFT over 8192 consecutive interior output samples;
- sample accuracy: every interior y[m] is within A*(0.0136 + 2*pi*f*1e-6) of A*sin(2*pi*f*t + phi) (of A for f = 0).
Sums of tones (what superposition gives any linear resampler that meets the single-tone rules): for x[n] = sum_i A_i*sin(2*pi*f_i*n/44100 + phi_i) with 20 <= f_i <= 20000 Hz and sum_i A_i <= 1, every interior y[m] is within sum_i A_i*(0.0136 + 2*pi*f_i*1e-6) of sum_i A_i*sin(2*pi*f_i*t + phi_i). Hidden cases check this on one-shot and streamed outputs alike.
Speed: all hidden cases together (about 300,000 output samples in all) must finish within 8 s of CPU time, counted over the solution process and anything it starts (the budget scales with the harness's contention factor). One of them is a 2-second signal made of back-to-back tone segments (each segment a fresh tone of the form above, starting at its own segment boundary); every one of its outputs at least 2 ms from a segment boundary is held to all three quality criteria for its segment's tone.
Allowed imports: math, cmath, array, itertools, functools, operator, bisect, collections, typing, dataclasses, fractions, decimal, abc, enum, numbers, copy, heapq. No other module (no numpy/scipy), and no exec/eval/compile/__import__/open; this is also enforced at run time (loading any other module, or opening files, makes the solution process fail).
/tmp/eval_resamp196/sample.txt lists a few input/output lengths. Validation runs about 49 hidden, seeded cases (lengths, tones and sums of tones across the passband, two locality probes, streaming with random chunk sizes on tone content, streams stopped part-way, a speed case), spread over several separate solution processes, and reports only the index and kind of the first failing case. Write your own tests.What it tests and why it is in the suite
What it asks. A 44.1 kHz to 48 kHz sample-rate converter with zero latency, a bounded dependency window, streaming and at least 80 dB of stopband rejection, standard library only.
Why it is here. A new family. v4 had no discriminating signal-processing unit; this family and the Q15 biquad cascade cover it.
In the suite README: evals/README.md:133 · evals/README.md:190–193
How it is graded
The validator holds its checks where the agent cannot read them, and runs them against what the agent left on disk once it stops. Its hidden cases are generated inside the validator from a seed; any worked sample the prompt names is only a sample, and no expected output for a hidden case is in the agent’s directory. Before any model ran it, the unit was proven: its reference solution passes, plausible wrong solutions fail for the reason declared in advance, an empty solution and a leak probe fail, and, where the unit is timed, a slow solution fails by the validator’s own limit. The family also went through up to three adversarial review rounds, in which an independent verifier tried to pass every unit without solving it.
- Time. The agent has 900 s of wall clock (hard tier) before an arm’s scaling; at the wall it is stopped and whatever is on disk is validated. Any time limit in the prompt applies to the program itself.
- Verdict. Pass or fail, from the validator alone. A unit the integrity scan finds contaminated is withheld and counts as not passed; a unit lost to infrastructure is rerun, and one still lost counts as not passed.
- Scoring. SCORE is 0.75 × SOLVE + 0.25 × LANG over the whole suite, with hard problems weighted above medium ones. Scoring and ranking
Upstream: the prover’s controls · one unit’s life cycle · why v5 is built this way
How each ranked run did
One run per board row, the DGX Spark pair first, then the RTX 5090, then the gold standard. Each is a single seed: a pass or a fail on one unit is one draw, and a difference between two rows on one unit says little on its own. Claude Opus 5.5 is the unranked reference, in its own scaffold.
DGX Spark pair
- DeepSeek-V4.1-Flash#1 on the boardPassedPassed the validator.
- Hy4-flash#2 on the boardPassedPassed the validator.
- GLM-5.3-Flash#3 on the boardPassedPassed the validator.
One RTX 5090
- Inkling 2 Mini#4 on the boardPassedPassed the validator.
- Inkling 2 Mini Derisked#5 on the boardFailedDid not pass the validator.
- Inkling 2 Mini SC117 abliterated#6 on the boardFailedDid not pass the validator.
- Qwen3.8 27B Uncensored MTP#7 on the boardPassedPassed the validator.
Gold standard · unranked
- Claude Opus 5.5Claude Code tools, no turn cap, 2× wallPassedPassed the validator.