<jupyter_start><jupyter_text>Take a 2-node neural network...$$N = \begin{bmatrix} d_{11} & d_{12} \\ d_{21} & d_{22} \end{bmatrix} \quad \quad \vec{n}_1 = \begin{bmatrix} d_{11} \\ d_{21} \end{bmatrix} \quad \vec{n}_2 = \begin{bmatrix} d_{21} \\ d_{22} \end{bmatrix}$$To find the properties of the delays and activation times for a 2-node network that will result in network-scale oscillations we can represent it using the new time shift operator as follows$$N*\vec{t} = N*(\vec{t}+c)$$where $c$ is the period of the oscillations...We begin the analysis by activating the network with arbitrary stimulus $\vec{t}=\begin{bmatrix} t_1 \\ t_2 \end{bmatrix}$.$$N*\vec{t} = \begin{bmatrix} d_{11} & d_{12} \\ d_{21} & d_{22} \end{bmatrix}*\begin{bmatrix} t_1 \\ t_2 \end{bmatrix} = \begin{bmatrix} d_{11} \\ d_{21} \end{bmatrix}*t_1 + \begin{bmatrix} d_{21} \\ d_{22} \end{bmatrix}*t_2 = \big\{d_{11}+t_1, d_{12}+t_2\big\}_2*\begin{bmatrix} d_{11} \\ d_{21} \end{bmatrix} + \big\{d_{21}+t_1, d_{22}+t_2\big\}_2*\begin{bmatrix} d_{21} \\ d_{22} \end{bmatrix}$$For both $\vec{n}_1$ and $\vec{n}_2$ to be activated we require that the elements in the arrival set equal one another. However, as shown in the problem statement above we need more than that, we need them to both equal $\vec{t}+c$. This yields the following system of equations.$$\begin{align}& d_{11} + t_1 = t_1 + c & & \hspace{20pt} d_{11} = c \\& d_{12} + t_2 = t_1 + c & \Rightarrow & \hspace{20pt} d_{12} = c - \Delta t \\& d_{21} + t_1 = t_2 + c & & \hspace{20pt} d_{21} = c + \Delta t \\& d_{22} + t_2 = t_2 + c & & \hspace{20pt} d_{22} = c \\\end{align}$$where $\Delta t = t_2 - t_1$. Here we see that given **any** oscillation period, $c$, and **any** temporal offset in activation, $\Delta t$, we can always find appropriate delays to construct a 2-node network that will exhibit seizure like oscillations. What happens if we allow for inhibition?Inhibition is represented by a negative delay. This convention is convenient given the properites of the arrival set (not covered here). So let's look at the same problem above, but allow for inhibition. ---We begin again by activating the network at an arbitrary time.$$N*\vec{t} = \begin{bmatrix} d_{11} & d_{12} \\ d_{21} & d_{22} \end{bmatrix}*\begin{bmatrix} t_1 \\ t_2 \end{bmatrix} = \begin{bmatrix} d_{11} \\ d_{21} \end{bmatrix}*t_1 + \begin{bmatrix} d_{21} \\ d_{22} \end{bmatrix}*t_2$$ $$= \big\{d_{11}+\text{sgn}(d_{11})t_1, d_{12}+\text{sgn}(d_{12})t_2\big\}_2*\begin{bmatrix} d_{11} \\ d_{21} \end{bmatrix} + \big\{d_{21}+\text{sgn}(d_{21})t_1, d_{22}+\text{sgn}(d_{22})t_2\big\}_2*\begin{bmatrix} d_{21} \\ d_{22} \end{bmatrix}$$Everything is the same except now the arguments of the arrival set have changed. This will change the properties of the system of equations.$$\begin{align}& d_{11} + \text{sgn}(d_{11})t_1 = \text{sgn}(d_{11})(t_1 + c) & & \hspace{20pt} d_{11} = c + (1-\text{sgn}(d_{11}))t_1 \\& d_{12} + \text{sgn}(d_{12})t_2 = \text{sgn}(d_{12})(t_1 + c) & \Rightarrow & \hspace{20pt} d_{12} = c + t_1 - \text{sgn}(d_{12})t_2 \\& d_{21} + \text{sgn}(d_{21})t_1 = \text{sgn}(d_{21})(t_2 + c) & & \hspace{20pt} d_{21} = c + t_2 - \text{sgn}(d_{21})t_1 \\& d_{22} + \text{sgn}(d_{22})t_2 = \text{sgn}(d_{22})(t_2 + c) & & \hspace{20pt} d_{22} = c + (1-\text{sgn}(d_{22}))t_2 \\\end{align}$$Conceptually, if any one connection is inhibitory then there should be no oscillations. This is because each node has only 2 inputs so they must both be excitatory for activation to occur. We can see this mathematically. Let us allow neuron 1's autapse to be inhibitory, i.e. $\text{sgn}(d_{11}) = -1$, and the rest to be excitatory.$$\begin{align}d_{11} &= c - 2t_1 \\d_{12} &= c - \Delta t \\d_{21} &= c + \Delta t \\d_{22} &= c \\\end{align}$$ This can easily be represented in matrix form$$\begin{bmatrix} 1 & 0 & 0 & 0 & 0 \\0 & 1 & 0 & 0 & 1 \\0 & 0 & 1 & 0 & -1 \\0 & 0 & 0 & 1 & 0 \\\end{bmatrix} \begin{bmatrix} d_{11} \\ d_{12} \\ d_{21} \\ d_{22} \\ \Delta t \end{bmatrix} =  \begin{bmatrix} c \\ c \\ c \\ c \end{bmatrix}$$We have an underdetermined system. We can examine a few of its properties<jupyter_code>import numpy as np

A = np.array((1,0,0,0,0,0,1,0,0,1,0,0,1,0,-1,0,0,0,1,0)).reshape(4,5); print "--- A ---\n", A
np.linalg.linalg.matrix_rank(A)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.20198752022186273, 'fraction_numerical': 0.06470996071180957, 'mean_word_length': 3.9976905311778292, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '117821', 'license': 'MIT', 'n_tokens_mistral': 1815, 'n_tokens_neox': 1623, 'n_words': 490, 'path': 'neural_algebra/Neural Algebra.ipynb', 'repo_name': 'mathnathan/notebooks', 'size': '4327'}