Simplifying the Modeling of Arbitrary Conditionals in Natural Language

Yinhan Lu, Eric Elmoznino, Léo Gagnon, Sarthak Mittal, Tejas Kasetty +1 more
6/12/2026
cs.CLcs.LG
transformer-attention

No confident code implementation found for this paper.

Abstract

Causal Transformers model sequences through an autoregressive factorization of the joint distribution, which enables efficient left-to-right decoding and conditional likelihood computation. However, they cannot tractably sample from or evaluate arbitrary conditionals -- e.g., a block of text conditioned on past and future tokens.

Show full abstract

Recent work aims to solve this problem through novel architectures, but they often lead to sub-optimal modeling of such conditionals and degraded generations. We propose Arbitrary Conditionals GPT (AC-GPT) which introduces a simple modification to standard causal Transformers to enable evaluating and sampling from arbitrary conditionals -- including past, future, and mixed contexts -- within a single forward pass. Unlike prior approaches, our method preserves the standard left-to-right ordering and next-token prediction objective essential for both strong performance and efficient training on natural language. Crucially, this compatibility allows existing LLMs to be fine-tuned for arbitrary conditioning. Our empirical results indicate that our method outperforms baselines on modeling arbitrary conditionals, without degrading standard left-to-right performance.

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{lu2026simplifying,
  title  = {Simplifying the Modeling of Arbitrary Conditionals in Natural Language},
  author = {Yinhan Lu and Eric Elmoznino and Léo Gagnon and Sarthak Mittal and Tejas Kasetty and Guillaume Lajoie},
  year   = {2026},
  eprint = {2606.14943},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2606.14943v1}
}

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/2606.14943.svg)](https://codeofpaper.com/paper/2606.14943)

Discussion