Elamur Research

Learning Python Code Suggestion with a Sparse Pointer Network

Paper · 2016 · Avishkar Bhoopchand, Tim Rocktäschel, Earl Barr et al.

Summary

A Python autocomplete tool can often tell what kind of name belongs at the cursor while still struggling to supply the name itself. A function may have been defined near the beginning of a file and called much later, after many unrelated statements. Type annotations give suggestion tools useful clues in languages such as Java, while the authors describe weaker support for dynamically typed Python. They ask whether a predictor trained on existing Python programs can make better suggestions by keeping earlier declarations available for direct lookup. Their study uses a corpus of 41 million lines of Python collected from popular GitHub projects. Code & programming languages

The study starts with a recurrent predictor that reads the file as a sequence of tokens, the units of text it predicts. Its Long Short-Term Memory, or LSTM, updates a fixed-size state as each token arrives. The authors first extend it with attention, which lets a prediction draw on several recent states directly. They then use Python’s abstract syntax tree to pick out where identifiers are introduced and keep a separate memory of those positions. The Sparse Pointer Network can give probability to the names associated with those entries. A learned controller combines that distribution with the ordinary vocabulary prediction. Its weights can change at each token, so the contribution of a remembered name depends on what the code currently calls for. Tokenization · Parsing

Across the Python corpus evaluation, the paper reports a 5 percentage point gain in top suggestion accuracy for the sparse system over the plain LSTM and a 13-fold improvement in identifier accuracy. The sparse system also achieves the lowest perplexity, a measure that rewards assigning probability to the actual continuation, and the best accuracy among the top 5 suggestions. The LSTM that attends to the previous 50 tokens has the best top suggestion accuracy among the tested systems. The ranking therefore depends on whether the task is to pick a single answer or to put the recorded answer among several plausible options. Evaluation & benchmarks

A class attribute declared 67 tokens before its use illustrates what the filtered memory can recover. In another example, a class member and an out-of-scope function argument share the spelling base_path. The sparse system assigns them separate probabilities and favors the class member, even though either choice would display the same text to the programmer. These cases give the aggregate gains a concrete interpretation. Keeping a declaration accessible can help the predictor supply a name at a later use, and preserving a separate identity for each declaration lets it distinguish between two sources of the same spelling. The authors released the Python corpus and replication code. The experiments concern suggestions within a source file.

Deep dive: Learning Python Code Suggestion with a Sparse Pointer Network

A sparse pointer network improves Python code suggestions by using earlier identifier declarations to predict which name comes next. · about 36 minutes to read

The problem and its context

Predicting a name where it is used

A code suggestion begins with an incomplete sequence. The programmer has entered some text, and the tool proposes what might follow it. The answer can be a name already defined in the program or part of a call to an external interface. The authors also point to the prospect of suggesting whole expressions or recurring patterns that extend across statements. Their experiments take a narrower, measurable slice of that task. At each position, the predictor sees the preceding tokens and assigns probabilities to the next one.

The difference between knowing the form of a continuation and knowing its spelling is especially important for identifiers. Several names might fit the current syntactic position. Choosing a particular one can depend on an earlier declaration, on what the surrounding code is doing, and on which of the available names are plausible in that context. If a function is declared near the top of a file, the tokens around a call near the bottom can suggest that a call belongs there while giving little direct evidence for the exact function name. Each intervening statement adds to the amount of source text separating the clue from the prediction.

The paper motivates its work through the difference in autocomplete support for statically typed and dynamically typed languages. Type annotations can supply information about the kinds of values or callable members that a suggestion engine should consider. Python offers less of that assistance in the setting the authors discuss. Repeated patterns in existing programs provide another source of evidence. A corpus can show how names and constructs tend to appear together, and that information can be learned even when type annotations offer little guidance. The statistical problem is to give useful weight both to general patterns across files and to names introduced in the particular file being edited.

A completion for a common piece of punctuation may need only its immediate surroundings. An identifier with meaning in one file can depend on a much longer stretch of code. Those examples place different demands on a predictor that summarizes the prefix as it reads. It has to retain details whose usefulness may become apparent only later, while it keeps updating its account of the expressions and statements currently in progress. For code suggestion, the identity of an earlier declaration is worth preserving precisely because a later reference may require its exact symbol.

What earlier approaches made available

Earlier statistical work drew on a simple observation about real programs. A programming language permits a wide range of legal expressions, yet programmers repeatedly use familiar patterns. Hindle and colleagues used that regularity to motivate probability estimates over code. Much of the work that followed used an n-gram, which estimates a token’s probability from a short sequence immediately before it. If the recent tokens regularly precede a particular continuation in a corpus, that continuation receives a high score. This works with the same basic unit as the present paper’s evaluation, a sequence of tokens drawn from source files. N-gram

Local repetition offered an additional clue. The paper describes work by Tu and colleagues that supplemented an n-gram with a cache. Modules can develop their own recurring patterns as they specialize, so evidence from the local code can be more relevant than corpus frequency alone. The cache gives local regularities a way to influence the prediction. The sparse pointer shares the aim of making program-specific context available, and the paper’s account of its predecessors helps explain why the contents of that extra memory matter. A cache motivated by local repetition and a memory indexed by introductions of names preserve different kinds of evidence.

The authors also describe a corpus of 352 million lines of Java that earlier researchers used to study n-gram prediction across project domains. Much other code suggestion work had trained on smaller collections. The Java corpus showed how large repository collections could support a broadly trained code predictor, while leaving open the specific question of how to build and evaluate a large collection for Python. Collecting data and improving access to long-range context are separate parts of the present study. More examples help estimate common patterns. A memory design determines which details from the file in front of the predictor can still influence its next decision.

Recurrent neural approaches had already extended the context that a predictor could draw on. The paper describes an earlier comparison in which a basic recurrent network outperformed n-gram approaches, including a system with a cache. It also describes subsequent work in which an LSTM improved on the basic recurrent design. An LSTM can learn which parts of its internal state to keep or update. From the perspective of the present paper, the difficulty is that this state has a fixed dimension and is subject to revision every time the input advances. A name from early in the file can consequently be hard to recover when the sequence has moved on.

Why attention and syntax enter the same design

Attention gives the current step a direct route to stored representations from earlier steps. The paper traces the method to work on alignment in translation and notes its use in question answering, syntactic parsing and textual entailment. Earlier work on reading had also given recurrent processing a memory tape, while another approach used a memory over representations of vocabulary words for language prediction. The code suggestion question was which past events to retain when the evidence might be a declaration far back in the file. Neural Machine Translation by Jointly Learning to Align and Translate · Long Short-Term Memory-Networks for Machine Reading

The paper also discusses work that represents code through a probabilistic context-free grammar. Such an approach can exploit formal grammar and the availability of parsers. It had been used to extract recurring source-code idioms. Ordinary context-free rules have difficulty expressing dependencies such as the requirement that a name be declared before it is used. The authors describe earlier work that extended a grammar-based approach with context-aware variables to address such rules. Here, syntax serves as a filter on memory, while the final prediction still concerns the next token in the source sequence. Context-free grammar · Mining Idioms from Source Code

Pointer networks provided the immediate precedent for choosing an item by referring to a position in the input. Prior code generation work used a related choice between generating a token and copying from a natural-language description. In that task the descriptions are short in the authors’ account. Code suggestion creates a different demand because the useful evidence may be far back in a long source file. The sparse design adapts the choice between generation and copying to that setting. It selects the positions eligible for copying according to the role they play in the program. Pointer Networks · Latent Predictor Networks for Code Generation

The method, step by step

Read the code and preserve introductions

Start with a tokenized Python file and imagine moving the cursor forward through it. Each time the cursor advances, the recurrent network updates its representation of the prefix. The ordinary prediction branch uses this representation to score vocabulary entries. This is where general patterns, such as which kinds of tokens tend to follow the preceding expression, can affect the answer. As the file is read, information derived from its abstract syntax tree identifies positions that introduce names. The tree records the structure of constructs such as function and class definitions, which lets the system distinguish an introduction from an arbitrary occurrence of an identifier.

When a selected introduction enters the history, the sparse system keeps the corresponding recurrent output together with the identifier’s symbol ID. The recurrent output supplies a representation of the surroundings at that point. The symbol ID says which entry should receive a score if later attention selects that memory. A file can contain a long sequence between named declarations, so this memory can span many source tokens without dedicating entries to all of them. The entries are limited by the number of subsequent introductions. A declaration can remain available through a long stretch of code and be displaced sooner in a declaration-heavy stretch.

At prediction time, the current recurrent output is used to assess the stored entries. The resulting scores do two jobs. They determine how much each declaration contributes to a summary of the memory, and they supply scores for the named vocabulary entries associated with the declarations. The controller uses the summary along with the input representation and the current recurrent output. Its decision concerns the weight assigned to each prediction branch. A single next-token distribution incorporates both branches before the suggestions are ranked.

Next-token prediction with the Sparse Pointer Network

The steps in order.

Next-token prediction with the Sparse Pointer NetworkStep 1: Read the Python prefix in token order1. Read the Python prefix in token orderStep 2: Update the recurrent representation2. Update the recurrent representationStep 3: Keep states and IDs from earlier introductions3. Keep states and IDs from earlier introductionsStep 4: Score the remembered declarations4. Score the remembered declarationsStep 5: Form vocabulary and pointer predictions5. Form vocabulary and pointer predictionsStep 6: Weight both predictions with the controller6. Weight both predictions with the controllerStep 7: Rank the next-token suggestions7. Rank the next-token suggestions

Turn a prefix into token probabilities

The statistical starting point is a probability for a complete sequence. Each token contributes the probability of seeing it after its own prefix. A correct prediction at the beginning of the file has little preceding context, whereas a prediction far into the file can in principle depend on all the earlier tokens. The factorization specifies what the probability refers to. The network architecture determines which information from the prefix actually reaches the scoring function.

Pθ(S) = Pθ(a₁) · ∏ₜ₌₂ᴺ Pθ(aₜ ∣ aₜ₋₁, …, a₁)

Here Pθ is the probability function with parameters θ, learned from the training corpus. S is the sequence of N tokens, and aₜ is the token at position t. a₁ is the first token and aₜ₋₁ is the token immediately before position t. The vertical bar introduces the conditioning prefix. The centered dot and ∏ indicate multiplication, with the product covering positions from 2 through N. The ellipsis stands for the intervening prefix tokens. The first factor supplies the probability at the start of the sequence.

The authors express completion more generally as a search for a likely continuation of a specified length. Given a fixed prefix, all the candidate continuations in that search are compared with the same preceding tokens. A longer continuation would involve choosing a sequence of tokens whose probabilities depend on the choices made along the way. The experiments report next-token performance, which makes it possible to measure the score and rank of the observed answer at each position.

argmax over aₜ₊₁, …, aₜ₊ₘ of Pθ(a₁, …, aₜ, aₜ₊₁, …, aₜ₊ₘ)

argmax means the continuation that attains the highest probability. a₁, …, aₜ is the known prefix, ending at position t, and aₜ₊₁, …, aₜ₊ₘ is the candidate continuation. The lower-case m denotes its length, called M in the paper’s completion objective. Using lower-case here keeps it distinct from the memory matrix below. Pθ assigns a joint probability to the prefix and continuation together. Each ellipsis stands for the tokens between the indicated endpoints.

In the plain LSTM, the network’s output at the prediction step carries information from processing the prefix. The predictor compares that output with a learned parameter vector for each vocabulary token and adds the token’s bias. The same prefix representation can consequently make different words, symbols or names more or less likely. The softmax converts the resulting scores to probabilities. Exponentiation gives greater weight to larger scores, and division by the total makes the probabilities sum to one.

Pθ(aₜ = τ ∣ aₜ₋₁, …, a₁) = exp(vτᵀ hₜ + bτ) / Στ′ exp(vτ′ᵀ hₜ + bτ′)

τ is the vocabulary token being scored, and τ′ ranges over the vocabulary in the denominator. vτ is the learned parameter vector for τ, bτ is its learned scalar bias, and hₜ is the LSTM output for the prediction. The primed token has its own corresponding vector vτ′ and bias bτ′. The superscript ᵀ transposes a vector so its product with hₜ is a dot product. exp is the exponential function, Σ sums the exponential scores, and / divides the candidate’s score by their sum. On the left, the equality specifies which value aₜ takes, and the vertical bar introduces the prior tokens. This equation indexes the probability by the target position. In the architectural equations that follow, the output at step t is described as predicting the next token after the input at that step.

The plain predictor can learn to carry a useful name forward in its recurrent state. All other clues about the file have to share that state. The attention variants give past representations a separate place to live. This changes the route by which an old clue reaches the decision. The current output can act as a query for a stored representation, allowing that representation to contribute directly at the point of use.

Read a memory with attention

In the first attention system, the memory is a moving window of prior LSTM outputs. A place in this window is an earlier position in the token sequence. The system keeps each stored output as a column in a matrix, so it can compare the current state with all the retained positions. It recomputes the comparisons at each prediction step. The same earlier token may be useful at one step and almost irrelevant at the next.

Mₜ = [m₁ … mₖ] ∈ ℝ^(k×K)    with the last column indexed by K

Mₜ is the memory matrix available at time t. Its columns are the stored vectors mᵢ, with the column index i running from the first entry through K. The displayed final column denotes m at index K. K is the capacity in memory entries and lower-case k is the dimension of each vector. Square brackets join the columns, the ellipsis covers the intervening entries, and ∈ ℝ^(k×K) specifies a matrix of real values with k rows and K columns. For ordinary attention, the columns come from the last K recurrent output positions.

The attention function first transforms the stored vectors and the current output into a common space. The transformed current output is added to every transformed memory column. This arrangement lets each column be scored in relation to the current prediction. Applying the hyperbolic tangent introduces a nonlinear interaction before the columns are reduced to scalar scores.

Gₜ = tanh(Wᴹ Mₜ + (Wʰ hₜ) 𝟙ₖᵀ) ∈ ℝ^(k×K)    with 𝟙 indexed by K

Gₜ contains the transformed comparisons at time t. Wᴹ is the trained projection for stored vectors, and Wʰ is the trained projection for the current LSTM output hₜ. Both are real k by k matrices. Mₜ supplies the K memory columns. The all-ones vector 𝟙 has K entries, and its transpose ᵀ is a row. Multiplying the transformed current output by that row repeats the same column K times, so + adds it to every projected memory column. This writes the repetition in an order that matches the stated column layout. tanh applies the hyperbolic tangent to every entry, and ∈ ℝ^(k×K) gives the result’s shape.

The next operation produces a score for each memory entry and normalizes across entries. A separate weighted sum creates one vector that can be passed to subsequent parts of the architecture. Keeping both the individual weights and the summary is useful because the sparse system needs to know which names received attention as well as what the retrieved context contains.

αₜ = softmax(wᵀ Gₜ) ∈ ℝ^(1×K)

αₜ is the row of attention weights at step t. The learned vector w has k components and wᵀ is its transpose. Its product with Gₜ scores each of the K columns. softmax normalizes across these scores to give a distribution over the memory positions. The membership expression ∈ ℝ^(1×K) indicates a real row with K entries, one per position.

cₜ = Mₜ αₜᵀ ∈ ℝ^k

cₜ is the context vector at step t, Mₜ is the stored memory matrix, and αₜᵀ is the column obtained by transposing the attention row. Their product sums the memory columns after multiplying each by its own attention weight. The real vector space ℝ^k indicates that the summary has k components, just like an individual memory vector. It describes selected past context and can be used alongside the recurrent representation of the current prefix.

For ordinary attention, the context vector enters the path that scores the entire vocabulary. The system stacks it with the current recurrent output, projects the stack back to the hidden dimension, and uses the result to give a probability to each token. Here attention affects how a token is generated through the ordinary output layer. A memory column contributes a representation, and the output layer still decides which vocabulary entries that representation favors.

nₜ = tanh(Wᴬ [hₜ; cₜ]) ∈ ℝ^k

nₜ is the combined representation for the prediction at time t. Within the brackets, the separator indicates vertical concatenation, so the k-component LSTM output hₜ sits above the k-component attention context cₜ. The learned matrix Wᴬ has k rows and 2k columns. It combines the stacked inputs, and tanh acts on the resulting elements. ∈ ℝ^k states the size of the output.

yₜ = softmax(Wⱽ nₜ + bⱽ) ∈ ℝ^|V|

yₜ is the probability vector for the next token from the ordinary attention system at step t. V is the vocabulary and |V| is its size. Wⱽ is the learned matrix that maps nₜ to a score for each vocabulary entry. The learned vector bⱽ adds a bias to each score. The superscript V labels the vocabulary parameters. softmax normalizes over the entries, and ∈ ℝ^|V| means that the vector has a real component for each member of the vocabulary.

Give a remembered name its own route to the output

The sparse system changes the population of the memory. Each entry is now the representation associated with an earlier identifier introduction. Function and class identifiers are examples of the items selected using the tree. The attention computation still compares the current recurrent output with each retained column, and the context vector still summarizes the selected evidence. Because the columns correspond to names, the individual attention weights can now help score those names directly.

mₜ = [id₁ … idₖ] ∈ ℕ^K    with the last entry indexed by K

Here mₜ is the time-indexed list of symbol IDs alongside the memory, distinct from the individual memory columns mᵢ. id₁ is the identifier ID for the first column and the last displayed entry denotes the ID for column K. ℕ^K denotes a vector of K integer IDs. Each ID refers to an entry in the global vocabulary. The brackets gather the entries in memory order, and the ellipsis covers the IDs between the endpoints. The parallel ordering is what lets a high attention weight on a column contribute to the score of a specific symbol.

The pointer maps the attention scores to vocabulary positions and assigns a large negative score to entries outside the set it can reference. The mapping gives the pointer a full vocabulary-shaped output that can be combined with the generation branch. Its useful probability is concentrated on cached symbols. The paper calls the result pseudo-sparse because the softmax is applied to a vocabulary vector with a finite negative score at the other entries.

sₜ[i] = αₜ[j] if mₜ[j] = i, and −C otherwise

sₜ[i] is the pre-softmax pointer score at vocabulary index i and time t. j indexes a memory slot, mₜ[j] is its stored symbol ID, and αₜ[j] is its attention weight. Square brackets select an entry of the relevant vector. If a matching slot’s ID equals i, that slot’s attention value supplies the score. −C is the large negative score for a vocabulary entry absent from memory. The paper gives −1000 as an example, with C denoting the positive magnitude.

iₜ = softmax(sₜ) ∈ ℝ^|V|

iₜ is the pointer’s distribution at time t, and sₜ is the vector of scores just defined. The vector name iₜ refers to the whole distribution and the earlier index i selects an individual vocabulary entry. softmax converts the scores into probabilities across the vocabulary V. The expression ∈ ℝ^|V| specifies one component for each vocabulary entry. This normalization acts on the projected attention values, so the final pointer probabilities follow from the displayed softmax as well as from the attention ranking.

There is a useful distinction between knowing what is relevant in memory and knowing whether a pointer should supply the answer at all. An attention distribution ranks the candidates it has been given. Even when the next token is a piece of punctuation, one remembered declaration will still be ranked highest. The sparse system uses a separate generation branch to cover the ordinary vocabulary and lets a controller decide how strongly to use the pointer’s distribution. The generation branch is driven directly by the recurrent output, as in the plain predictor.

yₜ = softmax(Wⱽ hₜ + bⱽ) ∈ ℝ^|V|

In this architecture yₜ denotes the generation distribution at time t. hₜ is the current LSTM output. Wⱽ projects it to |V| scores, one for each element of vocabulary V, and bⱽ adds the corresponding learned biases. The vocabulary superscript labels trainable parameters of that branch. softmax turns the scores into probabilities. The expression ∈ ℝ^|V| gives the size needed to combine yₜ with the pointer distribution iₜ.

Learn when to use the pointer

The controller sees three views of the current step. The input embedding represents the token being read. The recurrent output represents the context accumulated through processing the sequence. The attention summary describes the declarations retrieved from the file’s earlier history. These views allow the weight of a branch to depend on where the program is, what has just appeared, and what the memory can offer.

hₜᵡ = [hₜ; xₜ; cₜ] ∈ ℝ^(3k)

hₜᵡ is the controller’s input at step t, written with a superscript λ in the paper. The superscript here labels the stacked vector. The brackets concatenate hₜ, the current LSTM output, xₜ, the representation of the current input token, and cₜ, the attention context. The separators indicate stacking. Each has dimension k, and ∈ ℝ^(3k) specifies the resulting real vector’s length.

λₜ = softmax(Wᵡ hₜᵡ + bᵡ) ∈ ℝ^2

λₜ is the vector of mixture weights at step t. Wᵡ and bᵡ denote the controller’s learned weight matrix and bias, both carrying the superscript λ in the paper. The matrix has 2 rows and 3k columns, and the bias has 2 entries. Their affine transformation of hₜᵡ gives a score for generation and a score for pointing. softmax normalizes those scores, and ∈ ℝ^2 indicates that the result has a component for each branch. The weights sum to one.

yₜ★ = [yₜ  iₜ] λₜ ∈ ℝ^|V|

yₜ★ is the final next-token probability vector at time t. The brackets form a matrix with the generation vector yₜ in its first column and pointer vector iₜ in its second. Multiplication by the controller weights λₜ forms a weighted sum of the columns. Because both columns are vocabulary distributions and the weights are normalized, the mixture is a distribution of the same size. ∈ ℝ^|V| denotes its real component for every entry in the vocabulary V.

A name can receive support through both paths if it is available to the pointer and the generation branch also assigns it probability. The system ranks the final probabilities after that support has been combined. In the paper’s architecture illustration, the two declarations of base_path have separate symbol IDs, so the pointer has an opportunity to prefer the relevant declaration. The controller addresses a different choice, deciding how much of the final distribution should come from that pointer. Separating these decisions lets the attention ranking describe the relative promise of remembered names while the mixture determines their influence on the actual suggestions.

Train on normalized source files

The training sequence is derived from source code whose local identifiers have been normalized. For a name defined within a file, the preprocessing uses a label for its category and a random number to identify it within its scope. Categories include arguments, attributes, variables, functions and classes. Accordingly, the predictor receives information about which appearances refer to the same introduced name in the normalized representation. It can also draw on regularities involving a category across files, even when the original spellings differ.

Calls and references to external libraries and APIs keep their original names. Numerical constants are replaced with a shared marker, comments are removed, and code formatting is standardized. Tokens occurring fewer than five times are represented by an out-of-vocabulary marker. Together these choices shift the task toward patterns in the normalized code, while preserving external names subject to the corpus vocabulary procedure. The scope-specific identifiers also allow a distinction between declarations that would look identical on screen.

Training uses the observed continuation at each position and cross-entropy loss. The objective rewards the system for assigning that continuation probability in its final output. In the sparse architecture the loss can change the relative weight of the generation and pointer branches as well as the scores within them. The controller can thus learn a preference for pointing in contexts where doing so helps explain the observed token. The syntax-based entry rule is supplied as part of the representation. Learning determines how the entries are scored and used.

The authors process sequences from a source file in order. They pass the recurrent state at the end of one sequence forward to initialize the subsequent sequence from the same file and reset the state when the file changes. The sparse system is trained with truncated back-propagation through time. In this procedure, gradients pass back through a bounded portion of the recurrent computation, while the forward state can continue across sequence boundaries. The sparse memory contains a history of 20 identifier representations. This is a capacity measured in declarations, alongside a training procedure that manages the length of recurrent credit assignment.

The sparse system uses mini-batch stochastic gradient descent with a batch size of 30. Its initial learning rate is 0.7 and is decayed by a factor of 0.9 after each epoch. The ordinary attention configurations use a batch size of 75 and retain the prior 20 or 50 token outputs. All neural configurations have input and hidden dimensions of 200, an LSTM forget-gate bias initialized to ones, gradient norm clipping at 5 and random initialization in the interval (−0.05, 0.05). Dropout of 0.1 is applied to the input representations.

A vocabulary score is expensive to compute repeatedly when the vocabulary is large. The authors use sampled softmax in training, with log-uniform sampling and a sample size of 1000. This draws a subset of vocabulary entries for the training calculation. It addresses the cost of vocabulary prediction, while the filtered attention memory addresses the cost of retaining and scoring earlier positions. The neural experiments were implemented in TensorFlow, and the authors released the corpus and replication code as pycodesuggest. TensorFlow · On Using Very Large Target Vocabulary for Neural Machine Translation

Experiments and results

What went into the Python corpus

The authors wanted a large collection of Python projects from which a suggestion system could learn programming patterns. They chose project popularity as a practical quality heuristic. A GitHub star indicates that a user has marked a project, while a fork is a copy of the repository that a user can develop separately. The authors selected Python projects with more than 100 stars, ranked them by fork count in descending order, and took the top 1000. They removed projects that failed their Python3 compilation filter, leaving 949 projects and a corpus described as 41 million lines of code.

The train, development and test partitions were assigned by project. That choice defines what held-out evaluation means in the study. A source file is evaluated with the preceding tokens of that file available as context, while the training corpus comes from the designated training projects. Learning from earlier positions in a test file through its forward state and memory is part of the prediction setup. A project-level partition lets the benchmark examine whether the training procedure produces a predictor that can use this context on projects outside the training partition.

Preprocessing determines what counts as the recorded answer. If an original local name has been replaced with a category-specific anonymous identifier, it is the normalized symbol that the prediction must match. A constant represented by the numeric marker is evaluated at that level of abstraction. Preserving external names gives the benchmark a mixture of local, scope-specific identities and names that can recur across many files. These details make the corpus suitable for investigating the paper’s main question about reference to introduced names. They also matter when interpreting overall accuracy, because scores combine several kinds of targets on the same token stream.

What the comparisons measure

The count-based baselines are n-grams with orders 3, 4, 5 and 6. They use Modified Kneser–Ney smoothing from the Kyoto Language Modelling Toolkit. Smoothing allocates probability across observed patterns and supports predictions when a specific context has little or no count evidence. The comparison checks whether the advantage of recurrent prediction described in earlier work appears on the new Python corpus as well. Each n-gram order still has a short, fixed history of recent tokens for the immediate prediction.

The neural comparisons start with the plain LSTM. The next condition adds attention to previous recurrent outputs, using windows of 20 or 50 tokens. The sparse condition uses the 20 latest identifier representations and mixes its pointer distribution with the recurrent vocabulary prediction. The units of the two memory capacities matter in this comparison. A 20-token window covers a fixed number of positions, whereas a memory of 20 declarations can cover a much longer part of a file. The recurrent output remains a source of context in all the neural configurations.

The paper uses perplexity, accuracy of the highest-ranked token and accuracy among the top 5 suggestions. Perplexity measures how much probability the predictor assigns to the observed tokens across the evaluation. Greater probability on those tokens lowers perplexity. Top prediction accuracy instead counts the cases in which the observed token ranks first. Top 5 accuracy asks whether it appears anywhere among the first 5 positions. In the last metric, a recorded continuation that moves up into the displayed list counts even if another token remains first.

Probability and rank can move differently. A predictor can assign the observed token more probability while its closest competitor remains ahead, helping perplexity without improving top prediction accuracy at that position. It can also promote a name into the suggestion list without putting it first. This distinction matters in the paper because the configuration leading on the single suggestion measure differs from the one leading on the short list and on perplexity.

How the systems ranked

The neural configurations substantially outperform the n-gram baselines in the authors’ account of the corpus evaluation. Adding ordinary attention improves perplexity by 2.3 and top prediction accuracy by 3.4 percentage points relative to the plain LSTM. The authors associate this improvement with stronger identifier prediction. In the numerical comparison they describe for that subset, identifier accuracy goes from 2.1% with the plain LSTM to 21.4% with attention. These percentages describe accuracy on identifier targets. They concern a narrower target set than the overall change of 3.4 percentage points.

Identifier accuracy with and without attention on the Python corpus

Attention gives the LSTM a substantially higher hit rate on identifier targets.

Identifier accuracy with and without attention on the Python corpusPlain LSTM: 2.1Plain LSTM2.1LSTM with attention (this paper): 21.4LSTM with attention (this paper)21.4
The numbers
System or settingIdentifier accuracy %
Plain LSTM2.1
LSTM with attention (this paper)21.4

Among the tested configurations, the LSTM with the 50-token attention window ranks highest for overall top prediction accuracy. The sparse pointer system achieves the lowest perplexity and the best top 5 accuracy. Those results are compatible with the way the pointer supplies candidate names. Moving probability towards the correct name helps the probability-based score, and moving a useful name into the short list can improve coverage. Which candidate ultimately wins at a given position depends on the entire mixture and the scores of competing tokens.

Compared with the plain LSTM, the sparse system gains 5 percentage points in code suggestion accuracy in the paper’s headline comparison. The authors report identifier prediction that is 13 times as accurate as the baseline’s and attribute the accuracy gain to that improvement. The 13-fold claim is for the sparse comparison. The explicit identifier accuracy of 21.4% belongs to the comparison between the plain LSTM and attention described above. Preserving those baselines keeps the identifier result from being confused with a score for a different architecture.

The reported changes in perplexity and accuracy summarize different comparisons on the same Python corpus evaluation. The 2.3 change in perplexity concerns the addition of ordinary attention. The sparse architecture’s advantage in perplexity and top 5 accuracy is expressed by its relative ranking, and the gain of 5 percentage points is measured against the plain LSTM. The numerical claims used here concern the corpus evaluation as described in the results. A partition label or an absolute score for each system and metric would require the corresponding numerical breakdown.

What the examples reveal beyond the averages

For one example of an identifier use, the plain LSTM is uncertain about the next token. Ordinary attention and the sparse pointer both make a sensible prediction. The authors find the sparse predictor’s alternatives more reasonable beyond the correct leading suggestion. This example adds detail to an aggregate short-list score. Rank-based evaluation can count whether the recorded name is present. Examining the list itself can show what kinds of alternatives the architecture considers plausible.

A separate example targets a class attribute declared 67 tokens earlier. The sparse system is the only one of the illustrated predictors to make a good suggestion in that case. The memory gives it a route to the declaration in spite of the separation in the token stream. The plotted attention weights also indicate that it distinguished attribute entries from other identifier groups. In the appendix, a longer token-by-token display ties together the arrival of declarations, the contents of the sparse memory and the controller’s mixture weights as the sequence advances.

What the ablations show

What changes when recent representations become accessible

The plain LSTM and the LSTM with ordinary attention provide the clearest comparison for the value of giving past representations their own route into prediction. The plain configuration scores the vocabulary through its current output. The attention configuration combines that output with a weighted context derived from earlier outputs. On the normalized Python corpus, the large change in identifier accuracy indicates that access to retained states particularly helps with names. If the evidence had consisted only of the overall accuracy gain, it would have been harder to tell whether the improvement was concentrated on identifying symbols or spread across the full range of token types.

The comparison also makes the neural baseline more informative. A pointer that improves on a plain recurrent predictor might owe much of its advantage to the general idea of revisiting prior representations. Ordinary attention already supplies such access and produces a substantial gain. The sparse architecture therefore faces a stronger benchmark. Its leading scores on perplexity and top 5 accuracy describe improvements in a setting where the alternative can already retrieve recent contextual evidence.

The comparison involves an attention read and the projection that combines its context with the recurrent output. Their effects are measured together. The numerical gain supports the usefulness of that route as used in the experiment. Separating the effect of the stored states from the effect of the added output transformation would require further controls. The paper’s qualitative examples instead help interpret what the combined route is doing when the next token is a name.

How the two memory budgets differ

Comparing ordinary attention with windows of 20 and 50 tokens asks how the amount of accessible recent context affects prediction. The 50-token setting provides the best top prediction accuracy in the reported evaluation. The sparse system’s use of 20 stored declarations demonstrates a different way to spend the memory budget. Each declaration entry can persist across many other tokens, so the capacity can preserve useful older evidence without scoring every intervening position.

The counts answer different questions. The ordinary window evicts an entry as the token stream advances past the window boundary. The sparse memory evicts declarations as new declarations accumulate. A long piece of code with few introductions therefore has a different effect on the two configurations. The attribute example makes that distinction visible. Its declaration is 67 tokens earlier, beyond the explicit reach of either ordinary attention window. The recurrent state can still carry information from before the window. The sparse memory additionally offers a direct way to score the retained declaration.

This comparison changes both the selection of memory entries and the output path. Ordinary attention compresses all the selected evidence into a context vector and uses it in vocabulary generation. Sparse attention also uses the individual scores to build a pointer distribution, with a controller assigning weight to that distribution. The experiments show how the resulting configurations compare. How much of the change comes from filtering entries, how much comes from the direct pointer, and how much comes from conditioning the mixture on the controller inputs remain separate empirical questions.

What the illustrated predictions tell us

The example with a correctly predicted identifier gives the architecture comparison a concrete success shared by both attention systems. Earlier states evidently provide useful evidence for an identifier in that context. The sparse system’s alternative suggestions further illustrate how direct access to declarations can change the rest of the ranking. This matters for systems evaluated with top 5 accuracy, since the usefulness of a short list can depend on several contenders surviving the ranking, even where the leading suggestion remains the same.

The example with base_path isolates a distinction that display text would hide. The function argument and the class member have the same spelling and separate vocabulary IDs in the illustration. The pointer favors the class member, while the function argument is out of scope. The result shows that the system’s internal ranking can prefer the relevant declaration even when choosing either entry would display the same word. The architecture makes such a preference observable because symbol IDs carry distinctions beyond the rendered text.

The 67-token example shows that the sparse system can put weight on a relevant earlier attribute in an individual case. The attention display gives evidence about which kind of entry received support. The controller display in the appendix provides another view, showing the mixture weights alongside the sequence and memory contents. Together the examples connect an output to the architecture’s intermediate decisions. How consistently the same behavior holds across declaration distances, across kinds of identifiers or across naming conflicts is a question for a distribution of examples.

These analyses have different force. The accuracy comparisons measure the effect of entire configurations on the corpus, including their differences in memory and output. The examples show how a particular prediction can be traced to a stored declaration and how a name can rise in the ranking. A comparison with a disabled controller, a constant mixture or a memory populated by a different selection rule would be needed to assign individual portions of the improvement to those design choices.

Limitations

Scope stated by the authors

The authors restrict the tested task to suggestion within a single Python file. The state carries forward within that file and is reset between files, and the pointer draws on introductions in the file’s preceding history. A project-wide test would add evidence from other files and would require decisions about which declarations to make available. The authors identify project-level and collection-level context as directions for subsequent work. The released corpus is organized by project, while the reported prediction mechanism has file-level context.

Integration into an existing IDE is also left as future work. In the experiments the system sees a prefix of code and predicts the next token of a recorded file. In an editor, suggestions would have to interact with the programmer’s current text and with whatever parsing and completion facilities the environment already provides. The study supplies benchmark results for the prediction component and examples of individual suggestions. An integration study would be needed to determine its behavior in that setting.

The authors distinguish their suggestion setup from completion of a partially typed token. Their proposed direction for that problem is to use character-level prediction. The evidence here applies to selection of the next whole token from the task vocabulary. The opening discussion also motivates suggestion of expressions and multi-statement patterns. The probability formulation accommodates a sequence continuation in principle, while the reported metrics evaluate the next token. The effectiveness of a procedure that searches for longer continuations remains open. Generating Sequences With Recurrent Neural Networks

Limits that follow from the evaluation design

The benchmark measures recovery of the observed token after preprocessing. A programmer could frequently continue a prefix in more than one acceptable way. Top prediction accuracy credits one recorded continuation, and top 5 accuracy credits its presence anywhere in the candidate list. Neither measure individually evaluates whether the other proposed names are in scope or whether a continuation would accomplish the programmer’s intended change. The qualitative inspection of alternatives gives some insight into their plausibility, within the cases the authors discuss.

Normalization makes identity and category easier to study, and it changes the interpretation of the task. An anonymous name can preserve which local declaration a token denotes, while its original spelling may have given a programmer clues about its purpose. The results measure a predictor trained and evaluated with the normalized representation. Measuring how much the same design helps when scoring original identifier strings would require that version of the experiment. Likewise, the out-of-vocabulary marker groups rare tokens for evaluation, so the reported aggregate has a different meaning from exact spelling recovery across the full range of rare names.

There is also a boundary on what the pointer can reach. Eligibility depends on whether the name was introduced in the preceding history and whether the representation is still in memory. Remembering a fixed number of declarations allows the token span to vary. It makes distant references accessible when relatively few new declarations intervene, while a dense run of declarations can use up the same capacity over a shorter stretch. Where the pointer has no relevant declaration, the mixture still has the ordinary vocabulary branch. The examples support retrieval across a substantial token distance in suitable cases, and broader distance coverage would need to be measured systematically.

The tree provides a heuristic for identifying useful introductions. Their relevance is then learned through attention and the mixture. The base_path illustration shows a choice consistent with scope on that case. Estimating how reliably the system respects scope in general would require tests that deliberately vary what is available at the use site and what similarly named distractors appear earlier. The mapping equation specifies a score for a matching memory slot. For a symbol ID that matches multiple slots, an explicit rule for combining their scores would be needed to settle that case from the mathematical description alone.

The corpus also reflects how it was collected. Popularity stands in for quality at the repository-selection stage, and the compilation filter restricts which projects enter the corpus. The project-level split measures transfer to held-out projects under that collection procedure. How the predictions transfer to code collected under other criteria is open. The filtering rule for declarations gives a reason to expect less attention computation than a dense window of comparable reach. End-to-end training cost and editor response time would additionally depend on the cost of maintaining the memory, scoring the vocabulary and obtaining the syntax information in the intended environment.

What came after

Surveys and structured representations of code

A later survey places the study in the wider area of machine learning for code and the naturalness of software. The connection comes from the relationship between regularity and local context. Code can be predictable enough to learn from repositories, even though the correct spelling of a particular identifier may depend on a declaration within the given file. The sparse pointer is an instance of combining those sources of evidence. The corpus teaches the system broadly recurring patterns, and the declaration memory makes file-specific names available for a particular prediction. The survey cites this work as part of the broader research area. A Survey of Machine Learning for Big Code and Naturalness

Work on representing programs with graphs takes up a related representation question. The sparse pointer preserves the token sequence and uses Python’s syntax to choose which positions to keep. The graph paper’s stated subject is representing programs in a graph form. As a comparison of research questions, the two works invite a reader to ask how relationships among separated parts of a program should be made available to a learning system. A declaration can matter at a distant use even when many intervening tokens have little relevance to that use. The sparse memory exposes selected earlier positions to the next-token predictor. The graph work addresses program representation itself. Its citation connects these approaches at that level. Learning to Represent Programs with Graphs

Corpora and translation for other programming tasks

A later corpus pairs Python functions with their documentation strings for automated documentation and code generation. Its choice of data unit helps explain the change in objective. In the sparse pointer study, the training targets are tokens that follow earlier code in a file. In the later corpus, the important association is between a function and text documenting it. Such a pairing is suited to tasks that relate program text to natural language. The work cites the sparse pointer study and continues the use of collected Python code as a research resource, with the pairing organized around its own tasks. A parallel corpus of Python functions and documentation strings

Unsupervised translation of programming languages takes up another task involving learned regularities in source code. The prediction target in the sparse pointer paper is a continuation in Python, conditioned on preceding tokens of the same file. The translation study’s target is a rendition in another programming language. Both tasks give a role to contextual relationships in code, while the definition of success follows the task. A useful next-token suggestion fits the position at which it is offered. A translation has to express the program in a different language. The later work cites the sparse pointer paper within this broader application of learning to code. Unsupervised Translation of Programming Languages

Testing whether identifier identity is understood

The study of identifier swaps in Python makes the handling of names an explicit test. The sparse pointer paper asks whether the predictor can recover the recorded identifier from a prefix. Its examples examine the connection between a use and a particular earlier declaration. An identifier-swap test changes the names at issue and asks whether the resulting change is recognized. This gives the later work a different way to probe sensitivity to identity. A system that frequently ranks a recorded name highly can still be evaluated on whether it responds appropriately when identifiers exchange roles in the text. The Larger they are, the Harder they Fail

These later studies cite the sparse pointer paper and address related problems through surveying the field, representing program structure, collecting paired data, translating code and testing its treatment of identifiers. Their stated topics establish those connections. Architectural adoption and replication of the Python suggestion results are separate historical questions. The closest continuity lies in the treatment of names as evidence about a program: which occurrences refer to earlier introductions, how those relationships are represented, and what an evaluation can establish about whether a system uses them.

Cite

Cite as Avishkar Bhoopchand, Tim Rocktäschel, Earl Barr and Sebastian Riedel. 2016. Learning Python Code Suggestion with a Sparse Pointer Network. arXiv:1611.08307.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.1611.08307 · arXiv 1611.08307

@misc{bhoopchand2016learning,
  title = {{Learning Python Code Suggestion with a Sparse Pointer Network}},
  author = {Avishkar Bhoopchand, Tim Rocktäschel, Earl Barr and Sebastian Riedel},
  year = {2016},
  doi = {10.48550/arxiv.1611.08307},
  eprint = {1611.08307},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.1611.08307}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/bhoopchand-2016-learning-python-code-suggestion-sparse/

References

29 references, from the paper's own bibliography.

  1. Martín Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, Manjunath Kudlur, Josh Levenberg, Rajat Monga, Sherry Moore, Derek Gordon Murray, Benoit Steiner, Paul A. Tucker, Vijay Vasudevan, Pete Warden, Martin Wicke, Yuan Yu, and Xiaoqiang Zhang. Tensorflow: A system for large-scale machine learning. CoRR, abs/1605.08695, 2016. URL http://arxiv.org/abs/1605.08695. our card
  2. Miltiadis Allamanis and Charles Sutton. Mining idioms from source code. In Proceedings of the 22Nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, FSE 2014, pp. 472–483, New York, NY, USA, 2014. ACM. ISBN 978-1-4503-3056-5. . URL http://doi.acm.org/10.1145/2635868.2635901. our card
  3. Miltiadis Allamanis and Charles A. Sutton. Mining source code repositories at massive scale using language modeling. In Thomas Zimmermann, Massimiliano Di Penta, and Sunghun Kim (eds.), MSR, pp. 207–216. IEEE Computer Society, 2013. ISBN 978-1-4673-2936-1. URL http://dblp.uni-trier.de/db/conf/msr/msr2013.html#AllamanisS13a. OpenAlex ↗ · Scholar ↗
  4. Miltiadis Allamanis, Earl T. Barr, Christian Bird, and Charles Sutton. Learning natural coding conventions. In Proceedings of the 22Nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, FSE 2014, pp. 281–293, New York, NY, USA, 2014. ACM. ISBN 978-1-4503-3056-5. . URL http://doi.acm.org/10.1145/2635868.2635883. OpenAlex ↗ · Scholar ↗
  5. Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. CoRR, abs/1409.0473, 2014. URL http://arxiv.org/abs/1409.0473. our card
  6. Pierre Carbonnelle. Pypl popularity of programming language. http://pypl.github.io/PYPL.html, 2016. URL http://pypl.github.io/PYPL.html. [Online; accessed 30-August-2016]. OpenAlex ↗ · Scholar ↗
  7. Jianpeng Cheng, Li Dong, and Mirella Lapata. Long short-term memory-networks for machine reading. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pp. 551–561. Association for Computational Linguistics, 2016. URL http://aclweb.org/anthology/D16-1053. our card
  8. Subhasis Das and Chinmayee Shah. Contextual code completion using machine learning. 2015. OpenAlex ↗ · Scholar ↗
  9. Alex Graves. Generating sequences with recurrent neural networks. CoRR, abs/1308.0850, 2013. URL http://arxiv.org/abs/1308.0850. our card
  10. Karl Moritz Hermann, Tomás Kociský, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa Suleyman, and Phil Blunsom. Teaching machines to read and comprehend. In Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, pp. 1693–1701, 2015. URL http://papers.nips.cc/paper/5945-teaching-machines-to-read-and-comprehend. our card
  11. Abram Hindle, Earl T. Barr, Zhendong Su, Mark Gabel, and Premkumar Devanbu. On the naturalness of software. In Proceedings of the 34th International Conference on Software Engineering, ICSE '12, pp. 837–847, Piscataway, NJ, USA, 2012. IEEE Press. ISBN 978-1-4673-1067-3. URL http://dl.acm.org/citation.cfm?id=2337223.2337322. OpenAlex ↗ · Scholar ↗
  12. Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural Comput., 90 (8):0 1735–1780, November 1997. ISSN 0899-7667. . URL http://dx.doi.org/10.1162/neco.1997.9.8.1735. OpenAlex ↗ · Scholar ↗
  13. Sébastien Jean, Kyunghyun Cho, Roland Memisevic, and Yoshua Bengio. On using very large target vocabulary for neural machine translation. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pp. 1–10, Beijing, China, July 2015. Association for Computational Linguistics. URL http://www.aclweb.org/anthology/P15-1001. our card
  14. Rafal Jozefowicz, Wojciech Zaremba, and Ilya Sutskever. An empirical exploration of recurrent network architectures. In David Blei and Francis Bach (eds.), Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pp. 2342–2350. JMLR Workshop and Conference Proceedings, 2015. URL http://jmlr.org/proceedings/papers/v37/jozefowicz15.pdf. OpenAlex ↗ · Scholar ↗
  15. H. Khanh Dam, T. Tran, and T. Pham. A deep language model for software code. ArXiv e-prints, August 2016. OpenAlex ↗ · Scholar ↗
  16. R. Kneser and H. Ney. Improved backing-off for m-gram language modeling. In Acoustics, Speech, and Signal Processing, 1995. ICASSP-95., 1995 International Conference on, volume 1, pp. 181–184 vol.1, May 1995. . OpenAlex ↗ · Scholar ↗
  17. Wang Ling, Edward Grefenstette, Karl Moritz Hermann, Tomas Kocisky, Andrew Senior, Fumin Wang, and Phil Blunsom. Latent predictor networks for code generation. arXiv preprint arXiv:1603.06744, 2016. our card
  18. Chris J Maddison and Daniel Tarlow. Structured generative models of natural source code. In International Conference on Machine Learning, 2014. OpenAlex ↗ · Scholar ↗
  19. Mitchell P. Marcus, Beatrice Santorini, and Mary Ann Marcinkiewicz. Building a large annotated corpus of english: The penn treebank. COMPUTATIONAL LINGUISTICS, 190 (2):0 313–330, 1993. our card
  20. Graham Neubig. Kylm - the kyoto language modeling toolkit. http://www.phontron.com/kylm/, 2012. URL http://www.phontron.com/kylm/. [Online; accessed 23-July-2016]. OpenAlex ↗ · Scholar ↗
  21. Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. On the difficulty of training recurrent neural networks. In Proceedings of the 30th International Conference on Machine Learning, ICML 2013, Atlanta, GA, USA, 16-21 June 2013, pp. 1310–1318, 2013. URL http://jmlr.org/proceedings/papers/v28/pascanu13.html. OpenAlex ↗ · Scholar ↗
  22. Tim Rocktäschel, Edward Grefenstette, Karl Moritz Hermann, Tomas Kocisky, and Phil Blunsom. Reasoning about entailment with neural attention. In ICLR, 2016. our card
  23. Ke M. Tran, Arianna Bisazza, and Christof Monz. Recurrent memory networks for language modeling. In NAACL HLT 2016, The 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, San Diego California, USA, June 12-17, 2016, pp. 321–331, 2016. URL http://aclweb.org/anthology/N/N16/N16-1036.pdf. OpenAlex ↗ · Scholar ↗
  24. Zhaopeng Tu, Zhendong Su, and Premkumar Devanbu. On the localness of software. In Proceedings of the 22Nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, FSE 2014, pp. 269–280, New York, NY, USA, 2014. ACM. ISBN 978-1-4503-3056-5. . URL http://doi.acm.org/10.1145/2635868.2635875. OpenAlex ↗ · Scholar ↗
  25. Oriol Vinyals, Meire Fortunato, and Navdeep Jaitly. Pointer networks. In Advances in Neural Information Processing Systems, pp. 2692–2700, 2015a. OpenAlex ↗ · Scholar ↗
  26. Oriol Vinyals, Lukasz Kaiser, Terry Koo, Slav Petrov, Ilya Sutskever, and Geoffrey E. Hinton. Grammar as a foreign language. In Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, pp. 2773–2781, 2015b. URL http://papers.nips.cc/paper/5635-grammar-as-a-foreign-language. our card
  27. Paul J Werbos. Backpropagation through time: what it does and how to do it. Proceedings of the IEEE, 780 (10):0 1550–1560, 1990. OpenAlex ↗ · Scholar ↗
  28. Martin White, Christopher Vendome, Mario Linares-Vásquez, and Denys Poshyvanyk. Toward deep learning software repositories. In Proceedings of the 12th Working Conference on Mining Software Repositories, MSR '15, pp. 334–345, Piscataway, NJ, USA, 2015. IEEE Press. URL http://dl.acm.org/citation.cfm?id=2820518.2820559. OpenAlex ↗ · Scholar ↗
  29. Carlo Zapponi. Githut - programming languages and github. http://githut.info/, 2016. URL http://githut.info/. [Online; accessed 19-August-2016]. OpenAlex ↗ · Scholar ↗