Self-supervised model selection using Deep learning of a Partitioned Weighted Affinity Kernel. A DeePWAK model aims to cluster data based on finding the partition of the data which is best able to reconstruct the data. It relies on the isomorphism between denoising, clustering, and compression.
Batched data is optionally passed through an encoder network to obtain a dimension-reduced embedding. A distance metric, which can optionally be learned, is used to produce a distance matrix for the batch. A partition network attempts to learn classifications for each data point from the embeddings.
Julia 1.9
R 4.0+
#MNIST example
julia main.jl
# parse segmentation data from /segdat
Rscript readEmbryos.R
# generate graph of known target protein interactions from STINGdb
Rscript interactions.R
# generate embeddings, graph, clusters
julia cluster.jl
# generate plots and characterize optimal clusterings
Rscript plot.clust.R
DeePWAK attempts to generalize a pipeline for automatic phenotype detection in microscopy images. Its objective function is based on noise2self, a paradigm for self-supervised denoising. In broad strokes, it can be equated to batched LOOCV.
Let
The optimal
Our choice of
We want to approximate selection of an optimal number of dimensions. Because adding embedding dimensions always improves performance, we want to impose a penalty for a larger number. We also want to limit polysemanticity.
To do this we attempt to learn a weight vector
To enforce sparsity, we can add entropy of the weights to the loss.
We want to enforce that clusters are well-separated. Modularity gives the difference between the number of edges between nodes in a cluster and expected number of edges given the number of nodes in the cluster and average degree of the graph. It is given by
where
Modularity can also be added to the loss function.