← 返回 2026-06-05

视频参数化内部化:将视频转化为视觉语言模型参数的方法 Video2LoRA: Parametric Video Internalization for Vision-Language Models

Manan Suri, Sarvesh Baskar, Dinesh Manocha 📅 2026-06-03 👍 4 2026-07-13 08:36
参数高效微调 多模态学习 视觉语言模型 视频理解 超网络

通过Perceiver超网络将视频编码为LoRA适配器,实现零视觉token的视频问答。

前置知识

LoRA (Low-Rank Adaptation)

LoRA是一种参数高效微调方法,通过冻结预训练模型权重并注入可训练的低秩分解矩阵来实现模型适配。具体地,对于权重矩阵 W 属于 R 的 d_out 乘以 d_in 维,LoRA引入两个低秩矩阵 A 属于 R 的 r 乘以 d_in 维和 B 属于 R 的 r 乘以 d_out 维,其中 r 远小于 d_in 和 d_out 的最小值,使得前向传播变为 y 等于 x 乘以 W 的转置加上 s 乘以 x 乘以 A 的转置再乘以 B,其中 s 是缩放因子。这样只需训练 r 乘以 d_in 加上 d_out 个参数而非全部 d_in 乘以 d_out 个参数。

LoRA是FRAMES2LORA的核心组件,因为它提供了一种将视频信息编码为模型参数的方式。理解LoRA的低秩分解原理和如何将其注入到冻结模型中,对于理解FRAMES2LORA如何将视频转换为参数表示至关重要。

Perceiver架构

Perceiver是一种基于Transformer的架构,旨在处理高维输入数据。它使用一组可学习的潜在查询通过注意力机制从输入数据中提取信息,形成固定大小的表征。在编码器重采样器中,潜在查询作为query,输入特征作为key和value;在解码器重采样器中,每个目标模块和LoRA秩方向对应一个输出query。这种设计允许处理任意长度的输入序列并产生固定维度的输出。

FRAMES2LORA使用Perceiver超网络将视频的层条件隐状态转换为LoRA权重。理解Perceiver的注意力重采样机制有助于理解超网络如何从高维视觉token序列中提取关键信息并映射到参数空间。

视觉语言模型 (VLM)

视觉语言模型是一类能够同时理解和生成跨模态内容的大规模预训练模型。它们通常包含视觉编码器,将图像或视频帧转换为视觉token,和语言解码器,处理文本token,通过跨模态注意力机制实现视觉和语言信息的融合。在视频场景下,VLM将每一帧编码为数百个视觉token,然后与文本token拼接输入到语言模型中。

VLM是FRAMES2LORA应用的对象模型。理解VLM的token化机制和上下文窗口限制,特别是每帧产生数百视觉token导致上下文瓶颈的问题,对于理解FRAMES2LORA要解决的核心挑战至关重要。

研究动机

现有视频理解方法存在根本性的token瓶颈问题。在视觉语言模型中,每帧视频需要被编码为数百个视觉token,即使是仅有几十帧的短片段也会在添加任何文本查询之前就产生数万个token。例如,标准分辨率下每帧可能贡献数百个视觉token。这意味着内存消耗和推理延迟随着每一帧和每一次重复查询线性增长。更严重的是,当超过模型的容量阈值时,VLM不会优雅地降级,而是产生与视频无关的不连贯或重复文本。现有方法如帧子采样会牺牲时间覆盖,视觉token压缩在减少每帧成本的同时仍将视觉token保留在上下文中,长上下文架构和流式方法只是推迟了但并未解决这一根本约束。

本文的目标是本文的目标是提出一种根本性的解决方案,将视频从查询时的上下文中完全消除,而是在任何查询发出之前将视频编码到模型的参数空间中。具体而言,FRAMES2LORA旨在实现参数化视频内部化,给定一个视频,通过一次前向传播生成一个视频特定的LoRA适配器,后续查询由带有该适配器的冻结基础模型回答,上下文中无需任何视觉token。目标是保持与直接视频上下文推理相当的性能,同时大幅降低查询时的计算成本和token负载。

与已有工作不同的是,本文的独特切入角度在于范式转换,不再尝试压缩视觉信息以适应上下文窗口,而是从查询时完全移除视觉token。与先前工作相比,这是一个质的飞跃。之前的工作如Doc-to-LoRA已经展示了使用前馈超网络将文本文档转换为LoRA适配器,但将其扩展到视频面临数量级更难的挑战,每个示例的token体积要大得多,使得示例级别的优化计算上不可行。压缩是跨模态的,需要将视觉语义表达为语言模型参数空间的扰动。视觉分布沿分辨率轴变化,在文本中没有直接类比。FRAMES2LORA是第一个展示视频参数化内部化可行性的工作。

核心方法

FRAMES2LORA方法的整体思路是将视频理解从基于token的上下文条件转换为基于参数的模型适配。训练时,一个冻结的VLM将视频编码为层级隐状态,一个可训练的Perceiver超网络读取这些状态并生成LoRA适配器权重。生成的适配器被附加到同一个冻结的VLM上,使其能够回答关于视频的下游文本提示。推理时,对于新视频,FRAMES2LORA只需一次生成LoRA适配器,然后该适配器增强的冻结VLM可以回答任意文本查询而无需视觉token。这种方法的核心创新在于使用超网络直接预测LoRA权重,而非通过迭代梯度更新进行标准LoRA微调。

核心创新点是使用Perceiver超网络从冻结VLM的层级中间表示中直接生成视频特定的LoRA适配器。这与标准LoRA微调有本质区别,标准LoRA需要通过反向传播和梯度下降迭代地优化适配器权重,而FRAMES2LORA通过超网络在一次前向传播中直接预测这些权重。这使得方法能够高效地处理视频的大量token序列,同时保持冻结VLM的优势。另一个关键创新是保持层级维度,允许超网络生成层索引的适配器而非使用单一池化视频向量,这样可以更好地利用模型不同层级的表征能力。

方法步骤详情

FRAMES2LORA方法包含四个主要步骤。步骤一,视频编码,使用冻结的SmolVLM2模型作为视频编码器,给定采样的视频和内部化指令,收集每个Transformer层的文本侧隐状态C等于从h0到hL减1堆叠而成,属于R的L乘以S乘以D维,其中L是层数,S是融合序列长度,D是隐维度。步骤二,Perceiver超网络处理,对于每个层切片C_l,编码器重采样器从学习到的潜在查询到视频条件隐状态进行注意力计算,产生固定大小表征,然后解码器重采样器为每个目标模块和LoRA秩方向使用一个输出query。步骤三,LoRA权重生成,超网络输出形状为O,属于R的B乘以L乘以M乘以R乘以Z维,其中B为批次大小,M为目标模块数,R为秩,Z为潜在大小,通过共享投影头映射到两个LoRA因子A_l,m属于R的R乘以d_in维和B_l,m属于R的R乘以d_out维。步骤四,动态LoRA注入,对于权重为W的冻结线性层,生成适配器添加Delta y等于s乘以x乘以A_l,m的转置再乘以B_l,m,完整适配前向传播为y等于x乘以W的转置加上s乘以x乘以A_l,m的转置再乘以B_l,m。

技术新颖性

FRAMES2LORA的技术新颖性体现在三个方面。首先,这是第一个实现参数化视频内部化的工作,通过Perceiver超网络将视频转换为LoRA适配器,使得冻结VLM能够在上下文中无视觉token的情况下回答查询。其次,虽然仅使用12帧384像素训练,但该方法在多达1024帧和1024像素时保持稳定,而直接视频上下文推理在此设置下经常退化。第三,方法展示了高效的泛化能力,将answer-time visual-token负载减少高达1500倍,查询TTFT减少6到80倍,同时保持视频保真输出。此外,观察发现非重叠视频段独立生成的适配器可以在秩空间中组合,这为分块长视频内部化提供了路径。

FRAMES2LORA overview. Training (left): A frozen VLM encodes the input video into hidden states. The trainable FRAMES2LORA hypernetwork reads these states and generates LoRA adapter weights in a single forward pass. The adapter-augmented frozen VLM is trained against teacher-generated targets. Inference (right): Given a new video, FRAMES2LORA generates the LoRA adapter once. The frozen VLM, augmented with this adapter, answers arbitrary text queries without visual tokens. Per-query cost is independent of video length.
Figure 1: FRAMES2LORA overview. Training (left): A frozen VLM encodes the input video into hidden states. The trainable FRAMES2LORA hypernetwork reads these states and generates LoRA adapter weights in a single forward pass. The adapter-augmented frozen VLM is trained against teacher-generated targets. Inference (right): Given a new video, FRAMES2LORA generates the LoRA adapter once. The frozen VLM, augmented with this adapter, answers arbitrary text queries without visual tokens. Per-query cost is independent of video length.
Rank-direction ablation on ActivityNet Captions. Top-k rank slices recover performance faster than random or bottom-k slices, suggesting that the Frobenius norm product is a useful heuristic for rank importance.
Figure 6: Rank-direction ablation on ActivityNet Captions. Top-k rank slices recover performance faster than random or bottom-k slices, suggesting that the Frobenius norm product is a useful heuristic for rank importance.
Layer-wise adapter-removal diagnostic. Left: signed removal effect from zeroing one layer's generated LoRA update; negative values indicate that removing the layer lowers the score. Right: Frobenius norm of generated LoRA weights across layers.
Figure 7: Layer-wise adapter-removal diagnostic. Left: signed removal effect from zeroing one layer's generated LoRA update; negative values indicate that removing the layer lowers the score. Right: Frobenius norm of generated LoRA weights across layers.
Direct logit attribution of adapter-induced representation shifts projected onto the diagnostic answer direction across 24 LLM layers. Later layers show the largest alignment with the answer direction, suggesting late-layer logit steering.
Figure 8: Direct logit attribution of adapter-induced representation shifts projected onto the diagnostic answer direction across 24 LLM layers. Later layers show the largest alignment with the answer direction, suggesting late-layer logit steering.

实验结果

FRAMES2LORA在两个模型规模500M和2.2B上进行了全面评估。在视频字幕任务上,FRAMES2LORA在所有10个基准-规模组合上通过统计非劣效性和等价性测试。对于SmolVLM 2.2B,FRAMES2LORA恢复了基准模型判断分数的91.9%,对于500M恢复了84.2%。Token-F1提供了独立的基于引用的佐证,平均配对差在500M为负0.001,在2.2B为0.000,表明FRAMES2LORA在基线上基本保持性能。在细粒度分析中,VDC的四种风格在500M保持81到85%恢复率,短字幕85.1%、详细字幕84.2%、背景81.5%、主要对象85.5%。相机字幕是异常值,500M时仅达到42.3%恢复率,因为摄影属性如镜头构图、视点、相机运动难以在该尺度下编码为权重扰动。2.2B时恢复82.0%,提升39.7个百分点。在视频问答任务上,FRAMES2LORA仅在字幕上训练,视频问答完全是零样本迁移任务。在8个基准-规模组合中,有7个通过判断测试。NExT-QA是亮点,FRAMES2LORA在两个尺度上都超越基线,500M的置信区间完全位于零上方。唯一失败是2.2B的PLM-SGQA,更多是指示性而非代表性,同一基准在500M轻松通过。效率方面,FRAMES2LORA将查询TTFT从6.45秒降至0.55秒(500M),提升11.75倍,从7.06秒降至0.58秒(2.2B),提升12.11倍。摊销曲线显示5个问题后摊销TTFT降至1.29秒(500M)和1.44秒(2.2B),10个问题后降至0.74秒和0.80秒。TTFT几何平均加速为500M的6.7倍和2.2B的20.1倍,最大加速为17.2倍和79.1倍。token压缩方面,FRAMES2LORA将answer-time输入token平均减少500M的150倍和2.2B的302倍,最大设置下达到713倍和1507倍。

Comparison of the base model with video and FRAMES2LORA generated adapters, across captioning benchmarks using LLM Judge scores and Token F1. We report mean scores, the paired difference Delta(V2L -Base), 95% confidence intervals, and the statistical equivalence (Eq) and non-inferiority (NI) criteria.
Table 1: Comparison of the base model with video and FRAMES2LORA generated adapters, across captioning benchmarks using LLM Judge scores and Token F1. We report mean scores, the paired difference Delta(V2L -Base), 95% confidence intervals, and the statistical equivalence (Eq) and non-inferiority (NI) criteria.
VDC results broken down by caption style.
Table 2: VDC results broken down by caption style.
CaReBench results broken down by subset.
Table 3: CaReBench results broken down by subset.
Comparison of the base model with video and FRAMES2LORA generated adapters, across video question answering benchmarks using LLM Judge scores and Token F1. We report the paired difference Delta(V2L - Base), 95% confidence intervals, and the statistical equivalence (Eq) and non-inferiority (NI) criteria.
Table 4: Comparison of the base model with video and FRAMES2LORA generated adapters, across video question answering benchmarks using LLM Judge scores and Token F1. We report the paired difference Delta(V2L - Base), 95% confidence intervals, and the statistical equivalence (Eq) and non-inferiority (NI) criteria.
Token F1 scores under rank-direction ablation on ActivityNet Captions. Brackets denote 95% confidence intervals. Full Adapter (k = 16) and Zero Adapter (k = 0) serve as upper and lower baselines.
Table 5: Token F1 scores under rank-direction ablation on ActivityNet Captions. Brackets denote 95% confidence intervals. Full Adapter (k = 16) and Zero Adapter (k = 0) serve as upper and lower baselines.
Training configuration for the 500M and 2.2B FRAMES2LORA runs. Wall-clock training time reports elapsed training time, not total GPU-hours. Effective batch size is computed as number of GPUs times per-device batch size times gradient accumulation steps.
Table 6: Training configuration for the 500M and 2.2B FRAMES2LORA runs. Wall-clock training time reports elapsed training time, not total GPU-hours. Effective batch size is computed as number of GPUs times per-device batch size times gradient accumulation steps.
Inference efficiency on VidCapBench, comparing the base model and FRAMES2LORA.
Figure 2: Inference efficiency on VidCapBench, comparing the base model and FRAMES2LORA.
Scaling behavior on VDC background captioning across frame count and spatial resolution.
Figure 3: Scaling behavior on VDC background captioning across frame count and spatial resolution.
Efficiency comparison across video-token budgets. Columns report query TTFT, reusable preprocessing cost (internalization for FRAMES2LORA, cache creation for KV Cache, and token compression for FrameFusion), and Token-F1.
Figure 4: Efficiency comparison across video-token budgets. Columns report query TTFT, reusable preprocessing cost (internalization for FRAMES2LORA, cache creation for KV Cache, and token compression for FrameFusion), and Token-F1.
Two-chunk adapter composition on VDC.
Figure 5: Two-chunk adapter composition on VDC.
LLM-judge score distributions for the direct baseline and FRAMES2LORA.
Figure 9: LLM-judge score distributions for the direct baseline and FRAMES2LORA.
Per-example LLM-judge score differences between FRAMES2LORA and the direct baseline.
Figure 10: Per-example LLM-judge score differences between FRAMES2LORA and the direct baseline.
Token-F1 distributions for the direct baseline and FRAMES2LORA.
Figure 11: Token-F1 distributions for the direct baseline and FRAMES2LORA.
Per-example token-F1 differences between FRAMES2LORA and the direct baseline.
Figure 12: Per-example token-F1 differences between FRAMES2LORA and the direct baseline.
Spider plot for video question answering benchmarks.
Figure 13: Spider plot for video question answering benchmarks.
Spider plot for video captioning benchmarks.
Figure 14: Spider plot for video captioning benchmarks.
查看结构化数据
任务指标本文基线提升
ActivityNet Captions字幕 LLM Judge分数 0.492 (2.2B) 0.576 (2.2B) 恢复85.4%,统计等效
VDC详细字幕 LLM Judge分数 0.463 (2.2B) 0.526 (2.2B) 恢复88.0%,统计等效
NExT-QA开放问答 LLM Judge分数 0.610 (2.2B) 0.597 (2.2B) 超越基线+0.013
VDC背景字幕细粒度 LLM Judge分数 0.606 (2.2B) 0.588 (2.2B) 超越基线+0.018 (103.1%)
VDC短字幕细粒度 LLM Judge分数 0.579 (2.2B) 0.556 (2.2B) 超越基线+0.022 (104.1%)

局限与改进

FRAMES2LORA的局限性体现在几个方面。首先,当前实现为每个目标VLM规模训练单独的超网络,仅在500M和2.2B SmolVLM2骨干上进行评估。扩展到其他VLM系列、更大模型以及共享或尺度可迁移的超网络是重要但尚未探索的方向。其次,训练设置仅使用字幕和摘要监督,这使得向视频问答的迁移成为零样本设置,其中答案风格可能与直接视频上下文基线不同。特别是,FRAMES2LORA有时会对短答案QA产生更描述性的答案,这可能在语义正确时降低词汇重叠指标。第三,由于FRAMES2LORA将视频转换为紧凑适配器,表示可能强调高级场景和事件信息而非某些细粒度细节,这对于需要精确相机、空间或对象级区分的任务最相关。第四,chunk组合实验是初始的两块测试,结果建议独立生成的适配器可以在秩空间中组合,但当前操作未显式建模时间顺序。最后,当前适配器秩固定为16,这可能不足以捕获视频的所有相关信息,特别是在高分辨率或长时间视频中。

独立分析的弱点

FRAMES2LORA存在几个可改进的弱点。首先,相机描述的显著下降,500M时仅恢复42.3%,表明摄影属性难以编码为权重扰动,需要专门的相机运动监督或自适应秩来解决这个问题。其次,短答案QA中的冗长输出问题表明训练设置中的任务不匹配,仅在字幕上训练导致模型倾向于描述性风格,即使被要求提供简洁答案。第三,适配器的固定秩为16可能不足以表示复杂视频的所有相关信息,特别是在需要精确空间或时间细节的任务中。第四,当前chunk组合操作不显式建模时间顺序,可能导致生成的适配器在组合时丢失重要的时序关系。第五,每个VLM规模需要单独训练超网络,限制了方法的可扩展性和部署便利性。最后,虽然方法在高帧数和分辨率下保持稳定,但仍有性能天花板,特别是在需要细粒度视觉细节的任务上。

未来方向

未来研究可以从多个方向扩展FRAMES2LORA。首先,将框架扩展到其他VLM系列(如LLaVA、InternVL等)和更大模型,探索共享或尺度可迁移的超网络架构,减少为每个模型规模单独训练的需求。其次,改进训练目标,结合字幕和QA监督,或加入答案长度控制和轻量级校准以实现任务特定格式。第三,开发自适应秩机制,根据视频复杂度动态调整适配器秩,以更好地平衡容量和效率。第四,设计更结构化的chunk组合机制,显式建模时间顺序,实现更好的长视频内部化。第五,探索音频-视觉内部化,将音频信息整合到适配器生成中,以提供更全面的多模态理解。第六,研究针对特定任务的监督,如相机运动、空间关系等,以提升在细粒度视觉任务上的性能。第七,分析适配器在不同语言模型架构间的迁移性,探索跨模型的知识蒸馏和适配器重用。第八,开发更高效的超网络架构,减少生成适配器的计算成本,使方法更适用于实时应用。最后,探索将FRAMES2LORA与其他高效技术如token压缩、KV缓存结合,进一步优化整体系统性能。

复现评估

FRAMES2LORA的可复现性评估如下。代码和模型权重将公开,训练使用公开可用的FineVideo数据集。训练配置详细,500M模型使用4个A100 GPU,per-device批次大小48,梯度累积2步,有效批次384,训练9000步,wall-clock时间37小时。2.2B模型使用6个A100 GPU,per-device批次大小8,梯度累积5步,有效批次240,训练7000步,wall-clock时间201小时。两个模型都使用rank-16 LoRA适配器,12均匀采样帧,最大视频维度384像素,Perceiver潜在大小512,学习率为0.0001,预热比0.03,权重衰减0.01。评估基准包括ActivityNet Captions、PLM-RDCap、PLM-RCap、VDC、CaReBench、NExT-QA、ActivityNet-QA、PLM-SGQA、VidCapBench,都是公开的,评估提示和模板在附录中完整提供。统计测试使用配对bootstrap重采样估计95%置信区间,非劣效性和等价性使用token-F1的0.05余量和重新缩放判断分数的0.15余量。总体而言,论文提供了充分的细节实现复现,但主要挑战是计算资源需求,训练500M模型需要约148 GPU小时,2.2B模型需要约1206 GPU小时。对于大多数研究者来说,复现完整训练可能资源密集,但推理阶段的复现相对可行。