Pith. Sign in

RECORD

Learning Semantic Vector Representations of Source Code via a Siamese Neural Network

Machine Learning · Submitted 26 Apr 2019

abstract compiled · 2026-09-23 · no language-model review

The authors' main claim Our model significantly outperforms a bag-of-tokens embedding, providing promising results for improving code embeddings that can be used in future software engineering tasks.

how it is stated · asserted 0.96 read the record →

Comment (0) Read on arXiv ↗
Cite ▾
arXiv ID1904.11968 (version 1)
Pith ID2NEKVEI2, Pith's permanent record of this paper and its review
CitationBo Zhang, David Wehr, Eleanor Pence, Guilherme Ferreira, Halley Fede, John Walczyk, Joseph Hughes. "Learning Semantic Vector Representations of Source Code via a Siamese Neural Network." arXiv:1904.11968 (2019). https://pith.science/paper/2NEKVEI2
Claim paper

The compiled record

The paper's own sentences, arranged. Each label is drawn from a closed vocabulary; the number beside it is the probability the classifier gave that label. Numbers in the tables are the authors', checked by code. No sentence in this record was written by a model.

Open the compiled record

Compiled by classifier-1.13.0 via TypeSafe API, question bank abstract-p1-20260923, 2026-09-23: 1 request, 3,581 input tokens.

What the abstract itself states, as probabilities: claims first 0.04 · states limitation 0.07 · human participants 0.03 · controlled comparison 0.90 · randomized assignment 0.01 · states quantitative result 0.07 · compares with prior results 0.95 · mentions code or data availability 0.03.

The abstract, sentence by sentence

arXiv listing abstract v1. Results and the main claim are underlined; .

The abundance of open-source code, coupled with the success of recent advances in deep learning for natural language processing, has given rise to a promising new application of machine learning to source code. In this work, we explore the use of a Siamese recurrent neural network model on Python source code to create vectors which capture the semantics of code. We evaluate the quality of embeddings by identifying which problem from a programming competition the code solves. Our model significantly outperforms a bag-of-tokens embedding, providing promising results for improving code embeddings that can be used in future software engineering tasks.

background contribution method result interpretation main claim

What the classifier reports for each sentence. The number is the probability it gave the label.
#sentencerolethe authors' own workstates the main conclusionstrength
s0 The abundance of open-source code, coupled with the success of recent advances in deep learning for natural language processing, has given rise to a promising new application of machine learning to source code. background 1.00 0.04 0.03 asserted 0.85
s1 In this work, we explore the use of a Siamese recurrent neural network model on Python source code to create vectors which capture the semantics of code. method 0.54 0.94 0.05 asserted 0.83
s2 We evaluate the quality of embeddings by identifying which problem from a programming competition the code solves. method 0.94 0.94 0.04 asserted 0.95
s3 Our model significantly outperforms a bag-of-tokens embedding, providing promising results for improving code embeddings that can be used in future software engineering tasks. result 0.82 0.95 0.88 asserted 0.96

What kind of paper the classifier reports this is: method or tool 0.97 · evidence from observation or experiment 0.94.

What was examined, and what was not

sources read
  • arXiv listing abstract v1
not examined
  • full text
  • figures and tables
  • references and citing sentences
  • relations to other papers
levels run
  • P abstract
not run
  • S sections
  • T body sentences
  • C citations
  • R cross-paper relations

Every quoted sentence on this record is the authors'. Every label is from Pith's closed vocabulary, with the probability shown beside it. Every number in the measurements table is the authors', checked by code. Record as JSON

The paper
Original abstract

The abundance of open-source code, coupled with the success of recent advances in deep learning for natural language processing, has given rise to a promising new application of machine learning to source code. In this work, we explore the use of a Siamese recurrent neural network model on Python source code to create vectors which capture the semantics of code. We evaluate the quality of embeddings by identifying which problem from a programming competition the code solves. Our model significantly outperforms a bag-of-tokens embedding, providing promising results for improving code embeddings that can be used in future software engineering tasks.

Human review
How the literature uses it

What this paper does with the arXiv papers it cites

Each citing sentence is taken from the citing paper's LaTeX source and typed by Pith's classifier. A label appears at probability 0.8 or more (0.95 for support), a contest at 0.7 or more; the quoted words are the citing authors'. How each label was checked · JSON

What it cites

Uses the method or tool of 3 papers
  • For pre-training, we collected all Python projects on public GitHub [ref] that had over 100 stars (using code from [ref] ) and extracted their functions as separate training samples, resulting in 1.3 million total samples.

    Learning Python Code Suggestion with a Sparse Pointer Network · Data · 0.94

  • Because labeled training data is hard to obtain (requiring independent implementations), we pre-train the network by adding a decoder RNN after the encoding stage, turning it into a sequence-to-sequence model [ref] .

    Sequence to Sequence Learning with Neural Networks · Pre-training · 0.95

  • Both the pre-training and final model were trained using the Adam [ref] weight-update algorithm using standard backpropagation techniques.

    Adam: A Method for Stochastic Optimization · Pre-training · 1.00

Cites as background 5 papers

Discussion

Know something about this paper? Leave a comment, or highlight any passage above to comment on it.