summaries: This paper seeks to separate "causal" features from ones with spurious correlations in the context of natural language machine learning tasks. The proposed approach is to ask human annotators to alter examples in a minimal way that changes the label. Thereby the humans separate out the causal features (those changed) from the spurious or irrelevant features (those left unchanged).

summaries: The authors propose a new way to augment textual datasets for the task of sentiment analysis, in order to help the learning methods to generalize better by concentrating on learning the different that makes a difference. The main idea of the paper is to augment existing datasets with minimally counteractual versions of them, that change the sentiment of the documents. In this way, all spurious factors will naturally cancel out. The authors use the newly created datasets and show that indeed, the retrained algorithms on the augmented datasets generalize much better.

summaries: This paper addresses the problem of building models for NLP tasks that are robust against spurious correlations in the data by introducing a human-in-the-loop method: annotators are asked to modify data-points minimally in order to change the label.  They refer to this process as counterfactual augmentation.  The authors apply this method to the IMDB sentiment dataset and to SNLI and show (among other things) that many models cannot generalize from the original dataset to the counterfactually-augmented one.

abstractText: Despite alarm over the reliance of machine learning systems on so-called spurious patterns, the term lacks coherent meaning in standard statistical frameworks. However, the language of causality offers clarity: spurious associations are due to confounding (e.g., a common cause), but not direct or indirect causal effects. In this paper, we focus on natural language processing, introducing methods and resources for training models less sensitive to spurious patterns. Given documents and their initial labels, we task humans with revising each document so that it (i) accords with a counterfactual target label; (ii) retains internal coherence; and (iii) avoids unnecessary changes. Interestingly, on sentiment analysis and natural language inference tasks, classifiers trained on original data fail on their counterfactually-revised counterparts and vice versa. Classifiers trained on combined datasets perform remarkably well, just shy of those specialized to either domain. While classifiers trained on either original or manipulated data alone are sensitive to spurious features (e.g., mentions of genre), models trained on the combined data are less sensitive to this signal. Both datasets are publicly available1.

authors:
Samuel R Bowman
Gabor Angeli
Christopher Potts
Christopher D Manning

title: A large annotated corpus for learning natural language inference

venue: In Empirical Methods in Natural Language Processing (EMNLP),

authors:
Danqi Chen
Jason Bolton
Christopher D Manning

title: A thorough examination of the cnn/daily mail reading comprehension

authors:
Jacob Devlin
Ming-Wei Chang
Kenton Lee
Kristina Toutanova. Bert

title: Pre-training of deep bidirectional transformers for language understanding

authors:
Lucas Dixon
John Li
Jeffrey Sorensen
Nithum Thain
Lucy Vasserman

title: Measuring and mitigating unintended bias in text classification

venue: In AAAI/ACM Conference on AI, Ethics, and Society

authors:
Robert Geirhos
Patricia Rubisch
Claudio Michaelis
Matthias Bethge
Felix A Wichmann
Wieland Brendel

title: Imagenet-trained cnns are biased towards texture; increasing shape bias improves accuracy and robustness

venue: arXiv preprint arXiv:1811.12231,

authors:
Max Glockner
Vered Shwartz
Yoav Goldberg

title: Breaking nli systems with sentences that require simple lexical inferences

venue: In Association for Computational Linguistics (ACL),

authors:
Alex Graves
Jürgen Schmidhuber

title: Framewise phoneme classification with bidirectional lstm and other neural network architectures

venue: Neural networks,

authors:
Suchin Gururangan
Swabha Swayamdipta
Omer Levy
Roy Schwartz
Samuel Bowman
Noah A Smith

title: Annotation artifacts in natural language inference data. In North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACLHLT), 2018

authors:
Karl Moritz Hermann
Tomas Kocisky
Edward Grefenstette
Lasse Espeholt
Will Kay
Mustafa Suleyman
Phil Blunsom

title: Teaching machines to read and comprehend

venue: In Advances in Neural Information Processing Systems (NeurIPS),

title: Generating natural language under pragmatic constraints

venue: Journal of Pragmatics,

authors:
Mohit Iyyer
John Wieting
Kevin Gimpel
Luke Zettlemoyer

title: Adversarial example generation with syntactically controlled paraphrase networks. In North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT), 2018

authors:
Robin Jia
Percy Liang

title: Adversarial examples for evaluating reading comprehension systems

authors:
Jason Jo
Yoshua Bengio

title: Measuring the tendency of cnns to learn surface statistical regularities

venue: arXiv preprint arXiv:1711.11561,

authors:
Divyansh Kaushik
Zachary C Lipton

title: How much reading does reading comprehension require? a critical investigation of popular benchmarks

authors:
Diederik P Kingma
Jimmy Ba

title: Adam: A method for stochastic optimization

venue: In International Conference on Learning Representations (ICLR),

authors:
Svetlana Kiritchenko
Saif Mohammad

title: Examining gender and race bias in two hundred sentiment analysis systems

venue: In Joint Conference on Lexical and Computational Semantics (*SEM),

authors:
Kaiji Lu
Piotr Mardziel
Fangjing Wu
Preetam Amancharla
Anupam Datta

title: Gender bias in neural natural language processing

venue: arXiv preprint arXiv:1807.11714,

authors:
Andrew L Maas
Raymond E Daly
Peter T Pham
Dan Huang
Andrew Y Ng
Christopher Potts

title: Learning word vectors for sentiment analysis

venue: In Association for Computational Linguistics: Human Language Technologies (ACL-HLT),

authors:
Rowan Hall Maudslay
Hila Gonen
Ryan Cotterell
Simone Teufel

title: It’s all in the name: Mitigating gender bias with name-based counterfactual data substitution

authors:
Vinod Nair
Geoffrey E Hinton

title: Rectified linear units improve restricted boltzmann machines

venue: In International Conference on Machine Learning (ICML),

authors:
Jianmo Ni
Jiacheng Li
Julian McAuley

title: Justifying recommendations using distantly-labeled reviews and fine-grained aspects

venue: In Empirical Methods in Natural Language Processing and International Joint Conference on Natural Language Processing (EMNLP-IJCNLP),

authors:
F. Pedregosa
G. Varoquaux
A. Gramfort
V. Michel
B. Thirion
O. Grisel
M. Blondel
P. Prettenhofer
R. Weiss
V. Dubourg
J. Vanderplas
A. Passos
D. Cournapeau
M. Brucher
M. Perrot
E. Duchesnay

title: Scikit-learn: Machine learning in Python

venue: Journal of Machine Learning Research (JMLR),

authors:
Matthew E Peters
Mark Neumann
Mohit Iyyer
Matt Gardner
Christopher Clark
Kenton Lee
Luke Zettlemoyer

title: Deep contextualized word representations. In North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT), 2018

authors:
Jonas Pfeiffer
Aishwarya Kamath
Iryna Gurevych
Sebastian Ruder

title: What do deep networks like to read

venue: arXiv preprint arXiv:1909.04547,

authors:
Adam Poliak
Jason Naradowsky
Aparajita Haldar
Rachel Rudinger
Benjamin Van Durme

title: Hypothesis Only Baselines in Natural Language Inference

venue: In Joint Conference on Lexical and Computational Semantics (*Sem),

authors:
Stefanos Poulis
Sanjoy Dasgupta

title: Learning with feature feedback: from theory to practice

venue: In Artificial Intelligence and Statistics (AISTATS),

authors:
Marco Tulio Ribeiro
Sameer Singh
Carlos Guestrin

title: Semantically equivalent adversarial rules for debugging nlp models

authors:
Sara Rosenthal
Noura Farra
Preslav Nakov

title: SemEval-2017 task 4: Sentiment analysis in twitter

venue: In International Workshop on Semantic Evaluation (SemEval),

authors:
Judy Hanwen Shen
Lauren Fratamico
Iyad Rahwan
Alexander M Rush

title: Darling or babygirl? investigating stylistic bias in sentiment analysis. 5th Workshop on Fairness, Accountability, and Transparency in Machine Learning (FATML), 2018

authors:
Eric Wallace
Shi Feng
Nikhil Kandpal
Matt Gardner
Sameer Singh

title: Universal adversarial triggers for nlp

venue: arXiv preprint arXiv:1908.07125,

authors:
Omar Zaidan
Jason Eisner
Christine Piatko

title: Using annotator rationales to improve machine learning for text categorization

authors:
Omar F Zaidan
Jason Eisner

title: Modeling annotators: A generative approach to learning from annotator rationales

venue: In Empirical Methods in Natural Language Processing (EMNLP). Association for Computational Linguistics,

authors:
Jieyu Zhao
Tianlu Wang
Mark Yatskar
Vicente Ordonez
Kai-Wei Chang

title: Gender bias in coreference resolution: Evaluation and debiasing methods

authors:
Ran Zmigrod
Sebastian J. Mielke
Hanna Wallach
Ryan Cotterell

title: Counterfactual data augmentation for mitigating gender stereotypes in languages with rich morphology

heading: 1 INTRODUCTION

text:
What makes a document’s sentiment positive? What makes a loan applicant creditworthy? What makes a job candidate qualified? When does a photograph truly depict a dolphin? Moreover, what does it mean for a feature to be relevant to such a determination?
Statistical learning offers one framework for approaching these questions. First, we swap out the semantic question for a more readily answerable associative question. For example, instead of asking what conveys a document’s sentiment, we recast the question as which documents are likely to be labeled as positive (or negative)? Then, in this associative framing, we interpret as relevant, those features that are most predictive of the label. However, despite the rapid adoption and undeniable commercial success of associative learning, this framing seems unsatisfying.
Alongside deep learning’s predictive wins, critical questions have piled up concerning spurious patterns, artifacts, robustness, and discrimination, that the purely associative perspective appears ill-equipped to answer. For example, in computer vision, researchers have found that deep neural networks rely on surface-level texture (Jo & Bengio, 2017; Geirhos et al., 2018) or clues in the image’s background to recognize foreground objects even when that seems both unnecessary and somehow wrong: the beach is not what makes a seagull a seagull. And yet, researchers struggle to articulate precisely why models should not rely on such patterns.
In natural language processing (NLP), these issues have emerged as central concerns in the literature on annotation artifacts and societal biases. Across myriad tasks, researchers have demonstrated that models tend to rely on spurious associations (Poliak et al., 2018; Gururangan et al., 2018; Kaushik & Lipton, 2018; Kiritchenko & Mohammad, 2018). Notably, some models for question-answering tasks may not actually be sensitive to the choice of the question (Kaushik & Lipton, 2018), while in Natural Language Inference (NLI), classifiers trained on hypotheses only (vs hypotheses and premises) perform surprisingly well (Poliak et al., 2018; Gururangan et al., 2018). However, papers
1https://github.com/dkaushik96/counterfactually-augmented-data
seldom make clear what, if anything, spuriousness means within the standard supervised learning framework. ML systems are trained to exploit the mutual information between features and a label to make accurate predictions. The standard statistical learning toolkit does not offer a conceptual distinction between spurious and non-spurious associations.
Causality, however, offers a coherent notion of spuriousness. Spurious associations owe to confounding rather than to a (direct or indirect) causal path. We might consider a factor of variation to be spuriously correlated with a label of interest if intervening upon it would not impact the applicability of the label or vice versa. While our paper does not call upon the mathematical machinery of causality, we draw inspiration from the underlying philosophy to design a new dataset creation procedure in which humans counterfactually revise documents.
Returning to NLP, although we lack automated tools for mapping between raw text and disentangled factors, we nevertheless describe documents in terms of these abstract representations. Moreover, it seems natural to speak of manipulating these factors directly (Hovy, 1987). Consider, for example, the following interventions: (i) Revise the letter to make it more positive; (ii) Edit the second sentence so that it appears to contradict the first. These edits might be thought of as intervening on only those aspects of the text that are necessary to make the counterfactual label applicable.
In this exploratory paper, we design a human-in-the-loop system for counterfactually manipulating documents. Our hope is that by intervening only upon the factor of interest, we might disentangle the spurious and non-spurious associations, yielding classifiers that hold up better when spurious associations do not transport out of domain. We employ crowd workers not to label documents, but rather to edit them, manipulating the text to make a targeted (counterfactual) class applicable. For sentiment analysis, we direct the worker to revise this negative movie review to make it positive, without making any gratuitous changes. We might regard the second part of this directive as a least action principle, ensuring that we perturb only those spans necessary to alter the applicability of the label. For NLI, a 3-class classification task (entailment, contradiction, neutral), we ask the workers to modify the premise while keeping the hypothesis intact, and vice versa, collecting edits corresponding to each of the (two) counterfactual classes. Using this platform, we collect thousands of counterfactually-manipulated examples for both sentiment analysis and NLI, extending the IMDb (Maas et al., 2011) and SNLI (Bowman et al., 2015) datasets, respectively. The result is two new datasets (each an extension of a standard resource) that enable us to both probe fundamental properties of language and train classifiers less reliant on spurious signal.
We show that classifiers trained on original IMDb reviews fail on counterfactually-revised data and vice versa. We further show that spurious correlations in these datasets are even picked up by linear models. However, augmenting the revised examples breaks up these correlations (e.g., genre ceases to be predictive of sentiment). For a Bidirectional LSTM (Graves & Schmidhuber, 2005) trained on IMDb reviews, classification accuracy goes down from 79.3% to 55.7% when evaluated on original vs revised reviews. The same classifier trained on revised reviews achieves an accuracy of 89.1% on revised reviews compared to 62.5% on their original counterparts. These numbers go to 81.7% and 92.0% on original and revised data, respectively, when the classifier is retrained on the combined dataset. Similar patterns are observed for linear classifiers. We discovered that BERT (Devlin et al., 2019) is more resilient to such drops in performance on sentiment analysis.
Additionally, SNLI models appear to rely on spurious associations as identified by Gururangan et al. (2018). Our experiments show that when fine-tuned on original SNLI sentence pairs, BERT fails on pairs with revised premise and vice versa, suffering more than a 30 point drop in accuracy. Fine-tuned on the combined set, BERT’s performance improves significantly across all datasets. Similarly, a Bi-LSTM trained on (original) hypotheses alone can accurately classify 69% of pairs correctly but performs worse than the blind classifier when evaluated on the revised dataset. When trained on hypotheses only from the combined dataset, its performance is not appreciably better than random guessing.

heading: 2 RELATED WORK

text:
Several papers demonstrate cases where NLP systems appear not to learn what humans consider to be the difference that makes the difference. For example, otherwise state-of-the-art models have been shown to be vulnerable to synthetic transformations such as distractor phrases (Jia & Liang, 2017; Wallace et al., 2019), to misclassify paraphrased task (Iyyer et al., 2018; Pfeiffer et al., 2019) and to fail on template-based modifications (Ribeiro et al., 2018). Glockner et al. (2018) demonstrate that simply replacing words by synonyms or hypernyms, which should not alter the applicable label, nevertheless breaks ML-based NLI systems. Gururangan et al. (2018) and Poliak et al. (2018) show that classifiers correctly classified the hypotheses alone in about 69% of SNLI corpus. They further discover that crowd workers adopted specific annotation strategies and heuristics for data generation. Chen et al. (2016) identify similar issues exist with automatically-constructed benchmarks for question-answering (Hermann et al., 2015). Kaushik & Lipton (2018) discover that reported numbers in question-answering benchmarks could often be achieved by the same models when restricted to be blind either to the question or to the passages. Dixon et al. (2018); Zhao et al. (2018) and Kiritchenko & Mohammad (2018) showed how imbalances in training data lead to unintended bias in the resulting models, and, consequently, potentially unfair applications. Shen et al. (2018) substitute words to test the behavior of sentiment analysis algorithms in the presence of stylistic variation, finding that similar word pairs produce significant differences in sentiment score.
Several papers explore richer feedback mechanisms for classification. Some ask annotators to highlight rationales, spans of text indicative of the label (Zaidan et al., 2007; Zaidan & Eisner, 2008; Poulis & Dasgupta, 2017). For each document, Zaidan et al. remove the rationales to generate contrast documents, learning classifiers to distinguish original documents from their contrasting counterparts. While this feedback is easier to collect than ours, how to leverage it for training deep NLP models, where features are not neatly separated, remains less clear.
Lu et al. (2018) programmatically alter text to invert gender bias and combined the original and manipulated data yielding gender-balanced dataset for learning word embeddings. In the simplest experiments, they swap each gendered word for its other-gendered counterpart. For example, the doctor ran because he is late becomes the doctor ran because she is late. However, they do not substitute names even if they co-refer to a gendered pronoun. Building on their work, Zmigrod et al. (2019) describe a data augmentation approach for mitigating gender stereotypes associated with animate nouns for morphologically-rich languages like Spanish and Hebrew. They use a Markov random field to infer how the sentence must be modified while altering the grammatical gender of particular nouns to preserve morpho-syntactic agreement. In contrast, Maudslay et al. (2019) describe a method for probabilistic automatic in-place substitution of gendered words in a corpus. Unlike Lu et al., they propose an explicit treatment of first names by pre-defining name-pairs for swapping, thus expanding Lu et al.’s list of gendered word pairs significantly.

heading: 3 DATA COLLECTION

text:
We use Amazon’s Mechanical Turk crowdsourcing platform to recruit editors to revise each document. To ensure high quality of the collected data, we restricted the pool to U.S. residents that had already completed at least 500 HITs and had an over 97% HIT approval rate. For each HIT, we conducted pilot tests to identify appropriate compensation per assignment, receive feedback from workers and revise our instructions accordingly. A total of 713 workers contributed throughout the whole process, of which 518 contributed edits reflected in the final datasets.
Sentiment Analysis The original IMDb dataset consists of 50k reviews divided equally across train and test splits. To keep the task of editing from growing unwieldy, we filter out the longest 20% of reviews, leaving 20k reviews in the train split from which we randomly sample 2.5k reviews, enforcing a 50:50 class balance. Following revision by the crowd workers, we partition this dataset into train/validation/test splits containing 1707, 245 and 488 examples, respectively. We present each review to two workers, instructing them to revise the review such that (a) the counterfactual label applies; (b) the document remains coherent; and (c) no unecessary modifications are made.
Over a four week period, we manually inspected each generated review and rejected the ones that were outright wrong (sentiment was still the same or the review was a spam). After review, we rejected roughly 2% of revised reviews. For 60 original reviews, we did not approve any among the counterfactually-revised counterparts supplied by the workers. To construct the new dataset, we chose one revised review (at random) corresponding to each original review. In qualitative analysis, we identified eight common patterns among the edits (Table 2).
By comparing original reviews to their counterfactually-revised counterparts we gain insight into which aspects are causally relevant. To analyze inter-editor agreement, we mark indices corresponding to replacements and insertions, representing the edits in each original review by a binary vector. Using these representations, we compute the Jaccard similarity between the two reviews (Table 1), finding it to be negatively correlated with the length of the review.
Natural Language Inference Unlike sentiment analysis, SNLI is 3-way classification task, with inputs consisting of two sentences, a premise and a hypothesis and the three possible labels being entailment, contradiction, and neutral. The label is meant to describe the relationship between the facts stated in each sentence. We randomly sampled 1750, 250, and 500 pairs from the train, validation, and test sets of SNLI respectively, constraining the new data to have balanced classes. In one HIT, we asked workers to revise the hypothesis while keeping the premise intact, seeking edits corresponding to each of the two counterfactual classes. We refer to this data as Revised Hypothesis
(RH). In another HIT, we asked workers to revise the original premise, while leaving the original hypothesis intact, seeking similar edits, calling it Revised Premise (RP).
Following data collection, we employed a different set of workers to verify whether the given label accurately described the relationship between each premise-hypothesis pair. We presented each pair to three workers and performed a majority vote. When all three reviewers were in agreement, we approved or rejected the pair based on their decision, else, we verified the data ourselves. Finally, we only kept premise-hypothesis pairs for which we had valid revised data in both RP and RH, corresponding to both counterfactual labels. As a result, we discarded ≈ 9% data. RP and RH, each comprised of 3332 pairs in train, 400 in validation, and 800 in test, leading to a total of 6664 pairs in train, 800 in validation, and 1600 in test in the revised dataset. In qualitative analysis, we identified some common patterns among hypothesis and premise edits (Table 3, 4).
We collected all data after IRB approval and measured the time taken to complete each HIT to ensure that all workers were paid more than the federal minimum wage. During our pilot studies, workers spent roughly 5 minutes per revised review, and 4 minutes per revised sentence (for NLI). We paid workers $0.65 per revision, and $0.15 per verification, totalling $10778.14 for the study.

heading: 4 MODELS

text:
Our experiments rely on the following five models: Support Vector Machines (SVMs), Naı̈ve Bayes (NB) classifiers, Bidirectional Long Short-Term Memory Networks (Bi-LSTMs; Graves & Schmidhuber, 2005), ELMo models with LSTM, and fine-tuned BERT models (Devlin et al., 2019). For brevity, we discuss only implementation details necessary for reproducibility.
Standard Methods We use scikit-learn (Pedregosa et al., 2011) implementations of SVMs and Naı̈ve Bayes for sentiment analysis. We train these models on TF-IDF bag of words feature representations of the reviews. We identify parameters for both classifiers using grid search conducted over the validation set.
Bi-LSTM When training Bi-LSTMs for sentiment analysis, we restrict the vocabulary to the most frequent 20k tokens, replacing out-of-vocabulary tokens by UNK. We fix the maximum input length at 300 tokens and pad smaller reviews. Each token is represented by a randomly-initialized 50-dimensional embedding. Our model consists of a bidirectional LSTM (hidden dimension 50) with recurrent dropout (probability 0.5) and global max-pooling following the embedding layer. To generate output, we feed this (fixed-length) representation through a fully-connected hidden layer with ReLU (Nair & Hinton, 2010) activation (hidden dimension 50), and then a fully-connected output layer with softmax activation. We train all models for a maximum of 20 epochs using Adam (Kingma & Ba, 2015), with a learning rate of 1e−3 and a batch size of 32. We apply early stopping when validation loss does not decrease for 5 epochs. We also experimented with a larger Bi-LSTM which led to overfitting. We use the architecture due to Poliak et al. (2018) to evaluate hypothesisonly baselines.2
ELMo-LSTM We compute contextualized word representations (ELMo) using character-based word representations and bidirectional LSTMs (Peters et al., 2018). The module outputs a 1024- dimensional weighted sum of representations from the 3 Bi-LSTM layers used in ELMo. We represent each word by a 128-dimensional embedding concatenated to the resulting 1024-dimensional ELMo representation, leading to a 1152-dimensional hidden representation. Following Batch Normalization, this is passed through an LSTM (hidden size 128) with recurrent dropout (probability
2https://github.com/azpoliak/hypothesis-only-NLI
0.2). The output from this LSTM is then passed to a fully-connected output layer with softmax activation. We train this model for up to 20 epochs with same early stopping criteria as for Bi-LSTM, using the Adam optimizer with a learning rate of 1e−3 and a batch size of 32. BERT We use an off-the-shelf uncased BERT Base model, fine-tuning for each task.3 To account for BERT’s sub-word tokenization, we set the maximum token length is set at 350 for sentiment analysis and 50 for NLI. We fine-tune BERT up to 20 epochs with same early stopping criteria as for Bi-LSTM, using the BERT Adam optimizer with a batch size of 16 (to fit on a Tesla V-100 GPU). We found learning rates of 5e−5 and 1e−5 to work best for sentiment analysis and NLI respectively.
3https://github.com/huggingface/pytorch-transformers

heading: 5 EXPERIMENTAL RESULTS

text:
Sentiment Analysis We find that for sentiment analysis, linear models trained on the original 1.7k reviews achieve 80% accuracy when evaluated on original reviews but only 51% (level of random guessing) on revised reviews (Table 5). Linear models trained on revised reviews achieve 91% accuracy on revised reviews but only 58.3% on the original test set. We see similar pattern for Bi-LSTMs where accuracy drops substantially in both directions. Interestingly, while BERT models suffer drops too, they are less pronounced, perhaps a benefit of the exposure to a larger dataset where the spurious patterns may not have held. Classifiers trained on combined datasets perform well on both, often within≈ 3 pts of models trained on the same amount of data taken only from the original distribution. Thus, there may be a price to pay for breaking the reliance on spurious associations, but it may not be substantial.
We also conduct experiments to evaluate our sentiment models vis-a-vis their generalization out-ofdomain to new domains. We evaluate models on Amazon reviews (Ni et al., 2019) on data aggregated over six genres: beauty, fashion, appliances, giftcards, magazines, and software, the Twitter sentiment dataset (Rosenthal et al., 2017),4 and Yelp reviews released as part of the Yelp dataset challenge. We show that in almost all cases, models trained on the counterfactually-augmented IMDb dataset perform better than models trained on comparable quantities of original data.
To gain intuition about what is learnable absent the edited spans, we tried training several models on passages where the edited spans have been removed from training set sentences (but not test set). SVM, Naı̈ve Bayes, and Bi-LSTM achieve 57.8%, 59.1%, 60.2% accuracy, respectively, on this task. Notably, these passages are predictive of the (true) label despite being semantially compatible with the counterfactual label. However, BERT performs worse than random guessing.
In one simple demonstration of the benefits of our approach, we note that seemingly irrelevant words such as: romantic, will, my, has, especially, life, works, both, it, its, lives and gives (correlated with positive sentiment), and horror, own, jesus, cannot, even, instead, minutes, your, effort, script, seems and something (correlated with negative sentiment) are picked up as high-weight features by linear models trained on either original or revised reviews as top predictors. However, because humans never edit these during revision owing to their lack of semantic relevance, combining the original and revised datasets breaks these associations and these terms cease to be predictive of sentiment (Fig 4). Models trained on original data but at the same scale as combined data are able to perform slightly better on the original test set but still fail on the revised reviews. All models trained on 19k original reviews receive a slight boost in accuracy on revised data (except Naı̈ve Bayes), yet their performance significantly worse compared to specialized models. Retraining models on a combination of the original 19k reviews with revised 1.7k reviews leads to significant increases in accuracy for all models on classifying revised reviews, while slightly improving the accuracy on classifying the original reviews. This underscores the importance of including counterfactuallyrevised examples in training data.
Natural Language Inference Fine-tuned on 1.67k original sentence pairs, BERT achieves 72.2% accuracy on SNLI dataset but it is only able to accurately classify 39.7% sentence pairs from the RP set (Table 7). Fine-tuning BERT on the full SNLI training set (500k sentence pairs) results in similar behavior. Fine-tuning it on RP sentence pairs improves its accuracy to 66.3% on RP but causes a drop of roughly 20 pts on SNLI. On RH sentence pairs, this results in an accuracy of 67% on RH and 71.9% on SNLI test set but 47.4% on the RP set. To put these numbers in context, each
4We use the development set as test data is not public.
individual hypothesis sentence in RP is associated with two labels, each in the presence of a different premise. A model that relies on hypotheses only would at best perform slightly better than choosing the majority class when evaluated on this dataset. However, fine-tuning BERT on a combination of RP and RH leads to consistent performance on all datasets as the dataset design forces models to look at both premise and hypothesis. Combining original sentences with RP and RH improves these
numbers even further. We compare this with the performance obtained by fine-tuning it on 8.3k sentence pairs sampled from SNLI training set, and show that while the two perform roughly within 4 pts of each other when evaluated on SNLI, the former outperforms latter on both RP and RH.
To further isolate this effect, Bi-LSTM trained on SNLI hypotheses only achieves 69% accuracy on SNLI test set, which drops to 44% if it is retrained on combination of original, RP and RH data (Table 8). Note that this combined dataset consists of five variants of each original premisehypothesis pair. Of these five pairs, three consist of the same hypothesis sentence, each associated with different truth value given the respective premise. Using these hypotheses only would provide conflicting feedback to a classifier during training, thus causing the drop in performance. Further, we notice that the gain of the latter over majority class baseline comes primarily from the original data, as the same model retrained only on RP and RH data experiences a further drop of 11.6% in accuracy, performing worse than just choosing the majority class at all times.
One reasonable concern might be that our models would simply distinguish whether an example were from the original or revised dataset and thereafter treat them differently. The fear might be that our models would exhibit a hypersensitivity (rather than insensitivity) to domain. To test the potential for this behavior, we train several models to distinguish between original and revised data (Table 9). BERT identifies original reviews from revised reviews with 77.3% accuracy. In case of NLI, BERT and Naı̈ve Bayes perform roughly within 3 pts of the majority class baseline (66.7%) whereas SVM performs substantially worse.

heading: 6 CONCLUSION

text: By leveraging humans not only to provide labels but also to intervene upon the data, revising documents to accord with various labels, we can elucidate the difference that makes a difference. Moreover, we can leverage the augmented data to train classifiers less dependent on spurious associations. Our study demonstrates the promise of leveraging human-in-the-loop feedback to disentangle the spurious and non-spurious associations, yielding classifiers that hold up better when spurious associations do not transport out of domain. Our methods appear useful on both sentiment analysis and NLI, two contrasting tasks. In sentiment analysis, expressions of opinion matter more than stated facts, while in NLI this is reversed. SNLI poses another challenge in that it is a 3-class classification task using two input sentences. In future work, we will extend these techniques, leveraging humans in the loop to build more robust systems for question answering and summarization.

heading: ACKNOWLEDGEMENTS

text: The authors are grateful to Amazon AWS and NVIDIA for providing GPUs to conduct the experiments, Salesforce Research and Facebook AI for their generous grants that made the data collection possible, Sina Fazelpour, Sivaraman Balakrishnan, Shruti Rijhwani, Shruti Palaskar, Aishwarya Kamath, Michael Collins, Rajesh Ranganath and Sanjoy Dasgupta for their valuable feedback, and Tzu-Hsiang Lin for his generous help in creating the data collection platform. We also thank Abridge AI, UPMC, the Center for Machine Learning in Health, and the AI Ethics and Governance Fund for their support of our broader research on robust machine learning.

title: ENCE WITH COUNTERFACTUALLY-AUGMENTED DATA


summaries: In the article the authors propose to measure quality of CNN-features by quantifying the orientation tuning and spatial frequency sensitivity of the features. The underlying hypothesis is that properties of features in the human visual cortex are also indicators for quality in CNNs. The authors devise an experiment similar to experiments performed on mammals to check which features are active under which types of basic patterns. Afterwards, a loss-function is devised that uses proportions of the best or worst features according to the metrics and it is shown that features that have high values on the metrics also lead to good performance.

summaries: This paper proposes an analysis of convolutional neural networks (CNNs) features the basis for making perceptual quality comparisons. The analysis is based on the proposed Perceptual Efficacy (PE) Score that measures spatial frequency and orientation selectivity of CNN features. The hypothesis put forward by the authors is that a CNN features with high PE score can be used to formulate a perceptual loss (Eq. 1) that correlates well with human image quality judgement. The authors use a dataset of human image quality judgements to assess their hypothesis.

summaries: The submission aims to analyze deep neural network (DNN) features in terms of how well they measure the perceptual severity of image distortions. It proposes to characterize each DNN feature in terms of two well known properties of the human visual system: a) sensitivity to changes in visual frequency and b) orientation selectivity. Both properties are evaluated with respect to the known human Contrast Sensitivity Function (CSF) and measured empirically from the feature’s response to (oriented) sinusoidal gratings. The results are quantified by a composite score termed Perceptual Efficacy (PE).

abstractText: Pre-trained Deep Convolutional Neural Network (CNN) features have popularly been used as full-reference perceptual quality features for CNN based image quality assessment, super-resolution, image restoration and a variety of imageto-image translation problems. In this paper, to get more insight, we link basic human visual perception to characteristics of learned deep CNN representations as a novel and first attempt to interpret them. We characterize the frequency and orientation tuning of channels in trained image classification deep CNNs (e.g., VGG-16) by applying grating stimuli of different spatial frequencies and orientations as input. We observe that the behavior of CNN channels as spatial frequency and orientation selective filters can be used to link basic human visual perception models to their characteristics. Doing so, we develop a theory to get more insight into deep CNN representations as perceptual quality features. We conclude that sensitivity to spatial frequencies that have lower contrast masking thresholds in human visual perception and a definite and strong orientation selectivity are important attributes of deep CNN channels that deliver better perceptual quality features.

authors:
Yochai Blau
Tomer Michaeli

title: The perception-distortion tradeoff

venue: IEEE CVPR,

authors:
Yochai Blau
Roey Mechrez
Radu Timofte
Tomer Michaeli
Lihi Zelnik-Manor

title: pirm challenge on perceptual image super-resolution

authors:
Sebastian Bosse
Dominique Maniry
Klaus-Robert Muller
Thomas Wiegand
Wojciech Samek

title: Deep neural networks for no-reference and full-reference image quality assessment

venue: IEEE Transactions on Image Processing,

authors:
Osamu Katsumi
Masashi Arai
Tekehiko Hirose

title: Objective measurement of contrast sensitivity function using contrast sweep visual evoked responses

venue: The British journal of ophthalmology,

authors:
Leon A. Gatys
Alexander S. Ecker
Matthias Bethge

title: Image style transfer using convolutional neural networks. 2016

venue: IEEE Conference on Computer Vision and Pattern Recognition (CVPR),

authors:
Kaiming He
Xiangyu Zhang
Shaoqing Ren
Jian Sun

title: Deep residual learning for image recognition

authors:
Forrest N. Iandola
Matthew W. Moskewicz
Khalid Ashraf
Song Han
William J. Dally
Kurt Keutzer

title: Squeezenet: Alexnet-level accuracy with 50x fewer parameters and ¡1mb model

venue: size. ArXiv,

authors:
Dinesh Jayaraman
Anish Mittal
Anush K. Moorthy
Alan C. Bovik

title: Objective quality assessment of multiply distorted images

venue: Conference Record of the Forty Sixth Asilomar Conference on Signals, Systems and Computers (ASILOMAR),

authors:
Justin Johnson
Alexandre Alahi
Li Fei-Fei

title: Perceptual losses for real-time style transfer and super-resolution, 2016

authors:
Jiwon Kim
Jung Kwon Lee
Kyoung Mu Lee

title: Accurate image super-resolution using very deep convolutional networks. 2016

authors:
A. Sutskever I. Krizhevsky
G. E Hinton

title: Imagenet classication with deep convolutional neural networks

authors:
Janus J. Kulikowski
S. Marvcelja
P.O. Bishop

title: Theory of spatial position and spatial frequency relations in the receptive fields of simple cells in the visual cortex

venue: Biological Cybernetics,

authors:
Christian Ledig
Lucas Theis
Ferenc Huszar
Jose Caballero
Andrew P. Aitken
Alykhan Tejani
Johannes Totz
Zehan Wang
Wenzhe Shi

title: Photo-realistic single image super-resolution using a generative adversarial network

authors:
Chao Ma
Chih-Yuan Yang
Xiaokang Yang
Ming-Hsuan Yang

title: Learning a no-reference quality metric for single-image super-resolution

authors:
Lamberto Maffei
Adriana Fiorentini

title: The visual cortex as a spatial frequency analyser

venue: Vision research,

authors:
Roey Mechrez
Itamar Talmi
Firas Shama
Lihi Zelnik-Manor

title: Maintaining natural image statistics with the contextual loss

venue: In ACCV,

authors:
Anish Mittal
Rajiv Soundararajan
Alan C. Bovik

title: Making a “completely blind” image quality analyzer

venue: IEEE Signal Processing Letters,

authors:
Marcus J. Nadenau
Stephan M. Winkler
David Alleysson
Murat Kunt

title: Human vision models for perceptually optimized image processing - a review

authors:
Mark Sandler
Andrew F Howard
Menglong Zhu
Andrey Zhmoginov
Liang-Chieh Chen

title: Mobilenetv2: Inverted residuals and linear bottlenecks

venue: IEEE/CVF Conference on Computer Vision and Pattern Recognition,

authors:
Hamid R. Sheikh
Muhammad F. Sabir
Alan C. Bovik

title: A statistical evaluation of recent full reference image quality assessment algorithms

authors:
Karen Simonyan
Andrew Zisserman

title: Very deep convolutional networks for large-scale image recognition

authors:
Xintao Wang
Ke Yu
S. Wu
Jinjin Gu
Yihao Liu
Chao Dong
Chen Change Loy
Yu Qiao
Xiaoou Tang

title: Esrgan: Enhanced super-resolution generative adversarial networks. 2018

authors:
Zhou Wang
Alan C. Bovik
Hamid R. Sheikh
Eero P. Simoncelli

title: Image quality assessment: From error visibility to structural similarity

authors:
Jinjian Wu
Leida Li
Weisheng Dong
Guangming Shi
Weisi Lin
C.-C. Jay Kuo

title: Enhanced just noticeable difference model for images with pattern complexity

authors:
Richard Zhang
Phillip Isola
Alexei A. Efros
Eli Shechtman
Oliver Wang

title: The unreasonable effectiveness of deep features as a perceptual metric

authors:
Xiangyu Zhang
Xinyu Zhou
Mengxiao Lin
Jian Sun

title: Shufflenet: An extremely efficient convolutional neural network for mobile devices

heading: 1 INTRODUCTION

text:
Quantifying human perception of image quality has been a subject of significant research for quite some time. Full-reference objective metrics such as the PSNR (Peak Signal to Noise Ratio) and SSIM (Structural Similarity Index) (Wang et al. (2004)), being fair metrics of distortion between two images, are not a satisfactory metrics to measure differences in perceptual quality. Considering the recent interest in the applications of deep CNNs in perception-oriented problems such as superresolution, image-restoration, frame-interpolation and style-transfer etc, research into effective loss metrics that quantify perceptual quality and help train CNNs in delivering better perceptual quality has become paramount.
The perceptual loss proposed by Johnson et al. (2016) was one of the first to demonstrate how effective the feature representations of pre-trained image classification CNNs could be as features of full-reference perceptual quality, especially when incorporated into loss functions for image restoration. The perceptual loss is now popularly adopted in many image restoration problems such as super-resolution, style transfer, denoising etc. (Ledig et al. (2017),Wang et al. (2018),Gatys et al. (2016)). Zhang et al. (2018) and Blau & Michaeli (2018) further demonstrate how effective deep CNN representations can be as features of perceptual quality, but without any analysis into their characteristics. More recently, Mechrez et al. (2018) proposed a variation of the perceptual loss called the contextual loss, which still employs deep CNN features as perceptual quality features but uses an approximation of the KL-divergence to quantify distance. The contextual loss has been demonstrated to be quite effective in maintaining natural image statistics during SISR (Single-Image Super-Resolution). The recent PIRM Super-Resolution Challenge Report (Blau et al. (2018)) clearly iterates that the perceptual loss and the contextual loss are the most widely used loss functions for CNN based perceptual image Super-Resolution.
Nevertheless, like most applications of deep learning, there has been little or no effort to understand and interpret the role of deep CNN representations as effective perceptual quality features. This is quite understandable, as it is difficult to find a direction to approach this problem from. Neural networks are non-linear, which makes a tractable analysis tricky. Furthermore, human perception of
quality is also something that is still not understood completely. Most of our basic understanding of human visual perception of quality is in the frequency domain, with models such as the Contrast Sensitivity Function (CSF) (de Faria et al. (1998)). To make a connection between deep CNN features and human perception, it is important to realize that deep CNN channels are essentially complex spatial frequency and orientation selective filters.
We stimulate pre-trained image classification CNNs with sinusoidal grating stimuli, record the response in the form of mean activation of each channel as function of spatial frequency/orientation of input grating, thus quantifying the frequency and orientation selectivity of different channels. This approach makes it significantly easier to establish a connection between perception models such as the CSF with learned deep feature representations. We hypothesize that two attributes are important for deep CNN channels that are good perceptual quality features. The attributes are based on visual masking in human visual perception, which refers to human ability to perceive distortions and contrast in visual stimulus. The first attribute is sensitivity to spatial frequencies at which there is minimal contrast masking in human visual perception (Nadenau et al. (2000)), making the CNN channel sensitive to highly perceivable distortions. The second attribute being a definite and strong orientation selectivity, which helps the channel respond better to image regions with less pattern complexity, where there is less masking for distortions from a perceptual standpoint (Wu et al. (2017)).
We verify our hypothesis by designing an Objective Quality Assessment (OQA) experiment (Sheikh et al. (2006)). OQA experiments correlate the performance of any quality metric with human perception of quality, which is an accepted and standard experimental technique. We group the set of channels in different CNN layers into subsets on the basis of our hypothesis and demonstrate that the group which has channels with our described attributes, delivers a much better as a set of perceptual quality features. We repeat our experiment across multiple layers of many pre-trained image classification networks such as the VGG-16 (Simonyan & Zisserman (2014)), AlexNet (Krizhevsky & Hinton (2012)), ShuffleNet (Zhang et al. (2017)) and SqueezeNet (Iandola et al. (2017)).

heading: 2 DEEP CNN REPRESENTATIONS AS PERCEPTUAL QUALITY FEATURES

text:
The main motivation behind using pre-trained image classification deep CNN representations as perceptual quality features is that instead of a distance measure between two images being a good FR metric, computing distance after non-linear transformation of images into a high dimensional manifold, might result in a better perceptual quality measure. The high dimensional manifold in this case is the manifold of pre-trained CNN features. The general form for the perceptual loss (Johnson et al. (2016)) is given by Eq. (1)
lp = 1
M ·W ·H M∑ m=1 ‖Φkm(Iout)− Φkm(IGT)‖22 (1)
Where ’Φkm’ is the feature map corresponding to the ’m th’ channel in the ’kth’ layer which as ’M’ number of total channels with feature map dimensions ’H·W’. As mentioned before, applying pretrained deep CNN representations as perceptual quality features has proven to be quite effective in FR-IQA methods (Bosse et al. (2017)), image restoration (Wang et al. (2018)) and style transfer (Gatys et al. (2016)) problems, as iterated by Blau et al. (2018).
However, little else is known of the ability and characteristics of deep CNN representations as perceptual quality features. In this work, using basic human perception models, we aim to get more insight into the role of pre-trained deep representations as perceptual quality features.

heading: 3 PROBLEM FORMULATION

text:
Section. 2 iterates the motivation and wide spread use of pre-trained deep CNN representations as features of full-reference perceptual quality. However, there has been no effort to explain and interpret the role of deep representations as perceptual features. We consider a CNN convolution layer as collection of channels which deliver perceptual quality features. For example, the relu3 2 layer of the VGG-16 has 256 channels. Are all of the channels equally effective in delivering good
perceptual quality features? Are some channels better than others and if so, what attributes make them better?
The problem in question is important in explaining the role of deep CNN representations as perceptual quality features, but it is somewhat difficult to approach because of the ’black-box’ nature of neural networks. In section. 4.1, we will introduce a methodology to quantify the spatial frequency and orientation tuning of channels in pre-trained CNNs. Using this formulation, we will interpret and explain deep CNN features as perceptual quality features by making use of basic human visual perception models, which rely on spatial frequency and orientation characteristics of input stimuli. In essence, the formulation in Section. 4.1 will act as a bridge to link attributes of deep representations and basic visual perception.

heading: 4 A PSYCHOVISUAL APPROACH

heading: 4.1 FREQUENCY/ORIENTATION TUNING QUANTIFICATION

text:
Our experimental method is inspired by the grating stimulus experiments used by neuro-scientists to study human visual perception characteristics (Kulikowski et al. (1982)). We aim to quantify both the spatial frequency and orientation tuning of different channels in the pre-trained CNN.
To quantify the spatial frequency tuning, we generate concentric sinusoidal gratings of a fixed contrast and varying spatial frequencies (cycles per degree), use them to stimulate pre-trained image classification CNNs and record the responses of the feature maps in the form of mean activation versus spatial frequency for each channel. Fig. 1 illustrates the overall scheme of measuring the spatial frequency responses of channels in various convolution layers of the trained VGG-16 network. The reason we are using a concentric pattern is to eliminate the factor of orientation selectivity from this part of the analysis. Some concentric grating stimulus patterns are shown as input to the trained VGG-16 network in Fig. 2.(a).
To quantify orientation selectivity at low contrast masking thresholds, we stimulate the pre-trained network with linear pattern sinusoidal gratings with different orientations. The gratings have a fixed spatial frequency, which corresponds to the peak of the Contrast Sensitivity Function (CSF). Some sample grating patterns are shown in Fig. 1. Sample observations of orientation selectivity for channels in different layers of the pre-trained VGG-16 are shown in Fig. 2.(b).

heading: 4.2 VISUAL FREQUENCY SENSITIVITY

text:
In this section, we will use the spatial frequency selectivity quantification in section. 4.1 to introduce the concept of visual frequency sensitivity. Human perception of images is largely dependent on attributes of input stimulus. A significant proportion of neuro-science research advocates the role of the early visual cortex as a spatial frequency analyzer (Maffei & Fiorentini (1973)). Human perception characteristics are dependent on spatial frequency and one of the most significant models that quantifies this characteristic is called the Contrast Sensitivity Function (CSF). The CSF depicts human ability to perceive contrast changes as a function of spatial frequency. The spatial frequencies where the CSF has a higher value, correspond to lower contrast masking thresholds in perception (ease in perceiving distortions and contrast changes). In essence, this corresponds to a higher probability of perceiving distortions at high CSF valued spatial frequencies.
Considering the presented analysis on the spatial frequency selective behavior of deep feature maps. Our hypothesis is that the deep representations that are more sensitive to high CSF valued spatial frequencies, can be better features of perceptual quality. Fig. 3 plots mean activation of two channels versus spatial frequency of the input grating. Feature Map-2 can be seen to have a higher sensitivity compared to Feature Map-1 at high CSF valued spatial frequencies, making Feature Map-2 more sensitive to distortions corresponding to low contrast masking threshold regions in input images.
We model this attribute quantitatively as µ1 defined in Eq. 2
µ1(k,m) = ∑
f CSF (f). ∣∣∣∂akm ∂f ∣∣∣ (2) where ’k’ is the index for the convolution layer, ’m’ is the feature map index in each convolution layer, ’CSF’ is the contrast sensitivity function (CSF), ’a’ is the mean activation of the feature map and ’f ’ is the spatial frequency in cycles per degree. µ1 quantifies the average sensitivity of a CNN channel weighted by the CSF over different spatial frequencies. The channels having higher µ1 values should deliver better perceptual features according to our hypothesis, because they can be more sensitive to visually perceivable distortions in input images.

heading: 4.3 ORIENTATION SELECTIVITY

text:
In addition to the underlying spatial frequency, orientation also plays an important part in human perception of visual stimulus. Neuro-science research indicates that the HVS (Human Visual System) is highly adapted to extract repeated patterns for visual content representation (Wu et al. (2017)). The complexity of a visual pattern has an effect in its perception. If a pattern is regular, the visual
masking for such a pattern is weak, and distortions are easily perceivable. For complex and irregular image patches, the visual system presents a stronger masking effect.
We have quantified orientation selectivity of different channels in a pre-trained image classification CNN (VGG-16) in Fig. 2.(b). We observe that a significant proportion of channels show a definite orientation selective tuning, such as the ones represented in Fig. 2(b)(a), Fig. 2(b)(b), Fig. 2(b)(j) etc. There channels should in theory be more sensitive in responding to simple patterns. However, quite a few channels show weaker orientation sensitivity such as the ones represented in Fig. 2(b)(c), Fig. 2(b)(k), Fig. 2(b)(n) and Fig. 2(b)(o) etc. We hypothesize the channels that show strong and definite orientation selective tuning, respond better to regular image patterns, which have lower masking thresholds, making these channels deliver better perceptual quality features.
Suppose that within some layer ’k’, amθ be the mean activation of a feature map corresponding to channel ’m’ to the input grating of orientation ’θ’. Let the maximum mean activation be âm = maxθ a m θ . We model our orientation selectivity attribute for a channel as µ2 in Eq. (3).
µ2(k,m) = ∑ θ (amθ − âm)2 (3)
Considering our hypothesis, channels with higher µ2 should deliver relatively better features of perceptual quality.

heading: 4.4 PERCEPTUAL EFFICACY SCORE (PE)

text:
Based on our defined attributes, we devise a quantification for the efficacy of channels in pre-trained deep CNNs to deliver good features for perceptual quality, called the Perceptual Efficacy (PE). The perceptual efficacy of a channel with index ’m’ in layer ’k’ is defined as the product of normalized µ2 and µ2.
PE(k,m) = µ1(k,m) · µ2(k,m)∑ m µ1(k,m) · ∑ m µ2(k,m)
(4)

heading: 5 EXPERIMENTAL SETUP

text:
We devise an experimental methodology to verify our hypotheses that deep CNN representations that have a higher PE are better perceptual quality features. Let Fk be the set of all channels within a layer ’k’ of a pre-trained CNN (e.g VGG-16).
Fk = {Φk0 ,Φk1 , . . . ,ΦkM} (5) We constitute subsets of channels from Fk based on the quantification of our proposed attributes (PE). For example, if there are 128 channels in the relu2 2 layer of the VGG-16, we can group the top 15% (19 channels) of the total 128 with the highest PE as
H-15 = {Φk0 ,Φk1 , . . . ,Φkm} (6)
Similarly, the bottom 15% channels with the lowest PE can be represented as
L-15 = {Φk0 ,Φk1 , . . . ,Φkm} (7)
where H-x,L-x ⊆ Fk and x ∈ (0, 100]. For x = 100, the subsets become the complete set of channels Fk.
To validate our hypotheses, it is necessary to demonstrate that subsets containing higher PE valued channels deliver better perceptual quality features compared to subsets with lower PE valued channels.

heading: 5.1 OBJECTIVE QUALITY ASSESSMENT (OQA) TESTS

text:
OQA tests correlate the performance of any quality metric, with human subjective assessment and perception of quality (Sheikh et al. (2006)). Human assessment of perceptual image quality is quantified using the Differential Mean Opinion Score (DMOS) over images with varying levels of distortion. DMOS is a quantitative representation of how human observers are able to perceive perceptual differences between natural and distorted images. Metrics that have higher correlation with DMOS scores after regression, measured using statistical indicators such as the RMSE (Root Mean Square Error), LCC (Linear Correlation Coefficient) and the SROCC (Spearman Rank Order Correlation Coefficient), are regarded as better quality metrics (Sheikh et al. (2006)) . The higher the correlation metrics (LCC and SROCC), the better a metric correlates with human ability to perceive perceptual differences.
In our problem setting, we will use Eq. 1 with the different subsets of channels, as defined in Section 5. We demonstrate that for use with Eq. 1, within different CNN layers, channels having higher PE, give much better correlation with DMOS compared to channels with lower PE. Essentially, we demonstrate that CNN channels with our pre-described attributes are indeed better perceptual quallity features.
We use images and DMOS scores from both the LIVE image quality dataset (Sheikh et al. (2006)) and multiple distortion dataset (Jayaraman et al. (2012)) which collectively include images with Gaussian Blur, JPEG compression, JPEG2000, White Noise as well as images which have been corrupted with multiple types of distortions (such as white noise, Gaussian blur and camera noise) simultaneously.
We will repeat our experiment accross multiple layers of several pre-trained image classification CNNs such as AlexNet, ShuffleNet, SqueezeNet and VGG-16.

heading: 5.2 2AFC SIMILARITY TESTS

text:
In the 2AFC test, two distorted images are shown to an observer and he/she is asked to rate which one is closer to the ground truth, in perceptual appearance. This process is repeated for multiple image triplets and observers per-triplet to construct a data-set called the Berkley-Adobe Perceptual Patch Similarity Data-set (BAPPS) (Zhang et al. (2018)). Objective metrics such as the one in Eq. 1 are thereafter evaluated to see how well they conform to the pair-wise human judgment. For example, in an image triplet, let x0 and x1 be two distorted versions of the ground truth image xg that are shown to 5 human observers, 4 of which judge x0 to be closer to xg, as opposed to x1 being closer to xg. If an objective metric evaluates x0 to be closer to the ground truth, it will get an 80% credit which in the opposite case would be 20%.
The BAPPS data-set contains images with distortions such as super-resolution, frame-interpolation and deblurring, which do not have subjective DMOS data-sets available online. Therefore, as a secondary experiment, we perform a 2AFC test on super-resolution, frame-interpolation and videodeblurred frame images in the BAPPS data-set with Eq. 1 for different channel subsets defined in Section. 5. In order to verify our hypothesis, we will show that subsets that contain channels with higher PE, deliver better perceptual quality features.

heading: 6 RESULTS AND DISCUSSIONS

text:
Table 1 quantifies the correlation of Eq. 1 with DMOS for different subsets of channels, constructed on the basis of our described attributes, as explained in Section 5. Table 1 validates our hypothesis that within a CNN layer, channels which have higher PE (Eq. 4) deliver better perceptual quality features. It must be reminded that higher LCC and SROCC indicate better correlation of Eq. 1 with human ability to discern perceptual differences (DMOS). It can be observed that very small proportions (2%-10% of total) of channels with the highest PE, deliver better perceptual quality features compared to a much higher proportion (50%-90% of total) of channels having lower PE. Furthermore, in a majority of cases, a small proportion of channels that have our described attributes (higher PE), perform even better than the complete set of channels in the layer. This implies that our proposed attributes are indeed important characteristics that make learned deep CNN representations good perceptual quality features.
Table. 2 shows the results of our secondary 2AFC similarity test on the super-resolution, frameinterpolation and video-deblurring distorted images in the BAPPS data-set. It can been seen that yet again, similar to the conclusion in the primary QQA experiment, the subsets with channels having higher PE are better perceptual quality features compared to even much larger subsets having channels with lower PE.

heading: 7 FUTURE WORK

text: We have proposed a model to explain and interpret which channels in pre-trained image classification CNNs deliver better perceptual quality features. The model may be used to improve the use of deep representations as perceptual quality features by helping in feature selection for IQA methods such as (Bosse et al. (2017)) and maybe designing channel attentive mechanism to improve the perceptual loss (Johnson et al. (2016)). The model may also be reference for learning better perceptual quality feature representations which may benefit a wide variety of applications. Furthermore, the model may be enhanced to include more psychophysical factors such as eccentricity etc. Another possible application may be CNN-based image compression where prior knowledge of the potential efficacy of different channels may help efficient perceptual compression of redundant image data.

heading: 8 CONCLUSIONS

text:
Deep CNN representations of pre-trained image classifications CNNs have been popularly used as perceptual quality features for perception orientated applications such as CNN based quality assessment, image/video super-resolution and many image-to-image translation problems. In this paper, as a novel and first effort, we have linked basic human visual perception models to pre-trained deep CNN representations in order to explain and interpret them as perceptual quality features. Based on
masking characteristics in human visual perception, we formulate attributes of channels in different layers of pre-trained networks, and experimentally demonstrate that the attributes are important characteristics that make some deep CNN representations better perceptual quality features compared to others.

heading: A GRATING GENERATION

text:
In this section, we present details behind the generation of sinusoidal gratings of different spatial frequencies.
The contrast sensitivity function is expressed on the domain of spatial frequency in cycles per degree (cyc/deg). The cycles per degree express the number of sine cycles captured by the observer per unit degree of observation. Obviously, the distance of viewing and dimensions of the screen play an important part in this measurement.
We essentially generate gratings in the computer simulation in cycles per pixel. Let the display screen being used in the experiment have a height ’h’ inches and resolution ’r’ pixels per inch. The optimal viewing distance in psychovisual experiments should satisfy a function called the PVD (42 (2002)). The PVD is a function that expresses the optimal ratio of viewing distance to the height of the display screen. The optimal viewing distance ’d’ for the screen with height ’h’ can be calculated using the PVD.
The transformation between cycles/degree and cycles/pixel is
cycles
pixel =
cycles degree × degrees pixel (8)
Where pixels
degree =
180
π × d× r (9)
Therefore, cycles
pixel =
cycles degree × π × d× r 180 (10)
We have tested with a number of different display systems of SD, 2K and 4K resolutions. Considering that the PVD takes the viewing angle into account, the changes in the resultant spatial frequencies of the gratings are small and insignificant. Therefore, it can be concluded that the choice of display system has a negligible effect on the experiment.
For the generation of grating with fixed spatial frequency and varying orientation, the experimental setup is the same.

heading: B ADDITIONAL NETWORKS

text:
We demonstrate the validity of our hypothesis for other pre-trained image classification CNNs as well. These networks include:
• GoogleNet (Szegedy et al. (2014)) • MobileNet-v2 (Sandler et al. (2018)) • ResNet-18 (He et al. (2015))
It can be seen in Table 3 that our hypothesis regarding important attributes is valid for these additional CNNs as well. Small proportions of channels (H-(5-10)) with higher PE (Eq. 4) deliver much better perceptual quality features compared to a much higher proportion of channels with lower PE (H-(45-80)) and even the complete set of channels in the layer (F). A scatter plot of some correlations, shown side by side is depicted in Fig. 5.

heading: C ADDITIONAL EXPERIMENT

text:
We have included an additional experiment with the aim to demonstrate that our work and experimental analysis techniques (Objective Quality Experiments) are generalizable to practical imaging problems. The experiment will be an x4 CNN based super-resolution task. However, a little background on the perception-distortion trade-off is necessary before proceeding.
C.1 PERCEPTION-DISTORTION TRADE-OFF
It is a known fact that traditional distortion metrics such as PSNR and SSIM are not well correlated with perceptual quality and the distortion measured by PSNR and SSIM for a degraded image indicates the net deviation from its reference image. Many different images of different perceptual qualities may have a same distortion with respect given reference. Perceptual quality, on the other hand, is a no-reference quantification of how natural an image appears (conformity with natural image statistics). This is why objective distortion measures such as PSNR and SSIM do not necessarily account for perceptual quality. Keeping in view the recent interest in perception-oriented imaging applications, to quantify no-reference perceptual quality, a combination of the metrics such as NIQE (Mittal et al. (2013)) and NRQM (Ma et al. (2016)) has been used as a perceptual indicator (PI) in recent works (Blau et al. (2018)). The lower the Perceptual Index (Eq.11), the better the perceptual quality of an image.
PI(Iin) = 1
2 ((10−NRQM(Iin)) +NIQE(Iin)) (11)
The work of (Blau & Michaeli (2018)) demonstrates that distortion and perceptual quality are in a trade-off relation and this trade-off is the correct measure for quantifying the perceptual efficacy of image restoration algorithms as explained in (Blau et al. (2018)). Consider Eq.(12), a standard
loss function for CNN based SR, which is defined as a combination of a pixel-wise loss (l1) and the perceptual loss (lp). Lp = α · l1 + (1− α) · lp (12) Increasing α in Eq.(12) will lead to a decrease in distortion (increasing SSIM), which according to the perception-distortion trade-off, should result in images with lower perceptual quality (higher PI). Similarly, decreasing α will give more weight to the perceptual loss, which would result in images with better perceptual quality (lower PI), but lower SSIM.
C.2 X4 SUPER-RESOLUTION EXPERIMENT SETUP
In this experiment, we have used the well known VDSR (Kim et al. (2016)) network trained on images from the DIV2K data-set. The network was separately trained on two loss functions. The first being the standard perceptual loss in Eq.(12) and the second a slight modification (Eq.13) based on our analysis. Lpv = α · l1 + (1− α) · lpv (13) where
lpv = 1
M ·W ·H M∑ m=1 wkm‖Φkm(Iout)− Φkm(IGT)‖22 (14)
and
wkm = µ1(k,m)∑ m µ1(k,m)
(15)
Eq.(13) presents a version of a perceptual loss in which the channels are weighted (Eq.14) as per our defined visual frequency sensitivity (theoretical importance of a channel based a defined attribute). If our hypothesis is correct, the loss function in Eq.(13) should be able to perform better compared to Eq.(12) in terms of providing a better perception-distortion trade-off for super-resolution. The results should consequently serve as an additional experiment to reinforce our hypothesis and
demonstrate the transfer-ability of objective quality assessment experiment conclusions to practical applications. The results should also demonstrate the ability of an independent attribute as an indicator of the perceptual abilities of pre-trained channels. The results are not be intended to deliver state of the art results, just to verify the generalization of our analysis to practical problems.
C.3 RESULTS
The ReLU4 2 layer of a pre-trained VGG-16 was used for perceptual loss terms in Eq.(12) and Eq.(13). The experiment was repeated for different α values to analyze the perception-distortion trade-off delivered by both loss functions. The SSIM and PI reported in Fig.6 are averaged over all the 100 images in the test-set.
It can clearly be seen in Fig.6 that Lpv in Eq.(13) improves the perception distortion trade-off compared toLp in Eq.(12). The improvement is evident from the fact that the perception-distortion curve delivered by Lpv is higher compared to the one delivered by Lp for various α (different points on the curve correspond to different α in Eq.(12) and Eq.(13)). Therefore, at the same level of distortion (SSIM), Lpv is able to generate images with better perceptual quality compared to Lp.
The result reinforces the validity of the experimental results presented in the main paper and demonstrate that they have consequence for practical applications such as super-resolution. The results of this experiment also iterate the fact that conclusions derived from Objective Quality Assessment(OQA) experiments have a consequence for practical image generation problems.