Sign inGet started
Paper · arXiv

Invariant Pretraining for Robust Code Representations

Encoder-based code representation models remain widely deployed for discriminative tasks such as clone detection and code classification, where their small size and low inference cost are decisive. Their robustness, however, is fragile: under invariant programs, semantically equivalent code written in different syntactic forms, learned representations degrade substantially even though program behavior is unchanged. We present an empirical study of this robustness gap across four encoder baselines, two downstream tasks, and four datasets, together with a minimal code-only continued pretraining recipe that closes much of it. Our method, invariant pretraining (InvPT), applies semantic-preser...

AuthorsYifeng He, Yundi Xu, Christopher Castro Gaw Gonzalo et al.
Primary categorycs.LG
Published15 August 2026
Last updated at source15 August 2026
cs.LGcs.AIcs.SE
Embed this entry
<iframe src="https://silytics.si/embed/item/8ce793dc-73da-4f5e-ac05-74885524c8c0" width="420" height="190" style="border:0" loading="lazy" title="Silytics entry"></iframe>

Free, no tracking. More about feeds and embeds.

Silytics shows public metadata from arXiv and links to the original. Information may be incomplete or out of date. Last refreshed 17 October 2026. Licenses and terms of the original apply to the work itself. Not financial, legal or professional advice.