Hypothesis→experiment scientific discovery benchmark - #90
Conversation
Evolve experiment design and model fitting against a hidden noisy oracle, scored by held-out R² on the true nonlinear process. Co-authored-by: Cursor <cursoragent@cursor.com>
shubham3-ucb
left a comment
There was a problem hiding this comment.
Thanks @ShauryaVM, love the framing. Two blockers before merge, both leak the hidden target (both reproduced live):
-
(critical)
evaluator.py:14-16insert the evaluator dir ontosys.pathbefore loading the candidate, soworld.true_functionis importable. A candidate whosefit_hypothesisreturnslambda x: world.true_function(x)gets the noiseless truth. PoC:{combined_score: 1.0, r2: 1.0, mse: 0.0}. Fix: loadworldin an isolated namespace unreachable from the candidate, or sandbox candidate execution. -
(high)
evaluator.py:55uses onerng = np.random.default_rng(0), passed todesign_experiments, then reused for oracle noise and to draw the held-outx_test = sample_inputs(TEST_N, rng). A candidate can snapshotrng.bit_generator.state, skip the 40 oracle-noise draws, and reconstructx_testexactly. PoC:reconstructed == actual x_test: True, max abs diff 0.0. Fix: use an independent test generator (e.g.rng.spawn()) that is never handed to candidate code.
Minor: world.py hardcodes default_rng(0) (world.SEED unused), so the test set is identical every run; consider rotating/undisclosed seeds and averaging. config.yaml:37 has the same dead cascade_thresholds.
Happy to re-review once these are in.
…ndidates Load the oracle in a private namespace, drop the evaluator dir from sys.path during candidate exec so `import world` fails, and spawn an independent held-out generator that is never handed to candidate code. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Addressed the isolation leaks from the review:
Regression: |
|
@ShauryaVM Thanks, the two named leaks are genuinely closed: The oracle-leak class is still open though. Candidate code runs in the same process and call stack as |
Wedge for scientific discovery beyond coding contests: the candidate designs which points to query on a hidden noisy oracle, fits a hypothesis, and is scored by noiseless held-out R².
What lands
How I tested
Made with Cursor