mlsanityData to 24 Nov 2026

Template Gap Reconstruction for Shell Output Simulation with Small Language Models

arXiv 2611.06731 ↗Submitted 4 Nov 2026cs.LG cs.CLcited by 0

Not on the map. Why?

Abstract (arXiv)

Small language models offer a compact basis for shell simulation without executing submitted commands, but full-output decoding requires them to predict recurring utility structure alongside content that varies across executions. We introduce template gap reconstruction (TGR), which supplies reusable output literals interspersed with sentinels to be interleaved with autoregressively generated gaps. A template selector chooses which template to be reconstructed, with the empty template retaining full-output decoding. We construct a template bank from 18.7 million outputs collected across heterogeneous execution environments and train a template selector and five reconstruction models initialized from various small language model checkpoints on a target environment excluded from bank construction. Evaluation demonstrates that TGR improves output edit similarity (O-ES) over full-output decoding (FOD) when the optimal template covers more than 25% of the template, while performing similarly for lower-coverage outputs. Additionally, TGR outperforms FOD for shorter gap sequences, with O-ES values of 0.964 and 0.812, respectively, while maintaining similar performance for longer sequences. TGR reduces the number of tokens generated by 26.3--38.3% across used tokenizer families. These results support using a reusable output structure as a practical design choice for small shell simulators, improving response fidelity and shortening generation targets while keeping template selection and residual prediction central to response quality.

Key facts. No citing papers in the map yet (data through 24 Nov 2026). Builds on 18 of its 32 references that are in the map. Submitted 4 Nov 2026.

Builds on

18 of 32 references.

References · 18

  1. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,866
  2. 2025Qwen3 Technical Reportcited by 9,994
  3. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,337
  4. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 926
  5. 2022Efficiently Scaling Transformer Inferencecited by 581
  6. 2021ByT5: Towards a token-free future with pre-trained byte-to-byte modelscited by 537
  7. 2018Fast Lexically Constrained Decoding with Dynamic Beam Allocation for Neural Machine Translationcited by 185
  8. 2020Enabling Language Models to Fill in the Blankscited by 124
  9. 2018Learning Neural Templates for Text Generationcited by 62
  10. 2022EdiT5: Semi-Autoregressive Text-Editing with T5 Warm-Startcited by 38
  11. 2023LLM in the Shell: Generative Honeypotscited by 24
  12. 2024LLM Honeypot: Leveraging Large Language Models as Advanced Interactive Honeypot Systemscited by 13
6 more
  1. 2022TempLM: Distilling Language Models into Template-Based Generatorscited by 5
  2. 2025SoK: Honeypots & LLMs, More Than the Sum of Their Parts?cited by 5
  3. 2025SBASH: a Framework for Designing and Evaluating RAG vs. Prompt-Tuned LLM Honeypotscited by 3
  4. 2026AdvancedShelLM: A Stateful Multi-Agent LLM Honeypot for SSH Deceptioncited by 3
  5. 2019Executable formal semantics for the POSIX shellcited by 2
  6. 2026Improving LLM-Based SSH Honeypots Through Prompting and Fine-Tuningcited by 1

Built on by

Not cited yet.