In [1]:
from IPython.display import HTML

function code_toggle() {
 if (code_show){
 } else {
 code_show = !code_show
$( document ).ready(code_toggle);
The raw code for this Jupyter notebook is by default hidden for easier reading. To toggle on/off the raw code, click <a href="javascript:code_toggle()">here</a>.''')
The raw code for this Jupyter notebook is by default hidden for easier reading. To toggle on/off the raw code, click here.
In [2]:
import matplotlib as mpl
import networkx as nx
import visJS2jupyter.visJS_module
import visJS2jupyter.visualizations as visualizations

G = nx.Graph()
In [3]:
# nodes

# topics
topics = ["Approximation Theory",
          "Harmonic Analysis",
          "Statistics/Machine Learning",

# questions
questions = ["Overfitting",
             "Implicit regularization",
             "Curse of dimensionality",
             "Deep versus shallow",
             "Landscape of loss",
             "Biological plausibility",
             "Robustness to noise",
             "Stability to deformations",
             "Energy propagation",
             "Translation invariance",
             "Invariance to intraclass variability",
             "Generative modeling",
             "Architectures as inference algorithms",
             "Interpretation of tricks",
             "Sparse coding",
             "Network design"]

# lectures in the stats385 course
lectures = ["Lecture 3:\nHelmut Bolcskei",
            "Lecture 4:\nAnkit Patel",
            "Lecture 5:\nTomaso Poggio"]

nodes = G.nodes()

nodes_shape = []
node_shape = ['square' if (node in topics) else ('dot' if (node in questions) else 'star') for node in G.nodes()]
node_to_shape = dict(zip(G.nodes(),node_shape))

nodes_size = []
node_size = [5 if (node in topics) else (4 if (node in questions) else 3) for node in G.nodes()]
node_to_size = dict(zip(G.nodes(),node_size))

node_to_color = []
node_color = ['#800080' if (node in topics) else ('#C70039' if (node in questions) else '#FFC300') for node in G.nodes()]
node_to_color = dict(zip(G.nodes(),node_color))
In [4]:
# edges

# topics and questions
topics_questions = [("Approximation Theory","Curse of dimensionality",{'title':"How does deep learning overcome the curse of dimensionality?"}),
                    ("Approximation Theory","Deep versus shallow",{'title':"When and why are deep networks better than shallow networks?"}),
                    ("Harmonic Analysis","Translation invariance",{'title':"Are the features computed by deep architectures translation invariant or covariant?"}),
                    ("Harmonic Analysis","Stability to deformations",{'title':"Are the features stable to deformations?"}),
                    ("Harmonic Analysis","Energy propagation",{'title':"How does the energy of the features behave as function of the layer and can we tune it?"}),
                    ("Harmonic Analysis","Robustness to noise",{'title':"If noise is added to the input of the architecture, do the estimated feature representations remain stable?"}),
                    ("Harmonic Analysis","Invariance to intraclass variability",{'title':"Is the network learning invariance to certain variabilities?"}),
                    ("Harmonic Analysis","Network design",{'title':"How should we design the architecture?"}),
                    ("Neuroscience","Biological plausibility",{'title':"Are modern architectures biologically plausible?"}),
                    ("Statistics/Machine Learning","Overfitting",{'title':"How can deep learning not overfit?"}),
                    ("Statistics/Machine Learning","Regularization",{'title':"How does the network manage to generalize without regularization despite the large number of parameters?"}),
                    ("Statistics/Machine Learning","Implicit regularization",{'title':"Is there any implicit regularization in the network?"}),
                    ("Statistics/Machine Learning","Generalization",{'title':"What does the generalization capability of a network rely on?"}),
                    ("Statistics/Machine Learning","Generative modeling",{'title':"Is there a generative model behind deep learning architectures and if so what is it?"}),
                    ("Statistics/Machine Learning","Architectures as inference algorithms",{'title':"Can we interpret certain networks as an inference algorithm under a generative model?"}),
                    ("Statistics/Machine Learning","Interpretation of tricks",{'title':"What is the importance of different tricks?"}),
                    ("Statistics/Machine Learning","Sparse coding",{'title':"Why do the filters trained in the first layer resemble those obtained from sparse coding?"}),
                    ("Optimization","Landscape of loss",{'title':"What is the landscape of the objective function being minimized?"})]

# lectures and questions
lectures_questions = [("Lecture 3:\nHelmut Bolcskei","Translation invariance",{'title':"Features become more translation invariant with increasing network depth."}),
                      ("Lecture 3:\nHelmut Bolcskei","Stability to deformations",{'title':"For certain classes of signals, the features are stable to deformations."}),
                      ("Lecture 3:\nHelmut Bolcskei","Energy propagation",{'title':"The energy of the features decays exponentially or polynomially, depending on the assumptions on the filters."}),
                      ("Lecture 3:\nHelmut Bolcskei","Network design",{'title':"Filters or number of layers can be designed for energy preservation."}),
                      ("Lecture 3:\nHelmut Bolcskei","Deep versus shallow",{'title':"Depth width tradeoff for networks with wavelet filters."}),
                      ("Lecture 4:\nAnkit Patel","Generative modeling",{'title':"NN-DRMM: a heirarchical generative deep sparse coding model."}),
                      ("Lecture 4:\nAnkit Patel","Architectures as inference algorithms",{'title':"Convnets are a max-sum-product message passing bottom-up inference algorithm."}),
                      ("Lecture 4:\nAnkit Patel","Interpretation of tricks",{'title':"ReLU and max pooling as max-marginalization."}),
                      ("Lecture 4:\nAnkit Patel","Sparse coding",{'title':"Only the sparse set of active paths matter for the final decision of the convnet."}),
                      ("Lecture 5:\nTomaso Poggio","Deep versus shallow",{'title':"For compositional functions deep networks avoid the curse of dimensionality because of locality of constituent functions."}),
                      ("Lecture 5:\nTomaso Poggio","Landscape of loss",{'title':"Many global minima that are found by SGD with high probability."}),
                      ("Lecture 5:\nTomaso Poggio","Overfitting",{'title':"Gradient descent avoids overfitting without explicit regularization, despite overparametrization."}),
                      ("Lecture 5:\nTomaso Poggio","Implicit regularization",{'title':"Gradient descent results in implicit regularization in deep linear networks."})]

edges = G.edges(data=True)

edge_to_color = []
edge_color = ['gray' if (edge in topics_questions) else 'gray' for edge in G.edges()]
edge_to_color = dict(zip(G.edges(),edge_color))
In [5]:
# set node initial positions using networkx's spring_layout function
pos = nx.spring_layout(G)

nodes_dict = [{"id":n,
               "y":pos[n][1]*1000} for n in nodes]
node_map = dict(zip(nodes,range(len(nodes))))  # map to indices for source/target in edges
edges_dict = [{"source":node_map[edges[i][0]], "target":node_map[edges[i][1]], 
              "title":edges[i][2]['title']} for i in range(len(edges))]

# set some network-wide styles
                          node_size_transform = '',
Network | Basic usage