Evaluating Language-biased image classification based on semantic compositionality

1 INTRODUCTION . Language is not only a fundamental tool enabling humans to communicate with each other : it also shapes other aspects of perception and cognition , ranging from influencing visual processing to enabling abstract thinking ( Vygotsky , 1934 ; Miller , 1951 ; Waxman & Markow , 1995 ; Colas et al. , 2021 ) . Analogous to this human ability , recent artificial intelligence technology has also utilized language to drive the training of visual skills in machines . For instance , the OpenAI team introduced CLIP ( Contrastive Language–Image Pre-training ) , consisting of joint learning of language and vision ( Radford et al. , 2021 ) . The CLIP model efficiently learns visual concepts from natural language supervision and can be applied to various visual tasks in a zero-shot manner . Joint learning of language and vision has also been utilized in the Visual Question Answering ( VQA ) literature , where artificial models are asked to answer questions about visual content ( Antol et al. , 2015 ; Lu et al. , 2016 ; Fukui et al. , 2016 ) . While joint training with language effectively fosters the acquisition of general abilities for visual recognition/understanding , its abstraction can produce biased recognition for either humans or machines . The Stroop effect known in human cognitive science literature is one of such biases ( Stroop , 1935 ) . When human participants observe a mismatched word , where the word “ red ” is printed with the “ blue ” color , and are asked to answer the “ color ” of the word , their response to the word can be slower than when they see the word “ red ” with the “ red ” color . In addition to the color-word interference , language also interferes with human image category recognition , known as picture-word interference ( Rosinski , 1977 ; Lupker , 1979 ) . When a participant observes an image coupled with an incongruent category word ( e.g. , Figure 1 , right ) , the image categorization speed can be delayed . Similar to the effect in humans , recent deep learning systems jointly trained on language and vision , e.g. , CLIP , also show object recognition interference when words are embedded in images ( Goh et al. , 2021 ) . Specifically , by simply adding a handwritten word to an image , the object recognition can be biased to the superimposed word . A critical aspect of picture-word interference in humans is that it depends on the semantic relationship between images and superimposed words . For instance , the reaction time on the image classification for word-superimposed images is slower when the image category is semantically similar to the word one ( Rosinski , 1977 ) . Based on the accumulated findings , previous works have commonly suggested that at least two different processes mediate the effect in humans , as introduced in detail in Section 2.2 . Specifically , when a participant observes a word-superimposed image , an activation process synthesizes semantic representations corresponding to the superimposed word and image ( Figure 2 , activation process ) . Based on the representations , it has been assumed that a selection process decides which possible activation is the answer for the current task . ( Figure 2 , selection process ) . The activated representation is shared across visual word forms and images , and the dual activation by words and images confuses the decision in the selection process . These human cognitive findings raise the question of whether interferences in artificial models have some similarities with those observed in humans . Indeed , some artificial models show languagebiased image classification , but one possibility is that the bias might emerge irrespective of the semantic interaction between words and images . When we consider a model with text and image encoders for picture-word interference ( Figure 2 ) , we can regard the functional role of the image encoder as synthesizing semantic representations for word-superimposed images . Although pictureword interference in humans depends on shared semantic representations of written words and images , this is not the only mechanism that can produce interference . For instance , the image encoder of the model may assign the written word ” dog ” a different semantic representation than the visual image ” dog ” and show strong preferential activation to written words while ignoring image contents . Since joint learning of language and vision is expected to enable machines to acquire highly interacted representations of texts and images to solve various general tasks , observing such independent representations and a bias for one of them can be problematic and show a limit of the joint training process . In this study , we import methodological tools from the cognitive science literature to assess biases of artificial models in image classification for word-superimposed images . Specifically , we introduce a paradigm to evaluate picture-word interference , in which an agent has to predict the image superordinate/basic category for images with superordinate/basic words ( Figure 1 ) . Our benchmark dataset is a set of images with superimposed words and consists of a mixture of natural image datasets ( Cichy et al. , 2016 ; Mohsenzadeh et al. , 2019 ) and hierarchical word labels ( Lin et al. , 2014 ; Krizhevsky et al. , 2009 ) . Our benchmark task aims to test artificial models with a text encoder and an image encoder ( Figure 2 ) . The task enables us to test 1 ) whether language-biased decisions happen across different category levels and 2 ) the extent to which picture-word interference in artificial models depends on the semantic similarity between superimposed words and images . Furthermore , by importing a methodological tool from the neuroscience literature , called representational similarity analysis ( RSA ) ( Kriegeskorte et al. , 2008 ) , we can also test 3 ) whether the image encoder has a common semantic representation for superimposed words and images . Out of various joint learning models of language and vision , the present study evaluates the CLIP model using the dataset because the model consists of dual processing of visual and text encoders and is developed to be applied to various general visual tasks without fine-tuning the dataset . To anticipate the result , we show that 1 ) presenting words disturbs the CLIP image classification even across different category levels , 2 ) the effect does not depend on the semantic relationship between images and words , and 3 ) the superimposed word representation in the CLIP image encoder is not shared with the image representation . The present study provides an open-source code to reproduce the results and the full dataset . 2 RELATED WORKS . Joint learning of language and vision in artificial models : Some recent works in machine learning have reported language-biased image recognition for artificial models trained with joint learning of language and vision . One example is the CLIP model ( Radford et al. , 2021 ) . The CLIP architecture consists of an image encoder and a text encoder ( Figure 2 ) . The image encoder is based on a ResNet ( He et al. , 2016 ) or Vision Transformer ( Dosovitskiy et al. , 2020 ) , and the text encoder is a Language Transformer model ( Vaswani et al. , 2017 ) . The model is trained on a large dataset of image-text pairs with contrastive objectives , where it learns to align text and image representations for each pair . The pre-trained model can be used for various visual tasks in a zero-shot manner . For instance , when the model is applied for the image classification task , the learned text encoder synthesizes a zero-shot linear classifier for the descriptions , including classification labels , e.g. , ” a photograph of [ label ] ” ( Figure 2 ) . The learned image encoder outputs the representation for an input image , and the text classifier decides which label representation is the closest to the image representation . Languagebiased image classification is reported in the CLIP image classification task as a typographic attack ( Goh et al. , 2021 ) . As shown in Figure 1 , when a written word is superimposed on an image , the CLIP misclassifies the image category as the superimposed word . Another example of language-biased image classification is reported in the context of the Visual Question Answering ( VQA ) task ( Antol et al. , 2015 ; Lu et al. , 2016 ; Fukui et al. , 2016 ) . This task ’ s goal is to answer questions about visual content , e.g. , a text question ” What color is the dog ? ” for a dog image . The task also needs joint learning of language and vision , i.e. , an image encoder to recognize what the visual content is and a text encoder to understand the question . However , joint learning tends to be biased by superficial correlations between texts and images in the training data and ignore visual input to solve a task ( Agrawal et al. , 2016 ) . For instance , even when a model sees a green ( untypical ) banana and is asked about its color , the model tends to answer ” the color is yellow ” while ignoring the actual image content . Based on the observations , recent VQA models have attempted to remove the biases ( Agrawal et al. , 2018 ; Ramakrishnan et al. , 2018 ) . Picture-word interference in humans : It is essential to understand how the language-biased processing in artificial models is related to the human mechanisms discussed in the cognitive science literature . This subsection reviews the functional connection between text/image encoders in artificial models and picture-word interference in humans ( Figure 2 ) . Picture-word interference refers to language-biased recognition for word-superimposed images , and previous works in cognitive science have investigated this effect using various experimental paradigms ( reviewed by Bürki et al . ( 2020 ) ) . Here , we focus on interference when a participant observes a word-superimposed image and answers the image category for the image to compare the underlying cognitive mechanisms with artificial models ( Rosinski , 1977 ) . The discussion about what type of mechanisms mediate picture-word interference is still controversial in the cognitive science literature , especially the stage at which the interference emerges . However , we can summarize common functional mechanisms shared across different theoretical views and ask whether artificial models acquire these fundamental components in the current study . First , most views assume that visual words and images activate common semantic representations , i.e. , a written word ” dog ” activates similar semantic representations to an image ” dog. ” Second , they commonly assume that interference emerges due to some types of selection process . The type of selection process is extensively debated and differs depending on the views . One is the lexical selection hypothesis , and the selection works to compare the semantic representation competitively ( Levelt et al. , 1999 ; Roelofs , 1992 ) . This selection relies on relative activation in semantic representations , and picture-word interference emerges because the activation by words induces misselection when it is semantically close to the activation by images . However , the lexical selection is inconsistent with some behavioral findings , e.g. , the activation amplitude does not always correspond to the effect size of interference . Another theoretical view assumes the response selection , which is closer to the decision stage than the lexical selection ( Finkbeiner & Caramazza , 2006 ) . Since the response selection assumes additional processing for relative activated representations , it can explain the inconsistency of the phenomenon with the lexical selection assumption . We first ask whether one observes patterns of interference at the behavioral level that are similar to humans and then study more precisely the learned representations to see if the mechanisms proposed to explain human interference could also be at play in the artificial model . To investigate machine mechanisms in terms of the cognitive science findings , we regard an image encoder in the artificial model as the processing to activate semantic representations from images ( Figure 2 ) . We also consider a text encoder as the selection process , which tries to find the answers according to the task objectives ( superordinate/basic selection ) .

Summary: The authors investigate the behavior of CLIP when its handed images superimposed with text. The authors define a label-switched image as one for which the word being superimposed changes the classification prediction of the model. They construct a corpus of {12 superordinate} x {138 basic} x {~150 images with FMRI data} by superimposing labels over each image and then measuring CLIP's response. The authors conduct an error analysis of CLIP on these images, arguing that because CLIP's errors aren't predictable by the semantic or spelling similarity of the word/pictured object (as they are in a set of human psychology experiments), CLIP doesn't appear to process images in a similar fashion to humans.