Memory Matching Networks for Genomic Sequence Classification

Jack Lanchantin, Ritambhara Singh, Yanjun Qi

Introduction

Identifying protein binding sites within genomic sequences is a fundamental challenge in computational biology. Transcription Factors (TFs) regulate gene expression by binding to specific DNA patterns known as motifs. While traditional methods like Position Weight Matrices (PWMs) offer interpretability, they often lack the predictive power of modern deep learning. Conversely, standard deep learning models like Convolutional Neural Networks (CNNs) achieve high accuracy but often function as "black boxes." This paper, presented at the ICLR 2017 workshop track, introduces Memory Matching Networks (MMN), an architecture designed to bridge the gap between performance and biological interpretability.

Methodology

The Memory Matching Network (MMN) adapts the concept of matching networks—originally developed for one-shot learning—to the task of genomic sequence classification. The core innovation is the "Motif Memory Bank," a set of learnable matrices ($M_i$) that represent various genomic motifs.

The Memory Matching Network (MMN) architecture. The model processes an input sequence $S$ and compares its embedding $s$ against a learnable Motif Memory Bank to produce a classification $y$.

The MMN pipeline consists of three primary stages:

  1. Embedding: The input DNA sequence ($S$) is processed via a bidirectional LSTM with an attention mechanism, generating a context vector ($s$). Simultaneously, motifs in the memory bank are embedded into the same vector space.
  2. Matching: The model computes the cosine similarity between the sequence embedding and each motif in the memory bank, resulting in importance weights ($w_i$).
  3. Reading and Classifying: A "read vector" ($r$) is formed as a weighted combination of relevant motifs. This vector, combined with the sequence embedding, informs the final binary classification (binding vs. non-binding).

Experimental Setup

The model was evaluated on 61 leukemia cell TF datasets originally compiled by Alipanahi et al. (2015). Each dataset contains at least 10,000 training sequences and exactly 1,000 testing sequences. Sequences are 101 base pairs long, composed of the DNA characters A, C, G, and T, with an even split between positive (binding) and negative (non-binding) sites.

Experimental Results

MMN consistently outperformed traditional PWMs and standard deep learning baselines (LSTM and CNN) across all 61 datasets. The superior performance of MMN over CNNs is particularly significant, as CNNs are typically the preferred architecture for motif discovery.

Model Mean AUC Median AUC
PWM (Traditional) 0.850 0.876
LSTM 0.910 0.932
CNN 0.918 0.940
MMN (Ours) 0.926 0.950

Interpretability and Discussion

A key advantage of the MMN is its inherent interpretability. By examining the attention weights ($\alpha$) and memory comparison weights ($w$), researchers can visualize the specific patterns driving the model's predictions. Unlike standard CNNs where filters are fixed after training, the MMN uses a differentiable "nearest neighbor" approach to recognize sequences based on combinations of multiple learned motifs.

Visualization of character attention weights $\alpha$ and memory comparison weights $w$ for a DNA sequence, demonstrating how the model identifies biologically relevant motifs.

For instance, in the ATF1 dataset, the model's attention correctly identified the known "TGACGTA" motif. This alignment with domain knowledge makes MMN a powerful tool for both prediction and biological discovery.

Limitations and Future Work

While the attention weights show where the model is looking, directly translating high-dimensional memory matrices back into simple DNA strings for human researchers remains challenging. Future work will focus on scaling this memory-based approach to larger datasets and exploring its application in other classification tasks within natural language processing and computer vision.

Summary updated

BibTeX
@inproceedings{lanchantin2017memory,
  author = {Jack Lanchantin and Ritambhara Singh and Yanjun Qi},
  title = {{Memory Matching Networks for Genomic Sequence Classification}},
  booktitle = {Workshops @ ICLR},
  year = {2017},
}
Figure