# Exploring Deep Neural Networks in Simulating Human Vision through Five Optical Illusions
## 2 Materials and Methods
### Optical Illusions
#### 2.2.3. Representational Dissimilarity Matrices  
We utilized representational dissimilarity matrices (RDMs) as a novel approach to analyze and compare the response patterns of human behavioral data and deep neural networks (DNNs) when processing the same visual inputs. This method allows for a direct and quantifiable comparison between human and artificial visual processing, highlighting both similarities and discrepancies in their interpretation of visual stimuli. Initially, we collected human response data to specific visual stimuli, reflecting behavioral response patterns when observing different images. Subsequently, the same visual stimuli were input into DNNs to obtain the network's responses to these stimuli. This step is crucial as it allows for a direct comparison between human and model perception. RDMs are constructed using Euclidean distance, extracting feature vectors from the last layer before the classification layer. The Euclidean distance (L2 distance) between different feature vectors is calculated to construct the matrix. Considering the differences among the five visual illusions in the experiment, unconventional RDMs were constructed for three of the illusions, separate from color assimilation and the Hermann grid illusion. That is, feature vectors of both stimulus images and adjusted perceptual images were extracted, where the horizontal and vertical axes correspond to stimulus images and perceptual images (perception data adjusted after observation by human subjects). The construction of specific RDMs is as follows:  
* Color assimilation: A 48 \(\times\) 48 RDM composed of 12 colors. * Hermann grid illusion: A 25 \(\times\) 25 RDM for each color, corresponding to different parameter combinations. * Muller-Lyer illusion: A 10 \(\times\) 10 RDM, based on the direction of arrows in perception data. * Zollner illusion: A 54 \(\times\) 54 RDM, based on stimulus images and adjusted perceptual images. * Poggendorff illusion: A 35 \(\times\) 35 RDM, also based on stimulus images and adjusted perceptual images. Overall, the construction equation for RDMs is expressed as follows:  
\[RDM_{ij}=\sqrt{\sum_{k}(f_{ik}-f_{jk})^{2}} \tag{5}\]  
where \(RDM_{ij}\) represents the distance between the \(i\)th and \(j\)th rows in the matrix, \(f_{ik}\) and \(f_{jk}\) are the values of the \(i\)th and \(j\)th feature vectors in the \(k\)th dimension, respectively. By computing RDMs, we can compare these responses in a multidimensional space. Each RDM represents the differences between a set of stimuli and perceptual images, calculated based on either human behavioral responses or DNN outputs. This enables us to intuitively observe similarities and differences in processing the same visual information between humans and DNNs, including how they handle visual illusions compared to standard perceptual processing. Furthermore, by analyzing RDMs, we can explore the capability of DNNs in simulating human visual cognition, especially in handling complex, \begin{table}
\begin{tabular}{l l c c} \hline \hline
**Models** & **Pre-Trained Dataset** & **Package** & **Parameters (Millions)** \\ \hline AlexNet & IMAGENET1K & Torchvision & 61.10 \\ VGG16 & IMAGENET1K & Torchvision & 138.36 \\ VGG19 & IMAGENET1K & Torchvision & 143.67 \\ ResNetv2\_50 & IMAGENET1K & Timm & 25.55 \\ ResNetv2\_101 & IMAGENET1K & Timm & 44.54 \\ ResNet152 & IMAGENET1K & Torchvision & 60.19 \\ ResNext101 & IMAGENET1K & Torchvision & 88.79 \\ Inception\_v3 & IMAGENET1K & Timm & 23.83 \\ Inception\_v4 & IMAGENET1K & Timm & 42.68 \\ DenNet121 & IMAGENET1K & Torchvision & 7.98 \\ DenNet169 & IMAGENET1K & Torchvision & 14.15 \\ DenNet201 & IMAGENET1K & Torchvision & 20.01 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Models and Parametersvariable, or ambiguous visual information. The effectiveness of RDMs in distilling complex, high-dimensional data into a comprehensible, two-dimensional format provides a clear visual indication of whether the DNN's internal representations align with human susceptibility to visual illusions.