FPMoE: A Sparse Mixture-of-Experts Approach to Functional Code Generation 文章

ArXiv CS.CL2026-05-28NEWSen作者: Loc Pham, Lang Hong Nguyet Anh, Thanh Le-Cong

摘要

arXiv:2605.27849v1 Announce Type: cross Abstract: Despite rapid progress in LLM-based code generation, existing models are predominantly trained on imperative languages, leaving functional programming languages (FPLs) such as Haskell, OCaml, and Scala chronically underexplored, with even frontier models performing substantially worse on FPLs. Fine-tuning is a natural remedy, but our experiments show that per-language fine-tuning fails to capture shared functional abstractions, while merged multi-language fine-tuning introduces cross-language interference. To address this, we introduce FPMoE, a lightweight, open-source code generation model built on a sparse Mixture-of-Experts (MoE) architecture with three language-specific routed experts (one each for Haskell, OCaml, and Scala) and a shared expert that captures cross-language functional patterns such as monadic reasoning and type-directed programming.