prompt_front: Now, answer the following question based on the text below, only give me the answer and do not output any other words.

Question: When was Weep Not, Child first published?

Read the following text and answer briefly.

Context 1: Weep Not, Child is a 1964 novel by Kenyan author Ngũgĩ wa Thiong'o  It was his first novel, published in 1964 under the name James Ngugi  It was among the African Writers Series  It was the first English language|English novel to be published by an East African  Thiong'o's works deal with the relationship between Africans and white settlers in colonial Kenya, and are heavily critical of colonial rule  Specifically, Weep Not, Child deals with the Mau Mau Uprising, and "the bewildering dispossession of an entire people from their ancestral land " Ngũgĩ wrote the novel while he was a student at Makerere University 

The book is divided into two parts and eighteen chapters  Part one deals mostly with the education of Njoroge, while part two deals with the rising Mau Mau movement 

Plot summary

Njoroge, a little boy, is urged to attend school by his mother  He is the first one of his family able to go to school  His family lives on the land of Jacobo, an African made rich by his dealings with white settlers, namely Mr  Howlands, the most powerful land owner in the area  Njoroge's brother Kamau works as an apprentice to a carpenter, while Boro, the eldest living son, is troubled by his experiences while in forced service during World War II, including witnessing the death of his elder brother  Ngotho, Njoroge's father and a respected man in the surrounding area, tends Mr  Howlands' crops, but is motivated by his passion to preserve his ancestral land, rather than for any compensation or loyalty 

One day, black workers call for a strike to obtain higher wages  Ngotho is ambivalent about participating in the strike because he fears he will lose his job  However, he decides to go to the gathering, even though his two wives do not agree  At the demonstration, there are calls for higher wages  Suddenly, the white police inspector brings Jacobo to the gathering to pacify the native people  Jacobo tries to put an end to the strike  Ngotho attacks Jacobo, and the result is a riot where two people are killed  Jacobo survives and swears revenge  Ngotho loses his job and Njoroge’s family is forced to move  Njoroge’s brothers fund his education and seem to lose respect for their father 

Mwihaki, Jacobo's daughter and Njoroge's best friend, enters a girls' only boarding school, leaving Njoroge relatively alone  He reflects upon her leaving, and realizes that he was embarrassed by his father's actions towards Jacobo  For this reason, Njoroge is not upset by her exit and their separation  Njoroge switches to another school 

For a time, everyone's attention is focused on the upcoming trial of Jomo Kenyatta – a revered leader of the movement  Many blacks think that he is going to bring forth Kenya’s independence  But Jomo loses the trial and is imprisoned  This results in further protests and greater suppression of the black population 

Jacobo and a white landowner, Mr  Howlands, fight against the rising activities of the Mau Mau, an organization striving for Kenyan economic, political, and cultural independence  Jacobo accuses Ngotho of being the leader of the Mau Mau and tries to imprison the whole family  Meanwhile, the situation in the country is deteriorating  Six black men are taken out of their houses and executed in the woods 

One day Njoroge meets Mwihaki again, who has returned from boarding school  Although Njoroge had planned to avoid her due to the conflict between their fathers, their friendship is unaffected  Njoroge passes an important exam that allows him to advance to High School  His village is proud of him, and collects money to pay Njoroge's High School tuition 

Several months later, Jacobo is murdered in his office by a member of the Mau Mau  Mr  Howlands has Njoroge removed from school for questioning  Both father and son are brutally beaten before release and Ngotho is left barely alive  Although there doesn't seem to be a connection between Njoroge's family and the murder, it is eventually revealed that Njoroge's brothers are behind the assassination, and that Boro is the real leader of the Mau Mau  Ngotho soon dies from his injuries and Njoroge finds out that his father was protecting his brothers  Kamau has been imprisoned for life  Only Njoroge and his two mothers remain free, and Njoroge is left as the sole provider of his two mothers  Njoroge fears that he cannot make ends meet; he gives up hope of continuing in school and loses faith in God 

Njoroge asks Mwihaki's for support, but she is angry because of her father’s death  When he finally pledges his love to her, she refuses to leave with him, realizing her obligation to Kenya and her mother  Njoroge decides to leave town and makes an attempt at suicide; however, he fails when his mothers find him before he is able to hang himself  The novel closes with Njoroge feeling hopeless, and ashamed of cowardice 

Characters in Weep Not, Child
 Njoroge: the main character of the book whose main goal throughout the book is to become as educated as possible 
 Ngotho: Njoroge's father  He works for Mr Howlands and is respected by him until he attacks Jacobo at a workers strike  He is fired and the family is forced to move to another section of the country  Over the course of the book his position as the central power of the family weakened, to the point where his self-realization that he has spent his whole life waiting for the prophecy (that proclaims the blacks will be returned their land) to come true rather than fighting for Kenyan independence, leads to his depression 
 Nyokabi and Njeri: the two wives of Ngotho  Njeri is Ngotho's first wife, and mother of Boro, Kamau, and Kori  Nyokabi is his second wife, and the mother of Njoroge and Mwangi 
 Njoroge has four brothers: Boro, Kamau, Kori and Mwangi (who is Njoroge's only full brother, who died in World War II) 
 Boro: Son of Njeri who fights for the Allies in World War II  Upon returning his anger against the colonial government is compounded by their confiscation of the his land  Boro's anger and position as eldest son leads him to question and ridicule Ngotho, which eventually defeats their father's will (upon realizing his life was wasted waiting and not acting)  It is eventually revealed that Boro is the leader of the Mau Mau (earlier alluded to as "entering politics") and murders Mr Howlands  He is caught by police immediately after and is scheduled to be executed by the book's end  It is highly likely that it is also Boro who kills Jacobo 
 Mwihaki: Njoroge's best friend (and later develops into his love interest)  Daughter of Jacobo  When it is revealed that his family killed Jacobo (most likely Boro), Mwihaki distances herself from Njoroge, asking for time to mourn her father and care for her mother 
 Jacobo: Mwihaki's father and an important landowner  Chief of the village 
 Mr  Howlands: A white settler who emigrated to colonial Kenya and now owns a farm made up of land that originally belonged to Ngotho's ancestors  Has three children: Peter who died in World War II before the book's beginning, a daughter who becomes a missionary, and Stephen who met Njoroge while the two were in high school 

Themes and motifs
Weep Not, Child integrates Gikuyu mythology and the ideology of nationalism that serves as catalyst for much of the novel's action  The novel explores the negative aspects of colonial rule over Kenya  Njoroge's aspiration to attend university is frustrated by both the violence of the Mau Mau rebels and the violent response of the colonial government  This disappointment leads to his alienation from his family and ultimately his suicide attempt 

The novel also ponders the role of saviours and salvation  The author notes in his The River Between: "Salvation shall come from the hills  From the blood that flows in me, I say from the same tree, a son shall rise  And his duty shall be to lead and save the people " Jomo Kenyatta, the first prime minister of Kenya, is immortalised in Weep Not, Child  The author says, "Jomo had been his (Ngotho's) hope  Ngotho had come to think that it was Jomo who would drive away the white man  To him, Jomo stood for custom and traditions purified by grace of learning and much travel " Njoroge comes to view Jomo as a messiah who will win the struggle against the colonial government 

See also

Things Fall Apart
Death and the King's Horseman

References

External links
Official homepage of Ngũgĩ wa Thiong'o
BBC profile of Ngũgĩ wa Thiong'o
Weep Not, Child at Google Books

British Empire in fiction
Novels set in colonial Africa
Historical novels
Kenyan English-language novels
Novels by Ngũgĩ wa Thiong'o
Novels set in Kenya
1964 novels
Heinemann (publisher) books
Postcolonial novels
African Writers Series
1964 debut novels



ground_truth: Weep Not, Child was first published in 1964.

prompt_front: Now, answer the following question based on the text below, only give me the answer and do not output any other words.

Question: What is the correct expression for the derivative of the function?

Read the following text and answer briefly.

Context 2: \section{Introduction}

Derivate is one of the most important topics not only in mathematics, but also in physics, chemistry, economics and engineering  Every standard Calculus course provides a variety of exercises for the students to learn how to apply the concept of derivative  The types of problems range from finding an equation of the tangent line to the application of differentials and advanced curve sketching  Usually, these exercises heavily rely on such differentiation techniques as Product, Quotient and Chain Rules, Implicit and Logarithmic Differentiation \cite{Stewart2012}  The definition of the derivative is hardly ever applied after the first few classes and its use is not much motivated 

Like many other topics in undergraduate mathematics, derivative gave rise to many misconceptions \cite{Muzangwa2012}, \cite{Gur2007}, \cite{Li2006}  Just when the students seem to learn how to use the differentiation rules for most essential functions, the application of the derivative brings new issues  A common students' error of determining the domain of the derivative from its formula is discussed in \cite{Rivera2013} and some interesting examples of the derivatives, defined at the points where the functions themselves are undefined, are provided  However, the hunt for misconceptions takes another twist for the derivatives undefined at the points where the functions are in fact defined 

The expression of the derivative of the function obtained using differentiation techniques does not necessarily contain the information about the existence or the value of the derivative at the points, where the expression for the derivative is undefined  In this article we discuss a type of continuous functions that have the expression for the derivative undefined at a certain point, while the derivative itself at that point exists  We show, how relying on the formula for the derivative for finding the horizontal tangent line of a function, leads to a false conclusion and consequently to missing a solution  We also provide a simple methodological treatment of similar functions suitable for the classroom 

\section{Calculating the Derivative}

In order to illustrate how deceitful the expression of the derivative can be to a students' eye, let us consider the following problem 

\vspace{12pt}

\fbox{\begin{minipage}{5 25in}

\begin{center}

\begin{minipage}{5 0in}

\vspace{10pt}

\emph{Problem}

\vspace{10pt}

Differentiate the function $f\left(x\right)=\sqrt[3]{x}\sin{\left(x^2\right)}$  For which values of $x$ from the interval $\left[-1,1\right]$ does the graph of $f\left(x\right)$ have a horizontal tangent?

\vspace{10pt}

\end{minipage}

\end{center}

\end{minipage}}

\vspace{12pt}

Problems with similar formulations can be found in many Calculus books \cite{Stewart2012}, \cite{Larson2010}, \cite{Thomas2009}  Following the common procedure, let us find the expression for the derivative of the function $f\left(x\right)$ applying the Product Rule:
\begin{eqnarray}
f'\left(x\right) &=& \left(\sqrt[3]{x}\right)'\sin{\left(x^2\right)}+\left(\sin{\left(x^2\right)}\right)'\sqrt[3]{x} \notag \\ &=& \frac{1}{3\sqrt[3]{x^2}}\sin{\left(x^2\right)}+2x\cos{\left(x^2\right)}\sqrt[3]{x} \notag \\ &=& \frac{6x^2\cos{x^2}+\sin{x^2}}{3\sqrt[3]{x^2}} \label{DerivativeExpression}
\end{eqnarray}

Similar to \cite{Stewart2012}, we find the values of $x$ where the derivative $f'\left(x\right)$ is equal to zero:
\begin{equation}
6x^2\cos{x^2}+\sin{x^2} = 0 
\label{DerivativeEqualZero}
\end{equation}

Since the expression for the derivative (\ref{DerivativeExpression}) is not defined at $x=0$, it is not hard to see that for all values of $x$ from $\left[-1,1\right]$ distinct from zero, the left-hand side of (\ref{DerivativeEqualZero}) is always positive  Hence, we conclude that the function $f\left(x\right)$ does not have horizontal tangent lines on the interval $\left[-1,1\right]$ 

However, a closer look at the graph of the function $f\left(x\right)$ seems to point at a different result: there is a horizontal tangent at $x=0$ (see Figure \ref{fig:FunctionGraph})  

First, note that the function $f\left(x\right)$ is defined in $x=0$  In order to verify if it has a horizontal tangent at this point, let us find the derivative of the function $f\left(x\right)$ using definition:
\begin{eqnarray}
f'\left(0\right) &=& \lim_{h\rightarrow0}{\frac{f\left(0+h\right)-f\left(0\right)}{h}} \notag \\ 
&=& \lim_{h\rightarrow0}{\frac{\sqrt[3]{h}\sin{\left(h^2\right)}}{h}} \notag \\ 
&=& \lim_{h\rightarrow0}{\left(\sqrt[3]{h} \cdot {h} \cdot \frac{\sin{\left(h^2\right)}}{h^2}\right)} \notag \\
&=& \lim_{h\rightarrow0}{\sqrt[3]{h}} \cdot \lim_{h\rightarrow0}{h} \cdot \lim_{h\rightarrow0}{\frac{\sin{\left(h^2\right)}}{h^2}} \notag \\
&=& 0 \cdot 0 \cdot 1 = 0 \notag
\end{eqnarray}
since each of the limits above exists  We see that, indeed, the function $f\left(x\right)$ possesses a horizontal tangent line at the point $x=0$ 

\section{Closer Look at the Expression for the Derivative}

What is the problem with the standard procedure proposed by many textbooks and repeated in every Calculus class? The explanation lies in the following premise: the expression of the derivative of the function does not contain the information as to whether the function is differentiable or not at the points where it is undefined  As it is pointed out in \cite{Rivera2013}, the domain of the derivative is determined \emph{a priori} and therefore should not be obtained from the formula of the derivative itself 

In the example above the Product Law for derivatives requires the existence of the derivatives of both functions at the point of interest  Since the function $\sqrt[3]{x}$ is not differentiable in zero, the Product Rule cannot be applied  

In order to see what exactly happens when we apply the Product Rule, let us find the expression for the derivative using definition of the derivative:
\begin{eqnarray}
f'\left(x\right) &=& \lim_{h\rightarrow0}{\frac{f\left(x+h\right)-f\left(x\right)}{h}} \notag \\ 
&=& \lim_{h\rightarrow0}{\frac{\sqrt[3]{x+h}\sin{\left(x+h\right)^2}-\sqrt[3]{x}\sin{\left(x^2\right)}}{h}} \notag \\ 
&=& \lim_{h\rightarrow0}{\frac{\left(\sqrt[3]{x+h}-\sqrt[3]{x}\right)}{h}\sin{\left(x^2\right)}} + \notag \\
&& \lim_{h\rightarrow0}{\frac{\left(\sin{\left(x+h\right)^2}-\sin{\left(x^2\right)}\right)}{h}\sqrt[3]{x+h}} \notag \\
&=& \lim_{h\rightarrow0}{\frac{\sqrt[3]{x+h}-\sqrt[3]{x}}{h}} \cdot \lim_{h\rightarrow0}{\sin{\left(x^2\right)}} +  \notag \\&& \lim_{h\rightarrow0}{\frac{\sin{\left(x+h\right)^2}-\sin{\left(x^2\right)}}{h}} \cdot \lim_{h\rightarrow0}{\sqrt[3]{x+h}} \notag \\
&=& \frac{1}{3\sqrt[3]{x^2}} \cdot \sin{\left(x^2\right)}+2x\cos{\left(x^2\right)} \cdot \sqrt[3]{x} \notag 
\end{eqnarray}
which seems to be identical to the expression (\ref{DerivativeExpression}) 

Students are expected to develop a skill of deriving similar results and know how to find the derivative of the function using definition of the derivative only  But how `legal' are the performed operations?

\begin{figure}[H]
\begin{center}
	\includegraphics[width=6 0in]{sin pdf}
	\vspace{ 1in}
	\caption{Graph of the function $g\left(x\right)=\sqrt[3]{x}\cos{\left(x^2\right)}$}
	\label{fig:GFunction}
\end{center}
\end{figure}

Let us consider each of the following limits: 
\begin{eqnarray*}
&& \lim_{h\rightarrow0}{\frac{\sqrt[3]{x+h}-\sqrt[3]{x}}{h}} \notag \\
&& \lim_{h\rightarrow0}{\sin{\left(x^2\right)}}\notag \\
&& \lim_{h\rightarrow0}{\frac{\sin{\left(x+h\right)^2}-\sin{\left(x^2\right)}}{h}}\notag \\
&& \lim_{h\rightarrow0}{\sqrt[3]{x+h}} 
\end{eqnarray*}
The last three limits exist for all real values of the variable $x$  However, the first limit does not exist when $x=0$  Indeed
\begin{equation*}
\lim_{h\rightarrow0}{\frac{\sqrt[3]{0+h}-\sqrt[3]{0}}{h}} = \lim_{h\rightarrow0}{\frac{1}{\sqrt[3]{h^2}}} = + \infty
\end{equation*}

This implies that the Product and Sum Laws for limits cannot be applied and therefore this step is not justifiable in the case of $x=0$  When the derivation is performed, we automatically assume the conditions, under which the Product Law for limits can be applied, i e  that both limits that are multiplied exist  It is not hard to see that in our case these conditions are actually equivalent to $x\neq0$  This is precisely why, when we wrote out the expression for the derivative (\ref{DerivativeExpression}), it already contained the assumption that it is only true for the values of $x$ that are different from zero 

Note, that in the case of $x=0$ the application of the Product and Sum Laws for limits is not necessary, since the term $\left(\sqrt[3]{x+h}-\sqrt[3]{x}\right)\sin{\left(x^2\right)}$ vanishes 

The correct expression for the derivative of the function $f\left(x\right)$ should be the following:
\begin{equation*}
f'\left(x\right)  = 
\begin{cases} 
\frac{6x^2\cos{\left(x^2\right)}+\sin{\left(x^2\right)}}{3\sqrt[3]{x^2}}, & \mbox{if } x \neq 0 \\ 
0, & \mbox{if } x = 0 
\end{cases}
\end{equation*}

The expression for the derivative of the function provides the correct value of the derivative only for those values of the independent variable, for which the expression is defined; it does not tell anything about the existence or the value of the derivative, where the expression for the derivative is undefined  Indeed, let us consider the function
\begin{equation*}
g\left(x\right) = {\sqrt[3]{x}}\cos{\left(x^2\right)}
\end{equation*}
and its derivative $g'\left(x\right)$ 
\begin{equation*}
g'\left(x\right) = \frac{\cos{\left(x^2\right)}-6x^2\sin{\left(x^2\right)}}{3\sqrt[3]{x^2}}
\end{equation*}

Similar to the previous example, the expression for the derivative is undefined at $x=0$  Nonetheless, it can be shown that $g\left(x\right)$ is not differentiable at $x=0$ (see Figure \ref{fig:GFunction})  Therefore, we provided two visually similar functions: both have the expressions for their derivatives undefined in zero, however, one of these functions possesses a derivative, but the other one does not 

\section{Methodological Remarks}

Unfortunately, there exist many functions similar to the ones discussed above and they can arise in a variety of typical Calculus problems: finding the points where the tangent line is horizontal, finding an equation of the tangent and normal lines to the curve at the given point, the use of differentials and graph sketching  Relying only on the expression of the derivative for determining its value at the undefined points may lead to missing a solution (as in the example discussed above) or to some completely false interpretations (as in the case of curve sketching) 

As it was discussed above, the expression for the derivative does not provide any information on the existence or the value of the derivative, where the expression itself is undefined  Here we present a methodology for the analysis of this type of functions 

Let $f\left(x\right)$ be the function of interest and $f'\left(x\right)$ be the expression of its derivative undefined at some point $x_{0}$  In order to find out if $f\left(x\right)$ is differentiable at $x_{0}$, we suggest to follow a list of steps:

\begin{enumerate}
  \item Check if the function $f\left(x\right)$ itself is defined at the point $x_{0}$  If $f\left(x\right)$ is undefined at $x_{0}$, then it is not differentiable at $x_{0}$  If $f\left(x\right)$ is defined at $x_{0}$, then proceed to next step  
  \item Identify the basic functions that are used in the formula of the function $f\left(x\right)$, that are themselves defined at the point $x_{0}$, but their derivative is not (such as, for example, the root functions) 
	\item Find the derivative of the function $f\left(x\right)$ at the point $x_{0}$ using definition 
\end{enumerate}

The importance of the first step comes from the fact that most students tend to pay little attention to the functions domain analysis when asked to investigate its derivative  Formally, the second step can be skipped, however it will give the students the insight into which part of the function presents a problem and teach them to identify similar cases in the future  the difficulty of accomplishing the third step depends on the form of the function and sometimes can be tedious  Nevertheless, it allows the students to apply the previously obtained skills and encourages the review of the material 

\begin{figure}[H]
\begin{center}
	\includegraphics[width=6 0in]{cos pdf}
	\vspace{ 1in}
	\caption{Graph of the function $g\left(x\right)=\sqrt[3]{x}\cos{\left(x^2\right)}$}
	\label{fig:GFunction}
\end{center}
\end{figure}

\section{Conclusion}

We discussed the misconception, that the expression of the derivative of the function contains the information as to whether the function is differentiable or not at the points, where the expression is undefined  We considered a typical Calculus problem of looking for the horizontal tangent line of a function as an example  We showed how the search for the values that make the expression of the derivative equal zero leads to missing a solution: even though the expression of the derivative is undefined, the function still possesses the derivative at the point  We provided an example of the function that similarly has the expression for the derivative undefined, however the function is not differentiable at the point  We also presented the methodological treatment of such functions by applying the definition of the derivative, which can be used in the classroom 





ground_truth: It depends on the value of x, either 0 or (6x^2cos(x^2)+sin(x^2))/(3(x^2)^(1/3)).

prompt_front: Now, answer the following question based on the text below, only give me the answer and do not output any other words.

Question: What is the potential of SNNs in modeling the visual system?

Read the following text and answer briefly.

Context 3: Paper Info

Title: Deep Spiking Neural Networks with High Representation Similarity Model Visual Pathways of Macaque and Mouse
Publish Date: 22 May 2023
Author List: Zhengyu Ma (from Department of Networked Intelligence, Peng Cheng Laboratory), Yu Liutao (from Department of Networked Intelligence, Peng Cheng Laboratory), Huihui Zhou (from Department of Networked Intelligence, Peng Cheng Laboratory), Allen Brain
Author Affiliation: CORNet-S ConvNeXt-Tiny ConvNeXt-Small EfficientNet, AlexNet RegNetY, ResNet34 ConvNeXt-Base CORNetSEW, ResNet8 ResNet101 SEW-ResNet18 ViT-L, GoogLeNet SEW-ResNet34 SEW-ResNet8 Wide

Figure

Figure 1: To conduct neural representation similarity experiments, we apply three similarity metrics to a layer-by-layer comparison between the responses of models and the neural activities of visual cortex 
Figure 2: For three datasets and three similarity metrics, each point indicates the final representation similarity score of a model Each pair of SEW ResNet and ResNet with the same depth are linked by a gray solid line In almost all conditions, SEW ResNet outperforms ResNet by a large margin 
Figure3: For three datasets and three similarity metrics, we plot the trajectories of similarity score with model layer depth The models are divided into two groups: ResNet and SEW ResNet The normalized layer depth ranges from 0 (the first layer) to 1 (the last layer) Because the depths of models are not the same, we first discretize the normalized depth into 50 bins, and then apply the cubic spline interpolation to the scores of each model, yielding the smooth trajectories shown in the plot The fine, semitransparent lines are the trajectories of each model The thick lines are the average trajectories among each group 
Figure 5: For Macaque-Synthetic dataset, trajectories of similarity score with model layer depth are plotted The models are divided into two groups: ViT and CNN&SNN The normalized layer depth ranges from 0 (the first layer) to 1 (the last layer) The calculation and plotting of the trajectories are the same as Figure 3 
Figure6: The basic block of SpikingMobileNet "PW CONV" is the pointwise convolution and "DW CONV" is the depthwise convolution "SN" is the spiking neuron 
Figure 7: Overall model rankings of the similarity scores on Allen Brain mouse dataset The similarity scores of CNNs, SNNs and vision transformers are shown by blue, green and orange bars, respectively 
Figure 9: Overall model rankings of the similarity scores on Macaque-Synthetic dataset 
Figure 10: The Spearman's rank correlation between the overall model rankings of different metrics There is a strong correlation between SVCCA and TSVD-Reg, but RSA has weaker correlations with them 
The correlation between the similarity scores and the model depth r is Spearman's rank correlation coefficient "-" indicates that there is no significant correlation 
Architectures of SNNs "sn" denotes the spiking neuron "g = 32" denotes the grouped convolutions with 32 groups The hyper-parameters of the spike-element-wise block are shown in the brackets with the number of stacked blocks outside 

abstract

Deep artificial neural networks (ANNs) play a major role in modeling the visual pathways of primate and rodent  However, they highly simplify the computational properties of neurons compared to their biological counterparts  Instead, Spiking Neural Networks (SNNs) are more biologically plausible models since spiking neurons encode information with time sequences of spikes, just like biological neurons do 
However, there is a lack of studies on visual pathways with deep SNNs models  In this study, we model the visual cortex with deep SNNs for the first time, and also with a wide range of state-of-the-art deep CNNs and ViTs for comparison  Using three similarity metrics, we conduct neural representation similarity experiments on three neural datasets collected from two species under three types of stimuli 
Based on extensive similarity analyses, we further investigate the functional hierarchy and mechanisms across species  Almost all similarity scores of SNNs are higher than their counterparts of CNNs with an average of 6 6%  Depths of the layers with the highest similarity scores exhibit little differences across mouse cortical regions, but vary significantly across macaque regions, suggesting that the visual processing structure of mice is more regionally homogeneous than that of macaques 
Besides, the multi-branch structures observed in some top mouse brain-like neural networks provide computational evidence of parallel processing streams in mice, and the different performance in fitting macaque neural representations under different stimuli exhibits the functional specialization of information processing in macaques 
Taken together, our study demonstrates that SNNs could serve as promising candidates to better model and explain the functional hierarchy and mechanisms of the visual system  Originally, the prototype of deep neural networks is inspired by the biological vision system   To date, deep neural networks not only occupy an unassailable position in the field of computer vision , but also become better models of the biological visual cortex compared to traditional models in the neuroscience community (Khaligh-Razavi and Kriegeskorte 2014;  
They have been successful at predicting the neural responses in primate visual cortex, matching the hierarchy of ventral visual stream (Güc ¸lü and van Gerven 2015; , and even controlling neural activity   Moreover, as training paradigms of mice and techniques for collecting neural activity (de Vries et al  2020) have been greatly improved, there is a strong interest in exploring mouse visual cortex 
Deep neural networks also play an important role in revealing the functional mechanisms and structures of mouse visual cortex   Compared to biological networks, Artificial Neural Networks discard the complexity of neurons   Spiking Neural Networks, incorporating the concept of time and spikes, are more biologically plausible models  
To be more specific, because of their capabilities of encoding information with spikes, capturing the dynamics of biological neurons, and extracting spatio-temporal features, deep SNNs are highly possible to yield brain-like representations )  However, deep SNNs have not been employed to model visual cortex due to the immaturity of training algorithms 
Recently, a state-ofthe-art directly trained deep SNN , makes it possible to use deep SNNs as visual cortex models  Contributions  In this work, we conduct large-scale neural representation similarity experiments on SNNs and other high-performing deep neural networks to study the brain's visual processing mechanisms, with three datasets and three similarity metrics (Figure ) 
Specifically, to the best of our knowledge, we are the first to use deep SNNs to fit complex biological neural representations and explore the biological visual cortex  We summarize our main contributions in four points as follows  • We find that SNNs outperform their counterparts of CNNs with the same depth and almost the same architectures in almost all experiments 
In addition, even with very different depths and architectures, SNNs can achieve top performance in most conditions  • By making a more direct comparison between macaques and mice for the first time, we reveal the differences in the visual pathways across the two species in terms of the homogeneity of visual regions and the increases of receptive field sizes across cortical visual pathways, which is consistent with previous physiological work 
• The multi-branch structures in neural networks benefit neural representation similarity to mouse visual cortex, providing computational evidence that parallel information processing streams are widespread between cortical regions in the mouse visual system  • Comparing the results of two macaque neural datasets under different stimuli, we reveal that the macaque vision system may have functional specialization for processing human faces and other natural scenes 
Altogether, as the first work to apply deep SNNs to fit neural representations, we shed light on visual processing mechanisms in both macaques and mice, demonstrating the potential of SNNs as a novel and powerful tool for research on the visual system  Our codes and appendix are available at https://github com/Grasshlw/SNN-Neural-Similarity 
There are plenty of computational models of macaque and mouse visual systems for exploring the visual processing mechanisms recently  We summarize some of the outstanding work in the following  The network models of macaque visual system  In the early days, studies basically used simple feedforward neural networks as the models of the macaque visual system (Khaligh-Razavi and Kriegeskorte 2014;  
Recently, some bio-inspired or more complex models achieved better performance in fitting the neural representations of macaque visual cortex   proposed a brainlike shallow CNN with recurrent connections to better match the macaque ventral visual stream  By mimicking the primary stage of the primate visual system, VOneNets ) performed more robustly in image recognition while better simulating macaque V1 
Moreover, the representations learned by unsupervised neural networks ) also effectively matched the neural activity of macaque ventral visual stream  Although the above work developed many bio-inspired structures, the networks are still traditional ANNs in nature  Our work introduces deep SNNs for the first time to explore the visual processing mechanisms of macaque visual system 
The network models of mouse visual system  Largescale mouse neural dataset provided an experimental basis for model studies of mouse visual system (de Vries et al  2020;   conducted comparisons between the representations of mouse visual cortex and the VGG16 trained on the Im-ageNet dataset  In , they developed a single neural network to model both the dorsal and ventral pathways with showing the functional specializations 
What's more, a large survey of advanced deep networks ) revealed some hierarchy and functional properties of mice  Similar to the studies of macaque visual system, deep SNNs have never been used to model the mouse visual system  In this work, we not only use SNNs as one of the candidates to fit the representations of mouse visual cortex, but also conduct direct comparisons between macaques and mice to further investigate the functional hierarchy and mechanisms of the two species 
Our work is conducted with three neural datasets  These datasets are recorded from two species under three types of stimuli  More specifically, there are neural responses of mouse visual cortex to natural scene stimuli, and responses of macaque visual cortex to face image and synthetic image stimuli  Allen Brain mouse dataset 
It is part of the Allen Brain Observatory Visual Coding dataset ) col-lected using Neuropixel probes from 6 regions simultaneously in mouse visual cortex  Compared to two-photon calcium imaging, Neuropixel probes simultaneously record the spikes across many cortical regions with high temporal resolution 
In these experiments, mice are presented with 118 250-ms natural scene stimuli in random orders for 50 times  Hundreds to thousands of neurons are recorded for each brain region  To get the stable neurons, we first concatenate the neural responses (average number of spikes in 10-ms bins across time) under 118 images for each neuron, and then preserve the neurons whose split-half reliability across 50 trials reaches at least 0 8 
Macaque-Face dataset  This dataset ) is composed of neural responses of 159 neurons in the macaque anterior medial (AM) face patch under 2,100 real face stimuli, recorded with Tungsten electrodes  For this dataset, we compute the average number of spikes in a time window of 50-350ms after stimulus onset and exclude eleven neurons with noisy responses by assessing the neurons' noise ceiling 
The details of the preprocessing procedure are the same as   Macaque-Synthetic dataset  This dataset is also about macaque neural responses which are recorded by electrodes under 3,200 synthetic image stimuli, and used for neural prediction in the initial version of Brain-Score   The image stimuli are generated by adding a 2D projection of a 3D object model to a natural background 
The objects consist of eight categories, each with eight subclasses  The position, pose, and size of each object are randomly selected  88 neurons of V4 and 168 neurons of IT are recorded  The neural responses are preprocessed to the form of average firing rate and can be downloaded from Brain-Score  Since the core visual function of macaque and mouse visual cortex is to recognize objects, the basic premise of model selection is that the model has good performance on object recognition tasks (e g 
classification on ImageNet)  Based on this premise, we employ 12 SNNs, 43 CNNs, and 26 vision transformers, all of which are pretrained on the Ima-geNet dataset and perform well in the classification task  As for SNNs, we use SEW ResNet as the base model, which is the deepest and SOTA directly trained SNN  
Furthermore, by combining the residual block used in SEW ResNet and the hierarchy of the visual cortex, we build several new SNNs and train them on the ImageNet using SpikingJelly ) (see Appendix A for model structures and the details of model training)  As for CNNs and vision transformers, we use 44 models from the Torchvision model zoo , 22 models from the Timm model zoo ) and 3 models from the brain-like CNNs, CORnet family ) 
In the feature extraction procedures of all models, we feed the same set of images used in biological experiments to the pretrained models and obtain features from all chosen layers  Different from CNNs and vision transformers, the features of SNNs are spikes in multiple time steps  To obtain the representation similarity between biological visual cortex and computational models, we apply three similarity metrics to computing similarity scores: representational similarity analysis (RSA) , regression-based encoding method and singular vector canonical correlation analysis (SVCCA)  
RSA has already been widely used to analyze neural representations of a model and a brain to different stimuli at the population level, while the regression-based encoding method directly fits the model features to neural activity data  SVCCA is originally proposed to compare features of deep neural networks, and then Buice 2019) used it to compare representation matrices from mouse visual cortex and DNNs, which demonstrated its effectiveness 
With the same model and same cortical region, we use these metrics for a layer-by-layer comparison to compute the similarity scores  The maximum similarity score across layers for a given cortical region is considered to be the level of representation similarity between the model and the cortical region 
Finally, in a given dataset, we take the average score of all cortical regions as the final similarity score for each model, which gives the overall model rankings  The implementation of each similarity metric is as follows  RSA  For two response matrices R ∈ R n×m from each layer of models and each cortical region, where n is the number of units/neurons and m is the number of stimuli, we calculate the representational similarity between the responses to each pair of image stimuli using the Pearson correlation coefficient r, yielding two representational dissimilarity matrices (RDM ∈ R m×m , where each element is the correlation distance 1 − r) 
Then, the Spearman rank correlation coefficient between the flattened upper triangles of these two matrices is the metric score  Regression-Based Encoding Method  Firstly, we run truncated singular value decomposition (TSVD) to reduce the feature dimension of model layers to 40  Secondly, the features after dimensionality reduction are fitted to the representations of each neuron by ridge regression 
Finally, we compute the Pearson correlation coefficient between the predicted and ground-truth representations of each neuron and take the mean of all correlation coefficients as the metric score  More specifically, we apply leave-one-out crossvalidation to obtain predicted representations of each neuron 
For simplicity, we name this method 'TSVD-Reg'  SVCCA  For both the responses of model layers and cortical regions, we use TSVD to reduce the dimension of unit/neuron to 40, yielding two reduced representation matrices  Then we apply canonical correlation analysis (CCA) to these two matrices to obtain a vector of correlation coefficients (the length of the vector is 40) 
The metric score is the mean of the vector  Because of the invariance of CCA to affine transformations , in this procedure, we only need to ensure that the stimulus dimension is consistent and aligned, even if the unit/neuron dimension is different  Dimensionality reduction plays an important role in this method to make the number of model features comparable to the number of neurons in cortical regions, since the former usually far exceeds the latter 
In addition, dimensionality reduction helps to determine which features are important to the original data, while CCA suffers in important feature detection  Using just CCA performs badly, which has been proven by   To check how similar the models are to the visual cortex's mechanisms in visual processing, we rank the final similarity scores of all models and conduct comparisons among three types of models (CNNs, SNNs, and vision transformers) 
Specially, we focus on comparing SNN (SEW ResNet) and CNN (ResNet) with the same depth and almost the same architectures (Figure )  The final similarity score of a model is the average similarity score across all cortical regions  (The overall rankings can be found in Appendix B and the comparisons among three types of models are shown in Appendix C )
Allen brain mouse dataset  No single model achieves the highest final similarity scores with all three metrics  For a fair comparison, we apply the paired t-test to SEW ResNet and ResNet with the same depth  For all three metrics, SEW ResNet performs better than ResNet by a large margin (t = 5 857, p = 0 004; t = 7 666, p = 0 002; t = 7 592, p = 0 002) 1   1 The results of the three similarity metrics are separated by semicolons, in the order of SVCCA, TSVD-Reg, and RSA 
Other Macaque-Face dataset  For both SVCCA and TSVD-Reg, Wide-SEW-ResNet14 and Wide-SEW-ResNet8 achieve the first and second highest final similarity scores respectively  But for RSA, TNT-S and Inception-ResNet-V2 take their place and outperform other models by a large margin  As for SEW ResNet and ResNet, the former performs significantly better than the latter for both SVCCA and TSVD-Reg (t = 8 195, p = 0 001; t = 7 528, p = 0 002) 
However, the difference is not significant for RSA (t = 1 117, p = 0 327)  Specifically, the similarity score of SEW ResNet152 is only slightly higher than that of ResNet152, and at the depth of 50 and 101, SEW ResNet's scores are lower than ResNet's  Macaque-Synthetic dataset  Similar to the results of Allen Brain dataset, no model performs best for all three metrics 
SEW ResNet performs moderately better than ResNet (t = 3 354, p = 0 028; t = 3 824, p = 0 019; t = 2 343, p = 0 079)  The only contrary is that SEW ResNet18 performs worse than ResNet18 for RSA  Further, to check the details of comparison between the SNNs and their CNN counterparts, we analyze the trajectories of similarity score across model layers (Figure ) 
As for ResNet and SEW ResNet with the same depth, the trends of their similarities across model layers are almost the same, but the former's trajectory is generally below the latter's  In other words, the similarity scores of SEW ResNet are higher than those of ResNet at almost all layers  Taken together, the results suggest that when the overall results that appear below also correspond to the three metrics in this order, unless the correspondence is stated in the text 
architectures and depth are the same, SNNs with spiking neurons perform consistently better than their counterparts of CNNs with an average increase of 6 6%  Besides, SEW ResNet14 also outperforms the brain-like recurrent CNN, CORnet-S, with the same number of layers (see more details in Appendix B)  Two properties of SNNs might contribute to the higher similarity scores 
On the one hand, IF neurons are the basic neurons of spiking neural networks  The IF neuron uses several differential equations to roughly approximate the membrane potential dynamics of biological neurons, which provides a more biologically plausible spike mechanism for the network  On the other hand, the spiking neural network is able to capture the temporal features by incorporating both time and binary signals, just like the biological visual system during information processing 
To figure out the distinctions in the functional hierarchy between macaques and mice, for each cortical region, we obtain the normalized depth of the layer that achieves the highest similarity score in each model  Then, we divide models (excluding vision transformers) into two groups based on their depths and conduct investigations on these two groups separately 
A nonparametric ANOVA is applied to each group for testing whether layer depths change significantly across cortical regions  For mouse visual cortex (Figure (a)), taking the deep model group as an example, ANOVA shows overall significant changes in depth across cortical regions for TSVD-Reg and RSA (Friedman's χ 2 = 49 169,
p = 2 0 × 10 −9 ; χ 2 = 19 455, p = 0 002)  But there is no significant change for SVCCA (χ 2 = 8 689, p = 0 122)  According to these results, the differences in depth across regions are indeterminacy and irregular  Meanwhile, the trends of layer depth between some regions contradict the hierarchy observed in physiological experiments of mice (those between VISp and VISrl for TSVD-Reg and between VISal and VISpm for RSA) 
However, for macaque visual cortex (Figure (b)), there are significant differences (t = −5 451, p = 6 5 × 10 −6 ; t = −8 312, p = 2 8 × 10 −9 ; t = −3 782, p = 6 9 × 10 −4 , also taking the deep model group as an example) between V4 and IT, and the trend is consistent with the information processing hierarchy in primate visual cortex 
The comparative analyses of the best layer depths of the shallow and deep model groups also exhibit the differences between macaques and mice  For mouse visual cortex, the best layer depths of shallow models are significantly higher than those of deep models  Compared to deep models, most shallow models achieve the top similarity scores in intermediate and even later layers 
Differently, for macaque visual cortex, the depth of models has little effect on the depth of the most similar layer  What's more, we find that the most similar layer of mouse visual cortex always occurs after the 28 × 28 feature map is downsampled to 14 × 14, which leads to the layer depths' difference between shallow and deep models 
Nevertheless, the best layer of macaque IT appears in the last part of networks, where the feature map has been downsampled more times  In summary, our results might reveal two distinctions in the functional hierarchy between macaques and mice  First, there is a distinct functional hierarchical structure of macaque ventral visual pathway, while there might be no clear sequential functional hierarchy in mouse visual cortex 
One explanation is that the mouse visual cortex is organized into a parallel structure and the function of mouse cortical regions are more generalized and homogeneous than those of macaques  Another possibility would be that even though the sequential relations exist among mouse cortical regions as proposed in anatomical and physiological work, they are too weak for the current deep neural networks to capture 
Additionally, mice perform more complex visual tasks than expected with a limited brain capacity   Consequently, the neural responses of mouse visual cortex may contain more information not related to object recognition that neural networks focus on  Secondly, it is well known that the units in the neural networks get larger receptive fields after downsampling, and through the analyses of differences between two groups of models based on depth, we find the feature map of the best layer for mouse is downsampled fewer times than that for macaque 
Based on these results, we provide computational evidence that the increased ratio of the receptive field size in cortical regions across the mouse visual pathway is smaller than those across the macaque visual pathways, which echoes some physio- Macaque-Face dataset --- Table : The correlation between the similarity scores and the number of parameters 
r is Spearman's rank correlation coefficient  "-" indicates that there is no significant correlation  To explore the processing mechanisms in the visual cortex of macaques and mice, we investigate the model properties from the whole to the details  As shown in Table and 2, we first measure the correlation between the similarity scores and the sizes (i e  the number of trainable parameters and the depth) of network models 
For Allen Brain mouse dataset, there are significant negative correlations between the similarity scores and the number of parameters for three metrics while there is no correlation with the depth  Conversely, for the two macaque neural datasets, the similarity scores are highly correlated with the depth of networks, but not with the number of parameters 
Specifically, there is a positive correlation for Macaque-Face dataset while a negative correlation for Macaque-Synthetic dataset  (We also apply the linear regression to analyze the correlation between the similarity scores and the model size  The results are consistent with Spearman's rank correlation and are shown in Appendix E) 
Based on these results, we further investigate more detailed properties of neural networks to explain the processing mechanisms in the visual cortex  For the mouse dataset, on the one hand, the best layer depths show non-significant changes across the mouse cortical regions as mentioned in the previous section 
On the other hand, the similarity scores of the mouse dataset are only correlated with the number of model parameters but not with the depth of models  It calls into the question whether any detailed structures in the neural networks help to reduce the number of parameters and improve its similarity to mouse visual cortex 
Therefore, we explore the commonalities between models that have the top 20% representation similarities (see Appendix D) for Allen Brain dataset  As expected, the top models contain similar structures, such as fire module, inception module, and depthwise separable convolution  All these structures essentially process information through multiple branches/channels and then integrate the features from each branch 
The models with this type of structure outperform other models (t = 2 411, p = 0 024; t = 3 030, p = 0 007; t = 1 174, p = 0 247)  Moreover, we apply the depthwise separable convolution to SNNs, which yields a positive effect  The representation similarity of Spiking-MobileNet is higher than SEW-ResNet50 with a similar depth (+0 8%; +3 9%; +12 1%) 
In fact, some studies using multiple pathways simulate the functions of mouse visual cortex to some extent   Our results further suggest that not only the mouse visual cortex might be an organization of parallel structures, but also there are extensive parallel information processing streams between each pair of cortical regions  
For the two macaque datasets with different stimuli, not only are the model rankings significantly different, but also the correlations between the similarity scores and the model depth are totally opposite  These results corroborate the following two processing mechanisms in macaques: the ventral visual stream of primate visual cortex possesses canonical coding principles at different stages; the brain exhibits a high degree of functional specialization, such as the visual recognition of faces and other objects, which is reflected in the different neural responses of the corresponding region (although the face patch AM is a sub-network of IT, they differ in the neural representations) 
Besides, as shown in Figure , The calculation and plotting of the trajectories are the same as Figure   the similarity scores of vision transformers reach the maximum in the early layers and then decrease  Differently, the scores of CNNs and SNNs keep trending upwards, reaching the maximum in almost the last layer 
On the other hand, Appendix C shows that vision transformers perform well in Macaque-Face dataset but poorly in Macaque-Synthetic dataset  Considering the features extraction mechanism of vision transformers, it divides the image into several patches and encodes each patch as well as their internal relation by self-attention 
This mechanism is effective for face images that are full of useful information  However, the synthetic image consists of a central target object and a naturalistic background  When vision transformers are fed with this type of stimuli, premature integration of global information can lead to model representations containing noise from the unrelated background 
What's more, when we take all models with the top 20% representation similarities as a whole for analyses, as described in the above paragraph, the properties that enable networks to achieve higher neural similarity are not yet clear  Taken together, the computational mechanism of the better models may reveal core processing divergence to different types of stimuli in the visual cortex 
In this work, we take large-scale neural representation similarity experiments as a basis, aided by analyses of the similarities across models and the visual cortical regions  Compared to other work, we introduce SNNs in the similarity analyses with biological neural responses for the first time, showing that SNNs achieve higher similarity scores than CNNs that have the same depth and almost the same architectures 
As analyzed in Section 3 1, two properties of SNNs might serve as the explanations for their high similarity scores  The subsequent analyses of the models' simulation performance and structures indicate significant differences in functional hierarchies between macaque and mouse visual cortex  As for macaques, we observed a clear sequential hi-erarchy 
However, as for mouse visual cortex, some work ) exhibits that the trend of the model feature complexity roughly matches the processing hierarchy, but other work suggests that the cortex ) is organized into a parallel structure  Our results are more supportive of the latter  Furthermore, we provide computational evidence not only that the increased ratio of the receptive field size in cortical regions across the mouse visual pathway is smaller than those across the macaque visual pathway, but also that there may be multiple pathways with parallel processing streams between mouse cortical regions 
Our results also clearly reveal that the processing mechanisms of macaque visual cortex differ to various stimuli  These findings provide us with new insights into the visual processing mechanisms of macaque and mouse, which are the two species that dominate the research of biological vision systems and differ considerably from each other 
Compared to CNNs, the study of task-driven deep SNNs is just in its initial state  Although we demonstrate that SNNs outperform their counterparts of CNNs, SNNs exhibit similar properties as CNNs in the further analyses  In this work, we only build several new SNNs by taking the hints from the biological visual hierarchy, while many well-established structures and learning algorithms in CNNs have not been applied to SNNs yet 
In addition, the neural datasets used in our experiments are all collected under static image stimuli, lacking rich dynamic information to some certain, which may not fully exploit the properties of SNNs  Given that SNNs perform well in the current experiments, we hope to explore more potential of SNNs in future work 
In conclusion, as more biologically plausible neural networks, SNNs may serve as a shortcut to explore the biological visual cortex  With studies on various aspects of SNNs, such as model architectures, learning algorithms, processing mechanisms, and neural coding methods, it's highly promising to better explain the sophisticated, complex, and diverse vision systems in the future 

Implementation Details of SNNs Spiking Neuron Model

For all SNNs, we use the Integrate-and-Fire (IF) model as the spiking neuron model, which acts as the activation layer in neural networks  As mentioned in , V t , X t and S t denote the state (membrane voltage), input (current) and output (spike) of the spiking neuron model respectively at time-step t, and the dynamics of the IF model can be described as follows:
(1) (2) (3) While V t is the membrane voltage after the trigger of a spike, H t is also the membrane voltage, but after charging and before a spike firing  Θ(x) is the unit step function, so S t equals 1 when H t is greater than or equal to the threshold voltage V thresh and 0 otherwise  Meanwhile, when a spike fires, V t is reset to V reset  
Here, we set V thresh = 1 and V reset = 0  In addition, because Θ(x) is non-differentiable at 0, the surrogate gradient method is applied to approximate the derivative function during back-propagation  Here, we use the inverse tangent function as the surrogate gradient function and the derivative function is
(5) In our experiments on SNNs, we not only use SEW ResNet proposed by ), but also build several new SNNs  On the one hand, we improve the spike-elementwise block in SEW ResNet with new architectures referring to studies on ResNet , as shown in Table   On the other hand, as the multi-branch structures in CNNs increase neural representation similarity to mouse visual cortex, we use depthwise separable convolutions and follow the overall architecture of MobileNetV2 to build the SpikingMobileNet, the basic block of which is shown in Figure  
Our implementation is based on SpikingJelly , an open-source framework of deep SNN  We use the ImageNet dataset to pre-train the new SNNs  Following the settings for training SEW ResNet , we train the models for 320 epochs on 8 GPUs (NVIDIA V100), using SGD with a mini-batch size of 32  The momentum is 0 9 and the weight decay is 0  The initial learning rate is 0 1 and we decay it with a cosine annealing, where the maximum number of iterations is the same as the number of epochs 
For all SNNs, we set the simulation duration T = 4 

Overall model rankings

The results of model rankings are shown in Figure , 8 and 9  We also apply the Spearman's rank correlation to the overall model rankings of different metrics, which is shown in Figure  

Score Comparisons among Model Groups

We conduct comparisons of similarity scores among CNNs, SNNs, and vision transformers  The results are shown in Figure  

Overall CNN rankings

The results of CNN rankings are shown in Figure , 13 and 14 

Correlations between the Model Sizes and the Similarity Scores

The results of linear regression to model sizes and the similarity scores are shown in Figure , 16 and 17 

The ImageNet Accuracy and the Similarity Scores

The results are shown in Figure  



ground_truth: SNNs have the potential to better model and explain the functional hierarchy and mechanisms of the visual system.