abstract: Recently there has been a lot of work on pruning filters from deep convolutional neural networks (CNNs) with the intention of reducing computations. The key idea is to rank the filters based on a certain criterion (say, $l_1$-norm, average percentage of zeros, etc) and retain only the top ranked filters. Once the low scoring filters are pruned away the remainder of the network is fine tuned and is shown to give performance comparable to the original unpruned network. In this work, we report experiments which suggest that the comparable performance of the pruned network is not due to the specific criterion chosen but due to the inherent plasticity of deep neural networks which allows them to recover from the loss of pruned filters once the rest of the filters are fine-tuned. Specifically, we show counter-intuitive results wherein by randomly pruning 25-50% filters from deep CNNs we are able to obtain the same performance as obtained by using state of the art pruning methods. We empirically validate our claims by doing an exhaustive evaluation with VGG-16 and ResNet-50. Further, we also evaluate a real world scenario where a CNN trained on all 1000 ImageNet classes needs to be tested on only a small set of classes at test time (say, only animals). We create a new benchmark dataset from ImageNet to evaluate such class specific pruning and show that even here a random pruning strategy gives close to state of the art performance. Lastly, unlike existing approaches which mainly focus on the task of image classification, in this work we also report results on object detection. We show that using a simple random pruning strategy we can achieve significant speed up in object detection (74$\%$ improvement in fps) while retaining the same accuracy as that of the original Faster RCNN model.
author: Deepak Mittal[^1] Shweta Bhardwaj Mitesh M. Khapra Balaraman Ravindran
Department of Computer Science and Engineering
Robert Bosch Centre for Data Science and AI (RBC-DSAI)
Indian Institute of Technology Madras, Chennai, India
`{deepak, cs16s003, miteshk, email@example.com`
bibliography: egbib.bib
title: *Recovering from Random Pruning:* On the Plasticity of Deep Convolutional Neural Networks

# Introduction

Over the past few years, deep convolutional neural networks (CNNs) have been very successful in a wide range of computer vision tasks such as image classification , object detection and image segmentation . In general, with each passing year, these networks are becoming deeper and deeper with a corresponding increase in the performance . However, this increase in performance is accompanied by an increase in the number of parameters and computations. This makes it difficult to port these models on embedded and mobile devices where storage, computation and power are limited. In such cases, it is crucial to have small, computationally efficient models which can achieve performance at par or close to large networks. This practical requirement has led to an increasing interest in model compression where the aim is to either (i) design efficient small networks or (ii) efficiently prune weights from existing deep networks or (iii) efficiently prune filters from deep convolutional networks or (iv) replace expensive floating point weights by binary or quantized weights or (v) guide the training of a smaller network using a larger (teacher) network .

In this work, we focus on pruning filters from deep convolutional neural networks. The filters in the convolution layers typically account for fewer parameters than the fully connected layers (the ratio is 10:90 for VGG-16 ), but they account for most of the floating point operations done by the model (99% for VGG-16 ). Hence reducing the number of filters effectively reduces the computation (and thus power) requirements of the model. All existing works on filter pruning follow a very similar recipe. The filters are first ranked based on a specific criterion such as, $l_1$-norm or percentage of zeros in the filter . The scoring criterion essentially determines the importance of the filter for the end task, typically image classification . Only the top-m ranked filters are retained and the resulting pruned network is then fine tuned. It is observed that when pruning up to 50% of the filters using different proposed criteria, the pruned network almost recovers the original performance after fine-tuning. The claim is that this recovery is due to soundness of the criterion chosen for pruning. However, in this work we argue that this recovery is not due the specific pruning criterion but due to the inherent plasticity of deep CNNs. Specifically, we show that even if we prune filters randomly we can match the performance of state-of-the-art pruning methods.

To effectively prove our point, it is crucial that we look at factors/measures other than the final performance of the pruned model. To do so we draw an analogy with the human brain and observe that the process of pruning filters from a deep CNN is akin to causing damage to certain portions of the brain. It is known that the human brain has a high plasticity and over time can recover from such damages with appropriate treatment . In our case, the process of fine-tuning would be akin to such post-damage (post-pruning) treatment. If the injury damages only redundant or unimportant portions of the brain then the recovery should be complete quickly and with minimal treatment. Similarly, we could argue that if the pruning criteria is indeed good and prunes away only unimportant filters then (i) the performance of the model should not drop much (ii) the model should be able to regain its full performance after fine-tuning (iii) this recovery should be fast (i.e., with fewer iterations of fine tuning) and (iv) the quantum of data used for fine-tuning should be less. None of the existing works on filter pruning do a thorough comparison w.r.t. these factors. We not only consider these factors but also present counter-intuitive results which show that a random pruning criteria is comparable to state of the art pruning methods on all these factors. Note that we are not claiming that we can always recover the full performance of the unpruned network. For example, it should be obvious that in the degenerate case if 90% of the filters are pruned then it would be almost impossible to recover. The claim being made is that, at different pruning levels (25%, 50%, 75%) a random pruning strategy is not much worse than of state of the art pruning strategies.

To further prove our point, we wanted to check if such recovery from pruning is task agnostic. In other words, in addition to showing that a network trained for image classification (*task1*) can be pruned efficiently, we also show that same can be done with a network trained for object detection (*task2*). Here again, we show that a random pruning strategy works at par with state of the art pruning methods. Stretching this idea further and continuing the above analogy, we note that once the brain recovers from such damages, it is desirable that in addition to recovering its performance on the tasks that it was good at before the injury, it should also be able to do well on newer tasks. In our case, the corresponding situation would be to take a network pruned and fine-tuned for image classification (*old task*) and plug it into a model for object detection (*new task*). Specifically, we show that when we plug a randomly pruned and fine tuned VGG-16 network into a Faster RCNN model we can get the same performance on object detection as obtained by plugging (i) the original unpruned network or (ii) a network pruned using a state of the art pruning method. This once again hints at the inherent plasticity of deep CNNs which allows them to recover (up to a certain level) irrespective of the pruning strategy.

Finally, we consider the case of class specific pruning which has not been studied in the literature. We note that in many real world scenarios, it is possible that while we have trained an image classification network on a large dataset containing many classes, at test time we may be interested in only a few classes. A case in point, is the task of object detection using the Pascal VOC dataset . RCNN and its variants use as a sub-component an image classification model trained on all the 1000 ImageNet classes. We hypothesize that this is an overkill and instead create a class specific benchmark dataset from ImageNet which contains only those 52 classes which correspond to the 20 classes in Pascal VOC. Ideally, one would expect that a network trained, pruned and fine-tuned only for these 52 classes when plugged into faster RCNN should do better than a network trained, pruned and fine-tuned on a random set of 52 classes (which are very different from the classes in Pascal VOC). However, we observe that irrespective of which of these networks is plugged into Faster RCNN the final performance after fine-tuning is the same, once again showing the ability to recover from unfavorable situations.

To the best of our knowledge, this is a first of its kind work on pruning filters which:

1.  Proposes that while assessing the performance of a pruning method, we should consider factors such as amount of damage (drop in performance before fine-tuning), amount of recovery (performance after fine-tuning), speed of recovery and quantum of data required for recovery.

2.  Performs extensive evaluation using two image classification networks (VGG-16 and ResNet) and shows that a random pruning strategy gives comparable performance to that of state of the art pruning strategies w.r.t. all the above factors.

3.  Shows that such behavior is task agnostic and a random pruning strategy works well even for the task of object detection. Specifically, we show that by randomly pruning filters from an object detection model we can get a 74$\%$ improvement in fps while maintaining almost the same accuracy (1% drop) as the original unpruned network

4.  Shows that pruned networks can adapt with ease to newer tasks

5.  Proposes a new benchmark for evaluating class specific pruning

# Related Work

In this section, we review existing work on making deep convolutional neural networks efficient w.r.t. their memory and computation requirements while not compromising much on the accuracy. These approaches can be broadly classified into the following categories (i) pruning unimportant weights (ii) low rank factorization (iii) knowledge distillation (iv) designing compact networks from scratch or (v) using binary or quantized weights and (vi) pruning unimportant filters. Below, we first quickly review the related work for the first five categories listed above and then discuss approaches on pruning filters which is the main focus of our work.

Optimal brain damage and optimal brain surgery are two examples of approaches which prune the unimportant weights in the network. A weight is considered unimportant if the output is not very sensitive to this weight. They show that pruning such weights leads to minimal drop in the overall performance of the network. However, these methods are computationally expensive as they require the computation of the Hessian (second order derivative). Another approach is to use low rank factorization of the weight tensor/matrices to reduce the computations . For example, instead of directly multiplying a high dimensional weight tensor $W$ with the input tensor $I$, we could first compute a low rank approximation of $W = U\Sigma V$ where the dimensions of $U$, $\Sigma$ and $V$ are much smaller than the dimensions of $W$. This essentially boils down to decomposing the larger matrix multiplication operation into smaller operations. Also, the low rank approximation ensures that only the important information in the weight matrix is retained. Alternately, researchers have also explored designing compact networks from scratch which have fewer number of layers and/or parameters and/or computations . There are also some approaches which quantize or binarize the weights of a network to reduce both memory footprint and computation time. Another line of work focuses on transferring the knowledge from bigger trained network (or ensemble of networks) to smaller (thin) network .

The main focus of our work is on pruning filters from deep CNNs with the intention of reducing computations. As mentioned earlier, while the convolution filters do not account for a large number of parameters, they account for almost all the computations that happen in the network. Here, the idea is to rank the filters using a scoring function and then retain only the top scoring functions. For example, in , the authors have used the $l_1$-norm of the filters to rank their importance. The argument is that filters having a lower l1-norm will produce smaller activation values which will contribute minimally to the output of that layer. Alternately, in authors have proposed entropy as a measure to calculate the importance of a filter. If a filter as high entropy than the filter is more informative and hence more important. On the other hand, calculate the average percentage of zeros in the corresponding activation maps of filters and hypothesize that filters having more average percentage of zeros in their activation are less important. In authors have used Taylor series expansion that approximates the change in cost function caused by pruning filters. Unlike , this method uses information from first derivative only. Another work on pruning filters proposes that instead of pruning filters based on current layer's statistics they should be pruned based on next layer's statistics. Essentially the idea of is to look at the activation map of layer $i+1$ and prune out the channel which will give you the minimum change in output on its removal and its corresponding filter in layer $i$. In authors proposed a similar idea to but instead of removing the filters one by one they have proposed to use LASSO regression. Lastly, in authors has used particle filtering to prune out the filters.

# Methodology

In this section, we first formally define the problem of pruning filter and give a generic algorithm for pruning filters using any appropriate scoring function. We then discuss existing scoring functions along with some new variants that we propose.

## Problem Statement

Suppose there are $K$ convolutional layers in a CNN and suppose the layer $k$ contains $n_k$ filters. We use $F_{ki}$ to denote the $i$-th filter in the $k$-th layer. Each such filter is a three dimensional tensor, $F_{ki} \in \mathbb{R}^{i_k \times w_{ki} \times h_{ki}}$ where $i_k$ is the number of input channels for layer $k$ and $w_{ki}, h_{ki}$ are the width and height of the $i$-th filter in the $k$-th layer. Our goal is to rank all the filters in layer $k$, $\{F_{ki}, F_{ki}, ..., F_{ki}\}$ and then retain the top-$m_k$ filters where $m_k (< n_k)$ is a hyperparameter which indicates the desired pruning. For example, based on available computation resources, if we want to reduce the number of computations in this layer by half then we can set $m_k = \frac{n_k}{2})$. Let the original output of layer $k$ be denoted by $O^k \in \mathbb{R}^{n_k \times w^{o}_{k} \times h^{o}_{k}}$ where $w^{o}_{k}, h^{o}_{k}$ are the width and height and $n_k$ is the number of channels which is the same as the number of filters. After pruning and retaining only top-$m_k$ filters the size of the output will be reduced to $m_k \times w^{o}_{k} \times h^{o}_{k}$. Thus, pruning filters not only reduces the number of computations in this layer but also reduces the size of the input to the next layer (which is the same as the output of this layer). The same process of pruning can then be repeated across all layers of the CNN. The main task here is to find the right scoring function for ranking the filters.

## A Generic Algorithm for Pruning

Algorithm summarizes the generic recipe used by different approaches for pruning filters. As shown in the algo, pruning typically starts from the outermost layer. Once the low scoring filters from this layer are pruned, the network is then fine-tuned and the same process is then repeated for the layers before it. Once all the layers are pruned and fine-tuned, the entire network is then tuned for a few epochs.

Existing methods for pruning filters differ in the $scoring\_function$ that they use for ranking the filters. We alternately refer to this scoring function as pruning criteria as discussed in the next subsection.

## Pruning Criteria

We now describe various pruning criteria which are used by existing approaches and also introduce some new variants of existing pruning criteria. These criteria are essentially used as $scoring\_function()$ in Algorithm .

1.  Mean Activation : Most deep CNNs for image classification use ReLU as the activation function which results in very sparse activations (as all negative outputs are set to 0). We could compute the mean activation of the feature map corresponding to a filter across all images in the training data. If this mean activation is very low (because most of the activations are 0) then this feature map and hence the corresponding filter is not going to contribute much to the discriminatory power of the network (since the filter rarely fires for any input). Hence, uses the mean activation as a scoring function for ranking filters.

2.  $l_{1}$-Norm : The authors of suggest that the $l_{1}$-norm ($\parallel$F$\parallel_{1}$) of a filter can also be used as an indicator of the importance of the filter. The argument is that if the $l_{1}$-norm of a filter is small then on average the weights in the filter will be small and hence produce very small activations. These small activations will not influence the output of the network and hence the corresponding filters can be pruned away. One important benefit of this method is that apart from computing the $l_{1}$-norm, it does not need any extra computation during pruning and fine-tuning.

3.  Entropy : If the feature map corresponding to a filter produces the same output for every input (image) then this feature map and hence the corresponding filters may not be very important (because it does not play any discriminatory role). In other words, we are interested in feature maps (and hence filters) which are more informative or have a high entropy. If we divide the possible range of the average output of a feature map into $b$ bins then we could compute the entropy of the $i$-th feature map (or filter) as :
    $$E_{i} = -\sum_{j=1}^{b}p_{ij}\log p_{ij}$$ where $p_{ij}$ is the probability that the output of the $i$-th feature map lies in the $j$-th bin. This probability can be computed as the fraction of input images for which the average output of the feature map lies in this bin.

4.  Average Percentage of Zeros (APoZ) : As mentioned earlier, when ReLU is used as the activation function, the output activations are very sparse. If most of the neurons in a feature map are zero then this feature map is not likely to contribute much to the output of the network. The Average Percentage of Zeros in the output of each filter can thus be used to compute the importance of the filter (the lesser the better).

5.  Sensitivity : We could compute the gradient of a filter w.r.t. the loss function (i.e., cross entropy). If a filter has a high influence on the loss function then the value of this gradient would be high. The $l_{1}$-norm of this gradient averaged over all images can thus be used to compute the importance of a filter.

6.  Scaled Entropy : We propose a new variant of the entropy based criteria. We observe that a filter may have a high entropy but if all its activations are very low (belonging to lower bins) then this filter is not likely to contribute much to the output. We thus propose to use a combination of entropy and mean activation by scaling the entropy by the mean activation of the filter. This scaled-entropy of $i-$th filter can be computed as:
    $$SE_{i} = -\sum_{j=1}^{b}p_{ij}log p_{ij} * Mean_{i}$$ where $Mean_{i}$ is the average activation of the $i$-th filter over all input images.

7.  Class Specific Importance : In this work, we are also interested in a more practical scenario, where a network trained for detecting all the 1000 classes from ImageNet is required to detect only ($l < 1000$) of these classes at test time (say, only animals). Intuitively, we should then devise a scoring function which retains only those filters which are important for these $l$ classes. To do so we once aging compute the gradient of the loss function w.r.t. the filter. However, now instead of averaging the $l_{1}$-norm of this gradient over all images in the training data, we compute the average over only those images in the training data which correspond to the $l$ classes of interest. This class-specific average is then used to rank the filters.

8.  Random Pruning : One of the main contributions of this work is to show that even if we randomly prune the filters from a CNN, its performance after fine-tuning is not much worse than any of the above approaches.

# Experiments: Image Classification

In this section, we focus on the task of image classification using the ImageNet dataset. The dataset is split into three sets : training (1.3M images), validation (50K images), and testing (100K images with held-out class labels). We experiment with two popular networks, *viz.*, VGG-16 and ResNet-50. We first train these networks using the full ImageNet training data and then prune them using Algorithm . We compare the performance of different scoring functions as listed in the section .

## Comparison of different pruning methods on VGG-16

VGG-16 has 13 convolutional (CONV) and two fully connected (FC) layers. The number of filters in each CONV layer in the the standard VGG-16 network is {64, 64, 128, 128, 256, 256, 256, 512, 512, 512, 512, 512, 512}. We first train this network as it is (*i.e.*, with the standard number of filters in each layer) using the ImageNet training data. When evaluated on the standard ImageNet test set, this trained model gives us a top-1 accuracy of 69$\%$ which is comparable to the accuracy reported elsewhere in the literature. We now prune this network, one layer at a time starting from the last convolution layer. We prune away $m$% of filters from each layer where we chose the value of $m$ to be {25, 50, 75}. We use one of the scoring functions described in Section to select the top $m$% filters. We drop the remaining (100 - m)% filters from this layer and then fine-tune the pruned network for 1 epoch. We then repeat the same process for the lower layers and use the same value of $m$ across all layers. Once the network is pruned till layer 1, we then fine tune the entire pruned network for 12 epochs using 1/10-th of the training data picked randomly. The only reason for not using the entire training data is that it is quite computationally expensive. We did not see any improvement in the performance on the validation set by fine-tuning beyond 12 epochs. We then evaluate this pruned and fine-tuned network on the test set. Below, we discuss the performance of the final pruned and fine-tuned network obtained using different pruning strategies.

**Performance of pruned network after fine-tuning:** In Table , we report the performance of the final pruned network after fine tuning. We observe that random pruning works better than most of the other pruning methods described earlier. $l_1$-norm is the only scoring function which does better than random and that too by a small margin. In fact, if we fine-tune the final trained network using the entire training data then we observe that there is hardly any difference between random and $l_1$-norm (see Table ). This provides empirical evidence for our claim that the amount of recovery (i.e., final performance after fine-tuning) is not due to the soundness of the pruning criteria. Even with random pruning, the performance of the pruned network is comparable. Of course, as the percentage of pruning increases ($i.e,,$ as m increases) it becomes harder for the pruned network to recover the full performance of the original network (but the point is that it is equally hard irrespective of the pruning method used). Thus, w.r.t. the amount of recovery after damage (pruning), a random pruning strategy is as good as any other pruning strategy. We further drive this point in Figure where we show that after pruning and fine tuning for every layer, the amount of recovery after fine tuning is comparable across different pruning strategies.

| Heuristic       | 25 %      | 50%       | 75%       |
|:----------------|:----------|:----------|:----------|
| Random          | 0.650     | 0.569     | 0.415     |
| Mean Activation | 0.652     | 0.570     | 0.409     |
| Entropy         | 0.641     | 0.549     | 0.405     |
| Scaled Entropy  | 0.637     | 0.550     | 0.401     |
| $l_1$-norm      | **0.667** | **0.593** | **0.436** |
| APoZ            | 0.647     | 0.564     | 0.422     |
| Sensitivity     | 0.636     | 0.543     | 0.379     |

Comparison of different filter pruning strategies on VGG-16.

As a side note we would like to mention that we do not include the performance of ThiNets in Table . This is because it uses a slightly different methodology. In particular there are two major differences. First, in ThiNets pruning is done only till layer 10 and not upto layer 11 as is the case for all numbers reported in Table . Secondly, in ThiNets, if a CONV layer appears before a max-pooling layer then it is fine-tuned for an extra epoch to compensate more for the downsampling in the max pooling layer. For a fair comparison, we followed this exact same strategy as ThiNet but using a random pruning criteria. In this setup, a randomly pruned network was able to achieve 68% top-1 accuracy after 50% pruning which is comparable to the performance of the corresponding ThiNet (69%).

| Heuristic       | 50%        |     |     |
|:----------------|:-----------|:----|:----|
| Random          | 0.6701     |     |     |
| Mean Activation | 0.6662     |     |     |
| Entropy         | 0.6635     |     |     |
| Scaled Entropy  | 0.6625     |     |     |
| **$l_1$-norm**  | **0.6759** |     |     |
| APoZ            | 0.6706     |     |     |
| Sensitivity     | 0.6659     |     |     |

Performance after fine-tuning with full data

**Amount of initial damage caused by different pruning strategies:** One might argue that while random pruning strategy is equivalent to other pruning strategies w.r.t. final performance after fine tuning, it is possible that the amount of initial damage caused by a careful pruning strategy maybe less than than caused by random pruning. This could be important in cases where enough time or resources are not available for fine-tuning after pruning. To evaluate this, we compute the accuracy of the network just after pruning (and before fine-tuning) at each layer. Figure compares this performance for different pruning strategies. Here again we observe that the damage caused by a random pruning strategy is not worse than other pruning strategies. The only exception is when we prune the first 4 layers in which case the damage caused by $l_1$-norm based pruning is less than random pruning. We hypothesize that this is because the first 4 layers have very few filters and hence one needs to be careful while pruning for filters from these layers. In fact, in hindsight we would recommend not to prune any filters from these 4 layers because the computation savings are less as compared to drop in accuracy.

**Speed of recovery and quantum of data for fine-tuning:** Another important criteria is the speed of recovery, *i.e.*, the number of iterations for which the network needs to be fine-tuned after pruning. It is conceivable that a carefully pruned network may be able to recover and reach its best performance faster than a randomly pruned network. However, as shown in Figure that almost all the pruning strategies (including random) reach their peak after 2 epochs when fine-tuned with one-tenth of the data. Even, if we increase the quantum of data, this behavior does not change as shown in Figure (for $l_1$-norm based pruning and random pruning). Of course, as we increase the quantum of data the amount of recovery increases, *i.e.*, the peak performance of the pruned network increases. However, the important point is that a random strategy is no worse than a careful pruning strategy w.r.t. speed of recovery and quantum of data required.

## Pruning ResNet-50 using $l_1$-Norm and Random

While the above set of experiments focused on VGG-16, we now turn our attention to ResNet-50 which gives state of the art results on ImageNet. We took a trained ResNet-50 model which gave 74.5$\%$ top-1 accuracy on the ImageNet test set which is again comparable to the accuracy reported elsewhere in the literature. ResNet contains 16 residual blocks wherein each block contains 3 layers with a skip connection from the first layer to the third layer. The standard practice is to either prune the first layer of each block or the first two layers of each block. In the first case, out of the total 48 convolution layers (16 \* 3) we will end up pruning 16 and in the second case we will end up pruning 32. As before, for each pruned layer we vary the percentage of pruning from 25%, 50% to 75%. Here, we only compare the performance of $l_1$-Norm with random pruning as these were the top performing strategies on VGG-16. This was just to save time and resources as given the deep structure of ResNet it would have been very expensive to run all pruning strategies. Once again from Table , we observe that **random** pruning performs at par (in fact, slightly better) when compared to $l_{1}$-Norm based pruning. Note that, in this case the pruned models were trained with only one-tenth of the data. The performance of both the methods are likely to improve further if we were to fine-tune the pruned network on the entire training data.

| Heuristics | \#Layers Pruned | 25 %  | 50%   | 75%   |
|:-----------|:---------------:|:------|:------|:------|
| Random     |       16        | 0.722 | 0.683 | 0.617 |
| $l_1$-norm |       16        | 0.714 | 0.677 | 0.610 |
| Random     |       32        | 0.696 | 0.637 | 0.518 |
| $l_1$-norm |       32        | 0.691 | 0.633 | 0.514 |

Comparison of different filter pruning strategies on ResNet (Top-1 accuracy of unpruned network is 0.745)

# Experiments: Class specific pruning

Existing work on pruning filters (or model compression, in general) focuses on the scenario where we have a network trained for detecting all the 1000 classes in ImageNet and at test time it is again evaluated using data belonging to all of these 1000 classes. However, in many real world scenarios, at test time we may be interested in fewer classes. A case in point, is the Pascal VOC dataset which contains only 20 classes. Intuitively, if we are interested in only fewer classes at test time then we should be able to prune the network to cater to only these classes. Alternately, we could train the original network itself using data corresponding to these classes only. To enable these experiments, we first create a new benchmark from ImageNet which contains only those 52 classes which correspond to the 20 classes in Pascal VOC. Note that the mapping of 52-20 happens because ImageNet has more fine-grained classes. For example, there is only one class for 'dog' in Pascal VOC but ImageNet contains many sub-classes of 'dog' (different breeds of dogs). We manually went over all the classes in ImageNet and picked out the classes which correspond to the 20 classes in Pascal VOC. In some cases, we ignored ImageNet classes which were too fine-grained and only considered those classes which were immediate hyponyms of a class in Pascal VOC. We then extracted the train, test and valid images for these classes from the original ImageNet dataset. We refer to this subset of ImageNet as ImageNet-52P (where P stands for Pascal VOC). We refer to the original ImageNet dataset as ImageNet-1000. Note that the train, test and validation splits of ImageNet-52P are subsets of the corresponding splits of ImageNet-1000. In particular , the training split of ImageNet-1000 does not overlap with the test or validation splits of ImageNet-52P.

We first compare the performance in the following two setups: (i) model trained on ImageNet-1000 and evaluated on the test split of ImageNet-52P and (ii) model trained on ImageNet-52P and evaluated on the test split of ImageNet-52P. We observe that while in the first setup we get a top-1 accuracy of 74%, in the second setup we get an accuracy of 87%. This suggests that model trained on ImageNet-1000 is clearly overloaded with extra information about the remaining 948 classes and hence performs poorly on the 52 classes of interest. We should thus be able to prune the network effectively to cater to only the 52 classes of interest. Note that in practice it is desirable to have just one network trained on ImageNet-1000 and then prune it for different subsets of classes that we are interested in instead of training a separate network from scratch for each of these subsets. We again compare different pruning strategies as listed earlier except that now when fine-tuning (after each layer and at the end of all layers) we only use ImageNet-52P. In other words, we fine-tune using only data corresponding to the 52 classes. Once again, we observe that there is not much difference between random pruning and other pruning strategies. Also with 25% pruning, we are able to almost match the performance of a network trained only on these 52 classes (*i.e.*, 87%) .

| Heuristics        | 25 %      | 50%       | 75%       |
|:------------------|:----------|:----------|:----------|
| Random            | 0.859     | 0.820     | 0.692     |
| Mean Activation   | 0.866     | 0.816     | 0.698     |
| Entropy           | 0.860     | 0.802     | 0.684     |
| Scaled Entropy    | 0.863     | 0.813     | 0.691     |
| $l_1$-norm        | **0.867** | **0.823** | **0.729** |
| APoZ              | 0.858     | 0.811     | 0.700     |
| Important Classes | 0.857     | 0.795     | 0.655     |
| Sensitivity       | 0.849     | 0.793     | 0.634     |

Comparison of different filter pruning strategies when fine-tuned and evaluated with ImageNet-52P.

# Experiments: Faster Object Detection

The above experiments have shown that with reasonable levels of pruning (25-50%) and enough fine-tuning (using entire data) the pruned network is able to recover and almost match the performance of the unpruned network on the original task (image classification) even with a random pruning strategy. However, it is possible that if such a pruned network is used for a new task, say object detection, then a randomly pruned network may not give the same performance as a carefully pruned network. To check this, we performs experiments using the Faster-RCNN model for object detection. Note that the Faster-RCNN model uses a VGG-16 model as a base component and then adds other components which are specific to object detection. We experiment with the PASCAL-VOC 2007 dataset which consists of 9,963 images, containing 24,640 annotated objects. We first plug-in a standard trained VGG-16 network into Faster-RCNN and then train Faster-RCNN for 70K iterations (as is the standard practice). This model gives a mean Average Precision (mAP) value of $0.66$. The idea is to now plug-in a pruned VGG-16 model into faster RCNN instead of the original unpruned model and check the performance. Table again shows that the specific choice of pruning strategy does not have much impact on the final performance on object detection. Of course, as earlier, as the level of pruning increases the performance drops (but the drop is consistent across all pruning strategies). We now report some more interesting experiments on pruning Faster RCNN.

**Directly pruning Faster RCNN:** Instead of plugging in a pruned VGG-16 model into Faster-RCNN, we could alternately take a trained Faster-RCNN model and then prune it directly. Here again, we use a simple random pruning strategy and observe that the performance of the pruned model comes very close to that of the unpruned model. In particular, with 50% pruning we are able to achieve a mAP of $\textbf{0.648}$ with a $74\%$ speedup in terms of frames per second.

**Plugging in a VGG-16 model trained using ImageNet-52P:** Since we are only interested in the 52 classes corresponding to Pascal-VOC, we wanted to check what happens if we plug-in a VGG-16 model trained, pruned and fine-tuned only on ImageNet-52P. As shown in Table we do not get much benefit of plugging in this specialized model into Faster-RCNN. In fact, in a separate experiment we observed that even if we train a VGG-16 model on a completely random set of 52 classes (different from the 52 classes corresponding to Pascal VOC) and then plug in this model into Faster RCNN, even then the final performance of the Faster RCNN model remains the same. This is indeed surprising and further demonstrates the ability of these networks to recover from unfavorable situations.

| Heuristics      | 25 %      | 50%       | 75%       |
|:----------------|:----------|:----------|:----------|
| Random          | **0.647** | 0.600     | 0.505     |
| Mean Activation | **0.647** | 0.601     | 0.489     |
| Entropy         | 0.635     | 0.584     | 0.501     |
| Scaled Entropy  | 0.640     | 0.593     | 0.507     |
| $l_1$-norm      | 0.628     | **0.608** | **0.520** |
| APoZ            | 0.646     | 0.598     | 0.514     |
| Sensitivity     | 0.636     | 0.592     | 0.485     |

Object detection results obtained by plugging-in different pruned VGG-16 models into Faster-RCNN.

| Faster-RCNN | Baseline | 25 %  | 50%   | 75%   |
|:------------|:---------|:------|:------|:------|
| mAP         | 0.66     | 0.655 | 0.648 | 0.530 |
| fps         | 7.5      | 10    | 13    | 16    |

Object detection results when directly pruning (random) a fully trained Faster-RCNN model.

| Heuristics        | 25 %      | 50%       | 75%       |
|:------------------|:----------|:----------|:----------|
| Random            | 0.647     | 0.580     | 0.469     |
| Mean Activation   | 0.644     | 0.583     | 0.454     |
| Entropy           | 0.642     | 0.578     | 0.47      |
| Scaled Entropy    | 0.645     | 0.580     | 0.443     |
| $l_1$-norm        | **0.648** | **0.601** | **0.487** |
| APoZ              | 0.641     | 0.585     | 0.466     |
| Important Classes | 0.631     | 0.568     | 0.432     |
| Sensitivity       | 0.637     | 0.576     | 0.4345    |

Object detection results obtained by plugging-in different pruned VGG-16 models fine-tuned with ImageNet-52P as opposed to ImageNet-1000.

false

| Dataset   | Heuristics | 25 % | 50%  | 75%  |
|:----------|:-----------|:-----|:-----|:-----|
| Dataset-1 | Random     | 0.51 | 0.50 | 0.38 |
| Dataset-1 | $l_1$-norm | 0.52 | 0.49 | 0.40 |
| Dataset-2 | Random     | 0.52 | 0.48 | 0.37 |
| Dataset-2 | $l_1$-norm | 0.54 | 0.49 | 0.39 |

Faster RCNN results using pruned VGG-16 using Dataset-1 and Dataset-2, and not training VGG layers in Faster RCNN.

# Conclusion and Future Work

We evaluated the performance of various pruning strategies based on the (i) drop in performance after pruning (ii) amount of recovery after pruning (iii) speed of recovery and (iv) amount of data required. We do extensive evaluations with two networks (VGG-16 and ResNet50) and present counter-intuitive results which show that w.r.t. all these factors a random pruning strategy performs at par with principled pruning strategies. We also show that even when such a randomly pruned network is used for a completely new task it performs well. Finally, we present results for pruning Faster RCNN and show that even a random pruning strategy can give a 74% speed-up w.r.t frames per second while giving only a 1% drop in the performance.

[^1]: The first two authors have contributed equally


author: Haewoon Kwak; Jisun An; Elise Jing; Yong-Yeol Ahn
bibliography: main.bib
title: FrameAxis: Characterizing Microframe Bias and Intensity with Word Embedding

# Introduction

Framing is a process of highlighting a certain aspect of an issue to make it salient . By focusing on a particular aspect over another, even without making any biased argument, a biased understanding of the listeners can be induced . For example, when reporting on the issue of poverty, a news media may put an emphasis on how successful individuals succeeded through hard work. By contrast, another media may emphasize the failure of national policies. It is known that these two different framings can induce contrasting understanding and attitudes about poverty . While readers who are exposed to the former framing became more likely to blame individual failings, those who are exposed to the latter framing tended to criticize the government or other systematic factors rather than individuals. Framing has been actively studied, particularly in political discourse and news media, because framing is considered to be a potent tool for political persuasion . It has been argued that the frames used by politicians and media shape the public understanding of issue salience , and politicians strive to make their framing more prominent among the public .

Framing is not confined to politics. It has been considered crucial in marketing , public health campaigns , and other domains . Yet, the operationalization of framing is inherently vague  and remains a challenging open question. Since framing research heavily relies on manual efforts from choosing an issue to isolating specific attitudes, identifying a set of frames for an issue, and analyzing the content based on a developed codebook , it is not only difficult to avoid an issue of subjectivity but also challenging to conduct a large-scale, systematic study that leverages huge online data.

Several computational approaches have been proposed to address these issues. They aim to characterize political discourse, for instance, by recognizing political ideology  and sentiment , or by leveraging established ideas such as the moral foundation theory , general media frame , and frame-related language . Yet, most studies still rely on small sets of predefined ideas and annotated datasets.

To overcome these limitations, we propose FrameAxis, an unsupervised method for characterizing texts with respect to a variety of *microframes*. Each microframe is operationalized by an antonym pair, such as *legal – illegal*, *clean – dirty*, or *fair – unfair*. The value of antonym pairs in characterizing the text has been repeatedly demonstrated . For example, MFT identifies the five basic moral 'axes' using antonyms, such as 'Care/Harm' and 'Fairness/Cheating', 'Loyalty/Betrayal', 'Authority/Subversion', and 'Purity/Degradation', as the critical elements for individual judgment . MFT has been applied to discover politicians' stances on issues  and political leaning in partisan news , demonstrating flexibility and interpretability of antonymous semantic axes in characterizing the text. On the other hand, SemAxis  and following studies  leverage the word embeddings to characterize the semantics of a word in different communities or domains (e.g., different meaning of 'soft' in the context of sports vs. toy) by computing the similarities between the word and a set of predefined antonymous axes ("semantic axes"). As in SemAxis, FrameAxis leverages the power of word embedding, which allows us to capture similarities between a word and a semantic axis.

For each microframe defined by an antonym pair, FrameAxis is designed to quantitatively tease out two important dimensions of how it is used in the text. *Microframe bias* captures how biased the text is on a certain microframe, and *microframe intensity* shows how actively a certain microframe is used. Both dimensions together offer a nuanced characterization of the text. For example, let us explain the framing bias and intensity of the text about an immigration issue on the *illegal – legal* microframe. Then, the framing bias measures how much the text focuses on an 'illegal' perspective of the immigration issue rather than a 'legal' perspective (and vice versa); the framing intensity captures how much the text focuses on an illegal *or* legal perspective of the immigration issue rather than other perspectives, such as segregation (i.e., *segregated – desegregated* microframe).

While FrameAxis works in an unsupervised manner, FrameAxis can also benefit from manually curated microframes. When domain experts are already aware of important candidate frames of the text, they can be directly formulated as microframes. For the case when FrameAxis works in an unsupervised manner—which would be much more common, we propose methods to identify the most relevant semantic axes based on the values of microframe bias and intensity. Moreover, we also suggest document and word-level analysis methods that can explain *how* and *why* the resulting microframe bias and intensity are found with different granularity.

We emphasize that FrameAxis cannot replace conventional framing research methods, which involves sophisticated close reading of the text. Also, we do not expect that the microframes can be directly mapped to the frames identified by domain experts. FrameAxis can thus be considered as a computational aid that can facilitate systematic exploration of texts and subsequent in-depth analysis.

# Methods

FrameAxis involves four steps: (i) compiling a set of microframes, (ii) computing word contributions to each microframe, (iii) calculating microframe bias and intensity by aggregating the word contributions, and finally (iv) identifying significant microframes by comparing with a null model. We then present how to compute the relevance of microframes to a given corpus.

## Building a Set of Predefined Microframes

FrameAxis defines a microframe as a "semantic axis"  in a word vector spacea vector from one word to its antonym. Given a pair of antonyms (pole words), $w^+$ (e.g., 'happy') and $w^-$ (e.g., 'sad'), the semantic axis vector is $v_f = v_{w^+} - v_{w^-}$, where $f$ is a microframe or a semantic axis (e.g., *happy – sad*), and $v_{w^+}$ and $v_{w^-}$ are the corresponding word vectors. To capture nuanced framing, it is crucial to cover a variety of antonym pairs. We extract 1,828 adjective antonym pairs from WordNet  and remove 207 that are not present in the GloVe embeddings (840B tokens, 2.2M vocab, 300d vectors) . As a result, we use 1,621 antonym pairs as the predefined microframes. As we explained earlier, when potential microframes of the text are known, using only those microframes is also possible.

## Computation of Microframe Bias and Intensity

A microframe $f$ (or semantic axis in ) is defined by a pair of antonyms $w^+$ and $w^-$. Microframe bias and intensity computation are based on the contribution of each word to a microframe. Formally, we define the contribution of a word $w$ to a microframe $f$ as the similarity between the word vector $v_w$ and the microframe vector $v_f$ ($=v_{w^+}-v_{w^-}$). While any similarity measure between two vectors can be used here, for simplicity, we use cosine similarity: $$c^w_f = \frac {v_w \cdot v_f}{\parallel{v_w}\parallel \parallel{v_f}\parallel}
\label{eq:cosine_similarity}$$

We then define microframe bias of a given corpus $t$ on a microframe $f$ as the weighted average of the word's contribution $c^w_f$ to the microframe $f$ for all the words in $t$. This aggregation-based approach shares conceptual roots with the traditional expectancy value model , which explains an individual's attitude to an object or an issue. In the model, the individual's attitude is calculated by the weighted sum of the evaluations on attribute $a_i$, whose weight is the salience of the attribute $a_i$ of the object. In FrameAxis, a corpus is represented as a bag of words, and each word is considered an attribute of the corpus. Then, a word's contribution to a microframe can be considered as the evaluation on attribute, and the frequency of the word can be considered as the salience of an attribute. Accordingly, the weighted average of the word's contribution to the microframe $f$ for all the words in $t$ can be mapped onto the individual's attitude toward an object—that is, microframe bias. An analogous framework using a weighted average of each word's score is also proposed for computing the overall valence score of a document . Formally, we calculate the microframe bias, $\mathrm{B}^t_f$, of a text corpus $t$ on a microframe $f$ as follows: $$\mathrm{B}^t_f = \frac{\sum_{w \in t} (n_w  c^w_f) }{\sum_{w \in t} n_w}
\label{eq:frame_bias}$$ where $n_w$ is the number of occurrences of word $w$ in $t$.

Microframe intensity captures how strongly a given microframe is used in the document. Namely, given corpus $t$ on a microframe $f$ we measure the second moment of the word contributions $c_f^w$ on the microframe $f$ for all the words in $t$. For instance, if a given document is emotionally charged with many words that strongly express either happiness or sadness, we can say that the *happy – sad* microframe is heavily used in the document regardless of the microframe bias regarding the *happy – sad* axis.

Formally, microframe intensity, $\mathrm{I}^t_f$, of a text corpus $t$ on a microframe $f$ is calculated as follows: $$\mathrm{I}^t_f = \frac{\sum_{w \in t} n_w (c^w_f - \mathrm{B}^T_f)^2}{\sum_{w \in t} n_w}$$ where $\mathrm{B}^T_f$ is the baseline microframe bias of the entire text corpus $T$ on a microframe $f$ for computing the second moment. As the squared term is included in the equation, the words that are far from the baseline microframe bias—and close to either of the poles—contribute strongly to the microframe intensity.

We present an illustration of microframe intensity and bias in Figure 1(A), where arrows represent the vectors of words appeared in a corpus, and blue and orange circles represent two pole word vectors, which define the $w^+$–$w^-$ microframe. If words that are semantically closer to one pole are frequently used in a corpus, the corpus has the high microframe bias toward that pole and the high microframe intensity on the $w^+$–$w^-$ microframe (top right). By contrast, if words that are semantically closer to both poles are frequently used, the overall microframe bias becomes low by averaging out the biases toward both poles, but the microframe intensity stays high because the $w^+$–$w^-$ microframe is actively used (bottom right).

## Handling Non-informative Topic Words

It is known that pretrained word embeddings have multiple biases . Although some de-biasing techniques are proposed , those biases are not completely eliminated . For example, the word 'food' within a GloVe pretrained embedding space is much closer to 'savory' (cosine similiarity: 0.4321) than 'unsavory' (cosine similarity: 0.1561). As those biases could influence the framing bias and intensity due to its high frequencies in the text of reviews on food, we remove it from the analysis of the reviews on food.

FrameAxis computes the word-level framing bias (intensity) shift to help this process, which we will explain in 'Explainability' Section. Through the word-level shift, FrameAxis users can easily check whether some words that should be neutral on a certain semantic axis are located as neutral within a given embedding space.

While this requires manual efforts, one shortcut is to check the topic word first. For example, when FrameAxis is applied to reviews on movies, the word 'movie' could be considered first because 'movie' should be neutral and non-informative. Also, as reviews on movies are likely to contain the word 'movie' multiple times, even smaller contribution of 'movie' to a given microframe could be amplified by its high frequency of occurrences, $n_w$ in Equation (2) and (3). After the manual confirmation, those words are replaced with $<$UNK$>$ tokens and are not considered in the computation of framing bias and intensity.

In this work, we also removed topics words as follows: in the restaurant review dataset, the word indicating aspect (i.e., *ambience, food, price,* and *service*) is replaced with $<$UNK$>$ tokens. In the AllSides' political news dataset, we consider the issue defined by AllSides as topic words, such as *abortion, immigration, elections, education, polarization*, and so on.

## Identifying Statistically Significant Microframes

The microframe bias and intensity of a target corpus can be interpreted with respect to the background distribution for statistical significance. We compute microframe bias and intensity on the microframe $f$ from a bootstrapped sample $s$ from the entire corpus $T$, denote by $\mathrm{B}^{NULL_s}_f$ and $\mathrm{I}^{NULL_s}_f$, respectively. We set the size of the sample $s$ to be equal to that of the target corpus $t$.

Then, the differences between $\mathrm{B}^{NULL_s}_f$ and $\mathrm{B}^{t}_f$ and that between $\mathrm{I}^{NULL_s}_f$ and $\mathrm{I}^{t}_f$ shows how likely the microframe bias and intensity in the target corpus can be obtained by chance. The statistical significance of the observation is calculated by doing two-tailed tests on the $N$ bootstrap samples. By setting a threshold $p$-value, we identify the significant microframes. In this work, we use $N=1,000$ and $p=0.05$.

We also can compute the effect size ($|\eta|$, which is the difference between the observed value and the sample mean) for microframe $f$: $$\eta^{\mathrm{B}}_f = \mathrm{B}^{t}_f - \mathrm{B}^{NULL}_f = \mathrm{B}^{t}_f - \frac {\sum_i^N \mathrm{B}^{NULL_{s_i}}_f}{N}
\label{eq:bias}$$

$$\eta^{\mathrm{I}}_f = \mathrm{I}^{t}_f - \mathrm{I}^{NULL}_f = \mathrm{I}^{t}_f - \frac {\sum_i^N \mathrm{I}^{NULL_{s_i}}_f}{N}
\label{eq:intensity}$$ We can identify the top $M$ significant microframes in terms of the microframe bias (intensity) by the $M$ microframes with the largest $|\eta^{\mathrm{B}}|$ ($|\eta^{\mathrm{I}}|$).

## Microframe Bias and Intensity Shift per Word

We define the word-level microframe bias and intensity shift in a given corpus $t$ as follows:

$$\mathrm{S}^t_w(\mathrm{B}_{f}) = \frac{n_w c^w_f}{\sum_{w \in t} n_w}
\label{eq:shift_bias}$$

$$\mathrm{S}^t_w(\mathrm{I}_f) = \frac{n_w (c^w_a - \mathrm{B}^T_f)^2}{\sum_{w \in t} n_w}
\label{eq:shift_intensity}$$ which shows how a given word ($w$) brings a shift to microframe bias and intensity by considering both the word's contribution to the microframe ($c^w_a$) and its appearances in the target corpus $t$ ($n_w$). In this work, both shifts are compared to those from the background corpus.

## Contextual Relevance of Microframes to a Given Corpus

Not all predefined microframes are necessarily meaningful for a given corpus. While we provide a method to compute the statistical significance of each microframe for a given corpus, filtering out irrelevant microframes in advance can reduce computation cost. We propose two methods to compute relevance of microframes to a given corpus: embedding-based and language model-based approaches.

First, an embedding-based approach calculates relevance of microframes as cosine similarity between microframes and a primary topic of the corpus within a word vector space. A topic can be defined as a set of words related to a primary topic of the corpus. We use $\tau=\{$$w_{t1}, w_{t2}, w_{t3}, ... , w_{tn}$$\}$ to represent a set of topic words. The cosine similarity between a microframe $f$ defined by two pole words $w^+$ and $w^-$ and a set of topic words $\tau$ can be represented as the average cosine similarity between pole word vectors ($v_{w^+}$ and $v_{w^-}$) and a topic word vector ($v_{w_{ti}}$): $$r^t_f = \frac{1}{|\tau|}\sum_{w_{ti}\in\tau}\frac{\text{(relevance of $w^+$ to $w_{ti}$)} + \text{(relevance of $w^-$ to $w_{ti}$)}}{2} = \frac{1}{|\tau|}\sum_{w_{ti}\in\tau} \frac{\frac {v_{w_{ti}} \cdot v_{w^+}}{\parallel{v_{w_{ti}}}\parallel \parallel{v_{w^+}}\parallel} + \frac {v_{w_{ti}} \cdot v_{w^-}}{\parallel{v_{w_{ti}}}\parallel \parallel{v_{w^-}}\parallel}}{2}$$

Second, a language model-based approach calculates relevance of microframes as perplexity of a template-filled sentence. For example, consider two templates as follows:

-   T1(topic word, pole word): {topic word} *is* {pole word}.

-   T2(topic word, pole word): {topic word} *are* {pole word}.

If a topic word is 'healthcare' and a microframe is *essential – inessential*, four sentences, which are 2 for each pole word, can be generated. Following a previous method , we use a pre-trained OpenAI GPT model to compute the perplexity score.

We take a lower perplexity score for each pole word because a lower perplexity score should be from the sentence with a correct subject-verb pair (i.e., singular-singular or plural-plural). In this stage, for instance, we take 'healthcare is essential' and 'healthcare is inessential'. Then, we sum two perplexity scores from one pole and the other pole words and call it frame relevance of the corresponding microframe to the topic.

According to the corpus and topic, a more complex template, such as "A (an) {topic word} issue has a {pole word} perspective." might work better. More appropriate template sentences can be built with good understanding of the corpus and topic.

## Human Evaluation

We perform human evaluations through Amazon Mechanical Turk (MTurk). For microframe bias, we prepare the top 10 significant microframes ranked by the effect size (i.e., answer set) and randomly selected 10 microframes with an arbitrary microframe bias (i.e., random set) for each pair of aspect and sentiment (e.g., *positive* reviews about *ambience*). As it is hard to catch subtle differences of the magnitude of microframe biases and intensity through crowdsourcing, we highlight microframe bias on each microframe with bold-faced instead of its numeric value.

As a unit of question-and-answer tasks in MTurk (Human Intelligence Task \[HIT\]), we ask "Which set of antonym pairs do better characterize a *positive* restaurant review on *ambience*? (A word on the right side of each pair (in bold) is associated with a *positive* restaurant review on *ambience*.)" The italic text is changed according to every aspect and sentiment. We note that, for every HIT, the order of microframes in both sets is shuffled. The location (i.e., top or bottom) of the answer set is also randomly chosen to avoid unexpected biases of respondents.

For microframe intensity, we prepare the top 10 significant microframes (i.e., answer set) and randomly selected 10 microframes (i.e., random set) for each pair of aspect and sentiment. The top 10 microframes are chosen by the effect size, computed by Equation (4) and (5), among the significant microframes. We then ask "Which set of antonym pairs do better characterize a *positive* restaurant review on *service*?" The rest of the procedure is the same as the framing bias experiment.

For the quality control of crowd-sourced answers, we recruit workers who (1) live in the U.S., (2) have more than 1,000 approved HITs, and (3) achieve 95% of approval rates. Also, we allow a worker to answer up to 10 HITs. We recruit 15 workers for each (aspect, sentiment) pair. We pay 0.02 USD for each HIT.

# Results

## Microframe in Restaurant Reviews

To validate the concept of microframe bias and intensity, we examine the SemEval 2014 task 4 dataset, which is a restaurant review dataset where reviews are grouped by aspects (food, ambience, service, and price) and sentiment (positive and negative). This dataset provides an ideal playground because i) restaurant reviews tend to have a clear bias—whether the experience was good or bad—which can be used as a benchmark for framing bias, and ii) the aspect labels also help us perform the fine-grained analysis and compare microframes used for different aspects of restaurant reviews.

We compute microframe bias and intensity for 1,621 predefined microframes, which are compiled from WordNet  (See *Methods* for detail), for every review divided by aspects and sentiments. The top two microframes with the highest microframe intensity are shown in Figure 1. For each highest-intensity microframe, we display the microframe bias that is computed through a comparison between the positive (negative) reviews and the null model—bootstrapped samples from the whole corpus (See *Methods*). The highest-intensity microframes are indeed relevant to the corresponding aspect: *hospitable – inhospitable* and *best – worst* for service, *cheap – expensive* and *pointless – pointed* for price, *savory – unsavory* and *appealing – unappealing* for food, and *active – quiet* and *loud – soft* for ambience. At the same time, it is clear that positive and negative reviews tend to focus on distinct perspectives of the experience. Furthermore, observed microframe biases are consistent with the sentiment labels; microframe biases in positive reviews are leaning toward the positive side of the microframes, and those in negative reviews toward the negative side.

In other words, FrameAxis is able to automatically discover that positive reviews tend to characterize service as *hospitable*, price as *cheap*, food as *savory*, and ambience is *tasteful*, and negative reviews describe service as *worst*, price as *pointless*, food as *unappealing*, and ambience as *loud* in an unsupervised manner. Then, how and why do these microframes get those bias and intensity? In the next section, we propose two tools to provide explainability with different granularity behind microframe bias and intensity.

## Explainability

To understand computed microframe bias and intensity better, we propose two methods: i) word-level microframe bias (intensity) shift, and ii) document-level microframe bias (intensity) spectrum.

The word-level impact analysis has been widely used for explaining results of the text analysis . Similarly, we can compute the word-level microframe shift that captures how each word in a target corpus $t$ influences the resulting microframe bias (intensity) by aggregating contributions of the word $w$ for microframe bias (intensity) on microframe $f$ (See *Methods*). It is computed by comparison with its contribution to a background corpus. For instance, even though $w$ is a word that conveys positive connotations, its contribution to a target corpus can become negative if its appearance in $t$ is lower than that in the background corpus.

Figure 2(A) shows the top 10 words with the highest microframe bias shift for the two high-intensity microframes from the 'food' aspect. On the left, the green bars show how each word in the positive reviews shifts the microframe bias toward either savory or unsavory on the *savory – unsavory* microframe, and the gray bars show how the same word in the background corpus (non-positive reviews) shifts the microframe bias. The difference between the two shifts, which is represented as the orange bars, shows the effect of each word for microframe bias on the *savory – unsavory* microframe in positive reviews. The same word's total contribution differs due to the frequency because its contribution on the axis $c^w_f$ is the same. For instance, the word 'delicious' appears 80 times in positive reviews, and the normalized term frequency is $0.0123$. By contrast, 'delicious' appears only three times in non-positive reviews, and the normalized term frequency is $0.0010$. In short, the normalized frequency of the word 'delicious' is an order of magnitude higher in positive reviews than non-positive reviews, and thus the difference strongly shifts the microframe bias toward 'savory' on the *savory – unsavory* microframe. A series of the words describing positive perspectives of food, such as *delicious, fresh, tasty, great, good, yummy,* and *excellent,* appears as the top words with the highest microframe bias shifts toward savory on the *savory – unsavory* microframe.

Similarly, on the right in Figure 2(A), the green and the gray bars show how each word in the negative reviews and background corpus (non-negative reviews) shifts the microframe bias on the *appealing – unappealing* microframe, respectively, and the orange bar shows the difference between the two shifts. The word 'great' in the negative reviews shifts microframe bias toward appealing less than that in the background corpus; the word 'great' less frequently appears in negative reviews (0.0029) than in background corpus (0.0193). Consequently, the resulting microframe bias attributed from the word 'great' in the negative reviews is toward 'unappealing' on the *appealing – unappealing* microframe. In addition, words describing negative perspectives of food, such as *soggy, bland, tasteless, horrible,* and *inedible*, show the orange bars heading to unappealing rather than appealing side on the *appealing – unappealing* microframe. Note that the pole words for these microframes do not appear in the top word lists. These microframes are found because they best capture—according to word embedding—these words *collectively*.

Figure 2(C) shows the top 10 words with the highest framing intensity shift for the two high-intensity microframes from the 'food' aspect. On the right, compared to Figure 2(A), more words reflecting the nature of the *unappealing – appealing* microframe, such as *tasteless, horrible, inedible, oily, undercooked, disgusting, flavorless*, and *watery,* are shown as top words in terms of the microframe intensity shift. As we mentioned earlier, we confirm that the words that are far from the baseline framing bias—and close to either of the poles—contribute strongly to the microframe intensity.

Figure 2(B) shows another example of word-level framing bias shift in the reviews about service. On the left, top words that shift microframe bias toward 'hospitable', such as *friendly, attentive, great, excellent, nice, helpful, accommodating, wonderful,* and *prompt*, are captured from the positive reviews. On the right, top words that shift microframe bias toward 'worst', such as *rude, horrible, terrible, awful, bad, wrong,* and *pathetic*, are found. Similar to the top words in negative reviews about food, some words that shift framing bias toward 'best' less frequently appear in the negative reviews than the background corpus, making their impact on microframe bias be farther from 'best' on the *best – worst* microframe.

As the word-level microframe shift diagram captures, what FrameAxis detects is closely linked to the abundance of certain words. Does it mean that our results merely reproduce what simpler methods for detecting overrepresented words perform? To answer this question, we compare the log odds ratio with informative Dirichlet prior . With the log odds ratio, *service*, *friendly*, *staff*, *attentive*, *prompt*, *fast*, *helpful*, *owner*, and *always* are found to be overrepresented words. This list of overrepresented words is always the *same* when comparing given corpora because it only considers their frequencies of appearances in the corpora. By contrast, FrameAxis identifies the most relevant words for each microframe by considering their appearances and their contributions to the microframe, providing richer interpretability. Even though a word appears many times in a given corpus, it does not shift the microframe bias or intensity if the word is irrelevant to the microframe.

Figure 2(D) shows the top 10 words with the highest microframe intensity shift for the two high-intensity microframes from the 'service' aspect. On the left, compared to Figure 2(B), more words describing the *inhospitable – hospitable* microframe, such as *wonderful* and *gracious*, are included. On the right, compared to Figure 2(B), more words reflecting the nature of the *worst – best* microframe, such as *bad, pathetic, lousy, wrong, horrendous,* and *poor* are shown as top words in terms of the framing intensity shift.

The second way to provide explainability is computing a document-level framing bias (intensity) and visualizing them as a form of a microframe bias (intensity) spectrum. Figure 2(E) shows microframe bias spectra of positive and negative reviews. Each blue and red line corresponds to an individual positive and negative review, respectively. Here we choose microframes that show large differences of microframe bias between the positive and negative reviews as well as high intensities by using the following procedure. We rank microframes based on average microframe intensity across the reviews and the absolute differences of microframe bias between the positive and negative reviews, sum both ranks, and pick the microframes with the lowest rank-sum for each aspect. In contrast to the corpus-level microframe analysis or word-level microframe shift, this document-level microframe analysis provides a mesoscale view showing where each document locates on the microframe bias spectrum.

## Microframe Bias and Intensity Separation

As we show that FrameAxis reasonably captures relevant microframe bias and intensity from positive reviews and negative reviews, now we focus on how the most important dimension of positive and negative reviews—positive sentiment and negative sentiment—is captured by FrameAxis. Consider that there is a microframe that can be mapped into a sentiment of reviews. Then, if FrameAxis works correctly, microframe biases on the corresponding microframe captured from positive reviews and negative reviews should be significantly different.

Formally, we define a *microframe bias separation* as the difference between microframe bias of positive reviews and that of negative reviews on microframe $f$, which is denoted by $\Delta^{pos-neg}_{\mathrm{B}_f}$ = (Microframe bias on microframe $f$ of positive reviews) $-$ (Microframe bias on microframe $f$ of negative reviews) = $\mathrm{B}^{pos}_f - \mathrm{B}^{neg}_f$. Similarly, a *microframe intensity separation* can be defined as following: $\Delta^{pos-neg}_{\mathrm{I}_f}$ = (Microframe intensity on microframe $f$ of positive reviews) - (Microframe intensity on microframe $f$ of negative reviews) = $\mathrm{I}^{pos}_f - \mathrm{I}^{neg}_f$.

Figure 3 shows the cumulative density function (CDF) of the magnitude of microframe bias separations, $|\Delta^{pos-neg}_{\mathrm{B}_f}|$, for 1,621 different microframes for each aspect. Given that the *bad – good* axis is a good proxy for sentiment , the *bad – good* microframe would have a large bias separation *if* the microframe bias on that microframe captures the sentiment correctly. Indeed, the *bad – good* microframe shows a large separation – larger than 99.91 percentile across all aspects (1.5th rank on average). For comparison, the *irreligious – religious* microframe does not separate positive and negative restaurant reviews well (19.88 percentile, 1,298.8th rank on average). The large microframe bias separation between the microframe bias of positive reviews and that of negative reviews supports that the *bad – good* microframe—and thus FrameAxis—captures the most salient dimension of the text.

Using the two separation measures, we can compare two corpora with respect to both microframe intensity and bias. We find that the absolute values of both separations, $|\Delta^{pos-neg}_{\mathrm{I}_f}|$ and $|\Delta^{pos-neg}_{\mathrm{B}_f}|$, are positively correlated across the four aspects (Spearman's correlation $\rho$ = 0.379 (ambience), 0.471 (food), 0.228 (price), and 0.304 (service)), indicating that when a certain microframe is more heavily used, it also tends to be more strongly biased.

To illustrate a detailed picture, we show microframe intensity and bias separation of each microframe in Figure 4. Microframes above the gray horizontal line have higher microframe intensity in positive reviews than negative reviews. We indicate the microframe bias with bold face. **Word**$^+$ indicates that positive reviews are biased toward the pole, and **word**$^-$ means the opposite (negative reviews). For instance, at the top, the label 'sour-**sweet$^+$**' indicates that 'sweetness' of the ambience is highlighted in positive reviews, and the label '**loud$^-$**-soft' indicates that 'loudness' of the ambience frequently appears in negative reviews. For clarity, the labels for microframes are written for top 3 and bottom 3 microframes of $\Delta^{pos-neg}_{\mathrm{I}_f}$ and $\Delta^{pos-neg}_{\mathrm{B}_f}$ each.

This characterization provides a comprehensive view of how microframes are employed in positive and negative reviews for highlighting different perspectives. For instance, when people write reviews about the price of a restaurant, *incredible, nice, good, cheap, incomparable, best,* and *pleasant* perspectives are highlighted in positive reviews, but *judgmental, unoriginal, pointless,* and *unnecessary* are highlighted in negative reviews. From the document-level framing spectrum analysis, the strongest 'judgmental' and 'unnecessary' microframe biases are found from the reviews about the reasoning behind pricing, such as 'Somewhat pricey but what the heck.'

While some generic microframes, such as *incredible – credible* or *worst – best*, are commonly found across different aspects, aspect-specific microframes, such as *uncrowded – crowded* or *inhospitable – hospitable*, are found in the reviews about corresponding aspect. Most of the microframe biases in the positive reviews convey positive connotations, and those in the negative reviews convey negative connotations.

## Human Evaluation

We perform human evaluations through Amazon Mechanical Turk (MTurk). Similar with the word intrusion test in evaluating topic modeling , we assess the quality of identified framing bias and intensity by human raters.

| (Sentiment) Aspect | Accuracy for framing bias | Accuracy for framing intensity |
|:---|:--:|:--:|
| (+) Service | 1.000 | 0.867 |
| (+) Price | 0.867 | 0.733 |
| (+) Food | 0.933 | 0.800 |
| (+) Ambience | 1.000 | 0.600 |
| ($-$) Service | 0.867 | 0.867 |
| ($-$) Price | 0.667 | 0.667 |
| ($-$) Food | 0.867 | 0.733 |
| ($-$) Ambience | 0.800 | 0.733 |
| Average | 0.875 | 0.750 |

Human evaluation for significant microframes with the top 10 highest framing bias and intensity.

For microframe bias, we prepare the top 10 significant microframes with the highest microframe bias (i.e., answer set) and randomly selected 10 microframes with an arbitrary bias (i.e., random set) for each pair of aspect and sentiment (e.g., *positive* reviews about *ambience*). As it is hard to catch subtle differences of the magnitude of microframe biases and intensity through crowdsourcing, we highlight microframe bias on each microframe with bold-faced like Figure 4 instead of showing its numeric value. We then ask which set of microframe with a highlighted bias do better characterize a given corpus, such as 'positive' reviews on 'ambience'. See *Methods* for detail.

For microframe intensity, we prepare the top 10 significant microframes (i.e., answer set) and randomly selected 10 microframes (i.e., random set) for each pair of aspect and sentiment. We then ask which set of microframe do better characterize a given corpus, such as 'positive' reviews on 'ambience'.

Table 1 shows the fraction of the correct choices of workers (i.e., choosing the answer set). The overall average accuracy is 87.5% and 75.0% for significant microframes with the highest microframe bias and intensity, respectively. For microframe bias, in (+) Service and (+) Ambience, human raters chose the answer sets correctly without errors. By contrast, for microframe intensity, some sets show a relatively lower performance. We manually check them for error analysis and find that workers tended to choose the random set when generic microframes, such as *positive – negative*, appear in a random set due to its ease of interpretation.

### Contextually Relevant Microframes

As we mentioned in *Method*, in addition to automatically identified microframes that are strongly expressed in a corpus, we can discover microframes that are relevant to a given topic without examining the corpus. We use each aspect—food, price, ambience, and service—as topic words. By using the embedding-based approach, we find *healthy – unhealthy* for food, *cheap – expensive* for price, *noisy – quiet* for ambience, and *private – public* for service as the most relevant microframes. It is also possible to use different words as topic words for identifying relevant microframes. For example, one might be curious about how people think about waiters specifically among the reviews on service. In this case, the most relevant microframes become *impolite – polite* and *attentive – inattentive* by using 'waiter' as a topic word. Then, the computed microframe bias and intensity show how these microframes are used in a given corpus.

## Microframe in Political News

As a demonstration of another practical application of FrameAxis, we examine news media. The crucial role of media's framing in public discourse on social issues has been widely recognized . We show that FrameAxis can be used as an effective tool to characterize news on different issues through microframe bias and intensity. We collect 50,073 news headlines of 572 liberal and conservative media from AllSides . These headlines fall in one of predefined issues defined by AllSides, such as *abortion, immigration, elections, education, polarization,* and so on. We examine framing bias and intensity from the headlines for a specific issue, considering all three aforementioned scenarios.

The first scenario is when *domain experts already know which microframes are worth to examine*. For example, news about immigration can be approached through a *illegal – legal* framing . In this case, FrameAxis can reveal how strong 'illegal vs. legal' media framing is and which position a media outlet has through the microframe bias and intensity on the *illegal – legal* microframe.

Figure 5(A)-(C) show how FrameAxis can capture microframes used in news reporting with different granularity: (A) media-level microframe bias-intensity map, (B) word-level microframe bias shift, and (C) document (news headline)-level microframe bias spectrum. Figure 5(A) exhibits the average microframe intensity and bias of individual media, which we call a microframe bias-intensity map. To reveal the general tendency of conservative and liberal media's microframe, we also plot their mean on the map. For clarity, we filter out media that have less than 20 news headlines about immigration. Conservative media have higher microframe intensity than liberal media, meaning that they more frequently report the *illegal – legal* microframe of the immigration issue than liberal media do. In addition, conservative media have the microframe bias that is closer to illegal than legal compared to liberal media, meaning that they report more on the illegality of the immigration issue. In summary, the media-level microframe bias-intensity map presents framing patterns of news media on the immigration issue; conservative media do report illegal perspectives more than legal perspectives of the issue and do more frequently report them than liberal media do.

Figure 5(B) shows the top words that contribute the most to the microframe bias on the *illegal-legal* microframe in conservative and liberal media. Conservative media use the word 'illegal' much more than background corpus (i.e., liberal and centered media). Also, they use the word 'amnesty' more frequently, for example, within the context of 'Another Court Strikes Down Obama's Executive Amnesty (Townhall)', and 'patrol' within the context of 'Border Patrol surge as illegal immigrants get more violent (Washington Times)'. Liberal media mention the word 'illegal' much less than the background and the words 'reform', 'opinion', and 'legal' more.

Figure 5(C) shows a document (news headline)-level microframe bias spectrum on the *illegal – legal* microframe. The news headline with the highest microframe bias toward 'illegal' is 'U.S. to Stop Deporting Some Illegal Immigrants (Wall Street Journal - News)', and the news headline with the highest microframe bias toward 'legal' is 'Why Trump's Immigration Order is Legal and Constitutional (National Review)'. Compared to a microframe bias-intensity map that shows how individual media use microframes, the microframe bias spectrum makes headline-level microframe biases visible to help to understand which news headlines express what bias.

Considering the second scenario, where we use microframe intensity and bias separation (or microframe intensity and bias compared to a null model) to explore potential microframes in a corpus, we examine the *relaxed – tense* microframe which displays strong intensity separation in news on gun control and gun right issues. Figure 5(D)-(F) show media-, word-, and document-level microframes found by FrameAxis. The average microframe intensity on the *relaxed – tense* microframe is higher in liberal media than conservative media, and the microframe bias of liberal media is toward to 'tense' compared to conservative media. Word-level microframe shift diagrams clearly show that liberal media focus much more on the devastating aspects of gun control, whereas conservative media do not evoke those strong images but focus more on the owner's rights. Figure 5(F) shows news headlines that are the closest to 'tense.' The key advantage of employing word embedding in FrameAxis is again demonstrated here; out of two headlines in Figure 5(F), none has the word 'tense,' but other words, such as violence or gunfight, deliver the microframe bias toward 'tense.' Although *relaxed – tense* may not be the kind of microframes that are considered in traditional framing analysis, it aptly captures the distinct depictions of the issue in media, opening up doors to further analysis.

The microframe bias-intensity map correctly captures the political leaning of news media as in Figure 6. Figure 6(A) and (C) are the microframe bias-intensity maps of news on Democratic party, and Figure 6(B) and (D) are those on Republic party. We test the *bad – good* microframe for Figure 6(A) and (B) and the *irrational – rational* microframe for Figure 6(C) and (D). The captured bias fits the intuition; Liberal news media show microframe bias toward 'good' and 'rational' when they report the Democratic party, and conservative news media show the same bias when they report the Republican party. Interestingly, their microframe intensity becomes higher when they highlight negative perspectives of those microframes, such as 'bad' and 'irrational.'

As we mentioned earlier, we can also discover relevant microframes given a topic (See *Methods*). As an example, we compute the most relevant microframes given 'abortion' as a topic in Figure 7. The most relevant microframes to news about 'abortion' indeed capture key dimensions in the abortion debate . Of course, it is not guaranteed that conservative and liberal media differently use those microframes. The average microframe biases of conservative and liberal media on the four microframes are indeed not statistically different ($p > 0.1$). However, modeling contextual relevance provides a capability to discover relevant microframes to a given corpus easily even *before* examining the actual data.

# Discussion

In this work, we propose an unsupervised method for characterizing the text by using word embeddings. We demonstrated that FrameAxis can successfully characterize the text through microframe bias and intensity. How biased the text is on a certain microframe (microframe bias) and how actively a certain microframe is used (microframe intensity) provide a nuanced characterization of the text. Particularly, we showed that FrameAxis can support different scenarios: when an important microframe is known (e.g., the *illegal vs. legal* microframe on an immigration issue), when exploration of potential microframes is needed, and when contextually relevant microframes are automatically discovered. The explainability through a document-level microframe spectrum and word-level microframe shift diagram is useful to understand how and why the resulting microframe bias and intensity are captured. They make FrameAxis transparent and help to minimize the risk of spurious correlation that might be embedded in pretrained word embeddings.

We applied FrameAxis to casual texts (i.e., restaurant reviews) and political texts (i.e., political news). In addition to a rich set of predefined microframes, FrameAxis can compute microframe bias and intensity on an arbitrary microframe, so long as it is defined by two (antonymous) words. This flexibility provides a great opportunity to study microframes in diverse domains. The existing domain knowledge can be harmoniously combined with FrameAxis by guiding candidate microframes to test and fine-tuning automatically discovered microframes.

Some limitations should be noted. First, word embedding models contain various biases. For example, the word 'immigrant' is closer to 'illegal' than 'legal' (0.463 vs. 0.362) in the GloVe word embedding. Indeed, multiple biases, such as gender or racial bias, in pretrained word embeddings have been documented . While those biases provide an opportunity to study prejudices and stereotypes in our society over time , it is also possible to capture incorrect microframe bias due to the bias in the word embeddings (or language models). While several approaches are proposed to debias word embeddings , they have failed to remove those biases completely . Nevertheless, since FrameAxis does not depend on specific pretrained word embedding models, FrameAxis can fully benefit from newly developed word embeddings in the future, which minimize unexpected biases. When using word embeddings with known biases, it may be possible to minimize the effects of such biases through an iterative process as follows: (1) computing microframe bias and intensity; (2) finding top $N$ words that shift the microframe bias and shift; (3) identifying words that reflect stereotypic biases; and (4) replacing those words with an $<$UNK$>$ token, which is out of vocabulary and thus is not included in the microframe bias and intensity computation, and repeat this process of refinement. The iteration ends when there are no stereotypical words are found in (3). Although some stereotypic biases may exist beyond $N$, depending on $N$, their contribution to microframe shift may be suppressed enough.

Second, an inherent limitation of a dictionary-based approach behind microframe bias and intensity computation exists. Figure 2(E) reveals the limitation. While 'There was no ambience' conveys a negative connotation, its microframe bias is computed as closer to beautiful than ugly. This error can be potentially addressed by sophisticated end-to-end approaches to model representations of sentences, such as Sentence Transformers . While we use a dictionary-based approach for its simplicity and interpretability in this work, FrameAxis can support other methods, including Sentence Transformers, in computing microframe bias and intensity as well. As a proof-of-concept, we use Sentence Transformers to handle the case in Figure 2(E), which is that 'there was no ambiance' has framing bias closer to 'beautiful' than 'ugly'. We compute the representation of three sentences: 'there was no ambience', 'ambience is beautiful', and 'ambience is ugly'. Then, we find that the similarity between 'there was no ambience' and 'ambience is beautiful' (0.3209) is less than that between 'there was no ambience' and 'ambience is ugly' (0.6237). This result indicates that Sentence Transformers correctly understands that the meaning of sentences. As the dictionary-based approach has its own strengths in simplicity and interpretability, future work may seek a way to blend the strengths of different approaches. Even with these limitations, we argue that our approach can greatly help researchers across fields to harness the power of neural embedding methods for text analysis and systematically scale up framing analysis to internet-scale corpora.

We release the source code of FrameAxis, and we will develop it as an easy-to-use library with supporting visualization tools for analyzing microframe bias and intensity for a broader audience. We believe that such efforts would facilitate computational analyses of microframes across disciplines.

# Acknowledgments

This research was supported by the Singapore Ministry of Education (MOE) Academic Research Fund (AcRF) Tier 1 grant, Defense Advanced Research Projects Agency (DARPA), contract W911NF17-C-0094, of the United States of America, and the Air Force Office of Scientific Research under award number FA9550-19-1-0391. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.