让大模型同时用调参和改提示,灵活又高效。
Neurosymbolic LoRA: Why and When to Tune Weights vs. Rewrite Prompts
- 动态判断何时调参数、何时改提示,智能切换策略。
- 在多个模型上表现优于纯调参或纯改提示的方法。
- 适合数据少的领域,还能生成可复用的高质量训练数据。
大型语言模型可通过数值更新(调整参数)或符号操作(修改提示或逻辑约束)进行适配。数值微调擅长注入新知识,而符号方法则可在不重新训练的情况下灵活控制风格与对齐。我们提出神经符号LoRA框架,动态结合两种互补策略:通过统一监控信号与基于奖励的分类器,决定何时使用LoRA进行深层事实重建,何时采用TextGrad进行词元级编辑。该方法仅在需要时将符号变换交由外部LLM处理,保持内存效率。此外,符号编辑生成的优化提示可作为高质量、可复用的训练数据,在数学推理等数据稀缺领域尤为有益。跨多种LLM骨干网络的实验表明,神经符号LoRA始终优于纯数值或纯符号基线,展现出更强适应性与性能提升。研究揭示了数值与符号更新交替使用的价值,为语言模型微调开辟新范式。
原文摘要 · Abstract (English)
Large language models (LLMs) can be adapted either through numerical updates that alter model parameters or symbolic manipulations that work on discrete prompts or logical constraints. While numerical fine-tuning excels at injecting new factual knowledge, symbolic updates offer flexible control of style and alignment without retraining. We introduce a neurosymbolic LoRA framework that dynamically combines these two complementary strategies. Specifically, we present a unified monitoring signal and a reward-based classifier to decide when to employ LoRA for deeper factual reconstruction and when to apply TextGrad for token-level edits. Our approach remains memory-efficient by offloading the symbolic transformations to an external LLM only when needed. Additionally, the refined prompts produced during symbolic editing serve as high-quality, reusable training data, an important benefit in data-scarce domains like mathematical reasoning. Extensive experiments across multiple LLM backbones show that neurosymbolic LoRA consistently outperforms purely numerical or purely symbolic baselines, demonstrating superior adaptability and improved performance. Our findings highlight the value of interleaving numerical and symbolic updates to unlock a new level of versatility in language model fine-tuning.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。