πͺπΈ Resumen: Red Neuronal Siamesa diseΓ±ada para predecir la reactividad quΓmica entre pares de elementos. Logra mΓ‘s del 96% de precisiΓ³n utilizando embeddings de propiedades atΓ³micas.
π¬π§ English Profile: Siamese Neural Network architecture designed to predict chemical reactivity between element pairs. Achieves over 96% accuracy using atomic property embeddings.
DeepLearning models to predict if two chemical elements will react with each other.
ReactionNet uses Siamese Neural Networks to predict chemical reactivity between element pairs. The project includes:
- β Two trained models (V1 and V2) with 96%+ accuracy
- β 10,000 reaction pairs from real scientific literature
- β Interactive web demo
- β Complete training notebooks for Google Colab
- β Both PyTorch and ONNX formats
| Model | Accuracy | F1-Score | AUC-ROC | Parameters |
|---|---|---|---|---|
| V1 (Recommended) | 96.07% | 96.11% | 0.9950 | 39K |
| V2 (Transfer Learning) | 95.67% | 95.68% | 0.9940 | 150K |
Winner: ReactionNet V1 - simpler, faster, and more accurate! β¨
Open demo/index.html in your browser for an instant interactive experience.
Python with PyTorch:
import torch
# Load model
model = ReactionNetV1()
model.load_state_dict(torch.load('models/reactionnet_v1.pth'))
model.eval()
# Predict (example: Na + Cl)
elem1 = torch.tensor([[0.085, 0.077, 0.233, 0.031, 0.206, 0.056, 0.286, 0.0]])
elem2 = torch.tensor([[0.131, 0.118, 0.790, 0.117, 0.531, 0.944, 0.429, 0.333]])
probability = model(elem1, elem2)
print(f"Reaction probability: {probability.item():.4f}")Python with ONNX:
import onnxruntime as ort
import numpy as np
session = ort.InferenceSession('models/reactionnet_v1.onnx')
result = session.run(None, {'element_1': elem1, 'element_2': elem2})
print(f"Probability: {result[0][0][0]:.4f}")- Open
notebooks/ReactionNet_V1_Training.ipynbin Google Colab - Upload
data/reaction_pairs_lite.json - Run all cells
- Download your trained model
ReactionNet_GitHub_Package/
βββ models/ # Trained models (V1 and V2)
β βββ reactionnet_v1.pth
β βββ reactionnet_v1.onnx
β βββ reactionnet_v2.pth
β βββ reactionnet_v2.onnx
β
βββ data/ # Training datasets
β βββ reaction_pairs_lite.json (10K pairs)
β βββ inorganic_reactions_curated.json (5K reactions)
β βββ periodic_table_master.json (130 elements)
β
βββ results/ # Training reports and metrics
β βββ v1/ # V1 results
β βββ v2/ # V2 results
β
βββ demo/ # Interactive web demo
β βββ index.html
β
βββ notebooks/ # Training notebooks
β βββ ReactionNet_V1_Training.py
β βββ ReactionNet_V2_Training.py
β
βββ docs/ # Documentation
βββ MODEL_COMPARISON.md
βββ TRAINING_GUIDE.md
βββ API_REFERENCE.md
- Atomic number (normalized)
- Atomic mass (normalized)
- Pauling electronegativity
- Allen electronegativity
- First ionization energy
- Group number
- Period number
- Block (s/p/d/f)
- Type: Siamese Neural Network with Attention
- Encoder: 8 β 128 β 64
- Attention: Learnable weights
- Fusion: Concatenate β 128 β 64 β 32 β 1
- Output: Sigmoid (reaction probability)
- Dataset: 10,000 balanced pairs (50% positive, 50% negative)
- Source: Real reactions from CederGroup database
- Optimizer: AdamW with weight decay
- Scheduler: ReduceLROnPlateau
- Early Stopping: 25 epochs patience
- Model Comparison - V1 vs V2 detailed analysis
- Training Guide - How to train your own models
- API Reference - Complete API documentation
If you use this work in your research, please cite:
@software{speranza2026reactionnet,
author = {Speranza, Maximiliano Rodrigo},
title = {ReactionNet: Chemical Reactivity Prediction with Deep Learning},
year = {2026},
url = {https://github.com/SperanzaMax/reactionnet}
}- Expand to organic reactions
- Predict specific reaction products
- Add temperature/pressure conditions
- Multi-reactant support (3+ elements)
- Reaction mechanism prediction
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details
Maximiliano Rodrigo Speranza
Email: maximiliano.speranza@gmail.com
Date: January 2026
β If you find this useful, please star the repo!