Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider a simplified neural network consisting of a collection of n neural unit

ID: 3707025 • Letter: C

Question

Consider a simplified neural network consisting of a collection of n neural units described by an activation level , (a real number), fo0,... ,n -1. The updating of the activation level of each neural unit x, at each time step is controlled by the folowing equations t+1 tanh( In equation (2), the second term on the right side describes the neural unit 'local' dynamics, which has a strength determined by the parameter p (a real value). The last term on the right side reflects the random unit-to-unit interacti value of x Interactions bet ween the individual neural units are controlled by the elements of the n × n connection matrix G, which are drawn independently from issi an distr with mean 0 and variance 1/n where q is a scaling parameter (a real value has an impact on the Your task: complete the function below in pseudocode to update the activation level of each of the n neural units. You mayassume that the n neural un ue n an array A[O,.. ,n-1], that is r-A[i] Assuming that the activation levels of neural units at time step t are valid, your function should calculate the new neural unit activation levels at ime1 You may call the maths library' function tanhin your stor pseudocode function UPDATE(A0,.. n 1], G,p,q) Input: A an array of neural unit activation levels r in the neural network at time t G the neural unit interaction graph in adjacency matrix (n × n) format // Output. A an updated array containing the activation levels for each neural unit 2.i in the neural network at time t 1 add pseudocode here

Explanation / Answer

function UPDATE(A[0,...,n-1],G,p,q)

//put value of delta xi from equation 2 to equation 1 and we will get the formula for calculating updated value of x at time t+1

for i in range(0,n):

value1 = p*tanh(A[i])

value2 = 0

for j in range(0,n):

if j == i :

continue

value2 = value2 + G[i,j]*tanh(A[j])

value2 = q*value2

updated_x[i] = value1 + value2

return updated_x