
\section{Generalization Experiments}
\label{sec:genexp}

We transformer-based text feature extractors for fake news 
classification generalizability with several experiments. 
We cover the datasets, architectures, and experiments below.


\PP{Datasets.}
We used 9 fake news datasets, consisting of blog articles, 
news headlines, news content, tweets, social media posts, 
and article headlines. 
We have described our dataset below in \cref{tab:datasets}. 

\begin{table}[t]
    \caption{Datasets used for our experiments. If splits were not available, we used a random class-balanced split. For Tweet datasets, sample counts are after rehydration, which removed some samples due to missing tweets.}
    \label{tab:datasets}
    \begin{tabular}{lrrr}
    \hline
    \textbf{Dataset} & \textbf{Training} & \textbf{Testing} & \textbf{Type}  \\ \hline
    k\_title \cite{kagglefn}          & 31k               & 9K               & Article Titles \\
    coaid \cite{coaid}                & 5K                & 1K               & News summary   \\
    c19\_text \cite{cov19fn}          & 2.5K              & 0.5K             & Articles       \\
    cq   \cite{covidcq}               & 12.5K             & 2K               & Tweets         \\
    miscov    \cite{miscov}           & 4K                & 0.6K             & Headlines      \\
    k\_text   \cite{kagglefn}         & 31k               & 9K               & Articles       \\
    rumor  \cite{covrumor}            & 4.5K              & 1K               & Social Posts   \\
    cov\_fn  \cite{covidfn}           & 4K                & 2K               & Tweets         \\
    c19\_title  \cite{cov19fn}        & 2.5K              & 0.5K             & Article Titles \\ \hline
    \end{tabular}
    \end{table}


Where possible, we have used the provided training and 
validation sets; otherwise, we performed a random, 
class-balanced 70-30 split for training and testing. 
For \cite{covidcq} and \cite{covidfn} datasets, we performed tweet 
rehydration, which removed some samples due to missing tweets. 
We show example of label shift due to label overlap in \cref{fig:overlap}.
Here, samples from each dataset are passed through a pre-trained
BERT classifier. 
The BERT embeddings are then reduced to 50 components with PCA
then to 2 components with tSNE.
There are several regions with label overlaps, where samples with positive 
and negative labels occupy similar spaces.

\begin{figure}[t] 
    \centering \includegraphics[width=3.4in]{figs/tfoverlap}
  \caption{\textbf{Overlap of label embeddings}: We show label embeddings for all 9 datasets here. 
  %
  There are several regions where true news (blue) overlap with fake news (red) across different datasets.
  %
  This can make models for one dataset perform worse on unseen, but related text-based fake news datasets.}
  \label{fig:overlap}
  \end{figure}

\PP{Architectures.}
We use BERT and AlBERT architectures for our experiments \cite{bert, albert}. 
Each transformer architecture converts input tokens to a classification feature vector.
We used pretrained architectures as starting points; our selections include
the BERT \cite{bert}, AlBERT \cite{albert}, and COVID-Twitter-BERT \cite{covbert}.


\PP{Experiments}
We performed 3 experiments to evaluate generalizability of covid fake 
news detectors. 
In each case, our starting point is a pre-trained foundation model, described in previous
section.
We then conduct the following experiments:

\squishlist
\item \textbf{Static-Backbone.} We freeze the pre-trained feature extractor backbone, 
and train only the classifier head. This is analogous to using a static foundation 
model.
\item \textbf{Static-Embedding.} We fine-tune the transformer part of the pre-trained 
feature extractor along with the classifier head together with a single optimizer, 
and freeze the embedding module
\item \textbf{Fine-Tuned Backbone.} We fine-tune the entire feature extractor backbone 
along with the classifier head.
\end{list}


\PP{Evaluation.}
We average results across multiple runs of each transformer architecture. 
To show results in limited space, we have provided complete evaluation results
for backbones using Covid-Twitter-BERT.
To test generalizability, we train each model on a single dataset, and evaluate on the 
test-sets of the remaining, unseen datasets as well as its own testing dataset. 
Our results are presented as a confusion matrix. 
All approaches are trained for 5 epochs with an AdamW optimizer, with a 
learning rate of 1e-4, with a batch size of 64.


\subsection{Generalizability Results}
We show generalizability results using the COVID-Twitter backbone in 
for static-backbone training in \cref{fig:sbconf},
static-embedding training in \cref{fig:seconf},
and fine-tuned backbone training in \cref{fig:ftconf}.


\begin{figure}[t] 
    \centering \includegraphics[width=3.4in]{figs/sbconf}
  \caption{\textbf{Confusion Matrix for Static Backbone}}
  \label{fig:sbconf}
  \end{figure}

  \begin{figure}[t] 
    \centering \includegraphics[width=3.4in]{figs/seconf}
  \caption{\textbf{Confusion Matrix for Static-Embedding Backbone}}
  \label{fig:seconf}
  \end{figure}

  \begin{figure}[t] 
    \centering \includegraphics[width=3.4in]{figs/ftconf}
  \caption{\textbf{Confusion Matrix for FIne-Tuned Backbone}}
  \label{fig:ftconf}
  \end{figure}
  
\PP{Static backbone vs Fine-Tuning.}
The confusion matrices show that upon fine-tuning, 
each model increases accuracy on its corresponding test dataset. 
For example, accuracy on `k\_short' increases from 0.90 to 
0.97 between the static backbone and the fine-tuned backbone. 
However, this fine-tuning comes at the cost of generalization in some cases: 
across several datasets, model accuracy on unseen data suffers in 
the fine-tuned backbone experiments. 
For example, a model trained on `cov\_fn' achieves f1 of 0.72  when tested on `c19\_title' in the 
static-backbone experiment in \cref{fig:sbconf}. On the fine-tuned experiment,
the same trained model achieves f1 of 0.57, approximately a 20\% drop. 
SImilarly, a model trained on `miscov' and tested on `c19\_text' achieves f1 of 0.71
with static backbone, versus f1 of 0.43 with fine-tuned backbone.
This indicates once a model is fine-tuned on a specific covid dataset, 
it loses some generalization information compared to the static-backbone version.
However, this is not consistent.
In some cases, generalization accuracy increases: `rumor' performs
better on `cov\_fn' after fine-tuning, with f1 of 0.52 on the static backbone, 
versus an f1 of 0.75 after fine-tuning.
Furthermore, `rumor' achieves f1 of 0.67 when tested on `c19\_title` 
on the static backbone, and f1 of 0.81 on the fine-tuned backbone (conversely, it performs \textit{worse} on 
`coaid`, with f1 dropping from 0.83 to 0.40).

\begin{figure*}[t]
  \centering
  \begin{subfigure}{0.24\textwidth}
      \includegraphics[width=\textwidth]{figs/ometricstatic}
      \caption{Static-Backbone}
      \label{fig:sb}
  \end{subfigure}
  \hfill
  \begin{subfigure}{0.24\textwidth}
      \includegraphics[width=\textwidth]{figs/ometricembedding}
      \caption{Static-Embedding}
      \label{fig:se}
  \end{subfigure}
  \hfill
  \begin{subfigure}{0.24\textwidth}
      \includegraphics[width=\textwidth]{figs/ometricall}
      \caption{Fine-tuned}
      \label{fig:ft}
  \end{subfigure}
  \hfill
  \begin{subfigure}{0.24\textwidth}
      \includegraphics[width=\textwidth]{figs/variance}
      \caption{F1-Score Variance}
      \label{fig:variance}
  \end{subfigure}
          
  \caption{Overlap vs Accuracy for each of our experiment 
  approaches. In \cref{fig:ft}, we have also provided the 
  trendlines from the other experiments for comparison.}
  \label{fig:graphs}
  \end{figure*}


\PP{Static Embedding.}
A middle ground between complete fine-tuning and a fully static foundation 
feature extractor is to freeze the embedding layer and 
fine-tune the transformer layer of the backbone.
Recent work finds freezing the embedding layer during training
can reduce computation costs while achieving 90\% of the accuracy of a 
fully fine-tuned model 
\cite{sefreezing1, sefreezing2, sefreezing3, sefreezing4, seimportant}.
We find similar results, where freezing the embedding layer achieves accuracy
similar to the corresponding fine-tuned model on the testing dataset,
shown in \cref{fig:seconf}
However, on unseen data, accuracy drop has higher variance. 
It is not immediately clear what impact embedding freezing has on unseen
data accuracy.
For this, we must explore the actual overlap between datasets.

\subsection{Data Overlap and Accuracy}
We have seen that there is label overlap between
datasets in \cref{fig:overlap}.
We have also seen accuracy variances on unseen data:
rather than a linear drop across unseen data, some models
perform better and some perform worse after fine-tuning.
These can be explained by directly measuring dataset overlap.

\PP{O-Metric.}
To compute overlap, we use the O-metric to calculate
point-proximity overlap from \cite{ometric}.
The O-metric computes overlap between 2 sets of points in 
n-dimensional space using a distance-metric.
We find overlap as follows: given two datasets A and B, 
we compute the fraction of points in each dataset where
the nearest neighbor is not from the same dataset. 
So, for each point $x\in A$, first we obtain:

$$
O_A(x) = w_A(x) / b_A(x)
$$

where $w_A()$ is the distance to the nearest point to $x$ in A, 
and $b_A()$ is the distance to the nearest point to $x$ in B.
Then we can compute the ratio $p_A=|O_A>1|/|A|$ to find overlap
of B in A. 
$p_A$ is bounded in $[0,1]$; as $p_A$ approaches 1,
this indicates most points in $A$ are closer to a point in 
$B$ than in $A$.
The O-metric is bidirectional in computing overlap
 and includes both $p_A$ and $p_B$:

$O = \frac{p_A + p_B}{2}$

Since we are interested in evaluating generalization, where
we want to see only the overlap of unseen data on training data,
we use a directional O-metric.
That is, we let $O = p_A$ for the final overlap value
 in a context where A is the training dataset
and B is the unseen dataset.  
We compute the overlap value between each dataset pair using
cosine similarity on the embeddings of each data point.
So, for each model, we compute embeddings of every sample across
all 9 datasets, then compute the directional O-metric overlap
of each dataset on the model's training dataset [ALGO???]. 




\PP{Accuracy and Overlap}
We show in \cref{fig:graphs} the comparison of overlap to accuracy across
all 9 datasets on static-backbone, static-embedding, and fine-tuned backbone
experiments.
First, we see that as overlap increases, accuracy also increases
for the fine-tuned backbone in \cref{fig:ft}. 
Second, and perhaps more striking, there is higher variance in
accuracy on the static-embedding versus fine-tuned backbone models.
This fits the observations from \cite{seimportant} that the 
embedding layers capture more domain-specific information than
the deeper layers.
In this cases, because the embedding layers were frozen, they 
never learned the domain-specific fake news information.
Consequently, the static-embedding models' accuracy on unseen data 
sees significant variance, compared to the fine-tuned backbone 
and static-backbone models, shown in \cref{fig:variance}.



\PP{Generalization and Overlap.}
Clearly, higher overlap between evaluation data and training data 
is indicative of accuracy. 
During testing, however, it may be difficult to calculate this 
overlap on data for each sample.
Further, evaluation data changes continuously, so the overlap may 
itself change due to concept drift.
Recent research has shown the importance of exploring a model's 
feature space to identify embedding clusters \cite{foundation2, niceness}. 
These embedding clusters signify regions of the data space a 
model has captured. 
Metrics such as probabilistic Lipschitzness show that accuracy on 
embedding clusters 
can be bounded using the smoothness, or gradient, in the embedding space 
\cite{niceness}. 
Further, LIGER \cite{foundation2} shows that nondeterministic label regions,
i.e. where labels overlap, indicate non-smoothness.
We extend these findings to present KMeans-Proxy - a plug-and-play pytorch layer. 


\subsection{KMeans-Proxy}
\label{sec:kmeans}
Intuitively, if we can store the coverage of a model's embedding space, 
then for any sample point, we can check if it falls inside the coverage. 
Further, we can also check if a model's prediction on the sample matches 
the prediction for the coverage. 
We can pair this with a coverage radius, e.g. by computing $r$ that constitutes
coverage of all points in a cluster that are 1 standard deviation away from the
cluster center with respect to a distance metric, such as the l2 norm.
Then, if the predictions do not match or a point falls outside the single standard deviation
coverage radius, this is a strong abstention/reject signal.


\PP{Implementation.} 
We can capture the coverage of the embedding space by 
using embedding proxies. 
Proxies are common in cluster and proxy NCA losses \cite{proxy1, proxy2}. 
We adapt them as the KMeans cluster centroids by acting as proxies for
the cluster centers.
This allows our approach to extend to online or continuous learning
domains as well.
The findings in \cite{foundation2} suggest increased partitioning of the embedding space 
can yield better local region coverage. 
So, KMeans-Proxy is initialized with 2 parameters: 
the number of classes $c$, and a proxy factor $k$. 
Then, we then obtain $k\cdot c$ centers, with $k$ proxies for each class, 
so that each cluster is a smaller, more representative local region.

\begin{lstlisting}
self.proxy = KMeansProxy(proxy_factor = 4, classes = 3, dimensions = 768)
\end{lstlisting}

During model training, KMeans-Proxy performs minibatch online KMeans clustering
 to obtain the embedding space proxies for cluster centers. Online clustering converges
 asymptotically, per \cite{kmeans}.
 
 \begin{lstlisting}
def forward(x):	# Proxy forward function
    if self.training:
        self.update_proxies(x)
        return x, None, None
    return x, self.nearest_proxy(x), self.nearest_proxy_label(x)  
\end{lstlisting}

During prediction, a model using KMeans-Proxy can predection,
as well as nearest proxy label and nearest proxy. 
A meta abstention policy can review for label flipping, or coverage radius.

\begin{lstlisting}
def forward(x):	 # Model forward function
    x = self.feature_extractor(x)
    x, proxy, proxy_label  = self.proxy(x)
    label = self.classifier(x)
    return label, proxy, proxy_label
\end{lstlisting}

\begin{table}[t]
    \caption{Generalization improvement with KMP for model trained on `coaid'.}
    \label{tab:coaid}
    \begin{tabular}{|lrrrr|}
    \hline
    \multicolumn{5}{|c|}{\textbf{Trained on `coaid'}}                                                                                   \\ \hline
    \multicolumn{1}{|c|}{\multirow{2}{*}{\textbf{Testing Dataset}}} & \multicolumn{4}{c|}{\textbf{Approach}}                          \\ \cline{2-5} 
    \multicolumn{1}{|c|}{}                                          & SB            & SE            & FT            & \textbf{FT+KMP} \\ \hline
    \multicolumn{1}{|l|}{cov\_fn}                                   & \textbf{0.57} & 0.44          & 0.51          & {\ul 0.53}      \\
    \multicolumn{1}{|l|}{k\_short}                                  & 0.49          & {\ul 0.57}    & 0.56          & \textbf{0.57}   \\
    \multicolumn{1}{|l|}{coaid}                                     & 0.85          & 0.95          & {\ul 0.97}    & \textbf{0.98}   \\
    \multicolumn{1}{|l|}{cq}                                        & 0.42          & \textbf{0.59} & 0.55          & {\ul 0.57}      \\
    \multicolumn{1}{|l|}{k\_long}                                   & 0.47          & 0.51          & \textbf{0.58} & {\ul 0.55}      \\
    \multicolumn{1}{|l|}{rumor}                                     & 0.34          & 0.31          & {\ul 0.55}    & \textbf{0.68}   \\
    \multicolumn{1}{|l|}{c19\_text}                                 & 0.43          & 0.64          & {\ul 0.79}    & \textbf{0.94}   \\
    \multicolumn{1}{|l|}{miscov}                                    & {\ul 0.54}    & 0.45          & 0.47          & \textbf{0.57}   \\
    \multicolumn{1}{|l|}{c19\_title}                                & 0.49          & 0.75          & {\ul 0.77}    & \textbf{0.90}   \\ \hline
    \end{tabular}
    \end{table}


\begin{table}[]
    \caption{Generalization improvement with KMP for model trained on `rumor'}
    \label{tab:rumor}
    \begin{tabular}{|lrrrr|}
    \hline
    \multicolumn{5}{|c|}{\textbf{Trained on `rumor'}}                                                                                   \\ \hline
    \multicolumn{1}{|c|}{\multirow{2}{*}{\textbf{Testing Dataset}}} & \multicolumn{4}{c|}{\textbf{Approach}}                          \\ \cline{2-5} 
    \multicolumn{1}{|c|}{}                                          & SB            & SE            & FT            & \textbf{FT+KMP} \\ \hline
    \multicolumn{1}{|l|}{cov\_fn}                                   & {\ul 0.76}    & 0.48          & 0.75          & \textbf{0.77}   \\
    \multicolumn{1}{|l|}{k\_short}                                  & 0.49          & {\ul 0.52}    & 0.52          & \textbf{0.54}   \\
    \multicolumn{1}{|l|}{coaid}                                     & 0.17          & 0.17          & {\ul 0.40}    & \textbf{0.76}      \\
    \multicolumn{1}{|l|}{cq}                                        & 0.47          & \textbf{0.59} & 0.42          & {\ul 0.58}      \\
    \multicolumn{1}{|l|}{k\_long}                                   & \textbf{0.59} & 0.52          & 0.43          & {\ul 0.53}      \\
    \multicolumn{1}{|l|}{rumor}                                     & 0.70          & 0.66          & {\ul 0.83}    & \textbf{0.86}   \\
    \multicolumn{1}{|l|}{c19\_text}                                 & 0.17          & 0.57          & {\ul 0.58}    & \textbf{0.73}   \\
    \multicolumn{1}{|l|}{miscov}                                    & 0.52          & 0.45          & {\ul 0.54}    & \textbf{0.54}      \\
    \multicolumn{1}{|l|}{c19\_title}                                & 0.74          & 0.57          & \textbf{0.81} & {\ul 0.76}      \\ \hline
    \end{tabular}
    \end{table}

\subsection{KMeans-Proxy Results}
We now show results from using KMeans-Proxy as a reject option 
in \cref{tab:coaid} and \cref{tab:rumor}. 
With rejection, we can increase generalization 
accuracy on unseen data. 
This is a faster approach than domain adaptation, since proxies are updated 
during training. 
Further, it is a plug-and-play solution, allowing for faster iteration on 
overall model design.

With KMeans-Proxy, we are able to improve generalization performance across the board.
Here, we compare models trained on `coaid' and `rumor' in 
\cref{tab:coaid} and \cref{tab:rumor}, respectively. 
Models are compared across static backbone (SB), static embedding 
(SE), fine-tuned (FT), and fine-tuned with KMeans-Proxy (FT+KMP). 




For models trained on `coaid' (in \cref{tab:coaid}) and tested on all datasets, 
incorporating KMeans-Proxy improves generalization performance. 
In each case, FT+KMP is either the best or the runner-up model 
by at most 0.05 f1 f1 points. 
We see similar result for models trained on `rumor' in \cref{tab:rumor},
where KMeans-Proxy is either the best model or runner up for every
testing dataset. 


\PP{Choice of Proxy Factor}
Increasing the proxy factor leads to better generalization performance. 
\cref{tab:proxy} shows performance of a model trained on `c19\_text` 
that has poor generalization without KMeans-Proxy (see \cref{fig:ftconf}). 
As we increase the proxy factor, we gain better generalization 
across testing datasets. 
We test with different proxy factors and compare generalization performance 
of each model. 
We find that increasing the proxy factor leads to small, but measurable 
increase in accuracy. 

\begin{table}[]
    \caption{Impact of changing proxy factor: increasing the proxy factor increases accuracy, since more proxies allow tighter bounds on local coverage estimates.}
    \label{tab:proxy}
    \begin{tabular}{|l|rrrrrr|}
    \hline
    \multicolumn{1}{|c|}{\multirow{2}{*}{\textbf{Testing Dataset}}} & \multicolumn{6}{c|}{\textbf{Trained on c19\_text}}                                      \\ \cline{2-7} 
    \multicolumn{1}{|c|}{}                                          & \textbf{FT} & \textbf{k=1} & \textbf{k=2} & \textbf{k=3} & \textbf{k=5} & \textbf{k=10} \\ \hline
    cov\_fn                                                         & 0.44        & 0.50         & 0.54         & 0.58         & 0.58         & \textbf{0.58} \\
    k\_short                                                        & 0.59        & 0.70         & 0.73         & 0.73         & 0.73         & \textbf{0.75} \\
    coaid                                                           & 0.76        & 0.88         & 0.84         & 0.89         & 0.89         & \textbf{0.90} \\
    cq                                                              & 0.51        & 0.56         & 0.58         & 0.58         & 0.60         & \textbf{0.63} \\
    k\_long                                                         & 0.60        & 0.70         & 0.72         & 0.73         & 0.73         & \textbf{0.73} \\
    rumor                                                           & 0.47        & 0.45         & 0.51         & 0.58         & 0.58         & \textbf{0.67} \\
    c19\_text                                                       & 0.97        & 0.98         & 0.99         & 0.99         & 0.99         & \textbf{0.99} \\
    miscov                                                          & 0.48        & 0.45         & 0.44         & 0.53         & 0.58         & \textbf{0.58} \\
    c19\_title                                                      & 0.58        & 0.61         & 0.64         & 0.69         & 0.68         & \textbf{0.73} \\ \hline
    \end{tabular}
    \end{table}


\subsection{Discussion}
There are several observations we can make from our
generalization studies and KMeans-Proxy experiments.
\PP{Generalization}
For fake news detection, fine-tuned models must be
used carefully to take advntage of learned parameters.
As we showed in the confusion matrices, fine-tuning 
improves performance only on subsets of unseen data.
These subsets are regions of the data space where
the unseen data overlaps with training data.
On completely new regions of the data space, fine-tuned 
models make mistakes.
These mistakes are because of label overlap.

We must make a distinction between label and data
overlap.
Data overlap means a model has coverage on the unseen
data, and can make predictions with higher confidence.
Label coverage, as we showed in Fig, indicates where 
different labels occur close to each other in the 
embedding space.
Both can coincide: unseen data points can have both
data \textit{and} label overlap.
For these points, fine-tuned models that have
better captured a local region with training data 
are better poised to provide high-confidence labels.

\PP{KMeans-Proxy}
KMeans-Proxy allows us to identify these regions.
With KMeans-Proxy, we partition the data space into 
clusters representing model coverage and labels.
Our inclusion of the proxy factor $k$, where we create $k$
clusters for each class label, allows fine-grained partitioning
of the embedding space.
This means we can better capture local characteristics 
of the embedding space \cite{foundation2}.
In our experiments, we focus on 2 such characteristics:
(i) whether the label for an unseen point matches
the label for nearest proxy, and
(ii) whether this unseen point is within one 
standard-deviation radius of the proxy.
In our experiments, we show that using these provides
improvements in generalizing to unseen data points.

Clearly, there is significant progress to be made in
capturing local characteristics.
For example, when using an ensemble of fine-tuned models,
local smoothness \cite{niceness, foundation2} can be computed for each 
non-abstaining model to rank them on coverage.
There may also be advantages in using dynamic proxy allocation.
If prior class balance is known, then we could use a class-specific
proxy factor.


\section{Conclusion}
\label{sec:conclusion}
In this paper, we have presented generalizability
experiments and KMeans-Proxy.
We perform generalization studies across 9 fake
news datasets using several transformer-based
fake news detector models.
Our generalizability experiments show that fine-tuned
models generalize well to unseen data when 
there is overlap between unseen and training data.
On unseen data that does not overlap, fine-tuned 
models make mistakes due to poor coverage, label
flipping, and concept drift.


Using our observations and recent research into 
local embedding regions, we develop and present
KMeans-Proxy, a simple online KMeans clusterer
paired with a proxy factor.
With KMeans-Proxy, we partition the embedding space into
local regions and use local characteristics to create a
reject option for models.
We show that KMeans-Proxy improves generalization accuracy
for fine-tuned models across all 9 fake news datasets.
We welcome future research in this area to better
explore the generalizability and fine-tuning tradeoff.

\section{Introduction}
\label{sec:intro}
The rapid spread of the Covid-19 virus has led
to a parallel surge in misinformation and disinformation \cite{misinfo}
This surge of false information, coined an `infodemic' by the 
CDC \cite{infodemic} can be life-threatening, 
destabilizing, and potentially dangerous 
\cite{infolife}. 
The infodemic is multimodal, meaning associated fake news 
can take forms of social media posts, tweets, 
articles, blogs, commentary, misrepresented titles and headlines, 
videos, and audio content.

\PP{Current Research.} 
There is significant progress on developing domain-specific 
automated misinformation detection and classification tools 
\cite{coaid, misinfo1, colies, fndetect, cosocial, generalization}. 
Such tools analyze labeled datasets in aforementioned modalities
to classify fake news. 
Recent approaches focus on transformer-based classifiers and language 
modelers \cite{generalization, fndetect}.

Such fake news detectors are specific to the datasets 
they are trained with \cite{colies, generalization}.
More recently, there is a focus on addressing generalizability 
concerns in these models 
\cite{generalization, generalization2, mcnnet, explainmisinfo, covidfn, fnft}. 
For example, \cite{generalization} explores the impact of generalization 
of 15 transformer models on 5 fake news datasets.
The results show there is a generalizability gap in 
fake news detection: a fine-tuned model trained on 
one fake news dataset performs poorly on other 
unseen, but related, fake news datasets.

\PP{Generalization Study.}
In this paper, we study the generalizability and fine-tuning tradeoff 
and present our findings for furthering the research interest. 
We study several fake news detection architectures across
9 fake news text datasets of different modalities.
We find that fine-tuned models often have reduced accuracy 
on any unseen dataset.
However, when paired with a reject option to abstain from 
low-confidence predictions, fine-tuned models perform significantly better. 
These abstention results can then be labeled with 
active learning, crowdsourcing, weak label integration, 
or a variety of other methods present in literature. 

\PP{KMeans-Proxy}
Through observations on our generalizability results, we present a 
simple `reject option' \cite{reject1, reject2, reject3} for fake news
detectors, called KMeans-Proxy. 
KMeans-Proxy is based on KMeans clustering, and is inspired
by research into proxy losses \cite{proxy1, proxy2} and foundation models 
\cite{foundation1, foundation2, foundation3}.
It is written as a PyTorch layer and requires only a 
few lines of code to implement for most feature extractors. 
We show in our results that KMeans-Proxy improves 
generalization on fake news datasets by 0.1 to 0.2 
f1 points across several experiments.

\PP{Contributions} 
In summary, our contributions are:

\squishlist
\item	Extensive set of experiments across 9 fake news datasets on the generalizability/fine-tuning trade off.

\item KMeans-Proxy, a simple reject-option for feature extractors. KMeans-Proxy 
uses cluster proxies from ProxyNCA to estimate embedding cluster centers 
of the training data. 
During prediction, KMeans-Proxy provides a reject option based on 
label difference between sample prediction and nearest 
training data cluster center.
\end{list}

Our code for running experiments and for KMeans-Proxy are provided\footnote{\url{https://github.com/asuprem/GLAMOR/blob/colabel-multicb/src/ednaml/utils/blocks/KMeansProxy.py}}.


\section{Related Work}
\label{sec:related}



\subsection{Generalizability and Fine-Tuning}
\label{sec:generalizability}
Since 2002, there are increasing numbers of Covid-19 
fake news datasets and associated models for these datasets \cite{coaid, cosocial}.
Recently, there is increasing interest in gauging 
the effectiveness of each of these fine-tuned models 
on related, but unseen datasets \cite{generalization}. 
The authors of \cite{generalization} conduct a generalization study 
over 15 model architectures over 5 datasets, and find 
that fine-tuning offers little advantage in 
classification accuracy. 
There is also an abundance of research in unsupervised 
domain adaptation to recover accuracy under changing domains 
or concept drift \cite{odin, drift1, drift2, drift3}.

\subsection{Concept Drift}
Concept drift occurs when testing or prediction data 
exhibits distribution shift \cite{drift1}, either in the data domain, 
or in the label domain \cite{drift3}. 
Data domain shift can include introduction of new 
vocabularies, disappearance of existing words, 
and word polysemy \cite{litmus1}.
Label domain shift occurs when the label space 
itself changes for the same type of data \cite{drift2, ebka}.
For example, when new types of misinformation are detected, 
then the boundary between misinformation and true 
information must be adjusted \cite{ebka}. 
We show label shift in \cref{fig:overlap}, where subsets of true and 
fake news occupy the same embedding space across datasets 
due to fine-grained differences.

\subsection{Reject Options}
One drawback of classification models is that 
they provide a prediction for every data point \cite{reject1}, 
regardless of confidence. 
Reject options perform external or internal 
diagnosing.
This can help detect either low confidence due to 
low coverage or divergence from training data distributions 
due to concept drift. 
Several approaches are covered in a recent survey \cite{reject1}. 
We present a reject option that uses recent 
findings in \cite{foundation2} and \cite{niceness} on the topology 
of the embedding space:
(i) find that local smoothness of the 
label space is indicative of local accuracy and coverage \cite{niceness}, and 
(ii) local label shift, where 
nearby samples have different labels, is a good predictor 
of local smoothness \cite{foundation2}. 
Our reject option, described in \cref{sec:kmeans} is a clustering approach
that calculates cluster centers in the feature extractor embedding space
for the training data.
Then, during prediction, a model can provide a prediction as well 
the label for the nearest training data cluster center. 
Flipped, or different, labels can indicate reduced local smoothness, 
confidence, and coverage, leading to a reject decision.

\subsection{Motivation}
It is well known that fine-tuned models suffer performance 
degradation over time due to data domain shift \cite{ebka, argo, gft}. 
Usually, this performance degradation is detected, and a new 
model is trained on new labeled data. 
Recently, the velocity and size of new data makes obtaining 
labeled data quickly and at scale, very expensive \cite{mdaws}. 
Updating models during data domain shift requires relying 
on weak labels, authoritative sources, and hierarchical 
models \cite{mdaws, snorkel, eews}. 
In such cases, a team of prediction models is pruned and updated 
with new training data \cite{ebka}. 
However, we still need predictions in the period when data domain 
shift is occurring, and new models have not been trained.
Our work, as well as recent research in generalizability \cite{generalization}, 
weak labeling \cite{snorkel}, foundation models \cite{foundation2}, and rapid fake 
news detection \cite{mdaws} falls in this period. 
Our generalizability experiments in \cref{sec:genexp} show that fine-tuned 
models, while having lower performance on unseen data, 
do have better accuracy on some subsets. 
Our KMeans-Proxy solution finds these subsets where fine-tuned 
models have higher accuracy. 