arXiv:2505.18374cs.CLcs.AI2025-05

构建可约束语法的命令行环境,提升复杂指令建模准确性

ShIOEnv: A Command Evaluation Environment for Grammar-Constrained Synthesis and Execution Behavior Modeling

  • 将参数构造抽象为语法导出选项,约束生成合法命令
  • 引入自监督不可约性信号,衡量输入信息密度,最高达0.73
  • 适用于需精准模拟系统行为的自动化脚本生成任务

命令行交互建模已实现无需执行的输出展示,但现有方法难以处理复杂组合输入及依赖系统状态的执行行为。根源在于训练数据缺乏真实壳层输入输出(ShIO)样本。为此,我们提出ShIOEnv——一个兼容Gymnasium的Bash环境,用于命令合成与系统相关执行行为捕捉。通过将参数构造时序抽象为语法导出选项,限制生成仅限于语法正确的参数。引入自监督不可约性信号,近似贡献于可观测行为的参数比例,作为输入的信息密度度量。基于ShIOEnv,我们构建并发布210万条输入输出对以建模Bash命令执行反馈。实验表明,在语法约束数据集上训练且最大不可约性高于0.73的模型,对用户来源输入的执行行为建模准确率优于先前无执行基线。

原文摘要 · Abstract (English)

Modeling of command-line interface (CLI) interaction has enabled flexible, execution-free output presentation. However, current approaches struggle to model inputs with complex compositions and inputs whose execution behavior depends on system characteristics. This is due to a lack of shell input-output (ShIO) data in the training distributions used by the models in these approaches. To address this data gap, we present ShIOEnv, a Gymnasium-compatible Bash shell environment for command synthesis and system-grounded execution behavior capturing. To concentrate synthesis on productive regions of the state-action space, we temporally abstract argument construction into grammar-derived options, thereby constraining synthesis to syntactically valid arguments. We introduce a self-supervised irreducibility signal to approximate the proportion of arguments that contribute to the observed execution behavior, serving as a measure of information density for each input. Using ShIOEnv, we curate and release 2.1M input-output pairs for modeling feedback from Bash command execution. We find that models trained on grammar-constrained datasets with higher maximum irreducibility achieve greater accuracy when modeling the execution behavior of user-sourced inputs than prior execution-free baselines.

命令行建模语法约束执行行为自监督学习

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。