Abstract
Relational Dynamic Memory Networks (RDMN) bridge the gap between Memory-Augmented Neural Networks (MANNs) and Graph Neural Networks (GNNs). By replacing the traditional "flat" memory matrix with a structured, multi-relational graph memory, RDMN allows neural controllers to reason more effectively over complex data like molecules and source code. We evaluate RDMN across software vulnerability detection, molecular bioactivity, and chemical-chemical interaction tasks, demonstrating significant performance gains over traditional flat-memory architectures and standard graph neural networks.
Introduction
Standard neural networks excel at pattern recognition but often struggle to manipulate complex, structured data. Memory-Augmented Neural Networks (MANNs) addressed this by decoupling computation from storage, using a controller (CPU) and an external memory matrix (RAM). However, standard MANN memory is typically a flat, unstructured grid. When modeling structured objects like molecules or software call graphs, forcing this data into a flat matrix loses the inherent "connectedness" that defines the data's meaning. Relational Dynamic Memory Networks (RDMN) address this by ensuring the memory architecture itself reflects the structure of the data it holds.
Methods
The RDMN architecture consists of two primary components: a recurrent neural network (RNN) controller and a memory organized as a set of multi-relational graphs.
The reasoning process is executed in discrete episodes:
- Encoding: The system embeds each node of an input graph into a specific cell in the memory.
- Iterative Reasoning: Over multiple "hops," the controller reads from memory using content-based attention to identify relevant nodes.
- Structured Updates: When the controller writes back to memory, the update is propagated via a message-passing mechanism. Memory cells update their states based on both the controller's input and the states of their graph neighbors, similar to Graph Neural Networks (GNNs).
- Decoding: After the reasoning steps, the controller produces a final answer based on its internal state and the query.
Datasets and Evaluation
The RDMN was evaluated on three distinct domains requiring structural reasoning:
- Software Vulnerability: Predicting security risks in 2,836 Java classes, where nodes represent methods and edges represent function calls.
- Molecular Bioactivity: Nine NCI BioAssay datasets (e.g., AIDS antiviral, cancer screens) where molecules are represented as graphs of atoms and bonds.
- Chemical-Chemical Interaction (CCI): Predicting interactions between two different molecules using the STITCH database (CCI900 and CCI800).
Key Results and Insights
RDMN demonstrated superior performance in tasks where structural topology is critical:
- Bioactivity: RDMN achieved a 77.8% Micro F1-score and 92.1% Average AUC, significantly outperforming SVMs, Random Forests, and multi-task neural network (MT-NN) baselines. Joint training across multiple cancer types improved performance by 10-20%, suggesting the model effectively shares knowledge across related genomic footprints.
- Chemical Interaction: On the CCI900 dataset, RDMN reached a 98.1% AUC and 94.6% F1-score. The use of multiple "read heads" proved crucial here, allowing the model to simultaneously attend to different substructures of interacting molecules.
- Regularization via Side Information: Using global descriptors (like SMILES strings) as the query helped prevent overfitting by guiding the attention mechanism.
- Software: Improvement in software vulnerability detection was modest (approx. 2 points in AUC over Gradient Boosting Machines), indicating that the "graphness" of source code may be more challenging to exploit than molecular structures.
Conclusion
Relational Dynamic Memory Networks demonstrate that "structure-aware" reasoning is a powerful paradigm for complex data. By baking connectivity into the memory update rules, the model avoids the need to re-learn data topology at every step. Future research will explore dynamic memory graphs that can evolve their connections during reasoning and asynchronous processing to handle more complex multi-compound interactions.
Summary updated