# What do CNN neurons learn: Visualization & Clustering

Haoyue Dai
Shanghai Jiao Tong University
<EMAIL_ADDRESS>
###### Abstract

In recent years convolutional neural networks (CNN) have shown striking
progress in various tasks. However, despite the high performance, the training
and prediction process remains to be a black box, leaving it a mystery to
extract what neurons learn in CNN. In this paper, we address the problem of
interpreting a CNN from the aspects of the input image’s focus and preference,
and the neurons’ domination, activation and contribution to a concrete final
prediction. Specifically, we use two techniques – visualization and clustering
– to tackle the problems above. Visualization means the method of gradient
descent on image pixel, and in clustering section two algorithms are proposed
to cluster respectively over image categories and network neurons. Experiments
and quantitative analyses have demonstrated the effectiveness of the two
methods in explaining the question: what do neurons learn.

##  1 Introduction

Nowadays CNN have obtained satisfying progress in research fileds and yielded
promising application scenarios in industry. However, despite the excitement
in perfomance, due to the end-to-end method in both training and prediction
processes, CNN seems to be a black box: we know it indeed learns something to
be effective, but we don’t know why or what do the neurons learn [1]. This
basic question forms the significant challenge in CNN interpretabily research:
black boxes always tend to be inscrutable without transparent inner mechanism.
To answer this basic question, many studies have been proposed from different
aspects, such as features visualization [2], complex representations
disentanglement [5], and explainable models [6].

In this work, we focus on the image classification task. Rather than boosting
the validation accuracy, we’re more interested in the corresponding CNN
itself. Some typical examples of visualization and clustering in this work are
displayed in Fig. 1. In the context of CNN used for image classification, the
subproblems we’re trying to explain can be roughly listed as below:

Figure 1: Some typical examples of visualization and clustering. (a) is a
ground-truth cat image and its feature map of low convolutional layer is (d).
By gradient descent on image pixels to augment dog dimension’s presoftmax
output, (b) is generated and classified as dog. (c) is grad-CAM [7] showing
highly contribution fileds in (a) and (b) for network to predict them as cat
and dog, respectively. (e) are the optimized “dogs” on different network. (f)
is the hierarchical prediction tree for cat category. By querying along the
tree and checking filters activation, the prediction path of (a) is marked
red, and to explicitly show the semantic features, images max-activating the
corresponding critical filters are shown (linked to red box).

Neuron knowledge visualization: With the intuition to open the black box and
disentangle the inner knowledge hidden in CNN, a direct and crucial method is
to visualize the properties related to a neuron (_a.k.a._ filter) in the CNN
[2, 3, 4]. The method we adopted is gradient descent _w.r.t._ image pixels and
find the input image that maximizes the activation score of some “units”. More
specifically, the term “units” can respectively refer to the softmax output
(class probability) of a class, the pre-softmax output (class logits), the
output value of a middle layer’s whole layer, some channel, or a concrete
filter. With different optimization goals, the problems tackled are also
different:

  * •

Which features does the network use to recognize and discriminate a class, and
how to visualize them? An introducing question would be, how does a little
kid, after reading several elephants’ pictures and being able to recognize
elephants, draw a stick figure of an elephant? The knowledge that a network
gains and remembers from training can also be visualized.

  * •

What features do the low, middle, and high layers in a CNN extract? By sorting
the ground-truth images that highly activate a layer and estimate the critical
features this layer prefers, we find that convolutional layers in different
levels indeed pull out different scope of features.

  * •

What is exactly activating a specific neuron? Or in a invertible perspective,
which regions of the original image is corresponding to which neuron, and how
to quantitatively analyze this neurons contribution in the global prediction
[8]? This can be explored by optimizing the single or mutual filters output.

Figure 2: Optimize $\Phi(\mathbf{x})=$ net.presoftmax$(\mathbf{x})_{dog}$,
where net is a binary ResNet18 [11] trained on dogs and cats of CIFAR-10.
Columns are respectively the initial images, optimized images, grad-CAM [7] of
initial images, grad-CAM [7] of optimized images and difference between
optimized and initial images. Rows shows that with different starting images,
after a slight gradient descent, the upper two rows are fooled to be dog,
while the lower two rows are relatively robust.

Hierarchical clustering: After we extract and visualize the receptive fields
of filters from a local perspective, a natural direction is to dig out in a
global view, how does the network combine each filters from discrete features
to a final prediction? By clustering the middle layers’ feature outputs of
images and the corresponding filters, a path can be defined to show how a
specific category is predicted along from low-level patterns to high-level
compacted feature representations. The clustering algorithm we proposed helps
solving the following two problems:

  * •

What’s the hierarchical order among all the categories in images dataset? By
the clustering algorithm, the image categories are mapped to a dense graph
with subspace distance between them quantitatively defined, and then a
hierarchical tree (like taxonomy tree) is generated. This question is
challenging and effective in many AI researches: _e.g._ to design a rational
and balanced dataset, to classify CNN representations with relationship to
biology species.

  * •

Which filters are responsible for which features, and how much does a filter
contribute to the final prediction? In this research we cluster the filters so
that a decision tree is formed, indicating the importance (contribution) of
each filters and in which order they’re assembled to the final decision.
Filters are exactly related to the semantic-level activation over features,
and by querying the decision tree of a category from root to leaves, it can be
clear how an image is recognized, in an convincing order of semantic fetures
from common to specific.

Figure 3: Left and right parts show respectively the network trained on
cats&dogs and planes&dogs, and the optimization objective is the dog dimension
of presoftmax output. Initial images are 4 randomly sampled cat (or plane)
images from CIFAR-10 and 1 random Gaussian noise with the same channel-wise
mean and standard deviation of CIFAR-10 dataset. Columns show respectively the
initial images, images after 1000 epochs with different learning rate. The
optimized “dog” in the left are dog heads and faces, while in the right is a
complete dog with body, head, arms and legs.

##  2 Neuron knowledge visualization

In this section we describe the method of visualising knowledge learned and
memorized by a given CNN, some layers or some filters. The correlative
experiment results are also attatched in this section. The algorithm is
fomulated as reconstructing an optimal image $\mathbf{x}^{*}\in^{H\times
W\times C}$ that maximize some feature output score:

$\mathbf{x}^{*}=\operatornamewithlimits{argmax}_{\mathbf{x}\in^{H\times
W\times C}}\Phi(\mathbf{x})$ (1)

where $\Phi:^{H\times W\times C}\rightarrow$ indicates the objective to
optimize, respectively as a given dimension of the pre-softmax class logits,
the average output value of a whole layer or a channel of a layer, the output
of a specific filter, or composite sum of the objectives listed above, to
examine the collaborative effect of optimizing over multiple goals.

A local optimal $\mathbf{x}^{*}$ can be found by back-propagation _w.r.t._ the
input image pixels with weights fixed in the pre-trained CNN. As for the
starting point $\mathbf{x}$ of searching, different ground-truth images and
the random noise can be chosen. In practice, stochastic gradient descent (SGD)
is used to prevent being stuck at a saddle point and reach the global optimal
to the full extent [9].

###  2.1 Pixel fooling and robustness of an image

In the first experiment, a binary classification network is trained using
ResNet18 on cat and dog images in CIFAR-10 dataset, achiving validation
accuracy of 92.7%. The interesting intuition is that, how to make a cat look
more like a dog? So we optimize the pre-softmax class logits of the dog
dimension. Fig. 2 shows the images’ change with a low learning rate and
training epochs (lr=0.0001, epochs=100).

From the human’s visual view the images are modified just slightly and remain
the same as cats. However when it comes to network prediction, some of the cat
images are misclassified as dog, with a high convincing possibility. By
gradient-based localization, the receptive field on original image that highly
support the prediction is also marked on grad-CAM [7] image. The difference
$\mathbf{diff}$ between final image $\mathbf{x}_{f}$ and the starting image
$\mathbf{x}_{s}$ (gradient accumulated) is also represented in heatmap as
$\mathbf{diff}_{h,w}=\sqrt{\sum_{c\in
C}{|{\mathbf{x}_{f}}_{h,w,c}-{\mathbf{x}_{s}}_{h,w,c}|^{2}}}$.

By observation, images with a messy and complex background are more vulnerable
to fooling (if the optimization also considered as fooling). Under the same
learning rate and training epochs, these images gain more gradient accumulated
and are more likely to be misclassified. The difference image (gradient
accumulated) of vulnerable images seems to be randomly sampled, while that of
robust images tends to reflect the rough sketch of a cat. Furthermore, the
robustness of an image [13] over a network can be mathematically defined,
using terms of difference, learning rate and optimization epochs [10].

###  2.2 Discriminative evidence of a CNN prediction

Continuing with the cat-dog binary classification network, we still optimize
the dog class logits while increasing the learning rate. As shown in Fig. 3,
with the increasing learning rate, the visual modification becomes more
salient, and when finally the optimized logits converges, many head-shaped
patterns appear on the image. One natural guess comes to us that it’s because
cats and dogs are so similar (both mammal pets, similar body, arms, legs and
feather) that the discriminative evidence the network uses to distinguish dogs
and cats is their heads. Nowthat we want to reconstruct a “super-dog” known by
the network, the most discriminative features of dogs (_i.e._ dog head) will
appear.

To verify the guess, another binary classification network is trained on plane
and dog images in CIFAR-10 dataset, with the same architecture and training
hyper-parameters. As shown in Fig. 3, a complete dog (with head, torso, arms
and legs) appear from optimization. This maybe because planes and dogs are
quite disparate in appearance, thus the network memorize and distinguish a dog
by its whole body. The guess we raised above that a CNN’s discriminative
evidence is related to the training dataset can be roughly verified.

Figure 4: Examples of the images that maximize the activation score of some
filters in the 1-st batch normalization layer after input transform, 1-st to
4-th convolutional layers. 10-classification network trained whole CIFAR-10.
With layer from low to high, filters concern from color, texture to object,
part.

###  2.3 Optimization in middle layers

The experiments demonstrated above are optimizing directly the class logits,
that is to make something look more like a dog. Then what about just
optimizing the middle layers (including channels and neurons)? By doing so the
semantic features representation of inner filters will be more clear to us.

First we train a 10-classification network on all the categories of CIFAR-10,
using the same architecture as above. Then to evaluate the ground-truth images
features on a specific neuron, all the images in dataset are sorted by their
respective output of the neuron. Images with the highest activation score of a
specific neuron is shown in Fig. 4. In the state-of-art research [2],
semantics for CNN filters can be defined as six types: objects, parts, scenes,
textures, materials, and colors. From the sorted images we find that, the high
convolutional layers mainly focus on high-level semantics like objects, parts,
while the low convolutional layers mainly focus on the low-level features like
textures, colors. Here “low-level” refers to strong relationship to frequency
patterns, as illustrated by some researchers [14], maybe a convolution level
indeed acts like a Fourier or some other transform, so that the frequency
distribution of the image is concerned.

Fig. 5 shows the result images after the optimization on specific layers or
neurons. For the instance of neurons in low convolutional layers, the ground-
truth optimals are cage handrails, green background and inclined horizon or
branches towards a same direction. The distribution histogram of all the real
images’ activation score on the filter is bell-shaped, indicating a uniform
distribution over the whole dataset. The respective generated optimization are
colors and textures. When it comes to the instance of neurons in high
convolutional layers, the ground-truth optimals are sailboats, horse heads,
and cats sitting in similar posture. The shape of distribution histogram of
all the real images’ activation score looks much different: only a small
number of dataset images can highly activates the filters with high-level
semantics of objects, parts, etc., and most of the images are ignored by this
filter with low output value.

Figure 5: Examples of optimizing some specific filters (or channels) in layer1
(upper bracket) and layer4 (lower bracket). Columns show respective the
ground-truth optimals, the generated optimals and the activation scores’
distribution of all the dataset images.

What’s more, we have tried to first generate the “super” images Fig. 6 of
categories and then examine whether they bring enough infomation for network
classification, by substituting the training set to a small number of “super”
images. The result is not good. Mathematically it’s like back-stepping from a
local optimal point to the whole function, and the infomation entropy is
increased out of thin air thus it’s impossible [15]. Another direction worth
trying would be add restrictions to preserve entropy, or fine-tune just the
high convolutional layers in a pre-trained network.

Figure 6: “Super” image examples show how the network memorize and distinguish
each category, by optimizing each category’s presoftmax output.
10-calssification network trained on whole CIFAR-10 dataset.

###  2.4 How to make the generated images look more lifelike?

In the generated optimal images shown above, they’re filled with high
frequency noise and nail-shaped patterns. These nonsensical patterns are
partly because of the pooling operation in forward process, and during back-
propagation, a block of pixels are motivated simultaneously to respond the
network.

To eliminate these patterns and make the generated images look more lifelike,
here I use the trick that, every time the gradient is back propagated, before
subtracted by the original image, it’s randomly blurred, translated and
rotated in a slight extent [16]. The result is shown in Fig. 7.

Another way is inspired by [17]: to add a regulariser term to the optimization
objective in (1), _s.t._

$\mathbf{x}^{*}=\operatornamewithlimits{argmax}_{\mathbf{x}\in^{H\times
W\times C}}{(\Phi(\mathbf{x})-\lambda\mathcal{R}(\mathbf{x}))}$ (2)

where $\lambda>0$ is the regularizer coefficient and $\mathcal{R}:^{H\times
W\times C}\rightarrow$ is a regulariser to measure how lifelike the image
$\mathbf{x}$ is. The lower value of $\mathcal{R}(\mathbf{x})$, the more likely
$\mathbf{x}$ looks to be natural and lifelike.

The design of regulariser exactly depends on how to define “natural”: The
simple version would be the $\alpha$-norm
$\mathcal{R}_{\alpha}(\mathbf{x})=\|\mathbf{x}\|_{\alpha}^{\alpha}$, where
$\mathbf{x}$ is the vectorised and mean-subtracted image. With a relatively
large $\alpha$ (_e.g._ 6) and subtracting-mean operation, this regulariser
encourage the images to be constrained within an interval rather than
diverging.

Another useful regulariser is proposed as total variation to measure the
variation extent in neighbor pixels. For each discrete channel
($\mathbf{x}\in^{H\times W}$) of the original image, total variation can be
approximated by the finite-difference:

$\mathcal{R}_{V^{\beta}}(\mathbf{x})=\sum_{i,j}\left(\left(x_{i,j+1}-x_{ij}\right)^{2}+\left(x_{i+1,j}-x_{ij}\right)^{2}\right)^{\frac{\beta}{2}}.$

When $\beta=1$ it’s exactly the presence times of subsampling, which also
caused by max pooling in CNN, while max pooling indeed leads to the high-
frequency patterns.

Figure 7: Optimization examples before and after adopting the trick that
randomly blur, translate and rotate the gradient.

###  2.5 Out-of-sample prediction

Which category would an image not belonging to the trained categories be
predicted as? Initially we expect that untrained images would be randomly
sampled into each category, however it turns out not exactly: as shown in
Table 1, in a binary classification network distinguishing cats and dogs,
except for horse (72.5% of the horse images are classified as dog), all the
other out-of-sample images are mostly classified as cat, and for the random
noise images, even all of them are recognized as cat. The similar phenomenon
also happens to plane-dog network and the 10-classification network: nearly
all the random noise images are recognized as bird.

|  Plane  |  Car  |  Bird  |  Deer  |  Frog  |  Horse  |  Ship  |  Truck  |  Random Noise
---|---|---|---|---|---|---|---|---|---
Cat(%) | 91.9 | 81.4 | 70.1 | 59.1 | 85.7 |  | 93.1 | 73.8 | 100.0
Dog(%) |  |  |  |  |  | 72.5 |  |  |

|  Car  |  Bird  |  Cat  |  Deer  |  Frog  |  Horse  |  Ship  |  Truck  |  Random Noise
---|---|---|---|---|---|---|---|---|---
Plane(%) | 88.8 |  |  |  |  |  | 95.1 | 86.0 | 99.7
Dog(%) |  | 63.3 | 90.9 | 81.1 | 74.8 | 85.6 |  |  |

Table 1: Percentage of out-of-sample images’ prediction to some category,
network trained respectively on cat-dog and plane-dog in CIFAR-10, and test
images also from CIFAR-10

What we’re concerned about is not to alleviate the problem, where some
effective solutions already exist [18], but to make clear the mathematical
reason why, say, random images are all recognized as bird.

The intuitive guess is about bias after fully connected layer: CNN filters
identify “features” and issues the presence or lack of them to determine which
class the image belongs to. Due to the lack of salient physical features,
random images cannot activate any of the filters, thus
$\mathbf{y}=\mathbf{w}^{T}\mathbf{x}+b\approx b$, and they’ll mostly come down
to the highest bias term. However, the bird dimension of bias isn’t the
highest, and what’s more, the $\mathbf{w}^{T}\mathbf{x}$ term for random noise
$\mathbf{x}$ isn’t small.

Then a question comes to us: whether the property carry over to different
architectures? _I.e._ is it an incidental property of the network or is it a
property of the dataset. We re-train the network with different random initial
weight, and train some other architectures like VGG-16, and still, all the
random images are classified as bird. Thus the phenomenon tends to be dataset-
specific [12].

So what property of bird images in CIFAR-10 dataset exactly have?
Mathematically the discrimination range (_i.e._ a category’s images being
“clean/dirty” [19]) can be measured by the spanning space: the bird images’
subspace spans with too large a radius that covers the random image space. The
K-Means algorithm can be used to measure the cluster range, and the metric to
name the clusters as categories for measuring distance can be exactly
fomulated as a stable marriage problem, where Gale-Shapley algorithm works.
However in original images clusters, bird images don’t show anything special.

Another assumption is the dataset bias [20]: for an extreme example, in all
the bird images the bird appears with a random noise background. Nevertheless,
this assumption still needs to be verified, and we would more like to firstly
dig out and cluster the distribution of images space - this directly leads to
the next section of our research: clustering.

##  3 Hierarchical clustering

In this section, we design two clustering algorithm to cluster respectively
over image categories and CNN filters. The first algorithm aims to define and
calculate the distance among categories in images space, and furthermore
generate a hierarchical classification tree. The second algorithm basically
focuses on how the filters are associated with different hierarchical priority
to produce the final category prediction, thus a filter-wise decision tree is
generated.

###  3.1 Unsupervised category clustering

When decoding an image category into distribution in images space, one natural
observation is that hierarchy exists in categories: for example in CIFAR-10
dataset, ten categories can be divided into two super-categories: animals and
vehicles:  Then with this super-category clustering, some further work like
hierarchical learning, new category network refinement can be achieved.
However, this classify approach is with prior knowledge and not precise
enough: suppose there’re distance $d$ in space among categories, for super-
categories $S,\ T$ and for basic categories $\forall A,B,C\in S,\ D\in T,$ the
method is based on the assumption that $d(A,B)\approx d(A,C)<d(A,D)$.
Nevertheless, one may say that $d($dog,cat$)<d($dog,horse$)$, or even
$d($bird,plane$)<d($bird,frog$)$.

Taking this circumstance into consideration, we propose the unsupervised
category clustering: without human’s prior knowledge, the categories are
unsupervised clustered using the knowledge learned in the network.

input : a pre-trained CNN,

image set ${\Omega}=\\{~{}\Omega_{c}~{}|$for $c$ in categories set $C\\}$

output : The hierarchical structure of categories

$G$=Graph();

$\mu_{c}$=representitive vector for a category $c$ ;

for  _$\Omega_{c}~{}\in~{}\Omega$_ do

$\mu_{c}\leftarrow\overline{\mu_{c_{i}}}$, where $\mu_{c_{i}}$=feature map of
a given layer of $I_{c_{i}}$, for each image $I_{c_{i}}\in\Omega_{c}$

for  _$\forall c_{1},c_{2}\in C$_ do

$G$.addEdge($c_{1},c_{2}$,weight=$\frac{1}{2}$(1-$cos(\mu_{c_{1}},\mu_{c_{2}})))$

while  _in $G$ more than one nodes don’t have a parent node_ do

$c_{u},c_{v}$ $\leftarrow$ $\mathop{\arg\min}\limits_{c_{u},c_{v}\in
G}\\{~{}|(c_{u},c_{v})|~{}$—$~{}G$.existEdge$(c_{u},c_{v})$

and $G$.notParentChild$(c_{u},c_{v})\\}$ ;

add a supernode $s$ for $c_{u}$ and $c_{v}$ ;

$G$.addParentChildEdge($s,c_{u}$) ;

$G$.addParentChildEdge($s,c_{v}$) ;

$G$.removeEdge($c_{u},c_{v}$);

for  _ $c_{w}\in$ G.nodes
${\backslash\\{c_{u},c_{v},s,c_{u}.\text{children},c_{v}.\text{children}\\}}$
_ do

if  _$G$.existEdge($c_{w},c_{u}$) or $G$.existEdge($c_{w},c_{v}$)_ then

$G$.addEdge($c_{w},s$,weight=$\overline{|(c_{w},c_{m})|}$ for $c_{m}$ in
{$c_{u},c_{v}$}) ;

$G$.removeEdge($c_{w},c_{u}$);

$G$.removeEdge($c_{w},c_{v}$);

end while

Algorithm 1 unsupervised learning for the hierarchical structure for
categories

The pseudocodes are illustrated in Algorithm 1. The first issue is how to
represent and calculate the distance among categories. Here the vectorised
output of the 4-th layer (last convolutional layer before fully connected
layer) in the ResNet18 network is adopted to represent a image’s feature. Then
for each category, its representative vector is the average vector of all the
corresponding vectors of images under this category. To measure the distance
between each two categories, we simple calculate the cosine value between the
two corresponding representative vectors [21].

With definition of representative vectors and category distance, a dense graph
can be constructed, with each node representing a category, and the edge
linking some two nodes is assigned with the weight of distance between the two
categories.

To generate the hierarchical structure of categories, the algorithm uses the
greedy method like Boruvka algorithm [22]: every time the shortest non-parent-
child edge is picked up and cut off, and a parent super node is created and
linked to the edge’s two endnodes. For any other nodes linked to some of the
two endnodes, the edges are cut off and re-linked to the parent super node,
with edge weight assigned to be average distance to the two endnodes. Iterate
until the hierarchical structure is completely generated. With this algorithm
the Minimum Spanning Tree (MST) of the original dense graph can also be
generated.

Figure 8: Examples of the generated MST and hierarchical clusters. Netowrk
trained on whole CIFAR-10 dataset and the last convolutional layer’s output is
used as representative vector for each category. The upper and lower case show
whether or not to include random noise as an independent category. Figure 9:
Using UMAP algorithm [23] to reduce dimension of respectively the original
images and the representative vectors. The original images’ manifold in
3-dimension is still overlapped messily, while representative vectors’
manifold in 2-dimension is divided and clustered.

From Fig. 8 see the MST and hierarchical structure of CIFAR-10 categories for
example: in the instance of only 10 categories, cat is a center in MST, which
can partly explain the dataset biases mentioned above: many out-of-sample
images are predicted as cat. The distance between bird and plane is exactly
rather small, indicating their similarity in a way. As for the hierarchical
clusters, the cat and dog are in the lowest clustering level, and while
stepping upward, categories are classified to two big categories, while
different real categories are in different level (from root to leaves, _i.e._
from rough to fine-grained.) Then we come to another case if random noise is
also considered as an independent category: noise tends to be a centroid in
MST, and the distance between bird and noise is the smallest.

The category distance defined here can be multiplied to the original loss
function as a cross-category penalty in online training. Also we would like to
expand the hierarchical distance algorithm to multi object classification &
detection task (one filter not restricted in only one category).

What’s more, to make sure the representative vectors used here bring enough
infomation for discrimination, all the images’ original self-flatten vectors
and the corresponding representative vectors are folded from subspace into a
low dimension sphere using the Uniform Manifold Approximation and Projection
algorithm [23]. Fig. 9 shows that the last convolutional layer’s output is
indeed highly representative for image classification.

Figure 10: Process of using hierarchical cluster algorithm to generate a
prediction tree. Use horse category as an example: each leaf node represents a
horse image that drops down to the final prediction slot. By stepping and
merging upwards to root, different nodes implicitly represent different
semantic features from fine-grained to rough (_e.g._ standing posture, mane,
neck, head, etc.), and each node has its critical filter, which contributes
most in the node’s semantic representation.

###  3.2 Filter clustering: prediction tree

input : A given layer $L$ with $d$ filters in a pre-traind CNN, $L$’s feature
maps $\Omega\in\mathbb{R}^{c\times d\times l\times l}$ of $c$ images in the
category

output : the layer $L$’s filter-wise hierarchical tree over the category

create a tree $T$, with root $R$, edegs ($R,\Omega_{i}$) for all
$\Omega_{i}\in\mathbb{R}^{d\times l\times l}$ in $\Omega$;

$R$.filters = $\Omega_{i}$.filters = $[1,\ldots,d]$;

while  _$\exists$ a child $p$ of $R$ s.t. $|p.\text{filters}|>1$_ do

$u,v$ $\leftarrow$ $\mathop{\arg\min}\limits_{u,v\in
R.\text{childern}}\\{\frac{1}{2}(1-cos(u,v))\\}$ ;

add a supernode $s=\overline{u,v}$ linked with $u,v$, disconnect $u,v$ from
$R$, connect $s$ to $R$;

critical filter $F$ $\leftarrow$
$\mathop{\arg\min}\limits_{F\in(u.\text{filters}\cap
v.\text{filters})}\frac{cos(u\odot\mathbbm{1}_{d}^{u.\text{filters}\backslash\\{F\\}},v\odot\mathbbm{1}_{d}^{v.\text{filters}\backslash\\{F\\}})}{cos(u\odot\mathbbm{1}_{d}^{u.\text{filters}},v\odot\mathbbm{1}_{d}^{v.\text{filters}})}$
;

//$\mathbbm{1}_{d}^{M}=[1\ \text{if}\ i\in M\ \text{else}\ 0\ \textbf{for}\
i\in 1,\ldots,d]^{\textbf{T}}$, $\odot$ is point-wise multiplication;

s.filters={$u.\text{filters}\cap v.\text{filters}$}$\backslash$ $\\{F\\}$ ;

end while

Algorithm 2 pull out a category’s filter-wise hierarchical tree of a specific
layer

This algorithm can be viewed as an extension to the Algorithm 1 to
hierarchically cluster categories: we go deeper into only one specific
category, and cluster the filters of a given layer and then finally generate a
filter-wise hierarchical tree that defines along which path an image is
recognized into this category.

The tree is constructed where each node represents a semantic feature
(unsupervised clustered, so without a specific name assigned, need afterwards
annotation by induction on images features). Foe each node in the tree, it’s
associated with some critical filters, by storing the attribute of the filters
that “reachable” from root to it.

See pseudocodes are illustrated in Algorithm 2 for detailed implementation:
initially the representative vectors of all the images under this category are
linked as child node to the root, with reachable filters all set to whole
filters. Then from the root’s children pick up two nodes that are closest
among all the children nodes, merge the two nodes into one super node, which
means a more common level of semantic feature. From the intersection of the
two nodes’ reachable filters, a critical filter is defined as the filter
without which the cosine distance between the two nodes would be changed
mostly, then the reachable filters of the super node is assigned as two nodes’
reachable filters’ intersection with removal of the critical filter. Repeat
the iteration until all the root’s children only have one reachable filter.

This algorithm cluster the filters and generate the filter-wise hierarchical
tree. The tree represents the decision path of the given category: with each
node representing one semantic feature, it’s critical filter is the difference
of it’s reachable filters set to the intersection of its two children nodes’
reachable filters set.

Taking the horse category for example (see Fig. 10), from the root to leaves
the features are clustered in the order from rough to fine-grained: some
filters first judge the presence of the horse head or the horse torso, then
along the way to the presence of horse mane, neck, etc., examine the direction
of horse standing posture, and finally leads to a leaf, representing one final
prediction mode.

The application of filter-wise hierarchical cluster is potential: for example,
next time a new image is classified as a horse, we can search along the tree
to examine which filters are activated and see clearly which patterns of the
image highly contribute to the final prediction. What’s more, consider an
application scenario with onerous dataset and complex network where it
consumes a lot to train from the sketch. If some new images are added to the
dataset and the network need to be updated online [24] (_i.e._ the mass face
recognition system), it’s not necessary to re-trained the network, but just
figure out the prediction paths of the new images, and then only fine-tune the
weights related to the critical filters in the paths.

For further work, we would like to expand the algorithm so that it’s not
restricted in one category, but to the whole image space - the inner filters
don’t know about final categories, but just pull out the specific features.
With expansion to the whole images, the feature representation of filters can
be more comprehensive.

##  4 Conclusion and discussions

In this study to explore what neurons in CNN learn, we use methods of
visualize and cluster.

By visualizing the knowledge hidden in middle layers, we find that different
images are robust in different extent over a specific network, which gives
inspiration to adversarial attacking design. We also find that the
discrimination evidence the network memorized is related to training set
distribution.

In the section of cluster, the algorithms respectively work for hierarchically
classifing the image categories and generating the prediction tree over
filters. The representative vectors used in the first aspect prove to be
effective and the level of categories coincides to our intuition. For the
second aspect, we find that different filters extract different features, with
low layers concerning like textures and high layers concerning like parts.
Even for filters in a same layer, they are exactly in different hierarchy in
attributing to the final prediction.

However we also need to note that a basic question that “why random images are
all predicted as bird” hasn’t been answered reasonably, thus deeper research
need to be conducted _w.r.t._ category’s space. Another issue is that what if
the filters don’t learn what human call “features” but learn over not-visual-
salient features like frequency distribution of images, and we need to
visualize features of manifolds of images, rather than features of images.
What’s more, the clustering algorithm over filters can only produce the
approximate order of filters attribution. For further work we would like to
quantitatively define how much a filter’s activation attributes to the final
prediction.

## References

  * [1] M. T. Ribeiro, S. Singh, and C. Guestrin.  “why should i trust you?” explaining the predictions of any classifier.  In KDD, 2016.
  * [2] D. Bau, B. Zhou, A. Khosla, A. Oliva, and A. Torralba.  Network dissection: Quantifying interpretability of deep visual representations.  In CVPR, 2017.
  * [3] C. Szegedy, W. Zaremba, I. Sutskever, J. Bruna, D. Erhan, I. Goodfellow, and R. Fergus.  Intriguing properties of neural networks.  In arXiv:1312.6199v4, 2014.
  * [4] M. D. Zeiler and R. Fergus.  Visualizing and understanding convolutional networks.  In ECCV, 2014.
  * [5] Q. Zhang, R. Cao, Y. N. Wu, and S.-C. Zhu.  Growing interpretable part graphs on convnets via multi-shot learning.  In AAAI, 2016.
  * [6] Q. Zhang, R. Cao, F. Shi, Y. Wu, and S.-C. Zhu.  Interpreting cnn knowledge via an explanatory graph.  In AAAI, 2018.
  * [7] R. R. Selvaraju, M. Cogswell, A. Das, R. Vedantam, D. Parikh, and D. Batra.  Grad-cam: Visual explanations from deep networks via gradient-based localization.  In arXiv:1610.02391v3, 2017.
  * [8] S. M. Lundberg and S.-I. Lee.  A unified approach to interpreting model predictions.  In NIPS, 2017.
  * [9] A. Brutzkus and A. Globerson.  Globally optimal gradient descent for a ConvNet with Gaussian inputs  In arXiv:1702.07966, 2017.
  * [10] A. Fawzi, O. Fawzi, and P. Frossard.  Analysis of classifiers’ robustness to adversarial perturbations.  In Mach Learn 107, 481–508, doi:10.1007/s10994-017-5663-3, 2018.
  * [11] K. He, X. Zhang, S. Ren, and J. Sun.  Deep residual learning for image recognition.  In CVPR, 2016.
  * [12] B. Recht, R. Roelofs, L. Schmidt, and V. Shankar.  Do CIFAR-10 classifiers generalize to CIFAR-10?  In arXiv:1806.00451, 2018.
  * [13] J. Su, D. V. Vargas, and S. Kouichi.  One pixel attack for fooling deep neural networks.  In arXiv:1710.08864, 2017.
  * [14] Y. Wang, C. Xu, S. You, D. Tao, and C. Xu.  CNNpack: Packing convolutional neural networks in the frequency domain.  In NIPS, 2016.
  * [15] M. Gabrié, A. Manoel, C. Luneau, J. Barbier, N. Macris, F. Krzakala, and L. Zdeborová.  Entropy and mutual information in models of deep neural networks.  In NIPS, 2018.
  * [16] D. Smilkov, N. Thorat, B. Kim, F. Viégas, and M. Wattenberg.  SmoothGrad: removing noise by adding noise.  In arXiv:1706.03825, 2017.
  * [17] A. Mahendran and A. Vedaldi.  Understanding deep image representations by inverting them.  In CVPR, 2015.
  * [18] Kimin. Lee, Kibok. Lee, H. Lee, and J. Shin.  A simple unified framework for detecting out-of-distribution samples and adversarial attacks.  In NIPS, 2018.
  * [19] H. Wickham.  ”Tidy Data”.  in Journal of Statistical Software, Foundation for Open Access Statistics, vol. 59(i10), 2014.
  * [20] Q. Zhang, W. Wang, and S.-C. Zhu.  Examining cnn representations with respect to dataset bias.  In AAAI, 2018.
  * [21] C. Luo, J. Zhan, L. Wang, Q. Yang.  Cosine normalization: Using cosine similarity instead of dot product in neural networks.  In arXiv:1702.05870v5, 2017.
  * [22] Borůvka and Otakar.  ”O jistém problému minimálním” [About a certain minimal problem].  In Práce Mor. Přírodověd. Spol. V Brně III (in Czech and German), 1926.
  * [23] L. McInnes, J. Healy, and J. Melville.  UMAP: Uniform manifold approximation and projection for dimension reduction.  In arXiv:1802.03426v2, 2018.
  * [24] D. Sahoo, Q. Pham, J. Lu, and S. C.H. Hoi  Online deep learning: Learning deep neural networks on the Fly.  In arXiv:1711.03705, 2017.


$-\frac{1}{R^{2}}\widehat{\mathrm{\Delta}}\widehat{\gamma}^{2}\geq-\frac{2mf(\widehat{\gamma})}{R^{2}}+\frac{4g(\widehat{\gamma})\widehat{\gamma}^{2}}{R^{2}}=-2\frac{1+(m-1)f(\widehat{\gamma})}{R^{2}}$

and

(6.20)
$\begin{split}-\frac{z^{2}}{R^{2}}\widehat{\mathrm{Hess}}(\widehat{\gamma}^{2})(Du,Du)&\geq-\frac{2f(\widehat{\gamma})}{R^{2}}z^{2}|Du|^{2}+\frac{g(\widehat{\gamma})}{R^{2}}z^{2}\hat{\sigma}(D\widehat{\gamma}^{2},Du)^{2}\\\
&\geq-\frac{2f(\widehat{\gamma})}{R^{2}}z^{2}|Du|^{2}-\frac{z^{2}}{2R^{2}\widehat{\gamma}^{2}}\hat{\sigma}(D\widehat{\gamma}^{2},Du)^{2}\\\
&\geq-2\frac{1+f(\widehat{\gamma})}{R^{2}}z^{2}|Du|^{2}.\end{split}$

Using $|D\widehat{\gamma}^{2}|^{2}=4\widehat{\gamma}^{2}$, recalling that $f$
is nondecreasing on $\mathbb{R}^{+}_{0}$ and that $\widehat{\gamma}<R$ at
$x_{0}$, we can put (6.12), (6.19) and (6.20) into (6.11) and it follows that
$K$ must satisfy the inequality

(6.21) $\begin{split}0&\geq
C^{2}z^{2}\cdot\left[\left(1+\frac{4}{C^{2}R^{2}}\left(1-\frac{1}{\delta}\right)\right)|Du|^{2}-\delta\right]K^{2}\\\
&-\frac{2}{R^{2}}\left[(1+f(R))z^{2}|Du|^{2}+1+(m-1)f(R)\right]K\\\
&-Gz^{2}|Du|^{2}.\end{split}$

Step 3. We recall that $R$ was assumed to satisfy $R>2u(o)$, which allowed us
to suppose that $C$ satisfies

(6.22) $\frac{2}{R}<C<\frac{1}{u(o)}.$

Then, we can set

(6.23) $\gamma:=\frac{CR}{2}\in(1,+\infty)$

and

$\delta:=\frac{2}{1+\gamma^{2}}\in(0,1).$

In this Step we obtain an upper bound on $K$ under the assumption that

(6.24)
$|Du|^{2}>\frac{4\gamma^{2}}{(1+\gamma^{2})^{2}}=\left(\frac{2\gamma}{1+\gamma^{2}}\right)^{2}\in(0,1)$

at $x_{0}$. This bound will prove to be crucial to conclude the proof of the
theorem in Step 5, arguing by contradiction. Suppose that (6.24) holds and let
$\varepsilon\in\mathbb{R}^{+}$ be the real number such that

(6.25) $|Du|^{2}=\frac{4(1+\varepsilon)\gamma^{2}}{(1+\gamma^{2})^{2}}$

at $x_{0}$. Then we have

(6.26)
$\begin{split}\left(1+\frac{4}{C^{2}R^{2}}\left(1-\frac{1}{\delta}\right)\right)|Du|^{2}-\delta&=\left(1+\frac{1-\gamma^{2}}{2\gamma^{2}}\right)\cdot\frac{4(1+\varepsilon)\gamma^{2}}{(1+\gamma^{2})^{2}}-\frac{2}{1+\gamma^{2}}\\\
&=\frac{2\varepsilon}{1+\gamma^{2}}\end{split}$

at $x_{0}$. Multiplying (6.21) by $z^{-2}$, which satisfies

$z^{-2}<\left(\frac{1-\gamma^{2}}{1+\gamma^{2}}\right)^{2}$

at $x_{0}$, and using (6.25) and (6.26) we obtain the inequality

$\displaystyle 0$
$\displaystyle\geq\frac{2\varepsilon\gamma}{1+\gamma^{2}}C^{2}K^{2}$
$\displaystyle-\left[\frac{8(1+\varepsilon)\gamma^{2}}{(1+\gamma^{2})^{2}}\frac{1+f(R)}{R^{2}}+2\left(\frac{1-\gamma^{2}}{1+\gamma^{2}}\right)^{2}\frac{1+(m-1)f(R)}{R^{2}}\right]K$
$\displaystyle-\frac{4(1+\varepsilon)\gamma^{2}}{(1+\gamma^{2})^{2}}G,$

which can be rephrased as

(6.27) $K^{2}+pK+q\leq 0$

with

(6.28)
$\begin{split}p&:=-\frac{1}{C^{2}}\cdot\left[\frac{(1-\gamma^{2})^{2}}{\varepsilon(1+\gamma^{2})}\frac{1+(m-1)f(R)}{R^{2}}+\frac{4(1+\varepsilon)\gamma^{2}}{\varepsilon(1+\gamma^{2})}\frac{1+f(R)}{R^{2}}\right],\\\
q&:=-\frac{2(1+\varepsilon)\gamma^{2}}{\varepsilon(1+\gamma^{2})}\frac{G}{C^{2}}.\end{split}$

As a consequence of (6.27), we must have

(6.29) $K\leq\frac{1}{2}(-\,p+\sqrt{p^{2}-4q}).$

Step 4. Let $K$ and $C$ as in Step 1 be fixed. Suppose that the fundamental
assumption of Steps 2-3 does not hold, that is, the function
$\widehat{\gamma}^{2}$ is not smooth at $x_{0}$. Then, clearly $x_{0}\neq 0$.
Following the argument of Theorem 4.1 and Lemma 4.3 of [28] it can be shown
that there exists a unique unit speed minimizing geodesic
$\mu:[0,\widehat{\gamma}(x_{0})]\to M$ starting from $o$ and ending in $x_{0}$
and that, for each $\varepsilon^{\prime}>0$ sufficiently small, the distance
function
$\widehat{\gamma}_{\varepsilon^{\prime}}=d_{\hat{\sigma}}(o_{\varepsilon^{\prime}},\;\cdot\;)$
from $o_{\varepsilon^{\prime}}:=\mu(\varepsilon^{\prime})$ is smooth in a
neighbourhood of $x_{0}$, that is, we are applying Calabi’s trick. Moreover,
the point $x_{0}$ is a local maximum for the function

$\zeta_{\varepsilon^{\prime}}:=(e^{K\varphi_{\varepsilon^{\prime}}}-1)\cdot
z^{\frac{1}{m-1}},$

where $\varphi_{\varepsilon^{\prime}}$ is defined by

$\varphi_{\varepsilon^{\prime}}:=\left(1-\frac{(\widehat{\gamma}_{\varepsilon^{\prime}}+\varepsilon^{\prime})^{2}}{R^{2}}-Cu\right)_{+}.$

Therefore, the arguments of Steps 2 and 3 can be repeated for each
$\varepsilon^{\prime}>0$ small enough, and by letting $\varepsilon^{\prime}\to
0$ we still obtain that (6.24) can be satisfied at $x_{0}$ with $\gamma$
defined as in (6.23) only if $K$ satisfies (6.29) for $p$ and $q$ as in
(6.28).

Step 5. We are now ready to prove the validity of inequality

$z(o)\leq e^{(m-1)\sqrt{2G}u(o)}.$

Let $\\{R_{n}\\}_{n}$ be a nondecreasing positive sequence such that

(6.30) $\lim_{n\to+\infty}R_{n}=+\infty.$

Let $\\{C_{n}\\}_{n}$ be a nonincreasing positive sequence such that

(6.31) $\frac{1}{u(o)}>C_{n}\sim\frac{2\log R_{n}}{R_{n}}$

as $n\to+\infty$. Then

(6.32) $\lim_{n\to+\infty}C_{n}=0.$

For each $n\geq 1$, set

$\gamma_{n}:=\frac{C_{n}R_{n}}{2}.$

Note that, for each $n$ large enough, conditions (6.22) are satisfied by
$C=C_{n}$, $R=R_{n}$ and $\gamma$ defined as in (6.23) coincides with
$\gamma_{n}$. Moreover,

(6.33) $\gamma_{n}\sim\log R_{n}\to+\infty$

as $n\to+\infty$.

Let $\beta>1$ be given and let $\\{K_{n}\\}_{n}$ be a positive sequence such
that

(6.34) $K_{n}>\beta\frac{\sqrt{2G}}{C_{n}}$

for each $n\geq 1$ and

(6.35) $\lim_{n\to+\infty}(K_{n}C_{n})=\beta\sqrt{2G}.$

For $n\geq 1$ let $\varphi_{n}$, $\eta_{n}$ and $\zeta_{n}$ be the functions
defined on the geodesic ball

$\widehat{B}_{R_{n}}=\\{x\in M:\widehat{\gamma}(x)<R_{n}\\}$

respectively by

$\displaystyle\varphi_{n}$
$\displaystyle:=\left(1-\frac{\widehat{\gamma}^{2}}{R_{n}^{2}}-C_{n}u\right)_{+},$
$\displaystyle\eta_{n}$ $\displaystyle:=e^{K_{n}\varphi_{n}}-1,$
$\displaystyle\zeta_{n}$ $\displaystyle:=\eta_{n}\cdot z^{\frac{1}{m-1}},$

and let $x_{n}\in\widehat{B}_{R_{n}}$ be a global maximum point for
$\zeta_{n}$. As observed in Step 1, we have that $z(o)$ is bounded from above
by each term of the sequence

(6.36)
$\left(\frac{e^{K_{n}}-1}{e^{K_{n}}-e^{K_{n}C_{n}u(o)}}\right)e^{(m-1)K_{n}C_{n}u(o)}z(x_{n})\sim
e^{\beta(m-1)\sqrt{2G}u(o)}z(x_{n})$

as $n\to+\infty$, where the asymptotic relation follows from (6.32), (6.34)
and (6.35).

We show that

(6.37) $\lim_{n\to+\infty}z(x_{n})=1.$

Suppose, by contradiction, that (6.37) is false. Then, there exists a strictly
increasing sequence $\\{n_{k}\\}_{k}$ of positive integers such that

(6.38) $\lim_{k\to+\infty}|Du(x_{n_{k}})|^{2}=\ell\in(0,1].$

Up to choosing $n_{1}$ large enough, we have

$|Du(x_{n_{k}})|^{2}>\frac{4\gamma_{n_{k}}^{2}}{(1+\gamma_{n_{k}}^{2})^{2}}$

for each $k$, since, by (6.33),

$\frac{4\gamma_{n}^{2}}{(1+\gamma_{n}^{2})^{2}}\sim\frac{4}{\log^{2}R_{n}}\to
0$

as $n\to+\infty$. Defining $\\{\varepsilon_{k}\\}_{k}$ as the sequence of real
numbers such that

$|Du(x_{n_{k}})|^{2}=\frac{4(1+\varepsilon_{k})\gamma_{n_{k}}^{2}}{(1+\gamma_{n_{k}}^{2})^{2}}$

for each $k$, from (6.38) we have that

(6.39)
$\varepsilon_{k}\sim\frac{\ell}{4}\gamma_{n_{k}}^{2}\sim\frac{\ell}{4}\log^{2}R_{n_{k}}$

as $k\to+\infty$. By Step 3 and Step 4, we deduce that the subsequence
$\\{K_{n_{k}}\\}$ satisfies

(6.40) $K_{n_{k}}\leq\frac{1}{2}\left(-\,p_{k}+\sqrt{p_{k}^{2}-4q_{k}}\right)$

for each $k$, where $\\{p_{k}\\}_{k}$ and $\\{q_{k}\\}_{k}$ are the sequences
of real numbers defined by

(6.41)
$\begin{split}p_{k}&:=-\frac{1}{C_{n_{k}}^{2}}\cdot\left[\frac{(1-\gamma_{n_{k}}^{2})^{2}}{\varepsilon_{k}(1+\gamma_{n_{k}}^{2})}\frac{1+(m-1)f(R_{n_{k}})}{R_{n_{k}}^{2}}+\frac{4(1+\varepsilon_{k})\gamma_{n_{k}}^{2}}{\varepsilon_{n_{k}}(1+\gamma_{n_{k}}^{2})}\frac{1+f(R_{n_{k}})}{R_{n_{k}}^{2}}\right],\\\
q_{k}&:=-\frac{2(1+\varepsilon_{k})\gamma_{n_{k}}^{2}}{\varepsilon_{k}(1+\gamma_{n_{k}}^{2})}\frac{G}{C_{n_{k}}^{2}}.\end{split}$

By (6.15), (6.16) and (6.30)

$\lim_{k\to+\infty}\frac{f(R_{n_{k}})}{R_{n_{k}}^{2}}=\sqrt{B},$

therefore, using (6.39) and (6.31), we deduce

$p_{k}=O\left(\frac{1}{C_{n_{k}}^{2}R_{n_{k}}}\right)=O\left(\frac{R_{n_{k}}}{\log^{2}R_{n_{k}}}\right)$

and

$q_{k}\sim-G\frac{R_{n_{k}}^{2}}{2\log^{2}R_{n_{k}}}$

as $k\to+\infty$. Hence,

(6.42)
$\frac{1}{2}\left(-\,p_{k}+\sqrt{p_{k}^{2}-4q_{k}}\right)\sim\sqrt{-q_{k}}\sim\frac{\sqrt{2G}}{C_{n_{k}}}\qquad\text{as
}k\to+\infty.$

Putting together (6.35), (6.40) and (6.42) it follows

$1>\frac{1}{\beta}=\lim_{k\to+\infty}\frac{\sqrt{2G}}{K_{n_{k}}C_{n_{k}}}=\lim_{k\to+\infty}\frac{1}{2K_{n_{k}}}\left(-\,p_{k}+\sqrt{p_{k}^{2}-4q_{k}}\right)\geq
1$

which gives the desired contradiction. Therefore, (6.37) is proved and by
(6.5) and (6.36) we get

(6.43)
$z(o)\leq\lim_{n\to+\infty}e^{\beta(m-1)\sqrt{2G}u(o)}z(x_{n})=e^{\beta(m-1)\sqrt{2G}u(o)}.$

Since $\beta>1$ is arbitrarily given, we conclude

(6.44) $z(o)\leq e^{(m-1)\sqrt{2G}u(o)}.$

∎

###### Proof of Corollary 7.

By Theorem 9, for each $x\in M$ we have the validity of the inequality

$\cosh\theta(x)\leq e^{(m-1)\sqrt{2G}|\tau(x)-t_{0}|}$

for any $G>0$. Lettin $G\to 0^{+}$, we obtain $\cosh\theta(x)=1$. Since $x\in
M$ is arbitrary, it follows that $\cosh\theta\equiv 1$ on $M$. By (2.9), this
is equivalent to $d\tau=0$ on $M$. Since $M$ is connected, this implies that
$\tau$ is constant and therefore $\psi(M)$ is contained in a slice
$\mathbb{P}\times\\{t_{1}\\}$ for some $t_{1}\in\mathbb{R}$. Clearly,
$t_{1}\neq t_{0}$. Since $\pi:M\to\mathbb{P}$ is a covering map, we conclude
that $\psi(M)=\mathbb{P}\times\\{t_{1}\\}$. ∎

###### Proof of Lemma 11.

Up to restricting ourselves to a smaller neighbourhood of $x_{0}$, we can
assume that a local orthonormal frame $\\{e_{i}\\}_{1\leq i\leq m}$ for $TM$
is defined on $\Omega\subseteq M$. Let $\\{\theta^{i}\\}_{1\leq i\leq m}$ be
the coframe dual to $\\{e_{i}\\}_{i}$.

We denote by $u_{i}$, $1\leq i\leq m$, the components of $\mathrm{d}u$, that
is, $\mathrm{d}u=u_{i}\theta^{i}$, and by $u^{i}$ the components of the
metrically equivalent vector field $Du=u^{i}e_{i}$. Note that orthogonality of
the frame yields $u^{i}=u_{i}$ for $1\leq i\leq m$. Since $\\{e_{i}\\}_{i}$ is
orthonormal, we have

$|Du|^{2}=u_{i}u_{i}.$

Taking covariant derivative and recalling that the metric is parallel, we get

$\mathrm{d}|Du|^{2}=2u_{i}u_{ik}\theta^{k},$

where, hereafter, we denote the components of the covariant derivative of a
given tensor field by adding a lower index to the components of the field.
Since $\widehat{\mathrm{Hess}}(u)=u_{ij}\theta^{i}\otimes\theta^{j}$, the
relation above reads as

$\mathrm{d}|Du|^{2}=2\widehat{\mathrm{Hess}}(u)(Du,\;\cdot\;),$

as claimed in the proof of Theorem 9. Then, we also have

(6.45) $\begin{split}z_{i}&=z^{3}\delta^{kt}u_{t}u_{ki}=z^{3}u^{k}u_{ki}\\\
z_{ij}&=z^{3}\delta^{kt}u_{tj}u_{ki}+z^{3}\delta^{kt}u_{t}u_{kij}+3z^{2}\delta^{kt}u_{t}u_{ki}z_{j}\\\
&=z^{3}\delta^{kt}u_{tj}u_{ki}+z^{3}u^{k}u_{kij}+3z^{5}u^{k}u^{t}u_{ki}u_{tj},\end{split}$

where $\mathrm{d}z=z_{i}\theta^{i}$ and
$\widehat{\mathrm{Hess}}(z)=z_{ij}\theta^{i}\otimes\theta^{j}$. Denoting by
$R_{ijkt}$ the components of the Riemann curvature tensor of
$(M,\hat{\sigma})$ along the frame $\\{\theta^{i}\\}_{i}$ and using the
identities

$u_{ij}=u_{ji},\qquad u_{kij}=u_{ikj}=u_{ijk}+\delta^{ls}u_{l}R_{sikj}$

(see (1.110) and (1.116) of [4]) we can also write

(6.46)
$\begin{split}z_{ij}&=z^{3}\delta^{kt}u_{ik}u_{jt}+z^{3}u^{k}u_{ijk}+z^{3}u^{k}u^{t}R_{kitj}+3z^{5}u^{k}u^{t}u_{ik}u_{jt}.\end{split}$

Noting that the action of the operator $L$ on a generic function $v\in
C^{2}(\Omega)$ is given by

(6.47) $Lv=a^{ij}v_{ij}$

with $\widehat{\mathrm{Hess}}(v)=v_{ij}\theta^{i}\otimes\theta^{j}$ and
$a^{ij}e_{i}\otimes e_{j}$ the tensor field with components

(6.48) $a^{ij}=\delta^{ij}+z^{2}u^{i}u^{j},$

we obtain from (6.46)

(6.49)
$\begin{split}Lz&=a^{ij}z_{ij}=z^{3}\delta^{ij}\delta^{kt}u_{ik}u_{jt}+4z^{5}u^{i}u^{j}\delta^{kt}u_{ik}u_{jt}\\\
&+3z^{7}u^{i}u^{j}u^{k}u^{t}u_{ik}u_{jt}+z^{3}u^{k}\delta^{ij}u_{ijk}+z^{5}u^{i}u^{j}u^{k}u_{ijk}\\\
&+z^{3}u^{i}u^{j}R_{ij},\end{split}$

with $\widehat{\mathrm{Ric}}=R_{ij}\theta^{i}\otimes\theta^{j}$ the Ricci
curvature tensor of $(M,\hat{\sigma})$.

Observe that

(6.50)
$\delta^{ij}u_{ijk}=(\delta^{ij}u_{ij})_{k}-\delta^{ij}_{k}u_{ij}=(\delta^{ij}u_{ij})_{k},$

since $\delta^{ij}e_{i}\otimes e_{j}$ is parallel, and that

(6.51)
$z^{2}u^{i}u^{j}u_{ijk}=(z^{2}u^{i}u^{j}u_{ij})_{k}-2z^{4}u^{i}u^{j}u^{t}u_{ij}u_{kt}-2z^{2}\delta^{it}u_{tk}u^{j}u_{ij}.$

Putting together (6.50) and (6.51) and recalling (6.47) and (6.48) we get

$\displaystyle z^{3}u^{k}\delta^{ij}u_{ijk}$
$\displaystyle+z^{5}u^{i}u^{j}u^{k}u_{ijk}=z^{3}(Lu)_{k}$
$\displaystyle-2z^{3}u^{i}u^{j}u^{k}u^{t}u_{ij}u_{kt}-2z^{5}u^{k}u^{j}\delta^{it}u_{tk}u_{ij}.$

Since $Lu=0$ on $\Omega$ by assumption, we can put this identity into (6.49)
to get

(6.52)
$Lz=z^{3}\delta^{ij}\delta^{kt}u_{ik}u_{jt}+2z^{5}u^{i}u^{j}\delta^{kt}u_{ik}u_{jt}+z^{7}u^{i}u^{j}u^{k}u^{t}u_{ik}u_{jt}+z^{3}u^{i}u^{j}R_{ij}.$

Using (6.48), expression (6.52) can be rewritten as

(6.53) $Lz=z^{3}\cdot(a^{ij}a^{kt}u_{ik}u_{jt}+u^{i}u^{j}R_{ij}).$

Next,

(6.54)
$\mathrm{d}\zeta=z^{\alpha}\left(\mathrm{d}\eta+\alpha\frac{\eta}{z}\mathrm{d}z\right)$

and having assumed $d\zeta=0$ at $x_{0}$, from (6.54) we deduce

(6.55) $\mathrm{d}\eta=-\alpha\frac{\eta}{z}\mathrm{d}z$

at $x_{0}$. Since

$\widehat{\mathrm{Hess}}(\zeta)=z^{\alpha}\widehat{\mathrm{Hess}}(\eta)+\mathrm{d}z^{\alpha}\otimes\mathrm{d}\eta+\mathrm{d}\eta\otimes\mathrm{d}z^{\alpha}+\eta\widehat{\mathrm{Hess}}(z^{\alpha}),$

from (6.55) and $dz^{\alpha}=\alpha z^{\alpha-1}dz$ we obtain

(6.56)
$\widehat{\mathrm{Hess}}(\zeta)=z^{\alpha}\widehat{\mathrm{Hess}}(\eta)-2\alpha^{2}\eta
z^{\alpha-2}\mathrm{d}z\otimes\mathrm{d}z+\eta\widehat{\mathrm{Hess}}(z^{\alpha}).$

On the other hand,

$\widehat{\mathrm{Hess}}(z^{\alpha})=\alpha
z^{\alpha-1}\widehat{\mathrm{Hess}}(z)+\alpha(\alpha-1)z^{\alpha-2}\mathrm{d}z\otimes\mathrm{d}z$

and inserting into (6.56) we obtain

(6.57)
$\widehat{\mathrm{Hess}}(\zeta)=z^{\alpha}\cdot\left(\widehat{\mathrm{Hess}}(\eta)+\frac{\alpha\eta}{z}\widehat{\mathrm{Hess}}(z)-\frac{\alpha(\alpha+1)\eta}{z^{2}}\mathrm{d}z\otimes\mathrm{d}z\right).$

By the definition of $L$ we get

(6.58)
$L\zeta=z^{\alpha}\cdot\left[L\eta+\alpha\eta\left(\frac{Lz}{z}-\frac{\alpha+1}{z^{2}}a^{ij}z_{i}z_{j}\right)\right].$

From (6.45) it follows that

(6.59) $a^{ij}z_{i}z_{j}=z^{6}a^{ij}u^{k}u^{t}u_{ik}u_{jt}.$

Putting (6.59) and (6.53) into (6.58) we get

(6.60)
$L\zeta=z^{\alpha}\cdot[L\eta+\alpha\eta(z^{2}a^{ij}a^{kt}u_{ik}u_{jt}-(\alpha+1)z^{4}a^{ij}u^{k}u^{t}u_{ik}u_{jt}+z^{2}u^{i}u^{j}R_{ij})]$

Since $\alpha$, $\eta$ and $z$ are nonnegative, the claim of the Lemma will
follow by showing that

$a^{ij}a^{kt}u_{ik}u_{jt}-(\alpha+1)z^{2}a^{ij}u^{k}u^{t}u_{ik}u_{jt}$

is nonnegative.

We define the tensor field $B=B^{i}_{j}\theta^{j}\otimes e_{i}$ by setting

(6.61) $B^{i}_{j}:=a^{ik}u_{kj}$

for $1\leq i,j\leq m$. We also define the tensor field
$a_{ij}\theta^{i}\otimes\theta^{j}$ by setting

(6.62) $a_{ij}:=\delta_{ij}-u_{i}u_{j}$

for $1\leq i,j\leq m$. Observe that
$a_{ij}\theta^{i}\otimes\theta^{j}=\psi^{\ast}\overline{g}$ on $\Omega$, hence
it is a Riemannian metric on $\Omega$ and $(a_{ij})$ is the inverse of the
matrix $(a^{ij})$, that is,

(6.63) $a^{ij}a_{jk}=\delta^{i}_{k}.$

Using (6.61) and (6.63), we have

(6.64)
$\begin{split}a^{ij}a^{kt}u_{ik}u_{jt}-(\alpha+1)&z^{2}a^{ij}u^{k}u^{t}u_{ik}u_{jt}=\\\
&=B^{j}_{k}B^{k}_{j}-(\alpha+1)z^{2}B^{j}_{k}u^{k}\delta^{l}_{j}u_{lt}u^{t}\\\
&=B^{i}_{j}B^{j}_{i}-(\alpha+1)z^{2}B^{j}_{k}u^{k}a_{ij}a^{il}u_{lt}u^{t}\\\
&=B^{i}_{j}B^{j}_{i}-(\alpha+1)z^{2}a_{ij}B^{j}_{k}u^{k}B^{i}_{t}u^{t}.\end{split}$

The tensor field $B$ induces, at each point $x\in\Omega$, a linear operator

$\displaystyle B(x):T_{x}M$ $\displaystyle\to T_{x}M$ $\displaystyle X$
$\displaystyle\mapsto B^{i}_{j}X^{j}e_{i}=:B(x)X\qquad\forall X=X^{j}e_{j}\in
T_{x}M$

which is self-adjoint with respect to the scalar product
$a_{ij}(x)\theta^{i}|_{x}\otimes\theta^{j}|_{x}$. Indeed, recalling (6.61),
(6.63) we have

$\displaystyle(a_{ij}\theta^{i}\otimes\theta^{j})(BX,Y)$
$\displaystyle=a_{ij}B^{i}_{t}X^{t}Y^{j}=a_{ij}a^{ik}u_{kt}X^{t}Y^{j}$
$\displaystyle=a^{ki}a_{ij}u_{kt}X^{t}Y^{j}=\delta^{k}_{j}u_{kt}X^{t}Y^{j}=\widehat{\mathrm{Hess}}(u)(X,Y)$

for each $X=X^{i}e_{i},Y=Y^{i}e_{i}\in T_{x}M$. We let
$\\{\lambda_{i}\\}_{1\leq i\leq m}$ be the eigenvalues of $B$.

We are now ready to show that

$B^{i}_{j}B^{j}_{i}-(\alpha+1)z^{2}a_{ij}B^{j}_{k}u^{k}B^{i}_{t}u^{t}$

is nonnegative and by (6.64) this will conclude the proof. Without loss of
generality, we suppose that $(\lambda_{1})^{2}\geq(\lambda_{i})^{2}$ for
$2\leq i\leq m$. Let $B^{2}=B\circ B$. We have

(6.65)
$B^{i}_{j}B^{j}_{i}=\mathrm{trace}(B^{2})=\sum_{i=1}^{m}(\lambda_{i})^{2}.$

On the other hand, we have

$a_{ij}B^{j}_{k}u^{k}B^{i}_{t}u^{t}=(a_{ij}\theta^{i}\otimes\theta^{j})(BDu,BDu)=(a_{ij}\theta^{i}\otimes\theta^{j})(B^{2}Du,Du).$

Since $\\{(\lambda_{i})^{2}\\}_{1\leq i\leq m}$ are the eigenvalues of
$B^{2}$, we have

$\displaystyle(a_{ij}\theta^{i}\otimes\theta^{j})(B^{2}Du,Du)$
$\displaystyle\leq(\lambda_{1})^{2}(a_{ij}\theta^{i}\otimes\theta^{j})(Du,Du)$
$\displaystyle=(\lambda_{1})^{2}(u^{i}u_{i}-u_{i}u_{j}u^{i}u^{j})=(\lambda_{1})^{2}|Du|^{2}(1-|Du|^{2})$
$\displaystyle=(\lambda_{1})^{2}\frac{|Du|^{2}}{z^{2}}$

and therefore, using the fact that $|Du|<1$,

(6.66)
$-(\alpha+1)z^{2}a_{ij}B^{j}_{k}u^{k}B^{i}_{t}u^{t}\geq-(\alpha+1)(\lambda_{1})^{2}|Du|^{2}\geq-(\alpha+1)(\lambda_{1})^{2}.$

Now, recalling that $Lu=0$ on $\Omega$ we have

$0=a^{ij}u_{ij}=\delta^{k}_{i}a^{ij}u_{jk}=\delta^{k}_{i}B^{i}_{k}=\mathrm{trace}(B)=\sum_{i=1}^{m}\lambda_{i}.$

The triangular inequality then implies

$|\lambda_{1}|=\left|0-\sum_{i=2}^{m}\lambda_{i}\right|\leq\sum_{i=1}^{m}|\lambda_{i}|$

and from Newton’s inequality we get

(6.67)
$(\lambda_{1})^{2}\leq\left(\sum_{i=2}^{m}|\lambda_{i}|\right)^{2}\leq(m-1)\sum_{i=2}^{m}(\lambda_{i})^{2}.$

Recalling that by assumption $\alpha\leq\frac{1}{m-1}$, using (6.65), (6.66)
and (6.67) we finally obtain

$\displaystyle
B^{i}_{j}B^{j}_{i}-(\alpha+1)z^{2}a_{ij}B^{j}_{k}u^{k}B^{i}_{t}u^{t}$
$\displaystyle\geq\sum_{i=1}^{m}(\lambda_{i})^{2}-(\alpha+1)(\lambda_{1})^{2}$
$\displaystyle=\sum_{i=2}^{m}(\lambda_{i})^{2}-\alpha(\lambda_{1})^{2}$
$\displaystyle\geq\sum_{i=2}^{m}(\lambda_{i})^{2}-\frac{1}{m-1}(\lambda_{1})^{2}\geq
0$

and the Lemma is proved. ∎

## Acknowledgements

The second author is partially supported by Spanish MINECO and ERDF project
MTM2016-78807-C2-1-P.

## References

  * [1] A. L. Albujer,  Global behaviour of maximal surfaces in Lorentzian product spaces.  in _Differential Geometry and its Applications_ (edited by Oldřich Kowalski, Demeter Krupka, Olga Krupková, Jan Slovák), World Scientific, 2008, 23–33
  * [2] A. L. Albujer and L. J. Alías,  Calabi-Bernstein results for maximal surfaces in Lorentzian product spaces,  _J. Geom. Phys._ , 59 (2009), 620–631
  * [3] J. A. Aledo, A. Romero and R. M. Rubio,  The existence and uniqueness of standard static splitting,  _Classical Quant. Grav._ , 32 (2015), 105004, 9 pp.
  * [4] L. J. Alías, P. Mastrolia and M. Rigoli,  _Maximum principles and geometric applications_ ,  Springer, Cham, 2016
  * [5] J. M. Arms, J. E. Marsden and V. Moncrief,  The structure of the space of solutions of Einstein’s equations. II. Several Killing fields and the Einstein-Yang-Mills equations,  _Ann. Phys._ , 144 (1982), 81–106
  * [6] D. Bak and S.-J. Rey,  Cosmic holography,  _Classical Quant. Grav._ , 17 (2000), L83–L89
  * [7] J. K. Beem, P. E. Ehrlich and K. L. Easley,  _Global Lorentzian Geometry_ , 2${}^{\text{nd}}$ edition, Pure and Applied Mathematics, 202,  Marcel Dekker, New York, 1996
  * [8] A. N. Bernal and M. Sánchez,  On smooth Cauchy hypersurfaces and Geroch’s splitting theorem  _Commun. Math. Phys._ , 257 (2005), 43–50
  * [9] B. Bianchini, L. Mari and M. Rigoli,  On some aspects of oscillation theory and geometry,  _Mem. Am. Math. Soc._ , 225 (2013), no. 1056, vi+195 pp.
  * [10] R, Bousso,  The holographic principle,  _Rev. Mod. Phys._ , 74 (2002), 825–874
  * [11] A. Brasil and A. G. Colares,  On constant mean curvature spacelike hypersurfaces in Lorentz manifolds,  _Mat. Contemp._ , 17 (1999), 99–136
  * [12] G. Catino, P. Mastrolia, D. D. Monticelli and M. Rigoli,  On the geometry of gradient Einstein-type manifolds,  _Pacific J. Math._ , 286 (2017), 39–67
  * [13] J. Cheeger,  A lower bound for the smallest eigenvalue for the Laplacian,  in _Problems in analysis (Papers dedicated to Solomon Bochner, 1969)_ (edited by Robert C. Gunning), Princeton University Press, 1970, 195–199
  * [14] H. Y. Chiu,  A cosmological model of our universe,  _Ann. Phys._ , 43 (1967), 1–41
  * [15] V. Daftardar and N. Dadhich,  Gradient conformal Killing vectors and exact solutions,  _Gen. Relat. Gravit._ , 26 (1994), 859–868
  * [16] K. Duggal and R. Sharma,  _Symmetries of spacetimes and Riemannian manifolds_ ,  Springer, 1999
  * [17] D. Eardley, J. Isenberg, J. Marsden and V. Moncrief,  Homothetic and conformal symmetries of solutions to Einstein’s equations,  _Comm. Math. Phys._ , 106 (1996), 137–158
  * [18] R. Geroch,  Domain of dependence,  _J. Math. Phys._ , 11 (1970), 437–449
  * [19] M. Gutiérrez and B. Olea,  Uniqueness of static decompositions,  _Ann. Global Anal. Geom._ , 39 (2011), 13–26
  * [20] N. Korevaar,  An easy proof of the interior gradient bound for solutions to the prescribed mean curvature equation,  in _Nonlinear functional analysis and its applications, part 2 (Berkeley, Calif., 1983)_ , Proc. Sympos. Pure Math. 45, part 2, AMS, Providence, RI, 1986, 81–89
  * [21] L. Mari, M. Rigoli and A. G. Setti,  Keller-Osserman conditions for diffusion-type operators on Riemannian manifolds,  _J. Funct. Analysis_ , 258 (2010), 665–712
  * [22] J. E. Marsden and F. J. Tipler,  Maximal hypersurfaces and foliations of constant mean curvature in General Relativity,  _Phys. Rep._ , 66 (1980), 109–139
  * [23] B. O’Neill,  _Semi-Riemannian Geometry with applications to Relativity_ ,  Academic Press, 1983
  * [24] P. Petersen,  _Riemannian Geometry_ ,  Springer, 2006
  * [25] Z. Qian,  Estimates for weighted volumes and applications,  _Quart. J. Math. Oxford (2)_ , 48 (1997), 235–242
  * [26] M. Rigoli and A. G. Setti,  Liouville type theorems for $\varphi$-subharmonic functions,  _Rev. Mat. Iberoam._ , 17 (2001), 471–520
  * [27] H. Ringström,  _The Cauchy problem in General Relativity_ , ESI Lectures in Mathematics and Physics,  European Mathematical Society, 2009
  * [28] H. Rosenberg, F. Schulze and J. Spruck,  The half-space property and entire positive minimal graphs in $M\times\mathbb{R}$,  _J. Differential Geom._ , 95 (2013), 321–336
  * [29] R. K. Sachs and H. Wu,  _General Relativity for Mathematicians_ , Graduate Texts in Mathematics, 48,  Springer-Verlag, 1977
  * [30] I. M. C. Salavessa,  Graphs with parallel mean curvature,  _P. Am. Math. Soc._ , 107 (1989), 449–458
  * [31] M. Sánchez,  On the geometry of static spacetimes,  _Nonlinear Anal._ , 63 (2005), 455–463
  * [32] M. Sánchez and J. M. M. Senovilla,  A note on the uniqueness of global static decompositions,  _Classical Quant. Grav._ , 24 (2017), 6121, 6 pp.
  * [33] R. Schoen and S.-T. Yau,  On the proof of the positive mass conjecture in General Relativity,  _Comm. Math. Phys._ , 65 (1979), 45–76
  * [34] R. Schoen and S.-T. Yau,  _Lectures on Differential Geometry_ , Conference Proceedings and Lecture Notes in Geometry and Topology, I,  International Press, Cambridge, MA, 1994
  * [35] J. Serrin,  Entire solutions of nonlinear Poisson equations,  _Proc. London Math. Soc. (3)_ , 24 (1972), 348–366
  * [36] K. P. Tod,  Spatial metrics which are static in many ways,  _Gen. Relat. Gravit._ , 32 (2000), 2079–2090