HiLDe: Intentional Code Generation via Human-in-the-Loop Decoding

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: González, Emmanuel Anaya, Rothkopf, Raven, Lerner, Sorin, Polikarpova, Nadia
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866918041017647104
author González, Emmanuel Anaya
Rothkopf, Raven
Lerner, Sorin
Polikarpova, Nadia
author_facet González, Emmanuel Anaya
Rothkopf, Raven
Lerner, Sorin
Polikarpova, Nadia
contents While AI programming tools hold the promise of increasing programmers' capabilities and productivity to a remarkable degree, they often exclude users from essential decision-making processes, causing many to effectively "turn off their brains" and over-rely on solutions provided by these systems. These behaviors can have severe consequences in critical domains, like software security. We propose Human-in-the-loop Decoding, a novel interaction technique that allows users to observe and directly influence LLM decisions during code generation, in order to align the model's output with their personal requirements. We implement this technique in HiLDe, a code completion assistant that highlights critical decisions made by the LLM and provides local alternatives for the user to explore. In a within-subjects study (N=18) on security-related tasks, we found that HiLDe led participants to generate significantly fewer vulnerabilities and better align code generation with their goals compared to a traditional code completion assistant.
format Preprint
id arxiv_https___arxiv_org_abs_2505_22906
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle HiLDe: Intentional Code Generation via Human-in-the-Loop Decoding
González, Emmanuel Anaya
Rothkopf, Raven
Lerner, Sorin
Polikarpova, Nadia
Human-Computer Interaction
Artificial Intelligence
Programming Languages
While AI programming tools hold the promise of increasing programmers' capabilities and productivity to a remarkable degree, they often exclude users from essential decision-making processes, causing many to effectively "turn off their brains" and over-rely on solutions provided by these systems. These behaviors can have severe consequences in critical domains, like software security. We propose Human-in-the-loop Decoding, a novel interaction technique that allows users to observe and directly influence LLM decisions during code generation, in order to align the model's output with their personal requirements. We implement this technique in HiLDe, a code completion assistant that highlights critical decisions made by the LLM and provides local alternatives for the user to explore. In a within-subjects study (N=18) on security-related tasks, we found that HiLDe led participants to generate significantly fewer vulnerabilities and better align code generation with their goals compared to a traditional code completion assistant.
title HiLDe: Intentional Code Generation via Human-in-the-Loop Decoding
topic Human-Computer Interaction
Artificial Intelligence
Programming Languages
url https://arxiv.org/abs/2505.22906