Find Before You Fine-Tune: A Diagnostic Study of Small LLMs for Cybersecurity QA

📄 arXiv: 2607.18725v1 📥 PDF

作者: Shaswata Mitra, Subash Neupane, Trisha Chakraborty, Himanshu Tripathi, Sudip Mittal, Aritran Piplai, Shahram Rahimi

分类: cs.CL, cs.AI, cs.CR

发布日期: 2026-07-21

备注: 8 pages, 5 figures, 4 tables, IEEE ICMLA


💡 一句话要点

提出FiT框架以优化小型LLM在网络安全问答中的应用

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 小型LLM 网络安全 问答系统 微调 任务导向诊断 参数知识 上下文化能力

📋 核心要点

  1. 现有方法在选择合适的小型LLM进行微调时面临挑战,尤其是在网络安全领域,微调可能导致知识损失。
  2. 论文提出FiT框架,通过评估小型LLMs的词汇识别、参数知识和上下文化能力,帮助选择合适的模型。
  3. 实验证明,微调对小型模型的词汇和参数知识有负面影响,而FiT评分可以预测微调后的变化方向。

📝 摘要(中文)

大型语言模型(LLMs)在关键领域的问答(QA)中越来越多地被微调,但在适应之前选择哪个小型模型仍然困难。微调可以改善领域对齐,但也可能削弱先前知识、降低指令遵循能力或增加幻觉,尤其是在网络安全等标注数据稀缺或快速变化的情况下。我们提出了FiT(Find before Fine-Tune),一个任务导向的诊断框架,用于表征小型LLMs在网络安全QA中所需的三种能力:词汇识别、参数知识和检索信息的上下文化。通过FiT,我们对五个开放权重的70亿参数模型进行了实证研究,发现微调并不总是有利,且不同的微调策略在知识保持上表现不同。我们的结果表明,任务导向的诊断可以筛选出不适合的模型,避免不必要的微调,并支持小型LLMs在网络安全QA管道中的安全部署。

🔬 方法详解

问题定义:本论文旨在解决在网络安全问答中选择合适的小型LLM进行微调的困难。现有方法在微调过程中可能导致知识损失和性能下降,尤其是在数据稀缺的情况下。

核心思路:提出FiT框架,通过对小型LLMs进行任务导向的诊断,评估其在网络安全QA中所需的能力,从而帮助研究者选择最合适的模型进行微调。

技术框架:FiT框架包括三个主要模块:词汇识别能力评估、参数知识评估和检索信息的上下文化能力评估。通过这三个模块的综合评估,研究者可以更好地理解模型的适用性。

关键创新:FiT框架的创新之处在于其任务导向的诊断方法,能够在微调前评估模型的能力,避免不必要的微调,从而提高模型在特定领域的应用效果。

关键设计:在实验中,采用了不同的微调策略,包括知识导向和指令导向的微调,分析了它们对模型知识保持的影响,并通过排名相关性分析量化了这些模式的特征。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,微调对小型模型的词汇和参数知识有显著的负面影响,尤其是在知识导向微调中,知识保持能力下降。FiT评分在微调前能够有效预测微调后的性能变化,为模型选择提供了重要依据。

🎯 应用场景

该研究的潜在应用领域包括网络安全问答系统、信息检索和自动化响应系统。通过优化小型LLMs的选择和微调过程,可以提高这些系统的准确性和效率,降低部署风险,推动智能问答技术的安全应用。

📄 摘要(原文)

Large Language Models (LLMs) are increasingly fine-tuned for critical-domain Question-Answering (QA), yet choosing which small model to adapt, before paying the cost of adaptation, remains difficult. Fine-tuning can improve domain alignment, but it may also erode prior knowledge, weaken instruction-following, or increase hallucination, especially when labeled data are scarce or rapidly evolving as in cybersecurity. We present FiT (Find before Fine-Tune), a task-oriented diagnostic framework that characterizes small LLMs along three capabilities required for cybersecurity QA: vocabulary recognition, parametric knowledge, and contextualization of retrieved information. Using FiT, we conduct an empirical study of five open-weight 7-billion-parameter models under two fine-tuning regimes. We find that fine-tuning does not uniformly help: it consistently degrades vocabulary and parametric knowledge in small models, and the two regimes trade off differently. Knowledge-focused tuning causes moderate, rank-preserving degradation, whereas instruction-focused tuning collapses measured knowledge through induced abstention, inverting the knowledge ranking while leaving retrieval-grounded contextualization essentially intact. We quantify these regime-specific patterns with rank-correlation analysis and show that pre-fine-tuning FiT scores anticipate the direction of post-tuning change. Our results suggest that task-oriented diagnosis can screen out unsuitable models, avoid unnecessary fine-tuning, and support safer deployment of small LLMs in cybersecurity QA pipelines.