SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Modularity[1, 2]: Arch[4, 24, 24, 24, 16]: Density = 2.02%
$\text{I} = 0.1$  batch size  $= 8$  epochs  $= 40$  seed  $= 0$  arch  $= [4,3,3,2,16]$
P=70.0，P=2.5
$lr = 0.05$  , batch size  $= 32$  , epochs  $= 15$  , seed  $= 0$  , arch  $= [6,3,3]$ $P_{\mathrm{t}} = 70.0$ $P_{\mathrm{a}} = 1.0$
Modularity[3, 3]: Arch[6, 24, 24, 3]: Density = 1.89%
ir=0.05, batch size =32, epochs =10, seed =0, arch =[6, 3, 3, 3]
$P_{u} = 60.0,P_{e} = 0.5$
Modularity[3, 3]: Arch[6, 24, 24, 24, 3]: Density = 1.32%
$I r = 0.05$  batch size  $= 32$  epochs  $= 15$  seed  $= 0$  arch  $\equiv [6,3,3,3,3]$
$P_{u} = 50.0,P_{e} = 1.5$
$I r = 0.1$  , batch size  $= 8$  , epochs  $= 40$  seed  $= 0$  , arch  $= \{4,2,2\}$ $P_{\mathrm{w}} = 70.0,P_{\mathrm{w}} = 25.$
Modularity[1]: Arch[4, 24, 24, 4]: Density = 1.82%
, epochs  $= 30$  seed  $= 0$  , arch  $=$
$P_{u} = 15.0, P_{e} = 2.5$
Modularity[1]: Arch[4, 24, 24, 24, 4]: Density = 1.04%
ir=0.1, batch size =8, epochs =30, seed =0, arch=[4, 1, 3, 1, 4]
$P_{\mathrm{u}} = 25.0, P_{\mathrm{e}} = 2.5$
C NN visualizations: Function graphs with a single sub-function and increasing reuse
Figure 15: The function graphs consist of a single non-input separable sub-function that is reused to construct two output sub-functions. We vary the number of times the two sub-functions are used or replicated, ranging from 1 to 8.
Figure 16: Function graphs in Figure 15 represented using only 3 hierarchical levels.
Figure 17: Example visualizations of uncovered modular and hierarchical structure for NNs trained on function graphs in Figure 15. Each row indicates a different NN depth, 1. 1 hidden layer, 2. 2 hidden layers, and 3. 3 hidden layers. Each column indicates a different function graph with sub-function use increasing from 1 to 8. We can observe that when the NN depth is lower than that of the number of hierarchical levels, a single module is recovered. This is consistent with the function graphs that use only 3 hierarchical levels as shown in Figure 16.
D NN visualizations : Increasing input overlap and reuse of two input separable sub-functions
D.1 Completely separable sub-functions
Figure 18: The visualizations presented illustrate the uncovered modular and hierarchical structure of NNs trained on the function graphs depicted in the first row. Within these function graphs, there are two sub-functions that are entirely input separable. Each row in the visualizations corresponds to a different NN depth, namely 1 hidden layer, 2 hidden layers, and 3 hidden layers. Additionally, each column represents a different function graph, where the usage of sub-functions increases incrementally from 1 to 8.
D.2 Single overlapping input node
Modularity[3,2]: Arch[7, 24, 2]: Density = 8.8%
$b = 0.1$  ，batch size  $= 16$  ,epochsc  $= 40$  ,seed  $= 0$  ,arch  $= [7,4,2]$ $P_{\mathrm{u}} = 70.0,P_{\mathrm{v}} = 25.$
Modularity[3, 2]: Arch[7, 24, 4]: Density = 8.71%
$\dot{r} = 0.1$  batch size  $= 32$  epochs  $\equiv 20$  seed  $= 0$  ,arch  $= [7,4,4]$ $P_{\mathrm{L}} = 45.0,P_{\mathrm{R}} = 45.0$
Modularity[3, 2]: Arch[7, 24, 8]: Density = 9.72%
$b = 0.1$  , batch size  $= 32$  , epochs  $= +20$  , seed  $= 0$  , arch  $= [7,5,8]$ $P_{\mathrm{a}} = 70.0,P_{\mathrm{b}} = 25.$
Modularity[3, 2]: Arch[7, 24, 12]: Density = 8.55%
$k = 0.1$  ，batch size  $= 32$  , epochs  $>20$  , seed  $= 0$  , arch  $= [7,4,12]$ $P_{\mathrm{c}} = 35.0,P_{\mathrm{d}} = 25.5$
[ \text{[} = 0.1, \text{ batch size} = 16, \text{ epochs} = 30, \text{ seed} = 0, \text{ arch} = [7, 3, 2, 5] ]
[ P_{\mathrm{c}} = 10.0, P_{\mathrm{d}} = 2.5 ]
$b = 0.05$  ，batch size  $= 16$  , epochs  $= 30$  , seed  $= 0$  ,arch  $= [7,3,3,4]$ $P_{\mathrm{c}} = 20.0$ $P_{\mathrm{d}} = 2.0$
$\hat{v} = 0.1$  ，batch size  $= 32$  , epochs  $= 40$  , seed  $= 0$  , arch  $= [7,4,2,8]$ $P_{\mathrm{p}} = .55,P_{\mathrm{p}} = 1.0$
$I = 0.1$  ，batch size  $= 32$  ，epochs  $= 40$  ，seed  $= 0$  ，arch  $= [7,4,2,12]$ $P_{\mathrm{c}} = 65.0,P_{\mathrm{d}} = 2.5$
$I = 0.1$  ，batch size  $= 32$  ,epochs  $= 30$  ,seed  $= 0$  ,arch  $= [7,4,2,16]$ $\rho_{\mathrm{c}} = 60.0$ $\rho_{\mathrm{e}} = 2.5$
P=20.0,P=1.5
Figure 19: The visualizations provided showcase the uncovered modular and hierarchical structure of NNs trained on function graphs found in the first row. These function graphs comprise two sub-functions that are built using three sets of input nodes. Specifically, there are two sets, each containing three nodes, which are specific to individual sub-functions. The third set consists of one input node that is shared between both sub-functions. In the visualizations, each row corresponds to a different NN depth, ranging from 1 hidden layer to 3 hidden layers. Additionally, each column represents a distinct function graph, with an increasing usage of sub-functions from 1 to 8.
${P}_{n} = {2.3}\% ,{P}_{e} = {2.3}\%$
P=30.0,P=2.5
${P}_{V} = {3.5}\% ,{P}_{E} = {2.5}\%$
D.3 Two overlapping input nodes
Figure 20: The provided visualizations depict the uncovered modular and hierarchical structure of NNs trained on function graphs found in the first row. These function graphs comprise two sub-functions that are constructed using three sets of input nodes. Within these sets, there are two sub-function-specific sets, each consisting of two nodes, and the third set comprises two input nodes shared between both sub-functions. In the visualizations, each row represents a different NN depth, ranging from 1 hidden layer to 3 hidden layers. Furthermore, each column represents a distinct function graph, with increasing usage of sub-functions from 1 to 8.
D.4 Three overlapping input nodes
Modularity[3, 2]: Arch[5, 24, 2]: Density = 8.93%
$\text{即} = 0.1$  ，batch size  $= 8$  ,epochse  $= 20$  seed  $= 0$  ,arch  $= [5,3,2]$ $P_{\mathrm{a}} = 30, P_{\mathrm{b}} = 25$
$\text{即} = 0.1$  ，batch size  $= 16$  , epochs  $= 20$  , seed  $= 5$  , arch  $= [5,4]$ $P_{\mathrm{d}} = 65.0,$ $P_{\mathrm{a}} = 0.5$
$\mathrm{ir} = 0.1$  , batch size  $= 16$  , epochs  $= 30$  , seed  $= 0$  , arch  $= [5,4,8]$ $P_{\mathrm{r}} = 55.0$ $P_{\mathrm{d}} = 2.5$
[ \text{[v = 0.05, batch size =16, epochs =20, seed =0, arch = [5, 4, 12]}]  $P_{\mathrm{c}} = 50.0, P_{\mathrm{d}} = 2.5$
$\mathrm{I} = 0.05$  , batch size  $= 16$  , epochs  $\equiv 20$  , seed  $= 0$  , arc  $= [5,4,16]$ $P_{\mathrm{A}} = 30.0$ $P_{\mathrm{B}} = 1.5$
$\text{r} = 0.1$ ，batch size = 16, epochs = 30, seed = 1, arch = [5, 3, 3, 2]  
 $P_{u} = 20.0, P_{o} = 2.0$
$r = 0.05$  ，batch size  $= 16$  ,epochs  $= 20$  ,seed  $= 0$  ,arch  $= [5,4,3,4]$ $P_{\mathrm{v}} = 55.0$ $P_{\mathrm{v}} = 1.5$
$I_r = 0.05$  , batch size  $= 16$  , epochs  $= 20$  , seed  $= 0$  , arch  $= [5,3,3,8]$ $P_{u} = 25.0,P_{s} = 2.0$
$I = 0.05$  , batch size  $= 8$  epochs  $= 30$  seed  $= 0$  arch  $= [5,4,2,12]$ $\rho_{\mathrm{c}} = 10.0,\rho_{\mathrm{p}} = 1.5$
$v = 0.1$  , batch size  $= 16$  epochs  $= 40$  seed  $= 1$  , arch  $= [5,4,2,16]$ $P_{\mathrm{e}} = 20, P_{\mathrm{d}} = 20$
$\mathrm{ir} = 0.05$  , batch size  $= 16$  epochs  $= 30$  seed  $= 0$  ,arch  $= [5,3,3,2,2]$ $P_{\mathrm{w}} = 25.0,P_{\mathrm{w}} = 2.0$
Figure 21: The provided visualizations showcase the most commonly uncovered modular and hierarchical structure for NNs trained on function graphs found in the first row. These function graphs consist of two sub-functions that are constructed using three sets of input nodes. Among these sets, two are sub-function-specific, with each set comprising one node, while the third set consists of three input nodes that are shared between both sub-functions. Each row in the visualizations represents a different NN depth, ranging from 1 hidden layer to 3 hidden layers. Additionally, each column corresponds to a distinct function graph, with an increasing usage of sub-functions from 1 to 8. Observing the visualizations, we can note that the input units are accurately clustered into two modules specific to each sub-function and one reused module. However, the hidden units in the early layers tend to be clustered into a single module more often. This suggests that NNs may learn intermediate states that are reused for both sub-functions when there is a large input reuse set. This phenomenon may be influenced by excessive hidden unit pruning and the existence of learnable hidden states that can be reused independently of input reuse. On the other hand, the output sub-functions are detected accurately for deeper NNs, indicating that the hierarchical organization is better captured as the network depth increases.
$\{r = 0.05$  ,batch size  $= 16$  epochs  $\equiv 40$  seed  $= 2$  ,arch  $= [5,3,3,2,4]$ $P_{\mathrm{c}} = 50.0,P_{\mathrm{p}} = 1.5$
$\mathrm{r} = 0.05$  , batch size  $= 16$  epochs  $= 30$  seed  $= 0$  , arch  $= [5,4,2,2,8]$ $P_{\mathrm{c}} = 10, P_{\mathrm{d}} = 0.5\%$
, epochs =30, save P1=40.0 P2=2
epochs=30,see P=70.0P=0.5
batch size  $= 8$  epochs  $\equiv 30$  seed  $= 2$  ,arch  $= [5,4,12]$ $P_{\mathrm{t}} = 60.0,P_{\mathrm{e}} = 2.5$
Figure 22: The provided visualizations depict accurately uncovered modular and hierarchical structures for NNs trained on function graphs shown in Figure 21.
$t = 0.1$  , batch size  $= 16$  , epochs  $= 30$  , seed  $= 2$  , arch  $= [5,5,2,12]$ $P_{\mathrm{av}} = 65.0$ $P_{\mathrm{av}} = 45.0$
Figure 23: The visualizations highlight the tendency of NNs trained on function graphs from Figure 21 to cluster the input and early hidden layers together while accurately detecting the output sub-functions. This clustering of the input layer and early hidden layers into a single module suggests that the NNs learn representations that are shared among the sub-functions, despite their distinct inputs. This phenomenon becomes more pronounced when the sub-functions are repeatedly utilized within the function graph. It is possible that the network captures common features or patterns that are relevant to all the sub-functions, leading to this shared module in the early layers.
D.5 All overlapping input nodes
Figure 24: In the set of visualizations for the uncovered modular and hierarchical structure of NNs trained on function graphs in the first row, we can observe a single module being recovered. This finding is consistent with the previous result, where a high degree of input overlap within the function graph, coupled with hidden unit pruning, influences the NN to learn hidden states that are reused for both output sub-functions. Despite the presence of distinct output sub-functions, the network learns to capture common underlying features in all the hidden layers.
Figure 25: In set 2 of visualizations for the uncovered modular and hierarchical structure of NNs trained on function graphs in the first row, a distinct pattern emerges. In the early layers, the pipeline consistently recovers a single module, primarily because there is no input separability present in the function graphs. However, as we progress to the later layers, we observe a successful separation of units into two distinct modules.
Figure 26: In set 3 of visualizations for the uncovered modular and hierarchical structure of NNs trained on function graphs in the first row, intriguing patterns emerge. The pipeline successfully reveals a single module in the input layer. In later layers, the units are accurately separated into two distinct modules. In NNs with 2 hidden layers, we observe that the first hidden layer has two distinct clusters. One cluster is connected to one of the output modules, while the other cluster is reused by both modules. In NNs with 3 hidden layers, The first hidden layer approximates two sub-functions, which are subsequently reused by both output modules through an intermediate module. We could not interpret those structures using any of the valid function graphs.
E NN visualizations : Increasing the number of hierarchical levels
Modularity[2, 1, 2]: Arch[8, 48, 4]: Density = 6.42%
$lr = 0.1$  ,batch size  $= 32$  ,epochs  $= 40$  ,seed  $= 0$  ,arch  $= [8,5,4]$
Modularity[2,1,2]: Arch[8,48,8]: Density = 7.42%
$lr = 0.1$  , batch size  $= 32$  epochs  $= 40$  seed  $= 0$  , arch  $= [8,5,8]$
Modularity[2, 1, 2]: Arch[8, 48, 12]: Density = 8.23%
$I_r = 0.1$  batch size  $= 32$  epochs  $= 40$  seed  $= 0$  arch  $= [8,5,12]$
Modularity[2, 1, 2]: Arch[8, 48, 16]: Density = 8.59%
$I_r = 0.1$  batch size  $= 32$  epochs  $= 40$  seed  $= 0$  ,arch  $\equiv [8,5,16]$
$I = 0.05$  batch size  $= 64$  epochs  $= 40$  seed  $= 0$  arch  $= [8,4,2,4]$
ir=0.05, batch size =64, epochs =40, seed =0, arch =[8, 5, 2, 8]
ir = 0.1, batch size =32, epochs =20, seed =0, arch =[8,4,3,12]
ir = 0.05, batch size =64, epochs =15, seed =1, arch =[8, 5, 2, 16]
${lr} = {0.1}$  ,batch size  $= {128}$  ,epochs  $= {40}$  ,seed  $= 0$  ,arch  $= \left\lbrack  {8,4,2,2,4}\right\rbrack$
${lr} = {0.05}$  ,batch size  $= {16}$  ,epochs  $= {40}$  ,seed  $= 0$  ,arch  $= \left\lbrack  {8,6,2,2,8}\right\rbrack$
$lr = 0.05$  , batch size  $= 16$  , epochs  $= 40$  , seed  $= 0$  , arch  $= [8,5,2,2,12]$
$\text{I} = 0.1$  batch size  $= 32$  epochs  $= 60$  seed  $= 1$  arch  $\equiv [8,5,2,2,16]$
$I r = 0.05$  ，batch size  $= 128$  ,epochs  $= 40$  ，seed  $= 0$  ,arch  $= [8,5,2,2,2,4]$ $P_{\mathrm{w}} = 10.0,P_{\mathrm{w}} = 1.0$
Figure 27: The visualizations of the uncovered modular and hierarchical structure for NNs trained on function graphs in the first row provide valuable insights. Within these function graphs, there are two sub-functions that are completely input separable. The outputs of these sub-functions are then combined into a single sub-function, which is subsequently reused by two output sub-functions. Each row in the visualizations corresponds to a different NN depth, ranging from 1 hidden layer to 4 hidden layers. Additionally, each column represents a different function graph, with an increasing number of sub-function uses ranging from 1 to 8. An interesting observation is that as the depth of the NN varies, the uncovered hierarchical structures also vary. These visualizations shed light on the interplay between network depth and the discovered hierarchical structures, offering insights into how the NNs adapt and represent the relationships among the input separable sub-functions and the output sub-functions.
$r = 0.05$  batch size  $= 32$  epochs  $\equiv 30$  seed  $= 0$  ,arch  $= [18,6,2,2,2,8]$ $P_{\mathrm{t}} = 65.0,P_{\mathrm{c}} = 0.5$
$x = 0.05$  , batch size  $= 32$  epochs  $= 30$  seed  $= 2$  , arch  $= [8,4,2,2,2,12]$ $P_{\mathrm{w}} = 35.0$ $P_{\mathrm{v}} = 0.5$
$k = 0.05$  ,batch size  $= 32$  epochs  $= 30$  ,seed  $= 0$  ,arch  $= [8,5,2,2,2,16]$ $P_{\mathrm{t}} = 55.0,P_{\mathrm{c}} = 1.0$
E.1 Other structures frequently recovered
Figure 28: The visualizations showcase other structures that are frequently uncovered by NNs trained on the function graph in the first row. It is evident that the function can also be represented by other function graphs shown in the same row. However, these alternate function graphs are less efficient in terms of the number of edges and gate nodes required. In the first alternate graph, we observe the use of 6 additional edges, while the second alternate graph utilizes 4 additional edges. Moreover, both of these function graphs involve a larger number of gate nodes compared to the original function graph. Many unsuccessful NN trials result in the recovery of these alternate structures, as illustrated in the second row of the visualizations.
Figure 29: The visualizations showcase other structures that are frequently uncovered by NNs trained on the function graph in the first row. It is evident that the function can also be represented by other function graphs shown in the same row. However, this alternate function graph is less efficient, requiring 2 additional edges compared to the original function graph. Many unsuccessful NN trials result in the recovery of these alternate structures, as illustrated in the second row of the visualizations.
E.2 Output sub-functions used once
Figure 30: Function graphs representing the Boolean function in 27 when each of the output subfunctions is used only once. In each row of the figure, we can observe function graphs with different numbers of hierarchical levels. Each graph within a row presents an alternate representation of the function, employing the same number of nodes and edges.
Figure 31: a) Example visualization of the hierarchical structure obtained through an NN with 2 hidden layers, trained on the function illustrated in Figure 30(same structure as shown in Figure 30, row 3a); b) Example visualization of the hierarchical structure obtained through an NN with 3 hidden layers, trained on the function illustrated in Figure 30 (same structure as shown in Figure 30, row 2a); c) Example visualization of the hierarchical structure obtained through an NN with 3 hidden layers, trained on the function illustrated in Figure 30 (same structure as shown in Figure 30, row 2b); d) Example visualization of the hierarchical structure obtained through an NN with 4 hidden layers, trained on the function illustrated in Figure 30 (same structure as shown in Figure 30, row 1a); e) Example visualization of the hierarchical structure obtained through an NN with 4 hidden layers, trained on the function illustrated in Figure 30 (same structure as shown in Figure 30, row 1c).
F NN visualizations for tasks with MNIST
F.1 MNIST task classifying two digits
Modularity[2]: Arch[1568, 784, 784, 20]: Density = 0.12%
$I r = 0.001$  batch size  $= 512$  epochs  $= 40$  seed  $= 0$  arch  $\equiv [836,26,25,20]$ $P_{u} = 30.0,P_{e} = 1.0$
Modularity[2]: Arch[1568, 784, 784, 784, 20]: Density = 0.08%
$I r = 0.001$  batch size  $= 512$  epochs  $= 40$  seed  $= 0$  arch  $= [827,24,17,16,20]$ $P_{u} = 30.0$ $P_{e} = 1.0$
Modularity[2]: Arch[1568, 784, 784, 784, 784, 20]: Density = 0.07%
Figure 32: Visualizations of NNs uncovering two modules corresponding to the two MNIST digits classification task with varying depth. Out of the 36 trials conducted, we obtain two completely separable modules for 33 out of 36 trials, indicating the high effectiveness of our approach.
$Ir = 0.001$ , batch size  $= 256$ , epochs  $= 40$ , seed  $= 0$ , arch  $= [801, 23, 20, 14, 17, 20]$ $P_U = 50.0$ ,  $P_E = 0.5$
F.2 Hierarchical task with MNIST digits
Modularity[2, 3]: Arch[1568, 784, 784, 3]: Density = 0.15%
Modularity[2, 3]: Arch[1568, 784, 784, 784, 3]: Density = 0.12%
Modularity[2, 3]: Arch[1568, 784, 784, 784, 784, 3]: Density = 0.07%
Figure 33: The uncovered NN structures for the hierarchical and modular task with 2 MNIST digit images as input. The NNs uncover the three output modules accurately. The pipeline fails to recover the two input separable modules when the NN depth is low. Deeper NNs do recover two input separable modules. However, the middle layers are clustered into a single module indicating that the depth may be insufficient to detect the two classification modules accurately.
Modularity[2, 3]: Arch[1568, 784, 784, 784, 784, 784, 3]: Density = 0.05%
G Structural properties of dense and sparse NNs
Figure 34: T-statistic and P-values for the two statistical tests conducted to detect input separability in dense NNs. The first row shows the heat maps of t-statistic values (on the two tests) for NNs with varying widths and depths. The second row shows the p-values for the same.
Figure 35: T-statistic and P-values for the two statistical tests conducted to detect input separability in edge-pruned NNs. The first row shows the heat maps of t-statistic values (on the two tests) for NNs with varying widths and depths. The second row shows the p-values for the same.
Figure 36: T-statistic and P-values for the two statistical tests conducted to detect input separability in unit and edge pruned NNs. The first row shows the heat maps of t-statistic values (on the two tests) for NNs with varying widths and depths. The second row shows the p-values for the same.
H Pruning Algorithms
This appendix section is a companion to section 3 of the main paper. Here, we provide a detailed explanation of the pruning algorithm and outline the experiments conducted to explore hyperparameters for training and pruning NNs.
H.1 Details
The pseudo code for the unit pruning algorithm can be found in Algorithm 1, while the pseudo code for the edge pruning algorithm is provided in Algorithm 2. In each iteration, pruning is performed (either units or edges), followed by training the NN for the same number of epochs and using the same learning rate schedule.
The pruning procedure consists of two steps. First, a score is assigned to each unit/edge, and then a fraction of the units/edges is pruned based on these scores. It is important to note that the pruning fractions  $(p_u, p_e, \text{and} p)$  are always computed relative to the original number of hidden units or edges in the NN.
Both unit pruning and edge pruning are implemented using binary masks. Each edge weight is assigned a binary mask value, where a value of 1 indicates that the edge weight is not pruned, and a value of 0 indicates that it is pruned. When a unit is pruned, all incoming and outgoing edge weights associated with that unit are masked out by setting their binary mask values to 0.
Unit and edge pruning gradients: In our experiments, we conducted a grid search over the  $p_u$  and  $p_e$  values for each NN architecture, function graph, and seed value. We explored a range of 14 different  $p_u$  values, ranging from 5% to 70% in increments of 5%, and 5 different  $p_e$  values: 0.5, 1.0, 1.5, 2.0, 2.5. It is important to note that the  $p_u$  values used throughout the process are relative to the original number of units in the NN, while the  $p_e$  values are relative to the number of edges in the original NN. After the grid search, we select the NN with the lowest density among all the sparse NNs obtained. Typically, we find that higher unit pruning gradients ( $p_u > 40$ ) work best, as they allow for the removal of a lower number of units in each iteration by halving the gradient value.
Algorithm 2: Edge pruning algorithm
Data:  $\theta \in \mathbb{R}^a$ $(\pmb{x}_t,\pmb{y}_t)$ $(\pmb{x}_v,\pmb{y}_v)$ $p_e$    
Result: mask, M   
 $\pmb{\theta}\gets \text{train} (\pmb {\theta},(\pmb {x}_t,\pmb {y}_t));$  /\* Train the dense NN \*/  $A_{v}\gets Acc(\pmb {\theta},(\pmb{x}_{v},\pmb{y}_{v}))$ $p\gets 0$  /\* Assign initial pruning percentage as O \*/  $p_{min}\gets 100 / a$  /\* minimum pruning percentage difference \*/ prune  $\leftarrow$  True;   
while prune  $= =$  True do   
 $p = p + p_e;$ $S\gets |\pmb {\theta}|;$  /\* Pruning scores equal to the weight magnitude \*/  $T\gets$  Percentile(S,p);   
 $M_p\gets \mathbb{I}(S > T);$  /\* Threshold the scores to obtain mask \*/  $\theta_p\gets \theta \odot M_p;$ $\theta_p\gets \text{train} (\theta_p,(\pmb {x}_t,\pmb {y}_t));$  /\* Train the NN \*/  $A\gets Acc(\pmb {\theta}_p,(\pmb {x}_v,\pmb {y}_v))$    
if  $A > = A_v$  then   
 $\begin{array}{rl}{|\pmb{\theta}\gets \pmb{\theta}_p} & {}\\ {\mathrm{else}} & {}\\ {p\gets p - p_e;} & {}\\ {p_e\gets p_e / 2;} & {}\\ {\mathrm{if} p_e <   p_{min}\mathrm{then}} & {}\\ {|prune\gets False;} & {}\\ {\mathrm{end}} & {}\\ {\mathrm{end}} & {} \end{array}$
Figure 37: Function graphs used to validate the proposed pipeline
Table 2: Success rates for NNs with varying learning rate and batch size, used for training on function graph with a. input separable sub-functions, and b. a reused sub-function.
Input separable sub-functions	Reused sub-function
lr	0.005	0.01	0.05	0.1	lr	0.005	0.01	0.05	0.1
batch size	batch size	Reused
NNs with 1 Hidden Layer	NNs with 1 Hidden Layer
1	1.0	X	1.0	X	1	0.5	0.5	1.0	1.0
2	1.0	1.0	1.0	1.0	2	0.5	0.5	1.0	1.0
4	1.0	1.0	1.0	1.0	4	0.5	1.0	1.0	1.0
8	1.0	1.0	1.0	1.0	8	X	0.5	0.75	1.0
16	X	1.0	1.0	1.0	16	X	X	1.0	1.0
NNs with 2 Hidden Layers	NNs with 2 Hidden Layers
1	1.0	1.0	1.0	X	1	0.25	0.25	0.5	X
2	1.0	1.0	1.0	X	2	0.5	0.0	0.75	1.0
4	1.0	1.0	1.0	1.0	4	0.0	0.25	1.0	1.0
8	1.0	1.0	1.0	1.0	8	0.25	0.0	0.5	1.0
16	1.0	1.0	1.0	1.0	16	X	0.25	0.75	0.5
NNs with 3 Hidden Layers	NNs with 3 Hidden Layers
1	1.0	1.0	X	X	1	0.25	0.5	X	X
2	1.0	1.0	X	X	2	0.25	0.5	X	X
4	1.0	1.0	1.0	X	4	0.5	0.5	0.75	X
8	1.0	1.0	1.0	X	8	0.25	0.25	0.75	1.0
16	1.0	1.0	1.0	1.0	16	X	X	0.75	1.0
H.2 Learning rate and batch size experiments