REVIEW 2 cited by
Contrastive Code Representation Learning
Not yet reviewed by Pith; the record is open.
This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.
SPECIMEN: schema-true, not a live event
T0 review · schema-true
One-sentence machine reading of the paper's core claim.
pith:XXXXXXXX · record.json · timestamp
Contrastive Code Representation Learning
read the original abstract
Recent work learns contextual representations of source code by reconstructing tokens from their context. For downstream semantic understanding tasks like summarizing code in English, these representations should ideally capture program functionality. However, we show that the popular reconstruction-based BERT model is sensitive to source code edits, even when the edits preserve semantics. We propose ContraCode: a contrastive pre-training task that learns code functionality, not form. ContraCode pre-trains a neural network to identify functionally similar variants of a program among many non-equivalent distractors. We scalably generate these variants using an automated source-to-source compiler as a form of data augmentation. Contrastive pre-training improves JavaScript summarization and TypeScript type inference accuracy by 2% to 13%. We also propose a new zero-shot JavaScript code clone detection dataset, showing that ContraCode is both more robust and semantically meaningful. On it, we outperform RoBERTa by 39% AUROC in an adversarial setting and up to 5% on natural code.
Forward citations
Cited by 2 Pith papers
-
DPO-F+: Aligning Code Repair Feedback with Developers' Preferences
DPO-f+ fine-tunes LLMs with reward-augmented DPO to generate developer-profile-aware code-repair feedback, claiming gains over DPO that rest on LLM-judge evaluations.
-
Readability-Robust Code Summarization via Meta Curriculum Learning
A meta-curriculum fine-tuning method improves summary quality on obfuscated Python code while slightly improving quality on clean code.
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.