Flow of Spans: Generalizing Language Models to Dynamic Span-Vocabulary via GFlowNets

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Xue, Bo, Song, Yunchong, Shao, Fanghao, Zhu, Xuekai, Chen, Lin, Fu, Luoyi, Wang, Xinbing, Lin, Zhouhan
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912896971177984
author Xue, Bo
Song, Yunchong
Shao, Fanghao
Zhu, Xuekai
Chen, Lin
Fu, Luoyi
Wang, Xinbing
Lin, Zhouhan
author_facet Xue, Bo
Song, Yunchong
Shao, Fanghao
Zhu, Xuekai
Chen, Lin
Fu, Luoyi
Wang, Xinbing
Lin, Zhouhan
contents Standard autoregressive language models generate text token-by-token from a fixed vocabulary, inducing a tree-structured state space when viewing token sampling as an action, which limits flexibility and expressiveness. Recent work introduces dynamic vocabulary by sampling retrieved text spans but overlooks that the same sentence can be composed of spans of varying lengths, lacking explicit modeling of the directed acyclic graph (DAG) state space. This leads to restricted exploration of compositional paths and is biased toward the chosen path. Generative Flow Networks (GFlowNets) are powerful for efficient exploring and generalizing over state spaces, particularly those with a DAG structure. However, prior GFlowNets-based language models operate at the token level and remain confined to tree-structured spaces, limiting their potential. In this work, we propose Flow of SpanS (FOSS), a principled GFlowNets framework for span generation. FoSS constructs a dynamic span vocabulary by segmenting the retrieved text flexibly, ensuring a DAG-structured state space, which allows GFlowNets to explore diverse compositional paths and improve generalization. With specialized reward models, FoSS generates diverse, high-quality text. Empirically, FoSS improves MAUVE scores by up to 12.5% over Transformer on text generation and achieves 3.5% gains on knowledge-intensive tasks, consistently outperforming state-of-the-art methods. Scaling experiments further demonstrate FoSS benefits from larger models, more data, and richer retrieval corpora, retaining its advantage over strong baselines.
format Preprint
id arxiv_https___arxiv_org_abs_2602_10583
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Flow of Spans: Generalizing Language Models to Dynamic Span-Vocabulary via GFlowNets
Xue, Bo
Song, Yunchong
Shao, Fanghao
Zhu, Xuekai
Chen, Lin
Fu, Luoyi
Wang, Xinbing
Lin, Zhouhan
Artificial Intelligence
Standard autoregressive language models generate text token-by-token from a fixed vocabulary, inducing a tree-structured state space when viewing token sampling as an action, which limits flexibility and expressiveness. Recent work introduces dynamic vocabulary by sampling retrieved text spans but overlooks that the same sentence can be composed of spans of varying lengths, lacking explicit modeling of the directed acyclic graph (DAG) state space. This leads to restricted exploration of compositional paths and is biased toward the chosen path. Generative Flow Networks (GFlowNets) are powerful for efficient exploring and generalizing over state spaces, particularly those with a DAG structure. However, prior GFlowNets-based language models operate at the token level and remain confined to tree-structured spaces, limiting their potential. In this work, we propose Flow of SpanS (FOSS), a principled GFlowNets framework for span generation. FoSS constructs a dynamic span vocabulary by segmenting the retrieved text flexibly, ensuring a DAG-structured state space, which allows GFlowNets to explore diverse compositional paths and improve generalization. With specialized reward models, FoSS generates diverse, high-quality text. Empirically, FoSS improves MAUVE scores by up to 12.5% over Transformer on text generation and achieves 3.5% gains on knowledge-intensive tasks, consistently outperforming state-of-the-art methods. Scaling experiments further demonstrate FoSS benefits from larger models, more data, and richer retrieval corpora, retaining its advantage over strong baselines.
title Flow of Spans: Generalizing Language Models to Dynamic Span-Vocabulary via GFlowNets
topic Artificial Intelligence
url https://arxiv.org/abs/2602.10583