Loghman Samani

Loghman Samani

Computational Biologist

M.Sc. Computational Biology, University of Stuttgart

About

I hold a master's degree in computational biology from the University of Stuttgart and am currently seeking PhD or research positions that combine computational structural biology with machine learning. My training has focused on building quantitative, principled models for biological systems, with an emphasis on methodological clarity and reproducibility.

My current research focuses on model-based reinforcement learning and world models for protein engineering. I am developing BioDreamer, an open-source framework where JEPA-based world models learn latent simulators of biological systems and plan optimal interventions in imagination, with a primary focus on multi-step protein design through the ProteinDreamer module. Methodologically, I work with diffusion models, energy-based models, and physics-aware generative architectures for protein structure prediction and design. I am also interested in how principles from biological neural computation can inform the design of more interpretable artificial learning systems.

Research Interests

World Models & Model-Based RL

JEPA-based world models and Active Inference for planning multi-step biological interventions in learned latent spaces.

Protein Structure & Design

Generative models for protein structure prediction, fitness landscape navigation, and multi-step mutation planning.

Diffusion & Score-Based Models

Theory and application of denoising diffusion, score matching, and stochastic differential equations to generative modeling in biology.

Energy-Based & Physics-Aware Models

Energy-based models, Boltzmann distributions, and geometry-aware architectures that respect the physical constraints of biomolecular systems.

Molecular Dynamics

Learned latent-space simulators for molecular dynamics, replacing brute-force integration with amortized in-silico reasoning.

Neuroscience & Computation

Connections between biological neural computation and artificial learning systems, particularly through the lens of the Free Energy Principle.

Education

2023 – 2025
M.Sc. Computational Biology
University of Stuttgart, Germany
2014 – 2018
B.Sc. Cell and Molecular Biology
University of Kurdistan, Iran

Projects

BioDreamer: World Models for Biological Design

Python · PyTorch · FastAPI · Docker

An open-source framework that applies JEPA-based world models and Active Inference to biological design across three scales: molecular dynamics (MolDreamer), protein fitness landscapes (ProteinDreamer), and gene regulatory network dynamics (CellDreamer). The core ProteinDreamer module learns a latent-space simulator and plans multi-step mutation trajectories in imagination before committing to expensive evaluations. Supports two world model backends, Latent Diffusion JEPA and Energy-Based JEPA, with a shared encoder, reward head, and policy interface.

CppNet: High-Performance Deep Learning in C++

C++ · Eigen · OpenMP · CUDA

A C++17 deep learning library built from scratch with per-layer backend selection across Eigen (SIMD vectorization), OpenMP (CPU parallelism), and CUDA (GPU acceleration). Implements 41 CUDA kernels covering all layers, activations, losses, and optimizers, achieving up to 56x GPU speedup. Supports Linear, Conv2D, RNN, LSTM, GRU, Multi-Head Attention, BatchNorm, Dropout, Embedding, and Residual blocks with training utilities for scheduling, checkpointing, and early stopping.

TorchDiff: Diffusion Models in PyTorch

Python · PyTorch

A modular PyTorch library implementing five diffusion model families: DDPM, DDIM, score-based SDE (VE, VP, sub-VP variants), Latent Diffusion, and unCLIP, with Kandinsky under active development. Supports conditional text-to-image synthesis and unconditional generation with configurable noise schedules and sampling strategies. Each model shares reusable components for noise prediction, text encoding, and evaluation metrics.

GRN-Designer: Automated Gene Regulatory Network Design

Python · Optimization · PDEs

A hybrid optimization framework developed as part of my Master's thesis. Combines evolutionary algorithms with gradient-based refinement to automatically construct gene regulatory networks that reproduce target spatial expression patterns. Models spatial gene expression dynamics through PDE-based reaction-diffusion equations with heterogeneous initial conditions. Successfully generated GRNs for patterns of increasing complexity, from simple gradients to intricate shapes such as chromosome symbols and DNA strands.

Writing

From tabular planning to real-time interactive world generation, three decades of model-based reinforcement learning.
March 2026
Adaptive Fokker-Planck regularization and physics-informed distillation for molecular dynamics with energy-based diffusion models.
Medium · 14 min read
Theory, architecture, and practical PyTorch implementation for efficient high-resolution image generation.
Medium · 11 min read
Score-based generative models via stochastic differential equations with VE, VP, and sub-VP formulations in PyTorch.
Medium · 17 min read
Theoretical foundations and practical implementations covering DDPM, DDIM, score-based SDE models, and latent diffusion.
Medium · 17 min read
Connecting principles of biological evolution to Python-based implementations for optimization problems.
Medium · 18 min read
The Adam optimizer and its application in training multiclass MLPs for faster convergence and robust performance.
Medium · 21 min read
Constructing and training deep feedforward networks using backpropagation, with Python implementations for binary classification.
Medium · 13 min read
A Python library for deterministic and stochastic simulation including Euler, Runge-Kutta, SSA, Tau-Leaping, and Chemical Langevin methods.
Medium · 13 min read
AlphaFold as a machine learning system for predicting protein structures from amino acid sequences with atomic accuracy.
Medium · 13 min read
NMR spectroscopy and its applications in structural biology, covering protein structure, dynamics, interactions, and intrinsically disordered proteins.
Medium · 20 min read