PHYSICAL PDF PAGE 4 / 17

                                   What Makes a Good Feedforward Computational Graph?



                                                                                  n           i1     it−2

We call this quantity the averaged mixing time (Espuny Dı́az                1 X 1 X                  X    1

et al., 2024). We will now demonstrate its behaviour is as            =                          ···           it−1 (it−1 +1)/2

                                                                          n + 1 i =0 i0 + 1 i =0 i =0 it−1 + 1

expected on two commonly used graph distributions.                               0           1        t−1





                                                                      and inductively, we can show that this is

4.3.1. L INE G RAPHS

Let G be the line graph from vertex 0 to vertex n − 1, as                                           n

                                                                                                       .

previously defined. Suppose that we start a random walk at                                          2t

vertex n − i − 1, i.e., the initial probability distribution is

                                                                      When t > log2 4n2 , this expectation is at most 1/(4n).

en−i−1 . We want to consider the probabilty of not reaching

                                                                      This implies that the probability of being on the terminal

the terminal vertex after t steps. We can think of flipping

                                                                      vertex 0 is at least 3/4. Hence, the mixing time is at most

a coin t times and we step right only if we get a head. We

                                                                      log2 4n2 = 2 + 2 log n.

reach the terminal vertex if and only if we get at least i

heads. So the probability of not reaching it in t steps is

                                                                      4.4. Discussion About Mixing Time as a Good Measure

                        X t

                                  2−t .                               When the graph has fixed out-degree κ, then as observed

                         j<i

                               j                                      before,

                                                                                                  1

The average of this value, over all i between 0 and n − 1, is                               W = A.

                                                                                                  κ

       n−1              n−1

                                                                      Hence κW is the adjacency matrix A for the graph. Mixing

                                     

     1 X X t −t       1X                t −t

                  2 =       (n − i − 1)   2 .                         time measures how close Wt ei is to the stationary distribu-

     n i=0 j<i j      n i=0             i                                                                                t

                                                                      tion. In other words, it measures the size of Wn−1,i     . This

                                                                             t                              t

                                                                      is 1/κ times the an−1,i entry of A . Now this entry of At

When n ≥ t,

                                                                      counts the number of oriented paths of length t in G from

                 n−1                                                vertex i to the terminal vertex. So, we have the conjectured

                 X            t −t

                     (n − 1)    2 = (n − 1)                           equivalence: mixing time is small (e.g. O(log n)) if and

                              i

                 i=0                                                  only if there are ‘lots’ of paths from ‘most’ vertices to τ . In

                                                                      fact, we can formally prove the following proposition:

           n−1         t    

           X      t −t X t −t

                i   2 =     i    2 = t/2                              Proposition 4.2. Suppose that the outdegree of every vertex

            i=0

                  i     i=0

                               i                                      other than τ is at least 2. Let t be the average mixing time.

So, the average value of the probability of not reaching the          Then for some s ≤ t, the average number of paths from

terminal vertex is                                                    vertex i to τ with length s is at least (3/4t)2s , where the

                                                                    average is taken over all vertices i between 0 and n − 1.

              1             t           t+2

                   n−1−         =1−          .

              n             2            2n                           One way to interpret this is for the mixing time of G to be

                                                                      ‘small’, then there must be exponentially many paths from

This is less than 1/4 when t > 3n/2. Hence, the averaged              a typical vertex to τ with length less than the mixing time.

mixing time is 3n/2, which is O(n).                                   We prove this statement in Appendix A. As having many

                                                                      paths seems useful for efficient data propagation, mixing

4.3.2. F ULLY C ONNECTED G RAPHS                                      time seems a good measure of how efficient our network

                                                                      will be under this computational graph.

Now consider the case when G is the fully connected feed-

forward graph. For convenience, we will label the graph               Typically, we will treat mixing time as a cutoff, determining

with vertices {0, . . . , n} where every pair of vertices i and       which graphs would require too many layers—much like

j with i < j are joined by an oriented edge from j to i.              the under-reaching problem (Barceló et al., 2020). It is

(Hence, in this scenario, 0 is the terminal vertex.) Then the         also interesting to note that the fully connected graph does

average mixing time is of the order O(log n).                         not have optimal mixing time—in fact, the additional paths

                                                                      create a distraction, and the mixing time is optimised by the

To prove this, say that we start at position i0 and then move

                                                                      “feedforward star” graph with edges E = {(i, τ ) | i ∈ V}.

to position i1 , ending at it after t steps. Then the expected

                                                                      This relates to an observation by Di Giovanni et al. (2024),

value of the vertex after t steps is

                                                                      showing how fully-connected undirected graphs do not have

             n           i1       it−2          it−1                  optimal commute time due to distracting additional edges.

       1 X 1 X                    X        1    X

                                                                      However, we will not favour such solutions due to a lack of

                            ···                      it

     n + 1 i =0 i0 + 1 i =0     i

                                       i

                                     =0 t−1

                                            + 1 i =0                  self-similarity.

             0           1        t−1               t







                                                                  4

