Gumbel Machine: Counterfactual Student Writing Generation via Gumbel Noise Steering

Hunter McNichols, Alexander Scarlatos, Mihai Dascalu, Danielle McNamara, Andrew Lan
5/26/2026
cs.AIcs.CL

No confident code implementation found for this paper.

Abstract

An effective method of teaching across disciplines is to provide examples of high-quality work. However, an example may be significantly different from a student's current work, making it challenging for them to emulate.

Show full abstract

An ideal learning demonstration is a counterfactual version of the student work, an improved version that is still similar to their own. Existing automated approaches for counterfactual text generation using Large Language Models (LLMs) result in domain-specific systems that are difficult to translate into practical applications. We present the Gumbel Machine, a flexible, modular approach to generating counterfactuals that leverages LLM instruction-following capabilities while encouraging similarity to a reference factual text. Central to our approach is a novel, controlled decoding algorithm, $β$-Hindsight control, which uses latent randomness as a tunable similarity control mechanism during counterfactual generation. Experiments on datasets of student writing, scored on various criteria, demonstrate the effectiveness of our approach at generating counterfactuals both rubric-consistent and similar to a reference.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{mcnichols2026gumbel,
  title  = {Gumbel Machine: Counterfactual Student Writing Generation via Gumbel Noise Steering},
  author = {Hunter McNichols and Alexander Scarlatos and Mihai Dascalu and Danielle McNamara and Andrew Lan},
  year   = {2026},
  eprint = {2605.27249},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2605.27249v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2605.27249.svg)](https://codeofpaper.com/paper/2605.27249)

Discussion