1.fix all table size;2.fix some table max/2nd-max mark error;3.add fig & table caption mark;4.add some ref bibs

This commit is contained in:
D调E点
2026-03-23 12:20:48 +08:00
committed by panda361
parent cacdc79ae2
commit 965f2790dc
45 changed files with 380 additions and 275 deletions

View File

@@ -1,4 +1,4 @@
% !TeX root = ../main.tex
% !TeX root = main.tex
% 第五章 基于动态位置调制的维度级表征适配方法
\chapter{基于动态位置调制的维度级表征适配方法}
\label{chap:dypam}
@@ -26,7 +26,7 @@ RoPE的频率结构不仅导致不同维度的激活强度差异如第四章
\begin{figure}[htp]
\centering
\includegraphics[width=0.9\linewidth]{assets/5_rope_response.pdf}
\caption{不同维度对的位置响应函数。a低索引维度对高频的注意力得分随相对距离快速衰减而高索引维度对低频在长距离上仍保持较高的注意力得分。b所有维度对的位置响应热图展示非均匀的位置敏感性分布。这种差异化的位置响应特性为DyPAM的维度对级调制设计提供了直接动机。}
\caption[不同维度对的位置响应函数]{不同维度对的位置响应函数。a低索引维度对高频的注意力得分随相对距离快速衰减而高索引维度对低频在长距离上仍保持较高的注意力得分。b所有维度对的位置响应热图展示非均匀的位置敏感性分布。这种差异化的位置响应特性为DyPAM的维度对级调制设计提供了直接动机。}
\label{fig:ch5_rope_response}
\end{figure}
@@ -38,7 +38,7 @@ RoPE的频率结构不仅导致不同维度的激活强度差异如第四章
\begin{figure}[htp]
\centering
\includegraphics[width=0.9\linewidth]{assets/5_token_heterogeneity.pdf}
\caption{不同语义角色的输入token诱导的激活模式差异。具有不同语义角色的token在维度激活分布上呈现系统性差异。}
\caption[不同语义角色的输入token诱导的激活模式差异]{不同语义角色的输入token诱导的激活模式差异。具有不同语义角色的token在维度激活分布上呈现系统性差异。}
\label{fig:ch5_token_hetero}
\end{figure}
@@ -72,7 +72,7 @@ RoSA通过低频维度选择性增强与动态层选择初步实现了对维
\begin{figure}[htp]
\centering
\includegraphics[width=0.85\linewidth]{assets/5_dypam_arch.pdf}
\caption{DyPAM方法框架图。DyPAM在RoPE之前将输入条件化的维度级调制与头级和层级结构偏置共同施加于Query和Key表示实现对位置注意力的细粒度动态适配。}
\caption[DyPAM方法框架图]{DyPAM方法框架图。DyPAM在RoPE之前将输入条件化的维度级调制与头级和层级结构偏置共同施加于Query和Key表示实现对位置注意力的细粒度动态适配。}
\label{fig:ch5_dypam_arch}
\end{figure}
@@ -195,7 +195,7 @@ DyPAM使用标准的语言建模交叉熵损失进行端到端训练。给定输
\RestyleAlgo{ruled}
\begin{algorithm}[htp]
\caption{动态位置注意力调制DyPAM训练算法}
\caption[动态位置注意力调制DyPAM训练算法]{动态位置注意力调制DyPAM训练算法}
\label{alg:ch5_dypam}
\KwIn{输入序列$\mathbf{x}$预训练RoPE大语言模型DyPAM参数}
\KwOut{模型输出分布与训练损失$\mathcal{L}$}
@@ -235,11 +235,11 @@ RoSA和DyPAM均针对维度级位置结构异质性$\mathcal{R}_{dim}$
表~\ref{tab:ch5_compare}从多个设计维度对两种方法进行了系统比较。
\begin{table}[htp]
\begin{table}[!htbp]
\centering
\caption{RoSA与DyPAM的设计维度对比}
\caption[RoSA与DyPAM的设计维度对比]{RoSA与DyPAM的设计维度对比}
\label{tab:ch5_compare}
\small
\begin{tabular}{lcc}
\toprule
\textbf{设计维度} & \textbf{RoSA} & \textbf{DyPAM} \\
@@ -261,7 +261,7 @@ RoSA和DyPAM均针对维度级位置结构异质性$\mathcal{R}_{dim}$
\centering
% 占位:待替换为外部绘制的 5_rosa_dypam_compare.pdf
% \includegraphics[width=0.9\textwidth]{assets/5_rosa_dypam_compare.pdf}
\caption{RoSA与DyPAM在维度级位置结构适配上的设计演进对比。该图采用左右并排的双架构对比布局
\caption[RoSA与DyPAM在维度级位置结构适配上的设计演进对比]{RoSA与DyPAM在维度级位置结构适配上的设计演进对比。该图采用左右并排的双架构对比布局
\textbf{左半}RoSA——静态选择性增强展示RoSA的处理流程——Query/Key向量中以虚线分割低频与高频维度区域低频区域由超参数$r_{\text{low}}$固定选定)高亮标注为"增强区域",高频区域灰显为"未增强区域";调制信号$\mathbf{S}$在所有头间共享底部标注DLS的层选择机制部分层激活、部分层掩码。用标签强调静态维度划分、跨头共享、层级二值选择。
\textbf{右半}DyPAM——动态条件化调制展示DyPAM的处理流程——Query/Key向量的所有维度对均被调制因子$s_{t,h,i}$覆盖,调制强度用连续色阶(从浅到深)表示差异化程度;调制信号从输入隐藏状态经低秩投影动态生成,并叠加头级偏置$\boldsymbol{\beta}_h$和层级偏置$\boldsymbol{\beta}^{(\ell)}$作用点标注在RoPE之前。用标签强调全维度覆盖、输入条件化、头级独立、连续调制。
\textbf{中间}用大箭头连接左右两半,标注递进关系:"静态$\to$动态"、"粗粒度$\to$细粒度"、"维度选择$\to$维度对调制"。}
@@ -318,30 +318,29 @@ DyPAM实验在NVIDIA RTX 4090上使用DeepSpeed和BF16精度进行。DyPAM超参
表~\ref{tab:ch5_dypam_math}展示了DyPAM在数学推理任务上的性能。
\begin{table}[htp]
\begin{table}[!htbp]
\centering
\caption{DyPAM与基线方法在数学推理任务上的性能比较。*表示统计显著提升。}
\caption[DyPAM与基线方法在数学推理任务上的性能比较]{DyPAM与基线方法在数学推理任务上的性能比较。*表示统计显著提升。}
\label{tab:ch5_dypam_math}
\small
\resizebox{\linewidth}{!}{
\renewcommand{\arraystretch}{0.9}
\begin{tabular}{l|lcccccccccc}
\toprule
\textbf{骨干} & \textbf{方法} & \textbf{参数(\%)} & \textbf{MultiArith} & \textbf{GSM8K} & \textbf{AddSub} & \textbf{AQuA} & \textbf{SingleEq} & \textbf{SVAMP} & \textbf{MAWPS} & \textbf{Micro-Avg$\uparrow$} & \textbf{Macro-Avg$\uparrow$} \\
\midrule
\multirow{10}{*}{\rotatebox{90}{\textbf{LLaMA3.2-3B}}}
\multirow{10}{*}{\textbf{LLaMA3.2-3B}}
& LoRA & 1.12 & 71.50 & 33.21 & 78.48 & 22.44 & 81.50 & 54.10 & 76.47 & 54.96 & 59.67 \\
& AdaLoRA & 2.22 & 75.67 & 36.32 & 80.51 & 22.83 & 87.80 & 55.60 & 78.57 & 57.90 & 62.47 \\
& OFT & 0.73 & 87.17 & \textbf{40.18} & \underline{85.82} & \underline{24.02} & 86.42 & 61.50 & \textbf{84.03} & \underline{62.75} & \underline{67.02} \\
& Bone & 1.14 & \underline{87.50} & 39.73 & 85.57 & 23.62 & 86.61 & \textbf{63.70} & 81.93 & 63.03 & 66.95 \\
& OFT & 0.73 & 87.17 & \textbf{40.18} & \underline{85.82} & \underline{24.02} & 86.42 & 61.50 & \textbf{84.03} & 62.75 & \underline{67.02} \\
& Bone & 1.14 & \underline{87.50} & 39.73 & 85.57 & 23.62 & 86.61 & \textbf{63.70} & \underline{81.93} & \underline{63.03} & 66.95 \\
& IA$^3$ & 0.02 & 58.33 & 27.37 & 68.61 & 20.47 & 72.83 & 47.90 & 58.82 & 46.89 & 50.62 \\
& LN Tuning & 0.01 & 58.00 & 26.38 & 66.58 & 21.26 & 74.80 & 44.90 & 60.08 & 46.01 & 50.29 \\
& FourierFT & 0.73 & 78.67 & 33.21 & 82.03 & 20.47 & 85.43 & 54.30 & 77.31 & 56.72 & 61.63 \\
& SHiRA & 1.12 & 82.50 & 38.82 & 84.81 & \underline{24.02} & \underline{87.99} & 56.90 & 81.93 & 60.59 & 65.28 \\
& SHiRA & 1.12 & 82.50 & 38.82 & 84.81 & \underline{24.02} & \underline{87.99} & 56.90 & \underline{81.93} & 60.59 & 65.28 \\
& RoSA & 0.54 & 84.33 & 37.91 & 82.78 & 22.83 & 87.01 & 52.50 & 78.99 & 59.02 & 63.77 \\
& \textbf{DyPAM} & 0.92 & \textbf{88.50} & \underline{39.88} & \textbf{86.33} & \textbf{25.20} & \textbf{88.78} & \underline{63.00} & \textbf{84.03} & \textbf{63.58*} & \textbf{67.96*} \\
\midrule
\multirow{10}{*}{\rotatebox{90}{\textbf{Qwen3-8B}}}
\multirow{10}{*}{\textbf{Qwen3-8B}}
& LoRA & 0.79 & 97.67 & 74.91 & 89.87 & 35.83 & 90.55 & 84.70 & 89.08 & 82.04 & 80.37 \\
& AdaLoRA & 1.57 & 95.17 & 73.01 & 90.63 & 37.01 & 92.32 & 84.80 & 91.60 & 81.62 & 80.65 \\
& OFT & 0.51 & 95.67 & 73.46 & 90.38 & 33.07 & 94.09 & 84.90 & 91.60 & 81.80 & 80.45 \\
@@ -349,11 +348,11 @@ DyPAM实验在NVIDIA RTX 4090上使用DeepSpeed和BF16精度进行。DyPAM超参
& IA$^3$ & 0.02 & 92.50 & 72.18 & 84.81 & 35.04 & 86.61 & 80.90 & 86.55 & 78.49 & 76.94 \\
& LN Tuning & 0.00 & 91.67 & 68.69 & 85.32 & \underline{39.76} & 87.40 & 78.00 & 85.71 & 77.01 & 76.65 \\
& FourierFT & 0.37 & 94.50 & 70.05 & 87.34 & 31.50 & 86.81 & 82.70 & 81.09 & 78.28 & 76.28 \\
& SHiRA & 0.79 & 94.83 & \underline{75.36} & 90.13 & 37.01 & 93.90 & \textbf{85.70} & 90.34 & \underline{82.57} & \underline{81.04} \\
& RoSA & 0.36 & 97.83 & 74.07 & 90.38 & 35.43 & \underline{94.49} & 84.80 & \underline{92.02} & 82.48 & 81.29 \\
& SHiRA & 0.79 & 94.83 & \underline{75.36} & 90.13 & 37.01 & 93.90 & \textbf{85.70} & 90.34 & \underline{82.57} & 81.04 \\
& RoSA & 0.36 & 97.83 & 74.07 & 90.38 & 35.43 & \underline{94.49} & 84.80 & \underline{92.02} & 82.48 & \underline{81.29} \\
& \textbf{DyPAM} & 0.61 & \textbf{99.17} & \textbf{76.72} & \textbf{91.90} & \textbf{40.94} & \textbf{95.28} & \underline{85.50} & \textbf{92.86} & \textbf{84.24*} & \textbf{83.20*} \\
\midrule
\multirow{10}{*}{\rotatebox{90}{\textbf{Gemma3-4B}}}
\multirow{10}{*}{\textbf{Gemma3-4B}}
& LoRA & 1.33 & 86.00 & 51.25 & 72.41 & 25.98 & 75.59 & 62.20 & 75.21 & 63.26 & 64.09 \\
& AdaLoRA & 2.62 & 82.67 & 51.86 & 66.33 & 31.50 & 73.82 & 62.30 & 73.95 & 62.49 & 63.20 \\
& OFT & 0.75 & 85.83 & \underline{54.28} & 72.91 & \underline{32.28} & 75.59 & \textbf{63.80} & \underline{76.47} & \underline{65.02} & \underline{65.88} \\
@@ -377,18 +376,17 @@ DyPAM在所有三种骨干模型上均取得了最优的Macro-Avg和Micro-Avg性
表~\ref{tab:ch5_dypam_common}展示了DyPAM在常识推理任务上的性能。
\begin{table}[htp]
\begin{table}[!htbp]
\centering
\caption{DyPAM与基线方法在常识推理任务上的性能比较。*表示统计显著提升。}
\caption[DyPAM与基线方法在常识推理任务上的性能比较]{DyPAM与基线方法在常识推理任务上的性能比较。*表示统计显著提升。}
\label{tab:ch5_dypam_common}
\small
\resizebox{\linewidth}{!}{
\renewcommand{\arraystretch}{0.9}
\begin{tabular}{l|lccccccccccc}
\toprule
\textbf{骨干} & \textbf{方法} & \textbf{参数(\%)} & \textbf{BoolQ} & \textbf{PIQA} & \textbf{SIQA} & \textbf{ARC-C} & \textbf{ARC-E} & \textbf{OBQA} & \textbf{HellaSwag} & \textbf{WinoGrande} & \textbf{Micro-Avg$\uparrow$} & \textbf{Macro-Avg$\uparrow$} \\
\midrule
\multirow{10}{*}{\rotatebox{90}{\textbf{LLaMA3.2-3B}}}
\multirow{10}{*}{\textbf{LLaMA3.2-3B}}
& LoRA & 1.12 & 63.61 & \underline{79.71} & 66.94 & 69.45 & 84.05 & 67.00 & 73.94 & 55.56 & 71.94 & 70.03 \\
& AdaLoRA & 2.22 & 63.52 & 78.94 & 67.09 & 68.94 & \underline{85.14} & 70.20 & 78.11 & 56.35 & 73.95 & 71.04 \\
& OFT & 0.73 & \underline{65.63} & 79.54 & \underline{70.37} & \underline{70.39} & 85.06 & \textbf{71.80} & 83.15 & \textbf{66.38} & \underline{77.52} & \underline{74.04} \\
@@ -396,12 +394,12 @@ DyPAM在所有三种骨干模型上均取得了最优的Macro-Avg和Micro-Avg性
& IA$^3$ & 0.02 & 62.32 & 77.09 & 59.67 & 57.94 & 77.10 & 57.40 & 50.48 & 52.25 & 58.66 & 61.78 \\
& LN Tuning & 0.01 & 62.51 & 76.99 & 59.52 & 59.81 & 76.52 & 59.00 & 52.02 & 52.17 & 59.42 & 62.32 \\
& FourierFT & 0.73 & 62.14 & 79.49 & 61.98 & 61.86 & 80.93 & 62.40 & 73.21 & 49.09 & 69.75 & 66.39 \\
& SHiRA & 1.12 & 65.23 & 79.65 & 69.14 & \textbf{71.16} & 84.97 & 71.20 & \underline{83.18} & 65.67 & 77.35 & 73.78 \\
& SHiRA & 1.12 & 65.23 & 79.65 & 69.14 & \textbf{71.16} & 84.97 & \underline{71.20} & \underline{83.18} & 65.67 & 77.35 & 73.78 \\
& RoSA & 0.54 & 64.53 & 79.65 & 69.86 & 69.28 & 84.43 & 70.80 & 83.12 & 63.54 & 77.00 & 73.15 \\
& \textbf{DyPAM} & 0.92 & \textbf{65.93} & \textbf{79.76} & \textbf{70.88} & \underline{70.39} & \textbf{85.19} & \textbf{71.80} & \textbf{83.71} & 65.35 & \textbf{77.83*} & \textbf{74.13*} \\
\midrule
\multirow{10}{*}{\rotatebox{90}{\textbf{Qwen3-8B}}}
& LoRA & 0.79 & 70.49 & 86.34 & 77.18 & 90.19 & 96.51 & 87.60 & 89.50 & 72.85 & 85.19 & 83.83 \\
\multirow{10}{*}{\textbf{Qwen3-8B}}
& LoRA & 0.79 & 70.49 & 86.34 & \underline{77.18} & 90.19 & 96.51 & 87.60 & 89.50 & 72.85 & 85.19 & 83.83 \\
& AdaLoRA & 1.57 & 70.73 & 86.51 & 76.71 & \underline{90.36} & 96.55 & 87.20 & 88.92 & 72.38 & 84.91 & 83.67 \\
& OFT & 0.51 & 69.97 & 86.83 & 76.56 & 89.93 & \underline{96.97} & 88.00 & 89.17 & 76.48 & 85.20 & 84.24 \\
& Bone & 0.81 & 69.02 & 85.31 & 75.64 & 88.91 & 95.58 & 87.60 & 89.30 & \underline{76.56} & 84.71 & 83.49 \\
@@ -412,7 +410,7 @@ DyPAM在所有三种骨干模型上均取得了最优的Macro-Avg和Micro-Avg性
& RoSA & 0.36 & 68.96 & 86.94 & 75.33 & 89.85 & 96.38 & \underline{88.20} & 89.43 & 76.16 & 84.99 & 83.91 \\
& \textbf{DyPAM} & 0.61 & \textbf{70.89} & \textbf{87.11} & \textbf{77.33} & \textbf{90.53} & \textbf{97.05} & \textbf{88.80} & \underline{89.53} & \textbf{76.80} & \textbf{85.66*} & \textbf{84.75*} \\
\midrule
\multirow{10}{*}{\rotatebox{90}{\textbf{Gemma3-4B}}}
\multirow{10}{*}{\textbf{Gemma3-4B}}
& LoRA & 1.33 & 65.72 & 79.71 & 69.40 & 74.49 & 87.08 & 71.00 & 74.53 & 55.01 & 73.37 & 72.12 \\
& AdaLoRA & 2.62 & \underline{66.09} & 79.49 & 68.73 & 76.54 & 89.02 & 74.00 & 73.20 & 58.09 & 73.30 & 73.14 \\
& OFT & 0.75 & 65.69 & 81.99 & 74.51 & \underline{76.71} & 88.47 & 78.00 & \underline{83.86} & \underline{65.27} & \underline{79.17} & \underline{76.81} \\
@@ -434,11 +432,10 @@ DyPAM在所有三种骨干模型的常识推理任务上均取得统计显著的
表~\ref{tab:ch5_dypam_scale}展示了DyPAM在Qwen3系列不同模型规模上的可扩展性分析。
\begin{table}[htp]
\begin{table}[!htbp]
\centering
\caption{DyPAM与主要基线方法在不同模型规模上的数学推理性能比较Macro-Avg准确率\%)。}
\caption[DyPAM与主要基线方法在不同模型规模上的数学推理性能比较Macro-Avg准确率\%]{DyPAM与主要基线方法在不同模型规模上的数学推理性能比较Macro-Avg准确率\%)。}
\label{tab:ch5_dypam_scale}
\small
\begin{tabular}{lcccc}
\toprule
\textbf{方法} & \textbf{Qwen3-0.6B} & \textbf{Qwen3-1.7B} & \textbf{Qwen3-4B} & \textbf{Qwen3-8B} \\
@@ -462,7 +459,7 @@ DyPAM在Qwen3系列四个规模0.6B至8B上均超越所有基线方法。
\begin{figure}[htp]
\centering
\includegraphics[width=0.9\linewidth]{assets/5_dypam_ablation.pdf}
\caption{DyPAM消融与超参数敏感性分析。a移除各组件后的性能变化b调制强度$\alpha$的影响。}
\caption[DyPAM消融与超参数敏感性分析]{DyPAM消融与超参数敏感性分析。a移除各组件后的性能变化b调制强度$\alpha$的影响。}
\label{fig:ch5_dypam_ablation}
\end{figure}
@@ -480,7 +477,7 @@ DyPAM的消融实验如图~\ref{fig:ch5_dypam_ablation}(a)所示)考察了
\begin{figure}[htp]
\centering
\includegraphics[width=0.9\linewidth]{assets/5_bias_modulation.pdf}
\caption{DyPAM学习到的位置调制模式。a层级偏置在Query维度上的分布展示异构且结构化的偏置变化b层级调制范围显示稳定受控的缩放行为。}
\caption[DyPAM学习到的位置调制模式]{DyPAM学习到的位置调制模式。a层级偏置在Query维度上的分布展示异构且结构化的偏置变化b层级调制范围显示稳定受控的缩放行为。}
\label{fig:ch5_modulation_pattern}
\end{figure}
@@ -497,14 +494,14 @@ DyPAM的消融实验如图~\ref{fig:ch5_dypam_ablation}(a)所示)考察了
\begin{figure}[htp]
\centering
\includegraphics[width=0.9\linewidth]{assets/5_modulation_range.pdf}
\caption{DyPAM学习到的调制因子范围在不同模型和不同任务上的分布。调制因子在所有设置下均围绕1.0保持适度方差但不同架构和不同训练数据呈现出差异化的层间调制分布表明DyPAM以架构依赖和数据依赖的方式适配位置注意力。}
\caption[DyPAM学习到的调制因子范围在不同模型和不同任务上的分布]{DyPAM学习到的调制因子范围在不同模型和不同任务上的分布。调制因子在所有设置下均围绕1.0保持适度方差但不同架构和不同训练数据呈现出差异化的层间调制分布表明DyPAM以架构依赖和数据依赖的方式适配位置注意力。}
\label{fig:ch5_modulation_range}
\end{figure}
\begin{figure}[htp]
\centering
\includegraphics[width=0.9\linewidth]{assets/5_bias_comparison.pdf}
\caption{不同模型在常识推理与数学推理任务上学习到的层级偏置模式对比。同一模型在不同任务上的偏置模式存在系统性差异表明DyPAM的位置调制行为受训练数据特性的影响。}
\caption[不同模型在常识推理与数学推理任务上学习到的层级偏置模式对比]{不同模型在常识推理与数学推理任务上学习到的层级偏置模式对比。同一模型在不同任务上的偏置模式存在系统性差异表明DyPAM的位置调制行为受训练数据特性的影响。}
\label{fig:ch5_bias_comparison}
\end{figure}