Elamur Research

InCoder: A Generative Model for Code Infilling and Synthesis

Paper · 2023 · Daniel Fried, Armen Aghajanyan, Jessy Lin et al.

Summary

A function’s implementation can reveal what its documentation should say, which return annotation fits, or why a variable needs a particular name. Yet that evidence frequently appears after the place where the missing text belongs. InCoder addresses this mismatch between the organization of a program and the order in which an automatic generator receives information. The paper investigates whether a single language model can produce new programs from a prompt while also replacing selected passages inside existing code. Its central contribution is a training arrangement that makes later code available before a replacement is generated.

The technique, called causal masking, changes the sequence presented during training. Selected passages are taken out of a document, numbered markers identify their former positions, and the removed passages are placed after the retained material. A generator still predicts tokens sequentially. However, when it reaches a displaced passage, it has already processed the code that originally followed that passage. At prediction time, the same marker convention expresses an editing request. The generator can fill a gap using its surrounding program, or operate without the markers to continue a prefix normally. InCoder applies an existing causal-masking approach to source code and evaluates the resulting combination of synthesis and insertion.

The principal system is InCoder-6.7B, with 6.7B parameters. Its corpus includes 159 GB of code and 57 GB of StackOverflow content; Python accounts for 52 GB of the code. Repository selection uses permissive licenses, and files cover 28 programming languages, although the substantive evaluations concentrate on Python. The authors recast several activities as gap prediction: recovering implementation lines, producing documentation, supplying return types, and predicting variable names. These are zero-shot evaluations in the sense that the system receives no task-specific parameter training. Development examples still guide choices such as sampling temperature and candidate scoring.

Across the main insertion tasks, causal-masked generation improves on prefix-only completion. It also generally surpasses an alternative that first samples replacements from the prefix and subsequently ranks them using the completed program. This comparison matters because both approaches can consult the suffix, but only causal masking uses it while constructing the proposed answer. Separate ablations investigate whether insertion training damages ordinary synthesis. With training data fixed, a controlled comparison at 1.3B parameters finds slightly better synthesis performance for causal masking on both evaluated benchmarks. The authors also release their code and trained systems. Their findings support a practical combination of continuation and insertion, while leaving broader correctness, dependable instruction following, and general software maintenance beyond what these experiments establish.

Interesting ideas

Arrange evidence before the decision. A sequential predictor can use information from an apparently later position if the input representation presents that information earlier. InCoder obtains this property through document rearrangement instead of a reversal of generation direction. The reusable insight concerns dependency order: the place where an answer belongs need not determine when its evidence becomes available. This can inform systems completing structured records, reconstructing passages, or proposing annotations whose justification appears elsewhere in a document. The representation must preserve enough identity and boundary information to restore the answer to its intended position.

Make the completion protocol explicit. Numbered gap markers and a termination symbol describe a concrete interaction: which region needs replacement, where its answer starts, and when that answer ends. Training repeatedly exposes the generator to this interaction. An insertion request consequently has more structure than an informal instruction to revise some text. Similar protocols could help annotation systems, document repair services, and tools that exchange partial objects. Their value is partly operational: an interface can identify an unfinished replacement or an answer for the wrong region before interpreting the answer’s content.

Distinguish candidate creation from candidate judgment. The reranking comparison separates two uses of additional evidence. A suffix can help choose among proposed answers, or it can influence which answers are proposed at all. InCoder’s results generally favor the latter on its principal tasks. This distinction is useful in search, parsing, classification with candidate lists, and automated repair. Improving a final scoring rule may accomplish little when the proposal stage systematically excludes suitable answers. Evaluation should therefore inspect the candidate pool as well as the selected output.

Test information access with shared parameters. Using the same trained system across inference conditions removes a major source of ambiguity. Differences cannot simply be attributed to independently learned representations or different training corpora. InCoder’s comparison instead asks what changes when the procedure exposes or withholds surrounding code. The approach generalizes to evaluating retrieval, discourse context, and structured constraints. It does not eliminate every experimental difference, since decoding and stopping rules can still vary, but it gives a clearer account of the contribution made by available evidence.

Evaluate acceptable behavior separately from reference agreement. A missing implementation passage may have several satisfactory replacements. Comparing text with a canonical answer captures reconstruction, whereas running the completed function checks behavior on the available examples. These measurements can disagree for legitimate reasons. The paper’s use of both encourages a more careful treatment of tasks with multiple valid outputs, including symbolic derivations, query generation, and linguistic annotation. A reference is useful evidence, but the evaluation should state whether it represents the only permissible answer or merely an observed solution.

Inspect the representation around the gap. A mask can change token boundaries, and a finite context window can supply an unintended clue about expected replacement length. InCoder’s analyses show that these interface details affect prediction. The broader lesson is to investigate how an evaluation request is encoded before attributing every failure to missing knowledge. Segmentation, truncation, delimiters, and the size of a predicted region belong to the experimental method. This is particularly relevant when a system performs poorly on very short targets in spite of handling larger passages successfully.

Deep dive: InCoder: A Generative Model for Code Infilling and Synthesis

InCoder combines code completion and gap filling through causal masking; its experiments explain the value and limits of surrounding context. · about 37 minutes to read

How Mova uses it

Mova’s relevant starting point is an explicit language-processing pipeline: dependency trees become frames, frames support document worlds, and operational tools preserve evidence about supported actions. Its current direction favors rules, logic, and statistics. InCoder therefore offers reusable representations and evaluation designs without implying that Mova should replace its native core with a neural code generator. The status marks below compare proposals with the described mechanisms. They identify overlap, rather than claiming that an InCoder application has been measured.

Idea: Present all relevant evidence before resolving a gap. Where: “Infilling and Synthesis via Causal Masking,” Training. Area: inference and representation. Mova: частково є (world document worlds and the retained document graph used by fastread.rs). A native reader could postpone an unresolved interpretation until later frames have been collected, then reconsider it through declared rules. This transfers the evidence-order principle without transferring autoregressive training. Why Mova: later clauses can clarify an earlier reference or missing relation, and a delayed decision can retain an explicit justification.

Idea: Give every requested replacement a stable identity. Where: Training and Inference, numbered mask sentinels. Area: data interfaces. Mova: частково є (source-bound groupants, versioned annotation records, and persistent worker results). A repair packet could identify the source region, its surrounding structure, and the replacement independently. Existing identifiers provide related infrastructure, but a generic gap-replacement interface is not established by the described implementation. Why Mova: a stable identity makes it possible to review an edit, detect a misplaced answer, and reconnect a proposal with its original evidence.

Idea: Represent completion as an explicit outcome. Where: Inference and the appendix’s “Inference details.” Area: operational protocols. Mova: вже є (bounded worker interfaces and the artifact gates in tools/enrich). InCoder’s termination convention reinforces the value of distinguishing an ended replacement from an interrupted output. Mova could preserve that distinction in any future editing adapter, using typed outcomes instead of requiring a special generated token. Why Mova: a successful process exit should not be mistaken for a complete, admissible replacement.

Idea: Condition candidate construction on later context. Where: “Infilling Experiments,” comparison with left-to-right reranking. Area: syntax and candidate search. Mova: частково є (tree-based interpretation, context worlds, and the mathematical student’s candidate judge). An experiment could compare candidates proposed from a restricted frame prefix with candidates proposed after reading the full relevant world. The transfer hypothesis concerns native proposal rules, not an InCoder-style generator. Why Mova: this would reveal whether a final judge fails because useful candidates are absent before scoring begins.

Idea: Diagnose selection separately from proposal coverage. Where: “Infilling Experiments,” left-to-right reranking. Area: evaluation. Mova: частково є (the mathematical student’s first opinion, judge, and disagreement reports). Reports could preserve whether a supported answer was available among the branches considered, then distinguish a missing branch from an incorrect ranking. This extends an existing diagnostic separation into other readers. Why Mova: different causes require different repairs; changing weights cannot recover a candidate that no rule ever constructs.

Idea: Hold the native implementation fixed during context comparisons. Where: “Infilling Experiments,” shared InCoder-6.7B inference comparisons. Area: experimental design. Mova: частково є (paired evaluations, deterministic reruns, and regression gates). The same binary and retained state could answer with preceding context, complete context, and deliberately withheld context. Only the evidence-access policy would vary. Why Mova: this would support a more specific claim about contextual reasoning than comparing systems whose rules, dictionaries, and training all changed together.

Idea: Assess functional success alongside literal reconstruction. Where: “Infilling Lines of Code,” pass rate and exact match. Area: evaluation. Mova: частково є (tools/modelcheck, explicit invariants, and native task-specific checks). A repair evaluation could record exact agreement with a reviewed answer and satisfaction of independently stated properties. Linguistic variants would need their own admissibility criteria instead of borrowing code tests directly. Why Mova: several formulations or derivations can be acceptable, while a familiar-looking output can still violate the intended task.

Idea: Make representation changes part of the failure analysis. Where: “Cloze and single token infill details.” Area: tokenization and diagnostics. Mova: вже є (language-specific tokenizers, tokenization evaluation, and French grammar-example checks in en). For a new completion interface, logs could preserve token boundaries before and after masking and identify changes induced by the interface itself. Why Mova: a segmentation error should be repaired at the segmentation layer rather than hidden behind a new semantic exception.

Idea: Keep expected gap length from leaking through the interface. Where: appendix, “Inference details,” artificial final sentinel. Area: evaluation and boundary handling. Mova: нове. The specific proposal is an audit of whether packet size, omitted fields, or truncation conventions inadvertently reveal the expected answer length. The described mechanisms do not establish that this audit already exists. Why Mova: otherwise an apparent inference gain could reflect an accidental property of the request format; this possibility needs a controlled test before any application claim.

Idea: Order related replacements explicitly. Where: appendix, “Inference details,” multiple insertion locations. Area: task composition. Mova: частково є (bounded recursive capability calls and groupants describing interactions). A supported editing workflow could record dependencies between repairs and check later proposals against earlier admitted replacements. The paper supplies a sequential mechanism, not a guarantee of global consistency. Why Mova: an import, a name, and its later use should be treated as related obligations rather than unrelated successful tool calls.

Idea: Search over coherent regions when isolated targets are unstable. Where: “Code Cloze” and “Cloze and single token infill details.” Area: syntax and local search. Mova: нове. A proposed repair experiment would compare replacing an isolated token with replacing a bounded phrase or dependency subtree, keeping the final validation task unchanged. This particular region-size comparison is not established by the digest. Why Mova: a broader syntactic unit may preserve useful relations that an artificially narrow edit destroys, but its value must be measured.

Idea: Measure performance by the location of available evidence. Where: HumanEval infilling figure grouping examples by right context. Area: statistics and evaluation. Mova: нове. Native reader evaluations could distinguish questions whose decisive frame appears before a target from those whose evidence arrives later. The proposal includes reporting gap or target difficulty alongside evidence location. Why Mova: an aggregate score can conceal that a reader succeeds only when the answer’s support occurs in an easy position.

Idea: Control difficulty when varying context quantity. Where: “Infilling Lines of Code,” discussion of the multi-line context analysis. Area: experimental design. Mova: частково є (contrast sets and paired regression measurements). A context experiment should preserve the target and vary its visible evidence, rather than compare naturally different groups without qualification. The authors’ own warning motivates this stricter transfer. Why Mova: more context can correlate with an easier target, so an observed gain should not automatically be attributed to better use of evidence.

Idea: Test a new capability against the old workload. Where: “Ablation Experiments,” Objective. Area: regression evaluation. Mova: вже є (gated seed revisions, held-out self-play checks, and student regression requirements). Any insertion or delayed-reasoning feature should be tested on existing readers and mathematical tasks as well as on its new target. Why Mova: a locally attractive rule should not silently weaken ordinary parsing, story tracking, or quantitative reasoning.

Idea: Separate capacity, objective, and data-mixture questions. Where: “Ablation Experiments.” Area: experimental design. Mova: частково є (logged experiments and gated changes to rules and settings). An experiment series could vary the repair policy, knowledge supply, and candidate budget separately, rather than attributing a bundled change to a single idea. Why Mova: transparent implementation does not by itself make a combined experiment causally interpretable; separately controlled changes identify what helped.

Idea: Keep development choices outside final assessment. Where: “Infilling Experiments,” task-specific tuning on development data. Area: evaluation governance. Mova: вже є (teacher-separated school assessment and frozen benchmark boundaries). New stopping rules, thresholds, or candidate budgets should be chosen before the held-out assessment is opened. Why Mova: selecting a convenient decoding or rule setting after seeing assessment answers would turn measurement into another form of training.

Idea: Treat demonstrations as evidence of possibility. Where: “Qualitative Examples” and “Example Model Outputs.” Area: evidence classification. Mova: вже є (explicit distinctions among tool receipts, reviewed proposals, learned knowledge, and assessment evidence). A successful comment-guided edit could be retained as a witnessed example while remaining separate from an aggregate reliability claim. Why Mova: an attractive demonstration should remain inspectable without being promoted into a claim that the capability works generally.

Idea: Derive several bounded tasks from an existing structured resource. Where: CodeXGLUE docstring, return-type, and variable-name experiments. Area: data preparation. Mova: частково є (tools/enrich source-bound teaching packets and grammar-derived checks). Reviewed documents could support distinct evaluation views, each with its own extraction procedure and target definition. Why Mova: this can broaden diagnosis without requiring unrelated corpora, while preserving the distinction between teaching material and assessment labels.

Idea: Use structure-aware extraction for structured targets. Where: “Return Type Prediction” and “Variable Name Prediction,” AST processing. Area: syntax and data processing. Mova: вже є (en dependency trees and downstream frame readers). Comparable Mova tasks should select targets through the appropriate tree structure rather than raw substring matching. Why Mova: structural selection can distinguish an actual argument, reference, or annotation from an identical surface string serving another role.

Idea: Normalize presentation without claiming semantic equivalence. Where: “Return Type Prediction,” type-hint normalization. Area: evaluation and semantics. Mova: частково є (typed concepts, exact mathematical expressions, and declared validation interfaces). Evaluation could store both a normalized representation and the original answer, with separate checks for formatting and meaning. Why Mova: normalization can remove irrelevant variation, but it should not turn a limited comparison into an unsupported proof that two analyses mean the same thing.

Idea: Report what filtering removes from a benchmark. Where: “Return Type Prediction,” TypeWriter OSS subset. Area: data and evaluation. Mova: вже є (tools/dictindex bounded-coverage reports and explicit source exclusions). Any repair benchmark assembled from available parses should record unavailable files, failed extraction, excluded licenses, and retained coverage. Why Mova: a strong result on recoverable examples does not establish equal performance on the cases the pipeline could not represent.

Idea: Keep lexical evidence tied to its source rights. Where: appendix, “Code Data,” Sources. Area: provenance and data governance. Mova: вже є (tools/sources manifests and dictionary occurrence credits). Corpus collection for a new repair task should retain declared source and license information rather than treating public accessibility as permission. Why Mova: Mova’s free dictionary depends on traceable, admissible evidence, and a useful extraction procedure cannot establish rights by itself.

Idea: Distinguish deduplication from evaluation decontamination. Where: appendix, “Code Data,” Deduplication and Decontamination. Area: corpus preparation. Mova: частково є (immutable dictionary source versions, assessment exclusions, and source fingerprints). Duplicate detection and benchmark-overlap checks should have separate records because they answer different questions. Why Mova: removing repeated documents does not prove that assessment content is absent, and excluding a benchmark does not prevent repetition elsewhere.

Idea: Declare the equivalence relation used for duplicates. Where: appendix, “Code Data,” alphanumeric-token matching. Area: data representation. Mova: частково є (tools/dictindex stable posting identities and source hashing). A corpus tool should state whether it identifies identical bytes, normalized text, token sequences, or structural analyses. Why Mova: ignoring formatting can be sensible for one corpus but destructive for a task where punctuation, morphology, or annotation conventions carry the target information.

Idea: Handle identifying strings during corpus preparation. Where: appendix, “Code Data,” email replacement. Area: data processing. Mova: нове. A proposed source adapter could recognize declared classes of identifying strings and preserve an auditable transformation record. The digest does not establish an equivalent general preprocessing step. Why Mova: this offers a bounded way to reduce unnecessary reproduction of such strings without pretending that a narrow detector performs a complete privacy review.

Idea: Use explicit filters and retain their scope. Where: appendix, “Code Data,” Filtering. Area: corpus quality. Mova: частково є (tools/sources verification and dictionary source-admission restrictions). New corpus filters should name the pattern they exclude and make rejections reviewable. Why Mova: a filter for generated files or malformed text is a specific engineering heuristic, and preserving its scope prevents it from becoming an unexplained judgment about source quality.

Idea: Evaluate explanatory text as a distinct knowledge source. Where: “Ablation Experiments,” Effects of data. Area: learning and corpus design. Mova: частково є (school lessons, parsed grammar manuals, and source-bound enrichment). Mova could compare learning from facts alone with learning from facts accompanied by explanations, using rights-cleared material and unchanged assessment questions. Why Mova: the useful transfer is a controlled test of explanatory context, instead of an assumption that adding more text necessarily improves understanding.

Idea: Separate source metadata from document assertions. Where: appendix, “Metadata.” Area: pragmatics and provenance. Mova: вже є (tools/dictindex credits and declared domains, distinct from narrative facts). Metadata can guide source selection or explain where evidence came from without becoming something the story world asserts. Why Mova: a repository attribute, corpus label, or provenance tag describes the evidence container; it should not be imported as a fact about the events being read.

Idea: Test whether metadata is helpful and whether it is required. Where: appendix, “Metadata,” attributes placed before or after content. Area: interface design and evaluation. Mova: нове. A proposed evaluation would compare an interpretation with declared domain metadata, without it, and with incompatible metadata that should trigger disagreement. Why Mova: optional metadata should provide an inspectable aid rather than quietly becoming a hidden prerequisite for correct native interpretation.

Idea: Preserve mixed-document boundaries. Where: appendix, “Code Data,” Jupyter preprocessing. Area: document representation. Mova: частково є (structured school fields and document-level retained graphs). Corpus adapters could preserve distinctions among explanation, example, annotation, and executable material rather than flattening them indiscriminately. Why Mova: the same sentence can function as instruction, illustration, or asserted content, and a retained boundary can support the correct admission policy.

Idea: Evaluate representation efficiency independently of task accuracy. Where: appendix, “Tokenization.” Area: compression and computation. Mova: вже є (mova-pack byte-exact storage measurements and dictionary-index size reports). A compact representation should be assessed for size and access cost separately from interpretation quality. Why Mova: fitting more evidence into memory can help operations, but a compression result alone cannot establish stronger reasoning or more accurate parsing.

Idea: Aggregate repeated predictions transparently. Where: “Variable Name Prediction,” most-common prediction across occurrences. Area: statistics and consistency. Mova: частково є (treeagree voting with recorded evidence and validation gates). Repeated observations of a candidate interpretation could be compared, with disagreement retained instead of silently erased by the winning label. Why Mova: a consensus can be useful while still failing a consistency obligation, and Mova should expose both the selected answer and the incompatible observations.

Idea: Add narrow analysis checks to a broad proposal mechanism. Where: “Additional Type Hint Prediction Setting,” return checks. Area: hybrid verification. Mova: вже є (UD validation in treeagree, artifact admission in tools/enrich, and model checks). A proposed replacement can pass through an independently stated structural or semantic check before acceptance. Why Mova: a cheap, well-scoped rule can catch a predictable failure without requiring the proposal mechanism to become authoritative.

Idea: Account for shared context when comparing computation. Where: “Code Cloze,” cached Transformer activations. Area: computational evaluation. Mova: частково є (shared document parsing and retained graphs in mice.rs). Alternative interpretations could reuse immutable observations while recomputing only the affected reasoning. Why Mova: fair timing should distinguish genuinely repeated work from shared preparation, especially when several specialists inspect the same document.

Idea: Keep iterative revision bounded and independently assessed. Where: Conclusion, iterative decoding as future work. Area: operational learning. Mova: вже є (bounded self-study in tools/enrich and tested self-play revisions). An editing loop should record its proposals, termination condition, and independent acceptance checks. Why Mova: the ability to propose another version does not establish that the version is better; Mova’s existing separation of proposal and admission is the appropriate place to test that hypothesis.

The problem and its context

A program’s layout is not an evidence schedule

The paper concerns code and programming languages, but the difficulty it identifies is more general: an object can contain the evidence needed for a decision after the position where the decision must be recorded. A Python return annotation belongs in a function signature. Its strongest evidence may be the return statements in the implementation. A documentation string appears near the function’s entrance but should describe behavior determined by the body.

Variable naming exposes a related dependency. The first assignment may say little about a value’s eventual purpose. Later operations can reveal whether it represents a count, a collection, or an intermediate result. An assistant restricted to the text before the first occurrence cannot inspect those uses while proposing the name.

Ordinary sequential generation is therefore an incomplete interface for editing. It can extend a partially written function, but replacement inside an existing function requires some way of incorporating the retained suffix. Simply asking a strong generator to continue from the insertion point leaves relevant information outside its immediate conditioning context.

The authors formulate a common operation behind several tasks: retain an existing document, mark the region to be supplied, and predict its replacement. This formulation separates the replacement’s physical position from the order in which the system receives supporting material.

Earlier objectives made different compromises

The paper contrasts conventional causal prediction with masked prediction. Causal generation estimates successive tokens from their predecessors. Its natural application is producing a document from its beginning, since generated material can be added to the context for subsequent predictions.

Masked prediction, exemplified by BERT, makes hidden content predictable from visible surroundings. That provides information from both directions in the original document. The authors observe, however, that such training commonly reconstructs only about 15% of a document, making its relationship with unrestricted generation different from that of a causal generator.

Code research already included decoder-only, encoder-only, and encoder–decoder designs. CodeBERT belongs to the masked-prediction background discussed by the authors. PLBART uses a denoising approach associated with BART. These systems show that bidirectional evidence was an established resource, instead of something introduced by InCoder.

The closest methodological precedents teach sequential generators to reconstruct missing passages, particularly the causal-masking work CM3. InCoder adopts that general objective and investigates its suitability for programming. Its novelty claim concerns a large generative code system capable of arbitrary-region insertion and the breadth of the accompanying zero-shot evaluations.

General insertion versus specialized assistance

The related-work discussion describes established research on type inference, test production, program repair, and correctness checking. Specialized systems can exploit labels, static analysis, search, or representations tailored to a particular task.

InCoder instead asks how far a shared text-generation operation can go. Documentation, annotations, implementation passages, and names become differently located gaps. This is attractive because the same trained parameters can serve these tasks without separate supervised adaptation.

The distinction remains important when interpreting comparisons. A type-analysis system may reject an inconsistent annotation. A generative system can propose one without establishing its validity. InCoder’s basic insertion operation provides a candidate; validation remains an additional concern.

The authors also retain ordinary synthesis as a central requirement. HumanEval, introduced in Evaluating Large Language Models Trained on Code, and MBPP assess generation from descriptions. If causal masking improved editing while severely weakening continuation, the proposed unification would involve a substantial tradeoff. The ablations address that concern directly.

The method, step by step

Serialize the answer after its evidence

InCoder uses a decoder-only Transformer. The decisive modification concerns the ordering of training content, instead of a new direction of token prediction.

Suppose a document contains a passage selected for removal. The training procedure puts a marker in its place, leaves the remaining document intact, and writes the removed passage after that remaining material. Another occurrence of the marker introduces the displaced passage. A separate termination symbol closes it.

The first marker establishes a location. The later marker establishes the answer associated with that location. Because the retained suffix occurs before the answer in this serialization, it becomes available through ordinary causal conditioning.

How causal masking supports an insertion request

The steps in order.

How causal masking supports an insertion requestStep 1: Prepare code and discussion documents1. Prepare code and discussion documentsStep 2: Sample separate passages for removal2. Sample separate passages for removalStep 3: Mark each original passage location3. Mark each original passage locationStep 4: Place removed passages after retained content4. Place removed passages after retained contentStep 5: Learn prediction over the rearranged sequence5. Learn prediction over the rearranged sequenceStep 6: Supply marked code for editing6. Supply marked code for editingStep 7: Generate replacements and recognize their endings7. Generate replacements and recognize their endings

This is a change in prediction order, not a claim that source-code order becomes irrelevant. The markers retain the connection to the original program. After generation, the replacement belongs at its marked location rather than at the end where it was predicted.

Sample training gaps

The span count follows a Poisson distribution with mean one, restricted to [1, 256]. In roughly half of all cases, a document is assigned exactly one span. The longer tail provides examples with many missing regions.

Span endpoints are sampled uniformly over the document’s length. If selected intervals overlap, the set is discarded and sampled again. The resulting targets are distinct contiguous token passages.

These spans are not defined by an abstract syntax tree. They can therefore differ from the syntactic units used in downstream evaluations. Training establishes a general textual insertion operation; task construction later decides whether a gap represents a name, annotation, line, or larger passage.

A marker has the form <Mask:k>, with k identifying the selected span. Each removed passage is appended with its corresponding marker and an ending token. When several spans are present, their appended answers follow the designated order.

Express the objective

The authors describe a document D with N tokens and a selected interval bounded by i and j:

Span = Dᵢ:ⱼ

D is the original document. Span denotes the selected token sequence, while i and j identify its beginning and end.

The material before that interval is:

Left = D₀:ᵢ

Left is the prefix preceding the selected passage. The initial boundary is written as 0, and i is the passage’s starting boundary.

The retained material after the interval is:

Right = Dⱼ:ₙ

Right is the suffix, beginning at j and extending to N, the document’s token count.

For this single-span arrangement, training maximizes:

log P([Left; <Mask:0>; Right; <Mask:0>; Span; <EOM>])

P assigns a probability to the serialized sequence. The logarithm produces its log probability. Semicolons join sequences, and the brackets delimit the complete training example. <Mask:0> links the gap to its displaced answer. <EOM> indicates that the answer has ended.

Probability is evaluated autoregressively, using cross-entropy training. The loss includes the document’s tokens but excludes the numbered sentinel markers. The system is consequently trained to predict the retained content and the displaced passages, while the caller supplies the markers used to control insertion.

That broad loss distinguishes the procedure from an objective concerned only with recovering hidden material. The system continues learning sequential document prediction as part of its training, which is relevant to the later synthesis comparisons.

Convert a gap into a prompt

The simplest single-insertion request has the following next-token distribution:

P(· | [Left; <Mask:0>; Right; <Mask:0>])

The dot represents the token to be generated. The vertical bar means that the distribution is conditioned on the sequence to its right. Left and Right are the code surrounding the requested insertion. The final marker asks for the replacement associated with the earlier gap.

Generation continues until <EOM> appears or a task-defined stopping rule applies. The resulting text can then replace the earlier marker.

Without an insertion request, ordinary continuation remains available. The caller provides a prefix without special gap markers, and generation proceeds from that prefix. Both uses rely on the same parameters.

Remove a misleading length signal

The implementation uses an additional sentinel:

P(· | [Left; <Mask:0>; Right; <Mask:1>; <Mask:0>])

The added <Mask:1> appears after the retained suffix. It represents omitted later material, while the last <Mask:0> still introduces the requested replacement.

The authors explain that the simpler format can imply that the replacement should occupy the unused portion of the 2048-token context window. The artificial extra marker weakens this unintended size signal. They report substantially improved decisions about emitting the ending token.

This detail matters because an insertion must have a usable extent. Correct-looking code that continues beyond the desired region can damage the surrounding document. Boundary prediction is part of the task, rather than a cosmetic step after generation.

Handle dependent insertions

The appendix illustrates multiple gaps with retained regions A, C, and E and generated replacements B and D:

[A; <Mask:0>; C; <Mask:1>; E; <Mask:2>; <Mask:0>; B; <EOM>; <Mask:1>; D; <EOM>]

A, C, and E are unchanged passages. B fills the location marked by <Mask:0>, and D fills the location marked by <Mask:1>. The additional <Mask:2> follows the convention for omitted later content. Each ending token terminates its associated replacement.

Later answers can condition on earlier generated answers. This makes the representation suitable for related regions, such as a function and imports associated with it. It does not impose logical equality or type compatibility between regions; those remain properties to check.

Build the training collection

Repository acquisition ended on December 9th, 2021. The authors collected approximately 670,000 public repositories that were not forks and were primarily identified with Python, JavaScript, or Jupyter Notebook content. Accepted repository licenses were MIT, Apache 2.0, BSD-2, and BSD-3.

They retained selected source-file extensions within those repositories and supplemented the collection with additional Python and notebook files from GitHub’s BigQuery archive, subject to the same license criterion. Notebook processing kept both textual and executable cells, removed Markdown formatting from text cells, and represented cell boundaries with tags.

Duplicate detection compared alphanumeric token sequences. Its Bloom-filter keys incorporated file extension, token count, and an MD5 hash. Approximately 75% of the size was removed at this stage, with the collection moving from 1 TB to 250 GB. These figures describe an intermediate cleaning step, instead of the final corpus.

Further filters excluded a file if a line exceeded 3000 tokens, its average line exceeded 100 tokens, or fewer than 40% of its characters were alphanumeric or underscores. Phrase matching also targeted automatically produced files. Detected email addresses were replaced with a dummy address.

Decontamination had a separate purpose. The authors removed repositories associated with CodeSearchNet’s development and test partitions. They searched for HumanEval code using substring matching and found no matches. JuICe evaluation repositories were also excluded, despite that task not being evaluated in the paper.

Add discussion and metadata

StackOverflow contributes questions, answers, and comments. Questions require an answer to be included. For each question, the procedure retains up to ten answers with non-negative scores, ordered by score, and up to five comments associated with a question or answer.

Metadata supplies another kind of context. Code attributes include filename, extension, platform, and bucketed star counts where available. StackOverflow attributes include tags and bucketed votes.

An attribute appears before its document with probability 50%; otherwise it follows the content. This allows the same system to encounter both attribute-conditioned generation and prediction of attributes from a document. Attribute order is randomized. Evaluation prompts indicate Python through the metadata convention.

Tokenize and optimize

The tokenizer uses byte-level BPE, a subword-tokenization method. It permits vocabulary items to cross whitespace boundaries while excluding newline crossings. Frequently repeated code expressions can consequently use fewer tokens.

Compared with GPT-2’s tokenizer and vocabulary, this reduces the number of corpus tokens by 45%. That result concerns encoding efficiency: more source material can fit within the available token budget. It is separate from functional accuracy.

Training uses fairseq and PyTorch. InCoder-6.7B runs on 248 V100 GPUs for 24 days. The authors perform one epoch, using each training document once.

The per-GPU batch size is 8, and sequences have a maximum length of 2048 tokens. Gradient norms are clipped to 1.0. Adam uses β₁ = 0.9 and β₂ = 0.98. Polynomial learning-rate decay follows 1500 warmup updates. Fully sharded model states provide memory savings.

Experiments and results

Compare access to context

The main evaluation contrasts inference procedures using identical InCoder-6.7B parameters. Prefix-only completion receives the preceding code. Reranking generates alternatives from that same prefix, then evaluates the completed document. Causal-masked insertion makes the suffix available during answer generation.

The default reranking budget is K = 10. A candidate can be scored through:

log P([Left; Spanₖ; Right])

Spanₖ denotes candidate k, and P gives the probability of the document formed by placing it between Left and Right. The score can be used directly or averaged over the completed sequence’s token count. Development performance selects the scoring variant.

The general sampling setup uses nucleus sampling with p = 0.95. Temperature is tuned by task and inference procedure. Some tasks instead use greedy decoding, selecting the most probable next token at each step.

The numerical details below establish dataset sizes, budgets, and experimental settings. The result descriptions preserve the performance comparisons made in the paper without assigning unsupported numerical margins to them.

Recover implementation lines

HumanEval supplies function descriptions, canonical implementations, and input–output tests. The authors generate insertion examples by removing implementation lines while retaining the description and surrounding code.

A function with N nonblank lines yields N single-line targets. Allowing contiguous multi-line gaps produces:

N × (N + 1) / 2

N is the nonblank line count. The expression counts the contiguous line regions considered for removal.

The completed function is evaluated through its test pass rate and the exact agreement of its replacement with the reference passage. Results average over insertion examples across the benchmark.

The prefix-based procedures receive the true line count as a truncation rule. Causal-masked generation stops through its ending token. Single-candidate completion and causal masking use temperature 0.2; reranking samples at 0.8 and selects by total document log probability.

Causal masking performs better than both prefix-based approaches on both metrics in the single-line and multi-line settings. The advantage also becomes more pronounced for groups with more code retained after the gap.

That grouping needs qualification. In the multi-line construction, a larger suffix leaves less implementation available for removal. Such examples can therefore be easier for reasons beyond the amount of useful evidence. The paper explicitly recognizes this dependency.

Compare other insertion approaches

PLBART-Large supplies an encoder–decoder alternative trained through denoising. Its Python training volume is larger than InCoder’s. The following chart describes that resource comparison, not benchmark accuracy; higher volume means more training material, instead of a better outcome.

Python corpus volume for systems tested on HumanEval insertion

The larger Python corpus belongs to PLBART-Large, while the reported insertion ranking favors InCoder.

Python corpus volume for systems tested on HumanEval insertionPLBART-Large: 220PLBART-Large220InCoder-6.7B (this paper): 52InCoder-6.7B (this paper)52
The numbers
System or settingPython training data, GB
PLBART-Large220
InCoder-6.7B (this paper)52

PLBART requires a lexer-based representation with special symbols for layout. The authors recover an inserted passage from its output and apply the reference line count. They do not treat its exact textual reconstruction as comparable because its output is tokenized differently.

The prompted Codex comparison exposes surrounding code through a template that asks for a marked region to be completed. InCoder outperforms these alternatives on the constructed line-insertion tasks. This is notable because the tested Codex systems are stronger at ordinary continuation.

A supplementary API comparison considers code-davinci-002. Both it and InCoder benefit from right context, with insertion producing the largest improvement. The authors avoid a controlled architectural interpretation because relevant training and inference details of the proprietary system are unavailable.

Write documentation from an implementation

The docstring evaluation uses Python examples from CodeXGLUE, derived from CodeSearchNet. The target is the descriptive documentation associated with a function.

Prefix-only prediction receives the signature. The other procedures can also inspect the body. This directly tests whether implementation evidence improves a description located before that implementation.

The metric is smoothed 4-gram BLEU, evaluated against processed reference docstrings. Processing removes additional material such as argument definitions, so the reference is a selected description instead of the complete original documentation.

Greedy decoding is used for causal masking and single prefix completion. Reranking samples K = 10 candidates at temperature 0.8 and uses average log probability. A newline terminates generation for every procedure.

The zero-shot InCoder result approaches the supervised CodeBERT-based baseline, which is adapted using approximately 250K training examples. The comparison shows that the insertion objective supports useful documentation without task-specific training. It does not establish that every generated description is semantically complete or correct.

Predict return types

For the CodeXGLUE-derived type benchmark, an AST processor selects functions with a return annotation other than None and removes other annotations. The resulting partitions contain 232 development functions and 469 test functions.

Evaluation compares normalized type expressions through exact match. Normalization parses an annotation and renders it again, reducing incidental formatting differences.

A colon ends the generated type. Development selection leads to temperature 0.2 for prefix-only prediction, 0.8 for reranking, and greedy causal-masked generation.

Reranking gains some benefit from the body. Causal masking provides a substantially stronger improvement, supporting the importance of implementation evidence during candidate generation.

The TypeWriter OSS comparison uses 2,092 retained examples, about 12% of its evaluation collection. Inclusion requires available source, successful extraction, a non-None annotation, and no training overlap. Prompts include file imports as well as the function.

On this selected population, causal-masked InCoder surpasses the supervised TypeWriter system. The paper also evaluates a None-inclusive setting covering a 25% subset. There, a simple check predicts None when no nontrivial return statement exists. With this adjustment, InCoder is comparable to TypeWriter, while still outperforming the prefix-based alternatives.

Predict names from their uses

The variable task is derived from CodeXGLUE’s test data. Structural processing identifies a variable and replaces its occurrences with gaps. Prefix-only prediction instead starts from the context before its earliest occurrence.

Only names with four or more characters are evaluated. Reranking considers 25 candidates. For causal-masked prediction, the name occurring most frequently among the generated replacements becomes the final prediction.

Both procedures using the suffix beat single prefix completion. Causal masking also improves substantially over reranking. This indicates that later uses help not only with candidate selection but with forming an appropriate candidate.

The voting rule should remain visible in the interpretation. It produces a single evaluation answer from potentially inconsistent replacements. The experiment does not establish that every occurrence was always generated identically.

Score short cloze alternatives

The CodeXGLUE cloze task asks the system to choose max or min. Since the answer set is restricted, the authors can score both alternatives rather than depend on sampled candidates.

Single-token causal-masked scoring beats prefix-only scoring but trails scoring the complete program. Enlarging the infilled region, including nearby material, makes its performance comparable to full-document scoring.

The result prevents a blanket conclusion that the insertion format dominates every scoring arrangement. Very short targets interact with both the training distribution and tokenization.

Preserve ordinary synthesis

For HumanEval synthesis, InCoder receives a signature and description and samples 200 completions. The authors use the benchmark’s unbiased estimator for pass@1, pass@10, and pass@100. These metrics concern success under different candidate budgets.

MBPP supplies descriptions without signatures. The evaluation uses a single candidate for pass@1. This differs from the three-shot setting used successfully by some comparison systems.

Sampling retains p = 0.95. Temperature is 0.2 for pass@1 and 0.8 for the larger HumanEval budgets.

InCoder has broadly similar HumanEval performance to CodeGen-Multi at roughly the same parameter scale and to AlphaCode’s 1.1B decoder-only system, in comparisons involving similar Python training volumes. The authors emphasize that differences in architecture and training prevent a rigorous cross-paper ranking.

What the ablations show

The objective comparison addresses the main tradeoff

The most direct ablation compares systems with 1.3B parameters and the same training data. The changed factor is the objective: causal masking versus ordinary sequential language modeling.

On both HumanEval and MBPP, causal masking obtains slightly higher pass@1. This supports the conclusion that learning insertion does not necessarily require sacrificing continuation ability.

The result is stronger than a comparison between unrelated published systems because data and scale are controlled. Its scope is also narrower: the direct objective experiment is conducted at 1.3B parameters. It does not establish an identical outcome for every architecture, corpus, or larger training run.

The primary system demonstrates that causal masking remains useful at 6.7B parameters. However, usefulness at that size and a controlled objective comparison at the smaller size are different pieces of evidence. They should not be merged into a claim that every factor has been isolated at the principal scale.

More capacity helps under fixed data

The authors compare causal-masked systems at 1.3B and 6.7B parameters. They also compare ordinary language-model systems at 1.3B and 2.3B parameters. With data held fixed, the larger system performs better in each reported comparison.

This analysis places the objective in context. Rearranging evidence enables a capability, but the quality of the learned predictor remains consequential. The insertion interface does not remove the effect of scale.

Training curves reinforce that interpretation. Held-out perplexity continues improving after the single training pass, and HumanEval synthesis performance generally improves during pretraining. These observations motivate further training, rather than demonstrating the eventual benefit of a particular unperformed extension.

The data source changes the outcome

The data ablations examine multilingual code with StackOverflow, Python with StackOverflow, and Python without that discussion source.

Using several programming languages slightly reduces performance on the Python synthesis evaluations. This finding is specific to the target tasks and training arrangement. Since the ablation is assessed on Python, it cannot establish the overall value of multilingual training across all included languages.

StackOverflow inclusion substantially improves HumanEval and MBPP relative to Python-only code. The authors consequently recommend considering corpora that combine natural language with programming content.

The controlled factor is the StackOverflow source as a whole. Questions, answers, and comments enter together. Although the qualitative editing examples make comments an interesting hypothesis, the ablation does not isolate comments as the unique cause of improvement.

Gap boundaries influence cloze scoring

The cloze analysis investigates why a narrowly masked target can perform worse than full-program scoring. One issue is that masking changes segmentation. A fragment such as Math.max( can belong to a single vocabulary item in intact code but require separate pieces around an isolated gap.

Artificially breaking tokenization reduces performance across the compared scoring procedures. Retaining the original segmentation helps, yet does not fully close the gap between isolated-token insertion and complete-sequence scoring.

The appendix also evaluates a short right-context region:

[Left; Token; Right[:10]]

Left is the preceding context, Token is the max or min alternative, and Right[:10] denotes the suffix’s first 10 tokens.

The expanded causal-masked arrangement is:

[<Mask:0>; Right[10:]; <Mask:1>; <Mask:0>; Left; Token; Right[:10]; <EOSS>]

Right[10:] contains the remaining suffix. The predicted region now includes Left, the candidate, and nearby following tokens. <EOSS> is the ending notation used in this appendix comparison.

The authors suggest that isolated-token prediction is less aligned with their training than with CodeBERT’s masked-token objective. The analysis therefore identifies a representation-dependent weakness, rather than merely documenting an unfavorable aggregate result.

Limitations

Qualifications stated by the authors

The paper explicitly limits comparisons with separately published generators. Training corpora, architectures, and optimization procedures differ, preventing a clean ranking attributable to causal masking.

The proprietary API comparisons involve additional unknowns. Training overlap, insertion implementation, and possible output processing are not sufficiently documented. Their results help characterize the task, but they cannot explain a mechanism as clearly as the shared-parameter comparisons.

Return-type exact match is another stated limitation. Human annotations can be inaccurate, and normalization does not recognize all equivalent type expressions. For example, predicting Optional[str] instead of Union[None, str] receives no partial credit under the described metric. A reference mismatch can therefore overstate a semantic error.

The TypeWriter comparison is constrained by recoverable source and training contamination. Its retained examples are a selected subset, not the complete original benchmark. The authors also explain that None is overrepresented in the inclusive setting, motivating their additional return-statement check.

Short cloze prediction reveals an acknowledged mismatch between the inference request and training. Region size and token boundaries affect performance. The paper’s own supplementary results therefore rule out interpreting causal masking as uniformly superior for every completion target.

The conclusion treats stronger instruction conditioning as future work. Fine-tuning is proposed as a way to improve responsiveness to human intent. Qualitative comment-guided edits should consequently not be interpreted as a completed solution to reliable instruction following.

Boundaries implied by the experiments

A careful reader must distinguish passing tests from proving a program correct. HumanEval’s supplied checks provide behavioral evidence on selected inputs. They do not establish every property of a replacement or cover every possible execution.

Exact reconstruction has a different boundary. It can reject an alternative implementation that passes the available tests, and test passage can accept behavior that differs outside those tests. Reporting both measurements is useful precisely because neither can stand for complete correctness.

The constructed gaps also simplify the maintenance problem. They are removed from known implementations, leaving surrounding material available. Real repair may require identifying an erroneous region, interpreting an ambiguous request, or discovering that the surrounding code is itself inconsistent. Those activities are not established by successful reconstruction.

Similarly, predicting a variable name inside an extracted function is narrower than conducting a repository-wide rename. The evaluation does not demonstrate correct updates across every reference or external dependency.

Training breadth should not be confused with evaluation breadth. The corpus covers 28 languages, but the principal task evidence concerns Python. The paper does not substantiate equivalent insertion quality throughout that language set.

Unresolved questions about workflows and data

The demonstrations include interactive refinement, metadata conditioning, and technical translation. They show possible outputs under particular prompts. They are not systematic measurements of a long development interaction.

Multi-region insertion permits dependencies but does not enforce them. A later region can read an earlier replacement, yet the generation procedure does not prove that the regions share compatible identifiers, types, or assumptions.

Cleaning is similarly bounded. Alphanumeric-token deduplication targets a specified kind of duplication. It does not establish the absence of every near-duplicate. Benchmark decontamination addresses the named evaluation resources rather than demonstrating complete separation from every related public artifact.

Replacing detected email addresses is a targeted transformation. It does not establish a general guarantee against memorization or disclosure. The paper cites duplication and memorization concerns, but does not evaluate every possible form of retained identifying information.

Finally, the training curves support the authors’ expectation that further resources could improve performance. They do not measure the result of those future resources. Continued improvement within a completed run is evidence of remaining opportunity, instead of a numerical forecast of the next system.

What came after

The strongest documented methodological connection is Efficient Training of Language Models to Fill in the Middle. InCoder describes this research as concurrent. It should therefore be understood as a related development rather than automatically placed after InCoder in a simple invention sequence.

According to InCoder’s account, the work trains code generators with a related fill-in-the-middle objective and evaluates the HumanEval insertion tasks introduced by InCoder. It also finds that insertion capability need not reduce ordinary continuation performance.

The authors distinguish their own approach through support for multiple missing regions and evaluation across several programming activities. The shared principle is that an autoregressive system can predict a missing passage after receiving material from beyond its original position.

A wider code-generation literature

The citing works include SantaCoder, Code Llama, and CodeGen2. Their titles identify continuing work on code generation and its training foundations.

Citation establishes that InCoder belongs to their research context. It does not, on its own, establish which serialization convention or objective each adopted. A detailed claim that one copied InCoder’s markers, used its corpus, or reproduced its training procedure would require evidence beyond a citation and title.

CodeGeeX explicitly connects code generation with multilingual benchmarking through HumanEval-X. This is relevant to a limitation of InCoder’s evidence: broad language coverage in training and measured competence across languages are separate questions. The title identifies that later evaluation emphasis without establishing a particular dependency on causal masking.

The citation record also includes LLaMA and Qwen. Their presence places InCoder within a broader foundation-model literature. No specific adoption of its insertion technique can be inferred from the available citation information.

Evaluation moves beyond the supplied gap

RepoBench names repository-level completion as its subject. That unit is broader than the function-centered examples used for much of InCoder’s evaluation. It raises the question of what relevant project context a completion system can access.

SWE-bench asks about resolving real GitHub issues. Its stated subject reaches beyond reconstructing a known missing passage: issue resolution involves a larger task definition than supplying text at a predetermined location. The citation information does not establish a particular InCoder-based implementation.

LiveCodeBench foregrounds contamination-free evaluation. InCoder already treats training overlap as a concrete concern through benchmark exclusions and its restricted TypeWriter comparison. The later title shows continued attention to evaluation separation, without implying an identical decontamination procedure.

CRUXEval identifies reasoning, understanding, and execution as its evaluation focus. These subjects emphasize a distinction visible throughout InCoder: producing plausible code text and establishing its behavior are different achievements.

Verification, execution, and revision

LEVER names execution-based verification of language-to-code generation as its topic. OpenCodeInterpreter explicitly brings together generation, execution, and refinement.

Those titles identify components that complement an insertion mechanism. A replacement interface makes revision expressible, but some other process must determine whether revision is needed and whether the new program is preferable. The citation record supports this thematic relationship; it does not establish that either system internally uses InCoder.

Is Self-Repair a Silver Bullet for Code Generation? places revision itself under examination. This connects with InCoder’s proposal to explore iterative decoding. The title supplies a research question, not evidence for a positive or negative answer about self-repair.

The broader citing literature also includes MetaGPT and AgentCoder, whose titles concern collaborative or iterative programming frameworks. Their organizational level differs from InCoder’s training serialization. Citation alone does not show that the cooperating components use causal masking.

Finally, A Survey on Large Language Models for Code Generation records InCoder within a wider research area. Its place in that literature rests on a precise contribution: code generation can be trained to address selected internal gaps while preserving ordinary continuation. Later citations broaden the surrounding questions, but they do not enlarge the claims established by InCoder’s own experiments.

Cite

Cite as Daniel Fried, Armen Aghajanyan, Jessy Lin, Sida Wang, Eric Wallace, Freda Shi, Ruiqi Zhong, Wen-tau Yih, Luke Zettlemoyer and Mike Lewis. 2023. InCoder: A Generative Model for Code Infilling and Synthesis. arXiv:2204.05999.

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

@misc{fried2023incoder,
  title = {{InCoder: A Generative Model for Code Infilling and Synthesis}},
  author = {Daniel Fried, Armen Aghajanyan, Jessy Lin, Sida Wang, Eric Wallace, Freda Shi, Ruiqi Zhong, Wen-tau Yih, Luke Zettlemoyer and Mike Lewis},
  year = {2023},
  doi = {10.48550/arxiv.2204.05999},
  eprint = {2204.05999},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2204.05999}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/fried-2023-incoder-generative-model-code-infilling/

References

79 references, from the paper's own bibliography.

  1. Rajas Agashe, Srinivasan Iyer, and Luke Zettlemoyer. JuICe: A large scale distantly supervised dataset for open domain context-based code generation. In Proceedings of EMNLP, 2019. URL https://aclanthology.org/D19-1546. our card
  2. Armen Aghajanyan, Bernie Huang, Candace Ross, Vladimir Karpukhin, Hu Xu, Naman Goyal, Dmytro Okhonko, Mandar Joshi, Gargi Ghosh, Mike Lewis, and Luke Zettlemoyer. CM3: A causal masked multimodal model of the Internet. arXiv preprint arXiv:2201.07520, 2022a. OpenAlex ↗ · Scholar ↗
  3. Armen Aghajanyan, Dmytro Okhonko, Mike Lewis, Mandar Joshi, Hu Xu, Gargi Ghosh, and Luke Zettlemoyer. HTLM: Hyper-text pre-training and prompting of language models. In ICLR, 2022b. our card
  4. Wasi Uddin Ahmad, Saikat Chakraborty, Baishakhi Ray, and Kai-Wei Chang. Unified pre-training for program understanding and generation. In NAACL, 2021. our card
  5. Miltiadis Allamanis. The adverse effects of code duplication in machine learning models of code. In SPLASH, 2019. our card
  6. Miltiadis Allamanis, Earl T Barr, Soline Ducousso, and Zheng Gao. Typilus: Neural type hints. In PLDI, 2020. OpenAlex ↗ · Scholar ↗
  7. Uri Alon, Roy Sadaka, Omer Levy, and Eran Yahav. Structural language models of code. In ICML, pp. 245–256. PMLR, 2020. our card
  8. Mikel Artetxe, Shruti Bhosale, Naman Goyal, Todor Mihaylov, Myle Ott, Sam Shleifer, Xi Victoria Lin, Jingfei Du, Srinivasan Iyer, Ramakanth Pasunuru, et al. Efficient large scale language modeling with mixtures of experts. arXiv preprint arXiv:2112.10684, 2021. our card
  9. Yannis M. Assael, Thea Sommerschield, and J. Prag. Restoring ancient text using deep learning: a case study on Greek epigraphy. In EMNLP, 2019. OpenAlex ↗ · Scholar ↗
  10. Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie J. Cai, Michael Terry, Quoc V. Le, and Charles Sutton. Program synthesis with large language models. arXiv preprint arXiv:2108.07732, 2021. our card
  11. Mandeep Baines, Shruti Bhosale, Vittorio Caggiano, Naman Goyal, Siddharth Goyal, Myle Ott, Benjamin Lefaudeux, Vitaliy Liptchinsky, Mike Rabbat, Sam Sheiffer, Anjali Sridhar, and Min Xu. FairScale: A general purpose modular PyTorch library for high performance and large scale training. https://github.com/facebookresearch/fairscale, 2021. OpenAlex ↗ · Scholar ↗
  12. Matej Balog, Alexander L. Gaunt, Marc Brockschmidt, Sebastian Nowozin, and Daniel Tarlow. DeepCoder: Learning to write programs. In ICLR, 2017. OpenAlex ↗ · Scholar ↗
  13. Mohammad Bavarian, Heewoo Jun, Nikolas Tezak, John Schulman, Christine McLeavey, Jerry Tworek, and Mark Chen. Efficient training of language models to fill in the middle. arXiv preprint arXiv:2207.14255, 2022. our card
  14. Rohan Bavishi, Caroline Lemieux, Roy Fox, Koushik Sen, and Ion Stoica. AutoPandas: neural-backed generators for program synthesis. PACMPL, 2019. OpenAlex ↗ · Scholar ↗
  15. Sid Black, Stella Biderman, Eric Hallahan, Quentin Anthony, Leo Gao, Laurence Golding, Horace He, Connor Leahy, Kyle McDonell, Jason Phang, Michael Pieler, USVSN Sai Prashanth, Shivanshu Purohit, Laria Reynolds, Jonathan Tow, Ben Wang, and Samuel Weinbach. GPT-NeoX-20B: An open-source autoregressive language model. 2022. our card
  16. Burton H Bloom. Space/time trade-offs in hash coding with allowable errors. Communications of the ACM, 1970. OpenAlex ↗ · Scholar ↗
  17. Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. In NeurIPS, 2020. our card
  18. William Chan, Nikita Kitaev, Kelvin Guu, Mitchell Stern, and Jakob Uszkoreit. KERMIT: Generative insertion-based modeling for sequences. arXiv preprint arXiv:1906.01604, 2019. OpenAlex ↗ · Scholar ↗
  19. Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021a. our card
  20. Xinyun Chen, Petros Maniatis, Rishabh Singh, Charles Sutton, Hanjun Dai, Max Lin, and Denny Zhou. SpreadsheetCoder: Formula prediction from semi-structured context. In ICML, 2021b. our card
  21. Zimin Chen, Steve Kommrusch, Michele Tufano, Louis-Noël Pouchet, Denys Poshyvanyk, and Monperrus Martin. SequenceR: Sequence-to-sequence learning for end-to-end program repair. IEEE Transactions on Software Engineering, 2021c. OpenAlex ↗ · Scholar ↗
  22. Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam Roberts, Paul Barham, Hyung Won Chung, Charles Sutton, Sebastian Gehrmann, et al. PaLM: Scaling language modeling with pathways. arXiv preprint arXiv:2204.02311, 2022. our card
  23. Colin Clement, Dawn Drain, Jonathan Timcheck, Alexey Svyatkovskiy, and Neel Sundaresan. PyMT5: multi-mode translation of natural language and python code with transformers. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 9052–9065, Online, November 2020. Association for Computational Linguistics. . URL https://aclanthology.org/2020.emnlp-main.728. our card
  24. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In NAACL, 2019. our card
  25. Chris Donahue, Mina Lee, and Percy Liang. Enabling language models to fill in the blanks. In ACL, 2020. our card
  26. Zhangyin Feng, Daya Guo, Duyu Tang, Nan Duan, Xiaocheng Feng, Ming Gong, Linjun Shou, Bing Qin, Ting Liu, Daxin Jiang, et al. CodeBERT: A pre-trained model for programming and natural languages. In EMNLP Findings, 2020. our card
  27. Gordon Fraser and Andrea Arcuri. EvoSuite: Automatic test suite generation for object-oriented software. In ACM SIGSOFT, 2011. OpenAlex ↗ · Scholar ↗
  28. Leo Gao, Stella Biderman, Sid Black, Laurence Golding, Travis Hoppe, Charles Foster, Jason Phang, Horace He, Anish Thite, Noa Nabeshima, et al. The Pile: An 800GB dataset of diverse text for language modeling. arXiv preprint arXiv:2101.00027, 2020. our card
  29. Marjan Ghazvininejad, Omer Levy, Yinhan Liu, and Luke Zettlemoyer. Mask-Predict: Parallel decoding of conditional masked language models. In EMNLP, 2019. our card
  30. Sumit Gulwani. Automating string processing in spreadsheets using input-output examples. ACM SIGPLAN Notices, 2011. our card
  31. Sumit Gulwani, Oleksandr Polozov, and Rishabh Singh. Program synthesis. In Foundations and Trends in Programming Languages, 2017. OpenAlex ↗ · Scholar ↗
  32. Rahul Gupta, Soham Pal, Aditya Kanade, and Shirish Shevade. DeepFix: Fixing common C language errors by deep learning. In AAAI, 2017. OpenAlex ↗ · Scholar ↗
  33. Vincent J Hellendoorn, Christian Bird, Earl T Barr, and Miltiadis Allamanis. Deep learning type inference. In ESEC/FSE 2018, 2018. OpenAlex ↗ · Scholar ↗
  34. Tom Henighan, Jared Kaplan, Mor Katz, Mark Chen, Christopher Hesse, Jacob Jackson, Heewoo Jun, Tom B Brown, Prafulla Dhariwal, Scott Gray, et al. Scaling laws for autoregressive generative modeling. arXiv preprint arXiv:2010.14701, 2020. our card
  35. Ari Holtzman, Jan Buys, Li Du, Maxwell Forbes, and Yejin Choi. The curious case of neural text degeneration. In ICLR, 2020. our card
  36. Hamel Husain, Ho-Hsiang Wu, Tiferet Gazit, Miltiadis Allamanis, and Marc Brockschmidt. CodeSearchNet challenge: Evaluating the state of semantic code search. arXiv preprint arXiv:1909.09436, 2019. our card
  37. Maliheh Izadi, Roberta Gismondi, and Georgios Gousios. CodeFill: Multi-token code completion by jointly learning from structure and naming sequences. In ICSE, 2022. OpenAlex ↗ · Scholar ↗
  38. Kevin Jesse, Premkumar T. Devanbu, and Toufique Ahmed. Learning type annotation: Is big data enough? In ESEC/FSE, 2021. OpenAlex ↗ · Scholar ↗
  39. Aditya Kanade, Petros Maniatis, Gogul Balakrishnan, and Kensen Shi. Learning and evaluating contextual embedding of source code. In ICML, 2020. OpenAlex ↗ · Scholar ↗
  40. Nikhil Kandpal, Eric Wallace, and Colin Raffel. Deduplicating training data mitigates privacy risks in language models. arXiv preprint arXiv:2202.06539, 2022. our card
  41. Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. Scaling laws for neural language models. arXiv preprint arXiv:2001.08361, 2020. our card
  42. Nitish Shirish Keskar, Bryan McCann, Lav R Varshney, Caiming Xiong, and Richard Socher. CTRL: A conditional transformer language model for controllable generation. arXiv preprint arXiv:1909.05858, 2019. our card
  43. Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015. our card
  44. Sumith Kulal, Panupong Pasupat, Kartik Chandra, Mina Lee, Oded Padon, Alex Aiken, and Percy S Liang. SPoC: Search-based pseudocode to code. In NeurIPS, 2019. our card
  45. Katherine Lee, Daphne Ippolito, Andrew Nystrom, Chiyuan Zhang, Douglas Eck, Chris Callison-Burch, and Nicholas Carlini. Deduplicating training data makes language models better. In ACL, 2022. our card
  46. Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Ves Stoyanov, and Luke Zettlemoyer. Bart: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. arXiv preprint arXiv:1910.13461, 2019. our card
  47. Yujia Li, David Choi, Junyoung Chung, Nate Kushman, Julian Schrittwieser, Rémi Leblond, Tom Eccles, James Keeling, Felix Gimeno, Agustin Dal Lago, et al. Competition-level code generation with AlphaCode. arXiv preprint arXiv:2203.07814, 2022. our card
  48. Shuai Lu, Daya Guo, Shuo Ren, Junjie Huang, Alexey Svyatkovskiy, Ambrosio Blanco, Colin Clement, Dawn Drain, Daxin Jiang, Duyu Tang, et al. CodeXGlue: A machine learning benchmark dataset for code understanding and generation. In NeurIPS, 2021. OpenAlex ↗ · Scholar ↗
  49. Erik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu, Huan Wang, Yingbo Zhou, Silvio Savarese, and Caiming Xiong. A conversational paradigm for program synthesis. arXiv preprint arXiv:2203.13474, 2022. OpenAlex ↗ · Scholar ↗
  50. Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, and Michael Auli. Fairseq: A fast, extensible toolkit for sequence modeling. arXiv preprint arXiv:1904.01038, 2019. our card
  51. Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke E. Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul Francis Christiano, Jan Leike, and Ryan J. Lowe. Training language models to follow instructions with human feedback. arXiv preprint arXiv:2203.02155, 2022. our card
  52. Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. PyTorch: An imperative style, high-performance deep learning library. In NeurIPS, 2019. our card
  53. Michael Pradel, Georgios Gousios, Jason Liu, and Satish Chandra. TypeWriter: Neural type prediction with search-based validation. In ACM SIGSOFT, 2020. OpenAlex ↗ · Scholar ↗
  54. Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. Technical report, OpenAI, 2019. OpenAlex ↗ · Scholar ↗
  55. Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. In JMLR, 2020. our card
  56. Ronald Rivest. RFC1321: The MD5 message-digest algorithm, 1992. OpenAlex ↗ · Scholar ↗
  57. Baptiste Roziere, Marie-Anne Lachaux, Marc Szafraniec, and Guillaume Lample. DOBF: A deobfuscation pre-training objective for programming languages. In NeurIPS, 2021. OpenAlex ↗ · Scholar ↗
  58. Gabriel Ryan, Justin Wong, Jianan Yao, Ronghui Gu, and Suman Sekhar Jana. CLN2INV: Learning loop invariants with continuous logic networks. In ICLR, 2020. OpenAlex ↗ · Scholar ↗
  59. Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. In ACL, Berlin, Germany, 2016. URL https://aclanthology.org/P16-1162. our card
  60. Yong-Siang Shih, Wei-Cheng Chang, and Yiming Yang. XL-Editor: Post-editing sentences with XLNet. arXiv preprint arXiv:1910.10479, 2019. OpenAlex ↗ · Scholar ↗
  61. Armando Solar-Lezama, Liviu Tancau, Rastislav Bodik, Sanjit Seshia, and Vijay Saraswat. Combinatorial sketching for finite programs. In ASPLOS, 2006. OpenAlex ↗ · Scholar ↗
  62. Mitchell Stern, William Chan, Jamie Kiros, and Jakob Uszkoreit. Insertion transformer: Flexible sequence generation via insertion operations. In ICML, 2019. OpenAlex ↗ · Scholar ↗
  63. Romal Thoppilan, Daniel De Freitas, Jamie Hall, Noam Shazeer, Apoorv Kulshreshtha, Heng-Tze Cheng, Alicia Jin, Taylor Bos, Leslie Baker, Yu Du, et al. LaMDA: Language models for dialog applications. arXiv preprint arXiv:2201.08239, 2022. our card
  64. Lewis Tunstall, Leandro von Werra, and Thomas Wolf. Natural Language Processing with Transformers. O'Reilly Media, Inc., 2022. OpenAlex ↗ · Scholar ↗
  65. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. NeurIPS, 2017. our card
  66. Ben Wang and Aran Komatsuzaki. GPT-J-6B: A 6 Billion Parameter Autoregressive Language Model. https://github.com/kingoflolz/mesh-transformer-jax, May 2021. OpenAlex ↗ · Scholar ↗
  67. Yue Wang, Weishi Wang, Shafiq Joty, and Steven CH Hoi. CodeT5: Identifier-aware unified pre-trained encoder-decoder models for code understanding and generation. In EMNLP, 2021. OpenAlex ↗ · Scholar ↗
  68. Jason Wei, Maarten Bosma, Vincent Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M. Dai, and Quoc V. Le. Finetuned language models are zero-shot learners. In ICLR, 2022. our card
  69. Jiayi Wei, Maruth Goyal, Greg Durrett, and Isil Dillig. LambdaNet: Probabilistic type inference using graph neural networks. In ICLR, 2020. OpenAlex ↗ · Scholar ↗
  70. Peter West, Ximing Lu, Ari Holtzman, Chandra Bhagavatula, Jena Hwang, and Yejin Choi. Reflective decoding: Beyond unidirectional generation with off-the-shelf language models. In ACL, 2021. OpenAlex ↗ · Scholar ↗
  71. Frank F Xu, Uri Alon, Graham Neubig, and Vincent J Hellendoorn. A systematic evaluation of large language models of code. arXiv preprint arXiv:2202.13169, 2022. our card
  72. Zhaogui Xu, Xiangyu Zhang, Lin Chen, Kexin Pei, and Baowen Xu. Python probabilistic type inference with natural language support. In SIGSOFT, 2016. OpenAlex ↗ · Scholar ↗
  73. Michihiro Yasunaga and Percy Liang. Graph-based, self-supervised program repair from diagnostic feedback. In ICML. PMLR, 2020. OpenAlex ↗ · Scholar ↗
  74. Michihiro Yasunaga and Percy Liang. Break-it-fix-it: Unsupervised learning for program repair. In ICML, 2021. OpenAlex ↗ · Scholar ↗
  75. Pengcheng Yin, Bowen Deng, Edgar Chen, Bogdan Vasilescu, and Graham Neubig. Learning to mine aligned code and natural language pairs from stack overflow. In ACM MSR, 2018. our card
  76. Tao Yu, Rui Zhang, Kai-Chou Yang, Michihiro Yasunaga, Dongxu Wang, Zifan Li, James Ma, Irene Z Li, Qingning Yao, Shanelle Roman, Zilin Zhang, and Dragomir R. Radev. Spider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-SQL task. In EMNLP, 2018. our card
  77. John M Zelle and Raymond J Mooney. Learning to parse database queries using inductive logic programming. In AAAI, 1996. our card
  78. Rowan Zellers, Ari Holtzman, Hannah Rashkin, Yonatan Bisk, Ali Farhadi, Franziska Roesner, and Yejin Choi. Defending against neural fake news. In NeurIPS, 2019. our card
  79. Ruiqi Zhong, Kristy Lee, Zheng Zhang, and Dan Klein. Adapting language models for zero-shot learning by meta-tuning on dataset and prompt collections. In EMNLP, 2021. our card