Aggregated Weight Matrices Used in Transformers Enhance the Predictive Power of Network Medicine

Jonah Spector, Andrés Aldana Gonzalez, Michael Sebek, Joseph Ehlert, Christian DeFrondeville, Albert-László Barabási

Data Structure

This directory contains all aggregated weight matrices used to make figures in the manuscript. The data structure is as follows

aggregated_matrices
    aggregated_attentions
        dcm_samples
            fine_tuned
                max
                    layer_0
                    layer_1
                    layer_2
                    layer_3
                    layer_4
                    layer_5
            pretrained
                max
        genecorpus
            fine_tuned
                max
            pretrained
                max
    aggregated_embeddings
        dcm_samples
            fine_tuned
                max
                    layer_input
                    layer_0
                    layer_1
                    layer_2
                    layer_3
                    layer_4
                    layer_5
            pretrained
                max
        genecorpus
            fine_tuned
                max
            pretrained
                max

In each max folder, there are 3 files, called counts.pkl, vals.pkl, gene_dict.pkl. The counts matrix is a square matrix of size NxN, where N is the number of unique genes in the sample set. It counts how many times each pair of genes co-occurs in a sample. The vals matrix is the same shape, and contains the aggregated weight between each pair of genes. gene_dict.pkl is a dictionary that specifies the index of each gene in the matrix.