Fix PATENTS ground truths: regenerate query3 from released data, de-ambiguate query1/query2 - #59
Merged
Merged
Conversation
Co-authored-by: Shreya Shankar <shreyashankar@berkeley.edu>
…ry1/query2 Co-authored-by: Shreya Shankar <shreyashankar@berkeley.edu>
…scription Co-authored-by: Shreya Shankar <shreyashankar@berkeley.edu>
…nventions and clarified query text Co-authored-by: Shreya Shankar <shreyashankar@berkeley.edu>
… hints Co-authored-by: Shreya Shankar <shreyashankar@berkeley.edu>
shreyashankar
marked this pull request as ready for review
June 12, 2026 22:35
…coring script Co-authored-by: Shreya Shankar <shreyashankar@berkeley.edu>
Co-authored-by: Shreya Shankar <shreyashankar@berkeley.edu>
…EADME and website Co-authored-by: Shreya Shankar <shreyashankar@berkeley.edu>
…otes instead Co-authored-by: Shreya Shankar <shreyashankar@berkeley.edu>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
All three PATENTS queries have a 0% pass rate across the 270 recorded runs in
submissions/andleaderboard_submissions/, including the top leaderboard agents. Auditing the ground truths against the released data found two distinct problems, both fixed here:db_description_withhint.txt.The PR also recomputes Pass@1 for every leaderboard row under the new validators — from the submission JSONs stored in the repo, plus the JSONs fetched from each submission PR branch (
refs/pull/<N>/head) for rows not stored on main — and updates the README and website (docs/) leaderboards accordingly.query3: ground truth regenerated
The original ground truth follows the classic BigQuery
patents-public-datacitation join:assignee_harmonizedcontains the nameUNIV CALIFORNIA(exact match —UNIV CALIFORNIA AT SAN DIEGOis excluded, which is why CALIFORNIA INST OF TECHN / G01V was not in the ground truth even though its patent US-2005165588-A1 cites US-6237292-B1).citation[].publication_numberequals a cited publication number, with every name in the citing patent'sassignee_harmonizedreported (excludingUNIV CALIFORNIA).first = true, truncated to the 4-character subclass and joined tocpc_definition.titleFull.Applying exactly this join to the released data finds three citing publications:
All three resulting (assignee, titleFull) pairs were in the original ground truth and the derivation produces zero pairs outside it, confirming the join logic. However it covers only 3 of the original 28 pairs.
The released SQLite table keeps one assignee per publication: the
Patents_infonatural-language summary renders a single name from what was originally the multi-valuedassignee_harmonizedarray, and no other column carries assignee data. This loses information on both sides of the join:ATRIONIX INC(co-assigned to The Regents of the University of California; cited by the US-8932208-B2 group and by VIVANT MEDICAL INC) and US-2006293730-A1 is rendered asRUBINSKY BORIS(co-assigned to UC; cited by FARAPULSE INC). The full text of US-6245064-B1 contains no mention of California or the Regents, so the link cannot be recovered from unstructured fields either.MAQUET CARDIOVASCULAR LLCandCRYSTAL IS INC | H01Lare co-assignees of citing patents whose released rows render only one name (KENDALE AMAR,SCHOWALTER LEO J).MAQUET CARDIOVASCULAR LLCappears nowhere in anyPatents_infostring.Since
validate.pyrequires every ground-truth pair to appear in the answer, no answer computed from the released databases could pass — consistent with the observed 0/270 runs.Fix applied
query3/ground_truth.csvand the ground-truth list inquery3/validate.pywere regenerated from the released data (the three pairs above). The validator still only requires ground-truth pairs to be present, so answers that additionally include near-miss pairs (e.g. CALIFORNIA INST OF TECHN via the UNIV CALIFORNIA AT SAN DIEGO patent) continue to pass.An alternative fix would be re-releasing the database with the full assignee lists (e.g. an
assignee_harmonizedcolumn analogous toinventor_harmonized) and keeping the original 28-pair ground truth.query1 / query2: ground truths regenerated under principled conventions
The original ground truths reproduce exactly from the released data, but only with conventions that look like implementation artifacts rather than deliberate choices:
first = truewas counted separately, including literal duplicate entries in the released JSON (some patents list the same code withfirst: truetwice, and both counted);pandas.ewm(adjust=False)behavior).A rigorous solver making the standard choices — count distinct patents, treat missing years as zero filings, seed with the first value — gets a different answer and fails validation.
Fix applied
Both ground truths were regenerated with the principled conventions: count each patent once per CPC group (primary
first = truecodes, deduplicated per patent); EMA over the complete year range from the group's first to last filing year with gap years as zero; EMA initialized with the first year's count; best year = argmax (earliest on tie).The query texts are unchanged. The conventions that are not standard defaults are documented as hints in
db_description_withhint.txt(use only primaryfirst = trueCPC codes counting each patent once per group; include every year from first to last filing year with empty years as zero; earliest year on ties). Under the new recipe the EMA initialization needs no hint: textbook recursive seeding and pandas' defaultadjust=Trueproduce identical best years for every group in both queries.Resulting changes: query1 goes from 50 to 72 level-5 groups with best year 2022 (39 retained); query2 keeps the same 23 level-4 groups while 7 best years change (B29, B60, F02, F16, G01, G02, H01).
Historical submissions under the new PATENTS validators
Re-validating all 270 stored runs per query:
The PR-branch submissions also gain PATENTS passes under the new validators: Spacedock Opus 4.8 (q2 2/5, q3 1/5), Altimate Sonnet 4.6 (q2 1/5, q3 1/5), Spacedock Opus 4.6 (q3 1/5), Pi Coding Agent (q3 1/5). The passers are exactly the agents that performed the correct derivation from the released data and were previously penalized for the unrecoverable pairs.
Full leaderboard recomputation (README + website)
Pass@1 was recomputed for all 17 leaderboard rows by re-running each query's
validate.pyover the submission JSONs under the current validators. Methodology calibration: scoring the stored JSONs under the March 2026 validator snapshot reproduces the published values exactly for Claude-Opus-4.6 (0.4376) and PromptQL Gemini-3.1-Pro (0.543), confirming the aggregation is the mean over datasets of each dataset's average per-query pass rate.Ranking changes: Altimate's two entries move to #1/#2 (overtaking Spacedock Opus 4.8, whose own score also rises; Altimate's #44 PR title already reported 0.671 under relaxed validators, closely matching the recomputed 0.6822), Pi Coding Agent overtakes the PromptQL entries, and Tenacious Intelligence drops below Gemini-3-Pro ReAct (its score decreases; it has 5–7 variable trials per query, scored with per-query denominators).
Most increases come from non-PATENTS validator relaxations merged since the rows were scored ("Relax 16 validators", "Fix validation script bugs across 13 validators", etc.) — published numbers were never refreshed after those merges. The PATENTS change itself contributes passes only to Gemini-3-Pro ReAct, both PromptQL entries, Spacedock (both), Altimate Sonnet 4.6, and Pi Coding Agent. Notes: Team PaLM's submission covers 49 of 54 queries (missing queries scored 0); sources for rows not stored on main are the JSONs in their PR branches (
refs/pull/<N>/head), which remain accessible even though those PRs were closed without merging the files.Updated surfaces: README leaderboard table (re-scored, re-ranked, footnote documenting methodology) and the website (
docs/data/leaderboards.jsonoverall + both stratified per-dataset tables re-scored and re-ranked; footnote added inindex.html).Verification
validate.pyare consistent with each other.docs/data/leaderboards.jsonvalidated as JSON anddocs/app.jssyntax-checked.