TECHNOLOGY

ogbg-code2: subtoken set F1 does not measure exact function-name reconstruction

In this article
THE QUICK TAKE

The official score ignores subtoken order after set conversion; a high overlap score is not evidence of an exactly reconstructed identifier.

Establish what the benchmark predicts

The ogbg-code2 specification describes method-name subtoken prediction from abstract syntax trees. It uses a project split, so evaluation concerns transfer to separate codebases as well as graph representation. Preserve the named dataset version and its target-masking contract when preparing examples. A method-name task should not silently become ordinary source-file completion with an unmasked answer available among the input identifiers.

Read the evaluator rather than guessing from its label

The official evaluator source converts each reference and prediction into sets before computing overlap-based precision, recall and F1, then averages example scores. Consequently, reordering the same subtokens does not change their set overlap, and repeated predicted subtokens do not create additional unique matches. This is a defined benchmark metric, not an implementation defect to repair while retaining the same result label.

Use a counterexample to distinguish identifier quality

Imagine a reference name assembled from the subtokens “load” and “cache”. A prediction containing both words in reverse order has the same set membership but a different ordered identifier. The official overlap score therefore cannot establish exact reconstruction by itself. If an application needs names that preserve order, report a supplementary exact or sequence-sensitive measure and identify its normalization rules. Keep that result separate from the published benchmark score so both questions remain interpretable.

Include decoding in the prediction contract

The reference encoding and decoding utilities expose vocabulary, unknown-token and end-of-sequence behavior. Truncating at a terminator or limiting the output length changes which subtokens reach evaluation. Inspect the decoded words rather than comparing internal token indices from independently built vocabularies. A decoder change can improve or degrade coverage even if graph embeddings and raw classifier outputs have not changed.

Attribute improvements to the measured question

For a fair experiment, retain project membership, masking, vocabulary construction and decoding with the evaluator version. Investigate whether an improvement reflects recovering more relevant name concepts or actually reconstructing ordered identifiers. The existing entity-group guide and software reproducibility guide provide related split and environment context. The useful claim names the measured target: benchmark subtoken overlap, exact naming quality or both, with separate evidence for each rather than a broad statement that the model understands and renames code correctly.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles