diff --git a/data/ifd_density_dist.png b/data/ifd_density_dist.png new file mode 100644 index 0000000..e1a0118 Binary files /dev/null and b/data/ifd_density_dist.png differ diff --git a/data/length_vs_loss_ifd.png b/data/length_vs_loss_ifd.png new file mode 100644 index 0000000..2646dc7 Binary files /dev/null and b/data/length_vs_loss_ifd.png differ diff --git a/main.tex b/main.tex index 62e0120..6566c22 100644 --- a/main.tex +++ b/main.tex @@ -157,11 +157,20 @@ Figure~\ref{fig:ifd} shows the distribution. \begin{figure}[H] \centering \includegraphics[width=0.80\linewidth]{data/ifd_compare_clean.png} -\caption{IFD comparison: base model vs.\ trained checkpoint. The +\caption{IFD scatter: base model vs.\ trained checkpoint. The diagonal line marks $\mathrm{IFD}_{\text{base}} = \mathrm{IFD}_{\text{ckpt}}$.} \label{fig:ifd} \end{figure} +\begin{figure}[H] +\centering +\includegraphics[width=0.80\linewidth]{data/ifd_density_dist.png} +\caption{IFD density distribution: base model and SFT checkpoint.} +\label{fig:ifd_density} +\end{figure} + +Figure~\ref{fig:ifd_density} shows the corresponding density +estimates, confirming the systematic leftward shift after SFT. The pretrained base model (15B tokens) has mean IFD $0.9625$; $29.8\%$ of samples exceed $1.0$. After 1K SFT steps, mean IFD drops to $0.7539$, with only $0.4\%$ of samples above $1.0$. The average @@ -177,6 +186,7 @@ modeling. Detailed analysis is provided in Appendix~\ref{app:ifd}. The model is a 24-layer decoder-only Transformer with Grouped Query Attention (GQA)~\cite{ainslie2023gqa} and SwiGLU feed-forward blocks~\cite{shazeer2020glu}, with Rotary Position Embedding (RoPE)~\cite{su2024roformer}. +Table~\ref{tab:model_config} summarizes the configuration. \begin{table}[H] \centering @@ -466,6 +476,39 @@ a residual signal persists: instructions that require complex reasoning tend to remain non-trivially harder than simple rewrite or extraction tasks even after SFT. +\subsection{A Note on IFD Bias from Response Length} +\label{sec:ifd_bias} + +Both $L_{\text{cond}}$ and $L_{\text{uncond}}$ are reported as per-token +average losses. For a response of length $T$, the unconditional loss is +$L_{\text{uncond}} = \frac{1}{T} \sum_{t=1}^T \log P(x_t)$. +Since the variance of this average scales as $1/T$, shorter responses +exhibit much larger fluctuations in $L_{\text{uncond}}$---a mathematical +necessity, not a signal of instruction difficulty. Consequently, IFD, +being a ratio of two such averages, inherits a systematic length bias: +short responses inflate IFD variance. + +Figure~\ref{fig:length_bias} illustrates this artifact. Responses +with $<20$ tokens (e.g., ``Paris,'' ``42'') show wildly scattered +$L_{\text{uncond}}$ values, producing spurious high or low IFD scores. +Longer responses ($>50$ tokens) converge toward the model's intrinsic +mean loss, yielding stable IFD estimates. + +\begin{figure}[H] +\centering +\includegraphics[width=0.75\linewidth]{data/length_vs_loss_ifd.png} +\caption{Response length vs.\ unconditional loss and IFD. Short +responses produce high-variance $L_{\text{uncond}}$ estimates, +inflating IFD noise.} +\label{fig:length_bias} +\end{figure} + +This bias is well-known in the IFD literature but often omitted. +For practitioners, a simple mitigation is to filter samples with +$<20$ response tokens before computing IFD. In our Alpaca-style +dataset, this removes approximately $5$--$8\%$ of samples and +substantially reduces false positives in the high-IFD tail. + % ====================================================================== \begin{thebibliography}{99}