Goto

Collaborating Authors

 dobf




DOBF: A Deobfuscation Pre-Training Objective for Programming Languages

Neural Information Processing Systems

Recent advances in self-supervised learning have dramatically improved the state of the art on a wide variety of tasks. However, research in language model pre-training has mostly focused on natural languages, and it is unclear whether models like BERT and its variants provide the best pre-training when applied to other modalities, such as source code. In this paper, we introduce a new pre-training objective, DOBF, that leverages the structural aspect of programming languages and pre-trains a model to recover the original version of obfuscated source code. We show that models pre-trained with DOBF significantly outperform existing approaches on multiple downstream tasks, providing relative improvements of up to 12.2% in unsupervised code translation, and 5.3% in natural language code search. Incidentally, we found that our pre-trained model is able to deobfuscate fully obfuscated source files, and to suggest descriptive variable names.


Table 3: Dataset statistics. Java Python All - Size 26 GB19 GB All - Nb files 7.9M 3.6M Av. nb of tokens / file 718 1245 Av. nb of identifiers / file 25.9 41.8 Input Code Proposed Function Name

Neural Information Processing Systems

DOBF finds relevant names for Java methods without copying any part of the other tokens. For instance, in the first example, it understands that this function is used to get environment variables. Although l and a are not very informative, they indicate that the variable is a list or an array. These three functions perform graph traversals. Linear(input_size, ( 4 * hidden_size), bias = bias) self .



DOBF: A Deobfuscation Pre-Training Objective for Programming Languages

Neural Information Processing Systems

Recent advances in self-supervised learning have dramatically improved the state of the art on a wide variety of tasks. However, research in language model pre-training has mostly focused on natural languages, and it is unclear whether models like BERT and its variants provide the best pre-training when applied to other modalities, such as source code. In this paper, we introduce a new pre-training objective, DOBF, that leverages the structural aspect of programming languages and pre-trains a model to recover the original version of obfuscated source code. We show that models pre-trained with DOBF significantly outperform existing approaches on multiple downstream tasks, providing relative improvements of up to 12.2% in unsupervised code translation, and 5.3% in natural language code search. Incidentally, we found that our pre-trained model is able to deobfuscate fully obfuscated source files, and to suggest descriptive variable names.