SWNet: Small-World Neural Networks and Rapid Convergence

SWNet: Small-World Neural Networks and Rapid Convergence

Mojan Javaheripi
UC San Diego
   Bita Darvish Rouhani
Microsoft Research
   Farinaz Koushanfar
UC San Diego

Training large and highly accurate deep learning (DL) models is computationally costly. This cost is in great part due to the excessive number of trained parameters, which are well-known to be redundant and compressible for the execution phase. This paper proposes a novel transformation which changes the topology of the DL architecture such that it reaches an optimal cross-layer connectivity. This transformation leverages our important observation that for a set level of accuracy, convergence is fastest when network topology reaches the boundary of a Small-World Network. Small-world graphs are known to possess a specific connectivity structure that enables enhanced signal propagation among nodes. Our small-world models, called SWNets, provide several intriguing benefits: they facilitate data (gradient) flow within the network, enable feature-map reuse by adding long-range connections and accommodate various network architectures/datasets. Compared to densely connected networks (e.g., DenseNets), SWNets require a substantially fewer number of training parameters while maintaining a similar level of classification accuracy. We evaluate our networks on various DL model architectures and image classification datasets, namely, CIFAR10, CIFAR100, and ILSVRC (ImageNet). Our experiments demonstrate an average of improvement in convergence speed to the desired accuracy.

1 Introduction

Deep learning models are increasingly popular for various learning tasks, particularly in visual computing applications. A big advantage for DL is that it can automatically learn the relevant features by computing on a large corpus of data, thus, eliminating the need for hand-selection of features common in traditional methods. In the contemporary big data realm, visual datasets are increasingly growing in size and variety. For instance, the ILSVRC challenge dataset has 22K classes with over 14M images [25]. To increase inference accuracy on such challenging datasets, DL models are evolving towards higher complexity architectures. State-of-the-art models tend to reach good accuracy, but they suffer from a dramatically high training cost.

As DL models grow deeper and more complex, the large number of stacked layers gives rise to a variety of problems, e.g., vanishing gradients [7, 3], which renders the models hard to train. To facilitate convergence and enhance the gradient flow for deeper models, creation of bypass connections was recently suggested. These shortcuts connect the layers that would otherwise be disconnected in a traditional Convolutional Neural Network (CNN) [28, 9, 12, 35]. To curtail the cost of hand-crafted DL architecture exploration, the existing literature typically realizes the shortcuts by replicating the same building block throughout the network [9, 12, 35]. However, such repeated pattern of blocks in these networks induces unnecessary redundancies [11] that increase the computational overhead.

This paper proposes a novel methodology that transforms the topology of conventional CNNs such that they reach optimal cross-layer connectivity. This transformation is based on our observation that the pertinent connectivity pattern highly impacts training speed and convergence. To ensure computational efficiency, our architectural modification takes place prior to training. Thus, the incorporated connectivity measure must be independent of network gradients/loss and training data. Towards this goal, we view CNNs as graphs and revisit Small-World Networks (SWNs) [34] from graph theory to transform CNNs into highly-connected small-world topologies. Watts-Strogatz SWNs [34] are widely used in the analysis of complex graphs; Due to SWNs’ specific connection pattern, these structures provide theoretical guarantees for considerably decreased consensus times [23, 32, 36].

Figure 1: Schematic representation of the connections within a small-world CNN. An arbitrary neuron’s output is connected to selected neurons in proceeding layers via sparse connections (convolutions) denoted by S-CONV.

Our network modification algorithm takes as input a conventional CNN architecture and enforces the small-world property on its topology to generate a new network, , called SWNet. We leverage a quantitative metric for small-worldness and devise a customized rewiring algorithm. Our algorithm restructures the inter-layer connections in the input CNN to find a topology that balances regularity and randomness, which is the key characteristic of SWNs [34]. Small-world property in CNNs translates to an architecture where all layers are interlinked via sparse connections. An example of such network is shown in Fig. 1.

SWNets have similar quality of prediction and number of trainable parameters as their baseline feed-forward architectures, but due to the added sparse links and the optimal SWN connectivity, they warrant better data flow. In summary, our architecture modification has three main properties: (i) It removes non-critical connections and reduces computational implications. (ii) It increases the degrees of freedom during training, allowing faster convergence. (iii) It provides customized data paths in the model for better cross-layer information propagation.

We conduct comprehensive experiments on various network architectures and showcase SWNets’ performance on popular image classification benchmarks including CIFAR10, CIFAR100, and ImageNet. Our small-world CNNs achieve an average of 2.1-fold improvement in training iterations required to achieve comparable classification accuracy as the baseline models. We further compare SWNet with the state-of-the-art DenseNet model and show that with fewer parameters, SWNets demonstrate identical performance during training.

2 Related Work and Background

Figure 2: Information flow within a ResNet (top), DenseNet (middle), and SWNet (bottom) network. Here, CONV, BN, ReLU denote a convolution kernel, batch normalization, and non-linear activation, respectively, and SWNet customized sparse convolutions are shown as S-CONV. Normal inter-layer connections are represented with bold lines and dotted lines are SWNet selective inter-links.

2.1 Related work

Bypass Connections. A substantial amount of research has focused on the addition of bypass connections to the hierarchical CNN architecture to enhance inter-layer information flow and enable feature reuse. Authors of  [28] implement the bypass connections using parametrized (gated) interlinks to enable model fine-tuning. In order to avert the burst in the number of trainable parameters caused by such gated connections, ResNets [9] use identity links (skip connections) to connect the concatenated layers. Such skip connections follow a modular structure. There exist a significant amount of redundancy in (deep) ResNets as alternative inter-layer connections may exist that render higher accuracy while having lower model complexity; as shown by [13], not all identity links are necessary.

A variation of ResNets that uses wider residual blocks is introduced in  [33, 35] to further improve image classification accuracy, while the effects of such architectural modification on the convergence speed and training overhead still need a more comprehensive study. Inception networks [31] are another example of benefiting from wider networks. Authors of  [30] show that addition of residual connections to the initially proposed inception architecture drastically increases model convergence speed. This work further motivated us to study CNN convergence gains by addition of bypass connections.

DenseNets [12] group CNN layers in blocks with each layer connected to all its preceding layers. This is done by concatenating previous layers’ feature-maps and using it as the input. Another work [11] argues that such dense connectivity pattern incurs redundancies since earlier features might not be required in later layers. The authors propose to prune such redundancies to generate a more efficient architecture for CNN inference phase. However, the paper does not explore the possible effects of pruning on training.

In summary, the prior work mainly focuses on accuracy gains of long-range connections with little attention to the training overhead induced by the introduction of redundant parameters. In contrast to prior art, we select only to add long-range connections that are key contributors to model accuracy as well as convergence speed. To the best of our knowledge, SWNet is the first work to intertwine the small-world property with CNNs and to examine the trained network in terms of convergence speed and accuracy.

To further highlight the distinction between our work and prior art, Fig. 2 illustrates the connection patterns in a ResNet, DenseNet, and SWNet architecture. In contrast to these two models, SWNet is not structured upon fixed building blocks and therefore can adapt to any given network architecture. Different from DenseNets which only accommodate fully dense connections, SWNet leverages customized sparse convolutions. Such sparsities enable selective connectivity between pairs of layers that enhance convergence speed while ensuring a low redundancy.

Small-wold Network. Perhaps the first investigation of SWNs in the context of deep learning was performed in [6], where the authors transform simple MLPs to SWN graphs and study the accuracy benefits for diagnosis of diabetes. SWNet substantially differs from this work as our solution is applicable to convolutional neural networks and uses a different mathematical model and small-worldness metric.

2.2 Background: Small-World Networks

Watts and Strogatz [34] observed that real-world complex networks, e.g., the anatomical connections in the brain and the neural network of animals, cannot be modeled using the existing regular or random graph classes. As such, they introduced the new category of small-world networks. Members of the small-world class have two main characteristics: 1) They have a small average pairwise-distance between graph nodes. 2) Nodes within the graph exhibit a relatively high (local) clustered structure. The first property is mainly associated with random graphs while the second property is prominent in regular graph classes. Such networks have shown significant enhancement in signal propagation speed, consensus, synchronization, and computational capability  [29, 19, 2, 18, 36].

Randomness is introduced into a regular graph structure by iterative removal and addition of edges with probability, , in order to construct an SWN. Fig. 3 demonstrates the transition between a regular structure and its corresponding random graph as the rewiring probability increases from to . Intermediate values of interpolate between complete regularity and randomness to generate an SWN.

Figure 3: Transition of a regular graph to a completely random network. Intermediate values of the random rewiring probability, , generate SWNs, i.e., clustered structures where any arbitrary node pair is connected by few edges.

3 SWNet: Small-World CNNs

We propose to restructure the inter-layer connections in a DL model such that its topology falls into the small-world category while the total number of parameters in the network is held constant. Throughout the paper, we use the terms DL model and CNN interchangeably but emphasize that our approach is easily applicable to models without convolutions, e.g., Multi-Layer Perceptrons (MLPs).

In the following, we first elaborate on the small-world criteria and introduce methods to distinguish SWNs from other topologies (Sec. 3.1). We then explain our conversion of an arbitrary CNN into its equivalent SWN (Sec. 3.2). Lastly, we delineate our implementation and formalize the operations performed in a SWNet (Sec. 3.3).

3.1 Metric for Small-Worldness

To examine the small-world property for a given graph, we study two properties, namely, the characteristic path length () and the global clustering coefficient (). is defined as the average distance between pairs of nodes in the graph and is a measure for the density of connections between neighbors of any node in the network. A completely random graph lacks clustering but enjoys a small . By definition, a graph is small-world if it has a similar but higher than an () random graph [37] constructed using the same number of vertices and edges.

Let us denote the clustering coefficient and the characteristic path length of a given graph () by and , respectively. In a similar fashion, we represent the corresponding characteristics of the equivalent random graph by , . We use a quantitative measure of the small-world property form [14] which categorizes a network as a SWN if and is calculated using Eq. (1).


3.2 Small-world Architecture Acquisition

3.2.1 Graph Generation

In order to modify a given CNN architecture and generate the equivalent SWN, we first model all connections within the network as a graph representation. In this context, a connection is defined as a linear operation performed between an input element and a trainable weight (network parameter) found in Convolution () and Fully-Connected () layers. For layers, each feature-map channel is represented by a node and each edge represents a kernel. For layers each neuron is assigned a separate node and the edges correspond to weight matrix elements.

3.2.2 Architecture Search

After generating the graph pertinent to the input CNN architecture, we proceed to find the equivalent SWN. To perform this task, the initial graph is randomly rewired with different probabilities, , similar to Fig. 3. For each rewired graph, we compute the characteristic path length and clustering coefficient and use the captured pattern for each criterion to detect the small-world topology using the small-worldness measure defined in Sec. 3.1.

Rewiring Policy. Let us denote an edge with where and are the start and end nodes. To perform random rewiring with probability , we visit all edges in the graph once. Each edge is rewired with probability or kept the same with probability . If the edge is to be rewired, a new second node is randomly sampled from the set of nodes that are non-neighbor to the edge’s start node, . This second node is selected such that no self-loops or repeated links exist in the rewired graph. Once the destination node is chosen, the initial edge, is removed and replaced by . Fig. 4 demonstrates our rewiring mechanism. Note that our rewiring methodology does not alter the number of connections in the CNN. As a result, the total number of trainable parameters in the SWN model equals that of the original network.

Figure 4: Our proposed rewiring algorithm replaces edges to the subsequent layer (red) with long-range edges (blue).

Network Profiling. Using the aforementioned rewiring policy, we generate various graphs by sweeping the rewiring probability in the [0,1] interval. Fig. 5 demonstrates the correlation between and as the rewiring probability is changed for a 14-layer CNN model. For conventional CNNs, the clustering coefficient is zero and the characteristic path length can be quite large specifically for very deep networks (leftmost points on Fig. 5). As such, CNNs are far from networks with the small-world property. Random rewiring replaces short-range connections to immediately subsequent layers with longer-range connections. Consequently, is reduced while increases as the network shifts towards the small-world equivalent. We select the topology with the maximum value of small-world property, , as the SWNet. As a direct result of such architectural modification, the new network enjoys enhanced connectivity in the corresponding CNN which results in better gradient propagation and training speedup.

Figure 5: Clustering coefficient (), small-world property (), and path length () versus rewiring probability. The region where the graph transforms into a small-world network is shown with the double-headed arrow.

To demonstrate the efficiency of the SWN versus other configurations generated during the probability sweep, we train several rewired networks on the MNIST dataset [20], each of which is constructed from a 5-layer CNN. Fig. 6 demonstrates the convergence speed of these various architectures versus rewiring probability used to generate them from the baseline model. Due to the addition of long-range connections, almost all models show convergence improvements over the baseline. However, the perfect balance between node clustering and average path length is achieved for the SWN. This, in turn, renders the fastest convergence.

Figure 6: Convergence speed of a 5-layer CNN and its randomly rewired counterparts. All values are normalized by baseline convergence rate. SWN is shown with a red star.

3.3 SWNet Methodology

CNN Formulation. Conventional CNNs are comprised of subsequent layers where each layer, , in the network performs a combination of linear and nonlinear operations on its input, , to generate the corresponding output, . We denote core linear operations ( and ) in a CNN by with the subscript representing the layer index. Other operations can take the form of Batch Normalization ([15], Rectified Linear Unit ([8], and Pooling [21]. For each linear layer, we bundle one or more of such operations together and show them as one composite function, . For an arbitrary layer in a conventional CNN, the output is formalized as:


Note that the cascaded nature of CNNs implies that the generated output from one layer serves as the input to the immediately succeeding layer: .

Sparse Connections in SWNets. One major difference between SWNets and conventional CNNs is that SWNet layers can be interconnected regardless of their position in the network hierarchy. More specifically, the output of each layer of a SWNet is connected to all its succeeding layers via sparse weight tensors. These connections are implemented via convolution kernels with coarse-grained sparsity patterns. Fig. 7 shows the convolution filters of an example sparse connection from a layer with 5 output channels to a layer with 3 output channels and its small-world graph representation. Let us denote sparse connections from layer to layer by . The output of the -th layer in SWNet can then be calculated as:


Comparing the above formulation with Eq. 2, we highlight the extra summation term that accounts for the inter-layer connections. Note that in Eq. 3, both and are sparse tensors. The inter-layer connectivity in SWNet enables enhanced data flow, both in inference and training stages, while the sparse connections mitigate unnecessary parameter utilization. In contrast to the previously proposed feature concatenation methodology [12], we perform summation over the feature-maps. By means of this approach, we mitigate the appearance of extremely high dimensional kernels that result from channel-wise feature-map concatenation. Furthermore, the summation of feature-maps enables SWNet to be applicable to all network architectures with various layer configurations.

Composite Non-linear Operation. In contrast to DenseNets [12] and ResNets [9] where several linear layers are concatenated before pooling is performed, SWNets support pooling immediately after each layer as seen in conventional CNN architectures. We experiment with various configurations of the widely-used non-linear operations, i.e., BN, ReLU, Maxpool to investigate the effect of ordering on network convergence. Our experiments demonstrate that SWNet convergence is enhanced when the composite non-linear function, is implemented as a ReLU, followed by Maxpooling, and BN as shown in Fig. 2.

Figure 7: Coarse-grained sparse convolution between a layer with output channels and a layer with output channels. Left: Sparse convolution weights. For each removed connection from the graph, the corresponding filter in the sparse convolution weight is masked to zero. Right: Equivalent graph with nodes representing channels.
Convolution MaxPool Convolution MaxPool Convolution MaxPool Convolution MaxPool Convolution MaxPool Classifier
ConvNet-C [26]
(C10, C100)
[ Conv]
stride 2
[ Conv]
stride 2
[ Conv]
stride 2
[ Conv]
stride 2
[ Conv]
stride 2
10FC, softmax
AlexNet [17]
(stride 4)
stride 2
stride 2
Conv - Conv - Conv
stride 2
1000FC, softmax
ResNet-18 [9]
(stride 2)
stride 2
[ Conv]
[ Conv]
[ Conv]
[ Conv]
average pool
1000FC, softmax

We modify the ConvNet-C fully-connected layers form [26] to comply with the CIFAR datasets.

Convolution Dense Block (1) Transition Block Dense Block (2) Transition Block Dense Block (3) Classifier
DenseNet-40 [12] (C10) Conv [ Conv] Conv [ Conv] Conv [ Conv] average pool
average pool average pool 10FC, softmax

Conv denotes a , followed by a and a convolution layer.

Table 1: Benchmarked CNNs for evaluating SWNet effectiveness. layers are represented as Conv. layers are denoted by FC and and are not shown for brevity.

4 Experiments

We conduct proof-of-concept experiments on different network architectures and image classification benchmarks to empirically demonstrate the enhanced convergence speed of SWNets compared to the baseline (conventional) counterparts. Our implementations are available in popular neural network development APIs, Keras [4] and PyTorch [24].

4.1 Datasets

CIFAR. We carry out our experiments on the two available CIFAR [16] datasets. CIFAR10 (C10) and CIFAR100 (C100) benchmarks consist of colored images with dimensionality that are categorized in 10 and 100 classes, respectively. Each dataset contains 50,000 samples for training and 10,000 samples for testing. We use standard data augmentation routines popular in prior work [9, 13]. The samples are normalized using per-channel mean and standard deviation. At training time, random horizontal mirroring, shifting, and slight rotation are also applied.

ImageNet. The ISLVRC-2012 dataset, widely known as the ImageNet [5], consists of 1000 different classes of colored images with 1.2 million samples for training and 50,000 samples for validation. We use the augmentation scheme proposed in [26, 10] to preprocess input samples. During training, we resize the images by randomly sampling the shorter edge from [256, 480]. A crop is then randomly sampled from the image. We also perform per-channel normalization as well as horizontal mirroring [17].

4.2 Benchmarked Architectures

Tab. 1 encloses our baseline CNN architectures. SWNets maintain the same feed-forward architecture as the baseline networks and are constructed by 1) replacing the original layers with sparse convolutions and 2) implementing additional sparse convolutions between non-consecutive layers. To match the dimensionality of inter-layer connected feature-maps, we tune the stride in the long-range sparse connections and use zero-padding where necessary111 We make sure that the stride is smaller than convolution window size. This approach enables us to control the dimensionality of the produced feature-maps as well as tune the impact of added long-range connections.

Figure 8: Test error and training loss versus iterations for a ConvNet-C model and the rewired SWNet trained on (a) CIFAR10 and (b) CIFAR100 datasets. The marker denotes the point of convergence to final test accuracy for the models.

4.3 Results on CIFAR

4.3.1 ConvNet-C

Training. We train the ConvNet-C [26] model on C10 and C100 benchmarks with a batch size of 128. To prevent overfitting, dropout layers with a rate of are added after layers with no , and a rate of before the first layer. The small-world model is constructed using the same configuration of layers as the baseline, including the dropout layers. We use Stochastic-Gradient-Descent (SGD) optimizer with Nesterov, momentum, and a weight decay. Models are trained for and iterations on C10 and C100, respectively. The initial learning rate is set to 0.01 for both datasets and learning rate is decayed by 0.5 upon optimization plateau.

Convergence. Fig. 8-(a) illustrates the test error and training loss of the baseline and SWNets as two representatives of the convergence speed. Similarly, for C100 benchmark, the corresponding convergence curve is presented in Fig. 8-(b). While these figures qualitatively demonstrate the effectiveness of our methodology, we provide a quantitative measure for a solid comparison between SWNet and the baseline. We investigate several points corresponding to various test accuracies and compare the two models’ convergence time to these points. Tab. 2 summarizes the per-accuracy speed-up of SWNet over the baseline model. As seen, the speed-up varies for different accuracies, however, for all test accuracies, SWNet requires a substantially fewer number of iterations for convergence. At final saturation point (marked by on Fig. 8), both models achieve comparable accuracies while SWNet enjoys a and reduction in convergence time for C10 and C100 datasets, respectively.


Baseline Test Error (%) 24.21 17.80 9.22 8.51 7.56
Iterations 1408 2560 8704 11008 18560
SWNet Test Error (%) 23.73 17.57 8.64 8.25 7.44
Iterations 896 1536 4992 5888 7040
Speed-up 1.57 1.67 1.74 1.87 2.64


Baseline Test Error (%) 77.08 52.3 41.54 31.14 29.52
Iterations 2944 6144 9472 16128 28928
SWNet Test Error (%) 76.67 50.57 40.18 31.15 29.26
Iterations 384 1408 3072 7808 10240
Speed-up 7.67 4.36 3.08 2.1 2.82
Table 2: Point-wise comparison of convergence speed-up for a SWNet and its equivalent baseline network (ConvNet-C) on CIFAR benchmarks.

4.3.2 DenseNet

DenseNets [12] achieve state-of-the-art accuracy by connecting all neurons from different layers of a dense block with trainable (dense) parameters. Such dense connectivity pattern results in high redundancy in the parameter space and causes extra overhead on training. We show that a SWNet with only sparse connections and much fewer parameters achieves similar results as DenseNet.

Training. We train a DenseNet model with 40 layers and (Tab. 1) on C10 dataset. The equivalent SWNet is constructed by removing all long-range dense connection from the architecture and rewiring the remaining short-range edges such that each dense block transitions into a small-world structure. The SWNet maintains the same number of layers while the inter-layer connections are implemented using sparse convolution kernels, thus incurring substantially fewer number of trainable parameters.

We use the publicly available PyTorch implementation for DenseNets 222https://github.com/andreasveit/densenet-pytorch and replace the model with our small-world network. Same training scheme as explained in the original DenseNet paper [12] is used: models are trained for iterations with a batch size of 64. Initial learning rate is and decays by 10 at and of the total training iterations.

Convergence. Fig. 9 demonstrates the test accuracy of the models versus the number of epochs. As can be seen, although SWNet has much fewer parameters, both models achieve comparable validation accuracy while showing identical convergence speed. We report the computational complexity (FLOPs) of the models as the total number of multiplications performed during a forward propagation through the network. Tab. 3 compares the benchmarked DenseNet and SWNet in terms of FLOPs and number of trainable weights in and layers. We highlight that SWNet achieves comparable test accuracy while having reduction in parameter space size.

Figure 9: Training loss and testing accuracy of the 40-layer (=12) DenseNet [12] with 1M parameters and our corresponding SWNet with less than 100K parameters.
Model Depth Params FLOPs Test Error
DenseNet () 40 910K 285.3M 0.071
SWNet 40 98K 85.5M 0.074
Table 3: Comparison of the computational complexity and model parameter space between a 40-layer DenseNet with =12 and the corresponding SWNet. In this experiment, no data augmentation is applied to either model.

4.4 Results on ImageNet

4.4.1 AlexNet

Training. We train the AlexNet [17] model on ImageNet dataset and follow the architecture provided in Caffe model zoo [1] (See Tab. 1). In order to mitigate overfitting, we add dropout layers with probability 0.5 after each layer (except the last). Loss minimization is performed by means of SGD with Nesterov [22] and a 0.9 momentum. We set the batch size to 64 for both models and incorporate an exponential decay for the learning rate: initial learning rate is set to and the decay factor is  [27].

Convergence. Fig. 10 demonstrates the test error and training loss of the baseline and SWNets. As can be seen, for all values of test error, the convergence of our small-world architecture is faster. Similar to CIFAR benchmarks, to fully examine the performance of our model, we report the speed-up of SWNet over the baseline for several values of test error. Tab. 4 encloses the point-wise comparison between the benchmarked models. As indicated by our evaluations, SWNet converges to the final test accuracy after 3776 iterations while the baseline model needs 5120 iterations, resulting in a overall speed-up.

Figure 10: Convergence plots of an AlexNet architecture and its SWNet on the ImageNet dataset. The marker indicates convergence to the final test error rate.


Baseline Test Error (%) 51.72 46.29 44.21 42.31 42.01
Iterations 1088 2304 3264 4416 5120
SWNet Test Error (%) 51.97 46.49 44.25 42.31 41.55
Iterations 768 1664 2368 3520 3776
Speed-up 1.42 1.38 1.38 1.25 1.36
Table 4: Performance of a baseline AlexNet and its SWNet benchmarked on ImageNet dataset.

4.4.2 ResNet

Training. We adopt the training scheme in the original ResNet paper [9]. To build the SWNet, we first remove all shortcut and bottleneck connections from the model. We then rewire the connections in the acquired plain network such that it becomes small-world. No dropout is used for the baseline and SWNets. Batch size is set to 128 and we use SGD with momentum and weight decay of . Initial learning rate is set to 0.1 and decays by when the accuracy plateaus. We train the models for iterations and report single-crop accuracies.

Convergence. Test error and training loss for baseline ResNet and the SWNet are shown in Fig. 11. As seen, SWNet achieves both higher accuracy and higher convergence speed throughout training. For a more quantitative comparison, we enclose point-wise speed-ups for various iterations and test errors in Tab. 5. As evident from the results, systematic restructuring of long edges in SWNet allows for a better convergence speed compared to the replicated blocks in the baseline ResNet.

Figure 11: Test error and training loss across training iterations for ResNet-18 on ImageNet dataset. Convergence to minimum error rate is shown with a marker.


BaseLine Test Error (%) 60.37 56.94 37.91 31.72
Iterations 1792 3456 7424 9344
SWNet Test Error (%) 59.63 56.76 37.86 31.68
Iterations 512 768 3584 7168
Speed-up 3.50 4.50 2.07 1.31
Table 5: Point-wise convergence comparison of a baseline ResNet-18 and its SWNet equivalent on ImageNet dataset.

5 Discussion on Long-range Connections

The selected small-world structure for a given CNN has two main characteristics, namely high clustering of nodes and small average path length between neurons across layers. We postulate that such qualities render the SWN desirable during training due to the enhanced information flow paths existent in these efficiently-connected networks. To examine our hypothesis, we visualize the weights connecting different layers of the trained SWNet for C10, C100 (ConvNet-C), and ImageNet (AlexNet) benchmarks. Fig. 12 presents a heat map of the average absolute values of weights connecting each pair of layers.

Figure 12: Visualization of average absolute value of trained weights within layers of a SWNet. Colors encode the connectivity strength between layers with red being the strongest and white denoting no connection. The marked rows with black box borders correspond to the input layer of the networks.

Each square at position of the heatmap represents the strength of the connections between layers and where denotes network input. Color shades of orange, red and maroon indicate strong inter-layer dependency while the white color indicates that no connections are present between the corresponding layers in SWNet. We summarize our observations based on the heat map as the following:

  1. Each layer has strong connections to its non-subsequent layers indicating that long-range edges established in SWNet are crucial to performance.

  2. The input layer has spread weights across all layers of the network which demonstrates the importance of connections between earlier and deeper layers.

  3. SWNet preserves the strong connections between one layer and the immediately proceeding layer, thus, maintaining the conventional CNN data flow.

6 Conclusion

We propose a novel methodology that adaptively modifies conventional feed-forward DL models to new architectures, called SWNet, that fall into the category of small-world networks—a class of complex graphs used to study real-world models such as human brain and the neural networks of animals. By leveraging the intriguing features of small-world networks, e.g., enhanced signal propagation speed and synchronizability, SWNets enjoy enhanced data flow within the network, resulting in substantially faster convergence speed during training. Our small-world models are implemented via sparse connections from each layer in the traditional CNN to all the succeeding layers. Such sparse convolutions enable SWNets to benefit from long-range connections while mitigating the redundancy in the parameter space existent in prior art. As our experiments demonstrate, SWNets are able to achieve state-of-the-art accuracy in lower number of training iterations, on average. Furthermore, compared to a densely-connected architecture, SWNets achieve comparable accuracy while having reduction in the number of parameters. In summary, due to their optimal graph connectivity and fast response to training, SWNets can be advantageous for smart vision applications.


  • [1] Bair/bvlc alexnet model.
  • [2] M. Barahona and L. M. Pecora. Synchronization in small-world systems. Physical review letters, 89(5):054101, 2002.
  • [3] Y. Bengio, P. Simard, and P. Frasconi. Learning long-term dependencies with gradient descent is difficult. IEEE transactions on neural networks, 5(2):157–166, 1994.
  • [4] F. Chollet et al. Keras. https://keras.io, 2015.
  • [5] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. Imagenet: A large-scale hierarchical image database. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pages 248–255. Ieee, 2009.
  • [6] O. Erkaymaz, M. Ozer, and M. Perc. Performance of small-world feedforward neural networks for the diagnosis of diabetes. Applied Mathematics and Computation, 311:22–28, 2017.
  • [7] X. Glorot and Y. Bengio. Understanding the difficulty of training deep feedforward neural networks. In Proceedings of the thirteenth international conference on artificial intelligence and statistics, pages 249–256, 2010.
  • [8] X. Glorot, A. Bordes, and Y. Bengio. Deep sparse rectifier neural networks. In Proceedings of the fourteenth international conference on artificial intelligence and statistics, pages 315–323, 2011.
  • [9] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770–778, 2016.
  • [10] K. He, X. Zhang, S. Ren, and J. Sun. Identity mappings in deep residual networks. In European conference on computer vision, pages 630–645. Springer, 2016.
  • [11] G. Huang, S. Liu, L. van der Maaten, and K. Q. Weinberger. Condensenet: An efficient densenet using learned group convolutions. group, 3(12):11, 2017.
  • [12] G. Huang, Z. Liu, L. Van Der Maaten, and K. Q. Weinberger. Densely connected convolutional networks. In CVPR, volume 1, page 3, 2017.
  • [13] G. Huang, Y. Sun, Z. Liu, D. Sedra, and K. Q. Weinberger. Deep networks with stochastic depth. In European Conference on Computer Vision, pages 646–661. Springer, 2016.
  • [14] M. D. Humphries and K. Gurney. Network ‘small-world-ness’: a quantitative method for determining canonical network equivalence. PloS one, 3(4):e0002051, 2008.
  • [15] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015.
  • [16] A. Krizhevsky, V. Nair, and G. Hinton. Cifar-10 (canadian institute for advanced research).
  • [17] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012.
  • [18] M. Kuperman and G. Abramson. Small world effect in an epidemiological model. Physical Review Letters, 86(13):2909, 2001.
  • [19] V. Latora and M. Marchiori. Efficient behavior of small-world networks. Physical review letters, 87(19):198701, 2001.
  • [20] Y. LeCun. The mnist database of handwritten digits. http://yann. lecun. com/exdb/mnist/, 1998.
  • [21] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
  • [22] Y. Nesterov et al. Gradient methods for minimizing composite objective function, 2007.
  • [23] R. Olfati-Saber. Ultrafast consensus in small-world networks. In American Control Conference, 2005. Proceedings of the 2005, pages 2371–2378. IEEE, 2005.
  • [24] A. Paszke, S. Gross, S. Chintala, G. Chanan, E. Yang, Z. DeVito, Z. Lin, A. Desmaison, L. Antiga, and A. Lerer. Automatic differentiation in pytorch. 2017.
  • [25] O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma, Z. Huang, A. Karpathy, A. Khosla, M. Bernstein, et al. Imagenet large scale visual recognition challenge. International Journal of Computer Vision, 115(3):211–252, 2015.
  • [26] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
  • [27] L. N. Smith. Cyclical learning rates for training neural networks. In Applications of Computer Vision (WACV), 2017 IEEE Winter Conference on, pages 464–472. IEEE, 2017.
  • [28] R. K. Srivastava, K. Greff, and J. Schmidhuber. Highway networks. arXiv preprint arXiv:1505.00387, 2015.
  • [29] S. H. Strogatz. Exploring complex networks. nature, 410(6825):268, 2001.
  • [30] C. Szegedy, S. Ioffe, V. Vanhoucke, and A. A. Alemi. Inception-v4, inception-resnet and the impact of residual connections on learning. In AAAI, 2017.
  • [31] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1–9, 2015.
  • [32] A. Tahbaz-Salehi and A. Jadbabaie. Small world phenomenon, rapidly mixing markov chains, and average consensus algorithms. In Decision and Control, 2007 46th IEEE Conference on, pages 276–281. IEEE, 2007.
  • [33] S. Targ, D. Almeida, and K. Lyman. Resnet in resnet: generalizing residual architectures. arXiv preprint arXiv:1603.08029, 2016.
  • [34] D. J. Watts and S. H. Strogatz. Collective dynamics of ‘small-world’networks. nature, 393(6684):440, 1998.
  • [35] S. Xie, R. Girshick, P. Dollár, Z. Tu, and K. He. Aggregated residual transformations for deep neural networks. In Computer Vision and Pattern Recognition (CVPR), 2017 IEEE Conference on, pages 5987–5995. IEEE, 2017.
  • [36] D. H. Zanette. Dynamics of rumor propagation on small-world networks. Physical review E, 65(4):041908, 2002.
  • [37] X. Zhang, C. Moore, and M. E. Newman. Random graph models for dynamic networks. The European Physical Journal B, 90(10):200, 2017.
Comments 0
Request Comment
You are adding the first comment!
How to quickly get a good reply:
  • Give credit where it’s due by listing out the positive aspects of a paper before getting into which changes should be made.
  • Be specific in your critique, and provide supporting evidence with appropriate references to substantiate general statements.
  • Your comment should inspire ideas to flow and help the author improves the paper.

The better we are at sharing our knowledge with each other, the faster we move forward.
The feedback must be of minimum 40 characters and the title a minimum of 5 characters
Add comment
Loading ...
This is a comment super asjknd jkasnjk adsnkj
The feedback must be of minumum 40 characters
The feedback must be of minumum 40 characters

You are asking your first question!
How to quickly get a good answer:
  • Keep your question short and to the point
  • Check for grammar or spelling errors.
  • Phrase it like a question
Test description